@burdenoff/microfe-bigconsole 2026.1124.1 → 2026.1124.2

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.
@@ -11,55 +11,56 @@ import te from "../hooks/useDashboardOperations.js";
11
11
  import { FleetBreadcrumb as ne } from "../components/fleet/FleetBreadcrumb.js";
12
12
  import { FleetChildrenPanel as re } from "../components/fleet/FleetChildrenPanel.js";
13
13
  import ie from "../hooks/usePageOperations.js";
14
+ import { directMasterName as ae } from "../utils/fleetTree.js";
15
+ import { AsOfProvider as c, HideWhenAsOf as l, useAsOf as oe } from "../asof/AsOfProvider.js";
14
16
  import "../components/dashboard/index.js";
15
- import { AsOfProvider as c, HideWhenAsOf as l, useAsOf as ae } from "../asof/AsOfProvider.js";
16
17
  import { useReconcileAgentTool as u } from "../components/reconcile/useReconcileAgentTool.js";
17
18
  import "../components/common/index.js";
18
19
  import "../components/narrative/index.js";
20
+ import { DashboardCanvas as se } from "../components/dashboard/DashboardCanvas.js";
19
21
  import "../store/index.js";
20
- import { DashboardCanvas as oe } from "../components/dashboard/DashboardCanvas.js";
22
+ import { LiveCanvasToggle as ce } from "../components/dashboard/LiveCanvasToggle.js";
23
+ import { ExportDashboardDialog as le } from "../components/dashboard/ExportDashboardDialog.js";
24
+ import { DrilldownBreadcrumb as ue } from "../components/dashboard/DrilldownBreadcrumb.js";
25
+ import { PublishToStoreDialog as de } from "../components/dashboard/PublishToStoreDialog.js";
26
+ import { DashboardReviewDialog as fe } from "../components/dashboard/DashboardReviewDialog.js";
27
+ import { DashboardPresenceBar as pe } from "../components/dashboard/DashboardPresenceBar.js";
28
+ import { DashboardCommentsDrawer as me } from "../components/dashboard/DashboardCommentsDrawer.js";
21
29
  import "../hooks/index.js";
22
- import { LiveCanvasToggle as se } from "../components/dashboard/LiveCanvasToggle.js";
23
- import { ExportDashboardDialog as ce } from "../components/dashboard/ExportDashboardDialog.js";
24
- import { DrilldownBreadcrumb as le } from "../components/dashboard/DrilldownBreadcrumb.js";
25
- import { PublishToStoreDialog as ue } from "../components/dashboard/PublishToStoreDialog.js";
26
- import { DashboardReviewDialog as de } from "../components/dashboard/DashboardReviewDialog.js";
27
- import { DashboardPresenceBar as fe } from "../components/dashboard/DashboardPresenceBar.js";
28
- import { DashboardCommentsDrawer as pe } from "../components/dashboard/DashboardCommentsDrawer.js";
29
- import me, { parseUrlToGlobalFilterValues as he } from "../hooks/useFilterUrlSync.js";
30
- import ge from "../hooks/useActivePage.js";
31
- import { dashboardPageTabs as _e } from "../assistant/pageControls.js";
32
- import { loadBigConsoleSettings as ve } from "../hooks/useBigConsoleSettings.js";
33
- import { LIVE_STRUCTURE_POLL_MS as ye, isLiveDataRefreshDue as be } from "../utils/liveBoardRefresh.js";
34
- import { registerBreadcrumbName as xe, unregisterBreadcrumbName as Se } from "../utils/breadcrumbRegistry.js";
35
- import { DigestPanel as Ce } from "../components/narrative/DigestPanel.js";
36
- import { GetWidgetDocument as we } from "../../generated/wspace-operations.js";
37
- import { dashboardSuggestAnchorProps as Te } from "../proactive/entities.js";
38
- import { memo as d, useCallback as f, useEffect as p, useMemo as Ee, useRef as De, useState as m } from "react";
30
+ import he, { parseUrlToGlobalFilterValues as ge } from "../hooks/useFilterUrlSync.js";
31
+ import _e from "../hooks/useActivePage.js";
32
+ import { dashboardPageTabs as ve } from "../assistant/pageControls.js";
33
+ import { loadBigConsoleSettings as ye } from "../hooks/useBigConsoleSettings.js";
34
+ import { LIVE_STRUCTURE_POLL_MS as be, isLiveDataRefreshDue as xe } from "../utils/liveBoardRefresh.js";
35
+ import { registerBreadcrumbName as Se, unregisterBreadcrumbName as Ce } from "../utils/breadcrumbRegistry.js";
36
+ import { DigestPanel as we } from "../components/narrative/DigestPanel.js";
37
+ import { GetWidgetDocument as Te } from "../../generated/wspace-operations.js";
38
+ import { dashboardSuggestAnchorProps as Ee } from "../proactive/entities.js";
39
+ import { memo as d, useCallback as f, useEffect as p, useMemo as m, useRef as De, useState as h } from "react";
39
40
  import { useLocation as Oe, useParams as ke } from "react-router";
40
41
  import { AccessDenied as Ae } from "@burdenoff/fe-libs/shared/components";
41
42
  import { usePermissions as je } from "@burdenoff/fe-libs/shared/providers/shell";
42
43
  import { ArrowLeft as Me, MessageSquare as Ne, Network as Pe, Sparkles as Fe } from "lucide-react";
43
- import { Button as h, IllustratedEmptyState as Ie } from "@burdenoff/fe-libs/ui";
44
+ import { Button as g, IllustratedEmptyState as Ie } from "@burdenoff/fe-libs/ui";
44
45
  import { useI18n as Le } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
45
46
  import { useApolloClient as Re } from "@apollo/client/react";
46
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
47
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
47
48
  import { useAssistantPageControls as ze } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
48
49
  // src/bigconsole/pages/DashboardViewPage.tsx
49
- var y = d(function() {
50
- let { dashboardId: r } = ke(), c = a(), u = i(), { t: d } = Le(), y = ae().asOf !== null, b = Re(), { hasPermission: x, isLoading: S } = je(), C = x(n.DASHBOARD_READ), w = x(n.DASHBOARD_UPDATE), Ve = x(n.DASHBOARD_EXPORT), He = x(n.DASHBOARD_PUBLISH), [Ue, T] = m(!1), [E, D] = m(!1), [We, O] = m(!1), [k, Ge] = m(!1), [A, j] = m(!1), [M, N] = m(!1), [P, Ke] = m(!1), { isInDrilldown: F, getContextFromUrl: qe, getDrilldownMetadata: Je } = me(), I = t((e) => e.currentDashboard), L = t((e) => e.setCurrentDashboard), R = t((e) => e.setGlobalFilterValue), Ye = t((e) => e.viewMode), Xe = t((e) => e.setViewMode);
50
+ var b = d(function() {
51
+ let { dashboardId: r } = ke(), c = a(), u = i(), { t: d } = Le(), b = oe().asOf !== null, x = Re(), { hasPermission: S, isLoading: C } = je(), w = S(n.DASHBOARD_READ), Ve = S(n.DASHBOARD_UPDATE), He = S(n.DASHBOARD_EXPORT), Ue = S(n.DASHBOARD_PUBLISH), [We, Ge] = h(!1), [T, E] = h(!1), [Ke, qe] = h(!1), [D, Je] = h(!1), [Ye, Xe] = h(!1), [Ze, Qe] = h(!1), [O, $e] = h(!1), { isInDrilldown: k, getContextFromUrl: A, getDrilldownMetadata: j } = he(), M = t((e) => e.currentDashboard), N = t((e) => e.setCurrentDashboard), P = t((e) => e.setGlobalFilterValue), F = t((e) => e.viewMode), I = t((e) => e.setViewMode);
51
52
  p(() => {
52
- y && Ye === "edit" && Xe("view");
53
+ b && F === "edit" && I("view");
53
54
  }, [
54
- y,
55
- Ye,
56
- Xe
55
+ b,
56
+ F,
57
+ I
57
58
  ]);
58
- let Ze = e((e) => e.closeConfigPanel);
59
+ let L = e((e) => e.closeConfigPanel);
59
60
  p(() => {
60
- y && Ze();
61
- }, [y, Ze]);
62
- let Qe = t((e) => e.clearAllGlobalFilters), $e = t((e) => e.setGlobalFilterValues), z = e((e) => e.widgets), et = Oe(), { activePageId: B, setActivePage: V } = ge(I?.id === r ? I?.pages : void 0), H = e((e) => e.clipboardWidgetId), U = e((e) => e.clipboardAction), W = e((e) => e.clearClipboard), G = e((e) => e.selectWidget), { loading: K, error: q, fetchDashboard: J, updateDashboard: tt } = te(), { createWidget: nt, deleteWidget: rt, duplicateWidget: it, batchUpdatePositions: at, refetch: ot } = ee(B || void 0, r), { createPage: st, updatePage: ct, deletePage: lt, duplicatePage: ut, reorderPages: dt } = ie(), ft = f((e) => {
61
+ b && L();
62
+ }, [b, L]);
63
+ let et = t((e) => e.clearAllGlobalFilters), tt = t((e) => e.setGlobalFilterValues), R = e((e) => e.widgets), nt = Oe(), { activePageId: z, setActivePage: B } = _e(M?.id === r ? M?.pages : void 0), V = e((e) => e.clipboardWidgetId), H = e((e) => e.clipboardAction), U = e((e) => e.clearClipboard), W = e((e) => e.selectWidget), { loading: G, error: K, fetchDashboard: q, updateDashboard: rt } = te(), { createWidget: it, deleteWidget: at, duplicateWidget: ot, batchUpdatePositions: st, refetch: J } = ee(z || void 0, r), { createPage: ct, updatePage: lt, deletePage: ut, duplicatePage: dt, reorderPages: ft } = ie(), pt = f((e) => {
63
64
  let t = e?.parentElement;
64
65
  if (!e || !t) return;
65
66
  let n = t;
@@ -80,138 +81,138 @@ var y = d(function() {
80
81
  }, []);
81
82
  p(() => {
82
83
  if (!r) c("/dashboards");
83
- else return $e(he(window.location.search, "filter_")), D(!1), J(r).then((e) => {
84
- e || D(!0);
84
+ else return tt(ge(window.location.search, "filter_")), E(!1), q(r).then((e) => {
85
+ e || E(!0);
85
86
  }), () => {
86
- L(null), Qe(), D(!1);
87
+ N(null), et(), E(!1);
87
88
  };
88
89
  }, [
89
90
  r,
90
91
  c,
91
- J,
92
- L,
93
- Qe,
94
- $e
92
+ q,
93
+ N,
94
+ et,
95
+ tt
95
96
  ]), p(() => {
96
- if (!F) return;
97
- let e = qe(), t = Je();
97
+ if (!k) return;
98
+ let e = A(), t = j();
98
99
  Object.entries(e).forEach(([e, t]) => {
99
- R(`ctx_${e}`, t);
100
- }), t.depth > 0 && (R("__drilldown_depth", t.depth), R("__drilldown_parent", t.parent), R("__drilldown_path", t.path)), Object.keys(e).length;
100
+ P(`ctx_${e}`, t);
101
+ }), t.depth > 0 && (P("__drilldown_depth", t.depth), P("__drilldown_parent", t.parent), P("__drilldown_path", t.path)), Object.keys(e).length;
101
102
  }, [
102
- F,
103
- qe,
104
- Je,
105
- R,
106
- et.search
103
+ k,
104
+ A,
105
+ j,
106
+ P,
107
+ nt.search
107
108
  ]);
108
- let pt = De(ot);
109
- pt.current = ot, p(() => {
110
- if (!k || !r || y) return;
109
+ let mt = De(J);
110
+ mt.current = J, p(() => {
111
+ if (!D || !r || b) return;
111
112
  let e = null, n = () => {
112
113
  if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
113
- J(r, { silent: !0 }), pt.current();
114
+ q(r, { silent: !0 }), mt.current();
114
115
  let n = Date.now();
115
- be(e, n) && (e = n, b.refetchQueries({ include: [we] }).catch((e) => {
116
+ xe(e, n) && (e = n, x.refetchQueries({ include: [Te] }).catch((e) => {
116
117
  console.warn("[DashboardViewPage] Live widget data refresh failed", e);
117
118
  }));
118
119
  };
119
120
  n();
120
- let i = window.setInterval(n, ye), a = () => {
121
+ let i = window.setInterval(n, be), a = () => {
121
122
  document.visibilityState === "visible" && (e = null, n());
122
123
  };
123
124
  return document.addEventListener("visibilitychange", a), () => {
124
125
  window.clearInterval(i), document.removeEventListener("visibilitychange", a);
125
126
  };
126
127
  }, [
127
- k,
128
+ D,
128
129
  r,
129
- y,
130
- J,
131
- b
130
+ b,
131
+ q,
132
+ x
132
133
  ]);
133
- let mt = f(async () => {
134
- if (r && !y) {
135
- T(!0);
134
+ let ht = f(async () => {
135
+ if (r && !b) {
136
+ Ge(!0);
136
137
  try {
137
- let e = Array.from(z.values());
138
+ let e = Array.from(R.values());
138
139
  if (e.length > 0) {
139
140
  let t = e.map((e) => ({
140
141
  id: e.id,
141
142
  position: e.position
142
143
  }));
143
- await at(t);
144
+ await st(t);
144
145
  }
145
- I && await tt({
146
+ M && await rt({
146
147
  id: r,
147
- name: I.name,
148
- description: I.description
148
+ name: M.name,
149
+ description: M.description
149
150
  });
150
151
  } catch {} finally {
151
- T(!1);
152
+ Ge(!1);
152
153
  }
153
154
  }
154
155
  }, [
155
156
  r,
156
- y,
157
- z,
158
- I,
159
- at,
160
- tt
161
- ]), ht = f(() => {
157
+ b,
158
+ R,
159
+ M,
160
+ st,
161
+ rt
162
+ ]), gt = f(() => {
162
163
  c("/dashboards");
163
- }, [c]), gt = s(y ? void 0 : r), _t = f((e) => c(`/dashboards/${e}`), [c]), Y = f((e) => {
164
- V(e);
165
- }, [V]), X = Ee(() => (I?.pages || []).map((e, t) => ({
164
+ }, [c]), { ancestors: Y, directMasterId: _t } = s(b ? void 0 : r), vt = f((e) => c(`/dashboards/${e}`), [c]), X = f((e) => {
165
+ B(e);
166
+ }, [B]), Z = m(() => (M?.pages || []).map((e, t) => ({
166
167
  id: e.id,
167
168
  name: e.name || d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
168
169
  order: e.order ?? 0
169
- })), [I?.pages, d]), Z = I && I.id === r ? I.name : null, Q = B || I?.pages?.[0]?.id || null;
170
+ })), [M?.pages, d]), Q = M && M.id === r ? M.name : null, $ = z || M?.pages?.[0]?.id || null;
170
171
  p(() => {
171
- if (r && Z) return xe(r, Z), () => Se(r);
172
- }, [r, Z]);
173
- let vt = Ee(() => !S && C && !q && !E && !K && Z !== null ? _e({
174
- dashboardName: Z || d("bigconsole.dashboards.title", "Dashboards"),
175
- tabs: X.map((e) => ({
172
+ if (r && Q) return Se(r, Q), () => Ce(r);
173
+ }, [r, Q]);
174
+ let yt = m(() => !C && w && !K && !T && !G && Q !== null ? ve({
175
+ dashboardName: Q || d("bigconsole.dashboards.title", "Dashboards"),
176
+ tabs: Z.map((e) => ({
176
177
  id: e.id,
177
178
  label: e.name
178
179
  })),
179
- current: Q,
180
- select: Y
180
+ current: $,
181
+ select: X
181
182
  }) : null, [
182
- S,
183
183
  C,
184
- q,
185
- E,
184
+ w,
186
185
  K,
186
+ T,
187
+ G,
188
+ Q,
187
189
  Z,
190
+ $,
188
191
  X,
189
- Q,
190
- Y,
191
192
  d
192
193
  ]);
193
- ze(vt);
194
- let yt = f(async () => {
195
- let e = B || I?.pages?.[0]?.id;
196
- if (!H || !r || !e) return;
197
- let t = z.get(H);
194
+ ze(yt);
195
+ let bt = f(async () => {
196
+ let e = z || M?.pages?.[0]?.id;
197
+ if (!V || !r || !e) return;
198
+ let t = R.get(V);
198
199
  if (!t) {
199
- W();
200
+ U();
200
201
  return;
201
202
  }
202
203
  let n = {
203
204
  x: 0,
204
- y: Array.from(z.values()).reduce((e, t) => {
205
+ y: Array.from(R.values()).reduce((e, t) => {
205
206
  let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
206
207
  return Math.max(e, n);
207
208
  }, 0),
208
- width: Math.min(t.positionWidth ?? 4, I?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
209
+ width: Math.min(t.positionWidth ?? 4, M?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
209
210
  height: t.positionHeight ?? 4
210
- }, i = U === "copy" ? d("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, a = null;
211
+ }, i = H === "copy" ? d("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, a = null;
211
212
  try {
212
- a = await it(H, n, i);
213
+ a = await ot(V, n, i);
213
214
  } catch {}
214
- a ||= await nt({
215
+ a ||= await it({
215
216
  pageId: e,
216
217
  dashboardId: r,
217
218
  type: t.type,
@@ -225,354 +226,356 @@ var y = d(function() {
225
226
  position: n,
226
227
  refreshInterval: t.refreshInterval ?? void 0,
227
228
  metadata: t.metadata
228
- }), a && (G(a.id), U === "cut" && await rt(H)), W();
229
+ }), a && (W(a.id), H === "cut" && await at(V)), U();
229
230
  }, [
231
+ V,
230
232
  H,
231
- U,
232
233
  r,
233
- B,
234
- I,
235
234
  z,
235
+ M,
236
+ R,
237
+ ot,
236
238
  it,
237
- nt,
238
- rt,
239
- G,
239
+ at,
240
240
  W,
241
+ U,
241
242
  d
242
- ]), bt = f(() => {
243
- O(!0);
244
- }, []), [xt, St] = m(!1), Ct = f(() => {
245
- St(!0);
246
- }, []), wt = f(() => {
247
- St(!1);
243
+ ]), xt = f(() => {
244
+ qe(!0);
245
+ }, []), [St, Ct] = h(!1), wt = f(() => {
246
+ Ct(!0);
248
247
  }, []), Tt = f(() => {
249
- O(!1);
250
- }, []), [Et, $] = m(!1), Dt = f(() => $(!0), []), Ot = f(() => $(!1), []), kt = f(async () => {
251
- if (!I || !r || y) return;
252
- let e = (I.pages?.length || 0) + 1, t = d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await st({
248
+ Ct(!1);
249
+ }, []), Et = f(() => {
250
+ qe(!1);
251
+ }, []), [Dt, Ot] = h(!1), kt = f(() => Ot(!0), []), At = f(() => Ot(!1), []), jt = f(async () => {
252
+ if (!M || !r || b) return;
253
+ let e = (M.pages?.length || 0) + 1, t = d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await ct({
253
254
  dashboardId: r,
254
255
  name: t,
255
- gridColumns: ve().defaultGridColumns
256
+ gridColumns: ye().defaultGridColumns
256
257
  });
257
- n && (L({
258
- ...I,
259
- pages: [...I.pages || [], n]
260
- }), V(n.id));
258
+ n && (N({
259
+ ...M,
260
+ pages: [...M.pages || [], n]
261
+ }), B(n.id));
261
262
  }, [
262
- I,
263
+ M,
263
264
  r,
264
- y,
265
- L,
266
- st,
267
- V,
265
+ b,
266
+ N,
267
+ ct,
268
+ B,
268
269
  d
269
- ]), At = f(async (e, t) => {
270
- I && !y && await ct({
270
+ ]), Mt = f(async (e, t) => {
271
+ M && !b && await lt({
271
272
  id: e,
272
273
  name: t
273
- }) && L({
274
- ...I,
275
- pages: I.pages?.map((n) => n.id === e ? {
274
+ }) && N({
275
+ ...M,
276
+ pages: M.pages?.map((n) => n.id === e ? {
276
277
  ...n,
277
278
  name: t
278
279
  } : n)
279
280
  });
280
281
  }, [
281
- I,
282
- y,
283
- L,
284
- ct
285
- ]), jt = f(async (e) => {
286
- if (!I || !r || y) return;
287
- let t = I.pages?.find((t) => t.id === e);
282
+ M,
283
+ b,
284
+ N,
285
+ lt
286
+ ]), Nt = f(async (e) => {
287
+ if (!M || !r || b) return;
288
+ let t = M.pages?.find((t) => t.id === e);
288
289
  if (!t) return;
289
- let n = await ut(e, d("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
290
- n && (L({
291
- ...I,
292
- pages: [...I.pages || [], n]
293
- }), V(n.id));
290
+ let n = await dt(e, d("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
291
+ n && (N({
292
+ ...M,
293
+ pages: [...M.pages || [], n]
294
+ }), B(n.id));
294
295
  }, [
295
- I,
296
+ M,
296
297
  r,
297
- y,
298
- L,
299
- ut,
300
- V,
298
+ b,
299
+ N,
300
+ dt,
301
+ B,
301
302
  d
302
- ]), Mt = f(async (e) => {
303
- if (!(!I || y || (I.pages?.length || 0) <= 1) && await lt(e)) {
304
- let t = I.pages?.filter((t) => t.id !== e).map((e, t) => ({
303
+ ]), Pt = f(async (e) => {
304
+ if (!(!M || b || (M.pages?.length || 0) <= 1) && await ut(e)) {
305
+ let t = M.pages?.filter((t) => t.id !== e).map((e, t) => ({
305
306
  ...e,
306
307
  order: t
307
308
  }));
308
- L({
309
- ...I,
309
+ N({
310
+ ...M,
310
311
  pages: t
311
312
  });
312
313
  let n = t?.[0]?.id;
313
- B === e && n && V(n, { replace: !0 });
314
+ z === e && n && B(n, { replace: !0 });
314
315
  }
315
316
  }, [
316
- I,
317
- y,
318
- L,
319
- B,
320
- lt,
321
- V
322
- ]), Nt = f(async (e) => {
323
- if (!I || !r || y) return;
324
- L({
325
- ...I,
317
+ M,
318
+ b,
319
+ N,
320
+ z,
321
+ ut,
322
+ B
323
+ ]), Ft = f(async (e) => {
324
+ if (!M || !r || b) return;
325
+ N({
326
+ ...M,
326
327
  pages: e.map((e, t) => ({
327
328
  ...e,
328
329
  order: t
329
330
  }))
330
331
  });
331
332
  let t = e.map((e) => e.id);
332
- await dt(r, t);
333
+ await ft(r, t);
333
334
  }, [
334
- I,
335
+ M,
335
336
  r,
336
- y,
337
- L,
338
- dt
337
+ b,
338
+ N,
339
+ ft
339
340
  ]);
340
- return S ? /* @__PURE__ */ _("div", {
341
+ return C ? /* @__PURE__ */ v("div", {
341
342
  className: "flex items-center justify-center h-full",
342
- children: /* @__PURE__ */ _("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
343
- }) : C ? q ? /* @__PURE__ */ _("div", {
343
+ children: /* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
344
+ }) : w ? K ? /* @__PURE__ */ v("div", {
344
345
  className: "flex h-full flex-col items-center justify-center",
345
346
  style: { padding: "var(--space-pagePadding)" },
346
- children: /* @__PURE__ */ _(o, {
347
+ children: /* @__PURE__ */ v(o, {
347
348
  headingLevel: 2,
348
349
  tone: "danger",
349
350
  title: d("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
350
- description: /* @__PURE__ */ _("span", {
351
+ description: /* @__PURE__ */ v("span", {
351
352
  className: "break-words",
352
- children: q.message
353
+ children: K.message
353
354
  }),
354
355
  className: "w-full max-w-md",
355
356
  "data-testid": "dashboard-view-error",
356
- actions: /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(h, {
357
+ actions: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(g, {
357
358
  size: "sm",
358
- onClick: () => J(r),
359
+ onClick: () => q(r),
359
360
  children: d("bigconsole.dashboards.view.retry", "Retry")
360
- }), /* @__PURE__ */ _(h, {
361
+ }), /* @__PURE__ */ v(g, {
361
362
  size: "sm",
362
363
  variant: "outline",
363
364
  onClick: () => c("/dashboards"),
364
365
  children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
365
366
  })] })
366
367
  })
367
- }) : E ? /* @__PURE__ */ _("div", {
368
+ }) : T ? /* @__PURE__ */ v("div", {
368
369
  className: "flex flex-col items-center justify-center h-full",
369
370
  style: { padding: "var(--space-pagePadding)" },
370
- children: /* @__PURE__ */ _(Ie, {
371
+ children: /* @__PURE__ */ v(Ie, {
371
372
  illustration: "empty-data",
372
373
  kind: "not-found",
373
374
  size: "page",
374
375
  title: d("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
375
- description: /* @__PURE__ */ v(g, { children: [d("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ _("span", {
376
+ description: /* @__PURE__ */ y(_, { children: [d("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ v("span", {
376
377
  className: "mt-2 block font-mono text-xs text-text-muted break-all",
377
378
  children: d("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: r ?? "" })
378
379
  })] }),
379
- action: /* @__PURE__ */ _(h, {
380
+ action: /* @__PURE__ */ v(g, {
380
381
  onClick: () => c("/dashboards"),
381
382
  children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
382
383
  })
383
384
  })
384
- }) : K || !I ? /* @__PURE__ */ _("div", {
385
+ }) : G || !M ? /* @__PURE__ */ v("div", {
385
386
  className: "flex items-center justify-center h-full",
386
387
  role: "status",
387
388
  "aria-live": "polite",
388
- children: /* @__PURE__ */ v("div", {
389
+ children: /* @__PURE__ */ y("div", {
389
390
  className: "flex flex-col items-center gap-4",
390
- children: [/* @__PURE__ */ _("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ _("p", {
391
+ children: [/* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ v("p", {
391
392
  className: "text-sm text-text-secondary",
392
393
  children: d("bigconsole.dashboards.view.loading", "Loading dashboard...")
393
394
  })]
394
395
  })
395
- }) : /* @__PURE__ */ v(g, { children: [!y && /* @__PURE__ */ _(Be, {}), /* @__PURE__ */ v("div", {
396
- ref: ft,
396
+ }) : /* @__PURE__ */ y(_, { children: [!b && /* @__PURE__ */ v(Be, {}), /* @__PURE__ */ y("div", {
397
+ ref: pt,
397
398
  className: "h-full flex flex-col overflow-hidden",
398
399
  children: [
399
- /* @__PURE__ */ _(o, {
400
+ /* @__PURE__ */ v(o, {
400
401
  emphasis: "bare",
401
402
  padding: "none",
402
403
  "data-testid": "dashboard-route-header",
403
404
  "aria-label": "Dashboard",
404
405
  className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
405
406
  headerClassName: "",
406
- header: /* @__PURE__ */ v("div", {
407
+ header: /* @__PURE__ */ y("div", {
407
408
  className: "flex flex-wrap items-center gap-control-gap",
408
409
  children: [
409
- /* @__PURE__ */ v(h, {
410
- onClick: ht,
410
+ /* @__PURE__ */ y(g, {
411
+ onClick: gt,
411
412
  variant: "ghost",
412
413
  size: "sm",
413
414
  title: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
414
415
  "aria-label": d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
415
416
  className: "flex-shrink-0",
416
- children: [/* @__PURE__ */ _(Me, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.back", "Back")]
417
+ children: [/* @__PURE__ */ v(Me, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.back", "Back")]
417
418
  }),
418
- /* @__PURE__ */ _("h1", {
419
+ /* @__PURE__ */ v("h1", {
419
420
  className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
420
- title: I.name,
421
- ...Te(I.id),
422
- children: I.name
421
+ title: M.name,
422
+ ...Ee(M.id),
423
+ children: M.name
423
424
  }),
424
- !y && /* @__PURE__ */ _(fe, {
425
- dashboardId: I.id,
426
- enabled: !y
425
+ !b && /* @__PURE__ */ v(pe, {
426
+ dashboardId: M.id,
427
+ enabled: !b
427
428
  }),
428
- /* @__PURE__ */ _(l, { children: /* @__PURE__ */ _("div", {
429
+ /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
429
430
  className: "flex-shrink-0",
430
- children: /* @__PURE__ */ v(h, {
431
- onClick: () => Ke((e) => !e),
432
- variant: P ? "secondary" : "ghost",
431
+ children: /* @__PURE__ */ y(g, {
432
+ onClick: () => $e((e) => !e),
433
+ variant: O ? "secondary" : "ghost",
433
434
  size: "sm",
434
- "aria-pressed": P,
435
+ "aria-pressed": O,
435
436
  "data-testid": "dashboard-comments-button",
436
437
  title: d("bigconsole.dashboard.comments.openButton", "Console comments"),
437
438
  "aria-label": d("bigconsole.dashboard.comments.openButton", "Console comments"),
438
- children: [/* @__PURE__ */ _(Ne, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboard.comments.buttonLabel", "Comments")]
439
+ children: [/* @__PURE__ */ v(Ne, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboard.comments.buttonLabel", "Comments")]
439
440
  })
440
441
  }) }),
441
- !y && /* @__PURE__ */ _("div", {
442
+ !b && /* @__PURE__ */ v("div", {
442
443
  className: "flex-shrink-0",
443
- children: /* @__PURE__ */ _(se, {
444
- isLive: k,
445
- onToggle: () => Ge((e) => !e)
444
+ children: /* @__PURE__ */ v(ce, {
445
+ isLive: D,
446
+ onToggle: () => Je((e) => !e)
446
447
  })
447
448
  }),
448
- /* @__PURE__ */ _(l, { children: /* @__PURE__ */ _("div", {
449
+ /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
449
450
  className: "flex-shrink-0",
450
- children: /* @__PURE__ */ v(h, {
451
- onClick: () => N((e) => !e),
451
+ children: /* @__PURE__ */ y(g, {
452
+ onClick: () => Qe((e) => !e),
452
453
  variant: "ghost",
453
454
  size: "sm",
454
- "aria-pressed": M,
455
+ "aria-pressed": Ze,
455
456
  title: d("bigconsole.fleet.children.title", "Children"),
456
457
  "aria-label": d("bigconsole.fleet.children.title", "Children"),
457
458
  "data-testid": "fleet-children-toggle",
458
- children: [/* @__PURE__ */ _(Pe, { className: "w-4 h-4 mr-2" }), d("bigconsole.fleet.children.title", "Children")]
459
+ children: [/* @__PURE__ */ v(Pe, { className: "w-4 h-4 mr-2" }), d("bigconsole.fleet.children.title", "Children")]
459
460
  })
460
461
  }) }),
461
- /* @__PURE__ */ _(l, { children: /* @__PURE__ */ _("div", {
462
+ /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
462
463
  className: "flex-shrink-0",
463
- children: /* @__PURE__ */ v(h, {
464
- onClick: () => j((e) => !e),
464
+ children: /* @__PURE__ */ y(g, {
465
+ onClick: () => Xe((e) => !e),
465
466
  variant: "ghost",
466
467
  size: "sm",
467
- "aria-pressed": A,
468
+ "aria-pressed": Ye,
468
469
  title: d("bigconsole.dashboards.view.digest", "Console digest"),
469
470
  "aria-label": d("bigconsole.dashboards.view.digest", "Console digest"),
470
- children: [/* @__PURE__ */ _(Fe, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.digest", "Digest")]
471
+ children: [/* @__PURE__ */ v(Fe, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.digest", "Digest")]
471
472
  })
472
473
  }) })
473
474
  ]
474
475
  })
475
476
  }),
476
- gt.length > 0 && !y && /* @__PURE__ */ _("div", {
477
+ Y.length > 0 && !b && /* @__PURE__ */ v("div", {
477
478
  className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
478
- children: /* @__PURE__ */ _(ne, {
479
- ancestors: gt,
480
- currentName: I.name,
481
- onNavigate: _t
479
+ children: /* @__PURE__ */ v(ne, {
480
+ ancestors: Y,
481
+ currentName: M.name,
482
+ onNavigate: vt
482
483
  })
483
484
  }),
484
- M && I && !y && /* @__PURE__ */ _("div", {
485
+ Ze && M && !b && /* @__PURE__ */ v("div", {
485
486
  className: "flex-shrink-0 overflow-y-auto border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
486
487
  style: { maxHeight: "50vh" },
487
488
  "data-testid": "fleet-children-scroll",
488
- children: /* @__PURE__ */ _("div", {
489
+ children: /* @__PURE__ */ v("div", {
489
490
  className: "mx-auto max-w-3xl",
490
- children: /* @__PURE__ */ _(re, {
491
- dashboardId: I.id,
492
- dashboardName: I.name,
493
- onClose: () => N(!1),
494
- onOpenBoard: _t
495
- }, I.id)
491
+ children: /* @__PURE__ */ v(re, {
492
+ dashboardId: M.id,
493
+ dashboardName: M.name,
494
+ masterName: ae(Y, _t),
495
+ onBoardChanged: J,
496
+ onClose: () => Qe(!1),
497
+ onOpenBoard: vt
498
+ }, M.id)
496
499
  })
497
500
  }),
498
- A && I && /* @__PURE__ */ _(l, { children: /* @__PURE__ */ _("div", {
501
+ Ye && M && /* @__PURE__ */ v(l, { children: /* @__PURE__ */ v("div", {
499
502
  className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
500
- children: /* @__PURE__ */ _("div", {
503
+ children: /* @__PURE__ */ v("div", {
501
504
  className: "mx-auto max-w-3xl",
502
- children: /* @__PURE__ */ _(Ce, {
503
- dashboardId: I.id,
504
- onClose: () => j(!1)
505
+ children: /* @__PURE__ */ v(we, {
506
+ dashboardId: M.id,
507
+ onClose: () => Xe(!1)
505
508
  })
506
509
  })
507
510
  }) }),
508
- F && !y && /* @__PURE__ */ _(le, {
509
- currentDashboardId: I.id,
510
- currentDashboardName: I.name,
511
+ k && !b && /* @__PURE__ */ v(ue, {
512
+ currentDashboardId: M.id,
513
+ currentDashboardName: M.name,
511
514
  basePath: `${u}/dashboards`
512
515
  }),
513
- /* @__PURE__ */ _("div", {
516
+ /* @__PURE__ */ v("div", {
514
517
  className: "flex-1 min-w-0 overflow-hidden",
515
- children: /* @__PURE__ */ _(oe, {
516
- dashboardId: I.id,
517
- pageId: B || I.pages?.[0]?.id,
518
- title: I.name,
519
- onPaste: yt,
520
- onSave: w && !y ? mt : void 0,
521
- isSaving: Ue,
522
- onReview: y ? void 0 : Dt,
523
- onExport: Ve && !y ? bt : void 0,
524
- onPublishTemplate: He && !y ? Ct : void 0,
525
- pages: X,
526
- activePageId: Q ?? void 0,
527
- onPageChange: Y,
528
- onPageAdd: kt,
529
- onPageRename: At,
530
- onPageDuplicate: jt,
531
- onPageDelete: Mt,
532
- onPagesReorder: Nt,
518
+ children: /* @__PURE__ */ v(se, {
519
+ dashboardId: M.id,
520
+ pageId: z || M.pages?.[0]?.id,
521
+ title: M.name,
522
+ onPaste: bt,
523
+ onSave: Ve && !b ? ht : void 0,
524
+ isSaving: We,
525
+ onReview: b ? void 0 : kt,
526
+ onExport: He && !b ? xt : void 0,
527
+ onPublishTemplate: Ue && !b ? wt : void 0,
528
+ pages: Z,
529
+ activePageId: $ ?? void 0,
530
+ onPageChange: X,
531
+ onPageAdd: jt,
532
+ onPageRename: Mt,
533
+ onPageDuplicate: Nt,
534
+ onPageDelete: Pt,
535
+ onPagesReorder: Ft,
533
536
  showPageTabs: !0
534
537
  })
535
538
  }),
536
- /* @__PURE__ */ _(de, {
537
- open: Et && !y,
538
- onClose: Ot,
539
- dashboardId: I.id,
540
- pages: X,
541
- canFix: w && !y
539
+ /* @__PURE__ */ v(fe, {
540
+ open: Dt && !b,
541
+ onClose: At,
542
+ dashboardId: M.id,
543
+ pages: Z,
544
+ canFix: Ve && !b
542
545
  }),
543
- /* @__PURE__ */ _(ce, {
544
- isOpen: We && !y,
545
- dashboardId: I.id,
546
- dashboardName: I.name,
547
- onClose: Tt
546
+ /* @__PURE__ */ v(le, {
547
+ isOpen: Ke && !b,
548
+ dashboardId: M.id,
549
+ dashboardName: M.name,
550
+ onClose: Et
548
551
  }),
549
- !y && /* @__PURE__ */ _(pe, {
550
- dashboardId: I.id,
551
- isOpen: P && !y,
552
- onClose: () => Ke(!1),
553
- widgets: Array.from(z.values()).map((e) => ({
552
+ !b && /* @__PURE__ */ v(me, {
553
+ dashboardId: M.id,
554
+ isOpen: O && !b,
555
+ onClose: () => $e(!1),
556
+ widgets: Array.from(R.values()).map((e) => ({
554
557
  id: e.id,
555
558
  title: e.title || e.type
556
559
  })),
557
- onSelectWidget: (e) => G(e)
560
+ onSelectWidget: (e) => W(e)
558
561
  }),
559
- /* @__PURE__ */ _(ue, {
560
- isOpen: xt && !y,
561
- dashboardId: I.id,
562
- dashboardName: I.name,
563
- dashboardDescription: I.description,
564
- onClose: wt
562
+ /* @__PURE__ */ v(de, {
563
+ isOpen: St && !b,
564
+ dashboardId: M.id,
565
+ dashboardName: M.name,
566
+ dashboardDescription: M.description,
567
+ onClose: Tt
565
568
  })
566
569
  ]
567
- })] }) : /* @__PURE__ */ _(Ae, {
570
+ })] }) : /* @__PURE__ */ v(Ae, {
568
571
  title: d("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
569
572
  description: d("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
570
573
  });
571
- }), Be = () => (u(), null), b = d(function() {
574
+ }), Be = () => (u(), null), x = d(function() {
572
575
  let { workspaceId: e } = r();
573
- return /* @__PURE__ */ _(c, {
576
+ return /* @__PURE__ */ v(c, {
574
577
  workspaceId: e,
575
- children: /* @__PURE__ */ _(y, {})
578
+ children: /* @__PURE__ */ v(b, {})
576
579
  });
577
580
  });
578
- export { y as DashboardViewPage, b as default };
581
+ export { b as DashboardViewPage, x as default };