@burdenoff/microfe-bigconsole 2026.1103.11 → 2026.1104.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.
@@ -1,9 +1,10 @@
1
1
  import { useWidgetStore as e } from "../store/widgetStore.js";
2
2
  import { useDashboardStore as t } from "../store/dashboardStore.js";
3
3
  import "../store/index.js";
4
- import { useBigConsoleBasePath as n, useBigConsoleNavigate as r } from "../context/BigConsoleContext.js";
4
+ import { GetWidgetDocument as n } from "../../generated/wspace-operations.js";
5
+ import { useBigConsoleBasePath as r, useBigConsoleNavigate as i } from "../context/BigConsoleContext.js";
5
6
  import "../context/index.js";
6
- import { Section as i } from "../components/common/Section.js";
7
+ import { Section as a } from "../components/common/Section.js";
7
8
  import "../components/common/index.js";
8
9
  import ee from "../hooks/useWidgetOperations.js";
9
10
  import te from "../hooks/useDashboardOperations.js";
@@ -11,116 +12,124 @@ import ne from "../hooks/useActivePage.js";
11
12
  import re, { parseUrlToGlobalFilterValues as ie } from "../hooks/useFilterUrlSync.js";
12
13
  import ae from "../hooks/usePageOperations.js";
13
14
  import "../hooks/index.js";
14
- import { BIGCONSOLE_PERMISSIONS as a } from "../../constants/permissions.js";
15
+ import { BIGCONSOLE_PERMISSIONS as o } from "../../constants/permissions.js";
15
16
  import { loadBigConsoleSettings as oe } from "../hooks/useBigConsoleSettings.js";
16
17
  import { DashboardCanvas as se } from "../components/dashboard/DashboardCanvas.js";
17
- import { LiveCanvasToggle as ce } from "../components/dashboard/LiveCanvasToggle.js";
18
- import { ExportDashboardDialog as le } from "../components/dashboard/ExportDashboardDialog.js";
19
- import { DrilldownBreadcrumb as ue } from "../components/dashboard/DrilldownBreadcrumb.js";
20
- import { PublishToStoreDialog as de } from "../components/dashboard/PublishToStoreDialog.js";
18
+ import { LIVE_STRUCTURE_POLL_MS as ce, isLiveDataRefreshDue as le } from "../utils/liveBoardRefresh.js";
19
+ import { LiveCanvasToggle as ue } from "../components/dashboard/LiveCanvasToggle.js";
20
+ import { ExportDashboardDialog as de } from "../components/dashboard/ExportDashboardDialog.js";
21
+ import { DrilldownBreadcrumb as fe } from "../components/dashboard/DrilldownBreadcrumb.js";
22
+ import { PublishToStoreDialog as pe } from "../components/dashboard/PublishToStoreDialog.js";
21
23
  import "../components/dashboard/index.js";
22
- import { dashboardPageTabs as fe } from "../assistant/pageControls.js";
23
- import { memo as o, useCallback as s, useEffect as c, useMemo as l, useRef as pe, useState as u } from "react";
24
- import { useLocation as me, useParams as he } from "react-router";
25
- import { AccessDenied as ge } from "@burdenoff/fe-libs/shared/components";
26
- import { usePermissions as _e } from "@burdenoff/fe-libs/shared/providers/shell";
27
- import { ArrowLeft as ve } from "lucide-react";
28
- import { Button as d, IllustratedEmptyState as ye } from "@burdenoff/fe-libs/ui";
29
- import { useI18n as be } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
30
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
31
- import { useAssistantPageControls as xe } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
24
+ import { dashboardPageTabs as me } from "../assistant/pageControls.js";
25
+ import { memo as s, useCallback as c, useEffect as l, useMemo as u, useRef as he, useState as d } from "react";
26
+ import { useLocation as ge, useParams as _e } from "react-router";
27
+ import { AccessDenied as ve } from "@burdenoff/fe-libs/shared/components";
28
+ import { usePermissions as ye } from "@burdenoff/fe-libs/shared/providers/shell";
29
+ import { ArrowLeft as be } from "lucide-react";
30
+ import { Button as f, IllustratedEmptyState as xe } from "@burdenoff/fe-libs/ui";
31
+ import { useI18n as Se } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
32
+ import { useApolloClient as Ce } from "@apollo/client/react";
33
+ import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
34
+ import { useAssistantPageControls as we } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
32
35
  //#region src/bigconsole/pages/DashboardViewPage.tsx
33
- var h = o(function() {
34
- let { dashboardId: o } = he(), h = r(), Se = n(), { t: g } = be(), { hasPermission: _, isLoading: v } = _e(), y = _(a.DASHBOARD_READ), Ce = _(a.DASHBOARD_UPDATE), we = _(a.DASHBOARD_EXPORT), Te = _(a.DASHBOARD_PUBLISH), [Ee, b] = u(!1), [x, S] = u(!1), [De, C] = u(!1), [w, Oe] = u(!1), { isInDrilldown: T, getContextFromUrl: E, getDrilldownMetadata: D } = re(), O = t((e) => e.currentDashboard), k = t((e) => e.setCurrentDashboard), A = t((e) => e.setGlobalFilterValue), j = t((e) => e.clearAllGlobalFilters), M = t((e) => e.setGlobalFilterValues), N = e((e) => e.widgets), ke = me(), { activePageId: P, setActivePage: F } = ne(O?.id === o ? O?.pages : void 0), I = e((e) => e.clipboardWidgetId), L = e((e) => e.clipboardAction), R = e((e) => e.clearClipboard), z = e((e) => e.selectWidget), { loading: B, error: V, fetchDashboard: H, updateDashboard: U } = te(), { createWidget: W, deleteWidget: G, duplicateWidget: K, batchUpdatePositions: q, refetch: Ae } = ee(P || void 0, o), { createPage: J, updatePage: je, deletePage: Me, reorderPages: Ne } = ae();
35
- c(() => {
36
- if (!o) {
37
- h("/dashboards");
36
+ var g = s(function() {
37
+ let { dashboardId: s } = _e(), g = i(), Te = r(), { t: _ } = Se(), v = Ce(), { hasPermission: y, isLoading: b } = ye(), x = y(o.DASHBOARD_READ), Ee = y(o.DASHBOARD_UPDATE), De = y(o.DASHBOARD_EXPORT), Oe = y(o.DASHBOARD_PUBLISH), [ke, S] = d(!1), [C, w] = d(!1), [Ae, T] = d(!1), [E, je] = d(!1), { isInDrilldown: D, getContextFromUrl: O, getDrilldownMetadata: k } = re(), A = t((e) => e.currentDashboard), j = t((e) => e.setCurrentDashboard), M = t((e) => e.setGlobalFilterValue), N = t((e) => e.clearAllGlobalFilters), P = t((e) => e.setGlobalFilterValues), F = e((e) => e.widgets), Me = ge(), { activePageId: I, setActivePage: L } = ne(A?.id === s ? A?.pages : void 0), R = e((e) => e.clipboardWidgetId), z = e((e) => e.clipboardAction), B = e((e) => e.clearClipboard), V = e((e) => e.selectWidget), { loading: H, error: U, fetchDashboard: W, updateDashboard: G } = te(), { createWidget: K, deleteWidget: q, duplicateWidget: Ne, batchUpdatePositions: Pe, refetch: Fe } = ee(I || void 0, s), { createPage: J, updatePage: Ie, deletePage: Le, reorderPages: Re } = ae();
38
+ l(() => {
39
+ if (!s) {
40
+ g("/dashboards");
38
41
  return;
39
42
  }
40
- return M(ie(window.location.search, "filter_")), S(!1), H(o).then((e) => {
41
- e || S(!0);
43
+ return P(ie(window.location.search, "filter_")), w(!1), W(s).then((e) => {
44
+ e || w(!0);
42
45
  }), () => {
43
- k(null), j(), S(!1);
46
+ j(null), N(), w(!1);
44
47
  };
45
48
  }, [
46
- o,
47
- h,
48
- H,
49
- k,
49
+ s,
50
+ g,
51
+ W,
50
52
  j,
51
- M
52
- ]), c(() => {
53
- if (!T) return;
54
- let e = E(), t = D();
53
+ N,
54
+ P
55
+ ]), l(() => {
56
+ if (!D) return;
57
+ let e = O(), t = k();
55
58
  Object.entries(e).forEach(([e, t]) => {
56
- A(`ctx_${e}`, t);
57
- }), t.depth > 0 && (A("__drilldown_depth", t.depth), A("__drilldown_parent", t.parent), A("__drilldown_path", t.path)), Object.keys(e).length > 0 && console.debug("[DashboardViewPage] Loaded drilldown context:", {
59
+ M(`ctx_${e}`, t);
60
+ }), t.depth > 0 && (M("__drilldown_depth", t.depth), M("__drilldown_parent", t.parent), M("__drilldown_path", t.path)), Object.keys(e).length > 0 && console.debug("[DashboardViewPage] Loaded drilldown context:", {
58
61
  context: e,
59
62
  metadata: t
60
63
  });
61
64
  }, [
62
- T,
63
- E,
64
65
  D,
65
- A,
66
- ke.search
66
+ O,
67
+ k,
68
+ M,
69
+ Me.search
67
70
  ]);
68
- let Pe = pe(Ae);
69
- Pe.current = Ae, c(() => {
70
- if (!w || !o) return;
71
- let e = () => {
72
- typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode !== "edit" && (H(o, { silent: !0 }), Pe.current());
71
+ let ze = he(Fe);
72
+ ze.current = Fe, l(() => {
73
+ if (!E || !s) return;
74
+ let e = null, r = () => {
75
+ if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
76
+ W(s, { silent: !0 }), ze.current();
77
+ let r = Date.now();
78
+ le(e, r) && (e = r, v.refetchQueries({ include: [n] }).catch((e) => {
79
+ console.warn("[DashboardViewPage] Live widget data refresh failed", e);
80
+ }));
73
81
  };
74
- e();
75
- let n = window.setInterval(e, 3500), r = () => {
76
- document.visibilityState === "visible" && e();
82
+ r();
83
+ let i = window.setInterval(r, ce), a = () => {
84
+ document.visibilityState === "visible" && (e = null, r());
77
85
  };
78
- return document.addEventListener("visibilitychange", r), () => {
79
- window.clearInterval(n), document.removeEventListener("visibilitychange", r);
86
+ return document.addEventListener("visibilitychange", a), () => {
87
+ window.clearInterval(i), document.removeEventListener("visibilitychange", a);
80
88
  };
81
89
  }, [
82
- w,
83
- o,
84
- H
90
+ E,
91
+ s,
92
+ W,
93
+ v
85
94
  ]);
86
- let Fe = s(async () => {
87
- if (o) {
88
- b(!0);
95
+ let Be = c(async () => {
96
+ if (s) {
97
+ S(!0);
89
98
  try {
90
- let e = Array.from(N.values());
99
+ let e = Array.from(F.values());
91
100
  if (e.length > 0) {
92
101
  let t = e.map((e) => ({
93
102
  id: e.id,
94
103
  position: e.position
95
104
  }));
96
- await q(t);
105
+ await Pe(t);
97
106
  }
98
- O && await U({
99
- id: o,
100
- name: O.name,
101
- description: O.description
107
+ A && await G({
108
+ id: s,
109
+ name: A.name,
110
+ description: A.description
102
111
  });
103
112
  } catch {} finally {
104
- b(!1);
113
+ S(!1);
105
114
  }
106
115
  }
107
116
  }, [
108
- o,
109
- N,
110
- O,
111
- q,
112
- U
113
- ]), Ie = s(() => {
114
- h("/dashboards");
115
- }, [h]), Y = s((e) => {
116
- F(e);
117
- }, [F]), X = l(() => (O?.pages || []).map((e, t) => ({
117
+ s,
118
+ F,
119
+ A,
120
+ Pe,
121
+ G
122
+ ]), Ve = c(() => {
123
+ g("/dashboards");
124
+ }, [g]), Y = c((e) => {
125
+ L(e);
126
+ }, [L]), X = u(() => (A?.pages || []).map((e, t) => ({
118
127
  id: e.id,
119
- name: e.name || g("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
128
+ name: e.name || _("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
120
129
  order: e.order ?? 0
121
- })), [O?.pages, g]), Z = O && O.id === o ? O.name : null, Q = P || O?.pages?.[0]?.id || null;
122
- xe(l(() => !v && y && !V && !x && !B && Z !== null ? fe({
123
- dashboardName: Z || g("bigconsole.dashboards.title", "Dashboards"),
130
+ })), [A?.pages, _]), Z = A && A.id === s ? A.name : null, Q = I || A?.pages?.[0]?.id || null;
131
+ we(u(() => !b && x && !U && !C && !H && Z !== null ? me({
132
+ dashboardName: Z || _("bigconsole.dashboards.title", "Dashboards"),
124
133
  tabs: X.map((e) => ({
125
134
  id: e.id,
126
135
  label: e.name
@@ -128,40 +137,40 @@ var h = o(function() {
128
137
  current: Q,
129
138
  select: Y
130
139
  }) : null, [
131
- v,
132
- y,
133
- V,
140
+ b,
134
141
  x,
135
- B,
142
+ U,
143
+ C,
144
+ H,
136
145
  Z,
137
146
  X,
138
147
  Q,
139
148
  Y,
140
- g
149
+ _
141
150
  ]));
142
- let Le = s(async () => {
143
- let e = P || O?.pages?.[0]?.id;
144
- if (!I || !o || !e) return;
145
- let t = N.get(I);
151
+ let He = c(async () => {
152
+ let e = I || A?.pages?.[0]?.id;
153
+ if (!R || !s || !e) return;
154
+ let t = F.get(R);
146
155
  if (!t) {
147
- R();
156
+ B();
148
157
  return;
149
158
  }
150
159
  let n = {
151
160
  x: 0,
152
- y: Array.from(N.values()).reduce((e, t) => {
161
+ y: Array.from(F.values()).reduce((e, t) => {
153
162
  let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
154
163
  return Math.max(e, n);
155
164
  }, 0),
156
- width: Math.min(t.positionWidth ?? 4, O?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
165
+ width: Math.min(t.positionWidth ?? 4, A?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
157
166
  height: t.positionHeight ?? 4
158
- }, r = L === "copy" ? g("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
167
+ }, r = z === "copy" ? _("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
159
168
  try {
160
- i = await K(I, n, r);
169
+ i = await Ne(R, n, r);
161
170
  } catch {}
162
- i ||= await W({
171
+ i ||= await K({
163
172
  pageId: e,
164
- dashboardId: o,
173
+ dashboardId: s,
165
174
  type: t.type,
166
175
  title: r,
167
176
  description: t.description,
@@ -173,252 +182,252 @@ var h = o(function() {
173
182
  position: n,
174
183
  refreshInterval: t.refreshInterval ?? void 0,
175
184
  metadata: t.metadata
176
- }), i && (z(i.id), L === "cut" && await G(I)), R();
185
+ }), i && (V(i.id), z === "cut" && await q(R)), B();
177
186
  }, [
187
+ R,
188
+ z,
189
+ s,
178
190
  I,
179
- L,
180
- o,
181
- P,
182
- O,
183
- N,
191
+ A,
192
+ F,
193
+ Ne,
184
194
  K,
185
- W,
186
- G,
187
- z,
188
- R,
189
- g
190
- ]), Re = s(() => {
191
- C(!0);
192
- }, []), [ze, $] = u(!1), Be = s(() => {
195
+ q,
196
+ V,
197
+ B,
198
+ _
199
+ ]), Ue = c(() => {
200
+ T(!0);
201
+ }, []), [We, $] = d(!1), Ge = c(() => {
193
202
  $(!0);
194
- }, []), Ve = s(() => {
203
+ }, []), Ke = c(() => {
195
204
  $(!1);
196
- }, []), He = s(() => {
197
- C(!1);
198
- }, []), Ue = s(async () => {
199
- if (!O || !o) return;
200
- let e = (O.pages?.length || 0) + 1, t = g("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await J({
201
- dashboardId: o,
205
+ }, []), qe = c(() => {
206
+ T(!1);
207
+ }, []), Je = c(async () => {
208
+ if (!A || !s) return;
209
+ let e = (A.pages?.length || 0) + 1, t = _("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await J({
210
+ dashboardId: s,
202
211
  name: t,
203
212
  gridColumns: oe().defaultGridColumns
204
213
  });
205
- n && (k({
206
- ...O,
207
- pages: [...O.pages || [], n]
208
- }), F(n.id));
214
+ n && (j({
215
+ ...A,
216
+ pages: [...A.pages || [], n]
217
+ }), L(n.id));
209
218
  }, [
210
- O,
211
- o,
212
- k,
219
+ A,
220
+ s,
221
+ j,
213
222
  J,
214
- F,
215
- g
216
- ]), We = s(async (e, t) => {
217
- O && await je({
223
+ L,
224
+ _
225
+ ]), Ye = c(async (e, t) => {
226
+ A && await Ie({
218
227
  id: e,
219
228
  name: t
220
- }) && k({
221
- ...O,
222
- pages: O.pages?.map((n) => n.id === e ? {
229
+ }) && j({
230
+ ...A,
231
+ pages: A.pages?.map((n) => n.id === e ? {
223
232
  ...n,
224
233
  name: t
225
234
  } : n)
226
235
  });
227
236
  }, [
228
- O,
229
- k,
230
- je
231
- ]), Ge = s(async (e) => {
232
- if (!O || !o) return;
233
- let t = O.pages?.find((t) => t.id === e);
237
+ A,
238
+ j,
239
+ Ie
240
+ ]), Xe = c(async (e) => {
241
+ if (!A || !s) return;
242
+ let t = A.pages?.find((t) => t.id === e);
234
243
  if (!t) return;
235
244
  let n = await J({
236
- dashboardId: o,
245
+ dashboardId: s,
237
246
  gridColumns: t.gridColumns,
238
- name: g("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" })
247
+ name: _("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" })
239
248
  });
240
- n && (k({
241
- ...O,
242
- pages: [...O.pages || [], n]
243
- }), F(n.id));
249
+ n && (j({
250
+ ...A,
251
+ pages: [...A.pages || [], n]
252
+ }), L(n.id));
244
253
  }, [
245
- O,
246
- o,
247
- k,
254
+ A,
255
+ s,
256
+ j,
248
257
  J,
249
- F,
250
- g
251
- ]), Ke = s(async (e) => {
252
- if (!(!O || (O.pages?.length || 0) <= 1) && await Me(e)) {
253
- let t = O.pages?.filter((t) => t.id !== e).map((e, t) => ({
258
+ L,
259
+ _
260
+ ]), Ze = c(async (e) => {
261
+ if (!(!A || (A.pages?.length || 0) <= 1) && await Le(e)) {
262
+ let t = A.pages?.filter((t) => t.id !== e).map((e, t) => ({
254
263
  ...e,
255
264
  order: t
256
265
  }));
257
- k({
258
- ...O,
266
+ j({
267
+ ...A,
259
268
  pages: t
260
269
  });
261
270
  let n = t?.[0]?.id;
262
- P === e && n && F(n, { replace: !0 });
271
+ I === e && n && L(n, { replace: !0 });
263
272
  }
264
273
  }, [
265
- O,
266
- k,
267
- P,
268
- Me,
269
- F
270
- ]), qe = s(async (e) => {
271
- if (!O || !o) return;
272
- k({
273
- ...O,
274
+ A,
275
+ j,
276
+ I,
277
+ Le,
278
+ L
279
+ ]), Qe = c(async (e) => {
280
+ if (!A || !s) return;
281
+ j({
282
+ ...A,
274
283
  pages: e.map((e, t) => ({
275
284
  ...e,
276
285
  order: t
277
286
  }))
278
287
  });
279
288
  let t = e.map((e) => e.id);
280
- await Ne(o, t);
289
+ await Re(s, t);
281
290
  }, [
282
- O,
283
- o,
284
- k,
285
- Ne
291
+ A,
292
+ s,
293
+ j,
294
+ Re
286
295
  ]);
287
- return v ? /* @__PURE__ */ p("div", {
296
+ return b ? /* @__PURE__ */ m("div", {
288
297
  className: "flex items-center justify-center h-full",
289
- children: /* @__PURE__ */ p("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
290
- }) : y ? V ? /* @__PURE__ */ p("div", {
298
+ children: /* @__PURE__ */ m("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
299
+ }) : x ? U ? /* @__PURE__ */ m("div", {
291
300
  className: "flex h-full flex-col items-center justify-center",
292
301
  style: { padding: "var(--space-pagePadding)" },
293
- children: /* @__PURE__ */ p(i, {
302
+ children: /* @__PURE__ */ m(a, {
294
303
  headingLevel: 2,
295
304
  tone: "danger",
296
- title: g("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
297
- description: /* @__PURE__ */ p("span", {
305
+ title: _("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
306
+ description: /* @__PURE__ */ m("span", {
298
307
  className: "break-words",
299
- children: V.message
308
+ children: U.message
300
309
  }),
301
310
  className: "w-full max-w-md",
302
311
  "data-testid": "dashboard-view-error",
303
- actions: /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, {
312
+ actions: /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(f, {
304
313
  size: "sm",
305
- onClick: () => H(o),
306
- children: g("bigconsole.dashboards.view.retry", "Retry")
307
- }), /* @__PURE__ */ p(d, {
314
+ onClick: () => W(s),
315
+ children: _("bigconsole.dashboards.view.retry", "Retry")
316
+ }), /* @__PURE__ */ m(f, {
308
317
  size: "sm",
309
318
  variant: "outline",
310
- onClick: () => h("/dashboards"),
311
- children: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
319
+ onClick: () => g("/dashboards"),
320
+ children: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
312
321
  })] })
313
322
  })
314
- }) : x ? /* @__PURE__ */ p("div", {
323
+ }) : C ? /* @__PURE__ */ m("div", {
315
324
  className: "flex flex-col items-center justify-center h-full",
316
325
  style: { padding: "var(--space-pagePadding)" },
317
- children: /* @__PURE__ */ p(ye, {
326
+ children: /* @__PURE__ */ m(xe, {
318
327
  illustration: "empty-data",
319
- title: g("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
320
- description: /* @__PURE__ */ m(f, { children: [g("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ p("span", {
328
+ title: _("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
329
+ description: /* @__PURE__ */ h(p, { children: [_("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ m("span", {
321
330
  className: "mt-2 block font-mono text-xs text-text-muted break-all",
322
- children: g("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: o ?? "" })
331
+ children: _("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: s ?? "" })
323
332
  })] }),
324
- action: /* @__PURE__ */ p(d, {
325
- onClick: () => h("/dashboards"),
326
- children: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
333
+ action: /* @__PURE__ */ m(f, {
334
+ onClick: () => g("/dashboards"),
335
+ children: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
327
336
  })
328
337
  })
329
- }) : B || !O ? /* @__PURE__ */ p("div", {
338
+ }) : H || !A ? /* @__PURE__ */ m("div", {
330
339
  className: "flex items-center justify-center h-full",
331
340
  role: "status",
332
341
  "aria-live": "polite",
333
- children: /* @__PURE__ */ m("div", {
342
+ children: /* @__PURE__ */ h("div", {
334
343
  className: "flex flex-col items-center gap-4",
335
- children: [/* @__PURE__ */ p("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ p("p", {
344
+ children: [/* @__PURE__ */ m("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ m("p", {
336
345
  className: "text-sm text-text-secondary",
337
- children: g("bigconsole.dashboards.view.loading", "Loading dashboard...")
346
+ children: _("bigconsole.dashboards.view.loading", "Loading dashboard...")
338
347
  })]
339
348
  })
340
- }) : /* @__PURE__ */ m("div", {
349
+ }) : /* @__PURE__ */ h("div", {
341
350
  className: "h-full flex flex-col overflow-hidden",
342
351
  children: [
343
- /* @__PURE__ */ p(i, {
352
+ /* @__PURE__ */ m(a, {
344
353
  emphasis: "bare",
345
354
  padding: "none",
346
355
  "data-testid": "dashboard-route-header",
347
356
  "aria-label": "Dashboard",
348
357
  className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
349
358
  headerClassName: "",
350
- header: /* @__PURE__ */ m("div", {
359
+ header: /* @__PURE__ */ h("div", {
351
360
  className: "flex flex-wrap items-center gap-control-gap",
352
361
  children: [
353
- /* @__PURE__ */ m(d, {
354
- onClick: Ie,
362
+ /* @__PURE__ */ h(f, {
363
+ onClick: Ve,
355
364
  variant: "ghost",
356
365
  size: "sm",
357
- title: g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
358
- "aria-label": g("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
366
+ title: _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
367
+ "aria-label": _("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
359
368
  className: "flex-shrink-0",
360
- children: [/* @__PURE__ */ p(ve, { className: "w-4 h-4 mr-2" }), g("bigconsole.dashboards.view.back", "Back")]
369
+ children: [/* @__PURE__ */ m(be, { className: "w-4 h-4 mr-2" }), _("bigconsole.dashboards.view.back", "Back")]
361
370
  }),
362
- /* @__PURE__ */ p("h1", {
371
+ /* @__PURE__ */ m("h1", {
363
372
  className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
364
- title: O.name,
365
- children: O.name
373
+ title: A.name,
374
+ children: A.name
366
375
  }),
367
- /* @__PURE__ */ p("div", {
376
+ /* @__PURE__ */ m("div", {
368
377
  className: "flex-shrink-0",
369
- children: /* @__PURE__ */ p(ce, {
370
- isLive: w,
371
- onToggle: () => Oe((e) => !e)
378
+ children: /* @__PURE__ */ m(ue, {
379
+ isLive: E,
380
+ onToggle: () => je((e) => !e)
372
381
  })
373
382
  })
374
383
  ]
375
384
  })
376
385
  }),
377
- T && /* @__PURE__ */ p(ue, {
378
- currentDashboardId: O.id,
379
- currentDashboardName: O.name,
380
- basePath: `${Se}/dashboards`
386
+ D && /* @__PURE__ */ m(fe, {
387
+ currentDashboardId: A.id,
388
+ currentDashboardName: A.name,
389
+ basePath: `${Te}/dashboards`
381
390
  }),
382
- /* @__PURE__ */ p("div", {
391
+ /* @__PURE__ */ m("div", {
383
392
  className: "flex-1 min-w-0 overflow-hidden",
384
- children: /* @__PURE__ */ p(se, {
385
- dashboardId: O.id,
386
- pageId: P || O.pages?.[0]?.id,
387
- title: O.name,
388
- onPaste: Le,
389
- onSave: Ce ? Fe : void 0,
390
- isSaving: Ee,
391
- onExport: we ? Re : void 0,
392
- onPublishTemplate: Te ? Be : void 0,
393
+ children: /* @__PURE__ */ m(se, {
394
+ dashboardId: A.id,
395
+ pageId: I || A.pages?.[0]?.id,
396
+ title: A.name,
397
+ onPaste: He,
398
+ onSave: Ee ? Be : void 0,
399
+ isSaving: ke,
400
+ onExport: De ? Ue : void 0,
401
+ onPublishTemplate: Oe ? Ge : void 0,
393
402
  pages: X,
394
403
  activePageId: Q ?? void 0,
395
404
  onPageChange: Y,
396
- onPageAdd: Ue,
397
- onPageRename: We,
398
- onPageDuplicate: Ge,
399
- onPageDelete: Ke,
400
- onPagesReorder: qe,
405
+ onPageAdd: Je,
406
+ onPageRename: Ye,
407
+ onPageDuplicate: Xe,
408
+ onPageDelete: Ze,
409
+ onPagesReorder: Qe,
401
410
  showPageTabs: !0
402
411
  })
403
412
  }),
404
- /* @__PURE__ */ p(le, {
405
- isOpen: De,
406
- dashboardId: O.id,
407
- dashboardName: O.name,
408
- onClose: He
413
+ /* @__PURE__ */ m(de, {
414
+ isOpen: Ae,
415
+ dashboardId: A.id,
416
+ dashboardName: A.name,
417
+ onClose: qe
409
418
  }),
410
- /* @__PURE__ */ p(de, {
411
- isOpen: ze,
412
- dashboardId: O.id,
413
- dashboardName: O.name,
414
- dashboardDescription: O.description,
415
- onClose: Ve
419
+ /* @__PURE__ */ m(pe, {
420
+ isOpen: We,
421
+ dashboardId: A.id,
422
+ dashboardName: A.name,
423
+ dashboardDescription: A.description,
424
+ onClose: Ke
416
425
  })
417
426
  ]
418
- }) : /* @__PURE__ */ p(ge, {
419
- title: g("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
420
- description: g("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
427
+ }) : /* @__PURE__ */ m(ve, {
428
+ title: _("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
429
+ description: _("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
421
430
  });
422
431
  });
423
432
  //#endregion
424
- export { h as DashboardViewPage, h as default };
433
+ export { g as DashboardViewPage, g as default };