semaphor 0.0.99 → 0.0.101
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/dist/chunks/dashboard-plus-CuKFLiZg.js +410 -0
- package/dist/chunks/dashboard-plus-DqnRhV2b.js +13272 -0
- package/dist/chunks/index-Cd-WqnTH.js +534 -0
- package/dist/chunks/{index-B7M8EcMr.js → index-DGX0ifYc.js} +26055 -20475
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -369
- package/dist/index.js +51 -8699
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +3 -3
- package/dist/types/dashboard.d.ts +210 -3
- package/dist/types/main.d.ts +336 -18
- package/dist/types/surfboard.d.ts +210 -3
- package/dist/types/types.d.ts +210 -3
- package/package.json +6 -5
- package/dist/chunks/index-BYJosMLK.js +0 -432
package/dist/types/main.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AIContext as AIContext_2 } from '../../lib/types/assistant-types';
|
|
1
2
|
import { AIScopeTable as AIScopeTable_2 } from '..';
|
|
2
3
|
import { CacheConfig as CacheConfig_2 } from '..';
|
|
3
4
|
import { Chart } from 'chart.js';
|
|
@@ -6,6 +7,8 @@ import { ComboBoxOption as ComboBoxOption_2 } from '../../components/surfboard/f
|
|
|
6
7
|
import { CustomCard as CustomCard_2 } from '..';
|
|
7
8
|
import { DateRange } from 'react-day-picker';
|
|
8
9
|
import { default as default_2 } from 'react-grid-layout';
|
|
10
|
+
import { Dialect as Dialect_2 } from '../types/explorer-types';
|
|
11
|
+
import { DropdownItem as DropdownItem_2 } from '../types/dropdown-types';
|
|
9
12
|
import { EmailSettings as EmailSettings_2 } from '..';
|
|
10
13
|
import { FontSpec } from 'chart.js';
|
|
11
14
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -13,6 +16,7 @@ import { QueryObserverResult } from '@tanstack/query-core';
|
|
|
13
16
|
import { RefetchOptions } from '@tanstack/query-core';
|
|
14
17
|
import { StoreApi } from 'zustand';
|
|
15
18
|
import { TBaseQuery as TBaseQuery_2 } from '..';
|
|
19
|
+
import { TDbCapabilities as TDbCapabilities_2 } from '../types';
|
|
16
20
|
import { TFilter as TFilter_2 } from '../surfboard/filter/types';
|
|
17
21
|
import { TFilterValue as TFilterValue_2 } from '..';
|
|
18
22
|
import { TStyle as TStyle_2 } from '..';
|
|
@@ -20,6 +24,7 @@ import { UseBoundStore } from 'zustand';
|
|
|
20
24
|
import { WritableDraft } from 'immer';
|
|
21
25
|
|
|
22
26
|
declare type Actions = {
|
|
27
|
+
setAiContext: (aiContext: AIContext) => void;
|
|
23
28
|
setHandleOpenAssistantProfile: (handleOpenAssistantProfile: () => void) => void;
|
|
24
29
|
setFilterMode: (filterId: string, filterMode: 'include' | 'exclude') => void;
|
|
25
30
|
setInitStore: () => void;
|
|
@@ -100,12 +105,12 @@ declare type Actions = {
|
|
|
100
105
|
setBaseQueries: (baseQueries: TBaseQuery[]) => void;
|
|
101
106
|
};
|
|
102
107
|
|
|
103
|
-
declare type Actions_2 = TableActions & {
|
|
108
|
+
declare type Actions_2 = TableActions & ExplorerActions & {
|
|
104
109
|
setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
|
|
105
110
|
setLowerIsBetter: (lowerIsBetter: boolean) => void;
|
|
106
111
|
clearEditorFilter: (filterColumn: FilterByColumn) => void;
|
|
107
112
|
removeEditorFilter: (filterColumn: FilterByColumn) => void;
|
|
108
|
-
updateEditorFilterValue: (filterColumnName: string, filterValue:
|
|
113
|
+
updateEditorFilterValue: (filterColumnName: string, filterValue: OldFilterValue, clearFilter?: boolean) => void;
|
|
109
114
|
setTempQueryData: (tempQueryData: {
|
|
110
115
|
queryKey: string[];
|
|
111
116
|
queryData: any;
|
|
@@ -128,9 +133,9 @@ declare type Actions_2 = TableActions & {
|
|
|
128
133
|
setFilterColumns: (filterColumns: FilterByColumn[]) => void;
|
|
129
134
|
addColumnToFilterColumns: (column: FilterByColumn) => void;
|
|
130
135
|
removeColumnFromFilterColumns: (columnId: string) => void;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
136
|
+
updateMetricColumnOld: (columnId: string, column: MetricColumn) => void;
|
|
137
|
+
updateGroupByColumnOld: (columnId: string, column: GroupByColumn) => void;
|
|
138
|
+
updatePivotByColumnOld: (columnId: string, column: GroupByColumn) => void;
|
|
134
139
|
updateFilterColumn: (columnId: string, column: FilterByColumn) => void;
|
|
135
140
|
setCurrentAssitantScope: (currentAssitantScope: AIScopeTable[]) => void;
|
|
136
141
|
setChartGrid: (chartGrid: 'xy' | 'x' | 'y' | 'none') => void;
|
|
@@ -167,6 +172,7 @@ declare type Actions_2 = TableActions & {
|
|
|
167
172
|
setCardPython: (python: string | undefined) => void;
|
|
168
173
|
setPythonStdOut: (pythonStdOut: string) => void;
|
|
169
174
|
setCardCustomCfg: (cfg: any) => void;
|
|
175
|
+
setCardConfig: (config: CardConfig | undefined) => void;
|
|
170
176
|
setShowFilters: (showFilters: boolean) => void;
|
|
171
177
|
setApplyFilters: (applyFilters: boolean) => void;
|
|
172
178
|
setFilterValues: (filterValues: TFilterValue[]) => void;
|
|
@@ -185,7 +191,11 @@ declare type Actions_2 = TableActions & {
|
|
|
185
191
|
|
|
186
192
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
187
193
|
|
|
188
|
-
export declare type AggregateFunction = 'SUM' | 'AVG' | '
|
|
194
|
+
export declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
|
|
195
|
+
|
|
196
|
+
declare type AIContext = {
|
|
197
|
+
selectedEntities: SelectedEntities;
|
|
198
|
+
};
|
|
189
199
|
|
|
190
200
|
export declare type AIScopeTable = {
|
|
191
201
|
connectionId: string;
|
|
@@ -232,6 +242,16 @@ export declare type CacheConfig = {
|
|
|
232
242
|
status: 'on' | 'on-refresh' | 'off';
|
|
233
243
|
};
|
|
234
244
|
|
|
245
|
+
export declare interface CardConfig {
|
|
246
|
+
groupByColumns?: GroupByField[];
|
|
247
|
+
metricColumns?: MetricField[];
|
|
248
|
+
pivotByColumns?: PivotByField[];
|
|
249
|
+
sortByColumns?: SortByField[];
|
|
250
|
+
filters?: FilterGroup;
|
|
251
|
+
joinPlan?: JoinPlan;
|
|
252
|
+
rowLimit?: number;
|
|
253
|
+
}
|
|
254
|
+
|
|
235
255
|
declare type CardWithContent = BaseCustomCard & {
|
|
236
256
|
content: React.FC<{
|
|
237
257
|
card: TCard;
|
|
@@ -302,12 +322,20 @@ declare type ComboBoxOption = {
|
|
|
302
322
|
[key: string]: number | string;
|
|
303
323
|
};
|
|
304
324
|
|
|
325
|
+
export declare type ConnectionItem = DropdownItem & {
|
|
326
|
+
type: string;
|
|
327
|
+
};
|
|
328
|
+
|
|
305
329
|
export declare type ConnectionPolicy = {
|
|
306
330
|
connectionId?: string;
|
|
307
331
|
name: string;
|
|
308
332
|
params: Params;
|
|
309
333
|
};
|
|
310
334
|
|
|
335
|
+
export declare type ConnectionType = 'GoogleSheets' | 'MySQL' | 'MSSQL' | 'PostgreSQL' | 'BigQuery' | 'Redshift' | 'Snowflake' | 'S3' | 'clickhouse' | 'S3Tables' | 'API' | 'none';
|
|
336
|
+
|
|
337
|
+
export declare type ContainerId = 'groupBy' | 'metrics' | 'pivotBy' | 'sortBy' | 'source';
|
|
338
|
+
|
|
311
339
|
export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
|
|
312
340
|
|
|
313
341
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
@@ -391,6 +419,59 @@ export declare type DashboardStore = {
|
|
|
391
419
|
|
|
392
420
|
export declare const DashboardWC: CustomElementConstructor;
|
|
393
421
|
|
|
422
|
+
export declare interface DatabaseEntityReference {
|
|
423
|
+
connectionId: string;
|
|
424
|
+
connectionType: ConnectionType;
|
|
425
|
+
type: EntityType;
|
|
426
|
+
dialect?: Dialect;
|
|
427
|
+
database?: string;
|
|
428
|
+
schema?: string;
|
|
429
|
+
name: string;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
export declare type DatabaseEntityType = 'table' | 'view';
|
|
433
|
+
|
|
434
|
+
export declare type DatabaseItem = DropdownItem;
|
|
435
|
+
|
|
436
|
+
export declare interface DataModelEntityReference extends DatabaseEntityReference {
|
|
437
|
+
type: 'model';
|
|
438
|
+
id: string;
|
|
439
|
+
label: string;
|
|
440
|
+
description: string;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export declare interface DatasetEntityReference extends DatabaseEntityReference {
|
|
444
|
+
type: 'dataset';
|
|
445
|
+
id: string;
|
|
446
|
+
domainId: string;
|
|
447
|
+
label: string;
|
|
448
|
+
description: string;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
export declare interface DataSource {
|
|
452
|
+
connectionId: string;
|
|
453
|
+
semanticDomainId?: string;
|
|
454
|
+
connectionType: string;
|
|
455
|
+
mode: 'database' | 'upload' | 'url' | 'semanticDomain';
|
|
456
|
+
dbSelection?: {
|
|
457
|
+
database: string;
|
|
458
|
+
schema: string;
|
|
459
|
+
entityType: DatabaseEntityType;
|
|
460
|
+
};
|
|
461
|
+
selectedEntities: SelectedEntities;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
|
|
465
|
+
|
|
466
|
+
export declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
467
|
+
|
|
468
|
+
export declare type DateFormatOption = {
|
|
469
|
+
value: DateFormatValue;
|
|
470
|
+
label: string;
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
export declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
474
|
+
|
|
394
475
|
export declare type DateOptions = {
|
|
395
476
|
locale: string;
|
|
396
477
|
format: string;
|
|
@@ -399,10 +480,17 @@ export declare type DateOptions = {
|
|
|
399
480
|
|
|
400
481
|
export { DateRange }
|
|
401
482
|
|
|
483
|
+
export declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
|
|
484
|
+
|
|
402
485
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
403
486
|
|
|
404
487
|
export declare function downloadPdf(): Promise<void>;
|
|
405
488
|
|
|
489
|
+
export declare type DropdownItem = {
|
|
490
|
+
id: string;
|
|
491
|
+
name: string;
|
|
492
|
+
};
|
|
493
|
+
|
|
406
494
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
407
495
|
|
|
408
496
|
export declare type EditorStore = {
|
|
@@ -452,10 +540,64 @@ export declare type EmailSettings = {
|
|
|
452
540
|
|
|
453
541
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
454
542
|
|
|
543
|
+
export declare type EntityColumnGroup = {
|
|
544
|
+
entityId: string;
|
|
545
|
+
entityType: EntityType;
|
|
546
|
+
entityName: string;
|
|
547
|
+
qualifiedEntityName: string;
|
|
548
|
+
label?: string;
|
|
549
|
+
description?: string;
|
|
550
|
+
columns: Field[];
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
export declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
554
|
+
|
|
455
555
|
export declare type ErrorProps = {
|
|
456
556
|
message?: string;
|
|
457
557
|
};
|
|
458
558
|
|
|
559
|
+
declare interface ExplorerActions {
|
|
560
|
+
updateFrame: (updates: Partial<TFrame>) => void;
|
|
561
|
+
setActiveCardInFrame: (cardId: string) => void;
|
|
562
|
+
addCard: () => void;
|
|
563
|
+
removeCard: (cardId: string) => void;
|
|
564
|
+
updateCard: (cardId: string, updates: Partial<TCard>) => void;
|
|
565
|
+
setActiveCard: (cardId: string) => void;
|
|
566
|
+
setActiveTabCard: (cardId: string | null) => void;
|
|
567
|
+
updateDataSource: (dataSource: DataSource) => void;
|
|
568
|
+
setDataSource: (dataSource: DataSource) => void;
|
|
569
|
+
updateSemanticDomain: (semanticDomainId: string) => void;
|
|
570
|
+
updateDirectSource: (updates: Partial<DataSource>) => void;
|
|
571
|
+
getAvailableFields: () => Array<{
|
|
572
|
+
id: string;
|
|
573
|
+
name: string;
|
|
574
|
+
label: string;
|
|
575
|
+
dataType: string;
|
|
576
|
+
icon: any;
|
|
577
|
+
qualifiedEntityName?: string;
|
|
578
|
+
}>;
|
|
579
|
+
updateCardConfig: (cardId: string, config: Partial<CardConfig>) => void;
|
|
580
|
+
updateRowLimit: (cardId: string, rowLimit: number) => void;
|
|
581
|
+
addGroupByColumn: (cardId: string, column: GroupByField) => void;
|
|
582
|
+
removeGroupByColumn: (cardId: string, columnId: string) => void;
|
|
583
|
+
updateGroupByColumn: (cardId: string, columnId: string, updates: Partial<GroupByField>) => void;
|
|
584
|
+
addMetricColumn: (cardId: string, column: MetricField) => void;
|
|
585
|
+
removeMetricColumn: (cardId: string, columnId: string) => void;
|
|
586
|
+
updateMetricColumn: (cardId: string, columnId: string, updates: Partial<MetricField>) => void;
|
|
587
|
+
addPivotByColumn: (cardId: string, column: PivotByField) => void;
|
|
588
|
+
removePivotByColumn: (cardId: string, columnId: string) => void;
|
|
589
|
+
updatePivotByColumn: (cardId: string, columnId: string, updates: Partial<PivotByField>) => void;
|
|
590
|
+
addSortByColumn: (cardId: string, column: SortByField) => void;
|
|
591
|
+
removeSortByColumn: (cardId: string, columnId: string) => void;
|
|
592
|
+
updateSortByColumn: (cardId: string, columnId: string, updates: Partial<SortByField>) => void;
|
|
593
|
+
updateFilters: (cardId: string, filters: FilterGroup) => void;
|
|
594
|
+
clearFilters: (cardId: string) => void;
|
|
595
|
+
addJoin: (cardId: string, join: Join) => void;
|
|
596
|
+
removeJoin: (cardId: string, joinId: string) => void;
|
|
597
|
+
updateJoin: (cardId: string, joinId: string, updates: Partial<Join>) => void;
|
|
598
|
+
reorderJoins: (cardId: string, joinIds: string[]) => void;
|
|
599
|
+
}
|
|
600
|
+
|
|
459
601
|
export declare type ExportDataPayload = {
|
|
460
602
|
cardId: string;
|
|
461
603
|
title: string;
|
|
@@ -463,6 +605,49 @@ export declare type ExportDataPayload = {
|
|
|
463
605
|
sql: string;
|
|
464
606
|
};
|
|
465
607
|
|
|
608
|
+
export declare interface Field {
|
|
609
|
+
/**
|
|
610
|
+
* Unique identifier for this field instance (for joins, UI state, etc.).
|
|
611
|
+
* Should be unique within the context of the query or data model.
|
|
612
|
+
* Example: 'orders.customer_id', 'expr_12345', etc.
|
|
613
|
+
*/
|
|
614
|
+
id: string;
|
|
615
|
+
/**
|
|
616
|
+
* The physical/source column name in the database or data source.
|
|
617
|
+
* Used for mapping to the underlying data model and SQL generation (unless overridden by expression).
|
|
618
|
+
*/
|
|
619
|
+
name: string;
|
|
620
|
+
/**
|
|
621
|
+
* Human-friendly, localizable display name for the UI (table headers, chart axes, etc.).
|
|
622
|
+
*/
|
|
623
|
+
label: string;
|
|
624
|
+
/**
|
|
625
|
+
* Unique, stable, machine-friendly reference name for SQL (AS alias), exports, and scripting.
|
|
626
|
+
* If not provided, should be auto-generated from label or name.
|
|
627
|
+
*/
|
|
628
|
+
alias?: string;
|
|
629
|
+
dataType: string;
|
|
630
|
+
description?: string;
|
|
631
|
+
qualifiedEntityName?: string;
|
|
632
|
+
dateFormat?: DateFormatValue;
|
|
633
|
+
customFormat?: string;
|
|
634
|
+
granularity?: TimeGranularity;
|
|
635
|
+
entityId: string;
|
|
636
|
+
entityName: string;
|
|
637
|
+
entityType: EntityType;
|
|
638
|
+
role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
export declare interface FileEntityReference extends DatabaseEntityReference {
|
|
642
|
+
id: string;
|
|
643
|
+
type: 'file' | 'url' | 'upload';
|
|
644
|
+
label: string;
|
|
645
|
+
description: string;
|
|
646
|
+
originalName: string;
|
|
647
|
+
file?: File;
|
|
648
|
+
url?: string;
|
|
649
|
+
}
|
|
650
|
+
|
|
466
651
|
export declare interface FilterByColumn extends BaseColumn {
|
|
467
652
|
role: 'filter';
|
|
468
653
|
operators?: string[];
|
|
@@ -474,6 +659,13 @@ export declare interface FilterByColumn extends BaseColumn {
|
|
|
474
659
|
staticValues?: string[];
|
|
475
660
|
}
|
|
476
661
|
|
|
662
|
+
export declare interface FilterCondition {
|
|
663
|
+
id: string;
|
|
664
|
+
field: Field;
|
|
665
|
+
operator: Operator;
|
|
666
|
+
value: FilterValue;
|
|
667
|
+
}
|
|
668
|
+
|
|
477
669
|
declare type FilterForBetween = BaseFilter & {
|
|
478
670
|
operation: 'between' | 'not between';
|
|
479
671
|
values: [number, number];
|
|
@@ -504,6 +696,14 @@ declare type FilterForString = BaseFilter & {
|
|
|
504
696
|
values: [string];
|
|
505
697
|
};
|
|
506
698
|
|
|
699
|
+
export declare interface FilterGroup {
|
|
700
|
+
id: string;
|
|
701
|
+
logicalOperator: LogicalOperator;
|
|
702
|
+
negate: boolean;
|
|
703
|
+
conditions: FilterCondition[];
|
|
704
|
+
groups: FilterGroup[];
|
|
705
|
+
}
|
|
706
|
+
|
|
507
707
|
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
508
708
|
|
|
509
709
|
declare type FilterOnClick = {
|
|
@@ -511,7 +711,7 @@ declare type FilterOnClick = {
|
|
|
511
711
|
columnIndex: number;
|
|
512
712
|
};
|
|
513
713
|
|
|
514
|
-
export declare type FilterValue = string | number |
|
|
714
|
+
export declare type FilterValue = string | number | boolean | Date | [number, number] | [string, string] | string[] | number[];
|
|
515
715
|
|
|
516
716
|
export declare function fmt(str: string): string;
|
|
517
717
|
|
|
@@ -534,6 +734,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
|
|
|
534
734
|
}[] | undefined;
|
|
535
735
|
id: string;
|
|
536
736
|
title?: string;
|
|
737
|
+
aiContext?: AIContext_2;
|
|
537
738
|
description?: string;
|
|
538
739
|
style?: TStyle_2;
|
|
539
740
|
filters?: TFilter_2[];
|
|
@@ -559,7 +760,7 @@ export declare function getFormattedTableNameForQuery({ schemaName, tableName, m
|
|
|
559
760
|
schemaName: string;
|
|
560
761
|
tableName: string;
|
|
561
762
|
modelName: string | undefined;
|
|
562
|
-
connectionType: string;
|
|
763
|
+
connectionType: string | undefined;
|
|
563
764
|
databaseName: string;
|
|
564
765
|
}): string;
|
|
565
766
|
|
|
@@ -573,11 +774,11 @@ export declare type GetPluginsResponse = {
|
|
|
573
774
|
export declare function getQualifiedTableName({ schemaName, tableName, connectionType, databaseName, }: {
|
|
574
775
|
schemaName: string;
|
|
575
776
|
tableName: string;
|
|
576
|
-
connectionType: string;
|
|
777
|
+
connectionType: string | undefined;
|
|
577
778
|
databaseName: string;
|
|
578
779
|
}): string;
|
|
579
780
|
|
|
580
|
-
export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string, connectionType: string, databaseName: string): string | undefined;
|
|
781
|
+
export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string, connectionType: string | undefined, databaseName: string): string | undefined;
|
|
581
782
|
|
|
582
783
|
export declare type Granularity = 'day' | 'week' | 'month' | 'year';
|
|
583
784
|
|
|
@@ -587,6 +788,16 @@ export declare interface GroupByColumn extends BaseColumn {
|
|
|
587
788
|
format?: string;
|
|
588
789
|
}
|
|
589
790
|
|
|
791
|
+
export declare interface GroupByField extends Field {
|
|
792
|
+
role: 'groupby';
|
|
793
|
+
granularity?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
794
|
+
/**
|
|
795
|
+
* Optional SQL expression for grouping (e.g., DATE_TRUNC('month', order_date)).
|
|
796
|
+
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
797
|
+
*/
|
|
798
|
+
expression?: string;
|
|
799
|
+
}
|
|
800
|
+
|
|
590
801
|
export declare type HtmlOptions = {
|
|
591
802
|
html: string;
|
|
592
803
|
};
|
|
@@ -603,6 +814,33 @@ export declare function isNumberDataType(dataType: string): boolean;
|
|
|
603
814
|
|
|
604
815
|
export declare function isTextDataType(dataType: string): boolean;
|
|
605
816
|
|
|
817
|
+
export declare interface Join {
|
|
818
|
+
id: string;
|
|
819
|
+
source: DatabaseEntityReference;
|
|
820
|
+
target: DatabaseEntityReference;
|
|
821
|
+
joinType: 'INNER' | 'LEFT' | 'RIGHT' | 'FULL';
|
|
822
|
+
joinKeyGroups: JoinKeyGroup[];
|
|
823
|
+
sequence: number;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
export declare interface JoinKey {
|
|
827
|
+
id?: string;
|
|
828
|
+
source: Field;
|
|
829
|
+
target: Field;
|
|
830
|
+
operator: string;
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
export declare interface JoinKeyGroup {
|
|
834
|
+
id: string;
|
|
835
|
+
operator: string;
|
|
836
|
+
keys: JoinKey[];
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
export declare interface JoinPlan {
|
|
840
|
+
baseEntity: DatabaseEntityReference;
|
|
841
|
+
joins: Join[];
|
|
842
|
+
}
|
|
843
|
+
|
|
606
844
|
export declare type KPICardProps = {
|
|
607
845
|
card: TCard;
|
|
608
846
|
isLoading?: boolean;
|
|
@@ -615,12 +853,48 @@ export declare type LoadingProps = {
|
|
|
615
853
|
message?: string;
|
|
616
854
|
};
|
|
617
855
|
|
|
856
|
+
export declare type LogicalOperator = 'AND' | 'OR';
|
|
857
|
+
|
|
618
858
|
export declare interface MetricColumn extends BaseColumn {
|
|
619
859
|
role: 'metric';
|
|
620
860
|
aggregate: AggregateFunction;
|
|
621
861
|
aliasTemplate?: string;
|
|
622
862
|
}
|
|
623
863
|
|
|
864
|
+
export declare interface MetricField extends Field {
|
|
865
|
+
role: 'metric';
|
|
866
|
+
aggregate: AggregateFunction;
|
|
867
|
+
/**
|
|
868
|
+
* Optional SQL expression for the metric (e.g., ship_date - order_date).
|
|
869
|
+
* If present, used as aggregate(expression) instead of aggregate(name).
|
|
870
|
+
*/
|
|
871
|
+
expression?: string;
|
|
872
|
+
/**
|
|
873
|
+
* Optional parameters for future extensibility (e.g., window functions).
|
|
874
|
+
* * Example:
|
|
875
|
+
* {
|
|
876
|
+
aggregate: "SUM",
|
|
877
|
+
name: "sales",
|
|
878
|
+
parameters: {
|
|
879
|
+
window: "PARTITION BY region ORDER BY date ROWS BETWEEN 1 PRECEDING AND CURRENT ROW"
|
|
880
|
+
}
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
{
|
|
884
|
+
aggregate: "COUNT",
|
|
885
|
+
name: "order_id",
|
|
886
|
+
parameters: {
|
|
887
|
+
filter: "status = 'Active'"
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
*/
|
|
891
|
+
parameters?: Record<string, any>;
|
|
892
|
+
aliasTemplate?: string;
|
|
893
|
+
valueAliases?: Record<string, string>;
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
export declare type ModelItem = DropdownItem;
|
|
897
|
+
|
|
624
898
|
declare type NoneOptions = {};
|
|
625
899
|
|
|
626
900
|
export declare type NumberAxisFormat = {
|
|
@@ -637,8 +911,12 @@ export declare type NumberOptions = {
|
|
|
637
911
|
colorRanges?: ColorRange[];
|
|
638
912
|
};
|
|
639
913
|
|
|
914
|
+
export declare type OldFilterValue = string | number | null | (string | number)[] | RangeValue;
|
|
915
|
+
|
|
640
916
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
641
917
|
|
|
918
|
+
export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
|
|
919
|
+
|
|
642
920
|
declare type OptionsMap = {
|
|
643
921
|
number: NumberOptions;
|
|
644
922
|
string: StringOptions;
|
|
@@ -656,6 +934,10 @@ declare type Params = {
|
|
|
656
934
|
[key: string]: string | number | string[] | number[];
|
|
657
935
|
};
|
|
658
936
|
|
|
937
|
+
export declare interface PivotByField extends Field {
|
|
938
|
+
role: 'pivotby';
|
|
939
|
+
}
|
|
940
|
+
|
|
659
941
|
export declare type Placeholders = {
|
|
660
942
|
/**
|
|
661
943
|
* Placeholder for the card when there are no records to display.
|
|
@@ -681,7 +963,7 @@ export declare interface QueryConfig {
|
|
|
681
963
|
|
|
682
964
|
export declare type QueryFilter = {
|
|
683
965
|
filterColumnName: string;
|
|
684
|
-
filterValue:
|
|
966
|
+
filterValue: OldFilterValue;
|
|
685
967
|
};
|
|
686
968
|
|
|
687
969
|
export declare type RangeValue = {
|
|
@@ -699,8 +981,12 @@ export declare function ScheduleDashboard({ triggerButtonClassName, }: {
|
|
|
699
981
|
triggerButtonClassName?: string;
|
|
700
982
|
}): JSX_2.Element;
|
|
701
983
|
|
|
984
|
+
export declare type SchemaItem = DropdownItem;
|
|
985
|
+
|
|
702
986
|
export declare function SelectComponent({ title, items, value, isLoading, isError, refetch, onChange, showNone, className, disabled, type, }: SelectProps): JSX_2.Element;
|
|
703
987
|
|
|
988
|
+
export declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
|
|
989
|
+
|
|
704
990
|
export declare type SelectionState = Record<Level, string | null>;
|
|
705
991
|
|
|
706
992
|
declare type SelectProps = {
|
|
@@ -728,6 +1014,13 @@ declare function SemaphorQueryClient({ children, }: {
|
|
|
728
1014
|
export { SemaphorQueryClient as SemaphorDataProvider }
|
|
729
1015
|
export { SemaphorQueryClient }
|
|
730
1016
|
|
|
1017
|
+
export declare interface SortByField extends Field {
|
|
1018
|
+
role: 'sortby';
|
|
1019
|
+
direction: 'asc' | 'desc';
|
|
1020
|
+
}
|
|
1021
|
+
|
|
1022
|
+
export declare type SortDirection = 'asc' | 'desc';
|
|
1023
|
+
|
|
731
1024
|
export declare type SqlGen = {
|
|
732
1025
|
measures?: {
|
|
733
1026
|
name: string;
|
|
@@ -801,6 +1094,8 @@ export declare type TableConfig = {
|
|
|
801
1094
|
datamodelId: string;
|
|
802
1095
|
};
|
|
803
1096
|
|
|
1097
|
+
export declare type TableItem = DropdownItem;
|
|
1098
|
+
|
|
804
1099
|
declare type TablePreferences = {
|
|
805
1100
|
columnSettingsMap?: ColumnSettingsMap;
|
|
806
1101
|
selectColumnVisible?: boolean;
|
|
@@ -829,6 +1124,8 @@ export declare type TCard = {
|
|
|
829
1124
|
type: TChartType;
|
|
830
1125
|
sql?: string;
|
|
831
1126
|
python?: string;
|
|
1127
|
+
dataSource?: DataSource;
|
|
1128
|
+
config?: CardConfig;
|
|
832
1129
|
queryConfig?: QueryConfig;
|
|
833
1130
|
customCfg?: any;
|
|
834
1131
|
preferences?: TCardPreferences;
|
|
@@ -955,6 +1252,7 @@ export declare type TCustomCardPreferences = {
|
|
|
955
1252
|
export declare type TDashboard = {
|
|
956
1253
|
id: string;
|
|
957
1254
|
title?: string;
|
|
1255
|
+
aiContext?: AIContext;
|
|
958
1256
|
description?: string;
|
|
959
1257
|
sheets?: TSheet[];
|
|
960
1258
|
style?: TStyle;
|
|
@@ -972,6 +1270,8 @@ export declare type TDataColumn = {
|
|
|
972
1270
|
column_name: string;
|
|
973
1271
|
data_type: string;
|
|
974
1272
|
is_nullable?: string;
|
|
1273
|
+
label?: string;
|
|
1274
|
+
description?: string;
|
|
975
1275
|
};
|
|
976
1276
|
|
|
977
1277
|
export declare type TDatasetOptions = {
|
|
@@ -1025,6 +1325,8 @@ export declare type TFrame = {
|
|
|
1025
1325
|
|
|
1026
1326
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1027
1327
|
|
|
1328
|
+
export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1329
|
+
|
|
1028
1330
|
export declare type TLegendOptions = {
|
|
1029
1331
|
display?: boolean;
|
|
1030
1332
|
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
@@ -1079,6 +1381,14 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
1079
1381
|
setState(nextStateOrUpdater: DashboardStore | Partial<DashboardStore> | ((state: WritableDraft<DashboardStore>) => void), shouldReplace?: boolean | undefined): void;
|
|
1080
1382
|
}>;
|
|
1081
1383
|
|
|
1384
|
+
export declare function useDataColumns(token?: AuthToken): {
|
|
1385
|
+
columns: TDataColumn[];
|
|
1386
|
+
isColumnsLoading: boolean;
|
|
1387
|
+
isColumnsFetching: boolean;
|
|
1388
|
+
isColumnsError: boolean;
|
|
1389
|
+
refetchColumns: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|
|
1390
|
+
};
|
|
1391
|
+
|
|
1082
1392
|
export declare function useDateFilterHook(filterId: string): {
|
|
1083
1393
|
records: any;
|
|
1084
1394
|
isLoading: boolean;
|
|
@@ -1094,24 +1404,32 @@ export declare function useDateFilterHook(filterId: string): {
|
|
|
1094
1404
|
export declare const useEditorActions: () => Actions_2;
|
|
1095
1405
|
|
|
1096
1406
|
export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {
|
|
1097
|
-
connectionItems:
|
|
1407
|
+
connectionItems: ConnectionItem[];
|
|
1098
1408
|
selectedConnectionId: string | undefined;
|
|
1409
|
+
selectedConnection: {
|
|
1410
|
+
id: string;
|
|
1411
|
+
name: string;
|
|
1412
|
+
type: string;
|
|
1413
|
+
dialect?: Dialect_2;
|
|
1414
|
+
uiType?: "database" | "api" | "s3";
|
|
1415
|
+
capabilities: TDbCapabilities_2;
|
|
1416
|
+
} | undefined;
|
|
1099
1417
|
isConnectionsLoading: boolean;
|
|
1100
1418
|
isConnectionsError: boolean;
|
|
1101
|
-
modelItems:
|
|
1419
|
+
modelItems: DropdownItem_2[];
|
|
1102
1420
|
selectedDatamodelId: string | undefined;
|
|
1103
1421
|
selectedDatamodelName: any;
|
|
1104
1422
|
isModelsLoading: boolean;
|
|
1105
1423
|
isModelsError: boolean;
|
|
1106
1424
|
selectedDatabaseName: string | undefined;
|
|
1107
|
-
databaseItems:
|
|
1425
|
+
databaseItems: DropdownItem_2[];
|
|
1108
1426
|
isDatabasesLoadingOrFetching: boolean;
|
|
1109
1427
|
isDatabaseError: boolean;
|
|
1110
|
-
schemaItems:
|
|
1428
|
+
schemaItems: DropdownItem_2[];
|
|
1111
1429
|
selectedSchemaName: string | undefined;
|
|
1112
1430
|
isSchemaLoadingOrFetching: boolean;
|
|
1113
1431
|
isSchemaError: boolean;
|
|
1114
|
-
tableItems:
|
|
1432
|
+
tableItems: DropdownItem_2[];
|
|
1115
1433
|
selectedTableName: string | undefined;
|
|
1116
1434
|
isTableLoadingOrFetching: boolean;
|
|
1117
1435
|
isTableError: boolean;
|
|
@@ -1119,8 +1437,8 @@ export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?:
|
|
|
1119
1437
|
isColumnsLoadingOrFetching: boolean;
|
|
1120
1438
|
isColumnsError: boolean;
|
|
1121
1439
|
isNonDbConnection: boolean;
|
|
1122
|
-
connectionType:
|
|
1123
|
-
tableName:
|
|
1440
|
+
connectionType: string | undefined;
|
|
1441
|
+
tableName: string;
|
|
1124
1442
|
formattedTableName: string;
|
|
1125
1443
|
schemaName: string;
|
|
1126
1444
|
refetchConnections: (options?: RefetchOptions) => Promise<QueryObserverResult<any, Error>>;
|