@burdenoff/microfe-bigconsole 2026.1122.2 → 2026.1122.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/asof/AsOfProvider.d.ts +7 -0
- package/dist/bigconsole/asof/AsOfProvider.js +5 -2
- package/dist/bigconsole/asof/asOfParam.d.ts +5 -0
- package/dist/bigconsole/asof/asOfParam.js +7 -4
- package/dist/bigconsole/asof/index.d.ts +2 -2
- package/dist/bigconsole/asof/index.js +6 -6
- package/dist/bigconsole/asof/liveOnlySurfaces.d.ts +43 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +133 -127
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.d.ts +16 -0
- package/dist/bigconsole/components/dashboard/DashboardCommentsDrawer.js +308 -0
- package/dist/bigconsole/components/dashboard/DashboardPresenceBar.d.ts +8 -0
- package/dist/bigconsole/components/dashboard/DashboardPresenceBar.js +138 -0
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +51 -51
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.d.ts +3 -1
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/FilterChip.js +34 -34
- package/dist/bigconsole/components/dashboard/GlobalFiltersBar/GlobalFiltersBar.js +154 -145
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +302 -294
- package/dist/bigconsole/components/dashboard/index.d.ts +2 -0
- package/dist/bigconsole/components/dashboard/index.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +165 -163
- package/dist/bigconsole/components/widgets/comments/WidgetComments.d.ts +13 -0
- package/dist/bigconsole/components/widgets/comments/WidgetComments.js +213 -117
- package/dist/bigconsole/components/widgets/comments/commentMentions.d.ts +58 -0
- package/dist/bigconsole/components/widgets/comments/commentMentions.js +66 -0
- package/dist/bigconsole/hooks/index.d.ts +2 -1
- package/dist/bigconsole/hooks/index.js +1 -0
- package/dist/bigconsole/hooks/useDashboardPresence.d.ts +44 -0
- package/dist/bigconsole/hooks/useDashboardPresence.js +147 -0
- package/dist/bigconsole/hooks/useWidgetComments.d.ts +12 -1
- package/dist/bigconsole/hooks/useWidgetComments.js +25 -13
- package/dist/bigconsole/pages/DashboardBuilderPage.js +88 -64
- package/dist/bigconsole/pages/DashboardViewPage.js +255 -221
- package/dist/generated/wspace-operations.d.ts +35 -0
- package/dist/generated/wspace-operations.js +353 -54
- package/package.json +1 -1
|
@@ -12,49 +12,51 @@ import { useReconcileAgentTool as c } from "../components/reconcile/useReconcile
|
|
|
12
12
|
import "../components/common/index.js";
|
|
13
13
|
import te from "../hooks/usePageOperations.js";
|
|
14
14
|
import "../components/narrative/index.js";
|
|
15
|
-
import { AsOfProvider as
|
|
15
|
+
import { AsOfProvider as l, HideWhenAsOf as u, useAsOf as ne } from "../asof/AsOfProvider.js";
|
|
16
16
|
import "../store/index.js";
|
|
17
17
|
import "../hooks/index.js";
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import { DashboardCanvas as
|
|
21
|
-
import { dashboardPageTabs as
|
|
22
|
-
import { LiveCanvasToggle as
|
|
23
|
-
import { ExportDashboardDialog as
|
|
24
|
-
import { DrilldownBreadcrumb as
|
|
25
|
-
import { PublishToStoreDialog as
|
|
26
|
-
import { DashboardReviewDialog as
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
18
|
+
import re, { parseUrlToGlobalFilterValues as ie } from "../hooks/useFilterUrlSync.js";
|
|
19
|
+
import ae from "../hooks/useActivePage.js";
|
|
20
|
+
import { DashboardCanvas as oe } from "../components/dashboard/DashboardCanvas.js";
|
|
21
|
+
import { dashboardPageTabs as se } from "../assistant/pageControls.js";
|
|
22
|
+
import { LiveCanvasToggle as ce } from "../components/dashboard/LiveCanvasToggle.js";
|
|
23
|
+
import { ExportDashboardDialog as le } from "../components/dashboard/ExportDashboardDialog.js";
|
|
24
|
+
import { DrilldownBreadcrumb as ue } from "../components/dashboard/DrilldownBreadcrumb.js";
|
|
25
|
+
import { PublishToStoreDialog as de } from "../components/dashboard/PublishToStoreDialog.js";
|
|
26
|
+
import { DashboardReviewDialog as fe } from "../components/dashboard/DashboardReviewDialog.js";
|
|
27
|
+
import { DashboardPresenceBar as pe } from "../components/dashboard/DashboardPresenceBar.js";
|
|
28
|
+
import { DashboardCommentsDrawer as me } from "../components/dashboard/DashboardCommentsDrawer.js";
|
|
29
|
+
import { loadBigConsoleSettings as he } from "../hooks/useBigConsoleSettings.js";
|
|
30
|
+
import { LIVE_STRUCTURE_POLL_MS as ge, isLiveDataRefreshDue as _e } from "../utils/liveBoardRefresh.js";
|
|
31
|
+
import { registerBreadcrumbName as ve, unregisterBreadcrumbName as ye } from "../utils/breadcrumbRegistry.js";
|
|
32
|
+
import { DigestPanel as be } from "../components/narrative/DigestPanel.js";
|
|
33
|
+
import { GetWidgetDocument as xe } from "../../generated/wspace-operations.js";
|
|
34
|
+
import { dashboardSuggestAnchorProps as Se } from "../proactive/entities.js";
|
|
35
|
+
import { memo as d, useCallback as f, useEffect as p, useMemo as m, useRef as Ce, useState as h } from "react";
|
|
36
|
+
import { useLocation as we, useParams as Te } from "react-router";
|
|
37
|
+
import { AccessDenied as Ee } from "@burdenoff/fe-libs/shared/components";
|
|
38
|
+
import { usePermissions as De } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
39
|
+
import { ArrowLeft as Oe, MessageSquare as ke, Sparkles as Ae } from "lucide-react";
|
|
40
|
+
import { Button as g, IllustratedEmptyState as je } from "@burdenoff/fe-libs/ui";
|
|
41
|
+
import { useI18n as Me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
42
|
+
import { useApolloClient as Ne } from "@apollo/client/react";
|
|
43
|
+
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
44
|
+
import { useAssistantPageControls as Pe } from "@burdenoff/fe-libs/shared/assistant/appControls/useAssistantControl";
|
|
43
45
|
// src/bigconsole/pages/DashboardViewPage.tsx
|
|
44
|
-
var
|
|
45
|
-
let { dashboardId: r } =
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
var b = d(function() {
|
|
47
|
+
let { dashboardId: r } = Te(), c = a(), l = i(), { t: d } = Me(), b = ne().asOf !== null, x = Ne(), { hasPermission: S, isLoading: C } = De(), w = S(n.DASHBOARD_READ), Ie = S(n.DASHBOARD_UPDATE), Le = S(n.DASHBOARD_EXPORT), Re = S(n.DASHBOARD_PUBLISH), [ze, Be] = h(!1), [T, E] = h(!1), [Ve, He] = h(!1), [D, Ue] = h(!1), [O, k] = h(!1), [A, j] = h(!1), { isInDrilldown: M, getContextFromUrl: We, getDrilldownMetadata: N } = re(), P = t((e) => e.currentDashboard), F = t((e) => e.setCurrentDashboard), I = t((e) => e.setGlobalFilterValue), L = t((e) => e.viewMode), R = t((e) => e.setViewMode);
|
|
48
|
+
p(() => {
|
|
49
|
+
b && L === "edit" && R("view");
|
|
48
50
|
}, [
|
|
49
|
-
|
|
51
|
+
b,
|
|
50
52
|
L,
|
|
51
|
-
|
|
53
|
+
R
|
|
52
54
|
]);
|
|
53
|
-
let
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}, [
|
|
57
|
-
let
|
|
55
|
+
let z = e((e) => e.closeConfigPanel);
|
|
56
|
+
p(() => {
|
|
57
|
+
b && z();
|
|
58
|
+
}, [b, z]);
|
|
59
|
+
let Ge = t((e) => e.clearAllGlobalFilters), Ke = t((e) => e.setGlobalFilterValues), B = e((e) => e.widgets), qe = we(), { activePageId: V, setActivePage: H } = ae(P?.id === r ? P?.pages : void 0), U = e((e) => e.clipboardWidgetId), W = e((e) => e.clipboardAction), G = e((e) => e.clearClipboard), K = e((e) => e.selectWidget), { loading: q, error: J, fetchDashboard: Y, updateDashboard: Je } = ee(), { createWidget: Ye, deleteWidget: Xe, duplicateWidget: Ze, batchUpdatePositions: Qe, refetch: $e } = s(V || void 0, r), { createPage: et, updatePage: tt, deletePage: nt, duplicatePage: rt, reorderPages: it } = te(), at = f((e) => {
|
|
58
60
|
let t = e?.parentElement;
|
|
59
61
|
if (!e || !t) return;
|
|
60
62
|
let n = t;
|
|
@@ -73,100 +75,100 @@ var y = u(function() {
|
|
|
73
75
|
a.disconnect(), s.disconnect();
|
|
74
76
|
};
|
|
75
77
|
}, []);
|
|
76
|
-
|
|
78
|
+
p(() => {
|
|
77
79
|
if (!r) c("/dashboards");
|
|
78
|
-
else return
|
|
79
|
-
e ||
|
|
80
|
+
else return Ke(ie(window.location.search, "filter_")), E(!1), Y(r).then((e) => {
|
|
81
|
+
e || E(!0);
|
|
80
82
|
}), () => {
|
|
81
|
-
F(null),
|
|
83
|
+
F(null), Ge(), E(!1);
|
|
82
84
|
};
|
|
83
85
|
}, [
|
|
84
86
|
r,
|
|
85
87
|
c,
|
|
86
|
-
|
|
88
|
+
Y,
|
|
87
89
|
F,
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
]),
|
|
91
|
-
if (!
|
|
92
|
-
let e =
|
|
90
|
+
Ge,
|
|
91
|
+
Ke
|
|
92
|
+
]), p(() => {
|
|
93
|
+
if (!M) return;
|
|
94
|
+
let e = We(), t = N();
|
|
93
95
|
Object.entries(e).forEach(([e, t]) => {
|
|
94
96
|
I(`ctx_${e}`, t);
|
|
95
97
|
}), t.depth > 0 && (I("__drilldown_depth", t.depth), I("__drilldown_parent", t.parent), I("__drilldown_path", t.path)), Object.keys(e).length;
|
|
96
98
|
}, [
|
|
97
|
-
j,
|
|
98
99
|
M,
|
|
100
|
+
We,
|
|
99
101
|
N,
|
|
100
102
|
I,
|
|
101
|
-
|
|
103
|
+
qe.search
|
|
102
104
|
]);
|
|
103
|
-
let
|
|
104
|
-
|
|
105
|
-
if (!
|
|
105
|
+
let ot = Ce($e);
|
|
106
|
+
ot.current = $e, p(() => {
|
|
107
|
+
if (!D || !r || b) return;
|
|
106
108
|
let e = null, n = () => {
|
|
107
109
|
if (typeof document < "u" && document.visibilityState !== "visible" || t.getState().viewMode === "edit") return;
|
|
108
|
-
|
|
110
|
+
Y(r, { silent: !0 }), ot.current();
|
|
109
111
|
let n = Date.now();
|
|
110
|
-
|
|
112
|
+
_e(e, n) && (e = n, x.refetchQueries({ include: [xe] }).catch((e) => {
|
|
111
113
|
console.warn("[DashboardViewPage] Live widget data refresh failed", e);
|
|
112
114
|
}));
|
|
113
115
|
};
|
|
114
116
|
n();
|
|
115
|
-
let i = window.setInterval(n,
|
|
117
|
+
let i = window.setInterval(n, ge), a = () => {
|
|
116
118
|
document.visibilityState === "visible" && (e = null, n());
|
|
117
119
|
};
|
|
118
120
|
return document.addEventListener("visibilitychange", a), () => {
|
|
119
121
|
window.clearInterval(i), document.removeEventListener("visibilitychange", a);
|
|
120
122
|
};
|
|
121
123
|
}, [
|
|
122
|
-
|
|
124
|
+
D,
|
|
123
125
|
r,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
b,
|
|
127
|
+
Y,
|
|
128
|
+
x
|
|
127
129
|
]);
|
|
128
|
-
let
|
|
129
|
-
if (r && !
|
|
130
|
-
|
|
130
|
+
let st = f(async () => {
|
|
131
|
+
if (r && !b) {
|
|
132
|
+
Be(!0);
|
|
131
133
|
try {
|
|
132
|
-
let e = Array.from(
|
|
134
|
+
let e = Array.from(B.values());
|
|
133
135
|
if (e.length > 0) {
|
|
134
136
|
let t = e.map((e) => ({
|
|
135
137
|
id: e.id,
|
|
136
138
|
position: e.position
|
|
137
139
|
}));
|
|
138
|
-
await
|
|
140
|
+
await Qe(t);
|
|
139
141
|
}
|
|
140
|
-
P && await
|
|
142
|
+
P && await Je({
|
|
141
143
|
id: r,
|
|
142
144
|
name: P.name,
|
|
143
145
|
description: P.description
|
|
144
146
|
});
|
|
145
147
|
} catch {} finally {
|
|
146
|
-
|
|
148
|
+
Be(!1);
|
|
147
149
|
}
|
|
148
150
|
}
|
|
149
151
|
}, [
|
|
150
152
|
r,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
+
b,
|
|
154
|
+
B,
|
|
153
155
|
P,
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
]),
|
|
156
|
+
Qe,
|
|
157
|
+
Je
|
|
158
|
+
]), ct = f(() => {
|
|
157
159
|
c("/dashboards");
|
|
158
|
-
}, [c]), X =
|
|
159
|
-
|
|
160
|
-
}, [
|
|
160
|
+
}, [c]), X = f((e) => {
|
|
161
|
+
H(e);
|
|
162
|
+
}, [H]), Z = m(() => (P?.pages || []).map((e, t) => ({
|
|
161
163
|
id: e.id,
|
|
162
|
-
name: e.name ||
|
|
164
|
+
name: e.name || d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: t + 1 }),
|
|
163
165
|
order: e.order ?? 0
|
|
164
|
-
})), [P?.pages,
|
|
165
|
-
|
|
166
|
-
if (r && Q) return
|
|
166
|
+
})), [P?.pages, d]), Q = P && P.id === r ? P.name : null, $ = V || P?.pages?.[0]?.id || null;
|
|
167
|
+
p(() => {
|
|
168
|
+
if (r && Q) return ve(r, Q), () => ye(r);
|
|
167
169
|
}, [r, Q]);
|
|
168
|
-
let
|
|
169
|
-
dashboardName: Q ||
|
|
170
|
+
let lt = m(() => !C && w && !J && !T && !q && Q !== null ? se({
|
|
171
|
+
dashboardName: Q || d("bigconsole.dashboards.title", "Dashboards"),
|
|
170
172
|
tabs: Z.map((e) => ({
|
|
171
173
|
id: e.id,
|
|
172
174
|
label: e.name
|
|
@@ -174,39 +176,39 @@ var y = u(function() {
|
|
|
174
176
|
current: $,
|
|
175
177
|
select: X
|
|
176
178
|
}) : null, [
|
|
177
|
-
S,
|
|
178
179
|
C,
|
|
180
|
+
w,
|
|
181
|
+
J,
|
|
182
|
+
T,
|
|
179
183
|
q,
|
|
180
|
-
E,
|
|
181
|
-
K,
|
|
182
184
|
Q,
|
|
183
185
|
Z,
|
|
184
186
|
$,
|
|
185
187
|
X,
|
|
186
|
-
|
|
188
|
+
d
|
|
187
189
|
]);
|
|
188
|
-
|
|
189
|
-
let
|
|
190
|
-
let e =
|
|
191
|
-
if (!
|
|
192
|
-
let t =
|
|
190
|
+
Pe(lt);
|
|
191
|
+
let ut = f(async () => {
|
|
192
|
+
let e = V || P?.pages?.[0]?.id;
|
|
193
|
+
if (!U || !r || !e) return;
|
|
194
|
+
let t = B.get(U);
|
|
193
195
|
if (!t) {
|
|
194
|
-
|
|
196
|
+
G();
|
|
195
197
|
return;
|
|
196
198
|
}
|
|
197
199
|
let n = {
|
|
198
200
|
x: 0,
|
|
199
|
-
y: Array.from(
|
|
201
|
+
y: Array.from(B.values()).reduce((e, t) => {
|
|
200
202
|
let n = (t.positionY ?? 0) + (t.positionHeight ?? 4);
|
|
201
203
|
return Math.max(e, n);
|
|
202
204
|
}, 0),
|
|
203
205
|
width: Math.min(t.positionWidth ?? 4, P?.pages.find((t) => t.id === e)?.gridColumns ?? 12),
|
|
204
206
|
height: t.positionHeight ?? 4
|
|
205
|
-
}, i =
|
|
207
|
+
}, i = W === "copy" ? d("bigconsole.dashboards.view.widgetCopyTitle", "{{title}} (Copy)", { title: t.title }) : t.title, a = null;
|
|
206
208
|
try {
|
|
207
|
-
a = await
|
|
209
|
+
a = await Ze(U, n, i);
|
|
208
210
|
} catch {}
|
|
209
|
-
a ||= await
|
|
211
|
+
a ||= await Ye({
|
|
210
212
|
pageId: e,
|
|
211
213
|
dashboardId: r,
|
|
212
214
|
type: t.type,
|
|
@@ -220,48 +222,49 @@ var y = u(function() {
|
|
|
220
222
|
position: n,
|
|
221
223
|
refreshInterval: t.refreshInterval ?? void 0,
|
|
222
224
|
metadata: t.metadata
|
|
223
|
-
}), a && (
|
|
225
|
+
}), a && (K(a.id), W === "cut" && await Xe(U)), G();
|
|
224
226
|
}, [
|
|
225
|
-
H,
|
|
226
227
|
U,
|
|
228
|
+
W,
|
|
227
229
|
r,
|
|
228
|
-
|
|
230
|
+
V,
|
|
229
231
|
P,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
232
|
+
B,
|
|
233
|
+
Ze,
|
|
234
|
+
Ye,
|
|
235
|
+
Xe,
|
|
236
|
+
K,
|
|
234
237
|
G,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
let e = (P.pages?.length || 0) + 1, t = u("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await Ye({
|
|
238
|
+
d
|
|
239
|
+
]), dt = f(() => {
|
|
240
|
+
He(!0);
|
|
241
|
+
}, []), [ft, pt] = h(!1), mt = f(() => {
|
|
242
|
+
pt(!0);
|
|
243
|
+
}, []), ht = f(() => {
|
|
244
|
+
pt(!1);
|
|
245
|
+
}, []), gt = f(() => {
|
|
246
|
+
He(!1);
|
|
247
|
+
}, []), [_t, vt] = h(!1), yt = f(() => vt(!0), []), bt = f(() => vt(!1), []), xt = f(async () => {
|
|
248
|
+
if (!P || !r || b) return;
|
|
249
|
+
let e = (P.pages?.length || 0) + 1, t = d("bigconsole.dashboards.view.pageName", "Page {{count}}", { count: e }), n = await et({
|
|
248
250
|
dashboardId: r,
|
|
249
251
|
name: t,
|
|
250
|
-
gridColumns:
|
|
252
|
+
gridColumns: he().defaultGridColumns
|
|
251
253
|
});
|
|
252
254
|
n && (F({
|
|
253
255
|
...P,
|
|
254
256
|
pages: [...P.pages || [], n]
|
|
255
|
-
}),
|
|
257
|
+
}), H(n.id));
|
|
256
258
|
}, [
|
|
257
259
|
P,
|
|
258
260
|
r,
|
|
261
|
+
b,
|
|
259
262
|
F,
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
]),
|
|
264
|
-
P && await
|
|
263
|
+
et,
|
|
264
|
+
H,
|
|
265
|
+
d
|
|
266
|
+
]), St = f(async (e, t) => {
|
|
267
|
+
P && !b && await tt({
|
|
265
268
|
id: e,
|
|
266
269
|
name: t
|
|
267
270
|
}) && F({
|
|
@@ -273,26 +276,28 @@ var y = u(function() {
|
|
|
273
276
|
});
|
|
274
277
|
}, [
|
|
275
278
|
P,
|
|
279
|
+
b,
|
|
276
280
|
F,
|
|
277
|
-
|
|
278
|
-
]),
|
|
279
|
-
if (!P || !r) return;
|
|
281
|
+
tt
|
|
282
|
+
]), Ct = f(async (e) => {
|
|
283
|
+
if (!P || !r || b) return;
|
|
280
284
|
let t = P.pages?.find((t) => t.id === e);
|
|
281
285
|
if (!t) return;
|
|
282
|
-
let n = await
|
|
286
|
+
let n = await rt(e, d("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
|
|
283
287
|
n && (F({
|
|
284
288
|
...P,
|
|
285
289
|
pages: [...P.pages || [], n]
|
|
286
|
-
}),
|
|
290
|
+
}), H(n.id));
|
|
287
291
|
}, [
|
|
288
292
|
P,
|
|
289
293
|
r,
|
|
294
|
+
b,
|
|
290
295
|
F,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
]),
|
|
295
|
-
if (!(!P || (P.pages?.length || 0) <= 1) && await
|
|
296
|
+
rt,
|
|
297
|
+
H,
|
|
298
|
+
d
|
|
299
|
+
]), wt = f(async (e) => {
|
|
300
|
+
if (!(!P || b || (P.pages?.length || 0) <= 1) && await nt(e)) {
|
|
296
301
|
let t = P.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
297
302
|
...e,
|
|
298
303
|
order: t
|
|
@@ -302,16 +307,17 @@ var y = u(function() {
|
|
|
302
307
|
pages: t
|
|
303
308
|
});
|
|
304
309
|
let n = t?.[0]?.id;
|
|
305
|
-
|
|
310
|
+
V === e && n && H(n, { replace: !0 });
|
|
306
311
|
}
|
|
307
312
|
}, [
|
|
308
313
|
P,
|
|
314
|
+
b,
|
|
309
315
|
F,
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
]),
|
|
314
|
-
if (!P || !r) return;
|
|
316
|
+
V,
|
|
317
|
+
nt,
|
|
318
|
+
H
|
|
319
|
+
]), Tt = f(async (e) => {
|
|
320
|
+
if (!P || !r || b) return;
|
|
315
321
|
F({
|
|
316
322
|
...P,
|
|
317
323
|
pages: e.map((e, t) => ({
|
|
@@ -320,185 +326,213 @@ var y = u(function() {
|
|
|
320
326
|
}))
|
|
321
327
|
});
|
|
322
328
|
let t = e.map((e) => e.id);
|
|
323
|
-
await
|
|
329
|
+
await it(r, t);
|
|
324
330
|
}, [
|
|
325
331
|
P,
|
|
326
332
|
r,
|
|
333
|
+
b,
|
|
327
334
|
F,
|
|
328
|
-
|
|
335
|
+
it
|
|
329
336
|
]);
|
|
330
|
-
return
|
|
337
|
+
return C ? /* @__PURE__ */ v("div", {
|
|
331
338
|
className: "flex items-center justify-center h-full",
|
|
332
|
-
children: /* @__PURE__ */
|
|
333
|
-
}) :
|
|
339
|
+
children: /* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" })
|
|
340
|
+
}) : w ? J ? /* @__PURE__ */ v("div", {
|
|
334
341
|
className: "flex h-full flex-col items-center justify-center",
|
|
335
342
|
style: { padding: "var(--space-pagePadding)" },
|
|
336
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ v(o, {
|
|
337
344
|
headingLevel: 2,
|
|
338
345
|
tone: "danger",
|
|
339
|
-
title:
|
|
340
|
-
description: /* @__PURE__ */
|
|
346
|
+
title: d("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
347
|
+
description: /* @__PURE__ */ v("span", {
|
|
341
348
|
className: "break-words",
|
|
342
|
-
children:
|
|
349
|
+
children: J.message
|
|
343
350
|
}),
|
|
344
351
|
className: "w-full max-w-md",
|
|
345
352
|
"data-testid": "dashboard-view-error",
|
|
346
|
-
actions: /* @__PURE__ */
|
|
353
|
+
actions: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(g, {
|
|
347
354
|
size: "sm",
|
|
348
|
-
onClick: () =>
|
|
349
|
-
children:
|
|
350
|
-
}), /* @__PURE__ */
|
|
355
|
+
onClick: () => Y(r),
|
|
356
|
+
children: d("bigconsole.dashboards.view.retry", "Retry")
|
|
357
|
+
}), /* @__PURE__ */ v(g, {
|
|
351
358
|
size: "sm",
|
|
352
359
|
variant: "outline",
|
|
353
360
|
onClick: () => c("/dashboards"),
|
|
354
|
-
children:
|
|
361
|
+
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
355
362
|
})] })
|
|
356
363
|
})
|
|
357
|
-
}) :
|
|
364
|
+
}) : T ? /* @__PURE__ */ v("div", {
|
|
358
365
|
className: "flex flex-col items-center justify-center h-full",
|
|
359
366
|
style: { padding: "var(--space-pagePadding)" },
|
|
360
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ v(je, {
|
|
361
368
|
illustration: "empty-data",
|
|
362
|
-
title:
|
|
363
|
-
description: /* @__PURE__ */
|
|
369
|
+
title: d("bigconsole.dashboards.view.notFoundTitle", "Dashboard not found"),
|
|
370
|
+
description: /* @__PURE__ */ y(_, { children: [d("bigconsole.dashboards.view.notFoundDescription", "The dashboard you're looking for doesn't exist or has been deleted."), /* @__PURE__ */ v("span", {
|
|
364
371
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
365
|
-
children:
|
|
372
|
+
children: d("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: r ?? "" })
|
|
366
373
|
})] }),
|
|
367
|
-
action: /* @__PURE__ */
|
|
374
|
+
action: /* @__PURE__ */ v(g, {
|
|
368
375
|
onClick: () => c("/dashboards"),
|
|
369
|
-
children:
|
|
376
|
+
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
370
377
|
})
|
|
371
378
|
})
|
|
372
|
-
}) :
|
|
379
|
+
}) : q || !P ? /* @__PURE__ */ v("div", {
|
|
373
380
|
className: "flex items-center justify-center h-full",
|
|
374
381
|
role: "status",
|
|
375
382
|
"aria-live": "polite",
|
|
376
|
-
children: /* @__PURE__ */
|
|
383
|
+
children: /* @__PURE__ */ y("div", {
|
|
377
384
|
className: "flex flex-col items-center gap-4",
|
|
378
|
-
children: [/* @__PURE__ */
|
|
385
|
+
children: [/* @__PURE__ */ v("div", { className: "animate-spin w-8 h-8 border-4 border-action-primary-bg border-t-transparent rounded-full" }), /* @__PURE__ */ v("p", {
|
|
379
386
|
className: "text-sm text-text-secondary",
|
|
380
|
-
children:
|
|
387
|
+
children: d("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
381
388
|
})]
|
|
382
389
|
})
|
|
383
|
-
}) : /* @__PURE__ */
|
|
384
|
-
ref:
|
|
390
|
+
}) : /* @__PURE__ */ y(_, { children: [!b && /* @__PURE__ */ v(Fe, {}), /* @__PURE__ */ y("div", {
|
|
391
|
+
ref: at,
|
|
385
392
|
className: "h-full flex flex-col overflow-hidden",
|
|
386
393
|
children: [
|
|
387
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ v(o, {
|
|
388
395
|
emphasis: "bare",
|
|
389
396
|
padding: "none",
|
|
390
397
|
"data-testid": "dashboard-route-header",
|
|
391
398
|
"aria-label": "Dashboard",
|
|
392
399
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
393
400
|
headerClassName: "",
|
|
394
|
-
header: /* @__PURE__ */
|
|
401
|
+
header: /* @__PURE__ */ y("div", {
|
|
395
402
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
396
403
|
children: [
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
onClick:
|
|
404
|
+
/* @__PURE__ */ y(g, {
|
|
405
|
+
onClick: ct,
|
|
399
406
|
variant: "ghost",
|
|
400
407
|
size: "sm",
|
|
401
|
-
title:
|
|
402
|
-
"aria-label":
|
|
408
|
+
title: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
409
|
+
"aria-label": d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
403
410
|
className: "flex-shrink-0",
|
|
404
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ v(Oe, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.back", "Back")]
|
|
405
412
|
}),
|
|
406
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ v("h1", {
|
|
407
414
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
408
415
|
title: P.name,
|
|
409
|
-
...
|
|
416
|
+
...Se(P.id),
|
|
410
417
|
children: P.name
|
|
411
418
|
}),
|
|
412
|
-
!
|
|
419
|
+
!b && /* @__PURE__ */ v(pe, {
|
|
420
|
+
dashboardId: P.id,
|
|
421
|
+
enabled: !b
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
413
424
|
className: "flex-shrink-0",
|
|
414
|
-
children: /* @__PURE__ */
|
|
415
|
-
|
|
416
|
-
|
|
425
|
+
children: /* @__PURE__ */ y(g, {
|
|
426
|
+
onClick: () => j((e) => !e),
|
|
427
|
+
variant: A ? "secondary" : "ghost",
|
|
428
|
+
size: "sm",
|
|
429
|
+
"aria-pressed": A,
|
|
430
|
+
"data-testid": "dashboard-comments-button",
|
|
431
|
+
title: d("bigconsole.dashboard.comments.openButton", "Console comments"),
|
|
432
|
+
"aria-label": d("bigconsole.dashboard.comments.openButton", "Console comments"),
|
|
433
|
+
children: [/* @__PURE__ */ v(ke, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboard.comments.buttonLabel", "Comments")]
|
|
434
|
+
})
|
|
435
|
+
}) }),
|
|
436
|
+
!b && /* @__PURE__ */ v("div", {
|
|
437
|
+
className: "flex-shrink-0",
|
|
438
|
+
children: /* @__PURE__ */ v(ce, {
|
|
439
|
+
isLive: D,
|
|
440
|
+
onToggle: () => Ue((e) => !e)
|
|
417
441
|
})
|
|
418
442
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
420
444
|
className: "flex-shrink-0",
|
|
421
|
-
children: /* @__PURE__ */
|
|
422
|
-
onClick: () =>
|
|
445
|
+
children: /* @__PURE__ */ y(g, {
|
|
446
|
+
onClick: () => k((e) => !e),
|
|
423
447
|
variant: "ghost",
|
|
424
448
|
size: "sm",
|
|
425
|
-
"aria-pressed":
|
|
426
|
-
title:
|
|
427
|
-
"aria-label":
|
|
428
|
-
children: [/* @__PURE__ */
|
|
449
|
+
"aria-pressed": O,
|
|
450
|
+
title: d("bigconsole.dashboards.view.digest", "Console digest"),
|
|
451
|
+
"aria-label": d("bigconsole.dashboards.view.digest", "Console digest"),
|
|
452
|
+
children: [/* @__PURE__ */ v(Ae, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.digest", "Digest")]
|
|
429
453
|
})
|
|
430
454
|
}) })
|
|
431
455
|
]
|
|
432
456
|
})
|
|
433
457
|
}),
|
|
434
|
-
|
|
458
|
+
O && P && /* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
435
459
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
436
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ v("div", {
|
|
437
461
|
className: "mx-auto max-w-3xl",
|
|
438
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ v(be, {
|
|
439
463
|
dashboardId: P.id,
|
|
440
|
-
onClose: () =>
|
|
464
|
+
onClose: () => k(!1)
|
|
441
465
|
})
|
|
442
466
|
})
|
|
443
467
|
}) }),
|
|
444
|
-
|
|
468
|
+
M && !b && /* @__PURE__ */ v(ue, {
|
|
445
469
|
currentDashboardId: P.id,
|
|
446
470
|
currentDashboardName: P.name,
|
|
447
|
-
basePath: `${
|
|
471
|
+
basePath: `${l}/dashboards`
|
|
448
472
|
}),
|
|
449
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ v("div", {
|
|
450
474
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
451
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ v(oe, {
|
|
452
476
|
dashboardId: P.id,
|
|
453
|
-
pageId:
|
|
477
|
+
pageId: V || P.pages?.[0]?.id,
|
|
454
478
|
title: P.name,
|
|
455
|
-
onPaste:
|
|
456
|
-
onSave:
|
|
457
|
-
isSaving:
|
|
458
|
-
onReview:
|
|
459
|
-
onExport:
|
|
460
|
-
onPublishTemplate:
|
|
479
|
+
onPaste: ut,
|
|
480
|
+
onSave: Ie && !b ? st : void 0,
|
|
481
|
+
isSaving: ze,
|
|
482
|
+
onReview: b ? void 0 : yt,
|
|
483
|
+
onExport: Le && !b ? dt : void 0,
|
|
484
|
+
onPublishTemplate: Re && !b ? mt : void 0,
|
|
461
485
|
pages: Z,
|
|
462
486
|
activePageId: $ ?? void 0,
|
|
463
487
|
onPageChange: X,
|
|
464
|
-
onPageAdd:
|
|
465
|
-
onPageRename:
|
|
466
|
-
onPageDuplicate:
|
|
467
|
-
onPageDelete:
|
|
468
|
-
onPagesReorder:
|
|
488
|
+
onPageAdd: xt,
|
|
489
|
+
onPageRename: St,
|
|
490
|
+
onPageDuplicate: Ct,
|
|
491
|
+
onPageDelete: wt,
|
|
492
|
+
onPagesReorder: Tt,
|
|
469
493
|
showPageTabs: !0
|
|
470
494
|
})
|
|
471
495
|
}),
|
|
472
|
-
/* @__PURE__ */
|
|
473
|
-
open:
|
|
474
|
-
onClose:
|
|
496
|
+
/* @__PURE__ */ v(fe, {
|
|
497
|
+
open: _t && !b,
|
|
498
|
+
onClose: bt,
|
|
475
499
|
dashboardId: P.id,
|
|
476
500
|
pages: Z,
|
|
477
|
-
canFix:
|
|
501
|
+
canFix: Ie && !b
|
|
478
502
|
}),
|
|
479
|
-
/* @__PURE__ */
|
|
480
|
-
isOpen:
|
|
503
|
+
/* @__PURE__ */ v(le, {
|
|
504
|
+
isOpen: Ve && !b,
|
|
481
505
|
dashboardId: P.id,
|
|
482
506
|
dashboardName: P.name,
|
|
483
|
-
onClose:
|
|
507
|
+
onClose: gt
|
|
508
|
+
}),
|
|
509
|
+
!b && /* @__PURE__ */ v(me, {
|
|
510
|
+
dashboardId: P.id,
|
|
511
|
+
isOpen: A && !b,
|
|
512
|
+
onClose: () => j(!1),
|
|
513
|
+
widgets: Array.from(B.values()).map((e) => ({
|
|
514
|
+
id: e.id,
|
|
515
|
+
title: e.title || e.type
|
|
516
|
+
})),
|
|
517
|
+
onSelectWidget: (e) => K(e)
|
|
484
518
|
}),
|
|
485
|
-
/* @__PURE__ */
|
|
486
|
-
isOpen:
|
|
519
|
+
/* @__PURE__ */ v(de, {
|
|
520
|
+
isOpen: ft && !b,
|
|
487
521
|
dashboardId: P.id,
|
|
488
522
|
dashboardName: P.name,
|
|
489
523
|
dashboardDescription: P.description,
|
|
490
|
-
onClose:
|
|
524
|
+
onClose: ht
|
|
491
525
|
})
|
|
492
526
|
]
|
|
493
|
-
})] }) : /* @__PURE__ */
|
|
494
|
-
title:
|
|
495
|
-
description:
|
|
527
|
+
})] }) : /* @__PURE__ */ v(Ee, {
|
|
528
|
+
title: d("bigconsole.dashboards.view.accessDeniedTitle", "Access Denied"),
|
|
529
|
+
description: d("bigconsole.dashboards.view.accessDeniedDescription", "You don't have permission to view this dashboard.")
|
|
496
530
|
});
|
|
497
|
-
}),
|
|
531
|
+
}), Fe = () => (c(), null), x = d(function() {
|
|
498
532
|
let { workspaceId: e } = r();
|
|
499
|
-
return /* @__PURE__ */
|
|
533
|
+
return /* @__PURE__ */ v(l, {
|
|
500
534
|
workspaceId: e,
|
|
501
|
-
children: /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ v(b, {})
|
|
502
536
|
});
|
|
503
537
|
});
|
|
504
|
-
export {
|
|
538
|
+
export { b as DashboardViewPage, x as default };
|