@burdenoff/microfe-export 2026.525.3 → 2026.529.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.
@@ -9,7 +9,7 @@ var p = r(() => import("./pages/CreateExportPage.js").then((e) => ({ default: e.
9
9
  function v() {
10
10
  return /* @__PURE__ */ d("div", {
11
11
  className: "flex items-center justify-center min-h-[400px]",
12
- children: /* @__PURE__ */ d(a, { className: "h-8 w-8 animate-spin text-primary" })
12
+ children: /* @__PURE__ */ d(a, { className: "size-8 animate-spin text-primary" })
13
13
  });
14
14
  }
15
15
  var y = class extends t {
@@ -40,7 +40,7 @@ var y = class extends t {
40
40
  children: [
41
41
  /* @__PURE__ */ d("div", {
42
42
  className: "p-3 rounded-full bg-destructive/10",
43
- children: /* @__PURE__ */ d(i, { className: "h-8 w-8 text-destructive" })
43
+ children: /* @__PURE__ */ d(i, { className: "size-8 text-destructive" })
44
44
  }),
45
45
  /* @__PURE__ */ f("div", {
46
46
  className: "space-y-2",
@@ -53,9 +53,10 @@ var y = class extends t {
53
53
  })]
54
54
  }),
55
55
  /* @__PURE__ */ f("button", {
56
+ type: "button",
56
57
  onClick: this.handleRetry,
57
58
  className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
58
- children: [/* @__PURE__ */ d(o, { className: "h-4 w-4" }), "Try Again"]
59
+ children: [/* @__PURE__ */ d(o, { className: "size-4" }), "Try Again"]
59
60
  })
60
61
  ]
61
62
  }) : this.props.children;
@@ -67,7 +68,7 @@ function b() {
67
68
  children: [/* @__PURE__ */ d("div", {
68
69
  className: "p-3 rounded-full bg-muted",
69
70
  children: /* @__PURE__ */ d("svg", {
70
- className: "h-8 w-8 text-muted-foreground",
71
+ className: "size-8 text-muted-foreground",
71
72
  fill: "none",
72
73
  viewBox: "0 0 24 24",
73
74
  stroke: "currentColor",
@@ -1 +1 @@
1
- {"version":3,"file":"ExportRoutes.js","names":[],"sources":["../../src/export/ExportRoutes.tsx"],"sourcesContent":["import {\n lazy,\n Suspense,\n Component,\n type ReactNode,\n type ErrorInfo,\n} from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\n\n// Eager loaded - primary landing page\nimport { ExportLandingPage } from \"./pages/ExportLandingPage\";\n\n// Lazy loaded pages\nconst CreateExportPage = lazy(() =>\n import(\"./pages/CreateExportPage\").then((m) => ({\n default: m.CreateExportPage,\n })),\n);\nconst ExportHistoryPage = lazy(() =>\n import(\"./pages/ExportHistoryPage\").then((m) => ({\n default: m.ExportHistoryPage,\n })),\n);\nconst ExportDetailPage = lazy(() =>\n import(\"./pages/ExportDetailPage\").then((m) => ({\n default: m.ExportDetailPage,\n })),\n);\nconst ExportTemplatesPage = lazy(() =>\n import(\"./pages/ExportTemplatesPage\").then((m) => ({\n default: m.ExportTemplatesPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(\"[Export] Lazy page load failed:\", error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-destructive/10\">\n <AlertTriangle className=\"h-8 w-8 text-destructive\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">\n Failed to load page\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n {this.state.error?.message ||\n \"The page chunk could not be loaded. This may be due to a network issue.\"}\n </p>\n </div>\n <button\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <RefreshCw className=\"h-4 w-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n/**\n * Fallback shown when the Export feature flag is OFF.\n */\nfunction ExportDisabledFallback() {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-muted\">\n <svg\n className=\"h-8 w-8 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3\"\n />\n </svg>\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">\n Data Export Unavailable\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n The Data Export feature is currently disabled for this workspace.\n Contact your administrator to enable it.\n </p>\n </div>\n </div>\n );\n}\n\n/**\n * Internal router for the Export microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes (relative to basePath, e.g., /export):\n * - / → Export dashboard page\n * - /new → Create new export job\n * - /history → Export history list\n * - /:jobId → Export job detail page\n * - /templates → Export templates list\n * - /templates/:templateId → Template detail page\n */\nexport function ExportRoutes() {\n return (\n <LazyErrorBoundary>\n <FeatureGate\n flag=\"workspaces.export\"\n defaultValue={true}\n fallback={<ExportDisabledFallback />}\n >\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<ExportLandingPage />} />\n\n {/* Create new export (lazy loaded) */}\n <Route path=\"new\" element={<CreateExportPage />} />\n\n {/* Export history (lazy loaded) */}\n <Route path=\"history\" element={<ExportHistoryPage />} />\n\n {/* Export job detail (lazy loaded) */}\n <Route path=\":jobId\" element={<ExportDetailPage />} />\n\n {/* Templates (lazy loaded) */}\n <Route path=\"templates\" element={<ExportTemplatesPage />} />\n <Route\n path=\"templates/:templateId\"\n element={<TemplateDetailPage />}\n />\n\n {/* Catch-all route - redirect to dashboard */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </FeatureGate>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;AAeA,IAAM,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EACjD,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAChD,SAAS,EAAE,oBACZ,EAAE,CACJ;AAKD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,qCAAsC,CAAA;EACrD,CAAA;;AAQV,IAAM,IAAN,cAAgC,EAG9B;CACA,YAAY,GAAgC;AAE1C,E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d,UAAU,kBAAC,GAAD,EAA0B,CAAA;YAEpC,kBAAC,GAAD;GAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;aAChC,kBAAC,GAAD,EAAA,UAAA;IAEE,kBAAC,GAAD;KAAO,OAAA;KAAM,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAG/C,kBAAC,GAAD;KAAO,MAAK;KAAM,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAGnD,kBAAC,GAAD;KAAO,MAAK;KAAU,SAAS,kBAAC,GAAD,EAAqB,CAAA;KAAI,CAAA;IAGxD,kBAAC,GAAD;KAAO,MAAK;KAAS,SAAS,kBAAC,GAAD,EAAoB,CAAA;KAAI,CAAA;IAGtD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAuB,CAAA;KAAI,CAAA;IAC5D,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAC/B,CAAA;IAGF,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACC,CAAA,EACI,CAAA"}
1
+ {"version":3,"file":"ExportRoutes.js","names":[],"sources":["../../src/export/ExportRoutes.tsx"],"sourcesContent":["import {\n lazy,\n Suspense,\n Component,\n type ReactNode,\n type ErrorInfo,\n} from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\n\n// Eager loaded - primary landing page\nimport { ExportLandingPage } from \"./pages/ExportLandingPage\";\n\n// Lazy loaded pages\nconst CreateExportPage = lazy(() =>\n import(\"./pages/CreateExportPage\").then((m) => ({\n default: m.CreateExportPage,\n })),\n);\nconst ExportHistoryPage = lazy(() =>\n import(\"./pages/ExportHistoryPage\").then((m) => ({\n default: m.ExportHistoryPage,\n })),\n);\nconst ExportDetailPage = lazy(() =>\n import(\"./pages/ExportDetailPage\").then((m) => ({\n default: m.ExportDetailPage,\n })),\n);\nconst ExportTemplatesPage = lazy(() =>\n import(\"./pages/ExportTemplatesPage\").then((m) => ({\n default: m.ExportTemplatesPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(\"[Export] Lazy page load failed:\", error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-destructive/10\">\n <AlertTriangle className=\"size-8 text-destructive\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">\n Failed to load page\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n {this.state.error?.message ||\n \"The page chunk could not be loaded. This may be due to a network issue.\"}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n/**\n * Fallback shown when the Export feature flag is OFF.\n */\nfunction ExportDisabledFallback() {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-muted\">\n <svg\n className=\"size-8 text-muted-foreground\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n stroke=\"currentColor\"\n strokeWidth={1.5}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3\"\n />\n </svg>\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">\n Data Export Unavailable\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n The Data Export feature is currently disabled for this workspace.\n Contact your administrator to enable it.\n </p>\n </div>\n </div>\n );\n}\n\n/**\n * Internal router for the Export microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes (relative to basePath, e.g., /export):\n * - / → Export dashboard page\n * - /new → Create new export job\n * - /history → Export history list\n * - /:jobId → Export job detail page\n * - /templates → Export templates list\n * - /templates/:templateId → Template detail page\n */\nexport function ExportRoutes() {\n return (\n <LazyErrorBoundary>\n <FeatureGate\n flag=\"workspaces.export\"\n defaultValue={true}\n fallback={<ExportDisabledFallback />}\n >\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<ExportLandingPage />} />\n\n {/* Create new export (lazy loaded) */}\n <Route path=\"new\" element={<CreateExportPage />} />\n\n {/* Export history (lazy loaded) */}\n <Route path=\"history\" element={<ExportHistoryPage />} />\n\n {/* Export job detail (lazy loaded) */}\n <Route path=\":jobId\" element={<ExportDetailPage />} />\n\n {/* Templates (lazy loaded) */}\n <Route path=\"templates\" element={<ExportTemplatesPage />} />\n <Route\n path=\"templates/:templateId\"\n element={<TemplateDetailPage />}\n />\n\n {/* Catch-all route - redirect to dashboard */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </FeatureGate>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;AAeA,IAAM,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EACjD,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAChD,SAAS,EAAE,oBACZ,EAAE,CACJ;AAKD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,oCAAqC,CAAA;EACpD,CAAA;;AAQV,IAAM,IAAN,cAAgC,EAG9B;CACA,YAAY,GAAgC;AAE1C,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAc;AAC5C,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,kBAAkB,GAAc,GAAsB;AACpD,UAAQ,MAAM,mCAAmC,GAAO,EAAU;;CAGpE,oBAAoB;AAClB,OAAK,SAAS;GAAE,UAAU;GAAO,OAAO;GAAM,CAAC;;CAGjD,SAAS;AA4BP,SA3BI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAe,WAAU,2BAA4B,CAAA;KACjD,CAAA;IAC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,EAAoB,CAAA;KAAI,CAAA;IAGtD,kBAAC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAAC,GAAD,EAAuB,CAAA;KAAI,CAAA;IAC5D,kBAAC,GAAD;KACE,MAAK;KACL,SAAS,kBAAC,GAAD,EAAsB,CAAA;KAC/B,CAAA;IAGF,kBAAC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAAC,GAAD;MAAU,IAAG;MAAG,SAAA;MAAU,CAAA;KAAI,CAAA;IAChD,EAAA,CAAA;GACA,CAAA;EACC,CAAA,EACI,CAAA"}
@@ -28,8 +28,8 @@ function s({ status: s, className: c }) {
28
28
  return /* @__PURE__ */ i("span", {
29
29
  className: e("inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium", o[s], c),
30
30
  children: [s === "RUNNING" && /* @__PURE__ */ i("span", {
31
- className: "relative flex h-2 w-2",
32
- children: [/* @__PURE__ */ r("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75" }), /* @__PURE__ */ r("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-accent-blue" })]
31
+ className: "relative flex size-2",
32
+ children: [/* @__PURE__ */ r("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75" }), /* @__PURE__ */ r("span", { className: "relative inline-flex rounded-full size-2 bg-accent-blue" })]
33
33
  }), d]
34
34
  });
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ExportStatusBadge.js","names":[],"sources":["../../../src/export/components/ExportStatusBadge.tsx"],"sourcesContent":["import { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport { cn } from \"../utils/cn\";\nimport { getStatusDisplayName } from \"../constants/enums\";\nimport type { ExportJobStatus } from \"../types\";\nimport { tWithFallback } from \"../utils/i18n\";\n\ninterface ExportStatusBadgeProps {\n status: ExportJobStatus;\n className?: string;\n}\n\nconst statusStyles: Record<ExportJobStatus, string> = {\n CREATED: \"bg-status-info-bg-subtle text-status-info-text\",\n QUEUED: \"bg-status-warning-bg-subtle text-status-warning-text\",\n RUNNING: \"bg-status-info-bg-subtle text-status-info-text animate-pulse\",\n COMPLETED: \"bg-status-success-bg-subtle text-status-success-text\",\n FAILED: \"bg-status-error-bg-subtle text-status-error-text\",\n CANCELLED: \"bg-bg-sunken text-text-secondary\",\n EXPIRED: \"bg-accent-orange-subtle text-accent-orange\",\n DELETED: \"bg-bg-sunken text-text-tertiary\",\n};\n\n/**\n * ExportStatusBadge - Renders a colored badge for export job status\n */\nexport function ExportStatusBadge({\n status,\n className,\n}: ExportStatusBadgeProps) {\n const { t } = useI18n();\n const tr = (key: string, fallback: string) => tWithFallback(t, key, fallback);\n\n const statusLabel =\n {\n CREATED: tr(\"export.shared.status.created\", \"Created\"),\n QUEUED: tr(\"export.shared.status.queued\", \"Queued\"),\n RUNNING: tr(\"export.shared.status.running\", \"Running\"),\n COMPLETED: tr(\"export.shared.status.completed\", \"Completed\"),\n FAILED: tr(\"export.shared.status.failed\", \"Failed\"),\n CANCELLED: tr(\"export.shared.status.cancelled\", \"Cancelled\"),\n EXPIRED: tr(\"export.shared.status.expired\", \"Expired\"),\n DELETED: tr(\"export.shared.status.deleted\", \"Deleted\"),\n }[status] ?? getStatusDisplayName(status);\n\n return (\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium\",\n statusStyles[status],\n className,\n )}\n >\n {status === \"RUNNING\" && (\n <span className=\"relative flex h-2 w-2\">\n <span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75\" />\n <span className=\"relative inline-flex rounded-full h-2 w-2 bg-accent-blue\" />\n </span>\n )}\n {statusLabel}\n </span>\n );\n}\n"],"mappings":";;;;;;AAWA,IAAM,IAAgD;CACpD,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACV;AAKD,SAAgB,EAAkB,EAChC,WACA,gBACyB;CACzB,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAAqB,EAAc,GAAG,GAAK,EAAS,EAEvE,IACJ;EACE,SAAS,EAAG,gCAAgC,UAAU;EACtD,QAAQ,EAAG,+BAA+B,SAAS;EACnD,SAAS,EAAG,gCAAgC,UAAU;EACtD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,QAAQ,EAAG,+BAA+B,SAAS;EACnD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,SAAS,EAAG,gCAAgC,UAAU;EACtD,SAAS,EAAG,gCAAgC,UAAU;EACvD,CAAC,MAAW,EAAqB,EAAO;AAE3C,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAa,IACb,EACD;YALH,CAOG,MAAW,aACV,kBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,kBAAC,QAAD,EAAM,WAAU,0FAA2F,CAAA,EAC3G,kBAAC,QAAD,EAAM,WAAU,4DAA6D,CAAA,CACxE;MAER,EACI"}
1
+ {"version":3,"file":"ExportStatusBadge.js","names":[],"sources":["../../../src/export/components/ExportStatusBadge.tsx"],"sourcesContent":["import { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport { cn } from \"../utils/cn\";\nimport { getStatusDisplayName } from \"../constants/enums\";\nimport type { ExportJobStatus } from \"../types\";\nimport { tWithFallback } from \"../utils/i18n\";\n\ninterface ExportStatusBadgeProps {\n status: ExportJobStatus;\n className?: string;\n}\n\nconst statusStyles: Record<ExportJobStatus, string> = {\n CREATED: \"bg-status-info-bg-subtle text-status-info-text\",\n QUEUED: \"bg-status-warning-bg-subtle text-status-warning-text\",\n RUNNING: \"bg-status-info-bg-subtle text-status-info-text animate-pulse\",\n COMPLETED: \"bg-status-success-bg-subtle text-status-success-text\",\n FAILED: \"bg-status-error-bg-subtle text-status-error-text\",\n CANCELLED: \"bg-bg-sunken text-text-secondary\",\n EXPIRED: \"bg-accent-orange-subtle text-accent-orange\",\n DELETED: \"bg-bg-sunken text-text-tertiary\",\n};\n\n/**\n * ExportStatusBadge - Renders a colored badge for export job status\n */\nexport function ExportStatusBadge({\n status,\n className,\n}: ExportStatusBadgeProps) {\n const { t } = useI18n();\n const tr = (key: string, fallback: string) => tWithFallback(t, key, fallback);\n\n const statusLabel =\n {\n CREATED: tr(\"export.shared.status.created\", \"Created\"),\n QUEUED: tr(\"export.shared.status.queued\", \"Queued\"),\n RUNNING: tr(\"export.shared.status.running\", \"Running\"),\n COMPLETED: tr(\"export.shared.status.completed\", \"Completed\"),\n FAILED: tr(\"export.shared.status.failed\", \"Failed\"),\n CANCELLED: tr(\"export.shared.status.cancelled\", \"Cancelled\"),\n EXPIRED: tr(\"export.shared.status.expired\", \"Expired\"),\n DELETED: tr(\"export.shared.status.deleted\", \"Deleted\"),\n }[status] ?? getStatusDisplayName(status);\n\n return (\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium\",\n statusStyles[status],\n className,\n )}\n >\n {status === \"RUNNING\" && (\n <span className=\"relative flex size-2\">\n <span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75\" />\n <span className=\"relative inline-flex rounded-full size-2 bg-accent-blue\" />\n </span>\n )}\n {statusLabel}\n </span>\n );\n}\n"],"mappings":";;;;;;AAWA,IAAM,IAAgD;CACpD,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACV;AAKD,SAAgB,EAAkB,EAChC,WACA,gBACyB;CACzB,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAAqB,EAAc,GAAG,GAAK,EAAS,EAEvE,IACJ;EACE,SAAS,EAAG,gCAAgC,UAAU;EACtD,QAAQ,EAAG,+BAA+B,SAAS;EACnD,SAAS,EAAG,gCAAgC,UAAU;EACtD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,QAAQ,EAAG,+BAA+B,SAAS;EACnD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,SAAS,EAAG,gCAAgC,UAAU;EACtD,SAAS,EAAG,gCAAgC,UAAU;EACvD,CAAC,MAAW,EAAqB,EAAO;AAE3C,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAa,IACb,EACD;YALH,CAOG,MAAW,aACV,kBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,kBAAC,QAAD,EAAM,WAAU,0FAA2F,CAAA,EAC3G,kBAAC,QAAD,EAAM,WAAU,2DAA4D,CAAA,CACvE;MAER,EACI"}
@@ -1,7 +1,8 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ import { EmptyState as r } from "@burdenoff/fe-libs/ui";
3
4
  //#region src/export/components/PageLayout.tsx
4
- var r = {
5
+ var i = {
5
6
  sm: "max-w-screen-sm",
6
7
  md: "max-w-screen-md",
7
8
  lg: "max-w-screen-lg",
@@ -10,11 +11,11 @@ var r = {
10
11
  "3xl": "max-w-[1600px]",
11
12
  full: "max-w-full"
12
13
  };
13
- function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, maxWidth: u = "xl", showHeader: d = !0, className: f, contentClassName: p }) {
14
+ function a({ children: r, title: a, subtitle: o, icon: s, headerActions: c, headerContent: l, maxWidth: u = "xl", showHeader: d = !0, className: f, contentClassName: p }) {
14
15
  return /* @__PURE__ */ t("div", {
15
16
  className: e("min-h-full w-full", "px-4 sm:px-6 lg:px-8 xl:px-12", "py-6 sm:py-8 lg:py-10", "animate-in fade-in-0 slide-in-from-bottom-4 duration-500", f),
16
17
  children: /* @__PURE__ */ n("div", {
17
- className: e("mx-auto w-full", r[u], p),
18
+ className: e("mx-auto w-full", i[u], p),
18
19
  children: [d && (a || c) && /* @__PURE__ */ n("header", {
19
20
  className: "mb-6 sm:mb-8",
20
21
  children: [/* @__PURE__ */ n("div", {
@@ -44,12 +45,12 @@ function i({ children: i, title: a, subtitle: o, icon: s, headerActions: c, head
44
45
  })]
45
46
  }), /* @__PURE__ */ t("div", {
46
47
  className: "space-y-6",
47
- children: i
48
+ children: r
48
49
  })]
49
50
  })
50
51
  });
51
52
  }
52
- function a({ children: r, title: i, description: a, actions: o, className: s }) {
53
+ function o({ children: r, title: i, description: a, actions: o, className: s }) {
53
54
  return /* @__PURE__ */ n("section", {
54
55
  className: e("space-y-4", s),
55
56
  children: [(i || o) && /* @__PURE__ */ n("div", {
@@ -67,27 +68,18 @@ function a({ children: r, title: i, description: a, actions: o, className: s })
67
68
  }), r]
68
69
  });
69
70
  }
70
- function o({ icon: r, title: i, description: a, action: o, className: s }) {
71
- return /* @__PURE__ */ n("div", {
72
- className: e("flex flex-col items-center justify-center", "py-12 sm:py-16 px-4", "text-center", "animate-in fade-in-0 zoom-in-95 duration-300", s),
73
- children: [
74
- r && /* @__PURE__ */ t("div", {
75
- className: "mb-4 p-4 rounded-2xl bg-muted/50 text-muted-foreground",
76
- children: r
77
- }),
78
- /* @__PURE__ */ t("h3", {
79
- className: "text-lg font-semibold text-foreground mb-1",
80
- children: i
81
- }),
82
- a && /* @__PURE__ */ t("p", {
83
- className: "text-sm text-muted-foreground max-w-sm mb-4",
84
- children: a
85
- }),
86
- o
87
- ]
71
+ function s({ icon: e, title: n, description: i, action: a, className: o }) {
72
+ return /* @__PURE__ */ t("div", {
73
+ className: o,
74
+ children: /* @__PURE__ */ t(r, {
75
+ icon: e,
76
+ title: n,
77
+ description: i,
78
+ action: a
79
+ })
88
80
  });
89
81
  }
90
82
  //#endregion
91
- export { o as EmptyState, i as PageLayout, a as PageSection };
83
+ export { s as EmptyState, a as PageLayout, o as PageSection };
92
84
 
93
85
  //# sourceMappingURL=PageLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/export/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { cn } from \"../utils/cn\";\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"full\";\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\", // 640px\n md: \"max-w-screen-md\", // 768px\n lg: \"max-w-screen-lg\", // 1024px\n xl: \"max-w-screen-xl\", // 1280px\n \"2xl\": \"max-w-screen-2xl\", // 1536px\n \"3xl\": \"max-w-[1600px]\",\n full: \"max-w-full\",\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = \"xl\",\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n \"min-h-full w-full\",\n // Responsive horizontal padding\n \"px-4 sm:px-6 lg:px-8 xl:px-12\",\n // Responsive vertical padding\n \"py-6 sm:py-8 lg:py-10\",\n // Entrance animation\n \"animate-in fade-in-0 slide-in-from-bottom-4 duration-500\",\n className,\n )}\n >\n {/* Max-width constrained content container */}\n <div\n className={cn(\n \"mx-auto w-full\",\n maxWidthClasses[maxWidth],\n contentClassName,\n )}\n >\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-muted-foreground max-w-2xl\">\n {subtitle}\n </p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n {headerActions}\n </div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * PageSection - A section within a page with consistent spacing\n */\nexport function PageSection({\n children,\n title,\n description,\n actions,\n className,\n}: {\n children: ReactNode;\n title?: string;\n description?: string;\n actions?: ReactNode;\n className?: string;\n}) {\n return (\n <section className={cn(\"space-y-4\", className)}>\n {(title || actions) && (\n <div className=\"flex items-center justify-between\">\n <div>\n {title && (\n <h2 className=\"text-lg font-semibold text-foreground\">{title}</h2>\n )}\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n )}\n {children}\n </section>\n );\n}\n\n/**\n * EmptyState - A consistent empty state component\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div\n className={cn(\n \"flex flex-col items-center justify-center\",\n \"py-12 sm:py-16 px-4\",\n \"text-center\",\n \"animate-in fade-in-0 zoom-in-95 duration-300\",\n className,\n )}\n >\n {icon && (\n <div className=\"mb-4 p-4 rounded-2xl bg-muted/50 text-muted-foreground\">\n {icon}\n </div>\n )}\n <h3 className=\"text-lg font-semibold text-foreground mb-1\">{title}</h3>\n {description && (\n <p className=\"text-sm text-muted-foreground max-w-sm mb-4\">\n {description}\n </p>\n )}\n {action}\n </div>\n );\n}\n"],"mappings":";;;AAyBA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAWD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EAET,qBAEA,iCAEA,yBAEA,4DACA,EACD;YAGD,kBAAC,OAAD;GACE,WAAW,EACT,kBACA,EAAgB,IAChB,EACD;aALH,CAQG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBACV;OACC,CAAA,CAEF;SAGL,KACC,kBAAC,OAAD;MAAK,WAAU;gBACZ;MACG,CAAA,CAEJ;QAGL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAMX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AAOV,SAAgB,EAAY,EAC1B,aACA,UACA,gBACA,YACA,gBAOC;AACD,QACE,kBAAC,WAAD;EAAS,WAAW,EAAG,aAAa,EAAU;YAA9C,EACI,KAAS,MACT,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACG,KACC,kBAAC,MAAD;IAAI,WAAU;cAAyC;IAAW,CAAA,EAEnE,KACC,kBAAC,KAAD;IAAG,WAAU;cAAiC;IAAgB,CAAA,CAE5D,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;IAAK,WAAU;cAA2B;IAAc,CAAA,CAChE;MAEP,EACO;;;AAOd,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EACE,WAAW,EACT,6CACA,uBACA,eACA,gDACA,EACD;YAPH;GASG,KACC,kBAAC,OAAD;IAAK,WAAU;cACZ;IACG,CAAA;GAER,kBAAC,MAAD;IAAI,WAAU;cAA8C;IAAW,CAAA;GACtE,KACC,kBAAC,KAAD;IAAG,WAAU;cACV;IACC,CAAA;GAEL;GACG"}
1
+ {"version":3,"file":"PageLayout.js","names":[],"sources":["../../../src/export/components/PageLayout.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport { EmptyState as CanonicalEmptyState } from \"@burdenoff/fe-libs/ui\";\nimport { cn } from \"../utils/cn\";\n\ninterface PageLayoutProps {\n children: ReactNode;\n /** Page title */\n title?: string;\n /** Page subtitle/description */\n subtitle?: string;\n /** Icon component to display next to title */\n icon?: ReactNode;\n /** Actions to display in header (buttons, etc.) */\n headerActions?: ReactNode;\n /** Additional header content below title */\n headerContent?: ReactNode;\n /** Maximum width of content: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full' */\n maxWidth?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\" | \"full\";\n /** Whether to show the header section */\n showHeader?: boolean;\n /** Additional CSS classes for the container */\n className?: string;\n /** Additional CSS classes for the content area */\n contentClassName?: string;\n}\n\nconst maxWidthClasses = {\n sm: \"max-w-screen-sm\", // 640px\n md: \"max-w-screen-md\", // 768px\n lg: \"max-w-screen-lg\", // 1024px\n xl: \"max-w-screen-xl\", // 1280px\n \"2xl\": \"max-w-screen-2xl\", // 1536px\n \"3xl\": \"max-w-[1600px]\",\n full: \"max-w-full\",\n};\n\n/**\n * PageLayout - A consistent page wrapper with responsive design\n *\n * Features:\n * - Proper max-width constraints\n * - Responsive padding\n * - Animated entrance\n * - Consistent header styling\n */\nexport function PageLayout({\n children,\n title,\n subtitle,\n icon,\n headerActions,\n headerContent,\n maxWidth = \"xl\",\n showHeader = true,\n className,\n contentClassName,\n}: PageLayoutProps) {\n return (\n <div\n className={cn(\n // Base styles - full width container with padding\n \"min-h-full w-full\",\n // Responsive horizontal padding\n \"px-4 sm:px-6 lg:px-8 xl:px-12\",\n // Responsive vertical padding\n \"py-6 sm:py-8 lg:py-10\",\n // Entrance animation\n \"animate-in fade-in-0 slide-in-from-bottom-4 duration-500\",\n className,\n )}\n >\n {/* Max-width constrained content container */}\n <div\n className={cn(\n \"mx-auto w-full\",\n maxWidthClasses[maxWidth],\n contentClassName,\n )}\n >\n {/* Page Header */}\n {showHeader && (title || headerActions) && (\n <header className=\"mb-6 sm:mb-8\">\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n {/* Title Section */}\n <div className=\"space-y-1\">\n {(title || icon) && (\n <div className=\"flex items-center gap-3\">\n {icon && (\n <div className=\"flex-shrink-0 p-2.5 rounded-xl bg-primary/10 text-primary\">\n {icon}\n </div>\n )}\n {title && (\n <h1 className=\"text-2xl sm:text-3xl font-bold tracking-tight text-foreground\">\n {title}\n </h1>\n )}\n </div>\n )}\n {subtitle && (\n <p className=\"text-sm sm:text-base text-muted-foreground max-w-2xl\">\n {subtitle}\n </p>\n )}\n </div>\n\n {/* Header Actions */}\n {headerActions && (\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n {headerActions}\n </div>\n )}\n </div>\n\n {/* Additional Header Content */}\n {headerContent && <div className=\"mt-4\">{headerContent}</div>}\n </header>\n )}\n\n {/* Page content — must not use a <main> landmark here because the\n host shell (AppShellLayout) already renders one; nesting <main>\n elements is invalid HTML and an a11y violation. */}\n <div className=\"space-y-6\">{children}</div>\n </div>\n </div>\n );\n}\n\n/**\n * PageSection - A section within a page with consistent spacing\n */\nexport function PageSection({\n children,\n title,\n description,\n actions,\n className,\n}: {\n children: ReactNode;\n title?: string;\n description?: string;\n actions?: ReactNode;\n className?: string;\n}) {\n return (\n <section className={cn(\"space-y-4\", className)}>\n {(title || actions) && (\n <div className=\"flex items-center justify-between\">\n <div>\n {title && (\n <h2 className=\"text-lg font-semibold text-foreground\">{title}</h2>\n )}\n {description && (\n <p className=\"text-sm text-muted-foreground\">{description}</p>\n )}\n </div>\n {actions && <div className=\"flex items-center gap-2\">{actions}</div>}\n </div>\n )}\n {children}\n </section>\n );\n}\n\n/**\n * Local wrapper around the canonical `EmptyState` from `@burdenoff/fe-libs/ui`.\n * Keeps the existing microfe-export call sites stable while routing all\n * empty-state rendering through the shared primitive.\n */\nexport function EmptyState({\n icon,\n title,\n description,\n action,\n className,\n}: {\n icon?: ReactNode;\n title: string;\n description?: string;\n action?: ReactNode;\n className?: string;\n}) {\n return (\n <div className={className}>\n <CanonicalEmptyState\n icon={icon}\n title={title}\n description={description}\n action={action}\n />\n </div>\n );\n}\n"],"mappings":";;;;AA0BA,IAAM,IAAkB;CACtB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,OAAO;CACP,OAAO;CACP,MAAM;CACP;AAWD,SAAgB,EAAW,EACzB,aACA,UACA,aACA,SACA,kBACA,kBACA,cAAW,MACX,gBAAa,IACb,cACA,uBACkB;AAClB,QACE,kBAAC,OAAD;EACE,WAAW,EAET,qBAEA,iCAEA,yBAEA,4DACA,EACD;YAGD,kBAAC,OAAD;GACE,WAAW,EACT,kBACA,EAAgB,IAChB,EACD;aALH,CAQG,MAAe,KAAS,MACvB,kBAAC,UAAD;IAAQ,WAAU;cAAlB,CACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CAEE,kBAAC,OAAD;MAAK,WAAU;gBAAf,EACI,KAAS,MACT,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACG,KACC,kBAAC,OAAD;QAAK,WAAU;kBACZ;QACG,CAAA,EAEP,KACC,kBAAC,MAAD;QAAI,WAAU;kBACX;QACE,CAAA,CAEH;UAEP,KACC,kBAAC,KAAD;OAAG,WAAU;iBACV;OACC,CAAA,CAEF;SAGL,KACC,kBAAC,OAAD;MAAK,WAAU;gBACZ;MACG,CAAA,CAEJ;QAGL,KAAiB,kBAAC,OAAD;KAAK,WAAU;eAAQ;KAAoB,CAAA,CACtD;OAMX,kBAAC,OAAD;IAAK,WAAU;IAAa;IAAe,CAAA,CACvC;;EACF,CAAA;;AAOV,SAAgB,EAAY,EAC1B,aACA,UACA,gBACA,YACA,gBAOC;AACD,QACE,kBAAC,WAAD;EAAS,WAAW,EAAG,aAAa,EAAU;YAA9C,EACI,KAAS,MACT,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,OAAD,EAAA,UAAA,CACG,KACC,kBAAC,MAAD;IAAI,WAAU;cAAyC;IAAW,CAAA,EAEnE,KACC,kBAAC,KAAD;IAAG,WAAU;cAAiC;IAAgB,CAAA,CAE5D,EAAA,CAAA,EACL,KAAW,kBAAC,OAAD;IAAK,WAAU;cAA2B;IAAc,CAAA,CAChE;MAEP,EACO;;;AASd,SAAgB,EAAW,EACzB,SACA,UACA,gBACA,WACA,gBAOC;AACD,QACE,kBAAC,OAAD;EAAgB;YACd,kBAAC,GAAD;GACQ;GACC;GACM;GACL;GACR,CAAA;EACE,CAAA"}
@@ -1,14 +1,5 @@
1
1
  //#region src/export/constants/enums.ts
2
- var e = {
3
- CREATED: "CREATED",
4
- QUEUED: "QUEUED",
5
- RUNNING: "RUNNING",
6
- COMPLETED: "COMPLETED",
7
- FAILED: "FAILED",
8
- CANCELLED: "CANCELLED",
9
- EXPIRED: "EXPIRED",
10
- DELETED: "DELETED"
11
- }, t = (e) => ({
2
+ var e = (e) => ({
12
3
  CREATED: "Created",
13
4
  QUEUED: "Queued",
14
5
  RUNNING: "Running",
@@ -17,11 +8,20 @@ var e = {
17
8
  CANCELLED: "Cancelled",
18
9
  EXPIRED: "Expired",
19
10
  DELETED: "Deleted"
20
- })[e] || e, n = (e) => ({
11
+ })[e] || e, t = (e) => ({
21
12
  CSV: "CSV",
22
13
  JSON: "JSON"
23
- })[e] || e, r = (e) => ({ ZIP: "ZIP" })[e] || e, i = () => Object.values(e);
14
+ })[e] || e, n = (e) => ({ ZIP: "ZIP" })[e] || e, r = () => [
15
+ "CREATED",
16
+ "QUEUED",
17
+ "RUNNING",
18
+ "COMPLETED",
19
+ "FAILED",
20
+ "CANCELLED",
21
+ "EXPIRED",
22
+ "DELETED"
23
+ ];
24
24
  //#endregion
25
- export { i as getAllStatuses, r as getArchiveFormatDisplayName, n as getFormatDisplayName, t as getStatusDisplayName };
25
+ export { r as getAllStatuses, n as getArchiveFormatDisplayName, t as getFormatDisplayName, e as getStatusDisplayName };
26
26
 
27
27
  //# sourceMappingURL=enums.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"enums.js","names":[],"sources":["../../../src/export/constants/enums.ts"],"sourcesContent":["/**\n * GraphQL Enum Constants\n *\n * These constants mirror the GraphQL enum types but as JavaScript objects\n * that can be used as values (not just TypeScript types).\n */\n\n/**\n * Export Job Status - Lifecycle states for an export job\n *\n * Maps to GraphQL enum: ExportJobStatus\n */\nexport const ExportJobStatus = {\n /** Job created, not yet queued */\n CREATED: \"CREATED\",\n /** Job queued for processing */\n QUEUED: \"QUEUED\",\n /** Job actively running */\n RUNNING: \"RUNNING\",\n /** Job completed successfully */\n COMPLETED: \"COMPLETED\",\n /** Job failed */\n FAILED: \"FAILED\",\n /** Job cancelled by user */\n CANCELLED: \"CANCELLED\",\n /** Job output has expired */\n EXPIRED: \"EXPIRED\",\n /** Job has been deleted */\n DELETED: \"DELETED\",\n} as const;\n\nexport type ExportJobStatusValue =\n (typeof ExportJobStatus)[keyof typeof ExportJobStatus];\n\n/**\n * Export Format - Output file format\n * Backend only supports JSON and CSV.\n *\n * Maps to GraphQL enum: ExportFormat\n */\nexport const ExportFormat = {\n /** Comma-separated values */\n CSV: \"CSV\",\n /** JavaScript Object Notation */\n JSON: \"JSON\",\n} as const;\n\nexport type ExportFormatValue =\n (typeof ExportFormat)[keyof typeof ExportFormat];\n\n/**\n * Export Archive Format - How parts are archived\n * Backend only supports ZIP.\n *\n * Maps to GraphQL enum: ExportArchiveFormat\n */\nexport const ExportArchiveFormat = {\n /** ZIP archive */\n ZIP: \"ZIP\",\n} as const;\n\nexport type ExportArchiveFormatValue =\n (typeof ExportArchiveFormat)[keyof typeof ExportArchiveFormat];\n\n/**\n * Helper: Get status display name\n */\nexport const getStatusDisplayName = (status: string): string => {\n const names: Record<string, string> = {\n CREATED: \"Created\",\n QUEUED: \"Queued\",\n RUNNING: \"Running\",\n COMPLETED: \"Completed\",\n FAILED: \"Failed\",\n CANCELLED: \"Cancelled\",\n EXPIRED: \"Expired\",\n DELETED: \"Deleted\",\n };\n return names[status] || status;\n};\n\n/**\n * Helper: Get status color class\n */\nexport const getStatusColor = (status: string): string => {\n const colors: Record<string, string> = {\n CREATED: \"bg-status-info-bg-subtle text-status-info-text\",\n QUEUED: \"bg-status-warning-bg-subtle text-status-warning-text\",\n RUNNING: \"bg-status-info-bg-subtle text-status-info-text\",\n COMPLETED: \"bg-status-success-bg-subtle text-status-success-text\",\n FAILED: \"bg-status-error-bg-subtle text-status-error-text\",\n CANCELLED: \"bg-bg-sunken text-text-secondary\",\n EXPIRED: \"bg-accent-orange-subtle text-accent-orange\",\n DELETED: \"bg-bg-sunken text-text-tertiary\",\n };\n return colors[status] || \"bg-bg-sunken text-text-secondary\";\n};\n\n/**\n * Helper: Get format display name\n */\nexport const getFormatDisplayName = (format: string): string => {\n const names: Record<string, string> = {\n CSV: \"CSV\",\n JSON: \"JSON\",\n };\n return names[format] || format;\n};\n\n/**\n * Helper: Get archive format display name\n */\nexport const getArchiveFormatDisplayName = (format: string): string => {\n const names: Record<string, string> = {\n ZIP: \"ZIP\",\n };\n return names[format] || format;\n};\n\n/**\n * Helper: Get all export statuses as array\n */\nexport const getAllStatuses = () => Object.values(ExportJobStatus);\n\n/**\n * Helper: Get all export formats as array\n */\nexport const getAllFormats = () => Object.values(ExportFormat);\n"],"mappings":";AAYA,IAAa,IAAkB;CAE7B,SAAS;CAET,QAAQ;CAER,SAAS;CAET,WAAW;CAEX,QAAQ;CAER,WAAW;CAEX,SAAS;CAET,SAAS;CACV,EAsCY,KAAwB,OACG;CACpC,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACV,EACY,MAAW,GAuBb,KAAwB,OACG;CACpC,KAAK;CACL,MAAM;CACP,EACY,MAAW,GAMb,KAA+B,OACJ,EACpC,KAAK,OACN,EACY,MAAW,GAMb,UAAuB,OAAO,OAAO,EAAgB"}
1
+ {"version":3,"file":"enums.js","names":[],"sources":["../../../src/export/constants/enums.ts"],"sourcesContent":["/**\n * GraphQL Enum Display Helpers\n *\n * Display-name helpers for export job and format enums.\n * Enum value sets are sourced from the canonical type definitions in `../types`.\n */\n\nimport type { ExportJobStatus } from \"../types\";\n\n/**\n * Helper: Get status display name\n */\nexport const getStatusDisplayName = (status: string): string => {\n const names: Record<string, string> = {\n CREATED: \"Created\",\n QUEUED: \"Queued\",\n RUNNING: \"Running\",\n COMPLETED: \"Completed\",\n FAILED: \"Failed\",\n CANCELLED: \"Cancelled\",\n EXPIRED: \"Expired\",\n DELETED: \"Deleted\",\n };\n return names[status] || status;\n};\n\n/**\n * Helper: Get format display name\n */\nexport const getFormatDisplayName = (format: string): string => {\n const names: Record<string, string> = {\n CSV: \"CSV\",\n JSON: \"JSON\",\n };\n return names[format] || format;\n};\n\n/**\n * Helper: Get archive format display name\n */\nexport const getArchiveFormatDisplayName = (format: string): string => {\n const names: Record<string, string> = {\n ZIP: \"ZIP\",\n };\n return names[format] || format;\n};\n\n/**\n * Helper: Get all export statuses as array\n */\nexport const getAllStatuses = (): ExportJobStatus[] => [\n \"CREATED\",\n \"QUEUED\",\n \"RUNNING\",\n \"COMPLETED\",\n \"FAILED\",\n \"CANCELLED\",\n \"EXPIRED\",\n \"DELETED\",\n];\n"],"mappings":";AAYA,IAAa,KAAwB,OACG;CACpC,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACV,EACY,MAAW,GAMb,KAAwB,OACG;CACpC,KAAK;CACL,MAAM;CACP,EACY,MAAW,GAMb,KAA+B,OACJ,EACpC,KAAK,OACN,EACY,MAAW,GAMb,UAA0C;CACrD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"useExportQueries.js","names":[],"sources":["../../../src/export/hooks/useExportQueries.ts"],"sourcesContent":["/**\n * Export Query Hooks\n *\n * Real Apollo Client hooks for all export operations.\n * Keep these documents in sync with src/operations/wspace/export/*.graphql.\n */\n\nimport { useMutation, useQuery, useSubscription } from \"@apollo/client/react\";\nimport {\n CancelExportJobDocument,\n CreateExportJobDocument,\n CreateExportTemplateDocument,\n DeleteExportJobDocument,\n DeleteExportTemplateDocument,\n ExportJobProgressDocument,\n GetAvailableExportEntitiesDocument,\n GetExportJobDocument,\n GetExportPartDocument,\n GetExportTemplateDocument,\n ListExportJobsDocument,\n ListExportTemplatesDocument,\n RetryExportJobDocument,\n UpdateExportTemplateDocument,\n type CancelExportJobMutation,\n type CancelExportJobMutationVariables,\n type CreateExportJobMutation,\n type CreateExportJobMutationVariables,\n type CreateExportTemplateMutation,\n type CreateExportTemplateMutationVariables,\n type DeleteExportJobMutation,\n type DeleteExportJobMutationVariables,\n type DeleteExportTemplateMutation,\n type DeleteExportTemplateMutationVariables,\n type ExportJobProgressSubscription,\n type ExportJobProgressSubscriptionVariables,\n type GetAvailableExportEntitiesQuery,\n type GetAvailableExportEntitiesQueryVariables,\n type GetExportJobQuery,\n type GetExportJobQueryVariables,\n type GetExportPartQuery,\n type GetExportPartQueryVariables,\n type GetExportTemplateQuery,\n type GetExportTemplateQueryVariables,\n type ListExportJobsQuery,\n type ListExportJobsQueryVariables,\n type ListExportTemplatesQuery,\n type ListExportTemplatesQueryVariables,\n type RetryExportJobMutation,\n type RetryExportJobMutationVariables,\n type UpdateExportTemplateMutation,\n type UpdateExportTemplateMutationVariables,\n} from \"../../generated/wspace-operations\";\nimport {\n ExportFormat as GqlExportFormat,\n ExportJobStatus as GqlExportJobStatus,\n ExportScope as GqlExportScope,\n type CreateExportJobInput as GqlCreateExportJobInput,\n type CreateExportTemplateInput as GqlCreateExportTemplateInput,\n type ExportJobFilterInput as GqlExportJobFilterInput,\n type ExportPaginationInput as GqlExportPaginationInput,\n type UpdateExportTemplateInput as GqlUpdateExportTemplateInput,\n} from \"../../generated/wspace-types\";\nimport { useExport } from \"../providers/ExportProvider\";\nimport { emitExportEvent } from \"../utils/events\";\nimport type {\n ExportArchiveFormat,\n ExportFormat,\n ExportJob,\n ExportJobStatus,\n ExportScope,\n ExportTemplate,\n ExportAvailableEntity,\n ExportPart,\n ExportFilter,\n PageInfo,\n} from \"../types\";\n\n// ---------------------------------------------------------------------------\n// Mapping helpers\n// ---------------------------------------------------------------------------\n\ntype Nullable<T> = T | null | undefined;\n\ninterface ExportPartLike {\n id: string;\n jobId?: Nullable<string>;\n partNumber: number;\n fileName: string;\n sizeBytes: number | string;\n entityTypes: string[];\n downloadUrl?: Nullable<string>;\n downloadExpiresAt?: Nullable<string>;\n checksum?: Nullable<string>;\n createdAt?: Nullable<string>;\n}\n\ninterface ExportJobLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n status: string;\n progress: number;\n exportScope?: Nullable<string>;\n organizationId?: Nullable<string>;\n targetWorkspaceIds?: Nullable<string[]>;\n entityTypes: string[];\n format: string;\n archiveFormat?: Nullable<string>;\n totalEntities?: Nullable<number>;\n processedEntities?: Nullable<number>;\n totalSizeBytes?: Nullable<number | string>;\n parts?: Nullable<ExportPartLike[]>;\n templateId?: Nullable<string>;\n entityFilters?: Nullable<Record<string, unknown>>;\n errorMessage?: Nullable<string>;\n startedAt?: Nullable<string>;\n completedAt?: Nullable<string>;\n expiresAt?: Nullable<string>;\n createdBy: string;\n temporalWorkflowId?: Nullable<string>;\n workspaceId?: Nullable<string>;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportTemplateLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n entityTypes: string[];\n format: string;\n entityFilters?: Nullable<Record<string, unknown>>;\n isDefault: boolean;\n workspaceId?: Nullable<string>;\n createdBy: string;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportAvailableEntityLike {\n entityType: string;\n displayName: string;\n description?: Nullable<string>;\n estimatedSize?: Nullable<string>;\n supportsDateRange: boolean;\n supportsMediaExport: boolean;\n enabled: boolean;\n}\n\nfunction optionalString(value: Nullable<string>): string | undefined {\n return value ?? undefined;\n}\n\nfunction optionalNumber(value: Nullable<number | string>): number | undefined {\n if (value == null) return undefined;\n const parsed = typeof value === \"number\" ? value : Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction numberOrZero(value: Nullable<number | string>): number {\n return optionalNumber(value) ?? 0;\n}\n\nfunction optionalRecord(\n value: Nullable<Record<string, unknown>>,\n): Record<string, unknown> | undefined {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? value\n : undefined;\n}\n\nfunction mapPageInfo(pageInfo: {\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n startCursor?: Nullable<string>;\n endCursor?: Nullable<string>;\n}): PageInfo {\n return {\n hasNextPage: pageInfo.hasNextPage,\n hasPreviousPage: pageInfo.hasPreviousPage,\n startCursor: optionalString(pageInfo.startCursor),\n endCursor: optionalString(pageInfo.endCursor),\n };\n}\n\nfunction mapPart(part: ExportPartLike): ExportPart {\n return {\n id: part.id,\n jobId: optionalString(part.jobId),\n partNumber: part.partNumber,\n fileName: part.fileName,\n sizeBytes: numberOrZero(part.sizeBytes),\n entityTypes: part.entityTypes,\n downloadUrl: optionalString(part.downloadUrl),\n downloadExpiresAt: optionalString(part.downloadExpiresAt),\n checksum: optionalString(part.checksum),\n createdAt: optionalString(part.createdAt),\n };\n}\n\nfunction mapJob(job: ExportJobLike): ExportJob {\n return {\n id: job.id,\n name: job.name,\n description: optionalString(job.description),\n status: job.status as ExportJobStatus,\n progress: job.progress,\n exportScope: job.exportScope ? (job.exportScope as ExportScope) : undefined,\n organizationId: optionalString(job.organizationId),\n targetWorkspaceIds: job.targetWorkspaceIds ?? undefined,\n entityTypes: job.entityTypes,\n format: job.format as ExportFormat,\n archiveFormat: (job.archiveFormat ?? \"ZIP\") as ExportArchiveFormat,\n totalEntities: optionalNumber(job.totalEntities),\n processedEntities: optionalNumber(job.processedEntities),\n totalSizeBytes: optionalNumber(job.totalSizeBytes),\n parts: job.parts?.map(mapPart) ?? [],\n templateId: optionalString(job.templateId),\n filters: optionalRecord(job.entityFilters),\n errorMessage: optionalString(job.errorMessage),\n startedAt: optionalString(job.startedAt),\n completedAt: optionalString(job.completedAt),\n expiresAt: optionalString(job.expiresAt),\n createdBy: job.createdBy,\n temporalWorkflowId: optionalString(job.temporalWorkflowId),\n workspaceId: optionalString(job.workspaceId),\n createdAt: job.createdAt,\n updatedAt: job.updatedAt,\n };\n}\n\nfunction mapTemplate(template: ExportTemplateLike): ExportTemplate {\n return {\n id: template.id,\n name: template.name,\n description: optionalString(template.description),\n entityTypes: template.entityTypes,\n format: template.format as ExportFormat,\n filters: optionalRecord(template.entityFilters),\n isDefault: template.isDefault,\n createdBy: template.createdBy,\n workspaceId: optionalString(template.workspaceId),\n createdAt: template.createdAt,\n updatedAt: template.updatedAt,\n };\n}\n\nfunction mapAvailableEntity(\n entity: ExportAvailableEntityLike,\n): ExportAvailableEntity {\n return {\n entityType: entity.entityType,\n displayName: entity.displayName,\n description: optionalString(entity.description),\n estimatedSize: optionalString(entity.estimatedSize),\n supportsDateRange: entity.supportsDateRange,\n supportsMediaExport: entity.supportsMediaExport,\n enabled: entity.enabled,\n };\n}\n\nfunction toGqlFormat(format: ExportFormat | string): GqlExportFormat {\n if (format === \"CSV\") return GqlExportFormat.Csv;\n if (format === \"JSON\") return GqlExportFormat.Json;\n throw new Error(`Unsupported export format: ${format}`);\n}\n\nfunction toGqlStatus(status: ExportJobStatus | string): GqlExportJobStatus {\n switch (status) {\n case \"CANCELLED\":\n return GqlExportJobStatus.Cancelled;\n case \"COMPLETED\":\n return GqlExportJobStatus.Completed;\n case \"CREATED\":\n return GqlExportJobStatus.Created;\n case \"DELETED\":\n return GqlExportJobStatus.Deleted;\n case \"EXPIRED\":\n return GqlExportJobStatus.Expired;\n case \"FAILED\":\n return GqlExportJobStatus.Failed;\n case \"QUEUED\":\n return GqlExportJobStatus.Queued;\n case \"RUNNING\":\n return GqlExportJobStatus.Running;\n default:\n throw new Error(`Unsupported export status: ${status}`);\n }\n}\n\nfunction toGqlScope(scope: ExportScope | string): GqlExportScope {\n switch (scope) {\n case \"INDIVIDUAL\":\n return GqlExportScope.Individual;\n case \"WORKSPACE_ADMIN\":\n return GqlExportScope.WorkspaceAdmin;\n case \"ORG_ADMIN\":\n return GqlExportScope.OrgAdmin;\n default:\n throw new Error(`Unsupported export scope: ${scope}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// Query Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Input for creating an export job\n */\nexport interface CreateExportJobInput {\n name: string;\n description?: string;\n exportScope?: ExportScope;\n organizationId?: string;\n entityTypes: string[];\n format: ExportFormat;\n filters?: Record<string, unknown>;\n templateId?: string;\n dateRangeStart?: string | null;\n dateRangeEnd?: string | null;\n}\n\n/**\n * Input for creating an export template\n */\nexport interface CreateExportTemplateInput {\n name: string;\n description?: string;\n entityTypes: string[];\n format: ExportFormat;\n}\n\n/**\n * Input for updating an export template\n */\nexport interface UpdateExportTemplateInput {\n name?: string;\n description?: string;\n entityTypes?: string[];\n format?: ExportFormat;\n isDefault?: boolean;\n}\n\n/**\n * Filter input for listing export jobs\n */\nexport interface ExportJobFilterInput {\n status?: ExportJobStatus[];\n format?: ExportFormat;\n entityTypes?: string[];\n search?: string;\n dateFrom?: string;\n dateTo?: string;\n}\n\n/**\n * Pagination input for export job list\n */\nexport interface ExportPaginationInput {\n first?: number;\n after?: string;\n last?: number;\n before?: string;\n}\n\n/**\n * Hook to fetch a paginated list of export jobs\n */\nexport function useExportJobs(\n filter?: Partial<ExportFilter>,\n pagination?: ExportPaginationInput,\n) {\n const { workspaceId } = useExport();\n\n // Build the backend filter from the UI filter shape\n const backendFilter: GqlExportJobFilterInput | undefined =\n filter && workspaceId\n ? {\n status:\n filter.status && filter.status !== \"all\"\n ? [toGqlStatus(filter.status)]\n : undefined,\n format:\n filter.format && filter.format !== \"all\"\n ? toGqlFormat(filter.format)\n : undefined,\n search: filter.search ?? undefined,\n }\n : undefined;\n\n const { data, loading, error, refetch } = useQuery<\n ListExportJobsQuery,\n ListExportJobsQueryVariables\n >(ListExportJobsDocument, {\n variables: {\n filter: backendFilter,\n pagination: pagination as GqlExportPaginationInput | undefined,\n context: { workspaceId },\n },\n skip: !workspaceId,\n });\n\n const jobs = data?.listExportJobs.edges.map((e) => mapJob(e.node)) ?? [];\n const totalCount = data?.listExportJobs.totalCount ?? 0;\n const pageInfo = data?.listExportJobs.pageInfo\n ? mapPageInfo(data.listExportJobs.pageInfo)\n : null;\n\n return {\n data: jobs,\n totalCount,\n pageInfo,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export job by ID.\n */\nexport function useExportJob(jobId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error, refetch } = useQuery<\n GetExportJobQuery,\n GetExportJobQueryVariables\n >(GetExportJobDocument, {\n variables: { id: jobId ?? \"\", context: { workspaceId } },\n skip: !jobId || !workspaceId,\n });\n\n const job = data?.getExportJob ? mapJob(data.getExportJob) : null;\n\n return {\n data: job,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to subscribe to live progress updates for an export job.\n */\nexport function useExportJobProgress(jobId: string | undefined) {\n const { data, loading, error } = useSubscription<\n ExportJobProgressSubscription,\n ExportJobProgressSubscriptionVariables\n >(ExportJobProgressDocument, {\n variables: { jobId: jobId ?? \"\" },\n skip: !jobId,\n });\n\n return {\n data: data?.exportJobProgress ? mapJob(data.exportJobProgress) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to fetch available entity types for export in a workspace\n */\nexport function useAvailableEntities(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n GetAvailableExportEntitiesQuery,\n GetAvailableExportEntitiesQueryVariables\n >(GetAvailableExportEntitiesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.getAvailableExportEntities;\n const entities =\n connection?.edges.map((edge) => mapAvailableEntity(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 100, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n getAvailableExportEntities: {\n ...fetchMoreResult.getAvailableExportEntities,\n edges: [\n ...previous.getAvailableExportEntities.edges,\n ...fetchMoreResult.getAvailableExportEntities.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: entities,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n error: error ?? null,\n isLoading: loading,\n refetch,\n };\n}\n\n/**\n * Hook to fetch all export templates for the current workspace\n */\nexport function useExportTemplates(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n ListExportTemplatesQuery,\n ListExportTemplatesQueryVariables\n >(ListExportTemplatesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.listExportTemplates;\n const templates =\n connection?.edges.map((edge) => mapTemplate(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 50, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n listExportTemplates: {\n ...fetchMoreResult.listExportTemplates,\n edges: [\n ...previous.listExportTemplates.edges,\n ...fetchMoreResult.listExportTemplates.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: templates,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export template by ID\n */\nexport function useExportTemplate(templateId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error } = useQuery<\n GetExportTemplateQuery,\n GetExportTemplateQueryVariables\n >(GetExportTemplateDocument, {\n variables: { id: templateId ?? \"\", context: { workspaceId } },\n skip: !templateId || !workspaceId,\n });\n\n return {\n data: data?.getExportTemplate ? mapTemplate(data.getExportTemplate) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to fetch a single export part by ID\n */\nexport function useExportPart(partId: string | undefined) {\n const { workspaceId } = useExport();\n const { data, loading, error } = useQuery<\n GetExportPartQuery,\n GetExportPartQueryVariables\n >(GetExportPartDocument, {\n variables: { id: partId ?? \"\", context: { workspaceId } },\n skip: !partId || !workspaceId,\n });\n\n return {\n data: data?.getExportPart ? mapPart(data.getExportPart) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Mutation Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Hook to create a new export job\n */\nexport function useCreateExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportJobMutation,\n CreateExportJobMutationVariables\n >(CreateExportJobDocument);\n\n const createJob = async (input: CreateExportJobInput): Promise<ExportJob> => {\n const { filters, ...restInput } = input;\n const gqlInput: GqlCreateExportJobInput = {\n ...restInput,\n exportScope: restInput.exportScope\n ? toGqlScope(restInput.exportScope)\n : undefined,\n format: toGqlFormat(restInput.format),\n entityFilters: filters,\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportJob\",\n });\n throw new Error(\"Failed to create export job\");\n }\n emitExportEvent(exportContext, \"export.job.created\", {\n jobId: result.data.createExportJob.id,\n });\n return mapJob(result.data.createExportJob);\n };\n\n return {\n createJob,\n // Keep legacy names for existing callers\n mutate: createJob,\n mutateAsync: createJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to cancel an export job\n */\nexport function useCancelExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CancelExportJobMutation,\n CancelExportJobMutationVariables\n >(CancelExportJobDocument);\n\n const cancelJob = async (id: string) => {\n const result = await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"cancelExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to cancel export job\");\n }\n emitExportEvent(exportContext, \"export.job.cancelled\", { jobId: id });\n return result.data.cancelExportJob;\n };\n\n return {\n cancelJob,\n mutate: cancelJob,\n mutateAsync: cancelJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export job\n */\nexport function useDeleteExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportJobMutation,\n DeleteExportJobMutationVariables\n >(DeleteExportJobDocument);\n\n const deleteJob = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.job.deleted\", { jobId: id });\n return true;\n };\n\n return {\n deleteJob,\n mutate: deleteJob,\n mutateAsync: deleteJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to retry a failed export job\n */\nexport function useRetryExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n RetryExportJobMutation,\n RetryExportJobMutationVariables\n >(RetryExportJobDocument);\n\n const retryJob = async (id: string): Promise<ExportJob> => {\n const result = await mutate({\n variables: { id, context: { workspaceId } },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"retryExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to retry export job\");\n }\n emitExportEvent(exportContext, \"export.job.retried\", {\n originalJobId: id,\n jobId: result.data.retryExportJob.id,\n });\n return mapJob(result.data.retryExportJob);\n };\n\n return {\n retryJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to create a new export template\n */\nexport function useCreateExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportTemplateMutation,\n CreateExportTemplateMutationVariables\n >(CreateExportTemplateDocument);\n\n const createTemplate = async (\n input: CreateExportTemplateInput,\n ): Promise<ExportTemplate> => {\n const gqlInput: GqlCreateExportTemplateInput = {\n ...input,\n format: toGqlFormat(input.format),\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportTemplate\",\n });\n throw new Error(\"Failed to create export template\");\n }\n emitExportEvent(exportContext, \"export.template.created\", {\n templateId: result.data.createExportTemplate.id,\n });\n return mapTemplate(result.data.createExportTemplate);\n };\n\n return {\n createTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to update an existing export template\n */\nexport function useUpdateExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n UpdateExportTemplateMutation,\n UpdateExportTemplateMutationVariables\n >(UpdateExportTemplateDocument);\n\n const updateTemplate = async (\n id: string,\n input: UpdateExportTemplateInput,\n ): Promise<Partial<ExportTemplate>> => {\n const gqlInput: GqlUpdateExportTemplateInput = {\n ...input,\n format: input.format ? toGqlFormat(input.format) : undefined,\n };\n\n const result = await mutate({\n variables: { id, input: gqlInput, context: { workspaceId } },\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"updateExportTemplate\",\n templateId: id,\n });\n throw new Error(\"Failed to update export template\");\n }\n emitExportEvent(exportContext, \"export.template.updated\", {\n templateId: id,\n });\n return mapTemplate(result.data.updateExportTemplate);\n };\n\n return {\n updateTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export template\n */\nexport function useDeleteExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportTemplateMutation,\n DeleteExportTemplateMutationVariables\n >(DeleteExportTemplateDocument);\n\n const deleteTemplate = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.template.deleted\", {\n templateId: id,\n });\n return true;\n };\n\n return {\n deleteTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n"],"mappings":";;;;;;AAqJA,SAAS,EAAe,GAA6C;AACnE,QAAO,KAAS,KAAA;;AAGlB,SAAS,EAAe,GAAsD;AAC5E,KAAI,KAAS,KAAM;CACnB,IAAM,IAAS,OAAO,KAAU,WAAW,IAAQ,OAAO,EAAM;AAChE,QAAO,OAAO,SAAS,EAAO,GAAG,IAAS,KAAA;;AAG5C,SAAS,EAAa,GAA0C;AAC9D,QAAO,EAAe,EAAM,IAAI;;AAGlC,SAAS,EACP,GACqC;AACrC,QAAO,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,EAAM,GAC9D,IACA,KAAA;;AAGN,SAAS,EAAY,GAKR;AACX,QAAO;EACL,aAAa,EAAS;EACtB,iBAAiB,EAAS;EAC1B,aAAa,EAAe,EAAS,YAAY;EACjD,WAAW,EAAe,EAAS,UAAU;EAC9C;;AAGH,SAAS,EAAQ,GAAkC;AACjD,QAAO;EACL,IAAI,EAAK;EACT,OAAO,EAAe,EAAK,MAAM;EACjC,YAAY,EAAK;EACjB,UAAU,EAAK;EACf,WAAW,EAAa,EAAK,UAAU;EACvC,aAAa,EAAK;EAClB,aAAa,EAAe,EAAK,YAAY;EAC7C,mBAAmB,EAAe,EAAK,kBAAkB;EACzD,UAAU,EAAe,EAAK,SAAS;EACvC,WAAW,EAAe,EAAK,UAAU;EAC1C;;AAGH,SAAS,EAAO,GAA+B;AAC7C,QAAO;EACL,IAAI,EAAI;EACR,MAAM,EAAI;EACV,aAAa,EAAe,EAAI,YAAY;EAC5C,QAAQ,EAAI;EACZ,UAAU,EAAI;EACd,aAAa,EAAI,c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C/B,QAAO;EACL,gBAjCqB,OACrB,MAC4B;GAC5B,IAAM,IAAyC;IAC7C,GAAG;IACH,QAAQ,EAAY,EAAM,OAAO;IAClC,EAEK,IAAS,MAAM,EAAO;IAC1B,WAAW;KACT,SAAS,EAAE,gBAAa;KACxB,OAAO;KACR;IACD,gBAAgB,CACd;KACE,OAAO;KACP,WAAW,EAAE,SAAS,EAAE,gBAAa,EAAE;KACxC,CACF;IACF,CAAC;AACF,OAAI,CAAC,EAAO,KAIV,OAHA,EAAgB,GAAe,qBAAqB,EAClD,WAAW,wBACZ,CAAC,EACQ,MAAM,mCAAmC;AAKrD,UAHA,EAAgB,GAAe,2BAA2B,EACxD,YAAY,EAAO,KAAK,qBAAqB,IAC9C,CAAC,EACK,EAAY,EAAO,KAAK,qBAAqB;;EAKpD;EACA,WAAW;EACX,OAAO,KAAS;EACjB;;AAkDH,SAAgB,IAA0B;CACxC,IAAM,IAAgB,GAAW,EAC3B,EAAE,mBAAgB,GAClB,CAAC,GAAQ,EAAE,YAAS,cAAW,EAGnC,EAA6B;AAqB/B,QAAO;EACL,gBApBqB,OAAO,OAC5B,MAAM,EAAO;GACX,WAAW;IACT;IACA,SAAS,EAAE,gBAAa;IACzB;GACD,gBAAgB,CACd;IACE,OAAO;IACP,WAAW,EAAE,SAAS,EAAE,gBAAa,EAAE;IACxC,CACF;GACF,CAAC,EACF,EAAgB,GAAe,2BAA2B,EACxD,YAAY,GACb,CAAC,EACK;EAKP;EACA,WAAW;EACX,OAAO,KAAS;EACjB"}
1
+ {"version":3,"file":"useExportQueries.js","names":[],"sources":["../../../src/export/hooks/useExportQueries.ts"],"sourcesContent":["/**\n * Export Query Hooks\n *\n * Real Apollo Client hooks for all export operations.\n * Keep these documents in sync with src/operations/wspace/export/*.graphql.\n */\n\nimport { useMutation, useQuery, useSubscription } from \"@apollo/client/react\";\nimport {\n CancelExportJobDocument,\n CreateExportJobDocument,\n CreateExportTemplateDocument,\n DeleteExportJobDocument,\n DeleteExportTemplateDocument,\n ExportJobProgressDocument,\n GetAvailableExportEntitiesDocument,\n GetExportJobDocument,\n GetExportTemplateDocument,\n ListExportJobsDocument,\n ListExportTemplatesDocument,\n RetryExportJobDocument,\n type CancelExportJobMutation,\n type CancelExportJobMutationVariables,\n type CreateExportJobMutation,\n type CreateExportJobMutationVariables,\n type CreateExportTemplateMutation,\n type CreateExportTemplateMutationVariables,\n type DeleteExportJobMutation,\n type DeleteExportJobMutationVariables,\n type DeleteExportTemplateMutation,\n type DeleteExportTemplateMutationVariables,\n type ExportJobProgressSubscription,\n type ExportJobProgressSubscriptionVariables,\n type GetAvailableExportEntitiesQuery,\n type GetAvailableExportEntitiesQueryVariables,\n type GetExportJobQuery,\n type GetExportJobQueryVariables,\n type GetExportTemplateQuery,\n type GetExportTemplateQueryVariables,\n type ListExportJobsQuery,\n type ListExportJobsQueryVariables,\n type ListExportTemplatesQuery,\n type ListExportTemplatesQueryVariables,\n type RetryExportJobMutation,\n type RetryExportJobMutationVariables,\n} from \"../../generated/wspace-operations\";\nimport {\n ExportFormat as GqlExportFormat,\n ExportJobStatus as GqlExportJobStatus,\n ExportScope as GqlExportScope,\n type CreateExportJobInput as GqlCreateExportJobInput,\n type CreateExportTemplateInput as GqlCreateExportTemplateInput,\n type ExportJobFilterInput as GqlExportJobFilterInput,\n type ExportPaginationInput as GqlExportPaginationInput,\n} from \"../../generated/wspace-types\";\nimport { useExport } from \"../providers/ExportProvider\";\nimport { emitExportEvent } from \"../utils/events\";\nimport type {\n ExportArchiveFormat,\n ExportFormat,\n ExportJob,\n ExportJobStatus,\n ExportScope,\n ExportTemplate,\n ExportAvailableEntity,\n ExportPart,\n ExportFilter,\n PageInfo,\n} from \"../types\";\n\n// ---------------------------------------------------------------------------\n// Mapping helpers\n// ---------------------------------------------------------------------------\n\ntype Nullable<T> = T | null | undefined;\n\ninterface ExportPartLike {\n id: string;\n jobId?: Nullable<string>;\n partNumber: number;\n fileName: string;\n sizeBytes: number | string;\n entityTypes: string[];\n downloadUrl?: Nullable<string>;\n downloadExpiresAt?: Nullable<string>;\n checksum?: Nullable<string>;\n createdAt?: Nullable<string>;\n}\n\ninterface ExportJobLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n status: string;\n progress: number;\n exportScope?: Nullable<string>;\n organizationId?: Nullable<string>;\n targetWorkspaceIds?: Nullable<string[]>;\n entityTypes: string[];\n format: string;\n archiveFormat?: Nullable<string>;\n totalEntities?: Nullable<number>;\n processedEntities?: Nullable<number>;\n totalSizeBytes?: Nullable<number | string>;\n parts?: Nullable<ExportPartLike[]>;\n templateId?: Nullable<string>;\n entityFilters?: Nullable<Record<string, unknown>>;\n errorMessage?: Nullable<string>;\n startedAt?: Nullable<string>;\n completedAt?: Nullable<string>;\n expiresAt?: Nullable<string>;\n createdBy: string;\n temporalWorkflowId?: Nullable<string>;\n workspaceId?: Nullable<string>;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportTemplateLike {\n id: string;\n name: string;\n description?: Nullable<string>;\n entityTypes: string[];\n format: string;\n entityFilters?: Nullable<Record<string, unknown>>;\n isDefault: boolean;\n workspaceId?: Nullable<string>;\n createdBy: string;\n createdAt: string;\n updatedAt: string;\n}\n\ninterface ExportAvailableEntityLike {\n entityType: string;\n displayName: string;\n description?: Nullable<string>;\n estimatedSize?: Nullable<string>;\n supportsDateRange: boolean;\n supportsMediaExport: boolean;\n enabled: boolean;\n}\n\nfunction optionalString(value: Nullable<string>): string | undefined {\n return value ?? undefined;\n}\n\nfunction optionalNumber(value: Nullable<number | string>): number | undefined {\n if (value == null) return undefined;\n const parsed = typeof value === \"number\" ? value : Number(value);\n return Number.isFinite(parsed) ? parsed : undefined;\n}\n\nfunction numberOrZero(value: Nullable<number | string>): number {\n return optionalNumber(value) ?? 0;\n}\n\nfunction optionalRecord(\n value: Nullable<Record<string, unknown>>,\n): Record<string, unknown> | undefined {\n return value && typeof value === \"object\" && !Array.isArray(value)\n ? value\n : undefined;\n}\n\nfunction mapPageInfo(pageInfo: {\n hasNextPage: boolean;\n hasPreviousPage: boolean;\n startCursor?: Nullable<string>;\n endCursor?: Nullable<string>;\n}): PageInfo {\n return {\n hasNextPage: pageInfo.hasNextPage,\n hasPreviousPage: pageInfo.hasPreviousPage,\n startCursor: optionalString(pageInfo.startCursor),\n endCursor: optionalString(pageInfo.endCursor),\n };\n}\n\nfunction mapPart(part: ExportPartLike): ExportPart {\n return {\n id: part.id,\n jobId: optionalString(part.jobId),\n partNumber: part.partNumber,\n fileName: part.fileName,\n sizeBytes: numberOrZero(part.sizeBytes),\n entityTypes: part.entityTypes,\n downloadUrl: optionalString(part.downloadUrl),\n downloadExpiresAt: optionalString(part.downloadExpiresAt),\n checksum: optionalString(part.checksum),\n createdAt: optionalString(part.createdAt),\n };\n}\n\nfunction mapJob(job: ExportJobLike): ExportJob {\n return {\n id: job.id,\n name: job.name,\n description: optionalString(job.description),\n status: job.status as ExportJobStatus,\n progress: job.progress,\n exportScope: job.exportScope ? (job.exportScope as ExportScope) : undefined,\n organizationId: optionalString(job.organizationId),\n targetWorkspaceIds: job.targetWorkspaceIds ?? undefined,\n entityTypes: job.entityTypes,\n format: job.format as ExportFormat,\n archiveFormat: (job.archiveFormat ?? \"ZIP\") as ExportArchiveFormat,\n totalEntities: optionalNumber(job.totalEntities),\n processedEntities: optionalNumber(job.processedEntities),\n totalSizeBytes: optionalNumber(job.totalSizeBytes),\n parts: job.parts?.map(mapPart) ?? [],\n templateId: optionalString(job.templateId),\n filters: optionalRecord(job.entityFilters),\n errorMessage: optionalString(job.errorMessage),\n startedAt: optionalString(job.startedAt),\n completedAt: optionalString(job.completedAt),\n expiresAt: optionalString(job.expiresAt),\n createdBy: job.createdBy,\n temporalWorkflowId: optionalString(job.temporalWorkflowId),\n workspaceId: optionalString(job.workspaceId),\n createdAt: job.createdAt,\n updatedAt: job.updatedAt,\n };\n}\n\nfunction mapTemplate(template: ExportTemplateLike): ExportTemplate {\n return {\n id: template.id,\n name: template.name,\n description: optionalString(template.description),\n entityTypes: template.entityTypes,\n format: template.format as ExportFormat,\n filters: optionalRecord(template.entityFilters),\n isDefault: template.isDefault,\n createdBy: template.createdBy,\n workspaceId: optionalString(template.workspaceId),\n createdAt: template.createdAt,\n updatedAt: template.updatedAt,\n };\n}\n\nfunction mapAvailableEntity(\n entity: ExportAvailableEntityLike,\n): ExportAvailableEntity {\n return {\n entityType: entity.entityType,\n displayName: entity.displayName,\n description: optionalString(entity.description),\n estimatedSize: optionalString(entity.estimatedSize),\n supportsDateRange: entity.supportsDateRange,\n supportsMediaExport: entity.supportsMediaExport,\n enabled: entity.enabled,\n };\n}\n\nfunction toGqlFormat(format: ExportFormat | string): GqlExportFormat {\n if (format === \"CSV\") return GqlExportFormat.Csv;\n if (format === \"JSON\") return GqlExportFormat.Json;\n throw new Error(`Unsupported export format: ${format}`);\n}\n\nfunction toGqlStatus(status: ExportJobStatus | string): GqlExportJobStatus {\n switch (status) {\n case \"CANCELLED\":\n return GqlExportJobStatus.Cancelled;\n case \"COMPLETED\":\n return GqlExportJobStatus.Completed;\n case \"CREATED\":\n return GqlExportJobStatus.Created;\n case \"DELETED\":\n return GqlExportJobStatus.Deleted;\n case \"EXPIRED\":\n return GqlExportJobStatus.Expired;\n case \"FAILED\":\n return GqlExportJobStatus.Failed;\n case \"QUEUED\":\n return GqlExportJobStatus.Queued;\n case \"RUNNING\":\n return GqlExportJobStatus.Running;\n default:\n throw new Error(`Unsupported export status: ${status}`);\n }\n}\n\nfunction toGqlScope(scope: ExportScope | string): GqlExportScope {\n switch (scope) {\n case \"INDIVIDUAL\":\n return GqlExportScope.Individual;\n case \"WORKSPACE_ADMIN\":\n return GqlExportScope.WorkspaceAdmin;\n case \"ORG_ADMIN\":\n return GqlExportScope.OrgAdmin;\n default:\n throw new Error(`Unsupported export scope: ${scope}`);\n }\n}\n\n// ---------------------------------------------------------------------------\n// Query Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Input for creating an export job\n */\nexport interface CreateExportJobInput {\n name: string;\n description?: string;\n exportScope?: ExportScope;\n organizationId?: string;\n entityTypes: string[];\n format: ExportFormat;\n filters?: Record<string, unknown>;\n templateId?: string;\n dateRangeStart?: string | null;\n dateRangeEnd?: string | null;\n}\n\n/**\n * Input for creating an export template\n */\nexport interface CreateExportTemplateInput {\n name: string;\n description?: string;\n entityTypes: string[];\n format: ExportFormat;\n}\n\n/**\n * Filter input for listing export jobs\n */\nexport interface ExportJobFilterInput {\n status?: ExportJobStatus[];\n format?: ExportFormat;\n entityTypes?: string[];\n search?: string;\n dateFrom?: string;\n dateTo?: string;\n}\n\n/**\n * Pagination input for export job list\n */\nexport interface ExportPaginationInput {\n first?: number;\n after?: string;\n last?: number;\n before?: string;\n}\n\n/**\n * Hook to fetch a paginated list of export jobs\n */\nexport function useExportJobs(\n filter?: Partial<ExportFilter>,\n pagination?: ExportPaginationInput,\n) {\n const { workspaceId } = useExport();\n\n // Build the backend filter from the UI filter shape\n const backendFilter: GqlExportJobFilterInput | undefined =\n filter && workspaceId\n ? {\n status:\n filter.status && filter.status !== \"all\"\n ? [toGqlStatus(filter.status)]\n : undefined,\n format:\n filter.format && filter.format !== \"all\"\n ? toGqlFormat(filter.format)\n : undefined,\n search: filter.search ?? undefined,\n }\n : undefined;\n\n const { data, loading, error, refetch } = useQuery<\n ListExportJobsQuery,\n ListExportJobsQueryVariables\n >(ListExportJobsDocument, {\n variables: {\n filter: backendFilter,\n pagination: pagination as GqlExportPaginationInput | undefined,\n context: { workspaceId },\n },\n skip: !workspaceId,\n });\n\n const jobs = data?.listExportJobs.edges.map((e) => mapJob(e.node)) ?? [];\n const totalCount = data?.listExportJobs.totalCount ?? 0;\n const pageInfo = data?.listExportJobs.pageInfo\n ? mapPageInfo(data.listExportJobs.pageInfo)\n : null;\n\n return {\n data: jobs,\n totalCount,\n pageInfo,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export job by ID.\n */\nexport function useExportJob(jobId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error, refetch } = useQuery<\n GetExportJobQuery,\n GetExportJobQueryVariables\n >(GetExportJobDocument, {\n variables: { id: jobId ?? \"\", context: { workspaceId } },\n skip: !jobId || !workspaceId,\n });\n\n const job = data?.getExportJob ? mapJob(data.getExportJob) : null;\n\n return {\n data: job,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to subscribe to live progress updates for an export job.\n */\nexport function useExportJobProgress(jobId: string | undefined) {\n const { data, loading, error } = useSubscription<\n ExportJobProgressSubscription,\n ExportJobProgressSubscriptionVariables\n >(ExportJobProgressDocument, {\n variables: { jobId: jobId ?? \"\" },\n skip: !jobId,\n });\n\n return {\n data: data?.exportJobProgress ? mapJob(data.exportJobProgress) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to fetch available entity types for export in a workspace\n */\nexport function useAvailableEntities(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n GetAvailableExportEntitiesQuery,\n GetAvailableExportEntitiesQueryVariables\n >(GetAvailableExportEntitiesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 100 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.getAvailableExportEntities;\n const entities =\n connection?.edges.map((edge) => mapAvailableEntity(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 100, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n getAvailableExportEntities: {\n ...fetchMoreResult.getAvailableExportEntities,\n edges: [\n ...previous.getAvailableExportEntities.edges,\n ...fetchMoreResult.getAvailableExportEntities.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: entities,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n error: error ?? null,\n isLoading: loading,\n refetch,\n };\n}\n\n/**\n * Hook to fetch all export templates for the current workspace\n */\nexport function useExportTemplates(overrideWorkspaceId?: string) {\n const { workspaceId: ctxWorkspaceId } = useExport();\n const workspaceId = overrideWorkspaceId ?? ctxWorkspaceId;\n\n const { data, loading, error, refetch, fetchMore } = useQuery<\n ListExportTemplatesQuery,\n ListExportTemplatesQueryVariables\n >(ListExportTemplatesDocument, {\n variables: {\n context: { workspaceId },\n pagination: { first: 50 },\n },\n skip: !workspaceId,\n });\n\n const connection = data?.listExportTemplates;\n const templates =\n connection?.edges.map((edge) => mapTemplate(edge.node)) ?? [];\n\n const loadMore = async () => {\n if (!workspaceId || !connection?.pageInfo.hasNextPage) return;\n await fetchMore({\n variables: {\n context: { workspaceId },\n pagination: { first: 50, after: connection.pageInfo.endCursor },\n },\n updateQuery: (previous, { fetchMoreResult }) => {\n if (!fetchMoreResult) return previous;\n return {\n listExportTemplates: {\n ...fetchMoreResult.listExportTemplates,\n edges: [\n ...previous.listExportTemplates.edges,\n ...fetchMoreResult.listExportTemplates.edges,\n ],\n },\n };\n },\n });\n };\n\n return {\n data: templates,\n totalCount: connection?.totalCount ?? 0,\n pageInfo: connection?.pageInfo ? mapPageInfo(connection.pageInfo) : null,\n loadMore,\n isLoading: loading,\n error: error ?? null,\n refetch,\n };\n}\n\n/**\n * Hook to fetch a single export template by ID\n */\nexport function useExportTemplate(templateId: string | undefined) {\n const { workspaceId } = useExport();\n\n const { data, loading, error } = useQuery<\n GetExportTemplateQuery,\n GetExportTemplateQueryVariables\n >(GetExportTemplateDocument, {\n variables: { id: templateId ?? \"\", context: { workspaceId } },\n skip: !templateId || !workspaceId,\n });\n\n return {\n data: data?.getExportTemplate ? mapTemplate(data.getExportTemplate) : null,\n isLoading: loading,\n error: error ?? null,\n };\n}\n\n// ---------------------------------------------------------------------------\n// Mutation Hooks\n// ---------------------------------------------------------------------------\n\n/**\n * Hook to create a new export job\n */\nexport function useCreateExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportJobMutation,\n CreateExportJobMutationVariables\n >(CreateExportJobDocument);\n\n const createJob = async (input: CreateExportJobInput): Promise<ExportJob> => {\n const { filters, ...restInput } = input;\n const gqlInput: GqlCreateExportJobInput = {\n ...restInput,\n exportScope: restInput.exportScope\n ? toGqlScope(restInput.exportScope)\n : undefined,\n format: toGqlFormat(restInput.format),\n entityFilters: filters,\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportJob\",\n });\n throw new Error(\"Failed to create export job\");\n }\n emitExportEvent(exportContext, \"export.job.created\", {\n jobId: result.data.createExportJob.id,\n });\n return mapJob(result.data.createExportJob);\n };\n\n return {\n createJob,\n // Keep legacy names for existing callers\n mutate: createJob,\n mutateAsync: createJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to cancel an export job\n */\nexport function useCancelExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CancelExportJobMutation,\n CancelExportJobMutationVariables\n >(CancelExportJobDocument);\n\n const cancelJob = async (id: string) => {\n const result = await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"cancelExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to cancel export job\");\n }\n emitExportEvent(exportContext, \"export.job.cancelled\", { jobId: id });\n return result.data.cancelExportJob;\n };\n\n return {\n cancelJob,\n mutate: cancelJob,\n mutateAsync: cancelJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export job\n */\nexport function useDeleteExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportJobMutation,\n DeleteExportJobMutationVariables\n >(DeleteExportJobDocument);\n\n const deleteJob = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.job.deleted\", { jobId: id });\n return true;\n };\n\n return {\n deleteJob,\n mutate: deleteJob,\n mutateAsync: deleteJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to retry a failed export job\n */\nexport function useRetryExportJob() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n RetryExportJobMutation,\n RetryExportJobMutationVariables\n >(RetryExportJobDocument);\n\n const retryJob = async (id: string): Promise<ExportJob> => {\n const result = await mutate({\n variables: { id, context: { workspaceId } },\n refetchQueries: [\n {\n query: ListExportJobsDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"retryExportJob\",\n jobId: id,\n });\n throw new Error(\"Failed to retry export job\");\n }\n emitExportEvent(exportContext, \"export.job.retried\", {\n originalJobId: id,\n jobId: result.data.retryExportJob.id,\n });\n return mapJob(result.data.retryExportJob);\n };\n\n return {\n retryJob,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to create a new export template\n */\nexport function useCreateExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n CreateExportTemplateMutation,\n CreateExportTemplateMutationVariables\n >(CreateExportTemplateDocument);\n\n const createTemplate = async (\n input: CreateExportTemplateInput,\n ): Promise<ExportTemplate> => {\n const gqlInput: GqlCreateExportTemplateInput = {\n ...input,\n format: toGqlFormat(input.format),\n };\n\n const result = await mutate({\n variables: {\n context: { workspaceId },\n input: gqlInput,\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n if (!result.data) {\n emitExportEvent(exportContext, \"export.api.failed\", {\n operation: \"createExportTemplate\",\n });\n throw new Error(\"Failed to create export template\");\n }\n emitExportEvent(exportContext, \"export.template.created\", {\n templateId: result.data.createExportTemplate.id,\n });\n return mapTemplate(result.data.createExportTemplate);\n };\n\n return {\n createTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n\n/**\n * Hook to delete an export template\n */\nexport function useDeleteExportTemplate() {\n const exportContext = useExport();\n const { workspaceId } = exportContext;\n const [mutate, { loading, error }] = useMutation<\n DeleteExportTemplateMutation,\n DeleteExportTemplateMutationVariables\n >(DeleteExportTemplateDocument);\n\n const deleteTemplate = async (id: string): Promise<boolean> => {\n await mutate({\n variables: {\n id,\n context: { workspaceId },\n },\n refetchQueries: [\n {\n query: ListExportTemplatesDocument,\n variables: { context: { workspaceId } },\n },\n ],\n });\n emitExportEvent(exportContext, \"export.template.deleted\", {\n templateId: id,\n });\n return true;\n };\n\n return {\n deleteTemplate,\n loading,\n isPending: loading,\n error: error ?? null,\n };\n}\n"],"mappings":";;;;;;AA8IA,SAAS,EAAe,GAA6C;AACnE,QAAO,KAAS,KAAA;;AAGlB,SAAS,EAAe,GAAsD;AAC5E,KAAI,KAAS,KAAM;CACnB,IAAM,IAAS,OAAO,KAAU,WAAW,IAAQ,OAAO,EAAM;AAChE,QAAO,OAAO,SAAS,EAAO,GAAG,IAAS,KAAA;;AAG5C,SAAS,EAAa,GAA0C;AAC9D,QAAO,EAAe,EAAM,IAAI;;AAGlC,SAAS,EACP,GACqC;AACrC,QAAO,KAAS,OAAO,KAAU,YAAY,CAAC,MAAM,QAAQ,EAAM,GAC9D,IACA,KAAA;;AAGN,SAA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