@burdenoff/microfe-export 2026.1107.1 → 2026.1108.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (211) hide show
  1. package/dist/dev/main.d.ts +0 -2
  2. package/dist/export/ExportRoot.d.ts +0 -2
  3. package/dist/export/ExportRoot.js +9 -6
  4. package/dist/export/ExportRoot.js.map +1 -1
  5. package/dist/export/ExportRoutes.d.ts +1 -2
  6. package/dist/export/ExportRoutes.js +1 -2
  7. package/dist/export/ExportRoutes.js.map +1 -1
  8. package/dist/export/components/ExportProgressBar.d.ts +1 -2
  9. package/dist/export/components/ExportProgressBar.js +1 -2
  10. package/dist/export/components/ExportProgressBar.js.map +1 -1
  11. package/dist/export/components/ExportStatusBadge.d.ts +1 -3
  12. package/dist/export/components/ExportStatusBadge.js +7 -8
  13. package/dist/export/components/ExportStatusBadge.js.map +1 -1
  14. package/dist/export/components/PageLayout.d.ts +3 -5
  15. package/dist/export/components/PageLayout.js +1 -2
  16. package/dist/export/components/PageLayout.js.map +1 -1
  17. package/dist/export/constants/enums.d.ts +0 -2
  18. package/dist/export/constants/enums.js +1 -2
  19. package/dist/export/constants/enums.js.map +1 -1
  20. package/dist/export/constants/index.d.ts +0 -1
  21. package/dist/export/hooks/useExportQueries.d.ts +16 -33
  22. package/dist/export/hooks/useExportQueries.js +223 -225
  23. package/dist/export/hooks/useExportQueries.js.map +1 -1
  24. package/dist/export/hooks/useTr.d.ts +0 -2
  25. package/dist/export/hooks/useTr.js +1 -2
  26. package/dist/export/hooks/useTr.js.map +1 -1
  27. package/dist/export/index.d.ts +0 -1
  28. package/dist/export/index.js +5 -4
  29. package/dist/export/pages/CreateExportPage.d.ts +1 -2
  30. package/dist/export/pages/CreateExportPage.js +228 -229
  31. package/dist/export/pages/CreateExportPage.js.map +1 -1
  32. package/dist/export/pages/ExportDashboardPage.d.ts +1 -2
  33. package/dist/export/pages/ExportDashboardPage.js +17 -18
  34. package/dist/export/pages/ExportDashboardPage.js.map +1 -1
  35. package/dist/export/pages/ExportDetailPage.d.ts +1 -2
  36. package/dist/export/pages/ExportDetailPage.js +39 -40
  37. package/dist/export/pages/ExportDetailPage.js.map +1 -1
  38. package/dist/export/pages/ExportHistoryPage.d.ts +1 -2
  39. package/dist/export/pages/ExportHistoryPage.js +21 -20
  40. package/dist/export/pages/ExportHistoryPage.js.map +1 -1
  41. package/dist/export/pages/ExportLandingPage.d.ts +1 -2
  42. package/dist/export/pages/ExportLandingPage.js +1 -2
  43. package/dist/export/pages/ExportLandingPage.js.map +1 -1
  44. package/dist/export/pages/ExportTemplatesPage.d.ts +1 -2
  45. package/dist/export/pages/ExportTemplatesPage.js +25 -30
  46. package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
  47. package/dist/export/pages/TemplateDetailPage.d.ts +1 -2
  48. package/dist/export/pages/TemplateDetailPage.js +11 -12
  49. package/dist/export/pages/TemplateDetailPage.js.map +1 -1
  50. package/dist/export/providers/ExportProvider.d.ts +0 -2
  51. package/dist/export/providers/ExportProvider.js +12 -16
  52. package/dist/export/providers/ExportProvider.js.map +1 -1
  53. package/dist/export/store/exportStore.d.ts +0 -2
  54. package/dist/export/store/exportStore.js +1 -2
  55. package/dist/export/store/exportStore.js.map +1 -1
  56. package/dist/export/types/index.d.ts +0 -1
  57. package/dist/export/utils/cn.d.ts +0 -2
  58. package/dist/export/utils/cn.js +2 -3
  59. package/dist/export/utils/cn.js.map +1 -1
  60. package/dist/export/utils/disabledModules.d.ts +0 -1
  61. package/dist/export/utils/disabledModules.js +3 -4
  62. package/dist/export/utils/disabledModules.js.map +1 -1
  63. package/dist/export/utils/events.d.ts +0 -2
  64. package/dist/export/utils/events.js +1 -2
  65. package/dist/export/utils/events.js.map +1 -1
  66. package/dist/export/utils/exportAuthority.d.ts +1 -6
  67. package/dist/export/utils/exportAuthority.js +5 -30
  68. package/dist/export/utils/exportAuthority.js.map +1 -1
  69. package/dist/export/utils/i18n.d.ts +0 -2
  70. package/dist/export/utils/i18n.js +1 -2
  71. package/dist/export/utils/i18n.js.map +1 -1
  72. package/dist/generated/global-operations.d.ts +4 -2
  73. package/dist/generated/global-types.d.ts +2 -22
  74. package/dist/generated/wspace-operations.d.ts +226 -181
  75. package/dist/generated/wspace-operations.js +1 -2
  76. package/dist/generated/wspace-operations.js.map +1 -1
  77. package/dist/generated/wspace-types.d.ts +4 -24
  78. package/dist/generated/wspace-types.js +1 -2
  79. package/dist/generated/wspace-types.js.map +1 -1
  80. package/dist/index.d.ts +0 -1
  81. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
  82. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
  83. package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
  84. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
  85. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
  86. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
  87. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +15 -16
  88. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
  89. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
  90. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
  91. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
  92. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
  93. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
  94. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
  95. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
  96. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
  97. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
  98. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
  99. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
  100. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
  101. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
  102. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
  103. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
  104. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
  105. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
  106. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
  107. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
  108. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
  109. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
  110. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
  111. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
  112. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
  113. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
  114. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
  115. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
  116. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
  117. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
  118. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
  119. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
  120. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
  121. package/dist/node_modules/@apollo/client/version.js +2 -3
  122. package/dist/node_modules/@apollo/client/version.js.map +1 -1
  123. package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
  124. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
  125. package/dist/node_modules/@wry/trie/lib/index.js +2 -3
  126. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
  127. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  128. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  129. package/dist/node_modules/graphql-ws/dist/client.js +76 -69
  130. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
  131. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
  132. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
  133. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
  134. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
  135. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
  136. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
  137. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
  138. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
  139. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
  140. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
  141. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
  142. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
  143. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
  144. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
  145. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
  146. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
  147. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
  148. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
  149. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
  150. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
  151. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
  152. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
  153. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
  154. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
  155. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
  156. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
  157. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
  158. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
  159. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
  160. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
  161. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
  162. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
  163. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
  164. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
  165. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
  166. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
  167. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  168. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  169. package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
  170. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  171. package/dist/test/happydom.d.ts +1 -0
  172. package/dist/translations/en.d.ts +0 -1
  173. package/dist/translations/en.js +1 -2
  174. package/dist/translations/en.js.map +1 -1
  175. package/dist/utils/nativeBridge.d.ts +0 -1
  176. package/dist/utils/nativeBridge.js +1 -2
  177. package/package.json +62 -46
  178. package/dist/dev/main.d.ts.map +0 -1
  179. package/dist/export/ExportRoot.d.ts.map +0 -1
  180. package/dist/export/ExportRoutes.d.ts.map +0 -1
  181. package/dist/export/components/ExportProgressBar.d.ts.map +0 -1
  182. package/dist/export/components/ExportStatusBadge.d.ts.map +0 -1
  183. package/dist/export/components/PageLayout.d.ts.map +0 -1
  184. package/dist/export/constants/enums.d.ts.map +0 -1
  185. package/dist/export/constants/index.d.ts.map +0 -1
  186. package/dist/export/hooks/useExportQueries.d.ts.map +0 -1
  187. package/dist/export/hooks/useTr.d.ts.map +0 -1
  188. package/dist/export/index.d.ts.map +0 -1
  189. package/dist/export/pages/CreateExportPage.d.ts.map +0 -1
  190. package/dist/export/pages/ExportDashboardPage.d.ts.map +0 -1
  191. package/dist/export/pages/ExportDetailPage.d.ts.map +0 -1
  192. package/dist/export/pages/ExportHistoryPage.d.ts.map +0 -1
  193. package/dist/export/pages/ExportLandingPage.d.ts.map +0 -1
  194. package/dist/export/pages/ExportTemplatesPage.d.ts.map +0 -1
  195. package/dist/export/pages/TemplateDetailPage.d.ts.map +0 -1
  196. package/dist/export/providers/ExportProvider.d.ts.map +0 -1
  197. package/dist/export/store/exportStore.d.ts.map +0 -1
  198. package/dist/export/types/index.d.ts.map +0 -1
  199. package/dist/export/utils/cn.d.ts.map +0 -1
  200. package/dist/export/utils/disabledModules.d.ts.map +0 -1
  201. package/dist/export/utils/events.d.ts.map +0 -1
  202. package/dist/export/utils/exportAuthority.d.ts.map +0 -1
  203. package/dist/export/utils/i18n.d.ts.map +0 -1
  204. package/dist/generated/global-operations.d.ts.map +0 -1
  205. package/dist/generated/global-types.d.ts.map +0 -1
  206. package/dist/generated/wspace-operations.d.ts.map +0 -1
  207. package/dist/generated/wspace-types.d.ts.map +0 -1
  208. package/dist/index.d.ts.map +0 -1
  209. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
  210. package/dist/translations/en.d.ts.map +0 -1
  211. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TemplateDetailPage.js","names":[],"sources":["../../../src/export/pages/TemplateDetailPage.tsx"],"sourcesContent":["import { useParams } from \"react-router\";\nimport { useState } from \"react\";\nimport {\n ArrowLeft,\n FileBox,\n Download,\n Play,\n Trash2,\n Clock,\n FileText,\n HardDrive,\n Loader2,\n} from \"lucide-react\";\nimport {\n GlassCard,\n CTAOverflowMenu,\n ShowMore,\n IllustratedEmptyState,\n NextSteps,\n type NextStep,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { CTAAction } from \"@burdenoff/fe-libs/ui\";\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 { useTr } from \"../hooks/useTr\";\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 tr = useTr();\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-text-secondary\">\n {tr(\"export.templateDetail.loading\", \"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 type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n aria-label={tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to templates\",\n )}\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\">\n {tr(\"export.templateDetail.notFound.title\", \"Template Not Found\")}\n </h1>\n </div>\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr(\n \"export.templateDetail.notFound.heading\",\n \"Template not found\",\n )}\n description={tr(\n \"export.templateDetail.notFound.description\",\n \"The template you are looking for does not exist.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"inline-flex items-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium\"\n >\n <ArrowLeft size={18} />\n {tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to Templates\",\n )}\n </button>\n }\n />\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 const overflowActions: CTAAction[] = template.isDefault\n ? []\n : [\n {\n label: tr(\"export.templateDetail.actions.delete\", \"Delete Template\"),\n icon: <Trash2 size={16} />,\n intent: \"destructive\",\n disabled: deleting,\n onSelect: () => setShowDeleteConfirm(true),\n },\n ];\n\n // Next-step guidance — what a new user would do with a saved template.\n const nextSteps: NextStep[] = [\n {\n id: \"use\",\n label: tr(\n \"export.templateDetail.nextSteps.use.label\",\n \"Start an export from this template\",\n ),\n description: tr(\n \"export.templateDetail.nextSteps.use.description\",\n \"Pre-fills a new export with this template's entity types and format.\",\n ),\n icon: <Play size={16} />,\n onClick: handleUseTemplate,\n },\n {\n id: \"browse\",\n label: tr(\n \"export.templateDetail.nextSteps.browse.label\",\n \"Browse all templates\",\n ),\n description: tr(\n \"export.templateDetail.nextSteps.browse.description\",\n \"Manage your other saved export configurations.\",\n ),\n icon: <FileBox size={16} />,\n onClick: () => navigate?.(joinPath(basePath, \"templates\")),\n },\n ];\n\n return (\n <PageLayout showHeader={false}>\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-accent-wash border border-border-seam p-6 shadow-[var(--shadow-pop)]\">\n <div className=\"relative z-10 flex flex-col sm:flex-row sm:items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n aria-label={tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to templates\",\n )}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-colors duration-200 self-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40\"\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"flex items-center gap-3 flex-1 min-w-0\">\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/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-text-secondary mt-1\">\n {template.isDefault\n ? tr(\n \"export.templateDetail.badge.default\",\n \"Default template\",\n )\n : tr(\"export.templateDetail.badge.custom\", \"Custom template\")}\n </p>\n </div>\n </div>\n <div className=\"flex-shrink-0\">\n <CTAOverflowMenu\n primary={{\n label: tr(\"export.templateDetail.actions.use\", \"Use Template\"),\n icon: <Play size={16} />,\n onSelect: handleUseTemplate,\n }}\n actions={overflowActions}\n />\n </div>\n </div>\n </div>\n\n {/* Description */}\n {template.description && (\n <div className=\"border border-border-seam rounded-xl p-5 bg-bg-surface\">\n <p className=\"text-sm text-text-secondary\">{template.description}</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: tr(\"export.templateDetail.info.format\", \"Format\"),\n value: getFormatDisplayName(template.format),\n },\n {\n icon: <HardDrive size={18} />,\n label: tr(\"export.templateDetail.info.archive\", \"Archive\"),\n // Backend template doesn't carry archiveFormat, default to ZIP\n value: getArchiveFormatDisplayName(\"ZIP\"),\n },\n {\n icon: <Download size={18} />,\n label: tr(\"export.templateDetail.info.entityTypes\", \"Entity Types\"),\n value: tr(\n \"export.templateDetail.info.entityTypesCount\",\n \"{{count}} type{{suffix}}\",\n {\n count: template.entityTypes.length,\n suffix: template.entityTypes.length !== 1 ? \"s\" : \"\",\n },\n ),\n },\n {\n icon: <Clock size={18} />,\n label: tr(\"export.templateDetail.info.lastUpdated\", \"Last Updated\"),\n value: new Date(template.updatedAt).toLocaleDateString(),\n },\n ].map((item) => (\n <GlassCard\n key={item.label}\n treatment=\"metric\"\n className=\"p-4 border-border-seam\"\n >\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n {item.icon}\n <span className=\"text-xs font-medium\">{item.label}</span>\n </div>\n <p className=\"font-bold text-lg tabular-nums\">{item.value}</p>\n </GlassCard>\n ))}\n </div>\n\n {/* Next-step guidance (dismissable, per-template) */}\n <NextSteps\n storageKey={`export-template-${template.id}`}\n title={tr(\"export.templateDetail.nextSteps.title\", \"What's next\")}\n steps={nextSteps}\n />\n\n {/* Entity Types */}\n <PageSection\n title={tr(\n \"export.templateDetail.entityTypes.title\",\n \"Included Entity Types\",\n )}\n description={tr(\n \"export.templateDetail.entityTypes.description\",\n \"Data types that will be exported\",\n )}\n >\n <ShowMore collapsedHeight={96}>\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 border-border-seam bg-bg-sunken/30\"\n >\n {entity}\n </span>\n ))}\n </div>\n </ShowMore>\n </PageSection>\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-bg-surface/80 backdrop-blur-sm p-4\"\n >\n <div className=\"w-full max-w-md rounded-xl border-2 border-border-subtle bg-bg-surface p-6 shadow-xl\">\n <h2 id=\"template-delete-title\" className=\"text-lg font-bold\">\n {tr(\"export.templateDetail.delete.title\", \"Delete template?\")}\n </h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n {tr(\n \"export.templateDetail.delete.description\",\n \"This removes the saved export configuration. Existing export jobs are not deleted.\",\n )}\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-subtle hover:bg-accent transition-colors font-medium\"\n >\n {tr(\"export.templateDetail.delete.keep\", \"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-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors font-medium disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : null}\n {tr(\n \"export.templateDetail.delete.confirmAction\",\n \"Delete Template\",\n )}\n </button>\n </div>\n </div>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,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,gBAA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,iDACA,mCACD;cAED,kBAAC,GAAD;KAAU,iBAAiB;eACzB,kBAAC,OAAD;MAAK,WAAU;gBACZ,EAAS,YAAY,KAAK,MACzB,kBAAC,QAAD;OAEE,WAAU;iBAET;OACI,EAJA,EAIA,CACP;MACE,CAAA;KACG,CAAA;IACC,CAAA;GAEb,KACC,kBAAC,OAAD;IACE,MAAK;IACL,cAAW;IACX,mBAAgB;IAChB,WAAU;cAEV,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,MAAD;OAAI,IAAG;OAAwB,WAAU;iBACtC,EAAG,sCAAsC,mBAAmB;OAC1D,CAAA;MACL,kBAAC,KAAD;OAAG,WAAU;iBACV,EACC,4CACA,qFACD;OACC,CAAA;MACJ,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,UAAD;QACE,MAAK;QACL,eAAe,EAAqB,GAAM;QAC1C,WAAU;kBAET,EAAG,qCAAqC,gBAAgB;QAClD,CAAA,EACT,kBAAC,UAAD;QACE,MAAK;QACL,SAAS;QACT,UAAU;QACV,WAAU;kBAJZ,CAMG,IACC,kBAAC,GAAD;SAAS,MAAM;SAAI,WAAU;SAAiB,CAAA,GAC5C,MACH,EACC,8CACA,kBACD,CACM;UACL;;MACF;;IACF,CAAA;GAEG"}
1
+ {"version":3,"file":"TemplateDetailPage.js","names":["joinPath","base","path","TemplateDetailPage","useParams","useExport","tr","useTr","showDeleteConfirm","setShowDeleteConfirm","useState","template","useExportTemplate","templateId","deleting","useDeleteExportTemplate","isLoading","Loader2","PageLayout","navigate","basePath","ArrowLeft","IllustratedEmptyState","handleUseTemplate","handleDelete","deleteTemplate","nativeNotify","overflowActions","Trash2","nextSteps","Play","FileBox","CTAOverflowMenu","FileText","getFormatDisplayName","HardDrive","getArchiveFormatDisplayName","Download","Clock","GlassCard","item","NextSteps","PageSection","ShowMore","entity"],"sources":["../../../src/export/pages/TemplateDetailPage.tsx"],"sourcesContent":["import { useParams } from \"react-router\";\nimport { useState } from \"react\";\nimport {\n ArrowLeft,\n FileBox,\n Download,\n Play,\n Trash2,\n Clock,\n FileText,\n HardDrive,\n Loader2,\n} from \"lucide-react\";\nimport {\n GlassCard,\n CTAOverflowMenu,\n ShowMore,\n IllustratedEmptyState,\n NextSteps,\n type NextStep,\n} from \"@burdenoff/fe-libs/ui\";\nimport type { CTAAction } from \"@burdenoff/fe-libs/ui\";\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 { useTr } from \"../hooks/useTr\";\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 tr = useTr();\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-text-secondary\">\n {tr(\"export.templateDetail.loading\", \"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 type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n aria-label={tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to templates\",\n )}\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\">\n {tr(\"export.templateDetail.notFound.title\", \"Template Not Found\")}\n </h1>\n </div>\n <IllustratedEmptyState\n illustration=\"empty-data\"\n title={tr(\n \"export.templateDetail.notFound.heading\",\n \"Template not found\",\n )}\n description={tr(\n \"export.templateDetail.notFound.description\",\n \"The template you are looking for does not exist.\",\n )}\n action={\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n className=\"inline-flex items-center gap-2 px-6 py-3 bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bg/90 transition-colors font-medium\"\n >\n <ArrowLeft size={18} />\n {tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to Templates\",\n )}\n </button>\n }\n />\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 const overflowActions: CTAAction[] = template.isDefault\n ? []\n : [\n {\n label: tr(\"export.templateDetail.actions.delete\", \"Delete Template\"),\n icon: <Trash2 size={16} />,\n intent: \"destructive\",\n disabled: deleting,\n onSelect: () => setShowDeleteConfirm(true),\n },\n ];\n\n // Next-step guidance — what a new user would do with a saved template.\n const nextSteps: NextStep[] = [\n {\n id: \"use\",\n label: tr(\n \"export.templateDetail.nextSteps.use.label\",\n \"Start an export from this template\",\n ),\n description: tr(\n \"export.templateDetail.nextSteps.use.description\",\n \"Pre-fills a new export with this template's entity types and format.\",\n ),\n icon: <Play size={16} />,\n onClick: handleUseTemplate,\n },\n {\n id: \"browse\",\n label: tr(\n \"export.templateDetail.nextSteps.browse.label\",\n \"Browse all templates\",\n ),\n description: tr(\n \"export.templateDetail.nextSteps.browse.description\",\n \"Manage your other saved export configurations.\",\n ),\n icon: <FileBox size={16} />,\n onClick: () => navigate?.(joinPath(basePath, \"templates\")),\n },\n ];\n\n return (\n <PageLayout showHeader={false}>\n {/* Header */}\n <div className=\"relative overflow-hidden rounded-xl bg-accent-wash border border-border-seam p-6 shadow-[var(--shadow-pop)]\">\n <div className=\"relative z-10 flex flex-col sm:flex-row sm:items-center gap-4\">\n <button\n type=\"button\"\n onClick={() => navigate?.(joinPath(basePath, \"templates\"))}\n aria-label={tr(\n \"export.templateDetail.actions.backToTemplates\",\n \"Back to templates\",\n )}\n className=\"p-2.5 hover:bg-accent rounded-lg transition-colors duration-200 self-start focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/40\"\n >\n <ArrowLeft size={20} />\n </button>\n <div className=\"flex items-center gap-3 flex-1 min-w-0\">\n <div className=\"p-2.5 rounded-lg bg-action-primary-bg/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-text-secondary mt-1\">\n {template.isDefault\n ? tr(\n \"export.templateDetail.badge.default\",\n \"Default template\",\n )\n : tr(\"export.templateDetail.badge.custom\", \"Custom template\")}\n </p>\n </div>\n </div>\n <div className=\"flex-shrink-0\">\n <CTAOverflowMenu\n primary={{\n label: tr(\"export.templateDetail.actions.use\", \"Use Template\"),\n icon: <Play size={16} />,\n onSelect: handleUseTemplate,\n }}\n actions={overflowActions}\n />\n </div>\n </div>\n </div>\n\n {/* Description */}\n {template.description && (\n <div className=\"border border-border-seam rounded-xl p-5 bg-bg-surface\">\n <p className=\"text-sm text-text-secondary\">{template.description}</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: tr(\"export.templateDetail.info.format\", \"Format\"),\n value: getFormatDisplayName(template.format),\n },\n {\n icon: <HardDrive size={18} />,\n label: tr(\"export.templateDetail.info.archive\", \"Archive\"),\n // Backend template doesn't carry archiveFormat, default to ZIP\n value: getArchiveFormatDisplayName(\"ZIP\"),\n },\n {\n icon: <Download size={18} />,\n label: tr(\"export.templateDetail.info.entityTypes\", \"Entity Types\"),\n value: tr(\n \"export.templateDetail.info.entityTypesCount\",\n \"{{count}} type{{suffix}}\",\n {\n count: template.entityTypes.length,\n suffix: template.entityTypes.length !== 1 ? \"s\" : \"\",\n },\n ),\n },\n {\n icon: <Clock size={18} />,\n label: tr(\"export.templateDetail.info.lastUpdated\", \"Last Updated\"),\n value: new Date(template.updatedAt).toLocaleDateString(),\n },\n ].map((item) => (\n <GlassCard\n key={item.label}\n treatment=\"metric\"\n className=\"p-4 border-border-seam\"\n >\n <div className=\"flex items-center gap-2 text-text-secondary mb-1\">\n {item.icon}\n <span className=\"text-xs font-medium\">{item.label}</span>\n </div>\n <p className=\"font-bold text-lg tabular-nums\">{item.value}</p>\n </GlassCard>\n ))}\n </div>\n\n {/* Next-step guidance (dismissable, per-template) */}\n <NextSteps\n storageKey={`export-template-${template.id}`}\n title={tr(\"export.templateDetail.nextSteps.title\", \"What's next\")}\n steps={nextSteps}\n />\n\n {/* Entity Types */}\n <PageSection\n title={tr(\n \"export.templateDetail.entityTypes.title\",\n \"Included Entity Types\",\n )}\n description={tr(\n \"export.templateDetail.entityTypes.description\",\n \"Data types that will be exported\",\n )}\n >\n <ShowMore collapsedHeight={96}>\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 border-border-seam bg-bg-sunken/30\"\n >\n {entity}\n </span>\n ))}\n </div>\n </ShowMore>\n </PageSection>\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-bg-surface/80 backdrop-blur-sm p-4\"\n >\n <div className=\"w-full max-w-md rounded-xl border-2 border-border-subtle bg-bg-surface p-6 shadow-xl\">\n <h2 id=\"template-delete-title\" className=\"text-lg font-bold\">\n {tr(\"export.templateDetail.delete.title\", \"Delete template?\")}\n </h2>\n <p className=\"mt-2 text-sm text-text-secondary\">\n {tr(\n \"export.templateDetail.delete.description\",\n \"This removes the saved export configuration. Existing export jobs are not deleted.\",\n )}\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-subtle hover:bg-accent transition-colors font-medium\"\n >\n {tr(\"export.templateDetail.delete.keep\", \"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-status-error-bg text-status-error-text hover:bg-status-error-bg/90 transition-colors font-medium disabled:opacity-50\"\n >\n {deleting ? (\n <Loader2 size={16} className=\"animate-spin\" />\n ) : null}\n {tr(\n \"export.templateDetail.delete.confirmAction\",\n \"Delete Template\",\n )}\n </button>\n </div>\n </div>\n </div>\n )}\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAsCA,IAAMA,KAAY,GAAc,OACZC,EAAK,SAAS,GAAG,IAAIA,EAAK,MAAM,GAAG,EAAE,IAAIA,MACzCC,EAAK,WAAW,GAAG,IAAIA,IAAO,IAAIA;AAStD,SAAgBC,IAAqB;CACnC,IAAM,EAAE,kBAAeC,EAAkC,GACnD,EAAE,cAAW,KAAK,gBAAaC,EAAU,GACzCC,IAAKC,EAAM,GACX,CAACC,GAAmBC,KAAwBC,EAAS,EAAK,GAE1D,EAAE,MAAMC,GAAU,iBAAcC,EAAkBC,CAAU,G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C,UAAAA,EAAK;KAAS,CAAA,CACpD;IATJ,GAAAA,EAAK,KASD,CACZ;GACE,CAAA;GAGL,kBAACC,GAAD;IACE,YAAY,mBAAmB9B,EAAS;IACxC,OAAOL,EAAG,yCAAyC,aAAa;IAChE,OAAOuB;GACR,CAAA;GAGD,kBAACa,GAAD;IACE,OAAOpC,EACL,2CACA,uBACF;IACA,aAAaA,EACX,iDACA,kCACF;IAEA,UAAA,kBAACqC,GAAD;KAAU,iBAAiB;KACzB,UAAA,kBAAC,OAAD;MAAK,WAAU;MACZ,UAAAhC,EAAS,YAAY,KAAK,MACzB,kBAAC,QAAD;OAEE,WAAU;OAET,UAAAiC;MACG,GAJCA,CAID,CACP;KACE,CAAA;IACG,CAAA;GACC,CAAA;GAEZpC,KACC,kBAAC,OAAD;IACE,MAAK;IACL,cAAW;IACX,mBAAgB;IAChB,WAAU;IAEV,UAAA,kBAAC,OAAD;KAAK,WAAU;KAAf,UAAA;MACE,kBAAC,MAAD;OAAI,IAAG;OAAwB,WAAU;OACtC,UAAAF,EAAG,sCAAsC,kBAAkB;MAC1D,CAAA;MACJ,kBAAC,KAAD;OAAG,WAAU;OACV,UAAAA,EACC,4CACA,oFACF;MACC,CAAA;MACH,kBAAC,OAAD;OAAK,WAAU;OAAf,UAAA,CACE,kBAAC,UAAD;QACE,MAAK;QACL,eAAeG,EAAqB,EAAK;QACzC,WAAU;QAET,UAAAH,EAAG,qCAAqC,eAAe;OAClD,CAAA,GACR,kBAAC,UAAD;QACE,MAAK;QACL,SAASkB;QACT,UAAUV;QACV,WAAU;QAJZ,UAAA,CAMGA,IACC,kBAACG,GAAD;SAAS,MAAM;SAAI,WAAU;QAAgB,CAAA,IAC3C,MACHX,EACC,8CACA,iBACF,CACM;OACL,CAAA,CAAA;;KACF;;GACF,CAAA;EAEG;;AAEhB"}
@@ -1,6 +1,5 @@
1
1
  import { FC, PropsWithChildren } from 'react';
2
2
  import { ExportRootProps } from '../types';
3
-
4
3
  /**
5
4
  * Hook to access Export context
6
5
  */
@@ -10,4 +9,3 @@ export declare const useExport: () => ExportRootProps;
10
9
  * Sets up routing, context, Apollo Client, and React Query client
11
10
  */
12
11
  export declare const ExportProvider: FC<PropsWithChildren<ExportRootProps>>;
13
- //# sourceMappingURL=ExportProvider.d.ts.map
@@ -10,7 +10,7 @@ import { onError as y } from "@apollo/client/link/error";
10
10
  import { ApolloProvider as b } from "@apollo/client/react";
11
11
  import { isAuthNetworkError as x, redirectToLogin as S } from "@burdenoff/fe-libs/shared/utils";
12
12
  import { jsx as C } from "react/jsx-runtime";
13
- //#region src/export/providers/ExportProvider.tsx
13
+ // src/export/providers/ExportProvider.tsx
14
14
  function w(e = []) {
15
15
  return e.some((e) => {
16
16
  let t = typeof e.extensions?.code == "string" ? e.extensions.code : "", n = typeof e.extensions?.errorCode == "string" ? e.extensions.errorCode : "", r = (e.message ?? "").toLowerCase();
@@ -44,7 +44,7 @@ var T = a(null), E = () => {
44
44
  defaultOptions: { queries: {
45
45
  retry: 1,
46
46
  refetchOnWindowFocus: !1,
47
- staleTime: 300 * 1e3
47
+ staleTime: 3e5
48
48
  } }
49
49
  });
50
50
  return e;
@@ -60,11 +60,8 @@ var T = a(null), E = () => {
60
60
  }), l = y(({ error: e, operation: t, forward: n }) => {
61
61
  if (!e) return;
62
62
  let r = w("errors" in e && Array.isArray(e.errors) ? e.errors : []);
63
- if (!R.current || !r || L.current) {
64
- e instanceof Error && x(e) && S();
65
- return;
66
- }
67
- return new g((e) => {
63
+ if (!R.current || !r || L.current) e instanceof Error && x(e) && S();
64
+ else return new g((e) => {
68
65
  L.current = !0, R.current().then((r) => {
69
66
  if (L.current = !1, !r) {
70
67
  S(), e.error(/* @__PURE__ */ Error("Failed to refresh workspace token"));
@@ -80,15 +77,15 @@ var T = a(null), E = () => {
80
77
  L.current = !1, e.error(t);
81
78
  });
82
79
  });
83
- }), u = o.websocket;
80
+ }), u = o.websocket, d = new t(n({
81
+ url: u,
82
+ connectionParams: Object.keys(a).length > 0 ? a : void 0
83
+ })), f = v(({ query: t }) => {
84
+ let n = e(t);
85
+ return n.kind === "OperationDefinition" && n.operation === "subscription";
86
+ }, d, _([l, c]));
84
87
  return new p({
85
- link: v(({ query: t }) => {
86
- let n = e(t);
87
- return n.kind === "OperationDefinition" && n.operation === "subscription";
88
- }, new t(n({
89
- url: u,
90
- connectionParams: Object.keys(a).length > 0 ? a : void 0
91
- })), _([l, c])),
88
+ link: f,
92
89
  cache: new h(),
93
90
  defaultOptions: { watchQuery: { fetchPolicy: "cache-and-network" } }
94
91
  });
@@ -110,7 +107,6 @@ var T = a(null), E = () => {
110
107
  children: /* @__PURE__ */ C(l, { children: V })
111
108
  });
112
109
  };
113
- //#endregion
114
110
  export { D as ExportProvider, E as useExport };
115
111
 
116
112
  //# sourceMappingURL=ExportProvider.js.map
@@ -1 +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\";\nimport {\n MutationCache,\n QueryClient,\n QueryClientProvider,\n} 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 {\n exportGatewayHeaders,\n exportGatewayEndpoints,\n} from \"../utils/exportAuthority\";\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 const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 5 * 60 * 1000, // 5 minutes\n },\n },\n });\n return client;\n }, []);\n\n // Create ApolloClient instance (memoized, recreated when tokens change)\n // The workspace gateway requires dual-token auth:\n // HTTP and subscription traffic use the public gateway with trusted host\n // credentials and explicit workspace/organization context. No subgraph bypass.\n const apolloClient = useMemo(() => {\n const headers = exportGatewayHeaders({\n authToken,\n workspaceToken,\n workspaceId,\n organizationId,\n });\n // Anonymous/missing-token requests still go through the gateway and fail there.\n const endpoints = exportGatewayEndpoints(\n apiGatewayUrl,\n window.location.origin,\n );\n const serviceUrl = endpoints.http;\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 = endpoints.websocket;\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 organizationId,\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":";;;;;;;;;;;;;AA+BA,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,YACjB,IACA,KAAW,EAAM,WAAW,IAAI,aAAa;AAEnD,SACE,MAAS,qBACT,MAAc,mBACd,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,gBAAgB,IACjC,EAAQ,SAAS,kBAAkB,IACnC,EAAQ,SAAS,eAAe,IAChC,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AAI,GAAY,MAAa;AAElC,IADA,EAAgB,UAAU,IAC1B,EAAqB,SAAU,CAC5B,MAAM,MAAe;AAEpB,SADA,EAAgB,UAAU,IACtB,CAAC,GAAY;AAEf,MADA,GAAiB,EACjB,EAAS,MAAM,gBAAI,MAAM,oCAAoC,CAAC;AAC9D;;AAGF,OAAU,YACP,EACC,SAAS,IAAkB,EAAE,QAGxB,EACL,SAAS;MACP,GAAG;MACH,6BAA6B,UAAU;MACxC,EACF,EACF;KACD,IAAM,IAAa,EAAQ,EAAU,CAAC,UAAU,EAAS;AACzD,kBAAa,EAAW,aAAa;MACrC,CACD,OAAO,MAAiB;AAEvB,KADA,EAAgB,UAAU,IAC1B,EAAS,MAAM,EAAI;MACnB;KACJ;IACF,EAGI,IAAQ,EAAU;AAqBxB,SAAO,IAAI,EAAa;GACtB,MAbgB,GACf,EAAE,eAAY;IACb,IAAM,IAAa,EAAkB,EAAM;AAC3C,WACE,EAAW,SAAS,yBACpB,EAAW,cAAc;MAbhB,IAAI,EACjB,EAAa;IACX,KAAK;IACL,kBAAkB,OAAO,KAAK,EAAQ,CAAC,SAAS,IAAI,IAAU,KAAA;IAC/D,CAAC,CACH,EAYC,EAAK,CAAC,GAAW,EAAS,CAAC,CAC5B;GAIC,OAAO,IAAI,GAAe;GAC1B,gBAAgB,EACd,YAAY,EACV,aAAa,qBACd,EACF;GACF,CAAC;IACD;EACD;EACA;EACA;EACA;EACA;EAID,CAAC,EAGI,IACJ,kBAAC,GAAD;EAAqB,QAAQ;YAC3B,kBAAC,EAAc,UAAf;GAAwB,OAAO;GAC5B;GACsB,CAAA;EACL,CAAA;AAYxB,QANI,IAEK,IAKP,kBAAC,GAAD;EAAgB,QAAQ;YACtB,kBAAC,GAAD,EAAA,UAAe,GAAuB,CAAA;EACvB,CAAA"}
1
+ {"version":3,"file":"ExportProvider.js","names":["hasSessionAuthErrors","errors","code","error","errorCode","message","ExportContext","createContext","useExport","context","useContext","ExportProvider","contextValue","isRefreshingRef","useRef","getWorkspaceTokenRef","getWorkspaceToken","queryClient","useMemo","client","QueryClient","MutationCache","apolloClient","headers","exportGatewayHeaders","endpoints","exportGatewayEndpoints","apiGatewayUrl","serviceUrl","httpLink","HttpLink","errorLink","onError","hasAuthError","isAuthNetworkError","redirectToLogin","Observable","freshToken","observer","existingHeaders","subscriber","forward","operation","err","wsUrl","wsLink","GraphQLWsLink","createClient","splitLink","split","definition","getMainDefinition","query","from","ApolloClient","InMemoryCache","authToken","workspaceToken","workspaceId","organizationId","content","QueryClientProvider","basePath","ApolloProvider","MemoryRouter"],"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\";\nimport {\n MutationCache,\n QueryClient,\n QueryClientProvider,\n} 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 {\n exportGatewayHeaders,\n exportGatewayEndpoints,\n} from \"../utils/exportAuthority\";\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 const client = new QueryClient({\n mutationCache: new MutationCache({\n onSuccess: () => {\n void client.invalidateQueries();\n },\n }),\n defaultOptions: {\n queries: {\n retry: 1,\n refetchOnWindowFocus: false,\n staleTime: 5 * 60 * 1000, // 5 minutes\n },\n },\n });\n return client;\n }, []);\n\n // Create ApolloClient instance (memoized, recreated when tokens change)\n // The workspace gateway requires dual-token auth:\n // HTTP and subscription traffic use the public gateway with trusted host\n // credentials and explicit workspace/organization context. No subgraph bypass.\n const apolloClient = useMemo(() => {\n const headers = exportGatewayHeaders({\n authToken,\n workspaceToken,\n workspaceId,\n organizationId,\n });\n // Anonymous/missing-token requests still go through the gateway and fail there.\n const endpoints = exportGatewayEndpoints(\n apiGatewayUrl,\n window.location.origin,\n );\n const serviceUrl = endpoints.http;\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 = endpoints.websocket;\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 organizationId,\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":";;;;;;;;;;;;;AA+BA,SAASA,EACP,IAGK,CAAC,GACG;CACT,OAAOC,EAAO,MAAM,MAAU;EAC5B,IAAMC,IACJ,OAAOC,EAAM,YAAY,QAAS,WAAWA,EAAM,WAAW,OAAO,IACjEC,IACJ,OAAOD,EAAM,YAAY,aAAc,WACnCA,EAAM,WAAW,YACjB,IACAE,KAAWF,EAAM,WAAW,GAAA,CAAI,YAAY;EAElD,OACED,MAAS,qBACTE,MAAc,mBACdC,EAAQ,SAAS,eAAe,KAChCA,EAAQ,SAAS,eAAe,KAChCA,EAAQ,SAAS,iBAAiB,KAClCA,EAAQ,SAAS,cAAc,KAC/BA,EAAQ,SAAS,iBAAiB,KAClCA,EAAQ,SAAS,yBAAyB,KAC1CA,EAAQ,SAAS,2BAA2B;CAEhD,CAAC;AACH;AAOA,IAAMC,IAAgBC,EAAyC,IAAI,GAKtDC,UAAkB;CAC7B,IAAMC,IAAUC,EAAWJ,C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, ExportDisplayMode, ExportPagination } from '../types';
2
-
3
2
  interface ExportState {
4
3
  selectedJob: ExportJob | null;
5
4
  viewMode: ExportDisplayMode;
@@ -14,4 +13,3 @@ interface ExportState {
14
13
  }
15
14
  export declare const useExportStore: import('zustand').UseBoundStore<import('zustand').StoreApi<ExportState>>;
16
15
  export {};
17
- //# sourceMappingURL=exportStore.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { create as e } from "zustand";
2
- //#region src/export/store/exportStore.ts
2
+ // src/export/store/exportStore.ts
3
3
  var t = {
4
4
  search: "",
5
5
  status: "all",
@@ -37,7 +37,6 @@ var t = {
37
37
  } })),
38
38
  resetPagination: () => e({ pagination: n })
39
39
  }));
40
- //#endregion
41
40
  export { r as useExportStore };
42
41
 
43
42
  //# sourceMappingURL=exportStore.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"exportStore.js","names":["defaultExportFilter","defaultPagination","useExportStore","create","set","job","mode","state","filter","p"],"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,IAAMA,IAAoC;CACxC,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,WAAW;AACb,GAEMC,IAAsC;CAC1C,MAAM;CACN,QAAQ;CACR,UAAU;AACZ,GAEaC,IAAiBC,GAAqB,OAAS;CAE1D,aAAa;CACb,UAAU;CACV,WAAWH;CACX,YAAYC;CAGZ,iBAAiB,MAAQG,EAAI,EAAE,aAAaC,EAAI,CAAC;CACjD,cAAc,MAASD,EAAI,EAAE,UAAUE,EAAK,CAAC;CAC7C,eAAe,MACbF,GAAK,OAAW;EACd,WAAW;GAAE,GAAGG,EAAM;GAAW,GAAGC;EAAO;EAE3C,YAAY;GAAE,GAAGD,EAAM;GAAY,MAAM;GAAG,QAAQ;EAAK;CAC3D,EAAE;CACJ,mBACEH,EAAI;EAAE,WAAWJ;EAAqB,YAAYC;CAAkB,CAAC;CACvE,gBAAgB,MACdG,GAAK,OAAW,EACd,YAAY;EAAE,GAAGG,EAAM;EAAY,GAAGE;CAAE,EAC1C,EAAE;CACJ,uBAAuBL,EAAI,EAAE,YAAYH,EAAkB,CAAC;AAC9D,EAAE"}
@@ -230,4 +230,3 @@ export type ExportView = "dashboard" | "new" | "history" | "templates";
230
230
  * View mode for export display
231
231
  */
232
232
  export type ExportDisplayMode = "list" | "grid";
233
- //# sourceMappingURL=index.d.ts.map
@@ -1,8 +1,6 @@
1
1
  import { ClassValue } from 'clsx';
2
-
3
2
  /**
4
3
  * Utility function to merge Tailwind CSS classes
5
4
  * Combines clsx for conditional classes and tailwind-merge for deduplication
6
5
  */
7
6
  export declare function cn(...inputs: ClassValue[]): string;
8
- //# sourceMappingURL=cn.d.ts.map
@@ -1,10 +1,9 @@
1
- import e from "../../node_modules/clsx/dist/clsx.js";
1
+ import { clsx as e } from "../../node_modules/clsx/dist/clsx.js";
2
2
  import { twMerge as t } from "../../node_modules/tailwind-merge/dist/bundle-mjs.js";
3
- //#region src/export/utils/cn.ts
3
+ // src/export/utils/cn.ts
4
4
  function n(...n) {
5
5
  return t(e(n));
6
6
  }
7
- //#endregion
8
7
  export { n as cn };
9
8
 
10
9
  //# sourceMappingURL=cn.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"cn.js","names":["cn","inputs","twMerge","clsx"],"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,SAAgBA,EAAG,GAAGC,GAAsB;CAC1C,OAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC7B"}
@@ -49,4 +49,3 @@ export declare function exportEntityProduct(entityType: string): string | null;
49
49
  * types, and every entity type inside the workspaces hub, are never foreign.
50
50
  */
51
51
  export declare function isForeignProductEntity(entityType: string, hostProductSlug: string | undefined): boolean;
52
- //# sourceMappingURL=disabledModules.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/export/utils/disabledModules.ts
1
+ // src/export/utils/disabledModules.ts
2
2
  var e = [
3
3
  "bigconsole",
4
4
  "botmanor",
@@ -14,7 +14,7 @@ var e = [
14
14
  "assethandler",
15
15
  "housingvista",
16
16
  "planmagnet"
17
- ], t = /* @__PURE__ */ "adaptercloud.artistrybase.assethandler.atheletebridge.bigconsole.botmanor.botlit.brainyrich.buildmyiq.collabkin.comradecircle.coolandlovely.cosmicintersection.crewfoundry.ecoimpacthub.eventfullymanaged.fluidgrids.ggnomad.govcitizenhub.headshotmarketing.healthybowl.hookmovies.housingvista.intelwatchtower.kadaikodi.labsofscience.manufacturedops.movethewheels.mybodyshield.planmagnet.proserviceworld.semanticfed.subscriberbot.technospam.theculturepost.theglobalfuel.timecampus.vibecontrols".split("."), n = new Set(["", "workspaces"]), r = { botlit: "botmanor" };
17
+ ], t = /* @__PURE__ */ "adaptercloud.artistrybase.assethandler.atheletebridge.bigconsole.botmanor.botlit.brainyrich.buildmyiq.collabkin.comradecircle.coolandlovely.cosmicintersection.crewfoundry.ecoimpacthub.eventfullymanaged.fluidgrids.ggnomad.govcitizenhub.headshotmarketing.healthybowl.hookmovies.housingvista.intelwatchtower.kadaikodi.labsofscience.manufacturedops.movethewheels.mybodyshield.planmagnet.proserviceworld.semanticfed.subscriberbot.technospam.theculturepost.theglobalfuel.timecampus.vibecontrols".split("."), n = /* @__PURE__ */ new Set(["", "workspaces"]), r = { botlit: "botmanor" };
18
18
  function i(e) {
19
19
  let t = e.toLowerCase();
20
20
  return r[t] ?? t;
@@ -35,7 +35,6 @@ function c(e, t) {
35
35
  let a = s(e);
36
36
  return a !== null && a !== r;
37
37
  }
38
- //#endregion
39
- export { o as isExportEntityDisabled, c as isForeignProductEntity };
38
+ export { e as DISABLED_EXPORT_MODULE_PREFIXES, t as PRODUCT_ENTITY_PREFIXES, s as exportEntityProduct, o as isExportEntityDisabled, c as isForeignProductEntity };
40
39
 
41
40
  //# sourceMappingURL=disabledModules.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"disabledModules.js","names":[],"sources":["../../../src/export/utils/disabledModules.ts"],"sourcesContent":["/**\n * Export entity availability.\n *\n * Two rules decide whether an entity type can be picked in the export wizard:\n *\n * 1. **Host product scoping.** Inside a product's own app shell (VibeControls,\n * FluidGrids, …) only that product's entity types and the shared workspace\n * entity types (files, folders, activity logs, billing, …) are offered;\n * other products' entity types are not listed at all. The workspaces app\n * (`workspaces`, also the fe-libs default when no shell identifies itself)\n * is the cross-product hub and is not scoped.\n *\n * 2. **Products whose export is not available yet.** Entity types belonging to\n * a product in {@link DISABLED_EXPORT_MODULE_PREFIXES} are still shown but\n * rendered **disabled** (greyed out, non-selectable) rather than hidden — so\n * users can see the capability exists without selecting it.\n *\n * Matching is by entity-type module prefix (entity types are seeded as\n * `<module>_<thing>`, e.g. `bigconsole_dashboards`).\n *\n * Reversible: remove a prefix from the disabled list to re-enable that\n * product's export entities.\n *\n * NOTE: the disabled list is a denylist, so a *new* product seeded on the\n * backend is enabled by default until its prefix is added here. That's\n * deliberate — workspaces-core modules (the allowed set) change far more often\n * than products are added, and an allowlist would silently hide new core entity\n * types. Adding a new product's export entities should include adding its\n * prefix to {@link PRODUCT_ENTITY_PREFIXES} (and here, until it exports).\n */\nexport const DISABLED_EXPORT_MODULE_PREFIXES = [\n \"bigconsole\",\n \"botmanor\",\n // Pre-rename BotManor entity types (the product was BotLit until 2026-10).\n \"botlit\",\n \"healthybowl\",\n \"crewfoundry\",\n \"movethewheels\",\n \"eventfullymanaged\",\n \"ggnomad\",\n \"headshotmarketing\",\n \"kadaikodi\",\n \"timecampus\",\n \"assethandler\",\n \"housingvista\",\n \"planmagnet\",\n] as const;\n\n/**\n * Entity-type prefixes that belong to a product (rather than to the shared\n * workspace platform). Used for host product scoping.\n */\nexport const PRODUCT_ENTITY_PREFIXES = [\n \"adaptercloud\",\n \"artistrybase\",\n \"assethandler\",\n \"atheletebridge\",\n \"bigconsole\",\n \"botmanor\",\n \"botlit\",\n \"brainyrich\",\n \"buildmyiq\",\n \"collabkin\",\n \"comradecircle\",\n \"coolandlovely\",\n \"cosmicintersection\",\n \"crewfoundry\",\n \"ecoimpacthub\",\n \"eventfullymanaged\",\n \"fluidgrids\",\n \"ggnomad\",\n \"govcitizenhub\",\n \"headshotmarketing\",\n \"healthybowl\",\n \"hookmovies\",\n \"housingvista\",\n \"intelwatchtower\",\n \"kadaikodi\",\n \"labsofscience\",\n \"manufacturedops\",\n \"movethewheels\",\n \"mybodyshield\",\n \"planmagnet\",\n \"proserviceworld\",\n \"semanticfed\",\n \"subscriberbot\",\n \"technospam\",\n \"theculturepost\",\n \"theglobalfuel\",\n \"timecampus\",\n \"vibecontrols\",\n] as const;\n\n/** Product slugs whose shell is the cross-product hub (never scoped). */\nconst UNSCOPED_HOST_PRODUCTS = new Set([\"\", \"workspaces\"]);\n\n/** Legacy product slugs and the product they belong to now. */\nconst PRODUCT_SLUG_ALIASES: Readonly<Record<string, string>> = {\n botlit: \"botmanor\",\n};\n\nfunction canonicalProduct(slug: string): string {\n const lower = slug.toLowerCase();\n return PRODUCT_SLUG_ALIASES[lower] ?? lower;\n}\n\nfunction hasModulePrefix(entityType: string, prefix: string): boolean {\n return entityType === prefix || entityType.startsWith(`${prefix}_`);\n}\n\n/**\n * True if the entity type belongs to a product whose export is disabled for now.\n */\nexport function isExportEntityDisabled(entityType: string): boolean {\n return DISABLED_EXPORT_MODULE_PREFIXES.some((prefix) =>\n hasModulePrefix(entityType, prefix),\n );\n}\n\n/**\n * The (canonical) product an entity type belongs to, or null for a shared\n * workspace-platform entity type.\n */\nexport function exportEntityProduct(entityType: string): string | null {\n const prefix = PRODUCT_ENTITY_PREFIXES.find((p) =>\n hasModulePrefix(entityType, p),\n );\n return prefix ? canonicalProduct(prefix) : null;\n}\n\n/**\n * True if the entity type belongs to another product than the host shell's,\n * so it should not be offered in this shell at all. Shared workspace entity\n * types, and every entity type inside the workspaces hub, are never foreign.\n */\nexport function isForeignProductEntity(\n entityType: string,\n hostProductSlug: string | undefined,\n): boolean {\n const host = canonicalProduct(hostProductSlug ?? \"\");\n if (UNSCOPED_HOST_PRODUCTS.has(host)) return false;\n const product = exportEntityProduct(entityType);\n return product !== null && product !== host;\n}\n"],"mappings":";AA8BA,IAAa,IAAkC;CAC7C;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EAMY,IAA0B,qgBAuCtC,EAGK,IAAyB,IAAI,IAAI,CAAC,IAAI,aAAa,CAAC,EAGpD,IAAyD,EAC7D,QAAQ,YACT;AAED,SAAS,EAAiB,GAAsB;CAC9C,IAAM,IAAQ,EAAK,aAAa;AAChC,QAAO,EAAqB,MAAU;;AAGxC,SAAS,EAAgB,GAAoB,GAAyB;AACpE,QAAO,MAAe,KAAU,EAAW,WAAW,GAAG,EAAO,GAAG;;AAMrE,SAAgB,EAAuB,GAA6B;AAClE,QAAO,EAAgC,MAAM,MAC3C,EAAgB,GAAY,EAAO,CACpC;;AAOH,SAAgB,EAAoB,GAAmC;CACrE,IAAM,IAAS,EAAwB,MAAM,MAC3C,EAAgB,GAAY,EAAE,CAC/B;AACD,QAAO,IAAS,EAAiB,EAAO,GAAG;;AAQ7C,SAAgB,EACd,GACA,GACS;CACT,IAAM,IAAO,EAAiB,KAAmB,GAAG;AACpD,KAAI,EAAuB,IAAI,EAAK,CAAE,QAAO;CAC7C,IAAM,IAAU,EAAoB,EAAW;AAC/C,QAAO,MAAY,QAAQ,MAAY"}
1
+ {"version":3,"file":"disabledModules.js","names":["DISABLED_EXPORT_MODULE_PREFIXES","PRODUCT_ENTITY_PREFIXES","UNSCOPED_HOST_PRODUCTS","PRODUCT_SLUG_ALIASES","canonicalProduct","lower","slug","hasModulePrefix","entityType","prefix","isExportEntityDisabled","exportEntityProduct","p","isForeignProductEntity","host","hostProductSlug","product"],"sources":["../../../src/export/utils/disabledModules.ts"],"sourcesContent":["/**\n * Export entity availability.\n *\n * Two rules decide whether an entity type can be picked in the export wizard:\n *\n * 1. **Host product scoping.** Inside a product's own app shell (VibeControls,\n * FluidGrids, …) only that product's entity types and the shared workspace\n * entity types (files, folders, activity logs, billing, …) are offered;\n * other products' entity types are not listed at all. The workspaces app\n * (`workspaces`, also the fe-libs default when no shell identifies itself)\n * is the cross-product hub and is not scoped.\n *\n * 2. **Products whose export is not available yet.** Entity types belonging to\n * a product in {@link DISABLED_EXPORT_MODULE_PREFIXES} are still shown but\n * rendered **disabled** (greyed out, non-selectable) rather than hidden — so\n * users can see the capability exists without selecting it.\n *\n * Matching is by entity-type module prefix (entity types are seeded as\n * `<module>_<thing>`, e.g. `bigconsole_dashboards`).\n *\n * Reversible: remove a prefix from the disabled list to re-enable that\n * product's export entities.\n *\n * NOTE: the disabled list is a denylist, so a *new* product seeded on the\n * backend is enabled by default until its prefix is added here. That's\n * deliberate — workspaces-core modules (the allowed set) change far more often\n * than products are added, and an allowlist would silently hide new core entity\n * types. Adding a new product's export entities should include adding its\n * prefix to {@link PRODUCT_ENTITY_PREFIXES} (and here, until it exports).\n */\nexport const DISABLED_EXPORT_MODULE_PREFIXES = [\n \"bigconsole\",\n \"botmanor\",\n // Pre-rename BotManor entity types (the product was BotLit until 2026-10).\n \"botlit\",\n \"healthybowl\",\n \"crewfoundry\",\n \"movethewheels\",\n \"eventfullymanaged\",\n \"ggnomad\",\n \"headshotmarketing\",\n \"kadaikodi\",\n \"timecampus\",\n \"assethandler\",\n \"housingvista\",\n \"planmagnet\",\n] as const;\n\n/**\n * Entity-type prefixes that belong to a product (rather than to the shared\n * workspace platform). Used for host product scoping.\n */\nexport const PRODUCT_ENTITY_PREFIXES = [\n \"adaptercloud\",\n \"artistrybase\",\n \"assethandler\",\n \"atheletebridge\",\n \"bigconsole\",\n \"botmanor\",\n \"botlit\",\n \"brainyrich\",\n \"buildmyiq\",\n \"collabkin\",\n \"comradecircle\",\n \"coolandlovely\",\n \"cosmicintersection\",\n \"crewfoundry\",\n \"ecoimpacthub\",\n \"eventfullymanaged\",\n \"fluidgrids\",\n \"ggnomad\",\n \"govcitizenhub\",\n \"headshotmarketing\",\n \"healthybowl\",\n \"hookmovies\",\n \"housingvista\",\n \"intelwatchtower\",\n \"kadaikodi\",\n \"labsofscience\",\n \"manufacturedops\",\n \"movethewheels\",\n \"mybodyshield\",\n \"planmagnet\",\n \"proserviceworld\",\n \"semanticfed\",\n \"subscriberbot\",\n \"technospam\",\n \"theculturepost\",\n \"theglobalfuel\",\n \"timecampus\",\n \"vibecontrols\",\n] as const;\n\n/** Product slugs whose shell is the cross-product hub (never scoped). */\nconst UNSCOPED_HOST_PRODUCTS = new Set([\"\", \"workspaces\"]);\n\n/** Legacy product slugs and the product they belong to now. */\nconst PRODUCT_SLUG_ALIASES: Readonly<Record<string, string>> = {\n botlit: \"botmanor\",\n};\n\nfunction canonicalProduct(slug: string): string {\n const lower = slug.toLowerCase();\n return PRODUCT_SLUG_ALIASES[lower] ?? lower;\n}\n\nfunction hasModulePrefix(entityType: string, prefix: string): boolean {\n return entityType === prefix || entityType.startsWith(`${prefix}_`);\n}\n\n/**\n * True if the entity type belongs to a product whose export is disabled for now.\n */\nexport function isExportEntityDisabled(entityType: string): boolean {\n return DISABLED_EXPORT_MODULE_PREFIXES.some((prefix) =>\n hasModulePrefix(entityType, prefix),\n );\n}\n\n/**\n * The (canonical) product an entity type belongs to, or null for a shared\n * workspace-platform entity type.\n */\nexport function exportEntityProduct(entityType: string): string | null {\n const prefix = PRODUCT_ENTITY_PREFIXES.find((p) =>\n hasModulePrefix(entityType, p),\n );\n return prefix ? canonicalProduct(prefix) : null;\n}\n\n/**\n * True if the entity type belongs to another product than the host shell's,\n * so it should not be offered in this shell at all. Shared workspace entity\n * types, and every entity type inside the workspaces hub, are never foreign.\n */\nexport function isForeignProductEntity(\n entityType: string,\n hostProductSlug: string | undefined,\n): boolean {\n const host = canonicalProduct(hostProductSlug ?? \"\");\n if (UNSCOPED_HOST_PRODUCTS.has(host)) return false;\n const product = exportEntityProduct(entityType);\n return product !== null && product !== host;\n}\n"],"mappings":";AA8BA,IAAaA,IAAkC;CAC7C;CACA;CAEA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,GAMaC,IAA0B,ogBAuCvC,GAGMC,oBAAyB,IAAI,IAAI,CAAC,IAAI,YAAY,CAAC,GAGnDC,IAAyD,EAC7D,QAAQ,WACV;AAEA,SAASC,EAAiB,GAAsB;CAC9C,IAAMC,IAAQC,EAAK,YAAY;CAC/B,OAAOH,EAAqBE,MAAUA;AACxC;AAEA,SAASE,EAAgB,GAAoB,GAAyB;CACpE,OAAOC,MAAeC,KAAUD,EAAW,WAAW,GAAGC,EAAO,EAAE;AACpE;AAKA,SAAgBC,EAAuB,GAA6B;CAClE,OAAOV,EAAgC,MAAM,MAC3CO,EAAgBC,GAAYC,CAAM,CACpC;AACF;AAMA,SAAgBE,EAAoB,GAAmC;CACrE,IAAMF,IAASR,EAAwB,MAAM,MAC3CM,EAAgBC,GAAYI,CAAC,CAC/B;CACA,OAAOH,IAASL,EAAiBK,CAAM,IAAI;AAC7C;AAOA,SAAgBI,EACd,GACA,GACS;CACT,IAAMC,IAAOV,EAAiBW,KAAmB,EAAE;CACnD,IAAIb,EAAuB,IAAIY,CAAI,GAAG,OAAO;CAC7C,IAAME,IAAUL,EAAoBH,CAAU;CAC9C,OAAOQ,MAAY,QAAQA,MAAYF;AACzC"}
@@ -1,7 +1,5 @@
1
1
  import { ExportRootProps } from '../types';
2
-
3
2
  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
3
  type ExportEventPayload = Record<string, unknown>;
5
4
  export declare function emitExportEvent(context: Pick<ExportRootProps, "eventBus" | "workspaceId">, name: ExportEventName, payload?: ExportEventPayload): void;
6
5
  export {};
7
- //# sourceMappingURL=events.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/export/utils/events.ts
1
+ // src/export/utils/events.ts
2
2
  function e(e, t, n = {}) {
3
3
  let r = {
4
4
  workspaceId: e.workspaceId,
@@ -10,7 +10,6 @@ function e(e, t, n = {}) {
10
10
  payload: r
11
11
  } }));
12
12
  }
13
- //#endregion
14
13
  export { e as emitExportEvent };
15
14
 
16
15
  //# sourceMappingURL=events.js.map
@@ -1 +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"}
1
+ {"version":3,"file":"events.js","names":["emitExportEvent","eventPayload","context","payload","name"],"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,SAAgBA,EACd,GACA,GACA,IAA8B,CAAC,GACzB;CACN,IAAMC,IAAe;EACnB,aAAaC,EAAQ;EACrB,GAAGC;CACL;CAIA,AAFAD,EAAQ,UAAU,OAAOE,GAAMH,CAAY,GAEvC,OAAO,SAAW,OACpB,OAAO,cACL,IAAI,YAAY,uBAAuB,EACrC,QAAQ;EACN;EACA,QAAQ,EAAE,KAAK,iBAAiB;EAChC,SAASA;CACX,EACF,CAAC,CACH;AAEJ"}
@@ -1,8 +1,4 @@
1
- import { DocumentNode } from 'graphql';
2
- import { ExportJob, ExportScope } from '../types';
3
-
4
- /** Preserve the typed response alias while selecting the gateway-authorized root. */
5
- export declare function exportScopeDocument(document: DocumentNode, scope: ExportScope, kind: "create" | "retry"): DocumentNode;
1
+ import { ExportJob } from '../types';
6
2
  export declare function exportGatewayHeaders(input: {
7
3
  authToken?: string;
8
4
  workspaceToken?: string;
@@ -15,4 +11,3 @@ export declare function exportGatewayEndpoints(apiGatewayUrl: string | undefined
15
11
  };
16
12
  /** The complete export CTA must never download only the first chunk. */
17
13
  export declare function exportArchiveDownload(job: ExportJob | null | undefined, now?: number): string | undefined;
18
- //# sourceMappingURL=exportAuthority.d.ts.map
@@ -1,33 +1,9 @@
1
- import { visit as e } from "graphql";
2
- //#region src/export/utils/exportAuthority.ts
3
- var t = {
4
- INDIVIDUAL: "createExportJob",
5
- WORKSPACE_ADMIN: "createWorkspaceExportJob",
6
- ORG_ADMIN: "createOrganizationExportJob"
7
- }, n = {
8
- INDIVIDUAL: "retryExportJob",
9
- WORKSPACE_ADMIN: "retryWorkspaceExportJob",
10
- ORG_ADMIN: "retryOrganizationExportJob"
11
- };
12
- function r(r, i, a) {
13
- let o = a === "create" ? "createExportJob" : "retryExportJob", s = (a === "create" ? t : n)[i];
14
- if (!s) throw Error("Unsupported export scope");
15
- return e(r, { Field(e) {
16
- if (e.name.value === o) return {
17
- ...e,
18
- alias: e.alias ?? e.name,
19
- name: {
20
- ...e.name,
21
- value: s
22
- }
23
- };
24
- } });
25
- }
26
- function i(e) {
1
+ // src/export/utils/exportAuthority.ts
2
+ function e(e) {
27
3
  let t = {};
28
4
  return e.authToken && (t.Authorization = `Bearer ${e.authToken}`), e.workspaceToken && (t["X-Workspace-Authorization"] = `Bearer ${e.workspaceToken}`), e.workspaceId && (t["x-workspace-id"] = e.workspaceId), e.organizationId && (t["x-org-id"] = e.organizationId), t;
29
5
  }
30
- function a(e, t) {
6
+ function t(e, t) {
31
7
  let n = e?.replace(/\/$/, ""), r = n ? n.endsWith("/workspaces/graphql") ? n : `${n}/workspaces/graphql` : "/workspaces/graphql", i = new URL(r, t);
32
8
  if (i.protocol !== "http:" && i.protocol !== "https:") throw Error("Invalid export gateway protocol");
33
9
  let a = new URL(i);
@@ -36,7 +12,7 @@ function a(e, t) {
36
12
  websocket: a.toString()
37
13
  };
38
14
  }
39
- function o(e, t = Date.now()) {
15
+ function n(e, t = Date.now()) {
40
16
  if (e?.status !== "COMPLETED" || e.archiveFormat !== "ZIP" || !e.archiveFileId || !e.downloadUrl || !e.downloadExpiresAt) return;
41
17
  let n = Date.parse(e.downloadExpiresAt);
42
18
  if (!(!Number.isFinite(n) || n <= t)) try {
@@ -46,7 +22,6 @@ function o(e, t = Date.now()) {
46
22
  return;
47
23
  }
48
24
  }
49
- //#endregion
50
- export { o as exportArchiveDownload, a as exportGatewayEndpoints, i as exportGatewayHeaders, r as exportScopeDocument };
25
+ export { n as exportArchiveDownload, t as exportGatewayEndpoints, e as exportGatewayHeaders };
51
26
 
52
27
  //# sourceMappingURL=exportAuthority.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exportAuthority.js","names":[],"sources":["../../../src/export/utils/exportAuthority.ts"],"sourcesContent":["import { visit, type DocumentNode } from \"graphql\";\nimport type { ExportJob, ExportScope } from \"../types\";\n\nconst CREATE = {\n INDIVIDUAL: \"createExportJob\",\n WORKSPACE_ADMIN: \"createWorkspaceExportJob\",\n ORG_ADMIN: \"createOrganizationExportJob\",\n} satisfies Record<ExportScope, string>;\nconst RETRY = {\n INDIVIDUAL: \"retryExportJob\",\n WORKSPACE_ADMIN: \"retryWorkspaceExportJob\",\n ORG_ADMIN: \"retryOrganizationExportJob\",\n} satisfies Record<ExportScope, string>;\n\n/** Preserve the typed response alias while selecting the gateway-authorized root. */\nexport function exportScopeDocument(\n document: DocumentNode,\n scope: ExportScope,\n kind: \"create\" | \"retry\",\n): DocumentNode {\n const original = kind === \"create\" ? \"createExportJob\" : \"retryExportJob\";\n const target = (kind === \"create\" ? CREATE : RETRY)[scope];\n if (!target) throw new Error(\"Unsupported export scope\");\n return visit(document, {\n Field(node) {\n if (node.name.value !== original) return;\n return {\n ...node,\n alias: node.alias ?? node.name,\n name: { ...node.name, value: target },\n };\n },\n });\n}\n\nexport function exportGatewayHeaders(input: {\n authToken?: string;\n workspaceToken?: string;\n workspaceId?: string;\n organizationId?: string;\n}): Record<string, string> {\n const headers: Record<string, string> = {};\n if (input.authToken) headers.Authorization = `Bearer ${input.authToken}`;\n if (input.workspaceToken)\n headers[\"X-Workspace-Authorization\"] = `Bearer ${input.workspaceToken}`;\n if (input.workspaceId) headers[\"x-workspace-id\"] = input.workspaceId;\n if (input.organizationId) headers[\"x-org-id\"] = input.organizationId;\n return headers;\n}\n\nexport function exportGatewayEndpoints(\n apiGatewayUrl: string | undefined,\n pageOrigin: string,\n): { http: string; websocket: string } {\n const base = apiGatewayUrl?.replace(/\\/$/, \"\");\n const endpoint = base\n ? base.endsWith(\"/workspaces/graphql\")\n ? base\n : `${base}/workspaces/graphql`\n : \"/workspaces/graphql\";\n const http = new URL(endpoint, pageOrigin);\n if (http.protocol !== \"http:\" && http.protocol !== \"https:\")\n throw new Error(\"Invalid export gateway protocol\");\n const websocket = new URL(http);\n websocket.protocol = http.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n return { http: http.toString(), websocket: websocket.toString() };\n}\n\n/** The complete export CTA must never download only the first chunk. */\nexport function exportArchiveDownload(\n job: ExportJob | null | undefined,\n now = Date.now(),\n): string | undefined {\n if (\n job?.status !== \"COMPLETED\" ||\n job.archiveFormat !== \"ZIP\" ||\n !job.archiveFileId ||\n !job.downloadUrl ||\n !job.downloadExpiresAt\n )\n return;\n const expiry = Date.parse(job.downloadExpiresAt);\n if (!Number.isFinite(expiry) || expiry <= now) return;\n try {\n const url = new URL(job.downloadUrl);\n if (\n url.protocol !== \"https:\" &&\n !(\n url.protocol === \"http:\" &&\n [\"localhost\", \"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K,WAAW,eAChB,EAAI,kBAAkB,SACtB,CAAC,EAAI,iBACL,CAAC,EAAI,eACL,CAAC,EAAI,kBAEL;CACF,IAAM,IAAS,KAAK,MAAM,EAAI,kBAAkB;AAC5C,QAAC,OAAO,SAAS,EAAO,IAAI,KAAU,GAC1C,KAAI;EACF,IAAM,IAAM,IAAI,IAAI,EAAI,YAAY;AASpC,SAPE,EAAI,aAAa,YACjB,EACE,EAAI,aAAa,WACjB,CAAC,aAAa,YAAY,CAAC,SAAS,EAAI,SAAS,IAGnD,SACK,EAAI;SACL;AACN"}
1
+ {"version":3,"file":"exportAuthority.js","names":["exportGatewayHeaders","headers","input","exportGatewayEndpoints","base","apiGatewayUrl","endpoint","http","pageOrigin","websocket","exportArchiveDownload","job","expiry","now","url"],"sources":["../../../src/export/utils/exportAuthority.ts"],"sourcesContent":["import type { ExportJob } from \"../types\";\n\nexport function exportGatewayHeaders(input: {\n authToken?: string;\n workspaceToken?: string;\n workspaceId?: string;\n organizationId?: string;\n}): Record<string, string> {\n const headers: Record<string, string> = {};\n if (input.authToken) headers.Authorization = `Bearer ${input.authToken}`;\n if (input.workspaceToken)\n headers[\"X-Workspace-Authorization\"] = `Bearer ${input.workspaceToken}`;\n if (input.workspaceId) headers[\"x-workspace-id\"] = input.workspaceId;\n if (input.organizationId) headers[\"x-org-id\"] = input.organizationId;\n return headers;\n}\n\nexport function exportGatewayEndpoints(\n apiGatewayUrl: string | undefined,\n pageOrigin: string,\n): { http: string; websocket: string } {\n const base = apiGatewayUrl?.replace(/\\/$/, \"\");\n const endpoint = base\n ? base.endsWith(\"/workspaces/graphql\")\n ? base\n : `${base}/workspaces/graphql`\n : \"/workspaces/graphql\";\n const http = new URL(endpoint, pageOrigin);\n if (http.protocol !== \"http:\" && http.protocol !== \"https:\")\n throw new Error(\"Invalid export gateway protocol\");\n const websocket = new URL(http);\n websocket.protocol = http.protocol === \"https:\" ? \"wss:\" : \"ws:\";\n return { http: http.toString(), websocket: websocket.toString() };\n}\n\n/** The complete export CTA must never download only the first chunk. */\nexport function exportArchiveDownload(\n job: ExportJob | null | undefined,\n now = Date.now(),\n): string | undefined {\n if (\n job?.status !== \"COMPLETED\" ||\n job.archiveFormat !== \"ZIP\" ||\n !job.archiveFileId ||\n !job.downloadUrl ||\n !job.downloadExpiresAt\n )\n return;\n const expiry = Date.parse(job.downloadExpiresAt);\n if (!Number.isFinite(expiry) || expiry <= now) return;\n try {\n const url = new URL(job.downloadUrl);\n if (\n url.protocol !== \"https:\" &&\n !(\n url.protocol === \"http:\" &&\n [\"localhost\", \"127.0.0.1\"].includes(url.hostname)\n )\n )\n return;\n return job.downloadUrl;\n } catch {\n return;\n }\n}\n"],"mappings":";AAEA,SAAgBA,EAAqB,GAKV;CACzB,IAAMC,IAAkC,CAAC;CAMzC,OALIC,EAAM,cAAW,EAAQ,gBAAgB,UAAUA,EAAM,cACzDA,EAAM,mBACR,EAAQ,+BAA+B,UAAUA,EAAM,mBACrDA,EAAM,gBAAa,EAAQ,oBAAoBA,EAAM,cACrDA,EAAM,mBAAgB,EAAQ,cAAcA,EAAM,iBAC/CD;AACT;AAEA,SAAgBE,EACd,GACA,GACqC;CACrC,IAAMC,IAAOC,GAAe,QAAQ,OAAO,EAAE,GACvCC,IAAWF,IACbA,EAAK,SAAS,qBAAqB,IACjCA,IACA,GAAGA,EAAK,uBACV,uBACEG,IAAO,IAAI,IAAID,GAAUE,CAAU;CACzC,IAAID,EAAK,aAAa,WAAWA,EAAK,aAAa,UACjD,MAAU,MAAM,iCAAiC;CACnD,IAAME,IAAY,IAAI,IAAIF,CAAI;CAE9B,OADA,EAAU,WAAWA,EAAK,aAAa,WAAW,SAAS,OACpD;EAAE,MAAMA,EAAK,SAAS;EAAG,WAAWE,EAAU,SAAS;CAAE;AAClE;AAGA,SAAgBC,EACd,GACA,IAAM,KAAK,IAAI,GACK;CACpB,IACEC,GAAK,WAAW,eAChBA,EAAI,kBAAkB,SACtB,CAACA,EAAI,iBACL,CAACA,EAAI,eACL,CAACA,EAAI,mBAEL;CACF,IAAMC,IAAS,KAAK,MAAMD,EAAI,iBAAiB;CAC/C,IAAI,GAAC,OAAO,SAASC,CAAM,KAAKA,KAAUC,IAC1C,IAAI;EACF,IAAMC,IAAM,IAAI,IAAIH,EAAI,WAAW;EASnC,OAPEG,EAAI,aAAa,YACjB,EACEA,EAAI,aAAa,WACjB,CAAC,aAAa,WAAW,CAAC,CAAC,SAASA,EAAI,QAAQ,KAGlD,SACKH,EAAI;CACb,QAAQ;EACN;CACF;AACF"}
@@ -1,5 +1,4 @@
1
1
  import { I18nContextValue } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';
2
-
3
2
  export type TranslationParams = Record<string, string | number>;
4
3
  /**
5
4
  * Interpolate `{{key}}` placeholders in a fallback string.
@@ -19,4 +18,3 @@ export declare function interpolateFallback(fallback: string, params?: Translati
19
18
  * already has access to `t`).
20
19
  */
21
20
  export declare function tWithFallback(t: I18nContextValue["t"], key: string, fallback: string, params?: TranslationParams): string;
22
- //# sourceMappingURL=i18n.d.ts.map
@@ -1,8 +1,7 @@
1
- //#region src/export/utils/i18n.ts
1
+ // src/export/utils/i18n.ts
2
2
  function e(e, t) {
3
3
  return t ? Object.entries(t).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${t}\\}\\}`, "g"), String(n)), e) : e;
4
4
  }
5
- //#endregion
6
5
  export { e as interpolateFallback };
7
6
 
8
7
  //# sourceMappingURL=i18n.js.map
@@ -1 +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\nexport type TranslationParams = Record<string, string | number>;\n\n/**\n * Interpolate `{{key}}` placeholders in a fallback string.\n *\n * Matches the VibeControls `useTr` interpolation convention so call sites\n * across the platform stay consistent.\n */\nexport function interpolateFallback(\n fallback: string,\n params?: TranslationParams,\n): string {\n if (!params) {\n return fallback;\n }\n\n return Object.entries(params).reduce(\n (str, [key, value]) =>\n str.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, \"g\"), String(value)),\n fallback,\n );\n}\n\n/**\n * Translate a key using the provided `t` function, falling back to the\n * caller's English string when the key is missing.\n *\n * Supports optional interpolation with `{{key}}` placeholders.\n *\n * Prefer the `useTr()` hook in components; this helper is useful when a\n * translation is needed outside a hook context (e.g. inside a callback that\n * already has access to `t`).\n */\nexport function tWithFallback(\n t: I18nContextValue[\"t\"],\n key: string,\n fallback: string,\n params?: TranslationParams,\n): string {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n return interpolateFallback(raw, params);\n}\n"],"mappings":";AAUA,SAAgB,EACd,GACA,GACQ;AAKR,QAJK,IAIE,OAAO,QAAQ,EAAO,CAAC,QAC3B,GAAK,CAAC,GAAK,OACV,EAAI,QAAY,OAAO,SAAS,EAAI,SAAS,IAAI,EAAE,OAAO,EAAM,CAAC,EACnE,EACD,GAPQ"}
1
+ {"version":3,"file":"i18n.js","names":["interpolateFallback","params","key","value","str","fallback"],"sources":["../../../src/export/utils/i18n.ts"],"sourcesContent":["import type { I18nContextValue } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\n\nexport type TranslationParams = Record<string, string | number>;\n\n/**\n * Interpolate `{{key}}` placeholders in a fallback string.\n *\n * Matches the VibeControls `useTr` interpolation convention so call sites\n * across the platform stay consistent.\n */\nexport function interpolateFallback(\n fallback: string,\n params?: TranslationParams,\n): string {\n if (!params) {\n return fallback;\n }\n\n return Object.entries(params).reduce(\n (str, [key, value]) =>\n str.replace(new RegExp(`\\\\{\\\\{${key}\\\\}\\\\}`, \"g\"), String(value)),\n fallback,\n );\n}\n\n/**\n * Translate a key using the provided `t` function, falling back to the\n * caller's English string when the key is missing.\n *\n * Supports optional interpolation with `{{key}}` placeholders.\n *\n * Prefer the `useTr()` hook in components; this helper is useful when a\n * translation is needed outside a hook context (e.g. inside a callback that\n * already has access to `t`).\n */\nexport function tWithFallback(\n t: I18nContextValue[\"t\"],\n key: string,\n fallback: string,\n params?: TranslationParams,\n): string {\n const translated = t(key);\n const raw = translated === key ? fallback : translated;\n return interpolateFallback(raw, params);\n}\n"],"mappings":";AAUA,SAAgBA,EACd,GACA,GACQ;CAKR,OAJKC,IAIE,OAAO,QAAQA,CAAM,CAAC,CAAC,QAC3B,GAAK,CAACC,GAAKC,OACVC,EAAI,QAAY,OAAO,SAASF,EAAI,SAAS,GAAG,GAAG,OAAOC,CAAK,CAAC,GAClEE,CACF,IAPSA;AAQX"}
@@ -1,2 +1,4 @@
1
- export {};
2
- //# sourceMappingURL=global-operations.d.ts.map
1
+ /** Internal type. DO NOT USE DIRECTLY. */
2
+ export type Incremental<T> = T | {
3
+ [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
4
+ };
@@ -1,24 +1,5 @@
1
1
  export type Maybe<T> = T | null;
2
2
  export type InputMaybe<T> = Maybe<T>;
3
- export type Exact<T extends {
4
- [key: string]: unknown;
5
- }> = {
6
- [K in keyof T]: T[K];
7
- };
8
- export type MakeOptional<T, K extends keyof T> = Omit<T, K> & {
9
- [SubKey in K]?: Maybe<T[SubKey]>;
10
- };
11
- export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & {
12
- [SubKey in K]: Maybe<T[SubKey]>;
13
- };
14
- export type MakeEmpty<T extends {
15
- [key: string]: unknown;
16
- }, K extends keyof T> = {
17
- [_ in K]?: never;
18
- };
19
- export type Incremental<T> = T | {
20
- [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never;
21
- };
22
3
  /** All built-in and custom scalars, mapped to their actual values */
23
4
  export type Scalars = {
24
5
  ID: {
@@ -68,8 +49,8 @@ export type Scalars = {
68
49
  output: File;
69
50
  };
70
51
  _SubscriptionsPlaceholder: {
71
- input: any;
72
- output: any;
52
+ input: unknown;
53
+ output: unknown;
73
54
  };
74
55
  };
75
56
  /** API Key for programmatic access */
@@ -23524,4 +23505,3 @@ export type UserRegisterInput = {
23524
23505
  phoneNumber?: InputMaybe<Scalars['String']['input']>;
23525
23506
  username: Scalars['String']['input'];
23526
23507
  };
23527
- //# sourceMappingURL=global-types.d.ts.map