@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.
@@ -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 p, useCallback as m, useEffect as de, useMemo as fe, useRef as h, useState as g } from "react";
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 _ } from "@burdenoff/fe-libs/ui";
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 v, jsxs as y } from "react/jsx-runtime";
37
+ import { jsx as y, jsxs as b } from "react/jsx-runtime";
38
38
  // src/bigconsole/components/dashboard/DashboardCanvas.tsx
39
- var b = p(function({ dashboardId: p, pageId: b, title: x, onPaste: ge, onSave: _e, isSaving: ve = !1, onExport: ye, onPublishTemplate: be, pages: S = [], activePageId: xe, onPageChange: Se, onPagesReorder: C, onPageAdd: Ce, onPageRename: we, onPageDuplicate: Te, onPageDelete: Ee, showFilters: De = !0, showPageTabs: Oe = !0, enableCrossFilter: ke = !0 }) {
40
- let { t: w } = he(), T = h(null), E = h(null), [D, Ae] = g(1200), [je, O] = g(!1), [k, A] = g(null), [j, M] = g(!1), [Me, N] = g(null), [P, Ne] = g(null), F = t((e) => e.viewMode === "edit"), I = t((e) => e.currentDashboard), L = I?.pages.find((e) => e.id === b)?.gridColumns ?? 12, { updateDashboard: R } = a({ skipFetch: !0 }), { hasPermission: Pe } = pe(), Fe = Pe(n.DASHBOARD_UPDATE), Ie = P?.id === p ? P.value : I?.id === p ? I.visibility : void 0, Le = m(async (e) => {
41
- let t = await R({
42
- id: p,
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: p,
47
+ id: m,
48
48
  value: t.visibility ?? e
49
49
  });
50
- }, [p, R]), { workspaceId: z, apiGatewayUrl: Re, authToken: ze } = i(), { installedWidgets: Be, loading: Ve } = c({
51
- workspaceId: z,
52
- enabled: F
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: z,
54
+ workspaceId: B,
55
55
  apiGatewayUrl: Re,
56
56
  authToken: ze,
57
- enabled: F
58
- }), B = t((e) => e.zoomLevel), V = t((e) => e.sidebarCollapsed), H = t((e) => e.toggleSidebar), U = !V, W = t((e) => e.setGlobalFilterValues), Ue = m((e) => {
59
- W(e);
60
- }, [W]), { createWidget: G } = s(b, p, { skipFetch: !0 }), K = e((e) => e.widgets), q = fe(() => {
61
- let e = Array.from(K.values());
62
- return b ? e.filter((e) => e.pageId === b) : e;
63
- }, [K, b]), We = e((e) => e.selectedWidgetId), J = e((e) => e.selectWidget), Y = e((e) => e.addWidget), X = e((e) => e.updateWidgetPosition), Z = e((e) => e.configPanelOpen), Ge = e((e) => e.closeConfigPanel);
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 = T.current;
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 = m((e) => {
76
+ let Ke = h((e) => {
77
77
  e.forEach((e) => {
78
- X(e.i, {
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
- }, [X]), qe = m((e) => {
86
- J(e);
87
- }, [J]), Q = m(async (e, t) => {
88
- A(null);
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, L),
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(q, i, { cols: L });
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 (b) {
105
- let t = await G({
106
- pageId: b,
107
- dashboardId: p,
104
+ if (x) {
105
+ let t = await K({
106
+ pageId: x,
107
+ dashboardId: m,
108
108
  type: e.type,
109
- title: e.title || w("bigconsole.dashboards.canvas.untitledWidget", "Untitled Widget"),
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
- J(t.id);
120
+ Y(t.id);
121
121
  return;
122
122
  }
123
- A(w("bigconsole.dashboards.canvas.widgetCreateError", "Could not create the widget. Check the connection and try again."));
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: p,
129
- pageId: b || "local",
128
+ dashboardId: m,
129
+ pageId: x || "local",
130
130
  type: e.type,
131
- title: e.title || w("bigconsole.dashboards.canvas.untitledWidget", "Untitled Widget"),
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
- Y(s), J(s.id);
148
+ X(s), Y(s.id);
149
149
  }, [
150
- p,
151
- b,
152
- G,
150
+ m,
151
+ x,
152
+ K,
153
+ X,
153
154
  Y,
154
155
  J,
155
- q,
156
- L,
157
- w
158
- ]), Je = m((e) => {
159
- M(!0), N(e);
160
- }, []), Ye = m(() => {
161
- M(!1), N(null);
162
- }, []), Xe = m((e) => {
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 = T.current?.getBoundingClientRect();
177
+ let o = E.current?.getBoundingClientRect();
178
178
  if (!o) return;
179
179
  let s = {
180
- width: Math.min(i.defaultSize.width, L),
181
- height: d().defaultWidgetHeight
182
- }, { x: c, y: l } = le(e.clientX, e.clientY, o, D, s, { cols: L }), u = {
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
- Q({
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
- D,
201
- Q,
202
- L
203
- ]), Ze = m((e) => {
200
+ O,
201
+ $,
202
+ R
203
+ ]), Ze = h((e) => {
204
204
  e.preventDefault(), e.dataTransfer.dropEffect = "copy";
205
- }, []), Qe = m((e, t) => {
205
+ }, []), Qe = h((e, t) => {
206
206
  let n = t || f(e);
207
- Q({
207
+ $({
208
208
  type: e,
209
209
  title: n.name,
210
210
  config: n.defaultConfig
211
211
  });
212
- }, [Q]), $ = m(() => {
213
- H();
214
- }, [H]), $e = m(() => {
215
- V && H(), window.requestAnimationFrame(() => {
216
- let e = w("bigconsole.dashboards.widgetPalette.searchPlaceholder", "Search widgets...");
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
- w
223
- ]), { exportPNG: et, exportPDF: tt, isExporting: nt } = u({
224
- containerRef: E,
225
- name: x || "dashboard"
226
- }), rt = m(() => {
227
- et();
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
- return /* @__PURE__ */ y("div", {
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__ */ v(te, {
235
- dashboardId: p,
236
- title: x,
237
- onAddWidget: $e,
238
- onTogglePalette: $,
239
- isPaletteOpen: U,
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: rt,
246
- onExportPdf: it,
247
- isExportingImage: nt,
248
- onShare: () => O(!0)
245
+ onExportImage: it,
246
+ onExportPdf: at,
247
+ isExportingImage: rt,
248
+ onShare: () => k(!0)
249
249
  }),
250
- k && /* @__PURE__ */ v("div", {
250
+ A && /* @__PURE__ */ y("div", {
251
251
  role: "alert",
252
252
  className: "mx-card-padding mt-control-gap flex-shrink-0",
253
- children: /* @__PURE__ */ v(o, {
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: k,
260
- actions: /* @__PURE__ */ v(_, {
259
+ description: A,
260
+ actions: /* @__PURE__ */ y(v, {
261
261
  variant: "outline",
262
262
  size: "sm",
263
- onClick: () => A(null),
264
- children: w("bigconsole.dashboards.canvas.dismiss", "Dismiss")
263
+ onClick: () => j(null),
264
+ children: T("bigconsole.dashboards.canvas.dismiss", "Dismiss")
265
265
  })
266
266
  })
267
267
  }),
268
- /* @__PURE__ */ v(ie, {
269
- widgets: q,
270
- isEditMode: F
268
+ /* @__PURE__ */ y(ie, {
269
+ widgets: J,
270
+ isEditMode: I
271
271
  }),
272
- /* @__PURE__ */ v(ne, {
273
- widgets: q,
274
- isEditMode: F
272
+ /* @__PURE__ */ y(ne, {
273
+ widgets: J,
274
+ isEditMode: I
275
275
  }),
276
- De && /* @__PURE__ */ v(re, {
277
- dashboardId: p,
276
+ De && /* @__PURE__ */ y(re, {
277
+ dashboardId: m,
278
278
  onFilterChange: Ue,
279
279
  collapsible: !0
280
280
  }),
281
- Oe && (F || S.length > 0) && /* @__PURE__ */ v(ae, {
282
- pages: S,
283
- activePageId: xe || S[0]?.id,
284
- editable: F,
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: C ? (e) => {
287
- C(e.map((e) => S.find((t) => t.id === e)).filter(Boolean));
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__ */ y("div", {
294
+ /* @__PURE__ */ b("div", {
295
295
  "data-testid": "dashboard-canvas-panes",
296
- className: `flex flex-1 min-w-0 overflow-hidden ${Z ? "lg:mr-[var(--bc-inspector-width,420px)]" : ""}`,
297
- children: [F && /* @__PURE__ */ v(oe, {
298
- isOpen: U,
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__ */ y("div", {
307
- ref: T,
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
- F && J(null);
316
+ I && Y(null);
317
317
  },
318
- style: j ? {
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: [j && /* @__PURE__ */ v("div", {
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__ */ y("p", {
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
- w("bigconsole.dashboards.canvas.dropToAddBefore", "Drop to add"),
344
+ T("bigconsole.dashboards.canvas.dropToAddBefore", "Drop to add"),
345
345
  " ",
346
- /* @__PURE__ */ v("strong", { children: Me }),
346
+ /* @__PURE__ */ y("strong", { children: Me }),
347
347
  " ",
348
- w("bigconsole.dashboards.canvas.dropToAddAfter", "widget")
348
+ T("bigconsole.dashboards.canvas.dropToAddAfter", "widget")
349
349
  ]
350
350
  })
351
- }), /* @__PURE__ */ v("div", {
352
- ref: E,
351
+ }), /* @__PURE__ */ y("div", {
352
+ ref: D,
353
353
  className: "min-h-full origin-top-left transition-transform",
354
354
  style: {
355
- transform: `scale(${B / 100})`,
356
- width: `${100 / (B / 100)}%`
355
+ transform: `scale(${V / 100})`,
356
+ width: `${100 / (V / 100)}%`
357
357
  },
358
- children: q.length > 0 ? /* @__PURE__ */ v(r, {
358
+ children: J.length > 0 ? /* @__PURE__ */ y(r, {
359
359
  enabled: ke,
360
360
  onCrossFilter: (e) => {},
361
- children: /* @__PURE__ */ v(ee, {
362
- widgets: q,
363
- cols: L,
364
- isEditMode: F,
365
- width: D,
361
+ children: /* @__PURE__ */ y(ee, {
362
+ widgets: J,
363
+ cols: R,
364
+ isEditMode: I,
365
+ width: O,
366
366
  onLayoutChange: Ke,
367
- transformScale: B / 100,
367
+ transformScale: V / 100,
368
368
  onWidgetSelect: qe,
369
369
  selectedWidgetId: We
370
370
  })
371
- }) : /* @__PURE__ */ v("div", {
371
+ }) : /* @__PURE__ */ y("div", {
372
372
  className: "flex min-h-[min(400px,60vh)] items-center justify-center p-card-padding",
373
- children: /* @__PURE__ */ v(o, {
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: w("bigconsole.dashboards.canvas.noWidgetsTitle", "No widgets yet"),
379
- description: w("bigconsole.dashboards.canvas.noWidgetsDescription", "Add widgets to build your dashboard. Click the \"Add Widget\" button to get started."),
380
- children: F && /* @__PURE__ */ y(_, {
381
- onClick: $e,
382
- children: [/* @__PURE__ */ v(me, { className: "size-4" }), w("bigconsole.dashboards.canvas.addWidget", "Add Widget")]
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__ */ v(ce, {
390
- isOpen: Z,
389
+ /* @__PURE__ */ y(ce, {
390
+ isOpen: Q,
391
391
  onClose: Ge
392
392
  }),
393
- /* @__PURE__ */ v(se, {
394
- dashboardId: p,
395
- dashboardName: x || w("bigconsole.dashboards.canvas.dashboardFallbackName", "Dashboard"),
393
+ /* @__PURE__ */ y(se, {
394
+ dashboardId: m,
395
+ dashboardName: S || T("bigconsole.dashboards.canvas.dashboardFallbackName", "Dashboard"),
396
396
  isOpen: je,
397
- onClose: () => O(!1),
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 { b as DashboardCanvas, b as default };
405
+ export { x as DashboardCanvas, x as default };
@@ -56,6 +56,7 @@ var o = e(function({ value: e, type: o, onChange: s, readOnly: c = !1, height: l
56
56
  onMount: g,
57
57
  options: {
58
58
  readOnly: c,
59
+ editContext: !1,
59
60
  minimap: { enabled: !1 },
60
61
  lineNumbers: u ? "on" : "off",
61
62
  scrollBeyondLastLine: !1,
@@ -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
- export declare const ParserCard: import('react').MemoExoticComponent<({ parser, onView, onEdit, onTest, onExecute, onExport, onDelete, }: ParserCardProps) => import('react').JSX.Element>;
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;