react-semaphor 0.0.3932 → 0.0.5321
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/dist/chunks/dashboard-plus-Bhud1IPW.js +375 -0
- package/dist/chunks/dashboard-plus-CNVP0HeC.js +13427 -0
- package/dist/chunks/index-By9l1g-q.js +638 -0
- package/dist/chunks/index-DORmhDA9.js +81778 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +4 -2
- package/dist/index.cjs +1 -257
- package/dist/index.js +55 -6449
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -1
- package/dist/types/dashboard.d.ts +493 -2
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +8 -1
- package/dist/types/main.d.ts +873 -27
- package/dist/types/surfboard.d.ts +493 -2
- package/dist/types/types.d.ts +493 -2
- package/package.json +16 -8
- package/dist/chunks/index-BEZAy8Jv.js +0 -384
- package/dist/chunks/index-CanpZidr.js +0 -60482
package/dist/types/types.d.ts
CHANGED
|
@@ -2,6 +2,12 @@ import { FontSpec } from 'chart.js';
|
|
|
2
2
|
|
|
3
3
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
4
4
|
|
|
5
|
+
declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
|
|
6
|
+
|
|
7
|
+
declare type AIContext = {
|
|
8
|
+
selectedEntities: SelectedEntities;
|
|
9
|
+
};
|
|
10
|
+
|
|
5
11
|
export declare type AIScopeTable = {
|
|
6
12
|
connectionId: string;
|
|
7
13
|
connectionType: string;
|
|
@@ -12,11 +18,21 @@ export declare type AIScopeTable = {
|
|
|
12
18
|
datamodelName: string;
|
|
13
19
|
};
|
|
14
20
|
|
|
21
|
+
export declare type AssistantId = 'dashboard-assistant' | 'editor-assistant';
|
|
22
|
+
|
|
15
23
|
export declare type AuthToken = {
|
|
16
24
|
accessToken: string;
|
|
17
25
|
refreshToken?: string;
|
|
18
26
|
};
|
|
19
27
|
|
|
28
|
+
declare interface BaseColumn {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
type: ColumnType;
|
|
33
|
+
table?: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
20
36
|
declare type BaseCustomCard = {
|
|
21
37
|
cardId: string;
|
|
22
38
|
replaceDefault?: boolean;
|
|
@@ -37,6 +53,49 @@ export declare type CacheConfig = {
|
|
|
37
53
|
status: 'on' | 'on-refresh' | 'off';
|
|
38
54
|
};
|
|
39
55
|
|
|
56
|
+
declare interface CardConfig {
|
|
57
|
+
groupByColumns?: GroupByField[];
|
|
58
|
+
metricColumns?: MetricField[];
|
|
59
|
+
pivotByColumns?: PivotByField[];
|
|
60
|
+
sortByColumns?: SortByField[];
|
|
61
|
+
filters?: FilterGroup;
|
|
62
|
+
joinPlan?: JoinPlan;
|
|
63
|
+
rowLimit?: number;
|
|
64
|
+
/**
|
|
65
|
+
* One or more hierarchies that define drillable paths through dimensions.
|
|
66
|
+
*/
|
|
67
|
+
drillHierarchies?: DrillHierarchy[];
|
|
68
|
+
/**
|
|
69
|
+
* Optional list of dimensions allowed for dynamic drill-down across this card.
|
|
70
|
+
* Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
|
|
71
|
+
*/
|
|
72
|
+
allowedDrillTargets?: Field[];
|
|
73
|
+
/**
|
|
74
|
+
* NOT UOptional preload settings for inline drill previews
|
|
75
|
+
*/
|
|
76
|
+
inlineDrillPreview?: {
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
limit: number;
|
|
79
|
+
mode: 'lazy' | 'preloaded';
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Configuration for on-click dashboard filters triggered by this card.
|
|
83
|
+
*/
|
|
84
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
85
|
+
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
|
|
86
|
+
targetValue?: number;
|
|
87
|
+
showTrendline?: boolean;
|
|
88
|
+
trendlineWindow?: number;
|
|
89
|
+
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare interface CardInteractionConfig {
|
|
93
|
+
allowedDrillTargets?: Field[];
|
|
94
|
+
drillHierarchies?: DrillHierarchy[];
|
|
95
|
+
drillInteractions?: DrillInteraction[];
|
|
96
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
97
|
+
}
|
|
98
|
+
|
|
40
99
|
declare type CardWithContent = BaseCustomCard & {
|
|
41
100
|
content: React.FC<{
|
|
42
101
|
card: TCard;
|
|
@@ -55,20 +114,89 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
55
114
|
}>;
|
|
56
115
|
};
|
|
57
116
|
|
|
117
|
+
declare interface ClickFilterInteraction {
|
|
118
|
+
mode: 'clickFilter';
|
|
119
|
+
/**
|
|
120
|
+
* Fields from the chart element that should be used as filters.
|
|
121
|
+
* e.g., [region, ship_mode] from a stacked bar chart
|
|
122
|
+
*/
|
|
123
|
+
filterFields: Field[];
|
|
124
|
+
/**
|
|
125
|
+
* Should this card visually highlight when clicked?
|
|
126
|
+
*/
|
|
127
|
+
highlightSelf?: boolean;
|
|
128
|
+
/**
|
|
129
|
+
* Cards this filter applies to (inclusive).
|
|
130
|
+
* If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
|
|
131
|
+
*/
|
|
132
|
+
applyToCardIds?: string[];
|
|
133
|
+
/**
|
|
134
|
+
* Cards to explicitly exclude from receiving this filter.
|
|
135
|
+
* Takes effect only if `applyToCardIds` is undefined (acts as override).
|
|
136
|
+
*/
|
|
137
|
+
excludeCardIds?: string[];
|
|
138
|
+
/**
|
|
139
|
+
* Optional UI label or tooltip.
|
|
140
|
+
*/
|
|
141
|
+
label?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
58
144
|
export declare type ColorRange = {
|
|
59
145
|
start: number;
|
|
60
146
|
end: number;
|
|
61
147
|
color: string;
|
|
62
148
|
};
|
|
63
149
|
|
|
150
|
+
declare interface ColorRange_2 {
|
|
151
|
+
min: number;
|
|
152
|
+
max: number;
|
|
153
|
+
color: string;
|
|
154
|
+
applyTo: 'cell' | 'row';
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare interface ColumnSettings {
|
|
158
|
+
type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
|
|
159
|
+
textAlign: 'left' | 'center' | 'right';
|
|
160
|
+
width: string;
|
|
161
|
+
textWrap: 'wrap' | 'nowrap';
|
|
162
|
+
numberFormat: {
|
|
163
|
+
style: 'decimal' | 'currency' | 'percent';
|
|
164
|
+
currency: string;
|
|
165
|
+
locale: string;
|
|
166
|
+
minimumFractionDigits: number;
|
|
167
|
+
maximumFractionDigits: number;
|
|
168
|
+
showDataBar: boolean;
|
|
169
|
+
dataBarColor: string;
|
|
170
|
+
dataBarMinValue?: number;
|
|
171
|
+
dataBarMaxValue?: number;
|
|
172
|
+
};
|
|
173
|
+
dateFormat: {
|
|
174
|
+
format: string;
|
|
175
|
+
useCustomFormat: boolean;
|
|
176
|
+
customFormat: string;
|
|
177
|
+
useRelativeTime: boolean;
|
|
178
|
+
};
|
|
179
|
+
colorRanges: ColorRange_2[];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare type ColumnSettingsMap = Record<string, ColumnSettings>;
|
|
183
|
+
|
|
184
|
+
declare type ColumnType = 'string' | 'number' | 'date';
|
|
185
|
+
|
|
64
186
|
export declare type ConnectionPolicy = {
|
|
65
187
|
connectionId?: string;
|
|
66
188
|
name: string;
|
|
67
189
|
params: Params;
|
|
68
190
|
};
|
|
69
191
|
|
|
192
|
+
declare type ConnectionType = 'GoogleSheets' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'S3Tables' | 'API' | 'none';
|
|
193
|
+
|
|
70
194
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
71
195
|
|
|
196
|
+
export declare type DashboardEventHandlers = {
|
|
197
|
+
onExportData?: (payload: ExportDataPayload) => void;
|
|
198
|
+
};
|
|
199
|
+
|
|
72
200
|
export declare type DashboardProps = {
|
|
73
201
|
id?: string;
|
|
74
202
|
/**
|
|
@@ -93,6 +221,7 @@ export declare type DashboardProps = {
|
|
|
93
221
|
onFilterValuesChange?: (filterValues: TFilterValue[]) => void;
|
|
94
222
|
LoadingComponent?: (props: LoadingProps) => React.ReactNode;
|
|
95
223
|
ErrorComponent?: (props: ErrorProps) => React.ReactNode;
|
|
224
|
+
eventHandlers?: DashboardEventHandlers;
|
|
96
225
|
/**
|
|
97
226
|
* Placeholders for the dashboard.
|
|
98
227
|
*/
|
|
@@ -103,18 +232,181 @@ export declare type DashboardProps = {
|
|
|
103
232
|
selectedSheetId?: string;
|
|
104
233
|
};
|
|
105
234
|
|
|
235
|
+
declare interface DatabaseEntityReference {
|
|
236
|
+
connectionId: string;
|
|
237
|
+
connectionType: ConnectionType;
|
|
238
|
+
type: EntityType;
|
|
239
|
+
dialect?: Dialect;
|
|
240
|
+
database?: string;
|
|
241
|
+
schema?: string;
|
|
242
|
+
name: string;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
declare type DatabaseEntityType = 'table' | 'view';
|
|
246
|
+
|
|
247
|
+
declare interface DataModelEntityReference extends DatabaseEntityReference {
|
|
248
|
+
type: 'model';
|
|
249
|
+
id: string;
|
|
250
|
+
label: string;
|
|
251
|
+
description: string;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
declare interface DataSource {
|
|
255
|
+
connectionId: string;
|
|
256
|
+
semanticDomainId?: string;
|
|
257
|
+
connectionType: string;
|
|
258
|
+
mode: 'database' | 'upload' | 'url' | 'semanticDomain';
|
|
259
|
+
dbSelection?: {
|
|
260
|
+
database: string;
|
|
261
|
+
schema: string;
|
|
262
|
+
entityType: DatabaseEntityType;
|
|
263
|
+
};
|
|
264
|
+
selectedEntities: SelectedEntities;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
declare const DATE_FORMAT_VALUES: readonly ["MM-DD-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
268
|
+
|
|
269
|
+
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
270
|
+
|
|
106
271
|
export declare type DateOptions = {
|
|
107
272
|
locale: string;
|
|
108
273
|
format: string;
|
|
109
274
|
options: Intl.DateTimeFormatOptions;
|
|
110
275
|
};
|
|
111
276
|
|
|
277
|
+
declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
|
|
278
|
+
|
|
112
279
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
113
280
|
|
|
281
|
+
declare interface DrillHierarchy {
|
|
282
|
+
id: string;
|
|
283
|
+
label?: string;
|
|
284
|
+
type: 'static';
|
|
285
|
+
steps: DrillHierarchyStep[];
|
|
286
|
+
default?: boolean;
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare interface DrillHierarchyStep {
|
|
290
|
+
field: Field;
|
|
291
|
+
mode: 'drillDown';
|
|
292
|
+
preferredChartType?: TChartType;
|
|
293
|
+
breadcrumbLabelTemplate?: string;
|
|
294
|
+
retainFilters?: boolean;
|
|
295
|
+
label?: string;
|
|
296
|
+
linkedInsightId?: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
300
|
+
|
|
301
|
+
declare interface DrillThroughInteraction {
|
|
302
|
+
mode: 'drillThrough';
|
|
303
|
+
filterFields: Field[];
|
|
304
|
+
targetSheetId: string;
|
|
305
|
+
label?: string;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
declare interface DrillToDetailInteraction {
|
|
309
|
+
mode: 'drillToDetail';
|
|
310
|
+
filterFields: Field[];
|
|
311
|
+
detailFields?: Field[];
|
|
312
|
+
sortBy?: SortByField[];
|
|
313
|
+
limit?: number;
|
|
314
|
+
detailTitle?: string;
|
|
315
|
+
label?: string;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
declare interface DrillToURLInteraction {
|
|
319
|
+
mode: 'drillToURL';
|
|
320
|
+
filterFields: Field[];
|
|
321
|
+
urlTemplate: string;
|
|
322
|
+
label?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
326
|
+
|
|
327
|
+
export declare type EmailSettings = {
|
|
328
|
+
companyName: string;
|
|
329
|
+
dashboardUrl: string;
|
|
330
|
+
supportEmail: string;
|
|
331
|
+
senderTitle: string;
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
export declare const EMPTY_SELECTION: SelectionState;
|
|
335
|
+
|
|
336
|
+
declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
337
|
+
|
|
114
338
|
export declare type ErrorProps = {
|
|
115
339
|
message?: string;
|
|
116
340
|
};
|
|
117
341
|
|
|
342
|
+
export declare type ExportDataPayload = {
|
|
343
|
+
cardId: string;
|
|
344
|
+
title: string;
|
|
345
|
+
data: Record<string, any>[];
|
|
346
|
+
sql: string;
|
|
347
|
+
};
|
|
348
|
+
|
|
349
|
+
declare interface Field {
|
|
350
|
+
/**
|
|
351
|
+
* Unique identifier for this field instance (for joins, UI state, etc.).
|
|
352
|
+
* Should be unique within the context of the query or data model.
|
|
353
|
+
* Example: 'orders.customer_id', 'expr_12345', etc.
|
|
354
|
+
*/
|
|
355
|
+
id: string;
|
|
356
|
+
/**
|
|
357
|
+
* The physical/source column name in the database or data source.
|
|
358
|
+
* Used for mapping to the underlying data model and SQL generation (unless overridden by expression).
|
|
359
|
+
*/
|
|
360
|
+
name: string;
|
|
361
|
+
/**
|
|
362
|
+
* Human-friendly, localizable display name for the UI (table headers, chart axes, etc.).
|
|
363
|
+
*/
|
|
364
|
+
label: string;
|
|
365
|
+
/**
|
|
366
|
+
* Unique, stable, machine-friendly reference name for SQL (AS alias), exports, and scripting.
|
|
367
|
+
* If not provided, should be auto-generated from label or name.
|
|
368
|
+
*/
|
|
369
|
+
alias?: string;
|
|
370
|
+
dataType: string;
|
|
371
|
+
description?: string;
|
|
372
|
+
qualifiedEntityName?: string;
|
|
373
|
+
dateFormat?: DateFormatValue;
|
|
374
|
+
customFormat?: string;
|
|
375
|
+
granularity?: TimeGranularity;
|
|
376
|
+
entityId: string;
|
|
377
|
+
entityName: string;
|
|
378
|
+
entityType: EntityType;
|
|
379
|
+
role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
declare interface FileEntityReference extends DatabaseEntityReference {
|
|
383
|
+
id: string;
|
|
384
|
+
type: 'file' | 'url' | 'upload';
|
|
385
|
+
label: string;
|
|
386
|
+
description: string;
|
|
387
|
+
originalName: string;
|
|
388
|
+
file?: File;
|
|
389
|
+
url?: string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
declare interface FilterByColumn extends BaseColumn {
|
|
393
|
+
role: 'filter';
|
|
394
|
+
operators?: string[];
|
|
395
|
+
mode?: 'include' | 'exclude';
|
|
396
|
+
sql?: string;
|
|
397
|
+
fetchValues?: boolean;
|
|
398
|
+
fetchLimit?: number;
|
|
399
|
+
valueSource?: 'distinct' | 'static' | 'range';
|
|
400
|
+
staticValues?: string[];
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
declare interface FilterCondition {
|
|
404
|
+
id: string;
|
|
405
|
+
field: Field;
|
|
406
|
+
operator: Operator;
|
|
407
|
+
value: FilterValue;
|
|
408
|
+
}
|
|
409
|
+
|
|
118
410
|
declare type FilterForBetween = BaseFilter & {
|
|
119
411
|
operation: 'between' | 'not between';
|
|
120
412
|
values: [number, number];
|
|
@@ -145,6 +437,14 @@ declare type FilterForString = BaseFilter & {
|
|
|
145
437
|
values: [string];
|
|
146
438
|
};
|
|
147
439
|
|
|
440
|
+
declare interface FilterGroup {
|
|
441
|
+
id: string;
|
|
442
|
+
logicalOperator: LogicalOperator;
|
|
443
|
+
negate: boolean;
|
|
444
|
+
conditions: FilterCondition[];
|
|
445
|
+
groups: FilterGroup[];
|
|
446
|
+
}
|
|
447
|
+
|
|
148
448
|
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
149
449
|
|
|
150
450
|
declare type FilterOnClick = {
|
|
@@ -152,6 +452,8 @@ declare type FilterOnClick = {
|
|
|
152
452
|
columnIndex: number;
|
|
153
453
|
};
|
|
154
454
|
|
|
455
|
+
declare type FilterValue = string | number | boolean | Date | [number, number] | [string, string] | string[] | number[];
|
|
456
|
+
|
|
155
457
|
export declare type GetDashboardResponse = {
|
|
156
458
|
dashboard: TDashboard;
|
|
157
459
|
lenses: TLens[];
|
|
@@ -163,23 +465,120 @@ export declare type GetPluginsResponse = {
|
|
|
163
465
|
plugins: {
|
|
164
466
|
label: string;
|
|
165
467
|
value: string;
|
|
468
|
+
type: PluginType;
|
|
166
469
|
}[];
|
|
167
470
|
};
|
|
168
471
|
|
|
472
|
+
declare type Granularity = 'day' | 'week' | 'month' | 'year';
|
|
473
|
+
|
|
474
|
+
declare interface GroupByColumn extends BaseColumn {
|
|
475
|
+
role: 'groupby';
|
|
476
|
+
granularity?: Granularity;
|
|
477
|
+
format?: string;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
declare interface GroupByField extends Field {
|
|
481
|
+
role: 'groupby';
|
|
482
|
+
granularity?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
483
|
+
/**
|
|
484
|
+
* Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
|
|
485
|
+
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
486
|
+
*/
|
|
487
|
+
expression?: string;
|
|
488
|
+
timeDrillPath?: TimeDrillStep[];
|
|
489
|
+
}
|
|
490
|
+
|
|
169
491
|
export declare type HtmlOptions = {
|
|
170
492
|
html: string;
|
|
171
493
|
};
|
|
172
494
|
|
|
495
|
+
declare interface InlineDrillInteraction {
|
|
496
|
+
mode: 'inlineDrill';
|
|
497
|
+
filterFields: Field[];
|
|
498
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
499
|
+
inlineLimit?: number;
|
|
500
|
+
label?: string;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
declare interface Join {
|
|
504
|
+
id: string;
|
|
505
|
+
source: DatabaseEntityReference;
|
|
506
|
+
target: DatabaseEntityReference;
|
|
507
|
+
joinType: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
|
|
508
|
+
joinKeyGroups: JoinKeyGroup[];
|
|
509
|
+
sequence: number;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
declare interface JoinKey {
|
|
513
|
+
id?: string;
|
|
514
|
+
source: Field;
|
|
515
|
+
target: Field;
|
|
516
|
+
operator: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
declare interface JoinKeyGroup {
|
|
520
|
+
id: string;
|
|
521
|
+
operator: string;
|
|
522
|
+
keys: JoinKey[];
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
declare interface JoinPlan {
|
|
526
|
+
baseEntity: DatabaseEntityReference;
|
|
527
|
+
joins: Join[];
|
|
528
|
+
}
|
|
529
|
+
|
|
173
530
|
export declare type KPICardProps = {
|
|
174
531
|
card: TCard;
|
|
175
532
|
isLoading?: boolean;
|
|
176
533
|
renderFilterInfo?: () => JSX.Element | null;
|
|
177
534
|
};
|
|
178
535
|
|
|
536
|
+
export declare type Level = 'database' | 'schema' | 'table';
|
|
537
|
+
|
|
179
538
|
export declare type LoadingProps = {
|
|
180
539
|
message?: string;
|
|
181
540
|
};
|
|
182
541
|
|
|
542
|
+
declare type LogicalOperator = 'AND' | 'OR';
|
|
543
|
+
|
|
544
|
+
declare interface MetricColumn extends BaseColumn {
|
|
545
|
+
role: 'metric';
|
|
546
|
+
aggregate: AggregateFunction;
|
|
547
|
+
aliasTemplate?: string;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
declare interface MetricField extends Field {
|
|
551
|
+
role: 'metric';
|
|
552
|
+
aggregate: AggregateFunction;
|
|
553
|
+
/**
|
|
554
|
+
* Optional SQL expression for the metric (e.g., ship_date - order_date).
|
|
555
|
+
* If present, used as aggregate(expression) instead of aggregate(name).
|
|
556
|
+
*/
|
|
557
|
+
expression?: string;
|
|
558
|
+
/**
|
|
559
|
+
* Optional parameters for future extensibility (e.g., window functions).
|
|
560
|
+
* * Example:
|
|
561
|
+
* {
|
|
562
|
+
aggregate: "SUM",
|
|
563
|
+
name: "sales",
|
|
564
|
+
parameters: {
|
|
565
|
+
window: "PARTITION BY region ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW"
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
{
|
|
570
|
+
aggregate: "COUNT",
|
|
571
|
+
name: "order_id",
|
|
572
|
+
parameters: {
|
|
573
|
+
filter: "status = 'Active'"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
*/
|
|
577
|
+
parameters?: Record<string, any>;
|
|
578
|
+
aliasTemplate?: string;
|
|
579
|
+
valueAliases?: Record<string, string>;
|
|
580
|
+
}
|
|
581
|
+
|
|
183
582
|
declare type NoneOptions = {};
|
|
184
583
|
|
|
185
584
|
export declare type NumberAxisFormat = {
|
|
@@ -196,8 +595,12 @@ export declare type NumberOptions = {
|
|
|
196
595
|
colorRanges?: ColorRange[];
|
|
197
596
|
};
|
|
198
597
|
|
|
598
|
+
declare type OldFilterValue = string | number | null | (string | number)[] | RangeValue;
|
|
599
|
+
|
|
199
600
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
200
601
|
|
|
602
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
|
|
603
|
+
|
|
201
604
|
declare type OptionsMap = {
|
|
202
605
|
number: NumberOptions;
|
|
203
606
|
string: StringOptions;
|
|
@@ -206,10 +609,19 @@ declare type OptionsMap = {
|
|
|
206
609
|
none: NoneOptions;
|
|
207
610
|
};
|
|
208
611
|
|
|
612
|
+
declare interface OrderBy {
|
|
613
|
+
columnId: string;
|
|
614
|
+
direction: 'asc' | 'desc';
|
|
615
|
+
}
|
|
616
|
+
|
|
209
617
|
declare type Params = {
|
|
210
618
|
[key: string]: string | number | string[] | number[];
|
|
211
619
|
};
|
|
212
620
|
|
|
621
|
+
declare interface PivotByField extends Field {
|
|
622
|
+
role: 'pivotby';
|
|
623
|
+
}
|
|
624
|
+
|
|
213
625
|
export declare type Placeholders = {
|
|
214
626
|
/**
|
|
215
627
|
* Placeholder for the card when there are no records to display.
|
|
@@ -221,6 +633,39 @@ export declare type Placeholders = {
|
|
|
221
633
|
SessionExpired?: React.ReactNode;
|
|
222
634
|
};
|
|
223
635
|
|
|
636
|
+
export declare type PluginType = 'custom' | 'standard';
|
|
637
|
+
|
|
638
|
+
declare interface QueryConfig {
|
|
639
|
+
groupByColumns?: GroupByColumn[];
|
|
640
|
+
pivotColumns?: GroupByColumn[];
|
|
641
|
+
metricColumns?: MetricColumn[];
|
|
642
|
+
filterColumns?: FilterByColumn[];
|
|
643
|
+
filters?: QueryFilter[];
|
|
644
|
+
limit?: number;
|
|
645
|
+
orderBy?: OrderBy[];
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
declare type QueryFilter = {
|
|
649
|
+
filterColumnName: string;
|
|
650
|
+
filterValue: OldFilterValue;
|
|
651
|
+
};
|
|
652
|
+
|
|
653
|
+
declare type RangeValue = {
|
|
654
|
+
gte?: string | number;
|
|
655
|
+
lte?: string | number;
|
|
656
|
+
lt?: string | number;
|
|
657
|
+
gt?: string | number;
|
|
658
|
+
};
|
|
659
|
+
|
|
660
|
+
declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
|
|
661
|
+
|
|
662
|
+
export declare type SelectionState = Record<Level, string | null>;
|
|
663
|
+
|
|
664
|
+
declare interface SortByField extends Field {
|
|
665
|
+
role: 'sortby';
|
|
666
|
+
direction: 'asc' | 'desc';
|
|
667
|
+
}
|
|
668
|
+
|
|
224
669
|
export declare type SqlGen = {
|
|
225
670
|
measures?: {
|
|
226
671
|
name: string;
|
|
@@ -248,6 +693,14 @@ export declare type StyleProps = {
|
|
|
248
693
|
dashboardCardContainer?: string;
|
|
249
694
|
dashboardCard?: string;
|
|
250
695
|
/** grid-layout config */
|
|
696
|
+
/**
|
|
697
|
+
* Border radius for the control inputs such as filter input, tabs, date picker, etc.
|
|
698
|
+
*/
|
|
699
|
+
controlInputRadius?: number;
|
|
700
|
+
/**
|
|
701
|
+
* Border radius for the cards
|
|
702
|
+
*/
|
|
703
|
+
cardBorderRadius?: number;
|
|
251
704
|
gridLayout?: {
|
|
252
705
|
/** css class for `react-grid-layout` */
|
|
253
706
|
className?: string;
|
|
@@ -266,6 +719,13 @@ export declare type StyleProps = {
|
|
|
266
719
|
};
|
|
267
720
|
};
|
|
268
721
|
|
|
722
|
+
declare type TablePreferences = {
|
|
723
|
+
columnSettingsMap?: ColumnSettingsMap;
|
|
724
|
+
selectColumnVisible?: boolean;
|
|
725
|
+
columnVisibility?: Record<string, boolean>;
|
|
726
|
+
pageSize?: number;
|
|
727
|
+
};
|
|
728
|
+
|
|
269
729
|
export declare type TBaseQuery = {
|
|
270
730
|
id: string;
|
|
271
731
|
name: string;
|
|
@@ -287,7 +747,10 @@ export declare type TCard = {
|
|
|
287
747
|
type: TChartType;
|
|
288
748
|
sql?: string;
|
|
289
749
|
python?: string;
|
|
290
|
-
|
|
750
|
+
dataSource?: DataSource;
|
|
751
|
+
config?: CardConfig;
|
|
752
|
+
interactionConfig?: CardInteractionConfig;
|
|
753
|
+
queryConfig?: QueryConfig;
|
|
291
754
|
customCfg?: any;
|
|
292
755
|
preferences?: TCardPreferences;
|
|
293
756
|
customCardPreferences?: TCustomCardPreferences;
|
|
@@ -323,6 +786,7 @@ export declare type TCardPreferences = {
|
|
|
323
786
|
datasetOptions?: TDatasetOptions[];
|
|
324
787
|
chartOptions?: TChartOptions;
|
|
325
788
|
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
789
|
+
tablePrefs?: TablePreferences;
|
|
326
790
|
allowDownload?: boolean;
|
|
327
791
|
customVisualCode?: string;
|
|
328
792
|
textVisualOptions?: {
|
|
@@ -338,6 +802,10 @@ export declare type TCardPreferences = {
|
|
|
338
802
|
projectionOffset?: [number, number];
|
|
339
803
|
colorScale?: string;
|
|
340
804
|
};
|
|
805
|
+
kpiVisualOptions?: {
|
|
806
|
+
lowerIsBetter?: boolean;
|
|
807
|
+
countryLogoId?: string;
|
|
808
|
+
};
|
|
341
809
|
};
|
|
342
810
|
|
|
343
811
|
export declare type TChartOptions = {
|
|
@@ -369,10 +837,13 @@ export declare type TChartOptions = {
|
|
|
369
837
|
indexAxis?: 'x' | 'y' | undefined;
|
|
370
838
|
plugins?: {
|
|
371
839
|
legend?: TLegendOptions;
|
|
840
|
+
datalabels?: {
|
|
841
|
+
anchor?: string;
|
|
842
|
+
};
|
|
372
843
|
};
|
|
373
844
|
};
|
|
374
845
|
|
|
375
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'range' | 'text' | 'map' | 'custom';
|
|
846
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
376
847
|
|
|
377
848
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
378
849
|
columnIdx: number;
|
|
@@ -387,6 +858,7 @@ export declare type TCustomCardPreferences = {
|
|
|
387
858
|
url: string;
|
|
388
859
|
componentName: string;
|
|
389
860
|
icon?: string;
|
|
861
|
+
pluginChartType?: string;
|
|
390
862
|
type?: 'iframe' | 'component';
|
|
391
863
|
visualType?: 'single' | 'multiple';
|
|
392
864
|
settings?: any;
|
|
@@ -404,6 +876,7 @@ export declare type TCustomCardPreferences = {
|
|
|
404
876
|
export declare type TDashboard = {
|
|
405
877
|
id: string;
|
|
406
878
|
title?: string;
|
|
879
|
+
aiContext?: AIContext;
|
|
407
880
|
description?: string;
|
|
408
881
|
sheets?: TSheet[];
|
|
409
882
|
style?: TStyle;
|
|
@@ -413,12 +886,16 @@ export declare type TDashboard = {
|
|
|
413
886
|
aiScopeTables?: AIScopeTable[];
|
|
414
887
|
globalStyle?: TStyle;
|
|
415
888
|
globalCacheConfig?: CacheConfig;
|
|
889
|
+
emailSettings?: EmailSettings;
|
|
890
|
+
defaultFilterValues?: TFilterValue[];
|
|
416
891
|
};
|
|
417
892
|
|
|
418
893
|
export declare type TDataColumn = {
|
|
419
894
|
column_name: string;
|
|
420
895
|
data_type: string;
|
|
421
896
|
is_nullable?: string;
|
|
897
|
+
label?: string;
|
|
898
|
+
description?: string;
|
|
422
899
|
};
|
|
423
900
|
|
|
424
901
|
export declare type TDatasetOptions = {
|
|
@@ -434,6 +911,11 @@ export declare type TDatasetOptions = {
|
|
|
434
911
|
};
|
|
435
912
|
};
|
|
436
913
|
|
|
914
|
+
export declare type TDbCapabilities = {
|
|
915
|
+
path: Level[];
|
|
916
|
+
labels?: Partial<Record<Level, string>>;
|
|
917
|
+
};
|
|
918
|
+
|
|
437
919
|
export declare type TEvent = {
|
|
438
920
|
type: 'success' | 'error' | 'info' | 'warning';
|
|
439
921
|
message: any;
|
|
@@ -467,6 +949,15 @@ export declare type TFrame = {
|
|
|
467
949
|
|
|
468
950
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
469
951
|
|
|
952
|
+
declare interface TimeDrillStep {
|
|
953
|
+
granularity: TimeGranularity;
|
|
954
|
+
next?: TimeGranularity;
|
|
955
|
+
comparison?: 'previous_year' | 'previous_period';
|
|
956
|
+
rollingWindow?: number;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
960
|
+
|
|
470
961
|
export declare type TLegendOptions = {
|
|
471
962
|
display?: boolean;
|
|
472
963
|
position?: 'top' | 'left' | 'bottom' | 'right';
|