@burdenoff/microfe-bigconsole 2026.1004.3 → 2026.1004.5
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/DrilldownDashboardRenderer.d.ts.map +1 -1
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js +57 -56
- package/dist/bigconsole/components/DrilldownDashboardRenderer.js.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.d.ts.map +1 -1
- package/dist/bigconsole/components/DrilldownModal.js +55 -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/bigconsole/utils/drilldownParams.d.ts +3 -0
- package/dist/bigconsole/utils/drilldownParams.d.ts.map +1 -0
- package/dist/bigconsole/utils/drilldownParams.js +8 -0
- package/dist/bigconsole/utils/drilldownParams.js.map +1 -0
- 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 +2 -1
|
@@ -12,48 +12,49 @@ import s from "../hooks/useActivePage.js";
|
|
|
12
12
|
import c from "../hooks/usePageOperations.js";
|
|
13
13
|
import "../hooks/index.js";
|
|
14
14
|
import { BIGCONSOLE_PERMISSIONS as l } from "../../constants/permissions.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
15
|
+
import { loadBigConsoleSettings as ee } from "../hooks/useBigConsoleSettings.js";
|
|
16
|
+
import { BuilderCanvas as te } from "../components/builder/BuilderCanvas.js";
|
|
17
|
+
import { BuilderTopbar as ne } from "../components/builder/BuilderTopbar.js";
|
|
18
|
+
import { DashboardEditorShell as re } from "../components/builder/DashboardEditorShell.js";
|
|
19
|
+
import { findNextAvailablePosition as ie } from "../utils/widgetPositioning.js";
|
|
19
20
|
import "../components/builder/index.js";
|
|
20
|
-
import
|
|
21
|
-
import
|
|
21
|
+
import u from "../components/dashboard/DashboardCanvas.js";
|
|
22
|
+
import d from "../components/dashboard/ExportDashboardDialog.js";
|
|
22
23
|
import "../components/dashboard/index.js";
|
|
23
|
-
import
|
|
24
|
+
import ae from "../customWidget/CustomWidgetBuilderSheet.js";
|
|
24
25
|
import "../customWidget/index.js";
|
|
25
|
-
import { memo as
|
|
26
|
-
import { useParams as
|
|
27
|
-
import { AccessDenied as
|
|
28
|
-
import { usePermissions as
|
|
29
|
-
import { Button as
|
|
30
|
-
import { jsx as
|
|
31
|
-
import { useI18n as
|
|
26
|
+
import { memo as f, useCallback as p, useEffect as m, useState as h } from "react";
|
|
27
|
+
import { useParams as oe } from "react-router";
|
|
28
|
+
import { AccessDenied as se } from "@burdenoff/fe-libs/shared/components";
|
|
29
|
+
import { usePermissions as ce } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
30
|
+
import { Button as le } from "@burdenoff/fe-libs/ui";
|
|
31
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
32
|
+
import { useI18n as ue } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
32
33
|
//#region src/bigconsole/pages/DashboardBuilderPage.tsx
|
|
33
|
-
function
|
|
34
|
+
function v() {
|
|
34
35
|
try {
|
|
35
36
|
return window.__breadcrumbRegistry;
|
|
36
37
|
} catch {
|
|
37
38
|
return;
|
|
38
39
|
}
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
-
let n =
|
|
41
|
+
function de(e, t) {
|
|
42
|
+
let n = v();
|
|
42
43
|
n?.register && n.register(e, t);
|
|
43
44
|
}
|
|
44
|
-
function
|
|
45
|
-
let t =
|
|
45
|
+
function fe(e) {
|
|
46
|
+
let t = v();
|
|
46
47
|
t?.unregister && t.unregister(e);
|
|
47
48
|
}
|
|
48
|
-
var
|
|
49
|
-
let { dashboardId:
|
|
50
|
-
|
|
51
|
-
if (!
|
|
52
|
-
|
|
49
|
+
var y = f(function() {
|
|
50
|
+
let { dashboardId: f } = oe(), v = n(), { t: y } = ue(), { hasPermission: b, isLoading: x } = ce(), pe = b(l.DASHBOARD_READ), me = b(l.DASHBOARD_UPDATE), he = b(l.DASHBOARD_EXPORT), S = b(l.WIDGET_CREATE), [C, w] = h(!1), [T, E] = h(null), [ge, D] = h(!1), [_e, O] = h(!1), { fetchDashboard: k, updateDashboard: A, loading: j, error: M } = o(), { createWidget: N, updateWidget: P, deleteWidget: F, duplicateWidget: I, batchUpdatePositions: L } = a(void 0, f), { createPage: R, updatePage: z, deletePage: B, reorderPages: V } = c(), H = t((e) => e.setCurrentDashboard), U = t((e) => e.currentDashboard), { activePageId: W, setActivePage: G } = s(U?.id === f ? U?.pages : void 0), K = t((e) => e.setViewMode), q = e((e) => e.selectWidget), J = e((e) => e.widgets), Y = e((e) => e.clipboardWidgetId), X = e((e) => e.clipboardAction), Z = e((e) => e.clearClipboard);
|
|
51
|
+
m(() => (K("edit"), () => K("view")), [K]), m(() => {
|
|
52
|
+
if (!f) {
|
|
53
|
+
v("/dashboards");
|
|
53
54
|
return;
|
|
54
55
|
}
|
|
55
|
-
return
|
|
56
|
-
e ? (
|
|
56
|
+
return k(f).then((e) => {
|
|
57
|
+
e ? (H({
|
|
57
58
|
...e,
|
|
58
59
|
title: e.name,
|
|
59
60
|
description: e.description ?? "",
|
|
@@ -64,63 +65,63 @@ var b = p(function() {
|
|
|
64
65
|
index: t,
|
|
65
66
|
layoutConfig: e.layoutConfig ?? {}
|
|
66
67
|
}))
|
|
67
|
-
}), e.name &&
|
|
68
|
+
}), e.name && de(f, e.name)) : v("/dashboards");
|
|
68
69
|
}), () => {
|
|
69
|
-
|
|
70
|
+
f && fe(f);
|
|
70
71
|
};
|
|
71
72
|
}, [
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
73
|
+
f,
|
|
74
|
+
v,
|
|
75
|
+
H,
|
|
76
|
+
k
|
|
76
77
|
]);
|
|
77
|
-
let
|
|
78
|
-
let e =
|
|
79
|
-
if (!
|
|
80
|
-
let t =
|
|
78
|
+
let Q = p(async () => {
|
|
79
|
+
let e = W ?? U?.pages?.[0]?.id;
|
|
80
|
+
if (!Y || !f || !e) return;
|
|
81
|
+
let t = J.get(Y);
|
|
81
82
|
if (!t) {
|
|
82
|
-
|
|
83
|
+
Z();
|
|
83
84
|
return;
|
|
84
85
|
}
|
|
85
|
-
let n = Array.from(
|
|
86
|
-
width: t.positionWidth ?? 4,
|
|
86
|
+
let n = Array.from(J.values()).filter((t) => t.pageId === e), r = U?.pages.find((t) => t.id === e)?.gridColumns ?? 12, i = {
|
|
87
|
+
width: Math.min(t.positionWidth ?? 4, r),
|
|
87
88
|
height: t.positionHeight ?? 4
|
|
88
|
-
}, { x:
|
|
89
|
-
x:
|
|
90
|
-
y:
|
|
91
|
-
width:
|
|
92
|
-
height:
|
|
93
|
-
},
|
|
94
|
-
|
|
89
|
+
}, { x: a, y: o } = ie(n, i, { cols: r }), s = {
|
|
90
|
+
x: a,
|
|
91
|
+
y: o,
|
|
92
|
+
width: i.width,
|
|
93
|
+
height: i.height
|
|
94
|
+
}, c = X === "copy" ? y("bigconsole.dashboards.builder.actions.copySuffix", "{{title}} (Copy)", { title: t.title }) : t.title, l = await I(Y, s, c).catch(() => null);
|
|
95
|
+
l ||= await N({
|
|
95
96
|
pageId: e,
|
|
96
|
-
dashboardId:
|
|
97
|
+
dashboardId: f,
|
|
97
98
|
type: t.type,
|
|
98
|
-
title:
|
|
99
|
+
title: c,
|
|
99
100
|
description: t.description,
|
|
100
101
|
dataSinkId: t.dataSinkId ?? void 0,
|
|
101
102
|
datasetId: t.datasetId ?? void 0,
|
|
102
103
|
parserId: t.parserId ?? void 0,
|
|
103
104
|
parserRules: t.parserRules ?? void 0,
|
|
104
105
|
config: t.config || {},
|
|
105
|
-
position:
|
|
106
|
+
position: s,
|
|
106
107
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
107
108
|
metadata: t.metadata
|
|
108
|
-
}),
|
|
109
|
+
}), l && (q(l.id), X === "cut" && await F(Y)), Z();
|
|
109
110
|
}, [
|
|
111
|
+
Y,
|
|
110
112
|
X,
|
|
111
|
-
|
|
112
|
-
p,
|
|
113
|
-
G,
|
|
113
|
+
f,
|
|
114
114
|
W,
|
|
115
|
-
|
|
116
|
-
L,
|
|
117
|
-
P,
|
|
118
|
-
I,
|
|
115
|
+
U,
|
|
119
116
|
J,
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
I,
|
|
118
|
+
N,
|
|
119
|
+
F,
|
|
120
|
+
q,
|
|
121
|
+
Z,
|
|
122
|
+
y
|
|
122
123
|
]);
|
|
123
|
-
|
|
124
|
+
m(() => {
|
|
124
125
|
let n = (n) => {
|
|
125
126
|
if (t.getState().viewMode !== "edit" || n.target?.closest("input, textarea, select, [contenteditable=\"true\"]") || document.querySelector("[data-slot=\"dialog-overlay\"]")) return;
|
|
126
127
|
let r = e.getState(), i = r.selectedWidgetId;
|
|
@@ -129,22 +130,22 @@ var b = p(function() {
|
|
|
129
130
|
return;
|
|
130
131
|
}
|
|
131
132
|
if ((n.key === "Delete" || n.key === "Backspace") && i) {
|
|
132
|
-
n.preventDefault(),
|
|
133
|
+
n.preventDefault(), F(i), r.selectWidget(null);
|
|
133
134
|
return;
|
|
134
135
|
}
|
|
135
|
-
(n.metaKey || n.ctrlKey) && (n.key === "c" && i ? r.copyWidget(i) : n.key === "x" && i ? r.cutWidget(i) : n.key === "v" && (n.preventDefault(),
|
|
136
|
+
(n.metaKey || n.ctrlKey) && (n.key === "c" && i ? r.copyWidget(i) : n.key === "x" && i ? r.cutWidget(i) : n.key === "v" && (n.preventDefault(), Q()));
|
|
136
137
|
};
|
|
137
138
|
return document.addEventListener("keydown", n, !0), () => document.removeEventListener("keydown", n, !0);
|
|
138
|
-
}, [
|
|
139
|
-
let
|
|
140
|
-
|
|
141
|
-
}, [
|
|
142
|
-
if (
|
|
139
|
+
}, [F, Q]);
|
|
140
|
+
let ve = p(() => {
|
|
141
|
+
v("/dashboards");
|
|
142
|
+
}, [v]), $ = p(async () => {
|
|
143
|
+
if (f) {
|
|
143
144
|
w(!0), E(null);
|
|
144
145
|
try {
|
|
145
146
|
let t = e.getState(), n = Array.from(t.widgets.values()), r = t.dirtyWidgetIds, i = n.filter((e) => r.has(e.id));
|
|
146
147
|
if (i.length > 0) {
|
|
147
|
-
let e = i.map((e) =>
|
|
148
|
+
let e = i.map((e) => P({
|
|
148
149
|
id: e.id,
|
|
149
150
|
title: e.title,
|
|
150
151
|
config: e.config,
|
|
@@ -156,7 +157,7 @@ var b = p(function() {
|
|
|
156
157
|
}));
|
|
157
158
|
await Promise.all(e), t.clearAllDirty();
|
|
158
159
|
}
|
|
159
|
-
n.length > 0 && await
|
|
160
|
+
n.length > 0 && await L(n.map((e) => ({
|
|
160
161
|
id: e.id,
|
|
161
162
|
position: e.position || {
|
|
162
163
|
x: e.positionX ?? 0,
|
|
@@ -164,214 +165,218 @@ var b = p(function() {
|
|
|
164
165
|
width: e.positionWidth ?? 4,
|
|
165
166
|
height: e.positionHeight ?? 4
|
|
166
167
|
}
|
|
167
|
-
}))),
|
|
168
|
-
id:
|
|
169
|
-
name:
|
|
170
|
-
description:
|
|
168
|
+
}))), U && await A({
|
|
169
|
+
id: f,
|
|
170
|
+
name: U.title,
|
|
171
|
+
description: U.description
|
|
171
172
|
});
|
|
172
173
|
} catch (e) {
|
|
173
|
-
E(e instanceof Error ? e.message :
|
|
174
|
+
E(e instanceof Error ? e.message : y("bigconsole.dashboards.builder.errors.saveFailed", "Failed to save dashboard"));
|
|
174
175
|
} finally {
|
|
175
176
|
w(!1);
|
|
176
177
|
}
|
|
177
178
|
}
|
|
178
179
|
}, [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
]),
|
|
186
|
-
|
|
187
|
-
}, []),
|
|
188
|
-
|
|
189
|
-
}, []),
|
|
190
|
-
|
|
191
|
-
}, [
|
|
192
|
-
if (!
|
|
193
|
-
let e = await
|
|
194
|
-
dashboardId:
|
|
195
|
-
name:
|
|
180
|
+
f,
|
|
181
|
+
U,
|
|
182
|
+
P,
|
|
183
|
+
L,
|
|
184
|
+
A,
|
|
185
|
+
y
|
|
186
|
+
]), ye = p(() => {
|
|
187
|
+
D(!0);
|
|
188
|
+
}, []), be = p(() => {
|
|
189
|
+
D(!1);
|
|
190
|
+
}, []), xe = p((e) => {
|
|
191
|
+
G(e);
|
|
192
|
+
}, [G]), Se = p(async () => {
|
|
193
|
+
if (!U || !f) return;
|
|
194
|
+
let e = await R({
|
|
195
|
+
dashboardId: f,
|
|
196
|
+
name: y("bigconsole.dashboards.builder.actions.newPageName", "Page {{count}}", { count: U.pages.length + 1 }),
|
|
197
|
+
gridColumns: ee().defaultGridColumns
|
|
196
198
|
});
|
|
197
|
-
e && (
|
|
198
|
-
...
|
|
199
|
-
pages: [...
|
|
199
|
+
e && (H({
|
|
200
|
+
...U,
|
|
201
|
+
pages: [...U.pages, {
|
|
200
202
|
id: e.id,
|
|
201
203
|
title: e.name,
|
|
202
204
|
index: e.order,
|
|
203
|
-
layoutConfig: e.layoutConfig || {}
|
|
205
|
+
layoutConfig: e.layoutConfig || {},
|
|
206
|
+
gridColumns: e.gridColumns
|
|
204
207
|
}]
|
|
205
|
-
}),
|
|
208
|
+
}), G(e.id));
|
|
206
209
|
}, [
|
|
207
|
-
W,
|
|
208
|
-
p,
|
|
209
210
|
U,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
211
|
+
f,
|
|
212
|
+
H,
|
|
213
|
+
R,
|
|
214
|
+
G,
|
|
215
|
+
y
|
|
216
|
+
]), Ce = p(async (e, t) => {
|
|
217
|
+
U && await z({
|
|
215
218
|
id: e,
|
|
216
219
|
name: t
|
|
217
|
-
}) &&
|
|
218
|
-
...
|
|
219
|
-
pages:
|
|
220
|
+
}) && H({
|
|
221
|
+
...U,
|
|
222
|
+
pages: U.pages.map((n) => n.id === e ? {
|
|
220
223
|
...n,
|
|
221
224
|
title: t
|
|
222
225
|
} : n)
|
|
223
226
|
});
|
|
224
227
|
}, [
|
|
225
|
-
W,
|
|
226
228
|
U,
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
H,
|
|
230
|
+
z
|
|
231
|
+
]), we = p(async (e) => {
|
|
232
|
+
if (!U || !f) return;
|
|
233
|
+
let t = U.pages.find((t) => t.id === e);
|
|
231
234
|
if (!t) return;
|
|
232
|
-
let n = await
|
|
233
|
-
dashboardId:
|
|
234
|
-
|
|
235
|
+
let n = await R({
|
|
236
|
+
dashboardId: f,
|
|
237
|
+
gridColumns: t.gridColumns,
|
|
238
|
+
name: y("bigconsole.dashboards.builder.actions.copySuffix", "{{title}} (Copy)", { title: t.title ?? "" })
|
|
235
239
|
});
|
|
236
|
-
n && (
|
|
237
|
-
...
|
|
238
|
-
pages: [...
|
|
240
|
+
n && (H({
|
|
241
|
+
...U,
|
|
242
|
+
pages: [...U.pages, {
|
|
239
243
|
id: n.id,
|
|
240
244
|
title: n.name,
|
|
241
245
|
index: n.order,
|
|
242
|
-
layoutConfig: n.layoutConfig || {}
|
|
246
|
+
layoutConfig: n.layoutConfig || {},
|
|
247
|
+
gridColumns: n.gridColumns
|
|
243
248
|
}]
|
|
244
|
-
}),
|
|
249
|
+
}), G(n.id));
|
|
245
250
|
}, [
|
|
246
|
-
W,
|
|
247
|
-
p,
|
|
248
251
|
U,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
252
|
+
f,
|
|
253
|
+
H,
|
|
254
|
+
R,
|
|
255
|
+
G,
|
|
256
|
+
y
|
|
257
|
+
]), Te = p(async (e) => {
|
|
258
|
+
if (!(!U || U.pages.length <= 1) && await B(e)) {
|
|
259
|
+
let t = U.pages.filter((t) => t.id !== e).map((e, t) => ({
|
|
255
260
|
...e,
|
|
256
261
|
index: t
|
|
257
262
|
}));
|
|
258
|
-
|
|
259
|
-
...
|
|
263
|
+
H({
|
|
264
|
+
...U,
|
|
260
265
|
pages: t
|
|
261
266
|
});
|
|
262
267
|
let n = t[0]?.id;
|
|
263
|
-
|
|
268
|
+
W === e && n && G(n, { replace: !0 });
|
|
264
269
|
}
|
|
265
270
|
}, [
|
|
266
|
-
W,
|
|
267
271
|
U,
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
272
|
+
H,
|
|
273
|
+
W,
|
|
274
|
+
B,
|
|
275
|
+
G
|
|
276
|
+
]), Ee = p(async (e) => {
|
|
277
|
+
!U || !f || (H({
|
|
278
|
+
...U,
|
|
274
279
|
pages: e.map((e, t) => ({
|
|
275
280
|
...e,
|
|
276
281
|
index: t
|
|
277
282
|
}))
|
|
278
|
-
}), await
|
|
283
|
+
}), await V(f, e.map((e) => e.id)));
|
|
279
284
|
}, [
|
|
280
|
-
W,
|
|
281
|
-
p,
|
|
282
285
|
U,
|
|
283
|
-
|
|
286
|
+
f,
|
|
287
|
+
H,
|
|
288
|
+
V
|
|
284
289
|
]);
|
|
285
|
-
return
|
|
290
|
+
return x ? /* @__PURE__ */ g("div", {
|
|
286
291
|
className: "flex items-center justify-center h-full",
|
|
287
|
-
children: /* @__PURE__ */
|
|
288
|
-
}) :
|
|
292
|
+
children: /* @__PURE__ */ g("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
293
|
+
}) : pe ? M ? /* @__PURE__ */ g("div", {
|
|
289
294
|
className: "flex h-full flex-col items-center justify-center p-6",
|
|
290
|
-
children: /* @__PURE__ */
|
|
295
|
+
children: /* @__PURE__ */ g(i, {
|
|
291
296
|
headingLevel: 2,
|
|
292
297
|
tone: "danger",
|
|
293
|
-
title:
|
|
294
|
-
description: /* @__PURE__ */
|
|
298
|
+
title: y("bigconsole.dashboards.builder.errors.loadFailed", "Failed to load dashboard"),
|
|
299
|
+
description: /* @__PURE__ */ g("span", {
|
|
295
300
|
className: "break-words",
|
|
296
|
-
children:
|
|
301
|
+
children: M.message
|
|
297
302
|
}),
|
|
298
303
|
className: "w-full max-w-md",
|
|
299
304
|
"data-testid": "dashboard-builder-error",
|
|
300
|
-
actions: /* @__PURE__ */
|
|
305
|
+
actions: /* @__PURE__ */ g(le, {
|
|
301
306
|
size: "sm",
|
|
302
|
-
onClick: () =>
|
|
303
|
-
children:
|
|
307
|
+
onClick: () => v("/dashboards"),
|
|
308
|
+
children: y("bigconsole.dashboards.builder.actions.backToDashboards", "Back to Dashboards")
|
|
304
309
|
})
|
|
305
310
|
})
|
|
306
|
-
}) :
|
|
311
|
+
}) : j || !U ? /* @__PURE__ */ _("div", {
|
|
307
312
|
className: "flex items-center justify-center h-full",
|
|
308
313
|
role: "status",
|
|
309
314
|
"aria-live": "polite",
|
|
310
|
-
children: [/* @__PURE__ */
|
|
315
|
+
children: [/* @__PURE__ */ g("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ g("span", {
|
|
311
316
|
className: "sr-only",
|
|
312
317
|
children: "Loading dashboard…"
|
|
313
318
|
})]
|
|
314
|
-
}) : /* @__PURE__ */
|
|
315
|
-
topbar: /* @__PURE__ */
|
|
316
|
-
title:
|
|
317
|
-
onBack:
|
|
318
|
-
actions: /* @__PURE__ */
|
|
319
|
+
}) : /* @__PURE__ */ _(re, {
|
|
320
|
+
topbar: /* @__PURE__ */ g(ne, {
|
|
321
|
+
title: U.title || y("bigconsole.dashboards.builder.header.untitledDashboard", "Untitled dashboard"),
|
|
322
|
+
onBack: ve,
|
|
323
|
+
actions: /* @__PURE__ */ _("div", {
|
|
319
324
|
className: "flex items-center gap-2",
|
|
320
|
-
children: [T ? /* @__PURE__ */
|
|
325
|
+
children: [T ? /* @__PURE__ */ g("span", {
|
|
321
326
|
className: "text-xs font-medium text-status-error-text",
|
|
322
327
|
role: "alert",
|
|
323
328
|
children: T
|
|
324
|
-
}) : null,
|
|
329
|
+
}) : null, S ? /* @__PURE__ */ g("button", {
|
|
325
330
|
type: "button",
|
|
326
331
|
"data-testid": "open-custom-widget-builder",
|
|
327
|
-
onClick: () =>
|
|
332
|
+
onClick: () => O(!0),
|
|
328
333
|
className: `inline-flex min-h-control-md items-center rounded-button border border-[var(--color-border-subtle)] px-2 py-1 text-xs font-medium text-text-primary motion-safe:transition-colors hover:bg-bg-sunken ${r}`,
|
|
329
|
-
children:
|
|
334
|
+
children: y("bigconsole.dashboards.builder.toolbar.aiWidget", "AI widget")
|
|
330
335
|
}) : null]
|
|
331
336
|
})
|
|
332
337
|
}),
|
|
333
338
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
dashboardId:
|
|
336
|
-
pageId:
|
|
337
|
-
title:
|
|
338
|
-
onPaste:
|
|
339
|
-
onSave:
|
|
340
|
-
isSaving:
|
|
341
|
-
onExport:
|
|
342
|
-
pages:
|
|
339
|
+
/* @__PURE__ */ g(te, { canvas: /* @__PURE__ */ g(u, {
|
|
340
|
+
dashboardId: U.id,
|
|
341
|
+
pageId: W || U.pages?.[0]?.id,
|
|
342
|
+
title: U.title,
|
|
343
|
+
onPaste: Q,
|
|
344
|
+
onSave: me ? $ : void 0,
|
|
345
|
+
isSaving: C,
|
|
346
|
+
onExport: he ? ye : void 0,
|
|
347
|
+
pages: U.pages.map((e) => ({
|
|
343
348
|
id: e.id,
|
|
344
|
-
name: e.title ||
|
|
349
|
+
name: e.title || y("bigconsole.dashboards.builder.actions.newPageName", "Page {{count}}", { count: (e.index ?? 0) + 1 }),
|
|
345
350
|
order: e.index ?? 0
|
|
346
351
|
})),
|
|
347
|
-
activePageId:
|
|
348
|
-
onPageChange:
|
|
349
|
-
onPageAdd:
|
|
350
|
-
onPageRename:
|
|
351
|
-
onPageDuplicate:
|
|
352
|
-
onPageDelete:
|
|
353
|
-
onPagesReorder:
|
|
352
|
+
activePageId: W || U.pages?.[0]?.id,
|
|
353
|
+
onPageChange: xe,
|
|
354
|
+
onPageAdd: Se,
|
|
355
|
+
onPageRename: Ce,
|
|
356
|
+
onPageDuplicate: we,
|
|
357
|
+
onPageDelete: Te,
|
|
358
|
+
onPagesReorder: Ee,
|
|
354
359
|
showPageTabs: !0
|
|
355
360
|
}) }),
|
|
356
|
-
/* @__PURE__ */
|
|
357
|
-
isOpen:
|
|
358
|
-
dashboardId:
|
|
359
|
-
dashboardName:
|
|
360
|
-
onClose:
|
|
361
|
+
/* @__PURE__ */ g(d, {
|
|
362
|
+
isOpen: ge,
|
|
363
|
+
dashboardId: U.id,
|
|
364
|
+
dashboardName: U.title,
|
|
365
|
+
onClose: be
|
|
361
366
|
}),
|
|
362
|
-
/* @__PURE__ */
|
|
363
|
-
isOpen:
|
|
364
|
-
onClose: () =>
|
|
365
|
-
dashboardId:
|
|
366
|
-
pageId:
|
|
367
|
+
/* @__PURE__ */ g(ae, {
|
|
368
|
+
isOpen: _e,
|
|
369
|
+
onClose: () => O(!1),
|
|
370
|
+
dashboardId: U.id,
|
|
371
|
+
pageId: W || U.pages?.[0]?.id || ""
|
|
367
372
|
})
|
|
368
373
|
]
|
|
369
|
-
}) : /* @__PURE__ */
|
|
370
|
-
title:
|
|
371
|
-
description:
|
|
374
|
+
}) : /* @__PURE__ */ g(se, {
|
|
375
|
+
title: y("bigconsole.dashboards.builder.errors.accessDeniedTitle", "Access Denied"),
|
|
376
|
+
description: y("bigconsole.dashboards.builder.errors.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
372
377
|
});
|
|
373
378
|
});
|
|
374
379
|
//#endregion
|
|
375
|
-
export {
|
|
380
|
+
export { y as DashboardBuilderPage, y as default };
|
|
376
381
|
|
|
377
382
|
//# sourceMappingURL=DashboardBuilderPage.js.map
|