semaphor 0.0.102 → 0.0.104
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-plus-D4i7WErk.js +375 -0
- package/dist/chunks/{dashboard-plus-ZydhJTUT.js → dashboard-plus-DV5VATMC.js} +5560 -5712
- package/dist/chunks/{index-Das4K9pB.js → index-CxuQLwIa.js} +66067 -59049
- package/dist/chunks/index-DdUA7rY3.js +643 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +39 -35
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +127 -2
- package/dist/types/main.d.ts +286 -3
- package/dist/types/surfboard.d.ts +127 -2
- package/dist/types/types.d.ts +127 -2
- package/package.json +2 -1
- package/dist/chunks/dashboard-plus-CA0-C70T.js +0 -410
- package/dist/chunks/index-W3FSZVh4.js +0 -534
|
@@ -62,8 +62,43 @@ declare interface CardConfig {
|
|
|
62
62
|
filters?: FilterGroup;
|
|
63
63
|
joinPlan?: JoinPlan;
|
|
64
64
|
rowLimit?: number;
|
|
65
|
+
/**
|
|
66
|
+
* One or more hierarchies that define drillable paths through dimensions.
|
|
67
|
+
*/
|
|
68
|
+
drillHierarchies?: DrillHierarchy[];
|
|
69
|
+
/**
|
|
70
|
+
* Optional list of dimensions allowed for dynamic drill-down across this card.
|
|
71
|
+
* Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
|
|
72
|
+
*/
|
|
73
|
+
allowedDrillTargets?: Field[];
|
|
74
|
+
/**
|
|
75
|
+
* NOT UOptional preload settings for inline drill previews
|
|
76
|
+
*/
|
|
77
|
+
inlineDrillPreview?: {
|
|
78
|
+
enabled: boolean;
|
|
79
|
+
limit: number;
|
|
80
|
+
mode: 'lazy' | 'preloaded';
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Configuration for on-click dashboard filters triggered by this card.
|
|
84
|
+
*/
|
|
85
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
86
|
+
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
|
|
87
|
+
targetValue?: number;
|
|
88
|
+
showTrendline?: boolean;
|
|
89
|
+
trendlineWindow?: number;
|
|
90
|
+
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
declare interface CardInteractionConfig {
|
|
94
|
+
allowedDrillTargets?: Field[];
|
|
95
|
+
drillHierarchies?: DrillHierarchy[];
|
|
96
|
+
drillInteractions?: DrillInteraction[];
|
|
97
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
65
98
|
}
|
|
66
99
|
|
|
100
|
+
declare type CardMode = 'explorer' | 'dev';
|
|
101
|
+
|
|
67
102
|
declare type CardWithContent = BaseCustomCard & {
|
|
68
103
|
content: React.FC<{
|
|
69
104
|
card: TCard;
|
|
@@ -82,6 +117,33 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
82
117
|
}>;
|
|
83
118
|
};
|
|
84
119
|
|
|
120
|
+
declare interface ClickFilterInteraction {
|
|
121
|
+
mode: 'clickFilter';
|
|
122
|
+
/**
|
|
123
|
+
* Fields from the chart element that should be used as filters.
|
|
124
|
+
* e.g., [region, ship_mode] from a stacked bar chart
|
|
125
|
+
*/
|
|
126
|
+
filterFields: Field[];
|
|
127
|
+
/**
|
|
128
|
+
* Should this card visually highlight when clicked?
|
|
129
|
+
*/
|
|
130
|
+
highlightSelf?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Cards this filter applies to (inclusive).
|
|
133
|
+
* If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
|
|
134
|
+
*/
|
|
135
|
+
applyToCardIds?: string[];
|
|
136
|
+
/**
|
|
137
|
+
* Cards to explicitly exclude from receiving this filter.
|
|
138
|
+
* Takes effect only if `applyToCardIds` is undefined (acts as override).
|
|
139
|
+
*/
|
|
140
|
+
excludeCardIds?: string[];
|
|
141
|
+
/**
|
|
142
|
+
* Optional UI label or tooltip.
|
|
143
|
+
*/
|
|
144
|
+
label?: string;
|
|
145
|
+
}
|
|
146
|
+
|
|
85
147
|
export declare type ColorRange = {
|
|
86
148
|
start: number;
|
|
87
149
|
end: number;
|
|
@@ -207,7 +269,7 @@ declare interface DataSource {
|
|
|
207
269
|
selectedEntities: SelectedEntities;
|
|
208
270
|
}
|
|
209
271
|
|
|
210
|
-
declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
272
|
+
declare const DATE_FORMAT_VALUES: readonly ["MM-DD-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
211
273
|
|
|
212
274
|
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
213
275
|
|
|
@@ -221,6 +283,50 @@ declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' | 'snowf
|
|
|
221
283
|
|
|
222
284
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
|
|
223
285
|
|
|
286
|
+
declare interface DrillHierarchy {
|
|
287
|
+
id: string;
|
|
288
|
+
label?: string;
|
|
289
|
+
type: 'static';
|
|
290
|
+
steps: DrillHierarchyStep[];
|
|
291
|
+
default?: boolean;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare interface DrillHierarchyStep {
|
|
295
|
+
field: Field;
|
|
296
|
+
mode: 'drillDown';
|
|
297
|
+
preferredChartType?: TChartType;
|
|
298
|
+
breadcrumbLabelTemplate?: string;
|
|
299
|
+
retainFilters?: boolean;
|
|
300
|
+
label?: string;
|
|
301
|
+
linkedInsightId?: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
305
|
+
|
|
306
|
+
declare interface DrillThroughInteraction {
|
|
307
|
+
mode: 'drillThrough';
|
|
308
|
+
filterFields: Field[];
|
|
309
|
+
targetSheetId: string;
|
|
310
|
+
label?: string;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
declare interface DrillToDetailInteraction {
|
|
314
|
+
mode: 'drillToDetail';
|
|
315
|
+
filterFields: Field[];
|
|
316
|
+
detailFields?: Field[];
|
|
317
|
+
sortBy?: SortByField[];
|
|
318
|
+
limit?: number;
|
|
319
|
+
detailTitle?: string;
|
|
320
|
+
label?: string;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare interface DrillToURLInteraction {
|
|
324
|
+
mode: 'drillToURL';
|
|
325
|
+
filterFields: Field[];
|
|
326
|
+
urlTemplate: string;
|
|
327
|
+
label?: string;
|
|
328
|
+
}
|
|
329
|
+
|
|
224
330
|
export declare type DroppableId = 'droppable-group-by' | 'droppable-metric';
|
|
225
331
|
|
|
226
332
|
export declare type EmailSettings = {
|
|
@@ -383,12 +489,21 @@ declare interface GroupByField extends Field {
|
|
|
383
489
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
384
490
|
*/
|
|
385
491
|
expression?: string;
|
|
492
|
+
timeDrillPath?: TimeDrillStep[];
|
|
386
493
|
}
|
|
387
494
|
|
|
388
495
|
export declare type HtmlOptions = {
|
|
389
496
|
html: string;
|
|
390
497
|
};
|
|
391
498
|
|
|
499
|
+
declare interface InlineDrillInteraction {
|
|
500
|
+
mode: 'inlineDrill';
|
|
501
|
+
filterFields: Field[];
|
|
502
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
503
|
+
inlineLimit?: number;
|
|
504
|
+
label?: string;
|
|
505
|
+
}
|
|
506
|
+
|
|
392
507
|
declare interface Join {
|
|
393
508
|
id: string;
|
|
394
509
|
source: DatabaseEntityReference;
|
|
@@ -488,7 +603,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
|
|
|
488
603
|
|
|
489
604
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
490
605
|
|
|
491
|
-
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
|
|
606
|
+
declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
|
|
492
607
|
|
|
493
608
|
declare type OptionsMap = {
|
|
494
609
|
number: NumberOptions;
|
|
@@ -623,6 +738,7 @@ export declare type TBaseQuery = {
|
|
|
623
738
|
};
|
|
624
739
|
|
|
625
740
|
export declare type TCard = {
|
|
741
|
+
mode?: CardMode;
|
|
626
742
|
id: string;
|
|
627
743
|
title: string;
|
|
628
744
|
tabTitle?: string;
|
|
@@ -636,6 +752,7 @@ export declare type TCard = {
|
|
|
636
752
|
python?: string;
|
|
637
753
|
dataSource?: DataSource;
|
|
638
754
|
config?: CardConfig;
|
|
755
|
+
interactionConfig?: CardInteractionConfig;
|
|
639
756
|
queryConfig?: QueryConfig;
|
|
640
757
|
customCfg?: any;
|
|
641
758
|
preferences?: TCardPreferences;
|
|
@@ -690,6 +807,7 @@ export declare type TCardPreferences = {
|
|
|
690
807
|
};
|
|
691
808
|
kpiVisualOptions?: {
|
|
692
809
|
lowerIsBetter?: boolean;
|
|
810
|
+
countryLogoId?: string;
|
|
693
811
|
};
|
|
694
812
|
};
|
|
695
813
|
|
|
@@ -833,6 +951,13 @@ export declare type TFrame = {
|
|
|
833
951
|
|
|
834
952
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
835
953
|
|
|
954
|
+
declare interface TimeDrillStep {
|
|
955
|
+
granularity: TimeGranularity;
|
|
956
|
+
next?: TimeGranularity;
|
|
957
|
+
comparison?: 'previous_year' | 'previous_period';
|
|
958
|
+
rollingWindow?: number;
|
|
959
|
+
}
|
|
960
|
+
|
|
836
961
|
declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
837
962
|
|
|
838
963
|
export declare type TLegendOptions = {
|
package/dist/types/main.d.ts
CHANGED
|
@@ -11,7 +11,10 @@ import { Dialect as Dialect_2 } from '../types/explorer-types';
|
|
|
11
11
|
import { DropdownItem as DropdownItem_2 } from '../types/dropdown-types';
|
|
12
12
|
import { EmailSettings as EmailSettings_2 } from '..';
|
|
13
13
|
import { FontSpec } from 'chart.js';
|
|
14
|
+
import { GroupByField as GroupByField_2 } from '../types/explorer-types';
|
|
14
15
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
16
|
+
import { MetricField as MetricField_2 } from '../types/explorer-types';
|
|
17
|
+
import { PivotByField as PivotByField_2 } from '../types/explorer-types';
|
|
15
18
|
import { QueryObserverResult } from '@tanstack/query-core';
|
|
16
19
|
import { RefetchOptions } from '@tanstack/query-core';
|
|
17
20
|
import { StoreApi } from 'zustand';
|
|
@@ -67,6 +70,7 @@ declare type Actions = {
|
|
|
67
70
|
updateFrame: (sheetId: string, frame: TFrame) => void;
|
|
68
71
|
updateCard: (sheetId: string, card: TCard) => void;
|
|
69
72
|
updateFrameCard?: (sheetId: string, frameId: string, card: TCard) => void;
|
|
73
|
+
updateCurrentDashboardCard: (card: TCard) => void;
|
|
70
74
|
removeFrame: (sheetId: string, frameId: string) => void;
|
|
71
75
|
removeCard: (sheetId: string, card: TCard) => void;
|
|
72
76
|
setIsDashboardEditing: (editing: boolean) => void;
|
|
@@ -105,7 +109,8 @@ declare type Actions = {
|
|
|
105
109
|
setBaseQueries: (baseQueries: TBaseQuery[]) => void;
|
|
106
110
|
};
|
|
107
111
|
|
|
108
|
-
declare type Actions_2 = TableActions & ExplorerActions & {
|
|
112
|
+
declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
|
|
113
|
+
setCardMode: (mode: CardMode) => void;
|
|
109
114
|
setEditorFilterMode: (filterColumnName: string, filterMode: 'include' | 'exclude') => void;
|
|
110
115
|
setLowerIsBetter: (lowerIsBetter: boolean) => void;
|
|
111
116
|
clearEditorFilter: (filterColumn: FilterByColumn) => void;
|
|
@@ -117,6 +122,9 @@ declare type Actions_2 = TableActions & ExplorerActions & {
|
|
|
117
122
|
}) => void;
|
|
118
123
|
clearQueryConfig: () => void;
|
|
119
124
|
setQueryConfig: (queryConfig: QueryConfig | undefined) => void;
|
|
125
|
+
setCardTitle: (title: string) => void;
|
|
126
|
+
setCardDescription: (description: string) => void;
|
|
127
|
+
setCountryLogo: (countryLogoId: string | null) => void;
|
|
120
128
|
setIsDevMode: (isDevMode: boolean) => void;
|
|
121
129
|
setOrderByColumns: (orderByColumns: OrderBy[]) => void;
|
|
122
130
|
addOrderByColumn: (orderByColumn: OrderBy) => void;
|
|
@@ -250,8 +258,43 @@ export declare interface CardConfig {
|
|
|
250
258
|
filters?: FilterGroup;
|
|
251
259
|
joinPlan?: JoinPlan;
|
|
252
260
|
rowLimit?: number;
|
|
261
|
+
/**
|
|
262
|
+
* One or more hierarchies that define drillable paths through dimensions.
|
|
263
|
+
*/
|
|
264
|
+
drillHierarchies?: DrillHierarchy[];
|
|
265
|
+
/**
|
|
266
|
+
* Optional list of dimensions allowed for dynamic drill-down across this card.
|
|
267
|
+
* Used only when drill steps contain `mode: 'dynamicDrill'` or `type: 'dynamic'`.
|
|
268
|
+
*/
|
|
269
|
+
allowedDrillTargets?: Field[];
|
|
270
|
+
/**
|
|
271
|
+
* NOT UOptional preload settings for inline drill previews
|
|
272
|
+
*/
|
|
273
|
+
inlineDrillPreview?: {
|
|
274
|
+
enabled: boolean;
|
|
275
|
+
limit: number;
|
|
276
|
+
mode: 'lazy' | 'preloaded';
|
|
277
|
+
};
|
|
278
|
+
/**
|
|
279
|
+
* Configuration for on-click dashboard filters triggered by this card.
|
|
280
|
+
*/
|
|
281
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
282
|
+
comparisonType?: 'none' | 'previous_period' | 'same_period_last_year' | 'target';
|
|
283
|
+
targetValue?: number;
|
|
284
|
+
showTrendline?: boolean;
|
|
285
|
+
trendlineWindow?: number;
|
|
286
|
+
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
declare interface CardInteractionConfig {
|
|
290
|
+
allowedDrillTargets?: Field[];
|
|
291
|
+
drillHierarchies?: DrillHierarchy[];
|
|
292
|
+
drillInteractions?: DrillInteraction[];
|
|
293
|
+
clickFilterInteractions?: ClickFilterInteraction[];
|
|
253
294
|
}
|
|
254
295
|
|
|
296
|
+
export declare type CardMode = 'explorer' | 'dev';
|
|
297
|
+
|
|
255
298
|
declare type CardWithContent = BaseCustomCard & {
|
|
256
299
|
content: React.FC<{
|
|
257
300
|
card: TCard;
|
|
@@ -272,6 +315,33 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
272
315
|
|
|
273
316
|
export declare function cleanCard(card: TCard): TCard;
|
|
274
317
|
|
|
318
|
+
declare interface ClickFilterInteraction {
|
|
319
|
+
mode: 'clickFilter';
|
|
320
|
+
/**
|
|
321
|
+
* Fields from the chart element that should be used as filters.
|
|
322
|
+
* e.g., [region, ship_mode] from a stacked bar chart
|
|
323
|
+
*/
|
|
324
|
+
filterFields: Field[];
|
|
325
|
+
/**
|
|
326
|
+
* Should this card visually highlight when clicked?
|
|
327
|
+
*/
|
|
328
|
+
highlightSelf?: boolean;
|
|
329
|
+
/**
|
|
330
|
+
* Cards this filter applies to (inclusive).
|
|
331
|
+
* If omitted and `excludeCardIds` is also omitted → applies to all cards except self.
|
|
332
|
+
*/
|
|
333
|
+
applyToCardIds?: string[];
|
|
334
|
+
/**
|
|
335
|
+
* Cards to explicitly exclude from receiving this filter.
|
|
336
|
+
* Takes effect only if `applyToCardIds` is undefined (acts as override).
|
|
337
|
+
*/
|
|
338
|
+
excludeCardIds?: string[];
|
|
339
|
+
/**
|
|
340
|
+
* Optional UI label or tooltip.
|
|
341
|
+
*/
|
|
342
|
+
label?: string;
|
|
343
|
+
}
|
|
344
|
+
|
|
275
345
|
export declare type ColorRange = {
|
|
276
346
|
start: number;
|
|
277
347
|
end: number;
|
|
@@ -463,7 +533,7 @@ export declare interface DataSource {
|
|
|
463
533
|
|
|
464
534
|
export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
|
|
465
535
|
|
|
466
|
-
export declare const DATE_FORMAT_VALUES: readonly ["YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
536
|
+
export declare const DATE_FORMAT_VALUES: readonly ["MM-DD-YYYY", "YYYY-MM-DD", "MM/DD/YYYY", "DD/MM/YYYY", "MMMM DD, YYYY", "MMM DD, YYYY", "DD MMM YYYY", "YYYY-MM", "MMMM YYYY", "custom"];
|
|
467
537
|
|
|
468
538
|
export declare type DateFormatOption = {
|
|
469
539
|
value: DateFormatValue;
|
|
@@ -486,6 +556,75 @@ export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'n
|
|
|
486
556
|
|
|
487
557
|
export declare function downloadPdf(): Promise<void>;
|
|
488
558
|
|
|
559
|
+
declare interface DrillActions {
|
|
560
|
+
updateDrillHierarchies: (h: DrillHierarchy[]) => void;
|
|
561
|
+
addDrillHierarchy: (h: DrillHierarchy) => void;
|
|
562
|
+
removeDrillHierarchy: (hierarchyId: string) => void;
|
|
563
|
+
updateDrillHierarchy: (hierarchyId: string, updates: Partial<DrillHierarchy>) => void;
|
|
564
|
+
setDefaultHierarchy: (hierarchyId: string) => void;
|
|
565
|
+
updateAllowedDrillTargets: (t: Field[]) => void;
|
|
566
|
+
addDrillTarget: (t: Field) => void;
|
|
567
|
+
removeDrillTarget: (targetId: string) => void;
|
|
568
|
+
updateDrillInteractions: (i: DrillInteraction[]) => void;
|
|
569
|
+
addDrillInteraction: (i: DrillInteraction) => void;
|
|
570
|
+
removeDrillInteraction: (index: number) => void;
|
|
571
|
+
updateClickFilterInteractions: (i: ClickFilterInteraction[]) => void;
|
|
572
|
+
addClickFilterInteraction: (i: ClickFilterInteraction) => void;
|
|
573
|
+
removeClickFilterInteraction: (fieldId: string) => void;
|
|
574
|
+
updateInlineDrillPreview: (s: {
|
|
575
|
+
enabled: boolean;
|
|
576
|
+
limit: number;
|
|
577
|
+
mode: 'lazy' | 'preloaded';
|
|
578
|
+
}) => void;
|
|
579
|
+
toggleInlineDrillPreview: (enabled: boolean) => void;
|
|
580
|
+
updateInteractionConfig: (c: Partial<CardInteractionConfig>) => void;
|
|
581
|
+
resetDrillConfiguration: () => void;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
declare interface DrillHierarchy {
|
|
585
|
+
id: string;
|
|
586
|
+
label?: string;
|
|
587
|
+
type: 'static';
|
|
588
|
+
steps: DrillHierarchyStep[];
|
|
589
|
+
default?: boolean;
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
declare interface DrillHierarchyStep {
|
|
593
|
+
field: Field;
|
|
594
|
+
mode: 'drillDown';
|
|
595
|
+
preferredChartType?: TChartType;
|
|
596
|
+
breadcrumbLabelTemplate?: string;
|
|
597
|
+
retainFilters?: boolean;
|
|
598
|
+
label?: string;
|
|
599
|
+
linkedInsightId?: string;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
declare type DrillInteraction = DrillThroughInteraction | DrillToDetailInteraction | DrillToURLInteraction | InlineDrillInteraction;
|
|
603
|
+
|
|
604
|
+
declare interface DrillThroughInteraction {
|
|
605
|
+
mode: 'drillThrough';
|
|
606
|
+
filterFields: Field[];
|
|
607
|
+
targetSheetId: string;
|
|
608
|
+
label?: string;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
declare interface DrillToDetailInteraction {
|
|
612
|
+
mode: 'drillToDetail';
|
|
613
|
+
filterFields: Field[];
|
|
614
|
+
detailFields?: Field[];
|
|
615
|
+
sortBy?: SortByField[];
|
|
616
|
+
limit?: number;
|
|
617
|
+
detailTitle?: string;
|
|
618
|
+
label?: string;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
declare interface DrillToURLInteraction {
|
|
622
|
+
mode: 'drillToURL';
|
|
623
|
+
filterFields: Field[];
|
|
624
|
+
urlTemplate: string;
|
|
625
|
+
label?: string;
|
|
626
|
+
}
|
|
627
|
+
|
|
489
628
|
export declare type DropdownItem = {
|
|
490
629
|
id: string;
|
|
491
630
|
name: string;
|
|
@@ -796,12 +935,21 @@ export declare interface GroupByField extends Field {
|
|
|
796
935
|
* If present, used in SELECT and GROUP BY instead of just the column name.
|
|
797
936
|
*/
|
|
798
937
|
expression?: string;
|
|
938
|
+
timeDrillPath?: TimeDrillStep[];
|
|
799
939
|
}
|
|
800
940
|
|
|
801
941
|
export declare type HtmlOptions = {
|
|
802
942
|
html: string;
|
|
803
943
|
};
|
|
804
944
|
|
|
945
|
+
declare interface InlineDrillInteraction {
|
|
946
|
+
mode: 'inlineDrill';
|
|
947
|
+
filterFields: Field[];
|
|
948
|
+
fetchMode?: 'lazy' | 'preloaded';
|
|
949
|
+
inlineLimit?: number;
|
|
950
|
+
label?: string;
|
|
951
|
+
}
|
|
952
|
+
|
|
805
953
|
export declare function invalidateToken(): Promise<any>;
|
|
806
954
|
|
|
807
955
|
export declare function isBooleanDataType(dataType: string): boolean;
|
|
@@ -915,7 +1063,7 @@ export declare type OldFilterValue = string | number | null | (string | number)[
|
|
|
915
1063
|
|
|
916
1064
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
917
1065
|
|
|
918
|
-
export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in';
|
|
1066
|
+
export declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
|
|
919
1067
|
|
|
920
1068
|
declare type OptionsMap = {
|
|
921
1069
|
number: NumberOptions;
|
|
@@ -1113,6 +1261,7 @@ export declare type TBaseQuery = {
|
|
|
1113
1261
|
};
|
|
1114
1262
|
|
|
1115
1263
|
export declare type TCard = {
|
|
1264
|
+
mode?: CardMode;
|
|
1116
1265
|
id: string;
|
|
1117
1266
|
title: string;
|
|
1118
1267
|
tabTitle?: string;
|
|
@@ -1126,6 +1275,7 @@ export declare type TCard = {
|
|
|
1126
1275
|
python?: string;
|
|
1127
1276
|
dataSource?: DataSource;
|
|
1128
1277
|
config?: CardConfig;
|
|
1278
|
+
interactionConfig?: CardInteractionConfig;
|
|
1129
1279
|
queryConfig?: QueryConfig;
|
|
1130
1280
|
customCfg?: any;
|
|
1131
1281
|
preferences?: TCardPreferences;
|
|
@@ -1180,6 +1330,7 @@ export declare type TCardPreferences = {
|
|
|
1180
1330
|
};
|
|
1181
1331
|
kpiVisualOptions?: {
|
|
1182
1332
|
lowerIsBetter?: boolean;
|
|
1333
|
+
countryLogoId?: string;
|
|
1183
1334
|
};
|
|
1184
1335
|
};
|
|
1185
1336
|
|
|
@@ -1325,6 +1476,13 @@ export declare type TFrame = {
|
|
|
1325
1476
|
|
|
1326
1477
|
export declare type Theme = 'dark' | 'light' | 'system';
|
|
1327
1478
|
|
|
1479
|
+
declare interface TimeDrillStep {
|
|
1480
|
+
granularity: TimeGranularity;
|
|
1481
|
+
next?: TimeGranularity;
|
|
1482
|
+
comparison?: 'previous_year' | 'previous_period';
|
|
1483
|
+
rollingWindow?: number;
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1328
1486
|
export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
1329
1487
|
|
|
1330
1488
|
export declare type TLegendOptions = {
|
|
@@ -1342,6 +1500,101 @@ export declare type TLens = {
|
|
|
1342
1500
|
shared?: boolean;
|
|
1343
1501
|
};
|
|
1344
1502
|
|
|
1503
|
+
/**
|
|
1504
|
+
* Parameters for customizing token behavior and formatting.
|
|
1505
|
+
*/
|
|
1506
|
+
export declare type TokenParams = {
|
|
1507
|
+
currencyFormat: {
|
|
1508
|
+
/**
|
|
1509
|
+
* Locale identifier (e.g., 'en-US', 'fr-FR').
|
|
1510
|
+
*/
|
|
1511
|
+
locale: string;
|
|
1512
|
+
/**
|
|
1513
|
+
* Currency code compliant with ISO 4217 (e.g., 'USD', 'EUR').
|
|
1514
|
+
*/
|
|
1515
|
+
currency: string;
|
|
1516
|
+
};
|
|
1517
|
+
};
|
|
1518
|
+
|
|
1519
|
+
/**
|
|
1520
|
+
* Main payload for generating a secure access token for a dashboard.
|
|
1521
|
+
*/
|
|
1522
|
+
export declare type TokenRequest = {
|
|
1523
|
+
/**
|
|
1524
|
+
* Identifier of the dashboard to be accessed.
|
|
1525
|
+
*/
|
|
1526
|
+
dashboardId: string;
|
|
1527
|
+
/**
|
|
1528
|
+
* Secret key used for validating access to the dashboard.
|
|
1529
|
+
*/
|
|
1530
|
+
dashboardSecret: string;
|
|
1531
|
+
/**
|
|
1532
|
+
* Token expiry duration in seconds.
|
|
1533
|
+
*/
|
|
1534
|
+
tokenExpiry?: number;
|
|
1535
|
+
/**
|
|
1536
|
+
* Unique identifier of the tenant.
|
|
1537
|
+
*/
|
|
1538
|
+
tenantId?: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* Unique identifier of the end user accessing the dashboard.
|
|
1541
|
+
*/
|
|
1542
|
+
endUserId?: string;
|
|
1543
|
+
/**
|
|
1544
|
+
* Email of the end user (for personalization, audit, or identification).
|
|
1545
|
+
*/
|
|
1546
|
+
endUserEmail?: string;
|
|
1547
|
+
/**
|
|
1548
|
+
* Enables self-service editing and lens creation by the end user.
|
|
1549
|
+
*/
|
|
1550
|
+
allowEdit?: boolean;
|
|
1551
|
+
/**
|
|
1552
|
+
* Connection-level security policies.
|
|
1553
|
+
* Can be a single policy or an array of policies.
|
|
1554
|
+
*/
|
|
1555
|
+
cls?: TokenSecurityPolicy[] | TokenSecurityPolicy;
|
|
1556
|
+
/**
|
|
1557
|
+
* Row-level security policies.
|
|
1558
|
+
* Can be a single policy or an array of policies.
|
|
1559
|
+
*/
|
|
1560
|
+
rcls?: TokenSecurityPolicy[] | TokenSecurityPolicy;
|
|
1561
|
+
/**
|
|
1562
|
+
* Parameter overrides and preferences (e.g., formatting).
|
|
1563
|
+
*/
|
|
1564
|
+
params?: TokenParams;
|
|
1565
|
+
/**
|
|
1566
|
+
* UI behavior and feature flags.
|
|
1567
|
+
*/
|
|
1568
|
+
config?: UIConfig;
|
|
1569
|
+
};
|
|
1570
|
+
|
|
1571
|
+
/**
|
|
1572
|
+
* Defines a security policy that can be applied at connection or row level.
|
|
1573
|
+
*/
|
|
1574
|
+
export declare type TokenSecurityPolicy = {
|
|
1575
|
+
/**
|
|
1576
|
+
* Name of the policy (e.g., 'store_sales_primary', 'region_filter').
|
|
1577
|
+
*/
|
|
1578
|
+
name: string;
|
|
1579
|
+
/**
|
|
1580
|
+
* Arbitrary parameters associated with the policy.
|
|
1581
|
+
* Examples:
|
|
1582
|
+
*
|
|
1583
|
+
* // Single value
|
|
1584
|
+
* {
|
|
1585
|
+
* tenant: 'tenant_abc_123'
|
|
1586
|
+
* }
|
|
1587
|
+
*
|
|
1588
|
+
* // Multiple values
|
|
1589
|
+
* {
|
|
1590
|
+
* state: ['California', 'Nevada', 'Washington']
|
|
1591
|
+
* }
|
|
1592
|
+
*/
|
|
1593
|
+
params: {
|
|
1594
|
+
[key: string]: string | number | string[] | number[];
|
|
1595
|
+
};
|
|
1596
|
+
};
|
|
1597
|
+
|
|
1345
1598
|
export declare type TSelectedRecord = ComboBoxOption;
|
|
1346
1599
|
|
|
1347
1600
|
export declare type TSheet = {
|
|
@@ -1362,6 +1615,26 @@ export declare type TStyle = {
|
|
|
1362
1615
|
dark?: StyleProps;
|
|
1363
1616
|
};
|
|
1364
1617
|
|
|
1618
|
+
/**
|
|
1619
|
+
* UI and behavior configuration for the embedded dashboard.
|
|
1620
|
+
*/
|
|
1621
|
+
export declare type UIConfig = {
|
|
1622
|
+
/**
|
|
1623
|
+
* Enables self-service editing and lens creation by the end user. Legacy field. Use config.allowEdit instead.
|
|
1624
|
+
*/
|
|
1625
|
+
allowEdit?: boolean;
|
|
1626
|
+
/**
|
|
1627
|
+
* Enables advanced mode features in the dashboard.
|
|
1628
|
+
* Defaults to true unless explicitly disabled.
|
|
1629
|
+
*/
|
|
1630
|
+
showAdvancedMode?: boolean;
|
|
1631
|
+
/**
|
|
1632
|
+
* Enables the AI-powered dashboard assistant.
|
|
1633
|
+
* Defaults to true unless explicitly disabled.
|
|
1634
|
+
*/
|
|
1635
|
+
showDashboardAssistant?: boolean;
|
|
1636
|
+
};
|
|
1637
|
+
|
|
1365
1638
|
export declare function useCard(cardId: string): {
|
|
1366
1639
|
data: any;
|
|
1367
1640
|
card: TCard;
|
|
@@ -1375,6 +1648,16 @@ export declare function useCard(cardId: string): {
|
|
|
1375
1648
|
queryKey: string[];
|
|
1376
1649
|
};
|
|
1377
1650
|
|
|
1651
|
+
export declare const useCurrentActiveCard: () => TCard | undefined;
|
|
1652
|
+
|
|
1653
|
+
export declare const useCurrentCardConfig: () => {
|
|
1654
|
+
metricFields: MetricField_2[];
|
|
1655
|
+
groupByFields: GroupByField_2[];
|
|
1656
|
+
pivotByFields: PivotByField_2[];
|
|
1657
|
+
};
|
|
1658
|
+
|
|
1659
|
+
export declare const useCurrentSheetActiveCards: () => TCard[];
|
|
1660
|
+
|
|
1378
1661
|
export declare const useDashboardActions: () => Actions;
|
|
1379
1662
|
|
|
1380
1663
|
export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardStore>, "setState"> & {
|