@quantumwake/terminal-ux-dashboard-components 0.1.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/LICENSE +21 -0
- package/README.md +59 -0
- package/dist/index.cjs +1807 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +477 -0
- package/dist/index.d.ts +477 -0
- package/dist/index.js +1772 -0
- package/dist/index.js.map +1 -0
- package/package.json +77 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
type DashboardTheme = Record<string, string>;
|
|
5
|
+
interface QueryResult {
|
|
6
|
+
columns: string[];
|
|
7
|
+
rows: Record<string, unknown>[];
|
|
8
|
+
}
|
|
9
|
+
interface SavedDashboard {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
interface DashboardCapabilities {
|
|
15
|
+
runQuery: (sql: string, stateId?: string) => Promise<QueryResult>;
|
|
16
|
+
saveDashboard?: (name?: string) => Promise<void> | void;
|
|
17
|
+
listDashboards?: () => Promise<SavedDashboard[]> | SavedDashboard[];
|
|
18
|
+
searchDashboards?: (query: string) => Promise<SavedDashboard[]> | SavedDashboard[];
|
|
19
|
+
loadDashboard?: (id: string) => Promise<void> | void;
|
|
20
|
+
deleteDashboard?: (id: string) => Promise<void> | void;
|
|
21
|
+
analyzeDataset?: () => Promise<void> | void;
|
|
22
|
+
refineDashboard?: (prompt: string) => Promise<void> | void;
|
|
23
|
+
removePanel?: (panelId: string) => void;
|
|
24
|
+
}
|
|
25
|
+
interface DashboardContextValue extends DashboardCapabilities {
|
|
26
|
+
theme: DashboardTheme;
|
|
27
|
+
}
|
|
28
|
+
interface DashboardProviderProps extends DashboardCapabilities {
|
|
29
|
+
theme: DashboardTheme;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}
|
|
32
|
+
declare function DashboardProvider({ children, ...value }: DashboardProviderProps): react.JSX.Element;
|
|
33
|
+
declare function useDashboard(): DashboardContextValue;
|
|
34
|
+
declare function useCapabilities(): {
|
|
35
|
+
canRun: boolean;
|
|
36
|
+
canSave: boolean;
|
|
37
|
+
canList: boolean;
|
|
38
|
+
canSearch: boolean;
|
|
39
|
+
canLoad: boolean;
|
|
40
|
+
canDelete: boolean;
|
|
41
|
+
canAnalyze: boolean;
|
|
42
|
+
canRefine: boolean;
|
|
43
|
+
canEditPanels: boolean;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
type ChartType = 'bar' | 'grouped-bar' | 'pie' | 'line' | 'scatter' | 'heatmap';
|
|
47
|
+
interface ChartField {
|
|
48
|
+
name: string;
|
|
49
|
+
agg?: string;
|
|
50
|
+
}
|
|
51
|
+
interface ChartFilter {
|
|
52
|
+
column: string;
|
|
53
|
+
op: string;
|
|
54
|
+
value?: string | null;
|
|
55
|
+
}
|
|
56
|
+
interface ChartConfig {
|
|
57
|
+
chartType: ChartType;
|
|
58
|
+
xFields?: ChartField[];
|
|
59
|
+
yFields?: ChartField[];
|
|
60
|
+
valueField?: ChartField | null;
|
|
61
|
+
filters?: ChartFilter[];
|
|
62
|
+
}
|
|
63
|
+
type Row = Record<string, unknown>;
|
|
64
|
+
declare const qIdent: (name: string) => string;
|
|
65
|
+
declare const qLit: (v: unknown) => string;
|
|
66
|
+
declare const aggExpr: (agg: string | undefined, col?: string) => string;
|
|
67
|
+
declare const compileWhere: (filters?: ChartFilter[]) => string;
|
|
68
|
+
declare const buildChartSQL: ({ chartType, xFields, yFields, valueField, filters, }: ChartConfig) => string | null;
|
|
69
|
+
declare const shapeChartData: (chartType: ChartType, rows: Row[], { yFields }?: {
|
|
70
|
+
yFields?: ChartField[];
|
|
71
|
+
}) => unknown;
|
|
72
|
+
|
|
73
|
+
type LegendAnchor = 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
74
|
+
type LegendPosition = 'start' | 'middle' | 'end';
|
|
75
|
+
type TitleAlign = 'left' | 'center' | 'right';
|
|
76
|
+
interface ChartStyle {
|
|
77
|
+
background: string;
|
|
78
|
+
textColor: string;
|
|
79
|
+
legendColor: string;
|
|
80
|
+
fontSize: number;
|
|
81
|
+
gridColor: string;
|
|
82
|
+
tooltipBg: string;
|
|
83
|
+
tooltipColor: string;
|
|
84
|
+
xLegendPosition: LegendPosition;
|
|
85
|
+
xLegendOffset: number;
|
|
86
|
+
yLegendPosition: LegendPosition;
|
|
87
|
+
yLegendOffset: number;
|
|
88
|
+
legendAnchor: LegendAnchor;
|
|
89
|
+
titleAlign: TitleAlign;
|
|
90
|
+
}
|
|
91
|
+
declare const DEFAULT_CHART_STYLE: ChartStyle;
|
|
92
|
+
declare const LEGEND_ANCHORS: LegendAnchor[];
|
|
93
|
+
declare const withStyleDefaults: (style?: Partial<ChartStyle> | null) => ChartStyle;
|
|
94
|
+
declare const buildNivoTheme: (style?: Partial<ChartStyle> | null) => {
|
|
95
|
+
background: string;
|
|
96
|
+
text: {
|
|
97
|
+
fill: string;
|
|
98
|
+
fontSize: number;
|
|
99
|
+
};
|
|
100
|
+
axis: {
|
|
101
|
+
ticks: {
|
|
102
|
+
text: {
|
|
103
|
+
fill: string;
|
|
104
|
+
fontSize: number;
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
legend: {
|
|
108
|
+
text: {
|
|
109
|
+
fill: string;
|
|
110
|
+
fontSize: number;
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
grid: {
|
|
115
|
+
line: {
|
|
116
|
+
stroke: string;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
crosshair: {
|
|
120
|
+
line: {
|
|
121
|
+
stroke: string;
|
|
122
|
+
strokeDasharray: string;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
labels: {
|
|
126
|
+
text: {
|
|
127
|
+
fontSize: number;
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
legends: {
|
|
131
|
+
text: {
|
|
132
|
+
fill: string;
|
|
133
|
+
fontSize: number;
|
|
134
|
+
};
|
|
135
|
+
};
|
|
136
|
+
tooltip: {
|
|
137
|
+
container: {
|
|
138
|
+
background: string;
|
|
139
|
+
color: string;
|
|
140
|
+
border: string;
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
declare const legendConfig: (style?: Partial<ChartStyle> | null) => {
|
|
145
|
+
translateX: number;
|
|
146
|
+
anchor: "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
147
|
+
direction: "column";
|
|
148
|
+
itemWidth: number;
|
|
149
|
+
itemHeight: number;
|
|
150
|
+
itemsSpacing: number;
|
|
151
|
+
symbolSize: number;
|
|
152
|
+
symbolShape: "circle";
|
|
153
|
+
itemTextColor: string;
|
|
154
|
+
} | {
|
|
155
|
+
translateX: number;
|
|
156
|
+
translateY: number;
|
|
157
|
+
anchor: "right" | "top-left" | "top-right" | "bottom-left" | "bottom-right";
|
|
158
|
+
direction: "column";
|
|
159
|
+
itemWidth: number;
|
|
160
|
+
itemHeight: number;
|
|
161
|
+
itemsSpacing: number;
|
|
162
|
+
symbolSize: number;
|
|
163
|
+
symbolShape: "circle";
|
|
164
|
+
itemTextColor: string;
|
|
165
|
+
} | null;
|
|
166
|
+
declare const axisLegend: (style: Partial<ChartStyle> | null | undefined, axis: "x" | "y", legendText: string) => {
|
|
167
|
+
legend: string;
|
|
168
|
+
legendPosition: LegendPosition;
|
|
169
|
+
legendOffset: number;
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
type AggFn = 'count' | 'distinct' | 'sum' | 'avg' | 'min' | 'max';
|
|
173
|
+
declare const groupBy: (records: Row[], column: string) => Record<string, Row[]>;
|
|
174
|
+
declare const aggregate: (records: Row[], column: string, fn: AggFn | string) => number;
|
|
175
|
+
|
|
176
|
+
interface MetricConfig {
|
|
177
|
+
column: string;
|
|
178
|
+
agg?: string;
|
|
179
|
+
label?: string;
|
|
180
|
+
}
|
|
181
|
+
interface MetricViewProps {
|
|
182
|
+
records?: Row[];
|
|
183
|
+
config: MetricConfig;
|
|
184
|
+
/** Pre-computed value bypasses client-side aggregation. */
|
|
185
|
+
value?: number | string | null;
|
|
186
|
+
}
|
|
187
|
+
/** Single-number metric card. Shows a big number with a label. */
|
|
188
|
+
declare function MetricView({ records, config, value: presetValue }: MetricViewProps): react.JSX.Element;
|
|
189
|
+
|
|
190
|
+
interface InsightConfig {
|
|
191
|
+
text?: string;
|
|
192
|
+
}
|
|
193
|
+
interface InsightViewProps {
|
|
194
|
+
config: InsightConfig;
|
|
195
|
+
}
|
|
196
|
+
/** Text insight card rendered from AI analysis. */
|
|
197
|
+
declare function InsightView({ config }: InsightViewProps): react.JSX.Element;
|
|
198
|
+
|
|
199
|
+
interface BarDatum {
|
|
200
|
+
group: string;
|
|
201
|
+
value: number;
|
|
202
|
+
}
|
|
203
|
+
interface BarViewProps {
|
|
204
|
+
records?: Row[];
|
|
205
|
+
groupColumn: string;
|
|
206
|
+
valueColumn: string;
|
|
207
|
+
aggFn?: string;
|
|
208
|
+
/** Pre-aggregated [{group, value}] bypasses client-side aggregation. */
|
|
209
|
+
data?: BarDatum[];
|
|
210
|
+
style?: Partial<ChartStyle>;
|
|
211
|
+
}
|
|
212
|
+
declare function BarView({ records, groupColumn, valueColumn, aggFn, data: presetData, style }: BarViewProps): react.JSX.Element;
|
|
213
|
+
|
|
214
|
+
interface PieDatum {
|
|
215
|
+
id: string;
|
|
216
|
+
label: string;
|
|
217
|
+
value: number;
|
|
218
|
+
}
|
|
219
|
+
interface PieViewProps {
|
|
220
|
+
records?: Row[];
|
|
221
|
+
groupColumn: string;
|
|
222
|
+
/** Pre-aggregated [{id, label, value}] bypasses client-side aggregation. */
|
|
223
|
+
data?: PieDatum[];
|
|
224
|
+
style?: Partial<ChartStyle>;
|
|
225
|
+
}
|
|
226
|
+
declare function PieView({ records, groupColumn, data: presetData, style }: PieViewProps): react.JSX.Element;
|
|
227
|
+
|
|
228
|
+
interface LineSerie {
|
|
229
|
+
id: string;
|
|
230
|
+
data: {
|
|
231
|
+
x: string;
|
|
232
|
+
y: number;
|
|
233
|
+
}[];
|
|
234
|
+
}
|
|
235
|
+
interface LineViewProps {
|
|
236
|
+
records?: Row[];
|
|
237
|
+
xColumn: string;
|
|
238
|
+
yColumn: string;
|
|
239
|
+
/** Pre-shaped Nivo line series bypasses client-side processing. */
|
|
240
|
+
data?: LineSerie[];
|
|
241
|
+
style?: Partial<ChartStyle>;
|
|
242
|
+
}
|
|
243
|
+
declare function LineView({ records, xColumn, yColumn, data: presetData, style }: LineViewProps): react.JSX.Element;
|
|
244
|
+
|
|
245
|
+
interface ScatterSerie {
|
|
246
|
+
id: string;
|
|
247
|
+
data: {
|
|
248
|
+
x: number;
|
|
249
|
+
y: number;
|
|
250
|
+
}[];
|
|
251
|
+
}
|
|
252
|
+
interface ScatterViewProps {
|
|
253
|
+
records?: Row[];
|
|
254
|
+
xColumn: string;
|
|
255
|
+
yColumn: string;
|
|
256
|
+
/** Pre-shaped Nivo scatter series bypasses client-side processing. */
|
|
257
|
+
data?: ScatterSerie[];
|
|
258
|
+
style?: Partial<ChartStyle>;
|
|
259
|
+
}
|
|
260
|
+
declare function ScatterView({ records, xColumn, yColumn, data: presetData, style }: ScatterViewProps): react.JSX.Element;
|
|
261
|
+
|
|
262
|
+
interface HeatmapSerie {
|
|
263
|
+
id: string;
|
|
264
|
+
data: {
|
|
265
|
+
x: string;
|
|
266
|
+
y: number;
|
|
267
|
+
}[];
|
|
268
|
+
}
|
|
269
|
+
type AxisOrder = 'alpha' | 'total-asc' | 'total-desc';
|
|
270
|
+
interface HeatmapViewProps {
|
|
271
|
+
records?: Row[];
|
|
272
|
+
rowColumn: string;
|
|
273
|
+
colColumn: string;
|
|
274
|
+
valueColumn?: string;
|
|
275
|
+
aggFn?: string;
|
|
276
|
+
data?: HeatmapSerie[];
|
|
277
|
+
rowOrder?: AxisOrder;
|
|
278
|
+
colOrder?: AxisOrder;
|
|
279
|
+
marginAgg?: string;
|
|
280
|
+
showTotals?: boolean;
|
|
281
|
+
style?: Partial<ChartStyle>;
|
|
282
|
+
}
|
|
283
|
+
/**
|
|
284
|
+
* HeatmapView builds a cross-tabulation heatmap (confusion / pairwise matrix).
|
|
285
|
+
* rowColumn values become rows, colColumn values become columns; the cell value
|
|
286
|
+
* is aggFn over valueColumn (or a record count when no valueColumn).
|
|
287
|
+
*/
|
|
288
|
+
declare function HeatmapView({ records, rowColumn, colColumn, valueColumn, aggFn, data: presetData, rowOrder, colOrder, marginAgg, showTotals, style, }: HeatmapViewProps): react.JSX.Element;
|
|
289
|
+
|
|
290
|
+
interface PivotViewProps {
|
|
291
|
+
records?: Row[];
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* PivotView wraps react-pivottable — a drag-and-drop pivot table that
|
|
295
|
+
* introspects columns from the data automatically.
|
|
296
|
+
*/
|
|
297
|
+
declare function PivotView({ records }: PivotViewProps): react.JSX.Element;
|
|
298
|
+
|
|
299
|
+
interface ChartStyleControlsProps {
|
|
300
|
+
style?: Partial<ChartStyle> | null;
|
|
301
|
+
onChange: (next: ChartStyle) => void;
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* ChartStyleControls — the standardized appearance editor used across all
|
|
305
|
+
* charts. Edits a plain style object (see chartStyle.ts); theme-aware via the
|
|
306
|
+
* host-injected DashboardContext theme. Parent persists the style and passes it
|
|
307
|
+
* to the views.
|
|
308
|
+
*/
|
|
309
|
+
declare function ChartStyleControls({ style, onChange }: ChartStyleControlsProps): react.JSX.Element;
|
|
310
|
+
|
|
311
|
+
interface SqlConsoleColumn {
|
|
312
|
+
name: string;
|
|
313
|
+
type?: string;
|
|
314
|
+
}
|
|
315
|
+
interface SqlConsoleProps {
|
|
316
|
+
columns?: SqlConsoleColumn[];
|
|
317
|
+
stateId?: string;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* SqlConsole — a HuggingFace-style read-only SQL editor over a state's full
|
|
321
|
+
* dataset. The state's data is exposed (server-side DuckDB in studio, DuckDB-WASM
|
|
322
|
+
* in the viewer) as a view named `data`; queries run against the entire dataset,
|
|
323
|
+
* not a client sample.
|
|
324
|
+
*/
|
|
325
|
+
declare function SqlConsole({ columns, stateId }: SqlConsoleProps): react.JSX.Element;
|
|
326
|
+
|
|
327
|
+
interface PanelConfig {
|
|
328
|
+
sql?: string;
|
|
329
|
+
chartType?: ChartType | 'metric';
|
|
330
|
+
style?: Partial<ChartStyle>;
|
|
331
|
+
group?: string;
|
|
332
|
+
value?: string;
|
|
333
|
+
agg?: string;
|
|
334
|
+
x?: string;
|
|
335
|
+
y?: string;
|
|
336
|
+
row?: string;
|
|
337
|
+
col?: string;
|
|
338
|
+
yFields?: ChartField[];
|
|
339
|
+
rowOrder?: string;
|
|
340
|
+
colOrder?: string;
|
|
341
|
+
marginAgg?: string;
|
|
342
|
+
showTotals?: boolean;
|
|
343
|
+
columns?: string[];
|
|
344
|
+
text?: string;
|
|
345
|
+
label?: string;
|
|
346
|
+
column?: string;
|
|
347
|
+
[key: string]: unknown;
|
|
348
|
+
}
|
|
349
|
+
interface DashboardPanel$1 {
|
|
350
|
+
id: string;
|
|
351
|
+
type: string;
|
|
352
|
+
title?: string;
|
|
353
|
+
width?: number;
|
|
354
|
+
height?: number;
|
|
355
|
+
config?: PanelConfig;
|
|
356
|
+
}
|
|
357
|
+
interface Dashboard$1 {
|
|
358
|
+
insights?: string;
|
|
359
|
+
panels?: DashboardPanel$1[];
|
|
360
|
+
}
|
|
361
|
+
interface ColumnDef {
|
|
362
|
+
name: string;
|
|
363
|
+
}
|
|
364
|
+
interface DashboardRendererProps {
|
|
365
|
+
dashboard?: Dashboard$1 | null;
|
|
366
|
+
records?: Row[];
|
|
367
|
+
columns?: ColumnDef[];
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* DashboardRenderer — renders a grid of AI-generated or manually configured
|
|
371
|
+
* panels. The per-panel remove button is gated behind canEditPanels: the
|
|
372
|
+
* published viewer (no removePanel) renders the dashboard READ-ONLY.
|
|
373
|
+
*/
|
|
374
|
+
declare function DashboardRenderer({ dashboard, records, columns }: DashboardRendererProps): react.JSX.Element | null;
|
|
375
|
+
|
|
376
|
+
interface ChartBuilderColumn {
|
|
377
|
+
name: string;
|
|
378
|
+
type?: string;
|
|
379
|
+
}
|
|
380
|
+
interface ChartPanel {
|
|
381
|
+
title: string;
|
|
382
|
+
type: ChartType | 'bar';
|
|
383
|
+
config: Record<string, unknown>;
|
|
384
|
+
width: number;
|
|
385
|
+
height: number;
|
|
386
|
+
}
|
|
387
|
+
interface ChartBuilderProps {
|
|
388
|
+
records?: Row[];
|
|
389
|
+
columns: ChartBuilderColumn[];
|
|
390
|
+
stateId?: string;
|
|
391
|
+
onSave?: (panel: ChartPanel) => void;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* ChartBuilder — visual chart authoring over a state's dataset. Generates DuckDB
|
|
395
|
+
* SQL from the visual config (SQL engine mode, exact over the full dataset) or
|
|
396
|
+
* aggregates the loaded sample client-side (Direct mode). The host injects
|
|
397
|
+
* runQuery + theme via <DashboardProvider>; an optional onSave persists the
|
|
398
|
+
* assembled panel (absent ⇒ the save affordance is hidden / read-only).
|
|
399
|
+
*/
|
|
400
|
+
declare function ChartBuilder({ records, columns, stateId, onSave }: ChartBuilderProps): react.JSX.Element;
|
|
401
|
+
|
|
402
|
+
/** A dataset column descriptor: name + DuckDB-ish type tag. */
|
|
403
|
+
interface Column {
|
|
404
|
+
name: string;
|
|
405
|
+
type: string;
|
|
406
|
+
}
|
|
407
|
+
/** A selectable state (dataset) in the statefs catalog. */
|
|
408
|
+
interface StatefsState {
|
|
409
|
+
state_id: string;
|
|
410
|
+
row_count?: number;
|
|
411
|
+
[key: string]: unknown;
|
|
412
|
+
}
|
|
413
|
+
/** Per-column profile statistics shown in the ProfileSummary table. */
|
|
414
|
+
interface ProfileColumn {
|
|
415
|
+
name: string;
|
|
416
|
+
type: string;
|
|
417
|
+
distinct_count?: number;
|
|
418
|
+
null_count?: number;
|
|
419
|
+
avg_length?: number;
|
|
420
|
+
min_length?: number;
|
|
421
|
+
max_length?: number;
|
|
422
|
+
min?: number | string;
|
|
423
|
+
max?: number | string;
|
|
424
|
+
top_values?: string[];
|
|
425
|
+
[key: string]: unknown;
|
|
426
|
+
}
|
|
427
|
+
/** Dataset profile (row/column counts + per-column stats). */
|
|
428
|
+
interface DatasetProfile {
|
|
429
|
+
total_rows?: number;
|
|
430
|
+
columns?: ProfileColumn[];
|
|
431
|
+
[key: string]: unknown;
|
|
432
|
+
}
|
|
433
|
+
/** A single dashboard panel descriptor. */
|
|
434
|
+
interface DashboardPanel {
|
|
435
|
+
id: string;
|
|
436
|
+
type: string;
|
|
437
|
+
title?: string;
|
|
438
|
+
width?: number;
|
|
439
|
+
height?: number;
|
|
440
|
+
config?: Record<string, unknown>;
|
|
441
|
+
[key: string]: unknown;
|
|
442
|
+
}
|
|
443
|
+
/** A dashboard config: AI insights + a grid of panels. */
|
|
444
|
+
interface Dashboard {
|
|
445
|
+
insights?: string;
|
|
446
|
+
panels?: DashboardPanel[];
|
|
447
|
+
[key: string]: unknown;
|
|
448
|
+
}
|
|
449
|
+
interface DataExplorerProps {
|
|
450
|
+
/** All records for the active state (viz/builder source). Empty when not loaded. */
|
|
451
|
+
records: Row[];
|
|
452
|
+
/** Active state's columns ({ name, type }), from schema or profile. */
|
|
453
|
+
columns: Column[];
|
|
454
|
+
/** The catalog of selectable states. */
|
|
455
|
+
states?: StatefsState[];
|
|
456
|
+
/** Currently-selected state id (null = none selected). */
|
|
457
|
+
activeStateId?: string | null;
|
|
458
|
+
/** Profile (stats) of the active state. */
|
|
459
|
+
profile?: DatasetProfile | null;
|
|
460
|
+
/** Active dashboard config (null = not yet generated). */
|
|
461
|
+
dashboard?: Dashboard | null;
|
|
462
|
+
/** Persisted id of the active dashboard (null = unsaved). Drives Save vs Save-as. */
|
|
463
|
+
dashboardId?: string | null;
|
|
464
|
+
/** Saved dashboards listed for the current project (shown in the saved panel). */
|
|
465
|
+
savedDashboards?: SavedDashboard[];
|
|
466
|
+
/** True while the catalog/profile/records are loading. */
|
|
467
|
+
loading?: boolean;
|
|
468
|
+
/** True while the AI is generating/refining the dashboard. */
|
|
469
|
+
analyzing?: boolean;
|
|
470
|
+
/** Select a state (host fetches its profile/records). */
|
|
471
|
+
onSelectState: (id: string) => void;
|
|
472
|
+
/** Refresh the states catalog. */
|
|
473
|
+
onRefreshStates?: () => void;
|
|
474
|
+
}
|
|
475
|
+
declare function DataExplorer({ records, columns, states, activeStateId, profile, dashboard, dashboardId, savedDashboards, loading, analyzing, onSelectState, onRefreshStates, }: DataExplorerProps): react.JSX.Element;
|
|
476
|
+
|
|
477
|
+
export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, DEFAULT_CHART_STYLE, type Dashboard$1 as Dashboard, type DashboardCapabilities, type DashboardContextValue, type DashboardPanel$1 as DashboardPanel, DashboardProvider, type DashboardProviderProps, DashboardRenderer, type DashboardRendererProps, type DashboardTheme, DataExplorer, type DataExplorerProps, type HeatmapSerie, HeatmapView, type HeatmapViewProps, type InsightConfig, InsightView, type InsightViewProps, LEGEND_ANCHORS, type LegendAnchor, type LegendPosition, type LineSerie, LineView, type LineViewProps, type MetricConfig, MetricView, type MetricViewProps, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, compileWhere, groupBy, legendConfig, qIdent, qLit, shapeChartData, useCapabilities, useDashboard, withStyleDefaults };
|