@burdenoff/microfe-bigconsole 2026.711.2 → 2026.712.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/createSandboxAssistantTransport.js +42 -18
- package/dist/bigconsole/assistant/createSandboxAssistantTransport.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +196 -188
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +135 -122
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +166 -158
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/hooks/index.js +1 -0
- package/dist/bigconsole/hooks/useBigConsoleAnalytics.js +13 -0
- package/dist/bigconsole/hooks/useBigConsoleAnalytics.js.map +1 -0
- package/dist/bigconsole/hooks/useWidgetOperations.js +102 -68
- package/dist/bigconsole/hooks/useWidgetOperations.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +102 -87
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useAppNavigate as e } from "../contexts/NavigationContext.js";
|
|
2
2
|
import "../contexts/index.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import t from "../hooks/useBigConsoleAnalytics.js";
|
|
4
|
+
import { isNative as n, nativeImpact as r, nativeNotify as i } from "../../utils/nativeBridge.js";
|
|
5
|
+
import { memo as a, useCallback as o, useEffect as s, useState as c } from "react";
|
|
6
|
+
import { AlertCircle as l, ArrowRight as u, Ban as d, CheckCircle as f, Clock as p, Eye as ee, Loader2 as m, RefreshCw as te, Sparkles as h, Trash2 as ne, Wand2 as g, X as re, XCircle as _ } from "lucide-react";
|
|
7
|
+
import { gql as v } from "@apollo/client";
|
|
8
|
+
import { useMutation as y, useQuery as b } from "@apollo/client/react";
|
|
9
|
+
import { AuroraBackground as ie, EmphasisPanel as ae, GlassCard as oe, GradientText as se, IllustratedEmptyState as ce } from "@burdenoff/fe-libs/ui";
|
|
9
10
|
import { jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
10
11
|
//#region src/bigconsole/pages/InsightsPage.tsx
|
|
11
|
-
var C =
|
|
12
|
+
var C = v`
|
|
12
13
|
query ListPromptGenerations($status: PromptGenerationStatus, $first: Int) {
|
|
13
14
|
listPromptGenerations(status: $status, first: $first) {
|
|
14
15
|
edges {
|
|
@@ -37,7 +38,7 @@ var C = _`
|
|
|
37
38
|
totalCount
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
`,
|
|
41
|
+
`, le = v`
|
|
41
42
|
query GetPromptSuggestions($category: String, $limit: Int) {
|
|
42
43
|
getPromptSuggestions(category: $category, limit: $limit) {
|
|
43
44
|
id
|
|
@@ -48,7 +49,7 @@ var C = _`
|
|
|
48
49
|
tags
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
|
-
`,
|
|
52
|
+
`, ue = v`
|
|
52
53
|
mutation GenerateDashboardFromPrompt($input: GenerateDashboardFromPromptInput!) {
|
|
53
54
|
generateDashboardFromPrompt(input: $input) {
|
|
54
55
|
id
|
|
@@ -56,24 +57,24 @@ var C = _`
|
|
|
56
57
|
prompt
|
|
57
58
|
}
|
|
58
59
|
}
|
|
59
|
-
`,
|
|
60
|
+
`, de = v`
|
|
60
61
|
mutation CreateDashboardFromGeneration($input: CreateDashboardFromGenerationInput!) {
|
|
61
62
|
createDashboardFromGeneration(input: $input) {
|
|
62
63
|
id
|
|
63
64
|
}
|
|
64
65
|
}
|
|
65
|
-
`,
|
|
66
|
+
`, fe = v`
|
|
66
67
|
mutation DeletePromptGeneration($generationId: ID!) {
|
|
67
68
|
deletePromptGeneration(generationId: $generationId)
|
|
68
69
|
}
|
|
69
|
-
`,
|
|
70
|
+
`, pe = v`
|
|
70
71
|
mutation CancelPromptGeneration($generationId: ID!) {
|
|
71
72
|
cancelPromptGeneration(generationId: $generationId) {
|
|
72
73
|
id
|
|
73
74
|
status
|
|
74
75
|
}
|
|
75
76
|
}
|
|
76
|
-
`,
|
|
77
|
+
`, me = v`
|
|
77
78
|
mutation RegenerateDashboard($input: RegenerateDashboardInput!) {
|
|
78
79
|
regenerateDashboard(input: $input) {
|
|
79
80
|
id
|
|
@@ -81,7 +82,7 @@ var C = _`
|
|
|
81
82
|
prompt
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
`,
|
|
85
|
+
`, he = v`
|
|
85
86
|
mutation RefineGeneratedDashboard($input: RefineGeneratedDashboardInput!) {
|
|
86
87
|
refineGeneratedDashboard(input: $input) {
|
|
87
88
|
id
|
|
@@ -89,38 +90,38 @@ var C = _`
|
|
|
89
90
|
prompt
|
|
90
91
|
}
|
|
91
92
|
}
|
|
92
|
-
`,
|
|
93
|
+
`, w = [
|
|
93
94
|
"PENDING",
|
|
94
95
|
"PROCESSING",
|
|
95
96
|
"GENERATING"
|
|
96
97
|
];
|
|
97
|
-
function
|
|
98
|
+
function T(e) {
|
|
98
99
|
switch (e) {
|
|
99
|
-
case "COMPLETED": return /* @__PURE__ */ x(
|
|
100
|
+
case "COMPLETED": return /* @__PURE__ */ x(f, {
|
|
100
101
|
size: 16,
|
|
101
102
|
className: "text-green-500"
|
|
102
103
|
});
|
|
103
|
-
case "FAILED": return /* @__PURE__ */ x(
|
|
104
|
+
case "FAILED": return /* @__PURE__ */ x(_, {
|
|
104
105
|
size: 16,
|
|
105
106
|
className: "text-red-500"
|
|
106
107
|
});
|
|
107
|
-
case "CANCELLED": return /* @__PURE__ */ x(
|
|
108
|
+
case "CANCELLED": return /* @__PURE__ */ x(_, {
|
|
108
109
|
size: 16,
|
|
109
110
|
className: "text-gray-400"
|
|
110
111
|
});
|
|
111
112
|
case "PENDING":
|
|
112
113
|
case "PROCESSING":
|
|
113
|
-
case "GENERATING": return /* @__PURE__ */ x(
|
|
114
|
+
case "GENERATING": return /* @__PURE__ */ x(m, {
|
|
114
115
|
size: 16,
|
|
115
116
|
className: "text-blue-500 animate-spin"
|
|
116
117
|
});
|
|
117
|
-
default: return /* @__PURE__ */ x(
|
|
118
|
+
default: return /* @__PURE__ */ x(p, {
|
|
118
119
|
size: 16,
|
|
119
120
|
className: "text-gray-400"
|
|
120
121
|
});
|
|
121
122
|
}
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function E(e) {
|
|
124
125
|
switch (e) {
|
|
125
126
|
case "COMPLETED": return "Completed";
|
|
126
127
|
case "FAILED": return "Failed";
|
|
@@ -131,71 +132,85 @@ function D(e) {
|
|
|
131
132
|
default: return e;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
134
|
-
var
|
|
135
|
-
let
|
|
135
|
+
var D = a(function() {
|
|
136
|
+
let a = e(), f = t(), [p, _] = c(""), [v, D] = c(!1), [O, k] = c(null), [A, j] = c(() => /* @__PURE__ */ new Set()), [M, N] = c(null), [P, F] = c(null), [I, L] = c(""), R = o((e) => {
|
|
136
137
|
j((t) => new Set(t).add(e));
|
|
137
|
-
}, []), z =
|
|
138
|
+
}, []), z = o((e) => {
|
|
138
139
|
j((t) => {
|
|
139
140
|
let n = new Set(t);
|
|
140
141
|
return n.delete(e), n;
|
|
141
142
|
});
|
|
142
|
-
}, []), { data: B, loading:
|
|
143
|
+
}, []), { data: B, loading: ge, refetch: V, startPolling: H, stopPolling: U } = b(C, {
|
|
143
144
|
variables: { first: 20 },
|
|
144
145
|
fetchPolicy: "cache-and-network"
|
|
145
|
-
}), W = B?.listPromptGenerations?.edges?.some((e) =>
|
|
146
|
-
|
|
146
|
+
}), W = B?.listPromptGenerations?.edges?.some((e) => w.includes(e.node.status)) ?? !1, { data: _e } = b(le, { variables: { limit: 6 } }), [G] = y(ue), [K] = y(de), [q] = y(fe), [J] = y(pe), [Y] = y(me), [X] = y(he), Z = B?.listPromptGenerations?.edges?.map((e) => e.node) || [], Q = _e?.getPromptSuggestions || [];
|
|
147
|
+
s(() => (W || v ? H(2e3) : U(), () => U()), [
|
|
147
148
|
W,
|
|
148
|
-
|
|
149
|
+
v,
|
|
149
150
|
H,
|
|
150
151
|
U
|
|
151
|
-
]),
|
|
152
|
+
]), s(() => {
|
|
152
153
|
if (!M && !P) return;
|
|
153
154
|
let e = (e) => {
|
|
154
155
|
e.key === "Escape" && (N(null), F(null));
|
|
155
156
|
};
|
|
156
157
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
157
158
|
}, [M, P]);
|
|
158
|
-
let $ =
|
|
159
|
-
if (!(!
|
|
160
|
-
if (
|
|
159
|
+
let $ = o(async () => {
|
|
160
|
+
if (!(!p.trim() || v)) {
|
|
161
|
+
if (p.length > 2e3) {
|
|
161
162
|
k("Prompt is too long (max 2000 characters).");
|
|
162
163
|
return;
|
|
163
164
|
}
|
|
164
|
-
k(null),
|
|
165
|
+
k(null), D(!0);
|
|
165
166
|
try {
|
|
166
|
-
|
|
167
|
-
|
|
167
|
+
f("bigconsole.ai.generate_clicked", { maxWidgets: 8 });
|
|
168
|
+
let e = (await G({ variables: { input: {
|
|
169
|
+
prompt: p.trim(),
|
|
168
170
|
styleType: "MODERN",
|
|
169
171
|
layoutType: "GRID",
|
|
170
172
|
maxWidgets: 8
|
|
171
|
-
} } })
|
|
173
|
+
} } })).data?.generateDashboardFromPrompt?.id;
|
|
174
|
+
e && f("bigconsole.ai.dashboard_generated", {
|
|
175
|
+
generationId: e,
|
|
176
|
+
maxWidgets: 8
|
|
177
|
+
}), _(""), V();
|
|
172
178
|
} catch (e) {
|
|
173
179
|
k(e instanceof Error ? e.message : "Failed to generate dashboard");
|
|
174
180
|
} finally {
|
|
175
|
-
|
|
181
|
+
D(!1);
|
|
176
182
|
}
|
|
177
183
|
}
|
|
178
184
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
185
|
+
f,
|
|
186
|
+
p,
|
|
187
|
+
v,
|
|
181
188
|
G,
|
|
182
189
|
V
|
|
183
|
-
]),
|
|
190
|
+
]), ve = o(async (e) => {
|
|
184
191
|
k(null);
|
|
185
192
|
try {
|
|
193
|
+
f("bigconsole.ai.create_dashboard_clicked", { generationId: e });
|
|
186
194
|
let t = (await K({ variables: { input: { generationId: e } } })).data?.createDashboardFromGeneration?.id;
|
|
187
|
-
t &&
|
|
195
|
+
t && (f("bigconsole.ai.dashboard_created", {
|
|
196
|
+
generationId: e,
|
|
197
|
+
dashboardId: t
|
|
198
|
+
}), a(`/dashboards/${t}`));
|
|
188
199
|
} catch (e) {
|
|
189
200
|
k(e instanceof Error ? e.message : "Failed to create dashboard");
|
|
190
201
|
}
|
|
191
|
-
}, [
|
|
202
|
+
}, [
|
|
203
|
+
K,
|
|
204
|
+
f,
|
|
205
|
+
a
|
|
206
|
+
]), ye = o(async (e) => {
|
|
192
207
|
k(null);
|
|
193
208
|
try {
|
|
194
|
-
await q({ variables: { generationId: e } }),
|
|
209
|
+
await q({ variables: { generationId: e } }), n() && i("success"), V();
|
|
195
210
|
} catch (e) {
|
|
196
|
-
k(e instanceof Error ? e.message : "Failed to delete generation"),
|
|
211
|
+
k(e instanceof Error ? e.message : "Failed to delete generation"), n() && i("error");
|
|
197
212
|
}
|
|
198
|
-
}, [q, V]),
|
|
213
|
+
}, [q, V]), be = o(async (e) => {
|
|
199
214
|
k(null), R(e);
|
|
200
215
|
try {
|
|
201
216
|
await J({ variables: { generationId: e } }), V();
|
|
@@ -204,7 +219,7 @@ var O = i(function() {
|
|
|
204
219
|
} finally {
|
|
205
220
|
z(e);
|
|
206
221
|
}
|
|
207
|
-
}, [J, V]),
|
|
222
|
+
}, [J, V]), xe = o(async (e) => {
|
|
208
223
|
k(null), R(e);
|
|
209
224
|
try {
|
|
210
225
|
await Y({ variables: { input: { generationId: e } } }), V();
|
|
@@ -213,7 +228,7 @@ var O = i(function() {
|
|
|
213
228
|
} finally {
|
|
214
229
|
z(e);
|
|
215
230
|
}
|
|
216
|
-
}, [Y, V]),
|
|
231
|
+
}, [Y, V]), Se = o(async () => {
|
|
217
232
|
if (!P || !I.trim()) return;
|
|
218
233
|
let e = P.id;
|
|
219
234
|
k(null), R(e);
|
|
@@ -232,8 +247,8 @@ var O = i(function() {
|
|
|
232
247
|
I,
|
|
233
248
|
X,
|
|
234
249
|
V
|
|
235
|
-
]),
|
|
236
|
-
|
|
250
|
+
]), Ce = o((e) => {
|
|
251
|
+
_(e);
|
|
237
252
|
}, []);
|
|
238
253
|
return /* @__PURE__ */ S("div", {
|
|
239
254
|
style: {
|
|
@@ -251,14 +266,14 @@ var O = i(function() {
|
|
|
251
266
|
/* @__PURE__ */ S("div", {
|
|
252
267
|
className: "relative mb-[var(--space-sectionGap)] overflow-hidden rounded-card border border-border-seam bg-gloss-card p-6",
|
|
253
268
|
children: [
|
|
254
|
-
/* @__PURE__ */ x(
|
|
269
|
+
/* @__PURE__ */ x(ie, { intensity: "subtle" }),
|
|
255
270
|
/* @__PURE__ */ S("div", {
|
|
256
271
|
style: {
|
|
257
272
|
display: "flex",
|
|
258
273
|
alignItems: "center",
|
|
259
274
|
gap: "var(--space-iconGap)"
|
|
260
275
|
},
|
|
261
|
-
children: [/* @__PURE__ */ x(
|
|
276
|
+
children: [/* @__PURE__ */ x(h, {
|
|
262
277
|
size: 24,
|
|
263
278
|
style: { color: "var(--color-action-primary-bg)" }
|
|
264
279
|
}), /* @__PURE__ */ x("h1", {
|
|
@@ -267,7 +282,7 @@ var O = i(function() {
|
|
|
267
282
|
fontWeight: "var(--font-weight-bold)",
|
|
268
283
|
color: "var(--color-text-primary)"
|
|
269
284
|
},
|
|
270
|
-
children: /* @__PURE__ */ x(
|
|
285
|
+
children: /* @__PURE__ */ x(se, { children: "AI Insights" })
|
|
271
286
|
})]
|
|
272
287
|
}),
|
|
273
288
|
/* @__PURE__ */ x("p", {
|
|
@@ -280,7 +295,7 @@ var O = i(function() {
|
|
|
280
295
|
})
|
|
281
296
|
]
|
|
282
297
|
}),
|
|
283
|
-
/* @__PURE__ */ S(
|
|
298
|
+
/* @__PURE__ */ S(ae, {
|
|
284
299
|
className: "mb-[var(--space-sectionGap)] p-[var(--space-cardPadding)]",
|
|
285
300
|
children: [
|
|
286
301
|
/* @__PURE__ */ x("label", {
|
|
@@ -296,8 +311,8 @@ var O = i(function() {
|
|
|
296
311
|
}),
|
|
297
312
|
/* @__PURE__ */ x("textarea", {
|
|
298
313
|
id: "prompt-input",
|
|
299
|
-
value:
|
|
300
|
-
onChange: (e) =>
|
|
314
|
+
value: p,
|
|
315
|
+
onChange: (e) => _(e.target.value),
|
|
301
316
|
placeholder: "e.g., Create a sales dashboard showing revenue trends, top products, and regional performance",
|
|
302
317
|
rows: 3,
|
|
303
318
|
maxLength: 2e3,
|
|
@@ -333,7 +348,7 @@ var O = i(function() {
|
|
|
333
348
|
children: "Press Ctrl+Enter to generate"
|
|
334
349
|
}), /* @__PURE__ */ S("button", {
|
|
335
350
|
onClick: $,
|
|
336
|
-
disabled: !
|
|
351
|
+
disabled: !p.trim() || v,
|
|
337
352
|
style: {
|
|
338
353
|
display: "flex",
|
|
339
354
|
alignItems: "center",
|
|
@@ -345,13 +360,13 @@ var O = i(function() {
|
|
|
345
360
|
fontWeight: "var(--font-weight-medium)",
|
|
346
361
|
fontSize: "var(--font-size-body-sm)",
|
|
347
362
|
border: "none",
|
|
348
|
-
cursor: !
|
|
349
|
-
opacity: !
|
|
363
|
+
cursor: !p.trim() || v ? "not-allowed" : "pointer",
|
|
364
|
+
opacity: !p.trim() || v ? .5 : 1
|
|
350
365
|
},
|
|
351
|
-
children: [
|
|
366
|
+
children: [v ? /* @__PURE__ */ x(m, {
|
|
352
367
|
size: 16,
|
|
353
368
|
className: "animate-spin"
|
|
354
|
-
}) : /* @__PURE__ */ x(
|
|
369
|
+
}) : /* @__PURE__ */ x(h, { size: 16 }), "Generate Dashboard"]
|
|
355
370
|
})]
|
|
356
371
|
})
|
|
357
372
|
]
|
|
@@ -376,7 +391,7 @@ var O = i(function() {
|
|
|
376
391
|
alignItems: "center",
|
|
377
392
|
gap: 8
|
|
378
393
|
},
|
|
379
|
-
children: [/* @__PURE__ */ x(
|
|
394
|
+
children: [/* @__PURE__ */ x(l, { size: 16 }), O]
|
|
380
395
|
}), /* @__PURE__ */ x("button", {
|
|
381
396
|
onClick: () => k(null),
|
|
382
397
|
style: {
|
|
@@ -408,7 +423,7 @@ var O = i(function() {
|
|
|
408
423
|
gap: 12
|
|
409
424
|
},
|
|
410
425
|
children: Q.map((e) => /* @__PURE__ */ S("button", {
|
|
411
|
-
onClick: () =>
|
|
426
|
+
onClick: () => Ce(e.prompt),
|
|
412
427
|
style: {
|
|
413
428
|
textAlign: "left",
|
|
414
429
|
padding: 12,
|
|
@@ -465,21 +480,21 @@ var O = i(function() {
|
|
|
465
480
|
marginBottom: 12
|
|
466
481
|
},
|
|
467
482
|
children: "Recent Generations"
|
|
468
|
-
}),
|
|
483
|
+
}), ge && Z.length === 0 ? /* @__PURE__ */ S("div", {
|
|
469
484
|
style: {
|
|
470
485
|
textAlign: "center",
|
|
471
486
|
padding: 40,
|
|
472
487
|
color: "var(--color-text-muted)"
|
|
473
488
|
},
|
|
474
|
-
children: [/* @__PURE__ */ x(
|
|
489
|
+
children: [/* @__PURE__ */ x(m, {
|
|
475
490
|
size: 24,
|
|
476
491
|
className: "animate-spin",
|
|
477
492
|
style: { margin: "0 auto 8px" }
|
|
478
493
|
}), /* @__PURE__ */ x("p", { children: "Loading generations..." })]
|
|
479
|
-
}) : Z.length === 0 && !
|
|
494
|
+
}) : Z.length === 0 && !v ? /* @__PURE__ */ x(oe, {
|
|
480
495
|
treatment: "insight",
|
|
481
496
|
className: "border-border-seam",
|
|
482
|
-
children: /* @__PURE__ */ x(
|
|
497
|
+
children: /* @__PURE__ */ x(ce, {
|
|
483
498
|
illustration: "onboarding",
|
|
484
499
|
title: "No generations yet",
|
|
485
500
|
description: "Describe a dashboard above to get started"
|
|
@@ -490,7 +505,7 @@ var O = i(function() {
|
|
|
490
505
|
flexDirection: "column",
|
|
491
506
|
gap: 12
|
|
492
507
|
},
|
|
493
|
-
children: [
|
|
508
|
+
children: [v && !W && /* @__PURE__ */ x("div", {
|
|
494
509
|
style: {
|
|
495
510
|
padding: 16,
|
|
496
511
|
borderRadius: "var(--radius-card)",
|
|
@@ -505,7 +520,7 @@ var O = i(function() {
|
|
|
505
520
|
minWidth: 0
|
|
506
521
|
},
|
|
507
522
|
children: [
|
|
508
|
-
|
|
523
|
+
T("PROCESSING"),
|
|
509
524
|
/* @__PURE__ */ x("span", {
|
|
510
525
|
style: {
|
|
511
526
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -522,7 +537,7 @@ var O = i(function() {
|
|
|
522
537
|
borderRadius: 4,
|
|
523
538
|
backgroundColor: "var(--color-bg-sunken)"
|
|
524
539
|
},
|
|
525
|
-
children:
|
|
540
|
+
children: E("PROCESSING")
|
|
526
541
|
})
|
|
527
542
|
]
|
|
528
543
|
})
|
|
@@ -556,7 +571,7 @@ var O = i(function() {
|
|
|
556
571
|
minWidth: 0
|
|
557
572
|
},
|
|
558
573
|
children: [
|
|
559
|
-
|
|
574
|
+
T(e.status),
|
|
560
575
|
/* @__PURE__ */ x("span", {
|
|
561
576
|
style: {
|
|
562
577
|
fontSize: "var(--font-size-body-sm)",
|
|
@@ -577,7 +592,7 @@ var O = i(function() {
|
|
|
577
592
|
borderRadius: 4,
|
|
578
593
|
backgroundColor: "var(--color-bg-sunken)"
|
|
579
594
|
},
|
|
580
|
-
children:
|
|
595
|
+
children: E(e.status)
|
|
581
596
|
})
|
|
582
597
|
]
|
|
583
598
|
}),
|
|
@@ -614,7 +629,7 @@ var O = i(function() {
|
|
|
614
629
|
fontSize: "var(--font-size-body-sm)",
|
|
615
630
|
color: "var(--color-status-error-text)"
|
|
616
631
|
},
|
|
617
|
-
children: [/* @__PURE__ */ x(
|
|
632
|
+
children: [/* @__PURE__ */ x(l, { size: 14 }), e.errorMessage]
|
|
618
633
|
})
|
|
619
634
|
]
|
|
620
635
|
}), /* @__PURE__ */ S("div", {
|
|
@@ -624,9 +639,9 @@ var O = i(function() {
|
|
|
624
639
|
flexWrap: "wrap"
|
|
625
640
|
},
|
|
626
641
|
children: [
|
|
627
|
-
|
|
642
|
+
w.includes(e.status) && /* @__PURE__ */ S("button", {
|
|
628
643
|
onClick: () => {
|
|
629
|
-
|
|
644
|
+
r("medium"), be(e.id);
|
|
630
645
|
},
|
|
631
646
|
disabled: A.has(e.id),
|
|
632
647
|
title: "Cancel generation",
|
|
@@ -642,7 +657,7 @@ var O = i(function() {
|
|
|
642
657
|
fontSize: "var(--font-size-body-sm)",
|
|
643
658
|
cursor: A.has(e.id) ? "wait" : "pointer"
|
|
644
659
|
},
|
|
645
|
-
children: [/* @__PURE__ */ x(
|
|
660
|
+
children: [/* @__PURE__ */ x(d, { size: 14 }), " Cancel"]
|
|
646
661
|
}),
|
|
647
662
|
e.status === "COMPLETED" && e.generatedSpec && /* @__PURE__ */ S("button", {
|
|
648
663
|
onClick: () => N(e),
|
|
@@ -678,11 +693,11 @@ var O = i(function() {
|
|
|
678
693
|
fontSize: "var(--font-size-body-sm)",
|
|
679
694
|
cursor: "pointer"
|
|
680
695
|
},
|
|
681
|
-
children: [/* @__PURE__ */ x(
|
|
696
|
+
children: [/* @__PURE__ */ x(g, { size: 14 }), " Refine"]
|
|
682
697
|
}),
|
|
683
698
|
(e.status === "COMPLETED" || e.status === "FAILED" || e.status === "CANCELLED") && /* @__PURE__ */ S("button", {
|
|
684
699
|
onClick: () => {
|
|
685
|
-
|
|
700
|
+
r("medium"), xe(e.id);
|
|
686
701
|
},
|
|
687
702
|
disabled: A.has(e.id),
|
|
688
703
|
title: "Regenerate with the same prompt",
|
|
@@ -704,7 +719,7 @@ var O = i(function() {
|
|
|
704
719
|
}), " Regenerate"]
|
|
705
720
|
}),
|
|
706
721
|
e.status === "COMPLETED" && !e.dashboardId && /* @__PURE__ */ S("button", {
|
|
707
|
-
onClick: () =>
|
|
722
|
+
onClick: () => ve(e.id),
|
|
708
723
|
style: {
|
|
709
724
|
display: "flex",
|
|
710
725
|
alignItems: "center",
|
|
@@ -717,10 +732,10 @@ var O = i(function() {
|
|
|
717
732
|
fontSize: "var(--font-size-body-sm)",
|
|
718
733
|
cursor: "pointer"
|
|
719
734
|
},
|
|
720
|
-
children: ["Create ", /* @__PURE__ */ x(
|
|
735
|
+
children: ["Create ", /* @__PURE__ */ x(u, { size: 14 })]
|
|
721
736
|
}),
|
|
722
737
|
e.dashboardId && /* @__PURE__ */ S("button", {
|
|
723
|
-
onClick: () =>
|
|
738
|
+
onClick: () => a(`/dashboards/${e.dashboardId}`),
|
|
724
739
|
style: {
|
|
725
740
|
display: "flex",
|
|
726
741
|
alignItems: "center",
|
|
@@ -733,11 +748,11 @@ var O = i(function() {
|
|
|
733
748
|
fontSize: "var(--font-size-body-sm)",
|
|
734
749
|
cursor: "pointer"
|
|
735
750
|
},
|
|
736
|
-
children: ["View Dashboard ", /* @__PURE__ */ x(
|
|
751
|
+
children: ["View Dashboard ", /* @__PURE__ */ x(u, { size: 14 })]
|
|
737
752
|
}),
|
|
738
753
|
/* @__PURE__ */ x("button", {
|
|
739
754
|
onClick: () => {
|
|
740
|
-
|
|
755
|
+
r("medium"), ye(e.id);
|
|
741
756
|
},
|
|
742
757
|
title: "Delete generation",
|
|
743
758
|
style: {
|
|
@@ -958,7 +973,7 @@ var O = i(function() {
|
|
|
958
973
|
},
|
|
959
974
|
children: "Cancel"
|
|
960
975
|
}), /* @__PURE__ */ S("button", {
|
|
961
|
-
onClick: () => void
|
|
976
|
+
onClick: () => void Se(),
|
|
962
977
|
disabled: !I.trim() || A.has(P.id),
|
|
963
978
|
style: {
|
|
964
979
|
display: "flex",
|
|
@@ -973,10 +988,10 @@ var O = i(function() {
|
|
|
973
988
|
cursor: !I.trim() || A.has(P.id) ? "not-allowed" : "pointer",
|
|
974
989
|
opacity: I.trim() ? 1 : .6
|
|
975
990
|
},
|
|
976
|
-
children: [A.has(P.id) ? /* @__PURE__ */ x(
|
|
991
|
+
children: [A.has(P.id) ? /* @__PURE__ */ x(m, {
|
|
977
992
|
size: 14,
|
|
978
993
|
className: "animate-spin"
|
|
979
|
-
}) : /* @__PURE__ */ x(
|
|
994
|
+
}) : /* @__PURE__ */ x(g, { size: 14 }), "Apply refinement"]
|
|
980
995
|
})]
|
|
981
996
|
})
|
|
982
997
|
]
|
|
@@ -986,6 +1001,6 @@ var O = i(function() {
|
|
|
986
1001
|
});
|
|
987
1002
|
});
|
|
988
1003
|
//#endregion
|
|
989
|
-
export {
|
|
1004
|
+
export { D as InsightsPage, D as default };
|
|
990
1005
|
|
|
991
1006
|
//# sourceMappingURL=InsightsPage.js.map
|