@burdenoff/microfe-bigconsole 2026.1118.6 → 2026.1118.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.
@@ -21,25 +21,26 @@ import { LiveCanvasToggle as se } from "../components/dashboard/LiveCanvasToggle
21
21
  import { ExportDashboardDialog as ce } from "../components/dashboard/ExportDashboardDialog.js";
22
22
  import { DrilldownBreadcrumb as le } from "../components/dashboard/DrilldownBreadcrumb.js";
23
23
  import { PublishToStoreDialog as ue } from "../components/dashboard/PublishToStoreDialog.js";
24
- import { loadBigConsoleSettings as de } from "../hooks/useBigConsoleSettings.js";
25
- import { LIVE_STRUCTURE_POLL_MS as fe, isLiveDataRefreshDue as pe } from "../utils/liveBoardRefresh.js";
26
- import { registerBreadcrumbName as me, unregisterBreadcrumbName as he } from "../utils/breadcrumbRegistry.js";
27
- import { DigestPanel as ge } from "../components/narrative/DigestPanel.js";
28
- import { GetWidgetDocument as _e } from "../../generated/wspace-operations.js";
29
- import { dashboardSuggestAnchorProps as ve } from "../proactive/entities.js";
30
- import { memo as c, useCallback as l, useEffect as u, useMemo as d, useRef as ye, useState as f } from "react";
31
- import { useLocation as be, useParams as xe } from "react-router";
32
- import { AccessDenied as Se } from "@burdenoff/fe-libs/shared/components";
33
- import { usePermissions as Ce } from "@burdenoff/fe-libs/shared/providers/shell";
34
- import { ArrowLeft as we, Sparkles as Te } from "lucide-react";
35
- import { Button as p, IllustratedEmptyState as Ee } from "@burdenoff/fe-libs/ui";
36
- import { useI18n as De } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
37
- import { useApolloClient as Oe } from "@apollo/client/react";
24
+ import { DashboardReviewDialog as de } from "../components/dashboard/DashboardReviewDialog.js";
25
+ import { loadBigConsoleSettings as fe } from "../hooks/useBigConsoleSettings.js";
26
+ import { LIVE_STRUCTURE_POLL_MS as pe, isLiveDataRefreshDue as me } from "../utils/liveBoardRefresh.js";
27
+ import { registerBreadcrumbName as he, unregisterBreadcrumbName as ge } from "../utils/breadcrumbRegistry.js";
28
+ import { DigestPanel as _e } from "../components/narrative/DigestPanel.js";
29
+ import { GetWidgetDocument as ve } from "../../generated/wspace-operations.js";
30
+ import { dashboardSuggestAnchorProps as ye } from "../proactive/entities.js";
31
+ import { memo as c, useCallback as l, useEffect as u, useMemo as d, useRef as be, useState as f } from "react";
32
+ import { useLocation as xe, useParams as Se } from "react-router";
33
+ import { AccessDenied as Ce } from "@burdenoff/fe-libs/shared/components";
34
+ import { usePermissions as we } from "@burdenoff/fe-libs/shared/providers/shell";
35
+ import { ArrowLeft as Te, Sparkles as Ee } from "lucide-react";
36
+ import { Button as p, IllustratedEmptyState as De } from "@burdenoff/fe-libs/ui";
37
+ import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
38
+ import { useApolloClient as ke } from "@apollo/client/react";
38
39
  import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
39
- import { useAssistantPageControls as ke } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
40
+ import { useAssistantPageControls as Ae } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
40
41
  // src/bigconsole/pages/DashboardViewPage.tsx
41
42
  var _ = c(function() {
42
- let { dashboardId: c } = xe(), _ = i(), Ae = r(), { t: v } = De(), y = Oe(), { hasPermission: b, isLoading: x } = Ce(), S = b(n.DASHBOARD_READ), je = b(n.DASHBOARD_UPDATE), Me = b(n.DASHBOARD_EXPORT), Ne = b(n.DASHBOARD_PUBLISH), [Pe, Fe] = f(!1), [C, w] = f(!1), [Ie, T] = f(!1), [E, Le] = f(!1), [D, Re] = f(!1), { isInDrilldown: O, getContextFromUrl: ze, getDrilldownMetadata: Be } = ne(), k = t((e) => e.currentDashboard), A = t((e) => e.setCurrentDashboard), j = t((e) => e.setGlobalFilterValue), M = t((e) => e.clearAllGlobalFilters), N = t((e) => e.setGlobalFilterValues), P = e((e) => e.widgets), Ve = be(), { activePageId: F, setActivePage: I } = ie(k?.id === c ? k?.pages : void 0), L = e((e) => e.clipboardWidgetId), R = e((e) => e.clipboardAction), z = e((e) => e.clearClipboard), B = e((e) => e.selectWidget), { loading: V, error: H, fetchDashboard: U, updateDashboard: W } = ee(), { createWidget: G, deleteWidget: K, duplicateWidget: q, batchUpdatePositions: J, refetch: He } = s(F || void 0, c), { createPage: Y, updatePage: Ue, deletePage: We, duplicatePage: Ge, reorderPages: Ke } = te(), qe = l((e) => {
43
+ let { dashboardId: c } = Se(), _ = i(), je = r(), { t: v } = Oe(), y = ke(), { hasPermission: b, isLoading: x } = we(), S = b(n.DASHBOARD_READ), Me = b(n.DASHBOARD_UPDATE), Ne = b(n.DASHBOARD_EXPORT), Pe = b(n.DASHBOARD_PUBLISH), [Fe, C] = f(!1), [w, T] = f(!1), [Ie, E] = f(!1), [D, Le] = f(!1), [Re, ze] = f(!1), { isInDrilldown: O, getContextFromUrl: k, getDrilldownMetadata: A } = ne(), j = t((e) => e.currentDashboard), M = t((e) => e.setCurrentDashboard), N = t((e) => e.setGlobalFilterValue), P = t((e) => e.clearAllGlobalFilters), F = t((e) => e.setGlobalFilterValues), I = e((e) => e.widgets), Be = xe(), { activePageId: L, setActivePage: R } = ie(j?.id === c ? j?.pages : void 0), z = e((e) => e.clipboardWidgetId), B = e((e) => e.clipboardAction), V = e((e) => e.clearClipboard), H = e((e) => e.selectWidget), { loading: U, error: W, fetchDashboard: G, updateDashboard: K } = ee(), { createWidget: q, deleteWidget: J, duplicateWidget: Ve, batchUpdatePositions: He, refetch: Y } = s(L || void 0, c), { createPage: Ue, updatePage: We, deletePage: Ge, duplicatePage: Ke, reorderPages: qe } = te(), Je = l((e) => {
43
44
  let t = e?.parentElement;
44
45
  if (!e || !t) return;
45
46
  let n = t;
@@ -60,95 +61,95 @@ var _ = c(function() {
60
61
  }, []);
61
62
  u(() => {
62
63
  if (!c) _("/dashboards");
63
- else return N(re(window.location.search, "filter_")), w(!1), U(c).then((e) => {
64
- e || w(!0);
64
+ else return F(re(window.location.search, "filter_")), T(!1), G(c).then((e) => {
65
+ e || T(!0);
65
66
  }), () => {
66
- A(null), M(), w(!1);
67
+ M(null), P(), T(!1);
67
68
  };
68
69
  }, [
69
70
  c,
70
71
  _,
71
- U,
72
- A,
72
+ G,
73
73
  M,
74
- N
74
+ P,
75
+ F
75
76
  ]), u(() => {
76
77
  if (!O) return;
77
- let e = ze(), t = Be();
78
+ let e = k(), t = A();
78
79
  Object.entries(e).forEach(([e, t]) => {
79
- j(`ctx_${e}`, t);
80
- }), t.depth > 0 && (j("__drilldown_depth", t.depth), j("__drilldown_parent", t.parent), j("__drilldown_path", t.path)), Object.keys(e).length;
80
+ N(`ctx_${e}`, t);
81
+ }), t.depth > 0 && (N("__drilldown_depth", t.depth), N("__drilldown_parent", t.parent), N("__drilldown_path", t.path)), Object.keys(e).length;
81
82
  }, [
82
83
  O,
83
- ze,
84
- Be,
85
- j,
86
- Ve.search
84
+ k,
85
+ A,
86
+ N,
87
+ Be.search
87
88
  ]);
88
- let Je = ye(He);
89
- Je.current = He, u(() => {
90
- if (!E || !c) return;
89
+ let Ye = be(Y);
90
+ Ye.current = Y, u(() => {
91
+ if (!D || !c) return;
91
92
  let e = null, n = () => {
92
93
  if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
93
- U(c, { silent: !0 }), Je.current();
94
+ G(c, { silent: !0 }), Ye.current();
94
95
  let n = Date.now();
95
- pe(e, n) && (e = n, y.refetchQueries({ include: [_e] }).catch((e) => {
96
+ me(e, n) && (e = n, y.refetchQueries({ include: [ve] }).catch((e) => {
96
97
  console.warn("[DashboardViewPage] Live widget data refresh failed", e);
97
98
  }));
98
99
  };
99
100
  n();
100
- let r = window.setInterval(n, fe), i = () => {
101
+ let r = window.setInterval(n, pe), i = () => {
101
102
  document.visibilityState === "visible" && (e = null, n());
102
103
  };
103
104
  return document.addEventListener("visibilitychange", i), () => {
104
105
  window.clearInterval(r), document.removeEventListener("visibilitychange", i);
105
106
  };
106
107
  }, [
107
- E,
108
+ D,
108
109
  c,
109
- U,
110
+ G,
110
111
  y
111
112
  ]);
112
- let Ye = l(async () => {
113
+ let Xe = l(async () => {
113
114
  if (c) {
114
- Fe(!0);
115
+ C(!0);
115
116
  try {
116
- let e = Array.from(P.values());
117
+ let e = Array.from(I.values());
117
118
  if (e.length > 0) {
118
119
  let t = e.map((e) => ({
119
120
  id: e.id,
120
121
  position: e.position
121
122
  }));
122
- await J(t);
123
+ await He(t);
123
124
  }
124
- k && await W({
125
+ j && await K({
125
126
  id: c,
126
- name: k.name,
127
- description: k.description
127
+ name: j.name,
128
+ description: j.description
128
129
  });
129
130
  } catch {} finally {
130
- Fe(!1);
131
+ C(!1);
131
132
  }
132
133
  }
133
134
  }, [
134
135
  c,
135
- P,
136
- k,
137
- J,
138
- W
139
- ]), Xe = l(() => {
136
+ I,
137
+ j,
138
+ He,
139
+ K
140
+ ]), Ze = l(() => {
140
141
  _("/dashboards");
141
142
  }, [_]), X = l((e) => {
142
- I(e);
143
- }, [I]), Z = d(() => (k?.pages || []).map((e, t) => ({
143
+ R(e);
144
+ }, [R]), Z = d(() => (j?.pages || []).map((e, t) => ({
144
145
  id: e.id,
145
146
  name: e.name || v("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
146
147
  order: e.order ?? 0
147
- })), [k?.pages, v]), Q = k && k.id === c ? k.name : null, $ = F || k?.pages?.[0]?.id || null;
148
+ })), [j?.pages, v]), Q = j && j.id === c ? j.name : null, $ = L || j?.pages?.[0]?.id || null;
148
149
  u(() => {
149
- if (c && Q) return me(c, Q), () => he(c);
150
+ if (c && Q) return he(c, Q), () => ge(c);
150
151
  }, [c, Q]);
151
- let Ze = d(() => !x && S && !H && !C && !V && Q !== null ? oe({
152
+ let Qe = d(() => !x && S && !W && !w && !U && Q !== null ? oe({
152
153
  dashboardName: Q || v("bigconsole.dashboards.title", "Dashboards"),
153
154
  tabs: Z.map((e) => ({
154
155
  id: e.id,
@@ -159,37 +160,37 @@ var _ = c(function() {
159
160
  }) : null, [
160
161
  x,
161
162
  S,
162
- H,
163
- C,
164
- V,
163
+ W,
164
+ w,
165
+ U,
165
166
  Q,
166
167
  Z,
167
168
  $,
168
169
  X,
169
170
  v
170
171
  ]);
171
- ke(Ze), o();
172
- let Qe = l(async () => {
173
- let e = F || k?.pages?.[0]?.id;
174
- if (!L || !c || !e) return;
175
- let t = P.get(L);
172
+ Ae(Qe), o();
173
+ let $e = l(async () => {
174
+ let e = L || j?.pages?.[0]?.id;
175
+ if (!z || !c || !e) return;
176
+ let t = I.get(z);
176
177
  if (!t) {
177
- z();
178
+ V();
178
179
  return;
179
180
  }
180
181
  let n = {
181
182
  x: 0,
182
- y: Array.from(P.values()).reduce((e, t) => {
183
+ y: Array.from(I.values()).reduce((e, t) => {
183
184
  let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
184
185
  return Math.max(e, n);
185
186
  }, 0),
186
- width: Math.min(t.positionWidth ?? 4, k?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
187
+ width: Math.min(t.positionWidth ?? 4, j?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
187
188
  height: t.positionHeight ?? 4
188
- }, r = R === "copy" ? v("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
189
+ }, r = B === "copy" ? v("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
189
190
  try {
190
- i = await q(L, n, r);
191
+ i = await Ve(z, n, r);
191
192
  } catch {}
192
- i ||= await G({
193
+ i ||= await q({
193
194
  pageId: e,
194
195
  dashboardId: c,
195
196
  type: t.type,
@@ -203,117 +204,117 @@ var _ = c(function() {
203
204
  position: n,
204
205
  refreshInterval: t.refreshInterval ?? void 0,
205
206
  metadata: t.metadata
206
- }), i && (B(i.id), R === "cut" && await K(L)), z();
207
+ }), i && (H(i.id), B === "cut" && await J(z)), V();
207
208
  }, [
208
- L,
209
- R,
209
+ z,
210
+ B,
210
211
  c,
211
- F,
212
- k,
213
- P,
212
+ L,
213
+ j,
214
+ I,
215
+ Ve,
214
216
  q,
215
- G,
216
- K,
217
- B,
218
- z,
217
+ J,
218
+ H,
219
+ V,
219
220
  v
220
- ]), $e = l(() => {
221
- T(!0);
222
- }, []), [et, tt] = f(!1), nt = l(() => {
223
- tt(!0);
224
- }, []), rt = l(() => {
225
- tt(!1);
221
+ ]), et = l(() => {
222
+ E(!0);
223
+ }, []), [tt, nt] = f(!1), rt = l(() => {
224
+ nt(!0);
226
225
  }, []), it = l(() => {
227
- T(!1);
228
- }, []), at = l(async () => {
229
- if (!k || !c) return;
230
- let e = (k.pages?.length || 0) + 1, t = v("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await Y({
226
+ nt(!1);
227
+ }, []), at = l(() => {
228
+ E(!1);
229
+ }, []), [ot, st] = f(!1), ct = l(() => st(!0), []), lt = l(() => st(!1), []), ut = l(async () => {
230
+ if (!j || !c) return;
231
+ let e = (j.pages?.length || 0) + 1, t = v("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await Ue({
231
232
  dashboardId: c,
232
233
  name: t,
233
- gridColumns: de().defaultGridColumns
234
+ gridColumns: fe().defaultGridColumns
234
235
  });
235
- n && (A({
236
- ...k,
237
- pages: [...k.pages || [], n]
238
- }), I(n.id));
236
+ n && (M({
237
+ ...j,
238
+ pages: [...j.pages || [], n]
239
+ }), R(n.id));
239
240
  }, [
240
- k,
241
+ j,
241
242
  c,
242
- A,
243
- Y,
244
- I,
243
+ M,
244
+ Ue,
245
+ R,
245
246
  v
246
- ]), ot = l(async (e, t) => {
247
- k && await Ue({
247
+ ]), dt = l(async (e, t) => {
248
+ j && await We({
248
249
  id: e,
249
250
  name: t
250
- }) && A({
251
- ...k,
252
- pages: k.pages?.map((n) => n.id === e ? {
251
+ }) && M({
252
+ ...j,
253
+ pages: j.pages?.map((n) => n.id === e ? {
253
254
  ...n,
254
255
  name: t
255
256
  } : n)
256
257
  });
257
258
  }, [
258
- k,
259
- A,
260
- Ue
261
- ]), st = l(async (e) => {
262
- if (!k || !c) return;
263
- let t = k.pages?.find((t) => t.id === e);
259
+ j,
260
+ M,
261
+ We
262
+ ]), ft = l(async (e) => {
263
+ if (!j || !c) return;
264
+ let t = j.pages?.find((t) => t.id === e);
264
265
  if (!t) return;
265
- let n = await Ge(e, v("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
266
- n && (A({
267
- ...k,
268
- pages: [...k.pages || [], n]
269
- }), I(n.id));
266
+ let n = await Ke(e, v("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
267
+ n && (M({
268
+ ...j,
269
+ pages: [...j.pages || [], n]
270
+ }), R(n.id));
270
271
  }, [
271
- k,
272
+ j,
272
273
  c,
273
- A,
274
- Ge,
275
- I,
274
+ M,
275
+ Ke,
276
+ R,
276
277
  v
277
- ]), ct = l(async (e) => {
278
- if (!(!k || (k.pages?.length || 0) <= 1) && await We(e)) {
279
- let t = k.pages?.filter((t) => t.id !== e).map((e, t) => ({
278
+ ]), pt = l(async (e) => {
279
+ if (!(!j || (j.pages?.length || 0) <= 1) && await Ge(e)) {
280
+ let t = j.pages?.filter((t) => t.id !== e).map((e, t) => ({
280
281
  ...e,
281
282
  order: t
282
283
  }));
283
- A({
284
- ...k,
284
+ M({
285
+ ...j,
285
286
  pages: t
286
287
  });
287
288
  let n = t?.[0]?.id;
288
- F === e && n && I(n, { replace: !0 });
289
+ L === e && n && R(n, { replace: !0 });
289
290
  }
290
291
  }, [
291
- k,
292
- A,
293
- F,
294
- We,
295
- I
296
- ]), lt = l(async (e) => {
297
- if (!k || !c) return;
298
- A({
299
- ...k,
292
+ j,
293
+ M,
294
+ L,
295
+ Ge,
296
+ R
297
+ ]), mt = l(async (e) => {
298
+ if (!j || !c) return;
299
+ M({
300
+ ...j,
300
301
  pages: e.map((e, t) => ({
301
302
  ...e,
302
303
  order: t
303
304
  }))
304
305
  });
305
306
  let t = e.map((e) => e.id);
306
- await Ke(c, t);
307
+ await qe(c, t);
307
308
  }, [
308
- k,
309
+ j,
309
310
  c,
310
- A,
311
- Ke
311
+ M,
312
+ qe
312
313
  ]);
313
314
  return x ? /* @__PURE__ */ h("div", {
314
315
  className: "flex items-center justify-center h-full",
315
316
  children: /* @__PURE__ */ h("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
316
- }) : S ? H ? /* @__PURE__ */ h("div", {
317
+ }) : S ? W ? /* @__PURE__ */ h("div", {
317
318
  className: "flex h-full flex-col items-center justify-center",
318
319
  style: { padding: "var(--space-pagePadding)" },
319
320
  children: /* @__PURE__ */ h(a, {
@@ -322,13 +323,13 @@ var _ = c(function() {
322
323
  title: v("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
323
324
  description: /* @__PURE__ */ h("span", {
324
325
  className: "break-words",
325
- children: H.message
326
+ children: W.message
326
327
  }),
327
328
  className: "w-full max-w-md",
328
329
  "data-testid": "dashboard-view-error",
329
330
  actions: /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(p, {
330
331
  size: "sm",
331
- onClick: () => U(c),
332
+ onClick: () => G(c),
332
333
  children: v("bigconsole.dashboards.view.retry", "Retry")
333
334
  }), /* @__PURE__ */ h(p, {
334
335
  size: "sm",
@@ -337,10 +338,10 @@ var _ = c(function() {
337
338
  children: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
338
339
  })] })
339
340
  })
340
- }) : C ? /* @__PURE__ */ h("div", {
341
+ }) : w ? /* @__PURE__ */ h("div", {
341
342
  className: "flex flex-col items-center justify-center h-full",
342
343
  style: { padding: "var(--space-pagePadding)" },
343
- children: /* @__PURE__ */ h(Ee, {
344
+ children: /* @__PURE__ */ h(De, {
344
345
  illustration: "empty-data",
345
346
  title: v("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
346
347
  description: /* @__PURE__ */ g(m, { children: [v("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ h("span", {
@@ -352,7 +353,7 @@ var _ = c(function() {
352
353
  children: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
353
354
  })
354
355
  })
355
- }) : V || !k ? /* @__PURE__ */ h("div", {
356
+ }) : U || !j ? /* @__PURE__ */ h("div", {
356
357
  className: "flex items-center justify-center h-full",
357
358
  role: "status",
358
359
  "aria-live": "polite",
@@ -364,7 +365,7 @@ var _ = c(function() {
364
365
  })]
365
366
  })
366
367
  }) : /* @__PURE__ */ g("div", {
367
- ref: qe,
368
+ ref: Je,
368
369
  className: "h-full flex flex-col overflow-hidden",
369
370
  children: [
370
371
  /* @__PURE__ */ h(a, {
@@ -378,94 +379,102 @@ var _ = c(function() {
378
379
  className: "flex flex-wrap items-center gap-control-gap",
379
380
  children: [
380
381
  /* @__PURE__ */ g(p, {
381
- onClick: Xe,
382
+ onClick: Ze,
382
383
  variant: "ghost",
383
384
  size: "sm",
384
385
  title: v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
385
386
  "aria-label": v("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
386
387
  className: "flex-shrink-0",
387
- children: [/* @__PURE__ */ h(we, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.back", "Back")]
388
+ children: [/* @__PURE__ */ h(Te, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.back", "Back")]
388
389
  }),
389
390
  /* @__PURE__ */ h("h1", {
390
391
  className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
391
- title: k.name,
392
- ...ve(k.id),
393
- children: k.name
392
+ title: j.name,
393
+ ...ye(j.id),
394
+ children: j.name
394
395
  }),
395
396
  /* @__PURE__ */ h("div", {
396
397
  className: "flex-shrink-0",
397
398
  children: /* @__PURE__ */ h(se, {
398
- isLive: E,
399
+ isLive: D,
399
400
  onToggle: () => Le((e) => !e)
400
401
  })
401
402
  }),
402
403
  /* @__PURE__ */ h("div", {
403
404
  className: "flex-shrink-0",
404
405
  children: /* @__PURE__ */ g(p, {
405
- onClick: () => Re((e) => !e),
406
+ onClick: () => ze((e) => !e),
406
407
  variant: "ghost",
407
408
  size: "sm",
408
- "aria-pressed": D,
409
+ "aria-pressed": Re,
409
410
  title: v("bigconsole.dashboards.view.digest", "Console digest"),
410
411
  "aria-label": v("bigconsole.dashboards.view.digest", "Console digest"),
411
- children: [/* @__PURE__ */ h(Te, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.digest", "Digest")]
412
+ children: [/* @__PURE__ */ h(Ee, { className: "w-4 h-4 mr-2" }), v("bigconsole.dashboards.view.digest", "Digest")]
412
413
  })
413
414
  })
414
415
  ]
415
416
  })
416
417
  }),
417
- D && k && /* @__PURE__ */ h("div", {
418
+ Re && j && /* @__PURE__ */ h("div", {
418
419
  className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
419
420
  children: /* @__PURE__ */ h("div", {
420
421
  className: "mx-auto max-w-3xl",
421
- children: /* @__PURE__ */ h(ge, {
422
- dashboardId: k.id,
423
- onClose: () => Re(!1)
422
+ children: /* @__PURE__ */ h(_e, {
423
+ dashboardId: j.id,
424
+ onClose: () => ze(!1)
424
425
  })
425
426
  })
426
427
  }),
427
428
  O && /* @__PURE__ */ h(le, {
428
- currentDashboardId: k.id,
429
- currentDashboardName: k.name,
430
- basePath: `${Ae}/dashboards`
429
+ currentDashboardId: j.id,
430
+ currentDashboardName: j.name,
431
+ basePath: `${je}/dashboards`
431
432
  }),
432
433
  /* @__PURE__ */ h("div", {
433
434
  className: "flex-1 min-w-0 overflow-hidden",
434
435
  children: /* @__PURE__ */ h(ae, {
435
- dashboardId: k.id,
436
- pageId: F || k.pages?.[0]?.id,
437
- title: k.name,
438
- onPaste: Qe,
439
- onSave: je ? Ye : void 0,
440
- isSaving: Pe,
441
- onExport: Me ? $e : void 0,
442
- onPublishTemplate: Ne ? nt : void 0,
436
+ dashboardId: j.id,
437
+ pageId: L || j.pages?.[0]?.id,
438
+ title: j.name,
439
+ onPaste: $e,
440
+ onSave: Me ? Xe : void 0,
441
+ isSaving: Fe,
442
+ onReview: ct,
443
+ onExport: Ne ? et : void 0,
444
+ onPublishTemplate: Pe ? rt : void 0,
443
445
  pages: Z,
444
446
  activePageId: $ ?? void 0,
445
447
  onPageChange: X,
446
- onPageAdd: at,
447
- onPageRename: ot,
448
- onPageDuplicate: st,
449
- onPageDelete: ct,
450
- onPagesReorder: lt,
448
+ onPageAdd: ut,
449
+ onPageRename: dt,
450
+ onPageDuplicate: ft,
451
+ onPageDelete: pt,
452
+ onPagesReorder: mt,
451
453
  showPageTabs: !0
452
454
  })
453
455
  }),
456
+ /* @__PURE__ */ h(de, {
457
+ open: ot,
458
+ onClose: lt,
459
+ dashboardId: j.id,
460
+ pages: Z,
461
+ canFix: Me
462
+ }),
454
463
  /* @__PURE__ */ h(ce, {
455
464
  isOpen: Ie,
456
- dashboardId: k.id,
457
- dashboardName: k.name,
458
- onClose: it
465
+ dashboardId: j.id,
466
+ dashboardName: j.name,
467
+ onClose: at
459
468
  }),
460
469
  /* @__PURE__ */ h(ue, {
461
- isOpen: et,
462
- dashboardId: k.id,
463
- dashboardName: k.name,
464
- dashboardDescription: k.description,
465
- onClose: rt
470
+ isOpen: tt,
471
+ dashboardId: j.id,
472
+ dashboardName: j.name,
473
+ dashboardDescription: j.description,
474
+ onClose: it
466
475
  })
467
476
  ]
468
- }) : /* @__PURE__ */ h(Se, {
477
+ }) : /* @__PURE__ */ h(Ce, {
469
478
  title: v("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
470
479
  description: v("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
471
480
  });
@@ -29,6 +29,12 @@ export interface LintableWidget {
29
29
  dataSinkId?: string | null;
30
30
  dataSourceId?: string | null;
31
31
  parserId?: string | null;
32
+ /**
33
+ * Whether the widget has a data source, when the host already knows. A saved widget can be bound in more
34
+ * ways than the three ids above (a dataset, a legacy sink key, a canonical binding), so the host passes its
35
+ * own answer here and it wins over the ids.
36
+ */
37
+ connected?: boolean | null;
32
38
  }
33
39
  export interface LintablePage {
34
40
  name: string;
@@ -61,6 +67,8 @@ export interface LintFinding {
61
67
  }
62
68
  /** One widget edit. Field names match `BigConsoleWidgetRefinementInput`. */
63
69
  export interface LintFix {
70
+ /** The rule this fix repairs, so a host can re-plan it against a fresher copy of the board. */
71
+ ruleId?: LintRuleId;
64
72
  widgetIndex: number;
65
73
  title?: string;
66
74
  /** Shallow-merged into the widget config. */
@@ -33,6 +33,7 @@ function a(t) {
33
33
  return e.has(n) || n.endsWith("_chart");
34
34
  }
35
35
  function o(e) {
36
+ if (typeof e.connected == "boolean") return e.connected;
36
37
  let t = n(e.config) ? e.config : {};
37
38
  return !!(e.dataSinkId || e.dataSourceId || e.parserId || t.dataSinkId || t.dataSourceId);
38
39
  }
@@ -228,6 +229,7 @@ function C(e, t) {
228
229
  let r = b(e, t);
229
230
  if (!r) return null;
230
231
  if (t.ruleId === "TRUNCATED_AREA_AXIS") return {
232
+ ruleId: t.ruleId,
231
233
  widgetIndex: t.widgetFlatIndex,
232
234
  configOverrides: {
233
235
  startAtZero: !0,
@@ -253,6 +255,7 @@ function C(e, t) {
253
255
  }
254
256
  }
255
257
  return o && (a.columns = o), {
258
+ ruleId: t.ruleId,
256
259
  widgetIndex: t.widgetFlatIndex,
257
260
  configOverrides: a,
258
261
  summary: u ? "Add an icon next to each colour-coded rule (check, alert, flag or dot) so the meaning does not rely on colour. Whole-row and card rules get bold text instead." : "Make the value bold wherever a colour rule matches, so the meaning does not rely on colour."
@@ -263,6 +266,7 @@ function C(e, t) {
263
266
  if (!n) return null;
264
267
  let i = x(n, r.title);
265
268
  return {
269
+ ruleId: t.ruleId,
266
270
  widgetIndex: t.widgetFlatIndex,
267
271
  title: i,
268
272
  summary: `Rename this widget to "${i}".`