@burdenoff/microfe-bigconsole 2026.1118.10 → 2026.1119.1
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/AsOfBanner.d.ts +3 -0
- package/dist/bigconsole/asof/AsOfBanner.js +38 -0
- package/dist/bigconsole/asof/AsOfControl.d.ts +4 -0
- package/dist/bigconsole/asof/AsOfControl.js +96 -0
- package/dist/bigconsole/asof/AsOfProvider.d.ts +24 -0
- package/dist/bigconsole/asof/AsOfProvider.js +76 -0
- package/dist/bigconsole/asof/asOfMessage.d.ts +12 -0
- package/dist/bigconsole/asof/asOfMessage.js +12 -0
- package/dist/bigconsole/asof/asOfParam.d.ts +48 -0
- package/dist/bigconsole/asof/asOfParam.js +34 -0
- package/dist/bigconsole/asof/index.d.ts +7 -0
- package/dist/bigconsole/asof/index.js +6 -0
- package/dist/bigconsole/components/dashboard/DashboardCanvas.js +142 -138
- package/dist/bigconsole/components/dashboard/DashboardToolbar.js +97 -92
- package/dist/bigconsole/components/dashboard/ShareDialog/ShareDialog.js +78 -74
- package/dist/bigconsole/components/widgets/WidgetMenu.js +98 -96
- package/dist/bigconsole/components/widgets/WidgetWrapper.js +345 -306
- package/dist/bigconsole/hooks/useFilterFieldValues.js +52 -22
- package/dist/bigconsole/hooks/useWidgetData.d.ts +7 -0
- package/dist/bigconsole/hooks/useWidgetData.js +53 -43
- package/dist/bigconsole/pages/DashboardViewPage.d.ts +7 -1
- package/dist/bigconsole/pages/DashboardViewPage.js +300 -278
- package/dist/bigconsole/pages/index.d.ts +1 -1
- package/dist/bigconsole/types/index.d.ts +13 -0
- package/dist/bigconsole/utils/widgetDisplayData.d.ts +6 -0
- package/dist/bigconsole/utils/widgetDisplayData.js +4 -0
- package/dist/generated/wspace-operations.d.ts +47 -0
- package/dist/generated/wspace-operations.js +261 -16
- package/dist/generated/wspace-types.d.ts +78 -0
- package/package.json +1 -1
|
@@ -12,60 +12,63 @@ import l from "../../hooks/useWidgetCatalog.js";
|
|
|
12
12
|
import u from "../../hooks/useDashboardImageExport.js";
|
|
13
13
|
import "../../context/index.js";
|
|
14
14
|
import "../common/index.js";
|
|
15
|
-
import {
|
|
15
|
+
import { useAsOf as ee } from "../../asof/AsOfProvider.js";
|
|
16
|
+
import { AsOfBanner as te } from "../../asof/AsOfBanner.js";
|
|
17
|
+
import { DashboardGrid as ne } from "./DashboardGrid.js";
|
|
16
18
|
import { loadBigConsoleSettings as d } from "../../hooks/useBigConsoleSettings.js";
|
|
17
|
-
import { DashboardToolbar as
|
|
19
|
+
import { DashboardToolbar as re } from "./DashboardToolbar.js";
|
|
18
20
|
import "./GlobalFiltersBar/index.js";
|
|
19
|
-
import { LiveBoardBanner as
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
21
|
+
import { LiveBoardBanner as ie } from "./LiveBoardBanner.js";
|
|
22
|
+
import "../../asof/index.js";
|
|
23
|
+
import { GlobalFiltersBar as ae } from "./GlobalFiltersBar/GlobalFiltersBar.js";
|
|
24
|
+
import { TemplateSetupBanner as oe } from "./TemplateSetupBanner.js";
|
|
22
25
|
import "./PageTabsManager/index.js";
|
|
23
26
|
import "./ShareDialog/index.js";
|
|
24
|
-
import { PageTabsManager as
|
|
25
|
-
import { WidgetPalette as
|
|
26
|
-
import { ShareDialog as
|
|
27
|
+
import { PageTabsManager as se } from "./PageTabsManager/PageTabsManager.js";
|
|
28
|
+
import { WidgetPalette as ce } from "./WidgetPalette.js";
|
|
29
|
+
import { ShareDialog as le } from "./ShareDialog/ShareDialog.js";
|
|
27
30
|
import "../builder/index.js";
|
|
28
31
|
import { getWidgetDefinition as f } from "../widgets/WidgetRegistry.js";
|
|
29
32
|
import "../../contexts/index.js";
|
|
30
|
-
import { WidgetInspector as
|
|
31
|
-
import { calculatePositionFromDrop as
|
|
32
|
-
import { memo as m, useCallback as h, useEffect as
|
|
33
|
-
import { usePermissions as
|
|
34
|
-
import { Plus as
|
|
33
|
+
import { WidgetInspector as ue } from "../builder/WidgetInspector.js";
|
|
34
|
+
import { calculatePositionFromDrop as de, findNextAvailablePosition as fe, resolveNewWidgetHeight as p } from "../../utils/widgetPositioning.js";
|
|
35
|
+
import { memo as m, useCallback as h, useEffect as pe, useMemo as me, useRef as g, useState as _ } from "react";
|
|
36
|
+
import { usePermissions as he } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
37
|
+
import { Plus as ge } from "lucide-react";
|
|
35
38
|
import { Button as v } from "@burdenoff/fe-libs/ui";
|
|
36
|
-
import { useI18n as
|
|
39
|
+
import { useI18n as _e } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
37
40
|
import { jsx as y, jsxs as b } from "react/jsx-runtime";
|
|
38
41
|
// src/bigconsole/components/dashboard/DashboardCanvas.tsx
|
|
39
|
-
var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste:
|
|
40
|
-
let { t:
|
|
42
|
+
var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ve, onSave: ye, isSaving: be = !1, onReview: xe, onExport: Se, onPublishTemplate: Ce, pages: C = [], activePageId: we, onPageChange: Te, onPagesReorder: Ee, onPageAdd: De, onPageRename: Oe, onPageDuplicate: ke, onPageDelete: Ae, showFilters: je = !0, showPageTabs: Me = !0, enableCrossFilter: Ne = !0 }) {
|
|
43
|
+
let { t: w } = _e(), T = g(null), E = g(null), [D, Pe] = _(1200), [Fe, O] = _(!1), [k, A] = _(null), [j, M] = _(!1), [Ie, N] = _(null), [P, Le] = _(null), F = t((e) => e.viewMode === "edit"), { asOf: I } = ee(), L = t((e) => e.currentDashboard), R = L?.pages.find((e) => e.id === x)?.gridColumns ?? 12, { updateDashboard: z } = a({ skipFetch: !0 }), { hasPermission: Re } = he(), ze = Re(n.DASHBOARD_UPDATE), Be = P?.id === m ? P.value : L?.id === m ? L.visibility : void 0, Ve = h(async (e) => {
|
|
41
44
|
let t = await z({
|
|
42
45
|
id: m,
|
|
43
46
|
visibility: e
|
|
44
47
|
});
|
|
45
48
|
if (!t) throw Error("The dashboard service did not accept the change.");
|
|
46
|
-
|
|
49
|
+
Le({
|
|
47
50
|
id: m,
|
|
48
51
|
value: t.visibility ?? e
|
|
49
52
|
});
|
|
50
|
-
}, [m, z]), { workspaceId: B, apiGatewayUrl:
|
|
53
|
+
}, [m, z]), { workspaceId: B, apiGatewayUrl: He, authToken: Ue } = i(), { installedWidgets: We, loading: Ge } = c({
|
|
51
54
|
workspaceId: B,
|
|
52
|
-
enabled:
|
|
53
|
-
}), { definitions:
|
|
55
|
+
enabled: F
|
|
56
|
+
}), { definitions: Ke } = l({
|
|
54
57
|
workspaceId: B,
|
|
55
|
-
apiGatewayUrl:
|
|
56
|
-
authToken:
|
|
57
|
-
enabled:
|
|
58
|
-
}), V = t((e) => e.zoomLevel), H = t((e) => e.sidebarCollapsed), U = t((e) => e.toggleSidebar), W = !H, G = t((e) => e.setGlobalFilterValues),
|
|
58
|
+
apiGatewayUrl: He,
|
|
59
|
+
authToken: Ue,
|
|
60
|
+
enabled: F
|
|
61
|
+
}), V = t((e) => e.zoomLevel), H = t((e) => e.sidebarCollapsed), U = t((e) => e.toggleSidebar), W = !H, G = t((e) => e.setGlobalFilterValues), qe = h((e) => {
|
|
59
62
|
G(e);
|
|
60
|
-
}, [G]), { createWidget: K } = s(x, m, { skipFetch: !0 }), q = e((e) => e.widgets), J =
|
|
63
|
+
}, [G]), { createWidget: K } = s(x, m, { skipFetch: !0 }), q = e((e) => e.widgets), J = me(() => {
|
|
61
64
|
let e = Array.from(q.values());
|
|
62
65
|
return x ? e.filter((e) => e.pageId === x) : e;
|
|
63
|
-
}, [q, x]),
|
|
64
|
-
|
|
65
|
-
let e =
|
|
66
|
+
}, [q, x]), Je = e((e) => e.selectedWidgetId), Y = e((e) => e.selectWidget), X = e((e) => e.addWidget), Z = e((e) => e.updateWidgetPosition), Ye = e((e) => e.configPanelOpen), Xe = e((e) => e.closeConfigPanel), Q = Ye && !I;
|
|
67
|
+
pe(() => {
|
|
68
|
+
let e = T.current;
|
|
66
69
|
if (!e) return;
|
|
67
70
|
let t = () => {
|
|
68
|
-
|
|
71
|
+
Pe(e.offsetWidth);
|
|
69
72
|
};
|
|
70
73
|
if (t(), typeof ResizeObserver < "u") {
|
|
71
74
|
let n = new ResizeObserver(t);
|
|
@@ -73,26 +76,26 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
73
76
|
}
|
|
74
77
|
return window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
|
|
75
78
|
}, []);
|
|
76
|
-
let
|
|
79
|
+
let Ze = h((e) => {
|
|
77
80
|
e.forEach((e) => {
|
|
78
|
-
|
|
81
|
+
Z(e.i, {
|
|
79
82
|
x: e.x,
|
|
80
83
|
y: e.y,
|
|
81
84
|
width: e.w,
|
|
82
85
|
height: e.h
|
|
83
86
|
});
|
|
84
87
|
});
|
|
85
|
-
}, [
|
|
88
|
+
}, [Z]), Qe = h((e) => {
|
|
86
89
|
Y(e);
|
|
87
|
-
}, [Y]),
|
|
88
|
-
|
|
90
|
+
}, [Y]), $ = h(async (e, t) => {
|
|
91
|
+
A(null);
|
|
89
92
|
let n = t?.definition || (e.type ? f(e.type) : null), r = d(), i = {
|
|
90
93
|
width: Math.min(n?.defaultSize?.width ?? 4, R),
|
|
91
94
|
height: p(n, r.defaultWidgetHeight)
|
|
92
95
|
}, a;
|
|
93
96
|
if (t?.position) a = t.position;
|
|
94
97
|
else {
|
|
95
|
-
let { x: e, y: t } =
|
|
98
|
+
let { x: e, y: t } = fe(J, i, { cols: R });
|
|
96
99
|
a = {
|
|
97
100
|
x: e,
|
|
98
101
|
y: t,
|
|
@@ -106,7 +109,7 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
106
109
|
pageId: x,
|
|
107
110
|
dashboardId: m,
|
|
108
111
|
type: e.type,
|
|
109
|
-
title: e.title ||
|
|
112
|
+
title: e.title || w("bigconsole.dashboards.canvas.untitledWidget", "Untitled Widget"),
|
|
110
113
|
description: e.description,
|
|
111
114
|
renderer: e.renderer,
|
|
112
115
|
template: e.template,
|
|
@@ -120,7 +123,7 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
120
123
|
Y(t.id);
|
|
121
124
|
return;
|
|
122
125
|
}
|
|
123
|
-
|
|
126
|
+
A(w("bigconsole.dashboards.canvas.widgetCreateError", "Could not create the widget. Check the connection and try again."));
|
|
124
127
|
return;
|
|
125
128
|
}
|
|
126
129
|
let s = {
|
|
@@ -128,7 +131,7 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
128
131
|
dashboardId: m,
|
|
129
132
|
pageId: x || "local",
|
|
130
133
|
type: e.type,
|
|
131
|
-
title: e.title ||
|
|
134
|
+
title: e.title || w("bigconsole.dashboards.canvas.untitledWidget", "Untitled Widget"),
|
|
132
135
|
description: e.description,
|
|
133
136
|
renderer: e.renderer,
|
|
134
137
|
template: e.template,
|
|
@@ -154,13 +157,13 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
154
157
|
Y,
|
|
155
158
|
J,
|
|
156
159
|
R,
|
|
157
|
-
|
|
158
|
-
]),
|
|
159
|
-
|
|
160
|
-
}, []),
|
|
161
|
-
|
|
162
|
-
}, []),
|
|
163
|
-
e.preventDefault(),
|
|
160
|
+
w
|
|
161
|
+
]), $e = h((e) => {
|
|
162
|
+
M(!0), N(e);
|
|
163
|
+
}, []), et = h(() => {
|
|
164
|
+
M(!1), N(null);
|
|
165
|
+
}, []), tt = h((e) => {
|
|
166
|
+
e.preventDefault(), M(!1), N(null);
|
|
164
167
|
try {
|
|
165
168
|
let t = e.dataTransfer.getData("application/json");
|
|
166
169
|
if (!t) return;
|
|
@@ -174,18 +177,18 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
174
177
|
defaultConfig: r.defaultConfig,
|
|
175
178
|
defaultSize: r.defaultSize || i.defaultSize
|
|
176
179
|
});
|
|
177
|
-
let o =
|
|
180
|
+
let o = T.current?.getBoundingClientRect();
|
|
178
181
|
if (!o) return;
|
|
179
182
|
let s = {
|
|
180
183
|
width: Math.min(i.defaultSize.width, R),
|
|
181
184
|
height: p(i, d().defaultWidgetHeight)
|
|
182
|
-
}, { x: c, y: l } =
|
|
185
|
+
}, { x: c, y: l } = de(e.clientX, e.clientY, o, D, s, { cols: R }), u = {
|
|
183
186
|
x: c,
|
|
184
187
|
y: l,
|
|
185
188
|
width: s.width,
|
|
186
189
|
height: s.height
|
|
187
190
|
};
|
|
188
|
-
|
|
191
|
+
$({
|
|
189
192
|
type: r.type,
|
|
190
193
|
title: r.name || i.name,
|
|
191
194
|
config: r.defaultConfig || i.defaultConfig
|
|
@@ -197,58 +200,58 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
197
200
|
console.error("Failed to handle widget drop:", e);
|
|
198
201
|
}
|
|
199
202
|
}, [
|
|
200
|
-
|
|
201
|
-
|
|
203
|
+
D,
|
|
204
|
+
$,
|
|
202
205
|
R
|
|
203
|
-
]),
|
|
206
|
+
]), nt = h((e) => {
|
|
204
207
|
e.preventDefault(), e.dataTransfer.dropEffect = "copy";
|
|
205
|
-
}, []),
|
|
208
|
+
}, []), rt = h((e, t) => {
|
|
206
209
|
let n = t || f(e);
|
|
207
|
-
|
|
210
|
+
$({
|
|
208
211
|
type: e,
|
|
209
212
|
title: n.name,
|
|
210
213
|
config: n.defaultConfig
|
|
211
214
|
});
|
|
212
|
-
}, [
|
|
215
|
+
}, [$]), it = h(() => {
|
|
213
216
|
U();
|
|
214
|
-
}, [U]),
|
|
217
|
+
}, [U]), at = h(() => {
|
|
215
218
|
H && U(), window.requestAnimationFrame(() => {
|
|
216
|
-
let e =
|
|
219
|
+
let e = w("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets...");
|
|
217
220
|
document.querySelector(`input[placeholder="${e}"]`)?.focus();
|
|
218
221
|
});
|
|
219
222
|
}, [
|
|
220
223
|
H,
|
|
221
224
|
U,
|
|
222
|
-
|
|
223
|
-
]), { exportPNG:
|
|
224
|
-
containerRef:
|
|
225
|
+
w
|
|
226
|
+
]), { exportPNG: ot, exportPDF: st, isExporting: ct } = u({
|
|
227
|
+
containerRef: E,
|
|
225
228
|
name: S || "dashboard"
|
|
226
|
-
}),
|
|
227
|
-
|
|
228
|
-
}, [
|
|
229
|
-
|
|
230
|
-
}, [
|
|
229
|
+
}), lt = h(() => {
|
|
230
|
+
ot();
|
|
231
|
+
}, [ot]), ut = h(() => {
|
|
232
|
+
st();
|
|
233
|
+
}, [st]);
|
|
231
234
|
return /* @__PURE__ */ b("div", {
|
|
232
235
|
className: "flex flex-col h-full min-w-0 overflow-hidden",
|
|
233
236
|
children: [
|
|
234
|
-
/* @__PURE__ */ y(
|
|
237
|
+
/* @__PURE__ */ y(re, {
|
|
235
238
|
dashboardId: m,
|
|
236
239
|
title: S,
|
|
237
|
-
onAddWidget:
|
|
238
|
-
onTogglePalette:
|
|
240
|
+
onAddWidget: at,
|
|
241
|
+
onTogglePalette: it,
|
|
239
242
|
isPaletteOpen: W,
|
|
240
|
-
onPaste:
|
|
241
|
-
onSave:
|
|
242
|
-
isSaving:
|
|
243
|
-
onReview:
|
|
244
|
-
onExport:
|
|
245
|
-
onPublishTemplate:
|
|
246
|
-
onExportImage:
|
|
247
|
-
onExportPdf:
|
|
248
|
-
isExportingImage:
|
|
249
|
-
onShare: () =>
|
|
243
|
+
onPaste: ve,
|
|
244
|
+
onSave: ye,
|
|
245
|
+
isSaving: be,
|
|
246
|
+
onReview: xe,
|
|
247
|
+
onExport: Se,
|
|
248
|
+
onPublishTemplate: Ce,
|
|
249
|
+
onExportImage: lt,
|
|
250
|
+
onExportPdf: ut,
|
|
251
|
+
isExportingImage: ct,
|
|
252
|
+
onShare: () => O(!0)
|
|
250
253
|
}),
|
|
251
|
-
|
|
254
|
+
k && /* @__PURE__ */ y("div", {
|
|
252
255
|
role: "alert",
|
|
253
256
|
className: "mx-card-padding mt-control-gap flex-shrink-0",
|
|
254
257
|
children: /* @__PURE__ */ y(o, {
|
|
@@ -257,71 +260,72 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
257
260
|
headingLevel: 3,
|
|
258
261
|
"data-testid": "widget-create-error",
|
|
259
262
|
title: "Widget not created",
|
|
260
|
-
description:
|
|
263
|
+
description: k,
|
|
261
264
|
actions: /* @__PURE__ */ y(v, {
|
|
262
265
|
variant: "outline",
|
|
263
266
|
size: "sm",
|
|
264
|
-
onClick: () =>
|
|
265
|
-
children:
|
|
267
|
+
onClick: () => A(null),
|
|
268
|
+
children: w("bigconsole.dashboards.canvas.dismiss", "Dismiss")
|
|
266
269
|
})
|
|
267
270
|
})
|
|
268
271
|
}),
|
|
269
|
-
/* @__PURE__ */ y(
|
|
272
|
+
/* @__PURE__ */ y(oe, {
|
|
270
273
|
widgets: J,
|
|
271
|
-
isEditMode:
|
|
274
|
+
isEditMode: F
|
|
272
275
|
}),
|
|
273
|
-
/* @__PURE__ */ y(
|
|
276
|
+
/* @__PURE__ */ y(te, {}),
|
|
277
|
+
!I && /* @__PURE__ */ y(ie, {
|
|
274
278
|
widgets: J,
|
|
275
|
-
isEditMode:
|
|
279
|
+
isEditMode: F
|
|
276
280
|
}),
|
|
277
|
-
|
|
281
|
+
je && /* @__PURE__ */ y(ae, {
|
|
278
282
|
dashboardId: m,
|
|
279
|
-
onFilterChange:
|
|
283
|
+
onFilterChange: qe,
|
|
280
284
|
collapsible: !0
|
|
281
285
|
}),
|
|
282
|
-
|
|
286
|
+
Me && (F || C.length > 0) && /* @__PURE__ */ y(se, {
|
|
283
287
|
pages: C,
|
|
284
|
-
activePageId:
|
|
285
|
-
editable:
|
|
286
|
-
onPageSelect:
|
|
287
|
-
onPagesReorder:
|
|
288
|
-
|
|
288
|
+
activePageId: we || C[0]?.id,
|
|
289
|
+
editable: F,
|
|
290
|
+
onPageSelect: Te || (() => {}),
|
|
291
|
+
onPagesReorder: Ee ? (e) => {
|
|
292
|
+
Ee(e.map((e) => C.find((t) => t.id === e)).filter(Boolean));
|
|
289
293
|
} : void 0,
|
|
290
|
-
onPageCreate:
|
|
291
|
-
onPageRename:
|
|
292
|
-
onPageDuplicate:
|
|
293
|
-
onPageDelete:
|
|
294
|
+
onPageCreate: De,
|
|
295
|
+
onPageRename: Oe,
|
|
296
|
+
onPageDuplicate: ke,
|
|
297
|
+
onPageDelete: Ae
|
|
294
298
|
}),
|
|
295
299
|
/* @__PURE__ */ b("div", {
|
|
296
300
|
"data-testid": "dashboard-canvas-panes",
|
|
297
|
-
className: `flex flex-1 min-w-0 overflow-hidden ${
|
|
298
|
-
children: [
|
|
301
|
+
className: `flex flex-1 min-w-0 overflow-hidden ${Q ? "lg:mr-[var(--bc-inspector-width,420px)]" : ""}`,
|
|
302
|
+
children: [F && /* @__PURE__ */ y(ce, {
|
|
299
303
|
isOpen: W,
|
|
300
|
-
onClose:
|
|
301
|
-
onWidgetSelect:
|
|
302
|
-
onDragStart:
|
|
303
|
-
onDragEnd:
|
|
304
|
-
installedWidgets:
|
|
305
|
-
installedWidgetsLoading:
|
|
306
|
-
definitions:
|
|
304
|
+
onClose: it,
|
|
305
|
+
onWidgetSelect: rt,
|
|
306
|
+
onDragStart: $e,
|
|
307
|
+
onDragEnd: et,
|
|
308
|
+
installedWidgets: We,
|
|
309
|
+
installedWidgetsLoading: Ge,
|
|
310
|
+
definitions: Ke
|
|
307
311
|
}), /* @__PURE__ */ b("div", {
|
|
308
|
-
ref:
|
|
312
|
+
ref: T,
|
|
309
313
|
role: "region",
|
|
310
314
|
"aria-label": "Dashboard board",
|
|
311
315
|
"data-section-emphasis": "primary",
|
|
312
316
|
"data-testid": "dashboard-board",
|
|
313
317
|
className: "relative min-w-0 flex-1 overflow-auto border-2 border-transparent bg-bg-sunken motion-safe:transition-[border-color,background-color]",
|
|
314
|
-
onDrop:
|
|
315
|
-
onDragOver:
|
|
318
|
+
onDrop: tt,
|
|
319
|
+
onDragOver: nt,
|
|
316
320
|
onClick: () => {
|
|
317
|
-
|
|
321
|
+
F && Y(null);
|
|
318
322
|
},
|
|
319
|
-
style:
|
|
323
|
+
style: j ? {
|
|
320
324
|
borderStyle: "dashed",
|
|
321
325
|
borderColor: "var(--color-action-primary-bg)",
|
|
322
326
|
backgroundColor: "var(--color-bg-accentSubtle)"
|
|
323
327
|
} : void 0,
|
|
324
|
-
children: [
|
|
328
|
+
children: [j && /* @__PURE__ */ y("div", {
|
|
325
329
|
style: {
|
|
326
330
|
position: "absolute",
|
|
327
331
|
top: "50%",
|
|
@@ -342,32 +346,32 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
342
346
|
margin: 0
|
|
343
347
|
},
|
|
344
348
|
children: [
|
|
345
|
-
|
|
349
|
+
w("bigconsole.dashboards.canvas.dropToAddBefore", "Drop to add"),
|
|
346
350
|
" ",
|
|
347
|
-
/* @__PURE__ */ y("strong", { children:
|
|
351
|
+
/* @__PURE__ */ y("strong", { children: Ie }),
|
|
348
352
|
" ",
|
|
349
|
-
|
|
353
|
+
w("bigconsole.dashboards.canvas.dropToAddAfter", "widget")
|
|
350
354
|
]
|
|
351
355
|
})
|
|
352
356
|
}), /* @__PURE__ */ y("div", {
|
|
353
|
-
ref:
|
|
357
|
+
ref: E,
|
|
354
358
|
className: "min-h-full origin-top-left transition-transform",
|
|
355
359
|
style: {
|
|
356
360
|
transform: `scale(${V / 100})`,
|
|
357
361
|
width: `${100 / (V / 100)}%`
|
|
358
362
|
},
|
|
359
363
|
children: J.length > 0 ? /* @__PURE__ */ y(r, {
|
|
360
|
-
enabled:
|
|
364
|
+
enabled: Ne,
|
|
361
365
|
onCrossFilter: (e) => {},
|
|
362
|
-
children: /* @__PURE__ */ y(
|
|
366
|
+
children: /* @__PURE__ */ y(ne, {
|
|
363
367
|
widgets: J,
|
|
364
368
|
cols: R,
|
|
365
|
-
isEditMode:
|
|
366
|
-
width:
|
|
367
|
-
onLayoutChange:
|
|
369
|
+
isEditMode: F,
|
|
370
|
+
width: D,
|
|
371
|
+
onLayoutChange: Ze,
|
|
368
372
|
transformScale: V / 100,
|
|
369
|
-
onWidgetSelect:
|
|
370
|
-
selectedWidgetId:
|
|
373
|
+
onWidgetSelect: Qe,
|
|
374
|
+
selectedWidgetId: Je
|
|
371
375
|
})
|
|
372
376
|
}) : /* @__PURE__ */ y("div", {
|
|
373
377
|
className: "flex min-h-[min(400px,60vh)] items-center justify-center p-card-padding",
|
|
@@ -376,29 +380,29 @@ var x = m(function({ dashboardId: m, pageId: x, title: S, onPaste: ge, onSave: _
|
|
|
376
380
|
className: "w-full max-w-md",
|
|
377
381
|
"data-testid": "dashboard-empty-board",
|
|
378
382
|
headerClassName: "mb-form-gap",
|
|
379
|
-
title:
|
|
380
|
-
description:
|
|
381
|
-
children:
|
|
382
|
-
onClick:
|
|
383
|
-
children: [/* @__PURE__ */ y(
|
|
383
|
+
title: w("bigconsole.dashboards.canvas.noWidgetsTitle", "No widgets yet"),
|
|
384
|
+
description: w("bigconsole.dashboards.canvas.noWidgetsDescription", "Add widgets to build your dashboard. Click the \"Add Widget\" button to get started."),
|
|
385
|
+
children: F && /* @__PURE__ */ b(v, {
|
|
386
|
+
onClick: at,
|
|
387
|
+
children: [/* @__PURE__ */ y(ge, { className: "size-4" }), w("bigconsole.dashboards.canvas.addWidget", "Add Widget")]
|
|
384
388
|
})
|
|
385
389
|
})
|
|
386
390
|
})
|
|
387
391
|
})]
|
|
388
392
|
})]
|
|
389
393
|
}),
|
|
390
|
-
/* @__PURE__ */ y(
|
|
391
|
-
isOpen:
|
|
392
|
-
onClose:
|
|
394
|
+
/* @__PURE__ */ y(ue, {
|
|
395
|
+
isOpen: Q,
|
|
396
|
+
onClose: Xe
|
|
393
397
|
}),
|
|
394
|
-
/* @__PURE__ */ y(
|
|
398
|
+
/* @__PURE__ */ y(le, {
|
|
395
399
|
dashboardId: m,
|
|
396
|
-
dashboardName: S ||
|
|
397
|
-
isOpen:
|
|
398
|
-
onClose: () =>
|
|
399
|
-
visibility:
|
|
400
|
-
onVisibilityChange:
|
|
401
|
-
canChangeVisibility:
|
|
400
|
+
dashboardName: S || w("bigconsole.dashboards.canvas.dashboardFallbackName", "Dashboard"),
|
|
401
|
+
isOpen: Fe,
|
|
402
|
+
onClose: () => O(!1),
|
|
403
|
+
visibility: Be,
|
|
404
|
+
onVisibilityChange: Ve,
|
|
405
|
+
canChangeVisibility: ze
|
|
402
406
|
})
|
|
403
407
|
]
|
|
404
408
|
});
|