@burdenoff/microfe-bigconsole 2026.924.1 → 2026.924.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/BigConsoleRoutes.js +137 -138
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/assistant/previewController.js +10 -10
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js +25 -0
- package/dist/bigconsole/assistant/useAssistantPanelShowsPreview.js.map +1 -0
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +17 -17
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +32 -32
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +52 -52
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +7 -7
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js +53 -0
- package/dist/bigconsole/components/dashboard/DashboardStatusPill.js.map +1 -0
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +60 -60
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +21 -21
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +30 -30
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +36 -36
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +38 -38
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +121 -121
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +22 -22
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +46 -46
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +53 -53
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -1
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +47 -47
- package/dist/bigconsole/components/dashboard/index.js +1 -0
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +35 -35
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +18 -18
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +20 -20
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js +30 -29
- package/dist/bigconsole/components/datasink/DataSinkStatusBadge.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +48 -48
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +103 -103
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +35 -35
- package/dist/bigconsole/components/overview/DashboardGuide.js +214 -0
- package/dist/bigconsole/components/overview/DashboardGuide.js.map +1 -0
- package/dist/bigconsole/components/overview/DataHealthCard.js +97 -0
- package/dist/bigconsole/components/overview/DataHealthCard.js.map +1 -0
- package/dist/bigconsole/components/overview/OverviewQuickActions.js +32 -0
- package/dist/bigconsole/components/overview/OverviewQuickActions.js.map +1 -0
- package/dist/bigconsole/components/overview/OverviewStatCard.js +57 -0
- package/dist/bigconsole/components/overview/OverviewStatCard.js.map +1 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js +107 -0
- package/dist/bigconsole/components/overview/RecentDashboardsPanel.js.map +1 -0
- package/dist/bigconsole/components/overview/dashboardGuideSteps.js +119 -0
- package/dist/bigconsole/components/overview/dashboardGuideSteps.js.map +1 -0
- package/dist/bigconsole/components/overview/index.js +8 -0
- package/dist/bigconsole/components/overview/overviewModel.js +119 -0
- package/dist/bigconsole/components/overview/overviewModel.js.map +1 -0
- package/dist/bigconsole/components/overview/useOverviewData.js +48 -0
- package/dist/bigconsole/components/overview/useOverviewData.js.map +1 -0
- package/dist/bigconsole/components/parser/DataSinkSelector.js +40 -40
- package/dist/bigconsole/components/parser/ImportParserDialog.js +127 -127
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +51 -51
- package/dist/bigconsole/components/preview/AiPreviewContent.js +5 -5
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +62 -61
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +82 -81
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +13 -13
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +70 -70
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +28 -28
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +25 -25
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +48 -48
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +46 -46
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +61 -61
- package/dist/bigconsole/components/widgets/form/FormWidget.js +36 -36
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +42 -42
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +25 -25
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +21 -21
- package/dist/bigconsole/components/widgets/list/ListConfig.js +30 -30
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +38 -38
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +9 -9
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +9 -9
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +49 -49
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +39 -39
- package/dist/bigconsole/components/widgets/table/TableConfig.js +73 -73
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +64 -64
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +10 -10
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +68 -68
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/pages/AdminPage.js +136 -136
- package/dist/bigconsole/pages/DashboardBuilderPage.js +10 -10
- package/dist/bigconsole/pages/DashboardViewPage.js +61 -61
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +327 -348
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +5 -5
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +10 -10
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +83 -83
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +11 -11
- package/dist/bigconsole/pages/DataSourcesPage.js +5 -5
- package/dist/bigconsole/pages/InsightsPage.js +315 -315
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/OverviewPage.js +244 -0
- package/dist/bigconsole/pages/OverviewPage.js.map +1 -0
- package/dist/bigconsole/pages/ParserBuilderPage.js +5 -5
- package/dist/bigconsole/pages/ParserViewPage.js +98 -98
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +8 -8
- package/dist/bigconsole/pages/PipelineViewPage.js +46 -46
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +80 -80
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +70 -70
- package/dist/bigconsole/pages/WidgetDemoPage.js +42 -42
- package/dist/bigconsole/pages/WorkflowViewPage.js +200 -200
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +78 -78
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +34 -34
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +79 -79
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +46 -46
- package/dist/bigconsole/utils/createDialogParam.js +14 -0
- package/dist/bigconsole/utils/createDialogParam.js.map +1 -0
- package/dist/generated/global-operations.js +1 -1
- package/dist/generated/wspace-operations.js +285 -222
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/shared/hooks/useTr.js +10 -7
- package/dist/shared/hooks/useTr.js.map +1 -1
- package/package.json +1 -1
- package/dist/bigconsole/pages/HomePage.js +0 -318
- package/dist/bigconsole/pages/HomePage.js.map +0 -1
|
@@ -1,130 +1,131 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../common/index.js";
|
|
1
|
+
import { useAssistantPanelShowsPreview as e } from "../../assistant/useAssistantPanelShowsPreview.js";
|
|
3
2
|
import { PREVIEW_STEPS as t, useAssistantRunStore as n } from "../../assistant/assistantRunStore.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
3
|
+
import { Section as r } from "../common/Section.js";
|
|
4
|
+
import "../common/index.js";
|
|
5
|
+
import { DOCK_CLEARANCE as i, PreviewMeta as a, STEP_LABEL as o, formatAgo as s, previewLabels as c } from "./previewShared.js";
|
|
6
|
+
import { ArrowUpRight as l, Braces as u, Database as d, LayoutDashboard as f, Loader2 as p, Sparkles as m, X as h } from "lucide-react";
|
|
7
7
|
import { Button as g } from "@burdenoff/fe-libs/ui";
|
|
8
8
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
9
9
|
import { AssistantEntityPreview as y } from "@burdenoff/fe-libs/shared/assistant";
|
|
10
|
+
import { useI18n as b } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
11
|
//#region src/bigconsole/components/preview/AiPreviewMiniPanel.tsx
|
|
11
|
-
function
|
|
12
|
-
let { t:
|
|
13
|
-
|
|
12
|
+
function x({ onNavigate: x }) {
|
|
13
|
+
let { t: S } = b(), C = e(), w = n((e) => e.isRunning), T = n((e) => e.previewOpen), E = n((e) => e.hasRun), D = n((e) => e.richMounted), O = n((e) => e.steps), k = n((e) => e.entityIds), A = n((e) => e.caption), j = n((e) => e.error), M = n((e) => e.updatedAt), N = n((e) => e.openPreview), P = n((e) => e.closePreview), F = (e) => {
|
|
14
|
+
x ? x(e) : typeof window < "u" && window.location.assign(e);
|
|
14
15
|
};
|
|
15
|
-
if (!
|
|
16
|
-
if (!
|
|
16
|
+
if (!E || D || C) return null;
|
|
17
|
+
if (!T) return /* @__PURE__ */ v("div", {
|
|
17
18
|
className: "flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6",
|
|
18
|
-
style: { marginRight:
|
|
19
|
+
style: { marginRight: i },
|
|
19
20
|
children: [/* @__PURE__ */ _("span", {
|
|
20
21
|
className: "text-xs text-text-muted",
|
|
21
|
-
children:
|
|
22
|
+
children: w ? S("bigconsole.widget.aiPreview.buildRunning", "AI build running") : S("bigconsole.widget.aiPreview.buildFinished", "AI build finished")
|
|
22
23
|
}), /* @__PURE__ */ v(g, {
|
|
23
24
|
size: "sm",
|
|
24
25
|
variant: "outline",
|
|
25
|
-
onClick:
|
|
26
|
+
onClick: N,
|
|
26
27
|
"data-testid": "ai-preview-open",
|
|
27
28
|
children: [
|
|
28
|
-
/* @__PURE__ */ _(
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ _(m, { className: "mr-1.5 size-4" }),
|
|
30
|
+
S("bigconsole.widget.aiPreviewMini.previewButton", "Preview"),
|
|
31
|
+
w ? /* @__PURE__ */ _(p, { className: "ml-1.5 size-3.5 animate-spin" }) : null
|
|
31
32
|
]
|
|
32
33
|
})]
|
|
33
34
|
});
|
|
34
|
-
let
|
|
35
|
-
|
|
35
|
+
let I = [];
|
|
36
|
+
k.datasink && I.push({
|
|
36
37
|
key: "datasink",
|
|
37
|
-
label:
|
|
38
|
-
path: `/bigconsole/datasinks/${
|
|
39
|
-
icon: /* @__PURE__ */ _(
|
|
38
|
+
label: S("bigconsole.widget.aiPreviewMini.link.dataSink", "Data Sink"),
|
|
39
|
+
path: `/bigconsole/datasinks/${k.datasink}`,
|
|
40
|
+
icon: /* @__PURE__ */ _(d, {
|
|
40
41
|
className: "size-4 shrink-0 text-text-muted",
|
|
41
42
|
"aria-hidden": "true"
|
|
42
43
|
})
|
|
43
|
-
}),
|
|
44
|
+
}), k.dashboard && I.push({
|
|
44
45
|
key: "dashboard",
|
|
45
|
-
label:
|
|
46
|
-
path: `/bigconsole/dashboards/${
|
|
47
|
-
icon: /* @__PURE__ */ _(
|
|
46
|
+
label: S("bigconsole.widget.aiPreviewMini.link.dashboard", "Dashboard"),
|
|
47
|
+
path: `/bigconsole/dashboards/${k.dashboard}`,
|
|
48
|
+
icon: /* @__PURE__ */ _(f, {
|
|
48
49
|
className: "size-4 shrink-0 text-text-muted",
|
|
49
50
|
"aria-hidden": "true"
|
|
50
51
|
})
|
|
51
|
-
}),
|
|
52
|
+
}), k.parser && I.push({
|
|
52
53
|
key: "parser",
|
|
53
|
-
label:
|
|
54
|
-
path: `/bigconsole/parsers/${
|
|
55
|
-
icon: /* @__PURE__ */ _(
|
|
54
|
+
label: S("bigconsole.widget.aiPreviewMini.link.parser", "Parser"),
|
|
55
|
+
path: `/bigconsole/parsers/${k.parser}`,
|
|
56
|
+
icon: /* @__PURE__ */ _(u, {
|
|
56
57
|
className: "size-4 shrink-0 text-text-muted",
|
|
57
58
|
"aria-hidden": "true"
|
|
58
59
|
})
|
|
59
60
|
});
|
|
60
|
-
let
|
|
61
|
+
let L = t.map((e) => ({
|
|
61
62
|
id: e,
|
|
62
|
-
label:
|
|
63
|
-
status:
|
|
63
|
+
label: S(o[e].key, o[e].fallback),
|
|
64
|
+
status: O[e]
|
|
64
65
|
}));
|
|
65
66
|
return /* @__PURE__ */ v("div", {
|
|
66
67
|
"data-testid": "ai-preview-panel",
|
|
67
68
|
"data-variant": "mini",
|
|
68
|
-
style: { paddingRight:
|
|
69
|
+
style: { paddingRight: i },
|
|
69
70
|
className: "mx-4 mb-3 mt-3 min-w-0 md:mx-6",
|
|
70
71
|
children: [/* @__PURE__ */ _("h2", {
|
|
71
72
|
className: "sr-only",
|
|
72
|
-
children:
|
|
73
|
+
children: S("bigconsole.widget.aiPreviewMini.title", "AI Preview")
|
|
73
74
|
}), /* @__PURE__ */ _(y, {
|
|
74
|
-
title:
|
|
75
|
-
steps:
|
|
76
|
-
caption:
|
|
77
|
-
error:
|
|
78
|
-
meta: /* @__PURE__ */ _(
|
|
79
|
-
state:
|
|
80
|
-
stateLabel:
|
|
81
|
-
updatedLabel:
|
|
82
|
-
updatedAt:
|
|
83
|
-
ago: (e) =>
|
|
75
|
+
title: S("bigconsole.widget.aiPreviewMini.title", "AI Preview"),
|
|
76
|
+
steps: L,
|
|
77
|
+
caption: w ? A || S("bigconsole.widget.aiPreviewMini.working", "Working…") : S("bigconsole.widget.aiPreviewMini.done", "Done"),
|
|
78
|
+
error: j,
|
|
79
|
+
meta: /* @__PURE__ */ _(a, {
|
|
80
|
+
state: w ? "running" : j ? "stopped" : "idle",
|
|
81
|
+
stateLabel: w ? S("bigconsole.widget.aiPreviewMini.live", "Live") : j ? S("bigconsole.widget.aiPreviewMini.stopped", "Stopped") : null,
|
|
82
|
+
updatedLabel: S("bigconsole.widget.aiPreviewMini.updated", "updated"),
|
|
83
|
+
updatedAt: M,
|
|
84
|
+
ago: (e) => s(e, S)
|
|
84
85
|
}),
|
|
85
86
|
headerActions: /* @__PURE__ */ _(g, {
|
|
86
87
|
size: "sm",
|
|
87
88
|
variant: "ghost",
|
|
88
|
-
onClick:
|
|
89
|
-
"aria-label":
|
|
89
|
+
onClick: P,
|
|
90
|
+
"aria-label": S("bigconsole.widget.aiPreviewMini.closeAriaLabel", "Close preview"),
|
|
90
91
|
"data-testid": "ai-preview-close",
|
|
91
|
-
children: /* @__PURE__ */ _(
|
|
92
|
+
children: /* @__PURE__ */ _(h, { className: "size-4" })
|
|
92
93
|
}),
|
|
93
|
-
labels:
|
|
94
|
+
labels: c(S),
|
|
94
95
|
children: /* @__PURE__ */ _("div", {
|
|
95
96
|
className: "p-3",
|
|
96
|
-
children: /* @__PURE__ */ v(
|
|
97
|
+
children: /* @__PURE__ */ v(r, {
|
|
97
98
|
emphasis: "standard",
|
|
98
99
|
padding: "compact",
|
|
99
100
|
headingLevel: 3,
|
|
100
|
-
title:
|
|
101
|
-
description:
|
|
101
|
+
title: S("bigconsole.widget.aiPreviewMini.builtSoFar", "Built so far"),
|
|
102
|
+
description: S("bigconsole.widget.aiPreviewMini.builtSoFarHint", "Open any piece to see the real thing."),
|
|
102
103
|
bodyClassName: "flex flex-col gap-list-gap",
|
|
103
|
-
children: [
|
|
104
|
+
children: [I.length === 0 ? /* @__PURE__ */ _("p", {
|
|
104
105
|
className: "text-sm text-text-muted",
|
|
105
|
-
children:
|
|
106
|
-
}) :
|
|
106
|
+
children: w ? S("bigconsole.widget.aiPreviewMini.building", "Building… links appear here as each piece is created.") : S("bigconsole.widget.aiPreviewMini.nothingBuilt", "Nothing built yet.")
|
|
107
|
+
}) : I.map((e) => /* @__PURE__ */ v("div", {
|
|
107
108
|
"data-testid": "ai-preview-row",
|
|
108
109
|
className: "flex min-w-0 items-center justify-between gap-control-gap rounded-card border border-[var(--color-border-subtle)] bg-bg-canvas px-3 py-2",
|
|
109
110
|
children: [/* @__PURE__ */ v("p", {
|
|
110
111
|
className: "flex min-w-0 items-center gap-icon-gap text-sm font-medium text-text-primary",
|
|
111
112
|
children: [e.icon, /* @__PURE__ */ _("span", {
|
|
112
113
|
className: "truncate",
|
|
113
|
-
children:
|
|
114
|
+
children: S("bigconsole.widget.aiPreviewMini.linkReady", "{{label}} ready", { label: e.label })
|
|
114
115
|
})]
|
|
115
116
|
}), /* @__PURE__ */ v(g, {
|
|
116
117
|
size: "sm",
|
|
117
118
|
variant: "ghost",
|
|
118
|
-
onClick: () =>
|
|
119
|
-
children: [
|
|
119
|
+
onClick: () => F(e.path),
|
|
120
|
+
children: [S("bigconsole.widget.aiPreviewMini.open", "Open"), /* @__PURE__ */ _(l, { className: "ml-1 size-3.5" })]
|
|
120
121
|
})]
|
|
121
|
-
}, e.key)),
|
|
122
|
+
}, e.key)), k.dashboard ? /* @__PURE__ */ v(g, {
|
|
122
123
|
size: "sm",
|
|
123
124
|
variant: "outline",
|
|
124
125
|
className: "h-auto w-full whitespace-normal py-1.5 text-center",
|
|
125
126
|
"data-testid": "ai-preview-open-in-bigconsole",
|
|
126
|
-
onClick: () =>
|
|
127
|
-
children: [
|
|
127
|
+
onClick: () => F(`/bigconsole/dashboards/${k.dashboard ?? ""}`),
|
|
128
|
+
children: [S("bigconsole.widget.aiPreviewMini.openInBigConsole", "Open in BigConsole for the live view"), /* @__PURE__ */ _(l, { className: "ml-1 size-3.5" })]
|
|
128
129
|
}) : null]
|
|
129
130
|
})
|
|
130
131
|
})
|
|
@@ -132,6 +133,6 @@ function b({ onNavigate: b }) {
|
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
//#endregion
|
|
135
|
-
export {
|
|
136
|
+
export { x as AiPreviewMiniPanel };
|
|
136
137
|
|
|
137
138
|
//# sourceMappingURL=AiPreviewMiniPanel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AiPreviewMiniPanel.js","names":[],"sources":["../../../../src/bigconsole/components/preview/AiPreviewMiniPanel.tsx"],"sourcesContent":["/**\n * AI Preview — the app-shell copy.\n *\n * The full <AiPreviewPanel> lives inside BigConsoleRoot and only exists on\n * /bigconsole pages, but the assistant widget is global: you can start a build\n * from anywhere. This lightweight panel is mounted by the app shell so the build\n * is visible on WHATEVER page you are on — workflows, store, workspaces, search.\n *\n * It is deliberately store-only: no Apollo, no BigConsole context, no data\n * fetching. That is what lets it mount above the router. It shows the same live\n * step rail and caption as the full panel, plus click-through links to each\n * entity as it lands. The rich per-entity tabs stay on the /bigconsole pages,\n * where the data layer actually exists.\n *\n * It renders nothing while the full panel is up (`richMounted`), so the two\n * never stack. Leave a /bigconsole page mid-run and the full panel unmounts,\n * `richMounted` flips false, and this one takes over without a flicker.\n *\n * Section emphasis (BOFF-5639): the chrome (header, progress) is recessed and\n * the \"Built so far\" list is the one raised surface — the same ladder as the\n * full panel, so the two copies read as one component. Spacing is identical to\n * the full panel too; they used to differ (`pt-1` vs `pt-3`), which shifted the\n * page under the user as they navigated.\n */\nimport type { ReactNode } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { AssistantEntityPreview, type AssistantPreviewStep } from '@burdenoff/fe-libs/shared/assistant';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ArrowUpRight, Braces, Database, LayoutDashboard, Loader2, Sparkles, X } from 'lucide-react';\n\nimport { PREVIEW_STEPS, useAssistantRunStore } from '../../assistant/assistantRunStore';\nimport { Section } from '../common';\nimport { DOCK_CLEARANCE, PreviewMeta, STEP_LABEL, formatAgo, previewLabels } from './previewShared';\n\ninterface AiPreviewMiniPanelProps {\n /**\n * Route to an in-app path. The links are absolute (`/bigconsole/...`) because\n * this panel renders outside the BigConsole router. Falls back to a full\n * navigation when the host does not supply a handler.\n */\n onNavigate?: (path: string) => void;\n}\n\ninterface QuickLink {\n key: string;\n label: string;\n path: string;\n icon: ReactNode;\n}\n\nexport function AiPreviewMiniPanel({ onNavigate }: AiPreviewMiniPanelProps) {\n const { t } = useI18n();\n const isRunning = useAssistantRunStore((state) => state.isRunning);\n const previewOpen = useAssistantRunStore((state) => state.previewOpen);\n const hasRun = useAssistantRunStore((state) => state.hasRun);\n const richMounted = useAssistantRunStore((state) => state.richMounted);\n const steps = useAssistantRunStore((state) => state.steps);\n const entityIds = useAssistantRunStore((state) => state.entityIds);\n const caption = useAssistantRunStore((state) => state.caption);\n const error = useAssistantRunStore((state) => state.error);\n const updatedAt = useAssistantRunStore((state) => state.updatedAt);\n const openPreview = useAssistantRunStore((state) => state.openPreview);\n const closePreview = useAssistantRunStore((state) => state.closePreview);\n\n const go = (path: string) => {\n if (onNavigate) onNavigate(path);\n else if (typeof window !== 'undefined') window.location.assign(path);\n };\n\n // Nothing has run, or the full in-context panel is already on screen.\n if (!hasRun || richMounted) return null;\n\n if (!previewOpen) {\n return (\n <div\n className=\"flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6\"\n style={{ marginRight: DOCK_CLEARANCE }}\n >\n <span className=\"text-xs text-text-muted\">\n {isRunning\n ? t('bigconsole.widget.aiPreview.buildRunning', 'AI build running')\n : t('bigconsole.widget.aiPreview.buildFinished', 'AI build finished')}\n </span>\n <Button size=\"sm\" variant=\"outline\" onClick={openPreview} data-testid=\"ai-preview-open\">\n <Sparkles className=\"mr-1.5 size-4\" />\n {t('bigconsole.widget.aiPreviewMini.previewButton', 'Preview')}\n {isRunning ? <Loader2 className=\"ml-1.5 size-3.5 animate-spin\" /> : null}\n </Button>\n </div>\n );\n }\n\n const links: QuickLink[] = [];\n if (entityIds.datasink)\n links.push({\n key: 'datasink',\n label: t('bigconsole.widget.aiPreviewMini.link.dataSink', 'Data Sink'),\n path: `/bigconsole/datasinks/${entityIds.datasink}`,\n icon: <Database className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n if (entityIds.dashboard)\n links.push({\n key: 'dashboard',\n label: t('bigconsole.widget.aiPreviewMini.link.dashboard', 'Dashboard'),\n path: `/bigconsole/dashboards/${entityIds.dashboard}`,\n icon: <LayoutDashboard className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n if (entityIds.parser)\n links.push({\n key: 'parser',\n label: t('bigconsole.widget.aiPreviewMini.link.parser', 'Parser'),\n path: `/bigconsole/parsers/${entityIds.parser}`,\n icon: <Braces className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n\n const railSteps: AssistantPreviewStep[] = PREVIEW_STEPS.map((key) => ({\n id: key,\n label: t(STEP_LABEL[key].key, STEP_LABEL[key].fallback),\n status: steps[key],\n }));\n\n return (\n // ★ The wrapper owns POSITIONING only — clearance for the assistant dock,\n // page gutters, and the testids this panel already had. Everything visual\n // belongs to the shared surface, which is what keeps this copy and the full\n // panel from drifting apart now that `previewShared` no longer holds a shell\n // recipe for them both.\n //\n // ★★ PADDING, not margin: `mx-4 md:mx-6` is the page gutter and it is\n // RESPONSIVE. See DOCK_CLEARANCE's docblock.\n <div\n data-testid=\"ai-preview-panel\"\n data-variant=\"mini\"\n style={{ paddingRight: DOCK_CLEARANCE }}\n className=\"mx-4 mb-3 mt-3 min-w-0 md:mx-6\"\n >\n {/* ★★ The panel's own heading, restored. The shared surface renders its\n title as a styled <span> inside a <section aria-label>, which labels\n the region but leaves NO heading — while it still renders an <h3> for\n the step rail. main had <h2>AI Preview</h2> above that <h3>, so the\n migration both removed the panel from screen-reader heading navigation\n and orphaned the h3 under whatever <h2> the page beneath happens to\n end with. Visually hidden because the surface already shows the title;\n this only restores the structure. */}\n <h2 className=\"sr-only\">{t('bigconsole.widget.aiPreviewMini.title', 'AI Preview')}</h2>\n <AssistantEntityPreview\n title={t('bigconsole.widget.aiPreviewMini.title', 'AI Preview')}\n steps={railSteps}\n // ★★ TWO branches, not three, and deliberately so: the shared surface\n // renders `{error ? '' : caption}` — it BLANKS the caption whenever\n // `error` is set, so a failure branch here would compute a string that\n // is then discarded. The failure is named in `meta` instead, which\n // `PreviewHeader` renders without consulting `error`.\n caption={\n isRunning\n ? caption || t('bigconsole.widget.aiPreviewMini.working', 'Working…')\n : t('bigconsole.widget.aiPreviewMini.done', 'Done')\n }\n error={error}\n meta={\n <PreviewMeta\n state={isRunning ? 'running' : error ? 'stopped' : 'idle'}\n stateLabel={\n isRunning\n ? t('bigconsole.widget.aiPreviewMini.live', 'Live')\n : error\n ? t('bigconsole.widget.aiPreviewMini.stopped', 'Stopped')\n : null\n }\n updatedLabel={t('bigconsole.widget.aiPreviewMini.updated', 'updated')}\n updatedAt={updatedAt}\n ago={(seconds) => formatAgo(seconds, t)}\n />\n }\n headerActions={\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={closePreview}\n aria-label={t('bigconsole.widget.aiPreviewMini.closeAriaLabel', 'Close preview')}\n data-testid=\"ai-preview-close\"\n >\n <X className=\"size-4\" />\n </Button>\n }\n labels={previewLabels(t)}\n >\n {/* ★ No tabs here, by design: the rich per-entity views need Apollo and\n the BigConsole providers, which do not exist above the router. Links\n are what this copy can honestly offer. */}\n <div className=\"p-3\">\n <Section\n emphasis=\"standard\"\n padding=\"compact\"\n headingLevel={3}\n title={t('bigconsole.widget.aiPreviewMini.builtSoFar', 'Built so far')}\n description={t('bigconsole.widget.aiPreviewMini.builtSoFarHint', 'Open any piece to see the real thing.')}\n bodyClassName=\"flex flex-col gap-list-gap\"\n >\n {links.length === 0 ? (\n <p className=\"text-sm text-text-muted\">\n {isRunning\n ? t(\n 'bigconsole.widget.aiPreviewMini.building',\n 'Building… links appear here as each piece is created.'\n )\n : t('bigconsole.widget.aiPreviewMini.nothingBuilt', 'Nothing built yet.')}\n </p>\n ) : (\n links.map((link) => (\n <div\n key={link.key}\n data-testid=\"ai-preview-row\"\n className=\"flex min-w-0 items-center justify-between gap-control-gap rounded-card border border-[var(--color-border-subtle)] bg-bg-canvas px-3 py-2\"\n >\n <p className=\"flex min-w-0 items-center gap-icon-gap text-sm font-medium text-text-primary\">\n {link.icon}\n <span className=\"truncate\">\n {t('bigconsole.widget.aiPreviewMini.linkReady', '{{label}} ready', { label: link.label })}\n </span>\n </p>\n <Button size=\"sm\" variant=\"ghost\" onClick={() => go(link.path)}>\n {t('bigconsole.widget.aiPreviewMini.open', 'Open')}\n <ArrowUpRight className=\"ml-1 size-3.5\" />\n </Button>\n </div>\n ))\n )}\n {entityIds.dashboard ? (\n // fe-libs `Button` is `whitespace-nowrap` with a fixed `h-8` at\n // `size=\"sm\"`, so this long label overflowed the panel (which is\n // `overflow-hidden`) at 390px — and the hi/ta strings are longer\n // still. `h-auto whitespace-normal` lets it wrap to two lines\n // instead of being clipped.\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"h-auto w-full whitespace-normal py-1.5 text-center\"\n data-testid=\"ai-preview-open-in-bigconsole\"\n onClick={() => go(`/bigconsole/dashboards/${entityIds.dashboard ?? ''}`)}\n >\n {t('bigconsole.widget.aiPreviewMini.openInBigConsole', 'Open in BigConsole for the live view')}\n <ArrowUpRight className=\"ml-1 size-3.5\" />\n </Button>\n ) : null}\n </Section>\n </div>\n </AssistantEntityPreview>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAkDA,SAAgB,EAAmB,EAAE,iBAAuC;CAC1E,IAAM,EAAE,SAAM,GAAS,EACjB,IAAY,GAAsB,MAAU,EAAM,UAAU,EAC5D,IAAc,GAAsB,MAAU,EAAM,YAAY,EAChE,IAAS,GAAsB,MAAU,EAAM,OAAO,EACtD,IAAc,GAAsB,MAAU,EAAM,YAAY,EAChE,IAAQ,GAAsB,MAAU,EAAM,MAAM,EACpD,IAAY,GAAsB,MAAU,EAAM,UAAU,EAC5D,IAAU,GAAsB,MAAU,EAAM,QAAQ,EACxD,IAAQ,GAAsB,MAAU,EAAM,MAAM,EACpD,IAAY,GAAsB,MAAU,EAAM,UAAU,EAC5D,IAAc,GAAsB,MAAU,EAAM,YAAY,EAChE,IAAe,GAAsB,MAAU,EAAM,aAAa,EAElE,KAAM,MAAiB;AAC3B,EAAI,IAAY,EAAW,EAAK,GACvB,OAAO,SAAW,OAAa,OAAO,SAAS,OAAO,EAAK;;AAItE,KAAI,CAAC,KAAU,EAAa,QAAO;AAEnC,KAAI,CAAC,EACH,QACE,kBAAC,OAAD;EACE,WAAU;EACV,OAAO,EAAE,aAAa,GAAgB;YAFxC,CAIE,kBAAC,QAAD;GAAM,WAAU;aACb,IACG,EAAE,4CAA4C,mBAAmB,GACjE,EAAE,6CAA6C,oBAAoB;GAClE,CAAA,EACP,kBA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uC,EAC9F,kBAAC,GAAD,EAAc,WAAU,iBAAkB,CAAA,CACnC;UACP,KACI;;IACN,CAAA;GACiB,CAAA,CACrB"}
|
|
1
|
+
{"version":3,"file":"AiPreviewMiniPanel.js","names":[],"sources":["../../../../src/bigconsole/components/preview/AiPreviewMiniPanel.tsx"],"sourcesContent":["/**\n * AI Preview — the app-shell copy.\n *\n * The full <AiPreviewPanel> lives inside BigConsoleRoot and only exists on\n * /bigconsole pages, but the assistant widget is global: you can start a build\n * from anywhere. This lightweight panel is mounted by the app shell so the build\n * is visible on WHATEVER page you are on — workflows, store, workspaces, search.\n *\n * It is deliberately store-only: no Apollo, no BigConsole context, no data\n * fetching. That is what lets it mount above the router. It shows the same live\n * step rail and caption as the full panel, plus click-through links to each\n * entity as it lands. The rich per-entity tabs stay on the /bigconsole pages,\n * where the data layer actually exists.\n *\n * It renders nothing while the full panel is up (`richMounted`), so the two\n * never stack. Leave a /bigconsole page mid-run and the full panel unmounts,\n * `richMounted` flips false, and this one takes over without a flicker.\n *\n * Section emphasis (BOFF-5639): the chrome (header, progress) is recessed and\n * the \"Built so far\" list is the one raised surface — the same ladder as the\n * full panel, so the two copies read as one component. Spacing is identical to\n * the full panel too; they used to differ (`pt-1` vs `pt-3`), which shifted the\n * page under the user as they navigated.\n */\nimport type { ReactNode } from 'react';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { AssistantEntityPreview, type AssistantPreviewStep } from '@burdenoff/fe-libs/shared/assistant';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { useAssistantPanelShowsPreview } from '../../assistant/useAssistantPanelShowsPreview';\nimport { ArrowUpRight, Braces, Database, LayoutDashboard, Loader2, Sparkles, X } from 'lucide-react';\n\nimport { PREVIEW_STEPS, useAssistantRunStore } from '../../assistant/assistantRunStore';\nimport { Section } from '../common';\nimport { DOCK_CLEARANCE, PreviewMeta, STEP_LABEL, formatAgo, previewLabels } from './previewShared';\n\ninterface AiPreviewMiniPanelProps {\n /**\n * Route to an in-app path. The links are absolute (`/bigconsole/...`) because\n * this panel renders outside the BigConsole router. Falls back to a full\n * navigation when the host does not supply a handler.\n */\n onNavigate?: (path: string) => void;\n}\n\ninterface QuickLink {\n key: string;\n label: string;\n path: string;\n icon: ReactNode;\n}\n\nexport function AiPreviewMiniPanel({ onNavigate }: AiPreviewMiniPanelProps) {\n const { t } = useI18n();\n // ★★★ ONE SURFACE PER RUN. fe-libs renders this same controller inside its own\n // in-chat overlay; without this the page surface stayed up beside it and one\n // run was drawn twice, side by side (measured in prod, BOFF-7799).\n const panelShowsPreview = useAssistantPanelShowsPreview();\n const isRunning = useAssistantRunStore((state) => state.isRunning);\n const previewOpen = useAssistantRunStore((state) => state.previewOpen);\n const hasRun = useAssistantRunStore((state) => state.hasRun);\n const richMounted = useAssistantRunStore((state) => state.richMounted);\n const steps = useAssistantRunStore((state) => state.steps);\n const entityIds = useAssistantRunStore((state) => state.entityIds);\n const caption = useAssistantRunStore((state) => state.caption);\n const error = useAssistantRunStore((state) => state.error);\n const updatedAt = useAssistantRunStore((state) => state.updatedAt);\n const openPreview = useAssistantRunStore((state) => state.openPreview);\n const closePreview = useAssistantRunStore((state) => state.closePreview);\n\n const go = (path: string) => {\n if (onNavigate) onNavigate(path);\n else if (typeof window !== 'undefined') window.location.assign(path);\n };\n\n // Nothing has run, or the full in-context panel is already on screen.\n if (!hasRun || richMounted) return null;\n // The shared panel's overlay is already showing this run — stand down rather\n // than draw it a second time beside itself.\n if (panelShowsPreview) return null;\n\n if (!previewOpen) {\n return (\n <div\n className=\"flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6\"\n style={{ marginRight: DOCK_CLEARANCE }}\n >\n <span className=\"text-xs text-text-muted\">\n {isRunning\n ? t('bigconsole.widget.aiPreview.buildRunning', 'AI build running')\n : t('bigconsole.widget.aiPreview.buildFinished', 'AI build finished')}\n </span>\n <Button size=\"sm\" variant=\"outline\" onClick={openPreview} data-testid=\"ai-preview-open\">\n <Sparkles className=\"mr-1.5 size-4\" />\n {t('bigconsole.widget.aiPreviewMini.previewButton', 'Preview')}\n {isRunning ? <Loader2 className=\"ml-1.5 size-3.5 animate-spin\" /> : null}\n </Button>\n </div>\n );\n }\n\n const links: QuickLink[] = [];\n if (entityIds.datasink)\n links.push({\n key: 'datasink',\n label: t('bigconsole.widget.aiPreviewMini.link.dataSink', 'Data Sink'),\n path: `/bigconsole/datasinks/${entityIds.datasink}`,\n icon: <Database className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n if (entityIds.dashboard)\n links.push({\n key: 'dashboard',\n label: t('bigconsole.widget.aiPreviewMini.link.dashboard', 'Dashboard'),\n path: `/bigconsole/dashboards/${entityIds.dashboard}`,\n icon: <LayoutDashboard className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n if (entityIds.parser)\n links.push({\n key: 'parser',\n label: t('bigconsole.widget.aiPreviewMini.link.parser', 'Parser'),\n path: `/bigconsole/parsers/${entityIds.parser}`,\n icon: <Braces className=\"size-4 shrink-0 text-text-muted\" aria-hidden=\"true\" />,\n });\n\n const railSteps: AssistantPreviewStep[] = PREVIEW_STEPS.map((key) => ({\n id: key,\n label: t(STEP_LABEL[key].key, STEP_LABEL[key].fallback),\n status: steps[key],\n }));\n\n return (\n // ★ The wrapper owns POSITIONING only — clearance for the assistant dock,\n // page gutters, and the testids this panel already had. Everything visual\n // belongs to the shared surface, which is what keeps this copy and the full\n // panel from drifting apart now that `previewShared` no longer holds a shell\n // recipe for them both.\n //\n // ★★ PADDING, not margin: `mx-4 md:mx-6` is the page gutter and it is\n // RESPONSIVE. See DOCK_CLEARANCE's docblock.\n <div\n data-testid=\"ai-preview-panel\"\n data-variant=\"mini\"\n style={{ paddingRight: DOCK_CLEARANCE }}\n className=\"mx-4 mb-3 mt-3 min-w-0 md:mx-6\"\n >\n {/* ★★ The panel's own heading, restored. The shared surface renders its\n title as a styled <span> inside a <section aria-label>, which labels\n the region but leaves NO heading — while it still renders an <h3> for\n the step rail. main had <h2>AI Preview</h2> above that <h3>, so the\n migration both removed the panel from screen-reader heading navigation\n and orphaned the h3 under whatever <h2> the page beneath happens to\n end with. Visually hidden because the surface already shows the title;\n this only restores the structure. */}\n <h2 className=\"sr-only\">{t('bigconsole.widget.aiPreviewMini.title', 'AI Preview')}</h2>\n <AssistantEntityPreview\n title={t('bigconsole.widget.aiPreviewMini.title', 'AI Preview')}\n steps={railSteps}\n // ★★ TWO branches, not three, and deliberately so: the shared surface\n // renders `{error ? '' : caption}` — it BLANKS the caption whenever\n // `error` is set, so a failure branch here would compute a string that\n // is then discarded. The failure is named in `meta` instead, which\n // `PreviewHeader` renders without consulting `error`.\n caption={\n isRunning\n ? caption || t('bigconsole.widget.aiPreviewMini.working', 'Working…')\n : t('bigconsole.widget.aiPreviewMini.done', 'Done')\n }\n error={error}\n meta={\n <PreviewMeta\n state={isRunning ? 'running' : error ? 'stopped' : 'idle'}\n stateLabel={\n isRunning\n ? t('bigconsole.widget.aiPreviewMini.live', 'Live')\n : error\n ? t('bigconsole.widget.aiPreviewMini.stopped', 'Stopped')\n : null\n }\n updatedLabel={t('bigconsole.widget.aiPreviewMini.updated', 'updated')}\n updatedAt={updatedAt}\n ago={(seconds) => formatAgo(seconds, t)}\n />\n }\n headerActions={\n <Button\n size=\"sm\"\n variant=\"ghost\"\n onClick={closePreview}\n aria-label={t('bigconsole.widget.aiPreviewMini.closeAriaLabel', 'Close preview')}\n data-testid=\"ai-preview-close\"\n >\n <X className=\"size-4\" />\n </Button>\n }\n labels={previewLabels(t)}\n >\n {/* ★ No tabs here, by design: the rich per-entity views need Apollo and\n the BigConsole providers, which do not exist above the router. Links\n are what this copy can honestly offer. */}\n <div className=\"p-3\">\n <Section\n emphasis=\"standard\"\n padding=\"compact\"\n headingLevel={3}\n title={t('bigconsole.widget.aiPreviewMini.builtSoFar', 'Built so far')}\n description={t('bigconsole.widget.aiPreviewMini.builtSoFarHint', 'Open any piece to see the real thing.')}\n bodyClassName=\"flex flex-col gap-list-gap\"\n >\n {links.length === 0 ? (\n <p className=\"text-sm text-text-muted\">\n {isRunning\n ? t(\n 'bigconsole.widget.aiPreviewMini.building',\n 'Building… links appear here as each piece is created.'\n )\n : t('bigconsole.widget.aiPreviewMini.nothingBuilt', 'Nothing built yet.')}\n </p>\n ) : (\n links.map((link) => (\n <div\n key={link.key}\n data-testid=\"ai-preview-row\"\n className=\"flex min-w-0 items-center justify-between gap-control-gap rounded-card border border-[var(--color-border-subtle)] bg-bg-canvas px-3 py-2\"\n >\n <p className=\"flex min-w-0 items-center gap-icon-gap text-sm font-medium text-text-primary\">\n {link.icon}\n <span className=\"truncate\">\n {t('bigconsole.widget.aiPreviewMini.linkReady', '{{label}} ready', { label: link.label })}\n </span>\n </p>\n <Button size=\"sm\" variant=\"ghost\" onClick={() => go(link.path)}>\n {t('bigconsole.widget.aiPreviewMini.open', 'Open')}\n <ArrowUpRight className=\"ml-1 size-3.5\" />\n </Button>\n </div>\n ))\n )}\n {entityIds.dashboard ? (\n // fe-libs `Button` is `whitespace-nowrap` with a fixed `h-8` at\n // `size=\"sm\"`, so this long label overflowed the panel (which is\n // `overflow-hidden`) at 390px — and the hi/ta strings are longer\n // still. `h-auto whitespace-normal` lets it wrap to two lines\n // instead of being clipped.\n <Button\n size=\"sm\"\n variant=\"outline\"\n className=\"h-auto w-full whitespace-normal py-1.5 text-center\"\n data-testid=\"ai-preview-open-in-bigconsole\"\n onClick={() => go(`/bigconsole/dashboards/${entityIds.dashboard ?? ''}`)}\n >\n {t('bigconsole.widget.aiPreviewMini.openInBigConsole', 'Open in BigConsole for the live view')}\n <ArrowUpRight className=\"ml-1 size-3.5\" />\n </Button>\n ) : null}\n </Section>\n </div>\n </AssistantEntityPreview>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAmDA,SAAgB,EAAmB,EAAE,iBAAuC;CAC1E,IAAM,EAAE,SAAM,GAAS,EAIjB,IAAoB,GAA+B,EACnD,IAAY,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8CAA8C,eAAe;KACtE,aAAa,EAAE,kDAAkD,wCAAwC;KACzG,eAAc;eANhB,CAQG,EAAM,WAAW,IAChB,kBAAC,KAAD;MAAG,WAAU;gBACV,IACG,EACE,4CACA,wDACD,GACD,EAAE,gDAAgD,qBAAqB;MACzE,CAAA,GAEJ,EAAM,KAAK,MACT,kBAAC,OAAD;MAEE,eAAY;MACZ,WAAU;gBAHZ,CAKE,kBAAC,KAAD;OAAG,WAAU;iBAAb,CACG,EAAK,MACN,kBAAC,QAAD;QAAM,WAAU;kBACb,EAAE,6CAA6C,mBAAmB,EAAE,OAAO,EAAK,OAAO,CAAC;QACpF,CAAA,CACL;UACJ,kBAAC,GAAD;OAAQ,MAAK;OAAK,SAAQ;OAAQ,eAAe,EAAG,EAAK,KAAK;iBAA9D,CACG,EAAE,wCAAwC,OAAO,EAClD,kBAAC,GAAD,EAAc,WAAU,iBAAkB,CAAA,CACnC;SACL;QAdC,EAAK,IAcN,CACN,EAEH,EAAU,YAMT,kBAAC,GAAD;MACE,MAAK;MACL,SAAQ;MACR,WAAU;MACV,eAAY;MACZ,eAAe,EAAG,0BAA0B,EAAU,aAAa,KAAK;gBAL1E,CAOG,EAAE,oDAAoD,uCAAuC,EAC9F,kBAAC,GAAD,EAAc,WAAU,iBAAkB,CAAA,CACnC;UACP,KACI;;IACN,CAAA;GACiB,CAAA,CACrB"}
|
|
@@ -1,163 +1,164 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../common/index.js";
|
|
3
|
-
import { useBigConsoleNavigate as t } from "../../context/BigConsoleContext.js";
|
|
1
|
+
import { useBigConsoleNavigate as e } from "../../context/BigConsoleContext.js";
|
|
4
2
|
import "../../context/index.js";
|
|
3
|
+
import { useAssistantPanelShowsPreview as t } from "../../assistant/useAssistantPanelShowsPreview.js";
|
|
5
4
|
import { PREVIEW_STEPS as n, useAssistantRunStore as r } from "../../assistant/assistantRunStore.js";
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
5
|
+
import { Section as i } from "../common/Section.js";
|
|
6
|
+
import "../common/index.js";
|
|
7
|
+
import { DOCK_CLEARANCE as a, PreviewMeta as o, STEP_LABEL as s, formatAgo as c, previewLabels as l } from "./previewShared.js";
|
|
8
|
+
import { DashboardContent as u, DataSinkContent as d, ParserContent as f, WidgetsContent as p } from "./AiPreviewContent.js";
|
|
9
|
+
import { useEffect as m, useRef as h, useState as g } from "react";
|
|
10
|
+
import { ArrowUpRight as _, Loader2 as v, Sparkles as y, X as b } from "lucide-react";
|
|
11
11
|
import { Button as x } from "@burdenoff/fe-libs/ui";
|
|
12
12
|
import { jsx as S, jsxs as C } from "react/jsx-runtime";
|
|
13
13
|
import { AssistantEntityPreview as w } from "@burdenoff/fe-libs/shared/assistant";
|
|
14
|
+
import { useI18n as T } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
14
15
|
//#region src/bigconsole/components/preview/AiPreviewPanel.tsx
|
|
15
|
-
function
|
|
16
|
+
function E({ children: e }) {
|
|
16
17
|
return /* @__PURE__ */ S("div", {
|
|
17
18
|
className: "min-w-0 overflow-y-auto p-3",
|
|
18
19
|
style: { maxHeight: "min(440px, 60vh)" },
|
|
19
20
|
children: e
|
|
20
21
|
});
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
let { t } =
|
|
23
|
+
function D({ onOpen: e }) {
|
|
24
|
+
let { t } = T();
|
|
24
25
|
return /* @__PURE__ */ C(x, {
|
|
25
26
|
size: "sm",
|
|
26
27
|
variant: "outline",
|
|
27
28
|
onClick: e,
|
|
28
29
|
"data-testid": "ai-preview-open-entity",
|
|
29
|
-
children: [t("bigconsole.widget.aiPreview.open", "Open"), /* @__PURE__ */ S(
|
|
30
|
+
children: [t("bigconsole.widget.aiPreview.open", "Open"), /* @__PURE__ */ S(_, { className: "ml-1 size-3.5" })]
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
-
let { t:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}), [
|
|
37
|
-
let [
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
if (!
|
|
33
|
+
function O() {
|
|
34
|
+
let { t: _ } = T(), O = t(), k = e(), A = r((e) => e.isRunning), j = r((e) => e.previewOpen), M = r((e) => e.hasRun), N = r((e) => e.steps), P = r((e) => e.entityIds), F = r((e) => e.caption), I = r((e) => e.error), L = r((e) => e.updatedAt), R = r((e) => e.openPreview), z = r((e) => e.closePreview), B = r((e) => e.setRichMounted);
|
|
35
|
+
m(() => (B(!0), () => {
|
|
36
|
+
B(!1);
|
|
37
|
+
}), [B]);
|
|
38
|
+
let [V, H] = g(0), U = h(!1);
|
|
39
|
+
if (m(() => {
|
|
40
|
+
A && !U.current && H((e) => e + 1), U.current = A;
|
|
41
|
+
}, [A]), !M || O) return null;
|
|
42
|
+
if (!j) return /* @__PURE__ */ C("div", {
|
|
42
43
|
className: "flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6",
|
|
43
|
-
style: { marginRight:
|
|
44
|
+
style: { marginRight: a },
|
|
44
45
|
children: [/* @__PURE__ */ S("span", {
|
|
45
46
|
className: "text-xs text-text-muted",
|
|
46
|
-
children:
|
|
47
|
+
children: A ? _("bigconsole.widget.aiPreview.buildRunning", "AI build running") : _("bigconsole.widget.aiPreview.buildFinished", "AI build finished")
|
|
47
48
|
}), /* @__PURE__ */ C(x, {
|
|
48
49
|
size: "sm",
|
|
49
50
|
variant: "outline",
|
|
50
|
-
onClick:
|
|
51
|
+
onClick: R,
|
|
51
52
|
"data-testid": "ai-preview-open",
|
|
52
53
|
children: [
|
|
53
|
-
/* @__PURE__ */ S(
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
/* @__PURE__ */ S(y, { className: "mr-1.5 size-4" }),
|
|
55
|
+
_("bigconsole.widget.aiPreview.previewButton", "Preview"),
|
|
56
|
+
A ? /* @__PURE__ */ S(v, { className: "ml-1.5 size-3.5 animate-spin" }) : null
|
|
56
57
|
]
|
|
57
58
|
})]
|
|
58
59
|
});
|
|
59
|
-
let
|
|
60
|
+
let W = P.dashboard, G = n.map((e) => ({
|
|
60
61
|
id: e,
|
|
61
|
-
label:
|
|
62
|
-
status:
|
|
63
|
-
})),
|
|
62
|
+
label: _(s[e].key, s[e].fallback),
|
|
63
|
+
status: N[e]
|
|
64
|
+
})), K = [
|
|
64
65
|
{
|
|
65
66
|
id: "datasink",
|
|
66
|
-
label:
|
|
67
|
-
render: () => /* @__PURE__ */ S(
|
|
67
|
+
label: _("bigconsole.widget.aiPreview.tab.dataSink", "Data Sink"),
|
|
68
|
+
render: () => /* @__PURE__ */ S(E, { children: /* @__PURE__ */ S(i, {
|
|
68
69
|
emphasis: "standard",
|
|
69
70
|
padding: "compact",
|
|
70
71
|
headingLevel: 3,
|
|
71
|
-
title:
|
|
72
|
-
description:
|
|
73
|
-
actions:
|
|
74
|
-
children: /* @__PURE__ */ S(
|
|
75
|
-
id:
|
|
76
|
-
live:
|
|
72
|
+
title: _("bigconsole.widget.aiPreview.dataSinkRows", "Data sink rows"),
|
|
73
|
+
description: _("bigconsole.widget.aiPreview.dataSinkRowsHint", "The rows the assistant just landed, straight from the sink."),
|
|
74
|
+
actions: P.datasink ? /* @__PURE__ */ S(D, { onOpen: () => k(`/datasinks/${P.datasink}`) }) : void 0,
|
|
75
|
+
children: /* @__PURE__ */ S(d, {
|
|
76
|
+
id: P.datasink,
|
|
77
|
+
live: A
|
|
77
78
|
})
|
|
78
79
|
}) })
|
|
79
80
|
},
|
|
80
81
|
{
|
|
81
82
|
id: "dashboard",
|
|
82
|
-
label:
|
|
83
|
-
render: () => /* @__PURE__ */ S(
|
|
83
|
+
label: _("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
|
|
84
|
+
render: () => /* @__PURE__ */ S(E, { children: /* @__PURE__ */ S(i, {
|
|
84
85
|
emphasis: "standard",
|
|
85
86
|
padding: "compact",
|
|
86
87
|
headingLevel: 3,
|
|
87
|
-
title:
|
|
88
|
-
description:
|
|
89
|
-
actions:
|
|
90
|
-
children: /* @__PURE__ */ S(
|
|
88
|
+
title: _("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
|
|
89
|
+
description: _("bigconsole.widget.aiPreview.dashboardHint", "The live board, rendered exactly as the real page renders it."),
|
|
90
|
+
actions: W ? /* @__PURE__ */ S(D, { onOpen: () => k(`/dashboards/${W}`) }) : void 0,
|
|
91
|
+
children: /* @__PURE__ */ S(u, { dashboardId: W })
|
|
91
92
|
}) })
|
|
92
93
|
},
|
|
93
94
|
{
|
|
94
95
|
id: "parser",
|
|
95
|
-
label:
|
|
96
|
-
render: () => /* @__PURE__ */ S(
|
|
96
|
+
label: _("bigconsole.widget.aiPreview.tab.parser", "Parser"),
|
|
97
|
+
render: () => /* @__PURE__ */ S(E, { children: /* @__PURE__ */ S(i, {
|
|
97
98
|
emphasis: "standard",
|
|
98
99
|
padding: "compact",
|
|
99
100
|
headingLevel: 3,
|
|
100
|
-
title:
|
|
101
|
-
description:
|
|
102
|
-
actions:
|
|
103
|
-
children: /* @__PURE__ */ S(
|
|
104
|
-
parserId:
|
|
105
|
-
live:
|
|
101
|
+
title: _("bigconsole.widget.aiPreview.parserOutput", "Parser output"),
|
|
102
|
+
description: _("bigconsole.widget.aiPreview.parserOutputHint", "The rows after the parser's transform, so you can check the shape."),
|
|
103
|
+
actions: P.parser ? /* @__PURE__ */ S(D, { onOpen: () => k(`/parsers/${P.parser}`) }) : void 0,
|
|
104
|
+
children: /* @__PURE__ */ S(f, {
|
|
105
|
+
parserId: P.parser,
|
|
106
|
+
live: A
|
|
106
107
|
})
|
|
107
108
|
}) })
|
|
108
109
|
},
|
|
109
110
|
{
|
|
110
111
|
id: "widget",
|
|
111
|
-
label:
|
|
112
|
-
render: () => /* @__PURE__ */ S(
|
|
112
|
+
label: _("bigconsole.widget.aiPreview.tab.widget", "Widget"),
|
|
113
|
+
render: () => /* @__PURE__ */ S(E, { children: /* @__PURE__ */ S(i, {
|
|
113
114
|
emphasis: "standard",
|
|
114
115
|
padding: "compact",
|
|
115
116
|
headingLevel: 3,
|
|
116
|
-
title:
|
|
117
|
-
description:
|
|
118
|
-
actions:
|
|
119
|
-
children: /* @__PURE__ */ S(
|
|
120
|
-
dashboardId:
|
|
121
|
-
live:
|
|
117
|
+
title: _("bigconsole.widget.aiPreview.widgets", "Widgets"),
|
|
118
|
+
description: _("bigconsole.widget.aiPreview.widgetsHint", "Every widget on the new dashboard, rendered live."),
|
|
119
|
+
actions: W ? /* @__PURE__ */ S(D, { onOpen: () => k(`/dashboards/${W}`) }) : void 0,
|
|
120
|
+
children: /* @__PURE__ */ S(p, {
|
|
121
|
+
dashboardId: W,
|
|
122
|
+
live: A
|
|
122
123
|
})
|
|
123
124
|
}) })
|
|
124
125
|
}
|
|
125
126
|
];
|
|
126
127
|
return /* @__PURE__ */ C("div", {
|
|
127
128
|
"data-testid": "ai-preview-panel",
|
|
128
|
-
style: { paddingRight:
|
|
129
|
+
style: { paddingRight: a },
|
|
129
130
|
className: "mx-4 mt-3 min-w-0 md:mx-6",
|
|
130
131
|
children: [/* @__PURE__ */ S("h2", {
|
|
131
132
|
className: "sr-only",
|
|
132
|
-
children:
|
|
133
|
+
children: _("bigconsole.widget.aiPreview.title", "AI Preview")
|
|
133
134
|
}), /* @__PURE__ */ S(w, {
|
|
134
|
-
title:
|
|
135
|
-
runKey: String(
|
|
136
|
-
steps:
|
|
137
|
-
tabs:
|
|
135
|
+
title: _("bigconsole.widget.aiPreview.title", "AI Preview"),
|
|
136
|
+
runKey: String(V),
|
|
137
|
+
steps: G,
|
|
138
|
+
tabs: K,
|
|
138
139
|
follow: "produced",
|
|
139
|
-
caption:
|
|
140
|
-
error:
|
|
141
|
-
meta: /* @__PURE__ */ S(
|
|
142
|
-
state:
|
|
143
|
-
stateLabel:
|
|
144
|
-
updatedLabel:
|
|
145
|
-
updatedAt:
|
|
146
|
-
ago: (e) =>
|
|
140
|
+
caption: A ? F || _("bigconsole.widget.aiPreview.working", "Working…") : _("bigconsole.widget.aiPreview.done", "Done"),
|
|
141
|
+
error: I,
|
|
142
|
+
meta: /* @__PURE__ */ S(o, {
|
|
143
|
+
state: A ? "running" : I ? "stopped" : "idle",
|
|
144
|
+
stateLabel: A ? _("bigconsole.widget.aiPreview.live", "Live") : I ? _("bigconsole.widget.aiPreview.stopped", "Stopped") : null,
|
|
145
|
+
updatedLabel: _("bigconsole.widget.aiPreview.updated", "updated"),
|
|
146
|
+
updatedAt: L,
|
|
147
|
+
ago: (e) => c(e, _)
|
|
147
148
|
}),
|
|
148
149
|
headerActions: /* @__PURE__ */ S(x, {
|
|
149
150
|
size: "sm",
|
|
150
151
|
variant: "ghost",
|
|
151
|
-
onClick:
|
|
152
|
-
"aria-label":
|
|
152
|
+
onClick: z,
|
|
153
|
+
"aria-label": _("bigconsole.widget.aiPreview.closeAriaLabel", "Close preview"),
|
|
153
154
|
"data-testid": "ai-preview-close",
|
|
154
|
-
children: /* @__PURE__ */ S(
|
|
155
|
+
children: /* @__PURE__ */ S(b, { className: "size-4" })
|
|
155
156
|
}),
|
|
156
|
-
labels:
|
|
157
|
+
labels: l(_)
|
|
157
158
|
})]
|
|
158
159
|
});
|
|
159
160
|
}
|
|
160
161
|
//#endregion
|
|
161
|
-
export {
|
|
162
|
+
export { O as AiPreviewPanel };
|
|
162
163
|
|
|
163
164
|
//# sourceMappingURL=AiPreviewPanel.js.map
|