semaphor 0.0.128 → 0.0.130
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/dashboard-controls-BMLlOkS9.js +1539 -0
- package/dist/chunks/dashboard-controls-BdQcYRkf.js +26 -0
- package/dist/chunks/dashboard-export-dialog-BpNaUA5x.js +6 -0
- package/dist/chunks/dashboard-export-dialog-CbMcLZvW.js +602 -0
- package/dist/chunks/dashboard-json-DD-d9gYu.js +66 -0
- package/dist/chunks/dashboard-json-DgQozDAv.js +1 -0
- package/dist/chunks/edit-dashboard-visual-CR3NqJ7m.js +200 -0
- package/dist/chunks/edit-dashboard-visual-CRMhXxdG.js +15517 -0
- package/dist/chunks/editor-action-buttons-CNQtSzD5.js +270 -0
- package/dist/chunks/editor-action-buttons-DYrSZQhJ.js +6 -0
- package/dist/chunks/index-CReqnEJI.js +1081 -0
- package/dist/chunks/{index-nm88dVBB.js → index-QdSI9E0a.js} +89207 -74907
- package/dist/chunks/resource-management-panel-CBXn6QHi.js +895 -0
- package/dist/chunks/resource-management-panel-CXSx9QhW.js +6 -0
- package/dist/chunks/use-click-outside-B9T3lmcw.js +1 -0
- package/dist/chunks/use-click-outside-CMeO_QFI.js +16 -0
- package/dist/chunks/use-visual-utils-BDuNB0Iz.js +1 -0
- package/dist/chunks/use-visual-utils-BnCl386t.js +331 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +6 -1
- package/dist/index.js +194 -111
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +4 -4
- package/dist/types/dashboard.d.ts +524 -18
- package/dist/types/main.d.ts +948 -105
- package/dist/types/surfboard.d.ts +524 -18
- package/dist/types/types.d.ts +524 -18
- package/package.json +11 -7
- package/dist/chunks/dashboard-plus-DuenxiNV.js +0 -335
- package/dist/chunks/dashboard-plus-vO1PNFhv.js +0 -22561
- package/dist/chunks/index-BRkgsUH0.js +0 -985
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[];
|
|
@@ -103,8 +145,9 @@ declare interface CardConfig {
|
|
|
103
145
|
* Configuration for on-click dashboard filters triggered by this card.
|
|
104
146
|
*/
|
|
105
147
|
clickFilterInteractions?: ClickFilterInteraction[];
|
|
106
|
-
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
|
|
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,16 +399,33 @@ export declare type DateOptions = {
|
|
|
344
399
|
options: Intl.DateTimeFormatOptions;
|
|
345
400
|
};
|
|
346
401
|
|
|
347
|
-
declare type
|
|
402
|
+
declare type DateSelectionMode = 'range' | 'months';
|
|
403
|
+
|
|
404
|
+
declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
405
|
+
|
|
406
|
+
declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
|
|
348
407
|
|
|
349
408
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
350
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
|
+
|
|
351
422
|
declare interface DrillHierarchy {
|
|
352
423
|
id: string;
|
|
353
424
|
label?: string;
|
|
354
|
-
type: 'static';
|
|
425
|
+
type: 'static' | 'date';
|
|
355
426
|
steps: DrillHierarchyStep[];
|
|
356
427
|
default?: boolean;
|
|
428
|
+
baseField?: Field;
|
|
357
429
|
}
|
|
358
430
|
|
|
359
431
|
declare interface DrillHierarchyStep {
|
|
@@ -366,34 +438,116 @@ declare interface DrillHierarchyStep {
|
|
|
366
438
|
linkedInsightId?: string;
|
|
367
439
|
}
|
|
368
440
|
|
|
369
|
-
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
370
|
-
|
|
371
441
|
declare interface DrillThroughInteraction {
|
|
372
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;
|
|
373
448
|
filterFields: Field[];
|
|
374
|
-
|
|
449
|
+
targetDashboardId: string;
|
|
450
|
+
/**
|
|
451
|
+
* How to pass context to the target dashboard
|
|
452
|
+
* @default 'interactionFilters'
|
|
453
|
+
*/
|
|
454
|
+
contextMode?: 'interactionFilters' | 'full' | 'none';
|
|
375
455
|
label?: string;
|
|
376
456
|
}
|
|
377
457
|
|
|
378
458
|
declare interface DrillToDetailInteraction {
|
|
379
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;
|
|
380
465
|
filterFields: Field[];
|
|
381
466
|
detailFields?: Field[];
|
|
382
467
|
sortBy?: SortByField[];
|
|
383
468
|
limit?: number;
|
|
384
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';
|
|
385
484
|
label?: string;
|
|
386
485
|
}
|
|
387
486
|
|
|
388
487
|
declare interface DrillToURLInteraction {
|
|
389
488
|
mode: 'drillToURL';
|
|
489
|
+
/**
|
|
490
|
+
* What element must be clicked to trigger this URL drill.
|
|
491
|
+
*/
|
|
492
|
+
trigger?: InteractionTrigger;
|
|
390
493
|
filterFields: Field[];
|
|
494
|
+
/**
|
|
495
|
+
* URL template with placeholders (e.g., 'https://example.com/product/{{product_id}}')
|
|
496
|
+
*/
|
|
391
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;
|
|
392
525
|
label?: string;
|
|
393
526
|
}
|
|
394
527
|
|
|
395
528
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
396
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
|
+
|
|
397
551
|
export declare type EmailSettings = {
|
|
398
552
|
companyName: string;
|
|
399
553
|
dashboardUrl: string;
|
|
@@ -403,7 +557,7 @@ export declare type EmailSettings = {
|
|
|
403
557
|
|
|
404
558
|
export declare const EMPTY_SELECTION: SelectionState;
|
|
405
559
|
|
|
406
|
-
declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
560
|
+
declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
|
|
407
561
|
|
|
408
562
|
export declare type ErrorProps = {
|
|
409
563
|
message?: string;
|
|
@@ -502,6 +656,7 @@ declare type FilterForCompare = BaseFilter & {
|
|
|
502
656
|
declare type FilterForDate = BaseFilter & {
|
|
503
657
|
operation: 'between' | 'not between';
|
|
504
658
|
values: [Date, Date];
|
|
659
|
+
relativeMeta?: RelativeDateFilter;
|
|
505
660
|
};
|
|
506
661
|
|
|
507
662
|
declare type FilterForEqual = BaseFilter & {
|
|
@@ -527,7 +682,7 @@ declare interface FilterGroup {
|
|
|
527
682
|
groups: FilterGroup[];
|
|
528
683
|
}
|
|
529
684
|
|
|
530
|
-
declare type FilterLocation = 'dashboard' | 'frame' | undefined;
|
|
685
|
+
declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
|
|
531
686
|
|
|
532
687
|
declare type FilterOnClick = {
|
|
533
688
|
expression?: string;
|
|
@@ -541,6 +696,7 @@ export declare type GetDashboardResponse = {
|
|
|
541
696
|
lenses: TLens[];
|
|
542
697
|
filterValues?: TFilterValue[];
|
|
543
698
|
defaultLensId?: string;
|
|
699
|
+
assistantProfileId?: string;
|
|
544
700
|
};
|
|
545
701
|
|
|
546
702
|
export declare type GetPluginsResponse = {
|
|
@@ -576,12 +732,72 @@ export declare type HtmlOptions = {
|
|
|
576
732
|
|
|
577
733
|
declare interface InlineDrillInteraction {
|
|
578
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;
|
|
579
740
|
filterFields: Field[];
|
|
741
|
+
/**
|
|
742
|
+
* When to fetch the detailed data
|
|
743
|
+
* @default 'lazy'
|
|
744
|
+
*/
|
|
580
745
|
fetchMode?: 'lazy' | 'preloaded';
|
|
746
|
+
/**
|
|
747
|
+
* Maximum number of records to show (0 for unlimited)
|
|
748
|
+
* @default 100
|
|
749
|
+
*/
|
|
581
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;
|
|
582
766
|
label?: string;
|
|
583
767
|
}
|
|
584
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
|
+
|
|
585
801
|
declare interface Join {
|
|
586
802
|
id: string;
|
|
587
803
|
source: DatabaseEntityReference;
|
|
@@ -617,6 +833,14 @@ export declare type KPICardProps = {
|
|
|
617
833
|
|
|
618
834
|
export declare type Level = 'database' | 'schema' | 'table';
|
|
619
835
|
|
|
836
|
+
declare interface LinkFormat {
|
|
837
|
+
urlTemplate: string;
|
|
838
|
+
labelType: 'value' | 'static' | 'column';
|
|
839
|
+
staticLabel?: string;
|
|
840
|
+
labelColumn?: string;
|
|
841
|
+
openInNewTab: boolean;
|
|
842
|
+
}
|
|
843
|
+
|
|
620
844
|
export declare type LoadingProps = {
|
|
621
845
|
message?: string;
|
|
622
846
|
};
|
|
@@ -661,6 +885,15 @@ declare interface MetricField extends Field {
|
|
|
661
885
|
};
|
|
662
886
|
aliasTemplate?: string;
|
|
663
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;
|
|
664
897
|
}
|
|
665
898
|
|
|
666
899
|
declare type NoneOptions = {};
|
|
@@ -683,7 +916,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
|
|
|
683
916
|
|
|
684
917
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
685
918
|
|
|
686
|
-
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'isNull' | 'isNotNull';
|
|
919
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'not between' | 'isNull' | 'isNotNull';
|
|
687
920
|
|
|
688
921
|
declare type OptionsMap = {
|
|
689
922
|
number: NumberOptions;
|
|
@@ -749,6 +982,25 @@ declare type RangeValue = {
|
|
|
749
982
|
gt?: string | number;
|
|
750
983
|
};
|
|
751
984
|
|
|
985
|
+
declare type RelativeDateFilter = {
|
|
986
|
+
mode: 'last';
|
|
987
|
+
n: number;
|
|
988
|
+
unit: DateUnit;
|
|
989
|
+
complete?: boolean;
|
|
990
|
+
} | {
|
|
991
|
+
mode: 'this';
|
|
992
|
+
unit: DateUnit;
|
|
993
|
+
toDate?: boolean;
|
|
994
|
+
} | {
|
|
995
|
+
mode: 'previous';
|
|
996
|
+
unit: DateUnit;
|
|
997
|
+
} | {
|
|
998
|
+
mode: 'between';
|
|
999
|
+
unit: DateUnit;
|
|
1000
|
+
from: number;
|
|
1001
|
+
to: number;
|
|
1002
|
+
};
|
|
1003
|
+
|
|
752
1004
|
declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
|
|
753
1005
|
|
|
754
1006
|
export declare type SelectionState = Record<Level, string | null>;
|
|
@@ -818,6 +1070,7 @@ declare type TablePreferences = {
|
|
|
818
1070
|
columnSizing?: ColumnSizingState;
|
|
819
1071
|
pageSize?: number;
|
|
820
1072
|
enableDevModePagination?: boolean;
|
|
1073
|
+
forceClientPagination?: boolean;
|
|
821
1074
|
};
|
|
822
1075
|
|
|
823
1076
|
export declare type TBaseQuery = {
|
|
@@ -829,6 +1082,104 @@ export declare type TBaseQuery = {
|
|
|
829
1082
|
description?: string;
|
|
830
1083
|
};
|
|
831
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
|
+
|
|
832
1183
|
export declare type TCard = {
|
|
833
1184
|
id: string;
|
|
834
1185
|
title: string;
|
|
@@ -859,6 +1210,11 @@ export declare type TCard = {
|
|
|
859
1210
|
* If not specified, the card will use the dashboard's display preferences.
|
|
860
1211
|
*/
|
|
861
1212
|
displayPreferences?: VisualDisplayPreferences;
|
|
1213
|
+
/**
|
|
1214
|
+
* Inline filter definitions for this card.
|
|
1215
|
+
* Configured by editors via the visual editor settings.
|
|
1216
|
+
*/
|
|
1217
|
+
inlineFilters?: TInlineFilter[];
|
|
862
1218
|
};
|
|
863
1219
|
|
|
864
1220
|
export declare type TCardContext = {
|
|
@@ -890,6 +1246,10 @@ export declare type TCardPreferences = {
|
|
|
890
1246
|
xAxisConfig?: AxisConfig;
|
|
891
1247
|
yAxisConfig?: AxisConfig;
|
|
892
1248
|
dataLabelsConfig?: TDataLabelsConfig;
|
|
1249
|
+
bulletConfig?: TBulletConfig;
|
|
1250
|
+
heatmapConfig?: THeatmapConfig;
|
|
1251
|
+
bubbleScatterConfig?: TBubbleScatterConfig;
|
|
1252
|
+
funnelConfig?: TFunnelConfig;
|
|
893
1253
|
tablePrefs?: TablePreferences;
|
|
894
1254
|
allowDownload?: boolean;
|
|
895
1255
|
customVisualCode?: string;
|
|
@@ -944,6 +1304,7 @@ export declare type TCardPreferences = {
|
|
|
944
1304
|
showCardToolbar?: boolean;
|
|
945
1305
|
showChrome?: boolean;
|
|
946
1306
|
allowScroll?: boolean;
|
|
1307
|
+
showInlineFilterBar?: boolean;
|
|
947
1308
|
};
|
|
948
1309
|
};
|
|
949
1310
|
|
|
@@ -980,9 +1341,10 @@ export declare type TChartOptions = {
|
|
|
980
1341
|
anchor?: string;
|
|
981
1342
|
};
|
|
982
1343
|
};
|
|
1344
|
+
treemapColorMode?: 'branch' | 'category';
|
|
983
1345
|
};
|
|
984
1346
|
|
|
985
|
-
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';
|
|
986
1348
|
|
|
987
1349
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
988
1350
|
columnIdx: number;
|
|
@@ -1012,6 +1374,14 @@ export declare type TCustomCardPreferences = {
|
|
|
1012
1374
|
}[];
|
|
1013
1375
|
};
|
|
1014
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
|
+
|
|
1015
1385
|
export declare type TDashboard = {
|
|
1016
1386
|
id: string;
|
|
1017
1387
|
title?: string;
|
|
@@ -1044,7 +1414,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1044
1414
|
anchor?: 'center' | 'start' | 'end';
|
|
1045
1415
|
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1046
1416
|
display?: 'auto' | boolean;
|
|
1047
|
-
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1417
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
|
|
1048
1418
|
formatOptions?: TFormatOptions;
|
|
1049
1419
|
font?: {
|
|
1050
1420
|
size?: number;
|
|
@@ -1055,6 +1425,7 @@ export declare type TDataLabelsConfig = {
|
|
|
1055
1425
|
clip?: boolean;
|
|
1056
1426
|
rotation?: number;
|
|
1057
1427
|
showTotal?: boolean;
|
|
1428
|
+
offset?: number;
|
|
1058
1429
|
};
|
|
1059
1430
|
|
|
1060
1431
|
export declare type TDatasetOptions = {
|
|
@@ -1082,7 +1453,10 @@ export declare type TEvent = {
|
|
|
1082
1453
|
|
|
1083
1454
|
declare type TFilter = {
|
|
1084
1455
|
type?: 'single' | 'multiple';
|
|
1085
|
-
uiType?: 'radio' | 'dropdown';
|
|
1456
|
+
uiType?: 'radio' | 'dropdown' | 'tabs';
|
|
1457
|
+
dateSelectionMode?: DateSelectionMode;
|
|
1458
|
+
defaultValues?: (string | number)[];
|
|
1459
|
+
defaultDateFilter?: RelativeDateFilter;
|
|
1086
1460
|
sheetId?: string;
|
|
1087
1461
|
location?: FilterLocation;
|
|
1088
1462
|
hide?: boolean;
|
|
@@ -1095,10 +1469,14 @@ declare type TFilter = {
|
|
|
1095
1469
|
database: string;
|
|
1096
1470
|
sql: string;
|
|
1097
1471
|
operation: Operation;
|
|
1472
|
+
searchMode?: 'text' | 'numeric' | 'auto';
|
|
1098
1473
|
applyToSheetIds?: string[];
|
|
1099
1474
|
excludeSheetIds?: string[];
|
|
1100
1475
|
applyToCardIds?: string[];
|
|
1101
1476
|
excludeCardIds?: string[];
|
|
1477
|
+
customFilterPreferences?: TCustomFilterPreferences;
|
|
1478
|
+
/** Whether to show the label above the filter (default: true) */
|
|
1479
|
+
showLabel?: boolean;
|
|
1102
1480
|
};
|
|
1103
1481
|
|
|
1104
1482
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
@@ -1124,6 +1502,50 @@ export declare type TFrame = {
|
|
|
1124
1502
|
activeCardId: string;
|
|
1125
1503
|
};
|
|
1126
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
|
+
|
|
1127
1549
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1128
1550
|
|
|
1129
1551
|
declare interface TimeDrillStep {
|
|
@@ -1135,10 +1557,49 @@ declare interface TimeDrillStep {
|
|
|
1135
1557
|
|
|
1136
1558
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1137
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
|
+
|
|
1138
1595
|
export declare type TLegendOptions = {
|
|
1139
1596
|
display?: boolean;
|
|
1140
1597
|
position?: 'top' | 'left' | 'bottom' | 'right';
|
|
1141
1598
|
align?: 'start' | 'center' | 'end';
|
|
1599
|
+
labels?: {
|
|
1600
|
+
generateLabels?: (chart: any) => any[];
|
|
1601
|
+
[key: string]: any;
|
|
1602
|
+
};
|
|
1142
1603
|
};
|
|
1143
1604
|
|
|
1144
1605
|
export declare type TLens = {
|
|
@@ -1168,10 +1629,56 @@ export declare type TStyle = {
|
|
|
1168
1629
|
dark?: StyleProps;
|
|
1169
1630
|
};
|
|
1170
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
|
+
|
|
1171
1678
|
/**
|
|
1172
1679
|
* Display mode for visual components - controls which UI elements are shown
|
|
1173
1680
|
*/
|
|
1174
|
-
export declare type VisualDisplayMode = 'full' | '
|
|
1681
|
+
export declare type VisualDisplayMode = 'full' | 'print' | 'table-print';
|
|
1175
1682
|
|
|
1176
1683
|
/**
|
|
1177
1684
|
* Display preferences for controlling visual component rendering
|
|
@@ -1180,9 +1687,8 @@ export declare type VisualDisplayPreferences = {
|
|
|
1180
1687
|
/**
|
|
1181
1688
|
* Predefined display mode
|
|
1182
1689
|
* - 'full': All UI elements (default)
|
|
1183
|
-
* - 'content-only': Just the visualization/table content
|
|
1184
1690
|
* - 'print': Optimized for printing (shows title and description, hides interactive elements)
|
|
1185
|
-
* - '
|
|
1691
|
+
* - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
|
|
1186
1692
|
*/
|
|
1187
1693
|
mode?: VisualDisplayMode;
|
|
1188
1694
|
/**
|