@burdenoff/microfe-bigconsole 2026.805.1 → 2026.805.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bigconsole/AdminRoot.js +21 -16
- package/dist/bigconsole/AdminRoot.js.map +1 -1
- package/dist/bigconsole/BigConsoleRoot.js +44 -39
- package/dist/bigconsole/BigConsoleRoot.js.map +1 -1
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js +109 -113
- package/dist/bigconsole/components/builder/inspector/DataBindingSection.js.map +1 -1
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js +115 -113
- package/dist/bigconsole/components/dashboard/CreateDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +71 -62
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +116 -100
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js +56 -54
- package/dist/bigconsole/components/dashboard/DrilldownBreadcrumb.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +126 -125
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js +151 -150
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterEditor.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js +77 -76
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterPresetSelector.js.map +1 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +97 -96
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js +172 -191
- package/dist/bigconsole/components/dashboard/ImportDashboardDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js +100 -98
- package/dist/bigconsole/components/dashboard/PageTabsManager/PageTabsManager.js.map +1 -1
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js +75 -83
- package/dist/bigconsole/components/dashboard/PublishToStoreDialog.js.map +1 -1
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js +151 -154
- package/dist/bigconsole/components/dashboard/SavedViewsDropdown/SavedViewsDropdown.js.map +1 -1
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js +187 -193
- package/dist/bigconsole/components/dashboard/ShareDialog/EmbedTab.js.map +1 -1
- package/dist/bigconsole/components/dashboard/TemplatePicker/TemplatePicker.js +1 -0
- package/dist/bigconsole/components/dashboard/WidgetPalette.js +110 -108
- package/dist/bigconsole/components/dashboard/WidgetPalette.js.map +1 -1
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js +102 -103
- package/dist/bigconsole/components/datasink/CacheTTLSelector.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkCard.js +20 -20
- package/dist/bigconsole/components/datasink/DataSinkCard.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js +36 -41
- package/dist/bigconsole/components/datasink/DataSinkDeleteDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js +38 -37
- package/dist/bigconsole/components/datasink/DataSinkRefreshDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js +113 -117
- package/dist/bigconsole/components/datasink/ImportDataGuideDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js +182 -197
- package/dist/bigconsole/components/datasink/ImportDataSinkDialog.js.map +1 -1
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js +166 -168
- package/dist/bigconsole/components/datasink/RefreshTypeSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/DataSinkSelector.js +87 -86
- package/dist/bigconsole/components/parser/DataSinkSelector.js.map +1 -1
- package/dist/bigconsole/components/parser/ImportParserDialog.js +196 -211
- package/dist/bigconsole/components/parser/ImportParserDialog.js.map +1 -1
- package/dist/bigconsole/components/parser/ParserSelector.js +130 -128
- package/dist/bigconsole/components/parser/ParserSelector.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js +66 -63
- package/dist/bigconsole/components/preview/AiPreviewMiniPanel.js.map +1 -1
- package/dist/bigconsole/components/preview/AiPreviewPanel.js +95 -91
- package/dist/bigconsole/components/preview/AiPreviewPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js +243 -230
- package/dist/bigconsole/components/widgets/ActionConfigDialog.js.map +1 -1
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js +149 -145
- package/dist/bigconsole/components/widgets/DrilldownConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/PropertiesPanel.js +504 -470
- package/dist/bigconsole/components/widgets/PropertiesPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/WidgetMenu.js +87 -76
- package/dist/bigconsole/components/widgets/WidgetMenu.js.map +1 -1
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js +44 -47
- package/dist/bigconsole/components/widgets/calendar/CalendarWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js +143 -142
- package/dist/bigconsole/components/widgets/chart/ChartConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +101 -88
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js.map +1 -1
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js +135 -134
- package/dist/bigconsole/components/widgets/event-logs/EventLogViewer.js.map +1 -1
- package/dist/bigconsole/components/widgets/form/FormWidget.js +167 -159
- package/dist/bigconsole/components/widgets/form/FormWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js +69 -68
- package/dist/bigconsole/components/widgets/gauge/GaugeConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js +64 -72
- package/dist/bigconsole/components/widgets/heatmap/HeatmapConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js +60 -59
- package/dist/bigconsole/components/widgets/kanban/KanbanWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/list/ListConfig.js +57 -56
- package/dist/bigconsole/components/widgets/list/ListConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js +70 -69
- package/dist/bigconsole/components/widgets/metric-card/MetricCardConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js +35 -34
- package/dist/bigconsole/components/widgets/metric-card/SparklineChart.js.map +1 -1
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js +20 -19
- package/dist/bigconsole/components/widgets/metric-card/TrendIndicator.js.map +1 -1
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js +178 -177
- package/dist/bigconsole/components/widgets/pivot-table/PivotTableWidget.js.map +1 -1
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js +76 -75
- package/dist/bigconsole/components/widgets/progress/ProgressConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/table/TableConfig.js +183 -168
- package/dist/bigconsole/components/widgets/table/TableConfig.js.map +1 -1
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js +187 -180
- package/dist/bigconsole/components/widgets/webhook-config/WebhookConfigPanel.js.map +1 -1
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js +120 -118
- package/dist/bigconsole/components/widgets/widget-actions/WidgetActions.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js +40 -38
- package/dist/bigconsole/customWidget/CustomWidgetBuilderSheet.js.map +1 -1
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js +150 -148
- package/dist/bigconsole/customWidget/CustomWidgetProposalPanel.js.map +1 -1
- package/dist/bigconsole/pages/DashboardBuilderPage.js +189 -175
- package/dist/bigconsole/pages/DashboardBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +200 -187
- package/dist/bigconsole/pages/DashboardViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DashboardsPage.js +379 -324
- package/dist/bigconsole/pages/DashboardsPage.js.map +1 -1
- package/dist/bigconsole/pages/DataParsersPage.js +185 -178
- package/dist/bigconsole/pages/DataParsersPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkBuilderPage.js +195 -170
- package/dist/bigconsole/pages/DataSinkBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinkViewPage.js +224 -200
- package/dist/bigconsole/pages/DataSinkViewPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSinksPage.js +281 -268
- package/dist/bigconsole/pages/DataSinksPage.js.map +1 -1
- package/dist/bigconsole/pages/DataSourcesPage.js +8 -7
- package/dist/bigconsole/pages/DataSourcesPage.js.map +1 -1
- package/dist/bigconsole/pages/InsightsPage.js +238 -208
- package/dist/bigconsole/pages/InsightsPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserBuilderPage.js +480 -413
- package/dist/bigconsole/pages/ParserBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/ParserViewPage.js +192 -172
- package/dist/bigconsole/pages/ParserViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +198 -163
- package/dist/bigconsole/pages/PipelineBuilderPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelineViewPage.js +138 -133
- package/dist/bigconsole/pages/PipelineViewPage.js.map +1 -1
- package/dist/bigconsole/pages/PipelinesPage.js +162 -136
- package/dist/bigconsole/pages/PipelinesPage.js.map +1 -1
- package/dist/bigconsole/pages/SettingsPage.js +177 -172
- package/dist/bigconsole/pages/SettingsPage.js.map +1 -1
- package/dist/bigconsole/pages/WidgetDemoPage.js +121 -83
- package/dist/bigconsole/pages/WidgetDemoPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowViewPage.js +269 -242
- package/dist/bigconsole/pages/WorkflowViewPage.js.map +1 -1
- package/dist/bigconsole/pages/WorkflowsPage.js +153 -138
- package/dist/bigconsole/pages/WorkflowsPage.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js +111 -109
- package/dist/bigconsole/renderers/adapters/AdaptiveCardRenderer.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js +127 -126
- package/dist/bigconsole/renderers/adapters/BlockKitRenderer.js.map +1 -1
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js +103 -103
- package/dist/bigconsole/renderers/adapters/CustomRenderer.js.map +1 -1
- package/dist/constants/permissions.js +83 -0
- package/dist/constants/permissions.js.map +1 -0
- package/package.json +2 -1
|
@@ -7,44 +7,48 @@ import r from "../hooks/useWidgetOperations.js";
|
|
|
7
7
|
import i from "../hooks/useDashboardOperations.js";
|
|
8
8
|
import a from "../hooks/usePageOperations.js";
|
|
9
9
|
import "../hooks/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { BIGCONSOLE_PERMISSIONS as o } from "../../constants/permissions.js";
|
|
11
|
+
import { BuilderCanvas as s } from "../components/builder/BuilderCanvas.js";
|
|
12
|
+
import { BuilderTopbar as c } from "../components/builder/BuilderTopbar.js";
|
|
13
|
+
import { DashboardEditorShell as ee } from "../components/builder/DashboardEditorShell.js";
|
|
13
14
|
import "../components/builder/index.js";
|
|
14
|
-
import { findNextAvailablePosition as
|
|
15
|
-
import
|
|
16
|
-
import
|
|
15
|
+
import { findNextAvailablePosition as te } from "../utils/widgetPositioning.js";
|
|
16
|
+
import ne from "../components/dashboard/DashboardCanvas.js";
|
|
17
|
+
import re from "../components/dashboard/ExportDashboardDialog.js";
|
|
17
18
|
import "../components/dashboard/index.js";
|
|
18
|
-
import
|
|
19
|
+
import ie from "../customWidget/CustomWidgetBuilderSheet.js";
|
|
19
20
|
import "../customWidget/index.js";
|
|
20
|
-
import { memo as
|
|
21
|
-
import { useParams as
|
|
22
|
-
import {
|
|
21
|
+
import { memo as l, useCallback as u, useEffect as d, useState as f } from "react";
|
|
22
|
+
import { useParams as p } from "react-router";
|
|
23
|
+
import { AccessDenied as ae } from "@burdenoff/fe-libs/shared/components";
|
|
24
|
+
import { usePermissions as m } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
25
|
+
import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
26
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
23
27
|
//#region src/bigconsole/pages/DashboardBuilderPage.tsx
|
|
24
|
-
function
|
|
28
|
+
function v() {
|
|
25
29
|
try {
|
|
26
30
|
return window.__breadcrumbRegistry;
|
|
27
31
|
} catch {
|
|
28
32
|
return;
|
|
29
33
|
}
|
|
30
34
|
}
|
|
31
|
-
function
|
|
32
|
-
let n =
|
|
35
|
+
function oe(e, t) {
|
|
36
|
+
let n = v();
|
|
33
37
|
n?.register && n.register(e, t);
|
|
34
38
|
}
|
|
35
|
-
function
|
|
36
|
-
let t =
|
|
39
|
+
function se(e) {
|
|
40
|
+
let t = v();
|
|
37
41
|
t?.unregister && t.unregister(e);
|
|
38
42
|
}
|
|
39
|
-
var
|
|
40
|
-
let { dashboardId:
|
|
41
|
-
|
|
42
|
-
if (!
|
|
43
|
-
|
|
43
|
+
var y = l(function() {
|
|
44
|
+
let { dashboardId: l } = p(), v = n(), { t: y } = h(), { hasPermission: b, isLoading: ce } = m(), x = b(o.DASHBOARD_READ), S = b(o.DASHBOARD_UPDATE), C = b(o.DASHBOARD_EXPORT), le = b(o.WIDGET_CREATE), [w, T] = f(!1), [E, D] = f(null), [ue, O] = f(!1), [k, A] = f(!1), [j, M] = f(null), { fetchDashboard: N, updateDashboard: P, loading: de, error: F } = i(), { createWidget: I, updateWidget: L, deleteWidget: R, duplicateWidget: z, batchUpdatePositions: B } = r(void 0, l), { createPage: V, updatePage: H, deletePage: U, reorderPages: W } = a(), G = t((e) => e.setCurrentDashboard), K = t((e) => e.currentDashboard), q = t((e) => e.setViewMode), J = e((e) => e.selectWidget), Y = e((e) => e.widgets), X = e((e) => e.clipboardWidgetId), Z = e((e) => e.clipboardAction), Q = e((e) => e.clearClipboard);
|
|
45
|
+
d(() => (q("edit"), () => q("view")), [q]), d(() => {
|
|
46
|
+
if (!l) {
|
|
47
|
+
v("/dashboards");
|
|
44
48
|
return;
|
|
45
49
|
}
|
|
46
|
-
return
|
|
47
|
-
e ? (
|
|
50
|
+
return N(l).then((e) => {
|
|
51
|
+
e ? (G({
|
|
48
52
|
...e,
|
|
49
53
|
title: e.name,
|
|
50
54
|
description: e.description ?? "",
|
|
@@ -55,37 +59,37 @@ var S = p(function() {
|
|
|
55
59
|
index: t,
|
|
56
60
|
layoutConfig: e.layoutConfig ?? {}
|
|
57
61
|
}))
|
|
58
|
-
}), e.pages.length > 0 && !
|
|
62
|
+
}), e.pages.length > 0 && !j && M(e.pages[0].id), e.name && oe(l, e.name)) : v("/dashboards");
|
|
59
63
|
}), () => {
|
|
60
|
-
|
|
64
|
+
l && se(l);
|
|
61
65
|
};
|
|
62
66
|
}, [
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
67
|
+
l,
|
|
68
|
+
v,
|
|
69
|
+
G,
|
|
70
|
+
N,
|
|
71
|
+
j
|
|
68
72
|
]);
|
|
69
|
-
let
|
|
70
|
-
let e =
|
|
71
|
-
if (!
|
|
72
|
-
let t =
|
|
73
|
+
let $ = u(async () => {
|
|
74
|
+
let e = j ?? K?.pages?.[0]?.id;
|
|
75
|
+
if (!X || !l || !e) return;
|
|
76
|
+
let t = Y.get(X);
|
|
73
77
|
if (!t) {
|
|
74
|
-
|
|
78
|
+
Q();
|
|
75
79
|
return;
|
|
76
80
|
}
|
|
77
|
-
let n = Array.from(
|
|
81
|
+
let n = Array.from(Y.values()).filter((t) => t.pageId === e), r = {
|
|
78
82
|
width: t.positionWidth ?? 4,
|
|
79
83
|
height: t.positionHeight ?? 4
|
|
80
|
-
}, { x: i, y: a } =
|
|
84
|
+
}, { x: i, y: a } = te(n, r, { cols: 12 }), o = {
|
|
81
85
|
x: i,
|
|
82
86
|
y: a,
|
|
83
87
|
width: r.width,
|
|
84
88
|
height: r.height
|
|
85
|
-
}, s =
|
|
86
|
-
c ||= await
|
|
89
|
+
}, s = Z === "copy" ? y("bigconsole.dashboards.builder.actions.copySuffix", "{{title}} (Copy)", { title: t.title }) : t.title, c = await z(X, o, s).catch(() => null);
|
|
90
|
+
c ||= await I({
|
|
87
91
|
pageId: e,
|
|
88
|
-
dashboardId:
|
|
92
|
+
dashboardId: l,
|
|
89
93
|
type: t.type,
|
|
90
94
|
title: s,
|
|
91
95
|
description: t.description,
|
|
@@ -97,21 +101,22 @@ var S = p(function() {
|
|
|
97
101
|
position: o,
|
|
98
102
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
99
103
|
metadata: t.metadata
|
|
100
|
-
}), c && (
|
|
104
|
+
}), c && (J(c.id), Z === "cut" && await R(X)), Q();
|
|
101
105
|
}, [
|
|
102
|
-
Y,
|
|
103
106
|
X,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
Z,
|
|
108
|
+
l,
|
|
109
|
+
j,
|
|
110
|
+
K,
|
|
111
|
+
Y,
|
|
112
|
+
z,
|
|
113
|
+
I,
|
|
108
114
|
R,
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Z
|
|
115
|
+
J,
|
|
116
|
+
Q,
|
|
117
|
+
y
|
|
113
118
|
]);
|
|
114
|
-
|
|
119
|
+
d(() => {
|
|
115
120
|
let n = (n) => {
|
|
116
121
|
if (t.getState().viewMode !== "edit" || n.target?.closest("input, textarea, select, [contenteditable=\"true\"]") || document.querySelector("[data-slot=\"dialog-overlay\"]")) return;
|
|
117
122
|
let r = e.getState(), i = r.selectedWidgetId;
|
|
@@ -120,22 +125,22 @@ var S = p(function() {
|
|
|
120
125
|
return;
|
|
121
126
|
}
|
|
122
127
|
if ((n.key === "Delete" || n.key === "Backspace") && i) {
|
|
123
|
-
n.preventDefault(),
|
|
128
|
+
n.preventDefault(), R(i), r.selectWidget(null);
|
|
124
129
|
return;
|
|
125
130
|
}
|
|
126
|
-
(n.metaKey || n.ctrlKey) && (n.key === "c" && i ? r.copyWidget(i) : n.key === "x" && i ? r.cutWidget(i) : n.key === "v" && (n.preventDefault(),
|
|
131
|
+
(n.metaKey || n.ctrlKey) && (n.key === "c" && i ? r.copyWidget(i) : n.key === "x" && i ? r.cutWidget(i) : n.key === "v" && (n.preventDefault(), $()));
|
|
127
132
|
};
|
|
128
133
|
return document.addEventListener("keydown", n, !0), () => document.removeEventListener("keydown", n, !0);
|
|
129
|
-
}, [
|
|
130
|
-
let
|
|
131
|
-
|
|
132
|
-
}, [
|
|
133
|
-
if (
|
|
134
|
-
|
|
134
|
+
}, [R, $]);
|
|
135
|
+
let fe = u(() => {
|
|
136
|
+
v("/dashboards");
|
|
137
|
+
}, [v]), pe = u(async () => {
|
|
138
|
+
if (l) {
|
|
139
|
+
T(!0), D(null);
|
|
135
140
|
try {
|
|
136
141
|
let t = e.getState(), n = Array.from(t.widgets.values()), r = t.dirtyWidgetIds, i = n.filter((e) => r.has(e.id));
|
|
137
142
|
if (i.length > 0) {
|
|
138
|
-
let e = i.map((e) =>
|
|
143
|
+
let e = i.map((e) => L({
|
|
139
144
|
id: e.id,
|
|
140
145
|
title: e.title,
|
|
141
146
|
config: e.config,
|
|
@@ -147,7 +152,7 @@ var S = p(function() {
|
|
|
147
152
|
}));
|
|
148
153
|
await Promise.all(e), t.clearAllDirty();
|
|
149
154
|
}
|
|
150
|
-
n.length > 0 && await
|
|
155
|
+
n.length > 0 && await B(n.map((e) => ({
|
|
151
156
|
id: e.id,
|
|
152
157
|
position: e.position || {
|
|
153
158
|
x: e.positionX ?? 0,
|
|
@@ -155,198 +160,207 @@ var S = p(function() {
|
|
|
155
160
|
width: e.positionWidth ?? 4,
|
|
156
161
|
height: e.positionHeight ?? 4
|
|
157
162
|
}
|
|
158
|
-
}))),
|
|
159
|
-
id:
|
|
160
|
-
name:
|
|
161
|
-
description:
|
|
163
|
+
}))), K && await P({
|
|
164
|
+
id: l,
|
|
165
|
+
name: K.title,
|
|
166
|
+
description: K.description
|
|
162
167
|
});
|
|
163
168
|
} catch (e) {
|
|
164
|
-
|
|
169
|
+
D(e instanceof Error ? e.message : y("bigconsole.dashboards.builder.errors.saveFailed", "Failed to save dashboard"));
|
|
165
170
|
} finally {
|
|
166
|
-
|
|
171
|
+
T(!1);
|
|
167
172
|
}
|
|
168
173
|
}
|
|
169
174
|
}, [
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
175
|
+
l,
|
|
176
|
+
K,
|
|
177
|
+
L,
|
|
178
|
+
B,
|
|
179
|
+
P,
|
|
180
|
+
y
|
|
181
|
+
]), me = u(() => {
|
|
182
|
+
O(!0);
|
|
183
|
+
}, []), he = u(() => {
|
|
184
|
+
O(!1);
|
|
185
|
+
}, []), ge = u((e) => {
|
|
186
|
+
M(e);
|
|
187
|
+
}, []), _e = u(async () => {
|
|
188
|
+
if (!K || !l) return;
|
|
189
|
+
let e = await V({
|
|
190
|
+
dashboardId: l,
|
|
191
|
+
name: y("bigconsole.dashboards.builder.actions.newPageName", "Page {{count}}", { count: K.pages.length + 1 })
|
|
186
192
|
});
|
|
187
|
-
e && (
|
|
188
|
-
...
|
|
189
|
-
pages: [...
|
|
193
|
+
e && (G({
|
|
194
|
+
...K,
|
|
195
|
+
pages: [...K.pages, {
|
|
190
196
|
id: e.id,
|
|
191
197
|
title: e.name,
|
|
192
198
|
index: e.order,
|
|
193
199
|
layoutConfig: e.layoutConfig || {}
|
|
194
200
|
}]
|
|
195
|
-
}),
|
|
201
|
+
}), M(e.id));
|
|
196
202
|
}, [
|
|
203
|
+
K,
|
|
204
|
+
l,
|
|
197
205
|
G,
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
G && await V({
|
|
206
|
+
V,
|
|
207
|
+
y
|
|
208
|
+
]), ve = u(async (e, t) => {
|
|
209
|
+
K && await H({
|
|
203
210
|
id: e,
|
|
204
211
|
name: t
|
|
205
|
-
}) &&
|
|
206
|
-
...
|
|
207
|
-
pages:
|
|
212
|
+
}) && G({
|
|
213
|
+
...K,
|
|
214
|
+
pages: K.pages.map((n) => n.id === e ? {
|
|
208
215
|
...n,
|
|
209
216
|
title: t
|
|
210
217
|
} : n)
|
|
211
218
|
});
|
|
212
219
|
}, [
|
|
220
|
+
K,
|
|
213
221
|
G,
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
let t = G.pages.find((t) => t.id === e);
|
|
222
|
+
H
|
|
223
|
+
]), ye = u(async (e) => {
|
|
224
|
+
if (!K || !l) return;
|
|
225
|
+
let t = K.pages.find((t) => t.id === e);
|
|
219
226
|
if (!t) return;
|
|
220
|
-
let n = await
|
|
221
|
-
dashboardId:
|
|
222
|
-
name:
|
|
227
|
+
let n = await V({
|
|
228
|
+
dashboardId: l,
|
|
229
|
+
name: y("bigconsole.dashboards.builder.actions.copySuffix", "{{title}} (Copy)", { title: t.title ?? "" })
|
|
223
230
|
});
|
|
224
|
-
n && (
|
|
225
|
-
...
|
|
226
|
-
pages: [...
|
|
231
|
+
n && (G({
|
|
232
|
+
...K,
|
|
233
|
+
pages: [...K.pages, {
|
|
227
234
|
id: n.id,
|
|
228
235
|
title: n.name,
|
|
229
236
|
index: n.order,
|
|
230
237
|
layoutConfig: n.layoutConfig || {}
|
|
231
238
|
}]
|
|
232
|
-
}),
|
|
239
|
+
}), M(n.id));
|
|
233
240
|
}, [
|
|
241
|
+
K,
|
|
242
|
+
l,
|
|
234
243
|
G,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
let t = G.pages.filter((t) => t.id !== e).map((e, t) => ({
|
|
244
|
+
V,
|
|
245
|
+
y
|
|
246
|
+
]), be = u(async (e) => {
|
|
247
|
+
if (!(!K || K.pages.length <= 1) && await U(e)) {
|
|
248
|
+
let t = K.pages.filter((t) => t.id !== e).map((e, t) => ({
|
|
241
249
|
...e,
|
|
242
250
|
index: t
|
|
243
251
|
}));
|
|
244
|
-
|
|
245
|
-
...
|
|
252
|
+
G({
|
|
253
|
+
...K,
|
|
246
254
|
pages: t
|
|
247
|
-
}),
|
|
255
|
+
}), j === e && M(t[0]?.id || null);
|
|
248
256
|
}
|
|
249
257
|
}, [
|
|
258
|
+
K,
|
|
250
259
|
G,
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
...G,
|
|
260
|
+
j,
|
|
261
|
+
U
|
|
262
|
+
]), xe = u(async (e) => {
|
|
263
|
+
!K || !l || (G({
|
|
264
|
+
...K,
|
|
257
265
|
pages: e.map((e, t) => ({
|
|
258
266
|
...e,
|
|
259
267
|
index: t
|
|
260
268
|
}))
|
|
261
|
-
}), await
|
|
269
|
+
}), await W(l, e.map((e) => e.id)));
|
|
262
270
|
}, [
|
|
271
|
+
K,
|
|
272
|
+
l,
|
|
263
273
|
G,
|
|
264
|
-
|
|
265
|
-
W,
|
|
266
|
-
U
|
|
274
|
+
W
|
|
267
275
|
]);
|
|
268
|
-
return
|
|
276
|
+
return ce ? /* @__PURE__ */ g("div", {
|
|
277
|
+
className: "flex items-center justify-center h-full",
|
|
278
|
+
children: /* @__PURE__ */ g("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
279
|
+
}) : x ? F ? /* @__PURE__ */ g("div", {
|
|
269
280
|
className: "flex flex-col items-center justify-center h-full p-6",
|
|
270
|
-
children: /* @__PURE__ */
|
|
281
|
+
children: /* @__PURE__ */ _("div", {
|
|
271
282
|
className: "bg-status-error-bg border border-status-error-border rounded-lg p-4 max-w-md",
|
|
272
283
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
284
|
+
/* @__PURE__ */ g("h3", {
|
|
274
285
|
className: "text-sm font-medium text-status-error-text",
|
|
275
|
-
children: "Failed to load dashboard"
|
|
286
|
+
children: y("bigconsole.dashboards.builder.errors.loadFailed", "Failed to load dashboard")
|
|
276
287
|
}),
|
|
277
|
-
/* @__PURE__ */
|
|
288
|
+
/* @__PURE__ */ g("p", {
|
|
278
289
|
className: "text-sm text-text-secondary mt-1",
|
|
279
|
-
children:
|
|
290
|
+
children: F.message
|
|
280
291
|
}),
|
|
281
|
-
/* @__PURE__ */
|
|
292
|
+
/* @__PURE__ */ g("button", {
|
|
282
293
|
type: "button",
|
|
283
|
-
onClick: () =>
|
|
294
|
+
onClick: () => v("/dashboards"),
|
|
284
295
|
className: "mt-3 px-3 py-1.5 text-sm font-medium text-action-primary-fg bg-action-primary-bg hover:bg-action-primary-bgHover rounded-md",
|
|
285
|
-
children: "Back to Dashboards"
|
|
296
|
+
children: y("bigconsole.dashboards.builder.actions.backToDashboards", "Back to Dashboards")
|
|
286
297
|
})
|
|
287
298
|
]
|
|
288
299
|
})
|
|
289
|
-
}) :
|
|
300
|
+
}) : de || !K ? /* @__PURE__ */ g("div", {
|
|
290
301
|
className: "flex items-center justify-center h-full",
|
|
291
|
-
children: /* @__PURE__ */
|
|
292
|
-
}) : /* @__PURE__ */
|
|
293
|
-
topbar: /* @__PURE__ */
|
|
294
|
-
title:
|
|
295
|
-
onBack:
|
|
296
|
-
actions: /* @__PURE__ */
|
|
302
|
+
children: /* @__PURE__ */ g("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
303
|
+
}) : /* @__PURE__ */ _(ee, {
|
|
304
|
+
topbar: /* @__PURE__ */ g(c, {
|
|
305
|
+
title: K.title || y("bigconsole.dashboards.builder.header.untitledDashboard", "Untitled dashboard"),
|
|
306
|
+
onBack: fe,
|
|
307
|
+
actions: /* @__PURE__ */ _("div", {
|
|
297
308
|
className: "flex items-center gap-2",
|
|
298
|
-
children: [
|
|
309
|
+
children: [E ? /* @__PURE__ */ g("span", {
|
|
299
310
|
className: "text-xs font-medium text-status-error-text",
|
|
300
311
|
role: "alert",
|
|
301
|
-
children:
|
|
302
|
-
}) : null, /* @__PURE__ */
|
|
312
|
+
children: E
|
|
313
|
+
}) : null, le ? /* @__PURE__ */ g("button", {
|
|
303
314
|
type: "button",
|
|
304
315
|
"data-testid": "open-custom-widget-builder",
|
|
305
|
-
onClick: () =>
|
|
316
|
+
onClick: () => A(!0),
|
|
306
317
|
className: "rounded-md border border-border-default px-2 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken focus:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-bg",
|
|
307
|
-
children: "AI widget"
|
|
308
|
-
})]
|
|
318
|
+
children: y("bigconsole.dashboards.builder.toolbar.aiWidget", "AI widget")
|
|
319
|
+
}) : null]
|
|
309
320
|
})
|
|
310
321
|
}),
|
|
311
322
|
children: [
|
|
312
|
-
/* @__PURE__ */
|
|
313
|
-
dashboardId:
|
|
314
|
-
pageId:
|
|
315
|
-
title:
|
|
316
|
-
onPaste:
|
|
317
|
-
onSave:
|
|
318
|
-
isSaving:
|
|
319
|
-
onExport:
|
|
320
|
-
pages:
|
|
323
|
+
/* @__PURE__ */ g(s, { canvas: /* @__PURE__ */ g(ne, {
|
|
324
|
+
dashboardId: K.id,
|
|
325
|
+
pageId: j || K.pages?.[0]?.id,
|
|
326
|
+
title: K.title,
|
|
327
|
+
onPaste: $,
|
|
328
|
+
onSave: S ? pe : void 0,
|
|
329
|
+
isSaving: w,
|
|
330
|
+
onExport: C ? me : void 0,
|
|
331
|
+
pages: K.pages.map((e) => ({
|
|
321
332
|
id: e.id,
|
|
322
|
-
name: e.title ||
|
|
333
|
+
name: e.title || y("bigconsole.dashboards.builder.actions.newPageName", "Page {{count}}", { count: (e.index ?? 0) + 1 }),
|
|
323
334
|
order: e.index ?? 0
|
|
324
335
|
})),
|
|
325
|
-
activePageId:
|
|
326
|
-
onPageChange:
|
|
327
|
-
onPageAdd:
|
|
328
|
-
onPageRename:
|
|
329
|
-
onPageDuplicate:
|
|
330
|
-
onPageDelete:
|
|
331
|
-
onPagesReorder:
|
|
336
|
+
activePageId: j || K.pages?.[0]?.id,
|
|
337
|
+
onPageChange: ge,
|
|
338
|
+
onPageAdd: _e,
|
|
339
|
+
onPageRename: ve,
|
|
340
|
+
onPageDuplicate: ye,
|
|
341
|
+
onPageDelete: be,
|
|
342
|
+
onPagesReorder: xe,
|
|
332
343
|
showPageTabs: !0
|
|
333
344
|
}) }),
|
|
334
|
-
/* @__PURE__ */
|
|
335
|
-
isOpen:
|
|
336
|
-
dashboardId:
|
|
337
|
-
dashboardName:
|
|
338
|
-
onClose:
|
|
345
|
+
/* @__PURE__ */ g(re, {
|
|
346
|
+
isOpen: ue,
|
|
347
|
+
dashboardId: K.id,
|
|
348
|
+
dashboardName: K.title,
|
|
349
|
+
onClose: he
|
|
339
350
|
}),
|
|
340
|
-
/* @__PURE__ */
|
|
341
|
-
isOpen:
|
|
342
|
-
onClose: () =>
|
|
343
|
-
dashboardId:
|
|
344
|
-
pageId:
|
|
351
|
+
/* @__PURE__ */ g(ie, {
|
|
352
|
+
isOpen: k,
|
|
353
|
+
onClose: () => A(!1),
|
|
354
|
+
dashboardId: K.id,
|
|
355
|
+
pageId: j || K.pages?.[0]?.id || ""
|
|
345
356
|
})
|
|
346
357
|
]
|
|
358
|
+
}) : /* @__PURE__ */ g(ae, {
|
|
359
|
+
title: y("bigconsole.dashboards.builder.errors.accessDeniedTitle", "Access Denied"),
|
|
360
|
+
description: y("bigconsole.dashboards.builder.errors.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
347
361
|
});
|
|
348
362
|
});
|
|
349
363
|
//#endregion
|
|
350
|
-
export {
|
|
364
|
+
export { y as DashboardBuilderPage, y as default };
|
|
351
365
|
|
|
352
366
|
//# sourceMappingURL=DashboardBuilderPage.js.map
|