em-kit 0.0.0-stage → 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 +128 -2
- package/dist/ai.d.ts +1896 -0
- package/dist/ai.js +2699 -0
- package/dist/ai.js.map +1 -0
- package/dist/build.d.ts +120 -0
- package/dist/build.js +56 -0
- package/dist/build.js.map +1 -0
- package/dist/chunks/EditorCard.d-CcLiXQ7c.d.ts +469 -0
- package/dist/chunks/pies.utils-CneQQ7wE.js +7900 -0
- package/dist/chunks/pies.utils-CneQQ7wE.js.map +1 -0
- package/dist/index.d.ts +1376 -0
- package/dist/index.js +8364 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.js +6 -0
- package/package.json +104 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,1376 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { b as Dimension, M as Measure, a as DataResponse, c as TimeRange, T as Theme, G as Granularity, N as NativeDataType, D as DimensionOrMeasure, O as OrderDirection, j as Dataset, k as EditorCardHeaderProps, F as FilterOperator } from './chunks/EditorCard.d-CcLiXQ7c.js';
|
|
4
|
+
import { ChartCardHeaderProps } from './build.js';
|
|
5
|
+
export { l as ChartCardMenuOption, e as ComparisonPeriodOption, m as DateRangeOption, i as defaultComparisonPeriodOptions, n as defaultDateRangeOptions } from './chunks/EditorCard.d-CcLiXQ7c.js';
|
|
6
|
+
import 'i18next';
|
|
7
|
+
import '@embeddable.com/remarkable-ui';
|
|
8
|
+
import 'chart.js';
|
|
9
|
+
|
|
10
|
+
type PieChartClickArg = {
|
|
11
|
+
dimensionValue: string | undefined;
|
|
12
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
13
|
+
};
|
|
14
|
+
type DefaultPieChartProps = {
|
|
15
|
+
dimension: Dimension;
|
|
16
|
+
maxLegendItems?: number;
|
|
17
|
+
measure: Measure;
|
|
18
|
+
results: DataResponse;
|
|
19
|
+
showLegend?: boolean;
|
|
20
|
+
showTooltips?: boolean;
|
|
21
|
+
showValueLabels?: boolean;
|
|
22
|
+
showValueLabelsAsPercentage?: boolean;
|
|
23
|
+
onSegmentClick?: (args: PieChartClickArg) => void;
|
|
24
|
+
componentName?: string;
|
|
25
|
+
trackingId?: string;
|
|
26
|
+
} & ChartCardHeaderProps;
|
|
27
|
+
|
|
28
|
+
type DeepPartial<T> = {
|
|
29
|
+
[K in keyof T]?: T[K] extends object ? DeepPartial<T[K]> : T[K];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
type ChartsProviderProps = {
|
|
33
|
+
theme?: DeepPartial<Theme>;
|
|
34
|
+
timezone?: string;
|
|
35
|
+
children: ReactNode;
|
|
36
|
+
};
|
|
37
|
+
declare const ChartsProvider: ({ theme, timezone, children }: ChartsProviderProps) => react.JSX.Element;
|
|
38
|
+
|
|
39
|
+
declare const remarkableTheme: Theme;
|
|
40
|
+
|
|
41
|
+
/** Per-field options read from a dimension's or measure's `inputs`. */
|
|
42
|
+
type GeneratedFieldInputs = {
|
|
43
|
+
/** Prefix. */
|
|
44
|
+
prefix?: string;
|
|
45
|
+
/** Suffix. */
|
|
46
|
+
suffix?: string;
|
|
47
|
+
/** Display name. */
|
|
48
|
+
displayName?: string;
|
|
49
|
+
/** Maximum characters. Applies to string fields. */
|
|
50
|
+
maxCharacters?: number;
|
|
51
|
+
/** Decimal places. Applies to number fields. */
|
|
52
|
+
decimalPlaces?: number;
|
|
53
|
+
/** Currency. e.g. EUR. Applies to number fields. */
|
|
54
|
+
currency?: string;
|
|
55
|
+
/** Abbreviate large number. Applies to number fields. */
|
|
56
|
+
abbreviateLargeNumber?: boolean;
|
|
57
|
+
/** Color. */
|
|
58
|
+
color?: string;
|
|
59
|
+
/** Show values as percentage. */
|
|
60
|
+
showValueAsPercentage?: boolean;
|
|
61
|
+
/** Granularity. Applies to time fields. */
|
|
62
|
+
granularity?: Granularity;
|
|
63
|
+
/** Show granularity dropdown. Display a granularity selector inside the chart. The Granularity input above is used only as the default when this option is enabled. Applies to time fields. */
|
|
64
|
+
showGranularityDropdown?: boolean;
|
|
65
|
+
/** Date bounds. Set a date range or connect your primary date-range variable to define the x-axis min and max. If "Show granularity dropdown" is enabled, this also enables auto-selection of the most appropriate granularity. Applies to time fields. */
|
|
66
|
+
dateBounds?: TimeRange;
|
|
67
|
+
/** Ignore empty dates. When enabled, dates with no data will be omitted instead of shown as empty. Applies to time fields. */
|
|
68
|
+
ignoreEmptyDate?: boolean;
|
|
69
|
+
/** Line color. */
|
|
70
|
+
lineColor?: string;
|
|
71
|
+
/** Dashed line. */
|
|
72
|
+
dashedLine?: boolean;
|
|
73
|
+
/** Connect gaps. */
|
|
74
|
+
connectGaps?: boolean;
|
|
75
|
+
/** Fill under line. */
|
|
76
|
+
fillUnderLine?: boolean;
|
|
77
|
+
/** Assign to secondary axis. */
|
|
78
|
+
useSecondaryAxis?: boolean;
|
|
79
|
+
/** Previous line color. */
|
|
80
|
+
previousLineColor?: string;
|
|
81
|
+
/** Primary line dashed. */
|
|
82
|
+
lineDashed?: boolean;
|
|
83
|
+
/** Compared line dashed. */
|
|
84
|
+
previousLineDashed?: boolean;
|
|
85
|
+
/** Reverse positive/negative colors. */
|
|
86
|
+
invertChangeColors?: boolean;
|
|
87
|
+
/** Reverse trend direction. Reverses the up/down trend arrow independently of "Reverse positive/negative colors" above. Existing dashboards keep their current look until this is changed explicitly. */
|
|
88
|
+
reverseTrendDirection?: boolean;
|
|
89
|
+
/** Display change as %. */
|
|
90
|
+
displayChangeAsPercentage?: boolean;
|
|
91
|
+
/** Percentage decimal places. */
|
|
92
|
+
percentageDecimalPlaces?: number;
|
|
93
|
+
/** Show column calculation. */
|
|
94
|
+
columnAggregation?: ("sum" | "min" | "max" | "average")[];
|
|
95
|
+
/** Show row calculation. */
|
|
96
|
+
rowAggregation?: ("sum" | "min" | "max" | "average")[];
|
|
97
|
+
/** Show as percentage. If turned on, other measures may be ignored. */
|
|
98
|
+
showAsPercentage?: boolean;
|
|
99
|
+
/** Width. You can input a number in pixels e.g. 400. */
|
|
100
|
+
width?: number;
|
|
101
|
+
/** Align. */
|
|
102
|
+
align?: "left" | "center" | "right";
|
|
103
|
+
/** Table cell style. */
|
|
104
|
+
tableCellStyle?: "Bold" | "Italic" | "Positive vs Negative";
|
|
105
|
+
/** Display format. */
|
|
106
|
+
displayFormat?: "Markdown" | "Json";
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Options set on a dimension's or measure's `inputs`. Which ones a chart reads
|
|
111
|
+
* is listed under "Field options" on its docs page.
|
|
112
|
+
*/
|
|
113
|
+
type FieldInputs = GeneratedFieldInputs & {
|
|
114
|
+
/** Rendered in place of null/undefined values. */
|
|
115
|
+
displayNullAs?: string;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type SpecRow = Record<string, unknown>;
|
|
119
|
+
/**
|
|
120
|
+
* Per-field options, applied via the field's `inputs`: formatting (prefix,
|
|
121
|
+
* suffix, decimalPlaces, …) plus chart-specific ones such as a pivot table's
|
|
122
|
+
* columnAggregation/rowAggregation. Time-axis settings live on the chart.
|
|
123
|
+
*/
|
|
124
|
+
type SpecFieldFormat = Omit<FieldInputs, 'granularity' | 'showGranularityDropdown' | 'dateBounds'>;
|
|
125
|
+
type SpecField = {
|
|
126
|
+
/** Row key: values are read from `rows[i][name]`. */
|
|
127
|
+
name: string;
|
|
128
|
+
/** Display name. Defaults to `name`. */
|
|
129
|
+
title?: string;
|
|
130
|
+
/** Inferred from the row values when omitted. */
|
|
131
|
+
type?: NativeDataType;
|
|
132
|
+
/**
|
|
133
|
+
* Only meaningful where a chart takes mixed columns (`table`): whether the
|
|
134
|
+
* field is a category (`dimension`) or a numeric value (`measure`).
|
|
135
|
+
* Inferred from `type`/row values when omitted.
|
|
136
|
+
*/
|
|
137
|
+
role?: 'dimension' | 'measure';
|
|
138
|
+
format?: SpecFieldFormat;
|
|
139
|
+
};
|
|
140
|
+
/** A field is a bare row-key string or a full descriptor. */
|
|
141
|
+
type FieldRef = string | SpecField;
|
|
142
|
+
/** ISO date strings (`YYYY-MM-DD` or full timestamps), no zone suffix. */
|
|
143
|
+
type DateRangeSpec = {
|
|
144
|
+
from?: string;
|
|
145
|
+
to?: string;
|
|
146
|
+
};
|
|
147
|
+
type BaseSpec = {
|
|
148
|
+
title?: string;
|
|
149
|
+
description?: string;
|
|
150
|
+
/**
|
|
151
|
+
* The data, long format: one row per category (× group) combination.
|
|
152
|
+
* Omit while loading. Time values are zone-less ISO strings — the renderer
|
|
153
|
+
* also accepts `YYYY-MM-DD` and epoch milliseconds and normalizes.
|
|
154
|
+
*/
|
|
155
|
+
rows?: SpecRow[];
|
|
156
|
+
/** Force the loading state, e.g. while more rows stream in. */
|
|
157
|
+
loading?: boolean;
|
|
158
|
+
/** Render the error state with this message instead of data. */
|
|
159
|
+
error?: string;
|
|
160
|
+
};
|
|
161
|
+
type LegendOptions = {
|
|
162
|
+
showLegend?: boolean;
|
|
163
|
+
maxLegendItems?: number;
|
|
164
|
+
};
|
|
165
|
+
type CartesianOptions = LegendOptions & {
|
|
166
|
+
showTooltips?: boolean;
|
|
167
|
+
showValueLabels?: boolean;
|
|
168
|
+
showLogarithmicScale?: boolean;
|
|
169
|
+
/** Category-axis label (vertical orientation; see header). */
|
|
170
|
+
xAxisLabel?: string;
|
|
171
|
+
/** Value-axis label. */
|
|
172
|
+
yAxisLabel?: string;
|
|
173
|
+
/** Value-axis range. */
|
|
174
|
+
yAxisRangeMin?: number;
|
|
175
|
+
yAxisRangeMax?: number;
|
|
176
|
+
/** Reverse the category order. */
|
|
177
|
+
reverseXAxis?: boolean;
|
|
178
|
+
/** Cap on rendered categories. */
|
|
179
|
+
xAxisMaxItems?: number;
|
|
180
|
+
};
|
|
181
|
+
type StackableOptions = CartesianOptions & {
|
|
182
|
+
showTotalLabels?: boolean;
|
|
183
|
+
};
|
|
184
|
+
type BarSpec = BaseSpec & {
|
|
185
|
+
chart: 'bar' | 'barHorizontal';
|
|
186
|
+
/** Category dimension. */
|
|
187
|
+
dimension: FieldRef;
|
|
188
|
+
/** One measure per bar series. */
|
|
189
|
+
measures: FieldRef | FieldRef[];
|
|
190
|
+
/** When `dimension` is a time field: its bucket size. */
|
|
191
|
+
granularity?: Granularity;
|
|
192
|
+
options?: CartesianOptions;
|
|
193
|
+
};
|
|
194
|
+
type BarGroupedSpec = BaseSpec & {
|
|
195
|
+
chart: 'barGrouped' | 'barGroupedHorizontal' | 'barStacked' | 'barStackedHorizontal';
|
|
196
|
+
/** Category axis dimension (renders on y for horizontal variants). */
|
|
197
|
+
xAxis: FieldRef;
|
|
198
|
+
/** Dimension that splits each category into grouped/stacked bars. */
|
|
199
|
+
groupBy: FieldRef;
|
|
200
|
+
measure: FieldRef;
|
|
201
|
+
/** When `xAxis` is a time field: its bucket size. */
|
|
202
|
+
granularity?: Granularity;
|
|
203
|
+
options?: StackableOptions;
|
|
204
|
+
};
|
|
205
|
+
type LineSpec = BaseSpec & {
|
|
206
|
+
chart: 'line';
|
|
207
|
+
xAxis: FieldRef;
|
|
208
|
+
/** One measure per line. */
|
|
209
|
+
measures: FieldRef | FieldRef[];
|
|
210
|
+
/** When `xAxis` is a time field: its bucket size. */
|
|
211
|
+
granularity?: Granularity;
|
|
212
|
+
options?: CartesianOptions;
|
|
213
|
+
};
|
|
214
|
+
type LineGroupedSpec = BaseSpec & {
|
|
215
|
+
chart: 'lineGrouped';
|
|
216
|
+
xAxis: FieldRef;
|
|
217
|
+
/** Dimension that splits the measure into one line per value. */
|
|
218
|
+
groupBy: FieldRef;
|
|
219
|
+
measure: FieldRef;
|
|
220
|
+
granularity?: Granularity;
|
|
221
|
+
options?: CartesianOptions;
|
|
222
|
+
};
|
|
223
|
+
type AreaSpec = BaseSpec & {
|
|
224
|
+
chart: 'area';
|
|
225
|
+
xAxis: FieldRef;
|
|
226
|
+
/** Stacking dimension. Omit for a single-series area. */
|
|
227
|
+
groupBy?: FieldRef;
|
|
228
|
+
measure: FieldRef;
|
|
229
|
+
granularity?: Granularity;
|
|
230
|
+
options?: CartesianOptions;
|
|
231
|
+
};
|
|
232
|
+
type LineWithKpiTabsSpec = BaseSpec & {
|
|
233
|
+
chart: 'lineWithKpiTabs';
|
|
234
|
+
xAxis: FieldRef;
|
|
235
|
+
/** One measure per KPI tab; each tab plots its measure as the line. */
|
|
236
|
+
measures: FieldRef | FieldRef[];
|
|
237
|
+
/**
|
|
238
|
+
* One row holding each measure's headline number for the tabs.
|
|
239
|
+
* Derived by summing `rows` when omitted.
|
|
240
|
+
*/
|
|
241
|
+
kpiRows?: SpecRow[];
|
|
242
|
+
granularity?: Granularity;
|
|
243
|
+
options?: CartesianOptions;
|
|
244
|
+
};
|
|
245
|
+
type LineComparisonSpec = BaseSpec & {
|
|
246
|
+
chart: 'lineComparison';
|
|
247
|
+
xAxis: FieldRef;
|
|
248
|
+
measures: FieldRef | FieldRef[];
|
|
249
|
+
/** Rows for the comparison period, same shape as `rows`; aligned by position. */
|
|
250
|
+
comparisonRows?: SpecRow[];
|
|
251
|
+
/** Label for the comparison, e.g. 'Previous period'. */
|
|
252
|
+
comparisonLabel?: string;
|
|
253
|
+
/** Periods covered; derived from each row set's time extent when omitted. */
|
|
254
|
+
dateRange?: DateRangeSpec;
|
|
255
|
+
comparisonDateRange?: DateRangeSpec;
|
|
256
|
+
granularity?: Granularity;
|
|
257
|
+
options?: CartesianOptions & {
|
|
258
|
+
/** Second x-axis showing the comparison period's dates. */
|
|
259
|
+
showComparisonAxis?: boolean;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
type LineComparisonWithKpiTabsSpec = BaseSpec & {
|
|
263
|
+
chart: 'lineComparisonWithKpiTabs';
|
|
264
|
+
xAxis: FieldRef;
|
|
265
|
+
measures: FieldRef | FieldRef[];
|
|
266
|
+
comparisonRows?: SpecRow[];
|
|
267
|
+
/** See LineWithKpiTabsSpec.kpiRows; derived from `rows` when omitted. */
|
|
268
|
+
kpiRows?: SpecRow[];
|
|
269
|
+
/** Headline numbers for the comparison period; derived from `comparisonRows`. */
|
|
270
|
+
kpiComparisonRows?: SpecRow[];
|
|
271
|
+
comparisonLabel?: string;
|
|
272
|
+
dateRange?: DateRangeSpec;
|
|
273
|
+
comparisonDateRange?: DateRangeSpec;
|
|
274
|
+
granularity?: Granularity;
|
|
275
|
+
options?: CartesianOptions & {
|
|
276
|
+
showComparisonAxis?: boolean;
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
type BarLineSpec = BaseSpec & {
|
|
280
|
+
chart: 'barLine';
|
|
281
|
+
dimension: FieldRef;
|
|
282
|
+
/** Measures drawn as bars (left axis). */
|
|
283
|
+
barMeasures: FieldRef | FieldRef[];
|
|
284
|
+
/** Measures drawn as lines (right axis). */
|
|
285
|
+
lineMeasures?: FieldRef | FieldRef[];
|
|
286
|
+
granularity?: Granularity;
|
|
287
|
+
options?: CartesianOptions & {
|
|
288
|
+
showValueLabelsLine?: boolean;
|
|
289
|
+
/** Right (line) axis. */
|
|
290
|
+
yAxisSecondaryLabel?: string;
|
|
291
|
+
yAxisSecondaryMin?: number;
|
|
292
|
+
yAxisSecondaryMax?: number;
|
|
293
|
+
};
|
|
294
|
+
};
|
|
295
|
+
type PieOptions = LegendOptions & {
|
|
296
|
+
showTooltips?: boolean;
|
|
297
|
+
showValueLabels?: boolean;
|
|
298
|
+
showValueLabelsAsPercentage?: boolean;
|
|
299
|
+
};
|
|
300
|
+
type PieSpec = BaseSpec & {
|
|
301
|
+
chart: 'pie' | 'donut';
|
|
302
|
+
dimension: FieldRef;
|
|
303
|
+
measure: FieldRef;
|
|
304
|
+
options?: PieOptions;
|
|
305
|
+
};
|
|
306
|
+
type DonutLabelSpec = BaseSpec & {
|
|
307
|
+
chart: 'donutLabel';
|
|
308
|
+
dimension: FieldRef;
|
|
309
|
+
measure: FieldRef;
|
|
310
|
+
/**
|
|
311
|
+
* The headline number in the donut's center. Omitted fields are derived:
|
|
312
|
+
* `measure` defaults to the main measure, `value` to the sum of the rows.
|
|
313
|
+
*/
|
|
314
|
+
innerLabel?: {
|
|
315
|
+
text?: string;
|
|
316
|
+
measure?: FieldRef;
|
|
317
|
+
value?: number | string;
|
|
318
|
+
};
|
|
319
|
+
options?: PieOptions;
|
|
320
|
+
};
|
|
321
|
+
type PointChartOptions = LegendOptions & {
|
|
322
|
+
showTooltips?: boolean;
|
|
323
|
+
/** Label each point with its dimension value. */
|
|
324
|
+
showPointLabels?: boolean;
|
|
325
|
+
showValueLabels?: boolean;
|
|
326
|
+
showLogarithmicScale?: boolean;
|
|
327
|
+
xAxisLabel?: string;
|
|
328
|
+
yAxisLabel?: string;
|
|
329
|
+
xAxisRangeMin?: number;
|
|
330
|
+
xAxisRangeMax?: number;
|
|
331
|
+
yAxisRangeMin?: number;
|
|
332
|
+
yAxisRangeMax?: number;
|
|
333
|
+
reverseXAxis?: boolean;
|
|
334
|
+
/** CSS color for ungrouped points. */
|
|
335
|
+
pointColor?: string;
|
|
336
|
+
};
|
|
337
|
+
type ScatterSpec = BaseSpec & {
|
|
338
|
+
chart: 'scatter';
|
|
339
|
+
xMeasure: FieldRef;
|
|
340
|
+
yMeasure: FieldRef;
|
|
341
|
+
/** Dimension identifying each point. */
|
|
342
|
+
pointDimension: FieldRef;
|
|
343
|
+
/** Optional dimension that colors points by group. */
|
|
344
|
+
groupByDimension?: FieldRef;
|
|
345
|
+
options?: PointChartOptions;
|
|
346
|
+
};
|
|
347
|
+
type BubbleSpec = BaseSpec & {
|
|
348
|
+
chart: 'bubble';
|
|
349
|
+
xMeasure: FieldRef;
|
|
350
|
+
yMeasure: FieldRef;
|
|
351
|
+
bubbleSizeMeasure: FieldRef;
|
|
352
|
+
pointDimension: FieldRef;
|
|
353
|
+
groupByDimension?: FieldRef;
|
|
354
|
+
options?: PointChartOptions & {
|
|
355
|
+
bubbleRadiusMin?: number;
|
|
356
|
+
bubbleRadiusMax?: number;
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
type KpiSpec = BaseSpec & {
|
|
360
|
+
chart: 'kpi';
|
|
361
|
+
measure: FieldRef;
|
|
362
|
+
/** Shortcut for `rows: [{ [measure.name]: value }]`. Ignored when `rows` is set. */
|
|
363
|
+
value?: number | string;
|
|
364
|
+
options?: {
|
|
365
|
+
fontSize?: number;
|
|
366
|
+
displayNullAs?: string;
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
type KpiComparisonSpec = BaseSpec & {
|
|
370
|
+
chart: 'kpiComparison';
|
|
371
|
+
measure: FieldRef;
|
|
372
|
+
/** Shortcut for `rows`; see KpiSpec.value. */
|
|
373
|
+
value?: number | string;
|
|
374
|
+
/** The value compared against. Shortcut for `comparisonRows`. */
|
|
375
|
+
comparisonValue?: number | string;
|
|
376
|
+
/** Rows for the comparison period, same shape as `rows`. */
|
|
377
|
+
comparisonRows?: SpecRow[];
|
|
378
|
+
/** Label for the comparison, e.g. 'Previous period'. */
|
|
379
|
+
comparisonLabel?: string;
|
|
380
|
+
/** Period the main value covers. */
|
|
381
|
+
dateRange?: DateRangeSpec;
|
|
382
|
+
/** Period the comparison value covers. */
|
|
383
|
+
comparisonDateRange?: DateRangeSpec;
|
|
384
|
+
options?: {
|
|
385
|
+
fontSize?: number;
|
|
386
|
+
changeFontSize?: number;
|
|
387
|
+
displayChangeAsPercentage?: boolean;
|
|
388
|
+
/** When a decrease is good (costs, churn). */
|
|
389
|
+
reversePositiveNegativeColors?: boolean;
|
|
390
|
+
percentageDecimalPlaces?: number;
|
|
391
|
+
displayNullAs?: string;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
type TableSpec = BaseSpec & {
|
|
395
|
+
chart: 'table';
|
|
396
|
+
/** Columns, in display order. `role` disambiguates dimension vs measure. */
|
|
397
|
+
columns: FieldRef[];
|
|
398
|
+
options?: {
|
|
399
|
+
/** Number the rows. */
|
|
400
|
+
showIndex?: boolean;
|
|
401
|
+
displayNullAs?: string;
|
|
402
|
+
};
|
|
403
|
+
};
|
|
404
|
+
type HeatMapSpec = BaseSpec & {
|
|
405
|
+
chart: 'heatmap';
|
|
406
|
+
rowDimension: FieldRef;
|
|
407
|
+
columnDimension: FieldRef;
|
|
408
|
+
measure: FieldRef;
|
|
409
|
+
options?: {
|
|
410
|
+
/** Print the measure value in each cell. */
|
|
411
|
+
showValues?: boolean;
|
|
412
|
+
/** CSS colors for the value scale. */
|
|
413
|
+
minColor?: string;
|
|
414
|
+
midColor?: string;
|
|
415
|
+
maxColor?: string;
|
|
416
|
+
/** Values at/below this render as minColor. */
|
|
417
|
+
minThreshold?: string;
|
|
418
|
+
/** Values at/above this render as maxColor. */
|
|
419
|
+
maxThreshold?: string;
|
|
420
|
+
displayNullAs?: string;
|
|
421
|
+
columnWidth?: number;
|
|
422
|
+
firstColumnWidth?: number;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
type PivotSpec = BaseSpec & {
|
|
426
|
+
chart: 'pivot';
|
|
427
|
+
rowDimension: FieldRef;
|
|
428
|
+
columnDimension: FieldRef;
|
|
429
|
+
measures: FieldRef | FieldRef[];
|
|
430
|
+
/** Expandable second row level. Requires `subRows`. */
|
|
431
|
+
subRowDimension?: FieldRef;
|
|
432
|
+
/** Rows for the sub-row level, long format including the parent row key. */
|
|
433
|
+
subRows?: SpecRow[];
|
|
434
|
+
options?: {
|
|
435
|
+
displayNullAs?: string;
|
|
436
|
+
columnWidth?: number;
|
|
437
|
+
firstColumnWidth?: number;
|
|
438
|
+
};
|
|
439
|
+
};
|
|
440
|
+
type ChartSpec = BarSpec | BarGroupedSpec | LineSpec | LineGroupedSpec | LineWithKpiTabsSpec | LineComparisonSpec | LineComparisonWithKpiTabsSpec | AreaSpec | BarLineSpec | PieSpec | DonutLabelSpec | ScatterSpec | BubbleSpec | KpiSpec | KpiComparisonSpec | TableSpec | HeatMapSpec | PivotSpec;
|
|
441
|
+
type ChartKind = ChartSpec['chart'];
|
|
442
|
+
declare const CHART_KINDS: readonly ["bar", "barHorizontal", "barGrouped", "barGroupedHorizontal", "barStacked", "barStackedHorizontal", "line", "lineGrouped", "lineWithKpiTabs", "lineComparison", "lineComparisonWithKpiTabs", "area", "barLine", "pie", "donut", "donutLabel", "scatter", "bubble", "kpi", "kpiComparison", "table", "heatmap", "pivot"];
|
|
443
|
+
declare const isChartKind: (value: unknown) => value is ChartKind;
|
|
444
|
+
|
|
445
|
+
type ChartIntentType = 'bar-click' | 'line-click' | 'point-click' | 'area-click' | 'segment-click' | 'cell-click' | 'row-click';
|
|
446
|
+
type ChartIntent = {
|
|
447
|
+
type: ChartIntentType;
|
|
448
|
+
chart: ChartKind;
|
|
449
|
+
/** The chart's title, when it has one. */
|
|
450
|
+
title?: string;
|
|
451
|
+
/** Row key of the primary dimension the user clicked on. */
|
|
452
|
+
dimension?: string;
|
|
453
|
+
value?: string | number | boolean | null;
|
|
454
|
+
/** Grouping/column dimension, where the chart has one. */
|
|
455
|
+
groupDimension?: string;
|
|
456
|
+
groupValue?: string | number | boolean | null;
|
|
457
|
+
measureValue?: number;
|
|
458
|
+
/** ISO strings, zone-less — covered period when the clicked element is a time bucket. */
|
|
459
|
+
timeRange?: {
|
|
460
|
+
from?: string;
|
|
461
|
+
to?: string;
|
|
462
|
+
};
|
|
463
|
+
/** The component's raw click payload with dates serialized to ISO strings. */
|
|
464
|
+
details?: Record<string, unknown>;
|
|
465
|
+
};
|
|
466
|
+
/**
|
|
467
|
+
* One plain-English line describing the interaction, phrased as a follow-up a
|
|
468
|
+
* chat app can send to the model on the user's behalf.
|
|
469
|
+
*/
|
|
470
|
+
declare const intentToPrompt: (intent: ChartIntent) => string;
|
|
471
|
+
|
|
472
|
+
type ChartFromSpecProps = {
|
|
473
|
+
/** Usually a parsed LLM tool call; validated at runtime, never trusted. */
|
|
474
|
+
spec: ChartSpec;
|
|
475
|
+
/** Receives one serializable intent per user interaction with the chart. */
|
|
476
|
+
onIntent?: (intent: ChartIntent) => void;
|
|
477
|
+
/**
|
|
478
|
+
* How much card chrome to render — the app's choice, not the model's.
|
|
479
|
+
* 'card' is the full card, 'plain' keeps the header but drops the export
|
|
480
|
+
* menu, 'bare' removes the header and flattens the card for embedding in a
|
|
481
|
+
* chat bubble.
|
|
482
|
+
*/
|
|
483
|
+
chrome?: 'card' | 'plain' | 'bare';
|
|
484
|
+
/**
|
|
485
|
+
* Fixed height in px. The card fills its parent, so give the chart a
|
|
486
|
+
* definite height when the parent (e.g. a chat bubble) has none.
|
|
487
|
+
*/
|
|
488
|
+
height?: number;
|
|
489
|
+
};
|
|
490
|
+
declare const ChartFromSpec: ({ spec, onIntent, chrome, height }: ChartFromSpecProps) => react.JSX.Element;
|
|
491
|
+
|
|
492
|
+
type FieldOptions = {
|
|
493
|
+
name: string;
|
|
494
|
+
title?: string;
|
|
495
|
+
type?: NativeDataType;
|
|
496
|
+
description?: string;
|
|
497
|
+
meta?: object;
|
|
498
|
+
inputs?: FieldInputs;
|
|
499
|
+
};
|
|
500
|
+
declare const dimension: ({ name, title, type, description, meta, inputs, granularity, }: FieldOptions & {
|
|
501
|
+
granularity?: Granularity;
|
|
502
|
+
}) => Dimension;
|
|
503
|
+
declare const measure: ({ name, title, type, description, meta, inputs }: FieldOptions) => Measure;
|
|
504
|
+
declare const dateRangePreset: (name: string) => TimeRange;
|
|
505
|
+
declare const results: (data: Record<string, any>[] | undefined, extra?: Partial<DataResponse>) => DataResponse;
|
|
506
|
+
|
|
507
|
+
type Row$1 = Record<string, any>;
|
|
508
|
+
/**
|
|
509
|
+
* A select's options from rows you already hold: one row per distinct value of
|
|
510
|
+
* the field, in first-seen order, and only values containing `search` when set.
|
|
511
|
+
*/
|
|
512
|
+
declare const optionsOf: (rows: Row$1[] | undefined, field: Dimension, search?: string) => DataResponse;
|
|
513
|
+
/**
|
|
514
|
+
* The dates a comparison period covers, worked out from the range it is
|
|
515
|
+
* compared with (a preset or dates), in the provider's time zone and with the
|
|
516
|
+
* provider's `defaults.comparisonPeriodsOptions`. `undefined` until both are set.
|
|
517
|
+
*/
|
|
518
|
+
declare const useComparisonRange: (range: TimeRange | undefined, period: string | undefined) => TimeRange | undefined;
|
|
519
|
+
|
|
520
|
+
type BarChartProOptionsClickArg = {
|
|
521
|
+
dimensionValue: string | number | undefined;
|
|
522
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
523
|
+
measureValues?: Record<string, unknown>;
|
|
524
|
+
};
|
|
525
|
+
type BarChartStackedProOptionsClickArg = BarChartProOptionsClickArg & {
|
|
526
|
+
groupingDimensionValue: string | undefined;
|
|
527
|
+
groupingDimensionTimeRange: TimeRange | undefined;
|
|
528
|
+
};
|
|
529
|
+
type BarChartStackedBaseProps = {
|
|
530
|
+
groupBy: Dimension;
|
|
531
|
+
measure: Measure;
|
|
532
|
+
results?: DataResponse;
|
|
533
|
+
resultsAxisOrder?: DataResponse;
|
|
534
|
+
axisOrder?: string[];
|
|
535
|
+
axisOrderCacheKey?: string;
|
|
536
|
+
setAxisOrderAndCacheKey?: (values: string[], cacheKey: string) => void;
|
|
537
|
+
resultsGroupOrder?: DataResponse;
|
|
538
|
+
resultsGroupOther?: DataResponse;
|
|
539
|
+
groupOrderCacheKey?: string;
|
|
540
|
+
setGroupOrderAndCacheKey?: (values: string[], cacheKey: string) => void;
|
|
541
|
+
showLegend?: boolean;
|
|
542
|
+
showLogarithmicScale?: boolean;
|
|
543
|
+
showTooltips?: boolean;
|
|
544
|
+
showTotalLabels?: boolean;
|
|
545
|
+
showValueLabels?: boolean;
|
|
546
|
+
xAxisLabel?: string;
|
|
547
|
+
yAxisLabel?: string;
|
|
548
|
+
granularity?: Granularity;
|
|
549
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
550
|
+
onBarClicked?: (args: BarChartStackedProOptionsClickArg) => void;
|
|
551
|
+
componentName?: string;
|
|
552
|
+
trackingId?: string;
|
|
553
|
+
} & ChartCardHeaderProps;
|
|
554
|
+
type BarChartBaseProps = {
|
|
555
|
+
dimension: Dimension;
|
|
556
|
+
measures: Measure[];
|
|
557
|
+
results: DataResponse;
|
|
558
|
+
showLegend?: boolean;
|
|
559
|
+
showLogarithmicScale?: boolean;
|
|
560
|
+
showTooltips?: boolean;
|
|
561
|
+
showValueLabels?: boolean;
|
|
562
|
+
xAxisLabel?: string;
|
|
563
|
+
yAxisLabel?: string;
|
|
564
|
+
granularity?: Granularity;
|
|
565
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
566
|
+
onBarClicked?: (args: BarChartProOptionsClickArg) => void;
|
|
567
|
+
componentName?: string;
|
|
568
|
+
trackingId?: string;
|
|
569
|
+
} & ChartCardHeaderProps;
|
|
570
|
+
|
|
571
|
+
type BarLineChartProClickArg = {
|
|
572
|
+
dimensionValue: string | undefined;
|
|
573
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
574
|
+
};
|
|
575
|
+
type BarLineChartProProps = {
|
|
576
|
+
dimension: Dimension;
|
|
577
|
+
measures: Measure[];
|
|
578
|
+
lineMeasures?: Measure[];
|
|
579
|
+
results: DataResponse;
|
|
580
|
+
showLegend?: boolean;
|
|
581
|
+
showLogarithmicScale?: boolean;
|
|
582
|
+
showTooltips?: boolean;
|
|
583
|
+
showValueLabels?: boolean;
|
|
584
|
+
showValueLabelsLine?: boolean;
|
|
585
|
+
xAxisLabel?: string;
|
|
586
|
+
yAxisLabel?: string;
|
|
587
|
+
yAxisRangeMin?: number;
|
|
588
|
+
yAxisRangeMax?: number;
|
|
589
|
+
reverseXAxis?: boolean;
|
|
590
|
+
xAxisMaxItems?: number;
|
|
591
|
+
yAxisSecondaryLabel?: string;
|
|
592
|
+
yAxisSecondaryMin?: number;
|
|
593
|
+
yAxisSecondaryMax?: number;
|
|
594
|
+
granularity?: Granularity;
|
|
595
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
596
|
+
onBarClicked?: (args: BarLineChartProClickArg) => void;
|
|
597
|
+
onLineClicked?: (args: BarLineChartProClickArg) => void;
|
|
598
|
+
componentName?: string;
|
|
599
|
+
trackingId?: string;
|
|
600
|
+
} & ChartCardHeaderProps;
|
|
601
|
+
|
|
602
|
+
type LineChartProOptionsClickArg = {
|
|
603
|
+
dimensionValue: string | number | undefined;
|
|
604
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
605
|
+
measureValue?: number;
|
|
606
|
+
measureValues?: Record<string, unknown>;
|
|
607
|
+
};
|
|
608
|
+
type LineChartGroupedProOptionsClickArg = {
|
|
609
|
+
dimensionValue: string | number | undefined;
|
|
610
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
611
|
+
groupingDimensionValue: string | boolean | undefined;
|
|
612
|
+
groupingDimensionTimeRange: TimeRange | undefined;
|
|
613
|
+
};
|
|
614
|
+
type AreaChartProPointClickArg = {
|
|
615
|
+
dimensionValue: string | number | undefined;
|
|
616
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
617
|
+
measureValue: number | undefined;
|
|
618
|
+
};
|
|
619
|
+
type AreaChartProAreaClickArg = {
|
|
620
|
+
groupingDimensionValue: string | boolean | undefined;
|
|
621
|
+
groupingDimensionTimeRange: TimeRange | undefined;
|
|
622
|
+
};
|
|
623
|
+
type LineChartProOptionsClick = (arg: LineChartProOptionsClickArg) => void;
|
|
624
|
+
|
|
625
|
+
type ScatterChartProOptionsClickArg = {
|
|
626
|
+
xMeasureValue: string;
|
|
627
|
+
yMeasureValue: string;
|
|
628
|
+
pointDimensionValue: string | undefined;
|
|
629
|
+
groupByDimensionValue: string | null | undefined;
|
|
630
|
+
pointDimensionTimeRange: TimeRange;
|
|
631
|
+
groupByDimensionTimeRange: TimeRange;
|
|
632
|
+
};
|
|
633
|
+
|
|
634
|
+
type BubbleChartProOptionsClickArg = ScatterChartProOptionsClickArg & {
|
|
635
|
+
sizeMeasureValue: string;
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
type HeatMapProOptionsClickArg = {
|
|
639
|
+
/** Raw string value of the row dimension for the clicked cell. */
|
|
640
|
+
rowDimensionValue: string | undefined;
|
|
641
|
+
/** Time range for the row dimension (populated when row is a time dimension). */
|
|
642
|
+
rowDimensionTimeRange: TimeRange | undefined;
|
|
643
|
+
/** Raw string value of the column dimension for the clicked cell. */
|
|
644
|
+
columnDimensionValue: string | undefined;
|
|
645
|
+
/** Time range for the column dimension (populated when column is a time dimension). */
|
|
646
|
+
columnDimensionTimeRange: TimeRange | undefined;
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
type TableChartPaginatedProOnRowClickArg = {
|
|
650
|
+
dimensionValue: string | null | undefined;
|
|
651
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
652
|
+
};
|
|
653
|
+
type TableChartPaginatedProState = {
|
|
654
|
+
page: number;
|
|
655
|
+
pageSize?: number;
|
|
656
|
+
sort?: {
|
|
657
|
+
id: string;
|
|
658
|
+
direction: OrderDirection;
|
|
659
|
+
} | undefined;
|
|
660
|
+
isLoadingDownloadData: boolean;
|
|
661
|
+
};
|
|
662
|
+
type TableChartPaginatedProProps = {
|
|
663
|
+
allResults?: DataResponse;
|
|
664
|
+
clickDimension?: Dimension;
|
|
665
|
+
dimensionsAndMeasures: DimensionOrMeasure[];
|
|
666
|
+
displayNullAs?: string;
|
|
667
|
+
results: DataResponse;
|
|
668
|
+
/** Rows on a page. Left out, the table shows as many rows as fit its height. */
|
|
669
|
+
pageSize?: number;
|
|
670
|
+
showIndex?: boolean;
|
|
671
|
+
state?: TableChartPaginatedProState;
|
|
672
|
+
totalResults?: DataResponse;
|
|
673
|
+
onRowClicked?: (rowDimensionValue: TableChartPaginatedProOnRowClickArg) => void;
|
|
674
|
+
setState?: React.Dispatch<React.SetStateAction<TableChartPaginatedProState>>;
|
|
675
|
+
componentName?: string;
|
|
676
|
+
trackingId?: string;
|
|
677
|
+
} & ChartCardHeaderProps;
|
|
678
|
+
|
|
679
|
+
declare const HEIGHT_MODES: {
|
|
680
|
+
readonly fixed: "fixed";
|
|
681
|
+
readonly auto: "auto";
|
|
682
|
+
};
|
|
683
|
+
type HeightMode = (typeof HEIGHT_MODES)[keyof typeof HEIGHT_MODES];
|
|
684
|
+
|
|
685
|
+
type TableScrollableProOnRowClickArg = {
|
|
686
|
+
dimensionValue: string | null | undefined;
|
|
687
|
+
dimensionTimeRange: TimeRange | undefined;
|
|
688
|
+
};
|
|
689
|
+
type TableScrollableProState = {
|
|
690
|
+
page: number;
|
|
691
|
+
pageSize?: number;
|
|
692
|
+
sort?: {
|
|
693
|
+
id: string;
|
|
694
|
+
direction: OrderDirection;
|
|
695
|
+
} | undefined;
|
|
696
|
+
isLoadingDownloadData: boolean;
|
|
697
|
+
heightMode?: HeightMode;
|
|
698
|
+
};
|
|
699
|
+
type TableScrollableProProps = {
|
|
700
|
+
dataset: Dataset;
|
|
701
|
+
allResults?: DataResponse;
|
|
702
|
+
clickDimension?: Dimension;
|
|
703
|
+
dimensionsAndMeasures: DimensionOrMeasure[];
|
|
704
|
+
displayNullAs?: string;
|
|
705
|
+
results: DataResponse;
|
|
706
|
+
showIndex?: boolean;
|
|
707
|
+
state?: TableScrollableProState;
|
|
708
|
+
onRowClicked?: (rowDimensionValue: TableScrollableProOnRowClickArg) => void;
|
|
709
|
+
setState?: React.Dispatch<React.SetStateAction<TableScrollableProState>>;
|
|
710
|
+
componentName?: string;
|
|
711
|
+
trackingId?: string;
|
|
712
|
+
} & ChartCardHeaderProps;
|
|
713
|
+
|
|
714
|
+
type BarChartDefaultProProps = BarChartBaseProps & {
|
|
715
|
+
reverseXAxis?: boolean;
|
|
716
|
+
xAxisMaxItems?: number;
|
|
717
|
+
yAxisRangeMin?: number;
|
|
718
|
+
yAxisRangeMax?: number;
|
|
719
|
+
componentName?: string;
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
type BarChartDefaultHorizontalProProps = BarChartBaseProps & {
|
|
723
|
+
reverseYAxis?: boolean;
|
|
724
|
+
xAxisRangeMax?: number;
|
|
725
|
+
xAxisRangeMin?: number;
|
|
726
|
+
yAxisMaxItems?: number;
|
|
727
|
+
};
|
|
728
|
+
|
|
729
|
+
type BarChartGroupedProProps = BarChartStackedBaseProps & {
|
|
730
|
+
xAxis: Dimension;
|
|
731
|
+
reverseXAxis?: boolean;
|
|
732
|
+
yAxisRangeMax?: number;
|
|
733
|
+
yAxisRangeMin?: number;
|
|
734
|
+
};
|
|
735
|
+
|
|
736
|
+
type BarChartGroupedHorizontalProProps = BarChartStackedBaseProps & {
|
|
737
|
+
yAxis: Dimension;
|
|
738
|
+
reverseYAxis?: boolean;
|
|
739
|
+
xAxisRangeMax?: number;
|
|
740
|
+
xAxisRangeMin?: number;
|
|
741
|
+
};
|
|
742
|
+
|
|
743
|
+
type BarChartStackedProProps = BarChartStackedBaseProps & {
|
|
744
|
+
xAxis: Dimension;
|
|
745
|
+
maxLegendItems?: number;
|
|
746
|
+
reverseXAxis?: boolean;
|
|
747
|
+
yAxisRangeMax?: number;
|
|
748
|
+
yAxisRangeMin?: number;
|
|
749
|
+
};
|
|
750
|
+
|
|
751
|
+
type BarChartStackedHorizontalProProps = BarChartStackedBaseProps & {
|
|
752
|
+
yAxis: Dimension;
|
|
753
|
+
reverseYAxis?: boolean;
|
|
754
|
+
xAxisRangeMax?: number;
|
|
755
|
+
xAxisRangeMin?: number;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
declare const PositionTypeOptions: {
|
|
759
|
+
readonly top: "top";
|
|
760
|
+
readonly middle: "middle";
|
|
761
|
+
readonly bottom: "bottom";
|
|
762
|
+
readonly none: "none";
|
|
763
|
+
};
|
|
764
|
+
type PositionValue = (typeof PositionTypeOptions)[keyof typeof PositionTypeOptions];
|
|
765
|
+
|
|
766
|
+
type FunnelChartProProps = {
|
|
767
|
+
sectionDimension: Dimension;
|
|
768
|
+
countMeasure: Measure;
|
|
769
|
+
orderDimension?: Dimension;
|
|
770
|
+
startColor?: string;
|
|
771
|
+
endColor?: string;
|
|
772
|
+
results: DataResponse;
|
|
773
|
+
showLegend?: boolean;
|
|
774
|
+
showTooltips?: boolean;
|
|
775
|
+
showValueLabels?: boolean;
|
|
776
|
+
showSectionLabels?: boolean;
|
|
777
|
+
displayPercentages?: boolean;
|
|
778
|
+
shrinkAnchor?: PositionValue;
|
|
779
|
+
shrinkFraction?: number;
|
|
780
|
+
} & ChartCardHeaderProps;
|
|
781
|
+
|
|
782
|
+
type LineChartProProps = {
|
|
783
|
+
xAxis: Dimension;
|
|
784
|
+
measures: Measure[];
|
|
785
|
+
results: DataResponse;
|
|
786
|
+
reverseXAxis?: boolean;
|
|
787
|
+
showLegend?: boolean;
|
|
788
|
+
showLogarithmicScale?: boolean;
|
|
789
|
+
showTooltips?: boolean;
|
|
790
|
+
showValueLabels?: boolean;
|
|
791
|
+
xAxisLabel?: string;
|
|
792
|
+
yAxisLabel?: string;
|
|
793
|
+
yAxisRangeMax?: number;
|
|
794
|
+
yAxisRangeMin?: number;
|
|
795
|
+
xAxisMaxItems?: number;
|
|
796
|
+
granularity?: Granularity;
|
|
797
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
798
|
+
onLineClicked?: LineChartProOptionsClick;
|
|
799
|
+
componentName?: string;
|
|
800
|
+
trackingId?: string;
|
|
801
|
+
} & ChartCardHeaderProps;
|
|
802
|
+
|
|
803
|
+
type LineChartGroupedProProp = {
|
|
804
|
+
xAxis: Dimension;
|
|
805
|
+
groupBy: Dimension;
|
|
806
|
+
measure: Measure;
|
|
807
|
+
results?: DataResponse;
|
|
808
|
+
resultsGroupOrder?: DataResponse;
|
|
809
|
+
resultsGroupOther?: DataResponse;
|
|
810
|
+
groupOrderCacheKey?: string;
|
|
811
|
+
setGroupOrderAndCacheKey?: (values: string[], cacheKey: string) => void;
|
|
812
|
+
xAxisMaxItems?: number;
|
|
813
|
+
reverseXAxis?: boolean;
|
|
814
|
+
showLegend?: boolean;
|
|
815
|
+
showLogarithmicScale?: boolean;
|
|
816
|
+
showTooltips?: boolean;
|
|
817
|
+
showValueLabels?: boolean;
|
|
818
|
+
xAxisLabel?: string;
|
|
819
|
+
yAxisLabel?: string;
|
|
820
|
+
yAxisRangeMax?: number;
|
|
821
|
+
yAxisRangeMin?: number;
|
|
822
|
+
granularity?: Granularity;
|
|
823
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
824
|
+
onLineClicked?: (arg: LineChartGroupedProOptionsClickArg) => void;
|
|
825
|
+
componentName?: string;
|
|
826
|
+
trackingId?: string;
|
|
827
|
+
} & ChartCardHeaderProps;
|
|
828
|
+
|
|
829
|
+
type LineChartComparisonDefaultProProps = {
|
|
830
|
+
xAxis: Dimension;
|
|
831
|
+
measures: Measure[];
|
|
832
|
+
results: DataResponse;
|
|
833
|
+
resultsComparison: DataResponse | undefined;
|
|
834
|
+
reverseXAxis?: boolean;
|
|
835
|
+
showLegend?: boolean;
|
|
836
|
+
showLogarithmicScale?: boolean;
|
|
837
|
+
showTooltips?: boolean;
|
|
838
|
+
showValueLabels?: boolean;
|
|
839
|
+
xAxisLabel?: string;
|
|
840
|
+
yAxisLabel?: string;
|
|
841
|
+
yAxisRangeMax?: number;
|
|
842
|
+
yAxisRangeMin?: number;
|
|
843
|
+
comparisonPeriod?: string;
|
|
844
|
+
comparisonDateRange: TimeRange;
|
|
845
|
+
showComparisonAxis?: boolean;
|
|
846
|
+
primaryDateRange: TimeRange;
|
|
847
|
+
granularity?: Granularity;
|
|
848
|
+
setGranularity?: (granularity: Granularity) => void;
|
|
849
|
+
setComparisonDateRange?: (dateRange: TimeRange) => void;
|
|
850
|
+
onLineClicked?: LineChartProOptionsClick;
|
|
851
|
+
componentName?: string;
|
|
852
|
+
trackingId?: string;
|
|
853
|
+
} & ChartCardHeaderProps;
|
|
854
|
+
|
|
855
|
+
type LineChartWithKpiTabsProProps = LineChartProProps & {
|
|
856
|
+
resultsKpis: DataResponse;
|
|
857
|
+
};
|
|
858
|
+
|
|
859
|
+
type LineChartComparisonWithKpiTabsProProps = LineChartComparisonDefaultProProps & {
|
|
860
|
+
resultsKpis: DataResponse;
|
|
861
|
+
resultsKpisComparison?: DataResponse;
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
type AreaChartProProps = Omit<LineChartGroupedProProp, 'onLineClicked'> & {
|
|
865
|
+
onPointClicked?: (arg: AreaChartProPointClickArg) => void;
|
|
866
|
+
onAreaClicked?: (arg: AreaChartProAreaClickArg) => void;
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
type PieChartProProps = DefaultPieChartProps;
|
|
870
|
+
|
|
871
|
+
type DonutChartProProps = DefaultPieChartProps;
|
|
872
|
+
|
|
873
|
+
type DonutLabelChartProProps = DefaultPieChartProps & {
|
|
874
|
+
innerLabelMeasure: Measure;
|
|
875
|
+
innerLabelText?: string;
|
|
876
|
+
resultsInnerLabel: DataResponse;
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
type ScatterChartProProps = {
|
|
880
|
+
xMeasure: Measure;
|
|
881
|
+
yMeasure: Measure;
|
|
882
|
+
pointDimension: Dimension;
|
|
883
|
+
groupByDimension?: Dimension;
|
|
884
|
+
results: DataResponse;
|
|
885
|
+
pointColor?: string;
|
|
886
|
+
showLegend?: boolean;
|
|
887
|
+
showTooltips?: boolean;
|
|
888
|
+
showPointLabels?: boolean;
|
|
889
|
+
showValueLabels?: boolean;
|
|
890
|
+
showLogarithmicScale?: boolean;
|
|
891
|
+
xAxisLabel?: string;
|
|
892
|
+
yAxisLabel?: string;
|
|
893
|
+
xAxisRangeMin?: number;
|
|
894
|
+
xAxisRangeMax?: number;
|
|
895
|
+
yAxisRangeMin?: number;
|
|
896
|
+
yAxisRangeMax?: number;
|
|
897
|
+
reverseXAxis?: boolean;
|
|
898
|
+
onPointClick?: (payload: ScatterChartProOptionsClickArg) => void;
|
|
899
|
+
componentName?: string;
|
|
900
|
+
trackingId?: string;
|
|
901
|
+
} & ChartCardHeaderProps;
|
|
902
|
+
|
|
903
|
+
type BubbleChartProProps = {
|
|
904
|
+
xMeasure: Measure;
|
|
905
|
+
yMeasure: Measure;
|
|
906
|
+
bubbleSizeMeasure: Measure;
|
|
907
|
+
pointDimension: Dimension;
|
|
908
|
+
groupByDimension?: Dimension;
|
|
909
|
+
results: DataResponse;
|
|
910
|
+
pointColor?: string;
|
|
911
|
+
showLegend?: boolean;
|
|
912
|
+
showTooltips?: boolean;
|
|
913
|
+
showPointLabels?: boolean;
|
|
914
|
+
showValueLabels?: boolean;
|
|
915
|
+
showLogarithmicScale?: boolean;
|
|
916
|
+
xAxisLabel?: string;
|
|
917
|
+
yAxisLabel?: string;
|
|
918
|
+
xAxisRangeMin?: number;
|
|
919
|
+
xAxisRangeMax?: number;
|
|
920
|
+
yAxisRangeMin?: number;
|
|
921
|
+
yAxisRangeMax?: number;
|
|
922
|
+
reverseXAxis?: boolean;
|
|
923
|
+
bubbleRadiusMin?: number;
|
|
924
|
+
bubbleRadiusMax?: number;
|
|
925
|
+
onPointClick?: (payload: BubbleChartProOptionsClickArg) => void;
|
|
926
|
+
componentName?: string;
|
|
927
|
+
trackingId?: string;
|
|
928
|
+
} & ChartCardHeaderProps;
|
|
929
|
+
|
|
930
|
+
type KpiChartNumberProProp = {
|
|
931
|
+
results: DataResponse;
|
|
932
|
+
measure: Measure;
|
|
933
|
+
fontSize?: number;
|
|
934
|
+
displayNullAs?: string;
|
|
935
|
+
} & ChartCardHeaderProps;
|
|
936
|
+
|
|
937
|
+
type KpiChartNumberComparisonProProp = {
|
|
938
|
+
changeFontSize?: number;
|
|
939
|
+
comparisonPeriod?: string;
|
|
940
|
+
displayChangeAsPercentage?: boolean;
|
|
941
|
+
fontSize?: number;
|
|
942
|
+
measure: Measure;
|
|
943
|
+
primaryDateRange: TimeRange;
|
|
944
|
+
results: DataResponse;
|
|
945
|
+
resultsComparison: DataResponse | undefined;
|
|
946
|
+
reversePositiveNegativeColors?: boolean;
|
|
947
|
+
reverseTrendDirection?: boolean;
|
|
948
|
+
percentageDecimalPlaces?: number;
|
|
949
|
+
comparisonDateRange: TimeRange;
|
|
950
|
+
displayNullAs?: string;
|
|
951
|
+
setComparisonDateRange?: (dateRange: TimeRange) => void;
|
|
952
|
+
} & ChartCardHeaderProps;
|
|
953
|
+
|
|
954
|
+
type HeatMapProProps = {
|
|
955
|
+
columnDimension: Dimension;
|
|
956
|
+
columnWidth?: number;
|
|
957
|
+
displayNullAs?: string;
|
|
958
|
+
firstColumnWidth?: number;
|
|
959
|
+
maxColor?: string;
|
|
960
|
+
maxThreshold?: string;
|
|
961
|
+
measure: Measure;
|
|
962
|
+
midColor?: string;
|
|
963
|
+
minColor?: string;
|
|
964
|
+
minThreshold?: string;
|
|
965
|
+
results: DataResponse;
|
|
966
|
+
rowDimension: Dimension;
|
|
967
|
+
showValues?: boolean;
|
|
968
|
+
onCellClicked?: (args: HeatMapProOptionsClickArg) => void;
|
|
969
|
+
componentName?: string;
|
|
970
|
+
trackingId?: string;
|
|
971
|
+
} & ChartCardHeaderProps;
|
|
972
|
+
|
|
973
|
+
type PivotTableProProps = {
|
|
974
|
+
results: DataResponse;
|
|
975
|
+
resultsSubRows?: DataResponse;
|
|
976
|
+
measures: Measure[];
|
|
977
|
+
rowDimension: Dimension;
|
|
978
|
+
subRowDimension?: Dimension;
|
|
979
|
+
columnDimension: Dimension;
|
|
980
|
+
displayNullAs?: string;
|
|
981
|
+
columnWidth?: number;
|
|
982
|
+
firstColumnWidth?: number;
|
|
983
|
+
expandedRowKeys?: string[];
|
|
984
|
+
setExpandedRowKey?: (expandedRowKeys: string) => void;
|
|
985
|
+
} & ChartCardHeaderProps;
|
|
986
|
+
|
|
987
|
+
type DateComparisonSelectFieldPro = {
|
|
988
|
+
placeholder?: string;
|
|
989
|
+
primaryDateRange?: TimeRange;
|
|
990
|
+
comparisonPeriod?: string;
|
|
991
|
+
componentName?: string;
|
|
992
|
+
trackingId?: string;
|
|
993
|
+
onChange: (newComparisonPeriod: string | undefined) => void;
|
|
994
|
+
} & EditorCardHeaderProps;
|
|
995
|
+
declare const DateComparisonSelectFieldPro: (props: DateComparisonSelectFieldPro) => react.JSX.Element | null;
|
|
996
|
+
|
|
997
|
+
type GranularitySelectFieldProProps = {
|
|
998
|
+
onChange: (newGranularity: Granularity) => void;
|
|
999
|
+
placeholder?: string;
|
|
1000
|
+
primaryTimeRange?: TimeRange;
|
|
1001
|
+
granularity?: Granularity;
|
|
1002
|
+
granularities?: Granularity[];
|
|
1003
|
+
clearable?: boolean;
|
|
1004
|
+
componentName?: string;
|
|
1005
|
+
trackingId?: string;
|
|
1006
|
+
} & EditorCardHeaderProps;
|
|
1007
|
+
|
|
1008
|
+
type MultiSelectFieldProProps = {
|
|
1009
|
+
dimension: Dimension;
|
|
1010
|
+
optionalSecondDimension?: Dimension;
|
|
1011
|
+
placeholder?: string;
|
|
1012
|
+
results: DataResponse;
|
|
1013
|
+
selectedValues?: string[];
|
|
1014
|
+
maxOptions?: number;
|
|
1015
|
+
showSelectAll?: boolean;
|
|
1016
|
+
autoApply?: boolean;
|
|
1017
|
+
clearable?: boolean;
|
|
1018
|
+
componentName?: string;
|
|
1019
|
+
trackingId?: string;
|
|
1020
|
+
setSearchValue?: (search: string) => void;
|
|
1021
|
+
onChange?: (newValues: string[]) => void;
|
|
1022
|
+
} & EditorCardHeaderProps;
|
|
1023
|
+
|
|
1024
|
+
type SingleSelectFieldProProps = {
|
|
1025
|
+
dimension: Dimension;
|
|
1026
|
+
optionalSecondDimension?: Dimension;
|
|
1027
|
+
placeholder?: string;
|
|
1028
|
+
results: DataResponse;
|
|
1029
|
+
selectedValue?: string;
|
|
1030
|
+
maxOptions?: number;
|
|
1031
|
+
clearable?: boolean;
|
|
1032
|
+
componentName?: string;
|
|
1033
|
+
trackingId?: string;
|
|
1034
|
+
setSearchValue?: (search: string) => void;
|
|
1035
|
+
onChange?: (selectedValue: string | undefined) => void;
|
|
1036
|
+
} & EditorCardHeaderProps;
|
|
1037
|
+
|
|
1038
|
+
type TextFieldProProps = {
|
|
1039
|
+
value?: string;
|
|
1040
|
+
placeholder?: string;
|
|
1041
|
+
componentName?: string;
|
|
1042
|
+
trackingId?: string;
|
|
1043
|
+
onChange?: (value: string) => void;
|
|
1044
|
+
} & EditorCardHeaderProps;
|
|
1045
|
+
|
|
1046
|
+
type DateRangePickerPresetsProps$1 = {
|
|
1047
|
+
onChange: (newDateRange: TimeRange) => void;
|
|
1048
|
+
placeholder?: string;
|
|
1049
|
+
selectedValue?: TimeRange;
|
|
1050
|
+
clearable?: boolean;
|
|
1051
|
+
showTwoMonths?: boolean;
|
|
1052
|
+
componentName?: string;
|
|
1053
|
+
trackingId?: string;
|
|
1054
|
+
} & EditorCardHeaderProps;
|
|
1055
|
+
|
|
1056
|
+
type DateRangePickerPresetsProps = {
|
|
1057
|
+
onChange: (newDateRange: TimeRange) => void;
|
|
1058
|
+
placeholder?: string;
|
|
1059
|
+
selectedValue?: TimeRange;
|
|
1060
|
+
clearable?: boolean;
|
|
1061
|
+
showCustomRangeOptions?: boolean;
|
|
1062
|
+
showTwoMonths?: boolean;
|
|
1063
|
+
componentName?: string;
|
|
1064
|
+
trackingId?: string;
|
|
1065
|
+
} & EditorCardHeaderProps;
|
|
1066
|
+
|
|
1067
|
+
type DimensionMeasureMultiSelectFieldProProps = {
|
|
1068
|
+
selectedDimensionsAndMeasures?: DimensionOrMeasure[];
|
|
1069
|
+
dimensionAndMeasureOptions?: DimensionOrMeasure[];
|
|
1070
|
+
placeholder?: string;
|
|
1071
|
+
clearable?: boolean;
|
|
1072
|
+
autoApply?: boolean;
|
|
1073
|
+
componentName?: string;
|
|
1074
|
+
trackingId?: string;
|
|
1075
|
+
onChange: (value: DimensionOrMeasure[]) => void;
|
|
1076
|
+
} & EditorCardHeaderProps;
|
|
1077
|
+
|
|
1078
|
+
type DimensionSingleSelectFieldProProps = {
|
|
1079
|
+
selectedDimension?: Dimension;
|
|
1080
|
+
dimensionOptions: Dimension[];
|
|
1081
|
+
placeholder?: string;
|
|
1082
|
+
clearable?: boolean;
|
|
1083
|
+
componentName?: string;
|
|
1084
|
+
trackingId?: string;
|
|
1085
|
+
onChange: (value: Dimension | undefined) => void;
|
|
1086
|
+
} & ChartCardHeaderProps;
|
|
1087
|
+
|
|
1088
|
+
type MeasureMultiSelectFieldProProps = {
|
|
1089
|
+
selectedMeasures?: Measure[];
|
|
1090
|
+
measureOptions?: Measure[];
|
|
1091
|
+
placeholder?: string;
|
|
1092
|
+
clearable?: boolean;
|
|
1093
|
+
autoApply?: boolean;
|
|
1094
|
+
componentName?: string;
|
|
1095
|
+
trackingId?: string;
|
|
1096
|
+
onChange: (value: Measure[]) => void;
|
|
1097
|
+
} & EditorCardHeaderProps;
|
|
1098
|
+
|
|
1099
|
+
type MeasureSingleSelectFieldProProps = {
|
|
1100
|
+
selectedMeasure?: Measure;
|
|
1101
|
+
measureOptions: Measure[];
|
|
1102
|
+
placeholder?: string;
|
|
1103
|
+
clearable?: boolean;
|
|
1104
|
+
componentName?: string;
|
|
1105
|
+
trackingId?: string;
|
|
1106
|
+
onChange: (value: Measure | undefined) => void;
|
|
1107
|
+
} & ChartCardHeaderProps;
|
|
1108
|
+
|
|
1109
|
+
type BarChartProps = BarChartDefaultProProps;
|
|
1110
|
+
declare const BarChart: {
|
|
1111
|
+
(props: BarChartDefaultProProps): react.JSX.Element;
|
|
1112
|
+
displayName: string;
|
|
1113
|
+
};
|
|
1114
|
+
type BarChartHorizontalProps = BarChartDefaultHorizontalProProps;
|
|
1115
|
+
declare const BarChartHorizontal: {
|
|
1116
|
+
(props: BarChartDefaultHorizontalProProps): react.JSX.Element;
|
|
1117
|
+
displayName: string;
|
|
1118
|
+
};
|
|
1119
|
+
type BarChartGroupedProps = BarChartGroupedProProps;
|
|
1120
|
+
declare const BarChartGrouped: {
|
|
1121
|
+
(props: BarChartGroupedProProps): react.JSX.Element;
|
|
1122
|
+
displayName: string;
|
|
1123
|
+
};
|
|
1124
|
+
type BarChartGroupedHorizontalProps = BarChartGroupedHorizontalProProps;
|
|
1125
|
+
declare const BarChartGroupedHorizontal: {
|
|
1126
|
+
(props: BarChartGroupedHorizontalProProps): react.JSX.Element;
|
|
1127
|
+
displayName: string;
|
|
1128
|
+
};
|
|
1129
|
+
type BarChartStackedProps = BarChartStackedProProps;
|
|
1130
|
+
declare const BarChartStacked: {
|
|
1131
|
+
(props: BarChartStackedProProps): react.JSX.Element;
|
|
1132
|
+
displayName: string;
|
|
1133
|
+
};
|
|
1134
|
+
type BarChartStackedHorizontalProps = BarChartStackedHorizontalProProps;
|
|
1135
|
+
declare const BarChartStackedHorizontal: {
|
|
1136
|
+
(props: BarChartStackedHorizontalProProps): react.JSX.Element;
|
|
1137
|
+
displayName: string;
|
|
1138
|
+
};
|
|
1139
|
+
type BarLineChartProps = BarLineChartProProps;
|
|
1140
|
+
declare const BarLineChart: {
|
|
1141
|
+
(props: BarLineChartProProps): react.JSX.Element;
|
|
1142
|
+
displayName: string;
|
|
1143
|
+
};
|
|
1144
|
+
type FunnelChartProps = FunnelChartProProps;
|
|
1145
|
+
declare const FunnelChart: {
|
|
1146
|
+
(props: FunnelChartProProps): react.JSX.Element;
|
|
1147
|
+
displayName: string;
|
|
1148
|
+
};
|
|
1149
|
+
type LineChartProps = LineChartProProps;
|
|
1150
|
+
declare const LineChart: {
|
|
1151
|
+
(props: LineChartProProps): react.JSX.Element;
|
|
1152
|
+
displayName: string;
|
|
1153
|
+
};
|
|
1154
|
+
type LineChartGroupedProps = LineChartGroupedProProp;
|
|
1155
|
+
declare const LineChartGrouped: {
|
|
1156
|
+
(props: LineChartGroupedProProp): react.JSX.Element;
|
|
1157
|
+
displayName: string;
|
|
1158
|
+
};
|
|
1159
|
+
type LineChartComparisonProps = LineChartComparisonDefaultProProps;
|
|
1160
|
+
declare const LineChartComparison: {
|
|
1161
|
+
(props: LineChartComparisonDefaultProProps): react.JSX.Element;
|
|
1162
|
+
displayName: string;
|
|
1163
|
+
};
|
|
1164
|
+
type LineChartWithKpiTabsProps = LineChartWithKpiTabsProProps;
|
|
1165
|
+
declare const LineChartWithKpiTabs: {
|
|
1166
|
+
(props: LineChartWithKpiTabsProProps): react.JSX.Element;
|
|
1167
|
+
displayName: string;
|
|
1168
|
+
};
|
|
1169
|
+
type LineChartComparisonWithKpiTabsProps = LineChartComparisonWithKpiTabsProProps;
|
|
1170
|
+
declare const LineChartComparisonWithKpiTabs: {
|
|
1171
|
+
(props: LineChartComparisonWithKpiTabsProProps): react.JSX.Element;
|
|
1172
|
+
displayName: string;
|
|
1173
|
+
};
|
|
1174
|
+
type AreaChartProps = AreaChartProProps;
|
|
1175
|
+
declare const AreaChart: {
|
|
1176
|
+
(props: AreaChartProProps): react.JSX.Element;
|
|
1177
|
+
displayName: string;
|
|
1178
|
+
};
|
|
1179
|
+
type PieChartProps = PieChartProProps;
|
|
1180
|
+
declare const PieChart: {
|
|
1181
|
+
(props: DefaultPieChartProps): react.JSX.Element;
|
|
1182
|
+
displayName: string;
|
|
1183
|
+
};
|
|
1184
|
+
type DonutChartProps = DonutChartProProps;
|
|
1185
|
+
declare const DonutChart: {
|
|
1186
|
+
(props: DefaultPieChartProps): react.JSX.Element;
|
|
1187
|
+
displayName: string;
|
|
1188
|
+
};
|
|
1189
|
+
type DonutLabelChartProps = DonutLabelChartProProps;
|
|
1190
|
+
declare const DonutLabelChart: {
|
|
1191
|
+
(props: DonutLabelChartProProps): react.JSX.Element;
|
|
1192
|
+
displayName: string;
|
|
1193
|
+
};
|
|
1194
|
+
type ScatterChartProps = ScatterChartProProps;
|
|
1195
|
+
declare const ScatterChart: {
|
|
1196
|
+
(props: ScatterChartProProps): react.JSX.Element;
|
|
1197
|
+
displayName: string;
|
|
1198
|
+
};
|
|
1199
|
+
type BubbleChartProps = BubbleChartProProps;
|
|
1200
|
+
declare const BubbleChart: {
|
|
1201
|
+
(props: BubbleChartProProps): react.JSX.Element;
|
|
1202
|
+
displayName: string;
|
|
1203
|
+
};
|
|
1204
|
+
type KpiNumberProps = KpiChartNumberProProp;
|
|
1205
|
+
declare const KpiNumber: {
|
|
1206
|
+
(props: KpiChartNumberProProp): react.JSX.Element;
|
|
1207
|
+
displayName: string;
|
|
1208
|
+
};
|
|
1209
|
+
type KpiNumberComparisonProps = KpiChartNumberComparisonProProp;
|
|
1210
|
+
declare const KpiNumberComparison: {
|
|
1211
|
+
(props: KpiChartNumberComparisonProProp): react.JSX.Element;
|
|
1212
|
+
displayName: string;
|
|
1213
|
+
};
|
|
1214
|
+
type HeatMapProps = HeatMapProProps;
|
|
1215
|
+
declare const HeatMap: {
|
|
1216
|
+
(props: HeatMapProProps): react.JSX.Element;
|
|
1217
|
+
displayName: string;
|
|
1218
|
+
};
|
|
1219
|
+
type PivotTableProps = PivotTableProProps;
|
|
1220
|
+
declare const PivotTable: {
|
|
1221
|
+
(props: PivotTableProProps): react.JSX.Element;
|
|
1222
|
+
displayName: string;
|
|
1223
|
+
};
|
|
1224
|
+
type TablePaginatedProps = TableChartPaginatedProProps;
|
|
1225
|
+
declare const TablePaginated: {
|
|
1226
|
+
(props: TableChartPaginatedProProps): react.JSX.Element;
|
|
1227
|
+
displayName: string;
|
|
1228
|
+
};
|
|
1229
|
+
type ComparisonPeriodSelectProps = DateComparisonSelectFieldPro;
|
|
1230
|
+
declare const ComparisonPeriodSelect: {
|
|
1231
|
+
(props: DateComparisonSelectFieldPro): react.JSX.Element;
|
|
1232
|
+
displayName: string;
|
|
1233
|
+
};
|
|
1234
|
+
type GranularitySelectProps = GranularitySelectFieldProProps;
|
|
1235
|
+
declare const GranularitySelect: {
|
|
1236
|
+
(props: GranularitySelectFieldProProps): react.JSX.Element;
|
|
1237
|
+
displayName: string;
|
|
1238
|
+
};
|
|
1239
|
+
type MultiSelectProps = MultiSelectFieldProProps;
|
|
1240
|
+
declare const MultiSelect: {
|
|
1241
|
+
(props: MultiSelectFieldProProps): react.JSX.Element;
|
|
1242
|
+
displayName: string;
|
|
1243
|
+
};
|
|
1244
|
+
type SingleSelectProps = SingleSelectFieldProProps;
|
|
1245
|
+
declare const SingleSelect: {
|
|
1246
|
+
(props: SingleSelectFieldProProps): react.JSX.Element;
|
|
1247
|
+
displayName: string;
|
|
1248
|
+
};
|
|
1249
|
+
type TextFieldProps = TextFieldProProps;
|
|
1250
|
+
declare const TextField: {
|
|
1251
|
+
(props: TextFieldProProps): react.JSX.Element;
|
|
1252
|
+
displayName: string;
|
|
1253
|
+
};
|
|
1254
|
+
type DateRangePickerCustomProps = DateRangePickerPresetsProps$1;
|
|
1255
|
+
declare const DateRangePickerCustom: {
|
|
1256
|
+
(props: DateRangePickerPresetsProps$1): react.JSX.Element;
|
|
1257
|
+
displayName: string;
|
|
1258
|
+
};
|
|
1259
|
+
type DateRangePickerProps = DateRangePickerPresetsProps;
|
|
1260
|
+
declare const DateRangePicker: {
|
|
1261
|
+
(props: DateRangePickerPresetsProps): react.JSX.Element;
|
|
1262
|
+
displayName: string;
|
|
1263
|
+
};
|
|
1264
|
+
type DimensionOrMeasureMultiSelectProps = DimensionMeasureMultiSelectFieldProProps;
|
|
1265
|
+
declare const DimensionOrMeasureMultiSelect: {
|
|
1266
|
+
(props: DimensionMeasureMultiSelectFieldProProps): react.JSX.Element;
|
|
1267
|
+
displayName: string;
|
|
1268
|
+
};
|
|
1269
|
+
type DimensionSelectProps = DimensionSingleSelectFieldProProps;
|
|
1270
|
+
declare const DimensionSelect: {
|
|
1271
|
+
(props: DimensionSingleSelectFieldProProps): react.JSX.Element;
|
|
1272
|
+
displayName: string;
|
|
1273
|
+
};
|
|
1274
|
+
type MeasureMultiSelectProps = MeasureMultiSelectFieldProProps;
|
|
1275
|
+
declare const MeasureMultiSelect: {
|
|
1276
|
+
(props: MeasureMultiSelectFieldProProps): react.JSX.Element;
|
|
1277
|
+
displayName: string;
|
|
1278
|
+
};
|
|
1279
|
+
type MeasureSelectProps = MeasureSingleSelectFieldProProps;
|
|
1280
|
+
declare const MeasureSelect: {
|
|
1281
|
+
(props: MeasureSingleSelectFieldProProps): react.JSX.Element;
|
|
1282
|
+
displayName: string;
|
|
1283
|
+
};
|
|
1284
|
+
|
|
1285
|
+
declare const TABLE_SCROLLABLE_SIZE = 50;
|
|
1286
|
+
|
|
1287
|
+
type TableScrollableProps = Omit<TableScrollableProProps, 'dataset'> & {
|
|
1288
|
+
resetKey?: unknown;
|
|
1289
|
+
heightMode?: HeightMode;
|
|
1290
|
+
};
|
|
1291
|
+
declare const TableScrollable: ({ resetKey, heightMode, ...props }: TableScrollableProps) => react.JSX.Element;
|
|
1292
|
+
|
|
1293
|
+
type FilterBuilderFilter = {
|
|
1294
|
+
id: number;
|
|
1295
|
+
dimensionOrMeasure: DimensionOrMeasure | null;
|
|
1296
|
+
search: string;
|
|
1297
|
+
value: string | string[] | number | number[] | boolean | null;
|
|
1298
|
+
operator: string | null;
|
|
1299
|
+
};
|
|
1300
|
+
declare const filterBuilderAndOrOperator: {
|
|
1301
|
+
AND: string;
|
|
1302
|
+
OR: string;
|
|
1303
|
+
};
|
|
1304
|
+
type FilterBuilderAndOrOperator = (typeof filterBuilderAndOrOperator)[keyof typeof filterBuilderAndOrOperator];
|
|
1305
|
+
type FilterBuilderClause = {
|
|
1306
|
+
property: string;
|
|
1307
|
+
operator: FilterOperator;
|
|
1308
|
+
value: FilterBuilderFilter['value'];
|
|
1309
|
+
} | {
|
|
1310
|
+
operator: FilterBuilderAndOrOperator;
|
|
1311
|
+
clauses: FilterBuilderClause[];
|
|
1312
|
+
};
|
|
1313
|
+
|
|
1314
|
+
type FilterBuilderState = {
|
|
1315
|
+
filters: FilterBuilderFilter[];
|
|
1316
|
+
operator: FilterBuilderAndOrOperator;
|
|
1317
|
+
};
|
|
1318
|
+
|
|
1319
|
+
type FilterBuilderProProps = {
|
|
1320
|
+
embeddableState?: FilterBuilderState;
|
|
1321
|
+
setEmbeddableState?: (state: FilterBuilderState | ((prev: FilterBuilderState) => FilterBuilderState)) => void;
|
|
1322
|
+
dimensionsAndMeasures?: DimensionOrMeasure[];
|
|
1323
|
+
onChange?: (value: unknown) => void;
|
|
1324
|
+
defaultFilters?: FilterBuilderClause;
|
|
1325
|
+
syncDefaultFilters?: boolean;
|
|
1326
|
+
componentName?: string;
|
|
1327
|
+
trackingId?: string;
|
|
1328
|
+
} & EditorCardHeaderProps;
|
|
1329
|
+
|
|
1330
|
+
type FilterBuilderGroup = {
|
|
1331
|
+
id: number;
|
|
1332
|
+
operator: FilterBuilderAndOrOperator;
|
|
1333
|
+
filters: FilterBuilderFilter[];
|
|
1334
|
+
};
|
|
1335
|
+
type FilterBuilderNode = FilterBuilderFilter | FilterBuilderGroup;
|
|
1336
|
+
type FilterBuilderGroupingState = {
|
|
1337
|
+
items?: FilterBuilderNode[];
|
|
1338
|
+
filters?: FilterBuilderFilter[];
|
|
1339
|
+
operator: FilterBuilderAndOrOperator;
|
|
1340
|
+
};
|
|
1341
|
+
|
|
1342
|
+
type FilterBuilderWithGroupingProProps = {
|
|
1343
|
+
embeddableState?: FilterBuilderGroupingState;
|
|
1344
|
+
setEmbeddableState?: (state: FilterBuilderGroupingState | ((prev: FilterBuilderGroupingState) => FilterBuilderGroupingState)) => void;
|
|
1345
|
+
dimensionsAndMeasures?: DimensionOrMeasure[];
|
|
1346
|
+
onChange?: (value: unknown) => void;
|
|
1347
|
+
defaultFilters?: FilterBuilderClause;
|
|
1348
|
+
syncDefaultFilters?: boolean;
|
|
1349
|
+
componentName?: string;
|
|
1350
|
+
trackingId?: string;
|
|
1351
|
+
} & EditorCardHeaderProps;
|
|
1352
|
+
|
|
1353
|
+
type Row = Record<string, any>;
|
|
1354
|
+
/**
|
|
1355
|
+
* The values a filter on `field` can pick from: rows holding `field.name`,
|
|
1356
|
+
* matching `search` when it is set. `otherFilters` are the reader's other
|
|
1357
|
+
* filters, for options that narrow as the reader filters.
|
|
1358
|
+
*/
|
|
1359
|
+
type LoadFilterOptions = (field: Dimension, search: string, otherFilters: FilterBuilderClause | null) => Record<string, unknown>[] | Promise<Record<string, unknown>[]>;
|
|
1360
|
+
type WrapperProps = {
|
|
1361
|
+
/** The filters the builder starts with. With `syncDefaultFilters`, later changes replace the reader's. */
|
|
1362
|
+
value?: FilterBuilderClause | null;
|
|
1363
|
+
/** Called with the filters as a clause tree, or `null` when there are none. */
|
|
1364
|
+
onChange?: (value: FilterBuilderClause | null) => void;
|
|
1365
|
+
loadOptions?: LoadFilterOptions;
|
|
1366
|
+
};
|
|
1367
|
+
type Internal = 'embeddableState' | 'setEmbeddableState' | 'defaultFilters' | 'onChange' | 'componentName';
|
|
1368
|
+
type FilterBuilderProps = Omit<FilterBuilderProProps, Internal> & WrapperProps;
|
|
1369
|
+
type FilterBuilderWithGroupingProps = Omit<FilterBuilderWithGroupingProProps, Internal> & WrapperProps;
|
|
1370
|
+
declare const FilterBuilder: ({ value, onChange, loadOptions, ...props }: FilterBuilderProps) => react.JSX.Element;
|
|
1371
|
+
declare const FilterBuilderWithGrouping: ({ value, onChange, loadOptions, ...props }: FilterBuilderWithGroupingProps) => react.JSX.Element;
|
|
1372
|
+
/** The rows a filter builder's clause keeps, for data held in memory. A `null` clause keeps every row. */
|
|
1373
|
+
declare const applyFilters: <T extends Row>(rows: T[], clause: FilterBuilderClause | null | undefined) => T[];
|
|
1374
|
+
|
|
1375
|
+
export { AreaChart, BarChart, BarChartGrouped, BarChartGroupedHorizontal, BarChartHorizontal, BarChartStacked, BarChartStackedHorizontal, BarLineChart, BubbleChart, CHART_KINDS, ChartFromSpec, ChartsProvider, ComparisonPeriodSelect, DataResponse, DateRangePicker, DateRangePickerCustom, Dimension, DimensionOrMeasure, DimensionOrMeasureMultiSelect, DimensionSelect, DonutChart, DonutLabelChart, FilterBuilder, FilterBuilderWithGrouping, FunnelChart, Granularity, GranularitySelect, HeatMap, KpiNumber, KpiNumberComparison, LineChart, LineChartComparison, LineChartComparisonWithKpiTabs, LineChartGrouped, LineChartWithKpiTabs, Measure, MeasureMultiSelect, MeasureSelect, MultiSelect, PieChart, PivotTable, ScatterChart, SingleSelect, TABLE_SCROLLABLE_SIZE, TablePaginated, TableScrollable, TextField, Theme, TimeRange, applyFilters, dateRangePreset, remarkableTheme as defaultTheme, dimension, intentToPrompt, isChartKind, measure, optionsOf, results, useComparisonRange };
|
|
1376
|
+
export type { AreaChartProAreaClickArg as AreaChartAreaClickArg, AreaChartProPointClickArg as AreaChartPointClickArg, AreaChartProps, AreaSpec, BarChartGroupedHorizontalProps, BarChartGroupedProps, BarChartHorizontalProps, BarChartProOptionsClickArg as BarChartOptionsClickArg, BarChartProps, BarChartStackedHorizontalProps, BarChartStackedProOptionsClickArg as BarChartStackedOptionsClickArg, BarChartStackedProps, BarGroupedSpec, BarLineChartProClickArg as BarLineChartClickArg, BarLineChartProps, BarLineSpec, BarSpec, BubbleChartProOptionsClickArg as BubbleChartOptionsClickArg, BubbleChartProps, BubbleSpec, ChartFromSpecProps, ChartIntent, ChartIntentType, ChartKind, ChartSpec, ChartsProviderProps, ComparisonPeriodSelectProps, DateRangePickerCustomProps, DateRangePickerProps, DateRangeSpec, DimensionOrMeasureMultiSelectProps, DimensionSelectProps, DonutChartProps, DonutLabelChartProps, FieldInputs, FieldRef, FilterBuilderClause, FilterBuilderProps, FilterBuilderWithGroupingProps, FunnelChartProps, GranularitySelectProps, HeatMapProOptionsClickArg as HeatMapOptionsClickArg, HeatMapProps, HeatMapSpec, KpiComparisonSpec, KpiNumberComparisonProps, KpiNumberProps, KpiSpec, LineChartComparisonProps, LineChartComparisonWithKpiTabsProps, LineChartGroupedProOptionsClickArg as LineChartGroupedOptionsClickArg, LineChartGroupedProps, LineChartProOptionsClickArg as LineChartOptionsClickArg, LineChartProps, LineChartWithKpiTabsProps, LineGroupedSpec, LineSpec, LoadFilterOptions, MeasureMultiSelectProps, MeasureSelectProps, MultiSelectProps, PieChartClickArg, PieChartProps, PieSpec, PivotSpec, PivotTableProps, ScatterChartProOptionsClickArg as ScatterChartOptionsClickArg, ScatterChartProps, ScatterSpec, SingleSelectProps, SpecField, SpecFieldFormat, SpecRow, TableChartPaginatedProOnRowClickArg as TablePaginatedOnRowClickArg, TablePaginatedProps, TableChartPaginatedProState as TablePaginatedState, TableScrollableProOnRowClickArg as TableScrollableOnRowClickArg, TableScrollableProps, TableScrollableProState as TableScrollableState, TableSpec, TextFieldProps };
|