@burdenoff/microfe-export 2026.1107.2 → 2026.1113.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 (256) 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 +50 -42
  4. package/dist/export/ExportRoot.js.map +1 -1
  5. package/dist/export/ExportRoutes.d.ts +8 -2
  6. package/dist/export/ExportRoutes.js +71 -53
  7. package/dist/export/ExportRoutes.js.map +1 -1
  8. package/dist/export/components/ConfirmDestructiveDialog.d.ts +21 -0
  9. package/dist/export/components/ConfirmDestructiveDialog.js +37 -0
  10. package/dist/export/components/ConfirmDestructiveDialog.js.map +1 -0
  11. package/dist/export/components/DownloadSections.d.ts +10 -0
  12. package/dist/export/components/DownloadSections.js +161 -0
  13. package/dist/export/components/DownloadSections.js.map +1 -0
  14. package/dist/export/components/DownloadStatus.d.ts +13 -0
  15. package/dist/export/components/DownloadStatus.js +36 -0
  16. package/dist/export/components/DownloadStatus.js.map +1 -0
  17. package/dist/export/components/DownloadsTabs.d.ts +5 -0
  18. package/dist/export/components/DownloadsTabs.js +25 -0
  19. package/dist/export/components/DownloadsTabs.js.map +1 -0
  20. package/dist/export/components/ExportProgressBar.d.ts +1 -2
  21. package/dist/export/components/ExportProgressBar.js +1 -2
  22. package/dist/export/components/ExportProgressBar.js.map +1 -1
  23. package/dist/export/components/ExportStatusBadge.d.ts +1 -3
  24. package/dist/export/components/ExportStatusBadge.js +7 -8
  25. package/dist/export/components/ExportStatusBadge.js.map +1 -1
  26. package/dist/export/components/PageLayout.d.ts +3 -5
  27. package/dist/export/components/PageLayout.js +1 -2
  28. package/dist/export/components/PageLayout.js.map +1 -1
  29. package/dist/export/constants/enums.d.ts +0 -2
  30. package/dist/export/constants/enums.js +1 -2
  31. package/dist/export/constants/enums.js.map +1 -1
  32. package/dist/export/constants/index.d.ts +0 -1
  33. package/dist/export/hooks/useEntityLabel.d.ts +7 -0
  34. package/dist/export/hooks/useEntityLabel.js +16 -0
  35. package/dist/export/hooks/useEntityLabel.js.map +1 -0
  36. package/dist/export/hooks/useExportQueries.d.ts +17 -32
  37. package/dist/export/hooks/useExportQueries.js +144 -145
  38. package/dist/export/hooks/useExportQueries.js.map +1 -1
  39. package/dist/export/hooks/useTr.d.ts +0 -2
  40. package/dist/export/hooks/useTr.js +1 -2
  41. package/dist/export/hooks/useTr.js.map +1 -1
  42. package/dist/export/index.d.ts +0 -1
  43. package/dist/export/index.js +5 -4
  44. package/dist/export/navigation-v2/NavigationV2.d.ts +7 -0
  45. package/dist/export/navigation-v2/NavigationV2.js +16 -0
  46. package/dist/export/navigation-v2/NavigationV2.js.map +1 -0
  47. package/dist/export/pages/CreateExportPage.d.ts +1 -2
  48. package/dist/export/pages/CreateExportPage.js +126 -125
  49. package/dist/export/pages/CreateExportPage.js.map +1 -1
  50. package/dist/export/pages/ExportDashboardPage.d.ts +1 -2
  51. package/dist/export/pages/ExportDashboardPage.js +17 -18
  52. package/dist/export/pages/ExportDashboardPage.js.map +1 -1
  53. package/dist/export/pages/ExportDetailPage.d.ts +1 -2
  54. package/dist/export/pages/ExportDetailPage.js +133 -127
  55. package/dist/export/pages/ExportDetailPage.js.map +1 -1
  56. package/dist/export/pages/ExportHistoryPage.d.ts +1 -2
  57. package/dist/export/pages/ExportHistoryPage.js +74 -69
  58. package/dist/export/pages/ExportHistoryPage.js.map +1 -1
  59. package/dist/export/pages/ExportLandingPage.d.ts +1 -2
  60. package/dist/export/pages/ExportLandingPage.js +1 -2
  61. package/dist/export/pages/ExportLandingPage.js.map +1 -1
  62. package/dist/export/pages/ExportTemplatesPage.d.ts +1 -2
  63. package/dist/export/pages/ExportTemplatesPage.js +219 -192
  64. package/dist/export/pages/ExportTemplatesPage.js.map +1 -1
  65. package/dist/export/pages/TemplateDetailPage.d.ts +1 -2
  66. package/dist/export/pages/TemplateDetailPage.js +146 -125
  67. package/dist/export/pages/TemplateDetailPage.js.map +1 -1
  68. package/dist/export/pages/v2/DownloadDetailPage.d.ts +8 -0
  69. package/dist/export/pages/v2/DownloadDetailPage.js +176 -0
  70. package/dist/export/pages/v2/DownloadDetailPage.js.map +1 -0
  71. package/dist/export/pages/v2/DownloadsPage.d.ts +10 -0
  72. package/dist/export/pages/v2/DownloadsPage.js +401 -0
  73. package/dist/export/pages/v2/DownloadsPage.js.map +1 -0
  74. package/dist/export/pages/v2/NewDownloadPage.d.ts +8 -0
  75. package/dist/export/pages/v2/NewDownloadPage.js +440 -0
  76. package/dist/export/pages/v2/NewDownloadPage.js.map +1 -0
  77. package/dist/export/providers/ExportProvider.d.ts +0 -2
  78. package/dist/export/providers/ExportProvider.js +12 -16
  79. package/dist/export/providers/ExportProvider.js.map +1 -1
  80. package/dist/export/store/exportStore.d.ts +0 -2
  81. package/dist/export/store/exportStore.js +1 -2
  82. package/dist/export/store/exportStore.js.map +1 -1
  83. package/dist/export/types/index.d.ts +7 -1
  84. package/dist/export/utils/billing.d.ts +6 -0
  85. package/dist/export/utils/billing.js +7 -0
  86. package/dist/export/utils/billing.js.map +1 -0
  87. package/dist/export/utils/cn.d.ts +0 -2
  88. package/dist/export/utils/cn.js +2 -3
  89. package/dist/export/utils/cn.js.map +1 -1
  90. package/dist/export/utils/disabledModules.d.ts +0 -1
  91. package/dist/export/utils/disabledModules.js +3 -4
  92. package/dist/export/utils/disabledModules.js.map +1 -1
  93. package/dist/export/utils/downloadStatus.d.ts +15 -0
  94. package/dist/export/utils/downloadStatus.js +48 -0
  95. package/dist/export/utils/downloadStatus.js.map +1 -0
  96. package/dist/export/utils/entityLabels.d.ts +47 -0
  97. package/dist/export/utils/entityLabels.js +150 -0
  98. package/dist/export/utils/entityLabels.js.map +1 -0
  99. package/dist/export/utils/events.d.ts +0 -2
  100. package/dist/export/utils/events.js +1 -2
  101. package/dist/export/utils/events.js.map +1 -1
  102. package/dist/export/utils/exportAuthority.d.ts +0 -2
  103. package/dist/export/utils/exportAuthority.js +1 -2
  104. package/dist/export/utils/exportAuthority.js.map +1 -1
  105. package/dist/export/utils/formatBytes.d.ts +2 -0
  106. package/dist/export/utils/formatBytes.js +15 -0
  107. package/dist/export/utils/formatBytes.js.map +1 -0
  108. package/dist/export/utils/i18n.d.ts +0 -2
  109. package/dist/export/utils/i18n.js +1 -2
  110. package/dist/export/utils/i18n.js.map +1 -1
  111. package/dist/export/utils/newDownloadForm.d.ts +32 -0
  112. package/dist/export/utils/newDownloadForm.js +42 -0
  113. package/dist/export/utils/newDownloadForm.js.map +1 -0
  114. package/dist/export/utils/paths.d.ts +2 -0
  115. package/dist/export/utils/paths.js +7 -0
  116. package/dist/export/utils/paths.js.map +1 -0
  117. package/dist/generated/global-operations.d.ts +4 -2
  118. package/dist/generated/global-types.d.ts +2 -22
  119. package/dist/generated/wspace-operations.d.ts +226 -181
  120. package/dist/generated/wspace-operations.js +1 -2
  121. package/dist/generated/wspace-operations.js.map +1 -1
  122. package/dist/generated/wspace-types.d.ts +4 -24
  123. package/dist/generated/wspace-types.js +1 -2
  124. package/dist/generated/wspace-types.js.map +1 -1
  125. package/dist/index.d.ts +0 -1
  126. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +1 -2
  127. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -1
  128. package/dist/node_modules/@apollo/client/errors/utils.js +1 -2
  129. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -1
  130. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +7 -8
  131. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -1
  132. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +15 -16
  133. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -1
  134. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +5 -6
  135. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -1
  136. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +0 -1
  137. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -1
  138. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +4 -5
  139. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -1
  140. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +1 -2
  141. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -1
  142. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
  143. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
  144. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +2 -3
  145. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -1
  146. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +1 -2
  147. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -1
  148. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +1 -2
  149. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -1
  150. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +1 -2
  151. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -1
  152. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +1 -2
  153. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -1
  154. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +1 -2
  155. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -1
  156. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +1 -2
  157. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -1
  158. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +1 -2
  159. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -1
  160. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +1 -2
  161. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -1
  162. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +1 -2
  163. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -1
  164. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +2 -3
  165. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -1
  166. package/dist/node_modules/@apollo/client/version.js +2 -3
  167. package/dist/node_modules/@apollo/client/version.js.map +1 -1
  168. package/dist/node_modules/@wry/caches/lib/weak.js +1 -2
  169. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -1
  170. package/dist/node_modules/@wry/trie/lib/index.js +2 -3
  171. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -1
  172. package/dist/node_modules/clsx/dist/clsx.js +8 -7
  173. package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
  174. package/dist/node_modules/graphql-ws/dist/client.js +76 -69
  175. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -1
  176. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +2 -3
  177. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -1
  178. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +2 -3
  179. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -1
  180. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +41 -42
  181. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -1
  182. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +14 -15
  183. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -1
  184. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +21 -18
  185. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
  186. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +1 -2
  187. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -1
  188. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +1 -2
  189. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -1
  190. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +2 -3
  191. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -1
  192. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +1 -2
  193. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -1
  194. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +1 -2
  195. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -1
  196. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +1 -2
  197. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -1
  198. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +1 -2
  199. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -1
  200. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +1 -2
  201. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -1
  202. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +1 -2
  203. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -1
  204. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +1 -2
  205. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -1
  206. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +1 -2
  207. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -1
  208. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +1 -2
  209. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -1
  210. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +1 -2
  211. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -1
  212. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +229 -167
  213. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
  214. package/dist/node_modules/{rxjs/node_modules/tslib → tslib}/tslib.es6.js +1 -2
  215. package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
  216. package/dist/test/happydom.d.ts +1 -0
  217. package/dist/translations/en.d.ts +0 -1
  218. package/dist/translations/en.js +1 -2
  219. package/dist/translations/en.js.map +1 -1
  220. package/dist/utils/nativeBridge.d.ts +0 -1
  221. package/dist/utils/nativeBridge.js +1 -2
  222. package/package.json +63 -47
  223. package/dist/dev/main.d.ts.map +0 -1
  224. package/dist/export/ExportRoot.d.ts.map +0 -1
  225. package/dist/export/ExportRoutes.d.ts.map +0 -1
  226. package/dist/export/components/ExportProgressBar.d.ts.map +0 -1
  227. package/dist/export/components/ExportStatusBadge.d.ts.map +0 -1
  228. package/dist/export/components/PageLayout.d.ts.map +0 -1
  229. package/dist/export/constants/enums.d.ts.map +0 -1
  230. package/dist/export/constants/index.d.ts.map +0 -1
  231. package/dist/export/hooks/useExportQueries.d.ts.map +0 -1
  232. package/dist/export/hooks/useTr.d.ts.map +0 -1
  233. package/dist/export/index.d.ts.map +0 -1
  234. package/dist/export/pages/CreateExportPage.d.ts.map +0 -1
  235. package/dist/export/pages/ExportDashboardPage.d.ts.map +0 -1
  236. package/dist/export/pages/ExportDetailPage.d.ts.map +0 -1
  237. package/dist/export/pages/ExportHistoryPage.d.ts.map +0 -1
  238. package/dist/export/pages/ExportLandingPage.d.ts.map +0 -1
  239. package/dist/export/pages/ExportTemplatesPage.d.ts.map +0 -1
  240. package/dist/export/pages/TemplateDetailPage.d.ts.map +0 -1
  241. package/dist/export/providers/ExportProvider.d.ts.map +0 -1
  242. package/dist/export/store/exportStore.d.ts.map +0 -1
  243. package/dist/export/types/index.d.ts.map +0 -1
  244. package/dist/export/utils/cn.d.ts.map +0 -1
  245. package/dist/export/utils/disabledModules.d.ts.map +0 -1
  246. package/dist/export/utils/events.d.ts.map +0 -1
  247. package/dist/export/utils/exportAuthority.d.ts.map +0 -1
  248. package/dist/export/utils/i18n.d.ts.map +0 -1
  249. package/dist/generated/global-operations.d.ts.map +0 -1
  250. package/dist/generated/global-types.d.ts.map +0 -1
  251. package/dist/generated/wspace-operations.d.ts.map +0 -1
  252. package/dist/generated/wspace-types.d.ts.map +0 -1
  253. package/dist/index.d.ts.map +0 -1
  254. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +0 -1
  255. package/dist/translations/en.d.ts.map +0 -1
  256. package/dist/utils/nativeBridge.d.ts.map +0 -1
@@ -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":"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"}
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":"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"}
@@ -1,5 +1,4 @@
1
1
  import { ExportJob, ExportFilter, 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"}
@@ -96,6 +96,13 @@ export interface ExportRootProps extends MicrofrontendRootProps {
96
96
  * Injected by the shell app
97
97
  */
98
98
  registerFooterItems?: (items: FooterItem | FooterItem[]) => () => void;
99
+ /**
100
+ * Opt in to FluidGrids' Navigation v2 pages (BOFF-11870): one "Download your
101
+ * data" list, a two-step "New download", plain status words and the
102
+ * BOFF-11841 shared pieces. Default `false`: the module renders exactly as
103
+ * before. Only fluidgrids-app passes it.
104
+ */
105
+ navigationV2?: boolean;
99
106
  }
100
107
  /**
101
108
  * Export job status
@@ -230,4 +237,3 @@ export type ExportView = "dashboard" | "new" | "history" | "templates";
230
237
  * View mode for export display
231
238
  */
232
239
  export type ExportDisplayMode = "list" | "grid";
233
- //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * "View billing" from the download-limit dialog goes through the host's own
3
+ * navigation (no full page reload). Only a host that passes no `navigate`
4
+ * falls back to a page load.
5
+ */
6
+ export declare function openBilling(navigate: ((path: string) => void) | undefined): void;
@@ -0,0 +1,7 @@
1
+ // src/export/utils/billing.ts
2
+ function e(e) {
3
+ e ? e("/billing") : window.location.assign("/billing");
4
+ }
5
+ export { e as openBilling };
6
+
7
+ //# sourceMappingURL=billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.js","names":["openBilling","navigate"],"sources":["../../../src/export/utils/billing.ts"],"sourcesContent":["/**\n * \"View billing\" from the download-limit dialog goes through the host's own\n * navigation (no full page reload). Only a host that passes no `navigate`\n * falls back to a page load.\n */\nexport function openBilling(\n navigate: ((path: string) => void) | undefined,\n): void {\n if (navigate) navigate(\"/billing\");\n else window.location.assign(\"/billing\");\n}\n"],"mappings":";AAKA,SAAgBA,EACd,GACM;CACN,AAAIC,IAAUA,EAAS,UAAU,IAC5B,OAAO,SAAS,OAAO,UAAU;AACxC"}
@@ -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"}
@@ -0,0 +1,15 @@
1
+ import { ExportJobStatus } from '../types';
2
+ /**
3
+ * Navigation v2's plain status words (BOFF-11870). Created, Queued and Running
4
+ * read as one "Preparing…" state; each finished state says what to do next.
5
+ */
6
+ export type DownloadPhase = "preparing" | "ready" | "failed" | "cancelled" | "expired" | "deleted";
7
+ export declare function downloadPhase(status: ExportJobStatus): DownloadPhase;
8
+ /** Translation key and English for each phase. */
9
+ export declare const DOWNLOAD_PHASE_COPY: Readonly<Record<DownloadPhase, {
10
+ key: string;
11
+ label: string;
12
+ }>>;
13
+ export declare function isInProgress(status: ExportJobStatus): boolean;
14
+ /** Failed, cancelled and expired downloads can be started again. */
15
+ export declare function canTryAgain(status: ExportJobStatus): boolean;
@@ -0,0 +1,48 @@
1
+ // src/export/utils/downloadStatus.ts
2
+ function e(e) {
3
+ switch (e) {
4
+ case "CREATED":
5
+ case "QUEUED":
6
+ case "RUNNING": return "preparing";
7
+ case "COMPLETED": return "ready";
8
+ case "FAILED": return "failed";
9
+ case "CANCELLED": return "cancelled";
10
+ case "EXPIRED": return "expired";
11
+ default: return "deleted";
12
+ }
13
+ }
14
+ var t = {
15
+ preparing: {
16
+ key: "export.status.preparing",
17
+ label: "Preparing…"
18
+ },
19
+ ready: {
20
+ key: "export.status.ready",
21
+ label: "Ready to download"
22
+ },
23
+ failed: {
24
+ key: "export.status.failed",
25
+ label: "Didn't finish"
26
+ },
27
+ cancelled: {
28
+ key: "export.status.cancelled",
29
+ label: "Cancelled"
30
+ },
31
+ expired: {
32
+ key: "export.status.expired",
33
+ label: "Link expired: start again"
34
+ },
35
+ deleted: {
36
+ key: "export.status.deleted",
37
+ label: "Deleted"
38
+ }
39
+ };
40
+ function n(t) {
41
+ return e(t) === "preparing";
42
+ }
43
+ function r(e) {
44
+ return e === "FAILED" || e === "CANCELLED" || e === "EXPIRED";
45
+ }
46
+ export { t as DOWNLOAD_PHASE_COPY, r as canTryAgain, e as downloadPhase, n as isInProgress };
47
+
48
+ //# sourceMappingURL=downloadStatus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"downloadStatus.js","names":["downloadPhase","status","DOWNLOAD_PHASE_COPY","isInProgress","canTryAgain"],"sources":["../../../src/export/utils/downloadStatus.ts"],"sourcesContent":["import type { ExportJobStatus } from \"../types\";\n\n/**\n * Navigation v2's plain status words (BOFF-11870). Created, Queued and Running\n * read as one \"Preparing…\" state; each finished state says what to do next.\n */\nexport type DownloadPhase =\n \"preparing\" | \"ready\" | \"failed\" | \"cancelled\" | \"expired\" | \"deleted\";\n\nexport function downloadPhase(status: ExportJobStatus): DownloadPhase {\n switch (status) {\n case \"CREATED\":\n case \"QUEUED\":\n case \"RUNNING\":\n return \"preparing\";\n case \"COMPLETED\":\n return \"ready\";\n case \"FAILED\":\n return \"failed\";\n case \"CANCELLED\":\n return \"cancelled\";\n case \"EXPIRED\":\n return \"expired\";\n default:\n return \"deleted\";\n }\n}\n\n/** Translation key and English for each phase. */\nexport const DOWNLOAD_PHASE_COPY: Readonly<\n Record<DownloadPhase, { key: string; label: string }>\n> = {\n preparing: { key: \"export.status.preparing\", label: \"Preparing…\" },\n ready: { key: \"export.status.ready\", label: \"Ready to download\" },\n failed: { key: \"export.status.failed\", label: \"Didn't finish\" },\n cancelled: { key: \"export.status.cancelled\", label: \"Cancelled\" },\n expired: {\n key: \"export.status.expired\",\n label: \"Link expired: start again\",\n },\n deleted: { key: \"export.status.deleted\", label: \"Deleted\" },\n};\n\nexport function isInProgress(status: ExportJobStatus): boolean {\n return downloadPhase(status) === \"preparing\";\n}\n\n/** Failed, cancelled and expired downloads can be started again. */\nexport function canTryAgain(status: ExportJobStatus): boolean {\n return status === \"FAILED\" || status === \"CANCELLED\" || status === \"EXPIRED\";\n}\n"],"mappings":";AASA,SAAgBA,EAAc,GAAwC;CACpE,QAAQC,GAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK,WACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,UACH,OAAO;EACT,KAAK,aACH,OAAO;EACT,KAAK,WACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAGA,IAAaC,IAET;CACF,WAAW;EAAE,KAAK;EAA2B,OAAO;CAAa;CACjE,OAAO;EAAE,KAAK;EAAuB,OAAO;CAAoB;CAChE,QAAQ;EAAE,KAAK;EAAwB,OAAO;CAAgB;CAC9D,WAAW;EAAE,KAAK;EAA2B,OAAO;CAAY;CAChE,SAAS;EACP,KAAK;EACL,OAAO;CACT;CACA,SAAS;EAAE,KAAK;EAAyB,OAAO;CAAU;AAC5D;AAEA,SAAgBC,EAAa,GAAkC;CAC7D,OAAOH,EAAcC,CAAM,MAAM;AACnC;AAGA,SAAgBG,EAAY,GAAkC;CAC5D,OAAOH,MAAW,YAAYA,MAAW,eAAeA,MAAW;AACrE"}
@@ -0,0 +1,47 @@
1
+ import { ExportAvailableEntity } from '../types';
2
+ type Tr = (key: string, fallback: string) => string;
3
+ /**
4
+ * Which translation group the legacy wizard's built-in copy uses for an
5
+ * entity type. The wizard's copy was keyed by short names (`activity`,
6
+ * `calendar`, `users`) that never matched the entity types the export service
7
+ * actually lists (`activity_logs`, `calendar_events`, `workspace_members`), so
8
+ * its own labels were never shown. Both spellings resolve now.
9
+ */
10
+ export declare const LEGACY_ENTITY_COPY_KEY: Readonly<Record<string, string>>;
11
+ /**
12
+ * Plain names for the entity types the export service lists (Navigation v2,
13
+ * BOFF-11870): "Activity history", not `activity_logs`. Keys live under
14
+ * `export.entities.<entityType>`, so an app can reword any of them.
15
+ */
16
+ export declare const ENTITY_PLAIN_NAMES: Readonly<Record<string, string>>;
17
+ /** `activity_logs` → "Activity logs": the last resort for an unknown key. */
18
+ export declare function humanizeEntityType(entityType: string): string;
19
+ /**
20
+ * The one name a person sees for an entity type: the plain name when there is
21
+ * one, else the export service's display name, else the key made readable.
22
+ * Never the raw key.
23
+ */
24
+ export declare function entityLabel(entityType: string, tr: Tr, available?: readonly ExportAvailableEntity[]): string;
25
+ /** A curated plain group on step 1 of "New download". */
26
+ export interface EntityGroup {
27
+ id: string;
28
+ /** Translation key and English for the group's name. */
29
+ labelKey: string;
30
+ label: string;
31
+ descriptionKey: string;
32
+ description: string;
33
+ /** Entity types in the group, in display order. */
34
+ entityTypes: readonly string[];
35
+ }
36
+ /**
37
+ * The everyday groups step 1 offers first (level 1). Every other entity type
38
+ * the workspace can export sits under "Show all data types" (level 2). A group
39
+ * only shows when at least one of its entity types is offered.
40
+ */
41
+ export declare const ENTITY_GROUPS: readonly EntityGroup[];
42
+ /** The curated groups, each cut down to the entity types actually offered. */
43
+ export declare function offeredGroups(offered: readonly string[]): {
44
+ group: EntityGroup;
45
+ entityTypes: string[];
46
+ }[];
47
+ export {};
@@ -0,0 +1,150 @@
1
+ // src/export/utils/entityLabels.ts
2
+ var e = {
3
+ users: "users",
4
+ workspace_members: "users",
5
+ projects: "projects",
6
+ tasks: "tasks",
7
+ files: "files",
8
+ conversations: "conversations",
9
+ tags: "tags",
10
+ activity: "activity",
11
+ activity_logs: "activity",
12
+ calendar: "calendar",
13
+ calendar_events: "calendar"
14
+ }, t = {
15
+ workflows: "Workflows",
16
+ fluidgrids_workflow_runs: "Workflow runs",
17
+ fluidgrids_event_triggers: "Event triggers",
18
+ fluidgrids_scheduled_triggers: "Schedules",
19
+ scheduled_tasks: "Scheduled tasks",
20
+ fluidgrids_variables: "Variables",
21
+ fluidgrids_data_tables: "Data tables",
22
+ fluidgrids_data_table_rows: "Data table rows",
23
+ files: "Files",
24
+ folders: "Folders",
25
+ conversations: "Chats",
26
+ messages: "Chat messages",
27
+ calendars: "Calendars",
28
+ calendar_events: "Calendar events",
29
+ groups: "Teams",
30
+ group_members: "Team members",
31
+ workspace_members: "Workspace members",
32
+ users: "People",
33
+ invitations: "Invitations",
34
+ activity_logs: "Activity history",
35
+ analytics_events: "Usage events",
36
+ tags: "Tags",
37
+ vocabularies: "Tag groups",
38
+ rbac_roles: "Roles",
39
+ rbac_role_members: "Role assignments",
40
+ permission_audit_logs: "Access check history",
41
+ rbac_change_logs: "Role change history",
42
+ vaults: "Vaults",
43
+ secrets: "Saved values",
44
+ vault_audit_logs: "Vault history",
45
+ vault_security_events: "Vault security events",
46
+ integrations: "Connected apps",
47
+ sandbox_environments: "Sandboxes",
48
+ workspaces: "Workspaces",
49
+ projects: "Projects",
50
+ graph_edges: "Links between items"
51
+ };
52
+ function n(e) {
53
+ let t = e.replace(/[_-]+/g, " ").trim();
54
+ return t ? t.charAt(0).toUpperCase() + t.slice(1) : e;
55
+ }
56
+ function r(e, r, i = []) {
57
+ let a = t[e];
58
+ if (a) return r(`export.entities.${e}`, a);
59
+ let o = i.find((t) => t.entityType === e)?.displayName;
60
+ return o && o !== e ? o : n(e);
61
+ }
62
+ var i = [
63
+ {
64
+ id: "workflows",
65
+ labelKey: "export.create.groups.workflows.label",
66
+ label: "Workflows and runs",
67
+ descriptionKey: "export.create.groups.workflows.description",
68
+ description: "Your workflows, their runs, triggers and schedules",
69
+ entityTypes: [
70
+ "workflows",
71
+ "fluidgrids_workflow_runs",
72
+ "fluidgrids_event_triggers",
73
+ "fluidgrids_scheduled_triggers",
74
+ "scheduled_tasks"
75
+ ]
76
+ },
77
+ {
78
+ id: "data",
79
+ labelKey: "export.create.groups.data.label",
80
+ label: "Data tables and variables",
81
+ descriptionKey: "export.create.groups.data.description",
82
+ description: "Tables, their rows and the variables your workflows use",
83
+ entityTypes: [
84
+ "fluidgrids_data_tables",
85
+ "fluidgrids_data_table_rows",
86
+ "fluidgrids_variables"
87
+ ]
88
+ },
89
+ {
90
+ id: "files",
91
+ labelKey: "export.create.groups.files.label",
92
+ label: "Files",
93
+ descriptionKey: "export.create.groups.files.description",
94
+ description: "Your files and folders",
95
+ entityTypes: ["files", "folders"]
96
+ },
97
+ {
98
+ id: "chat",
99
+ labelKey: "export.create.groups.chat.label",
100
+ label: "Chats and calendar",
101
+ descriptionKey: "export.create.groups.chat.description",
102
+ description: "Conversations, messages and calendar events",
103
+ entityTypes: [
104
+ "conversations",
105
+ "messages",
106
+ "calendars",
107
+ "calendar_events"
108
+ ]
109
+ },
110
+ {
111
+ id: "people",
112
+ labelKey: "export.create.groups.people.label",
113
+ label: "Teams and people",
114
+ descriptionKey: "export.create.groups.people.description",
115
+ description: "Teams, their members and workspace invitations",
116
+ entityTypes: [
117
+ "groups",
118
+ "group_members",
119
+ "workspace_members",
120
+ "users",
121
+ "invitations"
122
+ ]
123
+ },
124
+ {
125
+ id: "activity",
126
+ labelKey: "export.create.groups.activity.label",
127
+ label: "Activity history",
128
+ descriptionKey: "export.create.groups.activity.description",
129
+ description: "Who did what, and when",
130
+ entityTypes: ["activity_logs"]
131
+ },
132
+ {
133
+ id: "tags",
134
+ labelKey: "export.create.groups.tags.label",
135
+ label: "Tags",
136
+ descriptionKey: "export.create.groups.tags.description",
137
+ description: "Tags and tag groups",
138
+ entityTypes: ["tags", "vocabularies"]
139
+ }
140
+ ];
141
+ function a(e) {
142
+ let t = new Set(e);
143
+ return i.map((e) => ({
144
+ group: e,
145
+ entityTypes: e.entityTypes.filter((e) => t.has(e))
146
+ })).filter((e) => e.entityTypes.length > 0);
147
+ }
148
+ export { i as ENTITY_GROUPS, t as ENTITY_PLAIN_NAMES, e as LEGACY_ENTITY_COPY_KEY, r as entityLabel, n as humanizeEntityType, a as offeredGroups };
149
+
150
+ //# sourceMappingURL=entityLabels.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entityLabels.js","names":["LEGACY_ENTITY_COPY_KEY","ENTITY_PLAIN_NAMES","humanizeEntityType","words","entityType","entityLabel","plain","tr","fromService","available","e","ENTITY_GROUPS","offeredGroups","offeredSet","offered","group","t","g"],"sources":["../../../src/export/utils/entityLabels.ts"],"sourcesContent":["import type { ExportAvailableEntity } from \"../types\";\n\ntype Tr = (key: string, fallback: string) => string;\n\n/**\n * Which translation group the legacy wizard's built-in copy uses for an\n * entity type. The wizard's copy was keyed by short names (`activity`,\n * `calendar`, `users`) that never matched the entity types the export service\n * actually lists (`activity_logs`, `calendar_events`, `workspace_members`), so\n * its own labels were never shown. Both spellings resolve now.\n */\nexport const LEGACY_ENTITY_COPY_KEY: Readonly<Record<string, string>> = {\n users: \"users\",\n workspace_members: \"users\",\n projects: \"projects\",\n tasks: \"tasks\",\n files: \"files\",\n conversations: \"conversations\",\n tags: \"tags\",\n activity: \"activity\",\n activity_logs: \"activity\",\n calendar: \"calendar\",\n calendar_events: \"calendar\",\n};\n\n/**\n * Plain names for the entity types the export service lists (Navigation v2,\n * BOFF-11870): \"Activity history\", not `activity_logs`. Keys live under\n * `export.entities.<entityType>`, so an app can reword any of them.\n */\nexport const ENTITY_PLAIN_NAMES: Readonly<Record<string, string>> = {\n workflows: \"Workflows\",\n fluidgrids_workflow_runs: \"Workflow runs\",\n fluidgrids_event_triggers: \"Event triggers\",\n fluidgrids_scheduled_triggers: \"Schedules\",\n scheduled_tasks: \"Scheduled tasks\",\n fluidgrids_variables: \"Variables\",\n fluidgrids_data_tables: \"Data tables\",\n fluidgrids_data_table_rows: \"Data table rows\",\n files: \"Files\",\n folders: \"Folders\",\n conversations: \"Chats\",\n messages: \"Chat messages\",\n calendars: \"Calendars\",\n calendar_events: \"Calendar events\",\n groups: \"Teams\",\n group_members: \"Team members\",\n workspace_members: \"Workspace members\",\n users: \"People\",\n invitations: \"Invitations\",\n activity_logs: \"Activity history\",\n analytics_events: \"Usage events\",\n tags: \"Tags\",\n vocabularies: \"Tag groups\",\n rbac_roles: \"Roles\",\n rbac_role_members: \"Role assignments\",\n permission_audit_logs: \"Access check history\",\n rbac_change_logs: \"Role change history\",\n vaults: \"Vaults\",\n secrets: \"Saved values\",\n vault_audit_logs: \"Vault history\",\n vault_security_events: \"Vault security events\",\n integrations: \"Connected apps\",\n sandbox_environments: \"Sandboxes\",\n workspaces: \"Workspaces\",\n projects: \"Projects\",\n graph_edges: \"Links between items\",\n};\n\n/** `activity_logs` → \"Activity logs\": the last resort for an unknown key. */\nexport function humanizeEntityType(entityType: string): string {\n const words = entityType.replace(/[_-]+/g, \" \").trim();\n if (!words) return entityType;\n return words.charAt(0).toUpperCase() + words.slice(1);\n}\n\n/**\n * The one name a person sees for an entity type: the plain name when there is\n * one, else the export service's display name, else the key made readable.\n * Never the raw key.\n */\nexport function entityLabel(\n entityType: string,\n tr: Tr,\n available: readonly ExportAvailableEntity[] = [],\n): string {\n const plain = ENTITY_PLAIN_NAMES[entityType];\n if (plain) return tr(`export.entities.${entityType}`, plain);\n const fromService = available.find(\n (e) => e.entityType === entityType,\n )?.displayName;\n if (fromService && fromService !== entityType) return fromService;\n return humanizeEntityType(entityType);\n}\n\n/** A curated plain group on step 1 of \"New download\". */\nexport interface EntityGroup {\n id: string;\n /** Translation key and English for the group's name. */\n labelKey: string;\n label: string;\n descriptionKey: string;\n description: string;\n /** Entity types in the group, in display order. */\n entityTypes: readonly string[];\n}\n\n/**\n * The everyday groups step 1 offers first (level 1). Every other entity type\n * the workspace can export sits under \"Show all data types\" (level 2). A group\n * only shows when at least one of its entity types is offered.\n */\nexport const ENTITY_GROUPS: readonly EntityGroup[] = [\n {\n id: \"workflows\",\n labelKey: \"export.create.groups.workflows.label\",\n label: \"Workflows and runs\",\n descriptionKey: \"export.create.groups.workflows.description\",\n description: \"Your workflows, their runs, triggers and schedules\",\n entityTypes: [\n \"workflows\",\n \"fluidgrids_workflow_runs\",\n \"fluidgrids_event_triggers\",\n \"fluidgrids_scheduled_triggers\",\n \"scheduled_tasks\",\n ],\n },\n {\n id: \"data\",\n labelKey: \"export.create.groups.data.label\",\n label: \"Data tables and variables\",\n descriptionKey: \"export.create.groups.data.description\",\n description: \"Tables, their rows and the variables your workflows use\",\n entityTypes: [\n \"fluidgrids_data_tables\",\n \"fluidgrids_data_table_rows\",\n \"fluidgrids_variables\",\n ],\n },\n {\n id: \"files\",\n labelKey: \"export.create.groups.files.label\",\n label: \"Files\",\n descriptionKey: \"export.create.groups.files.description\",\n description: \"Your files and folders\",\n entityTypes: [\"files\", \"folders\"],\n },\n {\n id: \"chat\",\n labelKey: \"export.create.groups.chat.label\",\n label: \"Chats and calendar\",\n descriptionKey: \"export.create.groups.chat.description\",\n description: \"Conversations, messages and calendar events\",\n entityTypes: [\"conversations\", \"messages\", \"calendars\", \"calendar_events\"],\n },\n {\n id: \"people\",\n labelKey: \"export.create.groups.people.label\",\n label: \"Teams and people\",\n descriptionKey: \"export.create.groups.people.description\",\n description: \"Teams, their members and workspace invitations\",\n entityTypes: [\n \"groups\",\n \"group_members\",\n \"workspace_members\",\n \"users\",\n \"invitations\",\n ],\n },\n {\n id: \"activity\",\n labelKey: \"export.create.groups.activity.label\",\n label: \"Activity history\",\n descriptionKey: \"export.create.groups.activity.description\",\n description: \"Who did what, and when\",\n entityTypes: [\"activity_logs\"],\n },\n {\n id: \"tags\",\n labelKey: \"export.create.groups.tags.label\",\n label: \"Tags\",\n descriptionKey: \"export.create.groups.tags.description\",\n description: \"Tags and tag groups\",\n entityTypes: [\"tags\", \"vocabularies\"],\n },\n];\n\n/** The curated groups, each cut down to the entity types actually offered. */\nexport function offeredGroups(\n offered: readonly string[],\n): { group: EntityGroup; entityTypes: string[] }[] {\n const offeredSet = new Set(offered);\n return ENTITY_GROUPS.map((group) => ({\n group,\n entityTypes: group.entityTypes.filter((t) => offeredSet.has(t)),\n })).filter((g) => g.entityTypes.length > 0);\n}\n"],"mappings":";AAWA,IAAaA,IAA2D;CACtE,OAAO;CACP,mBAAmB;CACnB,UAAU;CACV,OAAO;CACP,OAAO;CACP,eAAe;CACf,MAAM;CACN,UAAU;CACV,eAAe;CACf,UAAU;CACV,iBAAiB;AACnB,GAOaC,IAAuD;CAClE,WAAW;CACX,0BAA0B;CAC1B,2BAA2B;CAC3B,+BAA+B;CAC/B,iBAAiB;CACjB,sBAAsB;CACtB,wBAAwB;CACxB,4BAA4B;CAC5B,OAAO;CACP,SAAS;CACT,eAAe;CACf,UAAU;CACV,WAAW;CACX,iBAAiB;CACjB,QAAQ;CACR,eAAe;CACf,mBAAmB;CACnB,OAAO;CACP,aAAa;CACb,eAAe;CACf,kBAAkB;CAClB,MAAM;CACN,cAAc;CACd,YAAY;CACZ,mBAAmB;CACnB,uBAAuB;CACvB,kBAAkB;CAClB,QAAQ;CACR,SAAS;CACT,kBAAkB;CAClB,uBAAuB;CACvB,cAAc;CACd,sBAAsB;CACtB,YAAY;CACZ,UAAU;CACV,aAAa;AACf;AAGA,SAAgBC,EAAmB,GAA4B;CAC7D,IAAMC,IAAQC,EAAW,QAAQ,UAAU,GAAG,CAAC,CAAC,KAAK;CAErD,OADKD,IACEA,EAAM,OAAO,CAAC,CAAC,CAAC,YAAY,IAAIA,EAAM,MAAM,CAAC,IADjCC;AAErB;AAOA,SAAgBC,EACd,GACA,GACA,IAA8C,CAAC,GACvC;CACR,IAAMC,IAAQL,EAAmBG;CACjC,IAAIE,GAAO,OAAOC,EAAG,mBAAmBH,KAAcE,CAAK;CAC3D,IAAME,IAAcC,EAAU,MAC3B,MAAMC,EAAE,eAAeN,CAC1B,CAAC,EAAE;CAEH,OADII,KAAeA,MAAgBJ,IAAmBI,IAC/CN,EAAmBE,CAAU;AACtC;AAmBA,IAAaO,IAAwC;CACnD;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa;GACX;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa;GACX;GACA;GACA;EACF;CACF;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa,CAAC,SAAS,SAAS;CAClC;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa;GAAC;GAAiB;GAAY;GAAa;EAAiB;CAC3E;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa;GACX;GACA;GACA;GACA;GACA;EACF;CACF;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa,CAAC,eAAe;CAC/B;CACA;EACE,IAAI;EACJ,UAAU;EACV,OAAO;EACP,gBAAgB;EAChB,aAAa;EACb,aAAa,CAAC,QAAQ,cAAc;CACtC;AACF;AAGA,SAAgBC,EACd,GACiD;CACjD,IAAMC,IAAa,IAAI,IAAIC,CAAO;CAClC,OAAOH,EAAc,KAAK,OAAW;EACnC;EACA,aAAaI,EAAM,YAAY,QAAQ,MAAMF,EAAW,IAAIG,CAAC,CAAC;CAChE,EAAE,CAAC,CAAC,QAAQ,MAAMC,EAAE,YAAY,SAAS,CAAC;AAC5C"}
@@ -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,5 +1,4 @@
1
1
  import { ExportJob } from '../types';
2
-
3
2
  export declare function exportGatewayHeaders(input: {
4
3
  authToken?: string;
5
4
  workspaceToken?: string;
@@ -12,4 +11,3 @@ export declare function exportGatewayEndpoints(apiGatewayUrl: string | undefined
12
11
  };
13
12
  /** The complete export CTA must never download only the first chunk. */
14
13
  export declare function exportArchiveDownload(job: ExportJob | null | undefined, now?: number): string | undefined;
15
- //# sourceMappingURL=exportAuthority.d.ts.map
@@ -1,4 +1,4 @@
1
- //#region src/export/utils/exportAuthority.ts
1
+ // src/export/utils/exportAuthority.ts
2
2
  function e(e) {
3
3
  let t = {};
4
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;
@@ -22,7 +22,6 @@ function n(e, t = Date.now()) {
22
22
  return;
23
23
  }
24
24
  }
25
- //#endregion
26
25
  export { n as exportArchiveDownload, t as exportGatewayEndpoints, e as exportGatewayHeaders };
27
26
 
28
27
  //# sourceMappingURL=exportAuthority.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exportAuthority.js","names":[],"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,SAAgB,EAAqB,GAKV;CACzB,IAAM,IAAkC,EAAE;AAM1C,QALI,EAAM,cAAW,EAAQ,gBAAgB,UAAU,EAAM,cACzD,EAAM,mBACR,EAAQ,+BAA+B,UAAU,EAAM,mBACrD,EAAM,gBAAa,EAAQ,oBAAoB,EAAM,cACrD,EAAM,mBAAgB,EAAQ,cAAc,EAAM,iBAC/C;;AAGT,SAAgB,EACd,GACA,GACqC;CACrC,IAAM,IAAO,GAAe,QAAQ,OAAO,GAAG,EACxC,IAAW,IACb,EAAK,SAAS,sBAAsB,GAClC,IACA,GAAG,EAAK,uBACV,uBACE,IAAO,IAAI,IAAI,GAAU,EAAW;AAC1C,KAAI,EAAK,aAAa,WAAW,EAAK,aAAa,SACjD,OAAU,MAAM,kCAAkC;CACpD,IAAM,IAAY,IAAI,IAAI,EAAK;AAE/B,QADA,EAAU,WAAW,EAAK,aAAa,WAAW,SAAS,OACpD;EAAE,MAAM,EAAK,UAAU;EAAE,WAAW,EAAU,UAAU;EAAE;;AAInE,SAAgB,EACd,GACA,IAAM,KAAK,KAAK,EACI;AACpB,KACE,GAAK,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"}