@burdenoff/microfe-bigconsole 2026.1010.12 → 2026.1012.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 (161) hide show
  1. package/README.md +19 -0
  2. package/dist/bigconsole/BigConsoleRoot.js +88 -82
  3. package/dist/bigconsole/BigConsoleRoutes.js +163 -136
  4. package/dist/bigconsole/assistant/assistantProduct.js +1 -4
  5. package/dist/bigconsole/assistant/pageContext.d.ts +0 -14
  6. package/dist/bigconsole/assistant/pageContext.js +1 -6
  7. package/dist/bigconsole/assistant/recordAdapters.js +26 -27
  8. package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +31 -31
  9. package/dist/bigconsole/components/common/index.d.ts +0 -1
  10. package/dist/bigconsole/components/common/index.js +0 -1
  11. package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +44 -44
  12. package/dist/bigconsole/components/dashboard/DashboardCanvas.js +36 -36
  13. package/dist/bigconsole/components/dashboard/DashboardToolbar.js +59 -59
  14. package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +58 -57
  15. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
  16. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +41 -41
  17. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
  18. package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +34 -34
  19. package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +110 -110
  20. package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +21 -21
  21. package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
  22. package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +164 -173
  23. package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -101
  24. package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +31 -31
  25. package/dist/bigconsole/components/dashboard/TemplateLayoutPreview.js +15 -15
  26. package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
  27. package/dist/bigconsole/components/dashboard/WidgetPalette.js +165 -163
  28. package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +37 -37
  29. package/dist/bigconsole/components/datasink/AlertRuleEditor.js +66 -66
  30. package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
  31. package/dist/bigconsole/components/datasink/DataSinkCard.js +50 -51
  32. package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
  33. package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
  34. package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +47 -47
  35. package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +91 -91
  36. package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
  37. package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
  38. package/dist/bigconsole/components/parser/ImportParserDialog.js +120 -120
  39. package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
  40. package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +10 -10
  41. package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +76 -77
  42. package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -96
  43. package/dist/bigconsole/components/widgets/ActionConfigDialog.js +4 -4
  44. package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +93 -93
  45. package/dist/bigconsole/components/widgets/PropertiesPanel.js +499 -507
  46. package/dist/bigconsole/components/widgets/WidgetRegistry.js +0 -1
  47. package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +4 -4
  48. package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
  49. package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
  50. package/dist/bigconsole/components/widgets/custom/CustomWidget.js +73 -131
  51. package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
  52. package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
  53. package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
  54. package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
  55. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.d.ts +28 -9
  56. package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +115 -42
  57. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.d.ts +20 -0
  58. package/dist/bigconsole/components/widgets/iframe-widget/framePolicy.js +10 -0
  59. package/dist/bigconsole/components/widgets/iframe-widget/index.d.ts +2 -1
  60. package/dist/bigconsole/components/widgets/iframe-widget/index.js +3 -2
  61. package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
  62. package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
  63. package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
  64. package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
  65. package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
  66. package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
  67. package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
  68. package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
  69. package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +110 -27
  70. package/dist/bigconsole/components/widgets/text-widget/textData.d.ts +6 -0
  71. package/dist/bigconsole/components/widgets/text-widget/textData.js +17 -14
  72. package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
  73. package/dist/bigconsole/components/workflow/WorkflowOpenGuard.js +15 -15
  74. package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +15 -15
  75. package/dist/bigconsole/context/BigConsoleContext.d.ts +10 -0
  76. package/dist/bigconsole/context/BigConsoleContext.js +47 -30
  77. package/dist/bigconsole/context/index.d.ts +1 -1
  78. package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +58 -49
  79. package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +74 -72
  80. package/dist/bigconsole/customWidget/proposalPreview.d.ts +5 -0
  81. package/dist/bigconsole/customWidget/proposalPreview.js +31 -0
  82. package/dist/bigconsole/hooks/useDataSinkAlerts.d.ts +0 -23
  83. package/dist/bigconsole/hooks/useDataSinkAlerts.js +113 -138
  84. package/dist/bigconsole/hooks/useDataSinkOperations.d.ts +7 -0
  85. package/dist/bigconsole/hooks/useDataSinkOperations.js +109 -98
  86. package/dist/bigconsole/hooks/useDataSinkSubscription.js +0 -1
  87. package/dist/bigconsole/hooks/useDrilldown.js +68 -67
  88. package/dist/bigconsole/hooks/useExportDataSink.js +1 -1
  89. package/dist/bigconsole/hooks/useGlobalFilters.js +3 -3
  90. package/dist/bigconsole/hooks/useImportDataSink.js +102 -90
  91. package/dist/bigconsole/pages/AdminPage.js +130 -130
  92. package/dist/bigconsole/pages/DashboardBuilderPage.js +60 -72
  93. package/dist/bigconsole/pages/DashboardViewPage.js +235 -258
  94. package/dist/bigconsole/pages/DashboardsPage.js +221 -269
  95. package/dist/bigconsole/pages/DataParsersPage.js +157 -180
  96. package/dist/bigconsole/pages/DataSinkAlertsPage.js +55 -62
  97. package/dist/bigconsole/pages/DataSinkBuilderPage.js +318 -295
  98. package/dist/bigconsole/pages/DataSinkViewPage.js +256 -255
  99. package/dist/bigconsole/pages/DataSinksPage.js +216 -251
  100. package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
  101. package/dist/bigconsole/pages/InsightsPage.js +265 -279
  102. package/dist/bigconsole/pages/OverviewPage.js +47 -47
  103. package/dist/bigconsole/pages/ParserBuilderPage.js +213 -229
  104. package/dist/bigconsole/pages/ParserViewPage.js +97 -97
  105. package/dist/bigconsole/pages/PipelineBuilderPage.js +214 -256
  106. package/dist/bigconsole/pages/PipelineViewPage.js +146 -146
  107. package/dist/bigconsole/pages/PipelinesPage.js +88 -107
  108. package/dist/bigconsole/pages/SettingsPage.js +173 -179
  109. package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
  110. package/dist/bigconsole/pages/WorkflowViewPage.js +1 -1
  111. package/dist/bigconsole/pages/WorkflowsPage.js +141 -141
  112. package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +12 -12
  113. package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +235 -122
  114. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.d.ts +6 -1
  115. package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +151 -151
  116. package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
  117. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.d.ts +29 -0
  118. package/dist/bigconsole/renderers/adapters/adaptiveCardContent.js +51 -0
  119. package/dist/bigconsole/store/widgetStore.d.ts +0 -12
  120. package/dist/bigconsole/store/widgetStore.js +1 -3
  121. package/dist/bigconsole/types/index.d.ts +17 -2
  122. package/dist/bigconsole/utils/backendError.d.ts +0 -18
  123. package/dist/bigconsole/utils/dataSinkPayload.d.ts +48 -0
  124. package/dist/bigconsole/utils/dataSinkPayload.js +38 -0
  125. package/dist/bigconsole/utils/index.d.ts +2 -0
  126. package/dist/bigconsole/utils/safeUrl.d.ts +79 -0
  127. package/dist/bigconsole/utils/safeUrl.js +93 -0
  128. package/dist/bigconsole/utils/sanitizeHtml.d.ts +16 -0
  129. package/dist/bigconsole/utils/sanitizeHtml.js +67 -0
  130. package/dist/bigconsole/workflowOpen.js +14 -15
  131. package/dist/generated/wspace-operations.d.ts +138 -8
  132. package/dist/generated/wspace-operations.js +281 -240
  133. package/dist/node_modules/dompurify/dist/purify.es.js +800 -0
  134. package/package.json +9 -5
  135. package/dist/bigconsole/assistant/displayCopy.d.ts +0 -32
  136. package/dist/bigconsole/assistant/pageControls.d.ts +0 -81
  137. package/dist/bigconsole/assistant/pageControls.js +0 -169
  138. package/dist/bigconsole/assistant/previewControl.d.ts +0 -16
  139. package/dist/bigconsole/assistant/previewControl.js +0 -10
  140. package/dist/bigconsole/assistant/usePreviewControl.d.ts +0 -2
  141. package/dist/bigconsole/assistant/usePreviewControl.js +0 -20
  142. package/dist/bigconsole/components/common/SortBySelect.d.ts +0 -11
  143. package/dist/bigconsole/components/common/SortBySelect.js +0 -29
  144. package/dist/bigconsole/constants/backendErrors.js +0 -94
  145. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.d.ts +0 -14
  146. package/dist/bigconsole/hooks/useDashboardLayoutBaseline.js +0 -32
  147. package/dist/bigconsole/utils/backendError.js +0 -42
  148. package/dist/bigconsole/utils/dashboardList.d.ts +0 -28
  149. package/dist/bigconsole/utils/dashboardList.js +0 -15
  150. package/dist/bigconsole/utils/dataSinkList.d.ts +0 -15
  151. package/dist/bigconsole/utils/dataSinkList.js +0 -15
  152. package/dist/bigconsole/utils/formDirty.d.ts +0 -82
  153. package/dist/bigconsole/utils/formDirty.js +0 -21
  154. package/dist/bigconsole/utils/insightsDraft.d.ts +0 -29
  155. package/dist/bigconsole/utils/insightsDraft.js +0 -8
  156. package/dist/bigconsole/utils/layoutBaseline.d.ts +0 -130
  157. package/dist/bigconsole/utils/layoutBaseline.js +0 -96
  158. package/dist/bigconsole/utils/listSort.d.ts +0 -80
  159. package/dist/bigconsole/utils/listSort.js +0 -85
  160. package/dist/bigconsole/utils/widgetFormDirty.d.ts +0 -16
  161. package/dist/bigconsole/utils/widgetFormDirty.js +0 -13
@@ -6,18 +6,16 @@ import { Section as r, SectionStack as i } from "../components/common/Section.js
6
6
  import "../components/common/index.js";
7
7
  import a from "../hooks/useBigConsoleAnalytics.js";
8
8
  import { isNative as ee, nativeImpact as o, nativeNotify as te } from "../../utils/nativeBridge.js";
9
- import { isInsightsDraftDirty as ne } from "../utils/insightsDraft.js";
10
9
  /* empty css */
11
- import { memo as s, useCallback as c, useEffect as re, useState as l } from "react";
12
- import { AlertCircle as ie, ArrowRight as u, Ban as ae, CheckCircle as d, Clock as f, Eye as oe, History as se, Lightbulb as ce, Loader2 as p, RefreshCw as le, Sparkles as m, Trash2 as ue, Wand2 as h, X as de, XCircle as g } from "lucide-react";
13
- import { AuroraBackground as fe, GlassCard as pe, GradientText as me, IllustratedEmptyState as he, PagePurpose as ge } from "@burdenoff/fe-libs/ui";
14
- import { useUnsavedChanges as _e } from "@burdenoff/fe-libs/shared/hooks";
15
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
16
- import { useMutation as v, useQuery as y } from "@apollo/client/react";
10
+ import { memo as s, useCallback as c, useEffect as l, useState as u } from "react";
11
+ import { AlertCircle as d, ArrowRight as f, Ban as ne, CheckCircle as p, Clock as m, Eye as re, History as ie, Lightbulb as ae, Loader2 as h, RefreshCw as oe, Sparkles as g, Trash2 as se, Wand2 as _, X as ce, XCircle as v } from "lucide-react";
12
+ import { AuroraBackground as le, GlassCard as ue, GradientText as de, IllustratedEmptyState as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
13
+ import { useMutation as y, useQuery as me } from "@apollo/client/react";
17
14
  import { jsx as b, jsxs as x } from "react/jsx-runtime";
18
15
  import { gql as S } from "@apollo/client";
16
+ import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
19
17
  //#region src/bigconsole/pages/InsightsPage.tsx
20
- var ve = S`
18
+ var he = S`
21
19
  query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
22
20
  listPromptGenerations(status: $status, first: $first) {
23
21
  edges {
@@ -57,7 +55,7 @@ var ve = S`
57
55
  totalCount
58
56
  }
59
57
  }
60
- `, ye = S`
58
+ `, ge = S`
61
59
  query GetPromptSuggestions($category: String, $limit: Int) {
62
60
  getPromptSuggestions(category: $category, limit: $limit) {
63
61
  id
@@ -68,7 +66,7 @@ var ve = S`
68
66
  tags
69
67
  }
70
68
  }
71
- `, be = S`
69
+ `, _e = S`
72
70
  mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
73
71
  generateDashboardFromPrompt(input: $input) {
74
72
  id
@@ -76,24 +74,24 @@ var ve = S`
76
74
  prompt
77
75
  }
78
76
  }
79
- `, xe = S`
77
+ `, ve = S`
80
78
  mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
81
79
  createDashboardFromGeneration(input: $input) {
82
80
  id
83
81
  }
84
82
  }
85
- `, Se = S`
83
+ `, ye = S`
86
84
  mutation DeletePromptGeneration($generationId: ID!) {
87
85
  deletePromptGeneration(generationId: $generationId)
88
86
  }
89
- `, Ce = S`
87
+ `, be = S`
90
88
  mutation CancelPromptGeneration($generationId: ID!) {
91
89
  cancelPromptGeneration(generationId: $generationId) {
92
90
  id
93
91
  status
94
92
  }
95
93
  }
96
- `, we = S`
94
+ `, xe = S`
97
95
  mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
98
96
  regenerateDashboard(input: $input) {
99
97
  id
@@ -101,7 +99,7 @@ var ve = S`
101
99
  prompt
102
100
  }
103
101
  }
104
- `, Te = S`
102
+ `, Se = S`
105
103
  mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
106
104
  refineGeneratedDashboard(input: $input) {
107
105
  id
@@ -109,11 +107,11 @@ var ve = S`
109
107
  prompt
110
108
  }
111
109
  }
112
- `, Ee = [
110
+ `, Ce = [
113
111
  "PENDING",
114
112
  "PROCESSING",
115
113
  "GENERATING"
116
- ], De = 12, Oe = 8, ke = [
114
+ ], we = 12, Te = 8, Ee = [
117
115
  {
118
116
  value: "MODERN",
119
117
  label: "Modern"
@@ -134,7 +132,7 @@ var ve = S`
134
132
  value: "VIBRANT",
135
133
  label: "Vibrant"
136
134
  }
137
- ], Ae = [
135
+ ], De = [
138
136
  {
139
137
  value: "GRID",
140
138
  label: "Grid"
@@ -159,20 +157,20 @@ var ve = S`
159
157
  value: "THREE_COLUMN",
160
158
  label: "Three column"
161
159
  }
162
- ], je = [
160
+ ], Oe = [
163
161
  6,
164
162
  8,
165
163
  12,
166
164
  16,
167
165
  24
168
- ], Me = [
166
+ ], ke = [
169
167
  4,
170
168
  6,
171
169
  8,
172
170
  12,
173
171
  16,
174
172
  24
175
- ], C = {
173
+ ], w = {
176
174
  display: "inline-flex",
177
175
  alignItems: "center",
178
176
  justifyContent: "center",
@@ -184,35 +182,35 @@ var ve = S`
184
182
  fontWeight: "var(--font-weight-medium)",
185
183
  lineHeight: 1.2,
186
184
  cursor: "pointer"
187
- }, w = {
188
- ...C,
185
+ }, T = {
186
+ ...w,
189
187
  border: "1px solid var(--color-border-default)",
190
188
  backgroundColor: "transparent",
191
189
  color: "var(--color-text-primary)"
192
- }, T = {
193
- ...C,
190
+ }, E = {
191
+ ...w,
194
192
  border: "1px solid transparent",
195
193
  backgroundColor: "var(--color-action-primary-bg)",
196
194
  color: "var(--color-action-primary-text)"
197
- }, Ne = {
198
- ...C,
195
+ }, Ae = {
196
+ ...w,
199
197
  border: "1px solid var(--color-status-warning-border)",
200
198
  backgroundColor: "transparent",
201
199
  color: "var(--color-status-warning-text)"
202
- }, Pe = {
203
- ...C,
200
+ }, D = {
201
+ ...w,
204
202
  minWidth: "var(--size-controlHeight-md)",
205
203
  padding: "0 var(--space-controlGap)",
206
204
  border: "1px solid var(--color-border-default)",
207
205
  backgroundColor: "transparent",
208
206
  color: "var(--color-status-error-text)"
209
- }, E = {
207
+ }, O = {
210
208
  display: "block",
211
209
  marginBottom: "2px",
212
210
  fontSize: "var(--font-size-body-sm)",
213
211
  fontWeight: "var(--font-weight-medium)",
214
212
  color: "var(--color-text-secondary)"
215
- }, D = {
213
+ }, k = {
216
214
  width: "100%",
217
215
  minHeight: "var(--size-controlHeight-md)",
218
216
  padding: "0 var(--space-controlGap)",
@@ -221,7 +219,7 @@ var ve = S`
221
219
  backgroundColor: "var(--color-bg-canvas)",
222
220
  color: "var(--color-text-primary)",
223
221
  fontSize: "var(--font-size-body-sm)"
224
- }, O = {
222
+ }, A = {
225
223
  display: "inline-flex",
226
224
  alignItems: "center",
227
225
  gap: "var(--space-iconGap)",
@@ -233,7 +231,7 @@ var ve = S`
233
231
  backgroundColor: "var(--color-bg-sunken)",
234
232
  color: "var(--color-text-secondary)"
235
233
  };
236
- function k(e) {
234
+ function j(e) {
237
235
  switch (e) {
238
236
  case "COMPLETED": return "success";
239
237
  case "FAILED": return "danger";
@@ -243,7 +241,7 @@ function k(e) {
243
241
  default: return "neutral";
244
242
  }
245
243
  }
246
- var A = {
244
+ var M = {
247
245
  success: {
248
246
  text: "var(--color-status-success-text)",
249
247
  bg: "var(--color-status-success-bgSubtle)",
@@ -265,36 +263,36 @@ var A = {
265
263
  border: "var(--color-border-subtle)"
266
264
  }
267
265
  };
268
- function Fe(e) {
269
- let t = A[k(e)].text;
266
+ function je(e) {
267
+ let t = M[j(e)].text;
270
268
  switch (e) {
271
- case "COMPLETED": return /* @__PURE__ */ b(d, {
269
+ case "COMPLETED": return /* @__PURE__ */ b(p, {
272
270
  size: 14,
273
271
  style: { color: t },
274
272
  "aria-hidden": "true"
275
273
  });
276
274
  case "FAILED":
277
- case "CANCELLED": return /* @__PURE__ */ b(g, {
275
+ case "CANCELLED": return /* @__PURE__ */ b(v, {
278
276
  size: 14,
279
277
  style: { color: t },
280
278
  "aria-hidden": "true"
281
279
  });
282
280
  case "PENDING":
283
281
  case "PROCESSING":
284
- case "GENERATING": return /* @__PURE__ */ b(p, {
282
+ case "GENERATING": return /* @__PURE__ */ b(h, {
285
283
  size: 14,
286
284
  className: "animate-spin",
287
285
  style: { color: t },
288
286
  "aria-hidden": "true"
289
287
  });
290
- default: return /* @__PURE__ */ b(f, {
288
+ default: return /* @__PURE__ */ b(m, {
291
289
  size: 14,
292
290
  style: { color: t },
293
291
  "aria-hidden": "true"
294
292
  });
295
293
  }
296
294
  }
297
- function j(e, t) {
295
+ function N(e, t) {
298
296
  switch (e) {
299
297
  case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
300
298
  case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
@@ -305,44 +303,44 @@ function j(e, t) {
305
303
  default: return e;
306
304
  }
307
305
  }
308
- var Ie = ({ status: e }) => {
309
- let { t } = _(), n = A[k(e)];
306
+ var Me = ({ status: e }) => {
307
+ let { t } = C(), n = M[j(e)];
310
308
  return /* @__PURE__ */ x("span", {
311
309
  "data-status": e,
312
310
  style: {
313
- ...O,
311
+ ...A,
314
312
  border: `1px solid ${n.border}`,
315
313
  backgroundColor: n.bg,
316
314
  color: n.text
317
315
  },
318
- children: [Fe(e), j(e, t)]
316
+ children: [je(e), N(e, t)]
319
317
  });
320
318
  };
321
- function Le(e) {
322
- let t = A[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
319
+ function Ne(e) {
320
+ let t = M[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
323
321
  return {
324
- ...O,
322
+ ...A,
325
323
  border: `1px solid ${t.border}`,
326
324
  backgroundColor: t.bg,
327
325
  color: t.text
328
326
  };
329
327
  }
330
- function M(e) {
328
+ function P(e) {
331
329
  return e.pages.reduce((e, t) => e + t.widgets.length, 0);
332
330
  }
333
- function Re(e) {
331
+ function Pe(e) {
334
332
  let t = e?.toUpperCase();
335
333
  return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
336
334
  }
337
- var ze = {
335
+ var Fe = {
338
336
  HIGH: "success",
339
337
  MEDIUM: "neutral",
340
338
  LOW: "danger"
341
339
  };
342
- function Be(e) {
340
+ function Ie(e) {
343
341
  return { "--proposal-columns": Math.max(1, Math.min(24, Math.trunc(e))) };
344
342
  }
345
- function Ve(e, t) {
343
+ function Le(e, t) {
346
344
  let n = Math.max(1, Math.min(24, Math.trunc(t))), r = Math.max(0, Math.min(n - 1, Math.trunc(e.x)));
347
345
  return {
348
346
  "--proposal-column": r + 1,
@@ -351,10 +349,10 @@ function Ve(e, t) {
351
349
  "--proposal-height": Math.max(1, Math.min(24, Math.trunc(e.height)))
352
350
  };
353
351
  }
354
- function He(e) {
355
- let t = A[ze[e]];
352
+ function Re(e) {
353
+ let t = M[Fe[e]];
356
354
  return {
357
- ...O,
355
+ ...A,
358
356
  padding: "0 var(--space-controlGap)",
359
357
  fontSize: "var(--font-size-xs)",
360
358
  fontWeight: "var(--font-weight-semibold)",
@@ -364,155 +362,143 @@ function He(e) {
364
362
  color: t.text
365
363
  };
366
364
  }
367
- var N = s(function() {
368
- let { t: s } = _(), d = e(), f = a(), [g, S] = l(""), [C, k] = l("MODERN"), [A, Fe] = l("GRID"), [j, ze] = l(De), [N, Ue] = l(Oe), [P, F] = l(!1), [I, L] = l(null), [R, z] = l(() => /* @__PURE__ */ new Set()), [B, V] = l(null), [H, U] = l(null), [W, G] = l("");
369
- _e({
370
- id: "insights-prompt",
371
- label: s("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
372
- dirty: ne({
373
- promptText: g,
374
- isGenerating: P,
375
- refineOpen: H !== null,
376
- refineText: W,
377
- refineBusy: H !== null && R.has(H.id)
378
- })
379
- });
380
- let K = c((e) => {
381
- z((t) => new Set(t).add(e));
382
- }, []), q = c((e) => {
383
- z((t) => {
365
+ var F = s(function() {
366
+ let { t: s } = C(), p = e(), m = a(), [v, S] = u(""), [w, j] = u("MODERN"), [M, je] = u("GRID"), [N, Fe] = u(we), [F, ze] = u(Te), [I, Be] = u(!1), [Ve, L] = u(null), [R, He] = u(() => /* @__PURE__ */ new Set()), [z, B] = u(null), [V, H] = u(null), [U, W] = u(""), G = c((e) => {
367
+ He((t) => new Set(t).add(e));
368
+ }, []), K = c((e) => {
369
+ He((t) => {
384
370
  let n = new Set(t);
385
371
  return n.delete(e), n;
386
372
  });
387
- }, []), { data: We, loading: Ge, error: J, refetch: Y, startPolling: Ke, stopPolling: X } = y(ve, {
373
+ }, []), { data: Ue, loading: We, error: q, refetch: J, startPolling: Ge, stopPolling: Y } = me(he, {
388
374
  variables: { first: 20 },
389
375
  fetchPolicy: "cache-and-network"
390
- }), Z = We?.listPromptGenerations?.edges?.some((e) => Ee.includes(e.node.status)) ?? !1, { data: qe, error: Je, refetch: Ye } = y(ye, { variables: { limit: 6 } }), [Xe] = v(be), [Ze] = v(xe), [Qe] = v(Se), [$e] = v(Ce), [et] = v(we), [tt] = v(Te), Q = We?.listPromptGenerations?.edges?.map((e) => e.node) || [], nt = qe?.getPromptSuggestions || [];
391
- re(() => (Z || P ? Ke(2e3) : X(), () => X()), [
392
- Z,
393
- P,
394
- Ke,
395
- X
396
- ]), re(() => {
397
- if (!B && !H) return;
376
+ }), X = Ue?.listPromptGenerations?.edges?.some((e) => Ce.includes(e.node.status)) ?? !1, { data: Ke, error: qe, refetch: Je } = me(ge, { variables: { limit: 6 } }), [Ye] = y(_e), [Xe] = y(ve), [Ze] = y(ye), [Qe] = y(be), [$e] = y(xe), [et] = y(Se), Z = Ue?.listPromptGenerations?.edges?.map((e) => e.node) || [], tt = Ke?.getPromptSuggestions || [];
377
+ l(() => (X || I ? Ge(2e3) : Y(), () => Y()), [
378
+ X,
379
+ I,
380
+ Ge,
381
+ Y
382
+ ]), l(() => {
383
+ if (!z && !V) return;
398
384
  let e = (e) => {
399
- e.key === "Escape" && (V(null), U(null));
385
+ e.key === "Escape" && (B(null), H(null));
400
386
  };
401
387
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
402
- }, [B, H]);
403
- let rt = c(async () => {
404
- if (!(!g.trim() || P)) {
405
- if (g.length > 2e3) {
388
+ }, [z, V]);
389
+ let nt = c(async () => {
390
+ if (!(!v.trim() || I)) {
391
+ if (v.length > 2e3) {
406
392
  L(s("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
407
393
  return;
408
394
  }
409
- L(null), F(!0);
395
+ L(null), Be(!0);
410
396
  try {
411
- f("bigconsole.ai.generate_clicked", { maxWidgets: N });
412
- let e = await Xe({ variables: { input: {
413
- prompt: g.trim(),
414
- styleType: C,
415
- layoutType: A,
416
- gridColumns: j,
417
- maxWidgets: N
397
+ m("bigconsole.ai.generate_clicked", { maxWidgets: F });
398
+ let e = await Ye({ variables: { input: {
399
+ prompt: v.trim(),
400
+ styleType: w,
401
+ layoutType: M,
402
+ gridColumns: N,
403
+ maxWidgets: F
418
404
  } } });
419
405
  if (t(e, "command")) return;
420
406
  let n = e.data?.generateDashboardFromPrompt?.id;
421
- n && f("bigconsole.ai.dashboard_generated", {
407
+ n && m("bigconsole.ai.dashboard_generated", {
422
408
  generationId: n,
423
- maxWidgets: N
424
- }), S(""), Y();
409
+ maxWidgets: F
410
+ }), S(""), J();
425
411
  } catch (e) {
426
412
  if (t(e, "command")) return;
427
413
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
428
414
  } finally {
429
- F(!1);
415
+ Be(!1);
430
416
  }
431
417
  }
432
418
  }, [
433
- f,
434
- g,
435
- P,
436
- Xe,
437
- Y,
438
- C,
439
- A,
440
- j,
419
+ m,
420
+ v,
421
+ I,
422
+ Ye,
423
+ J,
424
+ w,
425
+ M,
441
426
  N,
427
+ F,
442
428
  s
443
- ]), it = c(async (e) => {
429
+ ]), Q = c(async (e) => {
444
430
  L(null);
445
431
  try {
446
- f("bigconsole.ai.create_dashboard_clicked", { generationId: e });
447
- let n = await Ze({ variables: { input: { generationId: e } } });
432
+ m("bigconsole.ai.create_dashboard_clicked", { generationId: e });
433
+ let n = await Xe({ variables: { input: { generationId: e } } });
448
434
  if (t(n, "project")) return;
449
435
  let r = n.data?.createDashboardFromGeneration?.id;
450
- r && (f("bigconsole.ai.dashboard_created", {
436
+ r && (m("bigconsole.ai.dashboard_created", {
451
437
  generationId: e,
452
438
  dashboardId: r
453
- }), d(`/dashboards/${r}`));
439
+ }), p(`/dashboards/${r}`));
454
440
  } catch (e) {
455
441
  if (t(e, "project")) return;
456
442
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
457
443
  }
458
444
  }, [
459
- Ze,
460
- f,
461
- d,
445
+ Xe,
446
+ m,
447
+ p,
462
448
  s
463
- ]), at = c(async (e) => {
449
+ ]), rt = c(async (e) => {
464
450
  L(null);
465
451
  try {
466
- await Qe({ variables: { generationId: e } }), ee() && te("success"), Y();
452
+ await Ze({ variables: { generationId: e } }), ee() && te("success"), J();
467
453
  } catch (e) {
468
454
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && te("error");
469
455
  }
470
456
  }, [
471
- Qe,
472
- Y,
457
+ Ze,
458
+ J,
473
459
  s
474
- ]), ot = c(async (e) => {
475
- L(null), K(e);
460
+ ]), it = c(async (e) => {
461
+ L(null), G(e);
476
462
  try {
477
- await $e({ variables: { generationId: e } }), Y();
463
+ await Qe({ variables: { generationId: e } }), J();
478
464
  } catch (e) {
479
465
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
480
466
  } finally {
481
- q(e);
467
+ K(e);
482
468
  }
483
469
  }, [
484
- $e,
485
- Y,
470
+ Qe,
471
+ J,
486
472
  s
487
- ]), st = c(async (e) => {
488
- L(null), K(e);
473
+ ]), at = c(async (e) => {
474
+ L(null), G(e);
489
475
  try {
490
- if (t(await et({ variables: { input: { generationId: e } } }), "command")) return;
491
- Y();
476
+ if (t(await $e({ variables: { input: { generationId: e } } }), "command")) return;
477
+ J();
492
478
  } catch (e) {
493
479
  if (t(e, "command")) return;
494
480
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
495
481
  } finally {
496
- q(e);
482
+ K(e);
497
483
  }
498
484
  }, [
499
- et,
500
- Y,
485
+ $e,
486
+ J,
501
487
  s
502
- ]), ct = c(async () => {
503
- if (!H || !W.trim()) return;
504
- let e = H.id;
505
- L(null), K(e);
488
+ ]), ot = c(async () => {
489
+ if (!V || !U.trim()) return;
490
+ let e = V.id;
491
+ L(null), G(e);
506
492
  let n = !1;
507
493
  try {
508
- if (t(await tt({ variables: { input: {
494
+ if (t(await et({ variables: { input: {
509
495
  generationId: e,
510
- refinementPrompt: W.trim()
496
+ refinementPrompt: U.trim()
511
497
  } } }), "command")) {
512
498
  n = !0;
513
499
  return;
514
500
  }
515
- n = !0, Y();
501
+ n = !0, J();
516
502
  } catch (e) {
517
503
  if (t(e, "command")) {
518
504
  n = !0;
@@ -520,17 +506,17 @@ var N = s(function() {
520
506
  }
521
507
  L(e instanceof Error ? e.message : s("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
522
508
  } finally {
523
- n && (U(null), G("")), q(e);
509
+ n && (H(null), W("")), K(e);
524
510
  }
525
511
  }, [
526
- H,
527
- W,
528
- tt,
529
- Y,
512
+ V,
513
+ U,
514
+ et,
515
+ J,
530
516
  s
531
- ]), lt = c((e) => {
517
+ ]), st = c((e) => {
532
518
  S(e);
533
- }, []), $ = B?.generatedSpec;
519
+ }, []), $ = z?.generatedSpec;
534
520
  return /* @__PURE__ */ x("div", {
535
521
  "data-tour": "bigconsole-ai-insights",
536
522
  className: "min-w-0",
@@ -538,7 +524,7 @@ var N = s(function() {
538
524
  children: [
539
525
  /* @__PURE__ */ x("header", {
540
526
  className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
541
- children: [/* @__PURE__ */ b(fe, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
527
+ children: [/* @__PURE__ */ b(le, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
542
528
  style: { padding: "var(--space-pagePadding)" },
543
529
  children: /* @__PURE__ */ x("div", {
544
530
  style: {
@@ -559,7 +545,7 @@ var N = s(function() {
559
545
  borderRadius: "var(--radius-card)",
560
546
  backgroundColor: "var(--color-action-primary-bg)"
561
547
  },
562
- children: /* @__PURE__ */ b(m, { style: {
548
+ children: /* @__PURE__ */ b(g, { style: {
563
549
  height: "var(--size-icon-lg)",
564
550
  width: "var(--size-icon-lg)",
565
551
  color: "var(--color-action-primary-text)"
@@ -568,7 +554,7 @@ var N = s(function() {
568
554
  style: { minWidth: 0 },
569
555
  children: [/* @__PURE__ */ b("h1", {
570
556
  className: "m-0 text-2xl font-bold text-text-primary",
571
- children: /* @__PURE__ */ b(me, { children: s("bigconsole.insights.header.title", "AI Insights") })
557
+ children: /* @__PURE__ */ b(de, { children: s("bigconsole.insights.header.title", "AI Insights") })
572
558
  }), /* @__PURE__ */ b("p", {
573
559
  className: "m-0 text-sm text-text-secondary",
574
560
  children: s("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
@@ -579,28 +565,28 @@ var N = s(function() {
579
565
  }),
580
566
  /* @__PURE__ */ x("div", {
581
567
  style: { padding: "var(--space-pagePadding)" },
582
- children: [/* @__PURE__ */ b(ge, {
568
+ children: [/* @__PURE__ */ b(pe, {
583
569
  className: "mb-[var(--space-sectionGap)]",
584
570
  children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
585
571
  }), /* @__PURE__ */ x(i, { children: [
586
- I && /* @__PURE__ */ b(r, {
572
+ Ve && /* @__PURE__ */ b(r, {
587
573
  headingLevel: 2,
588
574
  tone: "danger",
589
575
  padding: "compact",
590
576
  title: "That request did not go through",
591
- description: I,
592
- icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" }),
577
+ description: Ve,
578
+ icon: /* @__PURE__ */ b(d, { className: "h-icon-sm w-icon-sm" }),
593
579
  "data-testid": "insights-error",
594
580
  actions: /* @__PURE__ */ b("button", {
595
581
  type: "button",
596
582
  onClick: () => L(null),
597
583
  "aria-label": s("bigconsole.insights.error.dismiss", "Dismiss error"),
598
584
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
599
- style: w,
585
+ style: T,
600
586
  children: "Dismiss"
601
587
  })
602
588
  }),
603
- (J || Je) && /* @__PURE__ */ b("div", {
589
+ (q || qe) && /* @__PURE__ */ b("div", {
604
590
  role: "alert",
605
591
  children: /* @__PURE__ */ b(r, {
606
592
  tone: "danger",
@@ -612,12 +598,12 @@ var N = s(function() {
612
598
  actions: /* @__PURE__ */ x("button", {
613
599
  type: "button",
614
600
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
615
- style: w,
601
+ style: T,
616
602
  onClick: () => {
617
- J && Y().catch(() => void 0), Je && Ye().catch(() => void 0);
603
+ q && J().catch(() => void 0), qe && Je().catch(() => void 0);
618
604
  },
619
605
  children: [
620
- /* @__PURE__ */ b(le, {
606
+ /* @__PURE__ */ b(oe, {
621
607
  size: 14,
622
608
  "aria-hidden": "true"
623
609
  }),
@@ -633,7 +619,7 @@ var N = s(function() {
633
619
  headingLevel: 2,
634
620
  title: "Describe your dashboard",
635
621
  description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
636
- icon: /* @__PURE__ */ b(m, { className: "h-icon-sm w-icon-sm" }),
622
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" }),
637
623
  "data-testid": "insights-prompt",
638
624
  children: /* @__PURE__ */ x("div", {
639
625
  style: {
@@ -654,7 +640,7 @@ var N = s(function() {
654
640
  }),
655
641
  /* @__PURE__ */ b("textarea", {
656
642
  id: "prompt-input",
657
- value: g,
643
+ value: v,
658
644
  onChange: (e) => S(e.target.value),
659
645
  placeholder: s("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
660
646
  rows: 3,
@@ -672,7 +658,7 @@ var N = s(function() {
672
658
  resize: "vertical"
673
659
  },
674
660
  onKeyDown: (e) => {
675
- e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), rt());
661
+ e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), nt());
676
662
  }
677
663
  }),
678
664
  /* @__PURE__ */ x("div", {
@@ -687,60 +673,60 @@ var N = s(function() {
687
673
  children: [
688
674
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
689
675
  htmlFor: "prompt-style",
690
- style: E,
676
+ style: O,
691
677
  children: s("bigconsole.insights.prompt.style", "Style")
692
678
  }), /* @__PURE__ */ b("select", {
693
679
  id: "prompt-style",
694
- value: C,
695
- onChange: (e) => k(e.target.value),
680
+ value: w,
681
+ onChange: (e) => j(e.target.value),
696
682
  className: n,
697
- style: D,
698
- children: ke.map((e) => /* @__PURE__ */ b("option", {
683
+ style: k,
684
+ children: Ee.map((e) => /* @__PURE__ */ b("option", {
699
685
  value: e.value,
700
686
  children: e.label
701
687
  }, e.value))
702
688
  })] }),
703
689
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
704
690
  htmlFor: "prompt-layout",
705
- style: E,
691
+ style: O,
706
692
  children: s("bigconsole.insights.prompt.layout", "Layout")
707
693
  }), /* @__PURE__ */ b("select", {
708
694
  id: "prompt-layout",
709
- value: A,
710
- onChange: (e) => Fe(e.target.value),
695
+ value: M,
696
+ onChange: (e) => je(e.target.value),
711
697
  className: n,
712
- style: D,
713
- children: Ae.map((e) => /* @__PURE__ */ b("option", {
698
+ style: k,
699
+ children: De.map((e) => /* @__PURE__ */ b("option", {
714
700
  value: e.value,
715
701
  children: e.label
716
702
  }, e.value))
717
703
  })] }),
718
704
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
719
705
  htmlFor: "prompt-columns",
720
- style: E,
706
+ style: O,
721
707
  children: s("bigconsole.insights.prompt.columns", "Columns")
722
708
  }), /* @__PURE__ */ b("select", {
723
709
  id: "prompt-columns",
724
- value: j,
725
- onChange: (e) => ze(Number(e.target.value)),
710
+ value: N,
711
+ onChange: (e) => Fe(Number(e.target.value)),
726
712
  className: n,
727
- style: D,
728
- children: je.map((e) => /* @__PURE__ */ b("option", {
713
+ style: k,
714
+ children: Oe.map((e) => /* @__PURE__ */ b("option", {
729
715
  value: e,
730
716
  children: e
731
717
  }, e))
732
718
  })] }),
733
719
  /* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b("label", {
734
720
  htmlFor: "prompt-max-widgets",
735
- style: E,
721
+ style: O,
736
722
  children: s("bigconsole.insights.prompt.maxWidgets", "Max widgets")
737
723
  }), /* @__PURE__ */ b("select", {
738
724
  id: "prompt-max-widgets",
739
- value: N,
740
- onChange: (e) => Ue(Number(e.target.value)),
725
+ value: F,
726
+ onChange: (e) => ze(Number(e.target.value)),
741
727
  className: n,
742
- style: D,
743
- children: Me.map((e) => /* @__PURE__ */ b("option", {
728
+ style: k,
729
+ children: ke.map((e) => /* @__PURE__ */ b("option", {
744
730
  value: e,
745
731
  children: e
746
732
  }, e))
@@ -766,25 +752,25 @@ var N = s(function() {
766
752
  children: [
767
753
  s("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
768
754
  " · ",
769
- g.length,
755
+ v.length,
770
756
  "/2000"
771
757
  ]
772
758
  }), /* @__PURE__ */ x("button", {
773
759
  type: "button",
774
- onClick: rt,
775
- disabled: !g.trim() || P,
760
+ onClick: nt,
761
+ disabled: !v.trim() || I,
776
762
  className: n,
777
763
  style: {
778
- ...T,
764
+ ...E,
779
765
  marginLeft: "auto",
780
- cursor: !g.trim() || P ? "not-allowed" : "pointer",
781
- opacity: !g.trim() || P ? .5 : 1
766
+ cursor: !v.trim() || I ? "not-allowed" : "pointer",
767
+ opacity: !v.trim() || I ? .5 : 1
782
768
  },
783
- children: [P ? /* @__PURE__ */ b(p, {
769
+ children: [I ? /* @__PURE__ */ b(h, {
784
770
  size: 16,
785
771
  className: "animate-spin",
786
772
  "aria-hidden": "true"
787
- }) : /* @__PURE__ */ b(m, {
773
+ }) : /* @__PURE__ */ b(g, {
788
774
  size: 16,
789
775
  "aria-hidden": "true"
790
776
  }), s("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
@@ -793,12 +779,12 @@ var N = s(function() {
793
779
  ]
794
780
  })
795
781
  }),
796
- nt.length > 0 && /* @__PURE__ */ b(r, {
782
+ tt.length > 0 && /* @__PURE__ */ b(r, {
797
783
  emphasis: "muted",
798
784
  headingLevel: 2,
799
785
  title: s("bigconsole.insights.suggestions.heading", "Starting points"),
800
786
  description: "Pick one to drop it into the prompt box above, then edit it before generating.",
801
- icon: /* @__PURE__ */ b(ce, { className: "h-icon-sm w-icon-sm" }),
787
+ icon: /* @__PURE__ */ b(ae, { className: "h-icon-sm w-icon-sm" }),
802
788
  "data-testid": "insights-suggestions",
803
789
  children: /* @__PURE__ */ b("div", {
804
790
  style: {
@@ -806,9 +792,9 @@ var N = s(function() {
806
792
  gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
807
793
  gap: "var(--space-controlGap)"
808
794
  },
809
- children: nt.map((e) => /* @__PURE__ */ x("button", {
795
+ children: tt.map((e) => /* @__PURE__ */ x("button", {
810
796
  type: "button",
811
- onClick: () => lt(e.prompt),
797
+ onClick: () => st(e.prompt),
812
798
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
813
799
  style: {
814
800
  textAlign: "left",
@@ -848,7 +834,7 @@ var N = s(function() {
848
834
  flexWrap: "wrap"
849
835
  },
850
836
  children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
851
- style: O,
837
+ style: A,
852
838
  children: e
853
839
  }, e))
854
840
  })
@@ -862,17 +848,17 @@ var N = s(function() {
862
848
  headingLevel: 2,
863
849
  title: s("bigconsole.insights.generations.heading", "Recent generations"),
864
850
  description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
865
- icon: /* @__PURE__ */ b(se, { className: "h-icon-sm w-icon-sm" }),
866
- meta: Q.length > 0 ? /* @__PURE__ */ x("span", {
867
- style: O,
851
+ icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" }),
852
+ meta: Z.length > 0 ? /* @__PURE__ */ x("span", {
853
+ style: A,
868
854
  children: [
869
- Q.length,
855
+ Z.length,
870
856
  " generation",
871
- Q.length === 1 ? "" : "s"
857
+ Z.length === 1 ? "" : "s"
872
858
  ]
873
859
  }) : void 0,
874
860
  "data-testid": "insights-generations",
875
- children: Ge && Q.length === 0 ? /* @__PURE__ */ b(r, {
861
+ children: We && Z.length === 0 ? /* @__PURE__ */ b(r, {
876
862
  emphasis: "muted",
877
863
  headingLevel: 3,
878
864
  "aria-label": "Loading generations",
@@ -888,7 +874,7 @@ var N = s(function() {
888
874
  gap: "var(--space-controlGap)",
889
875
  color: "var(--color-text-muted)"
890
876
  },
891
- children: [/* @__PURE__ */ b(p, {
877
+ children: [/* @__PURE__ */ b(h, {
892
878
  size: 24,
893
879
  className: "animate-spin",
894
880
  "aria-hidden": "true"
@@ -897,33 +883,33 @@ var N = s(function() {
897
883
  children: s("bigconsole.insights.generations.loading", "Loading generations…")
898
884
  })]
899
885
  })
900
- }) : Q.length === 0 && !P && !J ? /* @__PURE__ */ b(pe, {
886
+ }) : Z.length === 0 && !I && !q ? /* @__PURE__ */ b(ue, {
901
887
  treatment: "insight",
902
888
  className: "border-[var(--color-border-seam)]",
903
- children: /* @__PURE__ */ b(he, {
889
+ children: /* @__PURE__ */ b(fe, {
904
890
  illustration: "onboarding",
905
891
  title: s("bigconsole.insights.generations.emptyTitle", "No generations yet"),
906
892
  description: s("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
907
893
  })
908
894
  }) : /* @__PURE__ */ x("div", {
909
895
  className: "flex flex-col gap-list-gap",
910
- children: [P && !Z && /* @__PURE__ */ b(r, {
896
+ children: [I && !X && /* @__PURE__ */ b(r, {
911
897
  emphasis: "muted",
912
898
  tone: "info",
913
899
  padding: "compact",
914
900
  headingLevel: 3,
915
901
  title: "Sending your prompt…",
916
902
  description: "The new generation appears here as soon as the backend accepts it.",
917
- icon: /* @__PURE__ */ b(p, { className: "h-icon-sm w-icon-sm animate-spin" }),
903
+ icon: /* @__PURE__ */ b(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
918
904
  "data-testid": "insights-generation-pending"
919
- }), Q.map((e) => {
920
- let t = e.generatedSpec, i = R.has(e.id), a = Ee.includes(e.status);
905
+ }), Z.map((e) => {
906
+ let t = e.generatedSpec, i = R.has(e.id), a = Ce.includes(e.status);
921
907
  return /* @__PURE__ */ x(r, {
922
908
  emphasis: "standard",
923
909
  padding: "compact",
924
910
  headingLevel: 3,
925
911
  title: t?.name || (a ? s("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
926
- meta: /* @__PURE__ */ b(Ie, { status: e.status }),
912
+ meta: /* @__PURE__ */ b(Me, { status: e.status }),
927
913
  description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
928
914
  "data-testid": "insights-generation-card",
929
915
  bodyClassName: "flex flex-col gap-control-gap",
@@ -936,15 +922,15 @@ var N = s(function() {
936
922
  },
937
923
  children: [
938
924
  /* @__PURE__ */ x("span", {
939
- style: O,
925
+ style: A,
940
926
  children: [
941
- M(t),
927
+ P(t),
942
928
  " widget",
943
- M(t) === 1 ? "" : "s"
929
+ P(t) === 1 ? "" : "s"
944
930
  ]
945
931
  }),
946
932
  /* @__PURE__ */ x("span", {
947
- style: O,
933
+ style: A,
948
934
  children: [
949
935
  t.pages.length,
950
936
  " page",
@@ -952,7 +938,7 @@ var N = s(function() {
952
938
  ]
953
939
  }),
954
940
  /* @__PURE__ */ x("span", {
955
- style: Le(t.overallConfidence),
941
+ style: Ne(t.overallConfidence),
956
942
  children: [Math.round(t.overallConfidence * 100), "% confidence"]
957
943
  })
958
944
  ]
@@ -963,7 +949,7 @@ var N = s(function() {
963
949
  padding: "compact",
964
950
  title: "Generation failed",
965
951
  description: e.errorMessage,
966
- icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" })
952
+ icon: /* @__PURE__ */ b(d, { className: "h-icon-sm w-icon-sm" })
967
953
  }),
968
954
  /* @__PURE__ */ x("div", {
969
955
  style: {
@@ -978,17 +964,17 @@ var N = s(function() {
978
964
  a && /* @__PURE__ */ x("button", {
979
965
  type: "button",
980
966
  onClick: () => {
981
- o("medium"), ot(e.id);
967
+ o("medium"), it(e.id);
982
968
  },
983
969
  disabled: i,
984
970
  title: s("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
985
971
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
986
972
  style: {
987
- ...Ne,
973
+ ...Ae,
988
974
  cursor: i ? "wait" : "pointer"
989
975
  },
990
976
  children: [
991
- /* @__PURE__ */ b(ae, {
977
+ /* @__PURE__ */ b(ne, {
992
978
  size: 14,
993
979
  "aria-hidden": "true"
994
980
  }),
@@ -998,12 +984,12 @@ var N = s(function() {
998
984
  }),
999
985
  e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1000
986
  type: "button",
1001
- onClick: () => V(e),
987
+ onClick: () => B(e),
1002
988
  title: s("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
1003
989
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1004
- style: w,
990
+ style: T,
1005
991
  children: [
1006
- /* @__PURE__ */ b(oe, {
992
+ /* @__PURE__ */ b(re, {
1007
993
  size: 14,
1008
994
  "aria-hidden": "true"
1009
995
  }),
@@ -1014,13 +1000,13 @@ var N = s(function() {
1014
1000
  e.status === "COMPLETED" && t && /* @__PURE__ */ x("button", {
1015
1001
  type: "button",
1016
1002
  onClick: () => {
1017
- U(e), G("");
1003
+ H(e), W("");
1018
1004
  },
1019
1005
  title: s("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1020
1006
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1021
- style: w,
1007
+ style: T,
1022
1008
  children: [
1023
- /* @__PURE__ */ b(h, {
1009
+ /* @__PURE__ */ b(_, {
1024
1010
  size: 14,
1025
1011
  "aria-hidden": "true"
1026
1012
  }),
@@ -1031,17 +1017,17 @@ var N = s(function() {
1031
1017
  (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ x("button", {
1032
1018
  type: "button",
1033
1019
  onClick: () => {
1034
- o("medium"), st(e.id);
1020
+ o("medium"), at(e.id);
1035
1021
  },
1036
1022
  disabled: i,
1037
1023
  title: s("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
1038
1024
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1039
1025
  style: {
1040
- ...w,
1026
+ ...T,
1041
1027
  cursor: i ? "wait" : "pointer"
1042
1028
  },
1043
1029
  children: [
1044
- /* @__PURE__ */ b(le, {
1030
+ /* @__PURE__ */ b(oe, {
1045
1031
  size: 14,
1046
1032
  className: i ? "animate-spin" : "",
1047
1033
  "aria-hidden": "true"
@@ -1061,13 +1047,13 @@ var N = s(function() {
1061
1047
  children: [
1062
1048
  e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ x("button", {
1063
1049
  type: "button",
1064
- onClick: () => it(e.id),
1050
+ onClick: () => Q(e.id),
1065
1051
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1066
- style: T,
1052
+ style: E,
1067
1053
  children: [
1068
1054
  s("bigconsole.insights.actions.create", "Create dashboard"),
1069
1055
  " ",
1070
- /* @__PURE__ */ b(u, {
1056
+ /* @__PURE__ */ b(f, {
1071
1057
  size: 14,
1072
1058
  "aria-hidden": "true"
1073
1059
  })
@@ -1075,13 +1061,13 @@ var N = s(function() {
1075
1061
  }),
1076
1062
  e.dashboardId && /* @__PURE__ */ x("button", {
1077
1063
  type: "button",
1078
- onClick: () => d(`/dashboards/${e.dashboardId ?? ""}`),
1064
+ onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
1079
1065
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1080
- style: w,
1066
+ style: T,
1081
1067
  children: [
1082
1068
  s("bigconsole.insights.actions.viewDashboard", "View dashboard"),
1083
1069
  " ",
1084
- /* @__PURE__ */ b(u, {
1070
+ /* @__PURE__ */ b(f, {
1085
1071
  size: 14,
1086
1072
  "aria-hidden": "true"
1087
1073
  })
@@ -1090,13 +1076,13 @@ var N = s(function() {
1090
1076
  /* @__PURE__ */ b("button", {
1091
1077
  type: "button",
1092
1078
  onClick: () => {
1093
- o("medium"), at(e.id);
1079
+ o("medium"), rt(e.id);
1094
1080
  },
1095
1081
  title: s("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1096
1082
  "aria-label": s("bigconsole.insights.actions.deleteTitle", "Delete generation"),
1097
1083
  className: n,
1098
- style: Pe,
1099
- children: /* @__PURE__ */ b(ue, {
1084
+ style: D,
1085
+ children: /* @__PURE__ */ b(se, {
1100
1086
  size: 14,
1101
1087
  "aria-hidden": "true"
1102
1088
  })
@@ -1112,11 +1098,11 @@ var N = s(function() {
1112
1098
  })
1113
1099
  ] })]
1114
1100
  }),
1115
- B && $ && /* @__PURE__ */ b("div", {
1101
+ z && $ && /* @__PURE__ */ b("div", {
1116
1102
  role: "dialog",
1117
1103
  "aria-modal": "true",
1118
1104
  "aria-label": s("bigconsole.insights.preview.ariaLabel", "Generation preview"),
1119
- onClick: () => V(null),
1105
+ onClick: () => B(null),
1120
1106
  style: {
1121
1107
  position: "fixed",
1122
1108
  inset: 0,
@@ -1169,14 +1155,14 @@ var N = s(function() {
1169
1155
  })]
1170
1156
  }), /* @__PURE__ */ b("button", {
1171
1157
  type: "button",
1172
- onClick: () => V(null),
1158
+ onClick: () => B(null),
1173
1159
  "aria-label": s("bigconsole.insights.preview.close", "Close preview"),
1174
1160
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1175
1161
  style: {
1176
- ...Pe,
1162
+ ...D,
1177
1163
  color: "var(--color-text-muted)"
1178
1164
  },
1179
- children: /* @__PURE__ */ b(de, {
1165
+ children: /* @__PURE__ */ b(ce, {
1180
1166
  size: 18,
1181
1167
  "aria-hidden": "true"
1182
1168
  })
@@ -1201,15 +1187,15 @@ var N = s(function() {
1201
1187
  },
1202
1188
  children: [
1203
1189
  /* @__PURE__ */ x("span", {
1204
- style: O,
1190
+ style: A,
1205
1191
  children: [
1206
- M($),
1192
+ P($),
1207
1193
  " widget",
1208
- M($) === 1 ? "" : "s"
1194
+ P($) === 1 ? "" : "s"
1209
1195
  ]
1210
1196
  }),
1211
1197
  /* @__PURE__ */ x("span", {
1212
- style: O,
1198
+ style: A,
1213
1199
  children: [
1214
1200
  $.pages.length,
1215
1201
  " page",
@@ -1217,7 +1203,7 @@ var N = s(function() {
1217
1203
  ]
1218
1204
  }),
1219
1205
  /* @__PURE__ */ x("span", {
1220
- style: Le($.overallConfidence),
1206
+ style: Ne($.overallConfidence),
1221
1207
  children: [Math.round($.overallConfidence * 100), "% confidence"]
1222
1208
  })
1223
1209
  ]
@@ -1250,7 +1236,7 @@ var N = s(function() {
1250
1236
  headingLevel: 3,
1251
1237
  title: e.name,
1252
1238
  meta: /* @__PURE__ */ x("span", {
1253
- style: O,
1239
+ style: A,
1254
1240
  children: [
1255
1241
  e.widgets.length,
1256
1242
  " widget",
@@ -1275,13 +1261,13 @@ var N = s(function() {
1275
1261
  ]
1276
1262
  }), /* @__PURE__ */ b("div", {
1277
1263
  className: "insights-proposal-grid",
1278
- style: Be(e.gridColumns),
1264
+ style: Ie(e.gridColumns),
1279
1265
  children: e.widgets.map((t, n) => {
1280
- let r = Re(t.confidence);
1266
+ let r = Pe(t.confidence);
1281
1267
  return /* @__PURE__ */ x("div", {
1282
1268
  className: "insights-proposal-widget",
1283
1269
  style: {
1284
- ...Ve(t.position, e.gridColumns),
1270
+ ...Le(t.position, e.gridColumns),
1285
1271
  display: "flex",
1286
1272
  flexDirection: "column",
1287
1273
  gap: "2px",
@@ -1317,7 +1303,7 @@ var N = s(function() {
1317
1303
  }),
1318
1304
  r && /* @__PURE__ */ b("span", {
1319
1305
  style: {
1320
- ...He(r),
1306
+ ...Re(r),
1321
1307
  marginLeft: "auto"
1322
1308
  },
1323
1309
  "data-testid": "preview-widget-confidence",
@@ -1351,22 +1337,22 @@ var N = s(function() {
1351
1337
  children: [
1352
1338
  /* @__PURE__ */ b("button", {
1353
1339
  type: "button",
1354
- onClick: () => V(null),
1340
+ onClick: () => B(null),
1355
1341
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1356
- style: w,
1342
+ style: T,
1357
1343
  children: "Close"
1358
1344
  }),
1359
- B.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1345
+ z.status === "COMPLETED" && $ && /* @__PURE__ */ x("button", {
1360
1346
  type: "button",
1361
1347
  onClick: () => {
1362
- let e = B;
1363
- V(null), U(e), G("");
1348
+ let e = z;
1349
+ B(null), H(e), W("");
1364
1350
  },
1365
1351
  title: s("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
1366
1352
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1367
- style: w,
1353
+ style: T,
1368
1354
  children: [
1369
- /* @__PURE__ */ b(h, {
1355
+ /* @__PURE__ */ b(_, {
1370
1356
  size: 14,
1371
1357
  "aria-hidden": "true"
1372
1358
  }),
@@ -1374,18 +1360,18 @@ var N = s(function() {
1374
1360
  s("bigconsole.insights.actions.refine", "Refine")
1375
1361
  ]
1376
1362
  }),
1377
- B.status === "COMPLETED" && !B.dashboardId && /* @__PURE__ */ x("button", {
1363
+ z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ x("button", {
1378
1364
  type: "button",
1379
1365
  onClick: () => {
1380
- let e = B.id;
1381
- V(null), it(e);
1366
+ let e = z.id;
1367
+ B(null), Q(e);
1382
1368
  },
1383
1369
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1384
- style: T,
1370
+ style: E,
1385
1371
  children: [
1386
1372
  s("bigconsole.insights.actions.create", "Create dashboard"),
1387
1373
  " ",
1388
- /* @__PURE__ */ b(u, {
1374
+ /* @__PURE__ */ b(f, {
1389
1375
  size: 14,
1390
1376
  "aria-hidden": "true"
1391
1377
  })
@@ -1396,11 +1382,11 @@ var N = s(function() {
1396
1382
  ]
1397
1383
  })
1398
1384
  }),
1399
- H && /* @__PURE__ */ b("div", {
1385
+ V && /* @__PURE__ */ b("div", {
1400
1386
  role: "dialog",
1401
1387
  "aria-modal": "true",
1402
1388
  "aria-label": s("bigconsole.insights.refine.ariaLabel", "Refine generation"),
1403
- onClick: () => U(null),
1389
+ onClick: () => H(null),
1404
1390
  style: {
1405
1391
  position: "fixed",
1406
1392
  inset: 0,
@@ -1460,9 +1446,9 @@ var N = s(function() {
1460
1446
  emphasis: "muted",
1461
1447
  padding: "compact",
1462
1448
  headingLevel: 3,
1463
- title: H.generatedSpec?.name || "Current proposal",
1464
- description: H.prompt.length > 240 ? `${H.prompt.slice(0, 240)}…` : H.prompt,
1465
- icon: /* @__PURE__ */ b(m, { className: "h-icon-sm w-icon-sm" })
1449
+ title: V.generatedSpec?.name || "Current proposal",
1450
+ description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
1451
+ icon: /* @__PURE__ */ b(g, { className: "h-icon-sm w-icon-sm" })
1466
1452
  }), /* @__PURE__ */ x("div", {
1467
1453
  style: {
1468
1454
  display: "flex",
@@ -1480,8 +1466,8 @@ var N = s(function() {
1480
1466
  children: "What should change?"
1481
1467
  }), /* @__PURE__ */ b("textarea", {
1482
1468
  id: "refine-input",
1483
- value: W,
1484
- onChange: (e) => G(e.target.value),
1469
+ value: U,
1470
+ onChange: (e) => W(e.target.value),
1485
1471
  maxLength: 2e3,
1486
1472
  rows: 4,
1487
1473
  placeholder: s("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
@@ -1511,25 +1497,25 @@ var N = s(function() {
1511
1497
  },
1512
1498
  children: [/* @__PURE__ */ b("button", {
1513
1499
  type: "button",
1514
- onClick: () => U(null),
1500
+ onClick: () => H(null),
1515
1501
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1516
- style: w,
1502
+ style: T,
1517
1503
  children: s("bigconsole.insights.actions.cancel", "Cancel")
1518
1504
  }), /* @__PURE__ */ x("button", {
1519
1505
  type: "button",
1520
- onClick: () => void ct(),
1521
- disabled: !W.trim() || R.has(H.id),
1506
+ onClick: () => void ot(),
1507
+ disabled: !U.trim() || R.has(V.id),
1522
1508
  className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
1523
1509
  style: {
1524
- ...T,
1525
- cursor: !W.trim() || R.has(H.id) ? "not-allowed" : "pointer",
1526
- opacity: W.trim() ? 1 : .6
1510
+ ...E,
1511
+ cursor: !U.trim() || R.has(V.id) ? "not-allowed" : "pointer",
1512
+ opacity: U.trim() ? 1 : .6
1527
1513
  },
1528
- children: [R.has(H.id) ? /* @__PURE__ */ b(p, {
1514
+ children: [R.has(V.id) ? /* @__PURE__ */ b(h, {
1529
1515
  size: 14,
1530
1516
  className: "animate-spin",
1531
1517
  "aria-hidden": "true"
1532
- }) : /* @__PURE__ */ b(h, {
1518
+ }) : /* @__PURE__ */ b(_, {
1533
1519
  size: 14,
1534
1520
  "aria-hidden": "true"
1535
1521
  }), s("bigconsole.insights.refine.apply", "Apply refinement")]
@@ -1542,4 +1528,4 @@ var N = s(function() {
1542
1528
  });
1543
1529
  });
1544
1530
  //#endregion
1545
- export { N as InsightsPage, N as default };
1531
+ export { F as InsightsPage, F as default };