@burdenoff/microfe-export 2026.510.111

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 (197) hide show
  1. package/README.md +243 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/export/ExportRoot.d.ts +31 -0
  5. package/dist/export/ExportRoot.d.ts.map +1 -0
  6. package/dist/export/ExportRoot.js +70 -0
  7. package/dist/export/ExportRoot.js.map +1 -0
  8. package/dist/export/ExportRoutes.d.ts +14 -0
  9. package/dist/export/ExportRoutes.d.ts.map +1 -0
  10. package/dist/export/ExportRoutes.js +104 -0
  11. package/dist/export/ExportRoutes.js.map +1 -0
  12. package/dist/export/components/ExportProgressBar.d.ts +12 -0
  13. package/dist/export/components/ExportProgressBar.d.ts.map +1 -0
  14. package/dist/export/components/ExportProgressBar.js +34 -0
  15. package/dist/export/components/ExportProgressBar.js.map +1 -0
  16. package/dist/export/components/ExportStatusBadge.d.ts +12 -0
  17. package/dist/export/components/ExportStatusBadge.d.ts.map +1 -0
  18. package/dist/export/components/ExportStatusBadge.js +39 -0
  19. package/dist/export/components/ExportStatusBadge.js.map +1 -0
  20. package/dist/export/components/PageLayout.d.ts +55 -0
  21. package/dist/export/components/PageLayout.d.ts.map +1 -0
  22. package/dist/export/components/PageLayout.js +93 -0
  23. package/dist/export/components/PageLayout.js.map +1 -0
  24. package/dist/export/components/ui.d.ts +6 -0
  25. package/dist/export/components/ui.d.ts.map +1 -0
  26. package/dist/export/constants/enums.d.ts +79 -0
  27. package/dist/export/constants/enums.d.ts.map +1 -0
  28. package/dist/export/constants/enums.js +27 -0
  29. package/dist/export/constants/enums.js.map +1 -0
  30. package/dist/export/constants/index.d.ts +7 -0
  31. package/dist/export/constants/index.d.ts.map +1 -0
  32. package/dist/export/hooks/useExportQueries.d.ts +224 -0
  33. package/dist/export/hooks/useExportQueries.d.ts.map +1 -0
  34. package/dist/export/hooks/useExportQueries.js +401 -0
  35. package/dist/export/hooks/useExportQueries.js.map +1 -0
  36. package/dist/export/index.d.ts +29 -0
  37. package/dist/export/index.d.ts.map +1 -0
  38. package/dist/export/index.js +3 -0
  39. package/dist/export/pages/CreateExportPage.d.ts +2 -0
  40. package/dist/export/pages/CreateExportPage.d.ts.map +1 -0
  41. package/dist/export/pages/CreateExportPage.js +495 -0
  42. package/dist/export/pages/CreateExportPage.js.map +1 -0
  43. package/dist/export/pages/ExportDashboardPage.d.ts +6 -0
  44. package/dist/export/pages/ExportDashboardPage.d.ts.map +1 -0
  45. package/dist/export/pages/ExportDashboardPage.js +166 -0
  46. package/dist/export/pages/ExportDashboardPage.js.map +1 -0
  47. package/dist/export/pages/ExportDetailPage.d.ts +7 -0
  48. package/dist/export/pages/ExportDetailPage.d.ts.map +1 -0
  49. package/dist/export/pages/ExportDetailPage.js +327 -0
  50. package/dist/export/pages/ExportDetailPage.js.map +1 -0
  51. package/dist/export/pages/ExportHistoryPage.d.ts +6 -0
  52. package/dist/export/pages/ExportHistoryPage.d.ts.map +1 -0
  53. package/dist/export/pages/ExportHistoryPage.js +261 -0
  54. package/dist/export/pages/ExportHistoryPage.js.map +1 -0
  55. package/dist/export/pages/ExportLandingPage.d.ts +9 -0
  56. package/dist/export/pages/ExportLandingPage.d.ts.map +1 -0
  57. package/dist/export/pages/ExportLandingPage.js +56 -0
  58. package/dist/export/pages/ExportLandingPage.js.map +1 -0
  59. package/dist/export/pages/ExportTemplatesPage.d.ts +6 -0
  60. package/dist/export/pages/ExportTemplatesPage.d.ts.map +1 -0
  61. package/dist/export/pages/ExportTemplatesPage.js +343 -0
  62. package/dist/export/pages/ExportTemplatesPage.js.map +1 -0
  63. package/dist/export/pages/TemplateDetailPage.d.ts +7 -0
  64. package/dist/export/pages/TemplateDetailPage.d.ts.map +1 -0
  65. package/dist/export/pages/TemplateDetailPage.js +215 -0
  66. package/dist/export/pages/TemplateDetailPage.js.map +1 -0
  67. package/dist/export/providers/ExportProvider.d.ts +13 -0
  68. package/dist/export/providers/ExportProvider.d.ts.map +1 -0
  69. package/dist/export/providers/ExportProvider.js +103 -0
  70. package/dist/export/providers/ExportProvider.js.map +1 -0
  71. package/dist/export/store/exportStore.d.ts +17 -0
  72. package/dist/export/store/exportStore.d.ts.map +1 -0
  73. package/dist/export/store/exportStore.js +43 -0
  74. package/dist/export/store/exportStore.js.map +1 -0
  75. package/dist/export/types/index.d.ts +230 -0
  76. package/dist/export/types/index.d.ts.map +1 -0
  77. package/dist/export/utils/cn.d.ts +8 -0
  78. package/dist/export/utils/cn.d.ts.map +1 -0
  79. package/dist/export/utils/cn.js +10 -0
  80. package/dist/export/utils/cn.js.map +1 -0
  81. package/dist/export/utils/events.d.ts +7 -0
  82. package/dist/export/utils/events.d.ts.map +1 -0
  83. package/dist/export/utils/events.js +16 -0
  84. package/dist/export/utils/events.js.map +1 -0
  85. package/dist/export/utils/i18n.d.ts +6 -0
  86. package/dist/export/utils/i18n.d.ts.map +1 -0
  87. package/dist/export/utils/i18n.js +15 -0
  88. package/dist/export/utils/i18n.js.map +1 -0
  89. package/dist/generated/global-operations.d.ts +2 -0
  90. package/dist/generated/global-operations.d.ts.map +1 -0
  91. package/dist/generated/global-types.d.ts +21253 -0
  92. package/dist/generated/global-types.d.ts.map +1 -0
  93. package/dist/generated/wspace-operations.d.ts +773 -0
  94. package/dist/generated/wspace-operations.d.ts.map +1 -0
  95. package/dist/generated/wspace-operations.js +319 -0
  96. package/dist/generated/wspace-operations.js.map +1 -0
  97. package/dist/generated/wspace-types.d.ts +55214 -0
  98. package/dist/generated/wspace-types.d.ts.map +1 -0
  99. package/dist/generated/wspace-types.js +12 -0
  100. package/dist/generated/wspace-types.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +5 -0
  104. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
  105. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
  106. package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
  107. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
  108. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
  109. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  110. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
  111. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
  112. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
  113. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  114. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
  115. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  116. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
  117. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  118. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
  119. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  120. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
  121. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  122. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
  123. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
  124. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  125. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  126. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
  127. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  128. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  129. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  130. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
  131. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  132. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  133. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  134. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
  135. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
  136. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
  137. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  138. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
  139. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  140. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
  141. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  142. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
  143. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  144. package/dist/node_modules/@apollo/client/version.js +6 -0
  145. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  146. package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
  147. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  148. package/dist/node_modules/@wry/trie/lib/index.js +53 -0
  149. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  150. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  151. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  152. package/dist/node_modules/graphql-ws/dist/client.js +272 -0
  153. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
  154. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
  155. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
  156. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
  157. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  158. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
  159. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  160. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
  161. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  162. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
  163. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  164. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
  165. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  166. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
  167. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  168. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
  169. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  170. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
  171. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  172. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
  173. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  174. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  175. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  176. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
  177. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  178. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
  179. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  180. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  181. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  182. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  183. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  184. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  185. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  186. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
  187. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  188. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  189. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  190. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
  191. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  192. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  193. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  194. package/dist/utils/nativeBridge.d.ts +3 -0
  195. package/dist/utils/nativeBridge.d.ts.map +1 -0
  196. package/dist/utils/nativeBridge.js +2 -0
  197. package/package.json +107 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplateDetailPage.js","names":[],"sources":["../../../src/export/pages/TemplateDetailPage.tsx"],"sourcesContent":["import { useParams } from \"react-router-dom\";\nimport { useState } from \"react\";\nimport {\n ArrowLeft,\n FileBox,\n Download,\n Play,\n Trash2,\n AlertCircle,\n Clock,\n FileText,\n HardDrive,\n Loader2,\n} from \"lucide-react\";\nimport { useExport } from \"../providers/ExportProvider\";\nimport {\n useExportTemplate,\n useDeleteExportTemplate,\n} from \"../hooks/useExportQueries\";\nimport {\n getFormatDisplayName,\n getArchiveFormatDisplayName,\n} from \"../constants/enums\";\nimport { PageLayout, PageSection } from \"../components/PageLayout\";\nimport { nativeImpact, nativeNotify } from \"../../utils/nativeBridge\";\n\n/**\n * Helper to join paths correctly\n */\nconst joinPath = (base: string, path: string): string => {\n const cleanBase = base.endsWith(\"/\") ? base.slice(0, -1) : base;\n const cleanPath = path.startsWith(\"/\") ? path : `/${path}`;\n return cleanBase + cleanPath;\n};\n\n/**\n * Template Detail Page\n * View template details and use it to create a new export.\n * Fetches template from the backend via useExportTemplate hook.\n */\nexport function TemplateDetailPage() {\n const { templateId } = useParams<{ templateId: string }>();\n const { basePath = \"/\", navigate } = useExport();\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n\n const { data: template, isLoading } = useExportTemplate(templateId);\n const { deleteTemplate, isPending: deleting } = useDeleteExportTemplate();\n\n // Loading\n if (isLoading) {\n return (\n <div className=\"flex flex-col items-center justify-center py-20\">\n <Loader2 size={48} className=\"animate-spin text-primary\" />\n <span className=\"mt-6 text-sm font-medium text-muted-foreground\">\n Loading template details...\n </span>\n </div>\n );\n }\n\n if (!template) {\n return (\n <PageLayout showHeader={false}>\n <div className=\"flex items-center gap-3 mb-6\">\n <button\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n >\n <ArrowLeft size={20} />\n </button>\n <h1 className=\"text-xl font-bold\">Template Not Found</h1>\n </div>\n <div className=\"border-2 border-border-default rounded-xl bg-status-error-bg-subtle p-12 text-center\">\n <AlertCircle\n size={48}\n className=\"text-status-error-text mx-auto mb-4\"\n />\n <h3 className=\"text-lg font-bold text-status-error-text mb-2\">\n Template Not Found\n </h3>\n <p className=\"text-status-error-text mb-6\">\n The template you are looking for does not exist.\n </p>\n <button\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"inline-flex items-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-colors font-medium\"\n >\n <ArrowLeft size={18} />\n Back to Templates\n </button>\n </div>\n </PageLayout>\n );\n }\n\n const handleUseTemplate = () => {\n // Navigate to new export page pre-selected with this template\n navigate?.(joinPath(basePath, `new?templateId=${templateId}`));\n };\n\n const handleDelete = async () => {\n if (!templateId) return;\n nativeImpact(\"medium\");\n try {\n await deleteTemplate(templateId);\n nativeNotify(\"success\");\n navigate?.(joinPath(basePath, \"templates\"));\n } catch {\n nativeNotify(\"error\");\n }\n };\n\n return (\n <PageLayout showHeader={false}>\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-gradient-to-br from-primary/5 via-primary/3 to-background border border-border/50 p-6 shadow-sm\">\n <div className=\"relative z-10 flex items-center gap-4\">\n <button\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-all duration-200\"\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"flex items-center gap-3 flex-1\">\n <div className=\"p-2.5 rounded-lg bg-primary/10\">\n <FileBox size={24} className=\"text-primary\" />\n </div>\n <div className=\"flex-1 min-w-0\">\n <h1 className=\"text-xl sm:text-2xl font-bold truncate\">\n {template.name}\n </h1>\n <p className=\"text-sm text-muted-foreground mt-1\">\n {template.isDefault ? \"Default template\" : \"Custom template\"}\n </p>\n </div>\n </div>\n </div>\n </div>\n\n {/* Description */}\n {template.description && (\n <div className=\"border-2 border-border/50 rounded-xl p-5\">\n <p className=\"text-sm text-muted-foreground\">\n {template.description}\n </p>\n </div>\n )}\n\n {/* Info Grid */}\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4\">\n {[\n {\n icon: <FileText size={18} />,\n label: \"Format\",\n value: getFormatDisplayName(template.format),\n },\n {\n icon: <HardDrive size={18} />,\n label: \"Archive\",\n // Backend template doesn't carry archiveFormat, default to ZIP\n value: getArchiveFormatDisplayName(\"ZIP\"),\n },\n {\n icon: <Download size={18} />,\n label: \"Entity Types\",\n value: `${template.entityTypes.length} type${template.entityTypes.length !== 1 ? \"s\" : \"\"}`,\n },\n {\n icon: <Clock size={18} />,\n label: \"Last Updated\",\n value: new Date(template.updatedAt).toLocaleDateString(),\n },\n ].map((item) => (\n <div\n key={item.label}\n className=\"border-2 border-border/50 rounded-xl p-4 bg-gradient-to-br from-card/50 to-background\"\n >\n <div className=\"flex items-center gap-2 text-muted-foreground mb-1\">\n {item.icon}\n <span className=\"text-xs font-medium\">{item.label}</span>\n </div>\n <p className=\"font-bold text-lg\">{item.value}</p>\n </div>\n ))}\n </div>\n\n {/* Entity Types */}\n <PageSection\n title=\"Included Entity Types\"\n description=\"Data types that will be exported\"\n >\n <div className=\"flex flex-wrap gap-2\">\n {template.entityTypes.map((entity) => (\n <span\n key={entity}\n className=\"inline-flex items-center gap-2 px-3 py-2 rounded-lg text-sm font-medium border-2 border-border/50 bg-muted/30\"\n >\n {entity}\n </span>\n ))}\n </div>\n </PageSection>\n\n {/* Actions */}\n <div className=\"flex flex-col sm:flex-row gap-3 pt-2\">\n <button\n onClick={handleUseTemplate}\n className=\"flex-1 inline-flex items-center justify-center gap-2 px-6 py-3 bg-primary text-primary-foreground rounded-lg hover:bg-primary/90 transition-all duration-200 hover:scale-105 font-bold shadow-lg\"\n >\n <Play size={18} />\n Use Template\n </button>\n {!template.isDefault && (\n <button\n onClick={() => setShowDeleteConfirm(true)}\n disabled={deleting}\n className=\"inline-flex items-center justify-center gap-2 px-6 py-3 border-2 border-status-error-bg/50 text-status-error-text rounded-lg hover:bg-status-error-bg-subtle transition-all duration-200 font-medium disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={18} className=\"animate-spin\" />\n ) : (\n <Trash2 size={18} />\n )}\n Delete Template\n </button>\n )}\n </div>\n\n {showDeleteConfirm && (\n <div\n role=\"dialog\"\n aria-modal=\"true\"\n aria-labelledby=\"template-delete-title\"\n className=\"fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm p-4\"\n >\n <div className=\"w-full max-w-md rounded-xl border-2 border-border bg-card p-6 shadow-xl\">\n <h2 id=\"template-delete-title\" className=\"text-lg font-bold\">\n Delete template?\n </h2>\n <p className=\"mt-2 text-sm text-muted-foreground\">\n This removes the saved export configuration. Existing export jobs\n are not deleted.\n </p>\n <div className=\"mt-6 flex flex-col-reverse sm:flex-row sm:justify-end gap-3\">\n <button\n type=\"button\"\n onClick={() => setShowDeleteConfirm(false)}\n className=\"px-4 py-2 rounded-lg border-2 border-border hover:bg-accent transition-colors font-medium\"\n >\n Keep Template\n </button>\n <button\n type=\"button\"\n onClick={handleDelete}\n disabled={deleting}\n className=\"inline-flex items-center justify-center gap-2 px-4 py-2 rounded-lg bg-destructive text-destructive-foreground hover:bg-destructive/90 transition-colors font-medium disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : null}\n Delete Template\n </button>\n </div>\n </div>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;AA6BA,IAAM,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAStD,SAAgB,IAAqB;CACnC,IAAM,EAAE,kBAAe,GAAmC,EACpD,EAAE,cAAW,KAAK,gBAAa,GAAW,EAC1C,CAAC,GAAmB,KAAwB,EAAS,GAAM,EAE3D,EAAE,MAAM,GAAU,iBAAc,EAAkB,EAAW,EAC7D,EAAE,mBAAgB,WAAW,MAAa,GAAyB;AAkEzE,QA/DI,IAEA,kBAAC,OAAD;EAAK,WAAU;YAAf,CACE,kBAAC,GAAD;GAAS,MAAM;GAAI,WAAU;GAA8B,CAAA,EAC3D,kBAAC,QAAD;GAAM,WAAU;aAAiD;GAE1D,CAAA,CACH;MAIL,IAqDH,kBAAC,GAAD;EAAY,YAAY;YAAxB;GAEE,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,UAAD;MACE,eAAe,IAAW,EAAS,GAAU,YAAY,CAAC;MAC1D,WAAU;gBAEV,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;MAChB,CAAA,EACT,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE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B,CACE,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,UAAD;IACE,eAAe,IAAW,EAAS,GAAU,YAAY,CAAC;IAC1D,WAAU;cAEV,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA;IAChB,CAAA,EACT,kBAAC,MAAD;IAAI,WAAU;cAAoB;IAAuB,CAAA,CACrD;MACN,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,GAAD;KACE,MAAM;KACN,WAAU;KACV,CAAA;IACF,kBAAC,MAAD;KAAI,WAAU;eAAgD;KAEzD,CAAA;IACL,kBAAC,KAAD;KAAG,WAAU;eAA8B;KAEvC,CAAA;IACJ,kBAAC,UAAD;KACE,eAAe,IAAW,EAAS,GAAU,YAAY,CAAC;KAC1D,WAAU;eAFZ,CAIE,kBAAC,GAAD,EAAW,MAAM,IAAM,CAAA,EAAA,oBAEhB;;IACL;KACK"}
@@ -0,0 +1,13 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ import { ExportRootProps } from '../types';
3
+
4
+ /**
5
+ * Hook to access Export context
6
+ */
7
+ export declare const useExport: () => ExportRootProps;
8
+ /**
9
+ * Provider component for Export microfrontend
10
+ * Sets up routing, context, Apollo Client, and React Query client
11
+ */
12
+ export declare const ExportProvider: FC<PropsWithChildren<ExportRootProps>>;
13
+ //# sourceMappingURL=ExportProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportProvider.d.ts","sourceRoot":"","sources":["../../../src/export/providers/ExportProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAqBnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAsChD;;GAEG;AACH,eAAO,MAAM,SAAS,uBAMrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,iBAAiB,CAAC,eAAe,CAAC,CA8MjE,CAAC"}
@@ -0,0 +1,103 @@
1
+ import { getMainDefinition as e } from "../../node_modules/@apollo/client/utilities/internal/getMainDefinition.js";
2
+ import { GraphQLWsLink as t } from "../../node_modules/@apollo/client/link/subscriptions/index.js";
3
+ import { createClient as n } from "../../node_modules/graphql-ws/dist/client.js";
4
+ import { createContext as r, useContext as i, useMemo as a, useRef as o } from "react";
5
+ import { MemoryRouter as s } from "react-router-dom";
6
+ import { QueryClient as c, QueryClientProvider as l } from "@tanstack/react-query";
7
+ import { ApolloClient as u, HttpLink as d, InMemoryCache as f, Observable as p, from as m, split as h } from "@apollo/client";
8
+ import { onError as g } from "@apollo/client/link/error";
9
+ import { ApolloProvider as _ } from "@apollo/client/react";
10
+ import { isAuthNetworkError as v, redirectToLogin as y } from "@burdenoff/fe-libs/shared/utils";
11
+ import { jsx as b } from "react/jsx-runtime";
12
+ //#region src/export/providers/ExportProvider.tsx
13
+ function x(e = []) {
14
+ return e.some((e) => {
15
+ let t = typeof e.extensions?.code == "string" ? e.extensions.code : "", n = typeof e.extensions?.errorCode == "string" ? e.extensions.errorCode : "", r = (e.message ?? "").toLowerCase();
16
+ return t === "UNAUTHENTICATED" || n === "TOKEN_EXPIRED" || r.includes("token_expired") || r.includes("token expired") || r.includes("session expired") || r.includes("unauthorized") || r.includes("unauthenticated") || r.includes("authentication required") || r.includes("workspace context missing");
17
+ });
18
+ }
19
+ var S = r(null), C = () => {
20
+ let e = i(S);
21
+ if (!e) throw Error("useExport must be used within ExportProvider");
22
+ return e;
23
+ }, w = ({ children: r, basePath: i, navigate: C, currentUser: w, workspaceId: T, tenantId: E, organizationId: D, apiGatewayUrl: O, authToken: k, workspaceToken: A, eventBus: j, getWorkspaceToken: M }) => {
24
+ let N = {
25
+ basePath: i,
26
+ navigate: C,
27
+ currentUser: w,
28
+ workspaceId: T,
29
+ tenantId: E,
30
+ organizationId: D,
31
+ apiGatewayUrl: O,
32
+ authToken: k,
33
+ workspaceToken: A,
34
+ eventBus: j,
35
+ getWorkspaceToken: M
36
+ }, P = o(!1), F = o(M);
37
+ F.current = M;
38
+ let I = a(() => new c({ defaultOptions: { queries: {
39
+ retry: 1,
40
+ refetchOnWindowFocus: !1,
41
+ staleTime: 300 * 1e3
42
+ } } }), []), L = a(() => {
43
+ let r = !k && !A, i = {};
44
+ k && (i.Authorization = `Bearer ${k}`), A && (i["X-Workspace-Authorization"] = `Bearer ${A}`), r && (i["x-actor-id"] = "00000000-0000-0000-0000-000000000002", i["x-actor-type"] = "user", i["x-workspace-id"] = T ?? "00000000-0000-0000-0000-000000000001", i["x-gateway-auth-token"] = "");
45
+ let a = r ? "http://localhost:3732/graphql" : O ? `${O}/workspaces/graphql` : "/workspaces/graphql", o = new d({
46
+ uri: a,
47
+ headers: Object.keys(i).length > 0 ? i : void 0
48
+ }), s = g(({ error: e, operation: t, forward: n }) => {
49
+ if (!e) return;
50
+ let r = x("errors" in e && Array.isArray(e.errors) ? e.errors : []);
51
+ if (!F.current || !r || P.current) {
52
+ e instanceof Error && v(e) && y();
53
+ return;
54
+ }
55
+ return new p((e) => {
56
+ P.current = !0, F.current().then((r) => {
57
+ if (P.current = !1, !r) {
58
+ y(), e.error(/* @__PURE__ */ Error("Failed to refresh workspace token"));
59
+ return;
60
+ }
61
+ t.setContext(({ headers: e = {} }) => ({ headers: {
62
+ ...e,
63
+ "X-Workspace-Authorization": `Bearer ${r}`
64
+ } }));
65
+ let i = n(t).subscribe(e);
66
+ return () => i.unsubscribe();
67
+ }).catch((t) => {
68
+ P.current = !1, e.error(t);
69
+ });
70
+ });
71
+ });
72
+ return new u({
73
+ link: h(({ query: t }) => {
74
+ let n = e(t);
75
+ return n.kind === "OperationDefinition" && n.operation === "subscription";
76
+ }, new t(n({
77
+ url: a.replace(/^http/, "ws"),
78
+ connectionParams: Object.keys(i).length > 0 ? i : void 0
79
+ })), m([s, o])),
80
+ cache: new f(),
81
+ defaultOptions: { watchQuery: { fetchPolicy: "cache-and-network" } }
82
+ });
83
+ }, [
84
+ O,
85
+ k,
86
+ A,
87
+ T
88
+ ]), R = /* @__PURE__ */ b(l, {
89
+ client: I,
90
+ children: /* @__PURE__ */ b(S.Provider, {
91
+ value: N,
92
+ children: r
93
+ })
94
+ });
95
+ return i ? R : /* @__PURE__ */ b(_, {
96
+ client: L,
97
+ children: /* @__PURE__ */ b(s, { children: R })
98
+ });
99
+ };
100
+ //#endregion
101
+ export { w as ExportProvider, C as useExport };
102
+
103
+ //# sourceMappingURL=ExportProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportProvider.js","names":[],"sources":["../../../src/export/providers/ExportProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { createContext, useContext, useMemo, useRef } from \"react\";\nimport { MemoryRouter } from \"react-router-dom\";\nimport { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport {\n ApolloClient,\n InMemoryCache,\n HttpLink,\n from,\n split,\n Observable,\n} from \"@apollo/client\";\nimport { getMainDefinition } from \"@apollo/client/utilities\";\nimport { GraphQLWsLink } from \"@apollo/client/link/subscriptions\";\nimport { createClient } from \"graphql-ws\";\nimport { onError } from \"@apollo/client/link/error\";\nimport { ApolloProvider } from \"@apollo/client/react\";\nimport {\n isAuthNetworkError,\n redirectToLogin,\n} from \"@burdenoff/fe-libs/shared/utils\";\nimport type { ExportRootProps } from \"../types\";\n\nfunction hasSessionAuthErrors(\n errors: ReadonlyArray<{\n message?: string;\n extensions?: Record<string, unknown>;\n }> = [],\n): boolean {\n return errors.some((error) => {\n const code =\n typeof error.extensions?.code === \"string\" ? error.extensions.code : \"\";\n const errorCode =\n typeof error.extensions?.errorCode === \"string\"\n ? error.extensions.errorCode\n : \"\";\n const message = (error.message ?? \"\").toLowerCase();\n\n return (\n code === \"UNAUTHENTICATED\" ||\n errorCode === \"TOKEN_EXPIRED\" ||\n message.includes(\"token_expired\") ||\n message.includes(\"token expired\") ||\n message.includes(\"session expired\") ||\n message.includes(\"unauthorized\") ||\n message.includes(\"unauthenticated\") ||\n message.includes(\"authentication required\") ||\n message.includes(\"workspace context missing\")\n );\n });\n}\n\n/**\n * Context value for Export microfrontend\n */\ntype ExportContextValue = ExportRootProps;\n\nconst ExportContext = createContext<ExportContextValue | null>(null);\n\n/**\n * Hook to access Export context\n */\nexport const useExport = () => {\n const context = useContext(ExportContext);\n if (!context) {\n throw new Error(\"useExport must be used within ExportProvider\");\n }\n return context;\n};\n\n/**\n * Provider component for Export microfrontend\n * Sets up routing, context, Apollo Client, and React Query client\n */\nexport const ExportProvider: FC<PropsWithChildren<ExportRootProps>> = ({\n children,\n basePath,\n navigate,\n currentUser,\n workspaceId,\n tenantId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n eventBus,\n getWorkspaceToken,\n}) => {\n const contextValue: ExportContextValue = {\n basePath,\n navigate,\n currentUser,\n workspaceId,\n tenantId,\n organizationId,\n apiGatewayUrl,\n authToken,\n workspaceToken,\n eventBus,\n getWorkspaceToken,\n };\n\n // Track refreshing state across renders without triggering re-renders\n const isRefreshingRef = useRef(false);\n\n // Stable ref for getWorkspaceToken so it never invalidates the Apollo client memo\n const getWorkspaceTokenRef = useRef(getWorkspaceToken);\n getWorkspaceTokenRef.current = getWorkspaceToken;\n\n // Create QueryClient instance (memoized to avoid recreation on re-renders)\n const queryClient = useMemo(\n () =>\n new QueryClient({\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 5 * 60 * 1000, // 5 minutes\n },\n },\n }),\n [],\n );\n\n // Create ApolloClient instance (memoized, recreated when tokens change)\n // The workspace gateway requires dual-token auth:\n // Authorization: Bearer <authToken> (platform identity)\n // X-Workspace-Authorization: Bearer <workspaceToken> (workspace access)\n // In dev mode (no tokens), the client adds actor headers directly and uses\n // x-gateway-auth-token so the service trusts them (TRUSTED_GATEWAY_TOKEN=dev-test-secret-2026).\n const apolloClient = useMemo(() => {\n const isDevMode = !authToken && !workspaceToken;\n const headers: Record<string, string> = {};\n\n if (authToken) {\n headers[\"Authorization\"] = `Bearer ${authToken}`;\n }\n if (workspaceToken) {\n headers[\"X-Workspace-Authorization\"] = `Bearer ${workspaceToken}`;\n }\n\n // Dev-mode: inject actor headers directly so the service can authenticate the request\n if (isDevMode) {\n headers[\"x-actor-id\"] = \"00000000-0000-0000-0000-000000000002\";\n headers[\"x-actor-type\"] = \"user\";\n headers[\"x-workspace-id\"] =\n workspaceId ?? \"00000000-0000-0000-0000-000000000001\";\n headers[\"x-gateway-auth-token\"] =\n import.meta.env.VITE_DEV_GATEWAY_TOKEN ?? \"\";\n }\n\n // In dev mode (no tokens) connect directly to the export service to bypass gateway auth\n const serviceUrl = isDevMode\n ? (import.meta.env.VITE_EXPORT_SERVICE_URL ??\n \"http://localhost:3732/graphql\")\n : apiGatewayUrl\n ? `${apiGatewayUrl}/workspaces/graphql`\n : \"/workspaces/graphql\";\n\n const httpLink = new HttpLink({\n uri: serviceUrl,\n headers: Object.keys(headers).length > 0 ? headers : undefined,\n });\n\n // Error link: refresh workspace token on TOKEN_EXPIRED and retry the operation\n const errorLink = onError(({ error, operation, forward }) => {\n if (!error) return;\n\n const errors =\n \"errors\" in error && Array.isArray(error.errors) ? error.errors : [];\n const hasAuthError = hasSessionAuthErrors(errors);\n\n if (\n !getWorkspaceTokenRef.current ||\n !hasAuthError ||\n isRefreshingRef.current\n ) {\n if (error instanceof Error && isAuthNetworkError(error)) {\n redirectToLogin();\n }\n return;\n }\n\n return new Observable((observer) => {\n isRefreshingRef.current = true;\n getWorkspaceTokenRef.current!()\n .then((freshToken) => {\n isRefreshingRef.current = false;\n if (!freshToken) {\n redirectToLogin();\n observer.error(new Error(\"Failed to refresh workspace token\"));\n return;\n }\n // Inject the fresh token into the retry request\n operation.setContext(\n ({\n headers: existingHeaders = {},\n }: {\n headers?: Record<string, string>;\n }) => ({\n headers: {\n ...existingHeaders,\n \"X-Workspace-Authorization\": `Bearer ${freshToken}`,\n },\n }),\n );\n const subscriber = forward(operation).subscribe(observer);\n return () => subscriber.unsubscribe();\n })\n .catch((err: unknown) => {\n isRefreshingRef.current = false;\n observer.error(err);\n });\n });\n });\n\n // WebSocket link for subscriptions (replace http with ws)\n const wsUrl = serviceUrl.replace(/^http/, \"ws\");\n const wsLink = new GraphQLWsLink(\n createClient({\n url: wsUrl,\n connectionParams: Object.keys(headers).length > 0 ? headers : undefined,\n }),\n );\n\n // Split link: use WebSocket for subscriptions, HTTP for queries/mutations\n const splitLink = split(\n ({ query }) => {\n const definition = getMainDefinition(query);\n return (\n definition.kind === \"OperationDefinition\" &&\n definition.operation === \"subscription\"\n );\n },\n wsLink,\n from([errorLink, httpLink]),\n );\n\n return new ApolloClient({\n link: splitLink,\n cache: new InMemoryCache(),\n defaultOptions: {\n watchQuery: {\n fetchPolicy: \"cache-and-network\",\n },\n },\n });\n }, [\n apiGatewayUrl,\n authToken,\n workspaceToken,\n workspaceId,\n // getWorkspaceToken is intentionally omitted: it's accessed via ref so the\n // Apollo client is not destroyed on every render if the host passes a new\n // function reference each render cycle.\n ]);\n\n // Wrap content with QueryClientProvider and Context.Provider\n const content = (\n <QueryClientProvider client={queryClient}>\n <ExportContext.Provider value={contextValue}>\n {children}\n </ExportContext.Provider>\n </QueryClientProvider>\n );\n\n // When integrated into a shell (basePath provided), the shell already has a router\n // and ApolloProvider so we don't create another one. When standalone (no basePath),\n // use MemoryRouter and ApolloProvider.\n if (basePath) {\n // Integrated mode: shell already has BrowserRouter and ApolloProvider, don't create nested ones\n return content;\n }\n\n // Standalone mode: create MemoryRouter and ApolloProvider for independent operation\n return (\n <ApolloProvider client={apolloClient}>\n <MemoryRouter>{content}</MemoryRouter>\n </ApolloProvider>\n );\n};\n"],"mappings":";;;;;;;;;;;;AAuBA,SAAS,EACP,IAGK,EAAE,EACE;AACT,QAAO,EAAO,MAAM,MAAU;EAC5B,IAAM,IACJ,OAAO,EAAM,YAAY,QAAS,WAAW,EAAM,WAAW,OAAO,IACjE,IACJ,OAAO,EAAM,YAAY,aAAc,WACnC,EAAM,WAAW,YACj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C5B;GACsB,CAAA;EACL,CAAA;AAYxB,QANI,IAEK,IAKP,kBAAC,GAAD;EAAgB,QAAQ;YACtB,kBAAC,GAAD,EAAA,UAAe,GAAuB,CAAA;EACvB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { ExportJob, ExportFilter, ExportDisplayMode, ExportPagination } from '../types';
2
+
3
+ interface ExportState {
4
+ selectedJob: ExportJob | null;
5
+ viewMode: ExportDisplayMode;
6
+ jobFilter: ExportFilter;
7
+ pagination: ExportPagination;
8
+ setSelectedJob: (job: ExportJob | null) => void;
9
+ setViewMode: (mode: ExportDisplayMode) => void;
10
+ updateFilter: (filter: Partial<ExportFilter>) => void;
11
+ resetFilter: () => void;
12
+ setPagination: (p: Partial<ExportPagination>) => void;
13
+ resetPagination: () => void;
14
+ }
15
+ export declare const useExportStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ExportState>>;
16
+ export {};
17
+ //# sourceMappingURL=exportStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportStore.d.ts","sourceRoot":"","sources":["../../../src/export/store/exportStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,SAAS,EACT,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAElB,UAAU,WAAW;IAEnB,WAAW,EAAE,SAAS,GAAG,IAAI,CAAC;IAC9B,QAAQ,EAAE,iBAAiB,CAAC;IAG5B,SAAS,EAAE,YAAY,CAAC;IAGxB,UAAU,EAAE,gBAAgB,CAAC;IAG7B,cAAc,EAAE,CAAC,GAAG,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,WAAW,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC/C,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,IAAI,CAAC;IACtD,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IACtD,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAeD,eAAO,MAAM,cAAc,0EAuBxB,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { create as e } from "zustand";
2
+ //#region src/export/store/exportStore.ts
3
+ var t = {
4
+ search: "",
5
+ status: "all",
6
+ format: "all",
7
+ dateRange: "all"
8
+ }, n = {
9
+ page: 1,
10
+ cursor: null,
11
+ pageSize: 20
12
+ }, r = e((e) => ({
13
+ selectedJob: null,
14
+ viewMode: "list",
15
+ jobFilter: t,
16
+ pagination: n,
17
+ setSelectedJob: (t) => e({ selectedJob: t }),
18
+ setViewMode: (t) => e({ viewMode: t }),
19
+ updateFilter: (t) => e((e) => ({
20
+ jobFilter: {
21
+ ...e.jobFilter,
22
+ ...t
23
+ },
24
+ pagination: {
25
+ ...e.pagination,
26
+ page: 1,
27
+ cursor: null
28
+ }
29
+ })),
30
+ resetFilter: () => e({
31
+ jobFilter: t,
32
+ pagination: n
33
+ }),
34
+ setPagination: (t) => e((e) => ({ pagination: {
35
+ ...e.pagination,
36
+ ...t
37
+ } })),
38
+ resetPagination: () => e({ pagination: n })
39
+ }));
40
+ //#endregion
41
+ export { r as useExportStore };
42
+
43
+ //# sourceMappingURL=exportStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exportStore.js","names":[],"sources":["../../../src/export/store/exportStore.ts"],"sourcesContent":["import { create } from \"zustand\";\nimport type {\n ExportJob,\n ExportFilter,\n ExportDisplayMode,\n ExportPagination,\n} from \"../types\";\n\ninterface ExportState {\n // View state\n selectedJob: ExportJob | null;\n viewMode: ExportDisplayMode;\n\n // Filters\n jobFilter: ExportFilter;\n\n // Pagination\n pagination: ExportPagination;\n\n // Actions\n setSelectedJob: (job: ExportJob | null) => void;\n setViewMode: (mode: ExportDisplayMode) => void;\n updateFilter: (filter: Partial<ExportFilter>) => void;\n resetFilter: () => void;\n setPagination: (p: Partial<ExportPagination>) => void;\n resetPagination: () => void;\n}\n\nconst defaultExportFilter: ExportFilter = {\n search: \"\",\n status: \"all\",\n format: \"all\",\n dateRange: \"all\",\n};\n\nconst defaultPagination: ExportPagination = {\n page: 1,\n cursor: null,\n pageSize: 20,\n};\n\nexport const useExportStore = create<ExportState>((set) => ({\n // Initial state\n selectedJob: null,\n viewMode: \"list\",\n jobFilter: defaultExportFilter,\n pagination: defaultPagination,\n\n // Actions\n setSelectedJob: (job) => set({ selectedJob: job }),\n setViewMode: (mode) => set({ viewMode: mode }),\n updateFilter: (filter) =>\n set((state) => ({\n jobFilter: { ...state.jobFilter, ...filter },\n // Reset cursor when filter changes\n pagination: { ...state.pagination, page: 1, cursor: null },\n })),\n resetFilter: () =>\n set({ jobFilter: defaultExportFilter, pagination: defaultPagination }),\n setPagination: (p) =>\n set((state) => ({\n pagination: { ...state.pagination, ...p },\n })),\n resetPagination: () => set({ pagination: defaultPagination }),\n}));\n"],"mappings":";;AA4BA,IAAM,IAAoC;CACxC,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;CACZ,EAEK,IAAsC;CAC1C,MAAM;CACN,QAAQ;CACR,UAAU;CACX,EAEY,IAAiB,GAAqB,OAAS;CAE1D,aAAa;CACb,UAAU;CACV,WAAW;CACX,YAAY;CAGZ,iBAAiB,MAAQ,EAAI,EAAE,aAAa,GAAK,CAAC;CAClD,cAAc,MAAS,EAAI,EAAE,UAAU,GAAM,CAAC;CAC9C,eAAe,MACb,GAAK,OAAW;EACd,WAAW;GAAE,GAAG,EAAM;GAAW,GAAG;GAAQ;EAE5C,YAAY;GAAE,GAAG,EAAM;GAAY,MAAM;GAAG,QAAQ;GAAM;EAC3D,EAAE;CACL,mBACE,EAAI;EAAE,WAAW;EAAqB,YAAY;EAAmB,CAAC;CACxE,gBAAgB,MACd,GAAK,OAAW,EACd,YAAY;EAAE,GAAG,EAAM;EAAY,GAAG;EAAG,EAC1C,EAAE;CACL,uBAAuB,EAAI,EAAE,YAAY,GAAmB,CAAC;CAC9D,EAAE"}
@@ -0,0 +1,230 @@
1
+ /**
2
+ * Navigation item for shell integration
3
+ */
4
+ export interface NavItem {
5
+ id: string;
6
+ label: string;
7
+ path: string;
8
+ icon?: React.ReactNode;
9
+ badge?: number;
10
+ order?: number;
11
+ group?: string;
12
+ visible?: boolean;
13
+ /** Nested children items for dropdown menus */
14
+ children?: NavItem[];
15
+ }
16
+ /**
17
+ * Footer item for shell integration
18
+ */
19
+ export interface FooterItem {
20
+ id: string;
21
+ label: string;
22
+ type: "status" | "action";
23
+ order?: number;
24
+ section: "left" | "center" | "right";
25
+ }
26
+ /**
27
+ * Base microfrontend root props
28
+ * TODO: Import from '@burdenoff/fe-libs/shared/types' when fe-libs is built
29
+ */
30
+ export interface MicrofrontendRootProps {
31
+ }
32
+ /**
33
+ * Props for the ExportRoot component
34
+ */
35
+ export interface ExportRootProps extends MicrofrontendRootProps {
36
+ /**
37
+ * Base path for the export microfrontend
38
+ */
39
+ basePath?: string;
40
+ /**
41
+ * Workspace ID for scoping operations
42
+ */
43
+ workspaceId?: string;
44
+ /**
45
+ * Tenant ID for global-layer operations
46
+ */
47
+ tenantId?: string;
48
+ /**
49
+ * Organization ID for org-scoped exports
50
+ */
51
+ organizationId?: string;
52
+ /**
53
+ * API Gateway URL for GraphQL requests
54
+ */
55
+ apiGatewayUrl?: string;
56
+ /**
57
+ * Authentication token for API requests (platform identity JWT)
58
+ */
59
+ authToken?: string;
60
+ /**
61
+ * Workspace token for workspace-scoped API requests (workspace access JWT).
62
+ * The gateway requires both authToken (Authorization) and workspaceToken
63
+ * (X-Workspace-Authorization) for workspace operations.
64
+ */
65
+ workspaceToken?: string;
66
+ /** Optional shell-owned event bus. MFEs emit events; host shells own sinks. */
67
+ eventBus?: {
68
+ emit: (event: string, payload: unknown) => void;
69
+ };
70
+ /**
71
+ * Async function to obtain a fresh workspace token.
72
+ * Called by the error link when the gateway returns TOKEN_EXPIRED.
73
+ * The shell should implement this by calling wspace-auth-svc to issue a new token.
74
+ */
75
+ getWorkspaceToken?: () => Promise<string | null>;
76
+ /**
77
+ * Navigation function provided by the shell
78
+ */
79
+ navigate?: (path: string) => void;
80
+ /**
81
+ * Current user information
82
+ */
83
+ currentUser?: {
84
+ id: string;
85
+ email: string;
86
+ firstName?: string;
87
+ lastName?: string;
88
+ };
89
+ /**
90
+ * Optional function to register navigation items with the shell
91
+ * Injected by the shell app
92
+ */
93
+ registerNavItems?: (items: NavItem | NavItem[]) => () => void;
94
+ /**
95
+ * Optional function to register footer items with the shell
96
+ * Injected by the shell app
97
+ */
98
+ registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
99
+ }
100
+ /**
101
+ * Export job status
102
+ */
103
+ export type ExportJobStatus = "CREATED" | "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "EXPIRED" | "DELETED";
104
+ /**
105
+ * Export scope — determines which data is included
106
+ */
107
+ export type ExportScope = "INDIVIDUAL" | "WORKSPACE_ADMIN" | "ORG_ADMIN";
108
+ /**
109
+ * Export output format — backend only supports JSON and CSV
110
+ */
111
+ export type ExportFormat = "CSV" | "JSON";
112
+ /**
113
+ * Export archive format
114
+ */
115
+ export type ExportArchiveFormat = "ZIP";
116
+ /**
117
+ * Export job entity — aligned with backend schema
118
+ */
119
+ export interface ExportJob {
120
+ id: string;
121
+ name: string;
122
+ description?: string;
123
+ status: ExportJobStatus;
124
+ progress: number;
125
+ exportScope?: ExportScope;
126
+ organizationId?: string;
127
+ targetWorkspaceIds?: string[];
128
+ entityTypes: string[];
129
+ format: ExportFormat;
130
+ archiveFormat: ExportArchiveFormat;
131
+ /** Total number of entities to export (backend field name) */
132
+ totalEntities?: number;
133
+ /** Number of entities processed so far (backend field name) */
134
+ processedEntities?: number;
135
+ totalSizeBytes?: number;
136
+ parts: ExportPart[];
137
+ templateId?: string;
138
+ filters?: Record<string, unknown>;
139
+ errorMessage?: string;
140
+ startedAt?: string;
141
+ completedAt?: string;
142
+ expiresAt?: string;
143
+ /** UUID of the actor who created the job */
144
+ createdBy: string;
145
+ temporalWorkflowId?: string;
146
+ workspaceId?: string;
147
+ createdAt: string;
148
+ updatedAt: string;
149
+ }
150
+ /**
151
+ * Export part (individual file within an export job)
152
+ */
153
+ export interface ExportPart {
154
+ id: string;
155
+ jobId?: string;
156
+ partNumber: number;
157
+ fileName: string;
158
+ /** Array of entity types contained in this part */
159
+ entityTypes: string[];
160
+ sizeBytes: number;
161
+ downloadUrl?: string;
162
+ downloadExpiresAt?: string;
163
+ checksum?: string;
164
+ createdAt?: string;
165
+ }
166
+ /**
167
+ * Export template for reusable export configurations
168
+ */
169
+ export interface ExportTemplate {
170
+ id: string;
171
+ name: string;
172
+ description?: string;
173
+ entityTypes: string[];
174
+ format: ExportFormat;
175
+ filters?: Record<string, unknown>;
176
+ /** Whether this is a default system template */
177
+ isDefault: boolean;
178
+ /** UUID of the actor who created the template */
179
+ createdBy: string;
180
+ workspaceId?: string;
181
+ createdAt: string;
182
+ updatedAt: string;
183
+ }
184
+ /**
185
+ * Available entity type for export
186
+ */
187
+ export interface ExportAvailableEntity {
188
+ entityType: string;
189
+ displayName: string;
190
+ description?: string;
191
+ estimatedSize?: string;
192
+ supportsDateRange: boolean;
193
+ supportsMediaExport: boolean;
194
+ enabled: boolean;
195
+ }
196
+ /**
197
+ * GraphQL connection page info
198
+ */
199
+ export interface PageInfo {
200
+ hasNextPage: boolean;
201
+ hasPreviousPage: boolean;
202
+ startCursor?: string;
203
+ endCursor?: string;
204
+ }
205
+ /**
206
+ * Export filter options
207
+ */
208
+ export interface ExportFilter {
209
+ search: string;
210
+ status: ExportJobStatus | "all";
211
+ format: ExportFormat | "all";
212
+ dateRange: "all" | "today" | "week" | "month" | "quarter";
213
+ }
214
+ /**
215
+ * Pagination state for export job list
216
+ */
217
+ export interface ExportPagination {
218
+ page: number;
219
+ cursor: string | null;
220
+ pageSize: number;
221
+ }
222
+ /**
223
+ * View mode for export UI
224
+ */
225
+ export type ExportView = "dashboard" | "new" | "history" | "templates";
226
+ /**
227
+ * View mode for export display
228
+ */
229
+ export type ExportDisplayMode = "list" | "grid";
230
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/export/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACtC;AAED;;;GAGG;AAEH,MAAM,WAAW,sBAAsB;CAAG;AAE1C;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,sBAAsB;IAC7D;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;;OAIG;IACH,cAAc,CAA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EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAEvE;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { ClassValue } from 'clsx';
2
+
3
+ /**
4
+ * Utility function to merge Tailwind CSS classes
5
+ * Combines clsx for conditional classes and tailwind-merge for deduplication
6
+ */
7
+ export declare function cn(...inputs: ClassValue[]): string;
8
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../../src/export/utils/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
@@ -0,0 +1,10 @@
1
+ import e from "../../node_modules/clsx/dist/clsx.js";
2
+ import { twMerge as t } from "../../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
+ //#region src/export/utils/cn.ts
4
+ function n(...n) {
5
+ return t(e(n));
6
+ }
7
+ //#endregion
8
+ export { n as cn };
9
+
10
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","names":[],"sources":["../../../src/export/utils/cn.ts"],"sourcesContent":["import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\n/**\n * Utility function to merge Tailwind CSS classes\n * Combines clsx for conditional classes and tailwind-merge for deduplication\n */\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAOA,SAAgB,EAAG,GAAG,GAAsB;AAC1C,QAAO,EAAQ,EAAK,EAAO,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ExportRootProps } from '../types';
2
+
3
+ export type ExportEventName = "export.job.created" | "export.job.cancelled" | "export.job.deleted" | "export.job.retried" | "export.template.created" | "export.template.updated" | "export.template.deleted" | "export.api.failed";
4
+ type ExportEventPayload = Record<string, unknown>;
5
+ export declare function emitExportEvent(context: Pick<ExportRootProps, "eventBus" | "workspaceId">, name: ExportEventName, payload?: ExportEventPayload): void;
6
+ export {};
7
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/export/utils/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,eAAe,GACvB,oBAAoB,GACpB,sBAAsB,GACtB,oBAAoB,GACpB,oBAAoB,GACpB,yBAAyB,GACzB,yBAAyB,GACzB,yBAAyB,GACzB,mBAAmB,CAAC;AAExB,KAAK,kBAAkB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAElD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,CAAC,EAC1D,IAAI,EAAE,eAAe,EACrB,OAAO,GAAE,kBAAuB,GAC/B,IAAI,CAmBN"}
@@ -0,0 +1,16 @@
1
+ //#region src/export/utils/events.ts
2
+ function e(e, t, n = {}) {
3
+ let r = {
4
+ workspaceId: e.workspaceId,
5
+ ...n
6
+ };
7
+ e.eventBus?.emit?.(t, r), typeof window < "u" && window.dispatchEvent(new CustomEvent("burdenoff:mfe-event", { detail: {
8
+ name: t,
9
+ source: { mfe: "microfe-export" },
10
+ payload: r
11
+ } }));
12
+ }
13
+ //#endregion
14
+ export { e as emitExportEvent };
15
+
16
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","names":[],"sources":["../../../src/export/utils/events.ts"],"sourcesContent":["import type { ExportRootProps } from \"../types\";\n\nexport type ExportEventName =\n | \"export.job.created\"\n | \"export.job.cancelled\"\n | \"export.job.deleted\"\n | \"export.job.retried\"\n | \"export.template.created\"\n | \"export.template.updated\"\n | \"export.template.deleted\"\n | \"export.api.failed\";\n\ntype ExportEventPayload = Record<string, unknown>;\n\nexport function emitExportEvent(\n context: Pick<ExportRootProps, \"eventBus\" | \"workspaceId\">,\n name: ExportEventName,\n payload: ExportEventPayload = {},\n): void {\n const eventPayload = {\n workspaceId: context.workspaceId,\n ...payload,\n };\n\n context.eventBus?.emit?.(name, eventPayload);\n\n if (typeof window !== \"undefined\") {\n window.dispatchEvent(\n new CustomEvent(\"burdenoff:mfe-event\", {\n detail: {\n name,\n source: { mfe: \"microfe-export\" },\n payload: eventPayload,\n },\n }),\n );\n }\n}\n"],"mappings":";AAcA,SAAgB,EACd,GACA,GACA,IAA8B,EAAE,EAC1B;CACN,IAAM,IAAe;EACnB,aAAa,EAAQ;EACrB,GAAG;EACJ;AAID,CAFA,EAAQ,UAAU,OAAO,GAAM,EAAa,EAExC,OAAO,SAAW,OACpB,OAAO,cACL,IAAI,YAAY,uBAAuB,EACrC,QAAQ;EACN;EACA,QAAQ,EAAE,KAAK,kBAAkB;EACjC,SAAS;EACV,EACF,CAAC,CACH"}
@@ -0,0 +1,6 @@
1
+ import { I18nContextValue } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';
2
+
3
+ type TranslationParams = Record<string, string | number>;
4
+ export declare function tWithFallback(t: I18nContextValue["t"], key: string, fallback: string, params?: TranslationParams): string;
5
+ export {};
6
+ //# sourceMappingURL=i18n.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.d.ts","sourceRoot":"","sources":["../../../src/export/utils/i18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wDAAwD,CAAC;AAE/F,KAAK,iBAAiB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAgBzD,wBAAgB,aAAa,CAC3B,CAAC,EAAE,gBAAgB,CAAC,GAAG,CAAC,EACxB,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,iBAAiB,GACzB,MAAM,CAKR"}
@@ -0,0 +1,15 @@
1
+ //#region src/export/utils/i18n.ts
2
+ function e(e, t) {
3
+ return t ? e.replace(/\{(\w+)\}/g, (e, n) => {
4
+ let r = t[n];
5
+ return r == null ? e : String(r);
6
+ }) : e;
7
+ }
8
+ function t(t, n, r, i) {
9
+ let a = t(n, i);
10
+ return a === n ? e(r, i) : a;
11
+ }
12
+ //#endregion
13
+ export { t as tWithFallback };
14
+
15
+ //# sourceMappingURL=i18n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.js","names":[],"sources":["../../../src/export/utils/i18n.ts"],"sourcesContent":["import type { I18nContextValue } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\n\ntype TranslationParams = Record<string, string | number>;\n\nfunction interpolateFallback(\n fallback: string,\n params?: TranslationParams,\n): string {\n if (!params) {\n return fallback;\n }\n\n return fallback.replace(/\\{(\\w+)\\}/g, (match, key: string) => {\n const value = params[key];\n return value == null ? match : String(value);\n });\n}\n\nexport function tWithFallback(\n t: I18nContextValue[\"t\"],\n key: string,\n fallback: string,\n params?: TranslationParams,\n): string {\n const translated = t(key, params);\n return translated === key\n ? interpolateFallback(fallback, params)\n : translated;\n}\n"],"mappings":";AAIA,SAAS,EACP,GACA,GACQ;AAKR,QAJK,IAIE,EAAS,QAAQ,eAAe,GAAO,MAAgB;EAC5D,IAAM,IAAQ,EAAO;AACrB,SAAO,KAAS,OAAO,IAAQ,OAAO,EAAM;GAC5C,GANO;;AASX,SAAgB,EACd,GACA,GACA,GACA,GACQ;CACR,IAAM,IAAa,EAAE,GAAK,EAAO;AACjC,QAAO,MAAe,IAClB,EAAoB,GAAU,EAAO,GACrC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=global-operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-operations.d.ts","sourceRoot":"","sources":["../../src/generated/global-operations.ts"],"names":[],"mappings":""}