@burdenoff/microfe-bigconsole 2026.1122.3 → 2026.1122.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/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/index.d.ts +2 -0
- package/dist/bigconsole/components/dashboard/index.js +3 -1
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +1 -0
- 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 -226
- 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,49 +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,
|
|
259
|
-
|
|
261
|
+
b,
|
|
260
262
|
F,
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
]),
|
|
265
|
-
P && !
|
|
263
|
+
et,
|
|
264
|
+
H,
|
|
265
|
+
d
|
|
266
|
+
]), St = f(async (e, t) => {
|
|
267
|
+
P && !b && await tt({
|
|
266
268
|
id: e,
|
|
267
269
|
name: t
|
|
268
270
|
}) && F({
|
|
@@ -274,28 +276,28 @@ var y = u(function() {
|
|
|
274
276
|
});
|
|
275
277
|
}, [
|
|
276
278
|
P,
|
|
277
|
-
|
|
279
|
+
b,
|
|
278
280
|
F,
|
|
279
|
-
|
|
280
|
-
]),
|
|
281
|
-
if (!P || !r ||
|
|
281
|
+
tt
|
|
282
|
+
]), Ct = f(async (e) => {
|
|
283
|
+
if (!P || !r || b) return;
|
|
282
284
|
let t = P.pages?.find((t) => t.id === e);
|
|
283
285
|
if (!t) return;
|
|
284
|
-
let n = await
|
|
286
|
+
let n = await rt(e, d("bigconsole.dashboards.view.pageCopyName", "{{name}} (Copy)", { name: t.name ?? "" }));
|
|
285
287
|
n && (F({
|
|
286
288
|
...P,
|
|
287
289
|
pages: [...P.pages || [], n]
|
|
288
|
-
}),
|
|
290
|
+
}), H(n.id));
|
|
289
291
|
}, [
|
|
290
292
|
P,
|
|
291
293
|
r,
|
|
292
|
-
|
|
294
|
+
b,
|
|
293
295
|
F,
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
]),
|
|
298
|
-
if (!(!P ||
|
|
296
|
+
rt,
|
|
297
|
+
H,
|
|
298
|
+
d
|
|
299
|
+
]), wt = f(async (e) => {
|
|
300
|
+
if (!(!P || b || (P.pages?.length || 0) <= 1) && await nt(e)) {
|
|
299
301
|
let t = P.pages?.filter((t) => t.id !== e).map((e, t) => ({
|
|
300
302
|
...e,
|
|
301
303
|
order: t
|
|
@@ -305,17 +307,17 @@ var y = u(function() {
|
|
|
305
307
|
pages: t
|
|
306
308
|
});
|
|
307
309
|
let n = t?.[0]?.id;
|
|
308
|
-
|
|
310
|
+
V === e && n && H(n, { replace: !0 });
|
|
309
311
|
}
|
|
310
312
|
}, [
|
|
311
313
|
P,
|
|
312
|
-
|
|
314
|
+
b,
|
|
313
315
|
F,
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
]),
|
|
318
|
-
if (!P || !r ||
|
|
316
|
+
V,
|
|
317
|
+
nt,
|
|
318
|
+
H
|
|
319
|
+
]), Tt = f(async (e) => {
|
|
320
|
+
if (!P || !r || b) return;
|
|
319
321
|
F({
|
|
320
322
|
...P,
|
|
321
323
|
pages: e.map((e, t) => ({
|
|
@@ -324,186 +326,213 @@ var y = u(function() {
|
|
|
324
326
|
}))
|
|
325
327
|
});
|
|
326
328
|
let t = e.map((e) => e.id);
|
|
327
|
-
await
|
|
329
|
+
await it(r, t);
|
|
328
330
|
}, [
|
|
329
331
|
P,
|
|
330
332
|
r,
|
|
331
|
-
|
|
333
|
+
b,
|
|
332
334
|
F,
|
|
333
|
-
|
|
335
|
+
it
|
|
334
336
|
]);
|
|
335
|
-
return
|
|
337
|
+
return C ? /* @__PURE__ */ v("div", {
|
|
336
338
|
className: "flex items-center justify-center h-full",
|
|
337
|
-
children: /* @__PURE__ */
|
|
338
|
-
}) :
|
|
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", {
|
|
339
341
|
className: "flex h-full flex-col items-center justify-center",
|
|
340
342
|
style: { padding: "var(--space-pagePadding)" },
|
|
341
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ v(o, {
|
|
342
344
|
headingLevel: 2,
|
|
343
345
|
tone: "danger",
|
|
344
|
-
title:
|
|
345
|
-
description: /* @__PURE__ */
|
|
346
|
+
title: d("bigconsole.dashboards.view.errorTitle", "Error loading dashboard"),
|
|
347
|
+
description: /* @__PURE__ */ v("span", {
|
|
346
348
|
className: "break-words",
|
|
347
|
-
children:
|
|
349
|
+
children: J.message
|
|
348
350
|
}),
|
|
349
351
|
className: "w-full max-w-md",
|
|
350
352
|
"data-testid": "dashboard-view-error",
|
|
351
|
-
actions: /* @__PURE__ */
|
|
353
|
+
actions: /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(g, {
|
|
352
354
|
size: "sm",
|
|
353
|
-
onClick: () =>
|
|
354
|
-
children:
|
|
355
|
-
}), /* @__PURE__ */
|
|
355
|
+
onClick: () => Y(r),
|
|
356
|
+
children: d("bigconsole.dashboards.view.retry", "Retry")
|
|
357
|
+
}), /* @__PURE__ */ v(g, {
|
|
356
358
|
size: "sm",
|
|
357
359
|
variant: "outline",
|
|
358
360
|
onClick: () => c("/dashboards"),
|
|
359
|
-
children:
|
|
361
|
+
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
360
362
|
})] })
|
|
361
363
|
})
|
|
362
|
-
}) :
|
|
364
|
+
}) : T ? /* @__PURE__ */ v("div", {
|
|
363
365
|
className: "flex flex-col items-center justify-center h-full",
|
|
364
366
|
style: { padding: "var(--space-pagePadding)" },
|
|
365
|
-
children: /* @__PURE__ */
|
|
367
|
+
children: /* @__PURE__ */ v(je, {
|
|
366
368
|
illustration: "empty-data",
|
|
367
|
-
title:
|
|
368
|
-
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", {
|
|
369
371
|
className: "mt-2 block font-mono text-xs text-text-muted break-all",
|
|
370
|
-
children:
|
|
372
|
+
children: d("bigconsole.dashboards.view.idLabel", "ID: {{id}}", { id: r ?? "" })
|
|
371
373
|
})] }),
|
|
372
|
-
action: /* @__PURE__ */
|
|
374
|
+
action: /* @__PURE__ */ v(g, {
|
|
373
375
|
onClick: () => c("/dashboards"),
|
|
374
|
-
children:
|
|
376
|
+
children: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards")
|
|
375
377
|
})
|
|
376
378
|
})
|
|
377
|
-
}) :
|
|
379
|
+
}) : q || !P ? /* @__PURE__ */ v("div", {
|
|
378
380
|
className: "flex items-center justify-center h-full",
|
|
379
381
|
role: "status",
|
|
380
382
|
"aria-live": "polite",
|
|
381
|
-
children: /* @__PURE__ */
|
|
383
|
+
children: /* @__PURE__ */ y("div", {
|
|
382
384
|
className: "flex flex-col items-center gap-4",
|
|
383
|
-
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", {
|
|
384
386
|
className: "text-sm text-text-secondary",
|
|
385
|
-
children:
|
|
387
|
+
children: d("bigconsole.dashboards.view.loading", "Loading dashboard...")
|
|
386
388
|
})]
|
|
387
389
|
})
|
|
388
|
-
}) : /* @__PURE__ */
|
|
389
|
-
ref:
|
|
390
|
+
}) : /* @__PURE__ */ y(_, { children: [!b && /* @__PURE__ */ v(Fe, {}), /* @__PURE__ */ y("div", {
|
|
391
|
+
ref: at,
|
|
390
392
|
className: "h-full flex flex-col overflow-hidden",
|
|
391
393
|
children: [
|
|
392
|
-
/* @__PURE__ */
|
|
394
|
+
/* @__PURE__ */ v(o, {
|
|
393
395
|
emphasis: "bare",
|
|
394
396
|
padding: "none",
|
|
395
397
|
"data-testid": "dashboard-route-header",
|
|
396
398
|
"aria-label": "Dashboard",
|
|
397
399
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2",
|
|
398
400
|
headerClassName: "",
|
|
399
|
-
header: /* @__PURE__ */
|
|
401
|
+
header: /* @__PURE__ */ y("div", {
|
|
400
402
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
401
403
|
children: [
|
|
402
|
-
/* @__PURE__ */
|
|
403
|
-
onClick:
|
|
404
|
+
/* @__PURE__ */ y(g, {
|
|
405
|
+
onClick: ct,
|
|
404
406
|
variant: "ghost",
|
|
405
407
|
size: "sm",
|
|
406
|
-
title:
|
|
407
|
-
"aria-label":
|
|
408
|
+
title: d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
409
|
+
"aria-label": d("bigconsole.dashboards.view.backToDashboards", "Back to Dashboards"),
|
|
408
410
|
className: "flex-shrink-0",
|
|
409
|
-
children: [/* @__PURE__ */
|
|
411
|
+
children: [/* @__PURE__ */ v(Oe, { className: "w-4 h-4 mr-2" }), d("bigconsole.dashboards.view.back", "Back")]
|
|
410
412
|
}),
|
|
411
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ v("h1", {
|
|
412
414
|
className: "min-w-0 flex-1 truncate text-sm font-semibold text-text-primary",
|
|
413
415
|
title: P.name,
|
|
414
|
-
...
|
|
416
|
+
...Se(P.id),
|
|
415
417
|
children: P.name
|
|
416
418
|
}),
|
|
417
|
-
!
|
|
419
|
+
!b && /* @__PURE__ */ v(pe, {
|
|
420
|
+
dashboardId: P.id,
|
|
421
|
+
enabled: !b
|
|
422
|
+
}),
|
|
423
|
+
/* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
418
424
|
className: "flex-shrink-0",
|
|
419
|
-
children: /* @__PURE__ */
|
|
420
|
-
|
|
421
|
-
|
|
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)
|
|
422
441
|
})
|
|
423
442
|
}),
|
|
424
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
425
444
|
className: "flex-shrink-0",
|
|
426
|
-
children: /* @__PURE__ */
|
|
427
|
-
onClick: () =>
|
|
445
|
+
children: /* @__PURE__ */ y(g, {
|
|
446
|
+
onClick: () => k((e) => !e),
|
|
428
447
|
variant: "ghost",
|
|
429
448
|
size: "sm",
|
|
430
|
-
"aria-pressed":
|
|
431
|
-
title:
|
|
432
|
-
"aria-label":
|
|
433
|
-
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")]
|
|
434
453
|
})
|
|
435
454
|
}) })
|
|
436
455
|
]
|
|
437
456
|
})
|
|
438
457
|
}),
|
|
439
|
-
|
|
458
|
+
O && P && /* @__PURE__ */ v(u, { children: /* @__PURE__ */ v("div", {
|
|
440
459
|
className: "flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-3 py-2 sm:px-4",
|
|
441
|
-
children: /* @__PURE__ */
|
|
460
|
+
children: /* @__PURE__ */ v("div", {
|
|
442
461
|
className: "mx-auto max-w-3xl",
|
|
443
|
-
children: /* @__PURE__ */
|
|
462
|
+
children: /* @__PURE__ */ v(be, {
|
|
444
463
|
dashboardId: P.id,
|
|
445
|
-
onClose: () =>
|
|
464
|
+
onClose: () => k(!1)
|
|
446
465
|
})
|
|
447
466
|
})
|
|
448
467
|
}) }),
|
|
449
|
-
|
|
468
|
+
M && !b && /* @__PURE__ */ v(ue, {
|
|
450
469
|
currentDashboardId: P.id,
|
|
451
470
|
currentDashboardName: P.name,
|
|
452
|
-
basePath: `${
|
|
471
|
+
basePath: `${l}/dashboards`
|
|
453
472
|
}),
|
|
454
|
-
/* @__PURE__ */
|
|
473
|
+
/* @__PURE__ */ v("div", {
|
|
455
474
|
className: "flex-1 min-w-0 overflow-hidden",
|
|
456
|
-
children: /* @__PURE__ */
|
|
475
|
+
children: /* @__PURE__ */ v(oe, {
|
|
457
476
|
dashboardId: P.id,
|
|
458
|
-
pageId:
|
|
477
|
+
pageId: V || P.pages?.[0]?.id,
|
|
459
478
|
title: P.name,
|
|
460
|
-
onPaste:
|
|
461
|
-
onSave:
|
|
462
|
-
isSaving:
|
|
463
|
-
onReview:
|
|
464
|
-
onExport:
|
|
465
|
-
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,
|
|
466
485
|
pages: Z,
|
|
467
486
|
activePageId: $ ?? void 0,
|
|
468
487
|
onPageChange: X,
|
|
469
|
-
onPageAdd:
|
|
470
|
-
onPageRename:
|
|
471
|
-
onPageDuplicate:
|
|
472
|
-
onPageDelete:
|
|
473
|
-
onPagesReorder:
|
|
488
|
+
onPageAdd: xt,
|
|
489
|
+
onPageRename: St,
|
|
490
|
+
onPageDuplicate: Ct,
|
|
491
|
+
onPageDelete: wt,
|
|
492
|
+
onPagesReorder: Tt,
|
|
474
493
|
showPageTabs: !0
|
|
475
494
|
})
|
|
476
495
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
478
|
-
open:
|
|
479
|
-
onClose:
|
|
496
|
+
/* @__PURE__ */ v(fe, {
|
|
497
|
+
open: _t && !b,
|
|
498
|
+
onClose: bt,
|
|
480
499
|
dashboardId: P.id,
|
|
481
500
|
pages: Z,
|
|
482
|
-
canFix:
|
|
501
|
+
canFix: Ie && !b
|
|
483
502
|
}),
|
|
484
|
-
/* @__PURE__ */
|
|
485
|
-
isOpen:
|
|
503
|
+
/* @__PURE__ */ v(le, {
|
|
504
|
+
isOpen: Ve && !b,
|
|
486
505
|
dashboardId: P.id,
|
|
487
506
|
dashboardName: P.name,
|
|
488
|
-
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)
|
|
489
518
|
}),
|
|
490
|
-
/* @__PURE__ */
|
|
491
|
-
isOpen:
|
|
519
|
+
/* @__PURE__ */ v(de, {
|
|
520
|
+
isOpen: ft && !b,
|
|
492
521
|
dashboardId: P.id,
|
|
493
522
|
dashboardName: P.name,
|
|
494
523
|
dashboardDescription: P.description,
|
|
495
|
-
onClose:
|
|
524
|
+
onClose: ht
|
|
496
525
|
})
|
|
497
526
|
]
|
|
498
|
-
})] }) : /* @__PURE__ */
|
|
499
|
-
title:
|
|
500
|
-
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.")
|
|
501
530
|
});
|
|
502
|
-
}),
|
|
531
|
+
}), Fe = () => (c(), null), x = d(function() {
|
|
503
532
|
let { workspaceId: e } = r();
|
|
504
|
-
return /* @__PURE__ */
|
|
533
|
+
return /* @__PURE__ */ v(l, {
|
|
505
534
|
workspaceId: e,
|
|
506
|
-
children: /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ v(b, {})
|
|
507
536
|
});
|
|
508
537
|
});
|
|
509
|
-
export {
|
|
538
|
+
export { b as DashboardViewPage, x as default };
|