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