@burdenoff/microfe-bigconsole 2026.1012.4 → 2026.1012.5

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