@burdenoff/microfe-bigconsole 2026.1004.3 → 2026.1004.4
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.
- package/dist/bigconsole/BigConsoleRoutes.d.ts +1 -1
- package/dist/bigconsole/BigConsoleRoutes.d.ts.map +1 -1
- package/dist/bigconsole/BigConsoleRoutes.js +15 -1
- package/dist/bigconsole/BigConsoleRoutes.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +54 -53
- package/dist/bigconsole/components/DrilldownModal.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts +3 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.d.ts.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +40 -39
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +184 -177
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardGrid.js +40 -22
- package/dist/bigconsole/components/dashboard/DashboardGrid.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js +31 -25
- package/dist/bigconsole/components/dashboard/ExportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +115 -80
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +177 -146
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.d.ts.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +375 -325
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +7 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts +3 -1
- package/dist/bigconsole/components/parser/ParserSelector.d.ts.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +94 -94
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.d.ts.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineCard.js +111 -89
- package/dist/bigconsole/components/pipeline/PipelineCard.js.map +1 -1
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts +8 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.d.ts.map +1 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js +52 -0
- package/dist/bigconsole/components/pipeline/PipelineScopePicker.js.map +1 -0
- package/dist/bigconsole/components/widgets/PropertiesPanel.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +257 -221
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts +1 -0
- package/dist/bigconsole/components/widgets/WidgetHeader.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetHeader.js +29 -29
- package/dist/bigconsole/components/widgets/WidgetHeader.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts +2 -0
- package/dist/bigconsole/components/widgets/WidgetWrapper.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +247 -239
- package/dist/bigconsole/components/widgets/WidgetWrapper.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js +6 -4
- package/dist/bigconsole/components/widgets/metric-card/MetricCardWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts +1 -0
- package/dist/bigconsole/components/widgets/states/EmptyState.d.ts.map +1 -1
- package/dist/bigconsole/components/widgets/states/EmptyState.js +4 -4
- package/dist/bigconsole/components/widgets/states/EmptyState.js.map +1 -1
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js +94 -0
- package/dist/bigconsole/components/workflow/WorkflowDesignPreview.js.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts +7 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.d.ts.map +1 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js +101 -0
- package/dist/bigconsole/components/workflow/WorkflowSinkLinkForm.js.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts +16 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js +57 -0
- package/dist/bigconsole/hooks/useBigConsoleSettings.js.map +1 -0
- package/dist/bigconsole/hooks/useDashboardOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useDashboardOperations.js +102 -79
- package/dist/bigconsole/hooks/useDashboardOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts +3 -1
- package/dist/bigconsole/hooks/useExportDashboard.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useExportDashboard.js +23 -13
- package/dist/bigconsole/hooks/useExportDashboard.js.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts +18 -0
- package/dist/bigconsole/hooks/useFilterUrlSync.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useFilterUrlSync.js +87 -57
- package/dist/bigconsole/hooks/useFilterUrlSync.js.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.d.ts.map +1 -1
- package/dist/bigconsole/hooks/useGlobalFilters.js +39 -29
- package/dist/bigconsole/hooks/useGlobalFilters.js.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePageOperations.js +1 -0
- package/dist/bigconsole/hooks/usePageOperations.js.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.d.ts.map +1 -1
- package/dist/bigconsole/hooks/usePipelineOperations.js +114 -112
- package/dist/bigconsole/hooks/usePipelineOperations.js.map +1 -1
- package/dist/bigconsole/hooks/useShareRecipients.d.ts +22 -0
- package/dist/bigconsole/hooks/useShareRecipients.d.ts.map +1 -0
- package/dist/bigconsole/hooks/useShareRecipients.js +198 -0
- package/dist/bigconsole/hooks/useShareRecipients.js.map +1 -0
- package/dist/bigconsole/pages/DashboardBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +198 -193
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +171 -167
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +313 -266
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +84 -79
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +267 -257
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +465 -402
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +169 -157
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +370 -230
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +181 -151
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +188 -208
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +134 -117
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +315 -267
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.d.ts.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +4 -3
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/types/index.d.ts +4 -0
- package/dist/bigconsole/types/index.d.ts.map +1 -1
- package/dist/generated/wspace-operations.d.ts +148 -0
- package/dist/generated/wspace-operations.d.ts.map +1 -1
- package/dist/generated/wspace-operations.js +172 -133
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +21 -0
- package/dist/generated/wspace-types.d.ts.map +1 -1
- package/dist/generated/wspace-types.js.map +1 -1
- package/dist/microfe-bigconsole.css +1 -1
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -8,62 +8,64 @@ import "../components/common/index.js";
|
|
|
8
8
|
import i from "../hooks/useWidgetOperations.js";
|
|
9
9
|
import ee from "../hooks/useDashboardOperations.js";
|
|
10
10
|
import te from "../hooks/useActivePage.js";
|
|
11
|
-
import ne from "../hooks/useFilterUrlSync.js";
|
|
12
|
-
import
|
|
11
|
+
import ne, { parseUrlToGlobalFilterValues as re } from "../hooks/useFilterUrlSync.js";
|
|
12
|
+
import a from "../hooks/usePageOperations.js";
|
|
13
13
|
import "../hooks/index.js";
|
|
14
|
-
import { BIGCONSOLE_PERMISSIONS as
|
|
15
|
-
import ie from "../
|
|
16
|
-
import ae from "../components/dashboard/
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
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";
|
|
20
21
|
import "../components/dashboard/index.js";
|
|
21
|
-
import { memo as s, useCallback as c, useEffect as l, useRef as
|
|
22
|
-
import { useLocation as
|
|
23
|
-
import { AccessDenied as
|
|
24
|
-
import { usePermissions as
|
|
25
|
-
import { ArrowLeft as
|
|
26
|
-
import { Button as
|
|
27
|
-
import { Fragment as
|
|
28
|
-
import { useI18n as
|
|
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 { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
29
|
+
import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
29
30
|
//#region src/bigconsole/pages/DashboardViewPage.tsx
|
|
30
|
-
var
|
|
31
|
-
let { dashboardId: s } =
|
|
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();
|
|
32
33
|
l(() => {
|
|
33
34
|
if (!s) {
|
|
34
|
-
|
|
35
|
+
v("/dashboards");
|
|
35
36
|
return;
|
|
36
37
|
}
|
|
37
|
-
return M(),
|
|
38
|
-
e ||
|
|
38
|
+
return M(re(window.location.search, "filter_")), S(!1), V(s).then((e) => {
|
|
39
|
+
e || S(!0);
|
|
39
40
|
}), () => {
|
|
40
|
-
|
|
41
|
+
k(null), j(), S(!1);
|
|
41
42
|
};
|
|
42
43
|
}, [
|
|
43
44
|
s,
|
|
44
|
-
|
|
45
|
+
v,
|
|
45
46
|
V,
|
|
46
|
-
|
|
47
|
+
k,
|
|
48
|
+
j,
|
|
47
49
|
M
|
|
48
50
|
]), l(() => {
|
|
49
|
-
if (!
|
|
50
|
-
let e =
|
|
51
|
+
if (!T) return;
|
|
52
|
+
let e = E(), t = D();
|
|
51
53
|
Object.entries(e).forEach(([e, t]) => {
|
|
52
|
-
|
|
53
|
-
}), t.depth > 0 && (
|
|
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:", {
|
|
54
56
|
context: e,
|
|
55
57
|
metadata: t
|
|
56
58
|
});
|
|
57
59
|
}, [
|
|
60
|
+
T,
|
|
58
61
|
E,
|
|
59
62
|
D,
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
xe.search
|
|
63
|
+
A,
|
|
64
|
+
we.search
|
|
63
65
|
]);
|
|
64
|
-
let Q =
|
|
66
|
+
let Q = u(q);
|
|
65
67
|
Q.current = q, l(() => {
|
|
66
|
-
if (!
|
|
68
|
+
if (!w || !s) return;
|
|
67
69
|
let e = () => {
|
|
68
70
|
typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode !== "edit" && (V(s, { silent: !0 }), Q.current());
|
|
69
71
|
};
|
|
@@ -75,39 +77,39 @@ var y = s(function() {
|
|
|
75
77
|
window.clearInterval(n), document.removeEventListener("visibilitychange", r);
|
|
76
78
|
};
|
|
77
79
|
}, [
|
|
78
|
-
|
|
80
|
+
w,
|
|
79
81
|
s,
|
|
80
82
|
V
|
|
81
83
|
]);
|
|
82
|
-
let
|
|
84
|
+
let Ee = c(async () => {
|
|
83
85
|
if (s) {
|
|
84
|
-
|
|
86
|
+
x(!0);
|
|
85
87
|
try {
|
|
86
88
|
let e = Array.from(N.values());
|
|
87
89
|
e.length > 0 && await K(e.map((e) => ({
|
|
88
90
|
id: e.id,
|
|
89
91
|
position: e.position
|
|
90
|
-
}))),
|
|
92
|
+
}))), O && await H({
|
|
91
93
|
id: s,
|
|
92
|
-
name:
|
|
93
|
-
description:
|
|
94
|
+
name: O.name,
|
|
95
|
+
description: O.description
|
|
94
96
|
});
|
|
95
97
|
} catch {} finally {
|
|
96
|
-
|
|
98
|
+
x(!1);
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
}, [
|
|
100
102
|
s,
|
|
101
103
|
N,
|
|
102
|
-
|
|
104
|
+
O,
|
|
103
105
|
K,
|
|
104
106
|
H
|
|
105
|
-
]),
|
|
106
|
-
|
|
107
|
-
}, [
|
|
107
|
+
]), De = c(() => {
|
|
108
|
+
v("/dashboards");
|
|
109
|
+
}, [v]), Oe = c((e) => {
|
|
108
110
|
F(e);
|
|
109
|
-
}, [F]),
|
|
110
|
-
let e = P ||
|
|
111
|
+
}, [F]), ke = c(async () => {
|
|
112
|
+
let e = P || O?.pages?.[0]?.id;
|
|
111
113
|
if (!I || !s || !e) return;
|
|
112
114
|
let t = N.get(I);
|
|
113
115
|
if (!t) {
|
|
@@ -120,9 +122,9 @@ var y = s(function() {
|
|
|
120
122
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
121
123
|
return Math.max(e, n);
|
|
122
124
|
}, 0),
|
|
123
|
-
width: t.positionWidth ?? 4,
|
|
125
|
+
width: Math.min(t.positionWidth ?? 4, O?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
124
126
|
height: t.positionHeight ?? 4
|
|
125
|
-
}, r = L === "copy" ?
|
|
127
|
+
}, r = L === "copy" ? y("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, i = null;
|
|
126
128
|
try {
|
|
127
129
|
i = await G(I, n, r);
|
|
128
130
|
} catch {}
|
|
@@ -146,247 +148,249 @@ var y = s(function() {
|
|
|
146
148
|
L,
|
|
147
149
|
s,
|
|
148
150
|
P,
|
|
149
|
-
|
|
151
|
+
O,
|
|
150
152
|
N,
|
|
151
153
|
G,
|
|
152
154
|
U,
|
|
153
155
|
W,
|
|
154
156
|
z,
|
|
155
157
|
R,
|
|
156
|
-
|
|
157
|
-
]),
|
|
158
|
-
|
|
159
|
-
}, []), [
|
|
158
|
+
y
|
|
159
|
+
]), Ae = c(() => {
|
|
160
|
+
C(!0);
|
|
161
|
+
}, []), [je, $] = d(!1), Me = c(() => {
|
|
160
162
|
$(!0);
|
|
161
|
-
}, []),
|
|
163
|
+
}, []), Ne = c(() => {
|
|
162
164
|
$(!1);
|
|
163
|
-
}, []),
|
|
164
|
-
|
|
165
|
-
}, []),
|
|
166
|
-
if (!
|
|
165
|
+
}, []), Pe = c(() => {
|
|
166
|
+
C(!1);
|
|
167
|
+
}, []), Fe = c(async () => {
|
|
168
|
+
if (!O || !s) return;
|
|
167
169
|
let e = await J({
|
|
168
170
|
dashboardId: s,
|
|
169
|
-
name:
|
|
171
|
+
name: y("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: (O.pages?.length || 0) + 1 }),
|
|
172
|
+
gridColumns: ie().defaultGridColumns
|
|
170
173
|
});
|
|
171
|
-
e && (
|
|
172
|
-
...
|
|
173
|
-
pages: [...
|
|
174
|
+
e && (k({
|
|
175
|
+
...O,
|
|
176
|
+
pages: [...O.pages || [], e]
|
|
174
177
|
}), F(e.id));
|
|
175
178
|
}, [
|
|
176
|
-
|
|
179
|
+
O,
|
|
177
180
|
s,
|
|
178
|
-
|
|
181
|
+
k,
|
|
179
182
|
J,
|
|
180
183
|
F,
|
|
181
|
-
|
|
182
|
-
]),
|
|
183
|
-
|
|
184
|
+
y
|
|
185
|
+
]), Ie = c(async (e, t) => {
|
|
186
|
+
O && await Y({
|
|
184
187
|
id: e,
|
|
185
188
|
name: t
|
|
186
|
-
}) &&
|
|
187
|
-
...
|
|
188
|
-
pages:
|
|
189
|
+
}) && k({
|
|
190
|
+
...O,
|
|
191
|
+
pages: O.pages?.map((n) => n.id === e ? {
|
|
189
192
|
...n,
|
|
190
193
|
name: t
|
|
191
194
|
} : n)
|
|
192
195
|
});
|
|
193
196
|
}, [
|
|
197
|
+
O,
|
|
194
198
|
k,
|
|
195
|
-
A,
|
|
196
199
|
Y
|
|
197
|
-
]),
|
|
198
|
-
if (!
|
|
199
|
-
let t =
|
|
200
|
+
]), Le = c(async (e) => {
|
|
201
|
+
if (!O || !s) return;
|
|
202
|
+
let t = O.pages?.find((t) => t.id === e);
|
|
200
203
|
if (!t) return;
|
|
201
204
|
let n = await J({
|
|
202
205
|
dashboardId: s,
|
|
203
|
-
|
|
206
|
+
gridColumns: t.gridColumns,
|
|
207
|
+
name: y("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" })
|
|
204
208
|
});
|
|
205
|
-
n && (
|
|
206
|
-
...
|
|
207
|
-
pages: [...
|
|
209
|
+
n && (k({
|
|
210
|
+
...O,
|
|
211
|
+
pages: [...O.pages || [], n]
|
|
208
212
|
}), F(n.id));
|
|
209
213
|
}, [
|
|
210
|
-
|
|
214
|
+
O,
|
|
211
215
|
s,
|
|
212
|
-
|
|
216
|
+
k,
|
|
213
217
|
J,
|
|
214
218
|
F,
|
|
215
|
-
|
|
216
|
-
]),
|
|
217
|
-
if (!(!
|
|
218
|
-
let t =
|
|
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) => ({
|
|
219
223
|
...e,
|
|
220
224
|
order: t
|
|
221
225
|
}));
|
|
222
|
-
|
|
223
|
-
...
|
|
226
|
+
k({
|
|
227
|
+
...O,
|
|
224
228
|
pages: t
|
|
225
229
|
});
|
|
226
230
|
let n = t?.[0]?.id;
|
|
227
231
|
P === e && n && F(n, { replace: !0 });
|
|
228
232
|
}
|
|
229
233
|
}, [
|
|
234
|
+
O,
|
|
230
235
|
k,
|
|
231
|
-
A,
|
|
232
236
|
P,
|
|
233
237
|
X,
|
|
234
238
|
F
|
|
235
|
-
]),
|
|
236
|
-
!
|
|
237
|
-
...
|
|
239
|
+
]), ze = c(async (e) => {
|
|
240
|
+
!O || !s || (k({
|
|
241
|
+
...O,
|
|
238
242
|
pages: e.map((e, t) => ({
|
|
239
243
|
...e,
|
|
240
244
|
order: t
|
|
241
245
|
}))
|
|
242
246
|
}), await Z(s, e.map((e) => e.id)));
|
|
243
247
|
}, [
|
|
244
|
-
|
|
248
|
+
O,
|
|
245
249
|
s,
|
|
246
|
-
|
|
250
|
+
k,
|
|
247
251
|
Z
|
|
248
252
|
]);
|
|
249
|
-
return
|
|
253
|
+
return he ? /* @__PURE__ */ g("div", {
|
|
250
254
|
className: "flex items-center justify-center h-full",
|
|
251
|
-
children: /* @__PURE__ */
|
|
252
|
-
}) :
|
|
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", {
|
|
253
257
|
className: "flex h-full flex-col items-center justify-center",
|
|
254
258
|
style: { padding: "var(--space-pagePadding)" },
|
|
255
|
-
children: /* @__PURE__ */
|
|
259
|
+
children: /* @__PURE__ */ g(r, {
|
|
256
260
|
headingLevel: 2,
|
|
257
261
|
tone: "danger",
|
|
258
|
-
title:
|
|
259
|
-
description: /* @__PURE__ */
|
|
262
|
+
title: y("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
263
|
+
description: /* @__PURE__ */ g("span", {
|
|
260
264
|
className: "break-words",
|
|
261
265
|
children: B.message
|
|
262
266
|
}),
|
|
263
267
|
className: "w-full max-w-md",
|
|
264
268
|
"data-testid": "dashboard-view-error",
|
|
265
|
-
actions: /* @__PURE__ */
|
|
269
|
+
actions: /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(m, {
|
|
266
270
|
size: "sm",
|
|
267
271
|
onClick: () => V(s),
|
|
268
|
-
children:
|
|
269
|
-
}), /* @__PURE__ */
|
|
272
|
+
children: y("bigconsole.dashboards.view.retry", "Retry")
|
|
273
|
+
}), /* @__PURE__ */ g(m, {
|
|
270
274
|
size: "sm",
|
|
271
275
|
variant: "outline",
|
|
272
|
-
onClick: () =>
|
|
273
|
-
children:
|
|
276
|
+
onClick: () => v("/dashboards"),
|
|
277
|
+
children: y("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
274
278
|
})] })
|
|
275
279
|
})
|
|
276
|
-
}) :
|
|
280
|
+
}) : xe ? /* @__PURE__ */ g("div", {
|
|
277
281
|
className: "flex flex-col items-center justify-center h-full",
|
|
278
282
|
style: { padding: "var(--space-pagePadding)" },
|
|
279
|
-
children: /* @__PURE__ */
|
|
283
|
+
children: /* @__PURE__ */ g(pe, {
|
|
280
284
|
illustration: "empty-data",
|
|
281
|
-
title:
|
|
282
|
-
description: /* @__PURE__ */
|
|
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", {
|
|
283
287
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
284
|
-
children:
|
|
288
|
+
children: y("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: s ?? "" })
|
|
285
289
|
})] }),
|
|
286
|
-
action: /* @__PURE__ */
|
|
287
|
-
onClick: () =>
|
|
288
|
-
children:
|
|
290
|
+
action: /* @__PURE__ */ g(m, {
|
|
291
|
+
onClick: () => v("/dashboards"),
|
|
292
|
+
children: y("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
289
293
|
})
|
|
290
294
|
})
|
|
291
|
-
}) :
|
|
295
|
+
}) : Te || !O ? /* @__PURE__ */ g("div", {
|
|
292
296
|
className: "flex items-center justify-center h-full",
|
|
293
297
|
role: "status",
|
|
294
298
|
"aria-live": "polite",
|
|
295
|
-
children: /* @__PURE__ */
|
|
299
|
+
children: /* @__PURE__ */ _("div", {
|
|
296
300
|
className: "flex flex-col items-center gap-4",
|
|
297
|
-
children: [/* @__PURE__ */
|
|
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", {
|
|
298
302
|
className: "text-sm text-text-secondary",
|
|
299
|
-
children:
|
|
303
|
+
children: y("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
300
304
|
})]
|
|
301
305
|
})
|
|
302
|
-
}) : /* @__PURE__ */
|
|
306
|
+
}) : /* @__PURE__ */ _("div", {
|
|
303
307
|
className: "h-full flex flex-col overflow-hidden",
|
|
304
308
|
children: [
|
|
305
|
-
/* @__PURE__ */
|
|
309
|
+
/* @__PURE__ */ g(r, {
|
|
306
310
|
emphasis: "bare",
|
|
307
311
|
padding: "none",
|
|
308
312
|
"data-testid": "dashboard-route-header",
|
|
309
313
|
"aria-label": "Dashboard",
|
|
310
314
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
311
315
|
headerClassName: "",
|
|
312
|
-
header: /* @__PURE__ */
|
|
316
|
+
header: /* @__PURE__ */ _("div", {
|
|
313
317
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
314
318
|
children: [
|
|
315
|
-
/* @__PURE__ */
|
|
316
|
-
onClick:
|
|
319
|
+
/* @__PURE__ */ _(m, {
|
|
320
|
+
onClick: De,
|
|
317
321
|
variant: "ghost",
|
|
318
322
|
size: "sm",
|
|
319
|
-
title:
|
|
320
|
-
"aria-label":
|
|
323
|
+
title: y("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
324
|
+
"aria-label": y("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
321
325
|
className: "flex-shrink-0",
|
|
322
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: [/* @__PURE__ */ g(fe, { className: "w-4 h-4 mr-2" }), y("bigconsole.dashboards.view.back", "Back")]
|
|
323
327
|
}),
|
|
324
|
-
/* @__PURE__ */
|
|
328
|
+
/* @__PURE__ */ g("h1", {
|
|
325
329
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
326
|
-
title:
|
|
327
|
-
children:
|
|
330
|
+
title: O.name,
|
|
331
|
+
children: O.name
|
|
328
332
|
}),
|
|
329
|
-
/* @__PURE__ */
|
|
333
|
+
/* @__PURE__ */ g("div", {
|
|
330
334
|
className: "flex-shrink-0",
|
|
331
|
-
children: /* @__PURE__ */
|
|
332
|
-
isLive:
|
|
333
|
-
onToggle: () =>
|
|
335
|
+
children: /* @__PURE__ */ g(oe, {
|
|
336
|
+
isLive: w,
|
|
337
|
+
onToggle: () => Ce((e) => !e)
|
|
334
338
|
})
|
|
335
339
|
})
|
|
336
340
|
]
|
|
337
341
|
})
|
|
338
342
|
}),
|
|
339
|
-
|
|
340
|
-
currentDashboardId:
|
|
341
|
-
currentDashboardName:
|
|
343
|
+
T && /* @__PURE__ */ g(ce, {
|
|
344
|
+
currentDashboardId: O.id,
|
|
345
|
+
currentDashboardName: O.name,
|
|
342
346
|
basePath: "/bigconsole/dashboards"
|
|
343
347
|
}),
|
|
344
|
-
/* @__PURE__ */
|
|
348
|
+
/* @__PURE__ */ g("div", {
|
|
345
349
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
346
|
-
children: /* @__PURE__ */
|
|
347
|
-
dashboardId:
|
|
348
|
-
pageId: P ||
|
|
349
|
-
title:
|
|
350
|
-
onPaste:
|
|
351
|
-
onSave:
|
|
352
|
-
isSaving:
|
|
353
|
-
onExport:
|
|
354
|
-
onPublishTemplate:
|
|
355
|
-
pages: (
|
|
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) => ({
|
|
356
360
|
id: e.id,
|
|
357
|
-
name: e.name ||
|
|
361
|
+
name: e.name || y("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
358
362
|
order: e.order ?? 0
|
|
359
363
|
})),
|
|
360
|
-
activePageId: P ||
|
|
361
|
-
onPageChange:
|
|
362
|
-
onPageAdd:
|
|
363
|
-
onPageRename:
|
|
364
|
-
onPageDuplicate:
|
|
365
|
-
onPageDelete:
|
|
366
|
-
onPagesReorder:
|
|
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,
|
|
367
371
|
showPageTabs: !0
|
|
368
372
|
})
|
|
369
373
|
}),
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
isOpen:
|
|
372
|
-
dashboardId:
|
|
373
|
-
dashboardName:
|
|
374
|
-
onClose:
|
|
374
|
+
/* @__PURE__ */ g(se, {
|
|
375
|
+
isOpen: Se,
|
|
376
|
+
dashboardId: O.id,
|
|
377
|
+
dashboardName: O.name,
|
|
378
|
+
onClose: Pe
|
|
375
379
|
}),
|
|
376
|
-
/* @__PURE__ */
|
|
377
|
-
isOpen:
|
|
378
|
-
dashboardId:
|
|
379
|
-
dashboardName:
|
|
380
|
-
dashboardDescription:
|
|
381
|
-
onClose:
|
|
380
|
+
/* @__PURE__ */ g(le, {
|
|
381
|
+
isOpen: je,
|
|
382
|
+
dashboardId: O.id,
|
|
383
|
+
dashboardName: O.name,
|
|
384
|
+
dashboardDescription: O.description,
|
|
385
|
+
onClose: Ne
|
|
382
386
|
})
|
|
383
387
|
]
|
|
384
|
-
}) : /* @__PURE__ */
|
|
385
|
-
title:
|
|
386
|
-
description:
|
|
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.")
|
|
387
391
|
});
|
|
388
392
|
});
|
|
389
393
|
//#endregion
|
|
390
|
-
export {
|
|
394
|
+
export { v as DashboardViewPage, v as default };
|
|
391
395
|
|
|
392
396
|
//# sourceMappingURL=DashboardViewPage.js.map
|