@burdenoff/microfe-bigconsole 2026.1103.2 → 2026.1103.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.
@@ -6,182 +6,46 @@ import "../components/common/index.js";
6
6
  import { WIDGET_CATEGORY_LABELS as i } from "../components/widgets/WidgetRegistry.js";
7
7
  import { WidgetWrapper as a } from "../components/widgets/WidgetWrapper.js";
8
8
  import "../components/widgets/index.js";
9
- import { useMemo as o, useState as s } from "react";
10
- import { Button as c, IllustratedEmptyState as l, PagePurpose as u } from "@burdenoff/fe-libs/ui";
11
- import { useI18n as d } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
9
+ import { DEMO_WIDGET_TYPES as o } from "../utils/widgetDemoCatalog.js";
10
+ import { DEMO_SAMPLES as s, sampleData as c } from "../utils/widgetDemoSamples.js";
11
+ import { useMemo as l, useState as u } from "react";
12
+ import { Button as d, IllustratedEmptyState as f, PagePurpose as p } from "@burdenoff/fe-libs/ui";
13
+ import { useI18n as m } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
14
+ import { jsx as h, jsxs as g } from "react/jsx-runtime";
13
15
  //#region src/bigconsole/pages/WidgetDemoPage.tsx
14
- var m = [
15
- {
16
- type: "metric_card",
17
- title: "Metric Card",
18
- titleKey: "bigconsole.widgetDemo.type.metricCard.title",
19
- description: "Single metric with trend and sparkline",
20
- descriptionKey: "bigconsole.widgetDemo.type.metricCard.description",
21
- category: "KPI"
22
- },
23
- {
24
- type: "kpi_card_comparison",
25
- title: "KPI Card Comparison",
26
- titleKey: "bigconsole.widgetDemo.type.kpiCardComparison.title",
27
- description: "Multiple KPIs with comparisons",
28
- descriptionKey: "bigconsole.widgetDemo.type.kpiCardComparison.description",
29
- category: "KPI"
30
- },
31
- {
32
- type: "gauge",
33
- title: "Gauge",
34
- titleKey: "bigconsole.widgetDemo.type.gauge.title",
35
- description: "Circular/linear gauge with thresholds",
36
- descriptionKey: "bigconsole.widgetDemo.type.gauge.description",
37
- category: "KPI"
38
- },
39
- {
40
- type: "progress",
41
- title: "Progress",
42
- titleKey: "bigconsole.widgetDemo.type.progress.title",
43
- description: "Progress bar with milestones",
44
- descriptionKey: "bigconsole.widgetDemo.type.progress.description",
45
- category: "KPI"
46
- },
47
- {
48
- type: "chart",
49
- title: "Chart (Line/Bar/Area)",
50
- titleKey: "bigconsole.widgetDemo.type.chart.title",
51
- description: "Time-series data visualization",
52
- descriptionKey: "bigconsole.widgetDemo.type.chart.description",
53
- category: "Visualization"
54
- },
55
- {
56
- type: "funnel_chart",
57
- title: "Funnel Chart",
58
- titleKey: "bigconsole.widgetDemo.type.funnelChart.title",
59
- description: "Conversion funnel with stages",
60
- descriptionKey: "bigconsole.widgetDemo.type.funnelChart.description",
61
- category: "Visualization"
62
- },
63
- {
64
- type: "heatmap",
65
- title: "Heatmap",
66
- titleKey: "bigconsole.widgetDemo.type.heatmap.title",
67
- description: "Grid visualization with color intensity",
68
- descriptionKey: "bigconsole.widgetDemo.type.heatmap.description",
69
- category: "Visualization"
70
- },
71
- {
72
- type: "map",
73
- title: "Map",
74
- titleKey: "bigconsole.widgetDemo.type.map.title",
75
- description: "Geographic data with markers",
76
- descriptionKey: "bigconsole.widgetDemo.type.map.description",
77
- category: "Visualization"
78
- },
79
- {
80
- type: "table",
81
- title: "Table",
82
- titleKey: "bigconsole.widgetDemo.type.table.title",
83
- description: "Data table with sort/filter/pagination",
84
- descriptionKey: "bigconsole.widgetDemo.type.table.description",
85
- category: "Data"
86
- },
87
- {
88
- type: "pivot_table",
89
- title: "Pivot Table",
90
- titleKey: "bigconsole.widgetDemo.type.pivotTable.title",
91
- description: "Multi-dimensional data analysis",
92
- descriptionKey: "bigconsole.widgetDemo.type.pivotTable.description",
93
- category: "Data"
94
- },
95
- {
96
- type: "list",
97
- title: "List",
98
- titleKey: "bigconsole.widgetDemo.type.list.title",
99
- description: "Scrollable list with items",
100
- descriptionKey: "bigconsole.widgetDemo.type.list.description",
101
- category: "Data"
102
- },
103
- {
104
- type: "form",
105
- title: "Form (Adaptive Card)",
106
- titleKey: "bigconsole.widgetDemo.type.form.title",
107
- description: "Interactive form with inputs",
108
- descriptionKey: "bigconsole.widgetDemo.type.form.description",
109
- category: "Content"
110
- },
111
- {
112
- type: "text",
113
- title: "Text (Markdown)",
114
- titleKey: "bigconsole.widgetDemo.type.text.title",
115
- description: "Rich text with markdown support",
116
- descriptionKey: "bigconsole.widgetDemo.type.text.description",
117
- category: "Content"
118
- },
119
- {
120
- type: "iframe",
121
- title: "iFrame",
122
- titleKey: "bigconsole.widgetDemo.type.iframe.title",
123
- description: "Embedded external content",
124
- descriptionKey: "bigconsole.widgetDemo.type.iframe.description",
125
- category: "Content"
126
- },
127
- {
128
- type: "calendar",
129
- title: "Calendar",
130
- titleKey: "bigconsole.widgetDemo.type.calendar.title",
131
- description: "Event calendar view",
132
- descriptionKey: "bigconsole.widgetDemo.type.calendar.description",
133
- category: "Temporal"
134
- },
135
- {
136
- type: "kanban",
137
- title: "Kanban",
138
- titleKey: "bigconsole.widgetDemo.type.kanban.title",
139
- description: "Task board with columns",
140
- descriptionKey: "bigconsole.widgetDemo.type.kanban.description",
141
- category: "Temporal"
142
- },
143
- {
144
- type: "timeline",
145
- title: "Timeline (Gantt)",
146
- titleKey: "bigconsole.widgetDemo.type.timeline.title",
147
- description: "Project timeline with tasks",
148
- descriptionKey: "bigconsole.widgetDemo.type.timeline.description",
149
- category: "Temporal"
150
- },
151
- {
152
- type: "custom",
153
- title: "Custom",
154
- titleKey: "bigconsole.widgetDemo.type.custom.title",
155
- description: "User-defined widget rendering",
156
- descriptionKey: "bigconsole.widgetDemo.type.custom.description",
157
- category: "Custom"
158
- }
159
- ], h = [
16
+ function _(e) {
17
+ let t = s[e];
18
+ return t ? {
19
+ ...t.config,
20
+ mockData: c(t)
21
+ } : {};
22
+ }
23
+ var v = [
160
24
  "KPI",
161
25
  "Visualization",
162
26
  "Data",
163
27
  "Content",
164
28
  "Temporal",
165
29
  "Custom"
166
- ], g = {
30
+ ], y = {
167
31
  KPI: "Single-number widgets for a headline figure and how it is trending.",
168
32
  Visualization: "Chart widgets for comparing series, stages and distributions.",
169
33
  Data: "Row-and-column widgets for browsing records in detail.",
170
34
  Content: "Widgets that carry prose, forms or an embedded page.",
171
35
  Temporal: "Widgets organised by date, schedule or workflow stage.",
172
36
  Custom: "Widgets whose body you define yourself."
173
- }, _ = () => {
174
- let { t: _ } = d(), v = e(), [y, b] = s(""), [x, S] = s("grid"), C = o(() => (y ? m.filter((e) => [
37
+ }, b = () => {
38
+ let { t: s } = m(), c = e(), [b, x] = u(""), [S, C] = u("grid"), w = l(() => (b ? o.filter((e) => [
175
39
  e.type,
176
- _(e.titleKey, e.title),
177
- _(e.descriptionKey, e.description)
178
- ].some((e) => e.toLowerCase().includes(y.trim().toLowerCase()))) : m).map((e, t) => ({
40
+ s(e.titleKey, e.title),
41
+ s(e.descriptionKey, e.description)
42
+ ].some((e) => e.toLowerCase().includes(b.trim().toLowerCase()))) : o).map((e, t) => ({
179
43
  id: `demo-${e.type}`,
180
44
  pageId: "demo-page",
181
45
  dashboardId: "demo-dashboard",
182
46
  type: e.type,
183
- title: _(e.titleKey, e.title),
184
- config: {},
47
+ title: s(e.titleKey, e.title),
48
+ config: _(e.type),
185
49
  position: {
186
50
  x: t % 3 * 4,
187
51
  y: Math.floor(t / 3) * 4,
@@ -194,69 +58,69 @@ var m = [
194
58
  positionHeight: 4,
195
59
  refreshInterval: void 0,
196
60
  lastRefreshedAt: void 0,
197
- metadata: { description: _(e.descriptionKey, e.description) },
61
+ metadata: { description: s(e.descriptionKey, e.description) },
198
62
  context: {},
199
63
  translations: [],
200
64
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
201
65
  updatedAt: (/* @__PURE__ */ new Date()).toISOString()
202
- })), [y, _]), w = o(() => {
66
+ })), [b, s]), T = l(() => {
203
67
  let e = /* @__PURE__ */ new Map();
204
- for (let t of C) {
205
- let n = m.find((e) => e.type === t.type);
68
+ for (let t of w) {
69
+ let n = o.find((e) => e.type === t.type);
206
70
  if (!n) continue;
207
71
  let r = e.get(n.category);
208
72
  r ? r.push(t) : e.set(n.category, [t]);
209
73
  }
210
- return h.filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
74
+ return v.filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
211
75
  category: t,
212
76
  label: i[t],
213
- blurb: g[t],
77
+ blurb: y[t],
214
78
  widgets: e.get(t) ?? []
215
79
  }));
216
- }, [C]), T = x === "grid" ? "grid grid-cols-1 gap-form-gap sm:grid-cols-2 xl:grid-cols-3" : "flex flex-col gap-form-gap";
217
- return /* @__PURE__ */ p("div", {
80
+ }, [w]), E = S === "grid" ? "grid grid-cols-1 gap-form-gap sm:grid-cols-2 xl:grid-cols-3" : "flex flex-col gap-form-gap";
81
+ return /* @__PURE__ */ g("div", {
218
82
  className: "flex h-full min-w-0 flex-col bg-bg-canvas",
219
83
  children: [
220
- /* @__PURE__ */ f("section", {
84
+ /* @__PURE__ */ h("section", {
221
85
  "aria-label": "Widget demo header",
222
86
  className: `${t("bare", "neutral", "none")} flex-shrink-0 border-b border-[var(--color-border-subtle)] bg-bg-surface px-4 py-3 sm:px-6 sm:py-4`,
223
- children: /* @__PURE__ */ p("div", {
87
+ children: /* @__PURE__ */ g("div", {
224
88
  className: "flex flex-col gap-control-gap lg:flex-row lg:items-center lg:justify-between",
225
- children: [/* @__PURE__ */ p("div", {
89
+ children: [/* @__PURE__ */ g("div", {
226
90
  className: "min-w-0",
227
- children: [/* @__PURE__ */ f("h1", {
91
+ children: [/* @__PURE__ */ h("h1", {
228
92
  className: "text-xl font-semibold text-text-primary",
229
- children: _("bigconsole.widgetDemo.header.title", "Widget Demo")
230
- }), /* @__PURE__ */ f("p", {
93
+ children: s("bigconsole.widgetDemo.header.title", "Widget Demo")
94
+ }), /* @__PURE__ */ h("p", {
231
95
  className: "mt-1 text-sm text-text-secondary",
232
- children: _("bigconsole.widgetDemo.header.subtitle", "All 18 widget types - connect a DataSink for real data")
96
+ children: s("bigconsole.widgetDemo.header.subtitle", "All {{count}} widget types - connect a DataSink for real data", { count: o.length })
233
97
  })]
234
- }), /* @__PURE__ */ p("div", {
98
+ }), /* @__PURE__ */ g("div", {
235
99
  className: "flex flex-wrap items-center gap-control-gap",
236
100
  children: [
237
- /* @__PURE__ */ p("div", {
101
+ /* @__PURE__ */ g("div", {
238
102
  className: "relative min-w-0 flex-1 sm:flex-none",
239
103
  children: [
240
- /* @__PURE__ */ f("label", {
104
+ /* @__PURE__ */ h("label", {
241
105
  htmlFor: "widget-demo-filter",
242
106
  className: "sr-only",
243
107
  children: "Filter widget types"
244
108
  }),
245
- /* @__PURE__ */ f("input", {
109
+ /* @__PURE__ */ h("input", {
246
110
  id: "widget-demo-filter",
247
111
  type: "text",
248
- placeholder: _("bigconsole.widgetDemo.filter.placeholder", "Filter widgets..."),
249
- value: y,
250
- onChange: (e) => b(e.target.value),
112
+ placeholder: s("bigconsole.widgetDemo.filter.placeholder", "Filter widgets..."),
113
+ value: b,
114
+ onChange: (e) => x(e.target.value),
251
115
  className: "h-control-md w-full min-w-0 rounded-input border border-[var(--color-border-subtle)] bg-bg-sunken py-2 pl-[3.25rem] pr-3 text-sm text-text-primary placeholder:text-text-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface sm:w-64"
252
116
  }),
253
- /* @__PURE__ */ f("svg", {
117
+ /* @__PURE__ */ h("svg", {
254
118
  "aria-hidden": "true",
255
119
  className: "pointer-events-none absolute left-3 top-1/2 h-icon-sm w-icon-sm -translate-y-1/2 text-text-secondary",
256
120
  fill: "none",
257
121
  stroke: "currentColor",
258
122
  viewBox: "0 0 24 24",
259
- children: /* @__PURE__ */ f("path", {
123
+ children: /* @__PURE__ */ h("path", {
260
124
  strokeLinecap: "round",
261
125
  strokeLinejoin: "round",
262
126
  strokeWidth: 2,
@@ -265,63 +129,63 @@ var m = [
265
129
  })
266
130
  ]
267
131
  }),
268
- /* @__PURE__ */ p("div", {
132
+ /* @__PURE__ */ g("div", {
269
133
  className: "flex shrink-0 items-center gap-1 rounded-button bg-bg-sunken p-1",
270
134
  role: "group",
271
135
  "aria-label": "Gallery layout",
272
- children: [/* @__PURE__ */ f("button", {
136
+ children: [/* @__PURE__ */ h("button", {
273
137
  type: "button",
274
- onClick: () => S("grid"),
275
- "aria-pressed": x === "grid",
276
- className: `min-h-control-md rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x === "grid" ? "bg-bg-surface text-text-primary shadow-[var(--shadow-elevation-1)]" : "text-text-secondary hover:text-text-primary"}`,
277
- children: _("bigconsole.widgetDemo.viewToggle.grid", "Grid")
278
- }), /* @__PURE__ */ f("button", {
138
+ onClick: () => C("grid"),
139
+ "aria-pressed": S === "grid",
140
+ className: `min-h-control-md rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${S === "grid" ? "bg-bg-surface text-text-primary shadow-[var(--shadow-elevation-1)]" : "text-text-secondary hover:text-text-primary"}`,
141
+ children: s("bigconsole.widgetDemo.viewToggle.grid", "Grid")
142
+ }), /* @__PURE__ */ h("button", {
279
143
  type: "button",
280
- onClick: () => S("list"),
281
- "aria-pressed": x === "list",
282
- className: `min-h-control-md rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${x === "list" ? "bg-bg-surface text-text-primary shadow-[var(--shadow-elevation-1)]" : "text-text-secondary hover:text-text-primary"}`,
283
- children: _("bigconsole.widgetDemo.viewToggle.list", "List")
144
+ onClick: () => C("list"),
145
+ "aria-pressed": S === "list",
146
+ className: `min-h-control-md rounded-button px-3 text-sm font-medium motion-safe:transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface ${S === "list" ? "bg-bg-surface text-text-primary shadow-[var(--shadow-elevation-1)]" : "text-text-secondary hover:text-text-primary"}`,
147
+ children: s("bigconsole.widgetDemo.viewToggle.list", "List")
284
148
  })]
285
149
  }),
286
- /* @__PURE__ */ f(c, {
150
+ /* @__PURE__ */ h(d, {
287
151
  variant: "secondary",
288
- onClick: () => v("/dashboards"),
289
- children: _("bigconsole.widgetDemo.openDashboards", "Open dashboards")
152
+ onClick: () => c("/dashboards"),
153
+ children: s("bigconsole.widgetDemo.openDashboards", "Open dashboards")
290
154
  })
291
155
  ]
292
156
  })]
293
157
  })
294
158
  }),
295
- /* @__PURE__ */ f("div", {
159
+ /* @__PURE__ */ h("div", {
296
160
  className: "min-w-0 flex-1 overflow-y-auto overflow-x-hidden p-4 sm:p-6",
297
- children: /* @__PURE__ */ p(r, { children: [
298
- /* @__PURE__ */ f("section", {
161
+ children: /* @__PURE__ */ g(r, { children: [
162
+ /* @__PURE__ */ h("section", {
299
163
  "aria-label": "What this gallery is for",
300
164
  className: t("muted", "neutral", "compact"),
301
- children: /* @__PURE__ */ f(u, { children: _("bigconsole.widgetDemo.pagePurpose", "This gallery previews every widget type BigConsole can render on a dashboard — metrics, charts, tables, maps, kanban boards and more. Use it to see what each widget looks like and pick the right one before wiring it to a real DataSink in the dashboard builder.") })
165
+ children: /* @__PURE__ */ h(p, { children: s("bigconsole.widgetDemo.pagePurpose", "This gallery previews every widget type BigConsole can render on a dashboard — metrics, charts, tables, maps, kanban boards and more. Use it to see what each widget looks like and pick the right one before wiring it to a real DataSink in the dashboard builder.") })
302
166
  }),
303
- w.length > 0 && /* @__PURE__ */ f(n, {
167
+ T.length > 0 && /* @__PURE__ */ h(n, {
304
168
  emphasis: "primary",
305
169
  headingLevel: 2,
306
170
  title: "Widget gallery",
307
171
  description: "Every widget renders its unconnected state here — the card chrome, header and empty copy are exactly what a dashboard will show before a DataSink is bound.",
308
- meta: /* @__PURE__ */ p("span", {
172
+ meta: /* @__PURE__ */ g("span", {
309
173
  className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
310
174
  children: [
311
- C.length,
175
+ w.length,
312
176
  " of ",
313
- m.length
177
+ o.length
314
178
  ]
315
179
  }),
316
- children: /* @__PURE__ */ f("div", {
180
+ children: /* @__PURE__ */ h("div", {
317
181
  className: "flex flex-col gap-section-gap",
318
- children: w.map((e) => /* @__PURE__ */ f(n, {
182
+ children: T.map((e) => /* @__PURE__ */ h(n, {
319
183
  emphasis: "bare",
320
184
  padding: "none",
321
185
  headingLevel: 3,
322
186
  title: e.label,
323
187
  description: e.blurb,
324
- meta: /* @__PURE__ */ p("span", {
188
+ meta: /* @__PURE__ */ g("span", {
325
189
  className: "text-xs font-medium text-text-muted",
326
190
  children: [
327
191
  e.widgets.length,
@@ -329,28 +193,28 @@ var m = [
329
193
  e.widgets.length === 1 ? "type" : "types"
330
194
  ]
331
195
  }),
332
- children: /* @__PURE__ */ f("div", {
333
- className: T,
196
+ children: /* @__PURE__ */ h("div", {
197
+ className: E,
334
198
  children: e.widgets.map((e) => {
335
- let t = m.find((t) => t.type === e.type);
336
- return /* @__PURE__ */ p("figure", {
337
- className: `m-0 flex min-w-0 flex-col ${x === "grid" ? "h-80" : "h-64"}`,
338
- children: [/* @__PURE__ */ p("figcaption", {
199
+ let t = o.find((t) => t.type === e.type);
200
+ return /* @__PURE__ */ g("figure", {
201
+ className: `m-0 flex min-w-0 flex-col ${S === "grid" ? "h-80" : "h-64"}`,
202
+ children: [/* @__PURE__ */ g("figcaption", {
339
203
  className: "mb-2 flex flex-shrink-0 flex-wrap items-baseline gap-x-2 gap-y-0.5 text-xs text-text-secondary",
340
- children: [/* @__PURE__ */ p("span", { children: [
341
- _("bigconsole.widgetDemo.widgetCard.typeLabel", "Type:"),
204
+ children: [/* @__PURE__ */ g("span", { children: [
205
+ s("bigconsole.widgetDemo.widgetCard.typeLabel", "Type:"),
342
206
  " ",
343
- /* @__PURE__ */ f("code", {
207
+ /* @__PURE__ */ h("code", {
344
208
  className: "font-mono text-text-link",
345
209
  children: e.type
346
210
  })
347
- ] }), t && /* @__PURE__ */ f("span", {
211
+ ] }), t && /* @__PURE__ */ h("span", {
348
212
  className: "text-text-muted",
349
- children: _(t.descriptionKey, t.description)
213
+ children: s(t.descriptionKey, t.description)
350
214
  })]
351
- }), /* @__PURE__ */ f("div", {
215
+ }), /* @__PURE__ */ h("div", {
352
216
  className: "min-h-0 min-w-0 flex-1",
353
- children: /* @__PURE__ */ f(a, {
217
+ children: /* @__PURE__ */ h(a, {
354
218
  previewOnly: !0,
355
219
  widget: e
356
220
  })
@@ -361,31 +225,31 @@ var m = [
361
225
  }, e.category))
362
226
  })
363
227
  }),
364
- C.length === 0 && /* @__PURE__ */ f(n, {
228
+ w.length === 0 && /* @__PURE__ */ h(n, {
365
229
  emphasis: "standard",
366
230
  tone: "info",
367
- title: _("bigconsole.widgetDemo.emptyState.title", "No widgets match your filter"),
231
+ title: s("bigconsole.widgetDemo.emptyState.title", "No widgets match your filter"),
368
232
  headingLevel: 2,
369
233
  "data-testid": "widget-demo-empty",
370
- children: /* @__PURE__ */ f(l, {
234
+ children: /* @__PURE__ */ h(f, {
371
235
  illustration: "empty-search",
372
- title: _("bigconsole.widgetDemo.emptyState.description", "Try a different search term to preview a widget type."),
236
+ title: s("bigconsole.widgetDemo.emptyState.description", "Try a different search term to preview a widget type."),
373
237
  description: "The filter matches a widget's name and its one-line description."
374
238
  })
375
239
  })
376
240
  ] })
377
241
  }),
378
- /* @__PURE__ */ f("section", {
242
+ /* @__PURE__ */ h("section", {
379
243
  "aria-label": "Gallery summary",
380
244
  className: `${t("bare", "neutral", "none")} flex-shrink-0 border-t border-[var(--color-border-subtle)] bg-bg-sunken px-4 py-2 sm:px-6`,
381
- children: /* @__PURE__ */ p("div", {
245
+ children: /* @__PURE__ */ g("div", {
382
246
  className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-1 text-xs text-text-secondary",
383
- children: [/* @__PURE__ */ f("span", { children: _("bigconsole.widgetDemo.footer.showing", "Showing {{shown}} of {{total}} widget types", {
384
- shown: C.length,
385
- total: m.length
386
- }) }), /* @__PURE__ */ f("span", {
247
+ children: [/* @__PURE__ */ h("span", { children: s("bigconsole.widgetDemo.footer.showing", "Showing {{shown}} of {{total}} widget types", {
248
+ shown: w.length,
249
+ total: o.length
250
+ }) }), /* @__PURE__ */ h("span", {
387
251
  className: "text-text-muted",
388
- children: _("bigconsole.widgetDemo.footer.hint", "Widgets show empty state until connected to DataSink + Parser")
252
+ children: s("bigconsole.widgetDemo.footer.hint", "Widgets show empty state until connected to DataSink + Parser")
389
253
  })]
390
254
  })
391
255
  })
@@ -393,4 +257,4 @@ var m = [
393
257
  });
394
258
  };
395
259
  //#endregion
396
- export { _ as WidgetDemoPage, _ as default };
260
+ export { b as WidgetDemoPage, b as default };
@@ -1,2 +1,8 @@
1
1
  /** Display only meaningful context; the original drilldown parameters remain unchanged. */
2
2
  export declare function getVisibleDrilldownParams(params: Record<string, unknown>): Array<[string, unknown]>;
3
+ export interface DrilldownFilterLabel {
4
+ name?: string;
5
+ config?: Record<string, unknown>;
6
+ }
7
+ /** Resolve display metadata only; never rewrite filter IDs or values used by widgets. */
8
+ export declare function getDrilldownParamSummary(params: Record<string, unknown>, readFilter?: (id: string) => DrilldownFilterLabel | null | undefined): string;
@@ -2,5 +2,23 @@
2
2
  function e(e) {
3
3
  return Object.entries(e).filter(([e, t]) => e.startsWith("__") || t == null ? !1 : typeof t == "string" ? t.trim().length > 0 : !Array.isArray(t) || t.length > 0);
4
4
  }
5
+ function t(e, n) {
6
+ if (Array.isArray(e)) return e.map((e) => t(e, n)).join(", ");
7
+ if (typeof e == "object" && e) {
8
+ let r = e;
9
+ return typeof r.label == "string" ? r.label : "value" in r ? t(r.value, n) : JSON.stringify(e);
10
+ }
11
+ if (Array.isArray(n)) {
12
+ let t = n.find((t) => t && typeof t == "object" && t.value === e && typeof t.label == "string");
13
+ if (t) return t.label;
14
+ }
15
+ return String(e);
16
+ }
17
+ function n(n, r = () => void 0) {
18
+ return e(n).map(([e, n]) => {
19
+ let i = r(e);
20
+ return `${i?.name || e}: ${t(n, i?.config?.options)}`;
21
+ }).join("; ");
22
+ }
5
23
  //#endregion
6
- export { e as getVisibleDrilldownParams };
24
+ export { n as getDrilldownParamSummary, e as getVisibleDrilldownParams };
@@ -0,0 +1,13 @@
1
+ import { WidgetCategory, WidgetType } from '../types';
2
+ export interface DemoWidgetDef {
3
+ type: WidgetType;
4
+ title: string;
5
+ /** i18n key for the widget title shown on the demo card. */
6
+ titleKey: string;
7
+ description: string;
8
+ /** i18n key for the one-line description under the card header. */
9
+ descriptionKey: string;
10
+ /** Grouping used by the gallery headings — mirrors the registry categories. */
11
+ category: WidgetCategory;
12
+ }
13
+ export declare const DEMO_WIDGET_TYPES: DemoWidgetDef[];