@burdenoff/microfe-bigconsole 2026.1103.1 → 2026.1103.3
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/widgets/utils/conditionalFormat.js +4 -4
- package/dist/bigconsole/pages/WidgetDemoPage.js +96 -232
- package/dist/bigconsole/utils/widgetDemoCatalog.d.ts +13 -0
- package/dist/bigconsole/utils/widgetDemoCatalog.js +181 -0
- package/dist/bigconsole/utils/widgetDemoSamples.d.ts +10 -0
- package/dist/bigconsole/utils/widgetDemoSamples.js +384 -0
- package/package.json +1 -1
|
@@ -66,10 +66,10 @@ var i = {
|
|
|
66
66
|
info: "text-[var(--color-status-info-text)]",
|
|
67
67
|
neutral: "text-text-secondary"
|
|
68
68
|
}, a = {
|
|
69
|
-
success: "bg-status-success-bg",
|
|
70
|
-
warning: "bg-status-warning-bg",
|
|
71
|
-
danger: "bg-status-error-bg",
|
|
72
|
-
info: "bg-status-info-bg",
|
|
69
|
+
success: "bg-status-success-bg-subtle",
|
|
70
|
+
warning: "bg-status-warning-bg-subtle",
|
|
71
|
+
danger: "bg-status-error-bg-subtle",
|
|
72
|
+
info: "bg-status-info-bg-subtle",
|
|
73
73
|
neutral: "bg-bg-sunken"
|
|
74
74
|
};
|
|
75
75
|
function o(e) {
|
|
@@ -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 {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
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
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
],
|
|
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:
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
].some((e) => e.toLowerCase().includes(
|
|
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:
|
|
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:
|
|
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
|
-
})), [
|
|
66
|
+
})), [b, s]), T = l(() => {
|
|
203
67
|
let e = /* @__PURE__ */ new Map();
|
|
204
|
-
for (let t of
|
|
205
|
-
let n =
|
|
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
|
|
74
|
+
return v.filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
|
|
211
75
|
category: t,
|
|
212
76
|
label: i[t],
|
|
213
|
-
blurb:
|
|
77
|
+
blurb: y[t],
|
|
214
78
|
widgets: e.get(t) ?? []
|
|
215
79
|
}));
|
|
216
|
-
}, [
|
|
217
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
89
|
+
children: [/* @__PURE__ */ g("div", {
|
|
226
90
|
className: "min-w-0",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
91
|
+
children: [/* @__PURE__ */ h("h1", {
|
|
228
92
|
className: "text-xl font-semibold text-text-primary",
|
|
229
|
-
children:
|
|
230
|
-
}), /* @__PURE__ */
|
|
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:
|
|
96
|
+
children: s("bigconsole.widgetDemo.header.subtitle", "All {{count}} widget types - connect a DataSink for real data", { count: o.length })
|
|
233
97
|
})]
|
|
234
|
-
}), /* @__PURE__ */
|
|
98
|
+
}), /* @__PURE__ */ g("div", {
|
|
235
99
|
className: "flex flex-wrap items-center gap-control-gap",
|
|
236
100
|
children: [
|
|
237
|
-
/* @__PURE__ */
|
|
101
|
+
/* @__PURE__ */ g("div", {
|
|
238
102
|
className: "relative min-w-0 flex-1 sm:flex-none",
|
|
239
103
|
children: [
|
|
240
|
-
/* @__PURE__ */
|
|
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__ */
|
|
109
|
+
/* @__PURE__ */ h("input", {
|
|
246
110
|
id: "widget-demo-filter",
|
|
247
111
|
type: "text",
|
|
248
|
-
placeholder:
|
|
249
|
-
value:
|
|
250
|
-
onChange: (e) =>
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
136
|
+
children: [/* @__PURE__ */ h("button", {
|
|
273
137
|
type: "button",
|
|
274
|
-
onClick: () =>
|
|
275
|
-
"aria-pressed":
|
|
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 ${
|
|
277
|
-
children:
|
|
278
|
-
}), /* @__PURE__ */
|
|
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: () =>
|
|
281
|
-
"aria-pressed":
|
|
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 ${
|
|
283
|
-
children:
|
|
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__ */
|
|
150
|
+
/* @__PURE__ */ h(d, {
|
|
287
151
|
variant: "secondary",
|
|
288
|
-
onClick: () =>
|
|
289
|
-
children:
|
|
152
|
+
onClick: () => c("/dashboards"),
|
|
153
|
+
children: s("bigconsole.widgetDemo.openDashboards", "Open dashboards")
|
|
290
154
|
})
|
|
291
155
|
]
|
|
292
156
|
})]
|
|
293
157
|
})
|
|
294
158
|
}),
|
|
295
|
-
/* @__PURE__ */
|
|
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__ */
|
|
298
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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
|
-
|
|
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__ */
|
|
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
|
-
|
|
175
|
+
w.length,
|
|
312
176
|
" of ",
|
|
313
|
-
|
|
177
|
+
o.length
|
|
314
178
|
]
|
|
315
179
|
}),
|
|
316
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ h("div", {
|
|
317
181
|
className: "flex flex-col gap-section-gap",
|
|
318
|
-
children:
|
|
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__ */
|
|
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__ */
|
|
333
|
-
className:
|
|
196
|
+
children: /* @__PURE__ */ h("div", {
|
|
197
|
+
className: E,
|
|
334
198
|
children: e.widgets.map((e) => {
|
|
335
|
-
let t =
|
|
336
|
-
return /* @__PURE__ */
|
|
337
|
-
className: `m-0 flex min-w-0 flex-col ${
|
|
338
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
341
|
-
|
|
204
|
+
children: [/* @__PURE__ */ g("span", { children: [
|
|
205
|
+
s("bigconsole.widgetDemo.widgetCard.typeLabel", "Type:"),
|
|
342
206
|
" ",
|
|
343
|
-
/* @__PURE__ */
|
|
207
|
+
/* @__PURE__ */ h("code", {
|
|
344
208
|
className: "font-mono text-text-link",
|
|
345
209
|
children: e.type
|
|
346
210
|
})
|
|
347
|
-
] }), t && /* @__PURE__ */
|
|
211
|
+
] }), t && /* @__PURE__ */ h("span", {
|
|
348
212
|
className: "text-text-muted",
|
|
349
|
-
children:
|
|
213
|
+
children: s(t.descriptionKey, t.description)
|
|
350
214
|
})]
|
|
351
|
-
}), /* @__PURE__ */
|
|
215
|
+
}), /* @__PURE__ */ h("div", {
|
|
352
216
|
className: "min-h-0 min-w-0 flex-1",
|
|
353
|
-
children: /* @__PURE__ */
|
|
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
|
-
|
|
228
|
+
w.length === 0 && /* @__PURE__ */ h(n, {
|
|
365
229
|
emphasis: "standard",
|
|
366
230
|
tone: "info",
|
|
367
|
-
title:
|
|
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
|
|
234
|
+
children: /* @__PURE__ */ h(f, {
|
|
371
235
|
illustration: "empty-search",
|
|
372
|
-
title:
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
384
|
-
shown:
|
|
385
|
-
total:
|
|
386
|
-
}) }), /* @__PURE__ */
|
|
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:
|
|
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 {
|
|
260
|
+
export { b as WidgetDemoPage, b as default };
|
|
@@ -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[];
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
//#region src/bigconsole/utils/widgetDemoCatalog.ts
|
|
2
|
+
var e = [
|
|
3
|
+
{
|
|
4
|
+
type: "metric_card",
|
|
5
|
+
title: "Metric Card",
|
|
6
|
+
titleKey: "bigconsole.widgetDemo.type.metricCard.title",
|
|
7
|
+
description: "Single metric with trend and sparkline",
|
|
8
|
+
descriptionKey: "bigconsole.widgetDemo.type.metricCard.description",
|
|
9
|
+
category: "KPI"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
type: "kpi_card_comparison",
|
|
13
|
+
title: "KPI Card Comparison",
|
|
14
|
+
titleKey: "bigconsole.widgetDemo.type.kpiCardComparison.title",
|
|
15
|
+
description: "Multiple KPIs with comparisons",
|
|
16
|
+
descriptionKey: "bigconsole.widgetDemo.type.kpiCardComparison.description",
|
|
17
|
+
category: "KPI"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: "gauge",
|
|
21
|
+
title: "Gauge",
|
|
22
|
+
titleKey: "bigconsole.widgetDemo.type.gauge.title",
|
|
23
|
+
description: "Circular/linear gauge with thresholds",
|
|
24
|
+
descriptionKey: "bigconsole.widgetDemo.type.gauge.description",
|
|
25
|
+
category: "KPI"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: "progress",
|
|
29
|
+
title: "Progress",
|
|
30
|
+
titleKey: "bigconsole.widgetDemo.type.progress.title",
|
|
31
|
+
description: "Progress bar with milestones",
|
|
32
|
+
descriptionKey: "bigconsole.widgetDemo.type.progress.description",
|
|
33
|
+
category: "KPI"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "chart",
|
|
37
|
+
title: "Chart (Line/Bar/Area)",
|
|
38
|
+
titleKey: "bigconsole.widgetDemo.type.chart.title",
|
|
39
|
+
description: "Time-series data visualization",
|
|
40
|
+
descriptionKey: "bigconsole.widgetDemo.type.chart.description",
|
|
41
|
+
category: "Visualization"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "funnel_chart",
|
|
45
|
+
title: "Funnel Chart",
|
|
46
|
+
titleKey: "bigconsole.widgetDemo.type.funnelChart.title",
|
|
47
|
+
description: "Conversion funnel with stages",
|
|
48
|
+
descriptionKey: "bigconsole.widgetDemo.type.funnelChart.description",
|
|
49
|
+
category: "Visualization"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
type: "heatmap",
|
|
53
|
+
title: "Heatmap",
|
|
54
|
+
titleKey: "bigconsole.widgetDemo.type.heatmap.title",
|
|
55
|
+
description: "Grid visualization with color intensity",
|
|
56
|
+
descriptionKey: "bigconsole.widgetDemo.type.heatmap.description",
|
|
57
|
+
category: "Visualization"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: "waterfall",
|
|
61
|
+
title: "Waterfall",
|
|
62
|
+
titleKey: "bigconsole.widgetDemo.type.waterfall.title",
|
|
63
|
+
description: "Cumulative changes and a final total",
|
|
64
|
+
descriptionKey: "bigconsole.widgetDemo.type.waterfall.description",
|
|
65
|
+
category: "Visualization"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: "sankey",
|
|
69
|
+
title: "Sankey",
|
|
70
|
+
titleKey: "bigconsole.widgetDemo.type.sankey.title",
|
|
71
|
+
description: "Weighted flows between connected categories",
|
|
72
|
+
descriptionKey: "bigconsole.widgetDemo.type.sankey.description",
|
|
73
|
+
category: "Visualization"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
type: "box_plot",
|
|
77
|
+
title: "Box Plot",
|
|
78
|
+
titleKey: "bigconsole.widgetDemo.type.boxPlot.title",
|
|
79
|
+
description: "Quartiles, whiskers and outliers by group",
|
|
80
|
+
descriptionKey: "bigconsole.widgetDemo.type.boxPlot.description",
|
|
81
|
+
category: "Visualization"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: "map",
|
|
85
|
+
title: "Map",
|
|
86
|
+
titleKey: "bigconsole.widgetDemo.type.map.title",
|
|
87
|
+
description: "Geographic data with markers",
|
|
88
|
+
descriptionKey: "bigconsole.widgetDemo.type.map.description",
|
|
89
|
+
category: "Visualization"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: "table",
|
|
93
|
+
title: "Table",
|
|
94
|
+
titleKey: "bigconsole.widgetDemo.type.table.title",
|
|
95
|
+
description: "Data table with sort/filter/pagination",
|
|
96
|
+
descriptionKey: "bigconsole.widgetDemo.type.table.description",
|
|
97
|
+
category: "Data"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: "pivot_table",
|
|
101
|
+
title: "Pivot Table",
|
|
102
|
+
titleKey: "bigconsole.widgetDemo.type.pivotTable.title",
|
|
103
|
+
description: "Multi-dimensional data analysis",
|
|
104
|
+
descriptionKey: "bigconsole.widgetDemo.type.pivotTable.description",
|
|
105
|
+
category: "Data"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: "retention",
|
|
109
|
+
title: "Retention / Cohort",
|
|
110
|
+
titleKey: "bigconsole.widgetDemo.type.retention.title",
|
|
111
|
+
description: "Cohort-by-period retention grid",
|
|
112
|
+
descriptionKey: "bigconsole.widgetDemo.type.retention.description",
|
|
113
|
+
category: "Data"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: "list",
|
|
117
|
+
title: "List",
|
|
118
|
+
titleKey: "bigconsole.widgetDemo.type.list.title",
|
|
119
|
+
description: "Scrollable list with items",
|
|
120
|
+
descriptionKey: "bigconsole.widgetDemo.type.list.description",
|
|
121
|
+
category: "Data"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
type: "form",
|
|
125
|
+
title: "Form (Adaptive Card)",
|
|
126
|
+
titleKey: "bigconsole.widgetDemo.type.form.title",
|
|
127
|
+
description: "Interactive form with inputs",
|
|
128
|
+
descriptionKey: "bigconsole.widgetDemo.type.form.description",
|
|
129
|
+
category: "Content"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
type: "text",
|
|
133
|
+
title: "Text (Markdown)",
|
|
134
|
+
titleKey: "bigconsole.widgetDemo.type.text.title",
|
|
135
|
+
description: "Rich text with markdown support",
|
|
136
|
+
descriptionKey: "bigconsole.widgetDemo.type.text.description",
|
|
137
|
+
category: "Content"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: "iframe",
|
|
141
|
+
title: "iFrame",
|
|
142
|
+
titleKey: "bigconsole.widgetDemo.type.iframe.title",
|
|
143
|
+
description: "Embedded external content",
|
|
144
|
+
descriptionKey: "bigconsole.widgetDemo.type.iframe.description",
|
|
145
|
+
category: "Content"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: "calendar",
|
|
149
|
+
title: "Calendar",
|
|
150
|
+
titleKey: "bigconsole.widgetDemo.type.calendar.title",
|
|
151
|
+
description: "Event calendar view",
|
|
152
|
+
descriptionKey: "bigconsole.widgetDemo.type.calendar.description",
|
|
153
|
+
category: "Temporal"
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
type: "kanban",
|
|
157
|
+
title: "Kanban",
|
|
158
|
+
titleKey: "bigconsole.widgetDemo.type.kanban.title",
|
|
159
|
+
description: "Task board with columns",
|
|
160
|
+
descriptionKey: "bigconsole.widgetDemo.type.kanban.description",
|
|
161
|
+
category: "Temporal"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: "timeline",
|
|
165
|
+
title: "Timeline (Gantt)",
|
|
166
|
+
titleKey: "bigconsole.widgetDemo.type.timeline.title",
|
|
167
|
+
description: "Project timeline with tasks",
|
|
168
|
+
descriptionKey: "bigconsole.widgetDemo.type.timeline.description",
|
|
169
|
+
category: "Temporal"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
type: "custom",
|
|
173
|
+
title: "Custom",
|
|
174
|
+
titleKey: "bigconsole.widgetDemo.type.custom.title",
|
|
175
|
+
description: "User-defined widget rendering",
|
|
176
|
+
descriptionKey: "bigconsole.widgetDemo.type.custom.description",
|
|
177
|
+
category: "Custom"
|
|
178
|
+
}
|
|
179
|
+
];
|
|
180
|
+
//#endregion
|
|
181
|
+
export { e as DEMO_WIDGET_TYPES };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WidgetType } from '../types';
|
|
2
|
+
export interface DemoSample {
|
|
3
|
+
/** Config the renderer needs alongside the data (field names, chart variant, ...). */
|
|
4
|
+
config?: Record<string, unknown>;
|
|
5
|
+
/** The payload. A function so time-dependent samples are built at render time. */
|
|
6
|
+
data: unknown | (() => unknown);
|
|
7
|
+
}
|
|
8
|
+
export declare const DEMO_SAMPLES: Partial<Record<WidgetType, DemoSample>>;
|
|
9
|
+
/** The payload for a sample, building time-dependent ones now. */
|
|
10
|
+
export declare function sampleData(sample: DemoSample): unknown;
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
//#region src/bigconsole/utils/widgetDemoSamples.ts
|
|
2
|
+
var e = {
|
|
3
|
+
metric_card: { data: {
|
|
4
|
+
value: 12840,
|
|
5
|
+
changePercent: 5.2,
|
|
6
|
+
trend: "up"
|
|
7
|
+
} },
|
|
8
|
+
kpi_card_comparison: { data: { kpis: [{
|
|
9
|
+
id: "rev",
|
|
10
|
+
label: "Revenue",
|
|
11
|
+
value: 12e4,
|
|
12
|
+
previousValue: 1e5,
|
|
13
|
+
unit: "$",
|
|
14
|
+
trend: "up",
|
|
15
|
+
trendValue: 20
|
|
16
|
+
}, {
|
|
17
|
+
id: "churn",
|
|
18
|
+
label: "Churn",
|
|
19
|
+
value: 2.1,
|
|
20
|
+
unit: "%",
|
|
21
|
+
trend: "down",
|
|
22
|
+
trendValue: -.4
|
|
23
|
+
}] } },
|
|
24
|
+
chart: {
|
|
25
|
+
config: { chartType: "line" },
|
|
26
|
+
data: [
|
|
27
|
+
{
|
|
28
|
+
name: "Jan",
|
|
29
|
+
sales: 10,
|
|
30
|
+
cost: 6
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "Feb",
|
|
34
|
+
sales: 14,
|
|
35
|
+
cost: 7
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: "Mar",
|
|
39
|
+
sales: 12,
|
|
40
|
+
cost: 9
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "Apr",
|
|
44
|
+
sales: 18,
|
|
45
|
+
cost: 10
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
funnel_chart: {
|
|
50
|
+
config: { chartType: "funnel" },
|
|
51
|
+
data: { stages: [
|
|
52
|
+
{
|
|
53
|
+
name: "Visits",
|
|
54
|
+
value: 1e3
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "Signups",
|
|
58
|
+
value: 400
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "Paid",
|
|
62
|
+
value: 120
|
|
63
|
+
}
|
|
64
|
+
] }
|
|
65
|
+
},
|
|
66
|
+
waterfall: { data: [
|
|
67
|
+
{
|
|
68
|
+
name: "Start",
|
|
69
|
+
value: 100
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "Upsell",
|
|
73
|
+
value: 30
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: "Churn",
|
|
77
|
+
value: -20
|
|
78
|
+
}
|
|
79
|
+
] },
|
|
80
|
+
sankey: { data: [
|
|
81
|
+
{
|
|
82
|
+
source: "Visits",
|
|
83
|
+
target: "Signups",
|
|
84
|
+
value: 400
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
source: "Signups",
|
|
88
|
+
target: "Paid",
|
|
89
|
+
value: 120
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
source: "Visits",
|
|
93
|
+
target: "Bounce",
|
|
94
|
+
value: 600
|
|
95
|
+
}
|
|
96
|
+
] },
|
|
97
|
+
box_plot: { data: [
|
|
98
|
+
{
|
|
99
|
+
group: "A",
|
|
100
|
+
value: 1
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
group: "A",
|
|
104
|
+
value: 2
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
group: "A",
|
|
108
|
+
value: 3
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
group: "A",
|
|
112
|
+
value: 4
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
group: "B",
|
|
116
|
+
value: 5
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
group: "B",
|
|
120
|
+
value: 7
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
group: "B",
|
|
124
|
+
value: 9
|
|
125
|
+
}
|
|
126
|
+
] },
|
|
127
|
+
table: { data: [
|
|
128
|
+
{
|
|
129
|
+
name: "Alice",
|
|
130
|
+
region: "EU",
|
|
131
|
+
sales: 120
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
name: "Bob",
|
|
135
|
+
region: "US",
|
|
136
|
+
sales: 95
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "Chen",
|
|
140
|
+
region: "APAC",
|
|
141
|
+
sales: 143
|
|
142
|
+
}
|
|
143
|
+
] },
|
|
144
|
+
pivot_table: {
|
|
145
|
+
config: {
|
|
146
|
+
rows: ["region"],
|
|
147
|
+
columns: ["product"],
|
|
148
|
+
values: [{
|
|
149
|
+
field: "sales",
|
|
150
|
+
aggregation: "sum"
|
|
151
|
+
}]
|
|
152
|
+
},
|
|
153
|
+
data: [
|
|
154
|
+
{
|
|
155
|
+
region: "EU",
|
|
156
|
+
product: "A",
|
|
157
|
+
sales: 10
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
region: "EU",
|
|
161
|
+
product: "B",
|
|
162
|
+
sales: 20
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
region: "US",
|
|
166
|
+
product: "A",
|
|
167
|
+
sales: 30
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
region: "US",
|
|
171
|
+
product: "B",
|
|
172
|
+
sales: 15
|
|
173
|
+
}
|
|
174
|
+
]
|
|
175
|
+
},
|
|
176
|
+
gauge: { data: {
|
|
177
|
+
value: 72,
|
|
178
|
+
label: "CPU"
|
|
179
|
+
} },
|
|
180
|
+
progress: { data: {
|
|
181
|
+
value: 65,
|
|
182
|
+
max: 100,
|
|
183
|
+
label: "Quota",
|
|
184
|
+
target: 80
|
|
185
|
+
} },
|
|
186
|
+
list: { data: { items: [
|
|
187
|
+
{
|
|
188
|
+
id: "1",
|
|
189
|
+
title: "Server A",
|
|
190
|
+
subtitle: "healthy",
|
|
191
|
+
value: 99,
|
|
192
|
+
badge: {
|
|
193
|
+
text: "OK",
|
|
194
|
+
color: "success"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
id: "2",
|
|
199
|
+
title: "Server B",
|
|
200
|
+
subtitle: "degraded",
|
|
201
|
+
value: 71
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
id: "3",
|
|
205
|
+
title: "Server C",
|
|
206
|
+
subtitle: "healthy",
|
|
207
|
+
value: 97
|
|
208
|
+
}
|
|
209
|
+
] } },
|
|
210
|
+
form: {
|
|
211
|
+
config: {
|
|
212
|
+
layout: "vertical",
|
|
213
|
+
fields: [{
|
|
214
|
+
name: "name",
|
|
215
|
+
label: "Name",
|
|
216
|
+
type: "text"
|
|
217
|
+
}, {
|
|
218
|
+
name: "email",
|
|
219
|
+
label: "Email",
|
|
220
|
+
type: "email"
|
|
221
|
+
}]
|
|
222
|
+
},
|
|
223
|
+
data: {
|
|
224
|
+
name: "Ada",
|
|
225
|
+
email: "ada@example.com"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
text: { data: {
|
|
229
|
+
content: "# Sample note\n\nSome **bold** text and a list:\n\n- one\n- two",
|
|
230
|
+
format: "markdown"
|
|
231
|
+
} },
|
|
232
|
+
map: { data: [
|
|
233
|
+
{
|
|
234
|
+
name: "London",
|
|
235
|
+
lat: 51.5074,
|
|
236
|
+
lng: -.1278,
|
|
237
|
+
value: 10
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
name: "Paris",
|
|
241
|
+
lat: 48.8566,
|
|
242
|
+
lng: 2.3522,
|
|
243
|
+
value: 6
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
name: "Berlin",
|
|
247
|
+
lat: 52.52,
|
|
248
|
+
lng: 13.405,
|
|
249
|
+
value: 8
|
|
250
|
+
}
|
|
251
|
+
] },
|
|
252
|
+
heatmap: { data: {
|
|
253
|
+
rows: ["Mon", "Tue"],
|
|
254
|
+
columns: ["AM", "PM"],
|
|
255
|
+
cells: [
|
|
256
|
+
{
|
|
257
|
+
row: "Mon",
|
|
258
|
+
column: "AM",
|
|
259
|
+
value: 3
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
row: "Mon",
|
|
263
|
+
column: "PM",
|
|
264
|
+
value: 8
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
row: "Tue",
|
|
268
|
+
column: "AM",
|
|
269
|
+
value: 5
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
row: "Tue",
|
|
273
|
+
column: "PM",
|
|
274
|
+
value: 1
|
|
275
|
+
}
|
|
276
|
+
]
|
|
277
|
+
} },
|
|
278
|
+
calendar: { data: () => {
|
|
279
|
+
let e = Date.now(), t = (t, n) => new Date(e + t * 864e5 + n * 60 * 60 * 1e3).toISOString();
|
|
280
|
+
return { events: [
|
|
281
|
+
{
|
|
282
|
+
id: "standup",
|
|
283
|
+
title: "Team standup",
|
|
284
|
+
start: t(1, 1),
|
|
285
|
+
end: t(1, 2)
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
id: "review",
|
|
289
|
+
title: "Quarterly review",
|
|
290
|
+
start: t(3, 2),
|
|
291
|
+
end: t(3, 4)
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
id: "planning",
|
|
295
|
+
title: "Sprint planning",
|
|
296
|
+
start: t(5, 1),
|
|
297
|
+
end: t(5, 3)
|
|
298
|
+
}
|
|
299
|
+
] };
|
|
300
|
+
} },
|
|
301
|
+
kanban: { data: {
|
|
302
|
+
columns: [
|
|
303
|
+
{
|
|
304
|
+
id: "todo",
|
|
305
|
+
title: "To do"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: "doing",
|
|
309
|
+
title: "In progress"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
id: "done",
|
|
313
|
+
title: "Done"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
tasks: [
|
|
317
|
+
{
|
|
318
|
+
id: "t1",
|
|
319
|
+
title: "Write spec",
|
|
320
|
+
column: "todo",
|
|
321
|
+
priority: "high"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: "t2",
|
|
325
|
+
title: "Build it",
|
|
326
|
+
column: "doing"
|
|
327
|
+
},
|
|
328
|
+
{
|
|
329
|
+
id: "t3",
|
|
330
|
+
title: "Ship",
|
|
331
|
+
column: "done"
|
|
332
|
+
}
|
|
333
|
+
]
|
|
334
|
+
} },
|
|
335
|
+
timeline: { data: {
|
|
336
|
+
tasks: [{
|
|
337
|
+
id: "1",
|
|
338
|
+
name: "Design",
|
|
339
|
+
start: "2026-11-01",
|
|
340
|
+
end: "2026-11-10",
|
|
341
|
+
progress: 60
|
|
342
|
+
}, {
|
|
343
|
+
id: "2",
|
|
344
|
+
name: "Build",
|
|
345
|
+
start: "2026-11-08",
|
|
346
|
+
end: "2026-11-25",
|
|
347
|
+
progress: 20
|
|
348
|
+
}],
|
|
349
|
+
milestones: [{
|
|
350
|
+
id: "m1",
|
|
351
|
+
name: "Launch",
|
|
352
|
+
date: "2026-11-30"
|
|
353
|
+
}]
|
|
354
|
+
} },
|
|
355
|
+
retention: { data: {
|
|
356
|
+
periods: [
|
|
357
|
+
"Week 0",
|
|
358
|
+
"Week 1",
|
|
359
|
+
"Week 2"
|
|
360
|
+
],
|
|
361
|
+
cohorts: [{
|
|
362
|
+
cohort: "Jan",
|
|
363
|
+
initialSize: 1200,
|
|
364
|
+
values: [
|
|
365
|
+
100,
|
|
366
|
+
62,
|
|
367
|
+
41
|
|
368
|
+
]
|
|
369
|
+
}, {
|
|
370
|
+
cohort: "Feb",
|
|
371
|
+
initialSize: 900,
|
|
372
|
+
values: [
|
|
373
|
+
100,
|
|
374
|
+
58,
|
|
375
|
+
37
|
|
376
|
+
]
|
|
377
|
+
}]
|
|
378
|
+
} }
|
|
379
|
+
};
|
|
380
|
+
function t(e) {
|
|
381
|
+
return typeof e.data == "function" ? e.data() : e.data;
|
|
382
|
+
}
|
|
383
|
+
//#endregion
|
|
384
|
+
export { e as DEMO_SAMPLES, t as sampleData };
|