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