@burdenoff/microfe-export 2026.1120.1 → 2026.1124.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.
Files changed (60) hide show
  1. package/dist/export/ExportRoutes.js +23 -22
  2. package/dist/export/ExportRoutes.js.map +1 -1
  3. package/dist/export/hooks/useExportQueries.d.ts +89 -1
  4. package/dist/export/hooks/useExportQueries.js +167 -127
  5. package/dist/export/hooks/useExportQueries.js.map +1 -1
  6. package/dist/export/workspace-v2/DownloadCells.d.ts +29 -0
  7. package/dist/export/workspace-v2/DownloadCells.js +105 -0
  8. package/dist/export/workspace-v2/DownloadCells.js.map +1 -0
  9. package/dist/export/workspace-v2/DownloadsList.d.ts +13 -0
  10. package/dist/export/workspace-v2/DownloadsList.js +208 -0
  11. package/dist/export/workspace-v2/DownloadsList.js.map +1 -0
  12. package/dist/export/workspace-v2/DownloadsPage.d.ts +1 -0
  13. package/dist/export/workspace-v2/DownloadsPage.js +114 -0
  14. package/dist/export/workspace-v2/DownloadsPage.js.map +1 -0
  15. package/dist/export/workspace-v2/ExportV2Routes.d.ts +1 -0
  16. package/dist/export/workspace-v2/ExportV2Routes.js +68 -0
  17. package/dist/export/workspace-v2/ExportV2Routes.js.map +1 -0
  18. package/dist/export/workspace-v2/NewDownloadDialog.d.ts +10 -0
  19. package/dist/export/workspace-v2/NewDownloadDialog.js +432 -0
  20. package/dist/export/workspace-v2/NewDownloadDialog.js.map +1 -0
  21. package/dist/export/workspace-v2/SetupsList.d.ts +13 -0
  22. package/dist/export/workspace-v2/SetupsList.js +132 -0
  23. package/dist/export/workspace-v2/SetupsList.js.map +1 -0
  24. package/dist/export/workspace-v2/downloadsModel.d.ts +108 -0
  25. package/dist/export/workspace-v2/downloadsModel.js +138 -0
  26. package/dist/export/workspace-v2/downloadsModel.js.map +1 -0
  27. package/dist/export/workspace-v2/newDownloadModel.d.ts +48 -0
  28. package/dist/export/workspace-v2/newDownloadModel.js +76 -0
  29. package/dist/export/workspace-v2/newDownloadModel.js.map +1 -0
  30. package/dist/export/workspace-v2/useDownloadActions.d.ts +20 -0
  31. package/dist/export/workspace-v2/useDownloadActions.js +127 -0
  32. package/dist/export/workspace-v2/useDownloadActions.js.map +1 -0
  33. package/dist/export/workspace-v2/useDownloadsData.d.ts +57 -0
  34. package/dist/export/workspace-v2/useDownloadsData.js +186 -0
  35. package/dist/export/workspace-v2/useDownloadsData.js.map +1 -0
  36. package/dist/export/workspace-v2/useDownloadsPage.d.ts +22 -0
  37. package/dist/export/workspace-v2/useDownloadsPage.js +45 -0
  38. package/dist/export/workspace-v2/useDownloadsPage.js.map +1 -0
  39. package/dist/export/workspace-v2/useExportAccess.d.ts +21 -0
  40. package/dist/export/workspace-v2/useExportAccess.js +16 -0
  41. package/dist/export/workspace-v2/useExportAccess.js.map +1 -0
  42. package/dist/export/workspace-v2/useListClock.d.ts +4 -0
  43. package/dist/export/workspace-v2/useListClock.js +20 -0
  44. package/dist/export/workspace-v2/useListClock.js.map +1 -0
  45. package/dist/export/workspace-v2/useOfferedKinds.d.ts +19 -0
  46. package/dist/export/workspace-v2/useOfferedKinds.js +30 -0
  47. package/dist/export/workspace-v2/useOfferedKinds.js.map +1 -0
  48. package/dist/export/workspace-v2/useOnceAtATime.d.ts +7 -0
  49. package/dist/export/workspace-v2/useOnceAtATime.js +17 -0
  50. package/dist/export/workspace-v2/useOnceAtATime.js.map +1 -0
  51. package/dist/generated/global-types.d.ts +9901 -584
  52. package/dist/generated/wspace-operations.js +9 -11
  53. package/dist/generated/wspace-operations.js.map +1 -1
  54. package/dist/generated/wspace-types.d.ts +195315 -42067
  55. package/dist/generated/wspace-types.js +5 -1
  56. package/dist/generated/wspace-types.js.map +1 -1
  57. package/dist/translations/en.d.ts +190 -0
  58. package/dist/translations/en.js +191 -1
  59. package/dist/translations/en.js.map +1 -1
  60. package/package.json +11 -3
@@ -7,15 +7,16 @@ import { AlertTriangle as s, Loader2 as c, RefreshCw as l } from "lucide-react";
7
7
  import { FeatureGate as u } from "@burdenoff/fe-libs/shared/feature-flags";
8
8
  import { Navigate as d, Route as f, Routes as p, useSearchParams as m } from "react-router";
9
9
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
10
+ import { useWorkspacePagesV2 as _ } from "@burdenoff/fe-libs/ui";
10
11
  // src/export/ExportRoutes.tsx
11
- var _ = o(() => import("./pages/CreateExportPage.js").then((e) => ({ default: e.CreateExportPage }))), v = o(() => import("./pages/ExportHistoryPage.js").then((e) => ({ default: e.ExportHistoryPage }))), y = o(() => import("./pages/ExportDetailPage.js").then((e) => ({ default: e.ExportDetailPage }))), b = o(() => import("./pages/ExportTemplatesPage.js").then((e) => ({ default: e.ExportTemplatesPage }))), x = o(() => import("./pages/v2/DownloadsPage.js").then((e) => ({ default: e.DownloadsPage }))), S = o(() => import("./pages/v2/NewDownloadPage.js").then((e) => ({ default: e.NewDownloadPage }))), C = o(() => import("./pages/v2/DownloadDetailPage.js").then((e) => ({ default: e.DownloadDetailPage }))), w = o(() => import("./pages/TemplateDetailPage.js").then((e) => ({ default: e.TemplateDetailPage })));
12
- function T() {
12
+ var v = o(() => import("./pages/CreateExportPage.js").then((e) => ({ default: e.CreateExportPage }))), y = o(() => import("./pages/ExportHistoryPage.js").then((e) => ({ default: e.ExportHistoryPage }))), b = o(() => import("./pages/ExportDetailPage.js").then((e) => ({ default: e.ExportDetailPage }))), x = o(() => import("./pages/ExportTemplatesPage.js").then((e) => ({ default: e.ExportTemplatesPage }))), S = o(() => import("./pages/v2/DownloadsPage.js").then((e) => ({ default: e.DownloadsPage }))), C = o(() => import("./pages/v2/NewDownloadPage.js").then((e) => ({ default: e.NewDownloadPage }))), w = o(() => import("./pages/v2/DownloadDetailPage.js").then((e) => ({ default: e.DownloadDetailPage }))), T = o(() => import("./pages/TemplateDetailPage.js").then((e) => ({ default: e.TemplateDetailPage }))), E = o(() => import("./workspace-v2/ExportV2Routes.js").then((e) => ({ default: e.ExportV2Routes })));
13
+ function D() {
13
14
  return /* @__PURE__ */ h("div", {
14
15
  className: "flex items-center justify-center min-h-[400px]",
15
16
  children: /* @__PURE__ */ h(c, { className: "size-8 animate-spin text-primary" })
16
17
  });
17
18
  }
18
- function E({ error: t, onRetry: n }) {
19
+ function O({ error: t, onRetry: n }) {
19
20
  let r = e();
20
21
  return /* @__PURE__ */ g("div", {
21
22
  className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
@@ -43,7 +44,7 @@ function E({ error: t, onRetry: n }) {
43
44
  ]
44
45
  });
45
46
  }
46
- var D = class extends i {
47
+ var k = class extends i {
47
48
  constructor(e) {
48
49
  super(e), this.state = {
49
50
  hasError: !1,
@@ -66,13 +67,13 @@ var D = class extends i {
66
67
  });
67
68
  };
68
69
  render() {
69
- return this.state.hasError ? /* @__PURE__ */ h(E, {
70
+ return this.state.hasError ? /* @__PURE__ */ h(O, {
70
71
  error: this.state.error,
71
72
  onRetry: this.handleRetry
72
73
  }) : this.props.children;
73
74
  }
74
75
  };
75
- function O() {
76
+ function A() {
76
77
  let t = e();
77
78
  return /* @__PURE__ */ g("div", {
78
79
  className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
@@ -102,7 +103,7 @@ function O() {
102
103
  })]
103
104
  });
104
105
  }
105
- function k() {
106
+ function j() {
106
107
  let [e] = m(), t = e.get("tab");
107
108
  if (t === "templates" || t === "new") {
108
109
  let n = new URLSearchParams(e);
@@ -116,45 +117,45 @@ function k() {
116
117
  replace: !0
117
118
  });
118
119
  }
119
- return /* @__PURE__ */ h(x, {});
120
+ return /* @__PURE__ */ h(S, {});
120
121
  }
121
- function A() {
122
- let e = n(), { basePath: i = "/" } = t();
123
- return /* @__PURE__ */ h(D, { children: /* @__PURE__ */ h(u, {
122
+ function M() {
123
+ let e = n(), i = _(), { basePath: o = "/" } = t();
124
+ return /* @__PURE__ */ h(k, { children: /* @__PURE__ */ h(u, {
124
125
  flag: "workspaces.export",
125
126
  defaultValue: !0,
126
- fallback: /* @__PURE__ */ h(O, {}),
127
+ fallback: /* @__PURE__ */ h(A, {}),
127
128
  children: /* @__PURE__ */ h(a, {
128
- fallback: /* @__PURE__ */ h(T, {}),
129
- children: /* @__PURE__ */ g(p, { children: [
129
+ fallback: /* @__PURE__ */ h(D, {}),
130
+ children: i ? /* @__PURE__ */ h(E, {}) : /* @__PURE__ */ g(p, { children: [
130
131
  /* @__PURE__ */ h(f, {
131
132
  index: !0,
132
- element: h(e ? k : r, {})
133
+ element: h(e ? j : r, {})
133
134
  }),
134
135
  /* @__PURE__ */ h(f, {
135
136
  path: "new",
136
- element: h(e ? S : _, {})
137
+ element: h(e ? C : v, {})
137
138
  }),
138
139
  /* @__PURE__ */ h(f, {
139
140
  path: "history",
140
- element: h(e ? x : v, {})
141
+ element: h(e ? S : y, {})
141
142
  }),
142
143
  /* @__PURE__ */ h(f, {
143
144
  path: ":jobId",
144
- element: h(e ? C : y, {})
145
+ element: h(e ? w : b, {})
145
146
  }),
146
147
  /* @__PURE__ */ h(f, {
147
148
  path: "templates",
148
- element: /* @__PURE__ */ h(b, {})
149
+ element: /* @__PURE__ */ h(x, {})
149
150
  }),
150
151
  /* @__PURE__ */ h(f, {
151
152
  path: "templates/:templateId",
152
- element: /* @__PURE__ */ h(w, {})
153
+ element: /* @__PURE__ */ h(T, {})
153
154
  }),
154
155
  /* @__PURE__ */ h(f, {
155
156
  path: "*",
156
157
  element: /* @__PURE__ */ h(d, {
157
- to: i,
158
+ to: o,
158
159
  replace: !0
159
160
  })
160
161
  })
@@ -162,6 +163,6 @@ function A() {
162
163
  })
163
164
  }) });
164
165
  }
165
- export { A as ExportRoutes, k as V2Landing };
166
+ export { M as ExportRoutes, j as V2Landing };
166
167
 
167
168
  //# sourceMappingURL=ExportRoutes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExportRoutes.js","names":["CreateExportPage","lazy","m","ExportHistoryPage","ExportDetailPage","ExportTemplatesPage","DownloadsPage","NewDownloadPage","DownloadDetailPage","TemplateDetailPage","PageLoader","Loader2","LazyErrorFallback","tr","useTr","AlertTriangle","error","onRetry","RefreshCw","LazyErrorBoundary","Component","props","errorInfo","ExportDisabledFallback","V2Landing","params","useSearchParams","tab","rest","search","Navigate","ExportRoutes","navigationV2","useNavigationV2","useExport","FeatureGate","Suspense","Routes","Route","jsx","ExportLandingPage","basePath"],"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, useSearchParams } from \"react-router\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\nimport { useTr } from \"./hooks/useTr\";\nimport { useExport } from \"./providers/ExportProvider\";\nimport { useNavigationV2 } from \"./navigation-v2/NavigationV2\";\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 DownloadsPage = lazy(() =>\n import(\"./pages/v2/DownloadsPage\").then((m) => ({\n default: m.DownloadsPage,\n })),\n);\nconst NewDownloadPage = lazy(() =>\n import(\"./pages/v2/NewDownloadPage\").then((m) => ({\n default: m.NewDownloadPage,\n })),\n);\nconst DownloadDetailPage = lazy(() =>\n import(\"./pages/v2/DownloadDetailPage\").then((m) => ({\n default: m.DownloadDetailPage,\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 * Translated error UI rendered by LazyErrorBoundary.\n * Extracted as a function component so it can use the `useTr` hook.\n */\nfunction LazyErrorFallback({\n error,\n onRetry,\n}: {\n error: Error | null;\n onRetry: () => void;\n}) {\n const tr = useTr();\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-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">\n {tr(\"export.routes.error.title\", \"Failed to load page\")}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {error?.message ||\n tr(\n \"export.routes.error.description\",\n \"The page chunk could not be loaded. This may be due to a network issue.\",\n )}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n {tr(\"export.routes.error.retry\", \"Try Again\")}\n </button>\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 override 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 override render() {\n if (this.state.hasError) {\n return (\n <LazyErrorFallback\n error={this.state.error}\n onRetry={this.handleRetry}\n />\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 const tr = useTr();\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-bg-sunken\">\n <svg\n className=\"size-8 text-text-secondary\"\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-text-primary\">\n {tr(\"export.routes.disabled.title\", \"Data Export Unavailable\")}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {tr(\n \"export.routes.disabled.description\",\n \"The Data Export feature is currently disabled for this workspace. Contact your administrator to enable it.\",\n )}\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 */\n/**\n * Navigation v2 landing (BOFF-11870): the old tab bar is gone, and every old\n * `?tab=` value opens its page. `dashboard` and `history` are the one list;\n * `templates` and the hidden `new` redirect, keeping the rest of the query\n * (`?templateId=`, `?status=`).\n */\nexport function V2Landing() {\n const [params] = useSearchParams();\n const tab = params.get(\"tab\");\n if (tab === \"templates\" || tab === \"new\") {\n const rest = new URLSearchParams(params);\n rest.delete(\"tab\");\n const search = rest.toString();\n return (\n <Navigate\n to={{ pathname: tab, search: search ? `?${search}` : \"\" }}\n replace\n />\n );\n }\n return <DownloadsPage />;\n}\n\nexport function ExportRoutes() {\n const navigationV2 = useNavigationV2();\n const { basePath = \"/\" } = useExport();\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). Navigation v2:\n one \"Download your data\" list, old ?tab= values still work. */}\n <Route\n index\n element={navigationV2 ? <V2Landing /> : <ExportLandingPage />}\n />\n\n {/* Create new export (lazy loaded) */}\n <Route\n path=\"new\"\n element={\n navigationV2 ? <NewDownloadPage /> : <CreateExportPage />\n }\n />\n\n {/* Export history (lazy loaded); the same list in Navigation v2 */}\n <Route\n path=\"history\"\n element={navigationV2 ? <DownloadsPage /> : <ExportHistoryPage />}\n />\n\n {/* Export job detail (lazy loaded) */}\n <Route\n path=\":jobId\"\n element={\n navigationV2 ? <DownloadDetailPage /> : <ExportDetailPage />\n }\n />\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 the landing page. An empty \"to\"\n resolves to the unmatched URL itself inside a splat route, so\n the module's own base path is used. */}\n <Route path=\"*\" element={<Navigate to={basePath} replace />} />\n </Routes>\n </Suspense>\n </FeatureGate>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;;AAkBA,IAAMA,IAAmBC,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE,iBACb,EAAE,CACJ,GACMC,IAAoBF,QACxB,OAAO,+BAA4B,CAAC,MAAM,OAAO,EAC/C,SAASC,EAAE,kBACb,EAAE,CACJ,GACME,IAAmBH,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE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AAW;GAAG;GACxD,SAAA;EACD,CAAA;CAEL;CACA,OAAO,kBAACvB,GAAD,CAAgB,CAAA;AACzB;AAEA,SAAgByB,IAAe;CAC7B,IAAMC,IAAeC,EAAgB,GAC/B,EAAE,cAAW,QAAQC,EAAU;CACrC,OACE,kBAACf,GAAD,EAAA,UACE,kBAACgB,GAAD;EACE,MAAK;EACL,cAAc;EACd,UAAU,kBAACZ,GAAD,CAAyB,CAAA;EAEnC,UAAA,kBAACa,GAAD;GAAU,UAAU,kBAAC1B,GAAD,CAAa,CAAA;GAC/B,UAAA,kBAAC2B,GAAD,EAAA,UAAA;IAGE,kBAACC,GAAD;KACE,OAAA;KACA,SAAwBC,EAAfP,IAAgBR,IAAgBgB,GAAjB,CAAY,CAAwB;IAC7D,CAAA;IAGD,kBAACF,GAAD;KACE,MAAK;KACL,SACiBC,EAAfP,IAAgBzB,IAAsBP,GAAvB,CAAkB,CAAuB;IAE3D,CAAA;IAGD,kBAACsC,GAAD;KACE,MAAK;KACL,SAAwBC,EAAfP,IAAgB1B,IAAoBH,GAArB,CAAgB,CAAwB;IACjE,CAAA;IAGD,kBAACmC,GAAD;KACE,MAAK;KACL,SACiBC,EAAfP,IAAgBxB,IAAyBJ,GAA1B,CAAqB,CAAuB;IAE9D,CAAA;IAGD,kBAACkC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAACjC,GAAD,CAAsB,CAAA;IAAI,CAAA;IAC3D,kBAACiC,GAAD;KACE,MAAK;KACL,SAAS,kBAAC7B,GAAD,CAAqB,CAAA;IAC/B,CAAA;IAKD,kBAAC6B,GAAD;KAAO,MAAK;KAAI,SAAS,kBAACR,GAAD;MAAU,IAAIW;MAAU,SAAA;KAAS,CAAA;IAAI,CAAA;GACxD,EAAA,CAAA;EACA,CAAA;CACC,CAAA,EACI,CAAA;AAEvB"}
1
+ {"version":3,"file":"ExportRoutes.js","names":["CreateExportPage","lazy","m","ExportHistoryPage","ExportDetailPage","ExportTemplatesPage","DownloadsPage","NewDownloadPage","DownloadDetailPage","TemplateDetailPage","ExportV2Routes","PageLoader","Loader2","LazyErrorFallback","tr","useTr","AlertTriangle","error","onRetry","RefreshCw","LazyErrorBoundary","Component","props","errorInfo","ExportDisabledFallback","V2Landing","params","useSearchParams","tab","rest","search","Navigate","ExportRoutes","navigationV2","useNavigationV2","workspacePagesV2","useWorkspacePagesV2","useExport","FeatureGate","Suspense","Routes","Route","jsx","ExportLandingPage","basePath"],"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, useSearchParams } from \"react-router\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\nimport { FeatureGate } from \"@burdenoff/fe-libs/shared/feature-flags\";\nimport { useWorkspacePagesV2 } from \"@burdenoff/fe-libs/ui\";\nimport { useTr } from \"./hooks/useTr\";\nimport { useExport } from \"./providers/ExportProvider\";\nimport { useNavigationV2 } from \"./navigation-v2/NavigationV2\";\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 DownloadsPage = lazy(() =>\n import(\"./pages/v2/DownloadsPage\").then((m) => ({\n default: m.DownloadsPage,\n })),\n);\nconst NewDownloadPage = lazy(() =>\n import(\"./pages/v2/NewDownloadPage\").then((m) => ({\n default: m.NewDownloadPage,\n })),\n);\nconst DownloadDetailPage = lazy(() =>\n import(\"./pages/v2/DownloadDetailPage\").then((m) => ({\n default: m.DownloadDetailPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n// Workspace pages v2 (BOFF-15822): the redesigned \"Download your data\", for hosts that opt in.\nconst ExportV2Routes = lazy(() =>\n import(\"./workspace-v2/ExportV2Routes\").then((m) => ({\n default: m.ExportV2Routes,\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 * Translated error UI rendered by LazyErrorBoundary.\n * Extracted as a function component so it can use the `useTr` hook.\n */\nfunction LazyErrorFallback({\n error,\n onRetry,\n}: {\n error: Error | null;\n onRetry: () => void;\n}) {\n const tr = useTr();\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-status-error-bg/10\">\n <AlertTriangle className=\"size-8 text-status-error-text\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-text-primary\">\n {tr(\"export.routes.error.title\", \"Failed to load page\")}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {error?.message ||\n tr(\n \"export.routes.error.description\",\n \"The page chunk could not be loaded. This may be due to a network issue.\",\n )}\n </p>\n </div>\n <button\n type=\"button\"\n onClick={onRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg/90 transition-colors\"\n >\n <RefreshCw className=\"size-4\" />\n {tr(\"export.routes.error.retry\", \"Try Again\")}\n </button>\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 override 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 override render() {\n if (this.state.hasError) {\n return (\n <LazyErrorFallback\n error={this.state.error}\n onRetry={this.handleRetry}\n />\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 const tr = useTr();\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-bg-sunken\">\n <svg\n className=\"size-8 text-text-secondary\"\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-text-primary\">\n {tr(\"export.routes.disabled.title\", \"Data Export Unavailable\")}\n </h3>\n <p className=\"text-sm text-text-secondary max-w-md\">\n {tr(\n \"export.routes.disabled.description\",\n \"The Data Export feature is currently disabled for this workspace. Contact your administrator to enable it.\",\n )}\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 */\n/**\n * Navigation v2 landing (BOFF-11870): the old tab bar is gone, and every old\n * `?tab=` value opens its page. `dashboard` and `history` are the one list;\n * `templates` and the hidden `new` redirect, keeping the rest of the query\n * (`?templateId=`, `?status=`).\n */\nexport function V2Landing() {\n const [params] = useSearchParams();\n const tab = params.get(\"tab\");\n if (tab === \"templates\" || tab === \"new\") {\n const rest = new URLSearchParams(params);\n rest.delete(\"tab\");\n const search = rest.toString();\n return (\n <Navigate\n to={{ pathname: tab, search: search ? `?${search}` : \"\" }}\n replace\n />\n );\n }\n return <DownloadsPage />;\n}\n\nexport function ExportRoutes() {\n const navigationV2 = useNavigationV2();\n // Off everywhere but FluidGrids (AppShellConfig.workspacePagesV2): the\n // routes below, unchanged. On: the redesigned pages (workspace-v2/).\n const workspacePagesV2 = useWorkspacePagesV2();\n const { basePath = \"/\" } = useExport();\n return (\n <LazyErrorBoundary>\n <FeatureGate\n flag=\"workspaces.export\"\n defaultValue={true}\n fallback={<ExportDisabledFallback />}\n >\n <Suspense fallback={<PageLoader />}>\n {workspacePagesV2 ? (\n <ExportV2Routes />\n ) : (\n <Routes>\n {/* Tabbed landing - default route (eager loaded). Navigation v2:\n one \"Download your data\" list, old ?tab= values still work. */}\n <Route\n index\n element={navigationV2 ? <V2Landing /> : <ExportLandingPage />}\n />\n\n {/* Create new export (lazy loaded) */}\n <Route\n path=\"new\"\n element={\n navigationV2 ? <NewDownloadPage /> : <CreateExportPage />\n }\n />\n\n {/* Export history (lazy loaded); the same list in Navigation v2 */}\n <Route\n path=\"history\"\n element={\n navigationV2 ? <DownloadsPage /> : <ExportHistoryPage />\n }\n />\n\n {/* Export job detail (lazy loaded) */}\n <Route\n path=\":jobId\"\n element={\n navigationV2 ? <DownloadDetailPage /> : <ExportDetailPage />\n }\n />\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 the landing page. An empty \"to\"\n resolves to the unmatched URL itself inside a splat route, so\n the module's own base path is used. */}\n <Route path=\"*\" element={<Navigate to={basePath} replace />} />\n </Routes>\n )}\n </Suspense>\n </FeatureGate>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;;;;;;AAmBA,IAAMA,IAAmBC,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE,iBACb,EAAE,CACJ,GACMC,IAAoBF,QACxB,OAAO,+BAA4B,CAAC,MAAM,OAAO,EAC/C,SAASC,EAAE,kBACb,EAAE,CACJ,GACME,IAAmBH,QACvB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE,iBACb,EAAE,CACJ,GACMG,IAAsBJ,QAC1B,OAAO,iCAA8B,CAAC,MAAM,OAAO,EACjD,SAASC,EAAE,oBACb,EAAE,CACJ,GACMI,IAAgBL,QACpB,OAAO,8BAA2B,CAAC,MAAM,OAAO,EAC9C,SAASC,EAAE,cACb,EAAE,CACJ,GACMK,IAAkBN,QACtB,OAAO,gCAA6B,CAAC,MAAM,OAAO,EAChD,SAASC,EAAE,gBACb,EAAE,CACJ,GACMM,IAAqBP,QACzB,OAAO,mCAAgC,CAAC,MAAM,OAAO,EACnD,SAASC,EAAE,mBACb,EAAE,CACJ,GACMO,IAAqBR,QACzB,OAAO,gCAA6B,CAAC,MAAM,OAAO,EAChD,SAASC,EAAE,mBACb,EAAE,CACJ,GAEMQ,IAAiBT,QACrB,OAAO,mCAAgC,CAAC,MAAM,OAAO,EACnD,SAASC,EAAE,eACb,EAAE,CACJ;AAKA,SAASS,IAAa;CACpB,OACE,kBAAC,OAAD;EAAK,WAAU;EACb,UAAA,kBAACC,GAAD,EAAS,WAAU,mCAAoC,CAAA;CACpD,CAAA;AAET;AAMA,SAASC,EAAkB,EACzB,UACA,cAIC;CACD,IAAMC,IAAKC,EAAM;CACjB,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAAC,OAAD;IAAK,WAAU;IACb,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,CAAwB;IAE1D,CAAA;IAGD,kBAACsC,GAAD;KACE,MAAK;KACL,SACiBC,EAAfT,IAAgBzB,IAAyBJ,GAA1B,CAAqB,CAAuB;IAE9D,CAAA;IAGD,kBAACqC,GAAD;KAAO,MAAK;KAAY,SAAS,kBAACpC,GAAD,CAAsB,CAAA;IAAI,CAAA;IAC3D,kBAACoC,GAAD;KACE,MAAK;KACL,SAAS,kBAAChC,GAAD,CAAqB,CAAA;IAC/B,CAAA;IAKD,kBAACgC,GAAD;KAAO,MAAK;KAAI,SAAS,kBAACV,GAAD;MAAU,IAAIa;MAAU,SAAA;KAAS,CAAA;IAAI,CAAA;GACxD,EAAA,CAAA;EAEF,CAAA;CACC,CAAA,EACI,CAAA;AAEvB"}
@@ -1,6 +1,67 @@
1
1
  import { GetAvailableExportEntitiesQuery, GetExportJobQuery, ListExportJobsQuery, ListExportTemplatesQuery } from '../../generated/wspace-operations';
2
2
  import { ExportJobStatus as GqlExportJobStatus, ExportJobFilterInput as GqlExportJobFilterInput, ExportPaginationInput as GqlExportPaginationInput } from '../../generated/wspace-types';
3
3
  import { ExportFormat, ExportJob, ExportJobStatus, ExportScope, ExportTemplate, ExportAvailableEntity, ExportFilter, PageInfo } from '../types';
4
+ type Nullable<T> = T | null | undefined;
5
+ interface ExportPartLike {
6
+ id: string;
7
+ jobId?: Nullable<string>;
8
+ partNumber: number;
9
+ fileName: string;
10
+ sizeBytes: number | string;
11
+ entityTypes: string[];
12
+ downloadUrl?: Nullable<string>;
13
+ downloadExpiresAt?: Nullable<string>;
14
+ checksum?: Nullable<string>;
15
+ createdAt?: Nullable<string>;
16
+ }
17
+ export interface ExportJobLike {
18
+ id: string;
19
+ name: string;
20
+ description?: Nullable<string>;
21
+ status: string;
22
+ progress: number;
23
+ exportScope?: Nullable<string>;
24
+ organizationId?: Nullable<string>;
25
+ targetWorkspaceIds?: Nullable<string[]>;
26
+ entityTypes: string[];
27
+ format: string;
28
+ archiveFormat?: Nullable<string>;
29
+ totalEntities?: Nullable<number>;
30
+ processedEntities?: Nullable<number>;
31
+ totalSizeBytes?: Nullable<number | string>;
32
+ parts?: Nullable<ExportPartLike[]>;
33
+ archiveFileId?: Nullable<string>;
34
+ downloadUrl?: Nullable<string>;
35
+ downloadExpiresAt?: Nullable<string>;
36
+ templateId?: Nullable<string>;
37
+ entityFilters?: Nullable<Record<string, unknown>>;
38
+ errorMessage?: Nullable<string>;
39
+ startedAt?: Nullable<string>;
40
+ completedAt?: Nullable<string>;
41
+ expiresAt?: Nullable<string>;
42
+ createdBy: string;
43
+ temporalWorkflowId?: Nullable<string>;
44
+ workspaceId?: Nullable<string>;
45
+ createdAt: string;
46
+ updatedAt: string;
47
+ }
48
+ export interface ExportTemplateLike {
49
+ id: string;
50
+ name: string;
51
+ description?: Nullable<string>;
52
+ entityTypes: string[];
53
+ format: string;
54
+ entityFilters?: Nullable<Record<string, unknown>>;
55
+ isDefault: boolean;
56
+ workspaceId?: Nullable<string>;
57
+ createdBy: string;
58
+ createdAt: string;
59
+ updatedAt: string;
60
+ }
61
+ /** A service export job as the module's `ExportJob` (also used by the v2 Downloads list). */
62
+ export declare function mapJob(job: ExportJobLike): ExportJob;
63
+ /** A service export template as the module's `ExportTemplate` (also used by the v2 Saved setups). */
64
+ export declare function mapTemplate(template: ExportTemplateLike): ExportTemplate;
4
65
  /**
5
66
  * Input for creating an export job
6
67
  */
@@ -100,6 +161,11 @@ export declare function useAvailableEntities(overrideWorkspaceId?: string, optio
100
161
  context: import('../../generated/wspace-types').ContextInput;
101
162
  pagination?: GqlExportPaginationInput | null | undefined;
102
163
  }, undefined>;
164
+ /** Every page of the catalog has loaded. */
165
+ complete: boolean;
166
+ /** A later page failed to load; `retryAll` asks again. */
167
+ moreError: Error | null;
168
+ retryAll: () => void;
103
169
  };
104
170
  /**
105
171
  * Hook to fetch all export templates for the current workspace
@@ -187,6 +253,17 @@ export declare function useCreateExportTemplate(): {
187
253
  isPending: boolean;
188
254
  error: import('@apollo/client').ErrorLike | null;
189
255
  };
256
+ /**
257
+ * Hook to change an export template's name, kinds of data and file type
258
+ * (Workspace pages v2, BOFF-15822: New download keeps a setup it saved in step
259
+ * with the choices when a start is tried again).
260
+ */
261
+ export declare function useUpdateExportTemplate(): {
262
+ updateTemplate: (id: string, input: CreateExportTemplateInput) => Promise<ExportTemplate>;
263
+ loading: boolean;
264
+ isPending: boolean;
265
+ error: import('@apollo/client').ErrorLike | null;
266
+ };
190
267
  /**
191
268
  * Hook to delete an export template
192
269
  */
@@ -196,5 +273,16 @@ export declare function useDeleteExportTemplate(): {
196
273
  isPending: boolean;
197
274
  error: import('@apollo/client').ErrorLike | null;
198
275
  };
276
+ export interface OrganizationExportPermissionOptions {
277
+ /**
278
+ * Keep a refusal out of the app's backend-error toast. The access service
279
+ * answers `myPermissions` only for the person's own workspace scope (super
280
+ * admins and services excepted), so asking about the organization is
281
+ * refused for most people: that refusal is the expected "no", not a failure
282
+ * to show them.
283
+ */
284
+ quiet?: boolean;
285
+ }
199
286
  /** Organization scope is independent of workspace grants; this is a UX hint only. */
200
- export declare function useOrganizationExportPermission(organizationId: string | undefined): boolean;
287
+ export declare function useOrganizationExportPermission(organizationId: string | undefined, options?: OrganizationExportPermissionOptions): boolean;
288
+ export {};