@burdenoff/microfe-bigconsole 2026.1123.7 → 2026.1124.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.
- package/dist/bigconsole/asof/AsOfControl.js +2 -2
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +107 -106
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.d.ts +34 -0
- package/dist/bigconsole/components/dashboard/DashboardGalleryCard.js +123 -0
- package/dist/bigconsole/components/dashboard/DashboardReviewDialog.js +1 -1
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +19 -35
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +119 -116
- package/dist/bigconsole/components/dashboard/LiveCanvasToggle.js +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.d.ts +0 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +172 -170
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +210 -208
- package/dist/bigconsole/components/dashboard/TemplateInstallOptions.js +97 -97
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/datasink/AlertExecutionHistory.js +92 -92
- package/dist/bigconsole/components/datasink/AlertRuleEditor.js +149 -149
- package/dist/bigconsole/components/datasink/AnomalyDetectorPanel.js +54 -54
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -37
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +4 -4
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +130 -129
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +24 -33
- package/dist/bigconsole/components/datasink/SinkWorkflowLinkForm.js +38 -38
- package/dist/bigconsole/components/explore/CreateQueryWidget.js +57 -56
- package/dist/bigconsole/components/explore/SqlDraftEditor.js +140 -140
- package/dist/bigconsole/components/explore/VisualBuilder.js +85 -84
- package/dist/bigconsole/components/explore/queryAccess/GrantsPanel.js +168 -167
- package/dist/bigconsole/components/explore/queryAccess/QueryAccessAdmin.js +2 -2
- package/dist/bigconsole/components/explore/queryAccess/RelationEditor.js +118 -117
- package/dist/bigconsole/components/insights/BoardLintPanel.js +2 -2
- package/dist/bigconsole/components/insights/OutlierSpottingDialog.js +123 -123
- package/dist/bigconsole/components/kpi-change/KpiChangePanel.js +2 -2
- package/dist/bigconsole/components/narrative/NarrativePanel.js +1 -1
- package/dist/bigconsole/components/overview/DataHealthCard.js +3 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +3 -0
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +25 -28
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +23 -22
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +15 -26
- package/dist/bigconsole/components/reconcile/KpiReconcileDialog.js +24 -24
- package/dist/bigconsole/components/settings/WidgetCatalogSection.js +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +188 -187
- package/dist/bigconsole/components/widgets/FilterNotAppliedNotice.js +1 -1
- package/dist/bigconsole/components/widgets/UnsupportedDataSourceNotice.js +1 -1
- package/dist/bigconsole/components/widgets/WidgetCompareView.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +1 -1
- package/dist/bigconsole/components/widgets/advanced/AdvancedWidgetConfig.js +45 -44
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +151 -147
- package/dist/bigconsole/components/widgets/chart/ReferenceLinesEditor.js +48 -47
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +139 -138
- package/dist/bigconsole/components/widgets/form/FormWidget.js +149 -148
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +80 -77
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +58 -56
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +75 -73
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +86 -85
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +80 -77
- package/dist/bigconsole/components/widgets/retention/RetentionView.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +214 -211
- package/dist/bigconsole/components/widgets/table/TablePagination.js +59 -58
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +140 -138
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +74 -66
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +48 -48
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +28 -37
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +69 -69
- package/dist/bigconsole/hooks/useDashboardListQuery.d.ts +22 -0
- package/dist/bigconsole/hooks/useDashboardListQuery.js +39 -0
- package/dist/bigconsole/pages/AdminPage.js +147 -146
- package/dist/bigconsole/pages/DashboardViewPage.js +2 -0
- package/dist/bigconsole/pages/DashboardsPage.js +638 -855
- package/dist/bigconsole/pages/DataParsersPage.js +5 -0
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +4 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +263 -261
- package/dist/bigconsole/pages/DataSinksPage.js +210 -186
- package/dist/bigconsole/pages/InsightsPage.js +386 -383
- package/dist/bigconsole/pages/ParserBuilderPage.js +413 -413
- package/dist/bigconsole/pages/ParserViewPage.js +2 -0
- package/dist/bigconsole/pages/PipelineBuilderPage.js +279 -276
- package/dist/bigconsole/pages/PipelineViewPage.js +3 -0
- package/dist/bigconsole/pages/PipelinesPage.js +198 -165
- package/dist/bigconsole/pages/SettingsPage.js +160 -160
- package/dist/bigconsole/pages/WidgetDemoPage.js +2 -0
- package/dist/bigconsole/pages/WorkflowViewPage.js +5 -0
- package/dist/bigconsole/pages/WorkflowsPage.js +144 -123
- package/dist/bigconsole/providers/BigConsoleQuotaProvider.js +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +123 -122
- package/dist/bigconsole/utils/dashboardGallery.d.ts +84 -0
- package/dist/bigconsole/utils/dashboardGallery.js +93 -0
- package/dist/bigconsole/utils/statusTone.d.ts +17 -0
- package/dist/bigconsole/utils/statusTone.js +44 -0
- package/package.json +4 -4
|
@@ -19,14 +19,14 @@ import { AskYourData as fe } from "../components/ask/AskYourData.js";
|
|
|
19
19
|
/* empty css */
|
|
20
20
|
import { memo as l, useCallback as u, useEffect as pe, useMemo as me, useRef as he, useState as d } from "react";
|
|
21
21
|
import { AlertCircle as ge, ArrowRight as _e, Ban as ve, CheckCircle as f, Clock as p, Eye as ye, History as be, Lightbulb as xe, Loader2 as m, MessageSquare as Se, RefreshCw as Ce, ShieldCheck as we, Sparkles as h, Trash2 as Te, Wand2 as Ee, X as De, XCircle as g } from "lucide-react";
|
|
22
|
-
import { AuroraBackground as Oe, Card as ke, CardContent as Ae, GlassCard as je, GradientText as Me, IllustratedEmptyState as Ne, PagePurpose as Pe } from "@burdenoff/fe-libs/ui";
|
|
22
|
+
import { AuroraBackground as Oe, Card as ke, CardContent as Ae, GlassCard as je, GradientText as Me, IllustratedEmptyState as Ne, PagePurpose as Pe, ThemedSelect as _ } from "@burdenoff/fe-libs/ui";
|
|
23
23
|
import { useUnsavedChanges as Fe } from "@burdenoff/fe-libs/shared/hooks";
|
|
24
24
|
import { useI18n as Ie } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
25
|
-
import { useMutation as
|
|
26
|
-
import { jsx as
|
|
27
|
-
import { gql as
|
|
25
|
+
import { useMutation as v, useQuery as Le } from "@apollo/client/react";
|
|
26
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
27
|
+
import { gql as x } from "@apollo/client";
|
|
28
28
|
// src/bigconsole/pages/InsightsPage.tsx
|
|
29
|
-
var
|
|
29
|
+
var S = x`
|
|
30
30
|
fragment InsightsGeneration on PromptGeneration {
|
|
31
31
|
id
|
|
32
32
|
prompt
|
|
@@ -72,7 +72,7 @@ var x = b`
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
|
-
`, Re =
|
|
75
|
+
`, Re = x`
|
|
76
76
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
77
77
|
listPromptGenerations(status: $status, first: $first) {
|
|
78
78
|
edges {
|
|
@@ -83,8 +83,8 @@ var x = b`
|
|
|
83
83
|
totalCount
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
|
-
${
|
|
87
|
-
`, ze =
|
|
86
|
+
${S}
|
|
87
|
+
`, ze = x`
|
|
88
88
|
mutation RevertGeneratedDashboard($generationId: ID!, $toRevision: Int!, $expectedRevision: Int!) {
|
|
89
89
|
revertGeneratedDashboard(
|
|
90
90
|
generationId: $generationId
|
|
@@ -94,8 +94,8 @@ var x = b`
|
|
|
94
94
|
...InsightsGeneration
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
-
${
|
|
98
|
-
`, Be =
|
|
97
|
+
${S}
|
|
98
|
+
`, Be = x`
|
|
99
99
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
100
100
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
101
101
|
id
|
|
@@ -106,7 +106,7 @@ var x = b`
|
|
|
106
106
|
tags
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
`, Ve =
|
|
109
|
+
`, Ve = x`
|
|
110
110
|
mutation GenerateDashboardFromPrompt($input: BigConsoleGenerateDashboardFromPromptInput!) {
|
|
111
111
|
generateDashboardFromPrompt(input: $input) {
|
|
112
112
|
id
|
|
@@ -114,24 +114,24 @@ var x = b`
|
|
|
114
114
|
prompt
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
|
-
`, He =
|
|
117
|
+
`, He = x`
|
|
118
118
|
mutation CreateDashboardFromGeneration($input: BigConsoleCreateDashboardFromGenerationInput!) {
|
|
119
119
|
createDashboardFromGeneration(input: $input) {
|
|
120
120
|
id
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
`, Ue =
|
|
123
|
+
`, Ue = x`
|
|
124
124
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
125
125
|
deletePromptGeneration(generationId: $generationId)
|
|
126
126
|
}
|
|
127
|
-
`, We =
|
|
127
|
+
`, We = x`
|
|
128
128
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
129
129
|
cancelPromptGeneration(generationId: $generationId) {
|
|
130
130
|
id
|
|
131
131
|
status
|
|
132
132
|
}
|
|
133
133
|
}
|
|
134
|
-
`, Ge =
|
|
134
|
+
`, Ge = x`
|
|
135
135
|
mutation RegenerateDashboard($input: BigConsoleRegenerateDashboardInput!) {
|
|
136
136
|
regenerateDashboard(input: $input) {
|
|
137
137
|
id
|
|
@@ -139,7 +139,7 @@ var x = b`
|
|
|
139
139
|
prompt
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
`, Ke =
|
|
142
|
+
`, Ke = x`
|
|
143
143
|
mutation RefineGeneratedDashboard($input: BigConsoleRefineGeneratedDashboardInput!) {
|
|
144
144
|
refineGeneratedDashboard(input: $input) {
|
|
145
145
|
id
|
|
@@ -216,7 +216,7 @@ function et(e) {
|
|
|
216
216
|
let t = e.refineGeneratedDashboard;
|
|
217
217
|
return typeof t != "object" || !t || !("id" in t) ? null : typeof t.id == "string" ? t.id : null;
|
|
218
218
|
}
|
|
219
|
-
var
|
|
219
|
+
var C = {
|
|
220
220
|
display: "inline-flex",
|
|
221
221
|
alignItems: "center",
|
|
222
222
|
justifyContent: "center",
|
|
@@ -228,35 +228,35 @@ var S = {
|
|
|
228
228
|
fontWeight: "var(--font-weight-medium)",
|
|
229
229
|
lineHeight: 1.2,
|
|
230
230
|
cursor: "pointer"
|
|
231
|
-
},
|
|
232
|
-
...
|
|
231
|
+
}, w = {
|
|
232
|
+
...C,
|
|
233
233
|
border: "1px solid var(--color-border-default)",
|
|
234
234
|
backgroundColor: "transparent",
|
|
235
235
|
color: "var(--color-text-primary)"
|
|
236
|
-
},
|
|
237
|
-
...
|
|
236
|
+
}, T = {
|
|
237
|
+
...C,
|
|
238
238
|
border: "1px solid transparent",
|
|
239
239
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
240
240
|
color: "var(--color-action-primary-text)"
|
|
241
241
|
}, tt = {
|
|
242
|
-
...
|
|
242
|
+
...C,
|
|
243
243
|
border: "1px solid var(--color-status-warning-border)",
|
|
244
244
|
backgroundColor: "transparent",
|
|
245
245
|
color: "var(--color-status-warning-text)"
|
|
246
246
|
}, nt = {
|
|
247
|
-
...
|
|
247
|
+
...C,
|
|
248
248
|
minWidth: "var(--size-controlHeight-md)",
|
|
249
249
|
padding: "0 var(--space-controlGap)",
|
|
250
250
|
border: "1px solid var(--color-border-default)",
|
|
251
251
|
backgroundColor: "transparent",
|
|
252
252
|
color: "var(--color-status-error-text)"
|
|
253
|
-
},
|
|
253
|
+
}, E = {
|
|
254
254
|
display: "block",
|
|
255
255
|
marginBottom: "2px",
|
|
256
256
|
fontSize: "var(--font-size-body-sm)",
|
|
257
257
|
fontWeight: "var(--font-weight-medium)",
|
|
258
258
|
color: "var(--color-text-secondary)"
|
|
259
|
-
},
|
|
259
|
+
}, D = {
|
|
260
260
|
width: "100%",
|
|
261
261
|
minHeight: "var(--size-controlHeight-md)",
|
|
262
262
|
padding: "0 var(--space-controlGap)",
|
|
@@ -265,7 +265,7 @@ var S = {
|
|
|
265
265
|
backgroundColor: "var(--color-bg-canvas)",
|
|
266
266
|
color: "var(--color-text-primary)",
|
|
267
267
|
fontSize: "var(--font-size-body-sm)"
|
|
268
|
-
},
|
|
268
|
+
}, O = {
|
|
269
269
|
display: "inline-flex",
|
|
270
270
|
alignItems: "center",
|
|
271
271
|
gap: "var(--space-iconGap)",
|
|
@@ -277,7 +277,7 @@ var S = {
|
|
|
277
277
|
backgroundColor: "var(--color-bg-sunken)",
|
|
278
278
|
color: "var(--color-text-secondary)"
|
|
279
279
|
};
|
|
280
|
-
function
|
|
280
|
+
function k(e) {
|
|
281
281
|
switch (e) {
|
|
282
282
|
case "COMPLETED": return "success";
|
|
283
283
|
case "FAILED": return "danger";
|
|
@@ -287,7 +287,7 @@ function O(e) {
|
|
|
287
287
|
default: return "neutral";
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
var
|
|
290
|
+
var A = {
|
|
291
291
|
success: {
|
|
292
292
|
text: "var(--color-status-success-text)",
|
|
293
293
|
bg: "var(--color-status-success-bgSubtle)",
|
|
@@ -309,29 +309,29 @@ var k = {
|
|
|
309
309
|
border: "var(--color-border-subtle)"
|
|
310
310
|
}
|
|
311
311
|
};
|
|
312
|
-
function
|
|
313
|
-
let t = k
|
|
312
|
+
function j(e) {
|
|
313
|
+
let t = A[k(e)].text;
|
|
314
314
|
switch (e) {
|
|
315
|
-
case "COMPLETED": return /* @__PURE__ */
|
|
315
|
+
case "COMPLETED": return /* @__PURE__ */ y(f, {
|
|
316
316
|
size: 14,
|
|
317
317
|
style: { color: t },
|
|
318
318
|
"aria-hidden": "true"
|
|
319
319
|
});
|
|
320
320
|
case "FAILED":
|
|
321
|
-
case "CANCELLED": return /* @__PURE__ */
|
|
321
|
+
case "CANCELLED": return /* @__PURE__ */ y(g, {
|
|
322
322
|
size: 14,
|
|
323
323
|
style: { color: t },
|
|
324
324
|
"aria-hidden": "true"
|
|
325
325
|
});
|
|
326
326
|
case "PENDING":
|
|
327
327
|
case "PROCESSING":
|
|
328
|
-
case "GENERATING": return /* @__PURE__ */
|
|
328
|
+
case "GENERATING": return /* @__PURE__ */ y(m, {
|
|
329
329
|
size: 14,
|
|
330
330
|
className: "animate-spin",
|
|
331
331
|
style: { color: t },
|
|
332
332
|
"aria-hidden": "true"
|
|
333
333
|
});
|
|
334
|
-
default: return /* @__PURE__ */
|
|
334
|
+
default: return /* @__PURE__ */ y(p, {
|
|
335
335
|
size: 14,
|
|
336
336
|
style: { color: t },
|
|
337
337
|
"aria-hidden": "true"
|
|
@@ -350,35 +350,35 @@ function rt(e, t) {
|
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
var it = ({ status: e }) => {
|
|
353
|
-
let { t } = Ie(), n = k
|
|
354
|
-
return /* @__PURE__ */
|
|
353
|
+
let { t } = Ie(), n = A[k(e)];
|
|
354
|
+
return /* @__PURE__ */ b("span", {
|
|
355
355
|
"data-status": e,
|
|
356
356
|
style: {
|
|
357
|
-
...
|
|
357
|
+
...O,
|
|
358
358
|
border: `1px solid ${n.border}`,
|
|
359
359
|
backgroundColor: n.bg,
|
|
360
360
|
color: n.text
|
|
361
361
|
},
|
|
362
|
-
children: [
|
|
362
|
+
children: [j(e), rt(e, t)]
|
|
363
363
|
});
|
|
364
364
|
};
|
|
365
365
|
function at(e) {
|
|
366
|
-
let t =
|
|
366
|
+
let t = A[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
|
|
367
367
|
return {
|
|
368
|
-
...
|
|
368
|
+
...O,
|
|
369
369
|
border: `1px solid ${t.border}`,
|
|
370
370
|
backgroundColor: t.bg,
|
|
371
371
|
color: t.text
|
|
372
372
|
};
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function M(e) {
|
|
375
375
|
return e.pages.reduce((e, t) => e + t.widgets.length, 0);
|
|
376
376
|
}
|
|
377
377
|
function ot(e) {
|
|
378
378
|
let t = e?.toUpperCase();
|
|
379
379
|
return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
|
|
380
380
|
}
|
|
381
|
-
var
|
|
381
|
+
var N = {
|
|
382
382
|
HIGH: "success",
|
|
383
383
|
MEDIUM: "neutral",
|
|
384
384
|
LOW: "danger"
|
|
@@ -396,9 +396,9 @@ function ct(e, t) {
|
|
|
396
396
|
};
|
|
397
397
|
}
|
|
398
398
|
function lt(e) {
|
|
399
|
-
let t =
|
|
399
|
+
let t = A[N[e]];
|
|
400
400
|
return {
|
|
401
|
-
...
|
|
401
|
+
...O,
|
|
402
402
|
padding: "0 var(--space-controlGap)",
|
|
403
403
|
fontSize: "var(--font-size-xs)",
|
|
404
404
|
fontWeight: "var(--font-weight-semibold)",
|
|
@@ -409,8 +409,8 @@ function lt(e) {
|
|
|
409
409
|
};
|
|
410
410
|
}
|
|
411
411
|
var ut = l(function() {
|
|
412
|
-
let { t: l } = Ie(), f = e(), p = t(), [g,
|
|
413
|
-
|
|
412
|
+
let { t: l } = Ie(), f = e(), p = t(), [g, x] = d(""), [S, C] = d("MODERN"), [k, A] = d("GRID"), [j, rt] = d(Je), [N, ut] = d(Ye), [P, dt] = d(!1), [ft, F] = d(null), [I, pt] = d(() => /* @__PURE__ */ new Set()), [L, R] = d(null), [mt, ht] = d(null), gt = he(!1), [_t, vt] = d(null), [z, yt] = d(null), [bt, xt] = d({}), St = u((e, t) => {
|
|
413
|
+
xt((n) => {
|
|
414
414
|
if (t) return {
|
|
415
415
|
...n,
|
|
416
416
|
[e]: t
|
|
@@ -418,7 +418,7 @@ var ut = l(function() {
|
|
|
418
418
|
let r = { ...n };
|
|
419
419
|
return delete r[e], r;
|
|
420
420
|
});
|
|
421
|
-
}, []), [B, V] = d(null), [H, U] = d(""), [
|
|
421
|
+
}, []), [B, V] = d(null), [H, U] = d(""), [Ct, wt] = d(!1), [W, Tt] = d(null), [Et, Dt] = d({
|
|
422
422
|
text: "",
|
|
423
423
|
busy: !1
|
|
424
424
|
});
|
|
@@ -427,18 +427,18 @@ var ut = l(function() {
|
|
|
427
427
|
label: l("bigconsole.assistant.unsaved.insightsPrompt", "the dashboard description"),
|
|
428
428
|
dirty: te({
|
|
429
429
|
promptText: g,
|
|
430
|
-
isGenerating:
|
|
430
|
+
isGenerating: P,
|
|
431
431
|
refineOpen: B !== null,
|
|
432
432
|
refineText: H,
|
|
433
|
-
refineBusy: B !== null &&
|
|
433
|
+
refineBusy: B !== null && I.has(B.id),
|
|
434
434
|
chatOpen: W !== null,
|
|
435
|
-
chatText:
|
|
436
|
-
chatBusy:
|
|
435
|
+
chatText: Et.text,
|
|
436
|
+
chatBusy: Et.busy
|
|
437
437
|
})
|
|
438
|
-
}), pe(() => (s(B?.id ?? W?.id ??
|
|
438
|
+
}), pe(() => (s(B?.id ?? W?.id ?? L?.id ?? null), () => s(null)), [
|
|
439
439
|
B,
|
|
440
440
|
W,
|
|
441
|
-
|
|
441
|
+
L
|
|
442
442
|
]);
|
|
443
443
|
let G = u((e) => {
|
|
444
444
|
pt((t) => new Set(t).add(e));
|
|
@@ -447,49 +447,49 @@ var ut = l(function() {
|
|
|
447
447
|
let n = new Set(t);
|
|
448
448
|
return n.delete(e), n;
|
|
449
449
|
});
|
|
450
|
-
}, []), { data:
|
|
450
|
+
}, []), { data: Ot, loading: kt, error: At, refetch: q, startPolling: jt, stopPolling: Mt } = Le(Re, {
|
|
451
451
|
variables: { first: 20 },
|
|
452
452
|
fetchPolicy: "cache-and-network"
|
|
453
|
-
}),
|
|
454
|
-
pe(() => (
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
453
|
+
}), Nt = Ot?.listPromptGenerations?.edges?.some((e) => qe.includes(e.node.status)) ?? !1, { data: Pt, error: Ft, refetch: It } = Le(Be, { variables: { limit: 6 } }), [Lt] = v(Ve), [Rt] = v(He), [J] = v(Ue), [zt] = v(We), [Bt] = v(Ge), [Y] = v(Ke), [Vt, { loading: X }] = v(ze), Z = Ot?.listPromptGenerations?.edges?.map((e) => e.node) || [], Ht = Pt?.getPromptSuggestions || [], { current: Ut, superseded: Wt } = o(Z), Q = Ct ? Z : Ut;
|
|
454
|
+
pe(() => (Nt || P ? jt(2e3) : Mt(), () => Mt()), [
|
|
455
|
+
Nt,
|
|
456
|
+
P,
|
|
457
|
+
jt,
|
|
458
|
+
Mt
|
|
459
459
|
]), pe(() => {
|
|
460
|
-
if (!
|
|
460
|
+
if (!L && !B && !W) return;
|
|
461
461
|
let e = (e) => {
|
|
462
|
-
e.key === "Escape" && (
|
|
462
|
+
e.key === "Escape" && (R(null), V(null), Tt(null));
|
|
463
463
|
};
|
|
464
464
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
465
465
|
}, [
|
|
466
|
-
|
|
466
|
+
L,
|
|
467
467
|
B,
|
|
468
468
|
W
|
|
469
469
|
]);
|
|
470
|
-
let
|
|
471
|
-
if (g.trim() && !
|
|
472
|
-
if (g.length > 2e3)
|
|
470
|
+
let Gt = u(async () => {
|
|
471
|
+
if (g.trim() && !P) {
|
|
472
|
+
if (g.length > 2e3) F(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
|
|
473
473
|
else {
|
|
474
|
-
|
|
474
|
+
F(null), dt(!0);
|
|
475
475
|
try {
|
|
476
|
-
p("bigconsole.ai.generate_clicked", { maxWidgets:
|
|
477
|
-
let e = await
|
|
476
|
+
p("bigconsole.ai.generate_clicked", { maxWidgets: N });
|
|
477
|
+
let e = await Lt({ variables: { input: {
|
|
478
478
|
prompt: g.trim(),
|
|
479
|
-
styleType:
|
|
480
|
-
layoutType:
|
|
481
|
-
gridColumns:
|
|
482
|
-
maxWidgets:
|
|
479
|
+
styleType: S,
|
|
480
|
+
layoutType: k,
|
|
481
|
+
gridColumns: j,
|
|
482
|
+
maxWidgets: N
|
|
483
483
|
} } });
|
|
484
484
|
if (c(e, "command")) return;
|
|
485
485
|
let t = e.data?.generateDashboardFromPrompt?.id;
|
|
486
486
|
t && p("bigconsole.ai.dashboard_generated", {
|
|
487
487
|
generationId: t,
|
|
488
|
-
maxWidgets:
|
|
489
|
-
}),
|
|
488
|
+
maxWidgets: N
|
|
489
|
+
}), x(""), q();
|
|
490
490
|
} catch (e) {
|
|
491
491
|
if (c(e, "command")) return;
|
|
492
|
-
|
|
492
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
|
|
493
493
|
} finally {
|
|
494
494
|
dt(!1);
|
|
495
495
|
}
|
|
@@ -498,29 +498,29 @@ var ut = l(function() {
|
|
|
498
498
|
}, [
|
|
499
499
|
p,
|
|
500
500
|
g,
|
|
501
|
-
|
|
502
|
-
|
|
501
|
+
P,
|
|
502
|
+
Lt,
|
|
503
503
|
q,
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
504
|
+
S,
|
|
505
|
+
k,
|
|
506
|
+
j,
|
|
507
|
+
N,
|
|
508
508
|
l
|
|
509
|
-
]),
|
|
510
|
-
|
|
509
|
+
]), Kt = u(async (e) => {
|
|
510
|
+
F(null);
|
|
511
511
|
let t = a(e);
|
|
512
512
|
if (t.kind === "view") {
|
|
513
513
|
f(`/dashboards/${t.dashboardId}`);
|
|
514
514
|
return;
|
|
515
515
|
}
|
|
516
516
|
if (t.kind === "hold") {
|
|
517
|
-
|
|
517
|
+
F(l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard."));
|
|
518
518
|
return;
|
|
519
519
|
}
|
|
520
520
|
let n = e.id;
|
|
521
521
|
try {
|
|
522
522
|
p("bigconsole.ai.create_dashboard_clicked", { generationId: n });
|
|
523
|
-
let e = await
|
|
523
|
+
let e = await Rt({ variables: { input: t.input } });
|
|
524
524
|
if (c(e, "project")) return;
|
|
525
525
|
let r = e.data?.createDashboardFromGeneration?.id;
|
|
526
526
|
r && (p("bigconsole.ai.dashboard_created", {
|
|
@@ -529,57 +529,57 @@ var ut = l(function() {
|
|
|
529
529
|
}), f(`/dashboards/${r}`));
|
|
530
530
|
} catch (e) {
|
|
531
531
|
if (c(e, "project")) return;
|
|
532
|
-
|
|
532
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
|
|
533
533
|
}
|
|
534
534
|
}, [
|
|
535
|
-
|
|
535
|
+
Rt,
|
|
536
536
|
p,
|
|
537
537
|
f,
|
|
538
538
|
l
|
|
539
|
-
]),
|
|
540
|
-
|
|
539
|
+
]), qt = u(async (e) => {
|
|
540
|
+
F(null);
|
|
541
541
|
try {
|
|
542
542
|
await J({ variables: { generationId: e } }), re() && ae("success"), q();
|
|
543
543
|
} catch (e) {
|
|
544
|
-
|
|
544
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), re() && ae("error");
|
|
545
545
|
}
|
|
546
546
|
}, [
|
|
547
547
|
J,
|
|
548
548
|
q,
|
|
549
549
|
l
|
|
550
|
-
]),
|
|
551
|
-
|
|
550
|
+
]), Jt = u(async (e) => {
|
|
551
|
+
F(null), G(e);
|
|
552
552
|
try {
|
|
553
|
-
await
|
|
553
|
+
await zt({ variables: { generationId: e } }), q();
|
|
554
554
|
} catch (e) {
|
|
555
|
-
|
|
555
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
|
|
556
556
|
} finally {
|
|
557
557
|
K(e);
|
|
558
558
|
}
|
|
559
559
|
}, [
|
|
560
|
-
|
|
560
|
+
zt,
|
|
561
561
|
q,
|
|
562
562
|
l
|
|
563
|
-
]),
|
|
564
|
-
|
|
563
|
+
]), Yt = u(async (e) => {
|
|
564
|
+
F(null), G(e);
|
|
565
565
|
try {
|
|
566
|
-
let t = await
|
|
566
|
+
let t = await Bt({ variables: { input: { generationId: e } } });
|
|
567
567
|
if (c(t, "command")) return;
|
|
568
568
|
q();
|
|
569
569
|
} catch (e) {
|
|
570
570
|
if (c(e, "command")) return;
|
|
571
|
-
|
|
571
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
|
|
572
572
|
} finally {
|
|
573
573
|
K(e);
|
|
574
574
|
}
|
|
575
575
|
}, [
|
|
576
|
-
|
|
576
|
+
Bt,
|
|
577
577
|
q,
|
|
578
578
|
l
|
|
579
|
-
]),
|
|
579
|
+
]), Xt = u(async () => {
|
|
580
580
|
if (!B || !H.trim()) return;
|
|
581
581
|
let e = B.id;
|
|
582
|
-
|
|
582
|
+
F(null), G(e);
|
|
583
583
|
let t = !1;
|
|
584
584
|
try {
|
|
585
585
|
let n = await Y({ variables: { input: {
|
|
@@ -596,7 +596,7 @@ var ut = l(function() {
|
|
|
596
596
|
t = !0;
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
|
-
|
|
599
|
+
F(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
|
|
600
600
|
} finally {
|
|
601
601
|
t && (V(null), U("")), K(e);
|
|
602
602
|
}
|
|
@@ -606,17 +606,17 @@ var ut = l(function() {
|
|
|
606
606
|
Y,
|
|
607
607
|
q,
|
|
608
608
|
l
|
|
609
|
-
]),
|
|
610
|
-
|
|
611
|
-
}, []),
|
|
609
|
+
]), Zt = u((e) => {
|
|
610
|
+
x(e);
|
|
611
|
+
}, []), Qt = u((e) => {
|
|
612
612
|
let t = e.generatedSpec;
|
|
613
|
-
t && (
|
|
613
|
+
t && (vt({
|
|
614
614
|
name: t.name,
|
|
615
615
|
pages: t.pages
|
|
616
|
-
}),
|
|
617
|
-
}, []),
|
|
618
|
-
if (
|
|
619
|
-
|
|
616
|
+
}), yt(e.id));
|
|
617
|
+
}, []), $t = he(/* @__PURE__ */ new Set()), en = u(async (e, t) => {
|
|
618
|
+
if ($t.current.has(e)) throw Error("A fix is already being applied to this draft. Please wait a moment.");
|
|
619
|
+
$t.current.add(e), F(null), G(e);
|
|
620
620
|
try {
|
|
621
621
|
let n = await Y({ variables: { input: {
|
|
622
622
|
generationId: e,
|
|
@@ -632,49 +632,49 @@ var ut = l(function() {
|
|
|
632
632
|
if (c(e, "command")) return null;
|
|
633
633
|
throw e;
|
|
634
634
|
} finally {
|
|
635
|
-
|
|
635
|
+
$t.current.delete(e), K(e);
|
|
636
636
|
}
|
|
637
637
|
}, [
|
|
638
638
|
Y,
|
|
639
639
|
q,
|
|
640
640
|
G,
|
|
641
641
|
K
|
|
642
|
-
]),
|
|
642
|
+
]), tn = u(async (e) => {
|
|
643
643
|
await J({ variables: { generationId: e } }), q();
|
|
644
|
-
}, [J, q]),
|
|
645
|
-
if (!(t == null ||
|
|
646
|
-
|
|
644
|
+
}, [J, q]), nn = u(async ({ id: e, undoRevision: t, specRevision: n }) => {
|
|
645
|
+
if (!(t == null || gt.current)) {
|
|
646
|
+
gt.current = !0, ht(null);
|
|
647
647
|
try {
|
|
648
|
-
let { data: r } = await
|
|
648
|
+
let { data: r } = await Vt({ variables: {
|
|
649
649
|
generationId: e,
|
|
650
650
|
toRevision: t,
|
|
651
651
|
expectedRevision: n
|
|
652
652
|
} }), i = r?.revertGeneratedDashboard;
|
|
653
653
|
if (!i) throw Error(l("bigconsole.insights.error.undoFailed", "Could not undo the last draft change."));
|
|
654
|
-
|
|
654
|
+
R((t) => t?.id === e ? i : t);
|
|
655
655
|
} catch (t) {
|
|
656
|
-
|
|
656
|
+
ht({
|
|
657
657
|
generationId: e,
|
|
658
658
|
message: t instanceof Error ? t.message : l("bigconsole.insights.error.undoFailed", "Could not undo the last draft change.")
|
|
659
659
|
});
|
|
660
660
|
} finally {
|
|
661
|
-
|
|
661
|
+
gt.current = !1;
|
|
662
662
|
}
|
|
663
663
|
}
|
|
664
|
-
}, [
|
|
665
|
-
name:
|
|
666
|
-
pages:
|
|
667
|
-
} : null, [
|
|
668
|
-
return /* @__PURE__ */
|
|
664
|
+
}, [Vt, l]), rn = me(() => L?.generatedSpec ? {
|
|
665
|
+
name: L.generatedSpec.name,
|
|
666
|
+
pages: L.generatedSpec.pages
|
|
667
|
+
} : null, [L?.generatedSpec]), $ = L?.generatedSpec;
|
|
668
|
+
return /* @__PURE__ */ b("div", {
|
|
669
669
|
"data-tour": "bigconsole-ai-insights",
|
|
670
670
|
className: "min-w-0",
|
|
671
671
|
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
672
672
|
children: [
|
|
673
|
-
/* @__PURE__ */
|
|
673
|
+
/* @__PURE__ */ b("header", {
|
|
674
674
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
675
|
-
children: [/* @__PURE__ */
|
|
675
|
+
children: [/* @__PURE__ */ y(Oe, { intensity: "subtle" }), /* @__PURE__ */ y("div", {
|
|
676
676
|
style: { padding: "var(--space-pagePadding)" },
|
|
677
|
-
children: /* @__PURE__ */
|
|
677
|
+
children: /* @__PURE__ */ b("div", {
|
|
678
678
|
style: {
|
|
679
679
|
display: "flex",
|
|
680
680
|
alignItems: "center",
|
|
@@ -682,7 +682,7 @@ var ut = l(function() {
|
|
|
682
682
|
flexWrap: "wrap",
|
|
683
683
|
minWidth: 0
|
|
684
684
|
},
|
|
685
|
-
children: [/* @__PURE__ */
|
|
685
|
+
children: [/* @__PURE__ */ y("div", {
|
|
686
686
|
style: {
|
|
687
687
|
display: "flex",
|
|
688
688
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -693,17 +693,17 @@ var ut = l(function() {
|
|
|
693
693
|
borderRadius: "var(--radius-card)",
|
|
694
694
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
695
695
|
},
|
|
696
|
-
children: /* @__PURE__ */
|
|
696
|
+
children: /* @__PURE__ */ y(h, { style: {
|
|
697
697
|
height: "var(--size-icon-lg)",
|
|
698
698
|
width: "var(--size-icon-lg)",
|
|
699
699
|
color: "var(--color-action-primary-text)"
|
|
700
700
|
} })
|
|
701
|
-
}), /* @__PURE__ */
|
|
701
|
+
}), /* @__PURE__ */ b("div", {
|
|
702
702
|
style: { minWidth: 0 },
|
|
703
|
-
children: [/* @__PURE__ */
|
|
703
|
+
children: [/* @__PURE__ */ y("h1", {
|
|
704
704
|
className: "m-0 text-2xl font-bold text-text-primary",
|
|
705
|
-
children: /* @__PURE__ */
|
|
706
|
-
}), /* @__PURE__ */
|
|
705
|
+
children: /* @__PURE__ */ y(Me, { children: l("bigconsole.insights.header.title", "AI Insights") })
|
|
706
|
+
}), /* @__PURE__ */ y("p", {
|
|
707
707
|
className: "m-0 text-sm text-text-secondary",
|
|
708
708
|
children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
709
709
|
})]
|
|
@@ -711,48 +711,48 @@ var ut = l(function() {
|
|
|
711
711
|
})
|
|
712
712
|
})]
|
|
713
713
|
}),
|
|
714
|
-
/* @__PURE__ */
|
|
714
|
+
/* @__PURE__ */ b("div", {
|
|
715
715
|
style: { padding: "var(--space-pagePadding)" },
|
|
716
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ y(Pe, {
|
|
717
717
|
className: "mb-[var(--space-sectionGap)]",
|
|
718
718
|
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."
|
|
719
|
-
}), /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
ft && /* @__PURE__ */
|
|
719
|
+
}), /* @__PURE__ */ b(i, { children: [
|
|
720
|
+
/* @__PURE__ */ y(fe, {}),
|
|
721
|
+
ft && /* @__PURE__ */ y(r, {
|
|
722
722
|
headingLevel: 2,
|
|
723
723
|
tone: "danger",
|
|
724
724
|
padding: "compact",
|
|
725
725
|
title: "That request did not go through",
|
|
726
726
|
description: ft,
|
|
727
|
-
icon: /* @__PURE__ */
|
|
727
|
+
icon: /* @__PURE__ */ y(ge, { className: "h-icon-sm w-icon-sm" }),
|
|
728
728
|
"data-testid": "insights-error",
|
|
729
|
-
actions: /* @__PURE__ */
|
|
729
|
+
actions: /* @__PURE__ */ y("button", {
|
|
730
730
|
type: "button",
|
|
731
|
-
onClick: () =>
|
|
731
|
+
onClick: () => F(null),
|
|
732
732
|
"aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
|
|
733
733
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
734
|
-
style:
|
|
734
|
+
style: w,
|
|
735
735
|
children: "Dismiss"
|
|
736
736
|
})
|
|
737
737
|
}),
|
|
738
|
-
(
|
|
738
|
+
(At || Ft) && /* @__PURE__ */ y("div", {
|
|
739
739
|
role: "alert",
|
|
740
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ y(r, {
|
|
741
741
|
tone: "danger",
|
|
742
742
|
padding: "compact",
|
|
743
743
|
headingLevel: 2,
|
|
744
744
|
title: l("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
|
|
745
745
|
description: l("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
|
|
746
746
|
"data-testid": "insights-load-error",
|
|
747
|
-
actions: /* @__PURE__ */
|
|
747
|
+
actions: /* @__PURE__ */ b("button", {
|
|
748
748
|
type: "button",
|
|
749
749
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
750
|
-
style:
|
|
750
|
+
style: w,
|
|
751
751
|
onClick: () => {
|
|
752
|
-
|
|
752
|
+
At && q().catch(() => void 0), Ft && It().catch(() => void 0);
|
|
753
753
|
},
|
|
754
754
|
children: [
|
|
755
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ y(Ce, {
|
|
756
756
|
size: 14,
|
|
757
757
|
"aria-hidden": "true"
|
|
758
758
|
}),
|
|
@@ -762,22 +762,22 @@ var ut = l(function() {
|
|
|
762
762
|
})
|
|
763
763
|
})
|
|
764
764
|
}),
|
|
765
|
-
/* @__PURE__ */
|
|
765
|
+
/* @__PURE__ */ y(r, {
|
|
766
766
|
id: "insights-prompt",
|
|
767
767
|
emphasis: "primary",
|
|
768
768
|
headingLevel: 2,
|
|
769
769
|
title: "Describe your dashboard",
|
|
770
770
|
description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
|
|
771
|
-
icon: /* @__PURE__ */
|
|
771
|
+
icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" }),
|
|
772
772
|
"data-testid": "insights-prompt",
|
|
773
|
-
children: /* @__PURE__ */
|
|
773
|
+
children: /* @__PURE__ */ b("div", {
|
|
774
774
|
style: {
|
|
775
775
|
display: "flex",
|
|
776
776
|
flexDirection: "column",
|
|
777
777
|
gap: "var(--space-controlGap)"
|
|
778
778
|
},
|
|
779
779
|
children: [
|
|
780
|
-
/* @__PURE__ */
|
|
780
|
+
/* @__PURE__ */ y("label", {
|
|
781
781
|
htmlFor: "prompt-input",
|
|
782
782
|
style: {
|
|
783
783
|
display: "block",
|
|
@@ -787,10 +787,10 @@ var ut = l(function() {
|
|
|
787
787
|
},
|
|
788
788
|
children: l("bigconsole.insights.prompt.label", "Your prompt")
|
|
789
789
|
}),
|
|
790
|
-
/* @__PURE__ */
|
|
790
|
+
/* @__PURE__ */ y("textarea", {
|
|
791
791
|
id: "prompt-input",
|
|
792
792
|
value: g,
|
|
793
|
-
onChange: (e) =>
|
|
793
|
+
onChange: (e) => x(e.target.value),
|
|
794
794
|
placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
795
795
|
rows: 3,
|
|
796
796
|
maxLength: 2e3,
|
|
@@ -807,10 +807,10 @@ var ut = l(function() {
|
|
|
807
807
|
resize: "vertical"
|
|
808
808
|
},
|
|
809
809
|
onKeyDown: (e) => {
|
|
810
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(),
|
|
810
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && (e.preventDefault(), Gt());
|
|
811
811
|
}
|
|
812
812
|
}),
|
|
813
|
-
/* @__PURE__ */
|
|
813
|
+
/* @__PURE__ */ b("div", {
|
|
814
814
|
role: "group",
|
|
815
815
|
"aria-label": l("bigconsole.insights.prompt.optionsLabel", "Generation options"),
|
|
816
816
|
"data-testid": "insights-generation-options",
|
|
@@ -820,73 +820,73 @@ var ut = l(function() {
|
|
|
820
820
|
gap: "var(--space-controlGap)"
|
|
821
821
|
},
|
|
822
822
|
children: [
|
|
823
|
-
/* @__PURE__ */
|
|
823
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
824
824
|
htmlFor: "prompt-style",
|
|
825
|
-
style:
|
|
825
|
+
style: E,
|
|
826
826
|
children: l("bigconsole.insights.prompt.style", "Style")
|
|
827
|
-
}), /* @__PURE__ */
|
|
827
|
+
}), /* @__PURE__ */ y(_, {
|
|
828
828
|
id: "prompt-style",
|
|
829
|
-
value:
|
|
830
|
-
onChange: (e) =>
|
|
829
|
+
value: S,
|
|
830
|
+
onChange: (e) => C(e.target.value),
|
|
831
831
|
className: n,
|
|
832
|
-
style:
|
|
833
|
-
children: Xe.map((e) => /* @__PURE__ */
|
|
832
|
+
style: D,
|
|
833
|
+
children: Xe.map((e) => /* @__PURE__ */ y("option", {
|
|
834
834
|
value: e.value,
|
|
835
835
|
children: e.label
|
|
836
836
|
}, e.value))
|
|
837
837
|
})] }),
|
|
838
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
839
839
|
htmlFor: "prompt-layout",
|
|
840
|
-
style:
|
|
840
|
+
style: E,
|
|
841
841
|
children: l("bigconsole.insights.prompt.layout", "Layout")
|
|
842
|
-
}), /* @__PURE__ */
|
|
842
|
+
}), /* @__PURE__ */ y(_, {
|
|
843
843
|
id: "prompt-layout",
|
|
844
|
-
value:
|
|
845
|
-
onChange: (e) =>
|
|
844
|
+
value: k,
|
|
845
|
+
onChange: (e) => A(e.target.value),
|
|
846
846
|
className: n,
|
|
847
|
-
style:
|
|
848
|
-
children: Ze.map((e) => /* @__PURE__ */
|
|
847
|
+
style: D,
|
|
848
|
+
children: Ze.map((e) => /* @__PURE__ */ y("option", {
|
|
849
849
|
value: e.value,
|
|
850
850
|
children: e.label
|
|
851
851
|
}, e.value))
|
|
852
852
|
})] }),
|
|
853
|
-
/* @__PURE__ */
|
|
853
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
854
854
|
htmlFor: "prompt-columns",
|
|
855
|
-
style:
|
|
855
|
+
style: E,
|
|
856
856
|
children: l("bigconsole.insights.prompt.columns", "Columns")
|
|
857
|
-
}), /* @__PURE__ */
|
|
857
|
+
}), /* @__PURE__ */ y(_, {
|
|
858
858
|
id: "prompt-columns",
|
|
859
|
-
value:
|
|
859
|
+
value: j,
|
|
860
860
|
onChange: (e) => rt(Number(e.target.value)),
|
|
861
861
|
className: n,
|
|
862
|
-
style:
|
|
863
|
-
children: Qe.map((e) => /* @__PURE__ */
|
|
862
|
+
style: D,
|
|
863
|
+
children: Qe.map((e) => /* @__PURE__ */ y("option", {
|
|
864
864
|
value: e,
|
|
865
865
|
children: e
|
|
866
866
|
}, e))
|
|
867
867
|
})] }),
|
|
868
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("label", {
|
|
869
869
|
htmlFor: "prompt-max-widgets",
|
|
870
|
-
style:
|
|
870
|
+
style: E,
|
|
871
871
|
children: l("bigconsole.insights.prompt.maxWidgets", "Max widgets")
|
|
872
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ y(_, {
|
|
873
873
|
id: "prompt-max-widgets",
|
|
874
|
-
value:
|
|
874
|
+
value: N,
|
|
875
875
|
onChange: (e) => ut(Number(e.target.value)),
|
|
876
876
|
className: n,
|
|
877
|
-
style:
|
|
878
|
-
children: $e.map((e) => /* @__PURE__ */
|
|
877
|
+
style: D,
|
|
878
|
+
children: $e.map((e) => /* @__PURE__ */ y("option", {
|
|
879
879
|
value: e,
|
|
880
880
|
children: e
|
|
881
881
|
}, e))
|
|
882
882
|
})] })
|
|
883
883
|
]
|
|
884
884
|
}),
|
|
885
|
-
/* @__PURE__ */
|
|
885
|
+
/* @__PURE__ */ y(ne, {
|
|
886
886
|
prompt: g,
|
|
887
|
-
disabled:
|
|
887
|
+
disabled: P
|
|
888
888
|
}),
|
|
889
|
-
/* @__PURE__ */
|
|
889
|
+
/* @__PURE__ */ b("div", {
|
|
890
890
|
style: {
|
|
891
891
|
display: "flex",
|
|
892
892
|
alignItems: "center",
|
|
@@ -895,7 +895,7 @@ var ut = l(function() {
|
|
|
895
895
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
896
896
|
paddingTop: "var(--space-controlGap)"
|
|
897
897
|
},
|
|
898
|
-
children: [/* @__PURE__ */
|
|
898
|
+
children: [/* @__PURE__ */ b("span", {
|
|
899
899
|
style: {
|
|
900
900
|
flex: "1 1 12rem",
|
|
901
901
|
minWidth: 0,
|
|
@@ -908,22 +908,22 @@ var ut = l(function() {
|
|
|
908
908
|
g.length,
|
|
909
909
|
"/2000"
|
|
910
910
|
]
|
|
911
|
-
}), /* @__PURE__ */
|
|
911
|
+
}), /* @__PURE__ */ b("button", {
|
|
912
912
|
type: "button",
|
|
913
|
-
onClick:
|
|
914
|
-
disabled: !g.trim() ||
|
|
913
|
+
onClick: Gt,
|
|
914
|
+
disabled: !g.trim() || P,
|
|
915
915
|
className: n,
|
|
916
916
|
style: {
|
|
917
|
-
...
|
|
917
|
+
...T,
|
|
918
918
|
marginLeft: "auto",
|
|
919
|
-
cursor: !g.trim() ||
|
|
920
|
-
opacity: !g.trim() ||
|
|
919
|
+
cursor: !g.trim() || P ? "not-allowed" : "pointer",
|
|
920
|
+
opacity: !g.trim() || P ? .5 : 1
|
|
921
921
|
},
|
|
922
|
-
children: [
|
|
922
|
+
children: [P ? /* @__PURE__ */ y(m, {
|
|
923
923
|
size: 16,
|
|
924
924
|
className: "animate-spin",
|
|
925
925
|
"aria-hidden": "true"
|
|
926
|
-
}) : /* @__PURE__ */
|
|
926
|
+
}) : /* @__PURE__ */ y(h, {
|
|
927
927
|
size: 16,
|
|
928
928
|
"aria-hidden": "true"
|
|
929
929
|
}), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
@@ -932,22 +932,22 @@ var ut = l(function() {
|
|
|
932
932
|
]
|
|
933
933
|
})
|
|
934
934
|
}),
|
|
935
|
-
|
|
935
|
+
Ht.length > 0 && /* @__PURE__ */ y(r, {
|
|
936
936
|
emphasis: "muted",
|
|
937
937
|
headingLevel: 2,
|
|
938
938
|
title: l("bigconsole.insights.suggestions.heading", "Starting points"),
|
|
939
939
|
description: "Pick one to drop it into the prompt box above, then edit it before generating.",
|
|
940
|
-
icon: /* @__PURE__ */
|
|
940
|
+
icon: /* @__PURE__ */ y(xe, { className: "h-icon-sm w-icon-sm" }),
|
|
941
941
|
"data-testid": "insights-suggestions",
|
|
942
|
-
children: /* @__PURE__ */
|
|
942
|
+
children: /* @__PURE__ */ y("div", {
|
|
943
943
|
style: {
|
|
944
944
|
display: "grid",
|
|
945
945
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
|
|
946
946
|
gap: "var(--space-controlGap)"
|
|
947
947
|
},
|
|
948
|
-
children:
|
|
948
|
+
children: Ht.map((e) => /* @__PURE__ */ b("button", {
|
|
949
949
|
type: "button",
|
|
950
|
-
onClick: () =>
|
|
950
|
+
onClick: () => Zt(e.prompt),
|
|
951
951
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
952
952
|
style: {
|
|
953
953
|
textAlign: "left",
|
|
@@ -960,7 +960,7 @@ var ut = l(function() {
|
|
|
960
960
|
cursor: "pointer"
|
|
961
961
|
},
|
|
962
962
|
children: [
|
|
963
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ y("span", {
|
|
964
964
|
style: {
|
|
965
965
|
display: "block",
|
|
966
966
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -970,7 +970,7 @@ var ut = l(function() {
|
|
|
970
970
|
},
|
|
971
971
|
children: e.title
|
|
972
972
|
}),
|
|
973
|
-
/* @__PURE__ */
|
|
973
|
+
/* @__PURE__ */ y("span", {
|
|
974
974
|
style: {
|
|
975
975
|
display: "block",
|
|
976
976
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -979,15 +979,15 @@ var ut = l(function() {
|
|
|
979
979
|
},
|
|
980
980
|
children: e.exampleDescription || e.prompt
|
|
981
981
|
}),
|
|
982
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
982
|
+
e.tags.length > 0 && /* @__PURE__ */ y("span", {
|
|
983
983
|
style: {
|
|
984
984
|
display: "flex",
|
|
985
985
|
gap: "var(--space-iconGap)",
|
|
986
986
|
marginTop: "var(--space-controlGap)",
|
|
987
987
|
flexWrap: "wrap"
|
|
988
988
|
},
|
|
989
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
990
|
-
style:
|
|
989
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ y("span", {
|
|
990
|
+
style: O,
|
|
991
991
|
children: e
|
|
992
992
|
}, e))
|
|
993
993
|
})
|
|
@@ -995,15 +995,15 @@ var ut = l(function() {
|
|
|
995
995
|
}, e.id))
|
|
996
996
|
})
|
|
997
997
|
}),
|
|
998
|
-
/* @__PURE__ */
|
|
998
|
+
/* @__PURE__ */ y(r, {
|
|
999
999
|
emphasis: "bare",
|
|
1000
1000
|
padding: "none",
|
|
1001
1001
|
headingLevel: 2,
|
|
1002
1002
|
title: l("bigconsole.insights.generations.heading", "Recent generations"),
|
|
1003
1003
|
description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
|
|
1004
|
-
icon: /* @__PURE__ */
|
|
1005
|
-
meta: Q.length > 0 ? /* @__PURE__ */
|
|
1006
|
-
style:
|
|
1004
|
+
icon: /* @__PURE__ */ y(be, { className: "h-icon-sm w-icon-sm" }),
|
|
1005
|
+
meta: Q.length > 0 ? /* @__PURE__ */ b("span", {
|
|
1006
|
+
style: O,
|
|
1007
1007
|
children: [
|
|
1008
1008
|
Q.length,
|
|
1009
1009
|
" generation",
|
|
@@ -1011,13 +1011,13 @@ var ut = l(function() {
|
|
|
1011
1011
|
]
|
|
1012
1012
|
}) : void 0,
|
|
1013
1013
|
"data-testid": "insights-generations",
|
|
1014
|
-
children:
|
|
1014
|
+
children: kt && Z.length === 0 ? /* @__PURE__ */ y(r, {
|
|
1015
1015
|
emphasis: "muted",
|
|
1016
1016
|
headingLevel: 3,
|
|
1017
1017
|
"aria-label": "Loading generations",
|
|
1018
1018
|
className: "min-h-[10rem]",
|
|
1019
1019
|
"data-testid": "insights-generations-loading",
|
|
1020
|
-
children: /* @__PURE__ */
|
|
1020
|
+
children: /* @__PURE__ */ b("div", {
|
|
1021
1021
|
style: {
|
|
1022
1022
|
display: "flex",
|
|
1023
1023
|
minHeight: "8rem",
|
|
@@ -1027,91 +1027,94 @@ var ut = l(function() {
|
|
|
1027
1027
|
gap: "var(--space-controlGap)",
|
|
1028
1028
|
color: "var(--color-text-muted)"
|
|
1029
1029
|
},
|
|
1030
|
-
children: [/* @__PURE__ */
|
|
1030
|
+
children: [/* @__PURE__ */ y(m, {
|
|
1031
1031
|
size: 24,
|
|
1032
1032
|
className: "animate-spin",
|
|
1033
1033
|
"aria-hidden": "true"
|
|
1034
|
-
}), /* @__PURE__ */
|
|
1034
|
+
}), /* @__PURE__ */ y("p", {
|
|
1035
1035
|
style: { fontSize: "var(--font-size-body-sm)" },
|
|
1036
1036
|
children: l("bigconsole.insights.generations.loading", "Loading generations…")
|
|
1037
1037
|
})]
|
|
1038
1038
|
})
|
|
1039
|
-
}) : Z.length === 0 && !
|
|
1039
|
+
}) : Z.length === 0 && !P && !At ? /* @__PURE__ */ y(je, {
|
|
1040
1040
|
treatment: "insight",
|
|
1041
1041
|
className: "border-[var(--color-border-seam)]",
|
|
1042
|
-
children: /* @__PURE__ */
|
|
1042
|
+
children: /* @__PURE__ */ y(Ne, {
|
|
1043
1043
|
illustration: "onboarding",
|
|
1044
|
+
kind: "first-use",
|
|
1045
|
+
glassIllustration: "charts",
|
|
1046
|
+
size: "panel",
|
|
1044
1047
|
title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
1045
1048
|
description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
1046
1049
|
})
|
|
1047
|
-
}) : /* @__PURE__ */
|
|
1050
|
+
}) : /* @__PURE__ */ b("div", {
|
|
1048
1051
|
className: "flex flex-col gap-list-gap",
|
|
1049
1052
|
children: [
|
|
1050
|
-
|
|
1053
|
+
P && !Nt && /* @__PURE__ */ y(r, {
|
|
1051
1054
|
emphasis: "muted",
|
|
1052
1055
|
tone: "info",
|
|
1053
1056
|
padding: "compact",
|
|
1054
1057
|
headingLevel: 3,
|
|
1055
1058
|
title: "Sending your prompt…",
|
|
1056
1059
|
description: "The new generation appears here as soon as the backend accepts it.",
|
|
1057
|
-
icon: /* @__PURE__ */
|
|
1060
|
+
icon: /* @__PURE__ */ y(m, { className: "h-icon-sm w-icon-sm animate-spin" }),
|
|
1058
1061
|
"data-testid": "insights-generation-pending"
|
|
1059
1062
|
}),
|
|
1060
1063
|
Q.map((e) => {
|
|
1061
|
-
let t = e.generatedSpec, i = ee(Z, e), o =
|
|
1062
|
-
return /* @__PURE__ */
|
|
1064
|
+
let t = e.generatedSpec, i = ee(Z, e), o = I.has(e.id), s = qe.includes(e.status);
|
|
1065
|
+
return /* @__PURE__ */ b(r, {
|
|
1063
1066
|
emphasis: "standard",
|
|
1064
1067
|
padding: "compact",
|
|
1065
1068
|
headingLevel: 3,
|
|
1066
1069
|
title: t?.name || (s ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
|
|
1067
|
-
meta: /* @__PURE__ */
|
|
1070
|
+
meta: /* @__PURE__ */ y(it, { status: e.status }),
|
|
1068
1071
|
description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
|
|
1069
1072
|
"data-testid": "insights-generation-card",
|
|
1070
1073
|
bodyClassName: "flex flex-col gap-control-gap",
|
|
1071
1074
|
children: [
|
|
1072
|
-
t && /* @__PURE__ */
|
|
1075
|
+
t && /* @__PURE__ */ b("div", {
|
|
1073
1076
|
style: {
|
|
1074
1077
|
display: "flex",
|
|
1075
1078
|
flexWrap: "wrap",
|
|
1076
1079
|
gap: "var(--space-iconGap)"
|
|
1077
1080
|
},
|
|
1078
1081
|
children: [
|
|
1079
|
-
e.parentGenerationId && /* @__PURE__ */
|
|
1080
|
-
style:
|
|
1082
|
+
e.parentGenerationId && /* @__PURE__ */ y("span", {
|
|
1083
|
+
style: O,
|
|
1081
1084
|
"data-testid": "insights-generation-revision",
|
|
1082
1085
|
children: i ? l("bigconsole.insights.generations.revisionOf", "Revision of {{name}}", { name: i.generatedSpec?.name || l("bigconsole.insights.generations.untitled", "Untitled generation") }) : l("bigconsole.insights.generations.revisionOfEarlier", "Revision of an earlier generation")
|
|
1083
1086
|
}),
|
|
1084
|
-
/* @__PURE__ */
|
|
1085
|
-
style:
|
|
1087
|
+
/* @__PURE__ */ b("span", {
|
|
1088
|
+
style: O,
|
|
1086
1089
|
children: [
|
|
1087
|
-
|
|
1090
|
+
M(t),
|
|
1088
1091
|
" widget",
|
|
1089
|
-
|
|
1092
|
+
M(t) === 1 ? "" : "s"
|
|
1090
1093
|
]
|
|
1091
1094
|
}),
|
|
1092
|
-
/* @__PURE__ */
|
|
1093
|
-
style:
|
|
1095
|
+
/* @__PURE__ */ b("span", {
|
|
1096
|
+
style: O,
|
|
1094
1097
|
children: [
|
|
1095
1098
|
t.pages.length,
|
|
1096
1099
|
" page",
|
|
1097
1100
|
t.pages.length === 1 ? "" : "s"
|
|
1098
1101
|
]
|
|
1099
1102
|
}),
|
|
1100
|
-
/* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ b("span", {
|
|
1101
1104
|
style: at(t.overallConfidence),
|
|
1102
1105
|
children: [Math.round(t.overallConfidence * 100), "% confidence"]
|
|
1103
1106
|
})
|
|
1104
1107
|
]
|
|
1105
1108
|
}),
|
|
1106
|
-
e.errorMessage && /* @__PURE__ */
|
|
1109
|
+
e.errorMessage && /* @__PURE__ */ y(r, {
|
|
1107
1110
|
headingLevel: 4,
|
|
1108
1111
|
tone: "danger",
|
|
1109
1112
|
padding: "compact",
|
|
1110
1113
|
title: "Generation failed",
|
|
1111
1114
|
description: e.errorMessage,
|
|
1112
|
-
icon: /* @__PURE__ */
|
|
1115
|
+
icon: /* @__PURE__ */ y(ge, { className: "h-icon-sm w-icon-sm" })
|
|
1113
1116
|
}),
|
|
1114
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ b("div", {
|
|
1115
1118
|
style: {
|
|
1116
1119
|
display: "flex",
|
|
1117
1120
|
flexWrap: "wrap",
|
|
@@ -1121,10 +1124,10 @@ var ut = l(function() {
|
|
|
1121
1124
|
paddingTop: "var(--space-controlGap)"
|
|
1122
1125
|
},
|
|
1123
1126
|
children: [
|
|
1124
|
-
s && /* @__PURE__ */
|
|
1127
|
+
s && /* @__PURE__ */ b("button", {
|
|
1125
1128
|
type: "button",
|
|
1126
1129
|
onClick: () => {
|
|
1127
|
-
ie("medium"),
|
|
1130
|
+
ie("medium"), Jt(e.id);
|
|
1128
1131
|
},
|
|
1129
1132
|
disabled: o,
|
|
1130
1133
|
title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
|
|
@@ -1134,7 +1137,7 @@ var ut = l(function() {
|
|
|
1134
1137
|
cursor: o ? "wait" : "pointer"
|
|
1135
1138
|
},
|
|
1136
1139
|
children: [
|
|
1137
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ y(ve, {
|
|
1138
1141
|
size: 14,
|
|
1139
1142
|
"aria-hidden": "true"
|
|
1140
1143
|
}),
|
|
@@ -1142,16 +1145,16 @@ var ut = l(function() {
|
|
|
1142
1145
|
l("bigconsole.insights.actions.cancel", "Cancel")
|
|
1143
1146
|
]
|
|
1144
1147
|
}),
|
|
1145
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1148
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
|
|
1146
1149
|
type: "button",
|
|
1147
1150
|
onClick: () => {
|
|
1148
|
-
|
|
1151
|
+
ht(null), R(e);
|
|
1149
1152
|
},
|
|
1150
1153
|
title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
1151
1154
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1152
|
-
style:
|
|
1155
|
+
style: w,
|
|
1153
1156
|
children: [
|
|
1154
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ y(ye, {
|
|
1155
1158
|
size: 14,
|
|
1156
1159
|
"aria-hidden": "true"
|
|
1157
1160
|
}),
|
|
@@ -1159,16 +1162,16 @@ var ut = l(function() {
|
|
|
1159
1162
|
l("bigconsole.insights.actions.preview", "Preview")
|
|
1160
1163
|
]
|
|
1161
1164
|
}),
|
|
1162
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1165
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
|
|
1163
1166
|
type: "button",
|
|
1164
1167
|
onClick: () => {
|
|
1165
1168
|
V(e), U("");
|
|
1166
1169
|
},
|
|
1167
1170
|
title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1168
1171
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1169
|
-
style:
|
|
1172
|
+
style: w,
|
|
1170
1173
|
children: [
|
|
1171
|
-
/* @__PURE__ */
|
|
1174
|
+
/* @__PURE__ */ y(Ee, {
|
|
1172
1175
|
size: 14,
|
|
1173
1176
|
"aria-hidden": "true"
|
|
1174
1177
|
}),
|
|
@@ -1176,14 +1179,14 @@ var ut = l(function() {
|
|
|
1176
1179
|
l("bigconsole.insights.actions.refine", "Refine")
|
|
1177
1180
|
]
|
|
1178
1181
|
}),
|
|
1179
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
1182
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ b("button", {
|
|
1180
1183
|
type: "button",
|
|
1181
|
-
onClick: () =>
|
|
1184
|
+
onClick: () => Qt(e),
|
|
1182
1185
|
title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
|
|
1183
1186
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1184
|
-
style:
|
|
1187
|
+
style: w,
|
|
1185
1188
|
children: [
|
|
1186
|
-
/* @__PURE__ */
|
|
1189
|
+
/* @__PURE__ */ y(we, {
|
|
1187
1190
|
size: 14,
|
|
1188
1191
|
"aria-hidden": "true"
|
|
1189
1192
|
}),
|
|
@@ -1191,20 +1194,20 @@ var ut = l(function() {
|
|
|
1191
1194
|
l("bigconsole.insights.actions.checkDraft", "Check draft")
|
|
1192
1195
|
]
|
|
1193
1196
|
}),
|
|
1194
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */
|
|
1197
|
+
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ b("button", {
|
|
1195
1198
|
type: "button",
|
|
1196
1199
|
onClick: () => {
|
|
1197
|
-
ie("medium"),
|
|
1200
|
+
ie("medium"), Yt(e.id);
|
|
1198
1201
|
},
|
|
1199
1202
|
disabled: o,
|
|
1200
1203
|
title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
|
|
1201
1204
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1202
1205
|
style: {
|
|
1203
|
-
...
|
|
1206
|
+
...w,
|
|
1204
1207
|
cursor: o ? "wait" : "pointer"
|
|
1205
1208
|
},
|
|
1206
1209
|
children: [
|
|
1207
|
-
/* @__PURE__ */
|
|
1210
|
+
/* @__PURE__ */ y(Ce, {
|
|
1208
1211
|
size: 14,
|
|
1209
1212
|
className: o ? "animate-spin" : "",
|
|
1210
1213
|
"aria-hidden": "true"
|
|
@@ -1213,7 +1216,7 @@ var ut = l(function() {
|
|
|
1213
1216
|
l("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
1214
1217
|
]
|
|
1215
1218
|
}),
|
|
1216
|
-
/* @__PURE__ */
|
|
1219
|
+
/* @__PURE__ */ b("div", {
|
|
1217
1220
|
style: {
|
|
1218
1221
|
display: "flex",
|
|
1219
1222
|
flexWrap: "wrap",
|
|
@@ -1222,50 +1225,50 @@ var ut = l(function() {
|
|
|
1222
1225
|
marginLeft: "auto"
|
|
1223
1226
|
},
|
|
1224
1227
|
children: [
|
|
1225
|
-
e.status === "COMPLETED" && a(e).kind === "hold" && /* @__PURE__ */
|
|
1228
|
+
e.status === "COMPLETED" && a(e).kind === "hold" && /* @__PURE__ */ y("span", {
|
|
1226
1229
|
role: "status",
|
|
1227
1230
|
children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
|
|
1228
1231
|
}),
|
|
1229
|
-
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */
|
|
1232
|
+
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ b("button", {
|
|
1230
1233
|
type: "button",
|
|
1231
|
-
onClick: () =>
|
|
1234
|
+
onClick: () => Kt(e),
|
|
1232
1235
|
disabled: a(e).kind !== "create",
|
|
1233
1236
|
title: a(e).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
|
|
1234
1237
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1235
|
-
style:
|
|
1238
|
+
style: T,
|
|
1236
1239
|
children: [
|
|
1237
1240
|
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1238
1241
|
" ",
|
|
1239
|
-
/* @__PURE__ */
|
|
1242
|
+
/* @__PURE__ */ y(_e, {
|
|
1240
1243
|
size: 14,
|
|
1241
1244
|
"aria-hidden": "true"
|
|
1242
1245
|
})
|
|
1243
1246
|
]
|
|
1244
1247
|
}),
|
|
1245
|
-
e.dashboardId && /* @__PURE__ */
|
|
1248
|
+
e.dashboardId && /* @__PURE__ */ b("button", {
|
|
1246
1249
|
type: "button",
|
|
1247
1250
|
onClick: () => f(`/dashboards/${e.dashboardId ?? ""}`),
|
|
1248
1251
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1249
|
-
style:
|
|
1252
|
+
style: w,
|
|
1250
1253
|
children: [
|
|
1251
1254
|
l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
|
|
1252
1255
|
" ",
|
|
1253
|
-
/* @__PURE__ */
|
|
1256
|
+
/* @__PURE__ */ y(_e, {
|
|
1254
1257
|
size: 14,
|
|
1255
1258
|
"aria-hidden": "true"
|
|
1256
1259
|
})
|
|
1257
1260
|
]
|
|
1258
1261
|
}),
|
|
1259
|
-
/* @__PURE__ */
|
|
1262
|
+
/* @__PURE__ */ y("button", {
|
|
1260
1263
|
type: "button",
|
|
1261
1264
|
onClick: () => {
|
|
1262
|
-
ie("medium"),
|
|
1265
|
+
ie("medium"), qt(e.id);
|
|
1263
1266
|
},
|
|
1264
1267
|
title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1265
1268
|
"aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1266
1269
|
className: n,
|
|
1267
1270
|
style: nt,
|
|
1268
|
-
children: /* @__PURE__ */
|
|
1271
|
+
children: /* @__PURE__ */ y(Te, {
|
|
1269
1272
|
size: 14,
|
|
1270
1273
|
"aria-hidden": "true"
|
|
1271
1274
|
})
|
|
@@ -1277,25 +1280,25 @@ var ut = l(function() {
|
|
|
1277
1280
|
]
|
|
1278
1281
|
}, e.id);
|
|
1279
1282
|
}),
|
|
1280
|
-
|
|
1283
|
+
Wt.length > 0 && /* @__PURE__ */ y("button", {
|
|
1281
1284
|
type: "button",
|
|
1282
|
-
onClick: () =>
|
|
1283
|
-
"aria-expanded":
|
|
1285
|
+
onClick: () => wt((e) => !e),
|
|
1286
|
+
"aria-expanded": Ct,
|
|
1284
1287
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1285
|
-
style:
|
|
1288
|
+
style: w,
|
|
1286
1289
|
"data-testid": "insights-earlier-versions-toggle",
|
|
1287
|
-
children:
|
|
1290
|
+
children: Ct ? l("bigconsole.insights.generations.hideEarlier", "Hide earlier versions") : Wt.length === 1 ? l("bigconsole.insights.generations.showEarlierOne", "Show 1 earlier version") : l("bigconsole.insights.generations.showEarlier", "Show {{count}} earlier versions", { count: Wt.length })
|
|
1288
1291
|
})
|
|
1289
1292
|
]
|
|
1290
1293
|
})
|
|
1291
1294
|
})
|
|
1292
1295
|
] })]
|
|
1293
1296
|
}),
|
|
1294
|
-
|
|
1297
|
+
L && $ && /* @__PURE__ */ y("div", {
|
|
1295
1298
|
role: "dialog",
|
|
1296
1299
|
"aria-modal": "true",
|
|
1297
1300
|
"aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
|
|
1298
|
-
onClick: () =>
|
|
1301
|
+
onClick: () => R(null),
|
|
1299
1302
|
style: {
|
|
1300
1303
|
position: "fixed",
|
|
1301
1304
|
inset: 0,
|
|
@@ -1306,7 +1309,7 @@ var ut = l(function() {
|
|
|
1306
1309
|
justifyContent: "center",
|
|
1307
1310
|
padding: "var(--space-pagePadding)"
|
|
1308
1311
|
},
|
|
1309
|
-
children: /* @__PURE__ */
|
|
1312
|
+
children: /* @__PURE__ */ b("div", {
|
|
1310
1313
|
onClick: (e) => e.stopPropagation(),
|
|
1311
1314
|
style: {
|
|
1312
1315
|
display: "flex",
|
|
@@ -1320,7 +1323,7 @@ var ut = l(function() {
|
|
|
1320
1323
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1321
1324
|
},
|
|
1322
1325
|
children: [
|
|
1323
|
-
/* @__PURE__ */
|
|
1326
|
+
/* @__PURE__ */ b("div", {
|
|
1324
1327
|
style: {
|
|
1325
1328
|
display: "flex",
|
|
1326
1329
|
justifyContent: "space-between",
|
|
@@ -1329,16 +1332,16 @@ var ut = l(function() {
|
|
|
1329
1332
|
padding: "var(--space-cardPadding)",
|
|
1330
1333
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1331
1334
|
},
|
|
1332
|
-
children: [/* @__PURE__ */
|
|
1335
|
+
children: [/* @__PURE__ */ b("div", {
|
|
1333
1336
|
style: { minWidth: 0 },
|
|
1334
|
-
children: [/* @__PURE__ */
|
|
1337
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
1335
1338
|
style: {
|
|
1336
1339
|
fontSize: "var(--font-size-heading-h4)",
|
|
1337
1340
|
fontWeight: "var(--font-weight-semibold)",
|
|
1338
1341
|
color: "var(--color-text-primary)"
|
|
1339
1342
|
},
|
|
1340
1343
|
children: $.name
|
|
1341
|
-
}), $.description && /* @__PURE__ */
|
|
1344
|
+
}), $.description && /* @__PURE__ */ y("p", {
|
|
1342
1345
|
style: {
|
|
1343
1346
|
fontSize: "var(--font-size-body-sm)",
|
|
1344
1347
|
color: "var(--color-text-secondary)",
|
|
@@ -1346,22 +1349,22 @@ var ut = l(function() {
|
|
|
1346
1349
|
},
|
|
1347
1350
|
children: $.description
|
|
1348
1351
|
})]
|
|
1349
|
-
}), /* @__PURE__ */
|
|
1352
|
+
}), /* @__PURE__ */ y("button", {
|
|
1350
1353
|
type: "button",
|
|
1351
|
-
onClick: () =>
|
|
1354
|
+
onClick: () => R(null),
|
|
1352
1355
|
"aria-label": l("bigconsole.insights.preview.close", "Close preview"),
|
|
1353
1356
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1354
1357
|
style: {
|
|
1355
1358
|
...nt,
|
|
1356
1359
|
color: "var(--color-text-muted)"
|
|
1357
1360
|
},
|
|
1358
|
-
children: /* @__PURE__ */
|
|
1361
|
+
children: /* @__PURE__ */ y(De, {
|
|
1359
1362
|
size: 18,
|
|
1360
1363
|
"aria-hidden": "true"
|
|
1361
1364
|
})
|
|
1362
1365
|
})]
|
|
1363
1366
|
}),
|
|
1364
|
-
/* @__PURE__ */
|
|
1367
|
+
/* @__PURE__ */ b("div", {
|
|
1365
1368
|
style: {
|
|
1366
1369
|
flex: "1 1 auto",
|
|
1367
1370
|
minHeight: 0,
|
|
@@ -1372,61 +1375,61 @@ var ut = l(function() {
|
|
|
1372
1375
|
gap: "var(--space-controlGap)"
|
|
1373
1376
|
},
|
|
1374
1377
|
children: [
|
|
1375
|
-
/* @__PURE__ */
|
|
1378
|
+
/* @__PURE__ */ y(ke, { children: /* @__PURE__ */ b(Ae, {
|
|
1376
1379
|
className: "flex items-start gap-[var(--space-iconGap)] p-[var(--space-cardPadding)]",
|
|
1377
|
-
children: [/* @__PURE__ */
|
|
1380
|
+
children: [/* @__PURE__ */ y(ge, {
|
|
1378
1381
|
className: "h-icon-sm w-icon-sm shrink-0",
|
|
1379
1382
|
"aria-hidden": "true"
|
|
1380
|
-
}), /* @__PURE__ */
|
|
1383
|
+
}), /* @__PURE__ */ y("p", {
|
|
1381
1384
|
className: "text-body-sm",
|
|
1382
1385
|
children: l("bigconsole.insights.preview.aiVerificationNotice", "This console was generated by AI. Verify bindings and figures before publishing.")
|
|
1383
1386
|
})]
|
|
1384
1387
|
}) }),
|
|
1385
|
-
/* @__PURE__ */
|
|
1388
|
+
/* @__PURE__ */ b("div", {
|
|
1386
1389
|
style: {
|
|
1387
1390
|
display: "flex",
|
|
1388
1391
|
flexWrap: "wrap",
|
|
1389
1392
|
gap: "var(--space-iconGap)"
|
|
1390
1393
|
},
|
|
1391
1394
|
children: [
|
|
1392
|
-
/* @__PURE__ */
|
|
1393
|
-
style:
|
|
1395
|
+
/* @__PURE__ */ b("span", {
|
|
1396
|
+
style: O,
|
|
1394
1397
|
children: [
|
|
1395
|
-
|
|
1398
|
+
M($),
|
|
1396
1399
|
" widget",
|
|
1397
|
-
|
|
1400
|
+
M($) === 1 ? "" : "s"
|
|
1398
1401
|
]
|
|
1399
1402
|
}),
|
|
1400
|
-
/* @__PURE__ */
|
|
1401
|
-
style:
|
|
1403
|
+
/* @__PURE__ */ b("span", {
|
|
1404
|
+
style: O,
|
|
1402
1405
|
children: [
|
|
1403
1406
|
$.pages.length,
|
|
1404
1407
|
" page",
|
|
1405
1408
|
$.pages.length === 1 ? "" : "s"
|
|
1406
1409
|
]
|
|
1407
1410
|
}),
|
|
1408
|
-
/* @__PURE__ */
|
|
1411
|
+
/* @__PURE__ */ b("span", {
|
|
1409
1412
|
style: at($.overallConfidence),
|
|
1410
1413
|
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
1411
1414
|
})
|
|
1412
1415
|
]
|
|
1413
1416
|
}),
|
|
1414
|
-
/* @__PURE__ */
|
|
1415
|
-
/* @__PURE__ */
|
|
1416
|
-
mt?.generationId ===
|
|
1417
|
+
/* @__PURE__ */ y(ce, { metadata: L.processingMetadata }),
|
|
1418
|
+
/* @__PURE__ */ y(se, { warnings: $.warnings }),
|
|
1419
|
+
mt?.generationId === L.id && /* @__PURE__ */ y("p", {
|
|
1417
1420
|
role: "alert",
|
|
1418
1421
|
children: mt.message
|
|
1419
1422
|
}),
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
spec:
|
|
1422
|
-
onApplyFix: (e) =>
|
|
1423
|
-
onUndoFix:
|
|
1424
|
-
applied:
|
|
1425
|
-
onAppliedChange: (e) =>
|
|
1423
|
+
/* @__PURE__ */ y(le, {
|
|
1424
|
+
spec: rn,
|
|
1425
|
+
onApplyFix: (e) => en(L.id, e),
|
|
1426
|
+
onUndoFix: tn,
|
|
1427
|
+
applied: bt[L.id] ?? null,
|
|
1428
|
+
onAppliedChange: (e) => St(L.id, e)
|
|
1426
1429
|
}),
|
|
1427
|
-
$.reasoning && /* @__PURE__ */
|
|
1430
|
+
$.reasoning && /* @__PURE__ */ b("details", {
|
|
1428
1431
|
"data-testid": "preview-reasoning",
|
|
1429
|
-
children: [/* @__PURE__ */
|
|
1432
|
+
children: [/* @__PURE__ */ y("summary", {
|
|
1430
1433
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1431
1434
|
style: {
|
|
1432
1435
|
cursor: "pointer",
|
|
@@ -1436,7 +1439,7 @@ var ut = l(function() {
|
|
|
1436
1439
|
borderRadius: "var(--radius-button)"
|
|
1437
1440
|
},
|
|
1438
1441
|
children: l("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
|
|
1439
|
-
}), /* @__PURE__ */
|
|
1442
|
+
}), /* @__PURE__ */ y("p", {
|
|
1440
1443
|
style: {
|
|
1441
1444
|
marginTop: "var(--space-controlGap)",
|
|
1442
1445
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -1446,20 +1449,20 @@ var ut = l(function() {
|
|
|
1446
1449
|
children: $.reasoning
|
|
1447
1450
|
})]
|
|
1448
1451
|
}),
|
|
1449
|
-
$.pages.map((e, t) => /* @__PURE__ */
|
|
1452
|
+
$.pages.map((e, t) => /* @__PURE__ */ b(r, {
|
|
1450
1453
|
emphasis: "muted",
|
|
1451
1454
|
padding: "compact",
|
|
1452
1455
|
headingLevel: 3,
|
|
1453
1456
|
title: e.name,
|
|
1454
|
-
meta: /* @__PURE__ */
|
|
1455
|
-
style:
|
|
1457
|
+
meta: /* @__PURE__ */ b("span", {
|
|
1458
|
+
style: O,
|
|
1456
1459
|
children: [
|
|
1457
1460
|
e.widgets.length,
|
|
1458
1461
|
" widget",
|
|
1459
1462
|
e.widgets.length === 1 ? "" : "s"
|
|
1460
1463
|
]
|
|
1461
1464
|
}),
|
|
1462
|
-
children: [/* @__PURE__ */
|
|
1465
|
+
children: [/* @__PURE__ */ b("p", {
|
|
1463
1466
|
style: {
|
|
1464
1467
|
fontSize: "var(--font-size-body-sm)",
|
|
1465
1468
|
color: "var(--color-text-secondary)",
|
|
@@ -1475,12 +1478,12 @@ var ut = l(function() {
|
|
|
1475
1478
|
" ",
|
|
1476
1479
|
e.layout.toLowerCase().replaceAll("_", " ")
|
|
1477
1480
|
]
|
|
1478
|
-
}), /* @__PURE__ */
|
|
1481
|
+
}), /* @__PURE__ */ y("div", {
|
|
1479
1482
|
className: "insights-proposal-grid",
|
|
1480
1483
|
style: st(e.gridColumns),
|
|
1481
1484
|
children: e.widgets.map((t, n) => {
|
|
1482
1485
|
let r = ot(t.confidence);
|
|
1483
|
-
return /* @__PURE__ */
|
|
1486
|
+
return /* @__PURE__ */ b("div", {
|
|
1484
1487
|
className: "insights-proposal-widget",
|
|
1485
1488
|
style: {
|
|
1486
1489
|
...ct(t.position, e.gridColumns),
|
|
@@ -1493,7 +1496,7 @@ var ut = l(function() {
|
|
|
1493
1496
|
border: "1px solid var(--color-border-subtle)"
|
|
1494
1497
|
},
|
|
1495
1498
|
children: [
|
|
1496
|
-
/* @__PURE__ */
|
|
1499
|
+
/* @__PURE__ */ b("div", {
|
|
1497
1500
|
style: {
|
|
1498
1501
|
display: "flex",
|
|
1499
1502
|
flexWrap: "wrap",
|
|
@@ -1501,7 +1504,7 @@ var ut = l(function() {
|
|
|
1501
1504
|
gap: "var(--space-iconGap)"
|
|
1502
1505
|
},
|
|
1503
1506
|
children: [
|
|
1504
|
-
/* @__PURE__ */
|
|
1507
|
+
/* @__PURE__ */ y("span", {
|
|
1505
1508
|
style: {
|
|
1506
1509
|
fontSize: "var(--font-size-body-sm)",
|
|
1507
1510
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -1510,7 +1513,7 @@ var ut = l(function() {
|
|
|
1510
1513
|
},
|
|
1511
1514
|
children: t.title
|
|
1512
1515
|
}),
|
|
1513
|
-
/* @__PURE__ */
|
|
1516
|
+
/* @__PURE__ */ y("span", {
|
|
1514
1517
|
style: {
|
|
1515
1518
|
fontSize: "var(--font-size-xs)",
|
|
1516
1519
|
color: "var(--color-text-muted)"
|
|
@@ -1518,7 +1521,7 @@ var ut = l(function() {
|
|
|
1518
1521
|
"data-testid": "preview-widget-type",
|
|
1519
1522
|
children: t.type
|
|
1520
1523
|
}),
|
|
1521
|
-
r && /* @__PURE__ */
|
|
1524
|
+
r && /* @__PURE__ */ y("span", {
|
|
1522
1525
|
style: {
|
|
1523
1526
|
...lt(r),
|
|
1524
1527
|
marginLeft: "auto"
|
|
@@ -1528,7 +1531,7 @@ var ut = l(function() {
|
|
|
1528
1531
|
})
|
|
1529
1532
|
]
|
|
1530
1533
|
}),
|
|
1531
|
-
t.reasoning && /* @__PURE__ */
|
|
1534
|
+
t.reasoning && /* @__PURE__ */ y("p", {
|
|
1532
1535
|
style: {
|
|
1533
1536
|
margin: 0,
|
|
1534
1537
|
fontSize: "var(--font-size-xs)",
|
|
@@ -1537,7 +1540,7 @@ var ut = l(function() {
|
|
|
1537
1540
|
},
|
|
1538
1541
|
children: t.reasoning
|
|
1539
1542
|
}),
|
|
1540
|
-
/* @__PURE__ */
|
|
1543
|
+
/* @__PURE__ */ y(oe, { config: t.config })
|
|
1541
1544
|
]
|
|
1542
1545
|
}, n);
|
|
1543
1546
|
})
|
|
@@ -1545,7 +1548,7 @@ var ut = l(function() {
|
|
|
1545
1548
|
}, t))
|
|
1546
1549
|
]
|
|
1547
1550
|
}),
|
|
1548
|
-
/* @__PURE__ */
|
|
1551
|
+
/* @__PURE__ */ b("div", {
|
|
1549
1552
|
style: {
|
|
1550
1553
|
display: "flex",
|
|
1551
1554
|
justifyContent: "flex-end",
|
|
@@ -1555,33 +1558,33 @@ var ut = l(function() {
|
|
|
1555
1558
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1556
1559
|
},
|
|
1557
1560
|
children: [
|
|
1558
|
-
/* @__PURE__ */
|
|
1561
|
+
/* @__PURE__ */ y("button", {
|
|
1559
1562
|
type: "button",
|
|
1560
|
-
onClick: () =>
|
|
1563
|
+
onClick: () => R(null),
|
|
1561
1564
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1562
|
-
style:
|
|
1565
|
+
style: w,
|
|
1563
1566
|
children: "Close"
|
|
1564
1567
|
}),
|
|
1565
|
-
|
|
1568
|
+
L.status === "COMPLETED" && !L.dashboardId && L.undoRevision != null && /* @__PURE__ */ y("button", {
|
|
1566
1569
|
type: "button",
|
|
1567
|
-
disabled: X ||
|
|
1568
|
-
onClick: () => void
|
|
1570
|
+
disabled: X || I.has(L.id),
|
|
1571
|
+
onClick: () => void nn(L),
|
|
1569
1572
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1570
|
-
style:
|
|
1573
|
+
style: w,
|
|
1571
1574
|
children: X ? l("bigconsole.insights.actions.undoing", "Undoing…") : l("bigconsole.insights.actions.undo", "Undo last change")
|
|
1572
1575
|
}),
|
|
1573
|
-
|
|
1576
|
+
L.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
|
|
1574
1577
|
type: "button",
|
|
1575
1578
|
disabled: X,
|
|
1576
1579
|
onClick: () => {
|
|
1577
|
-
let e =
|
|
1578
|
-
|
|
1580
|
+
let e = L;
|
|
1581
|
+
R(null), V(e), U("");
|
|
1579
1582
|
},
|
|
1580
1583
|
title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1581
1584
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1582
|
-
style:
|
|
1585
|
+
style: w,
|
|
1583
1586
|
children: [
|
|
1584
|
-
/* @__PURE__ */
|
|
1587
|
+
/* @__PURE__ */ y(Ee, {
|
|
1585
1588
|
size: 14,
|
|
1586
1589
|
"aria-hidden": "true"
|
|
1587
1590
|
}),
|
|
@@ -1589,15 +1592,15 @@ var ut = l(function() {
|
|
|
1589
1592
|
l("bigconsole.insights.actions.refine", "Refine")
|
|
1590
1593
|
]
|
|
1591
1594
|
}),
|
|
1592
|
-
|
|
1595
|
+
L.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
|
|
1593
1596
|
type: "button",
|
|
1594
1597
|
disabled: X,
|
|
1595
|
-
onClick: () =>
|
|
1598
|
+
onClick: () => Qt(L),
|
|
1596
1599
|
title: l("bigconsole.insights.actions.checkDraftTitle", "Check the draft against the Console Definition contract"),
|
|
1597
1600
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1598
|
-
style:
|
|
1601
|
+
style: w,
|
|
1599
1602
|
children: [
|
|
1600
|
-
/* @__PURE__ */
|
|
1603
|
+
/* @__PURE__ */ y(we, {
|
|
1601
1604
|
size: 14,
|
|
1602
1605
|
"aria-hidden": "true"
|
|
1603
1606
|
}),
|
|
@@ -1605,21 +1608,21 @@ var ut = l(function() {
|
|
|
1605
1608
|
l("bigconsole.insights.actions.checkDraft", "Check draft")
|
|
1606
1609
|
]
|
|
1607
1610
|
}),
|
|
1608
|
-
|
|
1611
|
+
L.status === "COMPLETED" && $ && /* @__PURE__ */ b("button", {
|
|
1609
1612
|
type: "button",
|
|
1610
1613
|
disabled: X,
|
|
1611
1614
|
onClick: () => {
|
|
1612
|
-
let e =
|
|
1613
|
-
|
|
1615
|
+
let e = L;
|
|
1616
|
+
R(null), Tt(e), Dt({
|
|
1614
1617
|
text: "",
|
|
1615
1618
|
busy: !1
|
|
1616
1619
|
});
|
|
1617
1620
|
},
|
|
1618
1621
|
title: l("bigconsole.insights.actions.chatTitle", "Edit the draft by conversation"),
|
|
1619
1622
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1620
|
-
style:
|
|
1623
|
+
style: w,
|
|
1621
1624
|
children: [
|
|
1622
|
-
/* @__PURE__ */
|
|
1625
|
+
/* @__PURE__ */ y(Se, {
|
|
1623
1626
|
size: 14,
|
|
1624
1627
|
"aria-hidden": "true"
|
|
1625
1628
|
}),
|
|
@@ -1627,31 +1630,31 @@ var ut = l(function() {
|
|
|
1627
1630
|
l("bigconsole.insights.actions.chat", "Chat to edit")
|
|
1628
1631
|
]
|
|
1629
1632
|
}),
|
|
1630
|
-
|
|
1633
|
+
L.status === "COMPLETED" && a(L).kind === "hold" && /* @__PURE__ */ y("span", {
|
|
1631
1634
|
role: "status",
|
|
1632
1635
|
children: l("bigconsole.insights.error.reviewUnavailable", "Reload the proposal before creating its dashboard.")
|
|
1633
1636
|
}),
|
|
1634
|
-
|
|
1637
|
+
L.dashboardId && /* @__PURE__ */ y("button", {
|
|
1635
1638
|
type: "button",
|
|
1636
1639
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1637
|
-
style:
|
|
1638
|
-
onClick: () => f(`/dashboards/${
|
|
1640
|
+
style: w,
|
|
1641
|
+
onClick: () => f(`/dashboards/${L.dashboardId}`),
|
|
1639
1642
|
children: l("bigconsole.insights.actions.viewDashboard", "View dashboard")
|
|
1640
1643
|
}),
|
|
1641
|
-
|
|
1644
|
+
L.status === "COMPLETED" && !L.dashboardId && /* @__PURE__ */ b("button", {
|
|
1642
1645
|
type: "button",
|
|
1643
|
-
disabled: X || a(
|
|
1644
|
-
title: a(
|
|
1646
|
+
disabled: X || a(L).kind !== "create",
|
|
1647
|
+
title: a(L).kind === "hold" ? "Reload the proposal before creating its dashboard." : void 0,
|
|
1645
1648
|
onClick: () => {
|
|
1646
|
-
let e =
|
|
1647
|
-
|
|
1649
|
+
let e = L;
|
|
1650
|
+
R(null), Kt(e);
|
|
1648
1651
|
},
|
|
1649
1652
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1650
|
-
style:
|
|
1653
|
+
style: T,
|
|
1651
1654
|
children: [
|
|
1652
1655
|
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1653
1656
|
" ",
|
|
1654
|
-
/* @__PURE__ */
|
|
1657
|
+
/* @__PURE__ */ y(_e, {
|
|
1655
1658
|
size: 14,
|
|
1656
1659
|
"aria-hidden": "true"
|
|
1657
1660
|
})
|
|
@@ -1662,7 +1665,7 @@ var ut = l(function() {
|
|
|
1662
1665
|
]
|
|
1663
1666
|
})
|
|
1664
1667
|
}),
|
|
1665
|
-
B && /* @__PURE__ */
|
|
1668
|
+
B && /* @__PURE__ */ y("div", {
|
|
1666
1669
|
role: "dialog",
|
|
1667
1670
|
"aria-modal": "true",
|
|
1668
1671
|
"aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
|
|
@@ -1677,7 +1680,7 @@ var ut = l(function() {
|
|
|
1677
1680
|
justifyContent: "center",
|
|
1678
1681
|
padding: "var(--space-pagePadding)"
|
|
1679
1682
|
},
|
|
1680
|
-
children: /* @__PURE__ */
|
|
1683
|
+
children: /* @__PURE__ */ b("div", {
|
|
1681
1684
|
onClick: (e) => e.stopPropagation(),
|
|
1682
1685
|
style: {
|
|
1683
1686
|
display: "flex",
|
|
@@ -1691,19 +1694,19 @@ var ut = l(function() {
|
|
|
1691
1694
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1692
1695
|
},
|
|
1693
1696
|
children: [
|
|
1694
|
-
/* @__PURE__ */
|
|
1697
|
+
/* @__PURE__ */ b("div", {
|
|
1695
1698
|
style: {
|
|
1696
1699
|
padding: "var(--space-cardPadding)",
|
|
1697
1700
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1698
1701
|
},
|
|
1699
|
-
children: [/* @__PURE__ */
|
|
1702
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
1700
1703
|
style: {
|
|
1701
1704
|
fontSize: "var(--font-size-heading-h4)",
|
|
1702
1705
|
fontWeight: "var(--font-weight-semibold)",
|
|
1703
1706
|
color: "var(--color-text-primary)"
|
|
1704
1707
|
},
|
|
1705
1708
|
children: l("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1706
|
-
}), /* @__PURE__ */
|
|
1709
|
+
}), /* @__PURE__ */ y("p", {
|
|
1707
1710
|
style: {
|
|
1708
1711
|
fontSize: "var(--font-size-body-sm)",
|
|
1709
1712
|
color: "var(--color-text-secondary)",
|
|
@@ -1712,7 +1715,7 @@ var ut = l(function() {
|
|
|
1712
1715
|
children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1713
1716
|
})]
|
|
1714
1717
|
}),
|
|
1715
|
-
/* @__PURE__ */
|
|
1718
|
+
/* @__PURE__ */ b("div", {
|
|
1716
1719
|
style: {
|
|
1717
1720
|
flex: "1 1 auto",
|
|
1718
1721
|
minHeight: 0,
|
|
@@ -1722,20 +1725,20 @@ var ut = l(function() {
|
|
|
1722
1725
|
flexDirection: "column",
|
|
1723
1726
|
gap: "var(--space-controlGap)"
|
|
1724
1727
|
},
|
|
1725
|
-
children: [/* @__PURE__ */
|
|
1728
|
+
children: [/* @__PURE__ */ y(r, {
|
|
1726
1729
|
emphasis: "muted",
|
|
1727
1730
|
padding: "compact",
|
|
1728
1731
|
headingLevel: 3,
|
|
1729
1732
|
title: B.generatedSpec?.name || "Current proposal",
|
|
1730
1733
|
description: B.prompt.length > 240 ? `${B.prompt.slice(0, 240)}…` : B.prompt,
|
|
1731
|
-
icon: /* @__PURE__ */
|
|
1732
|
-
}), /* @__PURE__ */
|
|
1734
|
+
icon: /* @__PURE__ */ y(h, { className: "h-icon-sm w-icon-sm" })
|
|
1735
|
+
}), /* @__PURE__ */ b("div", {
|
|
1733
1736
|
style: {
|
|
1734
1737
|
display: "flex",
|
|
1735
1738
|
flexDirection: "column",
|
|
1736
1739
|
gap: "var(--space-controlGap)"
|
|
1737
1740
|
},
|
|
1738
|
-
children: [/* @__PURE__ */
|
|
1741
|
+
children: [/* @__PURE__ */ y("label", {
|
|
1739
1742
|
htmlFor: "refine-input",
|
|
1740
1743
|
style: {
|
|
1741
1744
|
display: "block",
|
|
@@ -1744,7 +1747,7 @@ var ut = l(function() {
|
|
|
1744
1747
|
color: "var(--color-text-primary)"
|
|
1745
1748
|
},
|
|
1746
1749
|
children: "What should change?"
|
|
1747
|
-
}), /* @__PURE__ */
|
|
1750
|
+
}), /* @__PURE__ */ y("textarea", {
|
|
1748
1751
|
id: "refine-input",
|
|
1749
1752
|
value: H,
|
|
1750
1753
|
onChange: (e) => U(e.target.value),
|
|
@@ -1766,7 +1769,7 @@ var ut = l(function() {
|
|
|
1766
1769
|
})]
|
|
1767
1770
|
})]
|
|
1768
1771
|
}),
|
|
1769
|
-
/* @__PURE__ */
|
|
1772
|
+
/* @__PURE__ */ b("div", {
|
|
1770
1773
|
style: {
|
|
1771
1774
|
display: "flex",
|
|
1772
1775
|
justifyContent: "flex-end",
|
|
@@ -1775,27 +1778,27 @@ var ut = l(function() {
|
|
|
1775
1778
|
padding: "var(--space-cardPadding)",
|
|
1776
1779
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1777
1780
|
},
|
|
1778
|
-
children: [/* @__PURE__ */
|
|
1781
|
+
children: [/* @__PURE__ */ y("button", {
|
|
1779
1782
|
type: "button",
|
|
1780
1783
|
onClick: () => V(null),
|
|
1781
1784
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1782
|
-
style:
|
|
1785
|
+
style: w,
|
|
1783
1786
|
children: l("bigconsole.insights.actions.cancel", "Cancel")
|
|
1784
|
-
}), /* @__PURE__ */
|
|
1787
|
+
}), /* @__PURE__ */ b("button", {
|
|
1785
1788
|
type: "button",
|
|
1786
|
-
onClick: () => void
|
|
1787
|
-
disabled: !H.trim() ||
|
|
1789
|
+
onClick: () => void Xt(),
|
|
1790
|
+
disabled: !H.trim() || I.has(B.id),
|
|
1788
1791
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1789
1792
|
style: {
|
|
1790
|
-
...
|
|
1791
|
-
cursor: !H.trim() ||
|
|
1793
|
+
...T,
|
|
1794
|
+
cursor: !H.trim() || I.has(B.id) ? "not-allowed" : "pointer",
|
|
1792
1795
|
opacity: H.trim() ? 1 : .6
|
|
1793
1796
|
},
|
|
1794
|
-
children: [
|
|
1797
|
+
children: [I.has(B.id) ? /* @__PURE__ */ y(m, {
|
|
1795
1798
|
size: 14,
|
|
1796
1799
|
className: "animate-spin",
|
|
1797
1800
|
"aria-hidden": "true"
|
|
1798
|
-
}) : /* @__PURE__ */
|
|
1801
|
+
}) : /* @__PURE__ */ y(Ee, {
|
|
1799
1802
|
size: 14,
|
|
1800
1803
|
"aria-hidden": "true"
|
|
1801
1804
|
}), l("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
@@ -1804,33 +1807,33 @@ var ut = l(function() {
|
|
|
1804
1807
|
]
|
|
1805
1808
|
})
|
|
1806
1809
|
}),
|
|
1807
|
-
W && W.generatedSpec && /* @__PURE__ */
|
|
1810
|
+
W && W.generatedSpec && /* @__PURE__ */ y(de, {
|
|
1808
1811
|
generation: {
|
|
1809
1812
|
...W,
|
|
1810
1813
|
generatedSpec: W.generatedSpec
|
|
1811
1814
|
},
|
|
1812
|
-
message:
|
|
1813
|
-
onMessageChange: (e) =>
|
|
1815
|
+
message: Et.text,
|
|
1816
|
+
onMessageChange: (e) => Dt((t) => ({
|
|
1814
1817
|
...t,
|
|
1815
1818
|
text: e
|
|
1816
1819
|
})),
|
|
1817
|
-
onBusyChange: (e) =>
|
|
1820
|
+
onBusyChange: (e) => Dt((t) => ({
|
|
1818
1821
|
...t,
|
|
1819
1822
|
busy: e
|
|
1820
1823
|
})),
|
|
1821
|
-
onClose: () =>
|
|
1824
|
+
onClose: () => Tt(null)
|
|
1822
1825
|
}),
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
open:
|
|
1826
|
+
/* @__PURE__ */ y(ue, {
|
|
1827
|
+
open: _t !== null,
|
|
1825
1828
|
onClose: () => {
|
|
1826
|
-
|
|
1829
|
+
vt(null), yt(null);
|
|
1827
1830
|
},
|
|
1828
|
-
spec:
|
|
1829
|
-
onApplyFix: (e) => z ?
|
|
1830
|
-
onUndoFix:
|
|
1831
|
-
appliedFix: z ?
|
|
1831
|
+
spec: _t,
|
|
1832
|
+
onApplyFix: (e) => z ? en(z, e) : Promise.resolve(null),
|
|
1833
|
+
onUndoFix: tn,
|
|
1834
|
+
appliedFix: z ? bt[z] ?? null : null,
|
|
1832
1835
|
onAppliedFixChange: (e) => {
|
|
1833
|
-
z &&
|
|
1836
|
+
z && St(z, e);
|
|
1834
1837
|
}
|
|
1835
1838
|
})
|
|
1836
1839
|
]
|