@asteby/metacore-runtime-react 52.0.0 → 53.0.0
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/CHANGELOG.md +26 -0
- package/dist/addon-loader.d.ts +22 -1
- package/dist/addon-loader.d.ts.map +1 -1
- package/dist/addon-loader.js +23 -5
- package/dist/addon-page-host.d.ts +80 -0
- package/dist/addon-page-host.d.ts.map +1 -0
- package/dist/addon-page-host.js +216 -0
- package/dist/addon-page-loader.d.ts +40 -0
- package/dist/addon-page-loader.d.ts.map +1 -0
- package/dist/addon-page-loader.js +87 -0
- package/dist/dynamic-view.d.ts +20 -1
- package/dist/dynamic-view.d.ts.map +1 -1
- package/dist/dynamic-view.js +26 -3
- package/dist/federated-error-boundary.d.ts +46 -0
- package/dist/federated-error-boundary.d.ts.map +1 -0
- package/dist/federated-error-boundary.js +55 -0
- package/dist/host-api.d.ts +22 -0
- package/dist/host-api.d.ts.map +1 -0
- package/dist/host-api.js +113 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -2
- package/dist/testing.d.ts +42 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +53 -0
- package/dist/types.d.ts +13 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/views/calendar-view.d.ts +23 -0
- package/dist/views/calendar-view.d.ts.map +1 -0
- package/dist/views/calendar-view.js +138 -0
- package/dist/views/chart-view.d.ts +14 -0
- package/dist/views/chart-view.d.ts.map +1 -0
- package/dist/views/chart-view.js +77 -0
- package/dist/views/data-source.d.ts +30 -0
- package/dist/views/data-source.d.ts.map +1 -0
- package/dist/views/data-source.js +103 -0
- package/dist/views/index.d.ts +4 -0
- package/dist/views/index.d.ts.map +1 -0
- package/dist/views/index.js +2 -0
- package/dist/views/map-view.d.ts +39 -0
- package/dist/views/map-view.d.ts.map +1 -0
- package/dist/views/map-view.js +143 -0
- package/dist/views/panels.d.ts +13 -0
- package/dist/views/panels.d.ts.map +1 -0
- package/dist/views/panels.js +119 -0
- package/dist/views/registry.d.ts +46 -0
- package/dist/views/registry.d.ts.map +1 -0
- package/dist/views/registry.js +139 -0
- package/dist/views/skeleton.d.ts +5 -0
- package/dist/views/skeleton.d.ts.map +1 -0
- package/dist/views/skeleton.js +6 -0
- package/dist/views/split-view.d.ts +6 -0
- package/dist/views/split-view.d.ts.map +1 -0
- package/dist/views/split-view.js +52 -0
- package/dist/views/timeline-view.d.ts +25 -0
- package/dist/views/timeline-view.d.ts.map +1 -0
- package/dist/views/timeline-view.js +130 -0
- package/dist/views/types.d.ts +87 -0
- package/dist/views/types.d.ts.map +1 -0
- package/dist/views/types.js +1 -0
- package/dist/widgets/charts.d.ts +9 -0
- package/dist/widgets/charts.d.ts.map +1 -0
- package/dist/widgets/charts.js +55 -0
- package/dist/widgets/lazy-charts.d.ts +10 -0
- package/dist/widgets/lazy-charts.d.ts.map +1 -0
- package/dist/widgets/lazy-charts.js +30 -0
- package/dist/widgets/renderers.d.ts +5 -5
- package/dist/widgets/renderers.d.ts.map +1 -1
- package/dist/widgets/renderers.js +3 -53
- package/dist/widgets/widget-renderer.d.ts.map +1 -1
- package/dist/widgets/widget-renderer.js +2 -1
- package/package.json +21 -5
- package/src/__tests__/addon-page-host.test.tsx +122 -0
- package/src/__tests__/addon-page-loader.test.tsx +201 -0
- package/src/__tests__/declarative-views.test.tsx +351 -0
- package/src/__tests__/host-api.test.ts +87 -0
- package/src/__tests__/index-static-graph.test.ts +83 -0
- package/src/addon-loader.tsx +51 -8
- package/src/addon-page-host.tsx +319 -0
- package/src/addon-page-loader.tsx +203 -0
- package/src/dynamic-view.tsx +61 -3
- package/src/federated-error-boundary.tsx +121 -0
- package/src/host-api.ts +143 -0
- package/src/index.ts +47 -4
- package/src/testing.tsx +108 -0
- package/src/types.ts +13 -0
- package/src/views/calendar-view.tsx +234 -0
- package/src/views/chart-view.tsx +122 -0
- package/src/views/data-source.ts +127 -0
- package/src/views/index.ts +37 -0
- package/src/views/map-view.tsx +217 -0
- package/src/views/panels.tsx +177 -0
- package/src/views/registry.tsx +202 -0
- package/src/views/skeleton.tsx +13 -0
- package/src/views/split-view.tsx +115 -0
- package/src/views/timeline-view.tsx +229 -0
- package/src/views/types.ts +105 -0
- package/src/widgets/charts.tsx +225 -0
- package/src/widgets/lazy-charts.tsx +51 -0
- package/src/widgets/renderers.tsx +5 -210
- package/src/widgets/widget-renderer.tsx +6 -4
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Lazy facades for the recharts-backed widgets. The package index and
|
|
2
|
+
// WidgetRenderer import these instead of ./charts, so recharts becomes its own
|
|
3
|
+
// async chunk: it downloads only when a dashboard actually renders a
|
|
4
|
+
// bar/line/area/pie/donut widget. Public names stay the same as before.
|
|
5
|
+
|
|
6
|
+
import * as React from 'react'
|
|
7
|
+
import { WidgetCard } from './widget-card'
|
|
8
|
+
import type { WidgetRenderProps } from './renderers'
|
|
9
|
+
|
|
10
|
+
const loadCharts = () => import('./charts')
|
|
11
|
+
|
|
12
|
+
/** Warm the charts chunk (e.g. on hover of a dashboard link). Idempotent. */
|
|
13
|
+
export function preloadWidgetCharts(): Promise<unknown> {
|
|
14
|
+
return loadCharts()
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const LazyBar = React.lazy(() => loadCharts().then((m) => ({ default: m.BarWidget })))
|
|
18
|
+
const LazyLine = React.lazy(() => loadCharts().then((m) => ({ default: m.LineWidget })))
|
|
19
|
+
const LazyArea = React.lazy(() => loadCharts().then((m) => ({ default: m.AreaWidget })))
|
|
20
|
+
const LazyPie = React.lazy(() => loadCharts().then((m) => ({ default: m.PieWidget })))
|
|
21
|
+
const LazyDonut = React.lazy(() => loadCharts().then((m) => ({ default: m.DonutWidget })))
|
|
22
|
+
|
|
23
|
+
function ChartFallback(p: WidgetRenderProps) {
|
|
24
|
+
return (
|
|
25
|
+
<WidgetCard
|
|
26
|
+
data-testid={`widget-skeleton-${p.spec.key}`}
|
|
27
|
+
title={p.spec.title}
|
|
28
|
+
subtitle={p.spec.subtitle}
|
|
29
|
+
icon={p.spec.icon}
|
|
30
|
+
accent={p.spec.accent}
|
|
31
|
+
>
|
|
32
|
+
<div className="h-[190px] w-full animate-pulse rounded-md bg-muted" />
|
|
33
|
+
</WidgetCard>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function withSuspense(Lazy: React.ComponentType<WidgetRenderProps>) {
|
|
38
|
+
return function LazyChartWidget(p: WidgetRenderProps) {
|
|
39
|
+
return (
|
|
40
|
+
<React.Suspense fallback={<ChartFallback {...p} />}>
|
|
41
|
+
<Lazy {...p} />
|
|
42
|
+
</React.Suspense>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const BarWidget = withSuspense(LazyBar)
|
|
48
|
+
export const LineWidget = withSuspense(LazyLine)
|
|
49
|
+
export const AreaWidget = withSuspense(LazyArea)
|
|
50
|
+
export const PieWidget = withSuspense(LazyPie)
|
|
51
|
+
export const DonutWidget = withSuspense(LazyDonut)
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
// Built-in dashboard widget renderers, one per declarative `kind`. Each takes
|
|
2
2
|
// the resolved spec + computed WidgetData + the format context (locale/currency)
|
|
3
|
-
// and renders the body INSIDE a <WidgetCard>. recharts
|
|
4
|
-
//
|
|
5
|
-
//
|
|
3
|
+
// and renders the body INSIDE a <WidgetCard>. The recharts-backed kinds
|
|
4
|
+
// (bar/line/area/pie/donut) live in ./charts so this module — and the package
|
|
5
|
+
// index that re-exports it — never pulls recharts into the first paint.
|
|
6
6
|
|
|
7
7
|
import * as React from 'react'
|
|
8
|
-
import {
|
|
9
|
-
Area,
|
|
10
|
-
AreaChart,
|
|
11
|
-
Bar,
|
|
12
|
-
BarChart,
|
|
13
|
-
CartesianGrid,
|
|
14
|
-
Cell,
|
|
15
|
-
Line,
|
|
16
|
-
LineChart,
|
|
17
|
-
Pie,
|
|
18
|
-
PieChart,
|
|
19
|
-
ResponsiveContainer,
|
|
20
|
-
Tooltip,
|
|
21
|
-
XAxis,
|
|
22
|
-
YAxis,
|
|
23
|
-
} from 'recharts'
|
|
24
8
|
import { cn } from '@asteby/metacore-ui/lib'
|
|
25
9
|
import type { DashboardWidgetSpec, WidgetData } from '../dashboard-types'
|
|
26
10
|
import { WidgetCard, DeltaChip, WidgetEmpty } from './widget-card'
|
|
@@ -44,49 +28,15 @@ export interface WidgetRenderProps {
|
|
|
44
28
|
emptyText: string
|
|
45
29
|
}
|
|
46
30
|
|
|
47
|
-
const fmtCtx = (
|
|
31
|
+
export const fmtCtx = (
|
|
48
32
|
spec: DashboardWidgetSpec,
|
|
49
33
|
locale?: string,
|
|
50
34
|
currency?: string,
|
|
51
35
|
): WidgetFormatCtx => ({ format: spec.format, locale, currency })
|
|
52
36
|
|
|
53
|
-
const hasSeries = (d?: WidgetData): d is WidgetData & { series: NonNullable<WidgetData['series']> } =>
|
|
37
|
+
export const hasSeries = (d?: WidgetData): d is WidgetData & { series: NonNullable<WidgetData['series']> } =>
|
|
54
38
|
Array.isArray(d?.series) && d!.series!.length > 0
|
|
55
39
|
|
|
56
|
-
// Fixed-height chart body. In the masonry (CSS columns) layout cards take their
|
|
57
|
-
// natural height, so charts need a definite height for ResponsiveContainer to
|
|
58
|
-
// resolve. This height + the card chrome gives every chart card a consistent,
|
|
59
|
-
// taller footprint that balances cleanly against compact stat cards.
|
|
60
|
-
const CHART_H = 'h-[190px]'
|
|
61
|
-
function ChartArea({ children }: { children: React.ReactElement }) {
|
|
62
|
-
return (
|
|
63
|
-
<div className={cn(CHART_H, 'w-full')}>
|
|
64
|
-
<ResponsiveContainer width="100%" height="100%">
|
|
65
|
-
{children}
|
|
66
|
-
</ResponsiveContainer>
|
|
67
|
-
</div>
|
|
68
|
-
)
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Compact recharts tooltip styled with theme tokens.
|
|
72
|
-
function ChartTooltip({ ctx }: { ctx: WidgetFormatCtx }) {
|
|
73
|
-
return (
|
|
74
|
-
<Tooltip
|
|
75
|
-
cursor={{ fill: 'var(--muted, rgba(148,163,184,0.12))', opacity: 0.4 }}
|
|
76
|
-
contentStyle={{
|
|
77
|
-
background: 'var(--popover, #fff)',
|
|
78
|
-
border: '1px solid var(--border, #e2e8f0)',
|
|
79
|
-
borderRadius: 8,
|
|
80
|
-
fontSize: 12,
|
|
81
|
-
color: 'var(--popover-foreground, #0f172a)',
|
|
82
|
-
boxShadow: '0 4px 16px rgba(0,0,0,0.08)',
|
|
83
|
-
}}
|
|
84
|
-
labelStyle={{ color: 'var(--muted-foreground, #64748b)', marginBottom: 2 }}
|
|
85
|
-
formatter={(v: number) => formatWidgetValue(Number(v), ctx)}
|
|
86
|
-
/>
|
|
87
|
-
)
|
|
88
|
-
}
|
|
89
|
-
|
|
90
40
|
// --- stat -----------------------------------------------------------------
|
|
91
41
|
export function StatWidget(p: WidgetRenderProps) {
|
|
92
42
|
const ctx = fmtCtx(p.spec, p.locale, p.currency)
|
|
@@ -120,161 +70,6 @@ export function StatWidget(p: WidgetRenderProps) {
|
|
|
120
70
|
</WidgetCard>
|
|
121
71
|
)
|
|
122
72
|
}
|
|
123
|
-
|
|
124
|
-
// --- bar ------------------------------------------------------------------
|
|
125
|
-
export function BarWidget(p: WidgetRenderProps) {
|
|
126
|
-
const ctx = fmtCtx(p.spec, p.locale, p.currency)
|
|
127
|
-
const a = accentClasses(p.spec.accent)
|
|
128
|
-
return (
|
|
129
|
-
<WidgetCard
|
|
130
|
-
data-testid={`widget-${p.spec.key}`}
|
|
131
|
-
title={p.spec.title}
|
|
132
|
-
subtitle={p.spec.subtitle}
|
|
133
|
-
icon={p.spec.icon}
|
|
134
|
-
accent={p.spec.accent}
|
|
135
|
-
>
|
|
136
|
-
{hasSeries(p.data) ? (
|
|
137
|
-
<ChartArea>
|
|
138
|
-
<BarChart data={p.data.series} margin={{ top: 4, right: 4, left: -16, bottom: 0 }}>
|
|
139
|
-
<CartesianGrid vertical={false} stroke={CHART_GRID} strokeDasharray="3 3" />
|
|
140
|
-
<XAxis
|
|
141
|
-
dataKey="label"
|
|
142
|
-
tick={{ fontSize: 10, fill: CHART_MUTED }}
|
|
143
|
-
tickLine={false}
|
|
144
|
-
axisLine={false}
|
|
145
|
-
interval="preserveStartEnd"
|
|
146
|
-
/>
|
|
147
|
-
<YAxis
|
|
148
|
-
tick={{ fontSize: 10, fill: CHART_MUTED }}
|
|
149
|
-
tickLine={false}
|
|
150
|
-
axisLine={false}
|
|
151
|
-
width={44}
|
|
152
|
-
tickFormatter={(v: number) => formatAxisTick(v, ctx)}
|
|
153
|
-
/>
|
|
154
|
-
<ChartTooltip ctx={ctx} />
|
|
155
|
-
<Bar dataKey="value" fill={a.chartVar} radius={[4, 4, 0, 0]} maxBarSize={48} />
|
|
156
|
-
</BarChart>
|
|
157
|
-
</ChartArea>
|
|
158
|
-
) : (
|
|
159
|
-
<WidgetEmpty message={p.emptyText} />
|
|
160
|
-
)}
|
|
161
|
-
</WidgetCard>
|
|
162
|
-
)
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// --- line / area (shared) -------------------------------------------------
|
|
166
|
-
function TimeSeriesWidget(p: WidgetRenderProps & { variant: 'line' | 'area' }) {
|
|
167
|
-
const ctx = fmtCtx(p.spec, p.locale, p.currency)
|
|
168
|
-
const a = accentClasses(p.spec.accent)
|
|
169
|
-
const gradId = `wg-grad-${p.spec.key}`
|
|
170
|
-
return (
|
|
171
|
-
<WidgetCard
|
|
172
|
-
data-testid={`widget-${p.spec.key}`}
|
|
173
|
-
title={p.spec.title}
|
|
174
|
-
subtitle={p.spec.subtitle}
|
|
175
|
-
icon={p.spec.icon}
|
|
176
|
-
accent={p.spec.accent}
|
|
177
|
-
>
|
|
178
|
-
{hasSeries(p.data) ? (
|
|
179
|
-
<ChartArea>
|
|
180
|
-
{p.variant === 'area' ? (
|
|
181
|
-
<AreaChart data={p.data.series} margin={{ top: 4, right: 6, left: -16, bottom: 0 }}>
|
|
182
|
-
<defs>
|
|
183
|
-
<linearGradient id={gradId} x1="0" y1="0" x2="0" y2="1">
|
|
184
|
-
<stop offset="0%" stopColor={a.chartVar} stopOpacity={0.35} />
|
|
185
|
-
<stop offset="100%" stopColor={a.chartVar} stopOpacity={0.02} />
|
|
186
|
-
</linearGradient>
|
|
187
|
-
</defs>
|
|
188
|
-
<CartesianGrid vertical={false} stroke={CHART_GRID} strokeDasharray="3 3" />
|
|
189
|
-
<XAxis dataKey="label" tick={{ fontSize: 10, fill: CHART_MUTED }} tickLine={false} axisLine={false} interval="preserveStartEnd" />
|
|
190
|
-
<YAxis tick={{ fontSize: 10, fill: CHART_MUTED }} tickLine={false} axisLine={false} width={44} tickFormatter={(v: number) => formatAxisTick(v, ctx)} />
|
|
191
|
-
<ChartTooltip ctx={ctx} />
|
|
192
|
-
<Area type="monotone" dataKey="value" stroke={a.chartVar} strokeWidth={2} fill={`url(#${gradId})`} />
|
|
193
|
-
</AreaChart>
|
|
194
|
-
) : (
|
|
195
|
-
<LineChart data={p.data.series} margin={{ top: 4, right: 6, left: -16, bottom: 0 }}>
|
|
196
|
-
<CartesianGrid vertical={false} stroke={CHART_GRID} strokeDasharray="3 3" />
|
|
197
|
-
<XAxis dataKey="label" tick={{ fontSize: 10, fill: CHART_MUTED }} tickLine={false} axisLine={false} interval="preserveStartEnd" />
|
|
198
|
-
<YAxis tick={{ fontSize: 10, fill: CHART_MUTED }} tickLine={false} axisLine={false} width={44} tickFormatter={(v: number) => formatAxisTick(v, ctx)} />
|
|
199
|
-
<ChartTooltip ctx={ctx} />
|
|
200
|
-
<Line type="monotone" dataKey="value" stroke={a.chartVar} strokeWidth={2} dot={false} activeDot={{ r: 4 }} />
|
|
201
|
-
</LineChart>
|
|
202
|
-
)}
|
|
203
|
-
</ChartArea>
|
|
204
|
-
) : (
|
|
205
|
-
<WidgetEmpty message={p.emptyText} />
|
|
206
|
-
)}
|
|
207
|
-
</WidgetCard>
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function LineWidget(p: WidgetRenderProps) {
|
|
212
|
-
return <TimeSeriesWidget {...p} variant="line" />
|
|
213
|
-
}
|
|
214
|
-
export function AreaWidget(p: WidgetRenderProps) {
|
|
215
|
-
return <TimeSeriesWidget {...p} variant="area" />
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
// --- pie / donut (shared) -------------------------------------------------
|
|
219
|
-
function CircularWidget(p: WidgetRenderProps & { variant: 'pie' | 'donut' }) {
|
|
220
|
-
const ctx = fmtCtx(p.spec, p.locale, p.currency)
|
|
221
|
-
return (
|
|
222
|
-
<WidgetCard
|
|
223
|
-
data-testid={`widget-${p.spec.key}`}
|
|
224
|
-
title={p.spec.title}
|
|
225
|
-
subtitle={p.spec.subtitle}
|
|
226
|
-
icon={p.spec.icon}
|
|
227
|
-
accent={p.spec.accent}
|
|
228
|
-
>
|
|
229
|
-
{hasSeries(p.data) ? (
|
|
230
|
-
<div className={cn(CHART_H, 'flex items-center gap-3')}>
|
|
231
|
-
<div className="h-full min-h-0 w-[46%] shrink-0">
|
|
232
|
-
<ResponsiveContainer width="100%" height="100%">
|
|
233
|
-
<PieChart>
|
|
234
|
-
<ChartTooltip ctx={ctx} />
|
|
235
|
-
<Pie
|
|
236
|
-
data={p.data.series}
|
|
237
|
-
dataKey="value"
|
|
238
|
-
nameKey="label"
|
|
239
|
-
innerRadius={p.variant === 'donut' ? '55%' : 0}
|
|
240
|
-
outerRadius="92%"
|
|
241
|
-
paddingAngle={p.variant === 'donut' ? 2 : 0}
|
|
242
|
-
stroke="var(--background, #fff)"
|
|
243
|
-
strokeWidth={2}
|
|
244
|
-
>
|
|
245
|
-
{p.data.series.map((_, i) => (
|
|
246
|
-
<Cell key={i} fill={paletteColor(i)} />
|
|
247
|
-
))}
|
|
248
|
-
</Pie>
|
|
249
|
-
</PieChart>
|
|
250
|
-
</ResponsiveContainer>
|
|
251
|
-
</div>
|
|
252
|
-
<ul className="flex min-w-0 flex-1 flex-col gap-1.5">
|
|
253
|
-
{p.data.series.slice(0, 6).map((pt, i) => (
|
|
254
|
-
<li key={pt.key} className="flex items-center gap-2 text-xs">
|
|
255
|
-
<span className="size-2.5 shrink-0 rounded-sm" style={{ background: paletteColor(i) }} />
|
|
256
|
-
<span className="truncate text-muted-foreground">{pt.label}</span>
|
|
257
|
-
<span className="ml-auto shrink-0 font-medium tabular-nums text-foreground">
|
|
258
|
-
{formatWidgetValue(pt.value, ctx)}
|
|
259
|
-
</span>
|
|
260
|
-
</li>
|
|
261
|
-
))}
|
|
262
|
-
</ul>
|
|
263
|
-
</div>
|
|
264
|
-
) : (
|
|
265
|
-
<WidgetEmpty message={p.emptyText} />
|
|
266
|
-
)}
|
|
267
|
-
</WidgetCard>
|
|
268
|
-
)
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
export function PieWidget(p: WidgetRenderProps) {
|
|
272
|
-
return <CircularWidget {...p} variant="pie" />
|
|
273
|
-
}
|
|
274
|
-
export function DonutWidget(p: WidgetRenderProps) {
|
|
275
|
-
return <CircularWidget {...p} variant="donut" />
|
|
276
|
-
}
|
|
277
|
-
|
|
278
73
|
// --- list (top-N with proportion bars) ------------------------------------
|
|
279
74
|
export function ListWidget(p: WidgetRenderProps) {
|
|
280
75
|
const ctx = fmtCtx(p.spec, p.locale, p.currency)
|
|
@@ -8,15 +8,17 @@ import type { DashboardWidgetSpec, WidgetData, WidgetSize } from '../dashboard-t
|
|
|
8
8
|
import { WidgetCard, WidgetError } from './widget-card'
|
|
9
9
|
import {
|
|
10
10
|
StatWidget,
|
|
11
|
+
ListWidget,
|
|
12
|
+
ProgressWidget,
|
|
13
|
+
type WidgetRenderProps,
|
|
14
|
+
} from './renderers'
|
|
15
|
+
import {
|
|
11
16
|
BarWidget,
|
|
12
17
|
LineWidget,
|
|
13
18
|
AreaWidget,
|
|
14
19
|
PieWidget,
|
|
15
20
|
DonutWidget,
|
|
16
|
-
|
|
17
|
-
ProgressWidget,
|
|
18
|
-
type WidgetRenderProps,
|
|
19
|
-
} from './renderers'
|
|
21
|
+
} from './lazy-charts'
|
|
20
22
|
|
|
21
23
|
/** Maps a widget size to its column span in the 4-col grid. */
|
|
22
24
|
export const SIZE_SPAN: Record<WidgetSize, number> = {
|