@burdenoff/microfe-bigconsole 2026.1012.6 → 2026.1012.8

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.
@@ -8,11 +8,7 @@ export interface PersistedRun {
8
8
  conversationId?: string;
9
9
  previewOpen: boolean;
10
10
  steps: Record<PreviewStepKey, PreviewStepStatus>;
11
- entityIds: {
12
- datasink?: string;
13
- dashboard?: string;
14
- parser?: string;
15
- };
11
+ entityIds: Partial<Record<PreviewStepKey, string>>;
16
12
  updatedAt: number | null;
17
13
  }
18
14
  export declare function runStorageKey(workspaceId: string): string;
@@ -7,7 +7,8 @@ var e = "bigconsole.assistant.previewRun.v1:", t = [
7
7
  ], n = [
8
8
  "datasink",
9
9
  "dashboard",
10
- "parser"
10
+ "parser",
11
+ "widget"
11
12
  ], r = /^[A-Za-z0-9_-]{1,128}$/;
12
13
  function i(t) {
13
14
  return `${e}${t}`;
@@ -18,12 +18,8 @@ interface AssistantRunState {
18
18
  richMounted: boolean;
19
19
  prompt: string;
20
20
  steps: Record<PreviewStepKey, PreviewStepStatus>;
21
- /** Ids harvested from the agent's links. A widget has no link of its own. */
22
- entityIds: {
23
- datasink?: string;
24
- dashboard?: string;
25
- parser?: string;
26
- };
21
+ /** Confirmed resource ids, including widgets whose parent may need resolving. */
22
+ entityIds: Partial<Record<PreviewStepKey, string>>;
27
23
  /** Newest "⏳ …" line — what the agent says it is doing this second. */
28
24
  caption: string;
29
25
  /** Set when the turn fails, so the panel can stop pretending to be live. */
@@ -43,6 +39,13 @@ interface AssistantRunState {
43
39
  entityResultOrder: Partial<Record<PreviewStepKey, number>>;
44
40
  startRun: (prompt: string, conversationId?: string) => void;
45
41
  applyResult: (id: string, output: unknown, messageOrder?: number) => void;
42
+ resolveWidgetDashboard: (scope: {
43
+ widgetId: string;
44
+ dashboardId: string;
45
+ workspaceId: string;
46
+ actorId: string;
47
+ conversationId: string | null;
48
+ }) => void;
46
49
  applyProgress: (content: string) => void;
47
50
  finishRun: (error: string | null) => void;
48
51
  openPreview: () => void;
@@ -112,7 +112,7 @@ var _ = i()((r, i) => ({
112
112
  if (a.length === 0) return r;
113
113
  let o = { ...r.steps }, s = { ...r.entityIds }, c = { ...r.entityResultOrder }, l = !1, u = (e, t) => {
114
114
  let n = c[e];
115
- i !== void 0 && n !== void 0 && i < n || (i !== void 0 && (c[e] = i), o[e] = "done", e !== "widget" && (s[e] = t), l = !0);
115
+ i !== void 0 && n !== void 0 && i < n || (i !== void 0 && (c[e] = i), o[e] = "done", s[e] = t, l = !0);
116
116
  };
117
117
  for (let e of a) u(e.step, e.id), e.dashboardId && u("dashboard", e.dashboardId), e.parserId && u("parser", e.parserId);
118
118
  let d = [...r.completedResultIds, t];
@@ -125,6 +125,22 @@ var _ = i()((r, i) => ({
125
125
  updatedAt: Date.now()
126
126
  } : { completedResultIds: d };
127
127
  }),
128
+ resolveWidgetDashboard: (e) => r((t) => {
129
+ if (t.workspaceId !== e.workspaceId || t.actorId !== e.actorId || t.conversationId !== e.conversationId || t.entityIds.widget !== e.widgetId || !/^[A-Za-z0-9_-]{1,128}$/.test(e.dashboardId) || t.entityIds.dashboard) return t;
130
+ let n = t.entityResultOrder.dashboard, r = t.entityResultOrder.widget;
131
+ return n !== void 0 && r !== void 0 && n > r ? t : {
132
+ entityIds: {
133
+ ...t.entityIds,
134
+ dashboard: e.dashboardId
135
+ },
136
+ steps: {
137
+ ...t.steps,
138
+ dashboard: t.steps.dashboard === "done" ? "done" : "skipped"
139
+ },
140
+ contentRevision: t.contentRevision + 1,
141
+ updatedAt: Date.now()
142
+ };
143
+ }),
128
144
  finishRun: (e) => r((t) => {
129
145
  let n = { ...t.steps };
130
146
  for (let e of o) n[e] === "running" && (n[e] = "pending");
@@ -0,0 +1,9 @@
1
+ /** Resolve relationships omitted from a successful mutation's response selection.
2
+ * Never infer a dashboard from narration or a page id. The gateway authorizes
3
+ * the read in the active workspace; the store rejects late owner/run results.
4
+ */
5
+ export declare function usePreviewWidgetDashboard(): {
6
+ loading: boolean;
7
+ error: boolean;
8
+ retry: () => void;
9
+ };
@@ -0,0 +1,75 @@
1
+ import { GetWidgetDocument as e } from "../../generated/wspace-operations.js";
2
+ import { useBigConsole as t } from "../context/BigConsoleContext.js";
3
+ import "../context/index.js";
4
+ import { useAssistantRunStore as n } from "./assistantRunStore.js";
5
+ import { useEffect as r, useState as i } from "react";
6
+ import { useApolloClient as a } from "@apollo/client/react";
7
+ //#region src/bigconsole/assistant/usePreviewWidgetDashboard.ts
8
+ function o() {
9
+ let o = a(), { workspaceId: s, currentUser: c } = t(), l = n((e) => e.entityIds.widget), u = n((e) => e.entityIds.dashboard), d = n((e) => e.actorId), f = n((e) => e.workspaceId), p = n((e) => e.conversationId), m = n((e) => e.resolveWidgetDashboard), h = `${s ?? ""}|${d ?? ""}|${p ?? ""}|${l ?? ""}`, [g, _] = i({
10
+ owner: "",
11
+ loading: !1,
12
+ error: !1
13
+ }), [v, y] = i(0), b = !!(l && !u && s && d && f === s && c?.id === d);
14
+ return r(() => {
15
+ if (!b || !l || !s || !d) return;
16
+ let t = !1;
17
+ return (async () => {
18
+ _({
19
+ owner: h,
20
+ loading: !0,
21
+ error: !1
22
+ });
23
+ try {
24
+ let n = await o.query({
25
+ query: e,
26
+ variables: { id: l },
27
+ fetchPolicy: "no-cache",
28
+ context: {
29
+ requiredWorkspaceAuth: !0,
30
+ requiredWorkspaceId: s,
31
+ queryDeduplication: !1
32
+ }
33
+ });
34
+ if (t) return;
35
+ let r = n.data?.getWidget;
36
+ if (r?.id !== l || !r.dashboardId) throw Error("Widget dashboard is unavailable");
37
+ m({
38
+ widgetId: l,
39
+ dashboardId: r.dashboardId,
40
+ workspaceId: s,
41
+ actorId: d,
42
+ conversationId: p
43
+ }), _({
44
+ owner: h,
45
+ loading: !1,
46
+ error: !1
47
+ });
48
+ } catch {
49
+ t || _({
50
+ owner: h,
51
+ loading: !1,
52
+ error: !0
53
+ });
54
+ }
55
+ })(), () => {
56
+ t = !0;
57
+ };
58
+ }, [
59
+ o,
60
+ b,
61
+ l,
62
+ s,
63
+ d,
64
+ p,
65
+ h,
66
+ m,
67
+ v
68
+ ]), {
69
+ loading: b && (g.owner !== h || g.loading),
70
+ error: b && g.owner === h && g.error,
71
+ retry: () => y((e) => e + 1)
72
+ };
73
+ }
74
+ //#endregion
75
+ export { o as usePreviewWidgetDashboard };
@@ -3,166 +3,183 @@ import "../../context/index.js";
3
3
  import { PREVIEW_STEPS as t, useAssistantRunStore as n } from "../../assistant/assistantRunStore.js";
4
4
  import { useBigConsolePreviewControl as r } from "../../assistant/usePreviewControl.js";
5
5
  import { useAssistantRunWorkspace as i } from "../../assistant/useAssistantRunWorkspace.js";
6
- import { Section as a } from "../common/Section.js";
6
+ import { usePreviewWidgetDashboard as a } from "../../assistant/usePreviewWidgetDashboard.js";
7
+ import { Section as o } from "../common/Section.js";
7
8
  import "../common/index.js";
8
- import { DOCK_CLEARANCE as o, PreviewMeta as s, STEP_LABEL as c, formatAgo as l, previewLabels as u } from "./previewShared.js";
9
- import { DashboardContent as d, DataSinkContent as f, ParserContent as p, WidgetsContent as m } from "./AiPreviewContent.js";
10
- import { useEffect as h, useRef as g, useState as _ } from "react";
11
- import { ArrowUpRight as v, Loader2 as y, Sparkles as b, X as x } from "lucide-react";
12
- import { Button as S } from "@burdenoff/fe-libs/ui";
13
- import { useI18n as C } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
- import { jsx as w, jsxs as T } from "react/jsx-runtime";
15
- import { AssistantEntityPreview as E } from "@burdenoff/fe-libs/shared/assistant";
9
+ import { DOCK_CLEARANCE as s, PreviewMeta as c, STEP_LABEL as l, formatAgo as u, previewLabels as d } from "./previewShared.js";
10
+ import { DashboardContent as f, DataSinkContent as p, ParserContent as m, WidgetsContent as h } from "./AiPreviewContent.js";
11
+ import { useEffect as g, useRef as _, useState as v } from "react";
12
+ import { ArrowUpRight as y, Loader2 as b, Sparkles as x, X as S } from "lucide-react";
13
+ import { Button as C } from "@burdenoff/fe-libs/ui";
14
+ import { useI18n as w } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
15
+ import { jsx as T, jsxs as E } from "react/jsx-runtime";
16
+ import { AssistantEntityPreview as D } from "@burdenoff/fe-libs/shared/assistant";
16
17
  //#region src/bigconsole/components/preview/AiPreviewPanel.tsx
17
- function D({ children: e }) {
18
- return /* @__PURE__ */ w("div", {
18
+ function O({ children: e }) {
19
+ return /* @__PURE__ */ T("div", {
19
20
  className: "min-w-0 overflow-y-auto p-3",
20
21
  style: { maxHeight: "min(440px, 60vh)" },
21
22
  children: e
22
23
  });
23
24
  }
24
- function O({ onOpen: e }) {
25
- let { t } = C();
26
- return /* @__PURE__ */ T(S, {
25
+ function k({ onOpen: e }) {
26
+ let { t } = w();
27
+ return /* @__PURE__ */ E(C, {
27
28
  size: "sm",
28
29
  variant: "outline",
29
30
  onClick: e,
30
31
  "data-testid": "ai-preview-open-entity",
31
- children: [t("bigconsole.widget.aiPreview.open", "Open"), /* @__PURE__ */ w(v, { className: "ml-1 size-3.5" })]
32
+ children: [t("bigconsole.widget.aiPreview.open", "Open"), /* @__PURE__ */ T(y, { className: "ml-1 size-3.5" })]
32
33
  });
33
34
  }
34
- function k() {
35
- let { t: v } = C();
36
- i(), r();
37
- let k = e(), A = n((e) => e.isRunning), j = n((e) => e.previewOpen), M = n((e) => e.hasRun), N = n((e) => e.steps), P = n((e) => e.entityIds), F = n((e) => e.caption), I = n((e) => e.error), L = n((e) => e.updatedAt), R = n((e) => e.openPreview), z = n((e) => e.closePreview), B = n((e) => e.setRichMounted);
38
- h(() => (B(!0), () => {
39
- B(!1);
40
- }), [B]);
41
- let [V, H] = _(0), U = g(!1);
42
- if (h(() => {
43
- A && !U.current && H((e) => e + 1), U.current = A;
44
- }, [A]), !M) return null;
45
- if (!j) return /* @__PURE__ */ T("div", {
35
+ function A() {
36
+ let { t: y } = w();
37
+ i();
38
+ let A = a();
39
+ r();
40
+ let j = e(), M = n((e) => e.isRunning), N = n((e) => e.previewOpen), P = n((e) => e.hasRun), F = n((e) => e.steps), I = n((e) => e.entityIds), L = n((e) => e.caption), R = n((e) => e.error), z = n((e) => e.updatedAt), B = n((e) => e.openPreview), V = n((e) => e.closePreview), H = n((e) => e.setRichMounted);
41
+ g(() => (H(!0), () => {
42
+ H(!1);
43
+ }), [H]);
44
+ let [U, W] = v(0), G = _(!1);
45
+ if (g(() => {
46
+ M && !G.current && W((e) => e + 1), G.current = M;
47
+ }, [M]), !P) return null;
48
+ if (!N) return /* @__PURE__ */ E("div", {
46
49
  className: "flex flex-wrap items-center justify-end gap-control-gap px-4 pt-3 md:px-6",
47
- style: { marginRight: o },
48
- children: [/* @__PURE__ */ w("span", {
50
+ style: { marginRight: s },
51
+ children: [/* @__PURE__ */ T("span", {
49
52
  className: "text-xs text-text-muted",
50
- children: A ? v("bigconsole.widget.aiPreview.buildRunning", "AI build running") : v("bigconsole.widget.aiPreview.buildFinished", "AI build finished")
51
- }), /* @__PURE__ */ T(S, {
53
+ children: M ? y("bigconsole.widget.aiPreview.buildRunning", "AI build running") : y("bigconsole.widget.aiPreview.buildFinished", "AI build finished")
54
+ }), /* @__PURE__ */ E(C, {
52
55
  size: "sm",
53
56
  variant: "outline",
54
- onClick: R,
57
+ onClick: B,
55
58
  "data-testid": "ai-preview-open",
56
59
  children: [
57
- /* @__PURE__ */ w(b, { className: "mr-1.5 size-4" }),
58
- v("bigconsole.widget.aiPreview.previewButton", "Preview"),
59
- A ? /* @__PURE__ */ w(y, { className: "ml-1.5 size-3.5 animate-spin" }) : null
60
+ /* @__PURE__ */ T(x, { className: "mr-1.5 size-4" }),
61
+ y("bigconsole.widget.aiPreview.previewButton", "Preview"),
62
+ M ? /* @__PURE__ */ T(b, { className: "ml-1.5 size-3.5 animate-spin" }) : null
60
63
  ]
61
64
  })]
62
65
  });
63
- let W = P.dashboard, G = t.map((e) => ({
66
+ let K = I.dashboard, q = A.error ? /* @__PURE__ */ E("div", {
67
+ role: "alert",
68
+ "data-testid": "ai-preview-widget-parent-error",
69
+ children: [/* @__PURE__ */ T("p", { children: y("bigconsole.widget.aiPreview.widgetParentError", "Could not load this widget’s dashboard. It may be unavailable or you may no longer have access.") }), /* @__PURE__ */ T(C, {
70
+ variant: "outline",
71
+ size: "sm",
72
+ onClick: A.retry,
73
+ children: y("bigconsole.widget.customWidget.action.retry", "Retry")
74
+ })]
75
+ }) : A.loading && !K ? /* @__PURE__ */ E("div", {
76
+ role: "status",
77
+ "data-testid": "ai-preview-widget-parent-loading",
78
+ className: "flex items-center gap-2",
79
+ children: [/* @__PURE__ */ T(b, { className: "size-4 animate-spin" }), y("bigconsole.widget.aiPreview.widgetParentLoading", "Loading this widget’s dashboard…")]
80
+ }) : null, J = t.map((e) => ({
64
81
  id: e,
65
- label: v(c[e].key, c[e].fallback),
66
- status: N[e]
67
- })), K = [
82
+ label: y(l[e].key, l[e].fallback),
83
+ status: F[e]
84
+ })), Y = [
68
85
  {
69
86
  id: "datasink",
70
- label: v("bigconsole.widget.aiPreview.tab.dataSink", "Data Sink"),
71
- render: () => /* @__PURE__ */ w(D, { children: /* @__PURE__ */ w(a, {
87
+ label: y("bigconsole.widget.aiPreview.tab.dataSink", "Data Sink"),
88
+ render: () => /* @__PURE__ */ T(O, { children: /* @__PURE__ */ T(o, {
72
89
  emphasis: "standard",
73
90
  padding: "compact",
74
91
  headingLevel: 3,
75
- title: v("bigconsole.widget.aiPreview.dataSinkRows", "Data sink rows"),
76
- description: v("bigconsole.widget.aiPreview.dataSinkRowsHint", "The rows the assistant just landed, straight from the sink."),
77
- actions: P.datasink ? /* @__PURE__ */ w(O, { onOpen: () => k(`/datasinks/${P.datasink}`) }) : void 0,
78
- children: /* @__PURE__ */ w(f, {
79
- id: P.datasink,
80
- live: A
92
+ title: y("bigconsole.widget.aiPreview.dataSinkRows", "Data sink rows"),
93
+ description: y("bigconsole.widget.aiPreview.dataSinkRowsHint", "The rows the assistant just landed, straight from the sink."),
94
+ actions: I.datasink ? /* @__PURE__ */ T(k, { onOpen: () => j(`/datasinks/${I.datasink}`) }) : void 0,
95
+ children: /* @__PURE__ */ T(p, {
96
+ id: I.datasink,
97
+ live: M
81
98
  })
82
99
  }) })
83
100
  },
84
101
  {
85
102
  id: "dashboard",
86
- label: v("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
87
- render: () => /* @__PURE__ */ w(D, { children: /* @__PURE__ */ w(a, {
103
+ label: y("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
104
+ render: () => /* @__PURE__ */ T(O, { children: /* @__PURE__ */ T(o, {
88
105
  emphasis: "standard",
89
106
  padding: "compact",
90
107
  headingLevel: 3,
91
- title: v("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
92
- description: v("bigconsole.widget.aiPreview.dashboardHint", "The live board, rendered exactly as the real page renders it."),
93
- actions: W ? /* @__PURE__ */ w(O, { onOpen: () => k(`/dashboards/${W}`) }) : void 0,
94
- children: /* @__PURE__ */ w(d, {
95
- dashboardId: W,
96
- live: A
108
+ title: y("bigconsole.widget.aiPreview.tab.dashboard", "Dashboard"),
109
+ description: y("bigconsole.widget.aiPreview.dashboardHint", "The live board, rendered exactly as the real page renders it."),
110
+ actions: K ? /* @__PURE__ */ T(k, { onOpen: () => j(`/dashboards/${K}`) }) : void 0,
111
+ children: q ?? /* @__PURE__ */ T(f, {
112
+ dashboardId: K,
113
+ live: M
97
114
  })
98
115
  }) })
99
116
  },
100
117
  {
101
118
  id: "parser",
102
- label: v("bigconsole.widget.aiPreview.tab.parser", "Parser"),
103
- render: () => /* @__PURE__ */ w(D, { children: /* @__PURE__ */ w(a, {
119
+ label: y("bigconsole.widget.aiPreview.tab.parser", "Parser"),
120
+ render: () => /* @__PURE__ */ T(O, { children: /* @__PURE__ */ T(o, {
104
121
  emphasis: "standard",
105
122
  padding: "compact",
106
123
  headingLevel: 3,
107
- title: v("bigconsole.widget.aiPreview.parserOutput", "Parser output"),
108
- description: v("bigconsole.widget.aiPreview.parserOutputHint", "The rows after the parser's transform, so you can check the shape."),
109
- actions: P.parser ? /* @__PURE__ */ w(O, { onOpen: () => k(`/parsers/${P.parser}`) }) : void 0,
110
- children: /* @__PURE__ */ w(p, {
111
- parserId: P.parser,
112
- live: A
124
+ title: y("bigconsole.widget.aiPreview.parserOutput", "Parser output"),
125
+ description: y("bigconsole.widget.aiPreview.parserOutputHint", "The rows after the parser's transform, so you can check the shape."),
126
+ actions: I.parser ? /* @__PURE__ */ T(k, { onOpen: () => j(`/parsers/${I.parser}`) }) : void 0,
127
+ children: /* @__PURE__ */ T(m, {
128
+ parserId: I.parser,
129
+ live: M
113
130
  })
114
131
  }) })
115
132
  },
116
133
  {
117
134
  id: "widget",
118
- label: v("bigconsole.widget.aiPreview.tab.widget", "Widget"),
119
- render: () => /* @__PURE__ */ w(D, { children: /* @__PURE__ */ w(a, {
135
+ label: y("bigconsole.widget.aiPreview.tab.widget", "Widget"),
136
+ render: () => /* @__PURE__ */ T(O, { children: /* @__PURE__ */ T(o, {
120
137
  emphasis: "standard",
121
138
  padding: "compact",
122
139
  headingLevel: 3,
123
- title: v("bigconsole.widget.aiPreview.widgets", "Widgets"),
124
- description: v("bigconsole.widget.aiPreview.widgetsHint", "Every widget on the new dashboard, rendered live."),
125
- actions: W ? /* @__PURE__ */ w(O, { onOpen: () => k(`/dashboards/${W}`) }) : void 0,
126
- children: /* @__PURE__ */ w(m, {
127
- dashboardId: W,
128
- live: A
140
+ title: y("bigconsole.widget.aiPreview.widgets", "Widgets"),
141
+ description: y("bigconsole.widget.aiPreview.widgetsHint", "Every widget on the new dashboard, rendered live."),
142
+ actions: K ? /* @__PURE__ */ T(k, { onOpen: () => j(`/dashboards/${K}`) }) : void 0,
143
+ children: q ?? /* @__PURE__ */ T(h, {
144
+ dashboardId: K,
145
+ live: M
129
146
  })
130
147
  }) })
131
148
  }
132
149
  ];
133
- return /* @__PURE__ */ T("div", {
150
+ return /* @__PURE__ */ E("div", {
134
151
  "data-testid": "ai-preview-panel",
135
- style: { paddingRight: o },
152
+ style: { paddingRight: s },
136
153
  className: "mx-4 mt-3 min-w-0 md:mx-6",
137
- children: [/* @__PURE__ */ w("h2", {
154
+ children: [/* @__PURE__ */ T("h2", {
138
155
  className: "sr-only",
139
- children: v("bigconsole.widget.aiPreview.title", "AI Preview")
140
- }), /* @__PURE__ */ w(E, {
141
- title: v("bigconsole.widget.aiPreview.title", "AI Preview"),
142
- runKey: String(V),
143
- steps: G,
144
- tabs: K,
156
+ children: y("bigconsole.widget.aiPreview.title", "AI Preview")
157
+ }), /* @__PURE__ */ T(D, {
158
+ title: y("bigconsole.widget.aiPreview.title", "AI Preview"),
159
+ runKey: String(U),
160
+ steps: J,
161
+ tabs: Y,
145
162
  follow: "produced",
146
- caption: A ? F || v("bigconsole.widget.aiPreview.working", "Working…") : v("bigconsole.widget.aiPreview.done", "Done"),
147
- error: I,
148
- meta: /* @__PURE__ */ w(s, {
149
- state: A ? "running" : I ? "stopped" : "idle",
150
- stateLabel: A ? v("bigconsole.widget.aiPreview.live", "Live") : I ? v("bigconsole.widget.aiPreview.stopped", "Stopped") : null,
151
- updatedLabel: v("bigconsole.widget.aiPreview.updated", "updated"),
152
- updatedAt: L,
153
- ago: (e) => l(e, v)
163
+ caption: M ? L || y("bigconsole.widget.aiPreview.working", "Working…") : y("bigconsole.widget.aiPreview.done", "Done"),
164
+ error: R,
165
+ meta: /* @__PURE__ */ T(c, {
166
+ state: M ? "running" : R ? "stopped" : "idle",
167
+ stateLabel: M ? y("bigconsole.widget.aiPreview.live", "Live") : R ? y("bigconsole.widget.aiPreview.stopped", "Stopped") : null,
168
+ updatedLabel: y("bigconsole.widget.aiPreview.updated", "updated"),
169
+ updatedAt: z,
170
+ ago: (e) => u(e, y)
154
171
  }),
155
- headerActions: /* @__PURE__ */ w(S, {
172
+ headerActions: /* @__PURE__ */ T(C, {
156
173
  size: "sm",
157
174
  variant: "ghost",
158
- onClick: z,
159
- "aria-label": v("bigconsole.widget.aiPreview.closeAriaLabel", "Close preview"),
175
+ onClick: V,
176
+ "aria-label": y("bigconsole.widget.aiPreview.closeAriaLabel", "Close preview"),
160
177
  "data-testid": "ai-preview-close",
161
- children: /* @__PURE__ */ w(x, { className: "size-4" })
178
+ children: /* @__PURE__ */ T(S, { className: "size-4" })
162
179
  }),
163
- labels: u(v)
180
+ labels: d(y)
164
181
  })]
165
182
  });
166
183
  }
167
184
  //#endregion
168
- export { k as AiPreviewPanel };
185
+ export { A as AiPreviewPanel };
@@ -25,7 +25,7 @@ var y = [
25
25
  targetFilterId: "category"
26
26
  }]), { clearAllCrossFilters: O, hasCrossFilters: k } = e(), A = h(() => ({
27
27
  type: C?.chartType?.toLowerCase() || "line",
28
- xAxisKey: C?.xAxisField || "name",
28
+ xAxisKey: C?.xAxisField || C?.labelField || "name",
29
29
  xAxisLabel: C?.xAxisLabel,
30
30
  yAxisLabel: C?.yAxisLabel,
31
31
  showGrid: C?.showGrid,