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.
Files changed (33) hide show
  1. package/dist/chunks/dashboard-controls-BMLlOkS9.js +1539 -0
  2. package/dist/chunks/dashboard-controls-BdQcYRkf.js +26 -0
  3. package/dist/chunks/dashboard-export-dialog-BpNaUA5x.js +6 -0
  4. package/dist/chunks/dashboard-export-dialog-CbMcLZvW.js +602 -0
  5. package/dist/chunks/dashboard-json-DD-d9gYu.js +66 -0
  6. package/dist/chunks/dashboard-json-DgQozDAv.js +1 -0
  7. package/dist/chunks/edit-dashboard-visual-CR3NqJ7m.js +200 -0
  8. package/dist/chunks/edit-dashboard-visual-CRMhXxdG.js +15517 -0
  9. package/dist/chunks/editor-action-buttons-CNQtSzD5.js +270 -0
  10. package/dist/chunks/editor-action-buttons-DYrSZQhJ.js +6 -0
  11. package/dist/chunks/index-CReqnEJI.js +1081 -0
  12. package/dist/chunks/{index-nm88dVBB.js → index-QdSI9E0a.js} +89207 -74907
  13. package/dist/chunks/resource-management-panel-CBXn6QHi.js +895 -0
  14. package/dist/chunks/resource-management-panel-CXSx9QhW.js +6 -0
  15. package/dist/chunks/use-click-outside-B9T3lmcw.js +1 -0
  16. package/dist/chunks/use-click-outside-CMeO_QFI.js +16 -0
  17. package/dist/chunks/use-visual-utils-BDuNB0Iz.js +1 -0
  18. package/dist/chunks/use-visual-utils-BnCl386t.js +331 -0
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +6 -1
  22. package/dist/index.js +194 -111
  23. package/dist/style.css +1 -1
  24. package/dist/surfboard/index.cjs +1 -1
  25. package/dist/surfboard/index.js +4 -4
  26. package/dist/types/dashboard.d.ts +524 -18
  27. package/dist/types/main.d.ts +948 -105
  28. package/dist/types/surfboard.d.ts +524 -18
  29. package/dist/types/types.d.ts +524 -18
  30. package/package.json +11 -7
  31. package/dist/chunks/dashboard-plus-DuenxiNV.js +0 -335
  32. package/dist/chunks/dashboard-plus-vO1PNFhv.js +0 -22561
  33. package/dist/chunks/index-BRkgsUH0.js +0 -985
@@ -75,6 +75,48 @@ export declare type CacheConfig = {
75
75
  status: 'on' | 'on-refresh' | 'off';
76
76
  };
77
77
 
78
+ /**
79
+ * Formula metadata for calculated fields (UI-only metadata)
80
+ * This is supplementary data to help the UI display and edit calculated fields.
81
+ * The `expression` field remains the source of truth for the backend.
82
+ *
83
+ * IMPORTANT: This metadata is ALWAYS updated atomically with the expression field.
84
+ * Both are generated together from the same dialog inputs, preventing drift.
85
+ */
86
+ declare interface CalculatedFieldFormula {
87
+ operation: CalculatedFieldOperation;
88
+ /**
89
+ * Array of full MetricField objects used as inputs to the calculated field.
90
+ *
91
+ * Storing complete Field objects eliminates the need for runtime lookups and ensures:
92
+ * - Table alias resolution works with schema-qualified tables (Issue 1)
93
+ * - All field metadata is available even if the input field isn't selected on the card (Issue 2)
94
+ * - Aggregate functions, filters, and entity info are preserved
95
+ *
96
+ * Each input field contains complete metadata:
97
+ * - name, entityId, entityName, qualifiedEntityName (for table qualification)
98
+ * - aggregate (for proper post-aggregation: SUM(sales) / COUNT(orders))
99
+ * - parameters.filters (for filtered metrics)
100
+ * - dataType and other properties
101
+ *
102
+ * Example: [
103
+ * {name: 'sales', aggregate: 'SUM', entityName: 'sales_data', ...},
104
+ * {name: 'order_id', aggregate: 'COUNT', entityName: 'sales_data', ...}
105
+ * ]
106
+ */
107
+ inputFields: MetricField[];
108
+ /**
109
+ * Constant value used in scale operations (e.g., multiply by 0.15)
110
+ * Only applicable for 'scale' operation type
111
+ */
112
+ constant?: number;
113
+ }
114
+
115
+ /**
116
+ * Operations supported for calculated fields
117
+ */
118
+ declare type CalculatedFieldOperation = 'sum' | 'difference' | 'product' | 'ratio' | 'change' | 'percentage' | 'scale' | 'custom';
119
+
78
120
  declare interface CardConfig {
79
121
  groupByColumns?: GroupByField[];
80
122
  metricColumns?: MetricField[];
@@ -104,8 +146,9 @@ declare interface CardConfig {
104
146
  * Configuration for on-click dashboard filters triggered by this card.
105
147
  */
106
148
  clickFilterInteractions?: ClickFilterInteraction[];
107
- comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
149
+ comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target' | 'start_vs_end';
108
150
  targetValue?: number;
151
+ showComparisonInLegend?: boolean;
109
152
  showTrendline?: boolean;
110
153
  trendlineWindow?: number;
111
154
  trendlineGranularity?: 'day' | 'week' | 'month';
@@ -122,10 +165,13 @@ declare interface CardConfig {
122
165
  }
123
166
 
124
167
  declare interface CardInteractionConfig {
168
+ /**
169
+ * V2: Unified interactions array.
170
+ * Each interaction includes a trigger that specifies what element must be clicked.
171
+ */
172
+ interactions?: Interaction[];
125
173
  allowedDrillTargets?: Field[];
126
174
  drillHierarchies?: DrillHierarchy[];
127
- drillInteractions?: DrillInteraction[];
128
- clickFilterInteractions?: ClickFilterInteraction[];
129
175
  }
130
176
 
131
177
  declare type CardWithContent = BaseCustomCard & {
@@ -148,6 +194,14 @@ declare type CardWithFooter = BaseCustomCard & {
148
194
 
149
195
  declare interface ClickFilterInteraction {
150
196
  mode: 'clickFilter';
197
+ /**
198
+ * What element must be clicked to trigger this interaction.
199
+ * Determines both the matching logic and the filtering behavior.
200
+ *
201
+ * @migration Optional during migration. Will be required in V2.
202
+ * Old configs without trigger will apply to any click (legacy behavior).
203
+ */
204
+ trigger?: InteractionTrigger;
151
205
  /**
152
206
  * Fields from the chart element that should be used as filters.
153
207
  * e.g., [region, ship_mode] from a stacked bar chart
@@ -217,6 +271,7 @@ declare interface ColumnSettings {
217
271
  timezone?: string;
218
272
  sourceTimezone?: string;
219
273
  };
274
+ linkFormat: LinkFormat;
220
275
  colorRanges: ColorRange_2[];
221
276
  }
222
277
 
@@ -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,16 +405,33 @@ export declare type DateOptions = {
350
405
  options: Intl.DateTimeFormatOptions;
351
406
  };
352
407
 
353
- declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb';
408
+ declare type DateSelectionMode = 'range' | 'months';
409
+
410
+ declare type DateUnit = 'day' | 'week' | 'month' | 'quarter' | 'year';
411
+
412
+ declare type Dialect = 'mysql' | 'postgres' | 'bigquery' | 'redshift' | 'snowflake' | 'clickhouse' | 'duckdb' | 'mssql';
354
413
 
355
414
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
356
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
+
357
428
  declare interface DrillHierarchy {
358
429
  id: string;
359
430
  label?: string;
360
- type: 'static';
431
+ type: 'static' | 'date';
361
432
  steps: DrillHierarchyStep[];
362
433
  default?: boolean;
434
+ baseField?: Field;
363
435
  }
364
436
 
365
437
  declare interface DrillHierarchyStep {
@@ -372,34 +444,116 @@ declare interface DrillHierarchyStep {
372
444
  linkedInsightId?: string;
373
445
  }
374
446
 
375
- declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
376
-
377
447
  declare interface DrillThroughInteraction {
378
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;
379
454
  filterFields: Field[];
380
- targetSheetId: string;
455
+ targetDashboardId: string;
456
+ /**
457
+ * How to pass context to the target dashboard
458
+ * @default 'interactionFilters'
459
+ */
460
+ contextMode?: 'interactionFilters' | 'full' | 'none';
381
461
  label?: string;
382
462
  }
383
463
 
384
464
  declare interface DrillToDetailInteraction {
385
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;
386
471
  filterFields: Field[];
387
472
  detailFields?: Field[];
388
473
  sortBy?: SortByField[];
389
474
  limit?: number;
390
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';
391
490
  label?: string;
392
491
  }
393
492
 
394
493
  declare interface DrillToURLInteraction {
395
494
  mode: 'drillToURL';
495
+ /**
496
+ * What element must be clicked to trigger this URL drill.
497
+ */
498
+ trigger?: InteractionTrigger;
396
499
  filterFields: Field[];
500
+ /**
501
+ * URL template with placeholders (e.g., 'https://example.com/product/{{product_id}}')
502
+ */
397
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;
398
531
  label?: string;
399
532
  }
400
533
 
401
534
  export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
402
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
+
403
557
  export declare type EmailSettings = {
404
558
  companyName: string;
405
559
  dashboardUrl: string;
@@ -409,7 +563,7 @@ export declare type EmailSettings = {
409
563
 
410
564
  export declare const EMPTY_SELECTION: SelectionState;
411
565
 
412
- declare type EntityType = 'table' | 'view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
566
+ declare type EntityType = 'table' | 'view' | 'materialized view' | 'model' | 'file' | 'dataset' | 'url' | 'upload';
413
567
 
414
568
  export declare type ErrorProps = {
415
569
  message?: string;
@@ -508,6 +662,7 @@ declare type FilterForCompare = BaseFilter & {
508
662
  declare type FilterForDate = BaseFilter & {
509
663
  operation: 'between' | 'not between';
510
664
  values: [Date, Date];
665
+ relativeMeta?: RelativeDateFilter;
511
666
  };
512
667
 
513
668
  declare type FilterForEqual = BaseFilter & {
@@ -533,7 +688,7 @@ declare interface FilterGroup {
533
688
  groups: FilterGroup[];
534
689
  }
535
690
 
536
- declare type FilterLocation = 'dashboard' | 'frame' | undefined;
691
+ declare type FilterLocation = 'dashboard' | 'frame' | 'sheet' | undefined;
537
692
 
538
693
  declare type FilterOnClick = {
539
694
  expression?: string;
@@ -547,6 +702,7 @@ export declare type GetDashboardResponse = {
547
702
  lenses: TLens[];
548
703
  filterValues?: TFilterValue[];
549
704
  defaultLensId?: string;
705
+ assistantProfileId?: string;
550
706
  };
551
707
 
552
708
  export declare type GetPluginsResponse = {
@@ -582,12 +738,72 @@ export declare type HtmlOptions = {
582
738
 
583
739
  declare interface InlineDrillInteraction {
584
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;
585
746
  filterFields: Field[];
747
+ /**
748
+ * When to fetch the detailed data
749
+ * @default 'lazy'
750
+ */
586
751
  fetchMode?: 'lazy' | 'preloaded';
752
+ /**
753
+ * Maximum number of records to show (0 for unlimited)
754
+ * @default 100
755
+ */
587
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;
588
772
  label?: string;
589
773
  }
590
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
+
591
807
  declare interface Join {
592
808
  id: string;
593
809
  source: DatabaseEntityReference;
@@ -623,6 +839,14 @@ export declare type KPICardProps = {
623
839
 
624
840
  export declare type Level = 'database' | 'schema' | 'table';
625
841
 
842
+ declare interface LinkFormat {
843
+ urlTemplate: string;
844
+ labelType: 'value' | 'static' | 'column';
845
+ staticLabel?: string;
846
+ labelColumn?: string;
847
+ openInNewTab: boolean;
848
+ }
849
+
626
850
  export declare type LoadingProps = {
627
851
  message?: string;
628
852
  };
@@ -667,6 +891,15 @@ declare interface MetricField extends Field {
667
891
  };
668
892
  aliasTemplate?: string;
669
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;
670
903
  }
671
904
 
672
905
  declare type NoneOptions = {};
@@ -689,7 +922,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
689
922
 
690
923
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
691
924
 
692
- declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'isNull' | 'isNotNull';
925
+ declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'not between' | 'isNull' | 'isNotNull';
693
926
 
694
927
  declare type OptionsMap = {
695
928
  number: NumberOptions;
@@ -755,6 +988,25 @@ declare type RangeValue = {
755
988
  gt?: string | number;
756
989
  };
757
990
 
991
+ declare type RelativeDateFilter = {
992
+ mode: 'last';
993
+ n: number;
994
+ unit: DateUnit;
995
+ complete?: boolean;
996
+ } | {
997
+ mode: 'this';
998
+ unit: DateUnit;
999
+ toDate?: boolean;
1000
+ } | {
1001
+ mode: 'previous';
1002
+ unit: DateUnit;
1003
+ } | {
1004
+ mode: 'between';
1005
+ unit: DateUnit;
1006
+ from: number;
1007
+ to: number;
1008
+ };
1009
+
758
1010
  declare type SelectedEntities = DatabaseEntityReference[] | DataModelEntityReference[] | FileEntityReference[];
759
1011
 
760
1012
  export declare type SelectionState = Record<Level, string | null>;
@@ -826,6 +1078,7 @@ declare type TablePreferences = {
826
1078
  columnSizing?: ColumnSizingState;
827
1079
  pageSize?: number;
828
1080
  enableDevModePagination?: boolean;
1081
+ forceClientPagination?: boolean;
829
1082
  };
830
1083
 
831
1084
  export declare type TBaseQuery = {
@@ -837,6 +1090,104 @@ export declare type TBaseQuery = {
837
1090
  description?: string;
838
1091
  };
839
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
+
840
1191
  export declare type TCard = {
841
1192
  id: string;
842
1193
  title: string;
@@ -867,6 +1218,11 @@ export declare type TCard = {
867
1218
  * If not specified, the card will use the dashboard's display preferences.
868
1219
  */
869
1220
  displayPreferences?: VisualDisplayPreferences;
1221
+ /**
1222
+ * Inline filter definitions for this card.
1223
+ * Configured by editors via the visual editor settings.
1224
+ */
1225
+ inlineFilters?: TInlineFilter[];
870
1226
  };
871
1227
 
872
1228
  export declare type TCardContext = {
@@ -898,6 +1254,10 @@ export declare type TCardPreferences = {
898
1254
  xAxisConfig?: AxisConfig;
899
1255
  yAxisConfig?: AxisConfig;
900
1256
  dataLabelsConfig?: TDataLabelsConfig;
1257
+ bulletConfig?: TBulletConfig;
1258
+ heatmapConfig?: THeatmapConfig;
1259
+ bubbleScatterConfig?: TBubbleScatterConfig;
1260
+ funnelConfig?: TFunnelConfig;
901
1261
  tablePrefs?: TablePreferences;
902
1262
  allowDownload?: boolean;
903
1263
  customVisualCode?: string;
@@ -952,6 +1312,7 @@ export declare type TCardPreferences = {
952
1312
  showCardToolbar?: boolean;
953
1313
  showChrome?: boolean;
954
1314
  allowScroll?: boolean;
1315
+ showInlineFilterBar?: boolean;
955
1316
  };
956
1317
  };
957
1318
 
@@ -988,9 +1349,10 @@ export declare type TChartOptions = {
988
1349
  anchor?: string;
989
1350
  };
990
1351
  };
1352
+ treemapColorMode?: 'branch' | 'category';
991
1353
  };
992
1354
 
993
- 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';
994
1356
 
995
1357
  export declare type TColumnSetting<T extends DisplayDataType> = {
996
1358
  columnIdx: number;
@@ -1020,6 +1382,14 @@ export declare type TCustomCardPreferences = {
1020
1382
  }[];
1021
1383
  };
1022
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
+
1023
1393
  export declare type TDashboard = {
1024
1394
  id: string;
1025
1395
  title?: string;
@@ -1052,7 +1422,7 @@ export declare type TDataLabelsConfig = {
1052
1422
  anchor?: 'center' | 'start' | 'end';
1053
1423
  align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
1054
1424
  display?: 'auto' | boolean;
1055
- format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
1425
+ format?: 'auto' | 'number' | 'currency' | 'percent' | 'date' | 'scientific' | 'none';
1056
1426
  formatOptions?: TFormatOptions;
1057
1427
  font?: {
1058
1428
  size?: number;
@@ -1063,6 +1433,7 @@ export declare type TDataLabelsConfig = {
1063
1433
  clip?: boolean;
1064
1434
  rotation?: number;
1065
1435
  showTotal?: boolean;
1436
+ offset?: number;
1066
1437
  };
1067
1438
 
1068
1439
  export declare type TDatasetOptions = {
@@ -1090,7 +1461,10 @@ export declare type TEvent = {
1090
1461
 
1091
1462
  declare type TFilter = {
1092
1463
  type?: 'single' | 'multiple';
1093
- uiType?: 'radio' | 'dropdown';
1464
+ uiType?: 'radio' | 'dropdown' | 'tabs';
1465
+ dateSelectionMode?: DateSelectionMode;
1466
+ defaultValues?: (string | number)[];
1467
+ defaultDateFilter?: RelativeDateFilter;
1094
1468
  sheetId?: string;
1095
1469
  location?: FilterLocation;
1096
1470
  hide?: boolean;
@@ -1103,10 +1477,14 @@ declare type TFilter = {
1103
1477
  database: string;
1104
1478
  sql: string;
1105
1479
  operation: Operation;
1480
+ searchMode?: 'text' | 'numeric' | 'auto';
1106
1481
  applyToSheetIds?: string[];
1107
1482
  excludeSheetIds?: string[];
1108
1483
  applyToCardIds?: string[];
1109
1484
  excludeCardIds?: string[];
1485
+ customFilterPreferences?: TCustomFilterPreferences;
1486
+ /** Whether to show the label above the filter (default: true) */
1487
+ showLabel?: boolean;
1110
1488
  };
1111
1489
 
1112
1490
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
@@ -1132,6 +1510,50 @@ export declare type TFrame = {
1132
1510
  activeCardId: string;
1133
1511
  };
1134
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
+
1135
1557
  export declare type Theme = 'dark' | 'light' | 'system';
1136
1558
 
1137
1559
  declare interface TimeDrillStep {
@@ -1143,10 +1565,49 @@ declare interface TimeDrillStep {
1143
1565
 
1144
1566
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1145
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
+
1146
1603
  export declare type TLegendOptions = {
1147
1604
  display?: boolean;
1148
1605
  position?: 'top' | 'left' | 'bottom' | 'right';
1149
1606
  align?: 'start' | 'center' | 'end';
1607
+ labels?: {
1608
+ generateLabels?: (chart: any) => any[];
1609
+ [key: string]: any;
1610
+ };
1150
1611
  };
1151
1612
 
1152
1613
  export declare type TLens = {
@@ -1176,10 +1637,56 @@ export declare type TStyle = {
1176
1637
  dark?: StyleProps;
1177
1638
  };
1178
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
+
1179
1686
  /**
1180
1687
  * Display mode for visual components - controls which UI elements are shown
1181
1688
  */
1182
- export declare type VisualDisplayMode = 'full' | 'content-only' | 'print' | 'embed' | 'table-print';
1689
+ export declare type VisualDisplayMode = 'full' | 'print' | 'table-print';
1183
1690
 
1184
1691
  /**
1185
1692
  * Display preferences for controlling visual component rendering
@@ -1188,9 +1695,8 @@ export declare type VisualDisplayPreferences = {
1188
1695
  /**
1189
1696
  * Predefined display mode
1190
1697
  * - 'full': All UI elements (default)
1191
- * - 'content-only': Just the visualization/table content
1192
1698
  * - 'print': Optimized for printing (shows title and description, hides interactive elements)
1193
- * - 'embed': Minimal chrome for embedding in other contexts
1699
+ * - 'table-print': Table-specific print mode (title only, no pagination/toolbar)
1194
1700
  */
1195
1701
  mode?: VisualDisplayMode;
1196
1702
  /**