@burdenoff/microfe-bigconsole 2026.1008.14 → 2026.1009.10

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