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