@burdenoff/microfe-bigconsole 2026.805.2 → 2026.812.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 (253) hide show
  1. package/dist/bigconsole/components/DrilldownDashboardRenderer.js +118 -106
  2. package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
  3. package/dist/bigconsole/components/DrilldownModal.js +54 -50
  4. package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
  5. package/dist/bigconsole/components/builder/BuilderCanvas.js +2 -2
  6. package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -1
  7. package/dist/bigconsole/components/builder/BuilderTopbar.js +3 -3
  8. package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -1
  9. package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +24 -25
  10. package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -1
  11. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +40 -29
  12. package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -1
  13. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +145 -111
  14. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
  15. package/dist/bigconsole/components/builder/inspector/GeneralSection.js +58 -44
  16. package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -1
  17. package/dist/bigconsole/components/common/Section.js +70 -0
  18. package/dist/bigconsole/components/common/Section.js.map +1 -0
  19. package/dist/bigconsole/components/common/index.js +2 -0
  20. package/dist/bigconsole/components/common/sectionStyles.js +42 -0
  21. package/dist/bigconsole/components/common/sectionStyles.js.map +1 -0
  22. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +269 -251
  23. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
  24. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +214 -223
  25. package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
  26. package/dist/bigconsole/components/dashboard/DashboardGrid.js +12 -18
  27. package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
  28. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +110 -102
  29. package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
  30. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +81 -68
  31. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
  32. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +125 -159
  33. package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
  34. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +147 -144
  35. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
  36. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +154 -153
  37. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
  38. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +82 -79
  39. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
  40. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +171 -284
  41. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
  42. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +250 -273
  43. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
  44. package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +45 -53
  45. package/dist/bigconsole/components/dashboard/LiveBoardBanner.js.map +1 -1
  46. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +157 -148
  47. package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
  48. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +75 -83
  49. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js.map +1 -1
  50. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +167 -161
  51. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
  52. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +181 -190
  53. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
  54. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -95
  55. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
  56. package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +20 -18
  57. package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
  58. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
  59. package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +26 -58
  60. package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -1
  61. package/dist/bigconsole/components/dashboard/WidgetPalette.js +307 -229
  62. package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
  63. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +128 -129
  64. package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
  65. package/dist/bigconsole/components/datasink/DataSinkCard.js +78 -79
  66. package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
  67. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +33 -34
  68. package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
  69. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +79 -61
  70. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
  71. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +75 -64
  72. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
  73. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
  74. package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
  75. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +20 -19
  76. package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
  77. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +127 -171
  78. package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js.map +1 -1
  79. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +113 -117
  80. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
  81. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +312 -307
  82. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
  83. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +65 -66
  84. package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
  85. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +121 -127
  86. package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
  87. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +194 -189
  88. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
  89. package/dist/bigconsole/components/datasink/SetupStateBadge.js +3 -3
  90. package/dist/bigconsole/components/datasink/SetupStateBadge.js.map +1 -1
  91. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +95 -95
  92. package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
  93. package/dist/bigconsole/components/parser/DataSinkSelector.js +163 -131
  94. package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
  95. package/dist/bigconsole/components/parser/ExpressionEditor.js +3 -3
  96. package/dist/bigconsole/components/parser/ExpressionEditor.js.map +1 -1
  97. package/dist/bigconsole/components/parser/ImportParserDialog.js +205 -260
  98. package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
  99. package/dist/bigconsole/components/parser/ParserCard.js +133 -114
  100. package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
  101. package/dist/bigconsole/components/parser/ParserSelector.js +193 -174
  102. package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
  103. package/dist/bigconsole/components/parser/ParserStatusBadge.js +2 -2
  104. package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
  105. package/dist/bigconsole/components/parser/ParserTypeBadge.js +4 -4
  106. package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
  107. package/dist/bigconsole/components/pipeline/PipelineCard.js +134 -89
  108. package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
  109. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +77 -64
  110. package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
  111. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +7 -10
  112. package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
  113. package/dist/bigconsole/components/preview/AiPreviewContent.js +31 -32
  114. package/dist/bigconsole/components/preview/AiPreviewContent.js.map +1 -1
  115. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +152 -103
  116. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
  117. package/dist/bigconsole/components/preview/AiPreviewPanel.js +193 -148
  118. package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
  119. package/dist/bigconsole/components/preview/previewShared.js +41 -23
  120. package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
  121. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +405 -364
  122. package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
  123. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +265 -237
  124. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
  125. package/dist/bigconsole/components/widgets/PropertiesPanel.js +764 -821
  126. package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
  127. package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +7 -5
  128. package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js.map +1 -1
  129. package/dist/bigconsole/components/widgets/WidgetHeader.js +7 -8
  130. package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
  131. package/dist/bigconsole/components/widgets/WidgetWrapper.js +8 -7
  132. package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
  133. package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
  134. package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js.map +1 -1
  135. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +46 -49
  136. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
  137. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +154 -147
  138. package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
  139. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +118 -101
  140. package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
  141. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +244 -191
  142. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
  143. package/dist/bigconsole/components/widgets/form/FormWidget.js +167 -159
  144. package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
  145. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +92 -76
  146. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
  147. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +1 -1
  148. package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
  149. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +89 -86
  150. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
  151. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +2 -2
  152. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
  153. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +64 -63
  154. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
  155. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +2 -2
  156. package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
  157. package/dist/bigconsole/components/widgets/list/ListConfig.js +65 -58
  158. package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
  159. package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
  160. package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
  161. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
  162. package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
  163. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +79 -72
  164. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
  165. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +35 -34
  166. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
  167. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +20 -19
  168. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js.map +1 -1
  169. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +181 -180
  170. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
  171. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +100 -90
  172. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
  173. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +3 -3
  174. package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
  175. package/dist/bigconsole/components/widgets/states/EmptyState.js +6 -4
  176. package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
  177. package/dist/bigconsole/components/widgets/states/ErrorState.js +7 -5
  178. package/dist/bigconsole/components/widgets/states/ErrorState.js.map +1 -1
  179. package/dist/bigconsole/components/widgets/states/LoadingState.js +5 -4
  180. package/dist/bigconsole/components/widgets/states/LoadingState.js.map +1 -1
  181. package/dist/bigconsole/components/widgets/table/TableConfig.js +193 -172
  182. package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
  183. package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
  184. package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
  185. package/dist/bigconsole/components/widgets/table/TableWidget.js +1 -1
  186. package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
  187. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
  188. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
  189. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
  190. package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
  191. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
  192. package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
  193. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +283 -249
  194. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
  195. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +28 -20
  196. package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
  197. package/dist/bigconsole/components/workflow/WorkflowCard.js +92 -77
  198. package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
  199. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +70 -51
  200. package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
  201. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +16 -17
  202. package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js.map +1 -1
  203. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +46 -42
  204. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
  205. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +372 -348
  206. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
  207. package/dist/bigconsole/hooks/useModalFocusTrap.js +53 -0
  208. package/dist/bigconsole/hooks/useModalFocusTrap.js.map +1 -0
  209. package/dist/bigconsole/pages/DashboardBuilderPage.js +153 -142
  210. package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
  211. package/dist/bigconsole/pages/DashboardViewPage.js +230 -220
  212. package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
  213. package/dist/bigconsole/pages/DashboardsPage.js +832 -790
  214. package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
  215. package/dist/bigconsole/pages/DataParsersPage.js +249 -304
  216. package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
  217. package/dist/bigconsole/pages/DataSinkBuilderPage.js +324 -349
  218. package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
  219. package/dist/bigconsole/pages/DataSinkViewPage.js +336 -323
  220. package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
  221. package/dist/bigconsole/pages/DataSinksPage.js +356 -458
  222. package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
  223. package/dist/bigconsole/pages/DataSourcesPage.js +14 -8
  224. package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
  225. package/dist/bigconsole/pages/HomePage.js +186 -193
  226. package/dist/bigconsole/pages/HomePage.js.map +1 -1
  227. package/dist/bigconsole/pages/InsightsPage.js +901 -724
  228. package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
  229. package/dist/bigconsole/pages/ParserBuilderPage.js +769 -675
  230. package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
  231. package/dist/bigconsole/pages/ParserViewPage.js +382 -354
  232. package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
  233. package/dist/bigconsole/pages/PipelineBuilderPage.js +540 -420
  234. package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
  235. package/dist/bigconsole/pages/PipelineViewPage.js +416 -384
  236. package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
  237. package/dist/bigconsole/pages/PipelinesPage.js +260 -309
  238. package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
  239. package/dist/bigconsole/pages/SettingsPage.js +177 -172
  240. package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
  241. package/dist/bigconsole/pages/WidgetDemoPage.js +278 -142
  242. package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
  243. package/dist/bigconsole/pages/WorkflowViewPage.js +382 -366
  244. package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
  245. package/dist/bigconsole/pages/WorkflowsPage.js +202 -316
  246. package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
  247. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +111 -109
  248. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
  249. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +127 -126
  250. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
  251. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +103 -103
  252. package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
  253. package/package.json +2 -1
@@ -1,189 +1,192 @@
1
- import e from "../../hooks/useImportParser.js";
1
+ import { Section as e } from "../common/Section.js";
2
+ import "../common/index.js";
3
+ import t from "../../hooks/useImportParser.js";
2
4
  import "../../hooks/index.js";
3
- import { memo as t, useCallback as n, useEffect as r, useRef as i, useState as a } from "react";
4
- import { ArrowLeft as o, Check as s, FileJson as c, Info as l, RefreshCw as u, Upload as d, XCircle as f } from "lucide-react";
5
- import { Badge as ee, Button as p, Card as m, CardContent as h, Dialog as g, DialogContent as _, DialogDescription as v, DialogFooter as y, DialogHeader as b, DialogTitle as x, Input as S, Label as C, Spinner as te } from "@burdenoff/fe-libs/ui";
5
+ import { memo as n, useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
6
+ import { ArrowLeft as s, Check as c, FileJson as ee, Info as l, RefreshCw as u, Upload as d, XCircle as f } from "lucide-react";
7
+ import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
+ import { Badge as m, Button as h, Input as g, Label as _, ResponsiveDialog as v, ResponsiveDialogContent as te, ResponsiveDialogDescription as y, ResponsiveDialogFooter as b, ResponsiveDialogHeader as x, ResponsiveDialogTitle as S, Spinner as C } from "@burdenoff/fe-libs/ui";
6
9
  import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
7
10
  //#region src/bigconsole/components/parser/ImportParserDialog.tsx
8
- var D = t(function({ isOpen: t, onClose: D, consoleId: O, onSuccess: k }) {
9
- let [A, j] = a("select"), [, M] = a(null), [N, P] = a(null), [F, I] = a(""), [L, R] = a(""), [z, B] = a(""), V = i(null), { loading: H, error: U, validationResult: W, importResult: G, validateImport: K, importParser: q, extractParserId: J, clearState: Y } = e();
10
- r(() => {
11
- t && (j("select"), M(null), P(null), I(""), R(""), B(""), Y());
12
- }, [t, Y]);
13
- let X = n(async (e) => {
11
+ var D = "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", O = n(function({ isOpen: n, onClose: O, consoleId: k, onSuccess: A }) {
12
+ let { t: j } = p(), [M, N] = o("select"), [, P] = o(null), [F, I] = o(null), [L, R] = o(""), [z, B] = o(""), [V, H] = o(""), U = a(null), { loading: W, error: G, validationResult: K, importResult: q, validateImport: J, importParser: Y, extractParserId: X, clearState: Z } = t();
13
+ i(() => {
14
+ n && (N("select"), P(null), I(null), R(""), B(""), H(""), Z());
15
+ }, [n, Z]);
16
+ let ne = r(async (e) => {
14
17
  let t = e.target.files?.[0];
15
18
  if (!t) return;
16
19
  if (!t.name.endsWith(".json")) {
17
- alert("Please select a JSON file");
20
+ alert(j("bigconsole.parsers.import.selectJsonFile", "Please select a JSON file"));
18
21
  return;
19
22
  }
20
- M(t);
23
+ P(t);
21
24
  let n = new FileReader();
22
25
  n.onload = async (e) => {
23
26
  let t = e.target?.result;
24
- P(t);
25
- let n = K(t);
26
- n.isValid && n.parserInfo ? (j("preview"), I(n.parserInfo.name || ""), R(n.parserInfo.inputSinkKey || ""), B(n.parserInfo.outputKey || "")) : j("preview");
27
+ I(t);
28
+ let n = J(t);
29
+ n.isValid && n.parserInfo ? (N("preview"), R(n.parserInfo.name || ""), B(n.parserInfo.inputSinkKey || ""), H(n.parserInfo.outputKey || "")) : N("preview");
27
30
  }, n.onerror = () => {
28
- alert("Failed to read file");
31
+ alert(j("bigconsole.parsers.import.readFileFailed", "Failed to read file"));
29
32
  }, n.readAsText(t);
30
- }, [K]), Z = n((e) => {
33
+ }, [J, j]), re = r((e) => {
31
34
  e.preventDefault();
32
35
  let t = e.dataTransfer.files?.[0];
33
36
  if (t) {
34
37
  let e = new DataTransfer();
35
- e.items.add(t), V.current && (V.current.files = e.files, V.current.dispatchEvent(new Event("change", { bubbles: !0 })));
38
+ e.items.add(t), U.current && (U.current.files = e.files, U.current.dispatchEvent(new Event("change", { bubbles: !0 })));
36
39
  }
37
- }, []), ne = n(async () => {
38
- if (!N) return;
39
- j("importing");
40
- let e = await q(N, {
41
- consoleId: O,
42
- name: F.trim() || void 0,
43
- inputSinkKey: L.trim() || void 0,
44
- outputKey: z.trim() || void 0
40
+ }, []), ie = r(async () => {
41
+ if (!F) return;
42
+ N("importing");
43
+ let e = await Y(F, {
44
+ consoleId: k,
45
+ name: L.trim() || void 0,
46
+ inputSinkKey: z.trim() || void 0,
47
+ outputKey: V.trim() || void 0
45
48
  });
46
- e?.success && e.parser ? (j("complete"), k?.(e.parser.id, e.parser.name, e.originalUpdated ?? !1)) : j("preview");
49
+ e?.success && e.parser ? (N("complete"), A?.(e.parser.id, e.parser.name, e.originalUpdated ?? !1)) : N("preview");
47
50
  }, [
48
- N,
49
- O,
50
51
  F,
52
+ k,
51
53
  L,
52
54
  z,
53
- q,
54
- k
55
- ]), Q = !H && A !== "importing", $ = N ? J(N) : null;
56
- return /* @__PURE__ */ T(g, {
57
- open: t,
58
- onOpenChange: (e) => !e && Q && D(),
59
- children: /* @__PURE__ */ E(_, {
55
+ V,
56
+ Y,
57
+ A
58
+ ]), Q = !W && M !== "importing", $ = F ? X(F) : null;
59
+ return /* @__PURE__ */ T(v, {
60
+ open: n,
61
+ onOpenChange: (e) => !e && Q && O(),
62
+ children: /* @__PURE__ */ E(te, {
60
63
  className: "sm:max-w-lg max-h-[85vh] flex flex-col",
61
64
  children: [
62
- /* @__PURE__ */ E(b, { children: [/* @__PURE__ */ E("div", {
65
+ /* @__PURE__ */ E(x, { children: [/* @__PURE__ */ E("div", {
63
66
  className: "flex items-center gap-3",
64
67
  children: [/* @__PURE__ */ T("div", {
65
- className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10",
66
- children: /* @__PURE__ */ T(d, { className: "size-5 text-primary" })
67
- }), /* @__PURE__ */ T(x, { children: "Import Parser" })]
68
- }), /* @__PURE__ */ T(v, { children: "Upload a Parser export file to restore it into this workspace." })] }),
68
+ className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-action-primary-bg/10",
69
+ children: /* @__PURE__ */ T(d, { className: "size-5 text-action-primary-bg" })
70
+ }), /* @__PURE__ */ T(S, { children: j("bigconsole.parsers.import.title", "Import Parser") })]
71
+ }), /* @__PURE__ */ T(y, { children: j("bigconsole.parsers.import.description", "Upload a Parser export file to restore it into this workspace.") })] }),
69
72
  /* @__PURE__ */ E("div", {
70
73
  className: "flex-1 overflow-y-auto py-4 space-y-4",
71
74
  children: [
72
- A === "select" && /* @__PURE__ */ E("div", {
75
+ M === "select" && /* @__PURE__ */ E("div", {
73
76
  onDragOver: (e) => e.preventDefault(),
74
- onDrop: Z,
75
- className: "border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors",
77
+ onDrop: re,
78
+ className: "rounded-card border-2 border-dashed border-[var(--color-border-subtle)] bg-bg-sunken p-6 text-center hover:border-action-primary-bg motion-safe:transition-colors sm:p-8",
76
79
  children: [
77
- /* @__PURE__ */ T(c, { className: "size-12 mx-auto text-text-secondary mb-4" }),
80
+ /* @__PURE__ */ T(ee, { className: "size-12 mx-auto text-text-secondary mb-4" }),
78
81
  /* @__PURE__ */ T("p", {
79
82
  className: "text-sm mb-2",
80
- children: "Drag and drop a parser export file here"
83
+ children: j("bigconsole.parsers.import.dropzoneTitle", "Drag and drop a parser export file here")
81
84
  }),
82
85
  /* @__PURE__ */ T("p", {
83
86
  className: "text-xs text-text-secondary mb-4",
84
- children: "or"
87
+ children: j("bigconsole.parsers.import.or", "or")
85
88
  }),
86
89
  /* @__PURE__ */ T("input", {
87
- ref: V,
90
+ ref: U,
88
91
  type: "file",
89
92
  accept: ".json",
90
- onChange: X,
93
+ onChange: ne,
91
94
  className: "hidden"
92
95
  }),
93
- /* @__PURE__ */ T(p, {
94
- onClick: () => V.current?.click(),
95
- disabled: H,
96
- children: "Browse Files"
96
+ /* @__PURE__ */ T(h, {
97
+ onClick: () => U.current?.click(),
98
+ disabled: W,
99
+ children: j("bigconsole.parsers.import.browseFiles", "Browse Files")
97
100
  }),
98
101
  /* @__PURE__ */ T("p", {
99
102
  className: "text-xs text-text-secondary mt-4",
100
- children: "Only .json files exported from BigConsole are supported"
103
+ children: j("bigconsole.parsers.import.supportedHint", "Only .json files exported from BigConsole are supported")
101
104
  })
102
105
  ]
103
106
  }),
104
- (A === "preview" || A === "importing") && W && /* @__PURE__ */ E(w, { children: [
105
- W.parserInfo && /* @__PURE__ */ T(m, { children: /* @__PURE__ */ E(h, {
106
- className: "p-4 space-y-2",
107
+ (M === "preview" || M === "importing") && K && /* @__PURE__ */ E(w, { children: [
108
+ K.parserInfo && /* @__PURE__ */ E(e, {
109
+ emphasis: "muted",
110
+ padding: "compact",
111
+ headingLevel: 3,
112
+ title: "Parser in this file",
113
+ bodyClassName: "space-y-2",
114
+ "data-testid": "import-parser-summary",
107
115
  children: [
108
116
  /* @__PURE__ */ E("div", {
109
- className: "flex items-center justify-between",
117
+ className: D,
110
118
  children: [/* @__PURE__ */ T("span", {
111
119
  className: "text-sm text-text-secondary",
112
- children: "Parser"
120
+ children: j("bigconsole.parsers.import.fieldParser", "Parser")
113
121
  }), /* @__PURE__ */ T("span", {
114
- className: "text-sm font-medium",
115
- children: W.parserInfo.name
122
+ className: "min-w-0 break-words text-sm font-medium text-text-primary",
123
+ children: K.parserInfo.name
116
124
  })]
117
125
  }),
118
126
  /* @__PURE__ */ E("div", {
119
- className: "flex items-center justify-between",
127
+ className: D,
120
128
  children: [/* @__PURE__ */ T("span", {
121
129
  className: "text-sm text-text-secondary",
122
- children: "Type"
123
- }), /* @__PURE__ */ T(ee, {
130
+ children: j("bigconsole.parsers.import.fieldType", "Type")
131
+ }), /* @__PURE__ */ T(m, {
124
132
  variant: "secondary",
125
- children: W.parserInfo.type
133
+ children: K.parserInfo.type
126
134
  })]
127
135
  }),
128
136
  /* @__PURE__ */ E("div", {
129
- className: "flex items-center justify-between",
137
+ className: D,
130
138
  children: [/* @__PURE__ */ T("span", {
131
139
  className: "text-sm text-text-secondary",
132
- children: "Input Sink"
140
+ children: j("bigconsole.parsers.import.fieldInputSink", "Input Sink")
133
141
  }), /* @__PURE__ */ T("span", {
134
- className: "text-xs font-mono",
135
- children: W.parserInfo.inputSinkKey
142
+ className: "min-w-0 break-all font-mono text-xs text-text-primary",
143
+ children: K.parserInfo.inputSinkKey
136
144
  })]
137
145
  }),
138
146
  /* @__PURE__ */ E("div", {
139
- className: "flex items-center justify-between",
147
+ className: D,
140
148
  children: [/* @__PURE__ */ T("span", {
141
149
  className: "text-sm text-text-secondary",
142
- children: "Output Key"
150
+ children: j("bigconsole.parsers.import.fieldOutputKey", "Output Key")
143
151
  }), /* @__PURE__ */ T("span", {
144
- className: "text-xs font-mono",
145
- children: W.parserInfo.outputKey
152
+ className: "min-w-0 break-all font-mono text-xs text-text-primary",
153
+ children: K.parserInfo.outputKey
146
154
  })]
147
155
  }),
148
- W.parserInfo.exportedFrom && /* @__PURE__ */ E("div", {
149
- className: "flex items-center justify-between",
156
+ K.parserInfo.exportedFrom && /* @__PURE__ */ E("div", {
157
+ className: D,
150
158
  children: [/* @__PURE__ */ T("span", {
151
159
  className: "text-sm text-text-secondary",
152
- children: "Source ID"
160
+ children: j("bigconsole.parsers.import.fieldSourceId", "Source ID")
153
161
  }), /* @__PURE__ */ T("span", {
154
- className: "text-xs text-text-secondary font-mono truncate max-w-[180px]",
155
- children: W.parserInfo.exportedFrom
162
+ className: "min-w-0 max-w-full truncate font-mono text-xs text-text-secondary sm:max-w-[180px]",
163
+ children: K.parserInfo.exportedFrom
156
164
  })]
157
165
  }),
158
166
  /* @__PURE__ */ E("div", {
159
- className: "flex items-center justify-between",
167
+ className: D,
160
168
  children: [/* @__PURE__ */ T("span", {
161
169
  className: "text-sm text-text-secondary",
162
- children: "Schema Version"
170
+ children: j("bigconsole.parsers.import.fieldSchemaVersion", "Schema Version")
163
171
  }), /* @__PURE__ */ T("span", {
164
172
  className: "text-xs text-text-secondary",
165
- children: W.parserInfo.schemaVersion
173
+ children: K.parserInfo.schemaVersion
166
174
  })]
167
175
  })
168
176
  ]
169
- }) }),
170
- W.errors.length > 0 && /* @__PURE__ */ T(m, {
171
- className: "border-status-error-border/50 bg-status-error-bg/5",
172
- children: /* @__PURE__ */ E(h, {
173
- className: "p-3",
174
- children: [/* @__PURE__ */ E("div", {
175
- className: "flex items-center gap-2 mb-2",
176
- children: [/* @__PURE__ */ T(f, { className: "size-4 text-status-error-text" }), /* @__PURE__ */ E("span", {
177
- className: "text-sm font-medium text-status-error-text",
178
- children: [
179
- "Errors (",
180
- W.errors.length,
181
- ")"
182
- ]
183
- })]
184
- }), /* @__PURE__ */ T("ul", {
185
- className: "text-xs text-status-error-text space-y-1",
186
- children: W.errors.map((e, t) => /* @__PURE__ */ E("li", { children: [
177
+ }),
178
+ K.errors.length > 0 && /* @__PURE__ */ T(e, {
179
+ tone: "danger",
180
+ padding: "compact",
181
+ headingLevel: 3,
182
+ title: j("bigconsole.parsers.import.errorsCount", "Errors ({{count}})", { count: K.errors.length }),
183
+ icon: /* @__PURE__ */ T(f, { className: "size-4 text-[var(--color-status-error-text)]" }),
184
+ "data-testid": "import-validation-errors",
185
+ children: /* @__PURE__ */ T("ul", {
186
+ className: "space-y-1 text-xs text-status-error-text",
187
+ children: K.errors.map((e, t) => /* @__PURE__ */ E("li", {
188
+ className: "break-words",
189
+ children: [
187
190
  /* @__PURE__ */ E("span", {
188
191
  className: "font-mono",
189
192
  children: [
@@ -194,225 +197,167 @@ var D = t(function({ isOpen: t, onClose: D, consoleId: O, onSuccess: k }) {
194
197
  }),
195
198
  " ",
196
199
  e.message
197
- ] }, t))
198
- })]
200
+ ]
201
+ }, t))
199
202
  })
200
203
  }),
201
- W.isValid && /* @__PURE__ */ E("div", {
202
- className: "space-y-4",
204
+ K.isValid && /* @__PURE__ */ E(e, {
205
+ headingLevel: 3,
206
+ title: j("bigconsole.parsers.import.optionsHeading", "Import Options"),
207
+ description: "Override the imported names before creating the parser.",
208
+ bodyClassName: "space-y-4",
209
+ "data-testid": "import-parser-options",
203
210
  children: [
204
- /* @__PURE__ */ T("p", {
205
- className: "text-sm font-medium",
206
- children: "Import Options"
207
- }),
208
- /* @__PURE__ */ T(m, {
209
- className: "border-blue-500/50 bg-blue-500/5",
210
- children: /* @__PURE__ */ T(h, {
211
- className: "p-3",
212
- children: /* @__PURE__ */ E("div", {
213
- className: "flex items-start gap-2",
214
- children: [/* @__PURE__ */ T(l, { className: "size-4 text-blue-600 mt-0.5 shrink-0" }), /* @__PURE__ */ T("div", {
215
- className: "text-xs text-blue-700 dark:text-blue-400",
216
- children: $ ? /* @__PURE__ */ E(w, { children: [
217
- /* @__PURE__ */ T("p", {
218
- className: "font-medium mb-1",
219
- children: "Import will check for existing parser"
220
- }),
221
- /* @__PURE__ */ E("p", { children: [
222
- "If the original parser (ID:",
223
- " ",
224
- /* @__PURE__ */ E("code", {
225
- className: "font-mono bg-blue-200/50 px-1 rounded",
226
- children: [$.slice(0, 8), "..."]
227
- }),
228
- ") exists:"
229
- ] }),
230
- /* @__PURE__ */ E("ul", {
231
- className: "list-disc list-inside mt-1 space-y-0.5",
232
- children: [/* @__PURE__ */ T("li", { children: "With changes → Update the existing parser" }), /* @__PURE__ */ T("li", { children: "No changes → Show \"already exists\" message" })]
233
- }),
234
- /* @__PURE__ */ T("p", {
235
- className: "mt-1",
236
- children: "If original doesn't exist → Create a new parser"
237
- })
238
- ] }) : /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("p", {
239
- className: "font-medium mb-1",
240
- children: "A new parser will be created"
241
- }), /* @__PURE__ */ T("p", { children: "Import as a new parser with the specified configuration." })] })
242
- })]
243
- })
211
+ /* @__PURE__ */ T(e, {
212
+ tone: "info",
213
+ padding: "compact",
214
+ headingLevel: 4,
215
+ title: $ ? j("bigconsole.parsers.import.checkExistingTitle", "Import will check for existing parser") : j("bigconsole.parsers.import.newParserTitle", "A new parser will be created"),
216
+ icon: /* @__PURE__ */ T(l, { className: "size-4 text-[var(--color-status-info-text)]" }),
217
+ children: /* @__PURE__ */ T("div", {
218
+ className: "text-xs text-text-secondary",
219
+ children: $ ? /* @__PURE__ */ E(w, { children: [
220
+ /* @__PURE__ */ E("p", { children: [
221
+ j("bigconsole.parsers.import.ifOriginalExistsPrefix", "If the original parser (ID:"),
222
+ " ",
223
+ /* @__PURE__ */ E("code", {
224
+ className: "rounded bg-bg-sunken px-1 font-mono",
225
+ children: [$.slice(0, 8), "..."]
226
+ }),
227
+ j("bigconsole.parsers.import.ifOriginalExistsSuffix", ") exists:")
228
+ ] }),
229
+ /* @__PURE__ */ E("ul", {
230
+ className: "list-disc list-inside mt-1 space-y-0.5",
231
+ children: [/* @__PURE__ */ T("li", { children: j("bigconsole.parsers.import.withChanges", "With changes → Update the existing parser") }), /* @__PURE__ */ T("li", { children: j("bigconsole.parsers.import.noChanges", "No changes → Show \"already exists\" message") })]
232
+ }),
233
+ /* @__PURE__ */ T("p", {
234
+ className: "mt-1",
235
+ children: j("bigconsole.parsers.import.ifOriginalMissing", "If original doesn't exist → Create a new parser")
236
+ })
237
+ ] }) : /* @__PURE__ */ T("p", { children: j("bigconsole.parsers.import.newParserBody", "Import as a new parser with the specified configuration.") })
244
238
  })
245
239
  }),
246
240
  /* @__PURE__ */ E("div", {
247
241
  className: "space-y-2",
248
- children: [/* @__PURE__ */ T(C, {
242
+ children: [/* @__PURE__ */ T(_, {
249
243
  htmlFor: "import-name",
250
- children: "Parser Name"
251
- }), /* @__PURE__ */ T(S, {
244
+ children: j("bigconsole.parsers.import.parserNameLabel", "Parser Name")
245
+ }), /* @__PURE__ */ T(g, {
252
246
  id: "import-name",
253
247
  type: "text",
254
- value: F,
255
- onChange: (e) => I(e.target.value),
256
- placeholder: W.parserInfo?.name || "Parser name",
257
- disabled: A === "importing"
248
+ value: L,
249
+ onChange: (e) => R(e.target.value),
250
+ placeholder: K.parserInfo?.name || j("bigconsole.parsers.import.parserNamePlaceholder", "Parser name"),
251
+ disabled: M === "importing"
258
252
  })]
259
253
  }),
260
254
  /* @__PURE__ */ E("div", {
261
255
  className: "space-y-2",
262
256
  children: [
263
- /* @__PURE__ */ T(C, {
257
+ /* @__PURE__ */ T(_, {
264
258
  htmlFor: "import-input-sink",
265
- children: "Input Sink Key"
259
+ children: j("bigconsole.parsers.import.inputSinkKeyLabel", "Input Sink Key")
266
260
  }),
267
- /* @__PURE__ */ T(S, {
261
+ /* @__PURE__ */ T(g, {
268
262
  id: "import-input-sink",
269
263
  type: "text",
270
- value: L,
271
- onChange: (e) => R(e.target.value),
272
- placeholder: W.parserInfo?.inputSinkKey || "Input sink key",
273
- disabled: A === "importing"
264
+ value: z,
265
+ onChange: (e) => B(e.target.value),
266
+ placeholder: K.parserInfo?.inputSinkKey || j("bigconsole.parsers.import.inputSinkKeyPlaceholder", "Input sink key"),
267
+ disabled: M === "importing"
274
268
  }),
275
269
  /* @__PURE__ */ T("p", {
276
270
  className: "text-xs text-text-secondary",
277
- children: "The DataSink key to read input data from."
271
+ children: j("bigconsole.parsers.import.inputSinkKeyHelp", "The DataSink key to read input data from.")
278
272
  })
279
273
  ]
280
274
  }),
281
275
  /* @__PURE__ */ E("div", {
282
276
  className: "space-y-2",
283
277
  children: [
284
- /* @__PURE__ */ T(C, {
278
+ /* @__PURE__ */ T(_, {
285
279
  htmlFor: "import-output-key",
286
- children: "Output Key"
280
+ children: j("bigconsole.parsers.import.outputKeyLabel", "Output Key")
287
281
  }),
288
- /* @__PURE__ */ T(S, {
282
+ /* @__PURE__ */ T(g, {
289
283
  id: "import-output-key",
290
284
  type: "text",
291
- value: z,
292
- onChange: (e) => B(e.target.value),
293
- placeholder: W.parserInfo?.outputKey || "Output key",
294
- disabled: A === "importing"
285
+ value: V,
286
+ onChange: (e) => H(e.target.value),
287
+ placeholder: K.parserInfo?.outputKey || j("bigconsole.parsers.import.outputKeyPlaceholder", "Output key"),
288
+ disabled: M === "importing"
295
289
  }),
296
290
  /* @__PURE__ */ T("p", {
297
291
  className: "text-xs text-text-secondary",
298
- children: "The key to store parsed output data under."
292
+ children: j("bigconsole.parsers.import.outputKeyHelp", "The key to store parsed output data under.")
299
293
  })
300
294
  ]
301
295
  })
302
296
  ]
303
297
  })
304
298
  ] }),
305
- A === "complete" && G?.success && /* @__PURE__ */ E("div", {
306
- className: "text-center py-6",
307
- children: [
308
- G.alreadyExists && /* @__PURE__ */ E(w, { children: [
309
- /* @__PURE__ */ T("div", {
310
- className: "size-16 mx-auto mb-4 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",
311
- children: /* @__PURE__ */ T(l, { className: "size-8 text-blue-600" })
312
- }),
313
- /* @__PURE__ */ T("h3", {
314
- className: "text-lg font-medium mb-2",
315
- children: "Parser Already Exists"
316
- }),
317
- /* @__PURE__ */ E("p", {
318
- className: "text-sm text-text-secondary mb-4",
319
- children: [
320
- "Parser \"",
321
- G.parser?.name,
322
- "\" already exists with the same data. No changes were made."
323
- ]
324
- })
325
- ] }),
326
- G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ E(w, { children: [
327
- /* @__PURE__ */ T("div", {
328
- className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
329
- children: /* @__PURE__ */ T(u, { className: "size-8 text-green-600" })
330
- }),
331
- /* @__PURE__ */ T("h3", {
332
- className: "text-lg font-medium mb-2",
333
- children: "Parser Updated!"
334
- }),
335
- /* @__PURE__ */ E("p", {
336
- className: "text-sm text-text-secondary mb-4",
337
- children: [
338
- "Parser \"",
339
- G.parser?.name,
340
- "\" has been updated with the imported data."
341
- ]
342
- })
343
- ] }),
344
- !G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ E(w, { children: [
345
- /* @__PURE__ */ T("div", {
346
- className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
347
- children: /* @__PURE__ */ T(s, { className: "size-8 text-green-600" })
348
- }),
349
- /* @__PURE__ */ T("h3", {
350
- className: "text-lg font-medium mb-2",
351
- children: "Import Successful!"
352
- }),
353
- /* @__PURE__ */ E("p", {
354
- className: "text-sm text-text-secondary mb-4",
355
- children: [
356
- "Parser \"",
357
- G.parser?.name,
358
- "\" has been created."
359
- ]
360
- })
361
- ] })
362
- ]
299
+ M === "complete" && q?.success && /* @__PURE__ */ T(e, {
300
+ tone: q.alreadyExists ? "info" : "success",
301
+ headingLevel: 3,
302
+ title: q.alreadyExists ? j("bigconsole.parsers.import.alreadyExistsTitle", "Parser Already Exists") : q.originalUpdated ? j("bigconsole.parsers.import.updatedTitle", "Parser Updated!") : j("bigconsole.parsers.import.createdTitle", "Import Successful!"),
303
+ icon: q.alreadyExists ? /* @__PURE__ */ T(l, { className: "size-5 text-[var(--color-status-info-text)]" }) : q.originalUpdated ? /* @__PURE__ */ T(u, { className: "size-5 text-[var(--color-status-success-text)]" }) : /* @__PURE__ */ T(c, { className: "size-5 text-[var(--color-status-success-text)]" }),
304
+ description: q.alreadyExists ? j("bigconsole.parsers.import.alreadyExistsBody", "Parser \"{{name}}\" already exists with the same data. No changes were made.", { name: q.parser?.name ?? "" }) : q.originalUpdated ? j("bigconsole.parsers.import.updatedBody", "Parser \"{{name}}\" has been updated with the imported data.", { name: q.parser?.name ?? "" }) : j("bigconsole.parsers.import.createdBody", "Parser \"{{name}}\" has been created.", { name: q.parser?.name ?? "" }),
305
+ "data-testid": "import-parser-outcome"
363
306
  }),
364
- U && /* @__PURE__ */ T(m, {
365
- className: "border-status-error-border/50 bg-status-error-bg/5",
366
- children: /* @__PURE__ */ T(h, {
367
- className: "p-3",
368
- children: /* @__PURE__ */ T("p", {
369
- className: "text-sm text-status-error-text",
370
- children: U.message
371
- })
307
+ G && /* @__PURE__ */ T(e, {
308
+ tone: "danger",
309
+ padding: "compact",
310
+ headingLevel: 3,
311
+ title: "Import failed",
312
+ "data-testid": "import-parser-error",
313
+ children: /* @__PURE__ */ T("p", {
314
+ className: "break-words text-sm text-status-error-text",
315
+ children: G.message
372
316
  })
373
317
  }),
374
- G && !G.success && G.errorMessage && /* @__PURE__ */ T(m, {
375
- className: "border-status-error-border/50 bg-status-error-bg/5",
376
- children: /* @__PURE__ */ T(h, {
377
- className: "p-3",
378
- children: /* @__PURE__ */ T("p", {
379
- className: "text-sm text-status-error-text",
380
- children: G.errorMessage
381
- })
318
+ q && !q.success && q.errorMessage && /* @__PURE__ */ T(e, {
319
+ tone: "danger",
320
+ padding: "compact",
321
+ headingLevel: 3,
322
+ title: "Import failed",
323
+ "data-testid": "import-parser-result-error",
324
+ children: /* @__PURE__ */ T("p", {
325
+ className: "break-words text-sm text-status-error-text",
326
+ children: q.errorMessage
382
327
  })
383
328
  })
384
329
  ]
385
330
  }),
386
- /* @__PURE__ */ E(y, {
387
- className: "flex-row justify-between sm:justify-between",
388
- children: [/* @__PURE__ */ T("div", { children: A === "preview" && /* @__PURE__ */ E(p, {
331
+ /* @__PURE__ */ E(b, {
332
+ className: "flex flex-col-reverse gap-2 sm:flex-row sm:justify-between",
333
+ children: [/* @__PURE__ */ T("div", { children: M === "preview" && /* @__PURE__ */ E(h, {
389
334
  variant: "ghost",
390
335
  onClick: () => {
391
- j("select"), M(null), P(null), Y();
336
+ N("select"), P(null), I(null), Z();
392
337
  },
393
- disabled: H,
394
- children: [/* @__PURE__ */ T(o, { className: "size-4" }), "Back"]
338
+ disabled: W,
339
+ children: [/* @__PURE__ */ T(s, { className: "size-4" }), j("bigconsole.parsers.import.back", "Back")]
395
340
  }) }), /* @__PURE__ */ E("div", {
396
- className: "flex items-center gap-2",
341
+ className: "flex flex-wrap items-center gap-2",
397
342
  children: [
398
- A !== "complete" && /* @__PURE__ */ T(p, {
343
+ M !== "complete" && /* @__PURE__ */ T(h, {
399
344
  variant: "outline",
400
- onClick: D,
345
+ onClick: O,
401
346
  disabled: !Q,
402
- children: "Cancel"
347
+ children: j("bigconsole.parsers.import.cancel", "Cancel")
403
348
  }),
404
- A === "preview" && W?.isValid && /* @__PURE__ */ E(p, {
405
- onClick: ne,
406
- disabled: H,
407
- children: [/* @__PURE__ */ T(d, { className: "size-4" }), "Import Parser"]
349
+ M === "preview" && K?.isValid && /* @__PURE__ */ E(h, {
350
+ onClick: ie,
351
+ disabled: W,
352
+ children: [/* @__PURE__ */ T(d, { className: "size-4" }), j("bigconsole.parsers.import.importButton", "Import Parser")]
408
353
  }),
409
- A === "importing" && /* @__PURE__ */ E("div", {
354
+ M === "importing" && /* @__PURE__ */ E("div", {
410
355
  className: "flex items-center gap-2 text-sm text-text-secondary",
411
- children: [/* @__PURE__ */ T(te, { className: "size-4" }), "Importing..."]
356
+ children: [/* @__PURE__ */ T(C, { className: "size-4" }), j("bigconsole.parsers.import.importing", "Importing...")]
412
357
  }),
413
- A === "complete" && /* @__PURE__ */ T(p, {
414
- onClick: D,
415
- children: "Done"
358
+ M === "complete" && /* @__PURE__ */ T(h, {
359
+ onClick: O,
360
+ children: j("bigconsole.parsers.import.done", "Done")
416
361
  })
417
362
  ]
418
363
  })]
@@ -422,6 +367,6 @@ var D = t(function({ isOpen: t, onClose: D, consoleId: O, onSuccess: k }) {
422
367
  });
423
368
  });
424
369
  //#endregion
425
- export { D as default };
370
+ export { O as default };
426
371
 
427
372
  //# sourceMappingURL=ImportParserDialog.js.map