@burdenoff/microfe-bigconsole 2026.1011.10 → 2026.1012.1

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