@burdenoff/microfe-bigconsole 2026.825.1 → 2026.828.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/assistant/attachmentExtract.js +1 -1
- package/dist/bigconsole/assistant/attachmentExtract.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/LayoutSection.js +71 -0
- package/dist/bigconsole/components/builder/inspector/LayoutSection.js.map +1 -0
- package/dist/bigconsole/components/builder/inspector/index.js +1 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +137 -121
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +204 -93
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +259 -133
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js +87 -39
- package/dist/bigconsole/components/dashboard/StoreTemplatePicker.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +88 -68
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +213 -199
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowCard.js +46 -27
- package/dist/bigconsole/components/workflow/WorkflowCard.js.map +1 -1
- package/dist/bigconsole/customWidget/proposalSource.js +1 -1
- package/dist/bigconsole/customWidget/proposalSource.js.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +74 -64
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +386 -316
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +251 -206
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +646 -378
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +153 -108
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/utils/format.js +18 -0
- package/dist/bigconsole/utils/format.js.map +1 -0
- package/dist/bigconsole/utils/widgetPositioning.js +1 -1
- package/dist/generated/wspace-operations.js +3 -0
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/node_modules/{xlsx → @e965/xlsx}/xlsx.js +5194 -4132
- package/dist/node_modules/@e965/xlsx/xlsx.js.map +1 -0
- package/package.json +2 -2
- package/dist/node_modules/xlsx/xlsx.js.map +0 -1
|
@@ -5,16 +5,16 @@ import { Section as n, SectionStack as r } from "../components/common/Section.js
|
|
|
5
5
|
import "../components/common/index.js";
|
|
6
6
|
import { reportBigConsoleQuotaError as i } from "../utils/quota.js";
|
|
7
7
|
import a from "../hooks/useBigConsoleAnalytics.js";
|
|
8
|
-
import { isNative as
|
|
9
|
-
import { memo as
|
|
10
|
-
import { AlertCircle as
|
|
11
|
-
import { gql as
|
|
12
|
-
import { useMutation as
|
|
13
|
-
import { useI18n as
|
|
14
|
-
import { AuroraBackground as
|
|
15
|
-
import { jsx as
|
|
8
|
+
import { isNative as ee, nativeImpact as o, nativeNotify as s } from "../../utils/nativeBridge.js";
|
|
9
|
+
import { memo as c, useCallback as l, useEffect as te, useState as u } from "react";
|
|
10
|
+
import { AlertCircle as d, ArrowRight as f, Ban as ne, CheckCircle as p, Clock as m, Eye as re, History as ie, Lightbulb as ae, Loader2 as h, RefreshCw as oe, Sparkles as g, Trash2 as se, Wand2 as _, X as ce, XCircle as v } from "lucide-react";
|
|
11
|
+
import { gql as y } from "@apollo/client";
|
|
12
|
+
import { useMutation as b, useQuery as x } from "@apollo/client/react";
|
|
13
|
+
import { useI18n as S } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
|
+
import { AuroraBackground as le, GlassCard as ue, GradientText as de, IllustratedEmptyState as fe, PagePurpose as pe } from "@burdenoff/fe-libs/ui";
|
|
15
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
16
16
|
//#region src/bigconsole/pages/InsightsPage.tsx
|
|
17
|
-
var
|
|
17
|
+
var me = y`
|
|
18
18
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
19
19
|
listPromptGenerations(status: $status, first: $first) {
|
|
20
20
|
edges {
|
|
@@ -30,11 +30,14 @@ var pe = x`
|
|
|
30
30
|
name
|
|
31
31
|
description
|
|
32
32
|
overallConfidence
|
|
33
|
+
reasoning
|
|
33
34
|
pages {
|
|
34
35
|
name
|
|
35
36
|
widgets {
|
|
36
37
|
title
|
|
37
38
|
type
|
|
39
|
+
confidence
|
|
40
|
+
reasoning
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
43
|
}
|
|
@@ -43,7 +46,7 @@ var pe = x`
|
|
|
43
46
|
totalCount
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
|
-
`,
|
|
49
|
+
`, he = y`
|
|
47
50
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
48
51
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
49
52
|
id
|
|
@@ -54,7 +57,7 @@ var pe = x`
|
|
|
54
57
|
tags
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
|
-
`,
|
|
60
|
+
`, ge = y`
|
|
58
61
|
mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
|
|
59
62
|
generateDashboardFromPrompt(input: $input) {
|
|
60
63
|
id
|
|
@@ -62,24 +65,24 @@ var pe = x`
|
|
|
62
65
|
prompt
|
|
63
66
|
}
|
|
64
67
|
}
|
|
65
|
-
`,
|
|
68
|
+
`, _e = y`
|
|
66
69
|
mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
|
|
67
70
|
createDashboardFromGeneration(input: $input) {
|
|
68
71
|
id
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
|
-
`,
|
|
74
|
+
`, ve = y`
|
|
72
75
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
73
76
|
deletePromptGeneration(generationId: $generationId)
|
|
74
77
|
}
|
|
75
|
-
`,
|
|
78
|
+
`, ye = y`
|
|
76
79
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
77
80
|
cancelPromptGeneration(generationId: $generationId) {
|
|
78
81
|
id
|
|
79
82
|
status
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
|
-
`,
|
|
85
|
+
`, be = y`
|
|
83
86
|
mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
|
|
84
87
|
regenerateDashboard(input: $input) {
|
|
85
88
|
id
|
|
@@ -87,7 +90,7 @@ var pe = x`
|
|
|
87
90
|
prompt
|
|
88
91
|
}
|
|
89
92
|
}
|
|
90
|
-
`,
|
|
93
|
+
`, xe = y`
|
|
91
94
|
mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
|
|
92
95
|
refineGeneratedDashboard(input: $input) {
|
|
93
96
|
id
|
|
@@ -95,11 +98,70 @@ var pe = x`
|
|
|
95
98
|
prompt
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
`,
|
|
101
|
+
`, Se = [
|
|
99
102
|
"PENDING",
|
|
100
103
|
"PROCESSING",
|
|
101
104
|
"GENERATING"
|
|
102
|
-
],
|
|
105
|
+
], Ce = 12, we = 8, Te = [
|
|
106
|
+
{
|
|
107
|
+
value: "MODERN",
|
|
108
|
+
label: "Modern"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: "CLASSIC",
|
|
112
|
+
label: "Classic"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
value: "MINIMAL",
|
|
116
|
+
label: "Minimal"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
value: "DARK",
|
|
120
|
+
label: "Dark"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
value: "VIBRANT",
|
|
124
|
+
label: "Vibrant"
|
|
125
|
+
}
|
|
126
|
+
], Ee = [
|
|
127
|
+
{
|
|
128
|
+
value: "GRID",
|
|
129
|
+
label: "Grid"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
value: "FLEX",
|
|
133
|
+
label: "Flex"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
value: "MASONRY",
|
|
137
|
+
label: "Masonry"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
value: "SINGLE_COLUMN",
|
|
141
|
+
label: "Single column"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
value: "TWO_COLUMN",
|
|
145
|
+
label: "Two column"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
value: "THREE_COLUMN",
|
|
149
|
+
label: "Three column"
|
|
150
|
+
}
|
|
151
|
+
], De = [
|
|
152
|
+
6,
|
|
153
|
+
8,
|
|
154
|
+
12,
|
|
155
|
+
16,
|
|
156
|
+
24
|
|
157
|
+
], Oe = [
|
|
158
|
+
4,
|
|
159
|
+
6,
|
|
160
|
+
8,
|
|
161
|
+
12,
|
|
162
|
+
16,
|
|
163
|
+
24
|
|
164
|
+
], T = {
|
|
103
165
|
display: "inline-flex",
|
|
104
166
|
alignItems: "center",
|
|
105
167
|
justifyContent: "center",
|
|
@@ -111,28 +173,43 @@ var pe = x`
|
|
|
111
173
|
fontWeight: "var(--font-weight-medium)",
|
|
112
174
|
lineHeight: 1.2,
|
|
113
175
|
cursor: "pointer"
|
|
114
|
-
},
|
|
115
|
-
...
|
|
176
|
+
}, E = {
|
|
177
|
+
...T,
|
|
116
178
|
border: "1px solid var(--color-border-default)",
|
|
117
179
|
backgroundColor: "transparent",
|
|
118
180
|
color: "var(--color-text-primary)"
|
|
119
|
-
},
|
|
120
|
-
...
|
|
181
|
+
}, D = {
|
|
182
|
+
...T,
|
|
121
183
|
border: "1px solid transparent",
|
|
122
184
|
backgroundColor: "var(--color-action-primary-bg)",
|
|
123
185
|
color: "var(--color-action-primary-text)"
|
|
124
|
-
},
|
|
125
|
-
...
|
|
186
|
+
}, ke = {
|
|
187
|
+
...T,
|
|
126
188
|
border: "1px solid var(--color-status-warning-border)",
|
|
127
189
|
backgroundColor: "transparent",
|
|
128
190
|
color: "var(--color-status-warning-text)"
|
|
129
|
-
},
|
|
130
|
-
...
|
|
191
|
+
}, O = {
|
|
192
|
+
...T,
|
|
131
193
|
minWidth: "var(--size-controlHeight-md)",
|
|
132
194
|
padding: "0 var(--space-controlGap)",
|
|
133
195
|
border: "1px solid var(--color-border-default)",
|
|
134
196
|
backgroundColor: "transparent",
|
|
135
197
|
color: "var(--color-status-error-text)"
|
|
198
|
+
}, k = {
|
|
199
|
+
display: "block",
|
|
200
|
+
marginBottom: "2px",
|
|
201
|
+
fontSize: "var(--font-size-body-sm)",
|
|
202
|
+
fontWeight: "var(--font-weight-medium)",
|
|
203
|
+
color: "var(--color-text-secondary)"
|
|
204
|
+
}, A = {
|
|
205
|
+
width: "100%",
|
|
206
|
+
minHeight: "var(--size-controlHeight-md)",
|
|
207
|
+
padding: "0 var(--space-controlGap)",
|
|
208
|
+
borderRadius: "var(--radius-input)",
|
|
209
|
+
border: "1px solid var(--color-border-default)",
|
|
210
|
+
backgroundColor: "var(--color-bg-canvas)",
|
|
211
|
+
color: "var(--color-text-primary)",
|
|
212
|
+
fontSize: "var(--font-size-body-sm)"
|
|
136
213
|
}, j = {
|
|
137
214
|
display: "inline-flex",
|
|
138
215
|
alignItems: "center",
|
|
@@ -180,26 +257,26 @@ var N = {
|
|
|
180
257
|
function P(e) {
|
|
181
258
|
let t = N[M(e)].text;
|
|
182
259
|
switch (e) {
|
|
183
|
-
case "COMPLETED": return /* @__PURE__ */
|
|
260
|
+
case "COMPLETED": return /* @__PURE__ */ C(p, {
|
|
184
261
|
size: 14,
|
|
185
262
|
style: { color: t },
|
|
186
263
|
"aria-hidden": "true"
|
|
187
264
|
});
|
|
188
265
|
case "FAILED":
|
|
189
|
-
case "CANCELLED": return /* @__PURE__ */
|
|
266
|
+
case "CANCELLED": return /* @__PURE__ */ C(v, {
|
|
190
267
|
size: 14,
|
|
191
268
|
style: { color: t },
|
|
192
269
|
"aria-hidden": "true"
|
|
193
270
|
});
|
|
194
271
|
case "PENDING":
|
|
195
272
|
case "PROCESSING":
|
|
196
|
-
case "GENERATING": return /* @__PURE__ */
|
|
273
|
+
case "GENERATING": return /* @__PURE__ */ C(h, {
|
|
197
274
|
size: 14,
|
|
198
275
|
className: "animate-spin",
|
|
199
276
|
style: { color: t },
|
|
200
277
|
"aria-hidden": "true"
|
|
201
278
|
});
|
|
202
|
-
default: return /* @__PURE__ */
|
|
279
|
+
default: return /* @__PURE__ */ C(m, {
|
|
203
280
|
size: 14,
|
|
204
281
|
style: { color: t },
|
|
205
282
|
"aria-hidden": "true"
|
|
@@ -217,9 +294,9 @@ function F(e, t) {
|
|
|
217
294
|
default: return e;
|
|
218
295
|
}
|
|
219
296
|
}
|
|
220
|
-
var
|
|
221
|
-
let { t } =
|
|
222
|
-
return /* @__PURE__ */
|
|
297
|
+
var Ae = ({ status: e }) => {
|
|
298
|
+
let { t } = S(), n = N[M(e)];
|
|
299
|
+
return /* @__PURE__ */ w("span", {
|
|
223
300
|
"data-status": e,
|
|
224
301
|
style: {
|
|
225
302
|
...j,
|
|
@@ -230,7 +307,7 @@ var Se = ({ status: e }) => {
|
|
|
230
307
|
children: [P(e), F(e, t)]
|
|
231
308
|
});
|
|
232
309
|
};
|
|
233
|
-
function
|
|
310
|
+
function je(e) {
|
|
234
311
|
let t = N[e >= .8 ? "success" : e >= .5 ? "neutral" : "danger"];
|
|
235
312
|
return {
|
|
236
313
|
...j,
|
|
@@ -239,168 +316,195 @@ function I(e) {
|
|
|
239
316
|
color: t.text
|
|
240
317
|
};
|
|
241
318
|
}
|
|
242
|
-
function
|
|
319
|
+
function I(e) {
|
|
243
320
|
return e.pages.reduce((e, t) => e + t.widgets.length, 0);
|
|
244
321
|
}
|
|
245
|
-
|
|
246
|
-
let
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
322
|
+
function Me(e) {
|
|
323
|
+
let t = e?.toUpperCase();
|
|
324
|
+
return t === "HIGH" || t === "MEDIUM" || t === "LOW" ? t : null;
|
|
325
|
+
}
|
|
326
|
+
var Ne = {
|
|
327
|
+
HIGH: "success",
|
|
328
|
+
MEDIUM: "neutral",
|
|
329
|
+
LOW: "danger"
|
|
330
|
+
};
|
|
331
|
+
function Pe(e) {
|
|
332
|
+
let t = N[Ne[e]];
|
|
333
|
+
return {
|
|
334
|
+
...j,
|
|
335
|
+
padding: "0 var(--space-controlGap)",
|
|
336
|
+
fontSize: "var(--font-size-xs)",
|
|
337
|
+
fontWeight: "var(--font-weight-semibold)",
|
|
338
|
+
letterSpacing: "0.02em",
|
|
339
|
+
border: `1px solid ${t.border}`,
|
|
340
|
+
backgroundColor: t.bg,
|
|
341
|
+
color: t.text
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
var L = c(function() {
|
|
345
|
+
let { t: c } = S(), p = e(), m = a(), [v, y] = u(""), [T, M] = u("MODERN"), [N, P] = u("GRID"), [F, Ne] = u(Ce), [L, Fe] = u(we), [R, Ie] = u(!1), [Le, z] = u(null), [B, Re] = u(() => /* @__PURE__ */ new Set()), [V, H] = u(null), [U, W] = u(null), [G, K] = u(""), q = l((e) => {
|
|
346
|
+
Re((t) => new Set(t).add(e));
|
|
347
|
+
}, []), J = l((e) => {
|
|
348
|
+
Re((t) => {
|
|
250
349
|
let n = new Set(t);
|
|
251
350
|
return n.delete(e), n;
|
|
252
351
|
});
|
|
253
|
-
}, []), { data:
|
|
352
|
+
}, []), { data: ze, loading: Be, refetch: Y, startPolling: Ve, stopPolling: X } = x(me, {
|
|
254
353
|
variables: { first: 20 },
|
|
255
354
|
fetchPolicy: "cache-and-network"
|
|
256
|
-
}),
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
]),
|
|
263
|
-
if (!
|
|
355
|
+
}), Z = ze?.listPromptGenerations?.edges?.some((e) => Se.includes(e.node.status)) ?? !1, { data: He } = x(he, { variables: { limit: 6 } }), [Ue] = b(ge), [We] = b(_e), [Ge] = b(ve), [Ke] = b(ye), [qe] = b(be), [Je] = b(xe), Q = ze?.listPromptGenerations?.edges?.map((e) => e.node) || [], Ye = He?.getPromptSuggestions || [];
|
|
356
|
+
te(() => (Z || R ? Ve(2e3) : X(), () => X()), [
|
|
357
|
+
Z,
|
|
358
|
+
R,
|
|
359
|
+
Ve,
|
|
360
|
+
X
|
|
361
|
+
]), te(() => {
|
|
362
|
+
if (!V && !U) return;
|
|
264
363
|
let e = (e) => {
|
|
265
|
-
e.key === "Escape" && (
|
|
364
|
+
e.key === "Escape" && (H(null), W(null));
|
|
266
365
|
};
|
|
267
366
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
268
|
-
}, [
|
|
269
|
-
let
|
|
270
|
-
if (!(!
|
|
271
|
-
if (
|
|
272
|
-
|
|
367
|
+
}, [V, U]);
|
|
368
|
+
let Xe = l(async () => {
|
|
369
|
+
if (!(!v.trim() || R)) {
|
|
370
|
+
if (v.length > 2e3) {
|
|
371
|
+
z(c("bigconsole.insights.error.promptTooLong", "Prompt is too long (max 2000 characters)."));
|
|
273
372
|
return;
|
|
274
373
|
}
|
|
275
|
-
|
|
374
|
+
z(null), Ie(!0);
|
|
276
375
|
try {
|
|
277
|
-
|
|
278
|
-
let e = await
|
|
279
|
-
prompt:
|
|
280
|
-
styleType:
|
|
281
|
-
layoutType:
|
|
282
|
-
|
|
376
|
+
m("bigconsole.ai.generate_clicked", { maxWidgets: L });
|
|
377
|
+
let e = await Ue({ variables: { input: {
|
|
378
|
+
prompt: v.trim(),
|
|
379
|
+
styleType: T,
|
|
380
|
+
layoutType: N,
|
|
381
|
+
gridColumns: F,
|
|
382
|
+
maxWidgets: L
|
|
283
383
|
} } });
|
|
284
384
|
if (i(e, "command")) return;
|
|
285
385
|
let t = e.data?.generateDashboardFromPrompt?.id;
|
|
286
|
-
t &&
|
|
386
|
+
t && m("bigconsole.ai.dashboard_generated", {
|
|
287
387
|
generationId: t,
|
|
288
|
-
maxWidgets:
|
|
289
|
-
}),
|
|
388
|
+
maxWidgets: L
|
|
389
|
+
}), y(""), Y();
|
|
290
390
|
} catch (e) {
|
|
291
391
|
if (i(e, "command")) return;
|
|
292
|
-
|
|
392
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.generateFailed", "Failed to generate dashboard"));
|
|
293
393
|
} finally {
|
|
294
|
-
|
|
394
|
+
Ie(!1);
|
|
295
395
|
}
|
|
296
396
|
}
|
|
297
397
|
}, [
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
398
|
+
m,
|
|
399
|
+
v,
|
|
400
|
+
R,
|
|
401
|
+
Ue,
|
|
402
|
+
Y,
|
|
403
|
+
T,
|
|
404
|
+
N,
|
|
405
|
+
F,
|
|
406
|
+
L,
|
|
407
|
+
c
|
|
408
|
+
]), Ze = l(async (e) => {
|
|
409
|
+
z(null);
|
|
306
410
|
try {
|
|
307
|
-
|
|
308
|
-
let t = await
|
|
411
|
+
m("bigconsole.ai.create_dashboard_clicked", { generationId: e });
|
|
412
|
+
let t = await We({ variables: { input: { generationId: e } } });
|
|
309
413
|
if (i(t, "project")) return;
|
|
310
414
|
let n = t.data?.createDashboardFromGeneration?.id;
|
|
311
|
-
n && (
|
|
415
|
+
n && (m("bigconsole.ai.dashboard_created", {
|
|
312
416
|
generationId: e,
|
|
313
417
|
dashboardId: n
|
|
314
|
-
}),
|
|
418
|
+
}), p(`/dashboards/${n}`));
|
|
315
419
|
} catch (e) {
|
|
316
420
|
if (i(e, "project")) return;
|
|
317
|
-
|
|
421
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.createFailed", "Failed to create dashboard"));
|
|
318
422
|
}
|
|
319
423
|
}, [
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
]),
|
|
325
|
-
|
|
424
|
+
We,
|
|
425
|
+
m,
|
|
426
|
+
p,
|
|
427
|
+
c
|
|
428
|
+
]), Qe = l(async (e) => {
|
|
429
|
+
z(null);
|
|
326
430
|
try {
|
|
327
|
-
await
|
|
431
|
+
await Ge({ variables: { generationId: e } }), ee() && s("success"), Y();
|
|
328
432
|
} catch (e) {
|
|
329
|
-
|
|
433
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.deleteFailed", "Failed to delete generation")), ee() && s("error");
|
|
330
434
|
}
|
|
331
435
|
}, [
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
]),
|
|
336
|
-
|
|
436
|
+
Ge,
|
|
437
|
+
Y,
|
|
438
|
+
c
|
|
439
|
+
]), $e = l(async (e) => {
|
|
440
|
+
z(null), q(e);
|
|
337
441
|
try {
|
|
338
|
-
await
|
|
442
|
+
await Ke({ variables: { generationId: e } }), Y();
|
|
339
443
|
} catch (e) {
|
|
340
|
-
|
|
444
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.cancelFailed", "Failed to cancel generation"));
|
|
341
445
|
} finally {
|
|
342
|
-
|
|
446
|
+
J(e);
|
|
343
447
|
}
|
|
344
448
|
}, [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
]),
|
|
349
|
-
|
|
449
|
+
Ke,
|
|
450
|
+
Y,
|
|
451
|
+
c
|
|
452
|
+
]), et = l(async (e) => {
|
|
453
|
+
z(null), q(e);
|
|
350
454
|
try {
|
|
351
|
-
if (i(await
|
|
352
|
-
|
|
455
|
+
if (i(await qe({ variables: { input: { generationId: e } } }), "command")) return;
|
|
456
|
+
Y();
|
|
353
457
|
} catch (e) {
|
|
354
458
|
if (i(e, "command")) return;
|
|
355
|
-
|
|
459
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.regenerateFailed", "Failed to regenerate dashboard"));
|
|
356
460
|
} finally {
|
|
357
|
-
|
|
461
|
+
J(e);
|
|
358
462
|
}
|
|
359
463
|
}, [
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
]),
|
|
364
|
-
if (!
|
|
365
|
-
let e =
|
|
366
|
-
|
|
464
|
+
qe,
|
|
465
|
+
Y,
|
|
466
|
+
c
|
|
467
|
+
]), tt = l(async () => {
|
|
468
|
+
if (!U || !G.trim()) return;
|
|
469
|
+
let e = U.id;
|
|
470
|
+
z(null), q(e);
|
|
367
471
|
let t = !1;
|
|
368
472
|
try {
|
|
369
|
-
if (i(await
|
|
473
|
+
if (i(await Je({ variables: { input: {
|
|
370
474
|
generationId: e,
|
|
371
|
-
refinementPrompt:
|
|
475
|
+
refinementPrompt: G.trim()
|
|
372
476
|
} } }), "command")) {
|
|
373
477
|
t = !0;
|
|
374
478
|
return;
|
|
375
479
|
}
|
|
376
|
-
t = !0,
|
|
480
|
+
t = !0, Y();
|
|
377
481
|
} catch (e) {
|
|
378
482
|
if (i(e, "command")) {
|
|
379
483
|
t = !0;
|
|
380
484
|
return;
|
|
381
485
|
}
|
|
382
|
-
|
|
486
|
+
z(e instanceof Error ? e.message : c("bigconsole.insights.error.refineFailed", "Failed to refine generation"));
|
|
383
487
|
} finally {
|
|
384
|
-
t && (
|
|
488
|
+
t && (W(null), K("")), J(e);
|
|
385
489
|
}
|
|
386
490
|
}, [
|
|
387
|
-
V,
|
|
388
491
|
U,
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
492
|
+
G,
|
|
493
|
+
Je,
|
|
494
|
+
Y,
|
|
495
|
+
c
|
|
496
|
+
]), nt = l((e) => {
|
|
497
|
+
y(e);
|
|
498
|
+
}, []), $ = V?.generatedSpec;
|
|
499
|
+
return /* @__PURE__ */ w("div", {
|
|
396
500
|
className: "min-w-0",
|
|
397
501
|
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
398
502
|
children: [
|
|
399
|
-
/* @__PURE__ */
|
|
503
|
+
/* @__PURE__ */ w("header", {
|
|
400
504
|
className: "relative overflow-hidden border-b border-[var(--color-border-seam)] bg-[image:var(--gradient-gloss-card)]",
|
|
401
|
-
children: [/* @__PURE__ */
|
|
505
|
+
children: [/* @__PURE__ */ C(le, { intensity: "subtle" }), /* @__PURE__ */ C("div", {
|
|
402
506
|
style: { padding: "var(--space-pagePadding)" },
|
|
403
|
-
children: /* @__PURE__ */
|
|
507
|
+
children: /* @__PURE__ */ w("div", {
|
|
404
508
|
style: {
|
|
405
509
|
display: "flex",
|
|
406
510
|
alignItems: "center",
|
|
@@ -408,7 +512,7 @@ var R = l(function() {
|
|
|
408
512
|
flexWrap: "wrap",
|
|
409
513
|
minWidth: 0
|
|
410
514
|
},
|
|
411
|
-
children: [/* @__PURE__ */
|
|
515
|
+
children: [/* @__PURE__ */ C("div", {
|
|
412
516
|
style: {
|
|
413
517
|
display: "flex",
|
|
414
518
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -419,63 +523,63 @@ var R = l(function() {
|
|
|
419
523
|
borderRadius: "var(--radius-card)",
|
|
420
524
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
421
525
|
},
|
|
422
|
-
children: /* @__PURE__ */
|
|
526
|
+
children: /* @__PURE__ */ C(g, { style: {
|
|
423
527
|
height: "var(--size-icon-lg)",
|
|
424
528
|
width: "var(--size-icon-lg)",
|
|
425
529
|
color: "var(--color-action-primary-text)"
|
|
426
530
|
} })
|
|
427
|
-
}), /* @__PURE__ */
|
|
531
|
+
}), /* @__PURE__ */ w("div", {
|
|
428
532
|
style: { minWidth: 0 },
|
|
429
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ C("h1", {
|
|
430
534
|
className: "m-0 text-2xl font-bold text-text-primary",
|
|
431
|
-
children: /* @__PURE__ */
|
|
432
|
-
}), /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ C(de, { children: c("bigconsole.insights.header.title", "AI Insights") })
|
|
536
|
+
}), /* @__PURE__ */ C("p", {
|
|
433
537
|
className: "m-0 text-sm text-text-secondary",
|
|
434
|
-
children:
|
|
538
|
+
children: c("bigconsole.insights.header.subtitle", "Generate dashboards from natural language prompts")
|
|
435
539
|
})]
|
|
436
540
|
})]
|
|
437
541
|
})
|
|
438
542
|
})]
|
|
439
543
|
}),
|
|
440
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ w("div", {
|
|
441
545
|
style: { padding: "var(--space-pagePadding)" },
|
|
442
|
-
children: [/* @__PURE__ */
|
|
546
|
+
children: [/* @__PURE__ */ C(pe, {
|
|
443
547
|
className: "mb-[var(--space-sectionGap)]",
|
|
444
548
|
children: "Describe the dashboard you need in plain English and BigConsole proposes the pages, widgets and layout for it. Review the proposal, refine it in place, then create the real dashboard in one step — a generation is only a proposal until you accept it."
|
|
445
|
-
}), /* @__PURE__ */
|
|
446
|
-
|
|
549
|
+
}), /* @__PURE__ */ w(r, { children: [
|
|
550
|
+
Le && /* @__PURE__ */ C(n, {
|
|
447
551
|
headingLevel: 2,
|
|
448
552
|
tone: "danger",
|
|
449
553
|
padding: "compact",
|
|
450
554
|
title: "That request did not go through",
|
|
451
|
-
description:
|
|
452
|
-
icon: /* @__PURE__ */
|
|
555
|
+
description: Le,
|
|
556
|
+
icon: /* @__PURE__ */ C(d, { className: "h-icon-sm w-icon-sm" }),
|
|
453
557
|
"data-testid": "insights-error",
|
|
454
|
-
actions: /* @__PURE__ */
|
|
558
|
+
actions: /* @__PURE__ */ C("button", {
|
|
455
559
|
type: "button",
|
|
456
|
-
onClick: () =>
|
|
457
|
-
"aria-label":
|
|
560
|
+
onClick: () => z(null),
|
|
561
|
+
"aria-label": c("bigconsole.insights.error.dismiss", "Dismiss error"),
|
|
458
562
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
459
|
-
style:
|
|
563
|
+
style: E,
|
|
460
564
|
children: "Dismiss"
|
|
461
565
|
})
|
|
462
566
|
}),
|
|
463
|
-
/* @__PURE__ */
|
|
567
|
+
/* @__PURE__ */ C(n, {
|
|
464
568
|
id: "insights-prompt",
|
|
465
569
|
emphasis: "primary",
|
|
466
570
|
headingLevel: 2,
|
|
467
571
|
title: "Describe your dashboard",
|
|
468
572
|
description: "One or two sentences is enough — name the metrics, the breakdowns and who will read it.",
|
|
469
|
-
icon: /* @__PURE__ */
|
|
573
|
+
icon: /* @__PURE__ */ C(g, { className: "h-icon-sm w-icon-sm" }),
|
|
470
574
|
"data-testid": "insights-prompt",
|
|
471
|
-
children: /* @__PURE__ */
|
|
575
|
+
children: /* @__PURE__ */ w("div", {
|
|
472
576
|
style: {
|
|
473
577
|
display: "flex",
|
|
474
578
|
flexDirection: "column",
|
|
475
579
|
gap: "var(--space-controlGap)"
|
|
476
580
|
},
|
|
477
581
|
children: [
|
|
478
|
-
/* @__PURE__ */
|
|
582
|
+
/* @__PURE__ */ C("label", {
|
|
479
583
|
htmlFor: "prompt-input",
|
|
480
584
|
style: {
|
|
481
585
|
display: "block",
|
|
@@ -483,13 +587,13 @@ var R = l(function() {
|
|
|
483
587
|
fontWeight: "var(--font-weight-medium)",
|
|
484
588
|
color: "var(--color-text-primary)"
|
|
485
589
|
},
|
|
486
|
-
children:
|
|
590
|
+
children: c("bigconsole.insights.prompt.label", "Your prompt")
|
|
487
591
|
}),
|
|
488
|
-
/* @__PURE__ */
|
|
592
|
+
/* @__PURE__ */ C("textarea", {
|
|
489
593
|
id: "prompt-input",
|
|
490
|
-
value:
|
|
491
|
-
onChange: (e) =>
|
|
492
|
-
placeholder:
|
|
594
|
+
value: v,
|
|
595
|
+
onChange: (e) => y(e.target.value),
|
|
596
|
+
placeholder: c("bigconsole.insights.prompt.placeholder", "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance"),
|
|
493
597
|
rows: 3,
|
|
494
598
|
maxLength: 2e3,
|
|
495
599
|
className: t,
|
|
@@ -505,10 +609,82 @@ var R = l(function() {
|
|
|
505
609
|
resize: "vertical"
|
|
506
610
|
},
|
|
507
611
|
onKeyDown: (e) => {
|
|
508
|
-
e.key === "Enter" && (e.metaKey || e.ctrlKey) &&
|
|
612
|
+
e.key === "Enter" && (e.metaKey || e.ctrlKey) && Xe();
|
|
509
613
|
}
|
|
510
614
|
}),
|
|
511
|
-
/* @__PURE__ */
|
|
615
|
+
/* @__PURE__ */ w("div", {
|
|
616
|
+
role: "group",
|
|
617
|
+
"aria-label": c("bigconsole.insights.prompt.optionsLabel", "Generation options"),
|
|
618
|
+
"data-testid": "insights-generation-options",
|
|
619
|
+
style: {
|
|
620
|
+
display: "grid",
|
|
621
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(150px, 100%), 1fr))",
|
|
622
|
+
gap: "var(--space-controlGap)"
|
|
623
|
+
},
|
|
624
|
+
children: [
|
|
625
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
626
|
+
htmlFor: "prompt-style",
|
|
627
|
+
style: k,
|
|
628
|
+
children: c("bigconsole.insights.prompt.style", "Style")
|
|
629
|
+
}), /* @__PURE__ */ C("select", {
|
|
630
|
+
id: "prompt-style",
|
|
631
|
+
value: T,
|
|
632
|
+
onChange: (e) => M(e.target.value),
|
|
633
|
+
className: t,
|
|
634
|
+
style: A,
|
|
635
|
+
children: Te.map((e) => /* @__PURE__ */ C("option", {
|
|
636
|
+
value: e.value,
|
|
637
|
+
children: e.label
|
|
638
|
+
}, e.value))
|
|
639
|
+
})] }),
|
|
640
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
641
|
+
htmlFor: "prompt-layout",
|
|
642
|
+
style: k,
|
|
643
|
+
children: c("bigconsole.insights.prompt.layout", "Layout")
|
|
644
|
+
}), /* @__PURE__ */ C("select", {
|
|
645
|
+
id: "prompt-layout",
|
|
646
|
+
value: N,
|
|
647
|
+
onChange: (e) => P(e.target.value),
|
|
648
|
+
className: t,
|
|
649
|
+
style: A,
|
|
650
|
+
children: Ee.map((e) => /* @__PURE__ */ C("option", {
|
|
651
|
+
value: e.value,
|
|
652
|
+
children: e.label
|
|
653
|
+
}, e.value))
|
|
654
|
+
})] }),
|
|
655
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
656
|
+
htmlFor: "prompt-columns",
|
|
657
|
+
style: k,
|
|
658
|
+
children: c("bigconsole.insights.prompt.columns", "Columns")
|
|
659
|
+
}), /* @__PURE__ */ C("select", {
|
|
660
|
+
id: "prompt-columns",
|
|
661
|
+
value: F,
|
|
662
|
+
onChange: (e) => Ne(Number(e.target.value)),
|
|
663
|
+
className: t,
|
|
664
|
+
style: A,
|
|
665
|
+
children: De.map((e) => /* @__PURE__ */ C("option", {
|
|
666
|
+
value: e,
|
|
667
|
+
children: e
|
|
668
|
+
}, e))
|
|
669
|
+
})] }),
|
|
670
|
+
/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("label", {
|
|
671
|
+
htmlFor: "prompt-max-widgets",
|
|
672
|
+
style: k,
|
|
673
|
+
children: c("bigconsole.insights.prompt.maxWidgets", "Max widgets")
|
|
674
|
+
}), /* @__PURE__ */ C("select", {
|
|
675
|
+
id: "prompt-max-widgets",
|
|
676
|
+
value: L,
|
|
677
|
+
onChange: (e) => Fe(Number(e.target.value)),
|
|
678
|
+
className: t,
|
|
679
|
+
style: A,
|
|
680
|
+
children: Oe.map((e) => /* @__PURE__ */ C("option", {
|
|
681
|
+
value: e,
|
|
682
|
+
children: e
|
|
683
|
+
}, e))
|
|
684
|
+
})] })
|
|
685
|
+
]
|
|
686
|
+
}),
|
|
687
|
+
/* @__PURE__ */ w("div", {
|
|
512
688
|
style: {
|
|
513
689
|
display: "flex",
|
|
514
690
|
alignItems: "center",
|
|
@@ -517,7 +693,7 @@ var R = l(function() {
|
|
|
517
693
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
518
694
|
paddingTop: "var(--space-controlGap)"
|
|
519
695
|
},
|
|
520
|
-
children: [/* @__PURE__ */
|
|
696
|
+
children: [/* @__PURE__ */ w("span", {
|
|
521
697
|
style: {
|
|
522
698
|
flex: "1 1 12rem",
|
|
523
699
|
minWidth: 0,
|
|
@@ -525,51 +701,51 @@ var R = l(function() {
|
|
|
525
701
|
color: "var(--color-text-muted)"
|
|
526
702
|
},
|
|
527
703
|
children: [
|
|
528
|
-
|
|
704
|
+
c("bigconsole.insights.prompt.hint", "Press Ctrl+Enter to generate"),
|
|
529
705
|
" · ",
|
|
530
|
-
|
|
706
|
+
v.length,
|
|
531
707
|
"/2000"
|
|
532
708
|
]
|
|
533
|
-
}), /* @__PURE__ */
|
|
709
|
+
}), /* @__PURE__ */ w("button", {
|
|
534
710
|
type: "button",
|
|
535
|
-
onClick:
|
|
536
|
-
disabled: !
|
|
711
|
+
onClick: Xe,
|
|
712
|
+
disabled: !v.trim() || R,
|
|
537
713
|
className: t,
|
|
538
714
|
style: {
|
|
539
|
-
...
|
|
715
|
+
...D,
|
|
540
716
|
marginLeft: "auto",
|
|
541
|
-
cursor: !
|
|
542
|
-
opacity: !
|
|
717
|
+
cursor: !v.trim() || R ? "not-allowed" : "pointer",
|
|
718
|
+
opacity: !v.trim() || R ? .5 : 1
|
|
543
719
|
},
|
|
544
|
-
children: [
|
|
720
|
+
children: [R ? /* @__PURE__ */ C(h, {
|
|
545
721
|
size: 16,
|
|
546
722
|
className: "animate-spin",
|
|
547
723
|
"aria-hidden": "true"
|
|
548
|
-
}) : /* @__PURE__ */
|
|
724
|
+
}) : /* @__PURE__ */ C(g, {
|
|
549
725
|
size: 16,
|
|
550
726
|
"aria-hidden": "true"
|
|
551
|
-
}),
|
|
727
|
+
}), c("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
552
728
|
})]
|
|
553
729
|
})
|
|
554
730
|
]
|
|
555
731
|
})
|
|
556
732
|
}),
|
|
557
|
-
|
|
733
|
+
Ye.length > 0 && /* @__PURE__ */ C(n, {
|
|
558
734
|
emphasis: "muted",
|
|
559
735
|
headingLevel: 2,
|
|
560
|
-
title:
|
|
736
|
+
title: c("bigconsole.insights.suggestions.heading", "Starting points"),
|
|
561
737
|
description: "Pick one to drop it into the prompt box above, then edit it before generating.",
|
|
562
|
-
icon: /* @__PURE__ */
|
|
738
|
+
icon: /* @__PURE__ */ C(ae, { className: "h-icon-sm w-icon-sm" }),
|
|
563
739
|
"data-testid": "insights-suggestions",
|
|
564
|
-
children: /* @__PURE__ */
|
|
740
|
+
children: /* @__PURE__ */ C("div", {
|
|
565
741
|
style: {
|
|
566
742
|
display: "grid",
|
|
567
743
|
gridTemplateColumns: "repeat(auto-fill, minmax(min(260px, 100%), 1fr))",
|
|
568
744
|
gap: "var(--space-controlGap)"
|
|
569
745
|
},
|
|
570
|
-
children:
|
|
746
|
+
children: Ye.map((e) => /* @__PURE__ */ w("button", {
|
|
571
747
|
type: "button",
|
|
572
|
-
onClick: () =>
|
|
748
|
+
onClick: () => nt(e.prompt),
|
|
573
749
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
574
750
|
style: {
|
|
575
751
|
textAlign: "left",
|
|
@@ -582,7 +758,7 @@ var R = l(function() {
|
|
|
582
758
|
cursor: "pointer"
|
|
583
759
|
},
|
|
584
760
|
children: [
|
|
585
|
-
/* @__PURE__ */
|
|
761
|
+
/* @__PURE__ */ C("span", {
|
|
586
762
|
style: {
|
|
587
763
|
display: "block",
|
|
588
764
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -592,7 +768,7 @@ var R = l(function() {
|
|
|
592
768
|
},
|
|
593
769
|
children: e.title
|
|
594
770
|
}),
|
|
595
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ C("span", {
|
|
596
772
|
style: {
|
|
597
773
|
display: "block",
|
|
598
774
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -601,14 +777,14 @@ var R = l(function() {
|
|
|
601
777
|
},
|
|
602
778
|
children: e.exampleDescription || e.prompt
|
|
603
779
|
}),
|
|
604
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
780
|
+
e.tags.length > 0 && /* @__PURE__ */ C("span", {
|
|
605
781
|
style: {
|
|
606
782
|
display: "flex",
|
|
607
783
|
gap: "var(--space-iconGap)",
|
|
608
784
|
marginTop: "var(--space-controlGap)",
|
|
609
785
|
flexWrap: "wrap"
|
|
610
786
|
},
|
|
611
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
787
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ C("span", {
|
|
612
788
|
style: j,
|
|
613
789
|
children: e
|
|
614
790
|
}, e))
|
|
@@ -617,29 +793,29 @@ var R = l(function() {
|
|
|
617
793
|
}, e.id))
|
|
618
794
|
})
|
|
619
795
|
}),
|
|
620
|
-
/* @__PURE__ */
|
|
796
|
+
/* @__PURE__ */ C(n, {
|
|
621
797
|
emphasis: "bare",
|
|
622
798
|
padding: "none",
|
|
623
799
|
headingLevel: 2,
|
|
624
|
-
title:
|
|
800
|
+
title: c("bigconsole.insights.generations.heading", "Recent generations"),
|
|
625
801
|
description: "Newest first. A generation stays a proposal until you create the dashboard from it.",
|
|
626
|
-
icon: /* @__PURE__ */
|
|
627
|
-
meta:
|
|
802
|
+
icon: /* @__PURE__ */ C(ie, { className: "h-icon-sm w-icon-sm" }),
|
|
803
|
+
meta: Q.length > 0 ? /* @__PURE__ */ w("span", {
|
|
628
804
|
style: j,
|
|
629
805
|
children: [
|
|
630
|
-
|
|
806
|
+
Q.length,
|
|
631
807
|
" generation",
|
|
632
|
-
|
|
808
|
+
Q.length === 1 ? "" : "s"
|
|
633
809
|
]
|
|
634
810
|
}) : void 0,
|
|
635
811
|
"data-testid": "insights-generations",
|
|
636
|
-
children:
|
|
812
|
+
children: Be && Q.length === 0 ? /* @__PURE__ */ C(n, {
|
|
637
813
|
emphasis: "muted",
|
|
638
814
|
headingLevel: 3,
|
|
639
815
|
"aria-label": "Loading generations",
|
|
640
816
|
className: "min-h-[10rem]",
|
|
641
817
|
"data-testid": "insights-generations-loading",
|
|
642
|
-
children: /* @__PURE__ */
|
|
818
|
+
children: /* @__PURE__ */ w("div", {
|
|
643
819
|
style: {
|
|
644
820
|
display: "flex",
|
|
645
821
|
minHeight: "8rem",
|
|
@@ -649,62 +825,62 @@ var R = l(function() {
|
|
|
649
825
|
gap: "var(--space-controlGap)",
|
|
650
826
|
color: "var(--color-text-muted)"
|
|
651
827
|
},
|
|
652
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ C(h, {
|
|
653
829
|
size: 24,
|
|
654
830
|
className: "animate-spin",
|
|
655
831
|
"aria-hidden": "true"
|
|
656
|
-
}), /* @__PURE__ */
|
|
832
|
+
}), /* @__PURE__ */ C("p", {
|
|
657
833
|
style: { fontSize: "var(--font-size-body-sm)" },
|
|
658
|
-
children:
|
|
834
|
+
children: c("bigconsole.insights.generations.loading", "Loading generations…")
|
|
659
835
|
})]
|
|
660
836
|
})
|
|
661
|
-
}) :
|
|
837
|
+
}) : Q.length === 0 && !R ? /* @__PURE__ */ C(ue, {
|
|
662
838
|
treatment: "insight",
|
|
663
839
|
className: "border-[var(--color-border-seam)]",
|
|
664
|
-
children: /* @__PURE__ */
|
|
840
|
+
children: /* @__PURE__ */ C(fe, {
|
|
665
841
|
illustration: "onboarding",
|
|
666
|
-
title:
|
|
667
|
-
description:
|
|
842
|
+
title: c("bigconsole.insights.generations.emptyTitle", "No generations yet"),
|
|
843
|
+
description: c("bigconsole.insights.generations.emptyDescription", "Describe a dashboard above to get started")
|
|
668
844
|
})
|
|
669
|
-
}) : /* @__PURE__ */
|
|
845
|
+
}) : /* @__PURE__ */ w("div", {
|
|
670
846
|
className: "flex flex-col gap-list-gap",
|
|
671
|
-
children: [
|
|
847
|
+
children: [R && !Z && /* @__PURE__ */ C(n, {
|
|
672
848
|
emphasis: "muted",
|
|
673
849
|
tone: "info",
|
|
674
850
|
padding: "compact",
|
|
675
851
|
headingLevel: 3,
|
|
676
852
|
title: "Sending your prompt…",
|
|
677
853
|
description: "The new generation appears here as soon as the backend accepts it.",
|
|
678
|
-
icon: /* @__PURE__ */
|
|
854
|
+
icon: /* @__PURE__ */ C(h, { className: "h-icon-sm w-icon-sm animate-spin" }),
|
|
679
855
|
"data-testid": "insights-generation-pending"
|
|
680
|
-
}),
|
|
681
|
-
let r = e.generatedSpec, i =
|
|
682
|
-
return /* @__PURE__ */
|
|
856
|
+
}), Q.map((e) => {
|
|
857
|
+
let r = e.generatedSpec, i = B.has(e.id), a = Se.includes(e.status);
|
|
858
|
+
return /* @__PURE__ */ w(n, {
|
|
683
859
|
emphasis: "standard",
|
|
684
860
|
padding: "compact",
|
|
685
861
|
headingLevel: 3,
|
|
686
|
-
title: r?.name || (a ?
|
|
687
|
-
meta: /* @__PURE__ */
|
|
862
|
+
title: r?.name || (a ? c("bigconsole.insights.generations.generating", "Generating…") : "Untitled generation"),
|
|
863
|
+
meta: /* @__PURE__ */ C(Ae, { status: e.status }),
|
|
688
864
|
description: e.prompt.length > 160 ? `${e.prompt.slice(0, 160)}…` : e.prompt,
|
|
689
865
|
"data-testid": "insights-generation-card",
|
|
690
866
|
bodyClassName: "flex flex-col gap-control-gap",
|
|
691
867
|
children: [
|
|
692
|
-
r && /* @__PURE__ */
|
|
868
|
+
r && /* @__PURE__ */ w("div", {
|
|
693
869
|
style: {
|
|
694
870
|
display: "flex",
|
|
695
871
|
flexWrap: "wrap",
|
|
696
872
|
gap: "var(--space-iconGap)"
|
|
697
873
|
},
|
|
698
874
|
children: [
|
|
699
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ w("span", {
|
|
700
876
|
style: j,
|
|
701
877
|
children: [
|
|
702
|
-
|
|
878
|
+
I(r),
|
|
703
879
|
" widget",
|
|
704
|
-
|
|
880
|
+
I(r) === 1 ? "" : "s"
|
|
705
881
|
]
|
|
706
882
|
}),
|
|
707
|
-
/* @__PURE__ */
|
|
883
|
+
/* @__PURE__ */ w("span", {
|
|
708
884
|
style: j,
|
|
709
885
|
children: [
|
|
710
886
|
r.pages.length,
|
|
@@ -712,21 +888,21 @@ var R = l(function() {
|
|
|
712
888
|
r.pages.length === 1 ? "" : "s"
|
|
713
889
|
]
|
|
714
890
|
}),
|
|
715
|
-
/* @__PURE__ */
|
|
716
|
-
style:
|
|
891
|
+
/* @__PURE__ */ w("span", {
|
|
892
|
+
style: je(r.overallConfidence),
|
|
717
893
|
children: [Math.round(r.overallConfidence * 100), "% confidence"]
|
|
718
894
|
})
|
|
719
895
|
]
|
|
720
896
|
}),
|
|
721
|
-
e.errorMessage && /* @__PURE__ */
|
|
897
|
+
e.errorMessage && /* @__PURE__ */ C(n, {
|
|
722
898
|
headingLevel: 4,
|
|
723
899
|
tone: "danger",
|
|
724
900
|
padding: "compact",
|
|
725
901
|
title: "Generation failed",
|
|
726
902
|
description: e.errorMessage,
|
|
727
|
-
icon: /* @__PURE__ */
|
|
903
|
+
icon: /* @__PURE__ */ C(d, { className: "h-icon-sm w-icon-sm" })
|
|
728
904
|
}),
|
|
729
|
-
/* @__PURE__ */
|
|
905
|
+
/* @__PURE__ */ w("div", {
|
|
730
906
|
style: {
|
|
731
907
|
display: "flex",
|
|
732
908
|
flexWrap: "wrap",
|
|
@@ -736,82 +912,82 @@ var R = l(function() {
|
|
|
736
912
|
paddingTop: "var(--space-controlGap)"
|
|
737
913
|
},
|
|
738
914
|
children: [
|
|
739
|
-
a && /* @__PURE__ */
|
|
915
|
+
a && /* @__PURE__ */ w("button", {
|
|
740
916
|
type: "button",
|
|
741
917
|
onClick: () => {
|
|
742
|
-
|
|
918
|
+
o("medium"), $e(e.id);
|
|
743
919
|
},
|
|
744
920
|
disabled: i,
|
|
745
|
-
title:
|
|
921
|
+
title: c("bigconsole.insights.actions.cancelTitle", "Cancel generation"),
|
|
746
922
|
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
923
|
style: {
|
|
748
|
-
...
|
|
924
|
+
...ke,
|
|
749
925
|
cursor: i ? "wait" : "pointer"
|
|
750
926
|
},
|
|
751
927
|
children: [
|
|
752
|
-
/* @__PURE__ */
|
|
928
|
+
/* @__PURE__ */ C(ne, {
|
|
753
929
|
size: 14,
|
|
754
930
|
"aria-hidden": "true"
|
|
755
931
|
}),
|
|
756
932
|
" ",
|
|
757
|
-
|
|
933
|
+
c("bigconsole.insights.actions.cancel", "Cancel")
|
|
758
934
|
]
|
|
759
935
|
}),
|
|
760
|
-
e.status === "COMPLETED" && r && /* @__PURE__ */
|
|
936
|
+
e.status === "COMPLETED" && r && /* @__PURE__ */ w("button", {
|
|
761
937
|
type: "button",
|
|
762
|
-
onClick: () =>
|
|
763
|
-
title:
|
|
938
|
+
onClick: () => H(e),
|
|
939
|
+
title: c("bigconsole.insights.actions.previewTitle", "Preview proposed layout"),
|
|
764
940
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
765
|
-
style:
|
|
941
|
+
style: E,
|
|
766
942
|
children: [
|
|
767
|
-
/* @__PURE__ */
|
|
943
|
+
/* @__PURE__ */ C(re, {
|
|
768
944
|
size: 14,
|
|
769
945
|
"aria-hidden": "true"
|
|
770
946
|
}),
|
|
771
947
|
" ",
|
|
772
|
-
|
|
948
|
+
c("bigconsole.insights.actions.preview", "Preview")
|
|
773
949
|
]
|
|
774
950
|
}),
|
|
775
|
-
e.status === "COMPLETED" && r && /* @__PURE__ */
|
|
951
|
+
e.status === "COMPLETED" && r && /* @__PURE__ */ w("button", {
|
|
776
952
|
type: "button",
|
|
777
953
|
onClick: () => {
|
|
778
|
-
|
|
954
|
+
W(e), K("");
|
|
779
955
|
},
|
|
780
|
-
title:
|
|
956
|
+
title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
781
957
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
782
|
-
style:
|
|
958
|
+
style: E,
|
|
783
959
|
children: [
|
|
784
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ C(_, {
|
|
785
961
|
size: 14,
|
|
786
962
|
"aria-hidden": "true"
|
|
787
963
|
}),
|
|
788
964
|
" ",
|
|
789
|
-
|
|
965
|
+
c("bigconsole.insights.actions.refine", "Refine")
|
|
790
966
|
]
|
|
791
967
|
}),
|
|
792
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */
|
|
968
|
+
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ w("button", {
|
|
793
969
|
type: "button",
|
|
794
970
|
onClick: () => {
|
|
795
|
-
|
|
971
|
+
o("medium"), et(e.id);
|
|
796
972
|
},
|
|
797
973
|
disabled: i,
|
|
798
|
-
title:
|
|
974
|
+
title: c("bigconsole.insights.actions.regenerateTitle", "Regenerate with the same prompt"),
|
|
799
975
|
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
976
|
style: {
|
|
801
|
-
...
|
|
977
|
+
...E,
|
|
802
978
|
cursor: i ? "wait" : "pointer"
|
|
803
979
|
},
|
|
804
980
|
children: [
|
|
805
|
-
/* @__PURE__ */
|
|
981
|
+
/* @__PURE__ */ C(oe, {
|
|
806
982
|
size: 14,
|
|
807
983
|
className: i ? "animate-spin" : "",
|
|
808
984
|
"aria-hidden": "true"
|
|
809
985
|
}),
|
|
810
986
|
" ",
|
|
811
|
-
|
|
987
|
+
c("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
812
988
|
]
|
|
813
989
|
}),
|
|
814
|
-
/* @__PURE__ */
|
|
990
|
+
/* @__PURE__ */ w("div", {
|
|
815
991
|
style: {
|
|
816
992
|
display: "flex",
|
|
817
993
|
flexWrap: "wrap",
|
|
@@ -820,44 +996,44 @@ var R = l(function() {
|
|
|
820
996
|
marginLeft: "auto"
|
|
821
997
|
},
|
|
822
998
|
children: [
|
|
823
|
-
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */
|
|
999
|
+
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ w("button", {
|
|
824
1000
|
type: "button",
|
|
825
|
-
onClick: () =>
|
|
1001
|
+
onClick: () => Ze(e.id),
|
|
826
1002
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
827
|
-
style:
|
|
1003
|
+
style: D,
|
|
828
1004
|
children: [
|
|
829
|
-
|
|
1005
|
+
c("bigconsole.insights.actions.create", "Create dashboard"),
|
|
830
1006
|
" ",
|
|
831
|
-
/* @__PURE__ */
|
|
1007
|
+
/* @__PURE__ */ C(f, {
|
|
832
1008
|
size: 14,
|
|
833
1009
|
"aria-hidden": "true"
|
|
834
1010
|
})
|
|
835
1011
|
]
|
|
836
1012
|
}),
|
|
837
|
-
e.dashboardId && /* @__PURE__ */
|
|
1013
|
+
e.dashboardId && /* @__PURE__ */ w("button", {
|
|
838
1014
|
type: "button",
|
|
839
|
-
onClick: () =>
|
|
1015
|
+
onClick: () => p(`/dashboards/${e.dashboardId ?? ""}`),
|
|
840
1016
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
841
|
-
style:
|
|
1017
|
+
style: E,
|
|
842
1018
|
children: [
|
|
843
|
-
|
|
1019
|
+
c("bigconsole.insights.actions.viewDashboard", "View dashboard"),
|
|
844
1020
|
" ",
|
|
845
|
-
/* @__PURE__ */
|
|
1021
|
+
/* @__PURE__ */ C(f, {
|
|
846
1022
|
size: 14,
|
|
847
1023
|
"aria-hidden": "true"
|
|
848
1024
|
})
|
|
849
1025
|
]
|
|
850
1026
|
}),
|
|
851
|
-
/* @__PURE__ */
|
|
1027
|
+
/* @__PURE__ */ C("button", {
|
|
852
1028
|
type: "button",
|
|
853
1029
|
onClick: () => {
|
|
854
|
-
|
|
1030
|
+
o("medium"), Qe(e.id);
|
|
855
1031
|
},
|
|
856
|
-
title:
|
|
857
|
-
"aria-label":
|
|
1032
|
+
title: c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
1033
|
+
"aria-label": c("bigconsole.insights.actions.deleteTitle", "Delete generation"),
|
|
858
1034
|
className: t,
|
|
859
|
-
style:
|
|
860
|
-
children: /* @__PURE__ */
|
|
1035
|
+
style: O,
|
|
1036
|
+
children: /* @__PURE__ */ C(se, {
|
|
861
1037
|
size: 14,
|
|
862
1038
|
"aria-hidden": "true"
|
|
863
1039
|
})
|
|
@@ -873,11 +1049,11 @@ var R = l(function() {
|
|
|
873
1049
|
})
|
|
874
1050
|
] })]
|
|
875
1051
|
}),
|
|
876
|
-
|
|
1052
|
+
V && $ && /* @__PURE__ */ C("div", {
|
|
877
1053
|
role: "dialog",
|
|
878
1054
|
"aria-modal": "true",
|
|
879
|
-
"aria-label":
|
|
880
|
-
onClick: () =>
|
|
1055
|
+
"aria-label": c("bigconsole.insights.preview.ariaLabel", "Generation preview"),
|
|
1056
|
+
onClick: () => H(null),
|
|
881
1057
|
style: {
|
|
882
1058
|
position: "fixed",
|
|
883
1059
|
inset: 0,
|
|
@@ -888,7 +1064,7 @@ var R = l(function() {
|
|
|
888
1064
|
justifyContent: "center",
|
|
889
1065
|
padding: "var(--space-pagePadding)"
|
|
890
1066
|
},
|
|
891
|
-
children: /* @__PURE__ */
|
|
1067
|
+
children: /* @__PURE__ */ w("div", {
|
|
892
1068
|
onClick: (e) => e.stopPropagation(),
|
|
893
1069
|
style: {
|
|
894
1070
|
display: "flex",
|
|
@@ -902,7 +1078,7 @@ var R = l(function() {
|
|
|
902
1078
|
boxShadow: "var(--shadow-elevation-3)"
|
|
903
1079
|
},
|
|
904
1080
|
children: [
|
|
905
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ w("div", {
|
|
906
1082
|
style: {
|
|
907
1083
|
display: "flex",
|
|
908
1084
|
justifyContent: "space-between",
|
|
@@ -911,16 +1087,16 @@ var R = l(function() {
|
|
|
911
1087
|
padding: "var(--space-cardPadding)",
|
|
912
1088
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
913
1089
|
},
|
|
914
|
-
children: [/* @__PURE__ */
|
|
1090
|
+
children: [/* @__PURE__ */ w("div", {
|
|
915
1091
|
style: { minWidth: 0 },
|
|
916
|
-
children: [/* @__PURE__ */
|
|
1092
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
917
1093
|
style: {
|
|
918
1094
|
fontSize: "var(--font-size-heading-h4)",
|
|
919
1095
|
fontWeight: "var(--font-weight-semibold)",
|
|
920
1096
|
color: "var(--color-text-primary)"
|
|
921
1097
|
},
|
|
922
1098
|
children: $.name
|
|
923
|
-
}), $.description && /* @__PURE__ */
|
|
1099
|
+
}), $.description && /* @__PURE__ */ C("p", {
|
|
924
1100
|
style: {
|
|
925
1101
|
fontSize: "var(--font-size-body-sm)",
|
|
926
1102
|
color: "var(--color-text-secondary)",
|
|
@@ -928,22 +1104,22 @@ var R = l(function() {
|
|
|
928
1104
|
},
|
|
929
1105
|
children: $.description
|
|
930
1106
|
})]
|
|
931
|
-
}), /* @__PURE__ */
|
|
1107
|
+
}), /* @__PURE__ */ C("button", {
|
|
932
1108
|
type: "button",
|
|
933
|
-
onClick: () =>
|
|
934
|
-
"aria-label":
|
|
1109
|
+
onClick: () => H(null),
|
|
1110
|
+
"aria-label": c("bigconsole.insights.preview.close", "Close preview"),
|
|
935
1111
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
936
1112
|
style: {
|
|
937
|
-
...
|
|
1113
|
+
...O,
|
|
938
1114
|
color: "var(--color-text-muted)"
|
|
939
1115
|
},
|
|
940
|
-
children: /* @__PURE__ */
|
|
1116
|
+
children: /* @__PURE__ */ C(ce, {
|
|
941
1117
|
size: 18,
|
|
942
1118
|
"aria-hidden": "true"
|
|
943
1119
|
})
|
|
944
1120
|
})]
|
|
945
1121
|
}),
|
|
946
|
-
/* @__PURE__ */
|
|
1122
|
+
/* @__PURE__ */ w("div", {
|
|
947
1123
|
style: {
|
|
948
1124
|
flex: "1 1 auto",
|
|
949
1125
|
minHeight: 0,
|
|
@@ -953,68 +1129,139 @@ var R = l(function() {
|
|
|
953
1129
|
flexDirection: "column",
|
|
954
1130
|
gap: "var(--space-controlGap)"
|
|
955
1131
|
},
|
|
956
|
-
children: [
|
|
957
|
-
|
|
958
|
-
display: "flex",
|
|
959
|
-
flexWrap: "wrap",
|
|
960
|
-
gap: "var(--space-iconGap)"
|
|
961
|
-
},
|
|
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,
|
|
991
|
-
children: [
|
|
992
|
-
e.widgets.length,
|
|
993
|
-
" widget",
|
|
994
|
-
e.widgets.length === 1 ? "" : "s"
|
|
995
|
-
]
|
|
996
|
-
}),
|
|
997
|
-
children: /* @__PURE__ */ w("div", {
|
|
1132
|
+
children: [
|
|
1133
|
+
/* @__PURE__ */ w("div", {
|
|
998
1134
|
style: {
|
|
999
1135
|
display: "flex",
|
|
1000
1136
|
flexWrap: "wrap",
|
|
1001
1137
|
gap: "var(--space-iconGap)"
|
|
1002
1138
|
},
|
|
1003
|
-
children:
|
|
1139
|
+
children: [
|
|
1140
|
+
/* @__PURE__ */ w("span", {
|
|
1141
|
+
style: j,
|
|
1142
|
+
children: [
|
|
1143
|
+
I($),
|
|
1144
|
+
" widget",
|
|
1145
|
+
I($) === 1 ? "" : "s"
|
|
1146
|
+
]
|
|
1147
|
+
}),
|
|
1148
|
+
/* @__PURE__ */ w("span", {
|
|
1149
|
+
style: j,
|
|
1150
|
+
children: [
|
|
1151
|
+
$.pages.length,
|
|
1152
|
+
" page",
|
|
1153
|
+
$.pages.length === 1 ? "" : "s"
|
|
1154
|
+
]
|
|
1155
|
+
}),
|
|
1156
|
+
/* @__PURE__ */ w("span", {
|
|
1157
|
+
style: je($.overallConfidence),
|
|
1158
|
+
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
1159
|
+
})
|
|
1160
|
+
]
|
|
1161
|
+
}),
|
|
1162
|
+
$.reasoning && /* @__PURE__ */ w("details", {
|
|
1163
|
+
"data-testid": "preview-reasoning",
|
|
1164
|
+
children: [/* @__PURE__ */ C("summary", {
|
|
1165
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1166
|
+
style: {
|
|
1167
|
+
cursor: "pointer",
|
|
1168
|
+
fontSize: "var(--font-size-body-sm)",
|
|
1169
|
+
fontWeight: "var(--font-weight-medium)",
|
|
1170
|
+
color: "var(--color-text-secondary)",
|
|
1171
|
+
borderRadius: "var(--radius-button)"
|
|
1172
|
+
},
|
|
1173
|
+
children: c("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
|
|
1174
|
+
}), /* @__PURE__ */ C("p", {
|
|
1004
1175
|
style: {
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1176
|
+
marginTop: "var(--space-controlGap)",
|
|
1177
|
+
fontSize: "var(--font-size-body-sm)",
|
|
1178
|
+
lineHeight: "var(--font-lineHeight-normal)",
|
|
1179
|
+
color: "var(--color-text-secondary)"
|
|
1008
1180
|
},
|
|
1009
|
-
children:
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1181
|
+
children: $.reasoning
|
|
1182
|
+
})]
|
|
1183
|
+
}),
|
|
1184
|
+
$.pages.map((e, t) => /* @__PURE__ */ C(n, {
|
|
1185
|
+
emphasis: "muted",
|
|
1186
|
+
padding: "compact",
|
|
1187
|
+
headingLevel: 3,
|
|
1188
|
+
title: e.name,
|
|
1189
|
+
meta: /* @__PURE__ */ w("span", {
|
|
1190
|
+
style: j,
|
|
1191
|
+
children: [
|
|
1192
|
+
e.widgets.length,
|
|
1193
|
+
" widget",
|
|
1194
|
+
e.widgets.length === 1 ? "" : "s"
|
|
1195
|
+
]
|
|
1196
|
+
}),
|
|
1197
|
+
children: /* @__PURE__ */ C("div", {
|
|
1198
|
+
style: {
|
|
1199
|
+
display: "flex",
|
|
1200
|
+
flexDirection: "column",
|
|
1201
|
+
gap: "var(--space-controlGap)"
|
|
1202
|
+
},
|
|
1203
|
+
children: e.widgets.map((e, t) => {
|
|
1204
|
+
let n = Me(e.confidence);
|
|
1205
|
+
return /* @__PURE__ */ w("div", {
|
|
1206
|
+
style: {
|
|
1207
|
+
display: "flex",
|
|
1208
|
+
flexDirection: "column",
|
|
1209
|
+
gap: "2px",
|
|
1210
|
+
padding: "var(--space-controlGap)",
|
|
1211
|
+
borderRadius: "var(--radius-input)",
|
|
1212
|
+
backgroundColor: "var(--color-bg-surface)",
|
|
1213
|
+
border: "1px solid var(--color-border-subtle)"
|
|
1214
|
+
},
|
|
1215
|
+
children: [/* @__PURE__ */ w("div", {
|
|
1216
|
+
style: {
|
|
1217
|
+
display: "flex",
|
|
1218
|
+
flexWrap: "wrap",
|
|
1219
|
+
alignItems: "center",
|
|
1220
|
+
gap: "var(--space-iconGap)"
|
|
1221
|
+
},
|
|
1222
|
+
children: [
|
|
1223
|
+
/* @__PURE__ */ C("span", {
|
|
1224
|
+
style: {
|
|
1225
|
+
fontSize: "var(--font-size-body-sm)",
|
|
1226
|
+
fontWeight: "var(--font-weight-medium)",
|
|
1227
|
+
color: "var(--color-text-primary)",
|
|
1228
|
+
minWidth: 0
|
|
1229
|
+
},
|
|
1230
|
+
children: e.title
|
|
1231
|
+
}),
|
|
1232
|
+
/* @__PURE__ */ C("span", {
|
|
1233
|
+
style: {
|
|
1234
|
+
fontSize: "var(--font-size-xs)",
|
|
1235
|
+
color: "var(--color-text-muted)"
|
|
1236
|
+
},
|
|
1237
|
+
"data-testid": "preview-widget-type",
|
|
1238
|
+
children: e.type
|
|
1239
|
+
}),
|
|
1240
|
+
n && /* @__PURE__ */ C("span", {
|
|
1241
|
+
style: {
|
|
1242
|
+
...Pe(n),
|
|
1243
|
+
marginLeft: "auto"
|
|
1244
|
+
},
|
|
1245
|
+
"data-testid": "preview-widget-confidence",
|
|
1246
|
+
children: n
|
|
1247
|
+
})
|
|
1248
|
+
]
|
|
1249
|
+
}), e.reasoning && /* @__PURE__ */ C("p", {
|
|
1250
|
+
style: {
|
|
1251
|
+
margin: 0,
|
|
1252
|
+
fontSize: "var(--font-size-xs)",
|
|
1253
|
+
lineHeight: "var(--font-lineHeight-normal)",
|
|
1254
|
+
color: "var(--color-text-muted)"
|
|
1255
|
+
},
|
|
1256
|
+
children: e.reasoning
|
|
1257
|
+
})]
|
|
1258
|
+
}, t);
|
|
1259
|
+
})
|
|
1260
|
+
})
|
|
1261
|
+
}, t))
|
|
1262
|
+
]
|
|
1016
1263
|
}),
|
|
1017
|
-
/* @__PURE__ */
|
|
1264
|
+
/* @__PURE__ */ w("div", {
|
|
1018
1265
|
style: {
|
|
1019
1266
|
display: "flex",
|
|
1020
1267
|
justifyContent: "flex-end",
|
|
@@ -1023,38 +1270,59 @@ var R = l(function() {
|
|
|
1023
1270
|
padding: "var(--space-cardPadding)",
|
|
1024
1271
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1025
1272
|
},
|
|
1026
|
-
children: [
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1273
|
+
children: [
|
|
1274
|
+
/* @__PURE__ */ C("button", {
|
|
1275
|
+
type: "button",
|
|
1276
|
+
onClick: () => H(null),
|
|
1277
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1278
|
+
style: E,
|
|
1279
|
+
children: "Close"
|
|
1280
|
+
}),
|
|
1281
|
+
V.status === "COMPLETED" && $ && /* @__PURE__ */ w("button", {
|
|
1282
|
+
type: "button",
|
|
1283
|
+
onClick: () => {
|
|
1284
|
+
let e = V;
|
|
1285
|
+
H(null), W(e), K("");
|
|
1286
|
+
},
|
|
1287
|
+
title: c("bigconsole.insights.actions.refineTitle", "Refine with instructions"),
|
|
1288
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1289
|
+
style: E,
|
|
1290
|
+
children: [
|
|
1291
|
+
/* @__PURE__ */ C(_, {
|
|
1292
|
+
size: 14,
|
|
1293
|
+
"aria-hidden": "true"
|
|
1294
|
+
}),
|
|
1295
|
+
" ",
|
|
1296
|
+
c("bigconsole.insights.actions.refine", "Refine")
|
|
1297
|
+
]
|
|
1298
|
+
}),
|
|
1299
|
+
V.status === "COMPLETED" && !V.dashboardId && /* @__PURE__ */ w("button", {
|
|
1300
|
+
type: "button",
|
|
1301
|
+
onClick: () => {
|
|
1302
|
+
let e = V.id;
|
|
1303
|
+
H(null), Ze(e);
|
|
1304
|
+
},
|
|
1305
|
+
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1306
|
+
style: D,
|
|
1307
|
+
children: [
|
|
1308
|
+
c("bigconsole.insights.actions.create", "Create dashboard"),
|
|
1309
|
+
" ",
|
|
1310
|
+
/* @__PURE__ */ C(f, {
|
|
1311
|
+
size: 14,
|
|
1312
|
+
"aria-hidden": "true"
|
|
1313
|
+
})
|
|
1314
|
+
]
|
|
1315
|
+
})
|
|
1316
|
+
]
|
|
1049
1317
|
})
|
|
1050
1318
|
]
|
|
1051
1319
|
})
|
|
1052
1320
|
}),
|
|
1053
|
-
|
|
1321
|
+
U && /* @__PURE__ */ C("div", {
|
|
1054
1322
|
role: "dialog",
|
|
1055
1323
|
"aria-modal": "true",
|
|
1056
|
-
"aria-label":
|
|
1057
|
-
onClick: () =>
|
|
1324
|
+
"aria-label": c("bigconsole.insights.refine.ariaLabel", "Refine generation"),
|
|
1325
|
+
onClick: () => W(null),
|
|
1058
1326
|
style: {
|
|
1059
1327
|
position: "fixed",
|
|
1060
1328
|
inset: 0,
|
|
@@ -1065,7 +1333,7 @@ var R = l(function() {
|
|
|
1065
1333
|
justifyContent: "center",
|
|
1066
1334
|
padding: "var(--space-pagePadding)"
|
|
1067
1335
|
},
|
|
1068
|
-
children: /* @__PURE__ */
|
|
1336
|
+
children: /* @__PURE__ */ w("div", {
|
|
1069
1337
|
onClick: (e) => e.stopPropagation(),
|
|
1070
1338
|
style: {
|
|
1071
1339
|
display: "flex",
|
|
@@ -1079,28 +1347,28 @@ var R = l(function() {
|
|
|
1079
1347
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1080
1348
|
},
|
|
1081
1349
|
children: [
|
|
1082
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ w("div", {
|
|
1083
1351
|
style: {
|
|
1084
1352
|
padding: "var(--space-cardPadding)",
|
|
1085
1353
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1086
1354
|
},
|
|
1087
|
-
children: [/* @__PURE__ */
|
|
1355
|
+
children: [/* @__PURE__ */ C("h2", {
|
|
1088
1356
|
style: {
|
|
1089
1357
|
fontSize: "var(--font-size-heading-h4)",
|
|
1090
1358
|
fontWeight: "var(--font-weight-semibold)",
|
|
1091
1359
|
color: "var(--color-text-primary)"
|
|
1092
1360
|
},
|
|
1093
|
-
children:
|
|
1094
|
-
}), /* @__PURE__ */
|
|
1361
|
+
children: c("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1362
|
+
}), /* @__PURE__ */ C("p", {
|
|
1095
1363
|
style: {
|
|
1096
1364
|
fontSize: "var(--font-size-body-sm)",
|
|
1097
1365
|
color: "var(--color-text-secondary)",
|
|
1098
1366
|
marginTop: 2
|
|
1099
1367
|
},
|
|
1100
|
-
children:
|
|
1368
|
+
children: c("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1101
1369
|
})]
|
|
1102
1370
|
}),
|
|
1103
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ w("div", {
|
|
1104
1372
|
style: {
|
|
1105
1373
|
flex: "1 1 auto",
|
|
1106
1374
|
minHeight: 0,
|
|
@@ -1110,20 +1378,20 @@ var R = l(function() {
|
|
|
1110
1378
|
flexDirection: "column",
|
|
1111
1379
|
gap: "var(--space-controlGap)"
|
|
1112
1380
|
},
|
|
1113
|
-
children: [/* @__PURE__ */
|
|
1381
|
+
children: [/* @__PURE__ */ C(n, {
|
|
1114
1382
|
emphasis: "muted",
|
|
1115
1383
|
padding: "compact",
|
|
1116
1384
|
headingLevel: 3,
|
|
1117
|
-
title:
|
|
1118
|
-
description:
|
|
1119
|
-
icon: /* @__PURE__ */
|
|
1120
|
-
}), /* @__PURE__ */
|
|
1385
|
+
title: U.generatedSpec?.name || "Current proposal",
|
|
1386
|
+
description: U.prompt.length > 240 ? `${U.prompt.slice(0, 240)}…` : U.prompt,
|
|
1387
|
+
icon: /* @__PURE__ */ C(g, { className: "h-icon-sm w-icon-sm" })
|
|
1388
|
+
}), /* @__PURE__ */ w("div", {
|
|
1121
1389
|
style: {
|
|
1122
1390
|
display: "flex",
|
|
1123
1391
|
flexDirection: "column",
|
|
1124
1392
|
gap: "var(--space-controlGap)"
|
|
1125
1393
|
},
|
|
1126
|
-
children: [/* @__PURE__ */
|
|
1394
|
+
children: [/* @__PURE__ */ C("label", {
|
|
1127
1395
|
htmlFor: "refine-input",
|
|
1128
1396
|
style: {
|
|
1129
1397
|
display: "block",
|
|
@@ -1132,13 +1400,13 @@ var R = l(function() {
|
|
|
1132
1400
|
color: "var(--color-text-primary)"
|
|
1133
1401
|
},
|
|
1134
1402
|
children: "What should change?"
|
|
1135
|
-
}), /* @__PURE__ */
|
|
1403
|
+
}), /* @__PURE__ */ C("textarea", {
|
|
1136
1404
|
id: "refine-input",
|
|
1137
|
-
value:
|
|
1138
|
-
onChange: (e) =>
|
|
1405
|
+
value: G,
|
|
1406
|
+
onChange: (e) => K(e.target.value),
|
|
1139
1407
|
maxLength: 2e3,
|
|
1140
1408
|
rows: 4,
|
|
1141
|
-
placeholder:
|
|
1409
|
+
placeholder: c("bigconsole.insights.refine.placeholder", "e.g., Add a revenue-by-region map and remove the duplicate KPI cards"),
|
|
1142
1410
|
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
1411
|
style: {
|
|
1144
1412
|
width: "100%",
|
|
@@ -1154,7 +1422,7 @@ var R = l(function() {
|
|
|
1154
1422
|
})]
|
|
1155
1423
|
})]
|
|
1156
1424
|
}),
|
|
1157
|
-
/* @__PURE__ */
|
|
1425
|
+
/* @__PURE__ */ w("div", {
|
|
1158
1426
|
style: {
|
|
1159
1427
|
display: "flex",
|
|
1160
1428
|
justifyContent: "flex-end",
|
|
@@ -1163,30 +1431,30 @@ var R = l(function() {
|
|
|
1163
1431
|
padding: "var(--space-cardPadding)",
|
|
1164
1432
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1165
1433
|
},
|
|
1166
|
-
children: [/* @__PURE__ */
|
|
1434
|
+
children: [/* @__PURE__ */ C("button", {
|
|
1167
1435
|
type: "button",
|
|
1168
|
-
onClick: () =>
|
|
1436
|
+
onClick: () => W(null),
|
|
1169
1437
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1170
|
-
style:
|
|
1171
|
-
children:
|
|
1172
|
-
}), /* @__PURE__ */
|
|
1438
|
+
style: E,
|
|
1439
|
+
children: c("bigconsole.insights.actions.cancel", "Cancel")
|
|
1440
|
+
}), /* @__PURE__ */ w("button", {
|
|
1173
1441
|
type: "button",
|
|
1174
|
-
onClick: () => void
|
|
1175
|
-
disabled: !
|
|
1442
|
+
onClick: () => void tt(),
|
|
1443
|
+
disabled: !G.trim() || B.has(U.id),
|
|
1176
1444
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1177
1445
|
style: {
|
|
1178
|
-
...
|
|
1179
|
-
cursor: !
|
|
1180
|
-
opacity:
|
|
1446
|
+
...D,
|
|
1447
|
+
cursor: !G.trim() || B.has(U.id) ? "not-allowed" : "pointer",
|
|
1448
|
+
opacity: G.trim() ? 1 : .6
|
|
1181
1449
|
},
|
|
1182
|
-
children: [
|
|
1450
|
+
children: [B.has(U.id) ? /* @__PURE__ */ C(h, {
|
|
1183
1451
|
size: 14,
|
|
1184
1452
|
className: "animate-spin",
|
|
1185
1453
|
"aria-hidden": "true"
|
|
1186
|
-
}) : /* @__PURE__ */
|
|
1454
|
+
}) : /* @__PURE__ */ C(_, {
|
|
1187
1455
|
size: 14,
|
|
1188
1456
|
"aria-hidden": "true"
|
|
1189
|
-
}),
|
|
1457
|
+
}), c("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
1190
1458
|
})]
|
|
1191
1459
|
})
|
|
1192
1460
|
]
|
|
@@ -1196,6 +1464,6 @@ var R = l(function() {
|
|
|
1196
1464
|
});
|
|
1197
1465
|
});
|
|
1198
1466
|
//#endregion
|
|
1199
|
-
export {
|
|
1467
|
+
export { L as InsightsPage, L as default };
|
|
1200
1468
|
|
|
1201
1469
|
//# sourceMappingURL=InsightsPage.js.map
|