@burdenoff/microfe-export 2026.510.111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) hide show
  1. package/README.md +243 -0
  2. package/dist/dev/main.d.ts +2 -0
  3. package/dist/dev/main.d.ts.map +1 -0
  4. package/dist/export/ExportRoot.d.ts +31 -0
  5. package/dist/export/ExportRoot.d.ts.map +1 -0
  6. package/dist/export/ExportRoot.js +70 -0
  7. package/dist/export/ExportRoot.js.map +1 -0
  8. package/dist/export/ExportRoutes.d.ts +14 -0
  9. package/dist/export/ExportRoutes.d.ts.map +1 -0
  10. package/dist/export/ExportRoutes.js +104 -0
  11. package/dist/export/ExportRoutes.js.map +1 -0
  12. package/dist/export/components/ExportProgressBar.d.ts +12 -0
  13. package/dist/export/components/ExportProgressBar.d.ts.map +1 -0
  14. package/dist/export/components/ExportProgressBar.js +34 -0
  15. package/dist/export/components/ExportProgressBar.js.map +1 -0
  16. package/dist/export/components/ExportStatusBadge.d.ts +12 -0
  17. package/dist/export/components/ExportStatusBadge.d.ts.map +1 -0
  18. package/dist/export/components/ExportStatusBadge.js +39 -0
  19. package/dist/export/components/ExportStatusBadge.js.map +1 -0
  20. package/dist/export/components/PageLayout.d.ts +55 -0
  21. package/dist/export/components/PageLayout.d.ts.map +1 -0
  22. package/dist/export/components/PageLayout.js +93 -0
  23. package/dist/export/components/PageLayout.js.map +1 -0
  24. package/dist/export/components/ui.d.ts +6 -0
  25. package/dist/export/components/ui.d.ts.map +1 -0
  26. package/dist/export/constants/enums.d.ts +79 -0
  27. package/dist/export/constants/enums.d.ts.map +1 -0
  28. package/dist/export/constants/enums.js +27 -0
  29. package/dist/export/constants/enums.js.map +1 -0
  30. package/dist/export/constants/index.d.ts +7 -0
  31. package/dist/export/constants/index.d.ts.map +1 -0
  32. package/dist/export/hooks/useExportQueries.d.ts +224 -0
  33. package/dist/export/hooks/useExportQueries.d.ts.map +1 -0
  34. package/dist/export/hooks/useExportQueries.js +401 -0
  35. package/dist/export/hooks/useExportQueries.js.map +1 -0
  36. package/dist/export/index.d.ts +29 -0
  37. package/dist/export/index.d.ts.map +1 -0
  38. package/dist/export/index.js +3 -0
  39. package/dist/export/pages/CreateExportPage.d.ts +2 -0
  40. package/dist/export/pages/CreateExportPage.d.ts.map +1 -0
  41. package/dist/export/pages/CreateExportPage.js +495 -0
  42. package/dist/export/pages/CreateExportPage.js.map +1 -0
  43. package/dist/export/pages/ExportDashboardPage.d.ts +6 -0
  44. package/dist/export/pages/ExportDashboardPage.d.ts.map +1 -0
  45. package/dist/export/pages/ExportDashboardPage.js +166 -0
  46. package/dist/export/pages/ExportDashboardPage.js.map +1 -0
  47. package/dist/export/pages/ExportDetailPage.d.ts +7 -0
  48. package/dist/export/pages/ExportDetailPage.d.ts.map +1 -0
  49. package/dist/export/pages/ExportDetailPage.js +327 -0
  50. package/dist/export/pages/ExportDetailPage.js.map +1 -0
  51. package/dist/export/pages/ExportHistoryPage.d.ts +6 -0
  52. package/dist/export/pages/ExportHistoryPage.d.ts.map +1 -0
  53. package/dist/export/pages/ExportHistoryPage.js +261 -0
  54. package/dist/export/pages/ExportHistoryPage.js.map +1 -0
  55. package/dist/export/pages/ExportLandingPage.d.ts +9 -0
  56. package/dist/export/pages/ExportLandingPage.d.ts.map +1 -0
  57. package/dist/export/pages/ExportLandingPage.js +56 -0
  58. package/dist/export/pages/ExportLandingPage.js.map +1 -0
  59. package/dist/export/pages/ExportTemplatesPage.d.ts +6 -0
  60. package/dist/export/pages/ExportTemplatesPage.d.ts.map +1 -0
  61. package/dist/export/pages/ExportTemplatesPage.js +343 -0
  62. package/dist/export/pages/ExportTemplatesPage.js.map +1 -0
  63. package/dist/export/pages/TemplateDetailPage.d.ts +7 -0
  64. package/dist/export/pages/TemplateDetailPage.d.ts.map +1 -0
  65. package/dist/export/pages/TemplateDetailPage.js +215 -0
  66. package/dist/export/pages/TemplateDetailPage.js.map +1 -0
  67. package/dist/export/providers/ExportProvider.d.ts +13 -0
  68. package/dist/export/providers/ExportProvider.d.ts.map +1 -0
  69. package/dist/export/providers/ExportProvider.js +103 -0
  70. package/dist/export/providers/ExportProvider.js.map +1 -0
  71. package/dist/export/store/exportStore.d.ts +17 -0
  72. package/dist/export/store/exportStore.d.ts.map +1 -0
  73. package/dist/export/store/exportStore.js +43 -0
  74. package/dist/export/store/exportStore.js.map +1 -0
  75. package/dist/export/types/index.d.ts +230 -0
  76. package/dist/export/types/index.d.ts.map +1 -0
  77. package/dist/export/utils/cn.d.ts +8 -0
  78. package/dist/export/utils/cn.d.ts.map +1 -0
  79. package/dist/export/utils/cn.js +10 -0
  80. package/dist/export/utils/cn.js.map +1 -0
  81. package/dist/export/utils/events.d.ts +7 -0
  82. package/dist/export/utils/events.d.ts.map +1 -0
  83. package/dist/export/utils/events.js +16 -0
  84. package/dist/export/utils/events.js.map +1 -0
  85. package/dist/export/utils/i18n.d.ts +6 -0
  86. package/dist/export/utils/i18n.d.ts.map +1 -0
  87. package/dist/export/utils/i18n.js +15 -0
  88. package/dist/export/utils/i18n.js.map +1 -0
  89. package/dist/generated/global-operations.d.ts +2 -0
  90. package/dist/generated/global-operations.d.ts.map +1 -0
  91. package/dist/generated/global-types.d.ts +21253 -0
  92. package/dist/generated/global-types.d.ts.map +1 -0
  93. package/dist/generated/wspace-operations.d.ts +773 -0
  94. package/dist/generated/wspace-operations.d.ts.map +1 -0
  95. package/dist/generated/wspace-operations.js +319 -0
  96. package/dist/generated/wspace-operations.js.map +1 -0
  97. package/dist/generated/wspace-types.d.ts +55214 -0
  98. package/dist/generated/wspace-types.d.ts.map +1 -0
  99. package/dist/generated/wspace-types.js +12 -0
  100. package/dist/generated/wspace-types.js.map +1 -0
  101. package/dist/index.d.ts +6 -0
  102. package/dist/index.d.ts.map +1 -0
  103. package/dist/index.js +5 -0
  104. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js +24 -0
  105. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
  106. package/dist/node_modules/@apollo/client/errors/utils.js +16 -0
  107. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
  108. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js +52 -0
  109. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  110. package/dist/node_modules/@apollo/client/link/subscriptions/index.js +41 -0
  111. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
  112. package/dist/node_modules/@apollo/client/link/utils/createOperation.js +34 -0
  113. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  114. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js +6 -0
  115. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  116. package/dist/node_modules/@apollo/client/utilities/graphql/print.js +16 -0
  117. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  118. package/dist/node_modules/@apollo/client/utilities/internal/caches.js +19 -0
  119. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  120. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js +21 -0
  121. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  122. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js +17 -0
  123. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
  124. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  125. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  126. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js +9 -0
  127. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  128. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  129. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  130. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js +9 -0
  131. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  132. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  133. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  134. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
  135. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
  136. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js +10 -0
  137. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  138. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js +23 -0
  139. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  140. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js +10 -0
  141. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  142. package/dist/node_modules/@apollo/client/utilities/invariant/index.js +57 -0
  143. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  144. package/dist/node_modules/@apollo/client/version.js +6 -0
  145. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  146. package/dist/node_modules/@wry/caches/lib/weak.js +67 -0
  147. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  148. package/dist/node_modules/@wry/trie/lib/index.js +53 -0
  149. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  150. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  151. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  152. package/dist/node_modules/graphql-ws/dist/client.js +272 -0
  153. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
  154. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js +62 -0
  155. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
  156. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js +21 -0
  157. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  158. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js +78 -0
  159. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  160. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js +117 -0
  161. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  162. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js +93 -0
  163. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  164. package/dist/node_modules/rxjs/dist/esm5/internal/config.js +12 -0
  165. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  166. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js +9 -0
  167. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  168. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js +16 -0
  169. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  170. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js +8 -0
  171. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  172. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js +13 -0
  173. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  174. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  175. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  176. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js +11 -0
  177. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  178. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js +22 -0
  179. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  180. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  181. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  182. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  183. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  184. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  185. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  186. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js +13 -0
  187. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  188. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js +14 -0
  189. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  190. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js +52 -0
  191. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  192. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1674 -0
  193. package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
  194. package/dist/utils/nativeBridge.d.ts +3 -0
  195. package/dist/utils/nativeBridge.d.ts.map +1 -0
  196. package/dist/utils/nativeBridge.js +2 -0
  197. package/package.json +107 -0
package/README.md ADDED
@@ -0,0 +1,243 @@
1
+ # @burdenoff/microfe-export
2
+
3
+ > Google Takeout-style data export management interface for the Burdenoff platform
4
+
5
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.9-blue.svg)](https://www.typescriptlang.org/)
6
+ [![React](https://img.shields.io/badge/React-19-61dafb.svg)](https://reactjs.org/)
7
+ [![Vite](https://img.shields.io/badge/Vite-7-646cff.svg)](https://vitejs.dev/)
8
+
9
+ ## Overview
10
+
11
+ The Export microfrontend provides a complete data export management system inspired by Google Takeout. Users can select data categories, choose export formats, schedule recurring exports, and download archived data packages. It enables users to maintain full control over their data with transparent export workflows.
12
+
13
+ **Port:** `5175`
14
+ **Module Type:** Workspace Module
15
+ **API Gateway:** wspace-public-gateway
16
+
17
+ ## Features
18
+
19
+ - **Export Dashboard**
20
+ - Overview of active and completed exports
21
+ - Quick-action buttons for common export types
22
+ - Storage usage and quota display
23
+ - Recent activity feed
24
+
25
+ - **Export Creation Wizard**
26
+ - Multi-step data category selection
27
+ - Hierarchical checkbox tree for granular data picking
28
+ - Format selection (ZIP, JSON, CSV, XML)
29
+ - File size estimation
30
+ - One-time or recurring schedule configuration
31
+
32
+ - **Export History**
33
+ - Paginated list of past exports
34
+ - Status indicators (pending, processing, completed, failed, expired)
35
+ - File size and download count tracking
36
+ - Bulk download and bulk delete actions
37
+
38
+ - **Export Detail View**
39
+ - Real-time progress tracking with percentage
40
+ - File manifest listing all included data
41
+ - Retry failed exports
42
+ - Cancel in-progress exports
43
+ - Download individual files or full archive
44
+
45
+ - **Export Templates**
46
+ - Save export configurations for reuse
47
+ - Template naming and description
48
+ - Quick-export from saved templates
49
+ - Share templates within workspace
50
+
51
+ - **Permissions & Access Control**
52
+ - Role-based export permissions
53
+ - Data category access restrictions
54
+ - Export audit logging
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ # Install dependencies
60
+ bun install
61
+
62
+ # Generate GraphQL types
63
+ bun run codegen
64
+ ```
65
+
66
+ ## Development
67
+
68
+ ```bash
69
+ # Start development server (port 5175)
70
+ bun run dev
71
+
72
+ # Run linter
73
+ bun run lint
74
+
75
+ # Format code
76
+ bun run format
77
+
78
+ # Type check
79
+ bun run type:check
80
+
81
+ # Build for production
82
+ bun run build
83
+
84
+ # Run all quality checks
85
+ bun run sanity
86
+ ```
87
+
88
+ ## Project Structure
89
+
90
+ ```
91
+ src/
92
+ ├── dev/ # Development harness
93
+ │ ├── main.tsx # Dev entry point
94
+ │ └── styles.css # Dev styles
95
+ ├── export/ # Main module
96
+ │ ├── components/ # React components
97
+ │ │ ├── PageLayout.tsx
98
+ │ │ ├── ExportCard.tsx
99
+ │ │ ├── ExportProgress.tsx
100
+ │ │ ├── DataCategoryPicker.tsx
101
+ │ │ ├── FormatSelector.tsx
102
+ │ │ ├── ScheduleConfig.tsx
103
+ │ │ ├── TemplateCard.tsx
104
+ │ │ └── ui.tsx # UI components
105
+ │ ├── hooks/ # Custom React hooks
106
+ │ ├── pages/ # Page components
107
+ │ │ ├── Dashboard.tsx
108
+ │ │ ├── CreateExport.tsx
109
+ │ │ ├── History.tsx
110
+ │ │ ├── Detail.tsx
111
+ │ │ └── Templates.tsx
112
+ │ ├── providers/ # Context providers
113
+ │ ├── store/ # Zustand state management
114
+ │ ├── types/ # TypeScript types
115
+ │ ├── utils/ # Utility functions
116
+ │ ├── ExportRoot.tsx # Module root component
117
+ │ ├── ExportRoutes.tsx # Route definitions
118
+ │ └── index.ts # Public API
119
+ ├── generated/ # GraphQL generated types (do not edit)
120
+ │ ├── wspace-types.ts
121
+ │ ├── wspace-operations.ts
122
+ │ ├── global-types.ts
123
+ │ └── global-operations.ts
124
+ ├── operations/ # GraphQL operation documents
125
+ │ ├── wspace/
126
+ │ │ └── export/ # Workspace export operations
127
+ │ └── global/ # Global operations
128
+ └── index.ts # Package entry point
129
+ ```
130
+
131
+ ## GraphQL Operations
132
+
133
+ ### Queries
134
+ - `getExports` — List exports with filtering and pagination
135
+ - `getExport` — Get single export details by ID
136
+ - `getExportProgress` — Real-time export progress
137
+ - `getExportTemplates` — List saved export templates
138
+ - `getDataCategories` — Available data categories for export
139
+ - `getExportQuota` — Storage quota and usage
140
+
141
+ ### Mutations
142
+ - `createExport` — Start a new export job
143
+ - `cancelExport` — Cancel an in-progress export
144
+ - `retryExport` — Retry a failed export
145
+ - `deleteExport` — Remove an export and its files
146
+ - `createExportTemplate` — Save an export configuration as template
147
+ - `updateExportTemplate` — Update a saved template
148
+ - `deleteExportTemplate` — Remove a saved template
149
+
150
+ ### Subscriptions
151
+ - `onExportProgress` — Real-time progress updates for active exports
152
+
153
+ ## Configuration
154
+
155
+ ### Environment Variables
156
+
157
+ ```env
158
+ VITE_API_GATEWAY_URL=http://localhost:4003/workspaces/graphql
159
+ VITE_WORKSPACE_ID=your-workspace-id
160
+ ```
161
+
162
+ ### Integration with Shell
163
+
164
+ ```tsx
165
+ import { ExportRoot } from '@burdenoff/microfe-export';
166
+
167
+ function App() {
168
+ return (
169
+ <ExportRoot
170
+ basePath="/export"
171
+ navigate={navigate}
172
+ apiGatewayUrl="http://localhost:4003/workspaces/graphql"
173
+ workspaceId="workspace-123"
174
+ authToken="your-token"
175
+ />
176
+ );
177
+ }
178
+ ```
179
+
180
+ ## Routes
181
+
182
+ | Path | Page | Description |
183
+ |------|------|-------------|
184
+ | `/export` | Dashboard | Export overview and quick actions |
185
+ | `/export/create` | CreateExport | New export wizard |
186
+ | `/export/history` | History | Past exports list |
187
+ | `/export/:id` | Detail | Single export details |
188
+ | `/export/templates` | Templates | Saved export templates |
189
+
190
+ ## Available Scripts
191
+
192
+ | Script | Description |
193
+ |--------|-------------|
194
+ | `bun run dev` | Start development server on port 5175 |
195
+ | `bun run build` | Build for production |
196
+ | `bun run lint` | Run ESLint |
197
+ | `bun run format` | Format with Prettier |
198
+ | `bun run type:check` | TypeScript type checking |
199
+ | `bun run codegen` | Generate GraphQL types |
200
+ | `bun run codegen:all` | Pull schemas + generate types |
201
+ | `bun run sanity` | Run all quality checks |
202
+
203
+ ## Technology Stack
204
+
205
+ - **Framework:** React 19 with TypeScript 5.9
206
+ - **Build Tool:** Vite 7
207
+ - **State Management:** Zustand 5
208
+ - **GraphQL Client:** Apollo Client
209
+ - **Styling:** Tailwind CSS v4
210
+ - **UI Components:** Radix UI
211
+ - **Icons:** Lucide React
212
+ - **Routing:** React Router DOM 7
213
+
214
+ ## Module Architecture
215
+
216
+ This is a **microfrontend module** designed to be:
217
+ - **Independently deployable** — Can run standalone or integrated
218
+ - **Technology agnostic** — Exposes a standard interface
219
+ - **Self-contained** — Includes all dependencies
220
+ - **Composable** — Works with other microfrontends
221
+
222
+ ```
223
+ Host Shell --imports--> microfe-export (Root export)
224
+ |
225
+ +-- Layer 0: @burdenoff/fe-libs/shared
226
+ +-- Layer 1: @burdenoff/fe-libs/* (primitives)
227
+ +-- Layer 2: This MFE package
228
+ ```
229
+
230
+ ## Contributing
231
+
232
+ 1. Create a feature branch from `main`
233
+ 2. Make your changes
234
+ 3. Run `bun run sanity` to ensure all checks pass
235
+ 4. Submit a pull request
236
+
237
+ ## License
238
+
239
+ Proprietary - Copyright 2025 Burdenoff Consultancy Services Pvt. Ltd.
240
+
241
+ ## Support
242
+
243
+ For issues and questions, please contact the development team or refer to the main repository documentation.
@@ -0,0 +1,2 @@
1
+
2
+ //# sourceMappingURL=main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/dev/main.tsx"],"names":[],"mappings":"AAQA,OAAO,cAAc,CAAC"}
@@ -0,0 +1,31 @@
1
+ import { FC } from 'react';
2
+ import { ExportRootProps } from './types';
3
+
4
+ /**
5
+ * Root component for the Export microfrontend.
6
+ *
7
+ * This is the main entry point that host applications import and render.
8
+ * It sets up the necessary providers and renders the internal routing.
9
+ * Automatically registers navigation items with the shell if registration functions are provided.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * import { ExportRoot, type ExportRootProps } from '@burdenoff/micro-fe/export';
14
+ *
15
+ * function App() {
16
+ * const props: ExportRootProps = {
17
+ * basePath: '/export',
18
+ * navigate: (path) => router.push(path),
19
+ * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },
20
+ * workspaceId: 'ws-123',
21
+ * apiGatewayUrl: 'https://api.example.com',
22
+ * authToken: 'token',
23
+ * registerNavItems: (items) => { return () => {}; },
24
+ * };
25
+ *
26
+ * return <ExportRoot {...props} />;
27
+ * }
28
+ * ```
29
+ */
30
+ export declare const ExportRoot: FC<ExportRootProps>;
31
+ //# sourceMappingURL=ExportRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportRoot.d.ts","sourceRoot":"","sources":["../../src/export/ExportRoot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,OAAO,KAAK,EAAW,eAAe,EAAE,MAAM,SAAS,CAAC;AAGxD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA+F1C,CAAC"}
@@ -0,0 +1,70 @@
1
+ import { ExportProvider as e } from "./providers/ExportProvider.js";
2
+ import { ExportRoutes as t } from "./ExportRoutes.js";
3
+ import { useEffect as n } from "react";
4
+ import { Clock as r, Download as i, FileBox as a, Plus as o } from "lucide-react";
5
+ import { FeatureFlagProvider as s } from "@burdenoff/fe-libs/shared/feature-flags";
6
+ import { jsx as c } from "react/jsx-runtime";
7
+ //#region src/export/ExportRoot.tsx
8
+ var l = (l) => {
9
+ let { registerNavItems: u, registerFooterItems: d, basePath: f = "/", workspaceId: p } = l, m = (e, t) => (e.endsWith("/") ? e.slice(0, -1) : e) + (t.startsWith("/") ? t : `/${t}`);
10
+ return n(() => {
11
+ if (u) return u({
12
+ id: "export",
13
+ label: "Export",
14
+ path: f,
15
+ icon: /* @__PURE__ */ c(i, { size: 20 }),
16
+ order: 75,
17
+ group: "workspace",
18
+ children: [
19
+ {
20
+ id: "export-dashboard",
21
+ label: "Dashboard",
22
+ path: f,
23
+ icon: /* @__PURE__ */ c(a, { size: 16 }),
24
+ order: 10
25
+ },
26
+ {
27
+ id: "export-new",
28
+ label: "New Export",
29
+ path: m(f, "new"),
30
+ icon: /* @__PURE__ */ c(o, { size: 16 }),
31
+ order: 20
32
+ },
33
+ {
34
+ id: "export-history",
35
+ label: "History",
36
+ path: m(f, "history"),
37
+ icon: /* @__PURE__ */ c(r, { size: 16 }),
38
+ order: 30
39
+ },
40
+ {
41
+ id: "export-templates",
42
+ label: "Templates",
43
+ path: m(f, "templates"),
44
+ icon: /* @__PURE__ */ c(a, { size: 16 }),
45
+ order: 40
46
+ }
47
+ ]
48
+ });
49
+ }, [u, f]), n(() => {
50
+ if (d) return d([{
51
+ id: "export-status",
52
+ label: "Export Ready",
53
+ type: "status",
54
+ order: 10,
55
+ section: "left"
56
+ }]);
57
+ }, [d]), /* @__PURE__ */ c(s, {
58
+ workspaceId: p ?? null,
59
+ gateway: "global",
60
+ defaultEnabled: !0,
61
+ children: /* @__PURE__ */ c(e, {
62
+ ...l,
63
+ children: /* @__PURE__ */ c(t, {})
64
+ })
65
+ });
66
+ };
67
+ //#endregion
68
+ export { l as ExportRoot };
69
+
70
+ //# sourceMappingURL=ExportRoot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportRoot.js","names":[],"sources":["../../src/export/ExportRoot.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useEffect } from \"react\";\nimport { Download, Plus, Clock, FileBox } from \"lucide-react\";\nimport { FeatureFlagProvider } from \"@burdenoff/fe-libs/shared/feature-flags\";\nimport { ExportProvider } from \"./providers/ExportProvider\";\nimport type { NavItem, ExportRootProps } from \"./types\";\nimport { ExportRoutes } from \"./ExportRoutes\";\n\n/**\n * Root component for the Export microfrontend.\n *\n * This is the main entry point that host applications import and render.\n * It sets up the necessary providers and renders the internal routing.\n * Automatically registers navigation items with the shell if registration functions are provided.\n *\n * @example\n * ```tsx\n * import { ExportRoot, type ExportRootProps } from '@burdenoff/micro-fe/export';\n *\n * function App() {\n * const props: ExportRootProps = {\n * basePath: '/export',\n * navigate: (path) => router.push(path),\n * currentUser: { id: '1', email: 'user@example.com', firstName: 'John', lastName: 'Doe' },\n * workspaceId: 'ws-123',\n * apiGatewayUrl: 'https://api.example.com',\n * authToken: 'token',\n * registerNavItems: (items) => { return () => {}; },\n * };\n *\n * return <ExportRoot {...props} />;\n * }\n * ```\n */\nexport const ExportRoot: FC<ExportRootProps> = (props) => {\n const {\n registerNavItems,\n registerFooterItems,\n basePath = \"/\",\n workspaceId,\n } = props;\n\n // Helper to join paths correctly, avoiding double slashes\n const 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 // Register navigation items with the shell\n useEffect(() => {\n if (!registerNavItems) return;\n\n // Create a parent \"Export\" item with children for dropdown behavior\n const exportNavItem: NavItem = {\n id: \"export\",\n label: \"Export\",\n path: basePath,\n icon: <Download size={20} />,\n order: 75,\n group: \"workspace\",\n children: [\n {\n id: \"export-dashboard\",\n label: \"Dashboard\",\n path: basePath,\n icon: <FileBox size={16} />,\n order: 10,\n },\n {\n id: \"export-new\",\n label: \"New Export\",\n path: joinPath(basePath, \"new\"),\n icon: <Plus size={16} />,\n order: 20,\n },\n {\n id: \"export-history\",\n label: \"History\",\n path: joinPath(basePath, \"history\"),\n icon: <Clock size={16} />,\n order: 30,\n },\n {\n id: \"export-templates\",\n label: \"Templates\",\n path: joinPath(basePath, \"templates\"),\n icon: <FileBox size={16} />,\n order: 40,\n },\n ],\n };\n\n // Register and get cleanup function\n const cleanup = registerNavItems(exportNavItem);\n\n // Return cleanup function to unregister on unmount\n return cleanup;\n }, [registerNavItems, basePath]);\n\n // Register footer items\n useEffect(() => {\n if (!registerFooterItems) return;\n\n const footerItems = [\n {\n id: \"export-status\",\n label: \"Export Ready\",\n type: \"status\" as const,\n order: 10,\n section: \"left\" as const,\n },\n ];\n\n const cleanup = registerFooterItems(footerItems);\n return cleanup;\n }, [registerFooterItems]);\n\n return (\n <FeatureFlagProvider\n workspaceId={workspaceId ?? null}\n gateway=\"global\"\n defaultEnabled={true}\n >\n <ExportProvider {...props}>\n <ExportRoutes />\n </ExportProvider>\n </FeatureFlagProvider>\n );\n};\n"],"mappings":";;;;;;;AAkCA,IAAa,KAAmC,MAAU;CACxD,IAAM,EACJ,qBACA,wBACA,cAAW,KACX,mBACE,GAGE,KAAY,GAAc,OACZ,EAAK,SAAS,IAAI,GAAG,EAAK,MAAM,GAAG,GAAG,GAAG,MACzC,EAAK,WAAW,IAAI,GAAG,IAAO,IAAI;AAyEtD,QApEA,QAAgB;AACT,QA8CL,QAHgB,EAxCe;GAC7B,IAAI;GACJ,OAAO;GACP,MAAM;GACN,MAAM,kBAAC,GAAD,EAAU,MAAM,IAAM,CAAA;GAC5B,OAAO;GACP,OAAO;GACP,UAAU;IACR;KACE,IAAI;KACJ,OAAO;KACP,MAAM;KACN,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;KAC3B,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,MAAM;KAC/B,MAAM,kBAAC,GAAD,EAAM,MAAM,IAAM,CAAA;KACxB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,UAAU;KACnC,MAAM,kBAAC,GAAD,EAAO,MAAM,IAAM,CAAA;KACzB,OAAO;KACR;IACD;KACE,IAAI;KACJ,OAAO;KACP,MAAM,EAAS,GAAU,YAAY;KACrC,MAAM,kBAAC,GAAD,EAAS,MAAM,IAAM,CAAA;KAC3B,OAAO;KACR;IACF;GACF,CAG8C;IAI9C,CAAC,GAAkB,EAAS,CAAC,EAGhC,QAAgB;AACT,QAaL,QADgB,EAVI,CAClB;GACE,IAAI;GACJ,OAAO;GACP,MAAM;GACN,OAAO;GACP,SAAS;GACV,CACF,CAE+C;IAE/C,CAAC,EAAoB,CAAC,EAGvB,kBAAC,GAAD;EACE,aAAa,KAAe;EAC5B,SAAQ;EACR,gBAAgB;YAEhB,kBAAC,GAAD;GAAgB,GAAI;aAClB,kBAAC,GAAD,EAAgB,CAAA;GACD,CAAA;EACG,CAAA"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Internal router for the Export microfrontend.
3
+ * This component handles routing within the microfrontend using React Router v7.
4
+ *
5
+ * Routes (relative to basePath, e.g., /export):
6
+ * - / → Export dashboard page
7
+ * - /new → Create new export job
8
+ * - /history → Export history list
9
+ * - /:jobId → Export job detail page
10
+ * - /templates → Export templates list
11
+ * - /templates/:templateId → Template detail page
12
+ */
13
+ export declare function ExportRoutes(): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=ExportRoutes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportRoutes.d.ts","sourceRoot":"","sources":["../../src/export/ExportRoutes.tsx"],"names":[],"mappings":"AA2GA;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,4CA8B3B"}
@@ -0,0 +1,104 @@
1
+ import { ExportLandingPage as e } from "./pages/ExportLandingPage.js";
2
+ import { Component as t, Suspense as n, lazy as r } from "react";
3
+ import { AlertTriangle as i, Loader2 as a, RefreshCw as o } from "lucide-react";
4
+ import { Navigate as s, Route as c, Routes as l } from "react-router-dom";
5
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
6
+ //#region src/export/ExportRoutes.tsx
7
+ var f = r(() => import("./pages/CreateExportPage.js").then((e) => ({ default: e.CreateExportPage }))), p = r(() => import("./pages/ExportHistoryPage.js").then((e) => ({ default: e.ExportHistoryPage }))), m = r(() => import("./pages/ExportDetailPage.js").then((e) => ({ default: e.ExportDetailPage }))), h = r(() => import("./pages/ExportTemplatesPage.js").then((e) => ({ default: e.ExportTemplatesPage }))), g = r(() => import("./pages/TemplateDetailPage.js").then((e) => ({ default: e.TemplateDetailPage })));
8
+ function _() {
9
+ return /* @__PURE__ */ u("div", {
10
+ className: "flex items-center justify-center min-h-[400px]",
11
+ children: /* @__PURE__ */ u(a, { className: "h-8 w-8 animate-spin text-primary" })
12
+ });
13
+ }
14
+ var v = class extends t {
15
+ constructor(e) {
16
+ super(e), this.state = {
17
+ hasError: !1,
18
+ error: null
19
+ };
20
+ }
21
+ static getDerivedStateFromError(e) {
22
+ return {
23
+ hasError: !0,
24
+ error: e
25
+ };
26
+ }
27
+ componentDidCatch(e, t) {
28
+ console.error("[Export] Lazy page load failed:", e, t);
29
+ }
30
+ handleRetry = () => {
31
+ this.setState({
32
+ hasError: !1,
33
+ error: null
34
+ });
35
+ };
36
+ render() {
37
+ return this.state.hasError ? /* @__PURE__ */ d("div", {
38
+ className: "flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6",
39
+ children: [
40
+ /* @__PURE__ */ u("div", {
41
+ className: "p-3 rounded-full bg-destructive/10",
42
+ children: /* @__PURE__ */ u(i, { className: "h-8 w-8 text-destructive" })
43
+ }),
44
+ /* @__PURE__ */ d("div", {
45
+ className: "space-y-2",
46
+ children: [/* @__PURE__ */ u("h3", {
47
+ className: "text-lg font-semibold text-foreground",
48
+ children: "Failed to load page"
49
+ }), /* @__PURE__ */ u("p", {
50
+ className: "text-sm text-muted-foreground max-w-md",
51
+ children: this.state.error?.message || "The page chunk could not be loaded. This may be due to a network issue."
52
+ })]
53
+ }),
54
+ /* @__PURE__ */ d("button", {
55
+ onClick: this.handleRetry,
56
+ className: "inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors",
57
+ children: [/* @__PURE__ */ u(o, { className: "h-4 w-4" }), "Try Again"]
58
+ })
59
+ ]
60
+ }) : this.props.children;
61
+ }
62
+ };
63
+ function y() {
64
+ return /* @__PURE__ */ u(v, { children: /* @__PURE__ */ u(n, {
65
+ fallback: /* @__PURE__ */ u(_, {}),
66
+ children: /* @__PURE__ */ d(l, { children: [
67
+ /* @__PURE__ */ u(c, {
68
+ index: !0,
69
+ element: /* @__PURE__ */ u(e, {})
70
+ }),
71
+ /* @__PURE__ */ u(c, {
72
+ path: "new",
73
+ element: /* @__PURE__ */ u(f, {})
74
+ }),
75
+ /* @__PURE__ */ u(c, {
76
+ path: "history",
77
+ element: /* @__PURE__ */ u(p, {})
78
+ }),
79
+ /* @__PURE__ */ u(c, {
80
+ path: ":jobId",
81
+ element: /* @__PURE__ */ u(m, {})
82
+ }),
83
+ /* @__PURE__ */ u(c, {
84
+ path: "templates",
85
+ element: /* @__PURE__ */ u(h, {})
86
+ }),
87
+ /* @__PURE__ */ u(c, {
88
+ path: "templates/:templateId",
89
+ element: /* @__PURE__ */ u(g, {})
90
+ }),
91
+ /* @__PURE__ */ u(c, {
92
+ path: "*",
93
+ element: /* @__PURE__ */ u(s, {
94
+ to: "",
95
+ replace: !0
96
+ })
97
+ })
98
+ ] })
99
+ }) });
100
+ }
101
+ //#endregion
102
+ export { y as ExportRoutes };
103
+
104
+ //# sourceMappingURL=ExportRoutes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportRoutes.js","names":[],"sources":["../../src/export/ExportRoutes.tsx"],"sourcesContent":["import {\n lazy,\n Suspense,\n Component,\n type ReactNode,\n type ErrorInfo,\n} from \"react\";\nimport { Navigate, Route, Routes } from \"react-router-dom\";\nimport { Loader2, AlertTriangle, RefreshCw } from \"lucide-react\";\n\n// Eager loaded - primary landing page\nimport { ExportLandingPage } from \"./pages/ExportLandingPage\";\n\n// Lazy loaded pages\nconst CreateExportPage = lazy(() =>\n import(\"./pages/CreateExportPage\").then((m) => ({\n default: m.CreateExportPage,\n })),\n);\nconst ExportHistoryPage = lazy(() =>\n import(\"./pages/ExportHistoryPage\").then((m) => ({\n default: m.ExportHistoryPage,\n })),\n);\nconst ExportDetailPage = lazy(() =>\n import(\"./pages/ExportDetailPage\").then((m) => ({\n default: m.ExportDetailPage,\n })),\n);\nconst ExportTemplatesPage = lazy(() =>\n import(\"./pages/ExportTemplatesPage\").then((m) => ({\n default: m.ExportTemplatesPage,\n })),\n);\nconst TemplateDetailPage = lazy(() =>\n import(\"./pages/TemplateDetailPage\").then((m) => ({\n default: m.TemplateDetailPage,\n })),\n);\n\n/**\n * Loading fallback for lazy-loaded pages\n */\nfunction PageLoader() {\n return (\n <div className=\"flex items-center justify-center min-h-[400px]\">\n <Loader2 className=\"h-8 w-8 animate-spin text-primary\" />\n </div>\n );\n}\n\n/**\n * Error boundary for lazy-loaded page chunks.\n * Catches chunk-load failures and renders a retry UI instead of an infinite spinner.\n */\nclass LazyErrorBoundary extends Component<\n { children: ReactNode },\n { hasError: boolean; error: Error | null }\n> {\n constructor(props: { children: ReactNode }) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error) {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: ErrorInfo) {\n console.error(\"[Export] Lazy page load failed:\", error, errorInfo);\n }\n\n handleRetry = () => {\n this.setState({ hasError: false, error: null });\n };\n\n render() {\n if (this.state.hasError) {\n return (\n <div className=\"flex flex-col items-center justify-center min-h-[400px] gap-4 text-center p-6\">\n <div className=\"p-3 rounded-full bg-destructive/10\">\n <AlertTriangle className=\"h-8 w-8 text-destructive\" />\n </div>\n <div className=\"space-y-2\">\n <h3 className=\"text-lg font-semibold text-foreground\">\n Failed to load page\n </h3>\n <p className=\"text-sm text-muted-foreground max-w-md\">\n {this.state.error?.message ||\n \"The page chunk could not be loaded. This may be due to a network issue.\"}\n </p>\n </div>\n <button\n onClick={this.handleRetry}\n className=\"inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 transition-colors\"\n >\n <RefreshCw className=\"h-4 w-4\" />\n Try Again\n </button>\n </div>\n );\n }\n\n return this.props.children;\n }\n}\n\n/**\n * Internal router for the Export microfrontend.\n * This component handles routing within the microfrontend using React Router v7.\n *\n * Routes (relative to basePath, e.g., /export):\n * - / → Export dashboard page\n * - /new → Create new export job\n * - /history → Export history list\n * - /:jobId → Export job detail page\n * - /templates → Export templates list\n * - /templates/:templateId → Template detail page\n */\nexport function ExportRoutes() {\n return (\n <LazyErrorBoundary>\n <Suspense fallback={<PageLoader />}>\n <Routes>\n {/* Tabbed landing - default route (eager loaded) */}\n <Route index element={<ExportLandingPage />} />\n\n {/* Create new export (lazy loaded) */}\n <Route path=\"new\" element={<CreateExportPage />} />\n\n {/* Export history (lazy loaded) */}\n <Route path=\"history\" element={<ExportHistoryPage />} />\n\n {/* Export job detail (lazy loaded) */}\n <Route path=\":jobId\" element={<ExportDetailPage />} />\n\n {/* Templates (lazy loaded) */}\n <Route path=\"templates\" element={<ExportTemplatesPage />} />\n <Route\n path=\"templates/:templateId\"\n element={<TemplateDetailPage />}\n />\n\n {/* Catch-all route - redirect to dashboard */}\n <Route path=\"*\" element={<Navigate to=\"\" replace />} />\n </Routes>\n </Suspense>\n </LazyErrorBoundary>\n );\n}\n"],"mappings":";;;;;;AAcA,IAAM,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAoB,QACxB,OAAO,gCAA6B,MAAM,OAAO,EAC/C,SAAS,EAAE,mBACZ,EAAE,CACJ,EACK,IAAmB,QACvB,OAAO,+BAA4B,MAAM,OAAO,EAC9C,SAAS,EAAE,kBACZ,EAAE,CACJ,EACK,IAAsB,QAC1B,OAAO,kCAA+B,MAAM,OAAO,EACjD,SAAS,EAAE,qBACZ,EAAE,CACJ,EACK,IAAqB,QACzB,OAAO,iCAA8B,MAAM,OAAO,EAChD,SAAS,EAAE,oBACZ,EAAE,CACJ;AAKD,SAAS,IAAa;AACpB,QACE,kBAAC,OAAD;EAAK,WAAU;YACb,kBAAC,GAAD,EAAS,WAAU,qCAAsC,CAAA;EACrD,CAAA;;AAQV,IAAM,IAAN,cAAgC,EAG9B;CACA,YAAY,GAAgC;AAE1C,EADA,MAAM,EAAM,EACZ,KAAK,QAAQ;GAAE,UAAU;GAAO,OAAO;GAAM;;CAG/C,OAAO,yBAAyB,GAAc;AAC5C,SAAO;GAAE,UAAU;GAAM;GAAO;;CAGlC,kBAAkB,GAAc,GAAsB;AACpD,UAAQ,MAAM,mCAAmC,GAAO,EAAU;;CAGpE,oBAAoB;AAClB,OAAK,SAAS;GAAE,UAAU;GAAO,OAAO;GAAM,CAAC;;CAGjD,SAAS;AA2BP,SA1BI,KAAK,MAAM,WAEX,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD,EAAe,WAAU,4BAA6B,CAAA;KAClD,CAAA;IACN,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,MAAD;MAAI,WAAU;gBAAwC;MAEjD,CAAA,EACL,kBAAC,KAAD;MAAG,WAAU;gBACV,KAAK,MAAM,OAAO,WACjB;MACA,CAAA,CACA;;IACN,kBAAC,UAAD;KACE,SAAS,KAAK;KACd,WAAU;eAFZ,CAIE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EAAA,YAE1B;;IACL;OAIH,KAAK,MAAM;;;AAgBtB,SAAgB,IAAe;AAC7B,QACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;EAAU,UAAU,kBAAC,GAAD,EAAc,CAAA;YAChC,kBAAC,GAAD,EAAA,UAAA;GAEE,kBAAC,GAAD;IAAO,OAAA;IAAM,SAAS,kBAAC,GAAD,EAAqB,CAAA;IAAI,CAAA;GAG/C,kBAAC,GAAD;IAAO,MAAK;IAAM,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GAGnD,kBAAC,GAAD;IAAO,MAAK;IAAU,SAAS,kBAAC,GAAD,EAAqB,CAAA;IAAI,CAAA;GAGxD,kBAAC,GAAD;IAAO,MAAK;IAAS,SAAS,kBAAC,GAAD,EAAoB,CAAA;IAAI,CAAA;GAGtD,kBAAC,GAAD;IAAO,MAAK;IAAY,SAAS,kBAAC,GAAD,EAAuB,CAAA;IAAI,CAAA;GAC5D,kBAAC,GAAD;IACE,MAAK;IACL,SAAS,kBAAC,GAAD,EAAsB,CAAA;IAC/B,CAAA;GAGF,kBAAC,GAAD;IAAO,MAAK;IAAI,SAAS,kBAAC,GAAD;KAAU,IAAG;KAAG,SAAA;KAAU,CAAA;IAAI,CAAA;GAChD,EAAA,CAAA;EACA,CAAA,EACO,CAAA"}
@@ -0,0 +1,12 @@
1
+ interface ExportProgressBarProps {
2
+ progress: number;
3
+ className?: string;
4
+ showLabel?: boolean;
5
+ size?: "sm" | "md" | "lg";
6
+ }
7
+ /**
8
+ * ExportProgressBar - Shows export progress percentage
9
+ */
10
+ export declare function ExportProgressBar({ progress, className, showLabel, size, }: ExportProgressBarProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=ExportProgressBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportProgressBar.d.ts","sourceRoot":"","sources":["../../../src/export/components/ExportProgressBar.tsx"],"names":[],"mappings":"AAEA,UAAU,sBAAsB;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAQD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,SAAS,EACT,SAAgB,EAChB,IAAW,GACZ,EAAE,sBAAsB,2CAiCxB"}
@@ -0,0 +1,34 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { jsx as t, jsxs as n } from "react/jsx-runtime";
3
+ //#region src/export/components/ExportProgressBar.tsx
4
+ var r = {
5
+ sm: "h-1.5",
6
+ md: "h-2.5",
7
+ lg: "h-4"
8
+ };
9
+ function i({ progress: i, className: a, showLabel: o = !0, size: s = "md" }) {
10
+ let c = Math.min(100, Math.max(0, i));
11
+ return /* @__PURE__ */ n("div", {
12
+ className: e("w-full", a),
13
+ children: [o && /* @__PURE__ */ n("div", {
14
+ className: "flex items-center justify-between mb-1",
15
+ children: [/* @__PURE__ */ t("span", {
16
+ className: "text-xs font-medium text-muted-foreground",
17
+ children: "Progress"
18
+ }), /* @__PURE__ */ n("span", {
19
+ className: "text-xs font-semibold text-foreground",
20
+ children: [Math.round(c), "%"]
21
+ })]
22
+ }), /* @__PURE__ */ t("div", {
23
+ className: e("w-full bg-muted rounded-full overflow-hidden", r[s]),
24
+ children: /* @__PURE__ */ t("div", {
25
+ className: e("h-full rounded-full transition-all duration-500 ease-out", c === 100 ? "bg-status-success-bg" : "bg-primary bg-gradient-to-r from-primary to-primary/80"),
26
+ style: { width: `${c}%` }
27
+ })
28
+ })]
29
+ });
30
+ }
31
+ //#endregion
32
+ export { i as ExportProgressBar };
33
+
34
+ //# sourceMappingURL=ExportProgressBar.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportProgressBar.js","names":[],"sources":["../../../src/export/components/ExportProgressBar.tsx"],"sourcesContent":["import { cn } from \"../utils/cn\";\n\ninterface ExportProgressBarProps {\n progress: number;\n className?: string;\n showLabel?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nconst sizeClasses = {\n sm: \"h-1.5\",\n md: \"h-2.5\",\n lg: \"h-4\",\n};\n\n/**\n * ExportProgressBar - Shows export progress percentage\n */\nexport function ExportProgressBar({\n progress,\n className,\n showLabel = true,\n size = \"md\",\n}: ExportProgressBarProps) {\n const clampedProgress = Math.min(100, Math.max(0, progress));\n\n return (\n <div className={cn(\"w-full\", className)}>\n {showLabel && (\n <div className=\"flex items-center justify-between mb-1\">\n <span className=\"text-xs font-medium text-muted-foreground\">\n Progress\n </span>\n <span className=\"text-xs font-semibold text-foreground\">\n {Math.round(clampedProgress)}%\n </span>\n </div>\n )}\n <div\n className={cn(\n \"w-full bg-muted rounded-full overflow-hidden\",\n sizeClasses[size],\n )}\n >\n <div\n className={cn(\n \"h-full rounded-full transition-all duration-500 ease-out\",\n clampedProgress === 100\n ? \"bg-status-success-bg\"\n : \"bg-primary bg-gradient-to-r from-primary to-primary/80\",\n )}\n style={{ width: `${clampedProgress}%` }}\n />\n </div>\n </div>\n );\n}\n"],"mappings":";;;AASA,IAAM,IAAc;CAClB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAKD,SAAgB,EAAkB,EAChC,aACA,cACA,eAAY,IACZ,UAAO,QACkB;CACzB,IAAM,IAAkB,KAAK,IAAI,KAAK,KAAK,IAAI,GAAG,EAAS,CAAC;AAE5D,QACE,kBAAC,OAAD;EAAK,WAAW,EAAG,UAAU,EAAU;YAAvC,CACG,KACC,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,QAAD;IAAM,WAAU;cAA4C;IAErD,CAAA,EACP,kBAAC,QAAD;IAAM,WAAU;cAAhB,CACG,KAAK,MAAM,EAAgB,EAAC,IACxB;MACH;MAER,kBAAC,OAAD;GACE,WAAW,EACT,gDACA,EAAY,GACb;aAED,kBAAC,OAAD;IACE,WAAW,EACT,4DACA,MAAoB,MAChB,yBACA,yDACL;IACD,OAAO,EAAE,OAAO,GAAG,EAAgB,IAAI;IACvC,CAAA;GACE,CAAA,CACF"}
@@ -0,0 +1,12 @@
1
+ import { ExportJobStatus } from '../types';
2
+
3
+ interface ExportStatusBadgeProps {
4
+ status: ExportJobStatus;
5
+ className?: string;
6
+ }
7
+ /**
8
+ * ExportStatusBadge - Renders a colored badge for export job status
9
+ */
10
+ export declare function ExportStatusBadge({ status, className, }: ExportStatusBadgeProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=ExportStatusBadge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportStatusBadge.d.ts","sourceRoot":"","sources":["../../../src/export/components/ExportStatusBadge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAGhD,UAAU,sBAAsB;IAC9B,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAaD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,SAAS,GACV,EAAE,sBAAsB,2CAiCxB"}
@@ -0,0 +1,39 @@
1
+ import { cn as e } from "../utils/cn.js";
2
+ import { getStatusDisplayName as t } from "../constants/enums.js";
3
+ import { tWithFallback as n } from "../utils/i18n.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import { useI18n as a } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
6
+ //#region src/export/components/ExportStatusBadge.tsx
7
+ var o = {
8
+ CREATED: "bg-status-info-bg-subtle text-status-info-text",
9
+ QUEUED: "bg-status-warning-bg-subtle text-status-warning-text",
10
+ RUNNING: "bg-status-info-bg-subtle text-status-info-text animate-pulse",
11
+ COMPLETED: "bg-status-success-bg-subtle text-status-success-text",
12
+ FAILED: "bg-status-error-bg-subtle text-status-error-text",
13
+ CANCELLED: "bg-bg-sunken text-text-secondary",
14
+ EXPIRED: "bg-accent-orange-subtle text-accent-orange",
15
+ DELETED: "bg-bg-sunken text-text-tertiary"
16
+ };
17
+ function s({ status: s, className: c }) {
18
+ let { t: l } = a(), u = (e, t) => n(l, e, t), d = {
19
+ CREATED: u("export.shared.status.created", "Created"),
20
+ QUEUED: u("export.shared.status.queued", "Queued"),
21
+ RUNNING: u("export.shared.status.running", "Running"),
22
+ COMPLETED: u("export.shared.status.completed", "Completed"),
23
+ FAILED: u("export.shared.status.failed", "Failed"),
24
+ CANCELLED: u("export.shared.status.cancelled", "Cancelled"),
25
+ EXPIRED: u("export.shared.status.expired", "Expired"),
26
+ DELETED: u("export.shared.status.deleted", "Deleted")
27
+ }[s] ?? t(s);
28
+ return /* @__PURE__ */ i("span", {
29
+ className: e("inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium", o[s], c),
30
+ children: [s === "RUNNING" && /* @__PURE__ */ i("span", {
31
+ className: "relative flex h-2 w-2",
32
+ children: [/* @__PURE__ */ r("span", { className: "animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75" }), /* @__PURE__ */ r("span", { className: "relative inline-flex rounded-full h-2 w-2 bg-accent-blue" })]
33
+ }), d]
34
+ });
35
+ }
36
+ //#endregion
37
+ export { s as ExportStatusBadge };
38
+
39
+ //# sourceMappingURL=ExportStatusBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportStatusBadge.js","names":[],"sources":["../../../src/export/components/ExportStatusBadge.tsx"],"sourcesContent":["import { useI18n } from \"@burdenoff/fe-libs/shared/providers/shell/I18nProvider\";\nimport { cn } from \"../utils/cn\";\nimport { getStatusDisplayName } from \"../constants/enums\";\nimport type { ExportJobStatus } from \"../types\";\nimport { tWithFallback } from \"../utils/i18n\";\n\ninterface ExportStatusBadgeProps {\n status: ExportJobStatus;\n className?: string;\n}\n\nconst statusStyles: Record<ExportJobStatus, string> = {\n CREATED: \"bg-status-info-bg-subtle text-status-info-text\",\n QUEUED: \"bg-status-warning-bg-subtle text-status-warning-text\",\n RUNNING: \"bg-status-info-bg-subtle text-status-info-text animate-pulse\",\n COMPLETED: \"bg-status-success-bg-subtle text-status-success-text\",\n FAILED: \"bg-status-error-bg-subtle text-status-error-text\",\n CANCELLED: \"bg-bg-sunken text-text-secondary\",\n EXPIRED: \"bg-accent-orange-subtle text-accent-orange\",\n DELETED: \"bg-bg-sunken text-text-tertiary\",\n};\n\n/**\n * ExportStatusBadge - Renders a colored badge for export job status\n */\nexport function ExportStatusBadge({\n status,\n className,\n}: ExportStatusBadgeProps) {\n const { t } = useI18n();\n const tr = (key: string, fallback: string) => tWithFallback(t, key, fallback);\n\n const statusLabel =\n {\n CREATED: tr(\"export.shared.status.created\", \"Created\"),\n QUEUED: tr(\"export.shared.status.queued\", \"Queued\"),\n RUNNING: tr(\"export.shared.status.running\", \"Running\"),\n COMPLETED: tr(\"export.shared.status.completed\", \"Completed\"),\n FAILED: tr(\"export.shared.status.failed\", \"Failed\"),\n CANCELLED: tr(\"export.shared.status.cancelled\", \"Cancelled\"),\n EXPIRED: tr(\"export.shared.status.expired\", \"Expired\"),\n DELETED: tr(\"export.shared.status.deleted\", \"Deleted\"),\n }[status] ?? getStatusDisplayName(status);\n\n return (\n <span\n className={cn(\n \"inline-flex items-center gap-1.5 px-2.5 py-0.5 rounded-full text-xs font-medium\",\n statusStyles[status],\n className,\n )}\n >\n {status === \"RUNNING\" && (\n <span className=\"relative flex h-2 w-2\">\n <span className=\"animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-blue opacity-75\" />\n <span className=\"relative inline-flex rounded-full h-2 w-2 bg-accent-blue\" />\n </span>\n )}\n {statusLabel}\n </span>\n );\n}\n"],"mappings":";;;;;;AAWA,IAAM,IAAgD;CACpD,SAAS;CACT,QAAQ;CACR,SAAS;CACT,WAAW;CACX,QAAQ;CACR,WAAW;CACX,SAAS;CACT,SAAS;CACV;AAKD,SAAgB,EAAkB,EAChC,WACA,gBACyB;CACzB,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAAqB,EAAc,GAAG,GAAK,EAAS,EAEvE,IACJ;EACE,SAAS,EAAG,gCAAgC,UAAU;EACtD,QAAQ,EAAG,+BAA+B,SAAS;EACnD,SAAS,EAAG,gCAAgC,UAAU;EACtD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,QAAQ,EAAG,+BAA+B,SAAS;EACnD,WAAW,EAAG,kCAAkC,YAAY;EAC5D,SAAS,EAAG,gCAAgC,UAAU;EACtD,SAAS,EAAG,gCAAgC,UAAU;EACvD,CAAC,MAAW,EAAqB,EAAO;AAE3C,QACE,kBAAC,QAAD;EACE,WAAW,EACT,mFACA,EAAa,IACb,EACD;YALH,CAOG,MAAW,aACV,kBAAC,QAAD;GAAM,WAAU;aAAhB,CACE,kBAAC,QAAD,EAAM,WAAU,0FAA2F,CAAA,EAC3G,kBAAC,QAAD,EAAM,WAAU,4DAA6D,CAAA,CACxE;MAER,EACI"}