@burdenoff/microfe-bigconsole 2026.1008.14 → 2026.1010.10
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/pageControls.d.ts +81 -0
- package/dist/bigconsole/assistant/pageControls.js +169 -0
- package/dist/bigconsole/assistant/previewControl.d.ts +16 -0
- package/dist/bigconsole/assistant/previewControl.js +10 -0
- package/dist/bigconsole/assistant/usePreviewControl.d.ts +2 -0
- package/dist/bigconsole/assistant/usePreviewControl.js +20 -0
- package/dist/bigconsole/components/common/SortBySelect.d.ts +11 -0
- package/dist/bigconsole/components/common/SortBySelect.js +29 -0
- package/dist/bigconsole/components/common/index.d.ts +1 -0
- package/dist/bigconsole/components/common/index.js +1 -0
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +77 -76
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +96 -95
- package/dist/bigconsole/pages/DashboardViewPage.js +258 -235
- package/dist/bigconsole/pages/DashboardsPage.js +269 -221
- package/dist/bigconsole/pages/DataParsersPage.js +180 -157
- package/dist/bigconsole/pages/DataSinksPage.js +274 -238
- package/dist/bigconsole/pages/PipelinesPage.js +93 -74
- package/dist/bigconsole/utils/dashboardList.d.ts +28 -0
- package/dist/bigconsole/utils/dashboardList.js +15 -0
- package/dist/bigconsole/utils/dataSinkList.d.ts +15 -0
- package/dist/bigconsole/utils/dataSinkList.js +15 -0
- package/dist/bigconsole/utils/listSort.d.ts +80 -0
- package/dist/bigconsole/utils/listSort.js +85 -0
- package/package.json +3 -3
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { PageControlsAdapter } from '@burdenoff/fe-libs/shared/assistant/appControls/types';
|
|
2
|
+
import { ListSortValue, SortTr } from '../utils/listSort';
|
|
3
|
+
|
|
4
|
+
export type Tr = SortTr;
|
|
5
|
+
export interface Opt<V extends string> {
|
|
6
|
+
value: V;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The page's sort menu as an adapter `sort`: Name and Last updated, each both
|
|
11
|
+
* ways. `value` `default` (a page's untouched order) reports no current sort.
|
|
12
|
+
*/
|
|
13
|
+
export declare function listSortOf(input: {
|
|
14
|
+
tr: Tr;
|
|
15
|
+
value: ListSortValue;
|
|
16
|
+
set: (value: ListSortValue) => void;
|
|
17
|
+
}): NonNullable<PageControlsAdapter['sort']>;
|
|
18
|
+
export interface DashboardsListInput {
|
|
19
|
+
tr: Tr;
|
|
20
|
+
/** The categories present in the data (the user's own words). */
|
|
21
|
+
categories: readonly string[];
|
|
22
|
+
/** The statuses present in the data, labelled as the page labels them. */
|
|
23
|
+
statuses: readonly Opt<string>[];
|
|
24
|
+
category: string;
|
|
25
|
+
status: string;
|
|
26
|
+
setCategory: (value: string) => void;
|
|
27
|
+
setStatus: (value: string) => void;
|
|
28
|
+
setSearch: (query: string) => void;
|
|
29
|
+
sort: ListSortValue;
|
|
30
|
+
setSort: (value: ListSortValue) => void;
|
|
31
|
+
}
|
|
32
|
+
export declare function dashboardsListControls(i: DashboardsListInput): PageControlsAdapter;
|
|
33
|
+
export type SetupStateValue = 'all' | 'in_progress' | 'completed';
|
|
34
|
+
export type DataSinkStatusValue = 'ready' | 'error' | 'stale' | 'refreshing';
|
|
35
|
+
export interface DataSinksListInput {
|
|
36
|
+
tr: Tr;
|
|
37
|
+
setupStateOptions: readonly Opt<SetupStateValue>[];
|
|
38
|
+
setupState: SetupStateValue;
|
|
39
|
+
setSetupState: (value: SetupStateValue) => void;
|
|
40
|
+
status: DataSinkStatusValue | null;
|
|
41
|
+
setStatus: (value: DataSinkStatusValue | null) => void;
|
|
42
|
+
active: boolean | null;
|
|
43
|
+
setActive: (value: boolean | null) => void;
|
|
44
|
+
setSearch: (query: string) => void;
|
|
45
|
+
sort: ListSortValue;
|
|
46
|
+
setSort: (value: ListSortValue) => void;
|
|
47
|
+
}
|
|
48
|
+
export declare function dataSinksListControls(i: DataSinksListInput): PageControlsAdapter;
|
|
49
|
+
export interface ParsersListInput {
|
|
50
|
+
tr: Tr;
|
|
51
|
+
typeOptions: readonly Opt<string>[];
|
|
52
|
+
statusOptions: readonly Opt<string>[];
|
|
53
|
+
type: string;
|
|
54
|
+
status: string;
|
|
55
|
+
setType: (value: string) => void;
|
|
56
|
+
setStatus: (value: string) => void;
|
|
57
|
+
setSearch: (query: string) => void;
|
|
58
|
+
}
|
|
59
|
+
export declare function parsersListControls(i: ParsersListInput): PageControlsAdapter;
|
|
60
|
+
export interface PipelinesListInput {
|
|
61
|
+
tr: Tr;
|
|
62
|
+
statusOptions: readonly Opt<string>[];
|
|
63
|
+
status: string;
|
|
64
|
+
setStatus: (value: string) => void;
|
|
65
|
+
setSearch: (query: string) => void;
|
|
66
|
+
}
|
|
67
|
+
export declare function pipelinesListControls(i: PipelinesListInput): PageControlsAdapter;
|
|
68
|
+
export interface DashboardPageTabsInput {
|
|
69
|
+
/** The dashboard's own name (user data), said back as the page. */
|
|
70
|
+
dashboardName: string;
|
|
71
|
+
tabs: readonly {
|
|
72
|
+
id: string;
|
|
73
|
+
label: string;
|
|
74
|
+
}[];
|
|
75
|
+
/** The page now shown. */
|
|
76
|
+
current: string | null;
|
|
77
|
+
/** The toolbar's own handler (pushes `?page=`). */
|
|
78
|
+
select: (id: string) => void;
|
|
79
|
+
}
|
|
80
|
+
/** Null when the dashboard has no pages to switch between. */
|
|
81
|
+
export declare function dashboardPageTabs(i: DashboardPageTabsInput): PageControlsAdapter | null;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { LIST_SORT_COPY as e } from "../utils/listSort.js";
|
|
2
|
+
import { enumFilter as t, filtersOf as n, searchOf as r, sortOf as i, tabsOf as a } from "@burdenoff/fe-libs/shared/assistant/appControls/pageAdapters";
|
|
3
|
+
//#region src/bigconsole/assistant/pageControls.ts
|
|
4
|
+
var o = (e) => e.filter.options().length > 0;
|
|
5
|
+
function s(t) {
|
|
6
|
+
return i({
|
|
7
|
+
fields: [{
|
|
8
|
+
id: "name",
|
|
9
|
+
label: t.tr(e.fieldName.key, e.fieldName.en),
|
|
10
|
+
asc: "name-asc",
|
|
11
|
+
desc: "name-desc"
|
|
12
|
+
}, {
|
|
13
|
+
id: "updated",
|
|
14
|
+
label: t.tr(e.fieldUpdated.key, e.fieldUpdated.en),
|
|
15
|
+
asc: "updated-asc",
|
|
16
|
+
desc: "updated-desc"
|
|
17
|
+
}],
|
|
18
|
+
value: t.value,
|
|
19
|
+
set: t.set
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
function c(e, t, i, a) {
|
|
23
|
+
let s = t.filter(o);
|
|
24
|
+
return {
|
|
25
|
+
page: e,
|
|
26
|
+
...s.length > 0 ? { filters: n(s) } : {},
|
|
27
|
+
...a ? { sort: a } : {},
|
|
28
|
+
search: r(i)
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function l(e) {
|
|
32
|
+
let n = t({
|
|
33
|
+
id: "category",
|
|
34
|
+
label: e.tr("bigconsole.dashboards.filters.category", "Category"),
|
|
35
|
+
options: [{
|
|
36
|
+
value: "",
|
|
37
|
+
label: e.tr("bigconsole.dashboards.filters.allCategories", "All categories")
|
|
38
|
+
}, ...e.categories.map((e) => ({
|
|
39
|
+
value: e,
|
|
40
|
+
label: e
|
|
41
|
+
}))],
|
|
42
|
+
neutral: "",
|
|
43
|
+
value: e.category,
|
|
44
|
+
set: e.setCategory
|
|
45
|
+
}), r = t({
|
|
46
|
+
id: "status",
|
|
47
|
+
label: e.tr("bigconsole.dashboards.filters.status", "Status"),
|
|
48
|
+
options: [{
|
|
49
|
+
value: "",
|
|
50
|
+
label: e.tr("bigconsole.dashboards.filters.allStatuses", "All statuses")
|
|
51
|
+
}, ...e.statuses],
|
|
52
|
+
neutral: "",
|
|
53
|
+
value: e.status,
|
|
54
|
+
set: e.setStatus
|
|
55
|
+
});
|
|
56
|
+
return c(e.tr("bigconsole.dashboards.title", "Dashboards"), [n, r], e.setSearch, s({
|
|
57
|
+
tr: e.tr,
|
|
58
|
+
value: e.sort,
|
|
59
|
+
set: e.setSort
|
|
60
|
+
}));
|
|
61
|
+
}
|
|
62
|
+
function u(e) {
|
|
63
|
+
let n = t({
|
|
64
|
+
id: "setupState",
|
|
65
|
+
label: e.tr("bigconsole.dataSinks.filters.setupState.label", "Setup state"),
|
|
66
|
+
options: e.setupStateOptions,
|
|
67
|
+
neutral: "all",
|
|
68
|
+
value: e.setupState,
|
|
69
|
+
set: e.setSetupState
|
|
70
|
+
}), r = t({
|
|
71
|
+
id: "status",
|
|
72
|
+
label: e.tr("bigconsole.dataSinks.table.status", "Status"),
|
|
73
|
+
options: [
|
|
74
|
+
{
|
|
75
|
+
value: "all",
|
|
76
|
+
label: e.tr("bigconsole.dataSinks.filters.status.all", "All Statuses")
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
value: "ready",
|
|
80
|
+
label: e.tr("bigconsole.dataSinks.filters.status.ready", "Ready")
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
value: "error",
|
|
84
|
+
label: e.tr("bigconsole.dataSinks.filters.status.error", "Error")
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
value: "stale",
|
|
88
|
+
label: e.tr("bigconsole.dataSinks.filters.status.stale", "Stale")
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
value: "refreshing",
|
|
92
|
+
label: e.tr("bigconsole.dataSinks.filters.status.refreshing", "Refreshing")
|
|
93
|
+
}
|
|
94
|
+
],
|
|
95
|
+
neutral: "all",
|
|
96
|
+
value: e.status ?? "all",
|
|
97
|
+
set: (t) => e.setStatus(t === "all" ? null : t)
|
|
98
|
+
}), i = t({
|
|
99
|
+
id: "active",
|
|
100
|
+
label: e.tr("bigconsole.dataSinks.table.active", "Active"),
|
|
101
|
+
options: [
|
|
102
|
+
{
|
|
103
|
+
value: "all",
|
|
104
|
+
label: e.tr("bigconsole.dataSinks.filters.active.all", "All")
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
value: "true",
|
|
108
|
+
label: e.tr("bigconsole.dataSinks.filters.active.active", "Active")
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
value: "false",
|
|
112
|
+
label: e.tr("bigconsole.dataSinks.filters.active.inactive", "Inactive")
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
neutral: "all",
|
|
116
|
+
value: e.active === null ? "all" : e.active ? "true" : "false",
|
|
117
|
+
set: (t) => e.setActive(t === "all" ? null : t === "true")
|
|
118
|
+
});
|
|
119
|
+
return c(e.tr("bigconsole.dataSinks.title", "Data Sinks"), [
|
|
120
|
+
n,
|
|
121
|
+
r,
|
|
122
|
+
i
|
|
123
|
+
], e.setSearch, s({
|
|
124
|
+
tr: e.tr,
|
|
125
|
+
value: e.sort,
|
|
126
|
+
set: e.setSort
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
129
|
+
function d(e) {
|
|
130
|
+
let n = t({
|
|
131
|
+
id: "type",
|
|
132
|
+
label: e.tr("bigconsole.parsers.view.type", "Type"),
|
|
133
|
+
options: e.typeOptions,
|
|
134
|
+
neutral: "all",
|
|
135
|
+
value: e.type,
|
|
136
|
+
set: e.setType
|
|
137
|
+
}), r = t({
|
|
138
|
+
id: "status",
|
|
139
|
+
label: e.tr("bigconsole.parsers.view.status", "Status"),
|
|
140
|
+
options: e.statusOptions,
|
|
141
|
+
neutral: "all",
|
|
142
|
+
value: e.status,
|
|
143
|
+
set: e.setStatus
|
|
144
|
+
});
|
|
145
|
+
return c(e.tr("bigconsole.parsers.list.title", "Data Parsers"), [n, r], e.setSearch, void 0);
|
|
146
|
+
}
|
|
147
|
+
function f(e) {
|
|
148
|
+
let n = t({
|
|
149
|
+
id: "status",
|
|
150
|
+
label: e.tr("bigconsole.pipelines.view.detailStatus", "Status"),
|
|
151
|
+
options: e.statusOptions,
|
|
152
|
+
neutral: "all",
|
|
153
|
+
value: e.status,
|
|
154
|
+
set: e.setStatus
|
|
155
|
+
});
|
|
156
|
+
return c(e.tr("bigconsole.pipelines.list.heading", "Pipelines"), [n], e.setSearch, void 0);
|
|
157
|
+
}
|
|
158
|
+
function p(e) {
|
|
159
|
+
return e.tabs.length === 0 || e.current === null ? null : {
|
|
160
|
+
page: e.dashboardName,
|
|
161
|
+
tabs: a({
|
|
162
|
+
items: e.tabs,
|
|
163
|
+
value: e.current,
|
|
164
|
+
set: e.select
|
|
165
|
+
})
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
//#endregion
|
|
169
|
+
export { p as dashboardPageTabs, l as dashboardsListControls, u as dataSinksListControls, d as parsersListControls, f as pipelinesListControls };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { PreviewControl } from '@burdenoff/fe-libs/shared/assistant/appControls/types';
|
|
2
|
+
|
|
3
|
+
/** What the control needs from the run store. `isOpen` is read FRESH on every call. */
|
|
4
|
+
export interface PreviewRunPort {
|
|
5
|
+
hasRun: boolean;
|
|
6
|
+
isOpen: () => boolean;
|
|
7
|
+
open: () => void;
|
|
8
|
+
close: () => void;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Null without a run: no Preview button is on screen then, so "open the AI
|
|
12
|
+
* preview" goes to the model. Drawn on the page beside the assistant, so the
|
|
13
|
+
* surface is "page" (Voice may open it). Open and close are SET: `already`
|
|
14
|
+
* when it is in the state asked for.
|
|
15
|
+
*/
|
|
16
|
+
export declare function previewControlOf(run: PreviewRunPort): PreviewControl | null;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/bigconsole/assistant/previewControl.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
return e.hasRun ? {
|
|
4
|
+
surface: "page",
|
|
5
|
+
run: () => e.isOpen() ? { status: "already" } : (e.open(), { status: "done" }),
|
|
6
|
+
close: () => e.isOpen() ? (e.close(), { status: "done" }) : { status: "already" }
|
|
7
|
+
} : null;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { e as previewControlOf };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useAssistantRunStore as e } from "./assistantRunStore.js";
|
|
2
|
+
import { previewControlOf as t } from "./previewControl.js";
|
|
3
|
+
import { useMemo as n } from "react";
|
|
4
|
+
import { useAssistantControl as r } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
5
|
+
//#region src/bigconsole/assistant/usePreviewControl.ts
|
|
6
|
+
function i() {
|
|
7
|
+
let i = e((e) => e.hasRun), a = e((e) => e.openPreview), o = e((e) => e.closePreview);
|
|
8
|
+
r("assistant.preview", n(() => t({
|
|
9
|
+
hasRun: i,
|
|
10
|
+
isOpen: () => e.getState().previewOpen,
|
|
11
|
+
open: a,
|
|
12
|
+
close: o
|
|
13
|
+
}), [
|
|
14
|
+
i,
|
|
15
|
+
a,
|
|
16
|
+
o
|
|
17
|
+
]));
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { i as useBigConsolePreviewControl };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ListSortOption, ListSortValue } from '../../utils/listSort';
|
|
3
|
+
|
|
4
|
+
export interface SortBySelectProps {
|
|
5
|
+
/** The visible label, already translated ("Sort by"). */
|
|
6
|
+
label: string;
|
|
7
|
+
value: ListSortValue;
|
|
8
|
+
options: readonly ListSortOption[];
|
|
9
|
+
onChange: (value: ListSortValue) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const SortBySelect: FC<SortBySelectProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { memo as e } from "react";
|
|
2
|
+
import { Select as t, SelectContent as n, SelectItem as r, SelectTrigger as i, SelectValue as a } from "@burdenoff/fe-libs/ui";
|
|
3
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
4
|
+
//#region src/bigconsole/components/common/SortBySelect.tsx
|
|
5
|
+
var c = (e, t) => t.some((t) => t.value === e), l = e(function({ label: e, value: l, options: u, onChange: d }) {
|
|
6
|
+
return /* @__PURE__ */ s("div", {
|
|
7
|
+
className: "flex min-w-0 items-center gap-control-gap",
|
|
8
|
+
"data-testid": "sort-by",
|
|
9
|
+
children: [/* @__PURE__ */ o("span", {
|
|
10
|
+
className: "shrink-0 text-sm text-text-muted",
|
|
11
|
+
children: e
|
|
12
|
+
}), /* @__PURE__ */ s(t, {
|
|
13
|
+
value: l,
|
|
14
|
+
onValueChange: (e) => {
|
|
15
|
+
c(e, u) && d(e);
|
|
16
|
+
},
|
|
17
|
+
children: [/* @__PURE__ */ o(i, {
|
|
18
|
+
"aria-label": e,
|
|
19
|
+
style: { width: "min(100%, 210px)" },
|
|
20
|
+
children: /* @__PURE__ */ o(a, {})
|
|
21
|
+
}), /* @__PURE__ */ o(n, { children: u.map((e) => /* @__PURE__ */ o(r, {
|
|
22
|
+
value: e.value,
|
|
23
|
+
children: e.label
|
|
24
|
+
}, e.value)) })]
|
|
25
|
+
})]
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { l as SortBySelect };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { Section, SectionHeader, SectionStack } from './Section';
|
|
2
2
|
export type { SectionHeadingLevel, SectionHeaderProps, SectionProps, SectionStackProps } from './Section';
|
|
3
3
|
export { SECTION_FOCUS_RING, SECTION_MOTION, SECTION_STACK, sectionSurfaceClasses, sectionTitleClasses, type SectionEmphasis, type SectionPadding, type SectionTone, } from './sectionStyles';
|
|
4
|
+
export { SortBySelect, type SortBySelectProps } from './SortBySelect';
|
|
@@ -1,133 +1,134 @@
|
|
|
1
1
|
import { PREVIEW_STEPS as e, useAssistantRunStore as t } from "../../assistant/assistantRunStore.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useBigConsolePreviewControl as n } from "../../assistant/usePreviewControl.js";
|
|
3
|
+
import { useAssistantRunWorkspace as r } from "../../assistant/useAssistantRunWorkspace.js";
|
|
4
|
+
import { Section as i } from "../common/Section.js";
|
|
4
5
|
import "../common/index.js";
|
|
5
|
-
import { DOCK_CLEARANCE as
|
|
6
|
-
import { ArrowUpRight as
|
|
7
|
-
import { Button as
|
|
8
|
-
import { useI18n as
|
|
9
|
-
import { jsx as
|
|
10
|
-
import { AssistantEntityPreview as
|
|
6
|
+
import { DOCK_CLEARANCE as a, PreviewMeta as o, STEP_LABEL as s, formatAgo as c, previewLabels as l } from "./previewShared.js";
|
|
7
|
+
import { ArrowUpRight as u, Braces as d, Database as f, LayoutDashboard as p, Loader2 as m, Sparkles as h, X as g } from "lucide-react";
|
|
8
|
+
import { Button as _ } from "@burdenoff/fe-libs/ui";
|
|
9
|
+
import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
10
|
+
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
11
|
+
import { AssistantEntityPreview as x } from "@burdenoff/fe-libs/shared/assistant";
|
|
11
12
|
//#region src/bigconsole/components/preview/AiPreviewMiniPanel.tsx
|
|
12
|
-
function
|
|
13
|
-
let { t:
|
|
14
|
-
n();
|
|
15
|
-
let
|
|
16
|
-
|
|
13
|
+
function S({ onNavigate: S }) {
|
|
14
|
+
let { t: C } = v();
|
|
15
|
+
r(), n();
|
|
16
|
+
let w = t((e) => e.isRunning), T = t((e) => e.previewOpen), E = t((e) => e.hasRun), D = t((e) => e.richMounted), O = t((e) => e.steps), k = t((e) => e.entityIds), A = t((e) => e.caption), j = t((e) => e.error), M = t((e) => e.updatedAt), N = t((e) => e.openPreview), P = t((e) => e.closePreview), F = (e) => {
|
|
17
|
+
S ? S(e) : typeof window < "u" && window.location.assign(e);
|
|
17
18
|
};
|
|
18
|
-
if (!
|
|
19
|
-
if (!
|
|
19
|
+
if (!E || D) return null;
|
|
20
|
+
if (!T) return /* @__PURE__ */ b("div", {
|
|
20
21
|
className: "flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6",
|
|
21
|
-
style: { marginRight:
|
|
22
|
-
children: [/* @__PURE__ */
|
|
22
|
+
style: { marginRight: a },
|
|
23
|
+
children: [/* @__PURE__ */ y("span", {
|
|
23
24
|
className: "text-xs text-text-muted",
|
|
24
|
-
children:
|
|
25
|
-
}), /* @__PURE__ */
|
|
25
|
+
children: w ? C("bigconsole.widget.aiPreview.buildRunning", "AI build running") : C("bigconsole.widget.aiPreview.buildFinished", "AI build finished")
|
|
26
|
+
}), /* @__PURE__ */ b(_, {
|
|
26
27
|
size: "sm",
|
|
27
28
|
variant: "outline",
|
|
28
|
-
onClick:
|
|
29
|
+
onClick: N,
|
|
29
30
|
"data-testid": "ai-preview-open",
|
|
30
31
|
children: [
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
/* @__PURE__ */ y(h, { className: "mr-1.5 size-4" }),
|
|
33
|
+
C("bigconsole.widget.aiPreviewMini.previewButton", "Preview"),
|
|
34
|
+
w ? /* @__PURE__ */ y(m, { className: "ml-1.5 size-3.5 animate-spin" }) : null
|
|
34
35
|
]
|
|
35
36
|
})]
|
|
36
37
|
});
|
|
37
|
-
let
|
|
38
|
-
|
|
38
|
+
let I = [];
|
|
39
|
+
k.datasink && I.push({
|
|
39
40
|
key: "datasink",
|
|
40
|
-
label:
|
|
41
|
-
path: `/bigconsole/datasinks/${
|
|
42
|
-
icon: /* @__PURE__ */
|
|
41
|
+
label: C("bigconsole.widget.aiPreviewMini.link.dataSink", "Data Sink"),
|
|
42
|
+
path: `/bigconsole/datasinks/${k.datasink}`,
|
|
43
|
+
icon: /* @__PURE__ */ y(f, {
|
|
43
44
|
className: "size-4 shrink-0 text-text-muted",
|
|
44
45
|
"aria-hidden": "true"
|
|
45
46
|
})
|
|
46
|
-
}),
|
|
47
|
+
}), k.dashboard && I.push({
|
|
47
48
|
key: "dashboard",
|
|
48
|
-
label:
|
|
49
|
-
path: `/bigconsole/dashboards/${
|
|
50
|
-
icon: /* @__PURE__ */
|
|
49
|
+
label: C("bigconsole.widget.aiPreviewMini.link.dashboard", "Dashboard"),
|
|
50
|
+
path: `/bigconsole/dashboards/${k.dashboard}`,
|
|
51
|
+
icon: /* @__PURE__ */ y(p, {
|
|
51
52
|
className: "size-4 shrink-0 text-text-muted",
|
|
52
53
|
"aria-hidden": "true"
|
|
53
54
|
})
|
|
54
|
-
}),
|
|
55
|
+
}), k.parser && I.push({
|
|
55
56
|
key: "parser",
|
|
56
|
-
label:
|
|
57
|
-
path: `/bigconsole/parsers/${
|
|
58
|
-
icon: /* @__PURE__ */
|
|
57
|
+
label: C("bigconsole.widget.aiPreviewMini.link.parser", "Parser"),
|
|
58
|
+
path: `/bigconsole/parsers/${k.parser}`,
|
|
59
|
+
icon: /* @__PURE__ */ y(d, {
|
|
59
60
|
className: "size-4 shrink-0 text-text-muted",
|
|
60
61
|
"aria-hidden": "true"
|
|
61
62
|
})
|
|
62
63
|
});
|
|
63
|
-
let
|
|
64
|
+
let L = e.map((e) => ({
|
|
64
65
|
id: e,
|
|
65
|
-
label:
|
|
66
|
-
status:
|
|
66
|
+
label: C(s[e].key, s[e].fallback),
|
|
67
|
+
status: O[e]
|
|
67
68
|
}));
|
|
68
|
-
return /* @__PURE__ */
|
|
69
|
+
return /* @__PURE__ */ b("div", {
|
|
69
70
|
"data-testid": "ai-preview-panel",
|
|
70
71
|
"data-variant": "mini",
|
|
71
|
-
style: { paddingRight:
|
|
72
|
+
style: { paddingRight: a },
|
|
72
73
|
className: "mx-4 mb-3 mt-3 min-w-0 md:mx-6",
|
|
73
|
-
children: [/* @__PURE__ */
|
|
74
|
+
children: [/* @__PURE__ */ y("h2", {
|
|
74
75
|
className: "sr-only",
|
|
75
|
-
children:
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
-
title:
|
|
78
|
-
steps:
|
|
79
|
-
caption:
|
|
80
|
-
error:
|
|
81
|
-
meta: /* @__PURE__ */
|
|
82
|
-
state:
|
|
83
|
-
stateLabel:
|
|
84
|
-
updatedLabel:
|
|
85
|
-
updatedAt:
|
|
86
|
-
ago: (e) =>
|
|
76
|
+
children: C("bigconsole.widget.aiPreviewMini.title", "AI Preview")
|
|
77
|
+
}), /* @__PURE__ */ y(x, {
|
|
78
|
+
title: C("bigconsole.widget.aiPreviewMini.title", "AI Preview"),
|
|
79
|
+
steps: L,
|
|
80
|
+
caption: w ? A || C("bigconsole.widget.aiPreviewMini.working", "Working…") : C("bigconsole.widget.aiPreviewMini.done", "Done"),
|
|
81
|
+
error: j,
|
|
82
|
+
meta: /* @__PURE__ */ y(o, {
|
|
83
|
+
state: w ? "running" : j ? "stopped" : "idle",
|
|
84
|
+
stateLabel: w ? C("bigconsole.widget.aiPreviewMini.live", "Live") : j ? C("bigconsole.widget.aiPreviewMini.stopped", "Stopped") : null,
|
|
85
|
+
updatedLabel: C("bigconsole.widget.aiPreviewMini.updated", "updated"),
|
|
86
|
+
updatedAt: M,
|
|
87
|
+
ago: (e) => c(e, C)
|
|
87
88
|
}),
|
|
88
|
-
headerActions: /* @__PURE__ */
|
|
89
|
+
headerActions: /* @__PURE__ */ y(_, {
|
|
89
90
|
size: "sm",
|
|
90
91
|
variant: "ghost",
|
|
91
|
-
onClick:
|
|
92
|
-
"aria-label":
|
|
92
|
+
onClick: P,
|
|
93
|
+
"aria-label": C("bigconsole.widget.aiPreviewMini.closeAriaLabel", "Close preview"),
|
|
93
94
|
"data-testid": "ai-preview-close",
|
|
94
|
-
children: /* @__PURE__ */
|
|
95
|
+
children: /* @__PURE__ */ y(g, { className: "size-4" })
|
|
95
96
|
}),
|
|
96
|
-
labels:
|
|
97
|
-
children: /* @__PURE__ */
|
|
97
|
+
labels: l(C),
|
|
98
|
+
children: /* @__PURE__ */ y("div", {
|
|
98
99
|
className: "p-3",
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ b(i, {
|
|
100
101
|
emphasis: "standard",
|
|
101
102
|
padding: "compact",
|
|
102
103
|
headingLevel: 3,
|
|
103
|
-
title:
|
|
104
|
-
description:
|
|
104
|
+
title: C("bigconsole.widget.aiPreviewMini.builtSoFar", "Built so far"),
|
|
105
|
+
description: C("bigconsole.widget.aiPreviewMini.builtSoFarHint", "Open any piece to see the real thing."),
|
|
105
106
|
bodyClassName: "flex flex-col gap-list-gap",
|
|
106
|
-
children: [
|
|
107
|
+
children: [I.length === 0 ? /* @__PURE__ */ y("p", {
|
|
107
108
|
className: "text-sm text-text-muted",
|
|
108
|
-
children:
|
|
109
|
-
}) :
|
|
109
|
+
children: w ? C("bigconsole.widget.aiPreviewMini.building", "Building… links appear here as each piece is created.") : C("bigconsole.widget.aiPreviewMini.nothingBuilt", "Nothing built yet.")
|
|
110
|
+
}) : I.map((e) => /* @__PURE__ */ b("div", {
|
|
110
111
|
"data-testid": "ai-preview-row",
|
|
111
112
|
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",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
113
|
+
children: [/* @__PURE__ */ b("p", {
|
|
113
114
|
className: "flex min-w-0 items-center gap-icon-gap text-sm font-medium text-text-primary",
|
|
114
|
-
children: [e.icon, /* @__PURE__ */
|
|
115
|
+
children: [e.icon, /* @__PURE__ */ y("span", {
|
|
115
116
|
className: "truncate",
|
|
116
|
-
children:
|
|
117
|
+
children: C("bigconsole.widget.aiPreviewMini.linkReady", "{{label}} ready", { label: e.label })
|
|
117
118
|
})]
|
|
118
|
-
}), /* @__PURE__ */
|
|
119
|
+
}), /* @__PURE__ */ b(_, {
|
|
119
120
|
size: "sm",
|
|
120
121
|
variant: "ghost",
|
|
121
|
-
onClick: () =>
|
|
122
|
-
children: [
|
|
122
|
+
onClick: () => F(e.path),
|
|
123
|
+
children: [C("bigconsole.widget.aiPreviewMini.open", "Open"), /* @__PURE__ */ y(u, { className: "ml-1 size-3.5" })]
|
|
123
124
|
})]
|
|
124
|
-
}, e.key)),
|
|
125
|
+
}, e.key)), k.dashboard ? /* @__PURE__ */ b(_, {
|
|
125
126
|
size: "sm",
|
|
126
127
|
variant: "outline",
|
|
127
128
|
className: "h-auto w-full whitespace-normal py-1.5 text-center",
|
|
128
129
|
"data-testid": "ai-preview-open-in-bigconsole",
|
|
129
|
-
onClick: () =>
|
|
130
|
-
children: [
|
|
130
|
+
onClick: () => F(`/bigconsole/dashboards/${k.dashboard ?? ""}`),
|
|
131
|
+
children: [C("bigconsole.widget.aiPreviewMini.openInBigConsole", "Open in BigConsole for the live view"), /* @__PURE__ */ y(u, { className: "ml-1 size-3.5" })]
|
|
131
132
|
}) : null]
|
|
132
133
|
})
|
|
133
134
|
})
|
|
@@ -135,4 +136,4 @@ function x({ onNavigate: x }) {
|
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
//#endregion
|
|
138
|
-
export {
|
|
139
|
+
export { S as AiPreviewMiniPanel };
|