@burdenoff/microfe-bigconsole 2026.924.1 → 2026.924.3
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/BigConsoleRoutes.js +137 -138
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/assistant/previewController.js +10 -10
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js +25 -0
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js.map +1 -0
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +17 -17
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +32 -32
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +52 -52
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +7 -7
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +53 -0
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js.map +1 -0
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +60 -60
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +21 -21
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +36 -36
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +38 -38
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +121 -121
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +22 -22
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +53 -53
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +47 -47
- package/dist/bigconsole/components/dashboard/index.js +1 -0
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -29
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +48 -48
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +103 -103
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/overview/DashboardGuide.js +214 -0
- package/dist/bigconsole/components/overview/DashboardGuide.js.map +1 -0
- package/dist/bigconsole/components/overview/DataHealthCard.js +97 -0
- package/dist/bigconsole/components/overview/DataHealthCard.js.map +1 -0
- package/dist/bigconsole/components/overview/OverviewQuickActions.js +32 -0
- package/dist/bigconsole/components/overview/OverviewQuickActions.js.map +1 -0
- package/dist/bigconsole/components/overview/OverviewStatCard.js +57 -0
- package/dist/bigconsole/components/overview/OverviewStatCard.js.map +1 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +107 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js.map +1 -0
- package/dist/bigconsole/components/overview/dashboardGuideSteps.js +119 -0
- package/dist/bigconsole/components/overview/dashboardGuideSteps.js.map +1 -0
- package/dist/bigconsole/components/overview/index.js +8 -0
- package/dist/bigconsole/components/overview/overviewModel.js +119 -0
- package/dist/bigconsole/components/overview/overviewModel.js.map +1 -0
- package/dist/bigconsole/components/overview/useOverviewData.js +48 -0
- package/dist/bigconsole/components/overview/useOverviewData.js.map +1 -0
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +127 -127
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/preview/AiPreviewContent.js +5 -5
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +62 -61
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +82 -81
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +13 -13
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +70 -70
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +28 -28
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +25 -25
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +21 -21
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +68 -68
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/pages/AdminPage.js +136 -136
- package/dist/bigconsole/pages/DashboardBuilderPage.js +10 -10
- package/dist/bigconsole/pages/DashboardViewPage.js +61 -61
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +327 -348
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +5 -5
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +10 -10
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +83 -83
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +11 -11
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +315 -315
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/OverviewPage.js +244 -0
- package/dist/bigconsole/pages/OverviewPage.js.map +1 -0
- package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
- package/dist/bigconsole/pages/ParserViewPage.js +98 -98
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +8 -8
- package/dist/bigconsole/pages/PipelineViewPage.js +46 -46
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +80 -80
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +70 -70
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +200 -200
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +78 -78
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +79 -79
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/utils/createDialogParam.js +14 -0
- package/dist/bigconsole/utils/createDialogParam.js.map +1 -0
- package/dist/generated/global-operations.js +1 -1
- package/dist/generated/wspace-operations.js +285 -222
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/shared/hooks/useTr.js +10 -7
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/package.json +1 -1
- package/dist/bigconsole/pages/HomePage.js +0 -318
- package/dist/bigconsole/pages/HomePage.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
2
2
|
import "../contexts/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { reportBigConsoleQuotaError as t } from "../utils/quota.js";
|
|
4
|
+
import { SECTION_FOCUS_RING as n } from "../components/common/sectionStyles.js";
|
|
5
|
+
import { Section as r, SectionStack as i } from "../components/common/Section.js";
|
|
5
6
|
import "../components/common/index.js";
|
|
6
|
-
import { reportBigConsoleQuotaError as i } from "../utils/quota.js";
|
|
7
7
|
import a from "../hooks/useBigConsoleAnalytics.js";
|
|
8
8
|
import { isNative as ee, nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
9
|
-
import { memo as c, useCallback as l, useEffect as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import {
|
|
12
|
-
import { useMutation as b, useQuery as
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
9
|
+
import { memo as c, useCallback as l, useEffect as u, useState as d } from "react";
|
|
10
|
+
import { AlertCircle as f, ArrowRight as p, Ban as te, CheckCircle as m, Clock as h, Eye as ne, History as re, Lightbulb as ie, Loader2 as g, RefreshCw as ae, Sparkles as _, Trash2 as oe, Wand2 as v, X as se, XCircle as y } from "lucide-react";
|
|
11
|
+
import { AuroraBackground as ce, GlassCard as le, GradientText as ue, IllustratedEmptyState as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { useMutation as b, useQuery as pe } from "@apollo/client/react";
|
|
13
|
+
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
14
|
+
import { gql as C } from "@apollo/client";
|
|
15
|
+
import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
16
16
|
//#region src/bigconsole/pages/InsightsPage.tsx
|
|
17
|
-
var me =
|
|
17
|
+
var me = C`
|
|
18
18
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
19
19
|
listPromptGenerations(status: $status, first: $first) {
|
|
20
20
|
edges {
|
|
@@ -46,7 +46,7 @@ var me = y`
|
|
|
46
46
|
totalCount
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
`, he =
|
|
49
|
+
`, he = C`
|
|
50
50
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
51
51
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
52
52
|
id
|
|
@@ -57,7 +57,7 @@ var me = y`
|
|
|
57
57
|
tags
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
-
`, ge =
|
|
60
|
+
`, ge = C`
|
|
61
61
|
mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
|
|
62
62
|
generateDashboardFromPrompt(input: $input) {
|
|
63
63
|
id
|
|
@@ -65,24 +65,24 @@ var me = y`
|
|
|
65
65
|
prompt
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
`, _e =
|
|
68
|
+
`, _e = C`
|
|
69
69
|
mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
|
|
70
70
|
createDashboardFromGeneration(input: $input) {
|
|
71
71
|
id
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
`, ve =
|
|
74
|
+
`, ve = C`
|
|
75
75
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
76
76
|
deletePromptGeneration(generationId: $generationId)
|
|
77
77
|
}
|
|
78
|
-
`, ye =
|
|
78
|
+
`, ye = C`
|
|
79
79
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
80
80
|
cancelPromptGeneration(generationId: $generationId) {
|
|
81
81
|
id
|
|
82
82
|
status
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
`, be =
|
|
85
|
+
`, be = C`
|
|
86
86
|
mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
|
|
87
87
|
regenerateDashboard(input: $input) {
|
|
88
88
|
id
|
|
@@ -90,7 +90,7 @@ var me = y`
|
|
|
90
90
|
prompt
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
`, xe =
|
|
93
|
+
`, xe = C`
|
|
94
94
|
mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
|
|
95
95
|
refineGeneratedDashboard(input: $input) {
|
|
96
96
|
id
|
|
@@ -254,36 +254,36 @@ var N = {
|
|
|
254
254
|
border: "var(--color-border-subtle)"
|
|
255
255
|
}
|
|
256
256
|
};
|
|
257
|
-
function
|
|
257
|
+
function Ae(e) {
|
|
258
258
|
let t = N[M(e)].text;
|
|
259
259
|
switch (e) {
|
|
260
|
-
case "COMPLETED": return /* @__PURE__ */
|
|
260
|
+
case "COMPLETED": return /* @__PURE__ */ x(m, {
|
|
261
261
|
size: 14,
|
|
262
262
|
style: { color: t },
|
|
263
263
|
"aria-hidden": "true"
|
|
264
264
|
});
|
|
265
265
|
case "FAILED":
|
|
266
|
-
case "CANCELLED": return /* @__PURE__ */
|
|
266
|
+
case "CANCELLED": return /* @__PURE__ */ x(y, {
|
|
267
267
|
size: 14,
|
|
268
268
|
style: { color: t },
|
|
269
269
|
"aria-hidden": "true"
|
|
270
270
|
});
|
|
271
271
|
case "PENDING":
|
|
272
272
|
case "PROCESSING":
|
|
273
|
-
case "GENERATING": return /* @__PURE__ */
|
|
273
|
+
case "GENERATING": return /* @__PURE__ */ x(g, {
|
|
274
274
|
size: 14,
|
|
275
275
|
className: "animate-spin",
|
|
276
276
|
style: { color: t },
|
|
277
277
|
"aria-hidden": "true"
|
|
278
278
|
});
|
|
279
|
-
default: return /* @__PURE__ */
|
|
279
|
+
default: return /* @__PURE__ */ x(h, {
|
|
280
280
|
size: 14,
|
|
281
281
|
style: { color: t },
|
|
282
282
|
"aria-hidden": "true"
|
|
283
283
|
});
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
function
|
|
286
|
+
function P(e, t) {
|
|
287
287
|
switch (e) {
|
|
288
288
|
case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
|
|
289
289
|
case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
|
|
@@ -294,9 +294,9 @@ function F(e, t) {
|
|
|
294
294
|
default: return e;
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
var
|
|
298
|
-
let { t } =
|
|
299
|
-
return /* @__PURE__ */
|
|
297
|
+
var je = ({ status: e }) => {
|
|
298
|
+
let { t } = w(), n = N[M(e)];
|
|
299
|
+
return /* @__PURE__ */ S("span", {
|
|
300
300
|
"data-status": e,
|
|
301
301
|
style: {
|
|
302
302
|
...j,
|
|
@@ -304,10 +304,10 @@ var Ae = ({ status: e }) => {
|
|
|
304
304
|
backgroundColor: n.bg,
|
|
305
305
|
color: n.text
|
|
306
306
|
},
|
|
307
|
-
children: [
|
|
307
|
+
children: [Ae(e), P(e, t)]
|
|
308
308
|
});
|
|
309
309
|
};
|
|
310
|
-
function
|
|
310
|
+
function Me(e) {
|
|
311
311
|
let t = N[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
|
|
312
312
|
return {
|
|
313
313
|
...j,
|
|
@@ -316,20 +316,20 @@ function je(e) {
|
|
|
316
316
|
color: t.text
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
|
-
function
|
|
319
|
+
function F(e) {
|
|
320
320
|
return e.pages.reduce((e, t) => e + t.widgets.length, 0);
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Ne(e) {
|
|
323
323
|
let t = e?.toUpperCase();
|
|
324
324
|
return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
|
|
325
325
|
}
|
|
326
|
-
var
|
|
326
|
+
var Pe = {
|
|
327
327
|
HIGH: "success",
|
|
328
328
|
MEDIUM: "neutral",
|
|
329
329
|
LOW: "danger"
|
|
330
330
|
};
|
|
331
|
-
function
|
|
332
|
-
let t = N[
|
|
331
|
+
function Fe(e) {
|
|
332
|
+
let t = N[Pe[e]];
|
|
333
333
|
return {
|
|
334
334
|
...j,
|
|
335
335
|
padding: "0 var(--space-controlGap)",
|
|
@@ -341,170 +341,170 @@ function Pe(e) {
|
|
|
341
341
|
color: t.text
|
|
342
342
|
};
|
|
343
343
|
}
|
|
344
|
-
var
|
|
345
|
-
let { t: c } =
|
|
346
|
-
|
|
347
|
-
}, []),
|
|
348
|
-
|
|
344
|
+
var I = c(function() {
|
|
345
|
+
let { t: c } = w(), m = e(), h = a(), [y, C] = d(""), [T, M] = d("MODERN"), [N, Ae] = d("GRID"), [P, Pe] = d(Ce), [I, Ie] = d(we), [L, Le] = d(!1), [Re, R] = d(null), [z, ze] = d(() => /* @__PURE__ */ new Set()), [B, V] = d(null), [H, U] = d(null), [W, G] = d(""), K = l((e) => {
|
|
346
|
+
ze((t) => new Set(t).add(e));
|
|
347
|
+
}, []), q = l((e) => {
|
|
348
|
+
ze((t) => {
|
|
349
349
|
let n = new Set(t);
|
|
350
350
|
return n.delete(e), n;
|
|
351
351
|
});
|
|
352
|
-
}, []), { data:
|
|
352
|
+
}, []), { data: Be, loading: Ve, refetch: J, startPolling: He, stopPolling: Y } = pe(me, {
|
|
353
353
|
variables: { first: 20 },
|
|
354
354
|
fetchPolicy: "cache-and-network"
|
|
355
|
-
}),
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
]),
|
|
362
|
-
if (!
|
|
355
|
+
}), X = Be?.listPromptGenerations?.edges?.some((e) => Se.includes(e.node.status)) ?? !1, { data: Ue } = pe(he, { variables: { limit: 6 } }), [We] = b(ge), [Ge] = b(_e), [Ke] = b(ve), [qe] = b(ye), [Je] = b(be), [Ye] = b(xe), Z = Be?.listPromptGenerations?.edges?.map((e) => e.node) || [], Xe = Ue?.getPromptSuggestions || [];
|
|
356
|
+
u(() => (X || L ? He(2e3) : Y(), () => Y()), [
|
|
357
|
+
X,
|
|
358
|
+
L,
|
|
359
|
+
He,
|
|
360
|
+
Y
|
|
361
|
+
]), u(() => {
|
|
362
|
+
if (!B && !H) return;
|
|
363
363
|
let e = (e) => {
|
|
364
|
-
e.key === "Escape" && (
|
|
364
|
+
e.key === "Escape" && (V(null), U(null));
|
|
365
365
|
};
|
|
366
366
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
367
|
-
}, [
|
|
368
|
-
let
|
|
369
|
-
if (!(!
|
|
370
|
-
if (
|
|
371
|
-
|
|
367
|
+
}, [B, H]);
|
|
368
|
+
let Ze = l(async () => {
|
|
369
|
+
if (!(!y.trim() || L)) {
|
|
370
|
+
if (y.length > 2e3) {
|
|
371
|
+
R(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
|
|
374
|
+
R(null), Le(!0);
|
|
375
375
|
try {
|
|
376
|
-
|
|
377
|
-
let e = await
|
|
378
|
-
prompt:
|
|
376
|
+
h("bigconsole.ai.generate_clicked", { maxWidgets: I });
|
|
377
|
+
let e = await We({ variables: { input: {
|
|
378
|
+
prompt: y.trim(),
|
|
379
379
|
styleType: T,
|
|
380
380
|
layoutType: N,
|
|
381
|
-
gridColumns:
|
|
382
|
-
maxWidgets:
|
|
381
|
+
gridColumns: P,
|
|
382
|
+
maxWidgets: I
|
|
383
383
|
} } });
|
|
384
|
-
if (
|
|
385
|
-
let
|
|
386
|
-
|
|
387
|
-
generationId:
|
|
388
|
-
maxWidgets:
|
|
389
|
-
}),
|
|
384
|
+
if (t(e, "command")) return;
|
|
385
|
+
let n = e.data?.generateDashboardFromPrompt?.id;
|
|
386
|
+
n && h("bigconsole.ai.dashboard_generated", {
|
|
387
|
+
generationId: n,
|
|
388
|
+
maxWidgets: I
|
|
389
|
+
}), C(""), J();
|
|
390
390
|
} catch (e) {
|
|
391
|
-
if (
|
|
392
|
-
|
|
391
|
+
if (t(e, "command")) return;
|
|
392
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
|
|
393
393
|
} finally {
|
|
394
|
-
|
|
394
|
+
Le(!1);
|
|
395
395
|
}
|
|
396
396
|
}
|
|
397
397
|
}, [
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
398
|
+
h,
|
|
399
|
+
y,
|
|
400
|
+
L,
|
|
401
|
+
We,
|
|
402
|
+
J,
|
|
403
403
|
T,
|
|
404
404
|
N,
|
|
405
|
-
|
|
406
|
-
|
|
405
|
+
P,
|
|
406
|
+
I,
|
|
407
407
|
c
|
|
408
|
-
]),
|
|
409
|
-
|
|
408
|
+
]), Q = l(async (e) => {
|
|
409
|
+
R(null);
|
|
410
410
|
try {
|
|
411
|
-
|
|
412
|
-
let
|
|
413
|
-
if (
|
|
414
|
-
let
|
|
415
|
-
|
|
411
|
+
h("bigconsole.ai.create_dashboard_clicked", { generationId: e });
|
|
412
|
+
let n = await Ge({ variables: { input: { generationId: e } } });
|
|
413
|
+
if (t(n, "project")) return;
|
|
414
|
+
let r = n.data?.createDashboardFromGeneration?.id;
|
|
415
|
+
r && (h("bigconsole.ai.dashboard_created", {
|
|
416
416
|
generationId: e,
|
|
417
|
-
dashboardId:
|
|
418
|
-
}),
|
|
417
|
+
dashboardId: r
|
|
418
|
+
}), m(`/dashboards/${r}`));
|
|
419
419
|
} catch (e) {
|
|
420
|
-
if (
|
|
421
|
-
|
|
420
|
+
if (t(e, "project")) return;
|
|
421
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
|
|
422
422
|
}
|
|
423
423
|
}, [
|
|
424
|
-
|
|
424
|
+
Ge,
|
|
425
|
+
h,
|
|
425
426
|
m,
|
|
426
|
-
p,
|
|
427
427
|
c
|
|
428
428
|
]), Qe = l(async (e) => {
|
|
429
|
-
|
|
429
|
+
R(null);
|
|
430
430
|
try {
|
|
431
|
-
await
|
|
431
|
+
await Ke({ variables: { generationId: e } }), ee() && s("success"), J();
|
|
432
432
|
} catch (e) {
|
|
433
|
-
|
|
433
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && s("error");
|
|
434
434
|
}
|
|
435
435
|
}, [
|
|
436
|
-
|
|
437
|
-
|
|
436
|
+
Ke,
|
|
437
|
+
J,
|
|
438
438
|
c
|
|
439
439
|
]), $e = l(async (e) => {
|
|
440
|
-
|
|
440
|
+
R(null), K(e);
|
|
441
441
|
try {
|
|
442
|
-
await
|
|
442
|
+
await qe({ variables: { generationId: e } }), J();
|
|
443
443
|
} catch (e) {
|
|
444
|
-
|
|
444
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
|
|
445
445
|
} finally {
|
|
446
|
-
|
|
446
|
+
q(e);
|
|
447
447
|
}
|
|
448
448
|
}, [
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
qe,
|
|
450
|
+
J,
|
|
451
451
|
c
|
|
452
452
|
]), et = l(async (e) => {
|
|
453
|
-
|
|
453
|
+
R(null), K(e);
|
|
454
454
|
try {
|
|
455
|
-
if (
|
|
456
|
-
|
|
455
|
+
if (t(await Je({ variables: { input: { generationId: e } } }), "command")) return;
|
|
456
|
+
J();
|
|
457
457
|
} catch (e) {
|
|
458
|
-
if (
|
|
459
|
-
|
|
458
|
+
if (t(e, "command")) return;
|
|
459
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
|
|
460
460
|
} finally {
|
|
461
|
-
|
|
461
|
+
q(e);
|
|
462
462
|
}
|
|
463
463
|
}, [
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
Je,
|
|
465
|
+
J,
|
|
466
466
|
c
|
|
467
467
|
]), tt = l(async () => {
|
|
468
|
-
if (!
|
|
469
|
-
let e =
|
|
470
|
-
|
|
471
|
-
let
|
|
468
|
+
if (!H || !W.trim()) return;
|
|
469
|
+
let e = H.id;
|
|
470
|
+
R(null), K(e);
|
|
471
|
+
let n = !1;
|
|
472
472
|
try {
|
|
473
|
-
if (
|
|
473
|
+
if (t(await Ye({ variables: { input: {
|
|
474
474
|
generationId: e,
|
|
475
|
-
refinementPrompt:
|
|
475
|
+
refinementPrompt: W.trim()
|
|
476
476
|
} } }), "command")) {
|
|
477
|
-
|
|
477
|
+
n = !0;
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
n = !0, J();
|
|
481
481
|
} catch (e) {
|
|
482
|
-
if (
|
|
483
|
-
|
|
482
|
+
if (t(e, "command")) {
|
|
483
|
+
n = !0;
|
|
484
484
|
return;
|
|
485
485
|
}
|
|
486
|
-
|
|
486
|
+
R(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
|
|
487
487
|
} finally {
|
|
488
|
-
|
|
488
|
+
n && (U(null), G("")), q(e);
|
|
489
489
|
}
|
|
490
490
|
}, [
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
491
|
+
H,
|
|
492
|
+
W,
|
|
493
|
+
Ye,
|
|
494
|
+
J,
|
|
495
495
|
c
|
|
496
496
|
]), nt = l((e) => {
|
|
497
|
-
|
|
498
|
-
}, []), $ =
|
|
499
|
-
return /* @__PURE__ */
|
|
497
|
+
C(e);
|
|
498
|
+
}, []), $ = B?.generatedSpec;
|
|
499
|
+
return /* @__PURE__ */ S("div", {
|
|
500
500
|
className: "min-w-0",
|
|
501
501
|
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
502
502
|
children: [
|
|
503
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ S("header", {
|
|
504
504
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
505
|
-
children: [/* @__PURE__ */
|
|
505
|
+
children: [/* @__PURE__ */ x(ce, { intensity: "subtle" }), /* @__PURE__ */ x("div", {
|
|
506
506
|
style: { padding: "var(--space-pagePadding)" },
|
|
507
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */ S("div", {
|
|
508
508
|
style: {
|
|
509
509
|
display: "flex",
|
|
510
510
|
alignItems: "center",
|
|
@@ -512,7 +512,7 @@ var L = c(function() {
|
|
|
512
512
|
flexWrap: "wrap",
|
|
513
513
|
minWidth: 0
|
|
514
514
|
},
|
|
515
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ x("div", {
|
|
516
516
|
style: {
|
|
517
517
|
display: "flex",
|
|
518
518
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -523,17 +523,17 @@ var L = c(function() {
|
|
|
523
523
|
borderRadius: "var(--radius-card)",
|
|
524
524
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
525
525
|
},
|
|
526
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ x(_, { style: {
|
|
527
527
|
height: "var(--size-icon-lg)",
|
|
528
528
|
width: "var(--size-icon-lg)",
|
|
529
529
|
color: "var(--color-action-primary-text)"
|
|
530
530
|
} })
|
|
531
|
-
}), /* @__PURE__ */
|
|
531
|
+
}), /* @__PURE__ */ S("div", {
|
|
532
532
|
style: { minWidth: 0 },
|
|
533
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ x("h1", {
|
|
534
534
|
className: "m-0 text-2xl font-bold text-text-primary",
|
|
535
|
-
children: /* @__PURE__ */
|
|
536
|
-
}), /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ x(ue, { children: c("bigconsole.insights.header.title", "AI Insights") })
|
|
536
|
+
}), /* @__PURE__ */ x("p", {
|
|
537
537
|
className: "m-0 text-sm text-text-secondary",
|
|
538
538
|
children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
539
539
|
})]
|
|
@@ -541,45 +541,45 @@ var L = c(function() {
|
|
|
541
541
|
})
|
|
542
542
|
})]
|
|
543
543
|
}),
|
|
544
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ S("div", {
|
|
545
545
|
style: { padding: "var(--space-pagePadding)" },
|
|
546
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ x(fe, {
|
|
547
547
|
className: "mb-[var(--space-sectionGap)]",
|
|
548
548
|
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."
|
|
549
|
-
}), /* @__PURE__ */
|
|
550
|
-
|
|
549
|
+
}), /* @__PURE__ */ S(i, { children: [
|
|
550
|
+
Re && /* @__PURE__ */ x(r, {
|
|
551
551
|
headingLevel: 2,
|
|
552
552
|
tone: "danger",
|
|
553
553
|
padding: "compact",
|
|
554
554
|
title: "That request did not go through",
|
|
555
|
-
description:
|
|
556
|
-
icon: /* @__PURE__ */
|
|
555
|
+
description: Re,
|
|
556
|
+
icon: /* @__PURE__ */ x(f, { className: "h-icon-sm w-icon-sm" }),
|
|
557
557
|
"data-testid": "insights-error",
|
|
558
|
-
actions: /* @__PURE__ */
|
|
558
|
+
actions: /* @__PURE__ */ x("button", {
|
|
559
559
|
type: "button",
|
|
560
|
-
onClick: () =>
|
|
560
|
+
onClick: () => R(null),
|
|
561
561
|
"aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
|
|
562
562
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
563
563
|
style: E,
|
|
564
564
|
children: "Dismiss"
|
|
565
565
|
})
|
|
566
566
|
}),
|
|
567
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ x(r, {
|
|
568
568
|
id: "insights-prompt",
|
|
569
569
|
emphasis: "primary",
|
|
570
570
|
headingLevel: 2,
|
|
571
571
|
title: "Describe your dashboard",
|
|
572
572
|
description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
|
|
573
|
-
icon: /* @__PURE__ */
|
|
573
|
+
icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" }),
|
|
574
574
|
"data-testid": "insights-prompt",
|
|
575
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ S("div", {
|
|
576
576
|
style: {
|
|
577
577
|
display: "flex",
|
|
578
578
|
flexDirection: "column",
|
|
579
579
|
gap: "var(--space-controlGap)"
|
|
580
580
|
},
|
|
581
581
|
children: [
|
|
582
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ x("label", {
|
|
583
583
|
htmlFor: "prompt-input",
|
|
584
584
|
style: {
|
|
585
585
|
display: "block",
|
|
@@ -589,14 +589,14 @@ var L = c(function() {
|
|
|
589
589
|
},
|
|
590
590
|
children: c("bigconsole.insights.prompt.label", "Your prompt")
|
|
591
591
|
}),
|
|
592
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ x("textarea", {
|
|
593
593
|
id: "prompt-input",
|
|
594
|
-
value:
|
|
595
|
-
onChange: (e) =>
|
|
594
|
+
value: y,
|
|
595
|
+
onChange: (e) => C(e.target.value),
|
|
596
596
|
placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
597
597
|
rows: 3,
|
|
598
598
|
maxLength: 2e3,
|
|
599
|
-
className:
|
|
599
|
+
className: n,
|
|
600
600
|
style: {
|
|
601
601
|
width: "100%",
|
|
602
602
|
maxWidth: "100%",
|
|
@@ -609,10 +609,10 @@ var L = c(function() {
|
|
|
609
609
|
resize: "vertical"
|
|
610
610
|
},
|
|
611
611
|
onKeyDown: (e) => {
|
|
612
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) &&
|
|
612
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && Ze();
|
|
613
613
|
}
|
|
614
614
|
}),
|
|
615
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ S("div", {
|
|
616
616
|
role: "group",
|
|
617
617
|
"aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
|
|
618
618
|
"data-testid": "insights-generation-options",
|
|
@@ -622,69 +622,69 @@ var L = c(function() {
|
|
|
622
622
|
gap: "var(--space-controlGap)"
|
|
623
623
|
},
|
|
624
624
|
children: [
|
|
625
|
-
/* @__PURE__ */
|
|
625
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
626
626
|
htmlFor: "prompt-style",
|
|
627
627
|
style: k,
|
|
628
628
|
children: c("bigconsole.insights.prompt.style", "Style")
|
|
629
|
-
}), /* @__PURE__ */
|
|
629
|
+
}), /* @__PURE__ */ x("select", {
|
|
630
630
|
id: "prompt-style",
|
|
631
631
|
value: T,
|
|
632
632
|
onChange: (e) => M(e.target.value),
|
|
633
|
-
className:
|
|
633
|
+
className: n,
|
|
634
634
|
style: A,
|
|
635
|
-
children: Te.map((e) => /* @__PURE__ */
|
|
635
|
+
children: Te.map((e) => /* @__PURE__ */ x("option", {
|
|
636
636
|
value: e.value,
|
|
637
637
|
children: e.label
|
|
638
638
|
}, e.value))
|
|
639
639
|
})] }),
|
|
640
|
-
/* @__PURE__ */
|
|
640
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
641
641
|
htmlFor: "prompt-layout",
|
|
642
642
|
style: k,
|
|
643
643
|
children: c("bigconsole.insights.prompt.layout", "Layout")
|
|
644
|
-
}), /* @__PURE__ */
|
|
644
|
+
}), /* @__PURE__ */ x("select", {
|
|
645
645
|
id: "prompt-layout",
|
|
646
646
|
value: N,
|
|
647
|
-
onChange: (e) =>
|
|
648
|
-
className:
|
|
647
|
+
onChange: (e) => Ae(e.target.value),
|
|
648
|
+
className: n,
|
|
649
649
|
style: A,
|
|
650
|
-
children: Ee.map((e) => /* @__PURE__ */
|
|
650
|
+
children: Ee.map((e) => /* @__PURE__ */ x("option", {
|
|
651
651
|
value: e.value,
|
|
652
652
|
children: e.label
|
|
653
653
|
}, e.value))
|
|
654
654
|
})] }),
|
|
655
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
656
656
|
htmlFor: "prompt-columns",
|
|
657
657
|
style: k,
|
|
658
658
|
children: c("bigconsole.insights.prompt.columns", "Columns")
|
|
659
|
-
}), /* @__PURE__ */
|
|
659
|
+
}), /* @__PURE__ */ x("select", {
|
|
660
660
|
id: "prompt-columns",
|
|
661
|
-
value:
|
|
662
|
-
onChange: (e) =>
|
|
663
|
-
className:
|
|
661
|
+
value: P,
|
|
662
|
+
onChange: (e) => Pe(Number(e.target.value)),
|
|
663
|
+
className: n,
|
|
664
664
|
style: A,
|
|
665
|
-
children: De.map((e) => /* @__PURE__ */
|
|
665
|
+
children: De.map((e) => /* @__PURE__ */ x("option", {
|
|
666
666
|
value: e,
|
|
667
667
|
children: e
|
|
668
668
|
}, e))
|
|
669
669
|
})] }),
|
|
670
|
-
/* @__PURE__ */
|
|
670
|
+
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
|
|
671
671
|
htmlFor: "prompt-max-widgets",
|
|
672
672
|
style: k,
|
|
673
673
|
children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
|
|
674
|
-
}), /* @__PURE__ */
|
|
674
|
+
}), /* @__PURE__ */ x("select", {
|
|
675
675
|
id: "prompt-max-widgets",
|
|
676
|
-
value:
|
|
677
|
-
onChange: (e) =>
|
|
678
|
-
className:
|
|
676
|
+
value: I,
|
|
677
|
+
onChange: (e) => Ie(Number(e.target.value)),
|
|
678
|
+
className: n,
|
|
679
679
|
style: A,
|
|
680
|
-
children: Oe.map((e) => /* @__PURE__ */
|
|
680
|
+
children: Oe.map((e) => /* @__PURE__ */ x("option", {
|
|
681
681
|
value: e,
|
|
682
682
|
children: e
|
|
683
683
|
}, e))
|
|
684
684
|
})] })
|
|
685
685
|
]
|
|
686
686
|
}),
|
|
687
|
-
/* @__PURE__ */
|
|
687
|
+
/* @__PURE__ */ S("div", {
|
|
688
688
|
style: {
|
|
689
689
|
display: "flex",
|
|
690
690
|
alignItems: "center",
|
|
@@ -693,7 +693,7 @@ var L = c(function() {
|
|
|
693
693
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
694
694
|
paddingTop: "var(--space-controlGap)"
|
|
695
695
|
},
|
|
696
|
-
children: [/* @__PURE__ */
|
|
696
|
+
children: [/* @__PURE__ */ S("span", {
|
|
697
697
|
style: {
|
|
698
698
|
flex: "1 1 12rem",
|
|
699
699
|
minWidth: 0,
|
|
@@ -703,25 +703,25 @@ var L = c(function() {
|
|
|
703
703
|
children: [
|
|
704
704
|
c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
|
|
705
705
|
" · ",
|
|
706
|
-
|
|
706
|
+
y.length,
|
|
707
707
|
"/2000"
|
|
708
708
|
]
|
|
709
|
-
}), /* @__PURE__ */
|
|
709
|
+
}), /* @__PURE__ */ S("button", {
|
|
710
710
|
type: "button",
|
|
711
|
-
onClick:
|
|
712
|
-
disabled: !
|
|
713
|
-
className:
|
|
711
|
+
onClick: Ze,
|
|
712
|
+
disabled: !y.trim() || L,
|
|
713
|
+
className: n,
|
|
714
714
|
style: {
|
|
715
715
|
...D,
|
|
716
716
|
marginLeft: "auto",
|
|
717
|
-
cursor: !
|
|
718
|
-
opacity: !
|
|
717
|
+
cursor: !y.trim() || L ? "not-allowed" : "pointer",
|
|
718
|
+
opacity: !y.trim() || L ? .5 : 1
|
|
719
719
|
},
|
|
720
|
-
children: [
|
|
720
|
+
children: [L ? /* @__PURE__ */ x(g, {
|
|
721
721
|
size: 16,
|
|
722
722
|
className: "animate-spin",
|
|
723
723
|
"aria-hidden": "true"
|
|
724
|
-
}) : /* @__PURE__ */
|
|
724
|
+
}) : /* @__PURE__ */ x(_, {
|
|
725
725
|
size: 16,
|
|
726
726
|
"aria-hidden": "true"
|
|
727
727
|
}), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
@@ -730,20 +730,20 @@ var L = c(function() {
|
|
|
730
730
|
]
|
|
731
731
|
})
|
|
732
732
|
}),
|
|
733
|
-
|
|
733
|
+
Xe.length > 0 && /* @__PURE__ */ x(r, {
|
|
734
734
|
emphasis: "muted",
|
|
735
735
|
headingLevel: 2,
|
|
736
736
|
title: c("bigconsole.insights.suggestions.heading", "Starting points"),
|
|
737
737
|
description: "Pick one to drop it into the prompt box above, then edit it before generating.",
|
|
738
|
-
icon: /* @__PURE__ */
|
|
738
|
+
icon: /* @__PURE__ */ x(ie, { className: "h-icon-sm w-icon-sm" }),
|
|
739
739
|
"data-testid": "insights-suggestions",
|
|
740
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ x("div", {
|
|
741
741
|
style: {
|
|
742
742
|
display: "grid",
|
|
743
743
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
|
|
744
744
|
gap: "var(--space-controlGap)"
|
|
745
745
|
},
|
|
746
|
-
children:
|
|
746
|
+
children: Xe.map((e) => /* @__PURE__ */ S("button", {
|
|
747
747
|
type: "button",
|
|
748
748
|
onClick: () => nt(e.prompt),
|
|
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",
|
|
@@ -758,7 +758,7 @@ var L = c(function() {
|
|
|
758
758
|
cursor: "pointer"
|
|
759
759
|
},
|
|
760
760
|
children: [
|
|
761
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ x("span", {
|
|
762
762
|
style: {
|
|
763
763
|
display: "block",
|
|
764
764
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -768,7 +768,7 @@ var L = c(function() {
|
|
|
768
768
|
},
|
|
769
769
|
children: e.title
|
|
770
770
|
}),
|
|
771
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ x("span", {
|
|
772
772
|
style: {
|
|
773
773
|
display: "block",
|
|
774
774
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -777,14 +777,14 @@ var L = c(function() {
|
|
|
777
777
|
},
|
|
778
778
|
children: e.exampleDescription || e.prompt
|
|
779
779
|
}),
|
|
780
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
780
|
+
e.tags.length > 0 && /* @__PURE__ */ x("span", {
|
|
781
781
|
style: {
|
|
782
782
|
display: "flex",
|
|
783
783
|
gap: "var(--space-iconGap)",
|
|
784
784
|
marginTop: "var(--space-controlGap)",
|
|
785
785
|
flexWrap: "wrap"
|
|
786
786
|
},
|
|
787
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
787
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ x("span", {
|
|
788
788
|
style: j,
|
|
789
789
|
children: e
|
|
790
790
|
}, e))
|
|
@@ -793,29 +793,29 @@ var L = c(function() {
|
|
|
793
793
|
}, e.id))
|
|
794
794
|
})
|
|
795
795
|
}),
|
|
796
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ x(r, {
|
|
797
797
|
emphasis: "bare",
|
|
798
798
|
padding: "none",
|
|
799
799
|
headingLevel: 2,
|
|
800
800
|
title: c("bigconsole.insights.generations.heading", "Recent generations"),
|
|
801
801
|
description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
|
|
802
|
-
icon: /* @__PURE__ */
|
|
803
|
-
meta:
|
|
802
|
+
icon: /* @__PURE__ */ x(re, { className: "h-icon-sm w-icon-sm" }),
|
|
803
|
+
meta: Z.length > 0 ? /* @__PURE__ */ S("span", {
|
|
804
804
|
style: j,
|
|
805
805
|
children: [
|
|
806
|
-
|
|
806
|
+
Z.length,
|
|
807
807
|
" generation",
|
|
808
|
-
|
|
808
|
+
Z.length === 1 ? "" : "s"
|
|
809
809
|
]
|
|
810
810
|
}) : void 0,
|
|
811
811
|
"data-testid": "insights-generations",
|
|
812
|
-
children:
|
|
812
|
+
children: Ve && Z.length === 0 ? /* @__PURE__ */ x(r, {
|
|
813
813
|
emphasis: "muted",
|
|
814
814
|
headingLevel: 3,
|
|
815
815
|
"aria-label": "Loading generations",
|
|
816
816
|
className: "min-h-[10rem]",
|
|
817
817
|
"data-testid": "insights-generations-loading",
|
|
818
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ S("div", {
|
|
819
819
|
style: {
|
|
820
820
|
display: "flex",
|
|
821
821
|
minHeight: "8rem",
|
|
@@ -825,84 +825,84 @@ var L = c(function() {
|
|
|
825
825
|
gap: "var(--space-controlGap)",
|
|
826
826
|
color: "var(--color-text-muted)"
|
|
827
827
|
},
|
|
828
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ x(g, {
|
|
829
829
|
size: 24,
|
|
830
830
|
className: "animate-spin",
|
|
831
831
|
"aria-hidden": "true"
|
|
832
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ x("p", {
|
|
833
833
|
style: { fontSize: "var(--font-size-body-sm)" },
|
|
834
834
|
children: c("bigconsole.insights.generations.loading", "Loading generations…")
|
|
835
835
|
})]
|
|
836
836
|
})
|
|
837
|
-
}) :
|
|
837
|
+
}) : Z.length === 0 && !L ? /* @__PURE__ */ x(le, {
|
|
838
838
|
treatment: "insight",
|
|
839
839
|
className: "border-[var(--color-border-seam)]",
|
|
840
|
-
children: /* @__PURE__ */
|
|
840
|
+
children: /* @__PURE__ */ x(de, {
|
|
841
841
|
illustration: "onboarding",
|
|
842
842
|
title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
843
843
|
description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
844
844
|
})
|
|
845
|
-
}) : /* @__PURE__ */
|
|
845
|
+
}) : /* @__PURE__ */ S("div", {
|
|
846
846
|
className: "flex flex-col gap-list-gap",
|
|
847
|
-
children: [
|
|
847
|
+
children: [L && !X && /* @__PURE__ */ x(r, {
|
|
848
848
|
emphasis: "muted",
|
|
849
849
|
tone: "info",
|
|
850
850
|
padding: "compact",
|
|
851
851
|
headingLevel: 3,
|
|
852
852
|
title: "Sending your prompt…",
|
|
853
853
|
description: "The new generation appears here as soon as the backend accepts it.",
|
|
854
|
-
icon: /* @__PURE__ */
|
|
854
|
+
icon: /* @__PURE__ */ x(g, { className: "h-icon-sm w-icon-sm animate-spin" }),
|
|
855
855
|
"data-testid": "insights-generation-pending"
|
|
856
|
-
}),
|
|
857
|
-
let
|
|
858
|
-
return /* @__PURE__ */
|
|
856
|
+
}), Z.map((e) => {
|
|
857
|
+
let t = e.generatedSpec, i = z.has(e.id), a = Se.includes(e.status);
|
|
858
|
+
return /* @__PURE__ */ S(r, {
|
|
859
859
|
emphasis: "standard",
|
|
860
860
|
padding: "compact",
|
|
861
861
|
headingLevel: 3,
|
|
862
|
-
title:
|
|
863
|
-
meta: /* @__PURE__ */
|
|
862
|
+
title: t?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
|
|
863
|
+
meta: /* @__PURE__ */ x(je, { status: e.status }),
|
|
864
864
|
description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
|
|
865
865
|
"data-testid": "insights-generation-card",
|
|
866
866
|
bodyClassName: "flex flex-col gap-control-gap",
|
|
867
867
|
children: [
|
|
868
|
-
|
|
868
|
+
t && /* @__PURE__ */ S("div", {
|
|
869
869
|
style: {
|
|
870
870
|
display: "flex",
|
|
871
871
|
flexWrap: "wrap",
|
|
872
872
|
gap: "var(--space-iconGap)"
|
|
873
873
|
},
|
|
874
874
|
children: [
|
|
875
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ S("span", {
|
|
876
876
|
style: j,
|
|
877
877
|
children: [
|
|
878
|
-
|
|
878
|
+
F(t),
|
|
879
879
|
" widget",
|
|
880
|
-
|
|
880
|
+
F(t) === 1 ? "" : "s"
|
|
881
881
|
]
|
|
882
882
|
}),
|
|
883
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ S("span", {
|
|
884
884
|
style: j,
|
|
885
885
|
children: [
|
|
886
|
-
|
|
886
|
+
t.pages.length,
|
|
887
887
|
" page",
|
|
888
|
-
|
|
888
|
+
t.pages.length === 1 ? "" : "s"
|
|
889
889
|
]
|
|
890
890
|
}),
|
|
891
|
-
/* @__PURE__ */
|
|
892
|
-
style:
|
|
893
|
-
children: [Math.round(
|
|
891
|
+
/* @__PURE__ */ S("span", {
|
|
892
|
+
style: Me(t.overallConfidence),
|
|
893
|
+
children: [Math.round(t.overallConfidence * 100), "% confidence"]
|
|
894
894
|
})
|
|
895
895
|
]
|
|
896
896
|
}),
|
|
897
|
-
e.errorMessage && /* @__PURE__ */
|
|
897
|
+
e.errorMessage && /* @__PURE__ */ x(r, {
|
|
898
898
|
headingLevel: 4,
|
|
899
899
|
tone: "danger",
|
|
900
900
|
padding: "compact",
|
|
901
901
|
title: "Generation failed",
|
|
902
902
|
description: e.errorMessage,
|
|
903
|
-
icon: /* @__PURE__ */
|
|
903
|
+
icon: /* @__PURE__ */ x(f, { className: "h-icon-sm w-icon-sm" })
|
|
904
904
|
}),
|
|
905
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ S("div", {
|
|
906
906
|
style: {
|
|
907
907
|
display: "flex",
|
|
908
908
|
flexWrap: "wrap",
|
|
@@ -912,7 +912,7 @@ var L = c(function() {
|
|
|
912
912
|
paddingTop: "var(--space-controlGap)"
|
|
913
913
|
},
|
|
914
914
|
children: [
|
|
915
|
-
a && /* @__PURE__ */
|
|
915
|
+
a && /* @__PURE__ */ S("button", {
|
|
916
916
|
type: "button",
|
|
917
917
|
onClick: () => {
|
|
918
918
|
o("medium"), $e(e.id);
|
|
@@ -925,7 +925,7 @@ var L = c(function() {
|
|
|
925
925
|
cursor: i ? "wait" : "pointer"
|
|
926
926
|
},
|
|
927
927
|
children: [
|
|
928
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ x(te, {
|
|
929
929
|
size: 14,
|
|
930
930
|
"aria-hidden": "true"
|
|
931
931
|
}),
|
|
@@ -933,14 +933,14 @@ var L = c(function() {
|
|
|
933
933
|
c("bigconsole.insights.actions.cancel", "Cancel")
|
|
934
934
|
]
|
|
935
935
|
}),
|
|
936
|
-
e.status === "COMPLETED" &&
|
|
936
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
|
|
937
937
|
type: "button",
|
|
938
|
-
onClick: () =>
|
|
938
|
+
onClick: () => V(e),
|
|
939
939
|
title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
940
940
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
941
941
|
style: E,
|
|
942
942
|
children: [
|
|
943
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ x(ne, {
|
|
944
944
|
size: 14,
|
|
945
945
|
"aria-hidden": "true"
|
|
946
946
|
}),
|
|
@@ -948,16 +948,16 @@ var L = c(function() {
|
|
|
948
948
|
c("bigconsole.insights.actions.preview", "Preview")
|
|
949
949
|
]
|
|
950
950
|
}),
|
|
951
|
-
e.status === "COMPLETED" &&
|
|
951
|
+
e.status === "COMPLETED" && t && /* @__PURE__ */ S("button", {
|
|
952
952
|
type: "button",
|
|
953
953
|
onClick: () => {
|
|
954
|
-
|
|
954
|
+
U(e), G("");
|
|
955
955
|
},
|
|
956
956
|
title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
957
957
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
958
958
|
style: E,
|
|
959
959
|
children: [
|
|
960
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ x(v, {
|
|
961
961
|
size: 14,
|
|
962
962
|
"aria-hidden": "true"
|
|
963
963
|
}),
|
|
@@ -965,7 +965,7 @@ var L = c(function() {
|
|
|
965
965
|
c("bigconsole.insights.actions.refine", "Refine")
|
|
966
966
|
]
|
|
967
967
|
}),
|
|
968
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */
|
|
968
|
+
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
|
|
969
969
|
type: "button",
|
|
970
970
|
onClick: () => {
|
|
971
971
|
o("medium"), et(e.id);
|
|
@@ -978,7 +978,7 @@ var L = c(function() {
|
|
|
978
978
|
cursor: i ? "wait" : "pointer"
|
|
979
979
|
},
|
|
980
980
|
children: [
|
|
981
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ x(ae, {
|
|
982
982
|
size: 14,
|
|
983
983
|
className: i ? "animate-spin" : "",
|
|
984
984
|
"aria-hidden": "true"
|
|
@@ -987,7 +987,7 @@ var L = c(function() {
|
|
|
987
987
|
c("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
988
988
|
]
|
|
989
989
|
}),
|
|
990
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ S("div", {
|
|
991
991
|
style: {
|
|
992
992
|
display: "flex",
|
|
993
993
|
flexWrap: "wrap",
|
|
@@ -996,44 +996,44 @@ var L = c(function() {
|
|
|
996
996
|
marginLeft: "auto"
|
|
997
997
|
},
|
|
998
998
|
children: [
|
|
999
|
-
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */
|
|
999
|
+
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
|
|
1000
1000
|
type: "button",
|
|
1001
|
-
onClick: () =>
|
|
1001
|
+
onClick: () => Q(e.id),
|
|
1002
1002
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1003
1003
|
style: D,
|
|
1004
1004
|
children: [
|
|
1005
1005
|
c("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1006
1006
|
" ",
|
|
1007
|
-
/* @__PURE__ */
|
|
1007
|
+
/* @__PURE__ */ x(p, {
|
|
1008
1008
|
size: 14,
|
|
1009
1009
|
"aria-hidden": "true"
|
|
1010
1010
|
})
|
|
1011
1011
|
]
|
|
1012
1012
|
}),
|
|
1013
|
-
e.dashboardId && /* @__PURE__ */
|
|
1013
|
+
e.dashboardId && /* @__PURE__ */ S("button", {
|
|
1014
1014
|
type: "button",
|
|
1015
|
-
onClick: () =>
|
|
1015
|
+
onClick: () => m(`/dashboards/${e.dashboardId ?? ""}`),
|
|
1016
1016
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1017
1017
|
style: E,
|
|
1018
1018
|
children: [
|
|
1019
1019
|
c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
|
|
1020
1020
|
" ",
|
|
1021
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ x(p, {
|
|
1022
1022
|
size: 14,
|
|
1023
1023
|
"aria-hidden": "true"
|
|
1024
1024
|
})
|
|
1025
1025
|
]
|
|
1026
1026
|
}),
|
|
1027
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ x("button", {
|
|
1028
1028
|
type: "button",
|
|
1029
1029
|
onClick: () => {
|
|
1030
1030
|
o("medium"), Qe(e.id);
|
|
1031
1031
|
},
|
|
1032
1032
|
title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1033
1033
|
"aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1034
|
-
className:
|
|
1034
|
+
className: n,
|
|
1035
1035
|
style: O,
|
|
1036
|
-
children: /* @__PURE__ */
|
|
1036
|
+
children: /* @__PURE__ */ x(oe, {
|
|
1037
1037
|
size: 14,
|
|
1038
1038
|
"aria-hidden": "true"
|
|
1039
1039
|
})
|
|
@@ -1049,11 +1049,11 @@ var L = c(function() {
|
|
|
1049
1049
|
})
|
|
1050
1050
|
] })]
|
|
1051
1051
|
}),
|
|
1052
|
-
|
|
1052
|
+
B && $ && /* @__PURE__ */ x("div", {
|
|
1053
1053
|
role: "dialog",
|
|
1054
1054
|
"aria-modal": "true",
|
|
1055
1055
|
"aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
|
|
1056
|
-
onClick: () =>
|
|
1056
|
+
onClick: () => V(null),
|
|
1057
1057
|
style: {
|
|
1058
1058
|
position: "fixed",
|
|
1059
1059
|
inset: 0,
|
|
@@ -1064,7 +1064,7 @@ var L = c(function() {
|
|
|
1064
1064
|
justifyContent: "center",
|
|
1065
1065
|
padding: "var(--space-pagePadding)"
|
|
1066
1066
|
},
|
|
1067
|
-
children: /* @__PURE__ */
|
|
1067
|
+
children: /* @__PURE__ */ S("div", {
|
|
1068
1068
|
onClick: (e) => e.stopPropagation(),
|
|
1069
1069
|
style: {
|
|
1070
1070
|
display: "flex",
|
|
@@ -1078,7 +1078,7 @@ var L = c(function() {
|
|
|
1078
1078
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1079
1079
|
},
|
|
1080
1080
|
children: [
|
|
1081
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ S("div", {
|
|
1082
1082
|
style: {
|
|
1083
1083
|
display: "flex",
|
|
1084
1084
|
justifyContent: "space-between",
|
|
@@ -1087,16 +1087,16 @@ var L = c(function() {
|
|
|
1087
1087
|
padding: "var(--space-cardPadding)",
|
|
1088
1088
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1089
1089
|
},
|
|
1090
|
-
children: [/* @__PURE__ */
|
|
1090
|
+
children: [/* @__PURE__ */ S("div", {
|
|
1091
1091
|
style: { minWidth: 0 },
|
|
1092
|
-
children: [/* @__PURE__ */
|
|
1092
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
1093
1093
|
style: {
|
|
1094
1094
|
fontSize: "var(--font-size-heading-h4)",
|
|
1095
1095
|
fontWeight: "var(--font-weight-semibold)",
|
|
1096
1096
|
color: "var(--color-text-primary)"
|
|
1097
1097
|
},
|
|
1098
1098
|
children: $.name
|
|
1099
|
-
}), $.description && /* @__PURE__ */
|
|
1099
|
+
}), $.description && /* @__PURE__ */ x("p", {
|
|
1100
1100
|
style: {
|
|
1101
1101
|
fontSize: "var(--font-size-body-sm)",
|
|
1102
1102
|
color: "var(--color-text-secondary)",
|
|
@@ -1104,22 +1104,22 @@ var L = c(function() {
|
|
|
1104
1104
|
},
|
|
1105
1105
|
children: $.description
|
|
1106
1106
|
})]
|
|
1107
|
-
}), /* @__PURE__ */
|
|
1107
|
+
}), /* @__PURE__ */ x("button", {
|
|
1108
1108
|
type: "button",
|
|
1109
|
-
onClick: () =>
|
|
1109
|
+
onClick: () => V(null),
|
|
1110
1110
|
"aria-label": c("bigconsole.insights.preview.close", "Close preview"),
|
|
1111
1111
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1112
1112
|
style: {
|
|
1113
1113
|
...O,
|
|
1114
1114
|
color: "var(--color-text-muted)"
|
|
1115
1115
|
},
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ x(se, {
|
|
1117
1117
|
size: 18,
|
|
1118
1118
|
"aria-hidden": "true"
|
|
1119
1119
|
})
|
|
1120
1120
|
})]
|
|
1121
1121
|
}),
|
|
1122
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ S("div", {
|
|
1123
1123
|
style: {
|
|
1124
1124
|
flex: "1 1 auto",
|
|
1125
1125
|
minHeight: 0,
|
|
@@ -1130,22 +1130,22 @@ var L = c(function() {
|
|
|
1130
1130
|
gap: "var(--space-controlGap)"
|
|
1131
1131
|
},
|
|
1132
1132
|
children: [
|
|
1133
|
-
/* @__PURE__ */
|
|
1133
|
+
/* @__PURE__ */ S("div", {
|
|
1134
1134
|
style: {
|
|
1135
1135
|
display: "flex",
|
|
1136
1136
|
flexWrap: "wrap",
|
|
1137
1137
|
gap: "var(--space-iconGap)"
|
|
1138
1138
|
},
|
|
1139
1139
|
children: [
|
|
1140
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ S("span", {
|
|
1141
1141
|
style: j,
|
|
1142
1142
|
children: [
|
|
1143
|
-
|
|
1143
|
+
F($),
|
|
1144
1144
|
" widget",
|
|
1145
|
-
|
|
1145
|
+
F($) === 1 ? "" : "s"
|
|
1146
1146
|
]
|
|
1147
1147
|
}),
|
|
1148
|
-
/* @__PURE__ */
|
|
1148
|
+
/* @__PURE__ */ S("span", {
|
|
1149
1149
|
style: j,
|
|
1150
1150
|
children: [
|
|
1151
1151
|
$.pages.length,
|
|
@@ -1153,15 +1153,15 @@ var L = c(function() {
|
|
|
1153
1153
|
$.pages.length === 1 ? "" : "s"
|
|
1154
1154
|
]
|
|
1155
1155
|
}),
|
|
1156
|
-
/* @__PURE__ */
|
|
1157
|
-
style:
|
|
1156
|
+
/* @__PURE__ */ S("span", {
|
|
1157
|
+
style: Me($.overallConfidence),
|
|
1158
1158
|
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
1159
1159
|
})
|
|
1160
1160
|
]
|
|
1161
1161
|
}),
|
|
1162
|
-
$.reasoning && /* @__PURE__ */
|
|
1162
|
+
$.reasoning && /* @__PURE__ */ S("details", {
|
|
1163
1163
|
"data-testid": "preview-reasoning",
|
|
1164
|
-
children: [/* @__PURE__ */
|
|
1164
|
+
children: [/* @__PURE__ */ x("summary", {
|
|
1165
1165
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1166
1166
|
style: {
|
|
1167
1167
|
cursor: "pointer",
|
|
@@ -1171,7 +1171,7 @@ var L = c(function() {
|
|
|
1171
1171
|
borderRadius: "var(--radius-button)"
|
|
1172
1172
|
},
|
|
1173
1173
|
children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
|
|
1174
|
-
}), /* @__PURE__ */
|
|
1174
|
+
}), /* @__PURE__ */ x("p", {
|
|
1175
1175
|
style: {
|
|
1176
1176
|
marginTop: "var(--space-controlGap)",
|
|
1177
1177
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -1181,12 +1181,12 @@ var L = c(function() {
|
|
|
1181
1181
|
children: $.reasoning
|
|
1182
1182
|
})]
|
|
1183
1183
|
}),
|
|
1184
|
-
$.pages.map((e, t) => /* @__PURE__ */
|
|
1184
|
+
$.pages.map((e, t) => /* @__PURE__ */ x(r, {
|
|
1185
1185
|
emphasis: "muted",
|
|
1186
1186
|
padding: "compact",
|
|
1187
1187
|
headingLevel: 3,
|
|
1188
1188
|
title: e.name,
|
|
1189
|
-
meta: /* @__PURE__ */
|
|
1189
|
+
meta: /* @__PURE__ */ S("span", {
|
|
1190
1190
|
style: j,
|
|
1191
1191
|
children: [
|
|
1192
1192
|
e.widgets.length,
|
|
@@ -1194,15 +1194,15 @@ var L = c(function() {
|
|
|
1194
1194
|
e.widgets.length === 1 ? "" : "s"
|
|
1195
1195
|
]
|
|
1196
1196
|
}),
|
|
1197
|
-
children: /* @__PURE__ */
|
|
1197
|
+
children: /* @__PURE__ */ x("div", {
|
|
1198
1198
|
style: {
|
|
1199
1199
|
display: "flex",
|
|
1200
1200
|
flexDirection: "column",
|
|
1201
1201
|
gap: "var(--space-controlGap)"
|
|
1202
1202
|
},
|
|
1203
1203
|
children: e.widgets.map((e, t) => {
|
|
1204
|
-
let n =
|
|
1205
|
-
return /* @__PURE__ */
|
|
1204
|
+
let n = Ne(e.confidence);
|
|
1205
|
+
return /* @__PURE__ */ S("div", {
|
|
1206
1206
|
style: {
|
|
1207
1207
|
display: "flex",
|
|
1208
1208
|
flexDirection: "column",
|
|
@@ -1212,7 +1212,7 @@ var L = c(function() {
|
|
|
1212
1212
|
backgroundColor: "var(--color-bg-surface)",
|
|
1213
1213
|
border: "1px solid var(--color-border-subtle)"
|
|
1214
1214
|
},
|
|
1215
|
-
children: [/* @__PURE__ */
|
|
1215
|
+
children: [/* @__PURE__ */ S("div", {
|
|
1216
1216
|
style: {
|
|
1217
1217
|
display: "flex",
|
|
1218
1218
|
flexWrap: "wrap",
|
|
@@ -1220,7 +1220,7 @@ var L = c(function() {
|
|
|
1220
1220
|
gap: "var(--space-iconGap)"
|
|
1221
1221
|
},
|
|
1222
1222
|
children: [
|
|
1223
|
-
/* @__PURE__ */
|
|
1223
|
+
/* @__PURE__ */ x("span", {
|
|
1224
1224
|
style: {
|
|
1225
1225
|
fontSize: "var(--font-size-body-sm)",
|
|
1226
1226
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -1229,7 +1229,7 @@ var L = c(function() {
|
|
|
1229
1229
|
},
|
|
1230
1230
|
children: e.title
|
|
1231
1231
|
}),
|
|
1232
|
-
/* @__PURE__ */
|
|
1232
|
+
/* @__PURE__ */ x("span", {
|
|
1233
1233
|
style: {
|
|
1234
1234
|
fontSize: "var(--font-size-xs)",
|
|
1235
1235
|
color: "var(--color-text-muted)"
|
|
@@ -1237,16 +1237,16 @@ var L = c(function() {
|
|
|
1237
1237
|
"data-testid": "preview-widget-type",
|
|
1238
1238
|
children: e.type
|
|
1239
1239
|
}),
|
|
1240
|
-
n && /* @__PURE__ */
|
|
1240
|
+
n && /* @__PURE__ */ x("span", {
|
|
1241
1241
|
style: {
|
|
1242
|
-
...
|
|
1242
|
+
...Fe(n),
|
|
1243
1243
|
marginLeft: "auto"
|
|
1244
1244
|
},
|
|
1245
1245
|
"data-testid": "preview-widget-confidence",
|
|
1246
1246
|
children: n
|
|
1247
1247
|
})
|
|
1248
1248
|
]
|
|
1249
|
-
}), e.reasoning && /* @__PURE__ */
|
|
1249
|
+
}), e.reasoning && /* @__PURE__ */ x("p", {
|
|
1250
1250
|
style: {
|
|
1251
1251
|
margin: 0,
|
|
1252
1252
|
fontSize: "var(--font-size-xs)",
|
|
@@ -1261,7 +1261,7 @@ var L = c(function() {
|
|
|
1261
1261
|
}, t))
|
|
1262
1262
|
]
|
|
1263
1263
|
}),
|
|
1264
|
-
/* @__PURE__ */
|
|
1264
|
+
/* @__PURE__ */ S("div", {
|
|
1265
1265
|
style: {
|
|
1266
1266
|
display: "flex",
|
|
1267
1267
|
justifyContent: "flex-end",
|
|
@@ -1271,24 +1271,24 @@ var L = c(function() {
|
|
|
1271
1271
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1272
1272
|
},
|
|
1273
1273
|
children: [
|
|
1274
|
-
/* @__PURE__ */
|
|
1274
|
+
/* @__PURE__ */ x("button", {
|
|
1275
1275
|
type: "button",
|
|
1276
|
-
onClick: () =>
|
|
1276
|
+
onClick: () => V(null),
|
|
1277
1277
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1278
1278
|
style: E,
|
|
1279
1279
|
children: "Close"
|
|
1280
1280
|
}),
|
|
1281
|
-
|
|
1281
|
+
B.status === "COMPLETED" && $ && /* @__PURE__ */ S("button", {
|
|
1282
1282
|
type: "button",
|
|
1283
1283
|
onClick: () => {
|
|
1284
|
-
let e =
|
|
1285
|
-
|
|
1284
|
+
let e = B;
|
|
1285
|
+
V(null), U(e), G("");
|
|
1286
1286
|
},
|
|
1287
1287
|
title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1288
1288
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1289
1289
|
style: E,
|
|
1290
1290
|
children: [
|
|
1291
|
-
/* @__PURE__ */
|
|
1291
|
+
/* @__PURE__ */ x(v, {
|
|
1292
1292
|
size: 14,
|
|
1293
1293
|
"aria-hidden": "true"
|
|
1294
1294
|
}),
|
|
@@ -1296,18 +1296,18 @@ var L = c(function() {
|
|
|
1296
1296
|
c("bigconsole.insights.actions.refine", "Refine")
|
|
1297
1297
|
]
|
|
1298
1298
|
}),
|
|
1299
|
-
|
|
1299
|
+
B.status === "COMPLETED" && !B.dashboardId && /* @__PURE__ */ S("button", {
|
|
1300
1300
|
type: "button",
|
|
1301
1301
|
onClick: () => {
|
|
1302
|
-
let e =
|
|
1303
|
-
|
|
1302
|
+
let e = B.id;
|
|
1303
|
+
V(null), Q(e);
|
|
1304
1304
|
},
|
|
1305
1305
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1306
1306
|
style: D,
|
|
1307
1307
|
children: [
|
|
1308
1308
|
c("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1309
1309
|
" ",
|
|
1310
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ x(p, {
|
|
1311
1311
|
size: 14,
|
|
1312
1312
|
"aria-hidden": "true"
|
|
1313
1313
|
})
|
|
@@ -1318,11 +1318,11 @@ var L = c(function() {
|
|
|
1318
1318
|
]
|
|
1319
1319
|
})
|
|
1320
1320
|
}),
|
|
1321
|
-
|
|
1321
|
+
H && /* @__PURE__ */ x("div", {
|
|
1322
1322
|
role: "dialog",
|
|
1323
1323
|
"aria-modal": "true",
|
|
1324
1324
|
"aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
|
|
1325
|
-
onClick: () =>
|
|
1325
|
+
onClick: () => U(null),
|
|
1326
1326
|
style: {
|
|
1327
1327
|
position: "fixed",
|
|
1328
1328
|
inset: 0,
|
|
@@ -1333,7 +1333,7 @@ var L = c(function() {
|
|
|
1333
1333
|
justifyContent: "center",
|
|
1334
1334
|
padding: "var(--space-pagePadding)"
|
|
1335
1335
|
},
|
|
1336
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ S("div", {
|
|
1337
1337
|
onClick: (e) => e.stopPropagation(),
|
|
1338
1338
|
style: {
|
|
1339
1339
|
display: "flex",
|
|
@@ -1347,19 +1347,19 @@ var L = c(function() {
|
|
|
1347
1347
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1348
1348
|
},
|
|
1349
1349
|
children: [
|
|
1350
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ S("div", {
|
|
1351
1351
|
style: {
|
|
1352
1352
|
padding: "var(--space-cardPadding)",
|
|
1353
1353
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1354
1354
|
},
|
|
1355
|
-
children: [/* @__PURE__ */
|
|
1355
|
+
children: [/* @__PURE__ */ x("h2", {
|
|
1356
1356
|
style: {
|
|
1357
1357
|
fontSize: "var(--font-size-heading-h4)",
|
|
1358
1358
|
fontWeight: "var(--font-weight-semibold)",
|
|
1359
1359
|
color: "var(--color-text-primary)"
|
|
1360
1360
|
},
|
|
1361
1361
|
children: c("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1362
|
-
}), /* @__PURE__ */
|
|
1362
|
+
}), /* @__PURE__ */ x("p", {
|
|
1363
1363
|
style: {
|
|
1364
1364
|
fontSize: "var(--font-size-body-sm)",
|
|
1365
1365
|
color: "var(--color-text-secondary)",
|
|
@@ -1368,7 +1368,7 @@ var L = c(function() {
|
|
|
1368
1368
|
children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1369
1369
|
})]
|
|
1370
1370
|
}),
|
|
1371
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ S("div", {
|
|
1372
1372
|
style: {
|
|
1373
1373
|
flex: "1 1 auto",
|
|
1374
1374
|
minHeight: 0,
|
|
@@ -1378,20 +1378,20 @@ var L = c(function() {
|
|
|
1378
1378
|
flexDirection: "column",
|
|
1379
1379
|
gap: "var(--space-controlGap)"
|
|
1380
1380
|
},
|
|
1381
|
-
children: [/* @__PURE__ */
|
|
1381
|
+
children: [/* @__PURE__ */ x(r, {
|
|
1382
1382
|
emphasis: "muted",
|
|
1383
1383
|
padding: "compact",
|
|
1384
1384
|
headingLevel: 3,
|
|
1385
|
-
title:
|
|
1386
|
-
description:
|
|
1387
|
-
icon: /* @__PURE__ */
|
|
1388
|
-
}), /* @__PURE__ */
|
|
1385
|
+
title: H.generatedSpec?.name || "Current proposal",
|
|
1386
|
+
description: H.prompt.length > 240 ? `${H.prompt.slice(0, 240)}…` : H.prompt,
|
|
1387
|
+
icon: /* @__PURE__ */ x(_, { className: "h-icon-sm w-icon-sm" })
|
|
1388
|
+
}), /* @__PURE__ */ S("div", {
|
|
1389
1389
|
style: {
|
|
1390
1390
|
display: "flex",
|
|
1391
1391
|
flexDirection: "column",
|
|
1392
1392
|
gap: "var(--space-controlGap)"
|
|
1393
1393
|
},
|
|
1394
|
-
children: [/* @__PURE__ */
|
|
1394
|
+
children: [/* @__PURE__ */ x("label", {
|
|
1395
1395
|
htmlFor: "refine-input",
|
|
1396
1396
|
style: {
|
|
1397
1397
|
display: "block",
|
|
@@ -1400,10 +1400,10 @@ var L = c(function() {
|
|
|
1400
1400
|
color: "var(--color-text-primary)"
|
|
1401
1401
|
},
|
|
1402
1402
|
children: "What should change?"
|
|
1403
|
-
}), /* @__PURE__ */
|
|
1403
|
+
}), /* @__PURE__ */ x("textarea", {
|
|
1404
1404
|
id: "refine-input",
|
|
1405
|
-
value:
|
|
1406
|
-
onChange: (e) =>
|
|
1405
|
+
value: W,
|
|
1406
|
+
onChange: (e) => G(e.target.value),
|
|
1407
1407
|
maxLength: 2e3,
|
|
1408
1408
|
rows: 4,
|
|
1409
1409
|
placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
|
|
@@ -1422,7 +1422,7 @@ var L = c(function() {
|
|
|
1422
1422
|
})]
|
|
1423
1423
|
})]
|
|
1424
1424
|
}),
|
|
1425
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ S("div", {
|
|
1426
1426
|
style: {
|
|
1427
1427
|
display: "flex",
|
|
1428
1428
|
justifyContent: "flex-end",
|
|
@@ -1431,27 +1431,27 @@ var L = c(function() {
|
|
|
1431
1431
|
padding: "var(--space-cardPadding)",
|
|
1432
1432
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1433
1433
|
},
|
|
1434
|
-
children: [/* @__PURE__ */
|
|
1434
|
+
children: [/* @__PURE__ */ x("button", {
|
|
1435
1435
|
type: "button",
|
|
1436
|
-
onClick: () =>
|
|
1436
|
+
onClick: () => U(null),
|
|
1437
1437
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1438
1438
|
style: E,
|
|
1439
1439
|
children: c("bigconsole.insights.actions.cancel", "Cancel")
|
|
1440
|
-
}), /* @__PURE__ */
|
|
1440
|
+
}), /* @__PURE__ */ S("button", {
|
|
1441
1441
|
type: "button",
|
|
1442
1442
|
onClick: () => void tt(),
|
|
1443
|
-
disabled: !
|
|
1443
|
+
disabled: !W.trim() || z.has(H.id),
|
|
1444
1444
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1445
1445
|
style: {
|
|
1446
1446
|
...D,
|
|
1447
|
-
cursor: !
|
|
1448
|
-
opacity:
|
|
1447
|
+
cursor: !W.trim() || z.has(H.id) ? "not-allowed" : "pointer",
|
|
1448
|
+
opacity: W.trim() ? 1 : .6
|
|
1449
1449
|
},
|
|
1450
|
-
children: [
|
|
1450
|
+
children: [z.has(H.id) ? /* @__PURE__ */ x(g, {
|
|
1451
1451
|
size: 14,
|
|
1452
1452
|
className: "animate-spin",
|
|
1453
1453
|
"aria-hidden": "true"
|
|
1454
|
-
}) : /* @__PURE__ */
|
|
1454
|
+
}) : /* @__PURE__ */ x(v, {
|
|
1455
1455
|
size: 14,
|
|
1456
1456
|
"aria-hidden": "true"
|
|
1457
1457
|
}), c("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
@@ -1464,6 +1464,6 @@ var L = c(function() {
|
|
|
1464
1464
|
});
|
|
1465
1465
|
});
|
|
1466
1466
|
//#endregion
|
|
1467
|
-
export {
|
|
1467
|
+
export { I as InsightsPage, I as default };
|
|
1468
1468
|
|
|
1469
1469
|
//# sourceMappingURL=InsightsPage.js.map
|