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