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