semaphor 0.0.129 → 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-CE57mw6l.js → index-QdSI9E0a.js} +82751 -68873
- 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 +2 -2
- package/dist/index.js +138 -161
- 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 +500 -16
- package/dist/types/main.d.ts +882 -82
- package/dist/types/surfboard.d.ts +500 -16
- package/dist/types/types.d.ts +500 -16
- package/package.json +11 -7
- package/dist/chunks/dashboard-plus-BZ8k_sGe.js +0 -280
- package/dist/chunks/dashboard-plus-qMRXHdYf.js +0 -20761
- package/dist/chunks/index-Bo0bvCRT.js +0 -975
|
@@ -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[];
|
|
@@ -106,6 +148,7 @@ declare interface CardConfig {
|
|
|
106
148
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
107
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,18 +402,33 @@ export declare type DateOptions = {
|
|
|
347
402
|
options: Intl.DateTimeFormatOptions;
|
|
348
403
|
};
|
|
349
404
|
|
|
405
|
+
declare type DateSelectionMode = 'range' | 'months';
|
|
406
|
+
|
|
350
407
|
declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
351
408
|
|
|
352
|
-
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
|
|
409
|
+
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
353
410
|
|
|
354
411
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
355
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
|
+
|
|
356
425
|
declare interface DrillHierarchy {
|
|
357
426
|
id: string;
|
|
358
427
|
label?: string;
|
|
359
|
-
type: 'static';
|
|
428
|
+
type: 'static' | 'date';
|
|
360
429
|
steps: DrillHierarchyStep[];
|
|
361
430
|
default?: boolean;
|
|
431
|
+
baseField?: Field;
|
|
362
432
|
}
|
|
363
433
|
|
|
364
434
|
declare interface DrillHierarchyStep {
|
|
@@ -371,34 +441,116 @@ declare interface DrillHierarchyStep {
|
|
|
371
441
|
linkedInsightId?: string;
|
|
372
442
|
}
|
|
373
443
|
|
|
374
|
-
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
375
|
-
|
|
376
444
|
declare interface DrillThroughInteraction {
|
|
377
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;
|
|
378
451
|
filterFields: Field[];
|
|
379
|
-
|
|
452
|
+
targetDashboardId: string;
|
|
453
|
+
/**
|
|
454
|
+
* How to pass context to the target dashboard
|
|
455
|
+
* @default 'interactionFilters'
|
|
456
|
+
*/
|
|
457
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
380
458
|
label?: string;
|
|
381
459
|
}
|
|
382
460
|
|
|
383
461
|
declare interface DrillToDetailInteraction {
|
|
384
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;
|
|
385
468
|
filterFields: Field[];
|
|
386
469
|
detailFields?: Field[];
|
|
387
470
|
sortBy?: SortByField[];
|
|
388
471
|
limit?: number;
|
|
389
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';
|
|
390
487
|
label?: string;
|
|
391
488
|
}
|
|
392
489
|
|
|
393
490
|
declare interface DrillToURLInteraction {
|
|
394
491
|
mode: 'drillToURL';
|
|
492
|
+
/**
|
|
493
|
+
* What element must be clicked to trigger this URL drill.
|
|
494
|
+
*/
|
|
495
|
+
trigger?: InteractionTrigger;
|
|
395
496
|
filterFields: Field[];
|
|
497
|
+
/**
|
|
498
|
+
* URL template with placeholders (e.g., 'https://example.com/product/{{product_id}}')
|
|
499
|
+
*/
|
|
396
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;
|
|
397
528
|
label?: string;
|
|
398
529
|
}
|
|
399
530
|
|
|
400
531
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
401
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
|
+
|
|
402
554
|
export declare type EmailSettings = {
|
|
403
555
|
companyName: string;
|
|
404
556
|
dashboardUrl: string;
|
|
@@ -408,7 +560,7 @@ export declare type EmailSettings = {
|
|
|
408
560
|
|
|
409
561
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
410
562
|
|
|
411
|
-
declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
563
|
+
declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
412
564
|
|
|
413
565
|
export declare type ErrorProps = {
|
|
414
566
|
message?: string;
|
|
@@ -533,7 +685,7 @@ declare interface FilterGroup {
|
|
|
533
685
|
groups: FilterGroup[];
|
|
534
686
|
}
|
|
535
687
|
|
|
536
|
-
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
688
|
+
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
537
689
|
|
|
538
690
|
declare type FilterOnClick = {
|
|
539
691
|
expression?: string;
|
|
@@ -547,6 +699,7 @@ export declare type GetDashboardResponse = {
|
|
|
547
699
|
lenses: TLens[];
|
|
548
700
|
filterValues?: TFilterValue[];
|
|
549
701
|
defaultLensId?: string;
|
|
702
|
+
assistantProfileId?: string;
|
|
550
703
|
};
|
|
551
704
|
|
|
552
705
|
export declare type GetPluginsResponse = {
|
|
@@ -582,12 +735,72 @@ export declare type HtmlOptions = {
|
|
|
582
735
|
|
|
583
736
|
declare interface InlineDrillInteraction {
|
|
584
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;
|
|
585
743
|
filterFields: Field[];
|
|
744
|
+
/**
|
|
745
|
+
* When to fetch the detailed data
|
|
746
|
+
* @default 'lazy'
|
|
747
|
+
*/
|
|
586
748
|
fetchMode?: 'lazy' | 'preloaded';
|
|
749
|
+
/**
|
|
750
|
+
* Maximum number of records to show (0 for unlimited)
|
|
751
|
+
* @default 100
|
|
752
|
+
*/
|
|
587
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;
|
|
588
769
|
label?: string;
|
|
589
770
|
}
|
|
590
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
|
+
|
|
591
804
|
declare interface Join {
|
|
592
805
|
id: string;
|
|
593
806
|
source: DatabaseEntityReference;
|
|
@@ -623,6 +836,14 @@ export declare type KPICardProps = {
|
|
|
623
836
|
|
|
624
837
|
export declare type Level = 'database' | 'schema' | 'table';
|
|
625
838
|
|
|
839
|
+
declare interface LinkFormat {
|
|
840
|
+
urlTemplate: string;
|
|
841
|
+
labelType: 'value' | 'static' | 'column';
|
|
842
|
+
staticLabel?: string;
|
|
843
|
+
labelColumn?: string;
|
|
844
|
+
openInNewTab: boolean;
|
|
845
|
+
}
|
|
846
|
+
|
|
626
847
|
export declare type LoadingProps = {
|
|
627
848
|
message?: string;
|
|
628
849
|
};
|
|
@@ -667,6 +888,15 @@ declare interface MetricField extends Field {
|
|
|
667
888
|
};
|
|
668
889
|
aliasTemplate?: string;
|
|
669
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;
|
|
670
900
|
}
|
|
671
901
|
|
|
672
902
|
declare type NoneOptions = {};
|
|
@@ -843,6 +1073,7 @@ declare type TablePreferences = {
|
|
|
843
1073
|
columnSizing?: ColumnSizingState;
|
|
844
1074
|
pageSize?: number;
|
|
845
1075
|
enableDevModePagination?: boolean;
|
|
1076
|
+
forceClientPagination?: boolean;
|
|
846
1077
|
};
|
|
847
1078
|
|
|
848
1079
|
export declare type TBaseQuery = {
|
|
@@ -854,6 +1085,104 @@ export declare type TBaseQuery = {
|
|
|
854
1085
|
description?: string;
|
|
855
1086
|
};
|
|
856
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
|
+
|
|
857
1186
|
export declare type TCard = {
|
|
858
1187
|
id: string;
|
|
859
1188
|
title: string;
|
|
@@ -884,6 +1213,11 @@ export declare type TCard = {
|
|
|
884
1213
|
* If not specified, the card will use the dashboard's display preferences.
|
|
885
1214
|
*/
|
|
886
1215
|
displayPreferences?: VisualDisplayPreferences;
|
|
1216
|
+
/**
|
|
1217
|
+
* Inline filter definitions for this card.
|
|
1218
|
+
* Configured by editors via the visual editor settings.
|
|
1219
|
+
*/
|
|
1220
|
+
inlineFilters?: TInlineFilter[];
|
|
887
1221
|
};
|
|
888
1222
|
|
|
889
1223
|
export declare type TCardContext = {
|
|
@@ -915,6 +1249,10 @@ export declare type TCardPreferences = {
|
|
|
915
1249
|
xAxisConfig?: AxisConfig;
|
|
916
1250
|
yAxisConfig?: AxisConfig;
|
|
917
1251
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1252
|
+
bulletConfig?: TBulletConfig;
|
|
1253
|
+
heatmapConfig?: THeatmapConfig;
|
|
1254
|
+
bubbleScatterConfig?: TBubbleScatterConfig;
|
|
1255
|
+
funnelConfig?: TFunnelConfig;
|
|
918
1256
|
tablePrefs?: TablePreferences;
|
|
919
1257
|
allowDownload?: boolean;
|
|
920
1258
|
customVisualCode?: string;
|
|
@@ -969,6 +1307,7 @@ export declare type TCardPreferences = {
|
|
|
969
1307
|
showCardToolbar?: boolean;
|
|
970
1308
|
showChrome?: boolean;
|
|
971
1309
|
allowScroll?: boolean;
|
|
1310
|
+
showInlineFilterBar?: boolean;
|
|
972
1311
|
};
|
|
973
1312
|
};
|
|
974
1313
|
|
|
@@ -1005,9 +1344,10 @@ export declare type TChartOptions = {
|
|
|
1005
1344
|
anchor?: string;
|
|
1006
1345
|
};
|
|
1007
1346
|
};
|
|
1347
|
+
treemapColorMode?: 'branch' | 'category';
|
|
1008
1348
|
};
|
|
1009
1349
|
|
|
1010
|
-
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';
|
|
1011
1351
|
|
|
1012
1352
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
1013
1353
|
columnIdx: number;
|
|
@@ -1037,6 +1377,14 @@ export declare type TCustomCardPreferences = {
|
|
|
1037
1377
|
}[];
|
|
1038
1378
|
};
|
|
1039
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
|
+
|
|
1040
1388
|
export declare type TDashboard = {
|
|
1041
1389
|
id: string;
|
|
1042
1390
|
title?: string;
|
|
@@ -1069,7 +1417,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1069
1417
|
anchor?: 'center' | 'start' | 'end';
|
|
1070
1418
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1071
1419
|
display?: 'auto' | boolean;
|
|
1072
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1420
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1073
1421
|
formatOptions?: TFormatOptions;
|
|
1074
1422
|
font?: {
|
|
1075
1423
|
size?: number;
|
|
@@ -1080,6 +1428,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1080
1428
|
clip?: boolean;
|
|
1081
1429
|
rotation?: number;
|
|
1082
1430
|
showTotal?: boolean;
|
|
1431
|
+
offset?: number;
|
|
1083
1432
|
};
|
|
1084
1433
|
|
|
1085
1434
|
export declare type TDatasetOptions = {
|
|
@@ -1107,7 +1456,10 @@ export declare type TEvent = {
|
|
|
1107
1456
|
|
|
1108
1457
|
declare type TFilter = {
|
|
1109
1458
|
type?: 'single' | 'multiple';
|
|
1110
|
-
uiType?: 'radio' | 'dropdown';
|
|
1459
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1460
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1461
|
+
defaultValues?: (string | number)[];
|
|
1462
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1111
1463
|
sheetId?: string;
|
|
1112
1464
|
location?: FilterLocation;
|
|
1113
1465
|
hide?: boolean;
|
|
@@ -1120,10 +1472,14 @@ declare type TFilter = {
|
|
|
1120
1472
|
database: string;
|
|
1121
1473
|
sql: string;
|
|
1122
1474
|
operation: Operation;
|
|
1475
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1123
1476
|
applyToSheetIds?: string[];
|
|
1124
1477
|
excludeSheetIds?: string[];
|
|
1125
1478
|
applyToCardIds?: string[];
|
|
1126
1479
|
excludeCardIds?: string[];
|
|
1480
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1481
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1482
|
+
showLabel?: boolean;
|
|
1127
1483
|
};
|
|
1128
1484
|
|
|
1129
1485
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
@@ -1149,6 +1505,50 @@ export declare type TFrame = {
|
|
|
1149
1505
|
activeCardId: string;
|
|
1150
1506
|
};
|
|
1151
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
|
+
|
|
1152
1552
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1153
1553
|
|
|
1154
1554
|
declare interface TimeDrillStep {
|
|
@@ -1160,10 +1560,49 @@ declare interface TimeDrillStep {
|
|
|
1160
1560
|
|
|
1161
1561
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1162
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
|
+
|
|
1163
1598
|
export declare type TLegendOptions = {
|
|
1164
1599
|
display?: boolean;
|
|
1165
1600
|
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
1166
1601
|
align?: 'start' | 'center' | 'end';
|
|
1602
|
+
labels?: {
|
|
1603
|
+
generateLabels?: (chart: any) => any[];
|
|
1604
|
+
[key: string]: any;
|
|
1605
|
+
};
|
|
1167
1606
|
};
|
|
1168
1607
|
|
|
1169
1608
|
export declare type TLens = {
|
|
@@ -1193,10 +1632,56 @@ export declare type TStyle = {
|
|
|
1193
1632
|
dark?: StyleProps;
|
|
1194
1633
|
};
|
|
1195
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
|
+
|
|
1196
1681
|
/**
|
|
1197
1682
|
* Display mode for visual components - controls which UI elements are shown
|
|
1198
1683
|
*/
|
|
1199
|
-
export declare type VisualDisplayMode = 'full' | '
|
|
1684
|
+
export declare type VisualDisplayMode = 'full' | 'print' | 'table-print';
|
|
1200
1685
|
|
|
1201
1686
|
/**
|
|
1202
1687
|
* Display preferences for controlling visual component rendering
|
|
@@ -1205,9 +1690,8 @@ export declare type VisualDisplayPreferences = {
|
|
|
1205
1690
|
/**
|
|
1206
1691
|
* Predefined display mode
|
|
1207
1692
|
* - 'full': All UI elements (default)
|
|
1208
|
-
* - 'content-only': Just the visualization/table content
|
|
1209
1693
|
* - 'print': Optimized for printing (shows title and description, hides interactive elements)
|
|
1210
|
-
* - '
|
|
1694
|
+
* - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
|
|
1211
1695
|
*/
|
|
1212
1696
|
mode?: VisualDisplayMode;
|
|
1213
1697
|
/**
|