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