@burdenoff/microfe-export 2026.1107.1 → 2026.1108.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/dev/main.d.ts +0 -2
- package/dist/export/ExportRoot.d.ts +0 -2
- package/dist/export/ExportRoot.js +9 -6
- package/dist/export/ExportRoot.js.map +1 -1
- package/dist/export/ExportRoutes.d.ts +1 -2
- package/dist/export/ExportRoutes.js +1 -2
- package/dist/export/ExportRoutes.js.map +1 -1
- package/dist/export/components/ExportProgressBar.d.ts +1 -2
- package/dist/export/components/ExportProgressBar.js +1 -2
- package/dist/export/components/ExportProgressBar.js.map +1 -1
- package/dist/export/components/ExportStatusBadge.d.ts +1 -3
- package/dist/export/components/ExportStatusBadge.js +7 -8
- package/dist/export/components/ExportStatusBadge.js.map +1 -1
- package/dist/export/components/PageLayout.d.ts +3 -5
- package/dist/export/components/PageLayout.js +1 -2
- package/dist/export/components/PageLayout.js.map +1 -1
- package/dist/export/constants/enums.d.ts +0 -2
- package/dist/export/constants/enums.js +1 -2
- package/dist/export/constants/enums.js.map +1 -1
- package/dist/export/constants/index.d.ts +0 -1
- package/dist/export/hooks/useExportQueries.d.ts +16 -33
- package/dist/export/hooks/useExportQueries.js +223 -225
- package/dist/export/hooks/useExportQueries.js.map +1 -1
- package/dist/export/hooks/useTr.d.ts +0 -2
- package/dist/export/hooks/useTr.js +1 -2
- package/dist/export/hooks/useTr.js.map +1 -1
- package/dist/export/index.d.ts +0 -1
- package/dist/export/index.js +5 -4
- package/dist/export/pages/CreateExportPage.d.ts +1 -2
- package/dist/export/pages/CreateExportPage.js +228 -229
- package/dist/export/pages/CreateExportPage.js.map +1 -1
- package/dist/export/pages/ExportDashboardPage.d.ts +1 -2
- package/dist/export/pages/ExportDashboardPage.js +17 -18
- package/dist/export/pages/ExportDashboardPage.js.map +1 -1
- package/dist/export/pages/ExportDetailPage.d.ts +1 -2
- package/dist/export/pages/ExportDetailPage.js +39 -40
- package/dist/export/pages/ExportDetailPage.js.map +1 -1
- package/dist/export/pages/ExportHistoryPage.d.ts +1 -2
- package/dist/export/pages/ExportHistoryPage.js +21 -20
- package/dist/export/pages/ExportHistoryPage.js.map +1 -1
- package/dist/export/pages/ExportLandingPage.d.ts +1 -2
- package/dist/export/pages/ExportLandingPage.js +1 -2
- package/dist/export/pages/ExportLandingPage.js.map +1 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts +1 -2
- package/dist/export/pages/ExportTemplatesPage.js +25 -30
- package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
- package/dist/export/pages/TemplateDetailPage.d.ts +1 -2
- package/dist/export/pages/TemplateDetailPage.js +11 -12
- package/dist/export/pages/TemplateDetailPage.js.map +1 -1
- package/dist/export/providers/ExportProvider.d.ts +0 -2
- package/dist/export/providers/ExportProvider.js +12 -16
- package/dist/export/providers/ExportProvider.js.map +1 -1
- package/dist/export/store/exportStore.d.ts +0 -2
- package/dist/export/store/exportStore.js +1 -2
- package/dist/export/store/exportStore.js.map +1 -1
- package/dist/export/types/index.d.ts +0 -1
- package/dist/export/utils/cn.d.ts +0 -2
- package/dist/export/utils/cn.js +2 -3
- package/dist/export/utils/cn.js.map +1 -1
- package/dist/export/utils/disabledModules.d.ts +0 -1
- package/dist/export/utils/disabledModules.js +3 -4
- package/dist/export/utils/disabledModules.js.map +1 -1
- package/dist/export/utils/events.d.ts +0 -2
- package/dist/export/utils/events.js +1 -2
- package/dist/export/utils/events.js.map +1 -1
- package/dist/export/utils/exportAuthority.d.ts +1 -6
- package/dist/export/utils/exportAuthority.js +5 -30
- package/dist/export/utils/exportAuthority.js.map +1 -1
- package/dist/export/utils/i18n.d.ts +0 -2
- package/dist/export/utils/i18n.js +1 -2
- package/dist/export/utils/i18n.js.map +1 -1
- package/dist/generated/global-operations.d.ts +4 -2
- package/dist/generated/global-types.d.ts +2 -22
- package/dist/generated/wspace-operations.d.ts +226 -181
- package/dist/generated/wspace-operations.js +1 -2
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +4 -24
- package/dist/generated/wspace-types.js +1 -2
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
- package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
- package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
- package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
- package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js +15 -16
- package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
- package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
- package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
- package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
- package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
- package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
- package/dist/node_modules/@apollo/client/version.js +2 -3
- package/dist/node_modules/@apollo/client/version.js.map +1 -1
- package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
- package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
- package/dist/node_modules/@wry/trie/lib/index.js +2 -3
- package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +8 -7
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/client.js +76 -69
- package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
- package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
- package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
- package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
- package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
- package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/test/happydom.d.ts +1 -0
- package/dist/translations/en.d.ts +0 -1
- package/dist/translations/en.js +1 -2
- package/dist/translations/en.js.map +1 -1
- package/dist/utils/nativeBridge.d.ts +0 -1
- package/dist/utils/nativeBridge.js +1 -2
- package/package.json +62 -46
- package/dist/dev/main.d.ts.map +0 -1
- package/dist/export/ExportRoot.d.ts.map +0 -1
- package/dist/export/ExportRoutes.d.ts.map +0 -1
- package/dist/export/components/ExportProgressBar.d.ts.map +0 -1
- package/dist/export/components/ExportStatusBadge.d.ts.map +0 -1
- package/dist/export/components/PageLayout.d.ts.map +0 -1
- package/dist/export/constants/enums.d.ts.map +0 -1
- package/dist/export/constants/index.d.ts.map +0 -1
- package/dist/export/hooks/useExportQueries.d.ts.map +0 -1
- package/dist/export/hooks/useTr.d.ts.map +0 -1
- package/dist/export/index.d.ts.map +0 -1
- package/dist/export/pages/CreateExportPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDashboardPage.d.ts.map +0 -1
- package/dist/export/pages/ExportDetailPage.d.ts.map +0 -1
- package/dist/export/pages/ExportHistoryPage.d.ts.map +0 -1
- package/dist/export/pages/ExportLandingPage.d.ts.map +0 -1
- package/dist/export/pages/ExportTemplatesPage.d.ts.map +0 -1
- package/dist/export/pages/TemplateDetailPage.d.ts.map +0 -1
- package/dist/export/providers/ExportProvider.d.ts.map +0 -1
- package/dist/export/store/exportStore.d.ts.map +0 -1
- package/dist/export/types/index.d.ts.map +0 -1
- package/dist/export/utils/cn.d.ts.map +0 -1
- package/dist/export/utils/disabledModules.d.ts.map +0 -1
- package/dist/export/utils/events.d.ts.map +0 -1
- package/dist/export/utils/exportAuthority.d.ts.map +0 -1
- package/dist/export/utils/i18n.d.ts.map +0 -1
- package/dist/generated/global-operations.d.ts.map +0 -1
- package/dist/generated/global-types.d.ts.map +0 -1
- package/dist/generated/wspace-operations.d.ts.map +0 -1
- package/dist/generated/wspace-types.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
- package/dist/translations/en.d.ts.map +0 -1
- package/dist/utils/nativeBridge.d.ts.map +0 -1
|
@@ -1,251 +1,251 @@
|
|
|
1
1
|
import { useExport as e } from "../providers/ExportProvider.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useAvailableEntities as t, useCreateExportJob as n, useExportTemplates as r, useOrganizationExportPermission as i } from "../hooks/useExportQueries.js";
|
|
3
|
+
import { getFormatDisplayName as a } from "../constants/enums.js";
|
|
4
|
+
import { PageLayout as ee } from "../components/PageLayout.js";
|
|
5
|
+
import { useTr as te } from "../hooks/useTr.js";
|
|
6
|
+
import { cn as o } from "../utils/cn.js";
|
|
7
7
|
import { isExportEntityDisabled as s, isForeignProductEntity as c } from "../utils/disabledModules.js";
|
|
8
8
|
import { useCallback as ne, useEffect as re, useRef as ie, useState as l } from "react";
|
|
9
|
-
import { ArrowLeft as ae, ArrowRight as u, Building2 as d, CalendarRange as oe, CheckCircle2 as f, Download as p, FileJson as m, FileSpreadsheet as h, Loader2 as
|
|
10
|
-
import { useAppShell as
|
|
11
|
-
import { useSearchParams as
|
|
12
|
-
import { isQuotaExhaustedError as
|
|
13
|
-
import { jsx as
|
|
14
|
-
import { AlertDialog as
|
|
15
|
-
|
|
16
|
-
var
|
|
9
|
+
import { ArrowLeft as ae, ArrowRight as u, Building2 as d, CalendarRange as oe, CheckCircle2 as f, Download as p, FileJson as m, FileSpreadsheet as h, Loader2 as g, Lock as _, Package as v, User as y, Users as b } from "lucide-react";
|
|
10
|
+
import { useAppShell as se, usePermission as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
11
|
+
import { useSearchParams as le } from "react-router";
|
|
12
|
+
import { isQuotaExhaustedError as ue } from "@burdenoff/fe-libs/shared/utils";
|
|
13
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
14
|
+
import { AlertDialog as de, AlertDialogAction as fe, AlertDialogCancel as pe, AlertDialogContent as me, AlertDialogDescription as he, AlertDialogFooter as ge, AlertDialogHeader as _e, AlertDialogTitle as ve, EmphasisPanel as ye, IllustratedEmptyState as be, PagePurpose as xe, ShowMore as Se } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
// src/export/pages/CreateExportPage.tsx
|
|
16
|
+
var C = ["CSV", "JSON"], Ce = {
|
|
17
17
|
CSV: h,
|
|
18
18
|
JSON: m
|
|
19
|
-
},
|
|
20
|
-
INDIVIDUAL:
|
|
21
|
-
WORKSPACE_ADMIN:
|
|
19
|
+
}, w = {
|
|
20
|
+
INDIVIDUAL: y,
|
|
21
|
+
WORKSPACE_ADMIN: b,
|
|
22
22
|
ORG_ADMIN: d
|
|
23
23
|
};
|
|
24
|
-
function
|
|
25
|
-
let { basePath: d = "/", navigate: m, organizationId: h } = e(),
|
|
24
|
+
function T() {
|
|
25
|
+
let { basePath: d = "/", navigate: m, organizationId: h } = e(), y = te(), { createJob: b, isPending: T } = n(), { data: E } = t(), { data: D } = r(), [O] = le(), { productSlug: k } = se(), A = ne((e) => !s(e) && !c(e, k), [k]), we = ce("export:workspace_admin"), Te = i(h), [j, M] = l("entities"), [N, P] = l([]), [F, I] = l(""), [L, R] = l("CSV"), [z, Ee] = l("INDIVIDUAL"), [B, V] = l(O.get("templateId") ?? void 0), [H, De] = l(""), [U, Oe] = l(""), [W, G] = l(null), [ke, K] = l(!1), q = ie(null);
|
|
26
26
|
re(() => {
|
|
27
27
|
let e = O.get("templateId");
|
|
28
28
|
if (!e || !D?.length || q.current === e) return;
|
|
29
29
|
let t = D.find((t) => t.id === e);
|
|
30
30
|
if (!t) return;
|
|
31
|
-
q.current = e, V(t.id),
|
|
31
|
+
q.current = e, V(t.id), P((t.entityTypes ?? []).filter(A));
|
|
32
32
|
let n = t.format?.toUpperCase();
|
|
33
|
-
n &&
|
|
33
|
+
n && C.includes(n) && R(n), t.name && I(t.name);
|
|
34
34
|
}, [
|
|
35
35
|
A,
|
|
36
36
|
O,
|
|
37
37
|
D
|
|
38
38
|
]);
|
|
39
39
|
let Ae = () => {
|
|
40
|
-
|
|
40
|
+
j === "options" ? M("entities") : j === "review" ? M("options") : m?.(d);
|
|
41
41
|
}, je = () => {
|
|
42
|
-
if (
|
|
43
|
-
if (
|
|
44
|
-
G(
|
|
42
|
+
if (j === "entities") {
|
|
43
|
+
if (N.length === 0) {
|
|
44
|
+
G(y("export.create.errors.selectEntity", "Please select at least one entity type to export"));
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
G(null),
|
|
48
|
-
} else if (
|
|
49
|
-
if (!
|
|
50
|
-
G(
|
|
47
|
+
G(null), M("options");
|
|
48
|
+
} else if (j === "options") {
|
|
49
|
+
if (!F.trim()) {
|
|
50
|
+
G(y("export.create.errors.exportNameRequired", "Please provide a name for this export"));
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
G(null),
|
|
53
|
+
G(null), M("review");
|
|
54
54
|
}
|
|
55
55
|
}, Me = async () => {
|
|
56
56
|
try {
|
|
57
|
-
G(null), await
|
|
58
|
-
name:
|
|
59
|
-
entityTypes:
|
|
60
|
-
format:
|
|
61
|
-
exportScope:
|
|
62
|
-
organizationId:
|
|
57
|
+
G(null), await b({
|
|
58
|
+
name: F,
|
|
59
|
+
entityTypes: N,
|
|
60
|
+
format: L,
|
|
61
|
+
exportScope: z,
|
|
62
|
+
organizationId: z === "ORG_ADMIN" ? h : void 0,
|
|
63
63
|
templateId: B,
|
|
64
64
|
dateRangeStart: H ? new Date(H).toISOString() : null,
|
|
65
65
|
dateRangeEnd: U ? new Date(U).toISOString() : null
|
|
66
66
|
}), m?.(d);
|
|
67
67
|
} catch (e) {
|
|
68
|
-
if (
|
|
69
|
-
K(!0), G(
|
|
68
|
+
if (ue(e)) {
|
|
69
|
+
K(!0), G(y("export.create.errors.quotaReached", "You have reached your export limit for this month."));
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
|
-
G(e instanceof Error ? e.message :
|
|
72
|
+
G(e instanceof Error ? e.message : y("export.create.errors.createFailed", "Failed to create export"));
|
|
73
73
|
}
|
|
74
74
|
}, Ne = (e) => {
|
|
75
|
-
A(e) &&
|
|
75
|
+
A(e) && P((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]);
|
|
76
76
|
}, J = (e) => {
|
|
77
77
|
switch (e) {
|
|
78
|
-
case "INDIVIDUAL": return
|
|
79
|
-
case "WORKSPACE_ADMIN": return
|
|
80
|
-
case "ORG_ADMIN": return
|
|
78
|
+
case "INDIVIDUAL": return y("export.create.scope.individual.label", "My Data Only");
|
|
79
|
+
case "WORKSPACE_ADMIN": return y("export.create.scope.workspaceAdmin.label", "All Workspace Data");
|
|
80
|
+
case "ORG_ADMIN": return y("export.create.scope.orgAdmin.label", "All Organization Data");
|
|
81
81
|
default: return e;
|
|
82
82
|
}
|
|
83
83
|
}, Pe = (e) => {
|
|
84
84
|
switch (e) {
|
|
85
|
-
case "INDIVIDUAL": return
|
|
86
|
-
case "WORKSPACE_ADMIN": return
|
|
87
|
-
case "ORG_ADMIN": return
|
|
85
|
+
case "INDIVIDUAL": return y("export.create.scope.individual.description", "Export data you personally created across selected modules.");
|
|
86
|
+
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.");
|
|
87
|
+
case "ORG_ADMIN": return y("export.create.scope.orgAdmin.description", "Export data from every workspace in your organization. Requires org-admin access.");
|
|
88
88
|
default: return "";
|
|
89
89
|
}
|
|
90
90
|
}, Y = {
|
|
91
91
|
users: {
|
|
92
|
-
label:
|
|
93
|
-
description:
|
|
92
|
+
label: y("export.create.entities.users.label", "Users"),
|
|
93
|
+
description: y("export.create.entities.users.description", "Workspace members and profiles")
|
|
94
94
|
},
|
|
95
95
|
projects: {
|
|
96
|
-
label:
|
|
97
|
-
description:
|
|
96
|
+
label: y("export.create.entities.projects.label", "Projects"),
|
|
97
|
+
description: y("export.create.entities.projects.description", "Projects and their metadata")
|
|
98
98
|
},
|
|
99
99
|
tasks: {
|
|
100
|
-
label:
|
|
101
|
-
description:
|
|
100
|
+
label: y("export.create.entities.tasks.label", "Tasks"),
|
|
101
|
+
description: y("export.create.entities.tasks.description", "Task items and assignments")
|
|
102
102
|
},
|
|
103
103
|
files: {
|
|
104
|
-
label:
|
|
105
|
-
description:
|
|
104
|
+
label: y("export.create.entities.files.label", "Files"),
|
|
105
|
+
description: y("export.create.entities.files.description", "File metadata and references")
|
|
106
106
|
},
|
|
107
107
|
conversations: {
|
|
108
|
-
label:
|
|
109
|
-
description:
|
|
108
|
+
label: y("export.create.entities.conversations.label", "Conversations"),
|
|
109
|
+
description: y("export.create.entities.conversations.description", "Chat messages and threads")
|
|
110
110
|
},
|
|
111
111
|
tags: {
|
|
112
|
-
label:
|
|
113
|
-
description:
|
|
112
|
+
label: y("export.create.entities.tags.label", "Tags"),
|
|
113
|
+
description: y("export.create.entities.tags.description", "Tags and vocabularies")
|
|
114
114
|
},
|
|
115
115
|
activity: {
|
|
116
|
-
label:
|
|
117
|
-
description:
|
|
116
|
+
label: y("export.create.entities.activity.label", "Activity Logs"),
|
|
117
|
+
description: y("export.create.entities.activity.description", "Audit trail and activity history")
|
|
118
118
|
},
|
|
119
119
|
calendar: {
|
|
120
|
-
label:
|
|
121
|
-
description:
|
|
120
|
+
label: y("export.create.entities.calendar.label", "Calendar Events"),
|
|
121
|
+
description: y("export.create.entities.calendar.description", "Events and bookings")
|
|
122
122
|
}
|
|
123
123
|
}, X = E.filter((e) => e.enabled !== !1 && !c(e.entityType, k)), Z = X.filter((e) => !s(e.entityType)), Q = X.filter((e) => s(e.entityType)), $ = (e, t) => {
|
|
124
|
-
let n = !t &&
|
|
125
|
-
return /* @__PURE__ */
|
|
124
|
+
let n = !t && N.includes(e.entityType);
|
|
125
|
+
return /* @__PURE__ */ S("button", {
|
|
126
126
|
type: "button",
|
|
127
127
|
onClick: () => Ne(e.entityType),
|
|
128
128
|
disabled: t,
|
|
129
129
|
"aria-disabled": t,
|
|
130
|
-
title: t ?
|
|
131
|
-
className:
|
|
130
|
+
title: t ? y("export.create.select.unavailableHint", "Export for this product isn't available yet") : void 0,
|
|
131
|
+
className: o("text-left border-2 rounded-xl p-4 transition-all duration-200", t ? "border-border-subtle/30 opacity-50 cursor-not-allowed" : n ? "border-primary bg-action-primary-bg/5 shadow-md" : "border-border-subtle/50 hover:border-primary/30 hover:shadow-sm"),
|
|
132
132
|
children: [
|
|
133
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ S("div", {
|
|
134
134
|
className: "flex items-center justify-between mb-2 gap-2",
|
|
135
|
-
children: [/* @__PURE__ */
|
|
135
|
+
children: [/* @__PURE__ */ x("h3", {
|
|
136
136
|
className: "font-semibold",
|
|
137
137
|
children: Y[e.entityType]?.label ?? e.displayName
|
|
138
|
-
}), t ? /* @__PURE__ */
|
|
138
|
+
}), t ? /* @__PURE__ */ x("span", {
|
|
139
139
|
className: "shrink-0 text-xs font-medium px-2 py-0.5 rounded-full bg-bg-sunken text-text-secondary",
|
|
140
|
-
children:
|
|
141
|
-
}) : n && /* @__PURE__ */
|
|
140
|
+
children: y("export.create.select.unavailable", "Unavailable")
|
|
141
|
+
}) : n && /* @__PURE__ */ x(f, {
|
|
142
142
|
size: 18,
|
|
143
143
|
className: "text-primary"
|
|
144
144
|
})]
|
|
145
145
|
}),
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ x("p", {
|
|
147
147
|
className: "text-sm text-text-secondary",
|
|
148
148
|
children: Y[e.entityType]?.description ?? e.description
|
|
149
149
|
}),
|
|
150
|
-
e.estimatedSize && /* @__PURE__ */
|
|
150
|
+
e.estimatedSize && /* @__PURE__ */ S("p", {
|
|
151
151
|
className: "text-xs text-text-secondary mt-2",
|
|
152
152
|
children: ["~", e.estimatedSize]
|
|
153
153
|
})
|
|
154
154
|
]
|
|
155
155
|
}, e.entityType);
|
|
156
156
|
};
|
|
157
|
-
return /* @__PURE__ */
|
|
157
|
+
return /* @__PURE__ */ S(ee, {
|
|
158
158
|
showHeader: !1,
|
|
159
159
|
children: [
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ x("div", {
|
|
161
161
|
className: "relative overflow-hidden rounded-xl bg-accent-wash border border-border-seam p-6 shadow-[var(--shadow-pop)]",
|
|
162
|
-
children: /* @__PURE__ */
|
|
162
|
+
children: /* @__PURE__ */ S("div", {
|
|
163
163
|
className: "relative z-10 flex items-center gap-4",
|
|
164
|
-
children: [/* @__PURE__ */
|
|
164
|
+
children: [/* @__PURE__ */ x("button", {
|
|
165
165
|
type: "button",
|
|
166
166
|
onClick: () => m?.(d),
|
|
167
167
|
className: "p-2.5 hover:bg-accent rounded-lg transition-colors duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
168
|
-
"aria-label":
|
|
169
|
-
children: /* @__PURE__ */
|
|
170
|
-
}), /* @__PURE__ */
|
|
168
|
+
"aria-label": y("export.create.actions.backToDashboard", "Back to export dashboard"),
|
|
169
|
+
children: /* @__PURE__ */ x(ae, { size: 20 })
|
|
170
|
+
}), /* @__PURE__ */ S("div", {
|
|
171
171
|
className: "flex items-center gap-3",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
172
|
+
children: [/* @__PURE__ */ x("div", {
|
|
173
173
|
className: "p-2.5 rounded-lg bg-action-primary-bg/10 backdrop-blur-sm",
|
|
174
|
-
children: /* @__PURE__ */
|
|
174
|
+
children: /* @__PURE__ */ x(p, {
|
|
175
175
|
size: 24,
|
|
176
176
|
className: "text-primary"
|
|
177
177
|
})
|
|
178
|
-
}), /* @__PURE__ */
|
|
178
|
+
}), /* @__PURE__ */ x("h1", {
|
|
179
179
|
className: "text-2xl sm:text-3xl font-bold",
|
|
180
|
-
children:
|
|
180
|
+
children: y("export.create.title", "New Export")
|
|
181
181
|
})]
|
|
182
182
|
})]
|
|
183
183
|
})
|
|
184
184
|
}),
|
|
185
|
-
/* @__PURE__ */
|
|
186
|
-
icon: /* @__PURE__ */
|
|
187
|
-
children:
|
|
185
|
+
/* @__PURE__ */ x(xe, {
|
|
186
|
+
icon: /* @__PURE__ */ x(p, { size: 16 }),
|
|
187
|
+
children: y("export.create.purpose", "Build a one-off export in three steps: pick which data to include, choose a format and scope, then review and start it. The export runs in the background and produces a downloadable ZIP you can grab from History when it finishes.")
|
|
188
188
|
}),
|
|
189
|
-
/* @__PURE__ */
|
|
189
|
+
/* @__PURE__ */ x("div", {
|
|
190
190
|
className: "flex items-center gap-2 justify-center flex-wrap",
|
|
191
191
|
children: [
|
|
192
192
|
"entities",
|
|
193
193
|
"options",
|
|
194
194
|
"review"
|
|
195
|
-
].map((e, t) => /* @__PURE__ */
|
|
195
|
+
].map((e, t) => /* @__PURE__ */ S("div", {
|
|
196
196
|
className: "flex items-center gap-2",
|
|
197
|
-
children: [t > 0 && /* @__PURE__ */
|
|
197
|
+
children: [t > 0 && /* @__PURE__ */ x(u, {
|
|
198
198
|
size: 18,
|
|
199
199
|
className: "text-text-secondary"
|
|
200
|
-
}), /* @__PURE__ */
|
|
201
|
-
className:
|
|
202
|
-
children: [/* @__PURE__ */
|
|
200
|
+
}), /* @__PURE__ */ S("div", {
|
|
201
|
+
className: o("flex items-center gap-2 px-4 py-2.5 rounded-lg text-sm font-medium border-2 transition-all duration-200", j === e ? "bg-action-primary-bg text-action-primary-text border-primary shadow-[var(--shadow-pop)]" : "bg-bg-sunken/50 text-text-secondary border-border-seam"),
|
|
202
|
+
children: [/* @__PURE__ */ x("div", {
|
|
203
203
|
className: "flex items-center justify-center size-6 rounded-full bg-bg-surface/20 font-bold",
|
|
204
204
|
children: t + 1
|
|
205
|
-
}), /* @__PURE__ */
|
|
205
|
+
}), /* @__PURE__ */ x("span", {
|
|
206
206
|
className: "hidden sm:inline capitalize",
|
|
207
|
-
children: e === "entities" ?
|
|
207
|
+
children: e === "entities" ? y("export.create.steps.entities", "Select Data") : e === "options" ? y("export.create.steps.options", "Options") : y("export.create.steps.review", "Review")
|
|
208
208
|
})]
|
|
209
209
|
})]
|
|
210
210
|
}, e))
|
|
211
211
|
}),
|
|
212
|
-
W && /* @__PURE__ */
|
|
212
|
+
W && /* @__PURE__ */ x("div", {
|
|
213
213
|
className: "border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-4 text-status-error-text text-sm",
|
|
214
214
|
children: W
|
|
215
215
|
}),
|
|
216
|
-
|
|
216
|
+
j === "entities" && /* @__PURE__ */ S("div", {
|
|
217
217
|
className: "space-y-4",
|
|
218
218
|
children: [
|
|
219
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ x("h2", {
|
|
220
220
|
className: "text-lg font-bold",
|
|
221
|
-
children:
|
|
221
|
+
children: y("export.create.select.title", "Select data to export")
|
|
222
222
|
}),
|
|
223
|
-
/* @__PURE__ */
|
|
223
|
+
/* @__PURE__ */ x("p", {
|
|
224
224
|
className: "text-sm text-text-secondary",
|
|
225
|
-
children:
|
|
225
|
+
children: y("export.create.select.description", "Choose which entity types to include in your export.")
|
|
226
226
|
}),
|
|
227
|
-
X.length === 0 ? /* @__PURE__ */
|
|
227
|
+
X.length === 0 ? /* @__PURE__ */ x(be, {
|
|
228
228
|
illustration: "empty-data",
|
|
229
|
-
title:
|
|
230
|
-
description:
|
|
231
|
-
}) : /* @__PURE__ */
|
|
229
|
+
title: y("export.create.select.emptyTitle", "Nothing to export yet"),
|
|
230
|
+
description: y("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.")
|
|
231
|
+
}) : /* @__PURE__ */ S("div", {
|
|
232
232
|
className: "space-y-6",
|
|
233
|
-
children: [Z.length > 0 && /* @__PURE__ */
|
|
233
|
+
children: [Z.length > 0 && /* @__PURE__ */ x("div", {
|
|
234
234
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
|
|
235
235
|
children: Z.map((e) => $(e, !1))
|
|
236
|
-
}), Q.length > 0 && /* @__PURE__ */
|
|
236
|
+
}), Q.length > 0 && /* @__PURE__ */ S("div", {
|
|
237
237
|
className: "space-y-3",
|
|
238
|
-
children: [/* @__PURE__ */
|
|
238
|
+
children: [/* @__PURE__ */ S("div", {
|
|
239
239
|
className: "flex items-center gap-3",
|
|
240
240
|
children: [
|
|
241
|
-
/* @__PURE__ */
|
|
242
|
-
/* @__PURE__ */
|
|
241
|
+
/* @__PURE__ */ x("div", { className: "h-px flex-1 bg-border/60" }),
|
|
242
|
+
/* @__PURE__ */ x("span", {
|
|
243
243
|
className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
|
|
244
|
-
children:
|
|
244
|
+
children: y("export.create.select.unavailableSection", "Not available yet")
|
|
245
245
|
}),
|
|
246
|
-
/* @__PURE__ */
|
|
246
|
+
/* @__PURE__ */ x("div", { className: "h-px flex-1 bg-border/60" })
|
|
247
247
|
]
|
|
248
|
-
}), /* @__PURE__ */
|
|
248
|
+
}), /* @__PURE__ */ x("div", {
|
|
249
249
|
className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",
|
|
250
250
|
children: Q.map((e) => $(e, !0))
|
|
251
251
|
})]
|
|
@@ -253,55 +253,55 @@ function C() {
|
|
|
253
253
|
})
|
|
254
254
|
]
|
|
255
255
|
}),
|
|
256
|
-
|
|
256
|
+
j === "options" && /* @__PURE__ */ x("div", {
|
|
257
257
|
className: "space-y-6",
|
|
258
|
-
children: /* @__PURE__ */
|
|
258
|
+
children: /* @__PURE__ */ S("div", {
|
|
259
259
|
className: "border border-border-seam rounded-xl p-6 space-y-5 bg-bg-surface",
|
|
260
260
|
children: [
|
|
261
|
-
/* @__PURE__ */
|
|
261
|
+
/* @__PURE__ */ x("h2", {
|
|
262
262
|
className: "text-lg font-bold",
|
|
263
|
-
children:
|
|
263
|
+
children: y("export.create.options.title", "Export Options")
|
|
264
264
|
}),
|
|
265
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
266
266
|
className: "block text-sm font-semibold mb-2",
|
|
267
|
-
children:
|
|
268
|
-
}), /* @__PURE__ */
|
|
267
|
+
children: y("export.create.options.scope", "Export Scope")
|
|
268
|
+
}), /* @__PURE__ */ x("div", {
|
|
269
269
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
270
270
|
children: [
|
|
271
271
|
"INDIVIDUAL",
|
|
272
272
|
"WORKSPACE_ADMIN",
|
|
273
273
|
"ORG_ADMIN"
|
|
274
274
|
].map((e) => {
|
|
275
|
-
let t = e === "WORKSPACE_ADMIN" && !
|
|
276
|
-
return /* @__PURE__ */
|
|
275
|
+
let t = e === "WORKSPACE_ADMIN" && !we || e === "ORG_ADMIN" && !Te, n = w[e], r = e === "WORKSPACE_ADMIN" ? y("export.create.scope.workspaceAdmin.required", "Workspace admin access required") : y("export.create.scope.orgAdmin.required", "Organization admin access required");
|
|
276
|
+
return /* @__PURE__ */ S("button", {
|
|
277
277
|
type: "button",
|
|
278
|
-
onClick: () => !t &&
|
|
278
|
+
onClick: () => !t && Ee(e),
|
|
279
279
|
disabled: t,
|
|
280
|
-
className:
|
|
280
|
+
className: o("text-left border-2 rounded-xl p-4 transition-all duration-200", z === e ? "border-primary bg-action-primary-bg/5 shadow-md" : t ? "border-border-subtle/30 opacity-50 cursor-not-allowed" : "border-border-subtle/50 hover:border-primary/30 hover:shadow-sm"),
|
|
281
281
|
title: t ? r : void 0,
|
|
282
282
|
children: [
|
|
283
|
-
/* @__PURE__ */
|
|
283
|
+
/* @__PURE__ */ S("div", {
|
|
284
284
|
className: "flex items-center justify-between mb-2",
|
|
285
285
|
children: [
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ x(n, {
|
|
287
287
|
size: 18,
|
|
288
|
-
className:
|
|
288
|
+
className: z === e ? "text-primary" : t ? "text-text-secondary/50" : "text-text-secondary"
|
|
289
289
|
}),
|
|
290
|
-
|
|
290
|
+
z === e && /* @__PURE__ */ x(f, {
|
|
291
291
|
size: 16,
|
|
292
292
|
className: "text-primary"
|
|
293
293
|
}),
|
|
294
|
-
t && /* @__PURE__ */
|
|
294
|
+
t && /* @__PURE__ */ x(_, {
|
|
295
295
|
size: 14,
|
|
296
296
|
className: "text-text-secondary/50"
|
|
297
297
|
})
|
|
298
298
|
]
|
|
299
299
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
300
|
+
/* @__PURE__ */ x("p", {
|
|
301
301
|
className: "font-semibold text-sm",
|
|
302
302
|
children: J(e)
|
|
303
303
|
}),
|
|
304
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ x("p", {
|
|
305
305
|
className: "text-xs text-text-secondary mt-1",
|
|
306
306
|
children: Pe(e)
|
|
307
307
|
})
|
|
@@ -309,156 +309,156 @@ function C() {
|
|
|
309
309
|
}, e);
|
|
310
310
|
})
|
|
311
311
|
})] }),
|
|
312
|
-
/* @__PURE__ */
|
|
312
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
|
|
313
313
|
htmlFor: "exportName",
|
|
314
314
|
className: "block text-sm font-semibold mb-2",
|
|
315
315
|
children: [
|
|
316
|
-
|
|
316
|
+
y("export.create.options.name", "Export Name"),
|
|
317
317
|
" ",
|
|
318
|
-
/* @__PURE__ */
|
|
318
|
+
/* @__PURE__ */ x("span", {
|
|
319
319
|
className: "text-status-error-text",
|
|
320
320
|
children: "*"
|
|
321
321
|
})
|
|
322
322
|
]
|
|
323
|
-
}), /* @__PURE__ */
|
|
323
|
+
}), /* @__PURE__ */ x("input", {
|
|
324
324
|
type: "text",
|
|
325
325
|
id: "exportName",
|
|
326
|
-
"aria-label":
|
|
327
|
-
value:
|
|
328
|
-
onChange: (e) =>
|
|
326
|
+
"aria-label": y("export.create.options.name", "Export Name"),
|
|
327
|
+
value: F,
|
|
328
|
+
onChange: (e) => I(e.target.value),
|
|
329
329
|
className: "w-full px-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",
|
|
330
|
-
placeholder:
|
|
330
|
+
placeholder: y("export.create.options.namePlaceholder", "e.g., Monthly User Export")
|
|
331
331
|
})] }),
|
|
332
|
-
/* @__PURE__ */
|
|
332
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
333
333
|
className: "block text-sm font-semibold mb-2",
|
|
334
|
-
children:
|
|
335
|
-
}), /* @__PURE__ */
|
|
334
|
+
children: y("export.create.options.outputFormat", "Output Format")
|
|
335
|
+
}), /* @__PURE__ */ x("div", {
|
|
336
336
|
className: "grid grid-cols-2 gap-3",
|
|
337
|
-
children:
|
|
338
|
-
let t =
|
|
339
|
-
return /* @__PURE__ */
|
|
337
|
+
children: C.map((e) => {
|
|
338
|
+
let t = Ce[e];
|
|
339
|
+
return /* @__PURE__ */ S("button", {
|
|
340
340
|
type: "button",
|
|
341
|
-
onClick: () =>
|
|
342
|
-
className:
|
|
343
|
-
children: [/* @__PURE__ */
|
|
341
|
+
onClick: () => R(e),
|
|
342
|
+
className: o("flex items-center gap-3 border-2 rounded-lg p-3 transition-all duration-200", L === e ? "border-primary bg-action-primary-bg/5" : "border-border-subtle/50 hover:border-primary/30"),
|
|
343
|
+
children: [/* @__PURE__ */ x(t, {
|
|
344
344
|
size: 18,
|
|
345
|
-
className:
|
|
346
|
-
}), /* @__PURE__ */
|
|
345
|
+
className: L === e ? "text-primary" : "text-text-secondary"
|
|
346
|
+
}), /* @__PURE__ */ x("span", {
|
|
347
347
|
className: "font-medium text-sm",
|
|
348
|
-
children:
|
|
348
|
+
children: a(e)
|
|
349
349
|
})]
|
|
350
350
|
}, e);
|
|
351
351
|
})
|
|
352
352
|
})] }),
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ S("div", { children: [
|
|
354
|
+
/* @__PURE__ */ x("label", {
|
|
355
355
|
className: "block text-sm font-semibold mb-2",
|
|
356
|
-
children:
|
|
356
|
+
children: y("export.create.options.archiveFormat", "Archive Format")
|
|
357
357
|
}),
|
|
358
|
-
/* @__PURE__ */
|
|
358
|
+
/* @__PURE__ */ x("div", {
|
|
359
359
|
className: "flex gap-3",
|
|
360
|
-
children: /* @__PURE__ */
|
|
361
|
-
className:
|
|
362
|
-
children: [/* @__PURE__ */ v
|
|
360
|
+
children: /* @__PURE__ */ S("div", {
|
|
361
|
+
className: o("flex items-center gap-2 border-2 rounded-lg px-4 py-2 border-primary bg-action-primary-bg/5"),
|
|
362
|
+
children: [/* @__PURE__ */ x(v, {
|
|
363
363
|
size: 16,
|
|
364
364
|
className: "text-primary"
|
|
365
|
-
}), /* @__PURE__ */
|
|
365
|
+
}), /* @__PURE__ */ x("span", {
|
|
366
366
|
className: "font-medium text-sm",
|
|
367
|
-
children:
|
|
367
|
+
children: y("export.archive.zip", "ZIP")
|
|
368
368
|
})]
|
|
369
369
|
})
|
|
370
370
|
}),
|
|
371
|
-
/* @__PURE__ */
|
|
371
|
+
/* @__PURE__ */ x("p", {
|
|
372
372
|
className: "text-xs text-text-secondary mt-1.5",
|
|
373
|
-
children:
|
|
373
|
+
children: y("export.create.options.archiveDescription", "Exports are packaged as ZIP archives.")
|
|
374
374
|
})
|
|
375
375
|
] }),
|
|
376
|
-
/* @__PURE__ */
|
|
376
|
+
/* @__PURE__ */ x(Se, {
|
|
377
377
|
collapsedHeight: 0,
|
|
378
|
-
label:
|
|
379
|
-
children: /* @__PURE__ */
|
|
378
|
+
label: y("export.create.options.advancedToggle", "Date range & template"),
|
|
379
|
+
children: /* @__PURE__ */ S("div", {
|
|
380
380
|
className: "space-y-5 pt-1",
|
|
381
|
-
children: [/* @__PURE__ */
|
|
382
|
-
/* @__PURE__ */
|
|
381
|
+
children: [/* @__PURE__ */ S("div", { children: [
|
|
382
|
+
/* @__PURE__ */ x("label", {
|
|
383
383
|
className: "block text-sm font-semibold mb-2",
|
|
384
|
-
children: /* @__PURE__ */
|
|
384
|
+
children: /* @__PURE__ */ S("span", {
|
|
385
385
|
className: "inline-flex items-center gap-1.5",
|
|
386
386
|
children: [
|
|
387
|
-
/* @__PURE__ */
|
|
388
|
-
|
|
387
|
+
/* @__PURE__ */ x(oe, { size: 15 }),
|
|
388
|
+
y("export.create.options.dateRange", "Date Range"),
|
|
389
389
|
" ",
|
|
390
|
-
/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ x("span", {
|
|
391
391
|
className: "font-normal text-text-secondary",
|
|
392
|
-
children:
|
|
392
|
+
children: y("export.create.shared.optional", "(optional)")
|
|
393
393
|
})
|
|
394
394
|
]
|
|
395
395
|
})
|
|
396
396
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ S("div", {
|
|
398
398
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
399
|
-
children: [/* @__PURE__ */
|
|
399
|
+
children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
400
400
|
htmlFor: "dateFrom",
|
|
401
401
|
className: "block text-xs text-text-secondary mb-1",
|
|
402
|
-
children:
|
|
403
|
-
}), /* @__PURE__ */
|
|
402
|
+
children: y("export.create.options.dateFrom", "From")
|
|
403
|
+
}), /* @__PURE__ */ x("input", {
|
|
404
404
|
type: "date",
|
|
405
405
|
id: "dateFrom",
|
|
406
|
-
"aria-label":
|
|
406
|
+
"aria-label": y("export.create.options.dateFrom", "From"),
|
|
407
407
|
value: H,
|
|
408
408
|
onChange: (e) => De(e.target.value),
|
|
409
409
|
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 text-sm"
|
|
410
|
-
})] }), /* @__PURE__ */
|
|
410
|
+
})] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
411
411
|
htmlFor: "dateTo",
|
|
412
412
|
className: "block text-xs text-text-secondary mb-1",
|
|
413
|
-
children:
|
|
414
|
-
}), /* @__PURE__ */
|
|
413
|
+
children: y("export.create.options.dateTo", "To")
|
|
414
|
+
}), /* @__PURE__ */ x("input", {
|
|
415
415
|
type: "date",
|
|
416
416
|
id: "dateTo",
|
|
417
|
-
"aria-label":
|
|
417
|
+
"aria-label": y("export.create.options.dateTo", "To"),
|
|
418
418
|
value: U,
|
|
419
419
|
min: H,
|
|
420
420
|
onChange: (e) => Oe(e.target.value),
|
|
421
421
|
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 text-sm"
|
|
422
422
|
})] })]
|
|
423
423
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ x("p", {
|
|
425
425
|
className: "text-xs text-text-secondary mt-1.5",
|
|
426
|
-
children:
|
|
426
|
+
children: y("export.create.options.dateRangeDescription", "Leave blank to export all data regardless of date.")
|
|
427
427
|
})
|
|
428
|
-
] }), /* @__PURE__ */
|
|
428
|
+
] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
|
|
429
429
|
className: "block text-sm font-semibold mb-2",
|
|
430
430
|
children: [
|
|
431
|
-
|
|
431
|
+
y("export.create.options.basedOnTemplate", "Based on Template"),
|
|
432
432
|
" ",
|
|
433
|
-
/* @__PURE__ */
|
|
433
|
+
/* @__PURE__ */ x("span", {
|
|
434
434
|
className: "font-normal text-text-secondary",
|
|
435
|
-
children:
|
|
435
|
+
children: y("export.create.shared.optional", "(optional)")
|
|
436
436
|
})
|
|
437
437
|
]
|
|
438
|
-
}), D.length > 0 ? /* @__PURE__ */
|
|
438
|
+
}), D.length > 0 ? /* @__PURE__ */ S("select", {
|
|
439
439
|
value: B ?? "",
|
|
440
440
|
onChange: (e) => V(e.target.value || void 0),
|
|
441
441
|
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 scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
|
|
442
|
-
children: [/* @__PURE__ */
|
|
442
|
+
children: [/* @__PURE__ */ x("option", {
|
|
443
443
|
value: "",
|
|
444
|
-
children:
|
|
445
|
-
}), D.map((e) => /* @__PURE__ */
|
|
444
|
+
children: y("export.create.options.noTemplate", "No template")
|
|
445
|
+
}), D.map((e) => /* @__PURE__ */ x("option", {
|
|
446
446
|
value: e.id,
|
|
447
447
|
children: e.name
|
|
448
448
|
}, e.id))]
|
|
449
|
-
}) : /* @__PURE__ */
|
|
449
|
+
}) : /* @__PURE__ */ S("p", {
|
|
450
450
|
className: "text-sm text-text-secondary",
|
|
451
451
|
children: [
|
|
452
|
-
|
|
452
|
+
y("export.create.options.noTemplates", "No templates yet."),
|
|
453
453
|
" ",
|
|
454
|
-
/* @__PURE__ */
|
|
454
|
+
/* @__PURE__ */ x("button", {
|
|
455
455
|
type: "button",
|
|
456
456
|
onClick: () => m?.(d + "/templates"),
|
|
457
457
|
className: "text-primary underline-offset-2 hover:underline",
|
|
458
|
-
children:
|
|
458
|
+
children: y("export.create.options.createTemplateLink", "Create one")
|
|
459
459
|
}),
|
|
460
460
|
" ",
|
|
461
|
-
|
|
461
|
+
y("export.create.options.reuseTemplateHint", "to reuse export configurations.")
|
|
462
462
|
]
|
|
463
463
|
})] })]
|
|
464
464
|
})
|
|
@@ -466,53 +466,53 @@ function C() {
|
|
|
466
466
|
]
|
|
467
467
|
})
|
|
468
468
|
}),
|
|
469
|
-
|
|
469
|
+
j === "review" && /* @__PURE__ */ x("div", {
|
|
470
470
|
className: "space-y-6",
|
|
471
|
-
children: /* @__PURE__ */
|
|
471
|
+
children: /* @__PURE__ */ S(ye, {
|
|
472
472
|
className: "p-6 space-y-4",
|
|
473
|
-
children: [/* @__PURE__ */
|
|
473
|
+
children: [/* @__PURE__ */ S("h2", {
|
|
474
474
|
className: "text-lg font-bold flex items-center gap-2",
|
|
475
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ x(f, {
|
|
476
476
|
size: 20,
|
|
477
477
|
className: "text-primary"
|
|
478
|
-
}),
|
|
479
|
-
}), /* @__PURE__ */
|
|
478
|
+
}), y("export.create.review.title", "Review Export")]
|
|
479
|
+
}), /* @__PURE__ */ x("dl", {
|
|
480
480
|
className: "space-y-3 text-sm",
|
|
481
481
|
children: [
|
|
482
482
|
{
|
|
483
|
-
label:
|
|
484
|
-
value:
|
|
483
|
+
label: y("export.create.review.fields.name", "Name"),
|
|
484
|
+
value: F
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
|
-
label:
|
|
488
|
-
value: J(
|
|
487
|
+
label: y("export.create.review.fields.scope", "Scope"),
|
|
488
|
+
value: J(z)
|
|
489
489
|
},
|
|
490
490
|
{
|
|
491
|
-
label:
|
|
492
|
-
value:
|
|
491
|
+
label: y("export.create.review.fields.entityTypes", "Entity Types"),
|
|
492
|
+
value: N.join(", ")
|
|
493
493
|
},
|
|
494
494
|
{
|
|
495
|
-
label:
|
|
496
|
-
value:
|
|
495
|
+
label: y("export.create.review.fields.format", "Format"),
|
|
496
|
+
value: a(L)
|
|
497
497
|
},
|
|
498
498
|
{
|
|
499
|
-
label:
|
|
500
|
-
value:
|
|
499
|
+
label: y("export.create.review.fields.archive", "Archive"),
|
|
500
|
+
value: y("export.archive.zip", "ZIP")
|
|
501
501
|
},
|
|
502
502
|
...H || U ? [{
|
|
503
|
-
label:
|
|
503
|
+
label: y("export.create.review.fields.dateRange", "Date Range"),
|
|
504
504
|
value: [H || "—", U || "—"].join(" → ")
|
|
505
505
|
}] : [],
|
|
506
506
|
...B ? [{
|
|
507
|
-
label:
|
|
507
|
+
label: y("export.create.review.fields.template", "Template"),
|
|
508
508
|
value: D.find((e) => e.id === B)?.name ?? B
|
|
509
509
|
}] : []
|
|
510
|
-
].map(({ label: e, value: t }) => /* @__PURE__ */
|
|
510
|
+
].map(({ label: e, value: t }) => /* @__PURE__ */ S("div", {
|
|
511
511
|
className: "flex flex-col sm:flex-row sm:justify-between gap-1",
|
|
512
|
-
children: [/* @__PURE__ */
|
|
512
|
+
children: [/* @__PURE__ */ x("dt", {
|
|
513
513
|
className: "text-text-secondary",
|
|
514
514
|
children: e
|
|
515
|
-
}), /* @__PURE__ */
|
|
515
|
+
}), /* @__PURE__ */ x("dd", {
|
|
516
516
|
className: "font-semibold sm:text-right break-words",
|
|
517
517
|
children: t
|
|
518
518
|
})]
|
|
@@ -520,41 +520,40 @@ function C() {
|
|
|
520
520
|
})]
|
|
521
521
|
})
|
|
522
522
|
}),
|
|
523
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ S("div", {
|
|
524
524
|
className: "flex flex-col sm:flex-row gap-3 pt-2",
|
|
525
|
-
children: [/* @__PURE__ */
|
|
525
|
+
children: [/* @__PURE__ */ x("button", {
|
|
526
526
|
type: "button",
|
|
527
527
|
onClick: Ae,
|
|
528
528
|
className: "px-6 py-3 border-2 border-border-subtle/50 rounded-lg hover:bg-accent hover:border-primary/30 transition-all duration-200 font-medium",
|
|
529
|
-
children:
|
|
530
|
-
}),
|
|
529
|
+
children: j === "entities" ? y("export.create.actions.cancel", "Cancel") : y("export.create.actions.back", "Back")
|
|
530
|
+
}), j === "review" ? /* @__PURE__ */ S("button", {
|
|
531
531
|
type: "button",
|
|
532
532
|
onClick: Me,
|
|
533
533
|
disabled: T,
|
|
534
534
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-all duration-200 font-bold shadow-lg disabled:opacity-50 disabled:cursor-not-allowed",
|
|
535
|
-
children: [T ? /* @__PURE__ */
|
|
535
|
+
children: [T ? /* @__PURE__ */ x(g, {
|
|
536
536
|
size: 18,
|
|
537
537
|
className: "animate-spin"
|
|
538
|
-
}) : /* @__PURE__ */
|
|
539
|
-
}) : /* @__PURE__ */
|
|
538
|
+
}) : /* @__PURE__ */ x(p, { size: 18 }), y("export.create.actions.startExport", "Start Export")]
|
|
539
|
+
}) : /* @__PURE__ */ S("button", {
|
|
540
540
|
type: "button",
|
|
541
541
|
onClick: je,
|
|
542
542
|
className: "flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-all duration-200 font-bold shadow-lg",
|
|
543
|
-
children: [
|
|
543
|
+
children: [y("export.create.actions.next", "Next"), /* @__PURE__ */ x(u, { size: 18 })]
|
|
544
544
|
})]
|
|
545
545
|
}),
|
|
546
|
-
/* @__PURE__ */
|
|
546
|
+
/* @__PURE__ */ x(de, {
|
|
547
547
|
open: ke,
|
|
548
548
|
onOpenChange: K,
|
|
549
|
-
children: /* @__PURE__ */
|
|
549
|
+
children: /* @__PURE__ */ S(me, { children: [/* @__PURE__ */ S(_e, { children: [/* @__PURE__ */ x(ve, { children: y("export.create.quotaDialog.title", "Export Limit Reached") }), /* @__PURE__ */ x(he, { children: y("export.create.quotaDialog.description", "You have reached your export limit for this month.") })] }), /* @__PURE__ */ S(ge, { children: [/* @__PURE__ */ x(pe, { children: y("export.create.quotaDialog.dismiss", "Dismiss") }), /* @__PURE__ */ x(fe, {
|
|
550
550
|
onClick: () => window.location.assign("/billing"),
|
|
551
|
-
children:
|
|
551
|
+
children: y("export.create.quotaDialog.viewBilling", "View Billing")
|
|
552
552
|
})] })] })
|
|
553
553
|
})
|
|
554
554
|
]
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
|
-
|
|
558
|
-
export { C as CreateExportPage };
|
|
557
|
+
export { T as CreateExportPage };
|
|
559
558
|
|
|
560
559
|
//# sourceMappingURL=CreateExportPage.js.map
|