@burdenoff/microfe-bigconsole 2026.1008.12 → 2026.1008.13
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/assistantProduct.d.ts.map +1 -1
- package/dist/bigconsole/assistant/assistantProduct.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +505 -504
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +8 -8
- package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +373 -359
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
- package/dist/bigconsole/utils/insightsDraft.d.ts +30 -0
- package/dist/bigconsole/utils/insightsDraft.d.ts.map +1 -0
- package/dist/bigconsole/utils/insightsDraft.js +10 -0
- package/dist/bigconsole/utils/insightsDraft.js.map +1 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts +17 -0
- package/dist/bigconsole/utils/widgetFormDirty.d.ts.map +1 -0
- package/dist/bigconsole/utils/widgetFormDirty.js +15 -0
- package/dist/bigconsole/utils/widgetFormDirty.js.map +1 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -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 {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
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";
|
|
17
|
+
import { jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
18
|
+
import { gql as S } from "@apollo/client";
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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 = C`
|
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
-
return /* @__PURE__ */
|
|
308
|
+
var Ie = ({ status: e }) => {
|
|
309
|
+
let { t } = _(), n = A[k(e)];
|
|
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
|
-
}),
|
|
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
|
-
p,
|
|
459
|
+
Ze,
|
|
447
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,27 +520,27 @@ 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
|
-
]),
|
|
518
|
-
|
|
519
|
-
}, []), $ =
|
|
520
|
-
return /* @__PURE__ */
|
|
531
|
+
]), lt = c((e) => {
|
|
532
|
+
S(e);
|
|
533
|
+
}, []), $ = B?.generatedSpec;
|
|
534
|
+
return /* @__PURE__ */ x("div", {
|
|
521
535
|
"data-tour": "bigconsole-ai-insights",
|
|
522
536
|
className: "min-w-0",
|
|
523
537
|
style: { backgroundColor: "var(--color-bg-canvas)" },
|
|
524
538
|
children: [
|
|
525
|
-
/* @__PURE__ */
|
|
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__ */
|
|
541
|
+
children: [/* @__PURE__ */ b(fe, { intensity: "subtle" }), /* @__PURE__ */ b("div", {
|
|
528
542
|
style: { padding: "var(--space-pagePadding)" },
|
|
529
|
-
children: /* @__PURE__ */
|
|
543
|
+
children: /* @__PURE__ */ x("div", {
|
|
530
544
|
style: {
|
|
531
545
|
display: "flex",
|
|
532
546
|
alignItems: "center",
|
|
@@ -534,7 +548,7 @@ var F = s(function() {
|
|
|
534
548
|
flexWrap: "wrap",
|
|
535
549
|
minWidth: 0
|
|
536
550
|
},
|
|
537
|
-
children: [/* @__PURE__ */
|
|
551
|
+
children: [/* @__PURE__ */ b("div", {
|
|
538
552
|
style: {
|
|
539
553
|
display: "flex",
|
|
540
554
|
height: "var(--size-controlHeight-lg)",
|
|
@@ -545,17 +559,17 @@ var F = s(function() {
|
|
|
545
559
|
borderRadius: "var(--radius-card)",
|
|
546
560
|
backgroundColor: "var(--color-action-primary-bg)"
|
|
547
561
|
},
|
|
548
|
-
children: /* @__PURE__ */
|
|
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)"
|
|
552
566
|
} })
|
|
553
|
-
}), /* @__PURE__ */
|
|
567
|
+
}), /* @__PURE__ */ x("div", {
|
|
554
568
|
style: { minWidth: 0 },
|
|
555
|
-
children: [/* @__PURE__ */
|
|
569
|
+
children: [/* @__PURE__ */ b("h1", {
|
|
556
570
|
className: "m-0 text-2xl font-bold text-text-primary",
|
|
557
|
-
children: /* @__PURE__ */
|
|
558
|
-
}), /* @__PURE__ */
|
|
571
|
+
children: /* @__PURE__ */ b(me, { children: s("bigconsole.insights.header.title", "AI Insights") })
|
|
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")
|
|
561
575
|
})]
|
|
@@ -563,47 +577,47 @@ var F = s(function() {
|
|
|
563
577
|
})
|
|
564
578
|
})]
|
|
565
579
|
}),
|
|
566
|
-
/* @__PURE__ */
|
|
580
|
+
/* @__PURE__ */ x("div", {
|
|
567
581
|
style: { padding: "var(--space-pagePadding)" },
|
|
568
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
572
|
-
|
|
585
|
+
}), /* @__PURE__ */ x(i, { children: [
|
|
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__ */
|
|
591
|
+
description: I,
|
|
592
|
+
icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" }),
|
|
579
593
|
"data-testid": "insights-error",
|
|
580
|
-
actions: /* @__PURE__ */
|
|
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
|
-
children: /* @__PURE__ */
|
|
605
|
+
children: /* @__PURE__ */ b(r, {
|
|
592
606
|
tone: "danger",
|
|
593
607
|
padding: "compact",
|
|
594
608
|
headingLevel: 2,
|
|
595
609
|
title: s("bigconsole.insights.error.loadFailed", "AI Insights could not be loaded"),
|
|
596
610
|
description: s("bigconsole.insights.error.loadFailedDescription", "Your saved generations and suggestions may be unavailable. Retry the failed request."),
|
|
597
611
|
"data-testid": "insights-load-error",
|
|
598
|
-
actions: /* @__PURE__ */
|
|
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__ */
|
|
620
|
+
/* @__PURE__ */ b(le, {
|
|
607
621
|
size: 14,
|
|
608
622
|
"aria-hidden": "true"
|
|
609
623
|
}),
|
|
@@ -613,22 +627,22 @@ var F = s(function() {
|
|
|
613
627
|
})
|
|
614
628
|
})
|
|
615
629
|
}),
|
|
616
|
-
/* @__PURE__ */
|
|
630
|
+
/* @__PURE__ */ b(r, {
|
|
617
631
|
id: "insights-prompt",
|
|
618
632
|
emphasis: "primary",
|
|
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__ */
|
|
636
|
+
icon: /* @__PURE__ */ b(m, { className: "h-icon-sm w-icon-sm" }),
|
|
623
637
|
"data-testid": "insights-prompt",
|
|
624
|
-
children: /* @__PURE__ */
|
|
638
|
+
children: /* @__PURE__ */ x("div", {
|
|
625
639
|
style: {
|
|
626
640
|
display: "flex",
|
|
627
641
|
flexDirection: "column",
|
|
628
642
|
gap: "var(--space-controlGap)"
|
|
629
643
|
},
|
|
630
644
|
children: [
|
|
631
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ b("label", {
|
|
632
646
|
htmlFor: "prompt-input",
|
|
633
647
|
style: {
|
|
634
648
|
display: "block",
|
|
@@ -638,10 +652,10 @@ var F = s(function() {
|
|
|
638
652
|
},
|
|
639
653
|
children: s("bigconsole.insights.prompt.label", "Your prompt")
|
|
640
654
|
}),
|
|
641
|
-
/* @__PURE__ */
|
|
655
|
+
/* @__PURE__ */ b("textarea", {
|
|
642
656
|
id: "prompt-input",
|
|
643
|
-
value:
|
|
644
|
-
onChange: (e) =>
|
|
657
|
+
value: g,
|
|
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,
|
|
647
661
|
maxLength: 2e3,
|
|
@@ -658,10 +672,10 @@ 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
|
-
/* @__PURE__ */
|
|
678
|
+
/* @__PURE__ */ x("div", {
|
|
665
679
|
role: "group",
|
|
666
680
|
"aria-label": s("bigconsole.insights.prompt.optionsLabel", "Generation options"),
|
|
667
681
|
"data-testid": "insights-generation-options",
|
|
@@ -671,69 +685,69 @@ var F = s(function() {
|
|
|
671
685
|
gap: "var(--space-controlGap)"
|
|
672
686
|
},
|
|
673
687
|
children: [
|
|
674
|
-
/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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
|
-
/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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))
|
|
733
747
|
})] })
|
|
734
748
|
]
|
|
735
749
|
}),
|
|
736
|
-
/* @__PURE__ */
|
|
750
|
+
/* @__PURE__ */ x("div", {
|
|
737
751
|
style: {
|
|
738
752
|
display: "flex",
|
|
739
753
|
alignItems: "center",
|
|
@@ -742,7 +756,7 @@ var F = s(function() {
|
|
|
742
756
|
borderTop: "1px solid var(--color-border-subtle)",
|
|
743
757
|
paddingTop: "var(--space-controlGap)"
|
|
744
758
|
},
|
|
745
|
-
children: [/* @__PURE__ */
|
|
759
|
+
children: [/* @__PURE__ */ x("span", {
|
|
746
760
|
style: {
|
|
747
761
|
flex: "1 1 12rem",
|
|
748
762
|
minWidth: 0,
|
|
@@ -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
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
787
|
+
}) : /* @__PURE__ */ b(m, {
|
|
774
788
|
size: 16,
|
|
775
789
|
"aria-hidden": "true"
|
|
776
790
|
}), s("bigconsole.insights.prompt.generateButton", "Generate dashboard")]
|
|
@@ -779,22 +793,22 @@ 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__ */
|
|
801
|
+
icon: /* @__PURE__ */ b(ce, { className: "h-icon-sm w-icon-sm" }),
|
|
788
802
|
"data-testid": "insights-suggestions",
|
|
789
|
-
children: /* @__PURE__ */
|
|
803
|
+
children: /* @__PURE__ */ b("div", {
|
|
790
804
|
style: {
|
|
791
805
|
display: "grid",
|
|
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",
|
|
@@ -807,7 +821,7 @@ var F = s(function() {
|
|
|
807
821
|
cursor: "pointer"
|
|
808
822
|
},
|
|
809
823
|
children: [
|
|
810
|
-
/* @__PURE__ */
|
|
824
|
+
/* @__PURE__ */ b("span", {
|
|
811
825
|
style: {
|
|
812
826
|
display: "block",
|
|
813
827
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -817,7 +831,7 @@ var F = s(function() {
|
|
|
817
831
|
},
|
|
818
832
|
children: e.title
|
|
819
833
|
}),
|
|
820
|
-
/* @__PURE__ */
|
|
834
|
+
/* @__PURE__ */ b("span", {
|
|
821
835
|
style: {
|
|
822
836
|
display: "block",
|
|
823
837
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -826,15 +840,15 @@ var F = s(function() {
|
|
|
826
840
|
},
|
|
827
841
|
children: e.exampleDescription || e.prompt
|
|
828
842
|
}),
|
|
829
|
-
e.tags.length > 0 && /* @__PURE__ */
|
|
843
|
+
e.tags.length > 0 && /* @__PURE__ */ b("span", {
|
|
830
844
|
style: {
|
|
831
845
|
display: "flex",
|
|
832
846
|
gap: "var(--space-iconGap)",
|
|
833
847
|
marginTop: "var(--space-controlGap)",
|
|
834
848
|
flexWrap: "wrap"
|
|
835
849
|
},
|
|
836
|
-
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */
|
|
837
|
-
style:
|
|
850
|
+
children: e.tags.slice(0, 3).map((e) => /* @__PURE__ */ b("span", {
|
|
851
|
+
style: O,
|
|
838
852
|
children: e
|
|
839
853
|
}, e))
|
|
840
854
|
})
|
|
@@ -842,29 +856,29 @@ var F = s(function() {
|
|
|
842
856
|
}, e.id))
|
|
843
857
|
})
|
|
844
858
|
}),
|
|
845
|
-
/* @__PURE__ */
|
|
859
|
+
/* @__PURE__ */ b(r, {
|
|
846
860
|
emphasis: "bare",
|
|
847
861
|
padding: "none",
|
|
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__ */
|
|
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",
|
|
865
879
|
className: "min-h-[10rem]",
|
|
866
880
|
"data-testid": "insights-generations-loading",
|
|
867
|
-
children: /* @__PURE__ */
|
|
881
|
+
children: /* @__PURE__ */ x("div", {
|
|
868
882
|
style: {
|
|
869
883
|
display: "flex",
|
|
870
884
|
minHeight: "8rem",
|
|
@@ -874,84 +888,84 @@ var F = s(function() {
|
|
|
874
888
|
gap: "var(--space-controlGap)",
|
|
875
889
|
color: "var(--color-text-muted)"
|
|
876
890
|
},
|
|
877
|
-
children: [/* @__PURE__ */
|
|
891
|
+
children: [/* @__PURE__ */ b(p, {
|
|
878
892
|
size: 24,
|
|
879
893
|
className: "animate-spin",
|
|
880
894
|
"aria-hidden": "true"
|
|
881
|
-
}), /* @__PURE__ */
|
|
895
|
+
}), /* @__PURE__ */ b("p", {
|
|
882
896
|
style: { fontSize: "var(--font-size-body-sm)" },
|
|
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__ */
|
|
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
|
-
}) : /* @__PURE__ */
|
|
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__ */
|
|
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 =
|
|
907
|
-
return /* @__PURE__ */
|
|
919
|
+
}), Q.map((e) => {
|
|
920
|
+
let t = e.generatedSpec, i = R.has(e.id), a = Ee.includes(e.status);
|
|
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__ */
|
|
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",
|
|
916
930
|
children: [
|
|
917
|
-
t && /* @__PURE__ */
|
|
931
|
+
t && /* @__PURE__ */ x("div", {
|
|
918
932
|
style: {
|
|
919
933
|
display: "flex",
|
|
920
934
|
flexWrap: "wrap",
|
|
921
935
|
gap: "var(--space-iconGap)"
|
|
922
936
|
},
|
|
923
937
|
children: [
|
|
924
|
-
/* @__PURE__ */
|
|
925
|
-
style:
|
|
938
|
+
/* @__PURE__ */ x("span", {
|
|
939
|
+
style: O,
|
|
926
940
|
children: [
|
|
927
|
-
|
|
941
|
+
M(t),
|
|
928
942
|
" widget",
|
|
929
|
-
|
|
943
|
+
M(t) === 1 ? "" : "s"
|
|
930
944
|
]
|
|
931
945
|
}),
|
|
932
|
-
/* @__PURE__ */
|
|
933
|
-
style:
|
|
946
|
+
/* @__PURE__ */ x("span", {
|
|
947
|
+
style: O,
|
|
934
948
|
children: [
|
|
935
949
|
t.pages.length,
|
|
936
950
|
" page",
|
|
937
951
|
t.pages.length === 1 ? "" : "s"
|
|
938
952
|
]
|
|
939
953
|
}),
|
|
940
|
-
/* @__PURE__ */
|
|
941
|
-
style:
|
|
954
|
+
/* @__PURE__ */ x("span", {
|
|
955
|
+
style: Le(t.overallConfidence),
|
|
942
956
|
children: [Math.round(t.overallConfidence * 100), "% confidence"]
|
|
943
957
|
})
|
|
944
958
|
]
|
|
945
959
|
}),
|
|
946
|
-
e.errorMessage && /* @__PURE__ */
|
|
960
|
+
e.errorMessage && /* @__PURE__ */ b(r, {
|
|
947
961
|
headingLevel: 4,
|
|
948
962
|
tone: "danger",
|
|
949
963
|
padding: "compact",
|
|
950
964
|
title: "Generation failed",
|
|
951
965
|
description: e.errorMessage,
|
|
952
|
-
icon: /* @__PURE__ */
|
|
966
|
+
icon: /* @__PURE__ */ b(ie, { className: "h-icon-sm w-icon-sm" })
|
|
953
967
|
}),
|
|
954
|
-
/* @__PURE__ */
|
|
968
|
+
/* @__PURE__ */ x("div", {
|
|
955
969
|
style: {
|
|
956
970
|
display: "flex",
|
|
957
971
|
flexWrap: "wrap",
|
|
@@ -961,20 +975,20 @@ var F = s(function() {
|
|
|
961
975
|
paddingTop: "var(--space-controlGap)"
|
|
962
976
|
},
|
|
963
977
|
children: [
|
|
964
|
-
a && /* @__PURE__ */
|
|
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__ */
|
|
991
|
+
/* @__PURE__ */ b(ae, {
|
|
978
992
|
size: 14,
|
|
979
993
|
"aria-hidden": "true"
|
|
980
994
|
}),
|
|
@@ -982,14 +996,14 @@ var F = s(function() {
|
|
|
982
996
|
s("bigconsole.insights.actions.cancel", "Cancel")
|
|
983
997
|
]
|
|
984
998
|
}),
|
|
985
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
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__ */
|
|
1006
|
+
/* @__PURE__ */ b(oe, {
|
|
993
1007
|
size: 14,
|
|
994
1008
|
"aria-hidden": "true"
|
|
995
1009
|
}),
|
|
@@ -997,16 +1011,16 @@ var F = s(function() {
|
|
|
997
1011
|
s("bigconsole.insights.actions.preview", "Preview")
|
|
998
1012
|
]
|
|
999
1013
|
}),
|
|
1000
|
-
e.status === "COMPLETED" && t && /* @__PURE__ */
|
|
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__ */
|
|
1023
|
+
/* @__PURE__ */ b(h, {
|
|
1010
1024
|
size: 14,
|
|
1011
1025
|
"aria-hidden": "true"
|
|
1012
1026
|
}),
|
|
@@ -1014,20 +1028,20 @@ var F = s(function() {
|
|
|
1014
1028
|
s("bigconsole.insights.actions.refine", "Refine")
|
|
1015
1029
|
]
|
|
1016
1030
|
}),
|
|
1017
|
-
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */
|
|
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__ */
|
|
1044
|
+
/* @__PURE__ */ b(le, {
|
|
1031
1045
|
size: 14,
|
|
1032
1046
|
className: i ? "animate-spin" : "",
|
|
1033
1047
|
"aria-hidden": "true"
|
|
@@ -1036,7 +1050,7 @@ var F = s(function() {
|
|
|
1036
1050
|
s("bigconsole.insights.actions.regenerate", "Regenerate")
|
|
1037
1051
|
]
|
|
1038
1052
|
}),
|
|
1039
|
-
/* @__PURE__ */
|
|
1053
|
+
/* @__PURE__ */ x("div", {
|
|
1040
1054
|
style: {
|
|
1041
1055
|
display: "flex",
|
|
1042
1056
|
flexWrap: "wrap",
|
|
@@ -1045,44 +1059,44 @@ var F = s(function() {
|
|
|
1045
1059
|
marginLeft: "auto"
|
|
1046
1060
|
},
|
|
1047
1061
|
children: [
|
|
1048
|
-
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */
|
|
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__ */
|
|
1070
|
+
/* @__PURE__ */ b(u, {
|
|
1057
1071
|
size: 14,
|
|
1058
1072
|
"aria-hidden": "true"
|
|
1059
1073
|
})
|
|
1060
1074
|
]
|
|
1061
1075
|
}),
|
|
1062
|
-
e.dashboardId && /* @__PURE__ */
|
|
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__ */
|
|
1084
|
+
/* @__PURE__ */ b(u, {
|
|
1071
1085
|
size: 14,
|
|
1072
1086
|
"aria-hidden": "true"
|
|
1073
1087
|
})
|
|
1074
1088
|
]
|
|
1075
1089
|
}),
|
|
1076
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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,
|
|
@@ -1113,7 +1127,7 @@ var F = s(function() {
|
|
|
1113
1127
|
justifyContent: "center",
|
|
1114
1128
|
padding: "var(--space-pagePadding)"
|
|
1115
1129
|
},
|
|
1116
|
-
children: /* @__PURE__ */
|
|
1130
|
+
children: /* @__PURE__ */ x("div", {
|
|
1117
1131
|
onClick: (e) => e.stopPropagation(),
|
|
1118
1132
|
style: {
|
|
1119
1133
|
display: "flex",
|
|
@@ -1127,7 +1141,7 @@ var F = s(function() {
|
|
|
1127
1141
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1128
1142
|
},
|
|
1129
1143
|
children: [
|
|
1130
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ x("div", {
|
|
1131
1145
|
style: {
|
|
1132
1146
|
display: "flex",
|
|
1133
1147
|
justifyContent: "space-between",
|
|
@@ -1136,16 +1150,16 @@ var F = s(function() {
|
|
|
1136
1150
|
padding: "var(--space-cardPadding)",
|
|
1137
1151
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1138
1152
|
},
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1153
|
+
children: [/* @__PURE__ */ x("div", {
|
|
1140
1154
|
style: { minWidth: 0 },
|
|
1141
|
-
children: [/* @__PURE__ */
|
|
1155
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
1142
1156
|
style: {
|
|
1143
1157
|
fontSize: "var(--font-size-heading-h4)",
|
|
1144
1158
|
fontWeight: "var(--font-weight-semibold)",
|
|
1145
1159
|
color: "var(--color-text-primary)"
|
|
1146
1160
|
},
|
|
1147
1161
|
children: $.name
|
|
1148
|
-
}), $.description && /* @__PURE__ */
|
|
1162
|
+
}), $.description && /* @__PURE__ */ b("p", {
|
|
1149
1163
|
style: {
|
|
1150
1164
|
fontSize: "var(--font-size-body-sm)",
|
|
1151
1165
|
color: "var(--color-text-secondary)",
|
|
@@ -1153,22 +1167,22 @@ var F = s(function() {
|
|
|
1153
1167
|
},
|
|
1154
1168
|
children: $.description
|
|
1155
1169
|
})]
|
|
1156
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
1179
|
+
children: /* @__PURE__ */ b(de, {
|
|
1166
1180
|
size: 18,
|
|
1167
1181
|
"aria-hidden": "true"
|
|
1168
1182
|
})
|
|
1169
1183
|
})]
|
|
1170
1184
|
}),
|
|
1171
|
-
/* @__PURE__ */
|
|
1185
|
+
/* @__PURE__ */ x("div", {
|
|
1172
1186
|
style: {
|
|
1173
1187
|
flex: "1 1 auto",
|
|
1174
1188
|
minHeight: 0,
|
|
@@ -1179,38 +1193,38 @@ var F = s(function() {
|
|
|
1179
1193
|
gap: "var(--space-controlGap)"
|
|
1180
1194
|
},
|
|
1181
1195
|
children: [
|
|
1182
|
-
/* @__PURE__ */
|
|
1196
|
+
/* @__PURE__ */ x("div", {
|
|
1183
1197
|
style: {
|
|
1184
1198
|
display: "flex",
|
|
1185
1199
|
flexWrap: "wrap",
|
|
1186
1200
|
gap: "var(--space-iconGap)"
|
|
1187
1201
|
},
|
|
1188
1202
|
children: [
|
|
1189
|
-
/* @__PURE__ */
|
|
1190
|
-
style:
|
|
1203
|
+
/* @__PURE__ */ x("span", {
|
|
1204
|
+
style: O,
|
|
1191
1205
|
children: [
|
|
1192
|
-
|
|
1206
|
+
M($),
|
|
1193
1207
|
" widget",
|
|
1194
|
-
|
|
1208
|
+
M($) === 1 ? "" : "s"
|
|
1195
1209
|
]
|
|
1196
1210
|
}),
|
|
1197
|
-
/* @__PURE__ */
|
|
1198
|
-
style:
|
|
1211
|
+
/* @__PURE__ */ x("span", {
|
|
1212
|
+
style: O,
|
|
1199
1213
|
children: [
|
|
1200
1214
|
$.pages.length,
|
|
1201
1215
|
" page",
|
|
1202
1216
|
$.pages.length === 1 ? "" : "s"
|
|
1203
1217
|
]
|
|
1204
1218
|
}),
|
|
1205
|
-
/* @__PURE__ */
|
|
1206
|
-
style:
|
|
1219
|
+
/* @__PURE__ */ x("span", {
|
|
1220
|
+
style: Le($.overallConfidence),
|
|
1207
1221
|
children: [Math.round($.overallConfidence * 100), "% confidence"]
|
|
1208
1222
|
})
|
|
1209
1223
|
]
|
|
1210
1224
|
}),
|
|
1211
|
-
$.reasoning && /* @__PURE__ */
|
|
1225
|
+
$.reasoning && /* @__PURE__ */ x("details", {
|
|
1212
1226
|
"data-testid": "preview-reasoning",
|
|
1213
|
-
children: [/* @__PURE__ */
|
|
1227
|
+
children: [/* @__PURE__ */ b("summary", {
|
|
1214
1228
|
className: "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
1215
1229
|
style: {
|
|
1216
1230
|
cursor: "pointer",
|
|
@@ -1220,7 +1234,7 @@ var F = s(function() {
|
|
|
1220
1234
|
borderRadius: "var(--radius-button)"
|
|
1221
1235
|
},
|
|
1222
1236
|
children: s("bigconsole.insights.preview.reasoningToggle", "Why these widgets?")
|
|
1223
|
-
}), /* @__PURE__ */
|
|
1237
|
+
}), /* @__PURE__ */ b("p", {
|
|
1224
1238
|
style: {
|
|
1225
1239
|
marginTop: "var(--space-controlGap)",
|
|
1226
1240
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -1230,20 +1244,20 @@ var F = s(function() {
|
|
|
1230
1244
|
children: $.reasoning
|
|
1231
1245
|
})]
|
|
1232
1246
|
}),
|
|
1233
|
-
$.pages.map((e, t) => /* @__PURE__ */
|
|
1247
|
+
$.pages.map((e, t) => /* @__PURE__ */ x(r, {
|
|
1234
1248
|
emphasis: "muted",
|
|
1235
1249
|
padding: "compact",
|
|
1236
1250
|
headingLevel: 3,
|
|
1237
1251
|
title: e.name,
|
|
1238
|
-
meta: /* @__PURE__ */
|
|
1239
|
-
style:
|
|
1252
|
+
meta: /* @__PURE__ */ x("span", {
|
|
1253
|
+
style: O,
|
|
1240
1254
|
children: [
|
|
1241
1255
|
e.widgets.length,
|
|
1242
1256
|
" widget",
|
|
1243
1257
|
e.widgets.length === 1 ? "" : "s"
|
|
1244
1258
|
]
|
|
1245
1259
|
}),
|
|
1246
|
-
children: [/* @__PURE__ */
|
|
1260
|
+
children: [/* @__PURE__ */ x("p", {
|
|
1247
1261
|
style: {
|
|
1248
1262
|
fontSize: "var(--font-size-body-sm)",
|
|
1249
1263
|
color: "var(--color-text-secondary)",
|
|
@@ -1259,15 +1273,15 @@ var F = s(function() {
|
|
|
1259
1273
|
" ",
|
|
1260
1274
|
e.layout.toLowerCase().replaceAll("_", " ")
|
|
1261
1275
|
]
|
|
1262
|
-
}), /* @__PURE__ */
|
|
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 =
|
|
1267
|
-
return /* @__PURE__ */
|
|
1280
|
+
let r = Re(t.confidence);
|
|
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",
|
|
@@ -1276,7 +1290,7 @@ var F = s(function() {
|
|
|
1276
1290
|
backgroundColor: "var(--color-bg-surface)",
|
|
1277
1291
|
border: "1px solid var(--color-border-subtle)"
|
|
1278
1292
|
},
|
|
1279
|
-
children: [/* @__PURE__ */
|
|
1293
|
+
children: [/* @__PURE__ */ x("div", {
|
|
1280
1294
|
style: {
|
|
1281
1295
|
display: "flex",
|
|
1282
1296
|
flexWrap: "wrap",
|
|
@@ -1284,7 +1298,7 @@ var F = s(function() {
|
|
|
1284
1298
|
gap: "var(--space-iconGap)"
|
|
1285
1299
|
},
|
|
1286
1300
|
children: [
|
|
1287
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ b("span", {
|
|
1288
1302
|
style: {
|
|
1289
1303
|
fontSize: "var(--font-size-body-sm)",
|
|
1290
1304
|
fontWeight: "var(--font-weight-medium)",
|
|
@@ -1293,7 +1307,7 @@ var F = s(function() {
|
|
|
1293
1307
|
},
|
|
1294
1308
|
children: t.title
|
|
1295
1309
|
}),
|
|
1296
|
-
/* @__PURE__ */
|
|
1310
|
+
/* @__PURE__ */ b("span", {
|
|
1297
1311
|
style: {
|
|
1298
1312
|
fontSize: "var(--font-size-xs)",
|
|
1299
1313
|
color: "var(--color-text-muted)"
|
|
@@ -1301,16 +1315,16 @@ var F = s(function() {
|
|
|
1301
1315
|
"data-testid": "preview-widget-type",
|
|
1302
1316
|
children: t.type
|
|
1303
1317
|
}),
|
|
1304
|
-
r && /* @__PURE__ */
|
|
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",
|
|
1310
1324
|
children: r
|
|
1311
1325
|
})
|
|
1312
1326
|
]
|
|
1313
|
-
}), t.reasoning && /* @__PURE__ */
|
|
1327
|
+
}), t.reasoning && /* @__PURE__ */ b("p", {
|
|
1314
1328
|
style: {
|
|
1315
1329
|
margin: 0,
|
|
1316
1330
|
fontSize: "var(--font-size-xs)",
|
|
@@ -1325,7 +1339,7 @@ var F = s(function() {
|
|
|
1325
1339
|
}, t))
|
|
1326
1340
|
]
|
|
1327
1341
|
}),
|
|
1328
|
-
/* @__PURE__ */
|
|
1342
|
+
/* @__PURE__ */ x("div", {
|
|
1329
1343
|
style: {
|
|
1330
1344
|
display: "flex",
|
|
1331
1345
|
justifyContent: "flex-end",
|
|
@@ -1335,24 +1349,24 @@ var F = s(function() {
|
|
|
1335
1349
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1336
1350
|
},
|
|
1337
1351
|
children: [
|
|
1338
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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,
|
|
@@ -1397,7 +1411,7 @@ var F = s(function() {
|
|
|
1397
1411
|
justifyContent: "center",
|
|
1398
1412
|
padding: "var(--space-pagePadding)"
|
|
1399
1413
|
},
|
|
1400
|
-
children: /* @__PURE__ */
|
|
1414
|
+
children: /* @__PURE__ */ x("div", {
|
|
1401
1415
|
onClick: (e) => e.stopPropagation(),
|
|
1402
1416
|
style: {
|
|
1403
1417
|
display: "flex",
|
|
@@ -1411,19 +1425,19 @@ var F = s(function() {
|
|
|
1411
1425
|
boxShadow: "var(--shadow-elevation-3)"
|
|
1412
1426
|
},
|
|
1413
1427
|
children: [
|
|
1414
|
-
/* @__PURE__ */
|
|
1428
|
+
/* @__PURE__ */ x("div", {
|
|
1415
1429
|
style: {
|
|
1416
1430
|
padding: "var(--space-cardPadding)",
|
|
1417
1431
|
borderBottom: "1px solid var(--color-border-subtle)"
|
|
1418
1432
|
},
|
|
1419
|
-
children: [/* @__PURE__ */
|
|
1433
|
+
children: [/* @__PURE__ */ b("h2", {
|
|
1420
1434
|
style: {
|
|
1421
1435
|
fontSize: "var(--font-size-heading-h4)",
|
|
1422
1436
|
fontWeight: "var(--font-weight-semibold)",
|
|
1423
1437
|
color: "var(--color-text-primary)"
|
|
1424
1438
|
},
|
|
1425
1439
|
children: s("bigconsole.insights.refine.heading", "Refine dashboard")
|
|
1426
|
-
}), /* @__PURE__ */
|
|
1440
|
+
}), /* @__PURE__ */ b("p", {
|
|
1427
1441
|
style: {
|
|
1428
1442
|
fontSize: "var(--font-size-body-sm)",
|
|
1429
1443
|
color: "var(--color-text-secondary)",
|
|
@@ -1432,7 +1446,7 @@ var F = s(function() {
|
|
|
1432
1446
|
children: s("bigconsole.insights.refine.subtitle", "Describe what to change — the AI keeps the existing spec and applies your instructions.")
|
|
1433
1447
|
})]
|
|
1434
1448
|
}),
|
|
1435
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ x("div", {
|
|
1436
1450
|
style: {
|
|
1437
1451
|
flex: "1 1 auto",
|
|
1438
1452
|
minHeight: 0,
|
|
@@ -1442,20 +1456,20 @@ var F = s(function() {
|
|
|
1442
1456
|
flexDirection: "column",
|
|
1443
1457
|
gap: "var(--space-controlGap)"
|
|
1444
1458
|
},
|
|
1445
|
-
children: [/* @__PURE__ */
|
|
1459
|
+
children: [/* @__PURE__ */ b(r, {
|
|
1446
1460
|
emphasis: "muted",
|
|
1447
1461
|
padding: "compact",
|
|
1448
1462
|
headingLevel: 3,
|
|
1449
|
-
title:
|
|
1450
|
-
description:
|
|
1451
|
-
icon: /* @__PURE__ */
|
|
1452
|
-
}), /* @__PURE__ */
|
|
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" })
|
|
1466
|
+
}), /* @__PURE__ */ x("div", {
|
|
1453
1467
|
style: {
|
|
1454
1468
|
display: "flex",
|
|
1455
1469
|
flexDirection: "column",
|
|
1456
1470
|
gap: "var(--space-controlGap)"
|
|
1457
1471
|
},
|
|
1458
|
-
children: [/* @__PURE__ */
|
|
1472
|
+
children: [/* @__PURE__ */ b("label", {
|
|
1459
1473
|
htmlFor: "refine-input",
|
|
1460
1474
|
style: {
|
|
1461
1475
|
display: "block",
|
|
@@ -1464,10 +1478,10 @@ var F = s(function() {
|
|
|
1464
1478
|
color: "var(--color-text-primary)"
|
|
1465
1479
|
},
|
|
1466
1480
|
children: "What should change?"
|
|
1467
|
-
}), /* @__PURE__ */
|
|
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"),
|
|
@@ -1486,7 +1500,7 @@ var F = s(function() {
|
|
|
1486
1500
|
})]
|
|
1487
1501
|
})]
|
|
1488
1502
|
}),
|
|
1489
|
-
/* @__PURE__ */
|
|
1503
|
+
/* @__PURE__ */ x("div", {
|
|
1490
1504
|
style: {
|
|
1491
1505
|
display: "flex",
|
|
1492
1506
|
justifyContent: "flex-end",
|
|
@@ -1495,27 +1509,27 @@ var F = s(function() {
|
|
|
1495
1509
|
padding: "var(--space-cardPadding)",
|
|
1496
1510
|
borderTop: "1px solid var(--color-border-subtle)"
|
|
1497
1511
|
},
|
|
1498
|
-
children: [/* @__PURE__ */
|
|
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
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
1532
|
+
}) : /* @__PURE__ */ b(h, {
|
|
1519
1533
|
size: 14,
|
|
1520
1534
|
"aria-hidden": "true"
|
|
1521
1535
|
}), s("bigconsole.insights.refine.apply", "Apply refinement")]
|
|
@@ -1528,6 +1542,6 @@ var F = s(function() {
|
|
|
1528
1542
|
});
|
|
1529
1543
|
});
|
|
1530
1544
|
//#endregion
|
|
1531
|
-
export {
|
|
1545
|
+
export { N as InsightsPage, N as default };
|
|
1532
1546
|
|
|
1533
1547
|
//# sourceMappingURL=InsightsPage.js.map
|