@quantumwake/terminal-ux-dashboard-components 0.1.18 → 0.1.20
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/README.md +10 -11
- package/dist/index.cjs +524 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +106 -8
- package/dist/index.d.ts +106 -8
- package/dist/index.js +516 -30
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/dist/index.d.cts
CHANGED
|
@@ -71,7 +71,7 @@ declare function useCapabilities(): {
|
|
|
71
71
|
canEditLayout: boolean;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
type ChartType = 'bar' | 'grouped-bar' | 'pie' | 'line' | 'scatter' | 'heatmap';
|
|
74
|
+
type ChartType = 'bar' | 'grouped-bar' | 'pie' | 'line' | 'scatter' | 'heatmap' | 'heatmap-plus';
|
|
75
75
|
interface ChartField {
|
|
76
76
|
name: string;
|
|
77
77
|
agg?: string;
|
|
@@ -87,13 +87,16 @@ interface ChartConfig {
|
|
|
87
87
|
yFields?: ChartField[];
|
|
88
88
|
valueField?: ChartField | null;
|
|
89
89
|
filters?: ChartFilter[];
|
|
90
|
+
labelStat?: string;
|
|
91
|
+
colorStat?: string;
|
|
92
|
+
blockField?: string;
|
|
90
93
|
}
|
|
91
94
|
type Row = Record<string, unknown>;
|
|
92
95
|
declare const qIdent: (name: string) => string;
|
|
93
96
|
declare const qLit: (v: unknown) => string;
|
|
94
97
|
declare const aggExpr: (agg: string | undefined, col?: string) => string;
|
|
95
98
|
declare const compileWhere: (filters?: ChartFilter[]) => string;
|
|
96
|
-
declare const buildChartSQL: ({ chartType, xFields, yFields, valueField, filters, }: ChartConfig) => string | null;
|
|
99
|
+
declare const buildChartSQL: ({ chartType, xFields, yFields, valueField, filters, labelStat, colorStat, blockField, }: ChartConfig) => string | null;
|
|
97
100
|
declare const shapeChartData: (chartType: ChartType, rows: Row[], { yFields }?: {
|
|
98
101
|
yFields?: ChartField[];
|
|
99
102
|
}) => unknown;
|
|
@@ -101,6 +104,12 @@ declare const shapeChartData: (chartType: ChartType, rows: Row[], { yFields }?:
|
|
|
101
104
|
type LegendAnchor = 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
102
105
|
type LegendPosition = 'start' | 'middle' | 'end';
|
|
103
106
|
type TitleAlign = 'left' | 'center' | 'right';
|
|
107
|
+
interface ChartMargin {
|
|
108
|
+
top: number;
|
|
109
|
+
right: number;
|
|
110
|
+
bottom: number;
|
|
111
|
+
left: number;
|
|
112
|
+
}
|
|
104
113
|
interface ChartStyle {
|
|
105
114
|
background: string;
|
|
106
115
|
textColor: string;
|
|
@@ -132,8 +141,23 @@ interface ChartStyle {
|
|
|
132
141
|
titleBold: boolean;
|
|
133
142
|
titleBackground: string;
|
|
134
143
|
titleColor: string;
|
|
144
|
+
height: number;
|
|
145
|
+
margin: Partial<ChartMargin> | null;
|
|
146
|
+
maxXTicks: number;
|
|
147
|
+
seriesColors: string[];
|
|
135
148
|
}
|
|
136
149
|
declare const DEFAULT_CHART_STYLE: ChartStyle;
|
|
150
|
+
declare const DEFAULT_SERIES_COLORS: string[];
|
|
151
|
+
declare const SERIES_OVERFLOW_COLOR = "#707078";
|
|
152
|
+
declare const seriesColor: (i: number, style?: Partial<ChartStyle> | null) => string;
|
|
153
|
+
declare const chartSizing: (style: Partial<ChartStyle> | null | undefined, defaultMargin: ChartMargin) => {
|
|
154
|
+
frameClass: string;
|
|
155
|
+
frameStyle: {
|
|
156
|
+
height?: number;
|
|
157
|
+
};
|
|
158
|
+
margin: ChartMargin;
|
|
159
|
+
};
|
|
160
|
+
declare function thinTicks<T>(values: T[], max: number): T[] | undefined;
|
|
137
161
|
declare const LEGEND_ANCHORS: LegendAnchor[];
|
|
138
162
|
declare const withStyleDefaults: (style?: Partial<ChartStyle> | null) => ChartStyle;
|
|
139
163
|
declare const buildNivoTheme: (style?: Partial<ChartStyle> | null) => {
|
|
@@ -215,10 +239,30 @@ declare const axisLegend: (style: Partial<ChartStyle> | null | undefined, axis:
|
|
|
215
239
|
numeric?: boolean;
|
|
216
240
|
}) => Record<string, unknown>;
|
|
217
241
|
|
|
218
|
-
type AggFn = 'count' | 'distinct' | 'sum' | 'avg' | 'min' | 'max';
|
|
242
|
+
type AggFn = 'count' | 'distinct' | 'sum' | 'avg' | 'min' | 'max' | 'median';
|
|
219
243
|
declare const groupBy: (records: Row[], column: string) => Record<string, Row[]>;
|
|
220
244
|
declare const aggregate: (records: Row[], column: string, fn: AggFn | string) => number;
|
|
221
245
|
|
|
246
|
+
type HeatStat = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'median';
|
|
247
|
+
type ColorScope = 'global' | 'row' | 'column' | 'block';
|
|
248
|
+
type ColorMethod = 'linear' | 'rank';
|
|
249
|
+
declare const HEAT_STATS: HeatStat[];
|
|
250
|
+
interface HeatCell {
|
|
251
|
+
row: string;
|
|
252
|
+
col: string;
|
|
253
|
+
colorValue: number;
|
|
254
|
+
block?: string;
|
|
255
|
+
}
|
|
256
|
+
interface ColorOptions {
|
|
257
|
+
scope?: ColorScope;
|
|
258
|
+
method?: ColorMethod;
|
|
259
|
+
vmin?: number;
|
|
260
|
+
vmax?: number;
|
|
261
|
+
}
|
|
262
|
+
declare const normalizeCells: (cells: HeatCell[], { scope, method, vmin, vmax }?: ColorOptions) => Map<string, number>;
|
|
263
|
+
declare const heatColor: (t: number) => string;
|
|
264
|
+
declare const heatLabelColor: (t: number) => string;
|
|
265
|
+
|
|
222
266
|
interface MetricConfig {
|
|
223
267
|
column: string;
|
|
224
268
|
agg?: string;
|
|
@@ -288,6 +332,16 @@ interface LineViewProps {
|
|
|
288
332
|
}
|
|
289
333
|
declare function LineView({ records, xColumn, yColumn, data: presetData, style }: LineViewProps): react.JSX.Element;
|
|
290
334
|
|
|
335
|
+
interface SparklineViewProps {
|
|
336
|
+
/** The series, oldest first. */
|
|
337
|
+
data: number[];
|
|
338
|
+
/** Viewbox height in px (the svg scales to its container's width). */
|
|
339
|
+
height?: number;
|
|
340
|
+
/** Line + area hue. */
|
|
341
|
+
color?: string;
|
|
342
|
+
}
|
|
343
|
+
declare function SparklineView({ data, height, color }: SparklineViewProps): react.JSX.Element;
|
|
344
|
+
|
|
291
345
|
interface ScatterSerie {
|
|
292
346
|
id: string;
|
|
293
347
|
data: {
|
|
@@ -312,7 +366,7 @@ interface HeatmapSerie {
|
|
|
312
366
|
y: number;
|
|
313
367
|
}[];
|
|
314
368
|
}
|
|
315
|
-
type AxisOrder = 'alpha' | 'total-asc' | 'total-desc';
|
|
369
|
+
type AxisOrder$1 = 'alpha' | 'total-asc' | 'total-desc';
|
|
316
370
|
interface HeatmapViewProps {
|
|
317
371
|
records?: Row[];
|
|
318
372
|
rowColumn: string;
|
|
@@ -320,8 +374,8 @@ interface HeatmapViewProps {
|
|
|
320
374
|
valueColumn?: string;
|
|
321
375
|
aggFn?: string;
|
|
322
376
|
data?: HeatmapSerie[];
|
|
323
|
-
rowOrder?: AxisOrder;
|
|
324
|
-
colOrder?: AxisOrder;
|
|
377
|
+
rowOrder?: AxisOrder$1;
|
|
378
|
+
colOrder?: AxisOrder$1;
|
|
325
379
|
marginAgg?: string;
|
|
326
380
|
showTotals?: boolean;
|
|
327
381
|
style?: Partial<ChartStyle>;
|
|
@@ -333,6 +387,42 @@ interface HeatmapViewProps {
|
|
|
333
387
|
*/
|
|
334
388
|
declare function HeatmapView({ records, rowColumn, colColumn, valueColumn, aggFn, data: presetData, rowOrder, colOrder, marginAgg, showTotals, style, }: HeatmapViewProps): react.JSX.Element;
|
|
335
389
|
|
|
390
|
+
interface HeatPlusDatum {
|
|
391
|
+
r: string | null;
|
|
392
|
+
c: string | null;
|
|
393
|
+
lv: number;
|
|
394
|
+
cv: number;
|
|
395
|
+
gr?: number;
|
|
396
|
+
gc?: number;
|
|
397
|
+
block?: string;
|
|
398
|
+
}
|
|
399
|
+
type AxisOrder = 'alpha' | 'margin-asc' | 'margin-desc' | 'total-asc' | 'total-desc';
|
|
400
|
+
interface HeatmapPlusViewProps {
|
|
401
|
+
records?: Row[];
|
|
402
|
+
rowColumn: string;
|
|
403
|
+
colColumn: string;
|
|
404
|
+
valueColumn?: string;
|
|
405
|
+
labelStat?: HeatStat;
|
|
406
|
+
colorStat?: HeatStat;
|
|
407
|
+
blockField?: string;
|
|
408
|
+
data?: HeatPlusDatum[];
|
|
409
|
+
scope?: ColorScope;
|
|
410
|
+
method?: ColorMethod;
|
|
411
|
+
vmin?: number;
|
|
412
|
+
vmax?: number;
|
|
413
|
+
rowOrder?: AxisOrder;
|
|
414
|
+
colOrder?: AxisOrder;
|
|
415
|
+
showMargins?: boolean;
|
|
416
|
+
style?: Partial<ChartStyle>;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* HeatmapPlusView — a cross-tab heatmap with independent label/color stats,
|
|
420
|
+
* margins computed over the underlying rows, and a scope/method color engine
|
|
421
|
+
* (see heatmapColor.ts). nivo's built-in scales normalize globally, so colors
|
|
422
|
+
* are precomputed per cell here and handed to nivo as a function.
|
|
423
|
+
*/
|
|
424
|
+
declare function HeatmapPlusView({ records, rowColumn, colColumn, valueColumn, labelStat, colorStat, blockField, data: presetData, scope, method, vmin, vmax, rowOrder, colOrder, showMargins, style, }: HeatmapPlusViewProps): react.JSX.Element;
|
|
425
|
+
|
|
336
426
|
interface PivotViewProps {
|
|
337
427
|
records?: Row[];
|
|
338
428
|
}
|
|
@@ -383,6 +473,14 @@ interface PanelConfig {
|
|
|
383
473
|
colOrder?: string;
|
|
384
474
|
marginAgg?: string;
|
|
385
475
|
showTotals?: boolean;
|
|
476
|
+
labelStat?: string;
|
|
477
|
+
colorStat?: string;
|
|
478
|
+
blockField?: string;
|
|
479
|
+
scope?: string;
|
|
480
|
+
method?: string;
|
|
481
|
+
vmin?: number;
|
|
482
|
+
vmax?: number;
|
|
483
|
+
showMargins?: boolean;
|
|
386
484
|
columns?: string[];
|
|
387
485
|
text?: string;
|
|
388
486
|
label?: string;
|
|
@@ -462,7 +560,7 @@ interface Column {
|
|
|
462
560
|
name: string;
|
|
463
561
|
type: string;
|
|
464
562
|
}
|
|
465
|
-
/** A selectable state (dataset) in the
|
|
563
|
+
/** A selectable state (dataset) in the host's catalog. */
|
|
466
564
|
interface StatefsState {
|
|
467
565
|
state_id: string;
|
|
468
566
|
row_count?: number;
|
|
@@ -539,4 +637,4 @@ interface DataExplorerProps {
|
|
|
539
637
|
}
|
|
540
638
|
declare function DataExplorer({ records, columns, states, activeStateId, profile, dashboard, dashboardId, savedDashboards, loading, analyzing, defaultMode, tabs, onSelectState, onRefreshStates, }: DataExplorerProps): react.JSX.Element;
|
|
541
639
|
|
|
542
|
-
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, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, 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 };
|
|
640
|
+
export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartMargin, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, type ColorMethod, type ColorOptions, type ColorScope, DEFAULT_CHART_STYLE, DEFAULT_SERIES_COLORS, 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, HEAT_STATS, type HeatCell, type HeatPlusDatum, type HeatStat, HeatmapPlusView, type HeatmapPlusViewProps, 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, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, SERIES_OVERFLOW_COLOR, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SparklineView, type SparklineViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, chartSizing, compileWhere, groupBy, heatColor, heatLabelColor, legendConfig, normalizeCells, qIdent, qLit, seriesColor, shapeChartData, thinTicks, useCapabilities, useDashboard, withStyleDefaults };
|
package/dist/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare function useCapabilities(): {
|
|
|
71
71
|
canEditLayout: boolean;
|
|
72
72
|
};
|
|
73
73
|
|
|
74
|
-
type ChartType = 'bar' | 'grouped-bar' | 'pie' | 'line' | 'scatter' | 'heatmap';
|
|
74
|
+
type ChartType = 'bar' | 'grouped-bar' | 'pie' | 'line' | 'scatter' | 'heatmap' | 'heatmap-plus';
|
|
75
75
|
interface ChartField {
|
|
76
76
|
name: string;
|
|
77
77
|
agg?: string;
|
|
@@ -87,13 +87,16 @@ interface ChartConfig {
|
|
|
87
87
|
yFields?: ChartField[];
|
|
88
88
|
valueField?: ChartField | null;
|
|
89
89
|
filters?: ChartFilter[];
|
|
90
|
+
labelStat?: string;
|
|
91
|
+
colorStat?: string;
|
|
92
|
+
blockField?: string;
|
|
90
93
|
}
|
|
91
94
|
type Row = Record<string, unknown>;
|
|
92
95
|
declare const qIdent: (name: string) => string;
|
|
93
96
|
declare const qLit: (v: unknown) => string;
|
|
94
97
|
declare const aggExpr: (agg: string | undefined, col?: string) => string;
|
|
95
98
|
declare const compileWhere: (filters?: ChartFilter[]) => string;
|
|
96
|
-
declare const buildChartSQL: ({ chartType, xFields, yFields, valueField, filters, }: ChartConfig) => string | null;
|
|
99
|
+
declare const buildChartSQL: ({ chartType, xFields, yFields, valueField, filters, labelStat, colorStat, blockField, }: ChartConfig) => string | null;
|
|
97
100
|
declare const shapeChartData: (chartType: ChartType, rows: Row[], { yFields }?: {
|
|
98
101
|
yFields?: ChartField[];
|
|
99
102
|
}) => unknown;
|
|
@@ -101,6 +104,12 @@ declare const shapeChartData: (chartType: ChartType, rows: Row[], { yFields }?:
|
|
|
101
104
|
type LegendAnchor = 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'none';
|
|
102
105
|
type LegendPosition = 'start' | 'middle' | 'end';
|
|
103
106
|
type TitleAlign = 'left' | 'center' | 'right';
|
|
107
|
+
interface ChartMargin {
|
|
108
|
+
top: number;
|
|
109
|
+
right: number;
|
|
110
|
+
bottom: number;
|
|
111
|
+
left: number;
|
|
112
|
+
}
|
|
104
113
|
interface ChartStyle {
|
|
105
114
|
background: string;
|
|
106
115
|
textColor: string;
|
|
@@ -132,8 +141,23 @@ interface ChartStyle {
|
|
|
132
141
|
titleBold: boolean;
|
|
133
142
|
titleBackground: string;
|
|
134
143
|
titleColor: string;
|
|
144
|
+
height: number;
|
|
145
|
+
margin: Partial<ChartMargin> | null;
|
|
146
|
+
maxXTicks: number;
|
|
147
|
+
seriesColors: string[];
|
|
135
148
|
}
|
|
136
149
|
declare const DEFAULT_CHART_STYLE: ChartStyle;
|
|
150
|
+
declare const DEFAULT_SERIES_COLORS: string[];
|
|
151
|
+
declare const SERIES_OVERFLOW_COLOR = "#707078";
|
|
152
|
+
declare const seriesColor: (i: number, style?: Partial<ChartStyle> | null) => string;
|
|
153
|
+
declare const chartSizing: (style: Partial<ChartStyle> | null | undefined, defaultMargin: ChartMargin) => {
|
|
154
|
+
frameClass: string;
|
|
155
|
+
frameStyle: {
|
|
156
|
+
height?: number;
|
|
157
|
+
};
|
|
158
|
+
margin: ChartMargin;
|
|
159
|
+
};
|
|
160
|
+
declare function thinTicks<T>(values: T[], max: number): T[] | undefined;
|
|
137
161
|
declare const LEGEND_ANCHORS: LegendAnchor[];
|
|
138
162
|
declare const withStyleDefaults: (style?: Partial<ChartStyle> | null) => ChartStyle;
|
|
139
163
|
declare const buildNivoTheme: (style?: Partial<ChartStyle> | null) => {
|
|
@@ -215,10 +239,30 @@ declare const axisLegend: (style: Partial<ChartStyle> | null | undefined, axis:
|
|
|
215
239
|
numeric?: boolean;
|
|
216
240
|
}) => Record<string, unknown>;
|
|
217
241
|
|
|
218
|
-
type AggFn = 'count' | 'distinct' | 'sum' | 'avg' | 'min' | 'max';
|
|
242
|
+
type AggFn = 'count' | 'distinct' | 'sum' | 'avg' | 'min' | 'max' | 'median';
|
|
219
243
|
declare const groupBy: (records: Row[], column: string) => Record<string, Row[]>;
|
|
220
244
|
declare const aggregate: (records: Row[], column: string, fn: AggFn | string) => number;
|
|
221
245
|
|
|
246
|
+
type HeatStat = 'count' | 'sum' | 'avg' | 'min' | 'max' | 'median';
|
|
247
|
+
type ColorScope = 'global' | 'row' | 'column' | 'block';
|
|
248
|
+
type ColorMethod = 'linear' | 'rank';
|
|
249
|
+
declare const HEAT_STATS: HeatStat[];
|
|
250
|
+
interface HeatCell {
|
|
251
|
+
row: string;
|
|
252
|
+
col: string;
|
|
253
|
+
colorValue: number;
|
|
254
|
+
block?: string;
|
|
255
|
+
}
|
|
256
|
+
interface ColorOptions {
|
|
257
|
+
scope?: ColorScope;
|
|
258
|
+
method?: ColorMethod;
|
|
259
|
+
vmin?: number;
|
|
260
|
+
vmax?: number;
|
|
261
|
+
}
|
|
262
|
+
declare const normalizeCells: (cells: HeatCell[], { scope, method, vmin, vmax }?: ColorOptions) => Map<string, number>;
|
|
263
|
+
declare const heatColor: (t: number) => string;
|
|
264
|
+
declare const heatLabelColor: (t: number) => string;
|
|
265
|
+
|
|
222
266
|
interface MetricConfig {
|
|
223
267
|
column: string;
|
|
224
268
|
agg?: string;
|
|
@@ -288,6 +332,16 @@ interface LineViewProps {
|
|
|
288
332
|
}
|
|
289
333
|
declare function LineView({ records, xColumn, yColumn, data: presetData, style }: LineViewProps): react.JSX.Element;
|
|
290
334
|
|
|
335
|
+
interface SparklineViewProps {
|
|
336
|
+
/** The series, oldest first. */
|
|
337
|
+
data: number[];
|
|
338
|
+
/** Viewbox height in px (the svg scales to its container's width). */
|
|
339
|
+
height?: number;
|
|
340
|
+
/** Line + area hue. */
|
|
341
|
+
color?: string;
|
|
342
|
+
}
|
|
343
|
+
declare function SparklineView({ data, height, color }: SparklineViewProps): react.JSX.Element;
|
|
344
|
+
|
|
291
345
|
interface ScatterSerie {
|
|
292
346
|
id: string;
|
|
293
347
|
data: {
|
|
@@ -312,7 +366,7 @@ interface HeatmapSerie {
|
|
|
312
366
|
y: number;
|
|
313
367
|
}[];
|
|
314
368
|
}
|
|
315
|
-
type AxisOrder = 'alpha' | 'total-asc' | 'total-desc';
|
|
369
|
+
type AxisOrder$1 = 'alpha' | 'total-asc' | 'total-desc';
|
|
316
370
|
interface HeatmapViewProps {
|
|
317
371
|
records?: Row[];
|
|
318
372
|
rowColumn: string;
|
|
@@ -320,8 +374,8 @@ interface HeatmapViewProps {
|
|
|
320
374
|
valueColumn?: string;
|
|
321
375
|
aggFn?: string;
|
|
322
376
|
data?: HeatmapSerie[];
|
|
323
|
-
rowOrder?: AxisOrder;
|
|
324
|
-
colOrder?: AxisOrder;
|
|
377
|
+
rowOrder?: AxisOrder$1;
|
|
378
|
+
colOrder?: AxisOrder$1;
|
|
325
379
|
marginAgg?: string;
|
|
326
380
|
showTotals?: boolean;
|
|
327
381
|
style?: Partial<ChartStyle>;
|
|
@@ -333,6 +387,42 @@ interface HeatmapViewProps {
|
|
|
333
387
|
*/
|
|
334
388
|
declare function HeatmapView({ records, rowColumn, colColumn, valueColumn, aggFn, data: presetData, rowOrder, colOrder, marginAgg, showTotals, style, }: HeatmapViewProps): react.JSX.Element;
|
|
335
389
|
|
|
390
|
+
interface HeatPlusDatum {
|
|
391
|
+
r: string | null;
|
|
392
|
+
c: string | null;
|
|
393
|
+
lv: number;
|
|
394
|
+
cv: number;
|
|
395
|
+
gr?: number;
|
|
396
|
+
gc?: number;
|
|
397
|
+
block?: string;
|
|
398
|
+
}
|
|
399
|
+
type AxisOrder = 'alpha' | 'margin-asc' | 'margin-desc' | 'total-asc' | 'total-desc';
|
|
400
|
+
interface HeatmapPlusViewProps {
|
|
401
|
+
records?: Row[];
|
|
402
|
+
rowColumn: string;
|
|
403
|
+
colColumn: string;
|
|
404
|
+
valueColumn?: string;
|
|
405
|
+
labelStat?: HeatStat;
|
|
406
|
+
colorStat?: HeatStat;
|
|
407
|
+
blockField?: string;
|
|
408
|
+
data?: HeatPlusDatum[];
|
|
409
|
+
scope?: ColorScope;
|
|
410
|
+
method?: ColorMethod;
|
|
411
|
+
vmin?: number;
|
|
412
|
+
vmax?: number;
|
|
413
|
+
rowOrder?: AxisOrder;
|
|
414
|
+
colOrder?: AxisOrder;
|
|
415
|
+
showMargins?: boolean;
|
|
416
|
+
style?: Partial<ChartStyle>;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* HeatmapPlusView — a cross-tab heatmap with independent label/color stats,
|
|
420
|
+
* margins computed over the underlying rows, and a scope/method color engine
|
|
421
|
+
* (see heatmapColor.ts). nivo's built-in scales normalize globally, so colors
|
|
422
|
+
* are precomputed per cell here and handed to nivo as a function.
|
|
423
|
+
*/
|
|
424
|
+
declare function HeatmapPlusView({ records, rowColumn, colColumn, valueColumn, labelStat, colorStat, blockField, data: presetData, scope, method, vmin, vmax, rowOrder, colOrder, showMargins, style, }: HeatmapPlusViewProps): react.JSX.Element;
|
|
425
|
+
|
|
336
426
|
interface PivotViewProps {
|
|
337
427
|
records?: Row[];
|
|
338
428
|
}
|
|
@@ -383,6 +473,14 @@ interface PanelConfig {
|
|
|
383
473
|
colOrder?: string;
|
|
384
474
|
marginAgg?: string;
|
|
385
475
|
showTotals?: boolean;
|
|
476
|
+
labelStat?: string;
|
|
477
|
+
colorStat?: string;
|
|
478
|
+
blockField?: string;
|
|
479
|
+
scope?: string;
|
|
480
|
+
method?: string;
|
|
481
|
+
vmin?: number;
|
|
482
|
+
vmax?: number;
|
|
483
|
+
showMargins?: boolean;
|
|
386
484
|
columns?: string[];
|
|
387
485
|
text?: string;
|
|
388
486
|
label?: string;
|
|
@@ -462,7 +560,7 @@ interface Column {
|
|
|
462
560
|
name: string;
|
|
463
561
|
type: string;
|
|
464
562
|
}
|
|
465
|
-
/** A selectable state (dataset) in the
|
|
563
|
+
/** A selectable state (dataset) in the host's catalog. */
|
|
466
564
|
interface StatefsState {
|
|
467
565
|
state_id: string;
|
|
468
566
|
row_count?: number;
|
|
@@ -539,4 +637,4 @@ interface DataExplorerProps {
|
|
|
539
637
|
}
|
|
540
638
|
declare function DataExplorer({ records, columns, states, activeStateId, profile, dashboard, dashboardId, savedDashboards, loading, analyzing, defaultMode, tabs, onSelectState, onRefreshStates, }: DataExplorerProps): react.JSX.Element;
|
|
541
639
|
|
|
542
|
-
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, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, 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 };
|
|
640
|
+
export { type AggFn, type BarDatum, BarView, type BarViewProps, ChartBuilder, type ChartBuilderColumn, type ChartBuilderProps, type ChartConfig, type ChartField, type ChartFilter, type ChartMargin, type ChartPanel, type ChartStyle, ChartStyleControls, type ChartStyleControlsProps, type ChartType, type ColorMethod, type ColorOptions, type ColorScope, DEFAULT_CHART_STYLE, DEFAULT_SERIES_COLORS, 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, HEAT_STATS, type HeatCell, type HeatPlusDatum, type HeatStat, HeatmapPlusView, type HeatmapPlusViewProps, 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, PanelChart, type PanelChartProps, type PanelInput, type PanelLayout, type PanelRef, type PieDatum, PieView, type PieViewProps, PivotView, type PivotViewProps, type QueryResult, type Row, SERIES_OVERFLOW_COLOR, type SavedDashboard, type ScatterSerie, ScatterView, type ScatterViewProps, SparklineView, type SparklineViewProps, SqlConsole, type SqlConsoleColumn, type SqlConsoleProps, type TitleAlign, aggExpr, aggregate, axisLegend, buildChartSQL, buildNivoTheme, chartSizing, compileWhere, groupBy, heatColor, heatLabelColor, legendConfig, normalizeCells, qIdent, qLit, seriesColor, shapeChartData, thinTicks, useCapabilities, useDashboard, withStyleDefaults };
|