@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,401 +1,406 @@
1
- import e from "../../hooks/useBigConsoleAnalytics.js";
2
- import t from "../../hooks/useImportDataSink.js";
1
+ import { Section as e, SectionStack as t } from "../common/Section.js";
2
+ import "../common/index.js";
3
+ import n from "../../hooks/useBigConsoleAnalytics.js";
4
+ import r from "../../hooks/useImportDataSink.js";
3
5
  import "../../hooks/index.js";
4
- import { memo as n, useCallback as r, useEffect as i, useRef as a, useState as o } from "react";
5
- import { ArrowLeft as s, Check as c, FileJson as l, Info as u, RefreshCw as d, Upload as f, XCircle as p } from "lucide-react";
6
- import { Badge as m, Button as h, Card as g, CardContent as _, Dialog as v, DialogContent as y, DialogDescription as b, DialogFooter as ee, DialogHeader as te, DialogTitle as x, Input as S, Label as C, Spinner as w } from "@burdenoff/fe-libs/ui";
7
- import { Fragment as T, jsx as E, jsxs as D } from "react/jsx-runtime";
6
+ import { memo as i, useCallback as a, useEffect as o, useRef as s, useState as c } from "react";
7
+ import { ArrowLeft as l, Check as ee, FileJson as u, Info as d, RefreshCw as te, Upload as f, XCircle as p } from "lucide-react";
8
+ import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { Badge as h, Button as g, Dialog as _, DialogContent as v, DialogDescription as y, DialogFooter as b, DialogHeader as ne, DialogTitle as re, Input as x, Label as S, Spinner as C } from "@burdenoff/fe-libs/ui";
10
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
8
11
  //#region src/bigconsole/components/datasink/ImportDataSinkDialog.tsx
9
- var O = n(function({ isOpen: n, onClose: O, onSuccess: k }) {
10
- let [A, j] = o("select"), [, M] = o(null), [N, P] = o(null), [F, I] = o(""), [L, R] = o(""), z = a(null), { loading: B, error: V, validationResult: H, importResult: U, validateImport: W, importDataSink: G, extractDataSinkId: K, clearState: q } = t(), J = e();
11
- i(() => {
12
- n && (j("select"), M(null), P(null), I(""), R(""), q());
13
- }, [n, q]);
14
- let Y = r(async (e) => {
12
+ var D = [
13
+ {
14
+ id: "select",
15
+ label: "Choose file"
16
+ },
17
+ {
18
+ id: "preview",
19
+ label: "Review"
20
+ },
21
+ {
22
+ id: "complete",
23
+ label: "Done"
24
+ }
25
+ ];
26
+ function O(e) {
27
+ return e === "select" ? 0 : e === "complete" ? 2 : 1;
28
+ }
29
+ var k = i(function({ isOpen: i, onClose: k, onSuccess: A }) {
30
+ let { t: j } = m(), [M, N] = c("select"), [, P] = c(null), [F, I] = c(null), [L, R] = c(""), [z, B] = c(""), V = s(null), { loading: H, error: U, validationResult: W, importResult: G, validateImport: K, importDataSink: q, extractDataSinkId: J, clearState: Y } = r(), X = n();
31
+ o(() => {
32
+ i && (N("select"), P(null), I(null), R(""), B(""), Y());
33
+ }, [i, Y]);
34
+ let ie = a(async (e) => {
15
35
  let t = e.target.files?.[0];
16
36
  if (!t) return;
17
37
  if (!t.name.endsWith(".json")) {
18
- alert("Please select a JSON file");
38
+ alert(j("bigconsole.dataSinks.import.selectJsonFile", "Please select a JSON file"));
19
39
  return;
20
40
  }
21
- M(t);
41
+ P(t);
22
42
  let n = new FileReader();
23
43
  n.onload = async (e) => {
24
44
  let t = e.target?.result;
25
- P(t);
26
- let n = W(t);
27
- n.isValid && n.dataSinkInfo ? (j("preview"), I(n.dataSinkInfo.name || ""), R(n.dataSinkInfo.key || "")) : j("preview");
45
+ I(t);
46
+ let n = K(t);
47
+ n.isValid && n.dataSinkInfo ? (N("preview"), R(n.dataSinkInfo.name || ""), B(n.dataSinkInfo.key || "")) : N("preview");
28
48
  }, n.onerror = () => {
29
- alert("Failed to read file");
49
+ alert(j("bigconsole.dataSinks.import.readFileError", "Failed to read file"));
30
50
  }, n.readAsText(t);
31
- }, [W]), X = r((e) => {
51
+ }, [K, j]), ae = a((e) => {
32
52
  e.preventDefault();
33
53
  let t = e.dataTransfer.files?.[0];
34
54
  if (t) {
35
55
  let e = new DataTransfer();
36
- e.items.add(t), z.current && (z.current.files = e.files, z.current.dispatchEvent(new Event("change", { bubbles: !0 })));
56
+ e.items.add(t), V.current && (V.current.files = e.files, V.current.dispatchEvent(new Event("change", { bubbles: !0 })));
37
57
  }
38
- }, []), Z = r(async () => {
39
- if (!N) return;
40
- j("importing");
58
+ }, []), oe = a(async () => {
59
+ if (!F) return;
60
+ N("importing");
41
61
  let e = {
42
- name: F.trim() || void 0,
43
- key: L.trim() || void 0
62
+ name: L.trim() || void 0,
63
+ key: z.trim() || void 0
44
64
  };
45
- J("bigconsole.data_sink.import_clicked", { source: "import" });
46
- let t = await G(N, e);
47
- t?.success && t.dataSink ? (j("complete"), J("bigconsole.data_sink.imported", {
65
+ X("bigconsole.data_sink.import_clicked", { source: "import" });
66
+ let t = await q(F, e);
67
+ t?.success && t.dataSink ? (N("complete"), X("bigconsole.data_sink.imported", {
48
68
  dataSinkId: t.dataSink.id,
49
69
  source: "import",
50
70
  originalUpdated: t.originalUpdated ?? !1
51
- }), k?.(t.dataSink.id, t.dataSink.name, t.originalUpdated ?? !1)) : j("preview");
71
+ }), A?.(t.dataSink.id, t.dataSink.name, t.originalUpdated ?? !1)) : N("preview");
52
72
  }, [
53
- J,
54
- N,
55
- G,
56
- L,
73
+ X,
57
74
  F,
58
- k
59
- ]), Q = !B && A !== "importing", $ = N ? K(N) : null;
60
- return /* @__PURE__ */ E(v, {
61
- open: n,
62
- onOpenChange: (e) => !e && Q && O(),
63
- children: /* @__PURE__ */ D(y, {
64
- className: "sm:max-w-lg max-h-[85vh] flex flex-col",
75
+ q,
76
+ z,
77
+ L,
78
+ A
79
+ ]), Z = !H && M !== "importing", Q = F ? J(F) : null, $ = O(M);
80
+ return /* @__PURE__ */ T(_, {
81
+ open: i,
82
+ onOpenChange: (e) => !e && Z && k(),
83
+ children: /* @__PURE__ */ E(v, {
84
+ className: "flex max-h-[85vh] flex-col sm:max-w-lg",
65
85
  children: [
66
- /* @__PURE__ */ D(te, { children: [/* @__PURE__ */ D("div", {
86
+ /* @__PURE__ */ E(ne, { children: [/* @__PURE__ */ E("div", {
67
87
  className: "flex items-center gap-3",
68
- children: [/* @__PURE__ */ E("div", {
69
- className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10",
70
- children: /* @__PURE__ */ E(f, { className: "size-5 text-primary" })
71
- }), /* @__PURE__ */ E(x, { children: "Import DataSink" })]
72
- }), /* @__PURE__ */ E(b, { children: "Upload a DataSink export file to restore it into this workspace." })] }),
73
- /* @__PURE__ */ D("div", {
74
- className: "flex-1 overflow-y-auto py-4 space-y-4",
75
- children: [
76
- A === "select" && /* @__PURE__ */ D("div", {
77
- onDragOver: (e) => e.preventDefault(),
78
- onDrop: X,
79
- className: "border-2 border-dashed rounded-lg p-8 text-center hover:border-primary transition-colors",
80
- children: [
81
- /* @__PURE__ */ E(l, { className: "size-12 mx-auto text-text-secondary mb-4" }),
82
- /* @__PURE__ */ E("p", {
83
- className: "text-sm mb-2",
84
- children: "Drag and drop a DataSink export file here"
85
- }),
86
- /* @__PURE__ */ E("p", {
87
- className: "text-xs text-text-secondary mb-4",
88
- children: "or"
89
- }),
90
- /* @__PURE__ */ E("input", {
91
- ref: z,
92
- type: "file",
93
- accept: ".json",
94
- onChange: Y,
95
- className: "hidden"
96
- }),
97
- /* @__PURE__ */ E(h, {
98
- onClick: () => z.current?.click(),
99
- disabled: B,
100
- children: "Browse Files"
101
- }),
102
- /* @__PURE__ */ E("p", {
103
- className: "text-xs text-text-secondary mt-4",
104
- children: "Only .json files exported from BigConsole are supported"
105
- })
106
- ]
88
+ children: [/* @__PURE__ */ T("div", {
89
+ className: "flex size-10 items-center justify-center rounded-card bg-bg-accentSubtle",
90
+ children: /* @__PURE__ */ T(f, { className: "size-5 text-text-link" })
91
+ }), /* @__PURE__ */ T(re, { children: j("bigconsole.dataSinks.import.title", "Import DataSink") })]
92
+ }), /* @__PURE__ */ T(y, { children: j("bigconsole.dataSinks.import.description", "Upload a DataSink export file to restore it into this workspace.") })] }),
93
+ /* @__PURE__ */ T("ol", {
94
+ className: "flex flex-wrap items-center gap-x-icon-gap gap-y-1 text-xs",
95
+ "aria-label": "Import progress",
96
+ children: D.map((e, t) => /* @__PURE__ */ E("li", {
97
+ "aria-current": t === $ ? "step" : void 0,
98
+ className: `flex items-center gap-icon-gap ${t === $ ? "font-semibold text-text-primary" : "text-text-muted"}`,
99
+ children: [
100
+ /* @__PURE__ */ T("span", {
101
+ className: `inline-flex size-5 items-center justify-center rounded-pill text-[10px] ${t <= $ ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken"}`,
102
+ children: t + 1
103
+ }),
104
+ e.label,
105
+ t < D.length - 1 && /* @__PURE__ */ T("span", {
106
+ "aria-hidden": "true",
107
+ className: "text-text-muted",
108
+ children: ""
109
+ })
110
+ ]
111
+ }, e.id))
112
+ }),
113
+ /* @__PURE__ */ T("div", {
114
+ className: "min-w-0 flex-1 overflow-y-auto py-4",
115
+ children: /* @__PURE__ */ E(t, { children: [
116
+ M === "select" && /* @__PURE__ */ T(e, {
117
+ title: "Choose an export file",
118
+ description: j("bigconsole.dataSinks.import.supportedFilesHint", "Only .json files exported from BigConsole are supported"),
119
+ headingLevel: 3,
120
+ bodyClassName: "mt-form-gap",
121
+ children: /* @__PURE__ */ E("div", {
122
+ onDragOver: (e) => e.preventDefault(),
123
+ onDrop: ae,
124
+ className: "rounded-card border-2 border-dashed border-[var(--color-border-default)] p-8 text-center hover:border-[var(--color-action-primary-bg)] motion-safe:transition-colors",
125
+ children: [
126
+ /* @__PURE__ */ T(u, { className: "mx-auto mb-4 size-12 text-text-secondary" }),
127
+ /* @__PURE__ */ T("p", {
128
+ className: "mb-2 text-sm",
129
+ children: j("bigconsole.dataSinks.import.dropzoneText", "Drag and drop a DataSink export file here")
130
+ }),
131
+ /* @__PURE__ */ T("p", {
132
+ className: "mb-4 text-xs text-text-secondary",
133
+ children: j("bigconsole.dataSinks.import.or", "or")
134
+ }),
135
+ /* @__PURE__ */ T("input", {
136
+ ref: V,
137
+ type: "file",
138
+ accept: ".json",
139
+ onChange: ie,
140
+ className: "hidden"
141
+ }),
142
+ /* @__PURE__ */ T(g, {
143
+ onClick: () => V.current?.click(),
144
+ disabled: H,
145
+ children: j("bigconsole.dataSinks.import.browseFiles", "Browse Files")
146
+ })
147
+ ]
148
+ })
107
149
  }),
108
- (A === "preview" || A === "importing") && H && /* @__PURE__ */ D(T, { children: [
109
- H.dataSinkInfo && /* @__PURE__ */ E(g, { children: /* @__PURE__ */ D(_, {
110
- className: "p-4 space-y-2",
150
+ (M === "preview" || M === "importing") && W && /* @__PURE__ */ E(w, { children: [
151
+ W.dataSinkInfo && /* @__PURE__ */ E(e, {
152
+ emphasis: "muted",
153
+ padding: "compact",
154
+ headingLevel: 3,
155
+ title: "File contents",
156
+ description: "What this export file describes.",
157
+ bodyClassName: "space-y-2",
111
158
  children: [
112
- /* @__PURE__ */ D("div", {
113
- className: "flex items-center justify-between",
114
- children: [/* @__PURE__ */ E("span", {
159
+ /* @__PURE__ */ E("div", {
160
+ className: "flex items-center justify-between gap-icon-gap",
161
+ children: [/* @__PURE__ */ T("span", {
115
162
  className: "text-sm text-text-secondary",
116
- children: "Name"
117
- }), /* @__PURE__ */ E("span", {
118
- className: "text-sm font-medium",
119
- children: H.dataSinkInfo.name || "Unnamed"
163
+ children: j("bigconsole.dataSinks.import.nameLabel", "Name")
164
+ }), /* @__PURE__ */ T("span", {
165
+ className: "min-w-0 truncate text-sm font-medium",
166
+ children: W.dataSinkInfo.name || j("bigconsole.dataSinks.import.unnamed", "Unnamed")
120
167
  })]
121
168
  }),
122
- /* @__PURE__ */ D("div", {
123
- className: "flex items-center justify-between",
124
- children: [/* @__PURE__ */ E("span", {
169
+ /* @__PURE__ */ E("div", {
170
+ className: "flex items-center justify-between gap-icon-gap",
171
+ children: [/* @__PURE__ */ T("span", {
125
172
  className: "text-sm text-text-secondary",
126
- children: "Key"
127
- }), /* @__PURE__ */ E("span", {
128
- className: "text-xs font-mono",
129
- children: H.dataSinkInfo.key
173
+ children: j("bigconsole.dataSinks.import.keyLabel", "Key")
174
+ }), /* @__PURE__ */ T("span", {
175
+ className: "min-w-0 truncate font-mono text-xs",
176
+ children: W.dataSinkInfo.key
130
177
  })]
131
178
  }),
132
- /* @__PURE__ */ D("div", {
133
- className: "flex items-center justify-between",
134
- children: [/* @__PURE__ */ E("span", {
179
+ /* @__PURE__ */ E("div", {
180
+ className: "flex items-center justify-between gap-icon-gap",
181
+ children: [/* @__PURE__ */ T("span", {
135
182
  className: "text-sm text-text-secondary",
136
- children: "Status"
137
- }), /* @__PURE__ */ E(m, {
183
+ children: j("bigconsole.dataSinks.import.statusLabel", "Status")
184
+ }), /* @__PURE__ */ T(h, {
138
185
  variant: "secondary",
139
- children: H.dataSinkInfo.status
186
+ children: W.dataSinkInfo.status
140
187
  })]
141
188
  }),
142
- /* @__PURE__ */ D("div", {
143
- className: "flex items-center justify-between",
144
- children: [/* @__PURE__ */ E("span", {
189
+ /* @__PURE__ */ E("div", {
190
+ className: "flex items-center justify-between gap-icon-gap",
191
+ children: [/* @__PURE__ */ T("span", {
145
192
  className: "text-sm text-text-secondary",
146
- children: "Setup State"
147
- }), /* @__PURE__ */ E(m, {
193
+ children: j("bigconsole.dataSinks.import.setupStateLabel", "Setup State")
194
+ }), /* @__PURE__ */ T(h, {
148
195
  variant: "outline",
149
- children: H.dataSinkInfo.setupState
196
+ children: W.dataSinkInfo.setupState
150
197
  })]
151
198
  }),
152
- H.dataSinkInfo.exportedFrom && /* @__PURE__ */ D("div", {
153
- className: "flex items-center justify-between",
154
- children: [/* @__PURE__ */ E("span", {
199
+ W.dataSinkInfo.exportedFrom && /* @__PURE__ */ E("div", {
200
+ className: "flex items-center justify-between gap-icon-gap",
201
+ children: [/* @__PURE__ */ T("span", {
155
202
  className: "text-sm text-text-secondary",
156
- children: "Source ID"
157
- }), /* @__PURE__ */ E("span", {
158
- className: "text-xs text-text-secondary font-mono truncate max-w-[180px]",
159
- children: H.dataSinkInfo.exportedFrom
203
+ children: j("bigconsole.dataSinks.import.sourceIdLabel", "Source ID")
204
+ }), /* @__PURE__ */ T("span", {
205
+ className: "min-w-0 max-w-[180px] truncate font-mono text-xs text-text-secondary",
206
+ children: W.dataSinkInfo.exportedFrom
160
207
  })]
161
208
  }),
162
- /* @__PURE__ */ D("div", {
163
- className: "flex items-center justify-between",
164
- children: [/* @__PURE__ */ E("span", {
209
+ /* @__PURE__ */ E("div", {
210
+ className: "flex items-center justify-between gap-icon-gap",
211
+ children: [/* @__PURE__ */ T("span", {
165
212
  className: "text-sm text-text-secondary",
166
- children: "Schema Version"
167
- }), /* @__PURE__ */ E("span", {
213
+ children: j("bigconsole.dataSinks.import.schemaVersionLabel", "Schema Version")
214
+ }), /* @__PURE__ */ T("span", {
168
215
  className: "text-xs text-text-secondary",
169
- children: H.dataSinkInfo.schemaVersion
216
+ children: W.dataSinkInfo.schemaVersion
170
217
  })]
171
218
  })
172
219
  ]
173
- }) }),
174
- H.errors.length > 0 && /* @__PURE__ */ E(g, {
175
- className: "border-status-error-border/50 bg-status-error-bg/5",
176
- children: /* @__PURE__ */ D(_, {
177
- className: "p-3",
178
- children: [/* @__PURE__ */ D("div", {
179
- className: "flex items-center gap-2 mb-2",
180
- children: [/* @__PURE__ */ E(p, { className: "size-4 text-status-error-text" }), /* @__PURE__ */ D("span", {
181
- className: "text-sm font-medium text-status-error-text",
220
+ }),
221
+ W.errors.length > 0 && /* @__PURE__ */ T(e, {
222
+ tone: "danger",
223
+ padding: "compact",
224
+ headingLevel: 3,
225
+ title: j("bigconsole.dataSinks.import.errorsHeading", "Errors ({{count}})", { count: W.errors.length }),
226
+ icon: /* @__PURE__ */ T(p, { className: "size-4" }),
227
+ children: /* @__PURE__ */ T("ul", {
228
+ className: "space-y-1 text-xs text-status-error-text",
229
+ children: W.errors.map((e, t) => /* @__PURE__ */ E("li", { children: [
230
+ /* @__PURE__ */ E("span", {
231
+ className: "font-mono",
182
232
  children: [
183
- "Errors (",
184
- H.errors.length,
185
- ")"
233
+ "[",
234
+ e.code,
235
+ "]"
186
236
  ]
187
- })]
188
- }), /* @__PURE__ */ E("ul", {
189
- className: "text-xs text-status-error-text space-y-1",
190
- children: H.errors.map((e, t) => /* @__PURE__ */ D("li", { children: [
191
- /* @__PURE__ */ D("span", {
192
- className: "font-mono",
193
- children: [
194
- "[",
195
- e.code,
196
- "]"
197
- ]
198
- }),
199
- " ",
200
- e.message
201
- ] }, t))
202
- })]
237
+ }),
238
+ " ",
239
+ e.message
240
+ ] }, t))
203
241
  })
204
242
  }),
205
- H.isValid && /* @__PURE__ */ D("div", {
206
- className: "space-y-4",
243
+ W.isValid && /* @__PURE__ */ E(e, {
244
+ title: j("bigconsole.dataSinks.import.optionsHeading", "Import Options"),
245
+ description: "Rename the sink or give it a different key before importing.",
246
+ headingLevel: 3,
247
+ bodyClassName: "space-y-form-gap",
207
248
  children: [
208
- /* @__PURE__ */ E("p", {
209
- className: "text-sm font-medium",
210
- children: "Import Options"
211
- }),
212
- /* @__PURE__ */ E(g, {
213
- className: "border-blue-500/50 bg-blue-500/5",
214
- children: /* @__PURE__ */ E(_, {
215
- className: "p-3",
216
- children: /* @__PURE__ */ D("div", {
217
- className: "flex items-start gap-2",
218
- children: [/* @__PURE__ */ E(u, { className: "size-4 text-blue-600 mt-0.5 shrink-0" }), /* @__PURE__ */ E("div", {
219
- className: "text-xs text-blue-700 dark:text-blue-400",
220
- children: $ ? /* @__PURE__ */ D(T, { children: [
221
- /* @__PURE__ */ E("p", {
222
- className: "font-medium mb-1",
223
- children: "Import will check for existing DataSink"
224
- }),
225
- /* @__PURE__ */ D("p", { children: [
226
- "If the original DataSink (ID:",
227
- " ",
228
- /* @__PURE__ */ D("code", {
229
- className: "font-mono bg-blue-200/50 px-1 rounded",
230
- children: [$.slice(0, 8), "..."]
231
- }),
232
- ") exists:"
233
- ] }),
234
- /* @__PURE__ */ D("ul", {
235
- className: "list-disc list-inside mt-1 space-y-0.5",
236
- children: [/* @__PURE__ */ E("li", { children: "With changes → Update the existing DataSink" }), /* @__PURE__ */ E("li", { children: "No changes → Show \"already exists\" message" })]
237
- }),
238
- /* @__PURE__ */ E("p", {
239
- className: "mt-1",
240
- children: "If original doesn't exist → Create a new DataSink"
241
- })
242
- ] }) : /* @__PURE__ */ D(T, { children: [/* @__PURE__ */ E("p", {
243
- className: "font-medium mb-1",
244
- children: "A new DataSink will be created"
245
- }), /* @__PURE__ */ E("p", { children: "Import as a new DataSink with the specified configuration." })] })
246
- })]
247
- })
249
+ /* @__PURE__ */ T(e, {
250
+ tone: "info",
251
+ emphasis: "muted",
252
+ padding: "compact",
253
+ headingLevel: 4,
254
+ icon: /* @__PURE__ */ T(d, { className: "size-4" }),
255
+ title: Q ? j("bigconsole.dataSinks.import.checkExistingHeading", "Import will check for existing DataSink") : j("bigconsole.dataSinks.import.newWillBeCreatedHeading", "A new DataSink will be created"),
256
+ children: /* @__PURE__ */ T("div", {
257
+ className: "text-xs text-[var(--color-status-info-text)]",
258
+ children: Q ? /* @__PURE__ */ E(w, { children: [
259
+ /* @__PURE__ */ E("p", { children: [
260
+ j("bigconsole.dataSinks.import.ifOriginalExistsPrefix", "If the original DataSink (ID:"),
261
+ " ",
262
+ /* @__PURE__ */ E("code", {
263
+ className: "rounded-input bg-bg-surface px-1 font-mono",
264
+ children: [Q.slice(0, 8), "..."]
265
+ }),
266
+ j("bigconsole.dataSinks.import.ifOriginalExistsSuffix", ") exists:")
267
+ ] }),
268
+ /* @__PURE__ */ E("ul", {
269
+ className: "mt-1 list-inside list-disc space-y-0.5",
270
+ children: [/* @__PURE__ */ T("li", { children: j("bigconsole.dataSinks.import.withChangesUpdate", "With changes → Update the existing DataSink") }), /* @__PURE__ */ T("li", { children: j("bigconsole.dataSinks.import.noChangesMessage", "No changes → Show \"already exists\" message") })]
271
+ }),
272
+ /* @__PURE__ */ T("p", {
273
+ className: "mt-1",
274
+ children: j("bigconsole.dataSinks.import.ifNotExistsCreate", "If original doesn't exist → Create a new DataSink")
275
+ })
276
+ ] }) : /* @__PURE__ */ T("p", { children: j("bigconsole.dataSinks.import.newWillBeCreatedBody", "Import as a new DataSink with the specified configuration.") })
248
277
  })
249
278
  }),
250
- /* @__PURE__ */ D("div", {
279
+ /* @__PURE__ */ E("div", {
251
280
  className: "space-y-2",
252
- children: [/* @__PURE__ */ E(C, {
281
+ children: [/* @__PURE__ */ T(S, {
253
282
  htmlFor: "import-name",
254
- children: "DataSink Name"
255
- }), /* @__PURE__ */ E(S, {
283
+ children: j("bigconsole.dataSinks.import.nameFieldLabel", "DataSink Name")
284
+ }), /* @__PURE__ */ T(x, {
256
285
  id: "import-name",
257
286
  type: "text",
258
- value: F,
259
- onChange: (e) => I(e.target.value),
260
- placeholder: H.dataSinkInfo?.name || "DataSink name",
261
- disabled: A === "importing"
287
+ value: L,
288
+ onChange: (e) => R(e.target.value),
289
+ placeholder: W.dataSinkInfo?.name || j("bigconsole.dataSinks.import.namePlaceholder", "DataSink name"),
290
+ disabled: M === "importing"
262
291
  })]
263
292
  }),
264
- /* @__PURE__ */ D("div", {
293
+ /* @__PURE__ */ E("div", {
265
294
  className: "space-y-2",
266
295
  children: [
267
- /* @__PURE__ */ E(C, {
296
+ /* @__PURE__ */ T(S, {
268
297
  htmlFor: "import-key",
269
- children: "DataSink Key"
298
+ children: j("bigconsole.dataSinks.import.keyFieldLabel", "DataSink Key")
270
299
  }),
271
- /* @__PURE__ */ E(S, {
300
+ /* @__PURE__ */ T(x, {
272
301
  id: "import-key",
273
302
  type: "text",
274
- value: L,
275
- onChange: (e) => R(e.target.value),
276
- placeholder: H.dataSinkInfo?.key || "datasink-key",
277
- disabled: A === "importing"
303
+ value: z,
304
+ onChange: (e) => B(e.target.value),
305
+ placeholder: W.dataSinkInfo?.key || j("bigconsole.dataSinks.import.keyPlaceholder", "datasink-key"),
306
+ disabled: M === "importing"
278
307
  }),
279
- /* @__PURE__ */ E("p", {
308
+ /* @__PURE__ */ T("p", {
280
309
  className: "text-xs text-text-secondary",
281
- children: "Use a unique key to avoid conflicts with existing DataSinks."
310
+ children: j("bigconsole.dataSinks.import.keyHelp", "Use a unique key to avoid conflicts with existing DataSinks.")
282
311
  })
283
312
  ]
284
313
  })
285
314
  ]
286
315
  })
287
316
  ] }),
288
- A === "complete" && U?.success && /* @__PURE__ */ D("div", {
289
- className: "text-center py-6",
290
- children: [
291
- U.alreadyExists && /* @__PURE__ */ D(T, { children: [
292
- /* @__PURE__ */ E("div", {
293
- className: "size-16 mx-auto mb-4 rounded-full bg-blue-100 dark:bg-blue-900/30 flex items-center justify-center",
294
- children: /* @__PURE__ */ E(u, { className: "size-8 text-blue-600" })
295
- }),
296
- /* @__PURE__ */ E("h3", {
297
- className: "text-lg font-medium mb-2",
298
- children: "DataSink Already Exists"
299
- }),
300
- /* @__PURE__ */ D("p", {
301
- className: "text-sm text-text-secondary mb-4",
302
- children: [
303
- "DataSink \"",
304
- U.dataSink?.name || U.dataSink?.key,
305
- "\" already exists with the same data. No changes were made."
306
- ]
307
- })
308
- ] }),
309
- U.originalUpdated && !U.alreadyExists && /* @__PURE__ */ D(T, { children: [
310
- /* @__PURE__ */ E("div", {
311
- className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
312
- children: /* @__PURE__ */ E(d, { className: "size-8 text-green-600" })
313
- }),
314
- /* @__PURE__ */ E("h3", {
315
- className: "text-lg font-medium mb-2",
316
- children: "DataSink Updated!"
317
- }),
318
- /* @__PURE__ */ D("p", {
319
- className: "text-sm text-text-secondary mb-4",
320
- children: [
321
- "DataSink \"",
322
- U.dataSink?.name || U.dataSink?.key,
323
- "\" has been updated with the imported data."
324
- ]
325
- })
326
- ] }),
327
- !U.originalUpdated && !U.alreadyExists && /* @__PURE__ */ D(T, { children: [
328
- /* @__PURE__ */ E("div", {
329
- className: "size-16 mx-auto mb-4 rounded-full bg-green-100 dark:bg-green-900/30 flex items-center justify-center",
330
- children: /* @__PURE__ */ E(c, { className: "size-8 text-green-600" })
331
- }),
332
- /* @__PURE__ */ E("h3", {
333
- className: "text-lg font-medium mb-2",
334
- children: "Import Successful!"
335
- }),
336
- /* @__PURE__ */ D("p", {
337
- className: "text-sm text-text-secondary mb-4",
338
- children: [
339
- "DataSink \"",
340
- U.dataSink?.name || U.dataSink?.key,
341
- "\" has been created."
342
- ]
343
- })
344
- ] })
345
- ]
346
- }),
347
- V && /* @__PURE__ */ E(g, {
348
- className: "border-status-error-border/50 bg-status-error-bg/5",
349
- children: /* @__PURE__ */ E(_, {
350
- className: "p-3",
351
- children: /* @__PURE__ */ E("p", {
352
- className: "text-sm text-status-error-text",
353
- children: V.message
317
+ M === "complete" && G?.success && /* @__PURE__ */ E(w, { children: [
318
+ G.alreadyExists && /* @__PURE__ */ T(e, {
319
+ tone: "info",
320
+ headingLevel: 3,
321
+ title: j("bigconsole.dataSinks.import.alreadyExistsTitle", "DataSink Already Exists"),
322
+ icon: /* @__PURE__ */ T(d, { className: "h-icon-sm w-icon-sm" }),
323
+ children: /* @__PURE__ */ T("p", {
324
+ className: "text-sm text-text-secondary",
325
+ children: j("bigconsole.dataSinks.import.alreadyExistsBody", "DataSink \"{{name}}\" already exists with the same data. No changes were made.", { name: G.dataSink?.name || G.dataSink?.key || "" })
326
+ })
327
+ }),
328
+ G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ T(e, {
329
+ tone: "success",
330
+ headingLevel: 3,
331
+ title: j("bigconsole.dataSinks.import.updatedTitle", "DataSink Updated!"),
332
+ icon: /* @__PURE__ */ T(te, { className: "h-icon-sm w-icon-sm" }),
333
+ children: /* @__PURE__ */ T("p", {
334
+ className: "text-sm text-text-secondary",
335
+ children: j("bigconsole.dataSinks.import.updatedBody", "DataSink \"{{name}}\" has been updated with the imported data.", { name: G.dataSink?.name || G.dataSink?.key || "" })
336
+ })
337
+ }),
338
+ !G.originalUpdated && !G.alreadyExists && /* @__PURE__ */ T(e, {
339
+ tone: "success",
340
+ headingLevel: 3,
341
+ title: j("bigconsole.dataSinks.import.successTitle", "Import Successful!"),
342
+ icon: /* @__PURE__ */ T(ee, { className: "h-icon-sm w-icon-sm" }),
343
+ children: /* @__PURE__ */ T("p", {
344
+ className: "text-sm text-text-secondary",
345
+ children: j("bigconsole.dataSinks.import.successBody", "DataSink \"{{name}}\" has been created.", { name: G.dataSink?.name || G.dataSink?.key || "" })
354
346
  })
355
347
  })
348
+ ] }),
349
+ U && /* @__PURE__ */ T(e, {
350
+ tone: "danger",
351
+ padding: "compact",
352
+ headingLevel: 3,
353
+ title: "Import failed",
354
+ children: /* @__PURE__ */ T("p", {
355
+ className: "text-sm text-status-error-text",
356
+ children: U.message
357
+ })
356
358
  }),
357
- U && !U.success && U.errorMessage && /* @__PURE__ */ E(g, {
358
- className: "border-status-error-border/50 bg-status-error-bg/5",
359
- children: /* @__PURE__ */ E(_, {
360
- className: "p-3",
361
- children: /* @__PURE__ */ E("p", {
362
- className: "text-sm text-status-error-text",
363
- children: U.errorMessage
364
- })
359
+ G && !G.success && G.errorMessage && /* @__PURE__ */ T(e, {
360
+ tone: "danger",
361
+ padding: "compact",
362
+ headingLevel: 3,
363
+ title: "Import failed",
364
+ children: /* @__PURE__ */ T("p", {
365
+ className: "text-sm text-status-error-text",
366
+ children: G.errorMessage
365
367
  })
366
368
  })
367
- ]
369
+ ] })
368
370
  }),
369
- /* @__PURE__ */ D(ee, {
370
- className: "flex-row justify-between sm:justify-between",
371
- children: [/* @__PURE__ */ E("div", { children: A === "preview" && /* @__PURE__ */ D(h, {
371
+ /* @__PURE__ */ E(b, {
372
+ className: "flex flex-col-reverse gap-control-gap sm:flex-row sm:justify-between",
373
+ children: [M === "preview" ? /* @__PURE__ */ E(g, {
372
374
  variant: "ghost",
373
375
  onClick: () => {
374
- j("select"), M(null), P(null), q();
376
+ N("select"), P(null), I(null), Y();
375
377
  },
376
- disabled: B,
377
- children: [/* @__PURE__ */ E(s, { className: "size-4" }), "Back"]
378
- }) }), /* @__PURE__ */ D("div", {
379
- className: "flex items-center gap-2",
378
+ disabled: H,
379
+ children: [/* @__PURE__ */ T(l, { className: "size-4" }), j("bigconsole.dataSinks.import.back", "Back")]
380
+ }) : /* @__PURE__ */ T("span", {
381
+ "aria-hidden": "true",
382
+ className: "hidden sm:block"
383
+ }), /* @__PURE__ */ E("div", {
384
+ className: "flex flex-wrap items-center gap-2",
380
385
  children: [
381
- A !== "complete" && /* @__PURE__ */ E(h, {
386
+ M !== "complete" && /* @__PURE__ */ T(g, {
382
387
  variant: "outline",
383
- onClick: O,
384
- disabled: !Q,
385
- children: "Cancel"
388
+ onClick: k,
389
+ disabled: !Z,
390
+ children: j("bigconsole.dataSinks.import.cancel", "Cancel")
386
391
  }),
387
- A === "preview" && H?.isValid && /* @__PURE__ */ D(h, {
388
- onClick: Z,
389
- disabled: B,
390
- children: [/* @__PURE__ */ E(f, { className: "size-4" }), "Import DataSink"]
392
+ M === "preview" && W?.isValid && /* @__PURE__ */ E(g, {
393
+ onClick: oe,
394
+ disabled: H,
395
+ children: [/* @__PURE__ */ T(f, { className: "size-4" }), j("bigconsole.dataSinks.import.importButton", "Import DataSink")]
391
396
  }),
392
- A === "importing" && /* @__PURE__ */ D("div", {
397
+ M === "importing" && /* @__PURE__ */ E("div", {
393
398
  className: "flex items-center gap-2 text-sm text-text-secondary",
394
- children: [/* @__PURE__ */ E(w, { className: "size-4" }), "Importing..."]
399
+ children: [/* @__PURE__ */ T(C, { className: "size-4" }), j("bigconsole.dataSinks.import.importing", "Importing...")]
395
400
  }),
396
- A === "complete" && /* @__PURE__ */ E(h, {
397
- onClick: O,
398
- children: "Done"
401
+ M === "complete" && /* @__PURE__ */ T(g, {
402
+ onClick: k,
403
+ children: j("bigconsole.dataSinks.import.done", "Done")
399
404
  })
400
405
  ]
401
406
  })]
@@ -405,6 +410,6 @@ var O = n(function({ isOpen: n, onClose: O, onSuccess: k }) {
405
410
  });
406
411
  });
407
412
  //#endregion
408
- export { O as default };
413
+ export { k as default };
409
414
 
410
415
  //# sourceMappingURL=ImportDataSinkDialog.js.map