@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,94 +1,123 @@
1
1
  import { useWidgetStore as e } from "../../store/widgetStore.js";
2
2
  import "../../store/index.js";
3
- import { getWidgetDefinition as t } from "./WidgetRegistry.js";
4
- import n from "../../hooks/useWidgetOperations.js";
5
- import r from "../../hooks/useDrilldownOperations.js";
6
- import i from "../../hooks/useWidgetActions.js";
7
- import a from "../../hooks/useEventWebhooks.js";
8
- import o from "../../hooks/useDataSinkOperations.js";
9
- import s from "../../hooks/useParserOperations.js";
3
+ import { Section as t, SectionStack as n } from "../common/Section.js";
4
+ import "../common/index.js";
5
+ import { getWidgetDefinition as r } from "./WidgetRegistry.js";
6
+ import i from "../../hooks/useWidgetOperations.js";
7
+ import a from "../../hooks/useDrilldownOperations.js";
8
+ import o from "../../hooks/useWidgetActions.js";
9
+ import s from "../../hooks/useEventWebhooks.js";
10
+ import c from "../../hooks/useDataSinkOperations.js";
11
+ import ee from "../../hooks/useParserOperations.js";
10
12
  import "../../hooks/index.js";
11
- import { getWidgetBinding as c, getWidgetBindingStatus as ee, reconcilePanelConfig as te, serializeWidgetBinding as ne } from "../../utils/widgetBinding.js";
12
- import re from "./ActionConfigDialog.js";
13
- import ie from "./webhook-config/WebhookConfigPanel.js";
13
+ import { getWidgetBinding as l, getWidgetBindingStatus as te, reconcilePanelConfig as ne, serializeWidgetBinding as re } from "../../utils/widgetBinding.js";
14
+ import ie from "./ActionConfigDialog.js";
15
+ import ae from "./webhook-config/WebhookConfigPanel.js";
14
16
  import "./webhook-config/index.js";
15
- import ae from "./event-logs/EventLogViewer.js";
17
+ import oe from "./event-logs/EventLogViewer.js";
16
18
  import "./event-logs/index.js";
17
- import oe from "./DrilldownConfigPanel.js";
18
- import { AdvancedSection as se } from "../builder/inspector/AdvancedSection.js";
19
- import { AppearanceSection as ce } from "../builder/inspector/AppearanceSection.js";
20
- import { GeneralSection as le } from "../builder/inspector/GeneralSection.js";
21
- import { DataBindingSection as ue } from "../builder/inspector/DataBindingSection.js";
19
+ import se from "./DrilldownConfigPanel.js";
20
+ import { AdvancedSection as ce } from "../builder/inspector/AdvancedSection.js";
21
+ import { AppearanceSection as le } from "../builder/inspector/AppearanceSection.js";
22
+ import { GeneralSection as ue } from "../builder/inspector/GeneralSection.js";
23
+ import { DataBindingSection as de } from "../builder/inspector/DataBindingSection.js";
22
24
  import "../builder/inspector/index.js";
23
- import { memo as l, useCallback as u, useEffect as d, useMemo as de, useRef as fe, useState as f } from "react";
24
- import { Check as p, ChevronDown as pe, ChevronUp as me, ExternalLink as m, Info as h, Pencil as he, Plus as ge, Trash2 as _e, X as ve } from "lucide-react";
25
- import { Button as g, Card as ye, CardContent as be, Input as _, Label as v, Select as xe, SelectContent as Se, SelectItem as y, SelectTrigger as b, SelectValue as x, Sheet as Ce, SheetContent as we, SheetDescription as Te, SheetHeader as Ee, SheetTitle as De, Spinner as Oe, Tabs as ke, TabsContent as S, TabsList as Ae, TabsTrigger as C, Textarea as w } from "@burdenoff/fe-libs/ui";
26
- import { Fragment as je, jsx as T, jsxs as E } from "react/jsx-runtime";
25
+ import { memo as fe, useCallback as u, useEffect as d, useMemo as f, useRef as pe, useState as p } from "react";
26
+ import { Check as m, ChevronDown as me, ChevronUp as he, ExternalLink as ge, Info as _e, Pencil as ve, Plus as ye, Trash2 as be, X as xe } from "lucide-react";
27
+ import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
28
+ import { Button as h, Card as Ce, CardContent as we, Input as g, Label as _, Select as Te, SelectContent as Ee, SelectItem as v, SelectTrigger as De, SelectValue as Oe, Sheet as ke, SheetContent as Ae, SheetDescription as je, SheetHeader as Me, SheetTitle as Ne, Spinner as Pe, Tabs as Fe, TabsContent as y, TabsList as Ie, TabsTrigger as b, Textarea as x } from "@burdenoff/fe-libs/ui";
29
+ import { jsx as S, jsxs as C } from "react/jsx-runtime";
27
30
  //#region src/bigconsole/components/widgets/PropertiesPanel.tsx
28
- var Me = [
31
+ var Le = [
29
32
  {
30
33
  value: "BIGCONSOLE",
34
+ labelKey: "bigconsole.widget.properties.renderer.bigconsole.label",
31
35
  label: "BigConsole Native",
36
+ descriptionKey: "bigconsole.widget.properties.renderer.bigconsole.description",
32
37
  description: "Full-featured native widgets"
33
38
  },
34
39
  {
35
40
  value: "ADAPTIVE_CARD",
41
+ labelKey: "bigconsole.widget.properties.renderer.adaptiveCard.label",
36
42
  label: "Adaptive Cards",
43
+ descriptionKey: "bigconsole.widget.properties.renderer.adaptiveCard.description",
37
44
  description: "Microsoft Teams/Outlook format"
38
45
  },
39
46
  {
40
47
  value: "BLOCKKIT",
48
+ labelKey: "bigconsole.widget.properties.renderer.blockKit.label",
41
49
  label: "Block Kit",
50
+ descriptionKey: "bigconsole.widget.properties.renderer.blockKit.description",
42
51
  description: "Slack format"
43
52
  },
44
53
  {
45
54
  value: "CUSTOM",
55
+ labelKey: "bigconsole.widget.properties.renderer.custom.label",
46
56
  label: "Custom",
57
+ descriptionKey: "bigconsole.widget.properties.renderer.custom.description",
47
58
  description: "Custom React component"
48
59
  }
49
- ], Ne = [
60
+ ], Re = [
50
61
  {
51
62
  value: "DATASINK",
63
+ labelKey: "bigconsole.widget.properties.dataSourceType.datasink.label",
52
64
  label: "DataSink",
65
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.datasink.description",
53
66
  description: "Use data from BigConsole DataSinks"
54
67
  },
55
68
  {
56
69
  value: "REST_API",
70
+ labelKey: "bigconsole.widget.properties.dataSourceType.restApi.label",
57
71
  label: "REST API",
72
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.restApi.description",
58
73
  description: "Fetch data from REST endpoints"
59
74
  },
60
75
  {
61
76
  value: "GRAPHQL",
77
+ labelKey: "bigconsole.widget.properties.dataSourceType.graphql.label",
62
78
  label: "GraphQL",
79
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.graphql.description",
63
80
  description: "Query data using GraphQL"
64
81
  },
65
82
  {
66
83
  value: "SQL",
84
+ labelKey: "bigconsole.widget.properties.dataSourceType.sql.label",
67
85
  label: "SQL Database",
86
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.sql.description",
68
87
  description: "Query SQL databases directly"
69
88
  },
70
89
  {
71
90
  value: "WEBSOCKET",
91
+ labelKey: "bigconsole.widget.properties.dataSourceType.websocket.label",
72
92
  label: "WebSocket",
93
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.websocket.description",
73
94
  description: "Real-time data streaming"
74
95
  },
75
96
  {
76
97
  value: "MOCK",
98
+ labelKey: "bigconsole.widget.properties.dataSourceType.mock.label",
77
99
  label: "Sample JSON",
100
+ descriptionKey: "bigconsole.widget.properties.dataSourceType.mock.description",
78
101
  description: "Manually enter sample JSON data"
79
102
  }
80
103
  ];
81
- function Pe(e) {
104
+ function ze(e) {
82
105
  return `widget:${e.toLowerCase().replace(/\s+/g, "_")}:clicked`;
83
106
  }
84
- var Fe = {
85
- PRIMARY: "bg-action-primary",
86
- SECONDARY: "bg-muted-foreground",
107
+ var Be = {
108
+ PRIMARY: "bg-action-primary-bg",
109
+ SECONDARY: "bg-[var(--color-text-muted)]",
87
110
  SUCCESS: "bg-status-success-bg",
88
111
  WARNING: "bg-status-warning-bg",
89
112
  DANGER: "bg-status-error-bg"
113
+ }, Ve = "bg-[var(--color-text-muted)]", w = {
114
+ fontWeight: "var(--font-weight-semibold)",
115
+ fontSize: "var(--font-size-body-sm)",
116
+ padding: "6px 10px",
117
+ minHeight: "var(--size-controlHeight-md)",
118
+ flexShrink: 0
90
119
  };
91
- function Ie(e) {
120
+ function He(e) {
92
121
  if (!e) return {};
93
122
  let t = Array.isArray(e) ? e[0] : e;
94
123
  if (!t || typeof t != "object") return {};
@@ -132,75 +161,60 @@ function Ie(e) {
132
161
  xAxisField: a
133
162
  };
134
163
  }
135
- var Le = l(function({ widget: e, onSave: t }) {
136
- let [n, r] = f(""), [i, a] = f(null), o = fe(!1);
164
+ var Ue = fe(function({ widget: e, onSave: n }) {
165
+ let { t: r } = Se(), [i, a] = p(""), [o, s] = p(null), c = pe(!1);
137
166
  d(() => {
138
167
  try {
139
- r(e.template && typeof e.template == "object" ? JSON.stringify(e.template, null, 2) : ""), a(null), o.current = !0;
168
+ a(e.template && typeof e.template == "object" ? JSON.stringify(e.template, null, 2) : ""), s(null), c.current = !0;
140
169
  } catch {
141
- r("");
170
+ a("");
142
171
  }
143
172
  }, [e.id, e.template]);
144
- let s = u((e) => {
145
- let n = e.target.value;
146
- if (r(n), n.trim() === "") a(null), t({});
173
+ let ee = u((e) => {
174
+ let t = e.target.value;
175
+ if (a(t), t.trim() === "") s(null), n({});
147
176
  else try {
148
- let e = JSON.parse(n);
149
- a(null), t(e);
177
+ let e = JSON.parse(t);
178
+ s(null), n(e);
150
179
  } catch (e) {
151
- a(e.message);
180
+ s(e.message);
152
181
  }
153
- }, [t]), c = u(() => {
182
+ }, [n]), l = u(() => {
154
183
  try {
155
- let e = JSON.parse(n);
156
- r(JSON.stringify(e, null, 2)), a(null), t(e);
184
+ let e = JSON.parse(i);
185
+ a(JSON.stringify(e, null, 2)), s(null), n(e);
157
186
  } catch (e) {
158
- a(e.message);
187
+ s(e.message);
159
188
  }
160
- }, [n, t]);
161
- return /* @__PURE__ */ E("div", {
162
- style: {
163
- paddingTop: "var(--space-formGap)",
164
- borderTop: "1px solid var(--color-border)"
165
- },
189
+ }, [i, n]);
190
+ return /* @__PURE__ */ C(t, {
191
+ emphasis: "muted",
192
+ padding: "compact",
193
+ headingLevel: 4,
194
+ title: r("bigconsole.widget.properties.template.label", "Template (JSON)"),
195
+ description: `The ${e.renderer} payload this widget renders.`,
196
+ tone: o ? "danger" : "neutral",
197
+ meta: o ? /* @__PURE__ */ S("span", {
198
+ className: "text-xs font-medium text-[var(--color-status-error-text)]",
199
+ children: r("bigconsole.widget.properties.template.invalidJson", "Invalid JSON")
200
+ }) : void 0,
201
+ className: "mt-form-gap",
202
+ "data-testid": "widget-inspector-template",
166
203
  children: [
167
- /* @__PURE__ */ E("div", {
168
- style: {
169
- display: "flex",
170
- alignItems: "center",
171
- justifyContent: "space-between",
172
- marginBottom: "var(--space-controlGap)"
173
- },
174
- children: [/* @__PURE__ */ T("label", {
175
- style: {
176
- fontSize: "var(--font-size-body-sm)",
177
- fontWeight: "var(--font-weight-semibold)",
178
- color: "var(--color-text-primary)"
179
- },
180
- children: "Template (JSON)"
181
- }), i && /* @__PURE__ */ T("span", {
182
- style: {
183
- fontSize: "var(--font-size-body-sm)",
184
- color: "var(--color-status-error-text)",
185
- fontWeight: "var(--font-weight-medium)"
186
- },
187
- children: "Invalid JSON"
188
- })]
189
- }),
190
- /* @__PURE__ */ T(w, {
191
- value: n,
192
- onChange: s,
204
+ /* @__PURE__ */ S(x, {
205
+ value: i,
206
+ onChange: ee,
193
207
  spellCheck: !1,
194
- placeholder: `Enter ${e.renderer} template JSON...`,
208
+ placeholder: r("bigconsole.widget.properties.template.placeholder", "Enter {{renderer}} template JSON...", { renderer: e.renderer ?? "" }),
195
209
  style: {
196
210
  fontFamily: "var(--font-family-mono)",
197
211
  fontSize: "var(--font-size-body-sm)",
198
212
  minHeight: "180px",
199
- borderColor: i ? "var(--color-status-error-border)" : void 0,
213
+ borderColor: o ? "var(--color-status-error-border)" : void 0,
200
214
  resize: "vertical"
201
215
  }
202
216
  }),
203
- i && /* @__PURE__ */ T("p", {
217
+ o && /* @__PURE__ */ S("p", {
204
218
  style: {
205
219
  fontSize: "var(--font-size-body-sm)",
206
220
  color: "var(--color-status-error-text)",
@@ -209,26 +223,21 @@ var Le = l(function({ widget: e, onSave: t }) {
209
223
  borderRadius: "var(--radius-button)",
210
224
  marginTop: "var(--space-controlGap)"
211
225
  },
212
- children: i
226
+ children: o
213
227
  }),
214
- /* @__PURE__ */ E("div", {
215
- style: {
216
- display: "flex",
217
- alignItems: "center",
218
- gap: "var(--space-controlGap)",
219
- marginTop: "var(--space-controlGap)"
220
- },
221
- children: [/* @__PURE__ */ T(g, {
228
+ /* @__PURE__ */ C("div", {
229
+ className: "mt-control-gap flex flex-wrap items-center gap-control-gap",
230
+ children: [/* @__PURE__ */ S(h, {
222
231
  variant: "outline",
223
232
  size: "sm",
224
- onClick: c,
225
- disabled: !!i || n.trim() === "",
233
+ onClick: l,
234
+ disabled: !!o || i.trim() === "",
226
235
  style: {
227
236
  height: "var(--size-controlHeight-sm)",
228
237
  fontWeight: "var(--font-weight-semibold)"
229
238
  },
230
- children: "Format"
231
- }), !i && n.trim() !== "" && /* @__PURE__ */ E("span", {
239
+ children: r("bigconsole.widget.properties.template.format", "Format")
240
+ }), !o && i.trim() !== "" && /* @__PURE__ */ C("span", {
232
241
  style: {
233
242
  fontSize: "var(--font-size-body-sm)",
234
243
  color: "var(--color-status-success-text)",
@@ -236,29 +245,20 @@ var Le = l(function({ widget: e, onSave: t }) {
236
245
  alignItems: "center",
237
246
  gap: "4px"
238
247
  },
239
- children: [/* @__PURE__ */ T(p, { style: {
248
+ children: [/* @__PURE__ */ S(m, { style: {
240
249
  width: "12px",
241
250
  height: "12px"
242
- } }), "Valid JSON"]
251
+ } }), r("bigconsole.widget.properties.template.validJson", "Valid JSON")]
243
252
  })]
244
253
  }),
245
- /* @__PURE__ */ E("div", {
246
- style: {
247
- display: "flex",
248
- alignItems: "center",
249
- justifyContent: "space-between",
250
- fontSize: "var(--font-size-body-sm)",
251
- color: "var(--color-text-muted)",
252
- marginTop: "var(--space-controlGap)",
253
- paddingTop: "var(--space-controlGap)",
254
- borderTop: "1px solid var(--color-border)"
255
- },
254
+ /* @__PURE__ */ C("div", {
255
+ className: "mt-control-gap flex flex-wrap items-center justify-between gap-x-4 gap-y-1 border-t border-[var(--color-border-subtle)] pt-control-gap text-xs text-text-muted",
256
256
  children: [
257
- /* @__PURE__ */ T("span", {
258
- style: { fontWeight: "var(--font-weight-medium)" },
259
- children: "Ctrl+S to save"
257
+ /* @__PURE__ */ S("span", {
258
+ className: "font-medium",
259
+ children: r("bigconsole.widget.properties.template.ctrlSToSave", "Ctrl+S to save")
260
260
  }),
261
- e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */ E("a", {
261
+ e.renderer === "ADAPTIVE_CARD" && /* @__PURE__ */ C("a", {
262
262
  href: "https://adaptivecards.io/designer/",
263
263
  target: "_blank",
264
264
  rel: "noopener noreferrer",
@@ -271,12 +271,12 @@ var Le = l(function({ widget: e, onSave: t }) {
271
271
  fontWeight: "var(--font-weight-medium)",
272
272
  textDecoration: "none"
273
273
  },
274
- children: ["Designer", /* @__PURE__ */ T(m, { style: {
274
+ children: [r("bigconsole.widget.properties.template.designer", "Designer"), /* @__PURE__ */ S(ge, { style: {
275
275
  height: "var(--size-icon-sm)",
276
276
  width: "var(--size-icon-sm)"
277
277
  } })]
278
278
  }),
279
- e.renderer === "BLOCKKIT" && /* @__PURE__ */ E("a", {
279
+ e.renderer === "BLOCKKIT" && /* @__PURE__ */ C("a", {
280
280
  href: "https://app.slack.com/block-kit-builder",
281
281
  target: "_blank",
282
282
  rel: "noopener noreferrer",
@@ -289,7 +289,7 @@ var Le = l(function({ widget: e, onSave: t }) {
289
289
  fontWeight: "var(--font-weight-medium)",
290
290
  textDecoration: "none"
291
291
  },
292
- children: ["Block Kit Builder", /* @__PURE__ */ T(m, { style: {
292
+ children: [r("bigconsole.widget.properties.template.blockKitBuilder", "Block Kit Builder"), /* @__PURE__ */ S(ge, { style: {
293
293
  height: "var(--size-icon-sm)",
294
294
  width: "var(--size-icon-sm)"
295
295
  } })]
@@ -299,8 +299,8 @@ var Le = l(function({ widget: e, onSave: t }) {
299
299
  ]
300
300
  });
301
301
  });
302
- function Re(e) {
303
- let t = e, n = c({
302
+ function We(e) {
303
+ let t = e, n = l({
304
304
  dataSinkId: t.dataSinkId,
305
305
  parserId: t.parserId,
306
306
  config: e.config || {}
@@ -327,252 +327,255 @@ function Re(e) {
327
327
  } : void 0
328
328
  };
329
329
  }
330
- var ze = l(function({ isOpen: l, onClose: m }) {
331
- let [ze, Be] = f("general"), [D, O] = f("idle"), [k, A] = f(null), [j, M] = f(!1), N = e((e) => e.selectedWidgetId), Ve = e((e) => e.widgets), P = e((e) => e.updateWidget), F = N ? Ve.get(N) : void 0, I = fe(null), He = fe({});
330
+ var T = fe(function({ isOpen: fe, onClose: ge }) {
331
+ let { t: T } = Se(), [Ge, Ke] = p("general"), [E, D] = p("idle"), [O, k] = p(null), [A, j] = p(!1), M = e((e) => e.selectedWidgetId), qe = e((e) => e.widgets), N = e((e) => e.updateWidget), P = M ? qe.get(M) : void 0, F = pe(null), I = pe({});
332
332
  d(() => {
333
- if (!N) {
334
- I.current = null, A(null), M(!1), O("idle");
333
+ if (!M) {
334
+ F.current = null, k(null), j(!1), D("idle");
335
335
  return;
336
336
  }
337
- let e = I.current !== N;
338
- if (I.current = N, F) {
339
- if (j && !e) return;
340
- A(Re(F)), He.current = F.config || {}, M(!1), O("idle");
341
- } else A(null), M(!1), O("idle");
337
+ let e = F.current !== M;
338
+ if (F.current = M, P) {
339
+ if (A && !e) return;
340
+ k(We(P)), I.current = P.config || {}, j(!1), D("idle");
341
+ } else k(null), j(!1), D("idle");
342
342
  }, [
343
- N,
344
- F,
345
- j
343
+ M,
344
+ P,
345
+ A
346
346
  ]);
347
- let { updateWidget: Ue } = n(F?.pageId, F?.dashboardId, { skipFetch: !0 }), { createDrilldown: We, updateDrilldown: Ge, deleteDrilldown: Ke } = r(), { dataSinks: L } = o({ skipFetch: !1 }), [qe, Je] = f(null), { executeParser: Ye } = s({
348
- consoleId: F?.dashboardId,
347
+ let { updateWidget: Je } = i(P?.pageId, P?.dashboardId, { skipFetch: !0 }), { createDrilldown: Ye, updateDrilldown: Xe, deleteDrilldown: Ze } = a(), { dataSinks: L } = c({ skipFetch: !1 }), [Qe, R] = p(null), { executeParser: $e } = ee({
348
+ consoleId: P?.dashboardId,
349
349
  skipFetch: !0
350
- }), [Xe, Ze] = f(!1), [Qe, R] = f(void 0), [$e, z] = f(!1), [et, B] = f(null);
350
+ }), [et, tt] = p(!1), [nt, z] = p(void 0), [rt, B] = p(!1), [it, V] = p(null);
351
351
  d(() => {
352
- R(void 0), z(!1), B(null), Ze(!1);
353
- }, [N]);
354
- let { actions: V, loading: H, createAction: tt, updateAction: nt, deleteAction: rt, reorderActions: U } = i(N || void 0), { webhooks: it, loading: at, createWebhook: ot, updateWebhook: st, deleteWebhook: W, refetch: ct } = a({
355
- widgetId: N || void 0,
356
- skipFetch: !N
352
+ z(void 0), B(!1), V(null), tt(!1);
353
+ }, [M]);
354
+ let { actions: H, loading: at, createAction: ot, updateAction: st, deleteAction: ct, reorderActions: U } = o(M || void 0), { webhooks: lt, loading: ut, createWebhook: dt, updateWebhook: ft, deleteWebhook: W, refetch: pt } = s({
355
+ widgetId: M || void 0,
356
+ skipFetch: !M
357
357
  }), G = u((e, t) => {
358
- let n = Pe(t);
359
- return e.find((e) => e.widgetId === N && e.eventPattern === n) ?? null;
360
- }, [N]), K = u((e) => G(it, e), [G, it]), lt = u(async (e, t) => {
361
- if (!N || t === void 0) return !0;
362
- let n = Pe(e), r = K(e);
363
- return !r && at && (r = G((await ct())?.data?.listEventWebhookMappings ?? [], e)), t && t.url ? r ? await st({
358
+ let n = ze(t);
359
+ return e.find((e) => e.widgetId === M && e.eventPattern === n) ?? null;
360
+ }, [M]), K = u((e) => G(lt, e), [G, lt]), mt = u(async (e, t) => {
361
+ if (!M || t === void 0) return !0;
362
+ let n = ze(e), r = K(e);
363
+ return !r && ut && (r = G((await pt())?.data?.listEventWebhookMappings ?? [], e)), t && t.url ? r ? await ft({
364
364
  id: r.id,
365
365
  eventPattern: n,
366
366
  webhookUrl: t.url,
367
367
  method: t.method,
368
368
  isActive: !0
369
- }) !== null : await ot({
370
- widgetId: N,
369
+ }) !== null : await dt({
370
+ widgetId: M,
371
371
  eventPattern: n,
372
372
  webhookUrl: t.url,
373
373
  method: t.method
374
374
  }) !== null : t === null && r ? W(r.id) : !0;
375
375
  }, [
376
- N,
376
+ M,
377
377
  K,
378
- at,
379
- ct,
378
+ ut,
379
+ pt,
380
380
  G,
381
- ot,
382
- st,
381
+ dt,
382
+ ft,
383
383
  W
384
- ]), [ut, q] = f(!1), [J, Y] = f(void 0), [dt, ft] = f(!1), [pt, X] = f(void 0), [mt, Z] = f(null), ht = de(() => {
384
+ ]), [ht, q] = p(!1), [J, Y] = p(void 0), [gt, _t] = p(!1), [vt, X] = p(void 0), [yt, Z] = p(null), bt = f(() => {
385
385
  if (!J) return null;
386
386
  let e = K(J.name);
387
387
  return e ? {
388
388
  url: e.webhookUrl,
389
389
  method: e.method
390
390
  } : null;
391
- }, [J, K]), gt = pt === void 0 ? ht : pt, _t = de(() => {
391
+ }, [J, K]), xt = vt === void 0 ? bt : vt, St = f(() => {
392
392
  let e = /* @__PURE__ */ new Map();
393
- for (let t of V) {
393
+ for (let t of H) {
394
394
  let n = K(t.name);
395
395
  n && e.set(t.name, n);
396
396
  }
397
397
  return e;
398
- }, [V, K]), vt = u(() => {
398
+ }, [H, K]), Ct = u(() => {
399
399
  X(void 0), Z(null), Y(void 0), q(!0);
400
- }, []), yt = u((e) => {
400
+ }, []), wt = u((e) => {
401
401
  X(void 0), Z(null), Y(e), q(!0);
402
- }, []), bt = u(async (e, t) => {
403
- if (N) {
404
- ft(!0), Z(null);
402
+ }, []), Tt = u(async (e, t) => {
403
+ if (M) {
404
+ _t(!0), Z(null);
405
405
  try {
406
406
  let n = "id" in e && !!e.id, r = null;
407
- if (r = n ? await nt(e) : await tt(e), r) {
408
- let e = [...V];
407
+ if (r = n ? await st(e) : await ot(e), r) {
408
+ let e = [...H];
409
409
  if (n) {
410
410
  let t = e.findIndex((e) => e.id === r?.id);
411
411
  t >= 0 && (e[t] = r);
412
412
  } else e.push(r);
413
- if (P(N, { actions: e.sort((e, t) => e.order - t.order) }), !await lt(r.name, t)) {
414
- X(t), Z(t ? "The button was saved, but its webhook could not be saved. Check the URL and try again." : "The button was saved, but its old webhook could not be removed. Try again."), Y(r);
413
+ if (N(M, { actions: e.sort((e, t) => e.order - t.order) }), !await mt(r.name, t)) {
414
+ X(t), Z(t ? T("bigconsole.widget.properties.action.webhookSaveFailed", "The button was saved, but its webhook could not be saved. Check the URL and try again.") : T("bigconsole.widget.properties.action.webhookRemoveFailed", "The button was saved, but its old webhook could not be removed. Try again.")), Y(r);
415
415
  return;
416
416
  }
417
417
  X(void 0), Z(null), q(!1), Y(void 0);
418
418
  }
419
419
  } catch (e) {
420
- console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message : "Could not save the button. Please try again.");
420
+ console.warn("Failed to save widget action:", e), Z(e instanceof Error ? e.message : T("bigconsole.widget.properties.action.saveFailed", "Could not save the button. Please try again."));
421
421
  } finally {
422
- ft(!1);
422
+ _t(!1);
423
423
  }
424
424
  }
425
425
  }, [
426
+ M,
427
+ H,
428
+ ot,
429
+ st,
426
430
  N,
427
- V,
428
- tt,
429
- nt,
430
- P,
431
- lt
432
- ]), xt = u(async (e) => {
433
- if (N && window.confirm("Are you sure you want to delete this action?")) {
434
- let t = V.find((t) => t.id === e);
435
- if (await rt(e) && (P(N, { actions: V.filter((t) => t.id !== e) }), t)) {
431
+ mt,
432
+ T
433
+ ]), Et = u(async (e) => {
434
+ if (M && window.confirm(T("bigconsole.widget.properties.action.deleteConfirm", "Are you sure you want to delete this action?"))) {
435
+ let t = H.find((t) => t.id === e);
436
+ if (await ct(e) && (N(M, { actions: H.filter((t) => t.id !== e) }), t)) {
436
437
  let e = K(t.name);
437
438
  e && await W(e.id);
438
439
  }
439
440
  }
440
441
  }, [
442
+ M,
443
+ H,
444
+ ct,
441
445
  N,
442
- V,
443
- rt,
444
- P,
445
446
  K,
446
- W
447
- ]), St = u(async (e) => {
448
- if (!N || e === 0) return;
449
- let t = [...V].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
450
- [n[e - 1], n[e]] = [n[e], n[e - 1]], await U(n) && P(N, { actions: t.map((e, t) => ({
447
+ W,
448
+ T
449
+ ]), Dt = u(async (e) => {
450
+ if (!M || e === 0) return;
451
+ let t = [...H].sort((e, t) => e.order - t.order), n = t.map((e) => e.id);
452
+ [n[e - 1], n[e]] = [n[e], n[e - 1]], await U(n) && N(M, { actions: t.map((e, t) => ({
451
453
  ...e,
452
454
  order: n.indexOf(e.id)
453
455
  })).sort((e, t) => e.order - t.order) });
454
456
  }, [
455
- N,
456
- V,
457
+ M,
458
+ H,
457
459
  U,
458
- P
459
- ]), Ct = u(async (e) => {
460
- if (!N) return;
461
- let t = [...V].sort((e, t) => e.order - t.order);
460
+ N
461
+ ]), Ot = u(async (e) => {
462
+ if (!M) return;
463
+ let t = [...H].sort((e, t) => e.order - t.order);
462
464
  if (e === t.length - 1) return;
463
465
  let n = t.map((e) => e.id);
464
- [n[e], n[e + 1]] = [n[e + 1], n[e]], await U(n) && P(N, { actions: t.map((e, t) => ({
466
+ [n[e], n[e + 1]] = [n[e + 1], n[e]], await U(n) && N(M, { actions: t.map((e, t) => ({
465
467
  ...e,
466
468
  order: n.indexOf(e.id)
467
469
  })).sort((e, t) => e.order - t.order) });
468
470
  }, [
469
- N,
470
- V,
471
+ M,
472
+ H,
471
473
  U,
472
- P
474
+ N
473
475
  ]);
474
476
  d(() => {
475
- N && V.length >= 0 && !H && P(N, { actions: V });
477
+ M && H.length >= 0 && !at && N(M, { actions: H });
476
478
  }, [
477
- N,
478
- V,
479
+ M,
479
480
  H,
480
- P
481
+ at,
482
+ N
481
483
  ]);
482
484
  let Q = u((e, t) => {
483
- A((n) => n && {
485
+ k((n) => n && {
484
486
  ...n,
485
487
  [e]: t
486
- }), M(!0);
488
+ }), j(!0);
487
489
  }, []), $ = u((e) => {
488
- A((t) => t && {
490
+ k((t) => t && {
489
491
  ...t,
490
492
  config: e
491
- }), M(!0);
493
+ }), j(!0);
492
494
  }, []);
493
495
  d(() => {
494
- if (k?.dataSinkId && L.length > 0) {
495
- let e = L.find((e) => e.id === k.dataSinkId);
496
- e && Je(e.key);
497
- } else Je(null);
498
- }, [k?.dataSinkId, L]);
499
- let wt = u((e) => {
500
- if (R(void 0), z(!1), B(null), Je(e), e) {
496
+ if (O?.dataSinkId && L.length > 0) {
497
+ let e = L.find((e) => e.id === O.dataSinkId);
498
+ e && R(e.key);
499
+ } else R(null);
500
+ }, [O?.dataSinkId, L]);
501
+ let kt = u((e) => {
502
+ if (z(void 0), B(!1), V(null), R(e), e) {
501
503
  let t = L.find((t) => t.key === e);
502
- t && (Q("dataSinkId", t.id), A((t) => t && {
504
+ t && (Q("dataSinkId", t.id), k((t) => t && {
503
505
  ...t,
504
506
  config: {
505
507
  ...t.config,
506
508
  dataSinkKey: e
507
509
  }
508
- }), M(!0));
509
- } else Q("dataSinkId", void 0), A((e) => e && {
510
+ }), j(!0));
511
+ } else Q("dataSinkId", void 0), k((e) => e && {
510
512
  ...e,
511
513
  config: {
512
514
  ...e.config,
513
515
  dataSinkKey: void 0
514
516
  },
515
517
  parserId: void 0
516
- }), M(!0);
517
- }, [L, Q]), Tt = u(async (e) => {
518
- if (Q("parserId", e || void 0), R(void 0), z(!1), B(null), e && F) {
519
- Ze(!0);
518
+ }), j(!0);
519
+ }, [L, Q]), At = u(async (e) => {
520
+ if (Q("parserId", e || void 0), z(void 0), B(!1), V(null), e && P) {
521
+ tt(!0);
520
522
  try {
521
- let t = await Ye(e);
523
+ let t = await $e(e);
522
524
  if (t?.success) {
523
- R(t.output), z(!0);
524
- let e = Ie(t.output);
525
- (e.labelField || e.valueField) && (A((t) => {
525
+ z(t.output), B(!0);
526
+ let e = He(t.output);
527
+ (e.labelField || e.valueField) && (k((t) => {
526
528
  if (!t) return t;
527
529
  let n = t.config || {}, r = { ...n };
528
530
  return e.labelField && !n.labelField && (r.labelField = e.labelField), e.valueField && !n.valueField && (r.valueField = e.valueField), e.xAxisField && !n.xAxisField && (r.xAxisField = e.xAxisField), {
529
531
  ...t,
530
532
  config: r
531
533
  };
532
- }), M(!0));
533
- } else z(!0), B(t?.error || "The parser could not produce a preview.");
534
+ }), j(!0));
535
+ } else B(!0), V(t?.error || T("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview."));
534
536
  } catch (e) {
535
- z(!0), B(e instanceof Error ? e.message : "The parser could not produce a preview."), console.warn("Failed to auto-detect parser fields:", e);
537
+ B(!0), V(e instanceof Error ? e.message : T("bigconsole.widget.properties.parser.previewFailed", "The parser could not produce a preview.")), console.warn("Failed to auto-detect parser fields:", e);
536
538
  } finally {
537
- Ze(!1);
539
+ tt(!1);
538
540
  }
539
541
  }
540
542
  }, [
541
543
  Q,
542
- Ye,
543
- F
544
- ]), Et = u(async () => {
545
- if (!(!F || !k)) {
546
- O("saving");
544
+ $e,
545
+ P,
546
+ T
547
+ ]), jt = u(async () => {
548
+ if (!(!P || !O)) {
549
+ D("saving");
547
550
  try {
548
551
  let t = {
549
- ...F.metadata || {},
550
- description: k.description || ""
551
- }, n = te(e.getState().widgets.get(F.id)?.config ?? {}, He.current, k.config), r = ne(c({
552
- dataSinkId: k.dataSinkId,
553
- parserId: k.parserId,
552
+ ...P.metadata || {},
553
+ description: O.description || ""
554
+ }, n = ne(e.getState().widgets.get(P.id)?.config ?? {}, I.current, O.config), r = re(l({
555
+ dataSinkId: O.dataSinkId,
556
+ parserId: O.parserId,
554
557
  config: {
555
558
  ...n,
556
559
  binding: void 0
557
560
  }
558
- }), n), i = await Ue({
559
- id: F.id,
560
- title: k.title,
561
- renderer: k.renderer,
562
- template: k.template,
561
+ }), n), i = await Je({
562
+ id: P.id,
563
+ title: O.title,
564
+ renderer: O.renderer,
565
+ template: O.template,
563
566
  config: r.config,
564
- refreshInterval: k.refreshInterval,
567
+ refreshInterval: O.refreshInterval,
565
568
  dataSinkId: r.dataSinkId,
566
- datasetId: k.datasetId,
569
+ datasetId: O.datasetId,
567
570
  parserId: r.parserId,
568
- parserRules: k.parserRules,
571
+ parserRules: O.parserRules,
569
572
  metadata: t
570
- }), a = F.drilldown;
571
- if (k.drilldownConfig) {
572
- let { enabled: e, targetDashboardId: t, navigationMode: n, parameterMapping: r, passGlobalFilters: i, maxDepth: o, openIn: s } = k.drilldownConfig;
573
- if (F.drilldown?.id) {
574
- let c = await Ge({
575
- id: F.drilldown.id,
573
+ }), a = P.drilldown;
574
+ if (O.drilldownConfig) {
575
+ let { enabled: e, targetDashboardId: t, navigationMode: n, parameterMapping: r, passGlobalFilters: i, maxDepth: o, openIn: s } = O.drilldownConfig;
576
+ if (P.drilldown?.id) {
577
+ let c = await Xe({
578
+ id: P.drilldown.id,
576
579
  targetDashboardId: t,
577
580
  parameterMapping: r,
578
581
  navigationMode: n,
@@ -583,8 +586,8 @@ var ze = l(function({ isOpen: l, onClose: m }) {
583
586
  });
584
587
  c && (a = c);
585
588
  } else if (t) {
586
- let c = await We({
587
- sourceWidgetId: F.id,
589
+ let c = await Ye({
590
+ sourceWidgetId: P.id,
588
591
  targetDashboardId: t,
589
592
  parameterMapping: r || {},
590
593
  navigationMode: n,
@@ -597,51 +600,58 @@ var ze = l(function({ isOpen: l, onClose: m }) {
597
600
  enabled: e
598
601
  });
599
602
  }
600
- } else F.drilldown?.id && !k.drilldownConfig && (await Ke(F.drilldown.id), a = void 0);
601
- i ? (P(F.id, {
602
- title: k.title,
603
- description: k.description,
604
- renderer: k.renderer,
605
- template: k.template,
603
+ } else P.drilldown?.id && !O.drilldownConfig && (await Ze(P.drilldown.id), a = void 0);
604
+ i ? (N(P.id, {
605
+ title: O.title,
606
+ description: O.description,
607
+ renderer: O.renderer,
608
+ template: O.template,
606
609
  config: r.config,
607
- refreshInterval: k.refreshInterval,
610
+ refreshInterval: O.refreshInterval,
608
611
  dataSinkId: r.dataSinkId,
609
- datasetId: k.datasetId,
612
+ datasetId: O.datasetId,
610
613
  parserId: r.parserId,
611
- parserRules: k.parserRules,
614
+ parserRules: O.parserRules,
612
615
  drilldown: a,
613
616
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
614
- }), O("saved"), M(!1), setTimeout(() => O("idle"), 2e3)) : O("error");
617
+ }), D("saved"), j(!1), setTimeout(() => D("idle"), 2e3)) : D("error");
615
618
  } catch {
616
- O("error");
619
+ D("error");
617
620
  }
618
621
  }
619
622
  }, [
620
- F,
621
- k,
622
- Ue,
623
623
  P,
624
- We,
625
- Ge,
626
- Ke
627
- ]), Dt = u(() => {
628
- F && (A(Re(F)), He.current = F.config || {}, M(!1), O("idle"));
629
- }, [F]), Ot = u((e) => {
624
+ O,
625
+ Je,
626
+ N,
627
+ Ye,
628
+ Xe,
629
+ Ze
630
+ ]), Mt = u(() => {
631
+ P && (k(We(P)), I.current = P.config || {}, j(!1), D("idle"));
632
+ }, [P]), Nt = u((e) => {
630
633
  $(e);
631
- }, [$]), kt = u((e) => {
632
- A((t) => t && {
634
+ }, [$]), Pt = u((e) => {
635
+ k((t) => t && {
633
636
  ...t,
634
637
  drilldownConfig: e
635
- }), M(!0);
636
- }, []), At = F ? t(F.type) : null;
637
- return /* @__PURE__ */ T(Ce, {
638
- open: l,
639
- onOpenChange: (e) => !e && m(),
638
+ }), j(!0);
639
+ }, []), Ft = P ? r(P.type) : null, It = f(() => Le.map((e) => ({
640
+ value: e.value,
641
+ label: T(e.labelKey, e.label),
642
+ description: T(e.descriptionKey, e.description)
643
+ })), [T]), Lt = f(() => Re.map((e) => ({
644
+ value: e.value,
645
+ label: T(e.labelKey, e.label)
646
+ })), [T]);
647
+ return /* @__PURE__ */ S(ke, {
648
+ open: fe,
649
+ onOpenChange: (e) => !e && ge(),
640
650
  modal: !1,
641
- children: /* @__PURE__ */ E(we, {
651
+ children: /* @__PURE__ */ C(Ae, {
642
652
  style: {
643
- width: "420px",
644
- maxWidth: "90vw",
653
+ width: "min(420px, 100vw)",
654
+ maxWidth: "100vw",
645
655
  padding: 0,
646
656
  display: "flex",
647
657
  flexDirection: "column",
@@ -649,20 +659,20 @@ var ze = l(function({ isOpen: l, onClose: m }) {
649
659
  overflow: "hidden"
650
660
  },
651
661
  children: [
652
- /* @__PURE__ */ T(Ee, {
662
+ /* @__PURE__ */ S(Me, {
653
663
  style: {
654
664
  padding: "var(--space-cardPadding)",
655
- borderBottom: "1px solid var(--color-border)",
665
+ borderBottom: "1px solid var(--color-border-subtle)",
656
666
  backgroundColor: "var(--color-bg-surface)",
657
667
  flexShrink: 0
658
668
  },
659
- children: /* @__PURE__ */ E("div", {
669
+ children: /* @__PURE__ */ C("div", {
660
670
  style: {
661
671
  display: "flex",
662
672
  alignItems: "center",
663
673
  gap: "var(--space-controlGap)"
664
674
  },
665
- children: [/* @__PURE__ */ T("div", {
675
+ children: [/* @__PURE__ */ S("div", {
666
676
  style: {
667
677
  display: "flex",
668
678
  height: "var(--size-controlHeight-lg)",
@@ -674,62 +684,62 @@ var ze = l(function({ isOpen: l, onClose: m }) {
674
684
  boxShadow: "var(--shadow-elevation-2)",
675
685
  flexShrink: 0
676
686
  },
677
- children: /* @__PURE__ */ T(h, { style: {
687
+ children: /* @__PURE__ */ S(_e, { style: {
678
688
  height: "var(--size-icon-md)",
679
689
  width: "var(--size-icon-md)",
680
690
  color: "var(--color-action-primary-text)"
681
691
  } })
682
- }), /* @__PURE__ */ E("div", {
692
+ }), /* @__PURE__ */ C("div", {
683
693
  style: {
684
694
  flex: 1,
685
695
  minWidth: 0
686
696
  },
687
- children: [/* @__PURE__ */ E("div", {
697
+ children: [/* @__PURE__ */ C("div", {
688
698
  style: {
689
699
  display: "flex",
690
700
  alignItems: "center",
691
701
  gap: "var(--space-iconGap)"
692
702
  },
693
703
  children: [
694
- /* @__PURE__ */ T(De, {
704
+ /* @__PURE__ */ S(Ne, {
695
705
  style: {
696
706
  fontSize: "var(--font-size-body-md)",
697
707
  fontWeight: "var(--font-weight-bold)",
698
708
  color: "var(--color-text-primary)",
699
709
  margin: 0
700
710
  },
701
- children: F ? "Widget Properties" : "Properties"
711
+ children: P ? T("bigconsole.widget.properties.header.widgetProperties", "Widget Properties") : T("bigconsole.widget.properties.header.properties", "Properties")
702
712
  }),
703
- D === "saving" && /* @__PURE__ */ T(Oe, { style: {
713
+ E === "saving" && /* @__PURE__ */ S(Pe, { style: {
704
714
  height: "var(--size-icon-sm)",
705
715
  width: "var(--size-icon-sm)"
706
716
  } }),
707
- D === "saved" && /* @__PURE__ */ T(p, { style: {
717
+ E === "saved" && /* @__PURE__ */ S(m, { style: {
708
718
  height: "var(--size-icon-sm)",
709
719
  width: "var(--size-icon-sm)",
710
720
  color: "var(--color-status-success-bg)"
711
721
  } }),
712
- D === "error" && /* @__PURE__ */ T(ve, { style: {
722
+ E === "error" && /* @__PURE__ */ S(xe, { style: {
713
723
  height: "var(--size-icon-sm)",
714
724
  width: "var(--size-icon-sm)",
715
725
  color: "var(--color-status-error-bg)"
716
726
  } })
717
727
  ]
718
- }), At && /* @__PURE__ */ T(Te, {
728
+ }), Ft && /* @__PURE__ */ S(je, {
719
729
  style: {
720
730
  fontSize: "var(--font-size-body-sm)",
721
731
  color: "var(--color-text-secondary)",
722
732
  margin: "var(--space-controlGap) 0 0 0",
723
733
  fontWeight: "var(--font-weight-medium)"
724
734
  },
725
- children: At.name
735
+ children: Ft.name
726
736
  })]
727
737
  })]
728
738
  })
729
739
  }),
730
- F ? /* @__PURE__ */ E(ke, {
731
- value: ze,
732
- onValueChange: (e) => Be(e),
740
+ P ? /* @__PURE__ */ C(Fe, {
741
+ value: Ge,
742
+ onValueChange: (e) => Ke(e),
733
743
  style: {
734
744
  flex: 1,
735
745
  display: "flex",
@@ -737,63 +747,44 @@ var ze = l(function({ isOpen: l, onClose: m }) {
737
747
  minHeight: 0,
738
748
  overflow: "hidden"
739
749
  },
740
- children: [/* @__PURE__ */ E(Ae, {
750
+ children: [/* @__PURE__ */ C(Ie, {
741
751
  style: {
742
752
  width: "100%",
743
753
  display: "flex",
754
+ flexWrap: "wrap",
744
755
  justifyContent: "flex-start",
745
756
  borderRadius: 0,
746
- borderBottom: "1px solid var(--color-border)",
747
- padding: "0 8px",
757
+ borderBottom: "1px solid var(--color-border-subtle)",
758
+ padding: "2px 8px",
748
759
  backgroundColor: "var(--color-bg-sunken)",
749
- height: "var(--size-controlHeight-lg)",
760
+ minHeight: "var(--size-controlHeight-lg)",
761
+ height: "auto",
750
762
  flexShrink: 0,
751
- gap: "2px",
752
- overflowX: "auto"
763
+ gap: "2px"
753
764
  },
754
765
  children: [
755
- /* @__PURE__ */ T(C, {
766
+ /* @__PURE__ */ S(b, {
756
767
  value: "general",
757
- style: {
758
- fontWeight: "var(--font-weight-semibold)",
759
- fontSize: "12px",
760
- padding: "6px 8px",
761
- flexShrink: 0
762
- },
763
- children: "General"
768
+ style: w,
769
+ children: T("bigconsole.widget.properties.tab.general", "General")
764
770
  }),
765
- /* @__PURE__ */ T(C, {
771
+ /* @__PURE__ */ S(b, {
766
772
  value: "data",
767
- style: {
768
- fontWeight: "var(--font-weight-semibold)",
769
- fontSize: "12px",
770
- padding: "6px 8px",
771
- flexShrink: 0
772
- },
773
- children: "Data"
773
+ style: w,
774
+ children: T("bigconsole.widget.properties.tab.data", "Data")
774
775
  }),
775
- /* @__PURE__ */ T(C, {
776
+ /* @__PURE__ */ S(b, {
776
777
  value: "advanced",
777
- style: {
778
- fontWeight: "var(--font-weight-semibold)",
779
- fontSize: "12px",
780
- padding: "6px 8px",
781
- flexShrink: 0
782
- },
783
- children: "Advanced"
778
+ style: w,
779
+ children: T("bigconsole.widget.properties.tab.advanced", "Advanced")
784
780
  }),
785
- /* @__PURE__ */ T(C, {
781
+ /* @__PURE__ */ S(b, {
786
782
  value: "appearance",
787
- style: {
788
- fontWeight: "var(--font-weight-semibold)",
789
- fontSize: "12px",
790
- padding: "6px 8px",
791
- flexShrink: 0
792
- },
793
- children: "Style"
783
+ style: w,
784
+ children: T("bigconsole.widget.properties.tab.style", "Style")
794
785
  })
795
786
  ]
796
- }), /* @__PURE__ */ E("div", {
787
+ }), /* @__PURE__ */ C("div", {
797
788
  style: {
798
789
  flex: 1,
799
790
  overflow: "auto",
@@ -801,639 +792,591 @@ var ze = l(function({ isOpen: l, onClose: m }) {
801
792
  minHeight: 0
802
793
  },
803
794
  children: [
804
- /* @__PURE__ */ T(S, {
795
+ /* @__PURE__ */ S(y, {
805
796
  value: "general",
806
797
  className: "mt-0",
807
- children: k && /* @__PURE__ */ T("div", {
808
- style: {
809
- display: "flex",
810
- flexDirection: "column",
811
- gap: "var(--space-formGap)"
812
- },
813
- children: /* @__PURE__ */ T(le, {
814
- title: k.title,
815
- description: k.description,
816
- refreshInterval: k.refreshInterval,
817
- onTitleChange: (e) => Q("title", e),
818
- onDescriptionChange: (e) => Q("description", e),
819
- onRefreshIntervalChange: (e) => Q("refreshInterval", e)
820
- })
821
- })
798
+ children: O && /* @__PURE__ */ S(n, { children: /* @__PURE__ */ S(ue, {
799
+ title: O.title,
800
+ description: O.description,
801
+ refreshInterval: O.refreshInterval,
802
+ onTitleChange: (e) => Q("title", e),
803
+ onDescriptionChange: (e) => Q("description", e),
804
+ onRefreshIntervalChange: (e) => Q("refreshInterval", e)
805
+ }) })
822
806
  }),
823
- /* @__PURE__ */ T(S, {
807
+ /* @__PURE__ */ S(y, {
824
808
  value: "data",
825
- className: "mt-0 space-y-4",
826
- children: k && /* @__PURE__ */ E(je, { children: [
827
- (() => {
828
- let e = c({
829
- dataSinkId: k.dataSinkId,
830
- parserId: k.parserId,
831
- config: {
832
- ...k.config,
833
- binding: void 0
834
- }
835
- }), t = ee({
836
- binding: e,
837
- loading: Xe,
838
- error: et,
839
- preview: Qe,
840
- previewComplete: $e
841
- });
842
- return /* @__PURE__ */ T(ue, {
843
- consoleId: F?.dashboardId || "",
844
- binding: e,
845
- dataSinkKey: qe,
846
- dataPath: typeof k.config.dataPath == "string" ? k.config.dataPath : void 0,
847
- status: t.status,
848
- missingFields: t.missingFields,
849
- preview: Qe,
850
- error: et,
851
- onDataSinkChange: wt,
852
- onParserChange: Tt,
853
- onDataPathChange: (e) => $({
854
- ...k.config,
855
- dataPath: e
856
- })
857
- });
858
- })(),
859
- /* @__PURE__ */ T("div", {
860
- className: "border-t border-border-subtle pt-4",
861
- children: /* @__PURE__ */ T(v, {
862
- className: "text-xs text-text-secondary uppercase tracking-wide",
863
- children: "Alternative Data Sources"
809
+ className: "mt-0",
810
+ children: O && /* @__PURE__ */ C(n, { children: [(() => {
811
+ let e = l({
812
+ dataSinkId: O.dataSinkId,
813
+ parserId: O.parserId,
814
+ config: {
815
+ ...O.config,
816
+ binding: void 0
817
+ }
818
+ }), t = te({
819
+ binding: e,
820
+ loading: et,
821
+ error: it,
822
+ preview: nt,
823
+ previewComplete: rt
824
+ });
825
+ return /* @__PURE__ */ S(de, {
826
+ consoleId: P?.dashboardId || "",
827
+ binding: e,
828
+ dataSinkKey: Qe,
829
+ dataPath: typeof O.config.dataPath == "string" ? O.config.dataPath : void 0,
830
+ status: t.status,
831
+ missingFields: t.missingFields,
832
+ preview: nt,
833
+ error: it,
834
+ onDataSinkChange: kt,
835
+ onParserChange: At,
836
+ onDataPathChange: (e) => $({
837
+ ...O.config,
838
+ dataPath: e
864
839
  })
865
- }),
866
- /* @__PURE__ */ E("div", {
867
- className: "space-y-2",
868
- children: [/* @__PURE__ */ T(v, { children: "Data Source Type" }), /* @__PURE__ */ E(xe, {
869
- value: k.config?.dataSourceType || "",
870
- onValueChange: (e) => $({
871
- ...k.config,
872
- dataSourceType: e || void 0
873
- }),
874
- children: [/* @__PURE__ */ T(b, {
875
- style: {
876
- height: "var(--size-controlHeight-md)",
877
- fontSize: "var(--font-size-body-sm)"
878
- },
879
- children: /* @__PURE__ */ T(x, { placeholder: "Select type..." })
880
- }), /* @__PURE__ */ T(Se, {
881
- position: "popper",
882
- side: "bottom",
883
- sideOffset: 4,
884
- align: "start",
885
- style: {
886
- zIndex: 9999,
887
- maxHeight: "200px",
888
- backgroundColor: "var(--color-overlay-popoverBg, var(--color-bg-surface, #ffffff))",
889
- border: "1px solid var(--color-border)",
890
- boxShadow: "var(--shadow-elevation-3)",
891
- borderRadius: "var(--radius-button)"
892
- },
893
- children: Ne.map((e) => /* @__PURE__ */ T(y, {
894
- value: e.value,
895
- children: e.label
896
- }, e.value))
897
- })]
898
- })]
899
- }),
900
- k.config?.dataSourceType === "REST_API" && /* @__PURE__ */ E("div", {
901
- className: "space-y-3",
840
+ });
841
+ })(), /* @__PURE__ */ S(t, {
842
+ emphasis: "muted",
843
+ title: T("bigconsole.widget.properties.data.alternativeSources", "Alternative Data Sources"),
844
+ description: "Skip the DataSink pipeline and fetch straight from an API, a GraphQL endpoint or sample JSON.",
845
+ headingLevel: 3,
846
+ "data-testid": "widget-inspector-alt-sources",
847
+ children: /* @__PURE__ */ C("div", {
848
+ className: "flex flex-col gap-form-gap",
902
849
  children: [
903
- /* @__PURE__ */ E("div", {
850
+ /* @__PURE__ */ C("div", {
904
851
  className: "space-y-2",
905
- children: [/* @__PURE__ */ T(v, { children: "Endpoint URL *" }), /* @__PURE__ */ T(_, {
906
- value: k.config?.endpointUrl || "",
907
- onChange: (e) => $({
908
- ...k.config,
909
- endpointUrl: e.target.value || void 0
910
- }),
911
- placeholder: "https://api.example.com/data"
912
- })]
913
- }),
914
- /* @__PURE__ */ E("div", {
915
- className: "space-y-2",
916
- children: [/* @__PURE__ */ T(v, { children: "HTTP Method" }), /* @__PURE__ */ E(xe, {
917
- value: k.config?.httpMethod || "GET",
852
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.data.sourceTypeLabel", "Data Source Type") }), /* @__PURE__ */ C(Te, {
853
+ value: O.config?.dataSourceType || "",
918
854
  onValueChange: (e) => $({
919
- ...k.config,
920
- httpMethod: e
855
+ ...O.config,
856
+ dataSourceType: e || void 0
921
857
  }),
922
- children: [/* @__PURE__ */ T(b, {
923
- style: { height: "var(--size-controlHeight-md)" },
924
- children: /* @__PURE__ */ T(x, {})
925
- }), /* @__PURE__ */ E(Se, {
858
+ children: [/* @__PURE__ */ S(De, {
859
+ style: {
860
+ height: "var(--size-controlHeight-md)",
861
+ fontSize: "var(--font-size-body-sm)"
862
+ },
863
+ children: /* @__PURE__ */ S(Oe, { placeholder: T("bigconsole.widget.properties.data.selectTypePlaceholder", "Select type...") })
864
+ }), /* @__PURE__ */ S(Ee, {
926
865
  position: "popper",
927
866
  side: "bottom",
928
867
  sideOffset: 4,
929
- children: [
930
- /* @__PURE__ */ T(y, {
931
- value: "GET",
932
- children: "GET"
933
- }),
934
- /* @__PURE__ */ T(y, {
935
- value: "POST",
936
- children: "POST"
937
- }),
938
- /* @__PURE__ */ T(y, {
939
- value: "PUT",
940
- children: "PUT"
941
- }),
942
- /* @__PURE__ */ T(y, {
943
- value: "DELETE",
944
- children: "DELETE"
945
- })
946
- ]
868
+ align: "start",
869
+ style: {
870
+ zIndex: 9999,
871
+ maxHeight: "200px",
872
+ backgroundColor: "var(--color-overlay-popoverBg, var(--color-bg-surface))",
873
+ border: "1px solid var(--color-border-subtle)",
874
+ boxShadow: "var(--shadow-elevation-3)",
875
+ borderRadius: "var(--radius-button)"
876
+ },
877
+ children: Lt.map((e) => /* @__PURE__ */ S(v, {
878
+ value: e.value,
879
+ children: e.label
880
+ }, e.value))
947
881
  })]
948
882
  })]
949
883
  }),
950
- /* @__PURE__ */ E("div", {
951
- className: "space-y-2",
952
- children: [/* @__PURE__ */ T(v, { children: "Headers (JSON)" }), /* @__PURE__ */ T(w, {
953
- value: k.config?.headers || "",
954
- onChange: (e) => $({
955
- ...k.config,
956
- headers: e.target.value || void 0
884
+ O.config?.dataSourceType === "REST_API" && /* @__PURE__ */ C("div", {
885
+ className: "space-y-3",
886
+ children: [
887
+ /* @__PURE__ */ C("div", {
888
+ className: "space-y-2",
889
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.rest.endpointUrlLabel", "Endpoint URL *") }), /* @__PURE__ */ S(g, {
890
+ value: O.config?.endpointUrl || "",
891
+ onChange: (e) => $({
892
+ ...O.config,
893
+ endpointUrl: e.target.value || void 0
894
+ }),
895
+ placeholder: "https://api.example.com/data"
896
+ })]
957
897
  }),
958
- rows: 3,
959
- placeholder: "{\"Authorization\": \"Bearer token\", \"Content-Type\": \"application/json\"}",
960
- className: "font-mono text-xs"
961
- })]
962
- }),
963
- /* @__PURE__ */ E("div", {
964
- className: "space-y-2",
965
- children: [/* @__PURE__ */ T(v, { children: "Authentication" }), /* @__PURE__ */ E(xe, {
966
- value: k.config?.authType || "none",
967
- onValueChange: (e) => $({
968
- ...k.config,
969
- authType: e
898
+ /* @__PURE__ */ C("div", {
899
+ className: "space-y-2",
900
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.rest.httpMethodLabel", "HTTP Method") }), /* @__PURE__ */ C(Te, {
901
+ value: O.config?.httpMethod || "GET",
902
+ onValueChange: (e) => $({
903
+ ...O.config,
904
+ httpMethod: e
905
+ }),
906
+ children: [/* @__PURE__ */ S(De, {
907
+ style: { height: "var(--size-controlHeight-md)" },
908
+ children: /* @__PURE__ */ S(Oe, {})
909
+ }), /* @__PURE__ */ C(Ee, {
910
+ position: "popper",
911
+ side: "bottom",
912
+ sideOffset: 4,
913
+ children: [
914
+ /* @__PURE__ */ S(v, {
915
+ value: "GET",
916
+ children: "GET"
917
+ }),
918
+ /* @__PURE__ */ S(v, {
919
+ value: "POST",
920
+ children: "POST"
921
+ }),
922
+ /* @__PURE__ */ S(v, {
923
+ value: "PUT",
924
+ children: "PUT"
925
+ }),
926
+ /* @__PURE__ */ S(v, {
927
+ value: "DELETE",
928
+ children: "DELETE"
929
+ })
930
+ ]
931
+ })]
932
+ })]
970
933
  }),
971
- children: [/* @__PURE__ */ T(b, {
972
- style: { height: "var(--size-controlHeight-md)" },
973
- children: /* @__PURE__ */ T(x, {})
974
- }), /* @__PURE__ */ E(Se, {
975
- position: "popper",
976
- side: "bottom",
977
- sideOffset: 4,
978
- children: [
979
- /* @__PURE__ */ T(y, {
980
- value: "none",
981
- children: "None"
934
+ /* @__PURE__ */ C("div", {
935
+ className: "space-y-2",
936
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.rest.headersLabel", "Headers (JSON)") }), /* @__PURE__ */ S(x, {
937
+ value: O.config?.headers || "",
938
+ onChange: (e) => $({
939
+ ...O.config,
940
+ headers: e.target.value || void 0
982
941
  }),
983
- /* @__PURE__ */ T(y, {
984
- value: "api_key",
985
- children: "API Key"
942
+ rows: 3,
943
+ placeholder: "{\"Authorization\": \"Bearer token\", \"Content-Type\": \"application/json\"}",
944
+ className: "font-mono text-xs"
945
+ })]
946
+ }),
947
+ /* @__PURE__ */ C("div", {
948
+ className: "space-y-2",
949
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.rest.authenticationLabel", "Authentication") }), /* @__PURE__ */ C(Te, {
950
+ value: O.config?.authType || "none",
951
+ onValueChange: (e) => $({
952
+ ...O.config,
953
+ authType: e
986
954
  }),
987
- /* @__PURE__ */ T(y, {
988
- value: "bearer",
989
- children: "Bearer Token"
955
+ children: [/* @__PURE__ */ S(De, {
956
+ style: { height: "var(--size-controlHeight-md)" },
957
+ children: /* @__PURE__ */ S(Oe, {})
958
+ }), /* @__PURE__ */ C(Ee, {
959
+ position: "popper",
960
+ side: "bottom",
961
+ sideOffset: 4,
962
+ children: [
963
+ /* @__PURE__ */ S(v, {
964
+ value: "none",
965
+ children: T("bigconsole.widget.properties.rest.authNone", "None")
966
+ }),
967
+ /* @__PURE__ */ S(v, {
968
+ value: "api_key",
969
+ children: T("bigconsole.widget.properties.rest.authApiKey", "API Key")
970
+ }),
971
+ /* @__PURE__ */ S(v, {
972
+ value: "bearer",
973
+ children: T("bigconsole.widget.properties.rest.authBearer", "Bearer Token")
974
+ }),
975
+ /* @__PURE__ */ S(v, {
976
+ value: "basic",
977
+ children: T("bigconsole.widget.properties.rest.authBasic", "Basic Auth")
978
+ })
979
+ ]
980
+ })]
981
+ })]
982
+ }),
983
+ !!(O.config?.authType && O.config.authType !== "none") && /* @__PURE__ */ C("div", {
984
+ className: "space-y-2",
985
+ children: [/* @__PURE__ */ S(_, { children: String(O.config.authType) === "basic" ? T("bigconsole.widget.properties.rest.credentialsLabel", "Credentials (user:pass)") : T("bigconsole.widget.properties.rest.tokenKeyLabel", "Token/Key") }), /* @__PURE__ */ S(g, {
986
+ type: "password",
987
+ value: O.config?.authValue || "",
988
+ onChange: (e) => $({
989
+ ...O.config,
990
+ authValue: e.target.value || void 0
990
991
  }),
991
- /* @__PURE__ */ T(y, {
992
- value: "basic",
993
- children: "Basic Auth"
994
- })
995
- ]
996
- })]
997
- })]
998
- }),
999
- !!(k.config?.authType && k.config.authType !== "none") && /* @__PURE__ */ E("div", {
1000
- className: "space-y-2",
1001
- children: [/* @__PURE__ */ T(v, { children: String(k.config.authType) === "basic" ? "Credentials (user:pass)" : "Token/Key" }), /* @__PURE__ */ T(_, {
1002
- type: "password",
1003
- value: k.config?.authValue || "",
1004
- onChange: (e) => $({
1005
- ...k.config,
1006
- authValue: e.target.value || void 0
992
+ placeholder: O.config.authType === "basic" ? T("bigconsole.widget.properties.rest.credentialsPlaceholder", "username:password") : T("bigconsole.widget.properties.rest.tokenKeyPlaceholder", "Enter token or API key")
993
+ })]
1007
994
  }),
1008
- placeholder: k.config.authType === "basic" ? "username:password" : "Enter token or API key"
1009
- })]
1010
- }),
1011
- (k.config?.httpMethod === "POST" || k.config?.httpMethod === "PUT") && /* @__PURE__ */ E("div", {
1012
- className: "space-y-2",
1013
- children: [/* @__PURE__ */ T(v, { children: "Request Body (JSON)" }), /* @__PURE__ */ T(w, {
1014
- value: k.config?.requestBody || "",
1015
- onChange: (e) => $({
1016
- ...k.config,
1017
- requestBody: e.target.value || void 0
995
+ (O.config?.httpMethod === "POST" || O.config?.httpMethod === "PUT") && /* @__PURE__ */ C("div", {
996
+ className: "space-y-2",
997
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.rest.requestBodyLabel", "Request Body (JSON)") }), /* @__PURE__ */ S(x, {
998
+ value: O.config?.requestBody || "",
999
+ onChange: (e) => $({
1000
+ ...O.config,
1001
+ requestBody: e.target.value || void 0
1002
+ }),
1003
+ rows: 4,
1004
+ placeholder: "{\"key\": \"value\"}",
1005
+ className: "font-mono text-xs"
1006
+ })]
1018
1007
  }),
1019
- rows: 4,
1020
- placeholder: "{\"key\": \"value\"}",
1021
- className: "font-mono text-xs"
1022
- })]
1008
+ /* @__PURE__ */ C("div", {
1009
+ className: "space-y-2",
1010
+ children: [
1011
+ /* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
1012
+ /* @__PURE__ */ S(g, {
1013
+ value: O.config?.dataPath || "",
1014
+ onChange: (e) => $({
1015
+ ...O.config,
1016
+ dataPath: e.target.value || void 0
1017
+ }),
1018
+ placeholder: "$.data.items or .data.items"
1019
+ }),
1020
+ /* @__PURE__ */ S("p", {
1021
+ className: "text-xs text-text-secondary",
1022
+ children: T("bigconsole.widget.properties.dataPath.restHelp", "JSONPath or dot notation to extract data from response")
1023
+ })
1024
+ ]
1025
+ })
1026
+ ]
1023
1027
  }),
1024
- /* @__PURE__ */ E("div", {
1025
- className: "space-y-2",
1028
+ O.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ C("div", {
1029
+ className: "space-y-3",
1026
1030
  children: [
1027
- /* @__PURE__ */ T(v, { children: "Data Path (optional)" }),
1028
- /* @__PURE__ */ T(_, {
1029
- value: k.config?.dataPath || "",
1030
- onChange: (e) => $({
1031
- ...k.config,
1032
- dataPath: e.target.value || void 0
1033
- }),
1034
- placeholder: "$.data.items or .data.items"
1031
+ /* @__PURE__ */ C("div", {
1032
+ className: "space-y-2",
1033
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.graphql.endpointLabel", "GraphQL Endpoint *") }), /* @__PURE__ */ S(g, {
1034
+ value: O.config?.graphqlEndpoint || "",
1035
+ onChange: (e) => $({
1036
+ ...O.config,
1037
+ graphqlEndpoint: e.target.value || void 0
1038
+ }),
1039
+ placeholder: "https://api.example.com/graphql"
1040
+ })]
1035
1041
  }),
1036
- /* @__PURE__ */ T("p", {
1037
- className: "text-xs text-text-secondary",
1038
- children: "JSONPath or dot notation to extract data from response"
1039
- })
1040
- ]
1041
- })
1042
- ]
1043
- }),
1044
- k.config?.dataSourceType === "GRAPHQL" && /* @__PURE__ */ E("div", {
1045
- className: "space-y-3",
1046
- children: [
1047
- /* @__PURE__ */ E("div", {
1048
- className: "space-y-2",
1049
- children: [/* @__PURE__ */ T(v, { children: "GraphQL Endpoint *" }), /* @__PURE__ */ T(_, {
1050
- value: k.config?.graphqlEndpoint || "",
1051
- onChange: (e) => $({
1052
- ...k.config,
1053
- graphqlEndpoint: e.target.value || void 0
1042
+ /* @__PURE__ */ C("div", {
1043
+ className: "space-y-2",
1044
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.graphql.queryLabel", "Query *") }), /* @__PURE__ */ S(x, {
1045
+ value: O.config?.graphqlQuery || "",
1046
+ onChange: (e) => $({
1047
+ ...O.config,
1048
+ graphqlQuery: e.target.value || void 0
1049
+ }),
1050
+ rows: 6,
1051
+ placeholder: "query GetData($limit: Int) {\n items(limit: $limit) {\n id\n name\n value\n }\n}",
1052
+ className: "font-mono text-xs"
1053
+ })]
1054
1054
  }),
1055
- placeholder: "https://api.example.com/graphql"
1056
- })]
1057
- }),
1058
- /* @__PURE__ */ E("div", {
1059
- className: "space-y-2",
1060
- children: [/* @__PURE__ */ T(v, { children: "Query *" }), /* @__PURE__ */ T(w, {
1061
- value: k.config?.graphqlQuery || "",
1062
- onChange: (e) => $({
1063
- ...k.config,
1064
- graphqlQuery: e.target.value || void 0
1055
+ /* @__PURE__ */ C("div", {
1056
+ className: "space-y-2",
1057
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.graphql.variablesLabel", "Variables (JSON, optional)") }), /* @__PURE__ */ S(x, {
1058
+ value: O.config?.graphqlVariables || "",
1059
+ onChange: (e) => $({
1060
+ ...O.config,
1061
+ graphqlVariables: e.target.value || void 0
1062
+ }),
1063
+ rows: 3,
1064
+ placeholder: "{\"limit\": 10, \"offset\": 0}",
1065
+ className: "font-mono text-xs"
1066
+ })]
1065
1067
  }),
1066
- rows: 6,
1067
- placeholder: "query GetData($limit: Int) {\n items(limit: $limit) {\n id\n name\n value\n }\n}",
1068
- className: "font-mono text-xs"
1069
- })]
1070
- }),
1071
- /* @__PURE__ */ E("div", {
1072
- className: "space-y-2",
1073
- children: [/* @__PURE__ */ T(v, { children: "Variables (JSON, optional)" }), /* @__PURE__ */ T(w, {
1074
- value: k.config?.graphqlVariables || "",
1075
- onChange: (e) => $({
1076
- ...k.config,
1077
- graphqlVariables: e.target.value || void 0
1068
+ /* @__PURE__ */ C("div", {
1069
+ className: "space-y-2",
1070
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.graphql.headersLabel", "Headers (JSON, optional)") }), /* @__PURE__ */ S(x, {
1071
+ value: O.config?.headers || "",
1072
+ onChange: (e) => $({
1073
+ ...O.config,
1074
+ headers: e.target.value || void 0
1075
+ }),
1076
+ rows: 2,
1077
+ placeholder: "{\"Authorization\": \"Bearer token\"}",
1078
+ className: "font-mono text-xs"
1079
+ })]
1078
1080
  }),
1079
- rows: 3,
1080
- placeholder: "{\"limit\": 10, \"offset\": 0}",
1081
- className: "font-mono text-xs"
1082
- })]
1081
+ /* @__PURE__ */ C("div", {
1082
+ className: "space-y-2",
1083
+ children: [
1084
+ /* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.dataPath.label", "Data Path (optional)") }),
1085
+ /* @__PURE__ */ S(g, {
1086
+ value: O.config?.dataPath || "",
1087
+ onChange: (e) => $({
1088
+ ...O.config,
1089
+ dataPath: e.target.value || void 0
1090
+ }),
1091
+ placeholder: ".data.items"
1092
+ }),
1093
+ /* @__PURE__ */ S("p", {
1094
+ className: "text-xs text-text-secondary",
1095
+ children: T("bigconsole.widget.properties.dataPath.graphqlHelp", "Path to extract data from GraphQL response")
1096
+ })
1097
+ ]
1098
+ })
1099
+ ]
1083
1100
  }),
1084
- /* @__PURE__ */ E("div", {
1101
+ O.config?.dataSourceType === "MOCK" && /* @__PURE__ */ C("div", {
1085
1102
  className: "space-y-2",
1086
- children: [/* @__PURE__ */ T(v, { children: "Headers (JSON, optional)" }), /* @__PURE__ */ T(w, {
1087
- value: k.config?.headers || "",
1103
+ children: [/* @__PURE__ */ S(_, { children: T("bigconsole.widget.properties.mock.sampleDataLabel", "Sample Data (JSON)") }), /* @__PURE__ */ S(x, {
1104
+ value: O.config?.mockData || "",
1088
1105
  onChange: (e) => $({
1089
- ...k.config,
1090
- headers: e.target.value || void 0
1106
+ ...O.config,
1107
+ mockData: e.target.value || void 0
1091
1108
  }),
1092
- rows: 2,
1093
- placeholder: "{\"Authorization\": \"Bearer token\"}",
1094
- className: "font-mono text-xs"
1109
+ rows: 5,
1110
+ placeholder: "{\"value\": 100}",
1111
+ className: "font-mono text-sm"
1095
1112
  })]
1096
- }),
1097
- /* @__PURE__ */ E("div", {
1098
- className: "space-y-2",
1099
- children: [
1100
- /* @__PURE__ */ T(v, { children: "Data Path (optional)" }),
1101
- /* @__PURE__ */ T(_, {
1102
- value: k.config?.dataPath || "",
1103
- onChange: (e) => $({
1104
- ...k.config,
1105
- dataPath: e.target.value || void 0
1106
- }),
1107
- placeholder: ".data.items"
1108
- }),
1109
- /* @__PURE__ */ T("p", {
1110
- className: "text-xs text-text-secondary",
1111
- children: "Path to extract data from GraphQL response"
1112
- })
1113
- ]
1114
1113
  })
1115
1114
  ]
1116
- }),
1117
- k.config?.dataSourceType === "MOCK" && /* @__PURE__ */ E("div", {
1118
- className: "space-y-2",
1119
- children: [/* @__PURE__ */ T(v, { children: "Sample Data (JSON)" }), /* @__PURE__ */ T(w, {
1120
- value: k.config?.mockData || "",
1121
- onChange: (e) => $({
1122
- ...k.config,
1123
- mockData: e.target.value || void 0
1124
- }),
1125
- rows: 5,
1126
- placeholder: "{\"value\": 100}",
1127
- className: "font-mono text-sm"
1128
- })]
1129
1115
  })
1130
- ] })
1116
+ })] })
1131
1117
  }),
1132
- /* @__PURE__ */ E(S, {
1118
+ /* @__PURE__ */ S(y, {
1133
1119
  value: "advanced",
1134
- className: "mt-0 space-y-6",
1135
- children: [
1136
- k && /* @__PURE__ */ T(se, {
1137
- renderer: k.renderer,
1138
- rendererOptions: Me,
1120
+ className: "mt-0",
1121
+ children: /* @__PURE__ */ C(n, { children: [
1122
+ O && /* @__PURE__ */ S(ce, {
1123
+ renderer: O.renderer,
1124
+ rendererOptions: It,
1139
1125
  onRendererChange: (e) => {
1140
1126
  Q("renderer", e), e === "BIGCONSOLE" && Q("template", void 0);
1141
1127
  },
1142
- templateEditor: k.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ T(Le, {
1128
+ templateEditor: O.renderer === "BIGCONSOLE" ? void 0 : /* @__PURE__ */ S(Ue, {
1143
1129
  widget: {
1144
- ...F,
1145
- template: k.template,
1146
- renderer: k.renderer
1130
+ ...P,
1131
+ template: O.template,
1132
+ renderer: O.renderer
1147
1133
  },
1148
1134
  onSave: (e) => Q("template", e)
1149
1135
  })
1150
1136
  }),
1151
- /* @__PURE__ */ E("section", {
1152
- className: "space-y-4 border-t border-border-default pt-4",
1153
- children: [/* @__PURE__ */ E("div", {
1154
- className: "flex items-center justify-between",
1155
- children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h3", {
1156
- className: "text-sm font-medium",
1157
- children: "Widget Actions"
1158
- }), /* @__PURE__ */ T("p", {
1159
- className: "text-xs text-text-secondary",
1160
- children: "Configure buttons on this widget"
1161
- })] }), /* @__PURE__ */ E(g, {
1162
- size: "sm",
1163
- onClick: vt,
1164
- children: [/* @__PURE__ */ T(ge, { className: "size-4" }), "Add"]
1165
- })]
1166
- }), H ? /* @__PURE__ */ T("div", {
1137
+ /* @__PURE__ */ S(t, {
1138
+ title: T("bigconsole.widget.properties.actions.heading", "Widget Actions"),
1139
+ description: T("bigconsole.widget.properties.actions.subheading", "Configure buttons on this widget"),
1140
+ headingLevel: 3,
1141
+ meta: H.length > 0 ? /* @__PURE__ */ S("span", {
1142
+ className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
1143
+ children: H.length
1144
+ }) : void 0,
1145
+ actions: /* @__PURE__ */ C(h, {
1146
+ size: "sm",
1147
+ onClick: Ct,
1148
+ children: [/* @__PURE__ */ S(ye, { className: "size-4" }), T("bigconsole.widget.properties.actions.add", "Add")]
1149
+ }),
1150
+ "data-testid": "widget-inspector-actions",
1151
+ children: at ? /* @__PURE__ */ S("div", {
1167
1152
  className: "flex justify-center py-8",
1168
- children: /* @__PURE__ */ T(Oe, { className: "size-6" })
1169
- }) : V.length === 0 ? /* @__PURE__ */ E("div", {
1170
- className: "py-8 text-center",
1171
- children: [/* @__PURE__ */ T(h, { className: "size-10 mx-auto mb-2 text-text-secondary/50" }), /* @__PURE__ */ T("p", {
1172
- className: "text-sm text-text-secondary",
1173
- children: "No actions configured"
1174
- })]
1175
- }) : /* @__PURE__ */ T("div", {
1153
+ children: /* @__PURE__ */ S(Pe, { className: "size-6" })
1154
+ }) : H.length === 0 ? /* @__PURE__ */ S("p", {
1155
+ className: "text-sm text-text-secondary",
1156
+ children: T("bigconsole.widget.properties.actions.empty", "No actions configured")
1157
+ }) : /* @__PURE__ */ S("div", {
1176
1158
  className: "space-y-2",
1177
- children: [...V].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ T(ye, {
1159
+ children: [...H].sort((e, t) => e.order - t.order).map((e, t) => /* @__PURE__ */ S(Ce, {
1178
1160
  className: e.disabled ? "opacity-60" : "",
1179
- children: /* @__PURE__ */ E(be, {
1161
+ children: /* @__PURE__ */ C(we, {
1180
1162
  className: "p-3 flex items-center gap-2",
1181
1163
  children: [
1182
- /* @__PURE__ */ E("div", {
1164
+ /* @__PURE__ */ C("div", {
1183
1165
  className: "flex flex-col gap-0.5",
1184
- children: [/* @__PURE__ */ T(g, {
1166
+ children: [/* @__PURE__ */ S(h, {
1185
1167
  variant: "ghost",
1186
1168
  size: "icon-sm",
1187
- onClick: () => St(t),
1169
+ onClick: () => Dt(t),
1188
1170
  disabled: t === 0,
1189
1171
  className: "h-5 w-5",
1190
- children: /* @__PURE__ */ T(me, { className: "size-3" })
1191
- }), /* @__PURE__ */ T(g, {
1172
+ children: /* @__PURE__ */ S(he, { className: "size-3" })
1173
+ }), /* @__PURE__ */ S(h, {
1192
1174
  variant: "ghost",
1193
1175
  size: "icon-sm",
1194
- onClick: () => Ct(t),
1195
- disabled: t === V.length - 1,
1176
+ onClick: () => Ot(t),
1177
+ disabled: t === H.length - 1,
1196
1178
  className: "h-5 w-5",
1197
- children: /* @__PURE__ */ T(pe, { className: "size-3" })
1179
+ children: /* @__PURE__ */ S(me, { className: "size-3" })
1198
1180
  })]
1199
1181
  }),
1200
- /* @__PURE__ */ E("div", {
1182
+ /* @__PURE__ */ C("div", {
1201
1183
  className: "flex-1 min-w-0",
1202
- children: [/* @__PURE__ */ E("div", {
1184
+ children: [/* @__PURE__ */ C("div", {
1203
1185
  className: "flex items-center gap-2",
1204
- children: [/* @__PURE__ */ T("span", { className: `size-2 rounded-full ${Fe[e.style] || "bg-muted-foreground"}` }), /* @__PURE__ */ T("span", {
1186
+ children: [/* @__PURE__ */ S("span", {
1187
+ "aria-hidden": "true",
1188
+ className: `size-2 shrink-0 rounded-full ${Be[e.style] || Ve}`
1189
+ }), /* @__PURE__ */ S("span", {
1205
1190
  className: "text-sm font-medium truncate",
1206
1191
  children: e.label
1207
1192
  })]
1208
- }), /* @__PURE__ */ T("p", {
1193
+ }), /* @__PURE__ */ S("p", {
1209
1194
  className: "text-xs text-text-secondary truncate",
1210
- children: _t.has(e.name) ? `→ ${_t.get(e.name)?.method} ${_t.get(e.name)?.webhookUrl}` : "Emits an event"
1195
+ children: St.has(e.name) ? T("bigconsole.widget.properties.actions.webhookSummary", "→ {{method}} {{url}}", {
1196
+ method: St.get(e.name)?.method ?? "",
1197
+ url: St.get(e.name)?.webhookUrl ?? ""
1198
+ }) : T("bigconsole.widget.properties.actions.emitsEvent", "Emits an event")
1211
1199
  })]
1212
1200
  }),
1213
- /* @__PURE__ */ E("div", {
1214
- className: "flex gap-1",
1215
- children: [/* @__PURE__ */ T(g, {
1201
+ /* @__PURE__ */ C("div", {
1202
+ className: "flex shrink-0 gap-1",
1203
+ children: [/* @__PURE__ */ S(h, {
1216
1204
  variant: "ghost",
1217
1205
  size: "icon-sm",
1218
- onClick: () => yt(e),
1219
- children: /* @__PURE__ */ T(he, { className: "size-4" })
1220
- }), /* @__PURE__ */ T(g, {
1206
+ "aria-label": `Edit ${e.label}`,
1207
+ onClick: () => wt(e),
1208
+ children: /* @__PURE__ */ S(ve, { className: "size-4" })
1209
+ }), /* @__PURE__ */ S(h, {
1221
1210
  variant: "ghost",
1222
1211
  size: "icon-sm",
1223
- onClick: () => xt(e.id),
1224
- children: /* @__PURE__ */ T(_e, { className: "size-4" })
1212
+ "aria-label": `Delete ${e.label}`,
1213
+ onClick: () => Et(e.id),
1214
+ children: /* @__PURE__ */ S(be, { className: "size-4" })
1225
1215
  })]
1226
1216
  })
1227
1217
  ]
1228
1218
  })
1229
1219
  }, e.id))
1230
- })]
1220
+ })
1231
1221
  }),
1232
- /* @__PURE__ */ E("section", {
1233
- className: "space-y-3 border-t border-border-default pt-4",
1234
- children: [/* @__PURE__ */ T("h3", {
1235
- className: "text-sm font-semibold text-text-primary",
1236
- children: "Drilldown"
1237
- }), /* @__PURE__ */ T(oe, {
1238
- widget: F,
1239
- onChange: kt
1240
- })]
1222
+ /* @__PURE__ */ S(t, {
1223
+ title: T("bigconsole.widget.properties.section.drilldown", "Drilldown"),
1224
+ description: "Where a click on this widget's data takes the viewer.",
1225
+ headingLevel: 3,
1226
+ "data-testid": "widget-inspector-drilldown",
1227
+ children: /* @__PURE__ */ S(se, {
1228
+ widget: P,
1229
+ onChange: Pt
1230
+ })
1241
1231
  }),
1242
- /* @__PURE__ */ E("section", {
1243
- className: "space-y-3 border-t border-border-default pt-4",
1244
- children: [/* @__PURE__ */ T("h3", {
1245
- className: "text-sm font-semibold text-text-primary",
1246
- children: "Webhooks"
1247
- }), /* @__PURE__ */ T(ie, {
1248
- dashboardId: F.dashboardId,
1249
- widgetId: F.id
1250
- })]
1232
+ /* @__PURE__ */ S(t, {
1233
+ title: T("bigconsole.widget.properties.section.webhooks", "Webhooks"),
1234
+ description: "HTTP endpoints called when this widget emits an event.",
1235
+ headingLevel: 3,
1236
+ "data-testid": "widget-inspector-webhooks",
1237
+ children: /* @__PURE__ */ S(ae, {
1238
+ dashboardId: P.dashboardId,
1239
+ widgetId: P.id
1240
+ })
1251
1241
  }),
1252
- /* @__PURE__ */ E("section", {
1253
- className: "space-y-3 border-t border-border-default pt-4",
1254
- children: [/* @__PURE__ */ T("h3", {
1255
- className: "text-sm font-semibold text-text-primary",
1256
- children: "Events"
1257
- }), /* @__PURE__ */ T(ae, {
1258
- dashboardId: F.dashboardId,
1259
- widgetId: F.id,
1260
- maxHeight: "calc(100vh - 350px)"
1261
- })]
1242
+ /* @__PURE__ */ S(t, {
1243
+ emphasis: "muted",
1244
+ title: T("bigconsole.widget.properties.section.events", "Events"),
1245
+ description: "Recent deliveries for this widget, newest first. Supporting detail — nothing here changes the widget.",
1246
+ headingLevel: 3,
1247
+ "data-testid": "widget-inspector-events",
1248
+ children: /* @__PURE__ */ S(oe, {
1249
+ dashboardId: P.dashboardId,
1250
+ widgetId: P.id,
1251
+ maxHeight: "min(50vh, 360px)"
1252
+ })
1262
1253
  })
1263
- ]
1254
+ ] })
1264
1255
  }),
1265
- /* @__PURE__ */ T(S, {
1256
+ /* @__PURE__ */ S(y, {
1266
1257
  value: "appearance",
1267
1258
  className: "mt-0",
1268
- children: k && /* @__PURE__ */ T(ce, {
1269
- widgetType: F.type,
1270
- config: k.config || {},
1271
- onChange: Ot
1259
+ children: O && /* @__PURE__ */ S(le, {
1260
+ widgetType: P.type,
1261
+ config: O.config || {},
1262
+ onChange: Nt
1272
1263
  })
1273
1264
  })
1274
1265
  ]
1275
1266
  })]
1276
- }) : /* @__PURE__ */ T("div", {
1277
- className: "flex-1 flex items-center justify-center p-4",
1278
- children: /* @__PURE__ */ E("div", {
1279
- className: "text-center",
1280
- children: [/* @__PURE__ */ T(h, { className: "size-12 mx-auto mb-3 text-text-secondary" }), /* @__PURE__ */ T("p", {
1267
+ }) : /* @__PURE__ */ S("div", {
1268
+ className: "flex min-h-0 flex-1 items-center justify-center p-card-padding",
1269
+ children: /* @__PURE__ */ S(t, {
1270
+ tone: "info",
1271
+ title: T("bigconsole.widget.properties.emptyState", "Select a widget to edit"),
1272
+ headingLevel: 3,
1273
+ icon: /* @__PURE__ */ S(_e, { className: "h-icon-md w-icon-md" }),
1274
+ className: "w-full max-w-sm",
1275
+ "data-testid": "widget-inspector-empty",
1276
+ children: /* @__PURE__ */ S("p", {
1281
1277
  className: "text-sm text-text-secondary",
1282
- children: "Select a widget to edit"
1283
- })]
1278
+ children: "Pick a widget on the canvas and its identity, data binding, actions and style options appear here."
1279
+ })
1284
1280
  })
1285
1281
  }),
1286
- F && /* @__PURE__ */ E("div", {
1282
+ P && /* @__PURE__ */ C("div", {
1287
1283
  style: {
1288
1284
  padding: "var(--space-cardPadding)",
1289
- borderTop: "1px solid var(--color-border)",
1285
+ borderTop: "1px solid var(--color-border-subtle)",
1290
1286
  backgroundColor: "var(--color-bg-sunken)",
1291
1287
  flexShrink: 0
1292
1288
  },
1293
1289
  children: [
1294
- j && /* @__PURE__ */ E("div", {
1295
- style: {
1296
- display: "flex",
1297
- alignItems: "center",
1298
- gap: "var(--space-iconGap)",
1299
- marginBottom: "var(--space-controlGap)",
1300
- padding: "var(--space-controlGap)",
1301
- backgroundColor: "var(--color-status-warning-bgSubtle, rgba(251, 191, 36, 0.1))",
1302
- borderRadius: "var(--radius-button)",
1303
- border: "1px solid var(--color-status-warning-border, rgba(251, 191, 36, 0.3))"
1304
- },
1305
- children: [/* @__PURE__ */ T("div", { style: {
1306
- width: "8px",
1307
- height: "8px",
1308
- borderRadius: "50%",
1309
- backgroundColor: "var(--color-status-warning-bg)",
1310
- flexShrink: 0
1311
- } }), /* @__PURE__ */ T("span", {
1312
- style: {
1313
- fontSize: "var(--font-size-body-sm)",
1314
- color: "var(--color-status-warning-text, #92400e)",
1315
- fontWeight: "var(--font-weight-medium)"
1316
- },
1317
- children: "You have unsaved changes"
1318
- })]
1290
+ A && /* @__PURE__ */ S(t, {
1291
+ tone: "warning",
1292
+ padding: "compact",
1293
+ title: T("bigconsole.widget.properties.footer.unsavedChanges", "You have unsaved changes"),
1294
+ headingLevel: 3,
1295
+ className: "mb-control-gap",
1296
+ "data-testid": "widget-inspector-save-unsaved"
1319
1297
  }),
1320
- D === "saved" && !j && /* @__PURE__ */ E("div", {
1321
- style: {
1322
- display: "flex",
1323
- alignItems: "center",
1324
- gap: "var(--space-iconGap)",
1325
- marginBottom: "var(--space-controlGap)",
1326
- padding: "var(--space-controlGap)",
1327
- backgroundColor: "var(--color-status-success-bgSubtle, rgba(34, 197, 94, 0.1))",
1328
- borderRadius: "var(--radius-button)",
1329
- border: "1px solid var(--color-status-success-border, rgba(34, 197, 94, 0.3))"
1330
- },
1331
- children: [/* @__PURE__ */ T(p, { style: {
1332
- width: "var(--size-icon-sm)",
1333
- height: "var(--size-icon-sm)",
1334
- color: "var(--color-status-success-text)",
1335
- flexShrink: 0
1336
- } }), /* @__PURE__ */ T("span", {
1337
- style: {
1338
- fontSize: "var(--font-size-body-sm)",
1339
- color: "var(--color-status-success-text)",
1340
- fontWeight: "var(--font-weight-medium)"
1341
- },
1342
- children: "All changes saved"
1343
- })]
1298
+ E === "saved" && !A && /* @__PURE__ */ S(t, {
1299
+ tone: "success",
1300
+ padding: "compact",
1301
+ title: T("bigconsole.widget.properties.footer.allSaved", "All changes saved"),
1302
+ headingLevel: 3,
1303
+ icon: /* @__PURE__ */ S(m, { className: "h-icon-sm w-icon-sm" }),
1304
+ className: "mb-control-gap",
1305
+ "data-testid": "widget-inspector-save-saved"
1344
1306
  }),
1345
- D === "error" && /* @__PURE__ */ E("div", {
1346
- style: {
1347
- display: "flex",
1348
- alignItems: "center",
1349
- gap: "var(--space-iconGap)",
1350
- marginBottom: "var(--space-controlGap)",
1351
- padding: "var(--space-controlGap)",
1352
- backgroundColor: "var(--color-status-error-bgSubtle)",
1353
- borderRadius: "var(--radius-button)",
1354
- border: "1px solid var(--color-status-error-border)"
1355
- },
1356
- children: [/* @__PURE__ */ T(ve, { style: {
1357
- width: "var(--size-icon-sm)",
1358
- height: "var(--size-icon-sm)",
1359
- color: "var(--color-status-error-text)",
1360
- flexShrink: 0
1361
- } }), /* @__PURE__ */ T("span", {
1362
- style: {
1363
- fontSize: "var(--font-size-body-sm)",
1364
- color: "var(--color-status-error-text)",
1365
- fontWeight: "var(--font-weight-medium)"
1366
- },
1367
- children: "Failed to save changes"
1368
- })]
1307
+ E === "error" && /* @__PURE__ */ S(t, {
1308
+ tone: "danger",
1309
+ padding: "compact",
1310
+ title: T("bigconsole.widget.properties.footer.saveFailed", "Failed to save changes"),
1311
+ headingLevel: 3,
1312
+ icon: /* @__PURE__ */ S(xe, { className: "h-icon-sm w-icon-sm" }),
1313
+ className: "mb-control-gap",
1314
+ "data-testid": "widget-inspector-save-error"
1369
1315
  }),
1370
- /* @__PURE__ */ E("div", {
1371
- style: {
1372
- display: "flex",
1373
- gap: "var(--space-controlGap)"
1374
- },
1375
- children: [/* @__PURE__ */ T(g, {
1376
- onClick: Et,
1377
- disabled: D === "saving" || !j,
1316
+ /* @__PURE__ */ C("div", {
1317
+ className: "flex flex-wrap gap-control-gap",
1318
+ children: [/* @__PURE__ */ S(h, {
1319
+ onClick: jt,
1320
+ disabled: E === "saving" || !A,
1378
1321
  style: {
1379
1322
  flex: 1,
1380
1323
  height: "var(--size-controlHeight-md)",
1381
- backgroundColor: j ? "var(--color-action-primary-bg)" : void 0,
1382
- opacity: j ? 1 : .5
1324
+ backgroundColor: A ? "var(--color-action-primary-bg)" : void 0,
1325
+ opacity: A ? 1 : .5
1383
1326
  },
1384
- children: D === "saving" ? /* @__PURE__ */ E("span", {
1327
+ children: E === "saving" ? /* @__PURE__ */ C("span", {
1385
1328
  style: {
1386
1329
  display: "flex",
1387
1330
  alignItems: "center",
1388
1331
  gap: "var(--space-iconGap)"
1389
1332
  },
1390
- children: [/* @__PURE__ */ T(Oe, { style: {
1333
+ children: [/* @__PURE__ */ S(Pe, { style: {
1391
1334
  width: "var(--size-icon-sm)",
1392
1335
  height: "var(--size-icon-sm)"
1393
- } }), "Saving..."]
1394
- }) : /* @__PURE__ */ E("span", {
1336
+ } }), T("bigconsole.widget.properties.footer.saving", "Saving...")]
1337
+ }) : /* @__PURE__ */ C("span", {
1395
1338
  style: {
1396
1339
  display: "flex",
1397
1340
  alignItems: "center",
1398
1341
  gap: "var(--space-iconGap)"
1399
1342
  },
1400
- children: [/* @__PURE__ */ T(p, { style: {
1343
+ children: [/* @__PURE__ */ S(m, { style: {
1401
1344
  width: "var(--size-icon-sm)",
1402
1345
  height: "var(--size-icon-sm)"
1403
- } }), "Save Changes"]
1346
+ } }), T("bigconsole.widget.properties.footer.saveChanges", "Save Changes")]
1404
1347
  })
1405
- }), /* @__PURE__ */ E(g, {
1348
+ }), /* @__PURE__ */ C(h, {
1406
1349
  variant: "outline",
1407
- onClick: Dt,
1408
- disabled: D === "saving" || !j,
1350
+ onClick: Mt,
1351
+ disabled: E === "saving" || !A,
1409
1352
  style: {
1410
1353
  height: "var(--size-controlHeight-md)",
1411
- opacity: j ? 1 : .5
1354
+ opacity: A ? 1 : .5
1412
1355
  },
1413
- children: [/* @__PURE__ */ T(ve, { style: {
1356
+ children: [/* @__PURE__ */ S(xe, { style: {
1414
1357
  width: "var(--size-icon-sm)",
1415
1358
  height: "var(--size-icon-sm)"
1416
- } }), "Discard"]
1359
+ } }), T("bigconsole.widget.properties.footer.discard", "Discard")]
1417
1360
  })]
1418
1361
  })
1419
1362
  ]
1420
1363
  }),
1421
- /* @__PURE__ */ T(re, {
1422
- isOpen: ut,
1364
+ /* @__PURE__ */ S(ie, {
1365
+ isOpen: ht,
1423
1366
  action: J,
1424
- initialWebhook: gt,
1425
- isLoading: dt,
1426
- saveError: mt,
1367
+ initialWebhook: xt,
1368
+ isLoading: gt,
1369
+ saveError: yt,
1427
1370
  onClose: () => {
1428
1371
  q(!1), Y(void 0), X(void 0), Z(null);
1429
1372
  },
1430
- onSave: bt
1373
+ onSave: Tt
1431
1374
  })
1432
1375
  ]
1433
1376
  })
1434
1377
  });
1435
1378
  });
1436
1379
  //#endregion
1437
- export { ze as default };
1380
+ export { T as default };
1438
1381
 
1439
1382
  //# sourceMappingURL=PropertiesPanel.js.map