semaphor 0.0.128 → 0.0.130
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-controls-BMLlOkS9.js +1539 -0
- package/dist/chunks/dashboard-controls-BdQcYRkf.js +26 -0
- package/dist/chunks/dashboard-export-dialog-BpNaUA5x.js +6 -0
- package/dist/chunks/dashboard-export-dialog-CbMcLZvW.js +602 -0
- package/dist/chunks/dashboard-json-DD-d9gYu.js +66 -0
- package/dist/chunks/dashboard-json-DgQozDAv.js +1 -0
- package/dist/chunks/edit-dashboard-visual-CR3NqJ7m.js +200 -0
- package/dist/chunks/edit-dashboard-visual-CRMhXxdG.js +15517 -0
- package/dist/chunks/editor-action-buttons-CNQtSzD5.js +270 -0
- package/dist/chunks/editor-action-buttons-DYrSZQhJ.js +6 -0
- package/dist/chunks/index-CReqnEJI.js +1081 -0
- package/dist/chunks/{index-nm88dVBB.js → index-QdSI9E0a.js} +89207 -74907
- package/dist/chunks/resource-management-panel-CBXn6QHi.js +895 -0
- package/dist/chunks/resource-management-panel-CXSx9QhW.js +6 -0
- package/dist/chunks/use-click-outside-B9T3lmcw.js +1 -0
- package/dist/chunks/use-click-outside-CMeO_QFI.js +16 -0
- package/dist/chunks/use-visual-utils-BDuNB0Iz.js +1 -0
- package/dist/chunks/use-visual-utils-BnCl386t.js +331 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.js +194 -111
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +4 -4
- package/dist/types/dashboard.d.ts +524 -18
- package/dist/types/main.d.ts +948 -105
- package/dist/types/surfboard.d.ts +524 -18
- package/dist/types/types.d.ts +524 -18
- package/package.json +11 -7
- package/dist/chunks/dashboard-plus-DuenxiNV.js +0 -335
- package/dist/chunks/dashboard-plus-vO1PNFhv.js +0 -22561
- package/dist/chunks/index-BRkgsUH0.js +0 -985
|
@@ -75,6 +75,48 @@ export declare type CacheConfig = {
|
|
|
75
75
|
status: 'on' | 'on-refresh' | 'off';
|
|
76
76
|
};
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Formula metadata for calculated fields (UI-only metadata)
|
|
80
|
+
* This is supplementary data to help the UI display and edit calculated fields.
|
|
81
|
+
* The `expression` field remains the source of truth for the backend.
|
|
82
|
+
*
|
|
83
|
+
* IMPORTANT: This metadata is ALWAYS updated atomically with the expression field.
|
|
84
|
+
* Both are generated together from the same dialog inputs, preventing drift.
|
|
85
|
+
*/
|
|
86
|
+
declare interface CalculatedFieldFormula {
|
|
87
|
+
operation: CalculatedFieldOperation;
|
|
88
|
+
/**
|
|
89
|
+
* Array of full MetricField objects used as inputs to the calculated field.
|
|
90
|
+
*
|
|
91
|
+
* Storing complete Field objects eliminates the need for runtime lookups and ensures:
|
|
92
|
+
* - Table alias resolution works with schema-qualified tables (Issue 1)
|
|
93
|
+
* - All field metadata is available even if the input field isn't selected on the card (Issue 2)
|
|
94
|
+
* - Aggregate functions, filters, and entity info are preserved
|
|
95
|
+
*
|
|
96
|
+
* Each input field contains complete metadata:
|
|
97
|
+
* - name, entityId, entityName, qualifiedEntityName (for table qualification)
|
|
98
|
+
* - aggregate (for proper post-aggregation: SUM(sales) / COUNT(orders))
|
|
99
|
+
* - parameters.filters (for filtered metrics)
|
|
100
|
+
* - dataType and other properties
|
|
101
|
+
*
|
|
102
|
+
* Example: [
|
|
103
|
+
* {name: 'sales', aggregate: 'SUM', entityName: 'sales_data', ...},
|
|
104
|
+
* {name: 'order_id', aggregate: 'COUNT', entityName: 'sales_data', ...}
|
|
105
|
+
* ]
|
|
106
|
+
*/
|
|
107
|
+
inputFields: MetricField[];
|
|
108
|
+
/**
|
|
109
|
+
* Constant value used in scale operations (e.g., multiply by 0.15)
|
|
110
|
+
* Only applicable for 'scale' operation type
|
|
111
|
+
*/
|
|
112
|
+
constant?: number;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Operations supported for calculated fields
|
|
117
|
+
*/
|
|
118
|
+
declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
|
|
119
|
+
|
|
78
120
|
declare interface CardConfig {
|
|
79
121
|
groupByColumns?: GroupByField[];
|
|
80
122
|
metricColumns?: MetricField[];
|
|
@@ -104,8 +146,9 @@ declare interface CardConfig {
|
|
|
104
146
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
105
147
|
*/
|
|
106
148
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
107
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
|
|
149
|
+
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
|
|
108
150
|
targetValue?: number;
|
|
151
|
+
showComparisonInLegend?: boolean;
|
|
109
152
|
showTrendline?: boolean;
|
|
110
153
|
trendlineWindow?: number;
|
|
111
154
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
@@ -122,10 +165,13 @@ declare interface CardConfig {
|
|
|
122
165
|
}
|
|
123
166
|
|
|
124
167
|
declare interface CardInteractionConfig {
|
|
168
|
+
/**
|
|
169
|
+
* V2: Unified interactions array.
|
|
170
|
+
* Each interaction includes a trigger that specifies what element must be clicked.
|
|
171
|
+
*/
|
|
172
|
+
interactions?: Interaction[];
|
|
125
173
|
allowedDrillTargets?: Field[];
|
|
126
174
|
drillHierarchies?: DrillHierarchy[];
|
|
127
|
-
drillInteractions?: DrillInteraction[];
|
|
128
|
-
clickFilterInteractions?: ClickFilterInteraction[];
|
|
129
175
|
}
|
|
130
176
|
|
|
131
177
|
declare type CardWithContent = BaseCustomCard & {
|
|
@@ -148,6 +194,14 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
148
194
|
|
|
149
195
|
declare interface ClickFilterInteraction {
|
|
150
196
|
mode: 'clickFilter';
|
|
197
|
+
/**
|
|
198
|
+
* What element must be clicked to trigger this interaction.
|
|
199
|
+
* Determines both the matching logic and the filtering behavior.
|
|
200
|
+
*
|
|
201
|
+
* @migration Optional during migration. Will be required in V2.
|
|
202
|
+
* Old configs without trigger will apply to any click (legacy behavior).
|
|
203
|
+
*/
|
|
204
|
+
trigger?: InteractionTrigger;
|
|
151
205
|
/**
|
|
152
206
|
* Fields from the chart element that should be used as filters.
|
|
153
207
|
* e.g., [region, ship_mode] from a stacked bar chart
|
|
@@ -217,6 +271,7 @@ declare interface ColumnSettings {
|
|
|
217
271
|
timezone?: string;
|
|
218
272
|
sourceTimezone?: string;
|
|
219
273
|
};
|
|
274
|
+
linkFormat: LinkFormat;
|
|
220
275
|
colorRanges: ColorRange_2[];
|
|
221
276
|
}
|
|
222
277
|
|
|
@@ -315,7 +370,7 @@ declare interface DatabaseEntityReference {
|
|
|
315
370
|
name: string;
|
|
316
371
|
}
|
|
317
372
|
|
|
318
|
-
declare type DatabaseEntityType = 'table' | 'view';
|
|
373
|
+
declare type DatabaseEntityType = 'table' | 'view' | 'materialized view';
|
|
319
374
|
|
|
320
375
|
declare interface DataModelEntityReference extends DatabaseEntityReference {
|
|
321
376
|
type: 'model';
|
|
@@ -347,16 +402,33 @@ export declare type DateOptions = {
|
|
|
347
402
|
options: Intl.DateTimeFormatOptions;
|
|
348
403
|
};
|
|
349
404
|
|
|
350
|
-
declare type
|
|
405
|
+
declare type DateSelectionMode = 'range' | 'months';
|
|
406
|
+
|
|
407
|
+
declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
408
|
+
|
|
409
|
+
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
351
410
|
|
|
352
411
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
353
412
|
|
|
413
|
+
declare interface DrillDownInteraction {
|
|
414
|
+
mode: 'drillDown';
|
|
415
|
+
/**
|
|
416
|
+
* What element must be clicked to trigger this drill-down.
|
|
417
|
+
* Optional during configuration, but must be defined before execution.
|
|
418
|
+
*/
|
|
419
|
+
trigger?: InteractionTrigger;
|
|
420
|
+
filterFields: Field[];
|
|
421
|
+
hierarchyId?: string;
|
|
422
|
+
label?: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
354
425
|
declare interface DrillHierarchy {
|
|
355
426
|
id: string;
|
|
356
427
|
label?: string;
|
|
357
|
-
type: 'static';
|
|
428
|
+
type: 'static' | 'date';
|
|
358
429
|
steps: DrillHierarchyStep[];
|
|
359
430
|
default?: boolean;
|
|
431
|
+
baseField?: Field;
|
|
360
432
|
}
|
|
361
433
|
|
|
362
434
|
declare interface DrillHierarchyStep {
|
|
@@ -369,34 +441,116 @@ declare interface DrillHierarchyStep {
|
|
|
369
441
|
linkedInsightId?: string;
|
|
370
442
|
}
|
|
371
443
|
|
|
372
|
-
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
373
|
-
|
|
374
444
|
declare interface DrillThroughInteraction {
|
|
375
445
|
mode: 'drillThrough';
|
|
446
|
+
/**
|
|
447
|
+
* What element must be clicked to trigger this drill-through.
|
|
448
|
+
* @migration Optional during migration. Will be required in V2.
|
|
449
|
+
*/
|
|
450
|
+
trigger?: InteractionTrigger;
|
|
376
451
|
filterFields: Field[];
|
|
377
|
-
|
|
452
|
+
targetDashboardId: string;
|
|
453
|
+
/**
|
|
454
|
+
* How to pass context to the target dashboard
|
|
455
|
+
* @default 'interactionFilters'
|
|
456
|
+
*/
|
|
457
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
378
458
|
label?: string;
|
|
379
459
|
}
|
|
380
460
|
|
|
381
461
|
declare interface DrillToDetailInteraction {
|
|
382
462
|
mode: 'drillToDetail';
|
|
463
|
+
/**
|
|
464
|
+
* What element must be clicked to trigger this drill to detail.
|
|
465
|
+
* @migration Optional during migration. Will be required in V2.
|
|
466
|
+
*/
|
|
467
|
+
trigger?: InteractionTrigger;
|
|
383
468
|
filterFields: Field[];
|
|
384
469
|
detailFields?: Field[];
|
|
385
470
|
sortBy?: SortByField[];
|
|
386
471
|
limit?: number;
|
|
387
472
|
detailTitle?: string;
|
|
473
|
+
/**
|
|
474
|
+
* Target insight ID to navigate to
|
|
475
|
+
*/
|
|
476
|
+
targetInsightId?: string;
|
|
477
|
+
/**
|
|
478
|
+
* How to pass context to the target insight
|
|
479
|
+
* @default 'interactionFilters'
|
|
480
|
+
*/
|
|
481
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
482
|
+
/**
|
|
483
|
+
* How to display the insight
|
|
484
|
+
* @default 'modal'
|
|
485
|
+
*/
|
|
486
|
+
displayMode?: 'modal' | 'replace-card';
|
|
388
487
|
label?: string;
|
|
389
488
|
}
|
|
390
489
|
|
|
391
490
|
declare interface DrillToURLInteraction {
|
|
392
491
|
mode: 'drillToURL';
|
|
492
|
+
/**
|
|
493
|
+
* What element must be clicked to trigger this URL drill.
|
|
494
|
+
*/
|
|
495
|
+
trigger?: InteractionTrigger;
|
|
393
496
|
filterFields: Field[];
|
|
497
|
+
/**
|
|
498
|
+
* URL template with placeholders (e.g., 'https://example.com/product/{{product_id}}')
|
|
499
|
+
*/
|
|
394
500
|
urlTemplate: string;
|
|
501
|
+
/**
|
|
502
|
+
* List of parameters used in the URL template
|
|
503
|
+
*/
|
|
504
|
+
parameters: URLParameter[];
|
|
505
|
+
/**
|
|
506
|
+
* Whether to URL-encode parameter values
|
|
507
|
+
* @default true
|
|
508
|
+
*/
|
|
509
|
+
encodeParameters?: boolean;
|
|
510
|
+
/**
|
|
511
|
+
* Custom label for this interaction in the menu
|
|
512
|
+
*/
|
|
513
|
+
label?: string;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
declare interface DrillUpInteraction {
|
|
517
|
+
mode: 'drillUp';
|
|
518
|
+
/**
|
|
519
|
+
* What element must be clicked to trigger this drill-up.
|
|
520
|
+
* For synthetic drill-up interactions, this is inherited from the original drill-down.
|
|
521
|
+
*/
|
|
522
|
+
trigger?: InteractionTrigger;
|
|
523
|
+
/**
|
|
524
|
+
* The hierarchy ID to reference for display purposes.
|
|
525
|
+
* Used to show the parent level name in the interaction menu.
|
|
526
|
+
*/
|
|
527
|
+
hierarchyId?: string;
|
|
395
528
|
label?: string;
|
|
396
529
|
}
|
|
397
530
|
|
|
398
531
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
399
532
|
|
|
533
|
+
declare interface DynamicDrillInteraction {
|
|
534
|
+
mode: 'dynamicDrill';
|
|
535
|
+
/**
|
|
536
|
+
* What element must be clicked to trigger this dynamic drill menu.
|
|
537
|
+
* When this trigger fires, user sees a menu of available fields to explore.
|
|
538
|
+
*/
|
|
539
|
+
trigger?: InteractionTrigger;
|
|
540
|
+
/**
|
|
541
|
+
* List of fields available for dynamic exploration.
|
|
542
|
+
* User can choose which field to drill into at runtime.
|
|
543
|
+
* Only drillable fields (string, boolean types) should be included.
|
|
544
|
+
*/
|
|
545
|
+
availableFields: Field[];
|
|
546
|
+
/**
|
|
547
|
+
* Optional label for the menu item.
|
|
548
|
+
* Defaults to "Explore Fields" if not specified.
|
|
549
|
+
*/
|
|
550
|
+
label?: string;
|
|
551
|
+
/* Excluded from this release type: drillField */
|
|
552
|
+
}
|
|
553
|
+
|
|
400
554
|
export declare type EmailSettings = {
|
|
401
555
|
companyName: string;
|
|
402
556
|
dashboardUrl: string;
|
|
@@ -406,7 +560,7 @@ export declare type EmailSettings = {
|
|
|
406
560
|
|
|
407
561
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
408
562
|
|
|
409
|
-
declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
563
|
+
declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
410
564
|
|
|
411
565
|
export declare type ErrorProps = {
|
|
412
566
|
message?: string;
|
|
@@ -505,6 +659,7 @@ declare type FilterForCompare = BaseFilter & {
|
|
|
505
659
|
declare type FilterForDate = BaseFilter & {
|
|
506
660
|
operation: 'between' | 'not between';
|
|
507
661
|
values: [Date, Date];
|
|
662
|
+
relativeMeta?: RelativeDateFilter;
|
|
508
663
|
};
|
|
509
664
|
|
|
510
665
|
declare type FilterForEqual = BaseFilter & {
|
|
@@ -530,7 +685,7 @@ declare interface FilterGroup {
|
|
|
530
685
|
groups: FilterGroup[];
|
|
531
686
|
}
|
|
532
687
|
|
|
533
|
-
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
688
|
+
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
534
689
|
|
|
535
690
|
declare type FilterOnClick = {
|
|
536
691
|
expression?: string;
|
|
@@ -544,6 +699,7 @@ export declare type GetDashboardResponse = {
|
|
|
544
699
|
lenses: TLens[];
|
|
545
700
|
filterValues?: TFilterValue[];
|
|
546
701
|
defaultLensId?: string;
|
|
702
|
+
assistantProfileId?: string;
|
|
547
703
|
};
|
|
548
704
|
|
|
549
705
|
export declare type GetPluginsResponse = {
|
|
@@ -579,12 +735,72 @@ export declare type HtmlOptions = {
|
|
|
579
735
|
|
|
580
736
|
declare interface InlineDrillInteraction {
|
|
581
737
|
mode: 'inlineDrill';
|
|
738
|
+
/**
|
|
739
|
+
* What element must be clicked to trigger this inline drill.
|
|
740
|
+
* @migration Optional during migration. Will be required in V2.
|
|
741
|
+
*/
|
|
742
|
+
trigger?: InteractionTrigger;
|
|
582
743
|
filterFields: Field[];
|
|
744
|
+
/**
|
|
745
|
+
* When to fetch the detailed data
|
|
746
|
+
* @default 'lazy'
|
|
747
|
+
*/
|
|
583
748
|
fetchMode?: 'lazy' | 'preloaded';
|
|
749
|
+
/**
|
|
750
|
+
* Maximum number of records to show (0 for unlimited)
|
|
751
|
+
* @default 100
|
|
752
|
+
*/
|
|
584
753
|
inlineLimit?: number;
|
|
754
|
+
/**
|
|
755
|
+
* How to display the detailed records
|
|
756
|
+
* @default 'table'
|
|
757
|
+
*/
|
|
758
|
+
displayMode?: 'table' | 'list' | 'cards';
|
|
759
|
+
/**
|
|
760
|
+
* Whether to show records in a modal overlay
|
|
761
|
+
* @default false
|
|
762
|
+
*/
|
|
763
|
+
showInModal?: boolean;
|
|
764
|
+
/**
|
|
765
|
+
* Whether to allow exporting the detailed records
|
|
766
|
+
* @default true
|
|
767
|
+
*/
|
|
768
|
+
allowExport?: boolean;
|
|
585
769
|
label?: string;
|
|
586
770
|
}
|
|
587
771
|
|
|
772
|
+
/**
|
|
773
|
+
* Unified Interaction type (V2)
|
|
774
|
+
* Combines all interaction types into a single union for the new interactions array.
|
|
775
|
+
*/
|
|
776
|
+
declare type Interaction = ClickFilterInteraction | DrillDownInteraction | DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction | DrillUpInteraction | DynamicDrillInteraction;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Defines what element must be clicked to trigger an interaction.
|
|
780
|
+
*
|
|
781
|
+
* The `type` determines filtering behavior:
|
|
782
|
+
* - 'metric': Captures intersection of ALL dimensions (e.g., country='USA' AND state='CA')
|
|
783
|
+
* - 'attribute': Captures ONLY the clicked dimension (e.g., country='USA')
|
|
784
|
+
*
|
|
785
|
+
* Note: `trigger.type` is different from `field.type`:
|
|
786
|
+
* - trigger.type = filtering behavior ('metric' | 'attribute')
|
|
787
|
+
* - field.type = data type ('dimension' | 'metric' | 'measure')
|
|
788
|
+
*/
|
|
789
|
+
declare interface InteractionTrigger {
|
|
790
|
+
/**
|
|
791
|
+
* Determines filtering behavior when this trigger fires:
|
|
792
|
+
* - 'metric': Capture intersection of all dimensions
|
|
793
|
+
* - 'attribute': Capture only this specific dimension
|
|
794
|
+
*/
|
|
795
|
+
type: 'metric' | 'attribute';
|
|
796
|
+
/**
|
|
797
|
+
* The field (metric or attribute) that must be clicked.
|
|
798
|
+
* For multi-series charts: Use the specific metric Field with unique ID
|
|
799
|
+
* (e.g., Field with id='count_of_orders')
|
|
800
|
+
*/
|
|
801
|
+
field: Field;
|
|
802
|
+
}
|
|
803
|
+
|
|
588
804
|
declare interface Join {
|
|
589
805
|
id: string;
|
|
590
806
|
source: DatabaseEntityReference;
|
|
@@ -620,6 +836,14 @@ export declare type KPICardProps = {
|
|
|
620
836
|
|
|
621
837
|
export declare type Level = 'database' | 'schema' | 'table';
|
|
622
838
|
|
|
839
|
+
declare interface LinkFormat {
|
|
840
|
+
urlTemplate: string;
|
|
841
|
+
labelType: 'value' | 'static' | 'column';
|
|
842
|
+
staticLabel?: string;
|
|
843
|
+
labelColumn?: string;
|
|
844
|
+
openInNewTab: boolean;
|
|
845
|
+
}
|
|
846
|
+
|
|
623
847
|
export declare type LoadingProps = {
|
|
624
848
|
message?: string;
|
|
625
849
|
};
|
|
@@ -664,6 +888,15 @@ declare interface MetricField extends Field {
|
|
|
664
888
|
};
|
|
665
889
|
aliasTemplate?: string;
|
|
666
890
|
valueAliases?: Record<string, string>;
|
|
891
|
+
/**
|
|
892
|
+
* Formula metadata for calculated fields (UI-only metadata)
|
|
893
|
+
* This is supplementary data to help the UI display and edit calculated fields.
|
|
894
|
+
* The `expression` field remains the source of truth for the backend.
|
|
895
|
+
*
|
|
896
|
+
* IMPORTANT: This metadata is ALWAYS updated atomically with the expression field.
|
|
897
|
+
* Both are generated together from the same dialog inputs, preventing drift.
|
|
898
|
+
*/
|
|
899
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
667
900
|
}
|
|
668
901
|
|
|
669
902
|
declare type NoneOptions = {};
|
|
@@ -686,7 +919,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
|
|
|
686
919
|
|
|
687
920
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
688
921
|
|
|
689
|
-
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'isNull' | 'isNotNull';
|
|
922
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'not between' | 'isNull' | 'isNotNull';
|
|
690
923
|
|
|
691
924
|
declare type OptionsMap = {
|
|
692
925
|
number: NumberOptions;
|
|
@@ -752,6 +985,25 @@ declare type RangeValue = {
|
|
|
752
985
|
gt?: string | number;
|
|
753
986
|
};
|
|
754
987
|
|
|
988
|
+
declare type RelativeDateFilter = {
|
|
989
|
+
mode: 'last';
|
|
990
|
+
n: number;
|
|
991
|
+
unit: DateUnit;
|
|
992
|
+
complete?: boolean;
|
|
993
|
+
} | {
|
|
994
|
+
mode: 'this';
|
|
995
|
+
unit: DateUnit;
|
|
996
|
+
toDate?: boolean;
|
|
997
|
+
} | {
|
|
998
|
+
mode: 'previous';
|
|
999
|
+
unit: DateUnit;
|
|
1000
|
+
} | {
|
|
1001
|
+
mode: 'between';
|
|
1002
|
+
unit: DateUnit;
|
|
1003
|
+
from: number;
|
|
1004
|
+
to: number;
|
|
1005
|
+
};
|
|
1006
|
+
|
|
755
1007
|
declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
|
|
756
1008
|
|
|
757
1009
|
export declare type SelectionState = Record<Level, string | null>;
|
|
@@ -821,6 +1073,7 @@ declare type TablePreferences = {
|
|
|
821
1073
|
columnSizing?: ColumnSizingState;
|
|
822
1074
|
pageSize?: number;
|
|
823
1075
|
enableDevModePagination?: boolean;
|
|
1076
|
+
forceClientPagination?: boolean;
|
|
824
1077
|
};
|
|
825
1078
|
|
|
826
1079
|
export declare type TBaseQuery = {
|
|
@@ -832,6 +1085,104 @@ export declare type TBaseQuery = {
|
|
|
832
1085
|
description?: string;
|
|
833
1086
|
};
|
|
834
1087
|
|
|
1088
|
+
export declare type TBubbleScatterConfig = {
|
|
1089
|
+
/**
|
|
1090
|
+
* Explicit key for X-axis metric. Falls back to auto-detection.
|
|
1091
|
+
*/
|
|
1092
|
+
xMetricKey?: string;
|
|
1093
|
+
/**
|
|
1094
|
+
* Explicit key for Y-axis metric. Falls back to auto-detection.
|
|
1095
|
+
*/
|
|
1096
|
+
yMetricKey?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Explicit key for radius metric (bubble only). Falls back to auto-detection.
|
|
1099
|
+
*/
|
|
1100
|
+
radiusMetricKey?: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* Key for point labels (first dimension).
|
|
1103
|
+
*/
|
|
1104
|
+
labelKey?: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* Whether to group points into series. Defaults to auto-detect in card config mode.
|
|
1107
|
+
*/
|
|
1108
|
+
enableGrouping?: boolean;
|
|
1109
|
+
/**
|
|
1110
|
+
* Key for series grouping. Can be any data type (string, number, date).
|
|
1111
|
+
*/
|
|
1112
|
+
groupKey?: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Scaling mode for bubble radius.
|
|
1115
|
+
*/
|
|
1116
|
+
radiusScale?: 'linear' | 'sqrt' | 'fixed';
|
|
1117
|
+
/**
|
|
1118
|
+
* Fixed radius value when radiusScale is 'fixed' or for scatter charts.
|
|
1119
|
+
*/
|
|
1120
|
+
fixedRadius?: number;
|
|
1121
|
+
/**
|
|
1122
|
+
* Minimum radius for bubble scaling.
|
|
1123
|
+
*/
|
|
1124
|
+
minRadius?: number;
|
|
1125
|
+
/**
|
|
1126
|
+
* Maximum radius for bubble scaling.
|
|
1127
|
+
*/
|
|
1128
|
+
maxRadius?: number;
|
|
1129
|
+
};
|
|
1130
|
+
|
|
1131
|
+
export declare type TBulletConfig = {
|
|
1132
|
+
/**
|
|
1133
|
+
* Orientation of the bullet chart. Defaults to horizontal.
|
|
1134
|
+
*/
|
|
1135
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1136
|
+
/**
|
|
1137
|
+
* Explicit metric key to use for target markers. Falls back to the next metric column.
|
|
1138
|
+
*/
|
|
1139
|
+
targetMetricKey?: string;
|
|
1140
|
+
/**
|
|
1141
|
+
* Optional comparative metric (e.g., previous period).
|
|
1142
|
+
*/
|
|
1143
|
+
comparativeMetricKey?: string;
|
|
1144
|
+
/**
|
|
1145
|
+
* When true, disables automatic comparative assignment even if a metric exists.
|
|
1146
|
+
*/
|
|
1147
|
+
disableAutoComparative?: boolean;
|
|
1148
|
+
/**
|
|
1149
|
+
* Mapping of qualitative range names to column keys.
|
|
1150
|
+
*/
|
|
1151
|
+
rangeKeys?: TBulletRangeKeys;
|
|
1152
|
+
/**
|
|
1153
|
+
* Static range values if columns are not provided.
|
|
1154
|
+
*/
|
|
1155
|
+
ranges?: TBulletRangeValues;
|
|
1156
|
+
/**
|
|
1157
|
+
* Global target value if a column is not provided.
|
|
1158
|
+
*/
|
|
1159
|
+
targetValue?: number;
|
|
1160
|
+
/**
|
|
1161
|
+
* Show numeric labels on the actual bar. Default true.
|
|
1162
|
+
*/
|
|
1163
|
+
showValueLabels?: boolean;
|
|
1164
|
+
/**
|
|
1165
|
+
* Treat provided range values as percentages (0-1) when true.
|
|
1166
|
+
*/
|
|
1167
|
+
rangesArePercentages?: boolean;
|
|
1168
|
+
/**
|
|
1169
|
+
* Whether qualitative ranges should be rendered.
|
|
1170
|
+
*/
|
|
1171
|
+
showRanges?: boolean;
|
|
1172
|
+
/**
|
|
1173
|
+
* Display labels for qualitative ranges.
|
|
1174
|
+
*/
|
|
1175
|
+
rangeLabels?: TBulletRangeLabelOverrides;
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
export declare type TBulletRangeKeys = Partial<Record<TBulletRangeLabels, string>>;
|
|
1179
|
+
|
|
1180
|
+
export declare type TBulletRangeLabelOverrides = Partial<Record<TBulletRangeLabels, string>>;
|
|
1181
|
+
|
|
1182
|
+
export declare type TBulletRangeLabels = 'poor' | 'satisfactory' | 'good';
|
|
1183
|
+
|
|
1184
|
+
export declare type TBulletRangeValues = Partial<Record<TBulletRangeLabels, number>>;
|
|
1185
|
+
|
|
835
1186
|
export declare type TCard = {
|
|
836
1187
|
id: string;
|
|
837
1188
|
title: string;
|
|
@@ -862,6 +1213,11 @@ export declare type TCard = {
|
|
|
862
1213
|
* If not specified, the card will use the dashboard's display preferences.
|
|
863
1214
|
*/
|
|
864
1215
|
displayPreferences?: VisualDisplayPreferences;
|
|
1216
|
+
/**
|
|
1217
|
+
* Inline filter definitions for this card.
|
|
1218
|
+
* Configured by editors via the visual editor settings.
|
|
1219
|
+
*/
|
|
1220
|
+
inlineFilters?: TInlineFilter[];
|
|
865
1221
|
};
|
|
866
1222
|
|
|
867
1223
|
export declare type TCardContext = {
|
|
@@ -893,6 +1249,10 @@ export declare type TCardPreferences = {
|
|
|
893
1249
|
xAxisConfig?: AxisConfig;
|
|
894
1250
|
yAxisConfig?: AxisConfig;
|
|
895
1251
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1252
|
+
bulletConfig?: TBulletConfig;
|
|
1253
|
+
heatmapConfig?: THeatmapConfig;
|
|
1254
|
+
bubbleScatterConfig?: TBubbleScatterConfig;
|
|
1255
|
+
funnelConfig?: TFunnelConfig;
|
|
896
1256
|
tablePrefs?: TablePreferences;
|
|
897
1257
|
allowDownload?: boolean;
|
|
898
1258
|
customVisualCode?: string;
|
|
@@ -947,6 +1307,7 @@ export declare type TCardPreferences = {
|
|
|
947
1307
|
showCardToolbar?: boolean;
|
|
948
1308
|
showChrome?: boolean;
|
|
949
1309
|
allowScroll?: boolean;
|
|
1310
|
+
showInlineFilterBar?: boolean;
|
|
950
1311
|
};
|
|
951
1312
|
};
|
|
952
1313
|
|
|
@@ -983,9 +1344,10 @@ export declare type TChartOptions = {
|
|
|
983
1344
|
anchor?: string;
|
|
984
1345
|
};
|
|
985
1346
|
};
|
|
1347
|
+
treemapColorMode?: 'branch' | 'category';
|
|
986
1348
|
};
|
|
987
1349
|
|
|
988
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
1350
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'aggregateTable' | 'tableBuilder' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'bullet' | 'heatmap' | 'treemap' | 'custom';
|
|
989
1351
|
|
|
990
1352
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
991
1353
|
columnIdx: number;
|
|
@@ -1015,6 +1377,14 @@ export declare type TCustomCardPreferences = {
|
|
|
1015
1377
|
}[];
|
|
1016
1378
|
};
|
|
1017
1379
|
|
|
1380
|
+
declare type TCustomFilterPreferences = {
|
|
1381
|
+
url: string;
|
|
1382
|
+
componentName: string;
|
|
1383
|
+
pluginFilterType?: string;
|
|
1384
|
+
icon?: string;
|
|
1385
|
+
settings?: Record<string, string | number | boolean>;
|
|
1386
|
+
};
|
|
1387
|
+
|
|
1018
1388
|
export declare type TDashboard = {
|
|
1019
1389
|
id: string;
|
|
1020
1390
|
title?: string;
|
|
@@ -1047,7 +1417,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1047
1417
|
anchor?: 'center' | 'start' | 'end';
|
|
1048
1418
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1049
1419
|
display?: 'auto' | boolean;
|
|
1050
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1420
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1051
1421
|
formatOptions?: TFormatOptions;
|
|
1052
1422
|
font?: {
|
|
1053
1423
|
size?: number;
|
|
@@ -1058,6 +1428,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1058
1428
|
clip?: boolean;
|
|
1059
1429
|
rotation?: number;
|
|
1060
1430
|
showTotal?: boolean;
|
|
1431
|
+
offset?: number;
|
|
1061
1432
|
};
|
|
1062
1433
|
|
|
1063
1434
|
export declare type TDatasetOptions = {
|
|
@@ -1085,7 +1456,10 @@ export declare type TEvent = {
|
|
|
1085
1456
|
|
|
1086
1457
|
declare type TFilter = {
|
|
1087
1458
|
type?: 'single' | 'multiple';
|
|
1088
|
-
uiType?: 'radio' | 'dropdown';
|
|
1459
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1460
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1461
|
+
defaultValues?: (string | number)[];
|
|
1462
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1089
1463
|
sheetId?: string;
|
|
1090
1464
|
location?: FilterLocation;
|
|
1091
1465
|
hide?: boolean;
|
|
@@ -1098,10 +1472,14 @@ declare type TFilter = {
|
|
|
1098
1472
|
database: string;
|
|
1099
1473
|
sql: string;
|
|
1100
1474
|
operation: Operation;
|
|
1475
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1101
1476
|
applyToSheetIds?: string[];
|
|
1102
1477
|
excludeSheetIds?: string[];
|
|
1103
1478
|
applyToCardIds?: string[];
|
|
1104
1479
|
excludeCardIds?: string[];
|
|
1480
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1481
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1482
|
+
showLabel?: boolean;
|
|
1105
1483
|
};
|
|
1106
1484
|
|
|
1107
1485
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
@@ -1127,6 +1505,50 @@ export declare type TFrame = {
|
|
|
1127
1505
|
activeCardId: string;
|
|
1128
1506
|
};
|
|
1129
1507
|
|
|
1508
|
+
export declare type TFunnelConfig = {
|
|
1509
|
+
/**
|
|
1510
|
+
* How to calculate percentage in tooltips and data labels.
|
|
1511
|
+
* - 'percentOfTotal': Each stage shows % of total sum (default/current behavior)
|
|
1512
|
+
* - 'percentOfFirst': First stage = 100%, others relative to first
|
|
1513
|
+
*/
|
|
1514
|
+
percentMode?: TFunnelPercentMode;
|
|
1515
|
+
/**
|
|
1516
|
+
* Controls how much funnel segments narrow based on their values.
|
|
1517
|
+
* - 0: No shrink (all segments same width)
|
|
1518
|
+
* - 1: Full shrink (segments narrow proportionally to values, default)
|
|
1519
|
+
* Lower values prevent segments from becoming too narrow for labels.
|
|
1520
|
+
*/
|
|
1521
|
+
shrinkFraction?: number;
|
|
1522
|
+
/**
|
|
1523
|
+
* Hide labels for segments smaller than this percentage of total.
|
|
1524
|
+
* - 0: Show all labels (default)
|
|
1525
|
+
* - 10: Hide labels for segments < 10% of total
|
|
1526
|
+
* Range: 0-25
|
|
1527
|
+
*/
|
|
1528
|
+
labelThreshold?: number;
|
|
1529
|
+
};
|
|
1530
|
+
|
|
1531
|
+
/**
|
|
1532
|
+
* Tooltip/data label percentage calculation mode for funnel charts.
|
|
1533
|
+
* - 'percentOfTotal': Percentage relative to sum of all values (default)
|
|
1534
|
+
* - 'percentOfFirst': Percentage relative to the first stage value (first stage = 100%)
|
|
1535
|
+
*/
|
|
1536
|
+
export declare type TFunnelPercentMode = 'percentOfTotal' | 'percentOfFirst';
|
|
1537
|
+
|
|
1538
|
+
export declare type THeatmapConfig = {
|
|
1539
|
+
colorMode?: 'continuous' | 'stepped';
|
|
1540
|
+
steps?: number;
|
|
1541
|
+
colorRange?: [string, string];
|
|
1542
|
+
colorPalette?: 'blue' | 'green' | 'purple' | 'orange' | 'custom';
|
|
1543
|
+
showLegend?: boolean;
|
|
1544
|
+
legendPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
1545
|
+
showDataLabels?: boolean;
|
|
1546
|
+
nullFillColor?: string;
|
|
1547
|
+
fillMissingCells?: boolean;
|
|
1548
|
+
xAxisBuckets?: string[];
|
|
1549
|
+
yAxisBuckets?: string[];
|
|
1550
|
+
};
|
|
1551
|
+
|
|
1130
1552
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1131
1553
|
|
|
1132
1554
|
declare interface TimeDrillStep {
|
|
@@ -1138,10 +1560,49 @@ declare interface TimeDrillStep {
|
|
|
1138
1560
|
|
|
1139
1561
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1140
1562
|
|
|
1563
|
+
/**
|
|
1564
|
+
* Inline filter definition stored on a card.
|
|
1565
|
+
* Inline filters appear on the right-hand side of the card header,
|
|
1566
|
+
* allowing ad-hoc data exploration without affecting other cards.
|
|
1567
|
+
*/
|
|
1568
|
+
export declare type TInlineFilter = {
|
|
1569
|
+
id: string;
|
|
1570
|
+
column: string;
|
|
1571
|
+
title: string;
|
|
1572
|
+
dataType: string;
|
|
1573
|
+
table: string;
|
|
1574
|
+
database: string;
|
|
1575
|
+
connectionId: string;
|
|
1576
|
+
operation: Operation;
|
|
1577
|
+
sql: string;
|
|
1578
|
+
/** Selection type: 'single' allows one value, 'multiple' allows many */
|
|
1579
|
+
type?: 'single' | 'multiple';
|
|
1580
|
+
/** UI component for single-select filters */
|
|
1581
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1582
|
+
/** Date picker type: 'range' for full calendar, 'months' for month picker */
|
|
1583
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1584
|
+
/** Default values applied when the dashboard first loads */
|
|
1585
|
+
defaultValues?: (string | number)[];
|
|
1586
|
+
/** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
|
|
1587
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1588
|
+
/** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
|
|
1589
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1590
|
+
/** Custom filter UI from a plugin */
|
|
1591
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1592
|
+
/** Width of the inline filter in pixels (default: 250) */
|
|
1593
|
+
width?: number;
|
|
1594
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1595
|
+
showLabel?: boolean;
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1141
1598
|
export declare type TLegendOptions = {
|
|
1142
1599
|
display?: boolean;
|
|
1143
1600
|
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
1144
1601
|
align?: 'start' | 'center' | 'end';
|
|
1602
|
+
labels?: {
|
|
1603
|
+
generateLabels?: (chart: any) => any[];
|
|
1604
|
+
[key: string]: any;
|
|
1605
|
+
};
|
|
1145
1606
|
};
|
|
1146
1607
|
|
|
1147
1608
|
export declare type TLens = {
|
|
@@ -1171,10 +1632,56 @@ export declare type TStyle = {
|
|
|
1171
1632
|
dark?: StyleProps;
|
|
1172
1633
|
};
|
|
1173
1634
|
|
|
1635
|
+
export declare interface UpdateUserPreferenceRequest {
|
|
1636
|
+
defaultDashboardId: string | null;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
/**
|
|
1640
|
+
* URL Parameter for drill-to-URL interpolation
|
|
1641
|
+
* Represents a placeholder in the URL template (e.g., {{product_id}})
|
|
1642
|
+
*/
|
|
1643
|
+
declare interface URLParameter {
|
|
1644
|
+
/**
|
|
1645
|
+
* Unique identifier for the parameter (e.g., 'product_id', 'card_id')
|
|
1646
|
+
* Used in template as {{id}}
|
|
1647
|
+
*/
|
|
1648
|
+
id: string;
|
|
1649
|
+
/**
|
|
1650
|
+
* Display label for the parameter
|
|
1651
|
+
*/
|
|
1652
|
+
label: string;
|
|
1653
|
+
/**
|
|
1654
|
+
* Category of the parameter
|
|
1655
|
+
* - attribute: From card dimensions/attributes (e.g., product name, region)
|
|
1656
|
+
* - identifier: System values (card_id, frame_id, sheet_id)
|
|
1657
|
+
*/
|
|
1658
|
+
category: 'attribute' | 'identifier';
|
|
1659
|
+
/**
|
|
1660
|
+
* For attribute parameters: the complete field object
|
|
1661
|
+
* Provides access to all field properties (name, qualifiedFieldName, dataType, etc.)
|
|
1662
|
+
*/
|
|
1663
|
+
field?: Field;
|
|
1664
|
+
}
|
|
1665
|
+
|
|
1666
|
+
export declare interface UserPreference {
|
|
1667
|
+
id: string;
|
|
1668
|
+
actorType: 'ORG_USER' | 'TENANT_USER';
|
|
1669
|
+
projectId: string;
|
|
1670
|
+
defaultDashboardId: string | null;
|
|
1671
|
+
defaultDashboard?: {
|
|
1672
|
+
id: string;
|
|
1673
|
+
title: string;
|
|
1674
|
+
description: string;
|
|
1675
|
+
};
|
|
1676
|
+
preferences: Record<string, any> | null;
|
|
1677
|
+
createdAt: string;
|
|
1678
|
+
updatedAt: string;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1174
1681
|
/**
|
|
1175
1682
|
* Display mode for visual components - controls which UI elements are shown
|
|
1176
1683
|
*/
|
|
1177
|
-
export declare type VisualDisplayMode = 'full' | '
|
|
1684
|
+
export declare type VisualDisplayMode = 'full' | 'print' | 'table-print';
|
|
1178
1685
|
|
|
1179
1686
|
/**
|
|
1180
1687
|
* Display preferences for controlling visual component rendering
|
|
@@ -1183,9 +1690,8 @@ export declare type VisualDisplayPreferences = {
|
|
|
1183
1690
|
/**
|
|
1184
1691
|
* Predefined display mode
|
|
1185
1692
|
* - 'full': All UI elements (default)
|
|
1186
|
-
* - 'content-only': Just the visualization/table content
|
|
1187
1693
|
* - 'print': Optimized for printing (shows title and description, hides interactive elements)
|
|
1188
|
-
* - '
|
|
1694
|
+
* - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
|
|
1189
1695
|
*/
|
|
1190
1696
|
mode?: VisualDisplayMode;
|
|
1191
1697
|
/**
|