@burdenoff/microfe-bigconsole 2026.805.1 → 2026.805.3

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