@burdenoff/microfe-bigconsole 2026.805.3 → 2026.812.2
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/components/DrilldownDashboardRenderer.js +118 -106
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -50
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderCanvas.js +2 -2
- package/dist/bigconsole/components/builder/BuilderCanvas.js.map +1 -1
- package/dist/bigconsole/components/builder/BuilderTopbar.js +3 -3
- package/dist/bigconsole/components/builder/BuilderTopbar.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js +24 -25
- package/dist/bigconsole/components/builder/inspector/AdvancedSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js +40 -29
- package/dist/bigconsole/components/builder/inspector/AppearanceSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +135 -97
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js +58 -44
- package/dist/bigconsole/components/builder/inspector/GeneralSection.js.map +1 -1
- package/dist/bigconsole/components/common/Section.js +70 -0
- package/dist/bigconsole/components/common/Section.js.map +1 -0
- package/dist/bigconsole/components/common/index.js +2 -0
- package/dist/bigconsole/components/common/sectionStyles.js +42 -0
- package/dist/bigconsole/components/common/sectionStyles.js.map +1 -0
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +209 -193
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +213 -231
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +12 -18
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +109 -102
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +81 -70
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +125 -159
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +25 -23
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +3 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +5 -3
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +170 -284
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +147 -151
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js +45 -53
- package/dist/bigconsole/components/dashboard/LiveBoardBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +157 -148
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +17 -8
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +101 -95
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +20 -18
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js +26 -58
- package/dist/bigconsole/components/dashboard/TemplateSetupBanner.js.map +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +307 -231
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +29 -29
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +78 -79
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js +33 -34
- package/dist/bigconsole/components/datasink/DataSinkDataViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +79 -56
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +75 -65
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +1 -1
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js +20 -19
- package/dist/bigconsole/components/datasink/DataSinkTableViewer.js.map +1 -1
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js +127 -171
- package/dist/bigconsole/components/datasink/ExportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +263 -243
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js +65 -66
- package/dist/bigconsole/components/datasink/LinkedParsersPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js +121 -127
- package/dist/bigconsole/components/datasink/LinkedWorkflowsPanel.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +33 -26
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/SetupStateBadge.js +3 -3
- package/dist/bigconsole/components/datasink/SetupStateBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js +95 -95
- package/dist/bigconsole/components/datasink/WorkflowStatusPanel.js.map +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +154 -123
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ExpressionEditor.js +3 -3
- package/dist/bigconsole/components/parser/ExpressionEditor.js.map +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +235 -275
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserCard.js +133 -114
- package/dist/bigconsole/components/parser/ParserCard.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +191 -174
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserStatusBadge.js +2 -2
- package/dist/bigconsole/components/parser/ParserStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserTypeBadge.js +4 -4
- package/dist/bigconsole/components/parser/ParserTypeBadge.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +134 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js +77 -64
- package/dist/bigconsole/components/pipeline/PipelineDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js +7 -10
- package/dist/bigconsole/components/pipeline/PipelineStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewContent.js +31 -32
- package/dist/bigconsole/components/preview/AiPreviewContent.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +152 -106
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +193 -152
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/previewShared.js +41 -23
- package/dist/bigconsole/components/preview/previewShared.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +342 -308
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +262 -238
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +783 -867
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js +7 -5
- package/dist/bigconsole/components/widgets/WidgetErrorBoundary.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +7 -8
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetRegistry.js +4 -4
- package/dist/bigconsole/components/widgets/WidgetRegistry.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +8 -7
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js +1 -1
- package/dist/bigconsole/components/widgets/adaptive-card/AdaptiveCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +2 -2
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +11 -5
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +19 -15
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +154 -102
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js +36 -32
- package/dist/bigconsole/components/widgets/gauge/CircularGauge.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +85 -60
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js +64 -35
- package/dist/bigconsole/components/widgets/gauge/GaugeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/LinearGauge.js +46 -45
- package/dist/bigconsole/components/widgets/gauge/LinearGauge.js.map +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +35 -24
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js +2 -2
- package/dist/bigconsole/components/widgets/iframe-widget/IframeWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +4 -4
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js +153 -90
- package/dist/bigconsole/components/widgets/kpi-comparison/KPIComparisonWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +8 -2
- package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js +1 -1
- package/dist/bigconsole/components/widgets/list/ListItem.js.map +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js +1 -1
- package/dist/bigconsole/components/widgets/map-widget/MapWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +14 -4
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +112 -89
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +21 -13
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/index.js +4 -4
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +3 -3
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +34 -25
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressWidget.js +129 -114
- package/dist/bigconsole/components/widgets/progress/ProgressWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js +3 -3
- package/dist/bigconsole/components/widgets/retention/RetentionWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +6 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/ErrorState.js +7 -5
- package/dist/bigconsole/components/widgets/states/ErrorState.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/LoadingState.js +5 -4
- package/dist/bigconsole/components/widgets/states/LoadingState.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +10 -4
- package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js +1 -1
- package/dist/bigconsole/components/widgets/table/TableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js +1 -1
- package/dist/bigconsole/components/widgets/text-widget/TextWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js +3 -3
- package/dist/bigconsole/components/widgets/timeline/TimelineWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js +2 -2
- package/dist/bigconsole/components/widgets/utils/conditionalFormat.js.map +1 -1
- package/dist/bigconsole/components/widgets/utils/targetProgress.js +13 -0
- package/dist/bigconsole/components/widgets/utils/targetProgress.js.map +1 -0
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +112 -85
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +28 -20
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +92 -77
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js +70 -51
- package/dist/bigconsole/components/workflow/WorkflowDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js +16 -17
- package/dist/bigconsole/components/workflow/WorkflowStatusBadge.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +6 -4
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +360 -338
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/hooks/useModalFocusTrap.js +53 -0
- package/dist/bigconsole/hooks/useModalFocusTrap.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.js +209 -203
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +126 -120
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +838 -800
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +263 -315
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +301 -341
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +346 -339
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +356 -458
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSourcesPage.js +7 -2
- package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
- package/dist/bigconsole/pages/HomePage.js +186 -193
- package/dist/bigconsole/pages/HomePage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +887 -740
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +679 -637
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +368 -342
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +537 -444
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +412 -377
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +248 -298
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +251 -153
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +381 -371
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +171 -286
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
2
2
|
import "../contexts/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import n from "../
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
3
|
+
import { SECTION_FOCUS_RING as t } from "../components/common/sectionStyles.js";
|
|
4
|
+
import { Section as n, SectionStack as r } from "../components/common/Section.js";
|
|
5
|
+
import "../components/common/index.js";
|
|
6
|
+
import { reportBigConsoleQuotaError as i } from "../utils/quota.js";
|
|
7
|
+
import a from "../hooks/useBigConsoleAnalytics.js";
|
|
8
|
+
import { isNative as o, nativeImpact as s, nativeNotify as c } from "../../utils/nativeBridge.js";
|
|
9
|
+
import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
|
|
10
|
+
import { AlertCircle as p, ArrowRight as m, Ban as ee, CheckCircle as h, Clock as g, Eye as te, History as ne, Lightbulb as re, Loader2 as _, RefreshCw as ie, Sparkles as v, Trash2 as ae, Wand2 as y, X as oe, XCircle as b } from "lucide-react";
|
|
11
|
+
import { gql as x } from "@apollo/client";
|
|
12
|
+
import { useMutation as S, useQuery as C } from "@apollo/client/react";
|
|
13
|
+
import { useI18n as se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { AuroraBackground as ce, GlassCard as le, GradientText as ue, IllustratedEmptyState as de, PagePurpose as fe } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
13
16
|
//#region src/bigconsole/pages/InsightsPage.tsx
|
|
14
|
-
var
|
|
17
|
+
var pe = x`
|
|
15
18
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
16
19
|
listPromptGenerations(status: $status, first: $first) {
|
|
17
20
|
edges {
|
|
@@ -40,7 +43,7 @@ var de = v`
|
|
|
40
43
|
totalCount
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
`,
|
|
46
|
+
`, me = x`
|
|
44
47
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
45
48
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
46
49
|
id
|
|
@@ -51,7 +54,7 @@ var de = v`
|
|
|
51
54
|
tags
|
|
52
55
|
}
|
|
53
56
|
}
|
|
54
|
-
`,
|
|
57
|
+
`, he = x`
|
|
55
58
|
mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
|
|
56
59
|
generateDashboardFromPrompt(input: $input) {
|
|
57
60
|
id
|
|
@@ -59,24 +62,24 @@ var de = v`
|
|
|
59
62
|
prompt
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
|
-
`,
|
|
65
|
+
`, ge = x`
|
|
63
66
|
mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
|
|
64
67
|
createDashboardFromGeneration(input: $input) {
|
|
65
68
|
id
|
|
66
69
|
}
|
|
67
70
|
}
|
|
68
|
-
`,
|
|
71
|
+
`, _e = x`
|
|
69
72
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
70
73
|
deletePromptGeneration(generationId: $generationId)
|
|
71
74
|
}
|
|
72
|
-
`,
|
|
75
|
+
`, ve = x`
|
|
73
76
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
74
77
|
cancelPromptGeneration(generationId: $generationId) {
|
|
75
78
|
id
|
|
76
79
|
status
|
|
77
80
|
}
|
|
78
81
|
}
|
|
79
|
-
`,
|
|
82
|
+
`, ye = x`
|
|
80
83
|
mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
|
|
81
84
|
regenerateDashboard(input: $input) {
|
|
82
85
|
id
|
|
@@ -84,7 +87,7 @@ var de = v`
|
|
|
84
87
|
prompt
|
|
85
88
|
}
|
|
86
89
|
}
|
|
87
|
-
`,
|
|
90
|
+
`, be = x`
|
|
88
91
|
mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
|
|
89
92
|
refineGeneratedDashboard(input: $input) {
|
|
90
93
|
id
|
|
@@ -92,38 +95,118 @@ var de = v`
|
|
|
92
95
|
prompt
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
|
-
`,
|
|
98
|
+
`, E = [
|
|
96
99
|
"PENDING",
|
|
97
100
|
"PROCESSING",
|
|
98
101
|
"GENERATING"
|
|
99
|
-
]
|
|
100
|
-
|
|
102
|
+
], D = {
|
|
103
|
+
display: "inline-flex",
|
|
104
|
+
alignItems: "center",
|
|
105
|
+
justifyContent: "center",
|
|
106
|
+
gap: "var(--space-iconGap)",
|
|
107
|
+
minHeight: "var(--size-controlHeight-md)",
|
|
108
|
+
padding: "0 var(--space-formGap)",
|
|
109
|
+
borderRadius: "var(--radius-button)",
|
|
110
|
+
fontSize: "var(--font-size-body-sm)",
|
|
111
|
+
fontWeight: "var(--font-weight-medium)",
|
|
112
|
+
lineHeight: 1.2,
|
|
113
|
+
cursor: "pointer"
|
|
114
|
+
}, O = {
|
|
115
|
+
...D,
|
|
116
|
+
border: "1px solid var(--color-border-default)",
|
|
117
|
+
backgroundColor: "transparent",
|
|
118
|
+
color: "var(--color-text-primary)"
|
|
119
|
+
}, k = {
|
|
120
|
+
...D,
|
|
121
|
+
border: "1px solid transparent",
|
|
122
|
+
backgroundColor: "var(--color-action-primary-bg)",
|
|
123
|
+
color: "var(--color-action-primary-text)"
|
|
124
|
+
}, xe = {
|
|
125
|
+
...D,
|
|
126
|
+
border: "1px solid var(--color-status-warning-border)",
|
|
127
|
+
backgroundColor: "transparent",
|
|
128
|
+
color: "var(--color-status-warning-text)"
|
|
129
|
+
}, A = {
|
|
130
|
+
...D,
|
|
131
|
+
minWidth: "var(--size-controlHeight-md)",
|
|
132
|
+
padding: "0 var(--space-controlGap)",
|
|
133
|
+
border: "1px solid var(--color-border-default)",
|
|
134
|
+
backgroundColor: "transparent",
|
|
135
|
+
color: "var(--color-status-error-text)"
|
|
136
|
+
}, j = {
|
|
137
|
+
display: "inline-flex",
|
|
138
|
+
alignItems: "center",
|
|
139
|
+
gap: "var(--space-iconGap)",
|
|
140
|
+
padding: "2px var(--space-controlGap)",
|
|
141
|
+
borderRadius: "var(--radius-pill)",
|
|
142
|
+
fontSize: "var(--font-size-body-sm)",
|
|
143
|
+
fontWeight: "var(--font-weight-medium)",
|
|
144
|
+
border: "1px solid var(--color-border-subtle)",
|
|
145
|
+
backgroundColor: "var(--color-bg-sunken)",
|
|
146
|
+
color: "var(--color-text-secondary)"
|
|
147
|
+
};
|
|
148
|
+
function M(e) {
|
|
101
149
|
switch (e) {
|
|
102
|
-
case "COMPLETED": return
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
case "
|
|
107
|
-
|
|
108
|
-
|
|
150
|
+
case "COMPLETED": return "success";
|
|
151
|
+
case "FAILED": return "danger";
|
|
152
|
+
case "PENDING":
|
|
153
|
+
case "PROCESSING":
|
|
154
|
+
case "GENERATING": return "info";
|
|
155
|
+
default: return "neutral";
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
var N = {
|
|
159
|
+
success: {
|
|
160
|
+
text: "var(--color-status-success-text)",
|
|
161
|
+
bg: "var(--color-status-success-bgSubtle)",
|
|
162
|
+
border: "var(--color-status-success-border)"
|
|
163
|
+
},
|
|
164
|
+
danger: {
|
|
165
|
+
text: "var(--color-status-error-text)",
|
|
166
|
+
bg: "var(--color-status-error-bgSubtle)",
|
|
167
|
+
border: "var(--color-status-error-border)"
|
|
168
|
+
},
|
|
169
|
+
info: {
|
|
170
|
+
text: "var(--color-status-info-text)",
|
|
171
|
+
bg: "var(--color-status-info-bgSubtle)",
|
|
172
|
+
border: "var(--color-status-info-border)"
|
|
173
|
+
},
|
|
174
|
+
neutral: {
|
|
175
|
+
text: "var(--color-text-secondary)",
|
|
176
|
+
bg: "var(--color-bg-sunken)",
|
|
177
|
+
border: "var(--color-border-subtle)"
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
function P(e) {
|
|
181
|
+
let t = N[M(e)].text;
|
|
182
|
+
switch (e) {
|
|
183
|
+
case "COMPLETED": return /* @__PURE__ */ w(h, {
|
|
184
|
+
size: 14,
|
|
185
|
+
style: { color: t },
|
|
186
|
+
"aria-hidden": "true"
|
|
109
187
|
});
|
|
110
|
-
case "
|
|
111
|
-
|
|
112
|
-
|
|
188
|
+
case "FAILED":
|
|
189
|
+
case "CANCELLED": return /* @__PURE__ */ w(b, {
|
|
190
|
+
size: 14,
|
|
191
|
+
style: { color: t },
|
|
192
|
+
"aria-hidden": "true"
|
|
113
193
|
});
|
|
114
194
|
case "PENDING":
|
|
115
195
|
case "PROCESSING":
|
|
116
|
-
case "GENERATING": return /* @__PURE__ */
|
|
117
|
-
size:
|
|
118
|
-
className: "
|
|
196
|
+
case "GENERATING": return /* @__PURE__ */ w(_, {
|
|
197
|
+
size: 14,
|
|
198
|
+
className: "animate-spin",
|
|
199
|
+
style: { color: t },
|
|
200
|
+
"aria-hidden": "true"
|
|
119
201
|
});
|
|
120
|
-
default: return /* @__PURE__ */
|
|
121
|
-
size:
|
|
122
|
-
|
|
202
|
+
default: return /* @__PURE__ */ w(g, {
|
|
203
|
+
size: 14,
|
|
204
|
+
style: { color: t },
|
|
205
|
+
"aria-hidden": "true"
|
|
123
206
|
});
|
|
124
207
|
}
|
|
125
208
|
}
|
|
126
|
-
function
|
|
209
|
+
function F(e, t) {
|
|
127
210
|
switch (e) {
|
|
128
211
|
case "COMPLETED": return t("bigconsole.insights.status.completed", "Completed");
|
|
129
212
|
case "FAILED": return t("bigconsole.insights.status.failed", "Failed");
|
|
@@ -134,704 +217,667 @@ function T(e, t) {
|
|
|
134
217
|
default: return e;
|
|
135
218
|
}
|
|
136
219
|
}
|
|
137
|
-
var
|
|
138
|
-
let { t
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
220
|
+
var Se = ({ status: e }) => {
|
|
221
|
+
let { t } = se(), n = N[M(e)];
|
|
222
|
+
return /* @__PURE__ */ T("span", {
|
|
223
|
+
"data-status": e,
|
|
224
|
+
style: {
|
|
225
|
+
...j,
|
|
226
|
+
border: `1px solid ${n.border}`,
|
|
227
|
+
backgroundColor: n.bg,
|
|
228
|
+
color: n.text
|
|
229
|
+
},
|
|
230
|
+
children: [P(e), F(e, t)]
|
|
231
|
+
});
|
|
232
|
+
};
|
|
233
|
+
function I(e) {
|
|
234
|
+
let t = N[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
|
|
235
|
+
return {
|
|
236
|
+
...j,
|
|
237
|
+
border: `1px solid ${t.border}`,
|
|
238
|
+
backgroundColor: t.bg,
|
|
239
|
+
color: t.text
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
function L(e) {
|
|
243
|
+
return e.pages.reduce((e, t) => e + t.widgets.length, 0);
|
|
244
|
+
}
|
|
245
|
+
var R = l(function() {
|
|
246
|
+
let { t: l } = se(), h = e(), g = a(), [b, x] = f(""), [D, M] = f(!1), [N, P] = f(null), [F, R] = f(() => /* @__PURE__ */ new Set()), [z, B] = f(null), [V, H] = f(null), [U, W] = f(""), G = u((e) => {
|
|
247
|
+
R((t) => new Set(t).add(e));
|
|
248
|
+
}, []), K = u((e) => {
|
|
249
|
+
R((t) => {
|
|
142
250
|
let n = new Set(t);
|
|
143
251
|
return n.delete(e), n;
|
|
144
252
|
});
|
|
145
|
-
}, []), { data:
|
|
253
|
+
}, []), { data: Ce, loading: we, refetch: q, startPolling: Te, stopPolling: J } = C(pe, {
|
|
146
254
|
variables: { first: 20 },
|
|
147
255
|
fetchPolicy: "cache-and-network"
|
|
148
|
-
}),
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
]),
|
|
155
|
-
if (!
|
|
256
|
+
}), Y = Ce?.listPromptGenerations?.edges?.some((e) => E.includes(e.node.status)) ?? !1, { data: Ee } = C(me, { variables: { limit: 6 } }), [De] = S(he), [Oe] = S(ge), [ke] = S(_e), [Ae] = S(ve), [X] = S(ye), [je] = S(be), Z = Ce?.listPromptGenerations?.edges?.map((e) => e.node) || [], Me = Ee?.getPromptSuggestions || [];
|
|
257
|
+
d(() => (Y || D ? Te(2e3) : J(), () => J()), [
|
|
258
|
+
Y,
|
|
259
|
+
D,
|
|
260
|
+
Te,
|
|
261
|
+
J
|
|
262
|
+
]), d(() => {
|
|
263
|
+
if (!z && !V) return;
|
|
156
264
|
let e = (e) => {
|
|
157
|
-
e.key === "Escape" && (
|
|
265
|
+
e.key === "Escape" && (B(null), H(null));
|
|
158
266
|
};
|
|
159
267
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
160
|
-
}, [
|
|
161
|
-
let
|
|
162
|
-
if (!(!
|
|
163
|
-
if (
|
|
164
|
-
|
|
268
|
+
}, [z, V]);
|
|
269
|
+
let Ne = u(async () => {
|
|
270
|
+
if (!(!b.trim() || D)) {
|
|
271
|
+
if (b.length > 2e3) {
|
|
272
|
+
P(l("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
|
|
165
273
|
return;
|
|
166
274
|
}
|
|
167
|
-
|
|
275
|
+
P(null), M(!0);
|
|
168
276
|
try {
|
|
169
|
-
|
|
170
|
-
let e = await
|
|
171
|
-
prompt:
|
|
277
|
+
g("bigconsole.ai.generate_clicked", { maxWidgets: 8 });
|
|
278
|
+
let e = await De({ variables: { input: {
|
|
279
|
+
prompt: b.trim(),
|
|
172
280
|
styleType: "MODERN",
|
|
173
281
|
layoutType: "GRID",
|
|
174
282
|
maxWidgets: 8
|
|
175
283
|
} } });
|
|
176
|
-
if (
|
|
177
|
-
let
|
|
178
|
-
|
|
179
|
-
generationId:
|
|
284
|
+
if (i(e, "command")) return;
|
|
285
|
+
let t = e.data?.generateDashboardFromPrompt?.id;
|
|
286
|
+
t && g("bigconsole.ai.dashboard_generated", {
|
|
287
|
+
generationId: t,
|
|
180
288
|
maxWidgets: 8
|
|
181
|
-
}),
|
|
289
|
+
}), x(""), q();
|
|
182
290
|
} catch (e) {
|
|
183
|
-
if (
|
|
184
|
-
|
|
291
|
+
if (i(e, "command")) return;
|
|
292
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
|
|
185
293
|
} finally {
|
|
186
|
-
|
|
294
|
+
M(!1);
|
|
187
295
|
}
|
|
188
296
|
}
|
|
189
297
|
}, [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
]),
|
|
197
|
-
|
|
298
|
+
g,
|
|
299
|
+
b,
|
|
300
|
+
D,
|
|
301
|
+
De,
|
|
302
|
+
q,
|
|
303
|
+
l
|
|
304
|
+
]), Q = u(async (e) => {
|
|
305
|
+
P(null);
|
|
198
306
|
try {
|
|
199
|
-
|
|
200
|
-
let
|
|
201
|
-
if (t
|
|
202
|
-
let
|
|
203
|
-
|
|
307
|
+
g("bigconsole.ai.create_dashboard_clicked", { generationId: e });
|
|
308
|
+
let t = await Oe({ variables: { input: { generationId: e } } });
|
|
309
|
+
if (i(t, "project")) return;
|
|
310
|
+
let n = t.data?.createDashboardFromGeneration?.id;
|
|
311
|
+
n && (g("bigconsole.ai.dashboard_created", {
|
|
204
312
|
generationId: e,
|
|
205
|
-
dashboardId:
|
|
206
|
-
}),
|
|
313
|
+
dashboardId: n
|
|
314
|
+
}), h(`/dashboards/${n}`));
|
|
207
315
|
} catch (e) {
|
|
208
|
-
if (
|
|
209
|
-
|
|
316
|
+
if (i(e, "project")) return;
|
|
317
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
|
|
210
318
|
}
|
|
211
319
|
}, [
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
]),
|
|
217
|
-
|
|
320
|
+
Oe,
|
|
321
|
+
g,
|
|
322
|
+
h,
|
|
323
|
+
l
|
|
324
|
+
]), Pe = u(async (e) => {
|
|
325
|
+
P(null);
|
|
218
326
|
try {
|
|
219
|
-
await
|
|
327
|
+
await ke({ variables: { generationId: e } }), o() && c("success"), q();
|
|
220
328
|
} catch (e) {
|
|
221
|
-
|
|
329
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), o() && c("error");
|
|
222
330
|
}
|
|
223
331
|
}, [
|
|
332
|
+
ke,
|
|
224
333
|
q,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
k(null), R(e);
|
|
334
|
+
l
|
|
335
|
+
]), Fe = u(async (e) => {
|
|
336
|
+
P(null), G(e);
|
|
229
337
|
try {
|
|
230
|
-
await
|
|
338
|
+
await Ae({ variables: { generationId: e } }), q();
|
|
231
339
|
} catch (e) {
|
|
232
|
-
|
|
340
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
|
|
233
341
|
} finally {
|
|
234
|
-
|
|
342
|
+
K(e);
|
|
235
343
|
}
|
|
236
344
|
}, [
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
]),
|
|
241
|
-
|
|
345
|
+
Ae,
|
|
346
|
+
q,
|
|
347
|
+
l
|
|
348
|
+
]), Ie = u(async (e) => {
|
|
349
|
+
P(null), G(e);
|
|
242
350
|
try {
|
|
243
|
-
if (
|
|
244
|
-
|
|
351
|
+
if (i(await X({ variables: { input: { generationId: e } } }), "command")) return;
|
|
352
|
+
q();
|
|
245
353
|
} catch (e) {
|
|
246
|
-
if (
|
|
247
|
-
|
|
354
|
+
if (i(e, "command")) return;
|
|
355
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
|
|
248
356
|
} finally {
|
|
249
|
-
|
|
357
|
+
K(e);
|
|
250
358
|
}
|
|
251
359
|
}, [
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
]),
|
|
256
|
-
if (!
|
|
257
|
-
let e =
|
|
258
|
-
|
|
259
|
-
let
|
|
360
|
+
X,
|
|
361
|
+
q,
|
|
362
|
+
l
|
|
363
|
+
]), Le = u(async () => {
|
|
364
|
+
if (!V || !U.trim()) return;
|
|
365
|
+
let e = V.id;
|
|
366
|
+
P(null), G(e);
|
|
367
|
+
let t = !1;
|
|
260
368
|
try {
|
|
261
|
-
if (
|
|
369
|
+
if (i(await je({ variables: { input: {
|
|
262
370
|
generationId: e,
|
|
263
|
-
refinementPrompt:
|
|
371
|
+
refinementPrompt: U.trim()
|
|
264
372
|
} } }), "command")) {
|
|
265
|
-
|
|
373
|
+
t = !0;
|
|
266
374
|
return;
|
|
267
375
|
}
|
|
268
|
-
|
|
376
|
+
t = !0, q();
|
|
269
377
|
} catch (e) {
|
|
270
|
-
if (
|
|
271
|
-
|
|
378
|
+
if (i(e, "command")) {
|
|
379
|
+
t = !0;
|
|
272
380
|
return;
|
|
273
381
|
}
|
|
274
|
-
|
|
382
|
+
P(e instanceof Error ? e.message : l("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
|
|
275
383
|
} finally {
|
|
276
|
-
|
|
384
|
+
t && (H(null), W("")), K(e);
|
|
277
385
|
}
|
|
278
386
|
}, [
|
|
279
|
-
P,
|
|
280
|
-
I,
|
|
281
|
-
X,
|
|
282
387
|
V,
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
388
|
+
U,
|
|
389
|
+
je,
|
|
390
|
+
q,
|
|
391
|
+
l
|
|
392
|
+
]), Re = u((e) => {
|
|
393
|
+
x(e);
|
|
394
|
+
}, []), $ = z?.generatedSpec;
|
|
395
|
+
return /* @__PURE__ */ T("div", {
|
|
396
|
+
className: "min-w-0",
|
|
397
|
+
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
292
398
|
children: [
|
|
293
|
-
/* @__PURE__ */
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
},
|
|
299
|
-
children: [
|
|
300
|
-
/* @__PURE__ */ S("div", {
|
|
301
|
-
className: "relative mb-[var(--space-sectionGap)] overflow-hidden rounded-card border border-border-seam bg-gloss-card p-6",
|
|
302
|
-
children: [
|
|
303
|
-
/* @__PURE__ */ x(oe, { intensity: "subtle" }),
|
|
304
|
-
/* @__PURE__ */ S("div", {
|
|
305
|
-
style: {
|
|
306
|
-
display: "flex",
|
|
307
|
-
alignItems: "center",
|
|
308
|
-
gap: "var(--space-iconGap)"
|
|
309
|
-
},
|
|
310
|
-
children: [/* @__PURE__ */ x(h, {
|
|
311
|
-
size: 24,
|
|
312
|
-
style: { color: "var(--color-action-primary-bg)" }
|
|
313
|
-
}), /* @__PURE__ */ x("h1", {
|
|
314
|
-
style: {
|
|
315
|
-
fontSize: "var(--font-size-heading-h4)",
|
|
316
|
-
fontWeight: "var(--font-weight-bold)",
|
|
317
|
-
color: "var(--color-text-primary)"
|
|
318
|
-
},
|
|
319
|
-
children: /* @__PURE__ */ x(le, { children: o("bigconsole.insights.header.title", "AI Insights") })
|
|
320
|
-
})]
|
|
321
|
-
}),
|
|
322
|
-
/* @__PURE__ */ x("p", {
|
|
323
|
-
style: {
|
|
324
|
-
fontSize: "var(--font-size-body-md)",
|
|
325
|
-
color: "var(--color-text-secondary)",
|
|
326
|
-
marginTop: 4
|
|
327
|
-
},
|
|
328
|
-
children: o("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
329
|
-
})
|
|
330
|
-
]
|
|
331
|
-
}),
|
|
332
|
-
/* @__PURE__ */ S(se, {
|
|
333
|
-
className: "mb-[var(--space-sectionGap)] p-[var(--space-cardPadding)]",
|
|
334
|
-
children: [
|
|
335
|
-
/* @__PURE__ */ x("label", {
|
|
336
|
-
htmlFor: "prompt-input",
|
|
337
|
-
style: {
|
|
338
|
-
display: "block",
|
|
339
|
-
fontSize: "var(--font-size-body-sm)",
|
|
340
|
-
fontWeight: "var(--font-weight-medium)",
|
|
341
|
-
color: "var(--color-text-primary)",
|
|
342
|
-
marginBottom: 8
|
|
343
|
-
},
|
|
344
|
-
children: o("bigconsole.insights.prompt.label", "Describe the dashboard you want to create")
|
|
345
|
-
}),
|
|
346
|
-
/* @__PURE__ */ x("textarea", {
|
|
347
|
-
id: "prompt-input",
|
|
348
|
-
value: _,
|
|
349
|
-
onChange: (e) => v(e.target.value),
|
|
350
|
-
placeholder: o("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
351
|
-
rows: 3,
|
|
352
|
-
maxLength: 2e3,
|
|
353
|
-
style: {
|
|
354
|
-
width: "100%",
|
|
355
|
-
padding: "8px 12px",
|
|
356
|
-
borderRadius: "var(--radius-button)",
|
|
357
|
-
border: "1px solid var(--color-border)",
|
|
358
|
-
backgroundColor: "var(--color-bg-canvas)",
|
|
359
|
-
color: "var(--color-text-primary)",
|
|
360
|
-
fontSize: "var(--font-size-body-md)",
|
|
361
|
-
resize: "vertical",
|
|
362
|
-
outline: "none"
|
|
363
|
-
},
|
|
364
|
-
onKeyDown: (e) => {
|
|
365
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) && $();
|
|
366
|
-
}
|
|
367
|
-
}),
|
|
368
|
-
/* @__PURE__ */ S("div", {
|
|
369
|
-
style: {
|
|
370
|
-
display: "flex",
|
|
371
|
-
justifyContent: "space-between",
|
|
372
|
-
alignItems: "center",
|
|
373
|
-
marginTop: 8,
|
|
374
|
-
flexWrap: "wrap",
|
|
375
|
-
gap: 8
|
|
376
|
-
},
|
|
377
|
-
children: [/* @__PURE__ */ x("span", {
|
|
378
|
-
style: {
|
|
379
|
-
fontSize: "var(--font-size-body-sm)",
|
|
380
|
-
color: "var(--color-text-muted)"
|
|
381
|
-
},
|
|
382
|
-
children: o("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate")
|
|
383
|
-
}), /* @__PURE__ */ S("button", {
|
|
384
|
-
onClick: $,
|
|
385
|
-
disabled: !_.trim() || E,
|
|
386
|
-
style: {
|
|
387
|
-
display: "flex",
|
|
388
|
-
alignItems: "center",
|
|
389
|
-
gap: 8,
|
|
390
|
-
padding: "8px 16px",
|
|
391
|
-
borderRadius: "var(--radius-button)",
|
|
392
|
-
backgroundColor: "var(--color-action-primary-bg)",
|
|
393
|
-
color: "var(--color-action-primary-text)",
|
|
394
|
-
fontWeight: "var(--font-weight-medium)",
|
|
395
|
-
fontSize: "var(--font-size-body-sm)",
|
|
396
|
-
border: "none",
|
|
397
|
-
cursor: !_.trim() || E ? "not-allowed" : "pointer",
|
|
398
|
-
opacity: !_.trim() || E ? .5 : 1
|
|
399
|
-
},
|
|
400
|
-
children: [E ? /* @__PURE__ */ x(m, {
|
|
401
|
-
size: 16,
|
|
402
|
-
className: "animate-spin"
|
|
403
|
-
}) : /* @__PURE__ */ x(h, { size: 16 }), o("bigconsole.insights.prompt.generateButton", "Generate Dashboard")]
|
|
404
|
-
})]
|
|
405
|
-
})
|
|
406
|
-
]
|
|
407
|
-
}),
|
|
408
|
-
O && /* @__PURE__ */ S("div", {
|
|
399
|
+
/* @__PURE__ */ T("header", {
|
|
400
|
+
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
401
|
+
children: [/* @__PURE__ */ w(ce, { intensity: "subtle" }), /* @__PURE__ */ w("div", {
|
|
402
|
+
style: { padding: "var(--space-pagePadding)" },
|
|
403
|
+
children: /* @__PURE__ */ T("div", {
|
|
409
404
|
style: {
|
|
410
405
|
display: "flex",
|
|
411
406
|
alignItems: "center",
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
marginBottom: "var(--space-sectionGap)",
|
|
416
|
-
borderRadius: "var(--radius-card)",
|
|
417
|
-
border: "1px solid var(--color-status-error-text)",
|
|
418
|
-
backgroundColor: "var(--color-bg-surface)",
|
|
419
|
-
color: "var(--color-status-error-text)",
|
|
420
|
-
fontSize: "var(--font-size-body-sm)"
|
|
407
|
+
gap: "var(--space-formGap)",
|
|
408
|
+
flexWrap: "wrap",
|
|
409
|
+
minWidth: 0
|
|
421
410
|
},
|
|
422
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ w("div", {
|
|
423
412
|
style: {
|
|
424
413
|
display: "flex",
|
|
414
|
+
height: "var(--size-controlHeight-lg)",
|
|
415
|
+
width: "var(--size-controlHeight-lg)",
|
|
416
|
+
flexShrink: 0,
|
|
425
417
|
alignItems: "center",
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}), /* @__PURE__ */ x("button", {
|
|
430
|
-
onClick: () => k(null),
|
|
431
|
-
style: {
|
|
432
|
-
background: "none",
|
|
433
|
-
border: "none",
|
|
434
|
-
color: "var(--color-status-error-text)",
|
|
435
|
-
cursor: "pointer",
|
|
436
|
-
fontSize: "var(--font-size-body-md)",
|
|
437
|
-
padding: "0 4px"
|
|
418
|
+
justifyContent: "center",
|
|
419
|
+
borderRadius: "var(--radius-card)",
|
|
420
|
+
backgroundColor: "var(--color-action-primary-bg)"
|
|
438
421
|
},
|
|
439
|
-
|
|
440
|
-
|
|
422
|
+
children: /* @__PURE__ */ w(v, { style: {
|
|
423
|
+
height: "var(--size-icon-lg)",
|
|
424
|
+
width: "var(--size-icon-lg)",
|
|
425
|
+
color: "var(--color-action-primary-text)"
|
|
426
|
+
} })
|
|
427
|
+
}), /* @__PURE__ */ T("div", {
|
|
428
|
+
style: { minWidth: 0 },
|
|
429
|
+
children: [/* @__PURE__ */ w("h1", {
|
|
430
|
+
className: "m-0 text-2xl font-bold text-text-primary",
|
|
431
|
+
children: /* @__PURE__ */ w(ue, { children: l("bigconsole.insights.header.title", "AI Insights") })
|
|
432
|
+
}), /* @__PURE__ */ w("p", {
|
|
433
|
+
className: "m-0 text-sm text-text-secondary",
|
|
434
|
+
children: l("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
435
|
+
})]
|
|
441
436
|
})]
|
|
437
|
+
})
|
|
438
|
+
})]
|
|
439
|
+
}),
|
|
440
|
+
/* @__PURE__ */ T("div", {
|
|
441
|
+
style: { padding: "var(--space-pagePadding)" },
|
|
442
|
+
children: [/* @__PURE__ */ w(fe, {
|
|
443
|
+
className: "mb-[var(--space-sectionGap)]",
|
|
444
|
+
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."
|
|
445
|
+
}), /* @__PURE__ */ T(r, { children: [
|
|
446
|
+
N && /* @__PURE__ */ w(n, {
|
|
447
|
+
headingLevel: 2,
|
|
448
|
+
tone: "danger",
|
|
449
|
+
padding: "compact",
|
|
450
|
+
title: "That request did not go through",
|
|
451
|
+
description: N,
|
|
452
|
+
icon: /* @__PURE__ */ w(p, { className: "h-icon-sm w-icon-sm" }),
|
|
453
|
+
"data-testid": "insights-error",
|
|
454
|
+
actions: /* @__PURE__ */ w("button", {
|
|
455
|
+
type: "button",
|
|
456
|
+
onClick: () => P(null),
|
|
457
|
+
"aria-label": l("bigconsole.insights.error.dismiss", "Dismiss error"),
|
|
458
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
459
|
+
style: O,
|
|
460
|
+
children: "Dismiss"
|
|
461
|
+
})
|
|
442
462
|
}),
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
463
|
+
/* @__PURE__ */ w(n, {
|
|
464
|
+
id: "insights-prompt",
|
|
465
|
+
emphasis: "primary",
|
|
466
|
+
headingLevel: 2,
|
|
467
|
+
title: "Describe your dashboard",
|
|
468
|
+
description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
|
|
469
|
+
icon: /* @__PURE__ */ w(v, { className: "h-icon-sm w-icon-sm" }),
|
|
470
|
+
"data-testid": "insights-prompt",
|
|
471
|
+
children: /* @__PURE__ */ T("div", {
|
|
446
472
|
style: {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
marginBottom: 12
|
|
473
|
+
display: "flex",
|
|
474
|
+
flexDirection: "column",
|
|
475
|
+
gap: "var(--space-controlGap)"
|
|
451
476
|
},
|
|
452
|
-
children:
|
|
453
|
-
|
|
477
|
+
children: [
|
|
478
|
+
/* @__PURE__ */ w("label", {
|
|
479
|
+
htmlFor: "prompt-input",
|
|
480
|
+
style: {
|
|
481
|
+
display: "block",
|
|
482
|
+
fontSize: "var(--font-size-body-sm)",
|
|
483
|
+
fontWeight: "var(--font-weight-medium)",
|
|
484
|
+
color: "var(--color-text-primary)"
|
|
485
|
+
},
|
|
486
|
+
children: l("bigconsole.insights.prompt.label", "Your prompt")
|
|
487
|
+
}),
|
|
488
|
+
/* @__PURE__ */ w("textarea", {
|
|
489
|
+
id: "prompt-input",
|
|
490
|
+
value: b,
|
|
491
|
+
onChange: (e) => x(e.target.value),
|
|
492
|
+
placeholder: l("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
493
|
+
rows: 3,
|
|
494
|
+
maxLength: 2e3,
|
|
495
|
+
className: t,
|
|
496
|
+
style: {
|
|
497
|
+
width: "100%",
|
|
498
|
+
maxWidth: "100%",
|
|
499
|
+
padding: "var(--space-controlGap) var(--space-formGap)",
|
|
500
|
+
borderRadius: "var(--radius-input)",
|
|
501
|
+
border: "1px solid var(--color-border-default)",
|
|
502
|
+
backgroundColor: "var(--color-bg-canvas)",
|
|
503
|
+
color: "var(--color-text-primary)",
|
|
504
|
+
fontSize: "var(--font-size-body-md)",
|
|
505
|
+
resize: "vertical"
|
|
506
|
+
},
|
|
507
|
+
onKeyDown: (e) => {
|
|
508
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && Ne();
|
|
509
|
+
}
|
|
510
|
+
}),
|
|
511
|
+
/* @__PURE__ */ T("div", {
|
|
512
|
+
style: {
|
|
513
|
+
display: "flex",
|
|
514
|
+
alignItems: "center",
|
|
515
|
+
flexWrap: "wrap",
|
|
516
|
+
gap: "var(--space-controlGap)",
|
|
517
|
+
borderTop: "1px solid var(--color-border-subtle)",
|
|
518
|
+
paddingTop: "var(--space-controlGap)"
|
|
519
|
+
},
|
|
520
|
+
children: [/* @__PURE__ */ T("span", {
|
|
521
|
+
style: {
|
|
522
|
+
flex: "1 1 12rem",
|
|
523
|
+
minWidth: 0,
|
|
524
|
+
fontSize: "var(--font-size-body-sm)",
|
|
525
|
+
color: "var(--color-text-muted)"
|
|
526
|
+
},
|
|
527
|
+
children: [
|
|
528
|
+
l("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
|
|
529
|
+
" · ",
|
|
530
|
+
b.length,
|
|
531
|
+
"/2000"
|
|
532
|
+
]
|
|
533
|
+
}), /* @__PURE__ */ T("button", {
|
|
534
|
+
type: "button",
|
|
535
|
+
onClick: Ne,
|
|
536
|
+
disabled: !b.trim() || D,
|
|
537
|
+
className: t,
|
|
538
|
+
style: {
|
|
539
|
+
...k,
|
|
540
|
+
marginLeft: "auto",
|
|
541
|
+
cursor: !b.trim() || D ? "not-allowed" : "pointer",
|
|
542
|
+
opacity: !b.trim() || D ? .5 : 1
|
|
543
|
+
},
|
|
544
|
+
children: [D ? /* @__PURE__ */ w(_, {
|
|
545
|
+
size: 16,
|
|
546
|
+
className: "animate-spin",
|
|
547
|
+
"aria-hidden": "true"
|
|
548
|
+
}) : /* @__PURE__ */ w(v, {
|
|
549
|
+
size: 16,
|
|
550
|
+
"aria-hidden": "true"
|
|
551
|
+
}), l("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
552
|
+
})]
|
|
553
|
+
})
|
|
554
|
+
]
|
|
555
|
+
})
|
|
556
|
+
}),
|
|
557
|
+
Me.length > 0 && /* @__PURE__ */ w(n, {
|
|
558
|
+
emphasis: "muted",
|
|
559
|
+
headingLevel: 2,
|
|
560
|
+
title: l("bigconsole.insights.suggestions.heading", "Starting points"),
|
|
561
|
+
description: "Pick one to drop it into the prompt box above, then edit it before generating.",
|
|
562
|
+
icon: /* @__PURE__ */ w(re, { className: "h-icon-sm w-icon-sm" }),
|
|
563
|
+
"data-testid": "insights-suggestions",
|
|
564
|
+
children: /* @__PURE__ */ w("div", {
|
|
454
565
|
style: {
|
|
455
566
|
display: "grid",
|
|
456
|
-
gridTemplateColumns: "repeat(auto-fill, minmax(min(
|
|
457
|
-
gap:
|
|
567
|
+
gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
|
|
568
|
+
gap: "var(--space-controlGap)"
|
|
458
569
|
},
|
|
459
|
-
children:
|
|
460
|
-
|
|
570
|
+
children: Me.map((e) => /* @__PURE__ */ T("button", {
|
|
571
|
+
type: "button",
|
|
572
|
+
onClick: () => Re(e.prompt),
|
|
573
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
461
574
|
style: {
|
|
462
575
|
textAlign: "left",
|
|
463
|
-
|
|
576
|
+
minWidth: 0,
|
|
577
|
+
minHeight: "var(--size-controlHeight-lg)",
|
|
578
|
+
padding: "var(--space-controlGap)",
|
|
464
579
|
borderRadius: "var(--radius-card)",
|
|
465
|
-
border: "1px solid var(--color-border)",
|
|
580
|
+
border: "1px solid var(--color-border-subtle)",
|
|
466
581
|
backgroundColor: "var(--color-bg-surface)",
|
|
467
582
|
cursor: "pointer"
|
|
468
583
|
},
|
|
469
584
|
children: [
|
|
470
|
-
/* @__PURE__ */
|
|
585
|
+
/* @__PURE__ */ w("span", {
|
|
471
586
|
style: {
|
|
587
|
+
display: "block",
|
|
472
588
|
fontWeight: "var(--font-weight-medium)",
|
|
473
589
|
fontSize: "var(--font-size-body-sm)",
|
|
474
590
|
color: "var(--color-text-primary)",
|
|
475
|
-
marginBottom:
|
|
591
|
+
marginBottom: "var(--space-iconGap)"
|
|
476
592
|
},
|
|
477
593
|
children: e.title
|
|
478
594
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
595
|
+
/* @__PURE__ */ w("span", {
|
|
480
596
|
style: {
|
|
597
|
+
display: "block",
|
|
481
598
|
fontSize: "var(--font-size-body-sm)",
|
|
482
599
|
color: "var(--color-text-secondary)",
|
|
483
600
|
lineHeight: 1.4
|
|
484
601
|
},
|
|
485
|
-
children: e.exampleDescription || e.prompt
|
|
602
|
+
children: e.exampleDescription || e.prompt
|
|
486
603
|
}),
|
|
487
|
-
/* @__PURE__ */
|
|
604
|
+
e.tags.length > 0 && /* @__PURE__ */ w("span", {
|
|
488
605
|
style: {
|
|
489
606
|
display: "flex",
|
|
490
|
-
gap:
|
|
491
|
-
marginTop:
|
|
607
|
+
gap: "var(--space-iconGap)",
|
|
608
|
+
marginTop: "var(--space-controlGap)",
|
|
492
609
|
flexWrap: "wrap"
|
|
493
610
|
},
|
|
494
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
495
|
-
style:
|
|
496
|
-
fontSize: 11,
|
|
497
|
-
padding: "2px 6px",
|
|
498
|
-
borderRadius: 4,
|
|
499
|
-
backgroundColor: "var(--color-bg-sunken)",
|
|
500
|
-
color: "var(--color-text-muted)"
|
|
501
|
-
},
|
|
611
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ w("span", {
|
|
612
|
+
style: j,
|
|
502
613
|
children: e
|
|
503
614
|
}, e))
|
|
504
615
|
})
|
|
505
616
|
]
|
|
506
617
|
}, e.id))
|
|
507
|
-
})]
|
|
508
|
-
}),
|
|
509
|
-
/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
|
|
510
|
-
style: {
|
|
511
|
-
fontSize: "var(--font-size-body-md)",
|
|
512
|
-
fontWeight: "var(--font-weight-semibold)",
|
|
513
|
-
color: "var(--color-text-primary)",
|
|
514
|
-
marginBottom: 12
|
|
515
|
-
},
|
|
516
|
-
children: o("bigconsole.insights.generations.heading", "Recent Generations")
|
|
517
|
-
}), ye && Z.length === 0 ? /* @__PURE__ */ S("div", {
|
|
518
|
-
style: {
|
|
519
|
-
textAlign: "center",
|
|
520
|
-
padding: 40,
|
|
521
|
-
color: "var(--color-text-muted)"
|
|
522
|
-
},
|
|
523
|
-
children: [/* @__PURE__ */ x(m, {
|
|
524
|
-
size: 24,
|
|
525
|
-
className: "animate-spin",
|
|
526
|
-
style: { margin: "0 auto 8px" }
|
|
527
|
-
}), /* @__PURE__ */ x("p", { children: o("bigconsole.insights.generations.loading", "Loading generations...") })]
|
|
528
|
-
}) : Z.length === 0 && !E ? /* @__PURE__ */ x(ce, {
|
|
529
|
-
treatment: "insight",
|
|
530
|
-
className: "border-border-seam",
|
|
531
|
-
children: /* @__PURE__ */ x(ue, {
|
|
532
|
-
illustration: "onboarding",
|
|
533
|
-
title: o("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
534
|
-
description: o("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
535
618
|
})
|
|
536
|
-
})
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
619
|
+
}),
|
|
620
|
+
/* @__PURE__ */ w(n, {
|
|
621
|
+
emphasis: "bare",
|
|
622
|
+
padding: "none",
|
|
623
|
+
headingLevel: 2,
|
|
624
|
+
title: l("bigconsole.insights.generations.heading", "Recent generations"),
|
|
625
|
+
description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
|
|
626
|
+
icon: /* @__PURE__ */ w(ne, { className: "h-icon-sm w-icon-sm" }),
|
|
627
|
+
meta: Z.length > 0 ? /* @__PURE__ */ T("span", {
|
|
628
|
+
style: j,
|
|
629
|
+
children: [
|
|
630
|
+
Z.length,
|
|
631
|
+
" generation",
|
|
632
|
+
Z.length === 1 ? "" : "s"
|
|
633
|
+
]
|
|
634
|
+
}) : void 0,
|
|
635
|
+
"data-testid": "insights-generations",
|
|
636
|
+
children: we && Z.length === 0 ? /* @__PURE__ */ w(n, {
|
|
637
|
+
emphasis: "muted",
|
|
638
|
+
headingLevel: 3,
|
|
639
|
+
"aria-label": "Loading generations",
|
|
640
|
+
className: "min-h-[10rem]",
|
|
641
|
+
"data-testid": "insights-generations-loading",
|
|
642
|
+
children: /* @__PURE__ */ T("div", {
|
|
550
643
|
style: {
|
|
551
644
|
display: "flex",
|
|
645
|
+
minHeight: "8rem",
|
|
646
|
+
flexDirection: "column",
|
|
552
647
|
alignItems: "center",
|
|
553
|
-
|
|
554
|
-
|
|
648
|
+
justifyContent: "center",
|
|
649
|
+
gap: "var(--space-controlGap)",
|
|
650
|
+
color: "var(--color-text-muted)"
|
|
555
651
|
},
|
|
556
|
-
children: [
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
children: o("bigconsole.insights.generations.generating", "Generating...")
|
|
565
|
-
}),
|
|
566
|
-
/* @__PURE__ */ x("span", {
|
|
567
|
-
style: {
|
|
568
|
-
fontSize: 11,
|
|
569
|
-
color: "var(--color-text-muted)",
|
|
570
|
-
padding: "2px 6px",
|
|
571
|
-
borderRadius: 4,
|
|
572
|
-
backgroundColor: "var(--color-bg-sunken)"
|
|
573
|
-
},
|
|
574
|
-
children: T("PROCESSING", o)
|
|
575
|
-
})
|
|
576
|
-
]
|
|
652
|
+
children: [/* @__PURE__ */ w(_, {
|
|
653
|
+
size: 24,
|
|
654
|
+
className: "animate-spin",
|
|
655
|
+
"aria-hidden": "true"
|
|
656
|
+
}), /* @__PURE__ */ w("p", {
|
|
657
|
+
style: { fontSize: "var(--font-size-body-sm)" },
|
|
658
|
+
children: l("bigconsole.insights.generations.loading", "Loading generations…")
|
|
659
|
+
})]
|
|
577
660
|
})
|
|
578
|
-
})
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
661
|
+
}) : Z.length === 0 && !D ? /* @__PURE__ */ w(le, {
|
|
662
|
+
treatment: "insight",
|
|
663
|
+
className: "border-[var(--color-border-seam)]",
|
|
664
|
+
children: /* @__PURE__ */ w(de, {
|
|
665
|
+
illustration: "onboarding",
|
|
666
|
+
title: l("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
667
|
+
description: l("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
668
|
+
})
|
|
669
|
+
}) : /* @__PURE__ */ T("div", {
|
|
670
|
+
className: "flex flex-col gap-list-gap",
|
|
671
|
+
children: [D && !Y && /* @__PURE__ */ w(n, {
|
|
672
|
+
emphasis: "muted",
|
|
673
|
+
tone: "info",
|
|
674
|
+
padding: "compact",
|
|
675
|
+
headingLevel: 3,
|
|
676
|
+
title: "Sending your prompt…",
|
|
677
|
+
description: "The new generation appears here as soon as the backend accepts it.",
|
|
678
|
+
icon: /* @__PURE__ */ w(_, { className: "h-icon-sm w-icon-sm animate-spin" }),
|
|
679
|
+
"data-testid": "insights-generation-pending"
|
|
680
|
+
}), Z.map((e) => {
|
|
681
|
+
let r = e.generatedSpec, i = F.has(e.id), a = E.includes(e.status);
|
|
682
|
+
return /* @__PURE__ */ T(n, {
|
|
683
|
+
emphasis: "standard",
|
|
684
|
+
padding: "compact",
|
|
685
|
+
headingLevel: 3,
|
|
686
|
+
title: r?.name || (a ? l("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
|
|
687
|
+
meta: /* @__PURE__ */ w(Se, { status: e.status }),
|
|
688
|
+
description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
|
|
689
|
+
"data-testid": "insights-generation-card",
|
|
690
|
+
bodyClassName: "flex flex-col gap-control-gap",
|
|
598
691
|
children: [
|
|
599
|
-
/* @__PURE__ */
|
|
692
|
+
r && /* @__PURE__ */ T("div", {
|
|
600
693
|
style: {
|
|
601
694
|
display: "flex",
|
|
602
|
-
|
|
603
|
-
gap:
|
|
604
|
-
marginBottom: 4,
|
|
605
|
-
minWidth: 0
|
|
695
|
+
flexWrap: "wrap",
|
|
696
|
+
gap: "var(--space-iconGap)"
|
|
606
697
|
},
|
|
607
698
|
children: [
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
overflow: "hidden",
|
|
616
|
-
textOverflow: "ellipsis",
|
|
617
|
-
whiteSpace: "nowrap"
|
|
618
|
-
},
|
|
619
|
-
children: e.generatedSpec?.name || o("bigconsole.insights.generations.generating", "Generating...")
|
|
699
|
+
/* @__PURE__ */ T("span", {
|
|
700
|
+
style: j,
|
|
701
|
+
children: [
|
|
702
|
+
L(r),
|
|
703
|
+
" widget",
|
|
704
|
+
L(r) === 1 ? "" : "s"
|
|
705
|
+
]
|
|
620
706
|
}),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
style:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
707
|
+
/* @__PURE__ */ T("span", {
|
|
708
|
+
style: j,
|
|
709
|
+
children: [
|
|
710
|
+
r.pages.length,
|
|
711
|
+
" page",
|
|
712
|
+
r.pages.length === 1 ? "" : "s"
|
|
713
|
+
]
|
|
714
|
+
}),
|
|
715
|
+
/* @__PURE__ */ T("span", {
|
|
716
|
+
style: I(r.overallConfidence),
|
|
717
|
+
children: [Math.round(r.overallConfidence * 100), "% confidence"]
|
|
630
718
|
})
|
|
631
719
|
]
|
|
632
720
|
}),
|
|
633
|
-
/* @__PURE__ */
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
721
|
+
e.errorMessage && /* @__PURE__ */ w(n, {
|
|
722
|
+
headingLevel: 4,
|
|
723
|
+
tone: "danger",
|
|
724
|
+
padding: "compact",
|
|
725
|
+
title: "Generation failed",
|
|
726
|
+
description: e.errorMessage,
|
|
727
|
+
icon: /* @__PURE__ */ w(p, { className: "h-icon-sm w-icon-sm" })
|
|
640
728
|
}),
|
|
641
|
-
|
|
642
|
-
style: {
|
|
643
|
-
fontSize: 11,
|
|
644
|
-
color: "var(--color-text-muted)"
|
|
645
|
-
},
|
|
646
|
-
children: o("bigconsole.insights.generations.summary", "{{widgets}} widgets across {{pages}} page(s) · {{confidence}}% confidence", {
|
|
647
|
-
widgets: e.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
|
|
648
|
-
pages: e.generatedSpec.pages.length,
|
|
649
|
-
confidence: Math.round(e.generatedSpec.overallConfidence * 100)
|
|
650
|
-
})
|
|
651
|
-
}),
|
|
652
|
-
e.errorMessage && /* @__PURE__ */ S("div", {
|
|
653
|
-
style: {
|
|
654
|
-
display: "flex",
|
|
655
|
-
alignItems: "center",
|
|
656
|
-
gap: 4,
|
|
657
|
-
marginTop: 4,
|
|
658
|
-
fontSize: "var(--font-size-body-sm)",
|
|
659
|
-
color: "var(--color-status-error-text)"
|
|
660
|
-
},
|
|
661
|
-
children: [/* @__PURE__ */ x(u, { size: 14 }), e.errorMessage]
|
|
662
|
-
})
|
|
663
|
-
]
|
|
664
|
-
}), /* @__PURE__ */ S("div", {
|
|
665
|
-
style: {
|
|
666
|
-
display: "flex",
|
|
667
|
-
gap: 8,
|
|
668
|
-
flexWrap: "wrap"
|
|
669
|
-
},
|
|
670
|
-
children: [
|
|
671
|
-
C.includes(e.status) && /* @__PURE__ */ S("button", {
|
|
672
|
-
onClick: () => {
|
|
673
|
-
i("medium"), Ce(e.id);
|
|
674
|
-
},
|
|
675
|
-
disabled: A.has(e.id),
|
|
676
|
-
title: o("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
|
|
677
|
-
style: {
|
|
678
|
-
display: "flex",
|
|
679
|
-
alignItems: "center",
|
|
680
|
-
gap: 4,
|
|
681
|
-
padding: "6px 12px",
|
|
682
|
-
borderRadius: "var(--radius-button)",
|
|
683
|
-
border: "1px solid var(--color-border)",
|
|
684
|
-
backgroundColor: "transparent",
|
|
685
|
-
color: "var(--color-status-warning-text)",
|
|
686
|
-
fontSize: "var(--font-size-body-sm)",
|
|
687
|
-
cursor: A.has(e.id) ? "wait" : "pointer"
|
|
688
|
-
},
|
|
689
|
-
children: [
|
|
690
|
-
/* @__PURE__ */ x(ee, { size: 14 }),
|
|
691
|
-
" ",
|
|
692
|
-
o("bigconsole.insights.actions.cancel", "Cancel")
|
|
693
|
-
]
|
|
694
|
-
}),
|
|
695
|
-
e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
|
|
696
|
-
onClick: () => N(e),
|
|
697
|
-
title: o("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
698
|
-
style: {
|
|
699
|
-
display: "flex",
|
|
700
|
-
alignItems: "center",
|
|
701
|
-
gap: 4,
|
|
702
|
-
padding: "6px 12px",
|
|
703
|
-
borderRadius: "var(--radius-button)",
|
|
704
|
-
border: "1px solid var(--color-border)",
|
|
705
|
-
backgroundColor: "transparent",
|
|
706
|
-
color: "var(--color-text-primary)",
|
|
707
|
-
fontSize: "var(--font-size-body-sm)",
|
|
708
|
-
cursor: "pointer"
|
|
709
|
-
},
|
|
710
|
-
children: [
|
|
711
|
-
/* @__PURE__ */ x(te, { size: 14 }),
|
|
712
|
-
" ",
|
|
713
|
-
o("bigconsole.insights.actions.preview", "Preview")
|
|
714
|
-
]
|
|
715
|
-
}),
|
|
716
|
-
e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
|
|
717
|
-
onClick: () => {
|
|
718
|
-
F(e), L("");
|
|
719
|
-
},
|
|
720
|
-
title: o("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
721
|
-
style: {
|
|
722
|
-
display: "flex",
|
|
723
|
-
alignItems: "center",
|
|
724
|
-
gap: 4,
|
|
725
|
-
padding: "6px 12px",
|
|
726
|
-
borderRadius: "var(--radius-button)",
|
|
727
|
-
border: "1px solid var(--color-border)",
|
|
728
|
-
backgroundColor: "transparent",
|
|
729
|
-
color: "var(--color-text-primary)",
|
|
730
|
-
fontSize: "var(--font-size-body-sm)",
|
|
731
|
-
cursor: "pointer"
|
|
732
|
-
},
|
|
733
|
-
children: [
|
|
734
|
-
/* @__PURE__ */ x(g, { size: 14 }),
|
|
735
|
-
" ",
|
|
736
|
-
o("bigconsole.insights.actions.refine", "Refine")
|
|
737
|
-
]
|
|
738
|
-
}),
|
|
739
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
|
|
740
|
-
onClick: () => {
|
|
741
|
-
i("medium"), we(e.id);
|
|
742
|
-
},
|
|
743
|
-
disabled: A.has(e.id),
|
|
744
|
-
title: o("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
|
|
729
|
+
/* @__PURE__ */ T("div", {
|
|
745
730
|
style: {
|
|
746
731
|
display: "flex",
|
|
732
|
+
flexWrap: "wrap",
|
|
747
733
|
alignItems: "center",
|
|
748
|
-
gap:
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
border: "1px solid var(--color-border)",
|
|
752
|
-
backgroundColor: "transparent",
|
|
753
|
-
color: "var(--color-text-primary)",
|
|
754
|
-
fontSize: "var(--font-size-body-sm)",
|
|
755
|
-
cursor: A.has(e.id) ? "wait" : "pointer"
|
|
734
|
+
gap: "var(--space-controlGap)",
|
|
735
|
+
borderTop: "1px solid var(--color-border-subtle)",
|
|
736
|
+
paddingTop: "var(--space-controlGap)"
|
|
756
737
|
},
|
|
757
738
|
children: [
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
|
|
760
|
-
|
|
739
|
+
a && /* @__PURE__ */ T("button", {
|
|
740
|
+
type: "button",
|
|
741
|
+
onClick: () => {
|
|
742
|
+
s("medium"), Fe(e.id);
|
|
743
|
+
},
|
|
744
|
+
disabled: i,
|
|
745
|
+
title: l("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
|
|
746
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
747
|
+
style: {
|
|
748
|
+
...xe,
|
|
749
|
+
cursor: i ? "wait" : "pointer"
|
|
750
|
+
},
|
|
751
|
+
children: [
|
|
752
|
+
/* @__PURE__ */ w(ee, {
|
|
753
|
+
size: 14,
|
|
754
|
+
"aria-hidden": "true"
|
|
755
|
+
}),
|
|
756
|
+
" ",
|
|
757
|
+
l("bigconsole.insights.actions.cancel", "Cancel")
|
|
758
|
+
]
|
|
761
759
|
}),
|
|
762
|
-
" ",
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
760
|
+
e.status === "COMPLETED" && r && /* @__PURE__ */ T("button", {
|
|
761
|
+
type: "button",
|
|
762
|
+
onClick: () => B(e),
|
|
763
|
+
title: l("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
764
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
765
|
+
style: O,
|
|
766
|
+
children: [
|
|
767
|
+
/* @__PURE__ */ w(te, {
|
|
768
|
+
size: 14,
|
|
769
|
+
"aria-hidden": "true"
|
|
770
|
+
}),
|
|
771
|
+
" ",
|
|
772
|
+
l("bigconsole.insights.actions.preview", "Preview")
|
|
773
|
+
]
|
|
774
|
+
}),
|
|
775
|
+
e.status === "COMPLETED" && r && /* @__PURE__ */ T("button", {
|
|
776
|
+
type: "button",
|
|
777
|
+
onClick: () => {
|
|
778
|
+
H(e), W("");
|
|
779
|
+
},
|
|
780
|
+
title: l("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
781
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
782
|
+
style: O,
|
|
783
|
+
children: [
|
|
784
|
+
/* @__PURE__ */ w(y, {
|
|
785
|
+
size: 14,
|
|
786
|
+
"aria-hidden": "true"
|
|
787
|
+
}),
|
|
788
|
+
" ",
|
|
789
|
+
l("bigconsole.insights.actions.refine", "Refine")
|
|
790
|
+
]
|
|
791
|
+
}),
|
|
792
|
+
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ T("button", {
|
|
793
|
+
type: "button",
|
|
794
|
+
onClick: () => {
|
|
795
|
+
s("medium"), Ie(e.id);
|
|
796
|
+
},
|
|
797
|
+
disabled: i,
|
|
798
|
+
title: l("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
|
|
799
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
800
|
+
style: {
|
|
801
|
+
...O,
|
|
802
|
+
cursor: i ? "wait" : "pointer"
|
|
803
|
+
},
|
|
804
|
+
children: [
|
|
805
|
+
/* @__PURE__ */ w(ie, {
|
|
806
|
+
size: 14,
|
|
807
|
+
className: i ? "animate-spin" : "",
|
|
808
|
+
"aria-hidden": "true"
|
|
809
|
+
}),
|
|
810
|
+
" ",
|
|
811
|
+
l("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
812
|
+
]
|
|
813
|
+
}),
|
|
814
|
+
/* @__PURE__ */ T("div", {
|
|
815
|
+
style: {
|
|
816
|
+
display: "flex",
|
|
817
|
+
flexWrap: "wrap",
|
|
818
|
+
alignItems: "center",
|
|
819
|
+
gap: "var(--space-controlGap)",
|
|
820
|
+
marginLeft: "auto"
|
|
821
|
+
},
|
|
822
|
+
children: [
|
|
823
|
+
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ T("button", {
|
|
824
|
+
type: "button",
|
|
825
|
+
onClick: () => Q(e.id),
|
|
826
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
827
|
+
style: k,
|
|
828
|
+
children: [
|
|
829
|
+
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
830
|
+
" ",
|
|
831
|
+
/* @__PURE__ */ w(m, {
|
|
832
|
+
size: 14,
|
|
833
|
+
"aria-hidden": "true"
|
|
834
|
+
})
|
|
835
|
+
]
|
|
836
|
+
}),
|
|
837
|
+
e.dashboardId && /* @__PURE__ */ T("button", {
|
|
838
|
+
type: "button",
|
|
839
|
+
onClick: () => h(`/dashboards/${e.dashboardId ?? ""}`),
|
|
840
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
841
|
+
style: O,
|
|
842
|
+
children: [
|
|
843
|
+
l("bigconsole.insights.actions.viewDashboard", "View dashboard"),
|
|
844
|
+
" ",
|
|
845
|
+
/* @__PURE__ */ w(m, {
|
|
846
|
+
size: 14,
|
|
847
|
+
"aria-hidden": "true"
|
|
848
|
+
})
|
|
849
|
+
]
|
|
850
|
+
}),
|
|
851
|
+
/* @__PURE__ */ w("button", {
|
|
852
|
+
type: "button",
|
|
853
|
+
onClick: () => {
|
|
854
|
+
s("medium"), Pe(e.id);
|
|
855
|
+
},
|
|
856
|
+
title: l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
857
|
+
"aria-label": l("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
858
|
+
className: t,
|
|
859
|
+
style: A,
|
|
860
|
+
children: /* @__PURE__ */ w(ae, {
|
|
861
|
+
size: 14,
|
|
862
|
+
"aria-hidden": "true"
|
|
863
|
+
})
|
|
864
|
+
})
|
|
865
|
+
]
|
|
866
|
+
})
|
|
804
867
|
]
|
|
805
|
-
}),
|
|
806
|
-
/* @__PURE__ */ x("button", {
|
|
807
|
-
onClick: () => {
|
|
808
|
-
i("medium"), Se(e.id);
|
|
809
|
-
},
|
|
810
|
-
title: o("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
811
|
-
style: {
|
|
812
|
-
display: "flex",
|
|
813
|
-
alignItems: "center",
|
|
814
|
-
padding: 6,
|
|
815
|
-
borderRadius: "var(--radius-button)",
|
|
816
|
-
border: "1px solid var(--color-border)",
|
|
817
|
-
backgroundColor: "transparent",
|
|
818
|
-
color: "var(--color-text-muted)",
|
|
819
|
-
cursor: "pointer"
|
|
820
|
-
},
|
|
821
|
-
children: /* @__PURE__ */ x(re, { size: 14 })
|
|
822
868
|
})
|
|
823
869
|
]
|
|
824
|
-
})
|
|
825
|
-
})
|
|
826
|
-
}
|
|
827
|
-
})
|
|
828
|
-
]
|
|
870
|
+
}, e.id);
|
|
871
|
+
})]
|
|
872
|
+
})
|
|
873
|
+
})
|
|
874
|
+
] })]
|
|
829
875
|
}),
|
|
830
|
-
|
|
876
|
+
z && $ && /* @__PURE__ */ w("div", {
|
|
831
877
|
role: "dialog",
|
|
832
878
|
"aria-modal": "true",
|
|
833
|
-
"aria-label":
|
|
834
|
-
onClick: () =>
|
|
879
|
+
"aria-label": l("bigconsole.insights.preview.ariaLabel", "Generation preview"),
|
|
880
|
+
onClick: () => B(null),
|
|
835
881
|
style: {
|
|
836
882
|
position: "fixed",
|
|
837
883
|
inset: 0,
|
|
@@ -842,110 +888,173 @@ var E = o(function() {
|
|
|
842
888
|
justifyContent: "center",
|
|
843
889
|
padding: "var(--space-pagePadding)"
|
|
844
890
|
},
|
|
845
|
-
children: /* @__PURE__ */
|
|
891
|
+
children: /* @__PURE__ */ T("div", {
|
|
846
892
|
onClick: (e) => e.stopPropagation(),
|
|
847
893
|
style: {
|
|
894
|
+
display: "flex",
|
|
895
|
+
flexDirection: "column",
|
|
896
|
+
minHeight: 0,
|
|
848
897
|
width: "min(640px, 100%)",
|
|
849
|
-
maxHeight: "
|
|
850
|
-
overflowY: "auto",
|
|
898
|
+
maxHeight: "calc(100dvh - 2 * var(--space-pagePadding))",
|
|
851
899
|
backgroundColor: "var(--color-bg-surface)",
|
|
852
900
|
borderRadius: "var(--radius-card)",
|
|
853
|
-
border: "1px solid var(--color-border)",
|
|
854
|
-
boxShadow: "var(--shadow-elevation-3)"
|
|
855
|
-
padding: "var(--space-cardPadding)"
|
|
901
|
+
border: "1px solid var(--color-border-default)",
|
|
902
|
+
boxShadow: "var(--shadow-elevation-3)"
|
|
856
903
|
},
|
|
857
904
|
children: [
|
|
858
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ T("div", {
|
|
859
906
|
style: {
|
|
860
907
|
display: "flex",
|
|
861
908
|
justifyContent: "space-between",
|
|
862
909
|
alignItems: "flex-start",
|
|
863
|
-
gap:
|
|
864
|
-
|
|
910
|
+
gap: "var(--space-controlGap)",
|
|
911
|
+
padding: "var(--space-cardPadding)",
|
|
912
|
+
borderBottom: "1px solid var(--color-border-subtle)"
|
|
865
913
|
},
|
|
866
|
-
children: [/* @__PURE__ */
|
|
914
|
+
children: [/* @__PURE__ */ T("div", {
|
|
867
915
|
style: { minWidth: 0 },
|
|
868
|
-
children: [/* @__PURE__ */
|
|
916
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
869
917
|
style: {
|
|
870
918
|
fontSize: "var(--font-size-heading-h4)",
|
|
871
|
-
fontWeight: "var(--font-weight-semibold)"
|
|
919
|
+
fontWeight: "var(--font-weight-semibold)",
|
|
920
|
+
color: "var(--color-text-primary)"
|
|
872
921
|
},
|
|
873
|
-
children:
|
|
874
|
-
}),
|
|
922
|
+
children: $.name
|
|
923
|
+
}), $.description && /* @__PURE__ */ w("p", {
|
|
875
924
|
style: {
|
|
876
925
|
fontSize: "var(--font-size-body-sm)",
|
|
877
|
-
color: "var(--color-text-
|
|
926
|
+
color: "var(--color-text-secondary)",
|
|
878
927
|
marginTop: 2
|
|
879
928
|
},
|
|
880
|
-
children:
|
|
929
|
+
children: $.description
|
|
881
930
|
})]
|
|
882
|
-
}), /* @__PURE__ */
|
|
883
|
-
|
|
884
|
-
|
|
931
|
+
}), /* @__PURE__ */ w("button", {
|
|
932
|
+
type: "button",
|
|
933
|
+
onClick: () => B(null),
|
|
934
|
+
"aria-label": l("bigconsole.insights.preview.close", "Close preview"),
|
|
935
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
885
936
|
style: {
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
borderRadius: "var(--radius-button)",
|
|
889
|
-
border: "none",
|
|
890
|
-
backgroundColor: "transparent",
|
|
891
|
-
color: "var(--color-text-muted)",
|
|
892
|
-
cursor: "pointer"
|
|
937
|
+
...A,
|
|
938
|
+
color: "var(--color-text-muted)"
|
|
893
939
|
},
|
|
894
|
-
children: /* @__PURE__ */
|
|
940
|
+
children: /* @__PURE__ */ w(oe, {
|
|
941
|
+
size: 18,
|
|
942
|
+
"aria-hidden": "true"
|
|
943
|
+
})
|
|
895
944
|
})]
|
|
896
945
|
}),
|
|
897
|
-
/* @__PURE__ */
|
|
946
|
+
/* @__PURE__ */ T("div", {
|
|
898
947
|
style: {
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
948
|
+
flex: "1 1 auto",
|
|
949
|
+
minHeight: 0,
|
|
950
|
+
overflowY: "auto",
|
|
951
|
+
padding: "var(--space-cardPadding)",
|
|
952
|
+
display: "flex",
|
|
953
|
+
flexDirection: "column",
|
|
954
|
+
gap: "var(--space-controlGap)"
|
|
902
955
|
},
|
|
903
|
-
children:
|
|
904
|
-
widgets: M.generatedSpec.pages.reduce((e, t) => e + t.widgets.length, 0),
|
|
905
|
-
pages: M.generatedSpec.pages.length,
|
|
906
|
-
confidence: Math.round(M.generatedSpec.overallConfidence * 100)
|
|
907
|
-
})
|
|
908
|
-
}),
|
|
909
|
-
M.generatedSpec.pages.map((e, t) => /* @__PURE__ */ S("div", {
|
|
910
|
-
style: { marginBottom: "var(--space-controlGap)" },
|
|
911
|
-
children: [/* @__PURE__ */ x("div", {
|
|
912
|
-
style: {
|
|
913
|
-
fontSize: "var(--font-size-body-sm)",
|
|
914
|
-
fontWeight: "var(--font-weight-medium)",
|
|
915
|
-
color: "var(--color-text-primary)",
|
|
916
|
-
marginBottom: 4
|
|
917
|
-
},
|
|
918
|
-
children: e.name
|
|
919
|
-
}), /* @__PURE__ */ x("div", {
|
|
956
|
+
children: [/* @__PURE__ */ T("div", {
|
|
920
957
|
style: {
|
|
921
958
|
display: "flex",
|
|
922
959
|
flexWrap: "wrap",
|
|
923
|
-
gap:
|
|
960
|
+
gap: "var(--space-iconGap)"
|
|
924
961
|
},
|
|
925
|
-
children:
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
962
|
+
children: [
|
|
963
|
+
/* @__PURE__ */ T("span", {
|
|
964
|
+
style: j,
|
|
965
|
+
children: [
|
|
966
|
+
L($),
|
|
967
|
+
" widget",
|
|
968
|
+
L($) === 1 ? "" : "s"
|
|
969
|
+
]
|
|
970
|
+
}),
|
|
971
|
+
/* @__PURE__ */ T("span", {
|
|
972
|
+
style: j,
|
|
973
|
+
children: [
|
|
974
|
+
$.pages.length,
|
|
975
|
+
" page",
|
|
976
|
+
$.pages.length === 1 ? "" : "s"
|
|
977
|
+
]
|
|
978
|
+
}),
|
|
979
|
+
/* @__PURE__ */ T("span", {
|
|
980
|
+
style: I($.overallConfidence),
|
|
981
|
+
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
982
|
+
})
|
|
983
|
+
]
|
|
984
|
+
}), $.pages.map((e, t) => /* @__PURE__ */ w(n, {
|
|
985
|
+
emphasis: "muted",
|
|
986
|
+
padding: "compact",
|
|
987
|
+
headingLevel: 3,
|
|
988
|
+
title: e.name,
|
|
989
|
+
meta: /* @__PURE__ */ T("span", {
|
|
990
|
+
style: j,
|
|
933
991
|
children: [
|
|
934
|
-
e.
|
|
935
|
-
"
|
|
936
|
-
e.
|
|
992
|
+
e.widgets.length,
|
|
993
|
+
" widget",
|
|
994
|
+
e.widgets.length === 1 ? "" : "s"
|
|
937
995
|
]
|
|
938
|
-
},
|
|
996
|
+
}),
|
|
997
|
+
children: /* @__PURE__ */ w("div", {
|
|
998
|
+
style: {
|
|
999
|
+
display: "flex",
|
|
1000
|
+
flexWrap: "wrap",
|
|
1001
|
+
gap: "var(--space-iconGap)"
|
|
1002
|
+
},
|
|
1003
|
+
children: e.widgets.map((e, t) => /* @__PURE__ */ T("span", {
|
|
1004
|
+
style: {
|
|
1005
|
+
...j,
|
|
1006
|
+
backgroundColor: "var(--color-bg-surface)",
|
|
1007
|
+
color: "var(--color-text-primary)"
|
|
1008
|
+
},
|
|
1009
|
+
children: [e.title, /* @__PURE__ */ w("span", {
|
|
1010
|
+
style: { color: "var(--color-text-muted)" },
|
|
1011
|
+
children: e.type
|
|
1012
|
+
})]
|
|
1013
|
+
}, t))
|
|
1014
|
+
})
|
|
1015
|
+
}, t))]
|
|
1016
|
+
}),
|
|
1017
|
+
/* @__PURE__ */ T("div", {
|
|
1018
|
+
style: {
|
|
1019
|
+
display: "flex",
|
|
1020
|
+
justifyContent: "flex-end",
|
|
1021
|
+
flexWrap: "wrap",
|
|
1022
|
+
gap: "var(--space-controlGap)",
|
|
1023
|
+
padding: "var(--space-cardPadding)",
|
|
1024
|
+
borderTop: "1px solid var(--color-border-subtle)"
|
|
1025
|
+
},
|
|
1026
|
+
children: [/* @__PURE__ */ w("button", {
|
|
1027
|
+
type: "button",
|
|
1028
|
+
onClick: () => B(null),
|
|
1029
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1030
|
+
style: O,
|
|
1031
|
+
children: "Close"
|
|
1032
|
+
}), z.status === "COMPLETED" && !z.dashboardId && /* @__PURE__ */ T("button", {
|
|
1033
|
+
type: "button",
|
|
1034
|
+
onClick: () => {
|
|
1035
|
+
let e = z.id;
|
|
1036
|
+
B(null), Q(e);
|
|
1037
|
+
},
|
|
1038
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1039
|
+
style: k,
|
|
1040
|
+
children: [
|
|
1041
|
+
l("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1042
|
+
" ",
|
|
1043
|
+
/* @__PURE__ */ w(m, {
|
|
1044
|
+
size: 14,
|
|
1045
|
+
"aria-hidden": "true"
|
|
1046
|
+
})
|
|
1047
|
+
]
|
|
939
1048
|
})]
|
|
940
|
-
}
|
|
1049
|
+
})
|
|
941
1050
|
]
|
|
942
1051
|
})
|
|
943
1052
|
}),
|
|
944
|
-
|
|
1053
|
+
V && /* @__PURE__ */ w("div", {
|
|
945
1054
|
role: "dialog",
|
|
946
1055
|
"aria-modal": "true",
|
|
947
|
-
"aria-label":
|
|
948
|
-
onClick: () =>
|
|
1056
|
+
"aria-label": l("bigconsole.insights.refine.ariaLabel", "Refine generation"),
|
|
1057
|
+
onClick: () => H(null),
|
|
949
1058
|
style: {
|
|
950
1059
|
position: "fixed",
|
|
951
1060
|
inset: 0,
|
|
@@ -956,90 +1065,128 @@ var E = o(function() {
|
|
|
956
1065
|
justifyContent: "center",
|
|
957
1066
|
padding: "var(--space-pagePadding)"
|
|
958
1067
|
},
|
|
959
|
-
children: /* @__PURE__ */
|
|
1068
|
+
children: /* @__PURE__ */ T("div", {
|
|
960
1069
|
onClick: (e) => e.stopPropagation(),
|
|
961
1070
|
style: {
|
|
1071
|
+
display: "flex",
|
|
1072
|
+
flexDirection: "column",
|
|
1073
|
+
minHeight: 0,
|
|
962
1074
|
width: "min(520px, 100%)",
|
|
1075
|
+
maxHeight: "calc(100dvh - 2 * var(--space-pagePadding))",
|
|
963
1076
|
backgroundColor: "var(--color-bg-surface)",
|
|
964
1077
|
borderRadius: "var(--radius-card)",
|
|
965
|
-
border: "1px solid var(--color-border)",
|
|
966
|
-
boxShadow: "var(--shadow-elevation-3)"
|
|
967
|
-
padding: "var(--space-cardPadding)"
|
|
1078
|
+
border: "1px solid var(--color-border-default)",
|
|
1079
|
+
boxShadow: "var(--shadow-elevation-3)"
|
|
968
1080
|
},
|
|
969
1081
|
children: [
|
|
970
|
-
/* @__PURE__ */
|
|
1082
|
+
/* @__PURE__ */ T("div", {
|
|
971
1083
|
style: {
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
marginBottom: 4
|
|
1084
|
+
padding: "var(--space-cardPadding)",
|
|
1085
|
+
borderBottom: "1px solid var(--color-border-subtle)"
|
|
975
1086
|
},
|
|
976
|
-
children:
|
|
1087
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
1088
|
+
style: {
|
|
1089
|
+
fontSize: "var(--font-size-heading-h4)",
|
|
1090
|
+
fontWeight: "var(--font-weight-semibold)",
|
|
1091
|
+
color: "var(--color-text-primary)"
|
|
1092
|
+
},
|
|
1093
|
+
children: l("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1094
|
+
}), /* @__PURE__ */ w("p", {
|
|
1095
|
+
style: {
|
|
1096
|
+
fontSize: "var(--font-size-body-sm)",
|
|
1097
|
+
color: "var(--color-text-secondary)",
|
|
1098
|
+
marginTop: 2
|
|
1099
|
+
},
|
|
1100
|
+
children: l("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1101
|
+
})]
|
|
977
1102
|
}),
|
|
978
|
-
/* @__PURE__ */
|
|
1103
|
+
/* @__PURE__ */ T("div", {
|
|
979
1104
|
style: {
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
1105
|
+
flex: "1 1 auto",
|
|
1106
|
+
minHeight: 0,
|
|
1107
|
+
overflowY: "auto",
|
|
1108
|
+
padding: "var(--space-cardPadding)",
|
|
1109
|
+
display: "flex",
|
|
1110
|
+
flexDirection: "column",
|
|
1111
|
+
gap: "var(--space-controlGap)"
|
|
983
1112
|
},
|
|
984
|
-
children:
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1113
|
+
children: [/* @__PURE__ */ w(n, {
|
|
1114
|
+
emphasis: "muted",
|
|
1115
|
+
padding: "compact",
|
|
1116
|
+
headingLevel: 3,
|
|
1117
|
+
title: V.generatedSpec?.name || "Current proposal",
|
|
1118
|
+
description: V.prompt.length > 240 ? `${V.prompt.slice(0, 240)}…` : V.prompt,
|
|
1119
|
+
icon: /* @__PURE__ */ w(v, { className: "h-icon-sm w-icon-sm" })
|
|
1120
|
+
}), /* @__PURE__ */ T("div", {
|
|
1121
|
+
style: {
|
|
1122
|
+
display: "flex",
|
|
1123
|
+
flexDirection: "column",
|
|
1124
|
+
gap: "var(--space-controlGap)"
|
|
1125
|
+
},
|
|
1126
|
+
children: [/* @__PURE__ */ w("label", {
|
|
1127
|
+
htmlFor: "refine-input",
|
|
1128
|
+
style: {
|
|
1129
|
+
display: "block",
|
|
1130
|
+
fontSize: "var(--font-size-body-sm)",
|
|
1131
|
+
fontWeight: "var(--font-weight-medium)",
|
|
1132
|
+
color: "var(--color-text-primary)"
|
|
1133
|
+
},
|
|
1134
|
+
children: "What should change?"
|
|
1135
|
+
}), /* @__PURE__ */ w("textarea", {
|
|
1136
|
+
id: "refine-input",
|
|
1137
|
+
value: U,
|
|
1138
|
+
onChange: (e) => W(e.target.value),
|
|
1139
|
+
maxLength: 2e3,
|
|
1140
|
+
rows: 4,
|
|
1141
|
+
placeholder: l("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
|
|
1142
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1143
|
+
style: {
|
|
1144
|
+
width: "100%",
|
|
1145
|
+
maxWidth: "100%",
|
|
1146
|
+
resize: "vertical",
|
|
1147
|
+
padding: "var(--space-controlGap) var(--space-formGap)",
|
|
1148
|
+
borderRadius: "var(--radius-input)",
|
|
1149
|
+
border: "1px solid var(--color-border-default)",
|
|
1150
|
+
backgroundColor: "var(--color-bg-canvas)",
|
|
1151
|
+
color: "var(--color-text-primary)",
|
|
1152
|
+
fontSize: "var(--font-size-body-md)"
|
|
1153
|
+
}
|
|
1154
|
+
})]
|
|
1155
|
+
})]
|
|
1003
1156
|
}),
|
|
1004
|
-
/* @__PURE__ */
|
|
1157
|
+
/* @__PURE__ */ T("div", {
|
|
1005
1158
|
style: {
|
|
1006
1159
|
display: "flex",
|
|
1007
1160
|
justifyContent: "flex-end",
|
|
1008
|
-
|
|
1009
|
-
|
|
1161
|
+
flexWrap: "wrap",
|
|
1162
|
+
gap: "var(--space-controlGap)",
|
|
1163
|
+
padding: "var(--space-cardPadding)",
|
|
1164
|
+
borderTop: "1px solid var(--color-border-subtle)"
|
|
1010
1165
|
},
|
|
1011
|
-
children: [/* @__PURE__ */
|
|
1012
|
-
|
|
1166
|
+
children: [/* @__PURE__ */ w("button", {
|
|
1167
|
+
type: "button",
|
|
1168
|
+
onClick: () => H(null),
|
|
1169
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1170
|
+
style: O,
|
|
1171
|
+
children: l("bigconsole.insights.actions.cancel", "Cancel")
|
|
1172
|
+
}), /* @__PURE__ */ T("button", {
|
|
1173
|
+
type: "button",
|
|
1174
|
+
onClick: () => void Le(),
|
|
1175
|
+
disabled: !U.trim() || F.has(V.id),
|
|
1176
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1013
1177
|
style: {
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
backgroundColor: "transparent",
|
|
1018
|
-
color: "var(--color-text-primary)",
|
|
1019
|
-
fontSize: "var(--font-size-body-sm)",
|
|
1020
|
-
cursor: "pointer"
|
|
1021
|
-
},
|
|
1022
|
-
children: o("bigconsole.insights.actions.cancel", "Cancel")
|
|
1023
|
-
}), /* @__PURE__ */ S("button", {
|
|
1024
|
-
onClick: () => void Te(),
|
|
1025
|
-
disabled: !I.trim() || A.has(P.id),
|
|
1026
|
-
style: {
|
|
1027
|
-
display: "flex",
|
|
1028
|
-
alignItems: "center",
|
|
1029
|
-
gap: 6,
|
|
1030
|
-
padding: "8px 16px",
|
|
1031
|
-
borderRadius: "var(--radius-button)",
|
|
1032
|
-
border: "none",
|
|
1033
|
-
backgroundColor: "var(--color-action-primary-bg)",
|
|
1034
|
-
color: "var(--color-action-primary-text)",
|
|
1035
|
-
fontSize: "var(--font-size-body-sm)",
|
|
1036
|
-
cursor: !I.trim() || A.has(P.id) ? "not-allowed" : "pointer",
|
|
1037
|
-
opacity: I.trim() ? 1 : .6
|
|
1178
|
+
...k,
|
|
1179
|
+
cursor: !U.trim() || F.has(V.id) ? "not-allowed" : "pointer",
|
|
1180
|
+
opacity: U.trim() ? 1 : .6
|
|
1038
1181
|
},
|
|
1039
|
-
children: [
|
|
1182
|
+
children: [F.has(V.id) ? /* @__PURE__ */ w(_, {
|
|
1183
|
+
size: 14,
|
|
1184
|
+
className: "animate-spin",
|
|
1185
|
+
"aria-hidden": "true"
|
|
1186
|
+
}) : /* @__PURE__ */ w(y, {
|
|
1040
1187
|
size: 14,
|
|
1041
|
-
|
|
1042
|
-
})
|
|
1188
|
+
"aria-hidden": "true"
|
|
1189
|
+
}), l("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
1043
1190
|
})]
|
|
1044
1191
|
})
|
|
1045
1192
|
]
|
|
@@ -1049,6 +1196,6 @@ var E = o(function() {
|
|
|
1049
1196
|
});
|
|
1050
1197
|
});
|
|
1051
1198
|
//#endregion
|
|
1052
|
-
export {
|
|
1199
|
+
export { R as InsightsPage, R as default };
|
|
1053
1200
|
|
|
1054
1201
|
//# sourceMappingURL=InsightsPage.js.map
|