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
|
|
|
@@ -318,7 +373,7 @@ declare interface DatabaseEntityReference {
|
|
|
318
373
|
name: string;
|
|
319
374
|
}
|
|
320
375
|
|
|
321
|
-
declare type DatabaseEntityType = 'table' | 'view';
|
|
376
|
+
declare type DatabaseEntityType = 'table' | 'view' | 'materialized view';
|
|
322
377
|
|
|
323
378
|
declare interface DataModelEntityReference extends DatabaseEntityReference {
|
|
324
379
|
type: 'model';
|
|
@@ -350,18 +405,33 @@ export declare type DateOptions = {
|
|
|
350
405
|
options: Intl.DateTimeFormatOptions;
|
|
351
406
|
};
|
|
352
407
|
|
|
408
|
+
declare type DateSelectionMode = 'range' | 'months';
|
|
409
|
+
|
|
353
410
|
declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
354
411
|
|
|
355
|
-
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
|
|
412
|
+
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
356
413
|
|
|
357
414
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
358
415
|
|
|
416
|
+
declare interface DrillDownInteraction {
|
|
417
|
+
mode: 'drillDown';
|
|
418
|
+
/**
|
|
419
|
+
* What element must be clicked to trigger this drill-down.
|
|
420
|
+
* Optional during configuration, but must be defined before execution.
|
|
421
|
+
*/
|
|
422
|
+
trigger?: InteractionTrigger;
|
|
423
|
+
filterFields: Field[];
|
|
424
|
+
hierarchyId?: string;
|
|
425
|
+
label?: string;
|
|
426
|
+
}
|
|
427
|
+
|
|
359
428
|
declare interface DrillHierarchy {
|
|
360
429
|
id: string;
|
|
361
430
|
label?: string;
|
|
362
|
-
type: 'static';
|
|
431
|
+
type: 'static' | 'date';
|
|
363
432
|
steps: DrillHierarchyStep[];
|
|
364
433
|
default?: boolean;
|
|
434
|
+
baseField?: Field;
|
|
365
435
|
}
|
|
366
436
|
|
|
367
437
|
declare interface DrillHierarchyStep {
|
|
@@ -374,34 +444,116 @@ declare interface DrillHierarchyStep {
|
|
|
374
444
|
linkedInsightId?: string;
|
|
375
445
|
}
|
|
376
446
|
|
|
377
|
-
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
378
|
-
|
|
379
447
|
declare interface DrillThroughInteraction {
|
|
380
448
|
mode: 'drillThrough';
|
|
449
|
+
/**
|
|
450
|
+
* What element must be clicked to trigger this drill-through.
|
|
451
|
+
* @migration Optional during migration. Will be required in V2.
|
|
452
|
+
*/
|
|
453
|
+
trigger?: InteractionTrigger;
|
|
381
454
|
filterFields: Field[];
|
|
382
|
-
|
|
455
|
+
targetDashboardId: string;
|
|
456
|
+
/**
|
|
457
|
+
* How to pass context to the target dashboard
|
|
458
|
+
* @default 'interactionFilters'
|
|
459
|
+
*/
|
|
460
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
383
461
|
label?: string;
|
|
384
462
|
}
|
|
385
463
|
|
|
386
464
|
declare interface DrillToDetailInteraction {
|
|
387
465
|
mode: 'drillToDetail';
|
|
466
|
+
/**
|
|
467
|
+
* What element must be clicked to trigger this drill to detail.
|
|
468
|
+
* @migration Optional during migration. Will be required in V2.
|
|
469
|
+
*/
|
|
470
|
+
trigger?: InteractionTrigger;
|
|
388
471
|
filterFields: Field[];
|
|
389
472
|
detailFields?: Field[];
|
|
390
473
|
sortBy?: SortByField[];
|
|
391
474
|
limit?: number;
|
|
392
475
|
detailTitle?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Target insight ID to navigate to
|
|
478
|
+
*/
|
|
479
|
+
targetInsightId?: string;
|
|
480
|
+
/**
|
|
481
|
+
* How to pass context to the target insight
|
|
482
|
+
* @default 'interactionFilters'
|
|
483
|
+
*/
|
|
484
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
485
|
+
/**
|
|
486
|
+
* How to display the insight
|
|
487
|
+
* @default 'modal'
|
|
488
|
+
*/
|
|
489
|
+
displayMode?: 'modal' | 'replace-card';
|
|
393
490
|
label?: string;
|
|
394
491
|
}
|
|
395
492
|
|
|
396
493
|
declare interface DrillToURLInteraction {
|
|
397
494
|
mode: 'drillToURL';
|
|
495
|
+
/**
|
|
496
|
+
* What element must be clicked to trigger this URL drill.
|
|
497
|
+
*/
|
|
498
|
+
trigger?: InteractionTrigger;
|
|
398
499
|
filterFields: Field[];
|
|
500
|
+
/**
|
|
501
|
+
* URL template with placeholders (e.g., 'https://example.com/product/{{product_id}}')
|
|
502
|
+
*/
|
|
399
503
|
urlTemplate: string;
|
|
504
|
+
/**
|
|
505
|
+
* List of parameters used in the URL template
|
|
506
|
+
*/
|
|
507
|
+
parameters: URLParameter[];
|
|
508
|
+
/**
|
|
509
|
+
* Whether to URL-encode parameter values
|
|
510
|
+
* @default true
|
|
511
|
+
*/
|
|
512
|
+
encodeParameters?: boolean;
|
|
513
|
+
/**
|
|
514
|
+
* Custom label for this interaction in the menu
|
|
515
|
+
*/
|
|
516
|
+
label?: string;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
declare interface DrillUpInteraction {
|
|
520
|
+
mode: 'drillUp';
|
|
521
|
+
/**
|
|
522
|
+
* What element must be clicked to trigger this drill-up.
|
|
523
|
+
* For synthetic drill-up interactions, this is inherited from the original drill-down.
|
|
524
|
+
*/
|
|
525
|
+
trigger?: InteractionTrigger;
|
|
526
|
+
/**
|
|
527
|
+
* The hierarchy ID to reference for display purposes.
|
|
528
|
+
* Used to show the parent level name in the interaction menu.
|
|
529
|
+
*/
|
|
530
|
+
hierarchyId?: string;
|
|
400
531
|
label?: string;
|
|
401
532
|
}
|
|
402
533
|
|
|
403
534
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
404
535
|
|
|
536
|
+
declare interface DynamicDrillInteraction {
|
|
537
|
+
mode: 'dynamicDrill';
|
|
538
|
+
/**
|
|
539
|
+
* What element must be clicked to trigger this dynamic drill menu.
|
|
540
|
+
* When this trigger fires, user sees a menu of available fields to explore.
|
|
541
|
+
*/
|
|
542
|
+
trigger?: InteractionTrigger;
|
|
543
|
+
/**
|
|
544
|
+
* List of fields available for dynamic exploration.
|
|
545
|
+
* User can choose which field to drill into at runtime.
|
|
546
|
+
* Only drillable fields (string, boolean types) should be included.
|
|
547
|
+
*/
|
|
548
|
+
availableFields: Field[];
|
|
549
|
+
/**
|
|
550
|
+
* Optional label for the menu item.
|
|
551
|
+
* Defaults to "Explore Fields" if not specified.
|
|
552
|
+
*/
|
|
553
|
+
label?: string;
|
|
554
|
+
/* Excluded from this release type: drillField */
|
|
555
|
+
}
|
|
556
|
+
|
|
405
557
|
export declare type EmailSettings = {
|
|
406
558
|
companyName: string;
|
|
407
559
|
dashboardUrl: string;
|
|
@@ -411,7 +563,7 @@ export declare type EmailSettings = {
|
|
|
411
563
|
|
|
412
564
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
413
565
|
|
|
414
|
-
declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
566
|
+
declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
415
567
|
|
|
416
568
|
export declare type ErrorProps = {
|
|
417
569
|
message?: string;
|
|
@@ -536,7 +688,7 @@ declare interface FilterGroup {
|
|
|
536
688
|
groups: FilterGroup[];
|
|
537
689
|
}
|
|
538
690
|
|
|
539
|
-
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
691
|
+
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
540
692
|
|
|
541
693
|
declare type FilterOnClick = {
|
|
542
694
|
expression?: string;
|
|
@@ -550,6 +702,7 @@ export declare type GetDashboardResponse = {
|
|
|
550
702
|
lenses: TLens[];
|
|
551
703
|
filterValues?: TFilterValue[];
|
|
552
704
|
defaultLensId?: string;
|
|
705
|
+
assistantProfileId?: string;
|
|
553
706
|
};
|
|
554
707
|
|
|
555
708
|
export declare type GetPluginsResponse = {
|
|
@@ -585,12 +738,72 @@ export declare type HtmlOptions = {
|
|
|
585
738
|
|
|
586
739
|
declare interface InlineDrillInteraction {
|
|
587
740
|
mode: 'inlineDrill';
|
|
741
|
+
/**
|
|
742
|
+
* What element must be clicked to trigger this inline drill.
|
|
743
|
+
* @migration Optional during migration. Will be required in V2.
|
|
744
|
+
*/
|
|
745
|
+
trigger?: InteractionTrigger;
|
|
588
746
|
filterFields: Field[];
|
|
747
|
+
/**
|
|
748
|
+
* When to fetch the detailed data
|
|
749
|
+
* @default 'lazy'
|
|
750
|
+
*/
|
|
589
751
|
fetchMode?: 'lazy' | 'preloaded';
|
|
752
|
+
/**
|
|
753
|
+
* Maximum number of records to show (0 for unlimited)
|
|
754
|
+
* @default 100
|
|
755
|
+
*/
|
|
590
756
|
inlineLimit?: number;
|
|
757
|
+
/**
|
|
758
|
+
* How to display the detailed records
|
|
759
|
+
* @default 'table'
|
|
760
|
+
*/
|
|
761
|
+
displayMode?: 'table' | 'list' | 'cards';
|
|
762
|
+
/**
|
|
763
|
+
* Whether to show records in a modal overlay
|
|
764
|
+
* @default false
|
|
765
|
+
*/
|
|
766
|
+
showInModal?: boolean;
|
|
767
|
+
/**
|
|
768
|
+
* Whether to allow exporting the detailed records
|
|
769
|
+
* @default true
|
|
770
|
+
*/
|
|
771
|
+
allowExport?: boolean;
|
|
591
772
|
label?: string;
|
|
592
773
|
}
|
|
593
774
|
|
|
775
|
+
/**
|
|
776
|
+
* Unified Interaction type (V2)
|
|
777
|
+
* Combines all interaction types into a single union for the new interactions array.
|
|
778
|
+
*/
|
|
779
|
+
declare type Interaction = ClickFilterInteraction | DrillDownInteraction | DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction | DrillUpInteraction | DynamicDrillInteraction;
|
|
780
|
+
|
|
781
|
+
/**
|
|
782
|
+
* Defines what element must be clicked to trigger an interaction.
|
|
783
|
+
*
|
|
784
|
+
* The `type` determines filtering behavior:
|
|
785
|
+
* - 'metric': Captures intersection of ALL dimensions (e.g., country='USA' AND state='CA')
|
|
786
|
+
* - 'attribute': Captures ONLY the clicked dimension (e.g., country='USA')
|
|
787
|
+
*
|
|
788
|
+
* Note: `trigger.type` is different from `field.type`:
|
|
789
|
+
* - trigger.type = filtering behavior ('metric' | 'attribute')
|
|
790
|
+
* - field.type = data type ('dimension' | 'metric' | 'measure')
|
|
791
|
+
*/
|
|
792
|
+
declare interface InteractionTrigger {
|
|
793
|
+
/**
|
|
794
|
+
* Determines filtering behavior when this trigger fires:
|
|
795
|
+
* - 'metric': Capture intersection of all dimensions
|
|
796
|
+
* - 'attribute': Capture only this specific dimension
|
|
797
|
+
*/
|
|
798
|
+
type: 'metric' | 'attribute';
|
|
799
|
+
/**
|
|
800
|
+
* The field (metric or attribute) that must be clicked.
|
|
801
|
+
* For multi-series charts: Use the specific metric Field with unique ID
|
|
802
|
+
* (e.g., Field with id='count_of_orders')
|
|
803
|
+
*/
|
|
804
|
+
field: Field;
|
|
805
|
+
}
|
|
806
|
+
|
|
594
807
|
declare interface Join {
|
|
595
808
|
id: string;
|
|
596
809
|
source: DatabaseEntityReference;
|
|
@@ -626,6 +839,14 @@ export declare type KPICardProps = {
|
|
|
626
839
|
|
|
627
840
|
export declare type Level = 'database' | 'schema' | 'table';
|
|
628
841
|
|
|
842
|
+
declare interface LinkFormat {
|
|
843
|
+
urlTemplate: string;
|
|
844
|
+
labelType: 'value' | 'static' | 'column';
|
|
845
|
+
staticLabel?: string;
|
|
846
|
+
labelColumn?: string;
|
|
847
|
+
openInNewTab: boolean;
|
|
848
|
+
}
|
|
849
|
+
|
|
629
850
|
export declare type LoadingProps = {
|
|
630
851
|
message?: string;
|
|
631
852
|
};
|
|
@@ -670,6 +891,15 @@ declare interface MetricField extends Field {
|
|
|
670
891
|
};
|
|
671
892
|
aliasTemplate?: string;
|
|
672
893
|
valueAliases?: Record<string, string>;
|
|
894
|
+
/**
|
|
895
|
+
* Formula metadata for calculated fields (UI-only metadata)
|
|
896
|
+
* This is supplementary data to help the UI display and edit calculated fields.
|
|
897
|
+
* The `expression` field remains the source of truth for the backend.
|
|
898
|
+
*
|
|
899
|
+
* IMPORTANT: This metadata is ALWAYS updated atomically with the expression field.
|
|
900
|
+
* Both are generated together from the same dialog inputs, preventing drift.
|
|
901
|
+
*/
|
|
902
|
+
calculatedFormula?: CalculatedFieldFormula;
|
|
673
903
|
}
|
|
674
904
|
|
|
675
905
|
declare type NoneOptions = {};
|
|
@@ -848,6 +1078,7 @@ declare type TablePreferences = {
|
|
|
848
1078
|
columnSizing?: ColumnSizingState;
|
|
849
1079
|
pageSize?: number;
|
|
850
1080
|
enableDevModePagination?: boolean;
|
|
1081
|
+
forceClientPagination?: boolean;
|
|
851
1082
|
};
|
|
852
1083
|
|
|
853
1084
|
export declare type TBaseQuery = {
|
|
@@ -859,6 +1090,104 @@ export declare type TBaseQuery = {
|
|
|
859
1090
|
description?: string;
|
|
860
1091
|
};
|
|
861
1092
|
|
|
1093
|
+
export declare type TBubbleScatterConfig = {
|
|
1094
|
+
/**
|
|
1095
|
+
* Explicit key for X-axis metric. Falls back to auto-detection.
|
|
1096
|
+
*/
|
|
1097
|
+
xMetricKey?: string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Explicit key for Y-axis metric. Falls back to auto-detection.
|
|
1100
|
+
*/
|
|
1101
|
+
yMetricKey?: string;
|
|
1102
|
+
/**
|
|
1103
|
+
* Explicit key for radius metric (bubble only). Falls back to auto-detection.
|
|
1104
|
+
*/
|
|
1105
|
+
radiusMetricKey?: string;
|
|
1106
|
+
/**
|
|
1107
|
+
* Key for point labels (first dimension).
|
|
1108
|
+
*/
|
|
1109
|
+
labelKey?: string;
|
|
1110
|
+
/**
|
|
1111
|
+
* Whether to group points into series. Defaults to auto-detect in card config mode.
|
|
1112
|
+
*/
|
|
1113
|
+
enableGrouping?: boolean;
|
|
1114
|
+
/**
|
|
1115
|
+
* Key for series grouping. Can be any data type (string, number, date).
|
|
1116
|
+
*/
|
|
1117
|
+
groupKey?: string;
|
|
1118
|
+
/**
|
|
1119
|
+
* Scaling mode for bubble radius.
|
|
1120
|
+
*/
|
|
1121
|
+
radiusScale?: 'linear' | 'sqrt' | 'fixed';
|
|
1122
|
+
/**
|
|
1123
|
+
* Fixed radius value when radiusScale is 'fixed' or for scatter charts.
|
|
1124
|
+
*/
|
|
1125
|
+
fixedRadius?: number;
|
|
1126
|
+
/**
|
|
1127
|
+
* Minimum radius for bubble scaling.
|
|
1128
|
+
*/
|
|
1129
|
+
minRadius?: number;
|
|
1130
|
+
/**
|
|
1131
|
+
* Maximum radius for bubble scaling.
|
|
1132
|
+
*/
|
|
1133
|
+
maxRadius?: number;
|
|
1134
|
+
};
|
|
1135
|
+
|
|
1136
|
+
export declare type TBulletConfig = {
|
|
1137
|
+
/**
|
|
1138
|
+
* Orientation of the bullet chart. Defaults to horizontal.
|
|
1139
|
+
*/
|
|
1140
|
+
orientation?: 'horizontal' | 'vertical';
|
|
1141
|
+
/**
|
|
1142
|
+
* Explicit metric key to use for target markers. Falls back to the next metric column.
|
|
1143
|
+
*/
|
|
1144
|
+
targetMetricKey?: string;
|
|
1145
|
+
/**
|
|
1146
|
+
* Optional comparative metric (e.g., previous period).
|
|
1147
|
+
*/
|
|
1148
|
+
comparativeMetricKey?: string;
|
|
1149
|
+
/**
|
|
1150
|
+
* When true, disables automatic comparative assignment even if a metric exists.
|
|
1151
|
+
*/
|
|
1152
|
+
disableAutoComparative?: boolean;
|
|
1153
|
+
/**
|
|
1154
|
+
* Mapping of qualitative range names to column keys.
|
|
1155
|
+
*/
|
|
1156
|
+
rangeKeys?: TBulletRangeKeys;
|
|
1157
|
+
/**
|
|
1158
|
+
* Static range values if columns are not provided.
|
|
1159
|
+
*/
|
|
1160
|
+
ranges?: TBulletRangeValues;
|
|
1161
|
+
/**
|
|
1162
|
+
* Global target value if a column is not provided.
|
|
1163
|
+
*/
|
|
1164
|
+
targetValue?: number;
|
|
1165
|
+
/**
|
|
1166
|
+
* Show numeric labels on the actual bar. Default true.
|
|
1167
|
+
*/
|
|
1168
|
+
showValueLabels?: boolean;
|
|
1169
|
+
/**
|
|
1170
|
+
* Treat provided range values as percentages (0-1) when true.
|
|
1171
|
+
*/
|
|
1172
|
+
rangesArePercentages?: boolean;
|
|
1173
|
+
/**
|
|
1174
|
+
* Whether qualitative ranges should be rendered.
|
|
1175
|
+
*/
|
|
1176
|
+
showRanges?: boolean;
|
|
1177
|
+
/**
|
|
1178
|
+
* Display labels for qualitative ranges.
|
|
1179
|
+
*/
|
|
1180
|
+
rangeLabels?: TBulletRangeLabelOverrides;
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1183
|
+
export declare type TBulletRangeKeys = Partial<Record<TBulletRangeLabels, string>>;
|
|
1184
|
+
|
|
1185
|
+
export declare type TBulletRangeLabelOverrides = Partial<Record<TBulletRangeLabels, string>>;
|
|
1186
|
+
|
|
1187
|
+
export declare type TBulletRangeLabels = 'poor' | 'satisfactory' | 'good';
|
|
1188
|
+
|
|
1189
|
+
export declare type TBulletRangeValues = Partial<Record<TBulletRangeLabels, number>>;
|
|
1190
|
+
|
|
862
1191
|
export declare type TCard = {
|
|
863
1192
|
id: string;
|
|
864
1193
|
title: string;
|
|
@@ -889,6 +1218,11 @@ export declare type TCard = {
|
|
|
889
1218
|
* If not specified, the card will use the dashboard's display preferences.
|
|
890
1219
|
*/
|
|
891
1220
|
displayPreferences?: VisualDisplayPreferences;
|
|
1221
|
+
/**
|
|
1222
|
+
* Inline filter definitions for this card.
|
|
1223
|
+
* Configured by editors via the visual editor settings.
|
|
1224
|
+
*/
|
|
1225
|
+
inlineFilters?: TInlineFilter[];
|
|
892
1226
|
};
|
|
893
1227
|
|
|
894
1228
|
export declare type TCardContext = {
|
|
@@ -920,6 +1254,10 @@ export declare type TCardPreferences = {
|
|
|
920
1254
|
xAxisConfig?: AxisConfig;
|
|
921
1255
|
yAxisConfig?: AxisConfig;
|
|
922
1256
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1257
|
+
bulletConfig?: TBulletConfig;
|
|
1258
|
+
heatmapConfig?: THeatmapConfig;
|
|
1259
|
+
bubbleScatterConfig?: TBubbleScatterConfig;
|
|
1260
|
+
funnelConfig?: TFunnelConfig;
|
|
923
1261
|
tablePrefs?: TablePreferences;
|
|
924
1262
|
allowDownload?: boolean;
|
|
925
1263
|
customVisualCode?: string;
|
|
@@ -974,6 +1312,7 @@ export declare type TCardPreferences = {
|
|
|
974
1312
|
showCardToolbar?: boolean;
|
|
975
1313
|
showChrome?: boolean;
|
|
976
1314
|
allowScroll?: boolean;
|
|
1315
|
+
showInlineFilterBar?: boolean;
|
|
977
1316
|
};
|
|
978
1317
|
};
|
|
979
1318
|
|
|
@@ -1010,9 +1349,10 @@ export declare type TChartOptions = {
|
|
|
1010
1349
|
anchor?: string;
|
|
1011
1350
|
};
|
|
1012
1351
|
};
|
|
1352
|
+
treemapColorMode?: 'branch' | 'category';
|
|
1013
1353
|
};
|
|
1014
1354
|
|
|
1015
|
-
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';
|
|
1355
|
+
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';
|
|
1016
1356
|
|
|
1017
1357
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
1018
1358
|
columnIdx: number;
|
|
@@ -1042,6 +1382,14 @@ export declare type TCustomCardPreferences = {
|
|
|
1042
1382
|
}[];
|
|
1043
1383
|
};
|
|
1044
1384
|
|
|
1385
|
+
declare type TCustomFilterPreferences = {
|
|
1386
|
+
url: string;
|
|
1387
|
+
componentName: string;
|
|
1388
|
+
pluginFilterType?: string;
|
|
1389
|
+
icon?: string;
|
|
1390
|
+
settings?: Record<string, string | number | boolean>;
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1045
1393
|
export declare type TDashboard = {
|
|
1046
1394
|
id: string;
|
|
1047
1395
|
title?: string;
|
|
@@ -1074,7 +1422,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1074
1422
|
anchor?: 'center' | 'start' | 'end';
|
|
1075
1423
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1076
1424
|
display?: 'auto' | boolean;
|
|
1077
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1425
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1078
1426
|
formatOptions?: TFormatOptions;
|
|
1079
1427
|
font?: {
|
|
1080
1428
|
size?: number;
|
|
@@ -1085,6 +1433,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1085
1433
|
clip?: boolean;
|
|
1086
1434
|
rotation?: number;
|
|
1087
1435
|
showTotal?: boolean;
|
|
1436
|
+
offset?: number;
|
|
1088
1437
|
};
|
|
1089
1438
|
|
|
1090
1439
|
export declare type TDatasetOptions = {
|
|
@@ -1112,7 +1461,10 @@ export declare type TEvent = {
|
|
|
1112
1461
|
|
|
1113
1462
|
declare type TFilter = {
|
|
1114
1463
|
type?: 'single' | 'multiple';
|
|
1115
|
-
uiType?: 'radio' | 'dropdown';
|
|
1464
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1465
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1466
|
+
defaultValues?: (string | number)[];
|
|
1467
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1116
1468
|
sheetId?: string;
|
|
1117
1469
|
location?: FilterLocation;
|
|
1118
1470
|
hide?: boolean;
|
|
@@ -1125,10 +1477,14 @@ declare type TFilter = {
|
|
|
1125
1477
|
database: string;
|
|
1126
1478
|
sql: string;
|
|
1127
1479
|
operation: Operation;
|
|
1480
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1128
1481
|
applyToSheetIds?: string[];
|
|
1129
1482
|
excludeSheetIds?: string[];
|
|
1130
1483
|
applyToCardIds?: string[];
|
|
1131
1484
|
excludeCardIds?: string[];
|
|
1485
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1486
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1487
|
+
showLabel?: boolean;
|
|
1132
1488
|
};
|
|
1133
1489
|
|
|
1134
1490
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
@@ -1154,6 +1510,50 @@ export declare type TFrame = {
|
|
|
1154
1510
|
activeCardId: string;
|
|
1155
1511
|
};
|
|
1156
1512
|
|
|
1513
|
+
export declare type TFunnelConfig = {
|
|
1514
|
+
/**
|
|
1515
|
+
* How to calculate percentage in tooltips and data labels.
|
|
1516
|
+
* - 'percentOfTotal': Each stage shows % of total sum (default/current behavior)
|
|
1517
|
+
* - 'percentOfFirst': First stage = 100%, others relative to first
|
|
1518
|
+
*/
|
|
1519
|
+
percentMode?: TFunnelPercentMode;
|
|
1520
|
+
/**
|
|
1521
|
+
* Controls how much funnel segments narrow based on their values.
|
|
1522
|
+
* - 0: No shrink (all segments same width)
|
|
1523
|
+
* - 1: Full shrink (segments narrow proportionally to values, default)
|
|
1524
|
+
* Lower values prevent segments from becoming too narrow for labels.
|
|
1525
|
+
*/
|
|
1526
|
+
shrinkFraction?: number;
|
|
1527
|
+
/**
|
|
1528
|
+
* Hide labels for segments smaller than this percentage of total.
|
|
1529
|
+
* - 0: Show all labels (default)
|
|
1530
|
+
* - 10: Hide labels for segments < 10% of total
|
|
1531
|
+
* Range: 0-25
|
|
1532
|
+
*/
|
|
1533
|
+
labelThreshold?: number;
|
|
1534
|
+
};
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* Tooltip/data label percentage calculation mode for funnel charts.
|
|
1538
|
+
* - 'percentOfTotal': Percentage relative to sum of all values (default)
|
|
1539
|
+
* - 'percentOfFirst': Percentage relative to the first stage value (first stage = 100%)
|
|
1540
|
+
*/
|
|
1541
|
+
export declare type TFunnelPercentMode = 'percentOfTotal' | 'percentOfFirst';
|
|
1542
|
+
|
|
1543
|
+
export declare type THeatmapConfig = {
|
|
1544
|
+
colorMode?: 'continuous' | 'stepped';
|
|
1545
|
+
steps?: number;
|
|
1546
|
+
colorRange?: [string, string];
|
|
1547
|
+
colorPalette?: 'blue' | 'green' | 'purple' | 'orange' | 'custom';
|
|
1548
|
+
showLegend?: boolean;
|
|
1549
|
+
legendPosition?: 'top' | 'bottom' | 'left' | 'right';
|
|
1550
|
+
showDataLabels?: boolean;
|
|
1551
|
+
nullFillColor?: string;
|
|
1552
|
+
fillMissingCells?: boolean;
|
|
1553
|
+
xAxisBuckets?: string[];
|
|
1554
|
+
yAxisBuckets?: string[];
|
|
1555
|
+
};
|
|
1556
|
+
|
|
1157
1557
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1158
1558
|
|
|
1159
1559
|
declare interface TimeDrillStep {
|
|
@@ -1165,10 +1565,49 @@ declare interface TimeDrillStep {
|
|
|
1165
1565
|
|
|
1166
1566
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1167
1567
|
|
|
1568
|
+
/**
|
|
1569
|
+
* Inline filter definition stored on a card.
|
|
1570
|
+
* Inline filters appear on the right-hand side of the card header,
|
|
1571
|
+
* allowing ad-hoc data exploration without affecting other cards.
|
|
1572
|
+
*/
|
|
1573
|
+
export declare type TInlineFilter = {
|
|
1574
|
+
id: string;
|
|
1575
|
+
column: string;
|
|
1576
|
+
title: string;
|
|
1577
|
+
dataType: string;
|
|
1578
|
+
table: string;
|
|
1579
|
+
database: string;
|
|
1580
|
+
connectionId: string;
|
|
1581
|
+
operation: Operation;
|
|
1582
|
+
sql: string;
|
|
1583
|
+
/** Selection type: 'single' allows one value, 'multiple' allows many */
|
|
1584
|
+
type?: 'single' | 'multiple';
|
|
1585
|
+
/** UI component for single-select filters */
|
|
1586
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1587
|
+
/** Date picker type: 'range' for full calendar, 'months' for month picker */
|
|
1588
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1589
|
+
/** Default values applied when the dashboard first loads */
|
|
1590
|
+
defaultValues?: (string | number)[];
|
|
1591
|
+
/** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
|
|
1592
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1593
|
+
/** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
|
|
1594
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1595
|
+
/** Custom filter UI from a plugin */
|
|
1596
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1597
|
+
/** Width of the inline filter in pixels (default: 250) */
|
|
1598
|
+
width?: number;
|
|
1599
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1600
|
+
showLabel?: boolean;
|
|
1601
|
+
};
|
|
1602
|
+
|
|
1168
1603
|
export declare type TLegendOptions = {
|
|
1169
1604
|
display?: boolean;
|
|
1170
1605
|
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
1171
1606
|
align?: 'start' | 'center' | 'end';
|
|
1607
|
+
labels?: {
|
|
1608
|
+
generateLabels?: (chart: any) => any[];
|
|
1609
|
+
[key: string]: any;
|
|
1610
|
+
};
|
|
1172
1611
|
};
|
|
1173
1612
|
|
|
1174
1613
|
export declare type TLens = {
|
|
@@ -1198,10 +1637,56 @@ export declare type TStyle = {
|
|
|
1198
1637
|
dark?: StyleProps;
|
|
1199
1638
|
};
|
|
1200
1639
|
|
|
1640
|
+
export declare interface UpdateUserPreferenceRequest {
|
|
1641
|
+
defaultDashboardId: string | null;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
/**
|
|
1645
|
+
* URL Parameter for drill-to-URL interpolation
|
|
1646
|
+
* Represents a placeholder in the URL template (e.g., {{product_id}})
|
|
1647
|
+
*/
|
|
1648
|
+
declare interface URLParameter {
|
|
1649
|
+
/**
|
|
1650
|
+
* Unique identifier for the parameter (e.g., 'product_id', 'card_id')
|
|
1651
|
+
* Used in template as {{id}}
|
|
1652
|
+
*/
|
|
1653
|
+
id: string;
|
|
1654
|
+
/**
|
|
1655
|
+
* Display label for the parameter
|
|
1656
|
+
*/
|
|
1657
|
+
label: string;
|
|
1658
|
+
/**
|
|
1659
|
+
* Category of the parameter
|
|
1660
|
+
* - attribute: From card dimensions/attributes (e.g., product name, region)
|
|
1661
|
+
* - identifier: System values (card_id, frame_id, sheet_id)
|
|
1662
|
+
*/
|
|
1663
|
+
category: 'attribute' | 'identifier';
|
|
1664
|
+
/**
|
|
1665
|
+
* For attribute parameters: the complete field object
|
|
1666
|
+
* Provides access to all field properties (name, qualifiedFieldName, dataType, etc.)
|
|
1667
|
+
*/
|
|
1668
|
+
field?: Field;
|
|
1669
|
+
}
|
|
1670
|
+
|
|
1671
|
+
export declare interface UserPreference {
|
|
1672
|
+
id: string;
|
|
1673
|
+
actorType: 'ORG_USER' | 'TENANT_USER';
|
|
1674
|
+
projectId: string;
|
|
1675
|
+
defaultDashboardId: string | null;
|
|
1676
|
+
defaultDashboard?: {
|
|
1677
|
+
id: string;
|
|
1678
|
+
title: string;
|
|
1679
|
+
description: string;
|
|
1680
|
+
};
|
|
1681
|
+
preferences: Record<string, any> | null;
|
|
1682
|
+
createdAt: string;
|
|
1683
|
+
updatedAt: string;
|
|
1684
|
+
}
|
|
1685
|
+
|
|
1201
1686
|
/**
|
|
1202
1687
|
* Display mode for visual components - controls which UI elements are shown
|
|
1203
1688
|
*/
|
|
1204
|
-
export declare type VisualDisplayMode = 'full' | '
|
|
1689
|
+
export declare type VisualDisplayMode = 'full' | 'print' | 'table-print';
|
|
1205
1690
|
|
|
1206
1691
|
/**
|
|
1207
1692
|
* Display preferences for controlling visual component rendering
|
|
@@ -1210,9 +1695,8 @@ export declare type VisualDisplayPreferences = {
|
|
|
1210
1695
|
/**
|
|
1211
1696
|
* Predefined display mode
|
|
1212
1697
|
* - 'full': All UI elements (default)
|
|
1213
|
-
* - 'content-only': Just the visualization/table content
|
|
1214
1698
|
* - 'print': Optimized for printing (shows title and description, hides interactive elements)
|
|
1215
|
-
* - '
|
|
1699
|
+
* - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
|
|
1216
1700
|
*/
|
|
1217
1701
|
mode?: VisualDisplayMode;
|
|
1218
1702
|
/**
|