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