@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,49 +1,52 @@
1
1
  import { useAppNavigate as e } from "../contexts/NavigationContext.js";
2
2
  import "../contexts/index.js";
3
- import t from "../hooks/useDataSinkOperations.js";
4
- import { BIGCONSOLE_PERMISSIONS as n } from "../../constants/permissions.js";
5
- import { isNative as ee, nativeCopyText as te, nativeToast as ne } from "../../utils/nativeBridge.js";
6
- import r from "../components/datasink/CacheTTLSelector.js";
7
- import re from "../components/datasink/RefreshTypeSelector.js";
8
- import { memo as i, useCallback as a, useEffect as o, useMemo as ie, useState as s } from "react";
9
- import { useParams as c } from "react-router";
10
- import { AccessDenied as l, PermissionButton as u } from "@burdenoff/fe-libs/shared/components";
11
- import { usePermissions as ae } from "@burdenoff/fe-libs/shared/providers/shell";
12
- import { AlertCircle as d, ArrowLeft as oe, Check as se, Copy as ce, Database as f, Eye as p, Loader2 as m, Save as le, Settings as ue } from "lucide-react";
13
- import { Button as h, Card as g, CardContent as _, CardHeader as v, CardTitle as y, GlassCard as de, IllustratedEmptyState as fe, Input as b, Label as x, PagePurpose as pe, Textarea as S } from "@burdenoff/fe-libs/ui";
14
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
3
+ import { Section as t, SectionStack as n } from "../components/common/Section.js";
4
+ import "../components/common/index.js";
5
+ import ee from "../hooks/useDataSinkOperations.js";
6
+ import { BIGCONSOLE_PERMISSIONS as r } from "../../constants/permissions.js";
7
+ import { isNative as te, nativeCopyText as ne, nativeToast as i } from "../../utils/nativeBridge.js";
8
+ import re from "../components/datasink/CacheTTLSelector.js";
9
+ import ie from "../components/datasink/RefreshTypeSelector.js";
10
+ import { memo as a, useCallback as o, useEffect as s, useMemo as ae, useState as c } from "react";
11
+ import { useParams as oe } from "react-router";
12
+ import { AccessDenied as se, PermissionButton as l } from "@burdenoff/fe-libs/shared/components";
13
+ import { usePermissions as u } from "@burdenoff/fe-libs/shared/providers/shell";
14
+ import { AlertCircle as d, ArrowLeft as f, Check as ce, Copy as le, Database as p, Eye as m, ListChecks as ue, Loader2 as h, Save as de, Settings as fe } from "lucide-react";
15
+ import { useI18n as g } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
+ import { Button as _, IllustratedEmptyState as v, Input as y, Label as b, PagePurpose as pe, Textarea as x } from "@burdenoff/fe-libs/ui";
17
+ import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
15
18
  //#region src/bigconsole/pages/DataSinkBuilderPage.tsx
16
19
  function me(e) {
17
20
  return e.toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").substring(0, 64);
18
21
  }
19
- function he(e) {
20
- let t = {};
21
- if (e.name.trim() ? e.name.length < 2 ? t.name = "Name must be at least 2 characters" : e.name.length > 100 && (t.name = "Name must be less than 100 characters") : t.name = "Name is required", e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (t.key = "Key must be less than 64 characters") : t.key = "Key can only contain lowercase letters, numbers, and underscores" : t.key = "Key is required", e.data && e.data.trim()) try {
22
+ function he(e, t) {
23
+ let n = {};
24
+ if (e.name.trim() ? e.name.length < 2 ? n.name = t("bigconsole.dataSinks.builder.validation.nameMinLength", "Name must be at least 2 characters") : e.name.length > 100 && (n.name = t("bigconsole.dataSinks.builder.validation.nameMaxLength", "Name must be less than 100 characters")) : n.name = t("bigconsole.dataSinks.builder.validation.nameRequired", "Name is required"), e.key.trim() ? /^[a-z0-9_]+$/.test(e.key) ? e.key.length > 64 && (n.key = t("bigconsole.dataSinks.builder.validation.keyMaxLength", "Key must be less than 64 characters")) : n.key = t("bigconsole.dataSinks.builder.validation.keyFormat", "Key can only contain lowercase letters, numbers, and underscores") : n.key = t("bigconsole.dataSinks.builder.validation.keyRequired", "Key is required"), e.data && e.data.trim()) try {
22
25
  JSON.parse(e.data);
23
26
  } catch {
24
- t.data = "Invalid JSON format";
27
+ n.data = t("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format");
25
28
  }
26
- return t;
29
+ return n;
27
30
  }
28
- var E = i(function() {
29
- let { dataSinkId: i } = c(), E = e(), D = i !== "new" && !!i, { hasPermission: ge, isLoading: _e } = ae(), ve = ge(n.DATASINK_READ), ye = D ? n.DATASINK_UPDATE : n.DATASINK_CREATE, [O, k] = s({
31
+ var T = a(function() {
32
+ let { dataSinkId: a } = oe(), T = e(), { t: E } = g(), D = a !== "new" && !!a, { hasPermission: ge, isLoading: _e } = u(), ve = ge(r.DATASINK_READ), ye = D ? r.DATASINK_UPDATE : r.DATASINK_CREATE, [O, k] = c({
30
33
  name: "",
31
34
  key: "",
32
35
  description: "",
33
36
  ttl: 300,
34
37
  refresh: { type: "manual" },
35
38
  data: "{}"
36
- }), [A, j] = s({}), [M, N] = s(!1), [P, F] = s(!1), [I, L] = s(null), [be, R] = s(!1), [z, B] = s(!1), [V, H] = s(null), [U, W] = s(null), { loading: xe, error: G, dataSinks: Se, fetchDataSink: K, createDataSink: q, updateDataSink: J, getDataSinkData: Y } = t({ skipFetch: !0 }), X = D ? Se.find((e) => e.id === i) : null;
37
- o(() => {
38
- D && i && !X && K(i);
39
+ }), [A, j] = c({}), [M, N] = c(!1), [P, F] = c(!1), [I, L] = c(null), [be, R] = c(!1), [z, B] = c(!1), [V, H] = c(null), [U, W] = c(null), { loading: xe, error: G, dataSinks: Se, fetchDataSink: K, createDataSink: q, updateDataSink: J, getDataSinkData: Y } = ee({ skipFetch: !0 }), X = D ? Se.find((e) => e.id === a) : null;
40
+ s(() => {
41
+ D && a && !X && K(a);
39
42
  }, [
40
43
  D,
41
- i,
44
+ a,
42
45
  X,
43
46
  K
44
47
  ]);
45
- let [Z, Ce] = s(!1);
46
- o(() => {
48
+ let [Z, Ce] = c(!1);
49
+ s(() => {
47
50
  if (X && !Z) {
48
51
  let e = "";
49
52
  if (X.data) try {
@@ -70,7 +73,7 @@ var E = i(function() {
70
73
  }), N(!0), Ce(!0), j({});
71
74
  }
72
75
  }, [X, Z]);
73
- let we = a((e) => {
76
+ let we = o((e) => {
74
77
  let t = e.target.value;
75
78
  k((e) => ({
76
79
  ...e,
@@ -80,7 +83,7 @@ var E = i(function() {
80
83
  ...e,
81
84
  name: void 0
82
85
  }));
83
- }, [M]), Te = a((e) => {
86
+ }, [M]), Te = o((e) => {
84
87
  let t = e.target.value.toLowerCase().replace(/[^a-z0-9_]/g, "");
85
88
  k((e) => ({
86
89
  ...e,
@@ -89,22 +92,22 @@ var E = i(function() {
89
92
  ...e,
90
93
  key: void 0
91
94
  }));
92
- }, []), Ee = a((e) => {
95
+ }, []), Ee = o((e) => {
93
96
  k((t) => ({
94
97
  ...t,
95
98
  description: e.target.value
96
99
  }));
97
- }, []), De = a((e) => {
100
+ }, []), De = o((e) => {
98
101
  k((t) => ({
99
102
  ...t,
100
103
  ttl: e || 0
101
104
  }));
102
- }, []), Oe = a((e) => {
105
+ }, []), Oe = o((e) => {
103
106
  k((t) => ({
104
107
  ...t,
105
108
  refresh: e
106
109
  }));
107
- }, []), Q = a((e) => {
110
+ }, []), Q = o((e) => {
108
111
  k((t) => ({
109
112
  ...t,
110
113
  data: e.target.value
@@ -112,7 +115,7 @@ var E = i(function() {
112
115
  ...e,
113
116
  data: void 0
114
117
  }));
115
- }, []), ke = a(() => {
118
+ }, []), ke = o(() => {
116
119
  try {
117
120
  let e = JSON.parse(O.data);
118
121
  k((t) => ({
@@ -125,21 +128,21 @@ var E = i(function() {
125
128
  } catch {
126
129
  j((e) => ({
127
130
  ...e,
128
- data: "Invalid JSON format"
131
+ data: E("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
129
132
  }));
130
133
  }
131
- }, [O.data]), Ae = a(async () => {
132
- O.key && (await te(O.key), R(!0), ee() && ne("Key copied"), setTimeout(() => R(!1), 2e3));
133
- }, [O.key]), $ = a(() => {
134
- E("/datasinks");
135
- }, [E]), je = a(async () => {
134
+ }, [O.data, E]), Ae = o(async () => {
135
+ O.key && (await ne(O.key), R(!0), te() && i(E("bigconsole.dataSinks.builder.toolbar.keyCopied", "Key copied")), setTimeout(() => R(!1), 2e3));
136
+ }, [O.key, E]), $ = o(() => {
137
+ T("/datasinks");
138
+ }, [T]), je = o(async () => {
136
139
  if (!(!D || !X)) {
137
140
  B(!0), W(null);
138
141
  try {
139
142
  let e = await Y({ key: X.key });
140
143
  e?.raw ? H(Array.isArray(e.raw) ? e.raw.slice(0, 20) : [e.raw]) : H([]);
141
144
  } catch (e) {
142
- W(e instanceof Error ? e.message : "Failed to load data");
145
+ W(e instanceof Error ? e.message : E("bigconsole.dataSinks.builder.errors.loadDataFailed", "Failed to load data"));
143
146
  } finally {
144
147
  B(!1);
145
148
  }
@@ -147,10 +150,11 @@ var E = i(function() {
147
150
  }, [
148
151
  D,
149
152
  X,
150
- Y
151
- ]), Me = a(async (e) => {
153
+ Y,
154
+ E
155
+ ]), Me = o(async (e) => {
152
156
  e.preventDefault(), L(null);
153
- let t = he(O);
157
+ let t = he(O, E);
154
158
  if (Object.keys(t).length > 0) {
155
159
  j(t);
156
160
  return;
@@ -163,7 +167,7 @@ var E = i(function() {
163
167
  } catch {
164
168
  j((e) => ({
165
169
  ...e,
166
- data: "Invalid JSON format"
170
+ data: E("bigconsole.dataSinks.builder.validation.invalidJson", "Invalid JSON format")
167
171
  })), F(!1);
168
172
  return;
169
173
  }
@@ -179,7 +183,7 @@ var E = i(function() {
179
183
  schedule: O.refresh.schedule
180
184
  },
181
185
  data: e
182
- })) throw Error("Failed to update DataSink");
186
+ })) throw Error(E("bigconsole.dataSinks.builder.errors.updateFailed", "Failed to update DataSink"));
183
187
  } else if (!await q({
184
188
  key: O.key,
185
189
  name: O.name,
@@ -190,10 +194,10 @@ var E = i(function() {
190
194
  schedule: O.refresh.schedule
191
195
  },
192
196
  data: e
193
- })) throw Error("Failed to create DataSink");
194
- E("/datasinks");
197
+ })) throw Error(E("bigconsole.dataSinks.builder.errors.createFailed", "Failed to create DataSink"));
198
+ T("/datasinks");
195
199
  } catch (e) {
196
- L(e instanceof Error ? e.message : "Failed to save DataSink");
200
+ L(e instanceof Error ? e.message : E("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"));
197
201
  } finally {
198
202
  F(!1);
199
203
  }
@@ -203,8 +207,9 @@ var E = i(function() {
203
207
  X,
204
208
  q,
205
209
  J,
210
+ T,
206
211
  E
207
- ]), Ne = ie(() => {
212
+ ]), Ne = ae(() => {
208
213
  let e = O.name.trim().length >= 2, t = O.key.trim().length > 0, n = !0;
209
214
  if (O.data && O.data.trim()) try {
210
215
  JSON.parse(O.data);
@@ -217,338 +222,308 @@ var E = i(function() {
217
222
  O.key,
218
223
  O.data
219
224
  ]);
220
- return xe && D ? /* @__PURE__ */ w("div", {
221
- className: "flex items-center justify-center min-h-[400px]",
222
- children: /* @__PURE__ */ w(m, { className: "w-8 h-8 text-text-secondary animate-spin" })
223
- }) : G ? /* @__PURE__ */ w("div", {
224
- className: "flex items-center justify-center min-h-[400px] p-card-padding",
225
- children: /* @__PURE__ */ T("div", {
226
- className: "text-center",
227
- children: [
228
- /* @__PURE__ */ w(d, { className: "w-12 h-12 text-status-error-text mx-auto mb-4" }),
229
- /* @__PURE__ */ w("p", {
230
- className: "text-status-error-text text-body-sm font-medium mb-2",
231
- children: "Failed to load DataSink"
232
- }),
233
- /* @__PURE__ */ w("p", {
234
- className: "text-text-tertiary text-body-xs",
235
- children: G.message
236
- })
237
- ]
225
+ return xe && D ? /* @__PURE__ */ C("div", {
226
+ className: "flex min-h-[240px] items-center justify-center p-card-padding",
227
+ children: /* @__PURE__ */ C(h, { className: "h-icon-lg w-icon-lg animate-spin text-text-secondary" })
228
+ }) : G ? /* @__PURE__ */ C("div", {
229
+ className: "mx-auto w-full max-w-3xl p-card-padding",
230
+ children: /* @__PURE__ */ C(t, {
231
+ tone: "danger",
232
+ headingLevel: 2,
233
+ title: E("bigconsole.dataSinks.builder.errors.loadFailed", "Failed to load DataSink"),
234
+ description: G.message,
235
+ icon: /* @__PURE__ */ C(d, { className: "h-icon-sm w-icon-sm" }),
236
+ actions: /* @__PURE__ */ w(_, {
237
+ onClick: $,
238
+ variant: "secondary",
239
+ size: "sm",
240
+ children: [/* @__PURE__ */ C(f, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
241
+ })
238
242
  })
239
- }) : D && !_e && !ve ? /* @__PURE__ */ w(l, {
240
- title: "Access Denied",
241
- description: "You don't have permission to view this data sink."
243
+ }) : D && !_e && !ve ? /* @__PURE__ */ C(se, {
244
+ title: E("bigconsole.dataSinks.builder.accessDenied.title", "Access Denied"),
245
+ description: E("bigconsole.dataSinks.builder.accessDenied.description", "You don't have permission to view this data sink.")
242
246
  }) : /* @__PURE__ */ w("div", {
243
- className: "min-h-screen bg-bg-canvas",
244
- children: /* @__PURE__ */ T("div", {
245
- className: "max-w-3xl mx-auto p-card-padding",
246
- children: [
247
- /* @__PURE__ */ T("div", {
248
- className: "mb-6",
249
- children: [
250
- /* @__PURE__ */ T(h, {
251
- onClick: $,
252
- variant: "ghost",
253
- size: "sm",
254
- className: "mb-4",
255
- children: [/* @__PURE__ */ w(oe, { className: "w-4 h-4 mr-2" }), "Back to DataSinks"]
256
- }),
257
- /* @__PURE__ */ w("h1", {
258
- className: "text-heading-h1 font-bold text-text-primary",
259
- children: D ? "Edit DataSink" : "Create DataSink"
260
- }),
261
- /* @__PURE__ */ w("p", {
262
- className: "text-body-sm text-text-secondary mt-1",
263
- children: D ? "Update the DataSink configuration." : "Create a new DataSink to store and cache data. Use the unique key to connect workflows."
264
- })
265
- ]
266
- }),
267
- I && /* @__PURE__ */ T("div", {
268
- className: "mb-6 p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-lg flex items-start gap-3",
269
- children: [/* @__PURE__ */ w(d, { className: "w-5 h-5 text-status-error-text flex-shrink-0 mt-0.5" }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
270
- className: "text-sm font-medium text-status-error-text",
271
- children: "Failed to save DataSink"
272
- }), /* @__PURE__ */ w("p", {
273
- className: "text-xs text-status-error-text/80 mt-1",
274
- children: I
275
- })] })]
276
- }),
277
- /* @__PURE__ */ w(pe, {
278
- className: "mb-6",
279
- children: "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it."
280
- }),
281
- /* @__PURE__ */ T("form", {
282
- onSubmit: Me,
283
- className: "space-y-6",
284
- children: [
285
- /* @__PURE__ */ T(de, {
286
- treatment: "glass",
287
- glow: !0,
288
- children: [/* @__PURE__ */ w(v, {
289
- className: "pb-4",
290
- children: /* @__PURE__ */ T("div", {
291
- className: "flex items-center gap-3",
292
- children: [/* @__PURE__ */ w("div", {
293
- className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
294
- children: /* @__PURE__ */ w(f, { className: "w-4 h-4 text-action-primary-bg" })
295
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
296
- className: "text-base",
297
- children: "Basic Information"
298
- }), /* @__PURE__ */ w("p", {
299
- className: "text-xs text-text-secondary mt-0.5",
300
- children: "Essential details for your DataSink"
301
- })] })]
302
- })
303
- }), /* @__PURE__ */ T(_, {
304
- className: "space-y-5",
247
+ className: "mx-auto w-full min-w-0 max-w-3xl p-card-padding",
248
+ children: [
249
+ /* @__PURE__ */ w("header", {
250
+ className: "mb-form-gap",
251
+ children: [
252
+ /* @__PURE__ */ w(_, {
253
+ onClick: $,
254
+ variant: "ghost",
255
+ size: "sm",
256
+ className: "mb-4",
257
+ children: [/* @__PURE__ */ C(f, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.header.backToDataSinks", "Back to DataSinks")]
258
+ }),
259
+ /* @__PURE__ */ C("h1", {
260
+ className: "text-2xl font-bold text-text-primary",
261
+ children: D ? E("bigconsole.dataSinks.builder.header.editTitle", "Edit DataSink") : E("bigconsole.dataSinks.builder.header.createTitle", "Create DataSink")
262
+ }),
263
+ /* @__PURE__ */ C("p", {
264
+ className: "mt-1 text-sm text-text-secondary",
265
+ children: D ? E("bigconsole.dataSinks.builder.header.editSubtitle", "Update the DataSink configuration.") : E("bigconsole.dataSinks.builder.header.createSubtitle", "Create a new DataSink to store and cache data. Use the unique key to connect workflows.")
266
+ })
267
+ ]
268
+ }),
269
+ /* @__PURE__ */ C(pe, {
270
+ className: "mb-section-gap",
271
+ children: E("bigconsole.dataSinks.builder.header.purpose", "A data sink is the named, structured store your dashboards read from. Give it a unique key, configure how long data is cached and how it refreshes, then point a workflow at that key to push data in. Get the basics right here and everything downstream connects to it.")
272
+ }),
273
+ I && /* @__PURE__ */ C(t, {
274
+ tone: "danger",
275
+ headingLevel: 2,
276
+ title: E("bigconsole.dataSinks.builder.errors.saveFailed", "Failed to save DataSink"),
277
+ description: I,
278
+ icon: /* @__PURE__ */ C(d, { className: "h-icon-sm w-icon-sm" }),
279
+ className: "mb-section-gap"
280
+ }),
281
+ /* @__PURE__ */ C("form", {
282
+ onSubmit: Me,
283
+ children: /* @__PURE__ */ w(n, { children: [
284
+ /* @__PURE__ */ C(t, {
285
+ emphasis: "primary",
286
+ headingLevel: 2,
287
+ title: E("bigconsole.dataSinks.builder.basicInfo.title", "Basic Information"),
288
+ description: E("bigconsole.dataSinks.builder.basicInfo.subtitle", "Essential details for your DataSink"),
289
+ icon: /* @__PURE__ */ C(p, { className: "h-icon-sm w-icon-sm" }),
290
+ bodyClassName: "space-y-form-gap",
291
+ children: /* @__PURE__ */ w(S, { children: [
292
+ /* @__PURE__ */ w("div", {
293
+ className: "space-y-2",
305
294
  children: [
306
- /* @__PURE__ */ T("div", {
307
- className: "space-y-2",
295
+ /* @__PURE__ */ w(b, {
296
+ htmlFor: "name",
308
297
  children: [
309
- /* @__PURE__ */ T(x, {
310
- htmlFor: "name",
311
- children: ["Name ", /* @__PURE__ */ w("span", {
312
- className: "text-status-error-text",
313
- children: "*"
314
- })]
315
- }),
316
- /* @__PURE__ */ w(b, {
317
- id: "name",
318
- type: "text",
319
- value: O.name,
320
- onChange: we,
321
- placeholder: "e.g., Sales Metrics",
322
- className: A.name ? "border-status-error-border" : ""
323
- }),
324
- A.name && /* @__PURE__ */ w("p", {
325
- className: "text-body-xs text-status-error-text",
326
- children: A.name
298
+ E("bigconsole.dataSinks.builder.basicInfo.nameLabel", "Name"),
299
+ " ",
300
+ /* @__PURE__ */ C("span", {
301
+ className: "text-status-error-text",
302
+ children: "*"
327
303
  })
328
304
  ]
329
305
  }),
330
- /* @__PURE__ */ T("div", {
331
- className: "space-y-2",
332
- children: [
333
- /* @__PURE__ */ T(x, {
334
- htmlFor: "key",
335
- children: ["Unique Key ", /* @__PURE__ */ w("span", {
336
- className: "text-status-error-text",
337
- children: "*"
338
- })]
339
- }),
340
- /* @__PURE__ */ T("div", {
341
- className: "flex gap-2",
342
- children: [/* @__PURE__ */ w(b, {
343
- id: "key",
344
- type: "text",
345
- value: O.key,
346
- onChange: Te,
347
- placeholder: "sales_metrics",
348
- disabled: D,
349
- className: `font-mono flex-1 ${A.key ? "border-status-error-border" : ""}`
350
- }), O.key && /* @__PURE__ */ w(h, {
351
- type: "button",
352
- onClick: Ae,
353
- variant: "outline",
354
- size: "sm",
355
- className: "px-3",
356
- children: be ? /* @__PURE__ */ w(se, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ w(ce, { className: "w-4 h-4" })
357
- })]
358
- }),
359
- A.key && /* @__PURE__ */ w("p", {
360
- className: "text-body-xs text-status-error-text",
361
- children: A.key
362
- }),
363
- /* @__PURE__ */ w("p", {
364
- className: "text-body-xs text-text-tertiary",
365
- children: D ? "Key cannot be changed. Use this key in your workflows to push data." : "Auto-generated from name. This key will be used by workflows to push data."
366
- })
367
- ]
306
+ /* @__PURE__ */ C(y, {
307
+ id: "name",
308
+ type: "text",
309
+ value: O.name,
310
+ onChange: we,
311
+ placeholder: E("bigconsole.dataSinks.builder.basicInfo.namePlaceholder", "e.g., Sales Metrics"),
312
+ className: A.name ? "border-status-error-border" : ""
368
313
  }),
369
- /* @__PURE__ */ T("div", {
370
- className: "space-y-2",
371
- children: [/* @__PURE__ */ w(x, {
372
- htmlFor: "description",
373
- children: "Description"
374
- }), /* @__PURE__ */ w(S, {
375
- id: "description",
376
- value: O.description,
377
- onChange: Ee,
378
- placeholder: "Describe what data this sink stores...",
379
- rows: 2,
380
- className: "resize-none"
381
- })]
314
+ A.name && /* @__PURE__ */ C("p", {
315
+ className: "text-xs text-status-error-text",
316
+ children: A.name
382
317
  })
383
318
  ]
384
- })]
385
- }),
386
- /* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
387
- className: "pb-4",
388
- children: /* @__PURE__ */ T("div", {
389
- className: "flex items-center gap-3",
390
- children: [/* @__PURE__ */ w("div", {
391
- className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
392
- children: /* @__PURE__ */ w(ue, { className: "w-4 h-4 text-action-primary-bg" })
393
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
394
- className: "text-base",
395
- children: "Configuration"
396
- }), /* @__PURE__ */ w("p", {
397
- className: "text-xs text-text-secondary mt-0.5",
398
- children: "Cache and refresh settings"
399
- })] })]
400
- })
401
- }), /* @__PURE__ */ T(_, {
402
- className: "space-y-5",
403
- children: [/* @__PURE__ */ T("div", {
319
+ }),
320
+ /* @__PURE__ */ w("div", {
404
321
  className: "space-y-2",
405
322
  children: [
406
- /* @__PURE__ */ w(x, { children: "Cache Duration" }),
407
- /* @__PURE__ */ w(r, {
408
- value: O.ttl,
409
- onChange: De
323
+ /* @__PURE__ */ w(b, {
324
+ htmlFor: "key",
325
+ children: [
326
+ E("bigconsole.dataSinks.builder.basicInfo.keyLabel", "Unique Key"),
327
+ " ",
328
+ /* @__PURE__ */ C("span", {
329
+ className: "text-status-error-text",
330
+ children: "*"
331
+ })
332
+ ]
410
333
  }),
411
- /* @__PURE__ */ w("p", {
412
- className: "text-body-xs text-text-tertiary",
413
- children: "How long cached data remains valid before requiring refresh."
334
+ /* @__PURE__ */ w("div", {
335
+ className: "flex gap-2",
336
+ children: [/* @__PURE__ */ C(y, {
337
+ id: "key",
338
+ type: "text",
339
+ value: O.key,
340
+ onChange: Te,
341
+ placeholder: E("bigconsole.dataSinks.builder.basicInfo.keyPlaceholder", "sales_metrics"),
342
+ disabled: D,
343
+ className: `font-mono flex-1 ${A.key ? "border-status-error-border" : ""}`
344
+ }), O.key && /* @__PURE__ */ C(_, {
345
+ type: "button",
346
+ onClick: Ae,
347
+ variant: "outline",
348
+ size: "sm",
349
+ className: "px-3",
350
+ children: be ? /* @__PURE__ */ C(ce, { className: "w-4 h-4 text-status-success-text" }) : /* @__PURE__ */ C(le, { className: "w-4 h-4" })
351
+ })]
352
+ }),
353
+ A.key && /* @__PURE__ */ C("p", {
354
+ className: "text-xs text-status-error-text",
355
+ children: A.key
356
+ }),
357
+ /* @__PURE__ */ C("p", {
358
+ className: "text-xs text-text-muted",
359
+ children: D ? E("bigconsole.dataSinks.builder.basicInfo.keyHelpEdit", "Key cannot be changed. Use this key in your workflows to push data.") : E("bigconsole.dataSinks.builder.basicInfo.keyHelpCreate", "Auto-generated from name. This key will be used by workflows to push data.")
414
360
  })
415
361
  ]
416
- }), /* @__PURE__ */ w(re, {
417
- value: O.refresh,
418
- onChange: Oe
419
- })]
420
- })] }),
421
- /* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
422
- className: "pb-4",
423
- children: /* @__PURE__ */ T("div", {
424
- className: "flex items-center justify-between",
425
- children: [/* @__PURE__ */ T("div", {
426
- className: "flex items-center gap-3",
427
- children: [/* @__PURE__ */ w("div", {
428
- className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
429
- children: /* @__PURE__ */ w(f, { className: "w-4 h-4 text-action-primary-bg" })
430
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
431
- className: "text-base",
432
- children: "Data Payload"
433
- }), /* @__PURE__ */ w("p", {
434
- className: "text-xs text-text-secondary mt-0.5",
435
- children: D ? "Edit the JSON data stored in this DataSink" : "Optional initial data (JSON format)"
436
- })] })]
437
- }), /* @__PURE__ */ w(h, {
438
- type: "button",
439
- onClick: ke,
440
- variant: "outline",
441
- size: "sm",
442
- children: "Format JSON"
362
+ }),
363
+ /* @__PURE__ */ w("div", {
364
+ className: "space-y-2",
365
+ children: [/* @__PURE__ */ C(b, {
366
+ htmlFor: "description",
367
+ children: E("bigconsole.dataSinks.builder.basicInfo.descriptionLabel", "Description")
368
+ }), /* @__PURE__ */ C(x, {
369
+ id: "description",
370
+ value: O.description,
371
+ onChange: Ee,
372
+ placeholder: E("bigconsole.dataSinks.builder.basicInfo.descriptionPlaceholder", "Describe what data this sink stores..."),
373
+ rows: 2,
374
+ className: "resize-none"
443
375
  })]
444
376
  })
445
- }), /* @__PURE__ */ w(_, { children: /* @__PURE__ */ T("div", {
377
+ ] })
378
+ }),
379
+ /* @__PURE__ */ C(t, {
380
+ headingLevel: 2,
381
+ title: E("bigconsole.dataSinks.builder.config.title", "Configuration"),
382
+ description: E("bigconsole.dataSinks.builder.config.subtitle", "Cache and refresh settings"),
383
+ icon: /* @__PURE__ */ C(fe, { className: "h-icon-sm w-icon-sm" }),
384
+ bodyClassName: "space-y-form-gap",
385
+ children: /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ w("div", {
446
386
  className: "space-y-2",
447
387
  children: [
448
- /* @__PURE__ */ w(S, {
449
- value: O.data,
450
- onChange: Q,
451
- placeholder: "{\"key\": \"value\"}",
452
- rows: 10,
453
- className: `font-mono text-xs resize-y ${A.data ? "border-status-error-border" : ""}`
454
- }),
455
- A.data && /* @__PURE__ */ w("p", {
456
- className: "text-body-xs text-status-error-text",
457
- children: A.data
388
+ /* @__PURE__ */ C(b, { children: E("bigconsole.dataSinks.builder.config.cacheDurationLabel", "Cache Duration") }),
389
+ /* @__PURE__ */ C(re, {
390
+ value: O.ttl,
391
+ onChange: De,
392
+ hideLabel: !0
458
393
  }),
459
- /* @__PURE__ */ w("p", {
460
- className: "text-body-xs text-text-tertiary",
461
- children: "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers."
394
+ /* @__PURE__ */ C("p", {
395
+ className: "text-xs text-text-muted",
396
+ children: E("bigconsole.dataSinks.builder.config.cacheDurationHelp", "How long cached data remains valid before requiring refresh.")
462
397
  })
463
398
  ]
464
- }) })] }),
465
- D && X && /* @__PURE__ */ T(g, { children: [/* @__PURE__ */ w(v, {
466
- className: "pb-4",
467
- children: /* @__PURE__ */ T("div", {
468
- className: "flex items-center justify-between",
469
- children: [/* @__PURE__ */ T("div", {
470
- className: "flex items-center gap-3",
471
- children: [/* @__PURE__ */ w("div", {
472
- className: "w-8 h-8 rounded-full bg-action-primary-bg/10 flex items-center justify-center",
473
- children: /* @__PURE__ */ w(p, { className: "w-4 h-4 text-action-primary-bg" })
474
- }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w(y, {
475
- className: "text-base",
476
- children: "Data Preview"
477
- }), /* @__PURE__ */ w("p", {
478
- className: "text-xs text-text-secondary mt-0.5",
479
- children: "Preview the first 20 records"
480
- })] })]
481
- }), /* @__PURE__ */ w(h, {
482
- type: "button",
483
- onClick: je,
484
- variant: "outline",
485
- size: "sm",
486
- disabled: z,
487
- children: z ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Loading..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(p, { className: "w-4 h-4 mr-2" }), "Show Data"] })
488
- })]
399
+ }), /* @__PURE__ */ C(ie, {
400
+ value: O.refresh,
401
+ onChange: Oe
402
+ })] })
403
+ }),
404
+ /* @__PURE__ */ C(t, {
405
+ headingLevel: 2,
406
+ title: E("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
407
+ description: D ? E("bigconsole.dataSinks.builder.dataPayload.subtitleEdit", "Edit the JSON data stored in this DataSink") : E("bigconsole.dataSinks.builder.dataPayload.subtitleCreate", "Optional initial data (JSON format)"),
408
+ icon: /* @__PURE__ */ C(p, { className: "h-icon-sm w-icon-sm" }),
409
+ actions: /* @__PURE__ */ C(_, {
410
+ type: "button",
411
+ onClick: ke,
412
+ variant: "outline",
413
+ size: "sm",
414
+ children: E("bigconsole.dataSinks.builder.dataPayload.formatJson", "Format JSON")
415
+ }),
416
+ bodyClassName: "space-y-2",
417
+ children: /* @__PURE__ */ w(S, { children: [
418
+ /* @__PURE__ */ C(x, {
419
+ "aria-label": E("bigconsole.dataSinks.builder.dataPayload.title", "Data Payload"),
420
+ value: O.data,
421
+ onChange: Q,
422
+ placeholder: E("bigconsole.dataSinks.builder.dataPayload.dataPlaceholder", "{\"key\": \"value\"}"),
423
+ rows: 10,
424
+ className: `resize-y font-mono text-xs ${A.data ? "border-status-error-border" : ""}`
425
+ }),
426
+ A.data && /* @__PURE__ */ C("p", {
427
+ className: "text-xs text-status-error-text",
428
+ children: A.data
429
+ }),
430
+ /* @__PURE__ */ C("p", {
431
+ className: "text-xs text-text-muted",
432
+ children: E("bigconsole.dataSinks.builder.dataPayload.help", "Enter valid JSON data. This data will be stored and can be accessed by widgets via parsers.")
489
433
  })
490
- }), (V || U) && /* @__PURE__ */ w(_, { children: U ? /* @__PURE__ */ w("div", {
491
- className: "p-4 bg-status-error-bg/10 border border-status-error-border/30 rounded-md",
492
- children: /* @__PURE__ */ w("p", {
434
+ ] })
435
+ }),
436
+ D && X && /* @__PURE__ */ C(t, {
437
+ emphasis: "muted",
438
+ headingLevel: 2,
439
+ title: E("bigconsole.dataSinks.builder.preview.title", "Data Preview"),
440
+ description: E("bigconsole.dataSinks.builder.preview.subtitle", "Preview the first 20 records"),
441
+ icon: /* @__PURE__ */ C(m, { className: "h-icon-sm w-icon-sm" }),
442
+ actions: /* @__PURE__ */ C(_, {
443
+ type: "button",
444
+ onClick: je,
445
+ variant: "outline",
446
+ size: "sm",
447
+ disabled: z,
448
+ children: z ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(h, { className: "w-4 h-4 mr-2 animate-spin" }), E("bigconsole.dataSinks.builder.preview.loading", "Loading...")] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(m, { className: "w-4 h-4 mr-2" }), E("bigconsole.dataSinks.builder.preview.showData", "Show Data")] })
449
+ }),
450
+ children: U ? /* @__PURE__ */ C(t, {
451
+ tone: "danger",
452
+ padding: "compact",
453
+ headingLevel: 3,
454
+ title: "Could not load the preview",
455
+ children: /* @__PURE__ */ C("p", {
493
456
  className: "text-sm text-status-error-text",
494
457
  children: U
495
458
  })
496
- }) : V && V.length > 0 ? /* @__PURE__ */ w("pre", {
497
- className: "p-4 bg-bg-sunken rounded-md overflow-auto max-h-[300px] text-xs font-mono",
459
+ }) : V && V.length > 0 ? /* @__PURE__ */ C("pre", {
460
+ className: "max-h-[300px] min-w-0 overflow-auto rounded-input bg-bg-surface p-3 font-mono text-xs",
498
461
  children: JSON.stringify(V, null, 2)
499
- }) : /* @__PURE__ */ w(fe, {
462
+ }) : V ? /* @__PURE__ */ C(v, {
500
463
  illustration: "empty-generic",
501
- title: "No data available yet",
502
- description: "Connect a workflow to this sink's key to start pushing data."
503
- }) })] }),
504
- /* @__PURE__ */ T("div", {
505
- className: "flex items-center justify-end gap-4 pt-4",
506
- children: [/* @__PURE__ */ w(h, {
507
- type: "button",
508
- onClick: $,
509
- variant: "secondary",
510
- children: "Cancel"
511
- }), /* @__PURE__ */ w(u, {
512
- permission: ye,
513
- deniedBehavior: "disable",
514
- children: /* @__PURE__ */ w(h, {
515
- type: "submit",
516
- disabled: !Ne || P,
517
- variant: "default",
518
- children: P ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(m, { className: "w-4 h-4 mr-2 animate-spin" }), "Saving..."] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(le, { className: "w-4 h-4 mr-2" }), D ? "Save Changes" : "Create DataSink"] })
519
- })
520
- })]
464
+ title: E("bigconsole.dataSinks.builder.preview.emptyTitle", "No data available yet"),
465
+ description: E("bigconsole.dataSinks.builder.preview.emptyDescription", "Connect a workflow to this sink's key to start pushing data.")
466
+ }) : /* @__PURE__ */ C("p", {
467
+ className: "text-sm text-text-secondary",
468
+ children: "Select \"Show data\" to load the records this sink currently holds."
521
469
  })
522
- ]
523
- }),
524
- !D && /* @__PURE__ */ T("div", {
525
- className: "mt-6 p-4 bg-bg-sunken rounded-lg border border-border-default",
526
- children: [/* @__PURE__ */ w("h3", {
527
- className: "text-sm font-medium text-text-primary mb-2",
528
- children: "What's Next?"
529
- }), /* @__PURE__ */ T("ol", {
530
- className: "list-decimal list-inside text-xs text-text-secondary space-y-1",
531
- children: [
532
- /* @__PURE__ */ w("li", { children: "Create this DataSink to get your unique key" }),
533
- /* @__PURE__ */ T("li", { children: [
534
- "Go to ",
535
- /* @__PURE__ */ w("strong", { children: "Workflows" }),
536
- " and create a FluidGrids workflow"
537
- ] }),
538
- /* @__PURE__ */ w("li", { children: "Use the unique key in your workflow to push data to this DataSink" }),
539
- /* @__PURE__ */ T("li", { children: [
540
- "Create ",
541
- /* @__PURE__ */ w("strong", { children: "Parsers" }),
542
- " to transform the data using JQ or JSONata"
543
- ] })
544
- ]
545
- })]
546
- })
547
- ]
548
- })
470
+ }),
471
+ !D && /* @__PURE__ */ C(t, {
472
+ tone: "info",
473
+ emphasis: "muted",
474
+ headingLevel: 2,
475
+ title: E("bigconsole.dataSinks.builder.whatsNext.title", "What's Next?"),
476
+ icon: /* @__PURE__ */ C(ue, { className: "h-icon-sm w-icon-sm" }),
477
+ children: /* @__PURE__ */ w("ol", {
478
+ className: "list-inside list-decimal space-y-1 text-xs text-text-secondary",
479
+ children: [
480
+ /* @__PURE__ */ C("li", { children: E("bigconsole.dataSinks.builder.whatsNext.step1", "Create this DataSink to get your unique key") }),
481
+ /* @__PURE__ */ w("li", { children: [
482
+ E("bigconsole.dataSinks.builder.whatsNext.step2Prefix", "Go to"),
483
+ " ",
484
+ /* @__PURE__ */ C("strong", { children: E("bigconsole.dataSinks.builder.whatsNext.workflows", "Workflows") }),
485
+ " ",
486
+ E("bigconsole.dataSinks.builder.whatsNext.step2Suffix", "and create a FluidGrids workflow")
487
+ ] }),
488
+ /* @__PURE__ */ C("li", { children: E("bigconsole.dataSinks.builder.whatsNext.step3", "Use the unique key in your workflow to push data to this DataSink") }),
489
+ /* @__PURE__ */ w("li", { children: [
490
+ E("bigconsole.dataSinks.builder.whatsNext.step4Prefix", "Create"),
491
+ " ",
492
+ /* @__PURE__ */ C("strong", { children: E("bigconsole.dataSinks.builder.whatsNext.parsers", "Parsers") }),
493
+ " ",
494
+ E("bigconsole.dataSinks.builder.whatsNext.step4Suffix", "to transform the data using JQ or JSONata")
495
+ ] })
496
+ ]
497
+ })
498
+ }),
499
+ /* @__PURE__ */ w(t, {
500
+ emphasis: "bare",
501
+ padding: "none",
502
+ "aria-label": "Save or discard this data sink",
503
+ className: "border-t border-[var(--color-border-subtle)] pt-form-gap",
504
+ bodyClassName: "flex flex-wrap items-center justify-end gap-control-gap",
505
+ children: [/* @__PURE__ */ C(_, {
506
+ type: "button",
507
+ onClick: $,
508
+ variant: "secondary",
509
+ children: E("bigconsole.dataSinks.builder.actions.cancel", "Cancel")
510
+ }), /* @__PURE__ */ C(l, {
511
+ permission: ye,
512
+ deniedBehavior: "disable",
513
+ children: /* @__PURE__ */ C(_, {
514
+ type: "submit",
515
+ disabled: !Ne || P,
516
+ variant: "default",
517
+ children: P ? /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(h, { className: "w-4 h-4 mr-2 animate-spin" }), E("bigconsole.dataSinks.builder.actions.saving", "Saving...")] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(de, { className: "w-4 h-4 mr-2" }), D ? E("bigconsole.dataSinks.builder.actions.saveChanges", "Save Changes") : E("bigconsole.dataSinks.builder.actions.create", "Create DataSink")] })
518
+ })
519
+ })]
520
+ })
521
+ ] })
522
+ })
523
+ ]
549
524
  });
550
525
  });
551
526
  //#endregion
552
- export { E as DataSinkBuilderPage, E as default };
527
+ export { T as DataSinkBuilderPage, T as default };
553
528
 
554
529
  //# sourceMappingURL=DataSinkBuilderPage.js.map