react-semaphor 0.0.5323 → 0.0.5801
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-2Ws4IDjX.js +421 -0
- package/dist/chunks/dashboard-plus-CHD4IsyS.js +20754 -0
- package/dist/chunks/index-Cz5Qe8Z8.js +678 -0
- package/dist/chunks/{index-DORmhDA9.js → index-D1qZuwZQ.js} +41033 -33025
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +64 -41
- 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 +115 -4
- package/dist/types/main.d.ts +230 -9
- package/dist/types/surfboard.d.ts +115 -4
- package/dist/types/types.d.ts +114 -3
- package/package.json +6 -4
- package/dist/chunks/dashboard-plus-Bhud1IPW.js +0 -375
- package/dist/chunks/dashboard-plus-CNVP0HeC.js +0 -13427
- package/dist/chunks/index-By9l1g-q.js +0 -638
package/dist/surfboard/index.js
CHANGED
|
@@ -26,6 +26,25 @@ export declare type AuthToken = {
|
|
|
26
26
|
refreshToken?: string;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
export declare type AxisConfig = {
|
|
30
|
+
enabled?: boolean;
|
|
31
|
+
name?: {
|
|
32
|
+
enabled: boolean;
|
|
33
|
+
text?: string;
|
|
34
|
+
};
|
|
35
|
+
position?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
36
|
+
labels?: {
|
|
37
|
+
enabled: boolean;
|
|
38
|
+
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
39
|
+
};
|
|
40
|
+
formatOptions?: TFormatOptions;
|
|
41
|
+
scale?: {
|
|
42
|
+
min?: number | 'auto';
|
|
43
|
+
max?: number | 'auto';
|
|
44
|
+
stepSize?: number | 'auto';
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
|
|
29
48
|
declare interface BaseColumn {
|
|
30
49
|
id: string;
|
|
31
50
|
name: string;
|
|
@@ -88,6 +107,16 @@ declare interface CardConfig {
|
|
|
88
107
|
showTrendline?: boolean;
|
|
89
108
|
trendlineWindow?: number;
|
|
90
109
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
110
|
+
rowAggregates?: Array<{
|
|
111
|
+
label?: string;
|
|
112
|
+
function: AggregateFunction;
|
|
113
|
+
groupLevel: string | 'ALL';
|
|
114
|
+
}>;
|
|
115
|
+
columnAggregates?: Array<{
|
|
116
|
+
label?: string;
|
|
117
|
+
function: AggregateFunction;
|
|
118
|
+
pivotLevel: string | 'ALL';
|
|
119
|
+
}>;
|
|
91
120
|
}
|
|
92
121
|
|
|
93
122
|
declare interface CardInteractionConfig {
|
|
@@ -142,6 +171,10 @@ declare interface ClickFilterInteraction {
|
|
|
142
171
|
label?: string;
|
|
143
172
|
}
|
|
144
173
|
|
|
174
|
+
export declare type ColorConfig = {
|
|
175
|
+
segments: Record<string, string>;
|
|
176
|
+
};
|
|
177
|
+
|
|
145
178
|
export declare type ColorRange = {
|
|
146
179
|
start: number;
|
|
147
180
|
end: number;
|
|
@@ -194,7 +227,7 @@ declare type ConnectionType = 'GoogleSheets' | 'MySQL' | 'MSSQL' | 'PostgreSQL'
|
|
|
194
227
|
|
|
195
228
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
196
229
|
|
|
197
|
-
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
230
|
+
export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
|
|
198
231
|
|
|
199
232
|
export declare type DashboardEventHandlers = {
|
|
200
233
|
onExportData?: (payload: ExportDataPayload) => void;
|
|
@@ -267,7 +300,7 @@ declare interface DataSource {
|
|
|
267
300
|
selectedEntities: SelectedEntities;
|
|
268
301
|
}
|
|
269
302
|
|
|
270
|
-
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-
|
|
303
|
+
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", "Week of MMM DD, YYYY", "Week of MMMM DD, YYYY", "YYYY-WW", "MMM YYYY", "MMMM YYYY", "YYYY-MM", "MM/YYYY", "YYYY MMM", "Q1 YYYY", "YYYY Q1", "1st Quarter YYYY", "YYYY-Q1", "Quarter 1, YYYY", "YYYY", "YY", "custom"];
|
|
271
304
|
|
|
272
305
|
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
273
306
|
|
|
@@ -370,6 +403,7 @@ declare interface Field {
|
|
|
370
403
|
* If not provided, should be auto-generated from label or name.
|
|
371
404
|
*/
|
|
372
405
|
alias?: string;
|
|
406
|
+
qualifiedFieldName: string;
|
|
373
407
|
dataType: string;
|
|
374
408
|
description?: string;
|
|
375
409
|
qualifiedEntityName?: string;
|
|
@@ -577,7 +611,9 @@ declare interface MetricField extends Field {
|
|
|
577
611
|
}
|
|
578
612
|
}
|
|
579
613
|
*/
|
|
580
|
-
parameters?:
|
|
614
|
+
parameters?: {
|
|
615
|
+
filters?: FilterGroup;
|
|
616
|
+
};
|
|
581
617
|
aliasTemplate?: string;
|
|
582
618
|
valueAliases?: Record<string, string>;
|
|
583
619
|
}
|
|
@@ -617,6 +653,14 @@ declare interface OrderBy {
|
|
|
617
653
|
direction: 'asc' | 'desc';
|
|
618
654
|
}
|
|
619
655
|
|
|
656
|
+
/**
|
|
657
|
+
* Pagination configuration for table queries
|
|
658
|
+
*/
|
|
659
|
+
declare interface PaginationConfig {
|
|
660
|
+
page: number;
|
|
661
|
+
pageSize: number;
|
|
662
|
+
}
|
|
663
|
+
|
|
620
664
|
declare type Params = {
|
|
621
665
|
[key: string]: string | number | string[] | number[];
|
|
622
666
|
};
|
|
@@ -727,6 +771,7 @@ declare type TablePreferences = {
|
|
|
727
771
|
selectColumnVisible?: boolean;
|
|
728
772
|
columnVisibility?: Record<string, boolean>;
|
|
729
773
|
pageSize?: number;
|
|
774
|
+
enableDevModePagination?: boolean;
|
|
730
775
|
};
|
|
731
776
|
|
|
732
777
|
export declare type TBaseQuery = {
|
|
@@ -753,6 +798,7 @@ export declare type TCard = {
|
|
|
753
798
|
dataSource?: DataSource;
|
|
754
799
|
config?: CardConfig;
|
|
755
800
|
interactionConfig?: CardInteractionConfig;
|
|
801
|
+
paginationConfig?: PaginationConfig;
|
|
756
802
|
queryConfig?: QueryConfig;
|
|
757
803
|
customCfg?: any;
|
|
758
804
|
preferences?: TCardPreferences;
|
|
@@ -789,6 +835,10 @@ export declare type TCardPreferences = {
|
|
|
789
835
|
datasetOptions?: TDatasetOptions[];
|
|
790
836
|
chartOptions?: TChartOptions;
|
|
791
837
|
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
838
|
+
colorConfig?: ColorConfig;
|
|
839
|
+
xAxisConfig?: AxisConfig;
|
|
840
|
+
yAxisConfig?: AxisConfig;
|
|
841
|
+
dataLabelsConfig?: TDataLabelsConfig;
|
|
792
842
|
tablePrefs?: TablePreferences;
|
|
793
843
|
allowDownload?: boolean;
|
|
794
844
|
customVisualCode?: string;
|
|
@@ -808,6 +858,34 @@ export declare type TCardPreferences = {
|
|
|
808
858
|
kpiVisualOptions?: {
|
|
809
859
|
lowerIsBetter?: boolean;
|
|
810
860
|
countryLogoId?: string;
|
|
861
|
+
formatOptions?: TFormatOptions;
|
|
862
|
+
metricComparison?: {
|
|
863
|
+
enabled?: boolean;
|
|
864
|
+
calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
865
|
+
formatOptions?: TFormatOptions;
|
|
866
|
+
showArrow?: boolean;
|
|
867
|
+
showColor?: boolean;
|
|
868
|
+
conditionalLabel?: boolean;
|
|
869
|
+
labelName?: string;
|
|
870
|
+
position?: 'left' | 'right' | 'top';
|
|
871
|
+
conditionalLabels?: {
|
|
872
|
+
increase?: string;
|
|
873
|
+
decrease?: string;
|
|
874
|
+
noChange?: string;
|
|
875
|
+
};
|
|
876
|
+
colorConfig?: {
|
|
877
|
+
increase?: 'green' | 'red' | 'neutral' | string;
|
|
878
|
+
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
879
|
+
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
};
|
|
883
|
+
pivotTableOptions?: {
|
|
884
|
+
showRowTotals?: boolean;
|
|
885
|
+
showColumnTotals?: boolean;
|
|
886
|
+
showGrandTotal?: boolean;
|
|
887
|
+
sortRowsBy?: 'label' | 'total' | 'metric';
|
|
888
|
+
sortColumnsBy?: 'label' | 'total' | 'metric';
|
|
811
889
|
};
|
|
812
890
|
};
|
|
813
891
|
|
|
@@ -846,7 +924,7 @@ export declare type TChartOptions = {
|
|
|
846
924
|
};
|
|
847
925
|
};
|
|
848
926
|
|
|
849
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
927
|
+
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';
|
|
850
928
|
|
|
851
929
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
852
930
|
columnIdx: number;
|
|
@@ -899,6 +977,26 @@ export declare type TDataColumn = {
|
|
|
899
977
|
is_nullable?: string;
|
|
900
978
|
label?: string;
|
|
901
979
|
description?: string;
|
|
980
|
+
qualifiedFieldName?: string;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
export declare type TDataLabelsConfig = {
|
|
984
|
+
enabled?: boolean;
|
|
985
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
|
|
986
|
+
anchor?: 'center' | 'start' | 'end';
|
|
987
|
+
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
988
|
+
display?: 'auto' | boolean;
|
|
989
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
990
|
+
formatOptions?: TFormatOptions;
|
|
991
|
+
font?: {
|
|
992
|
+
size?: number;
|
|
993
|
+
weight?: 'normal' | 'bold';
|
|
994
|
+
};
|
|
995
|
+
color?: 'auto' | string;
|
|
996
|
+
clamp?: boolean;
|
|
997
|
+
clip?: boolean;
|
|
998
|
+
rotation?: number;
|
|
999
|
+
showTotal?: boolean;
|
|
902
1000
|
};
|
|
903
1001
|
|
|
904
1002
|
export declare type TDatasetOptions = {
|
|
@@ -943,6 +1041,19 @@ declare type TFilter = {
|
|
|
943
1041
|
|
|
944
1042
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
945
1043
|
|
|
1044
|
+
export declare type TFormatOptions = {
|
|
1045
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
1046
|
+
decimalPlaces?: number;
|
|
1047
|
+
currency?: string;
|
|
1048
|
+
locale?: string;
|
|
1049
|
+
prefix?: string;
|
|
1050
|
+
suffix?: string;
|
|
1051
|
+
useSuffix?: boolean;
|
|
1052
|
+
negativeInParentheses?: boolean;
|
|
1053
|
+
multiplyBy?: number;
|
|
1054
|
+
dateFormat?: string;
|
|
1055
|
+
};
|
|
1056
|
+
|
|
946
1057
|
export declare type TFrame = {
|
|
947
1058
|
id: string;
|
|
948
1059
|
filterId?: string;
|
package/dist/types/main.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { FontSpec } from 'chart.js';
|
|
|
14
14
|
import { GroupByField as GroupByField_2 } from '../types/explorer-types';
|
|
15
15
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
16
16
|
import { MetricField as MetricField_2 } from '../types/explorer-types';
|
|
17
|
+
import { PaginationMetadata as PaginationMetadata_2 } from '../types/explorer-types';
|
|
17
18
|
import { PivotByField as PivotByField_2 } from '../types/explorer-types';
|
|
18
19
|
import { QueryObserverResult } from '@tanstack/query-core';
|
|
19
20
|
import { RefetchOptions } from '@tanstack/query-core';
|
|
@@ -107,6 +108,7 @@ declare type Actions = {
|
|
|
107
108
|
addBaseQuery: (baseQuery: TBaseQuery) => void;
|
|
108
109
|
removeBaseQuery: (baseQueryId: string) => void;
|
|
109
110
|
setBaseQueries: (baseQueries: TBaseQuery[]) => void;
|
|
111
|
+
setIsDashboardPanelOpen: (open: boolean) => void;
|
|
110
112
|
};
|
|
111
113
|
|
|
112
114
|
declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
|
|
@@ -198,6 +200,14 @@ declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
|
|
|
198
200
|
|
|
199
201
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
200
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Configuration for which aggregate functions to use and at which levels (by Field.id)
|
|
205
|
+
*/
|
|
206
|
+
export declare interface AggregateConfig {
|
|
207
|
+
functions: AggregateFunction[];
|
|
208
|
+
levels?: string[];
|
|
209
|
+
}
|
|
210
|
+
|
|
201
211
|
export declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
|
|
202
212
|
|
|
203
213
|
declare type AIContext = {
|
|
@@ -221,6 +231,25 @@ export declare type AuthToken = {
|
|
|
221
231
|
refreshToken?: string;
|
|
222
232
|
};
|
|
223
233
|
|
|
234
|
+
export declare type AxisConfig = {
|
|
235
|
+
enabled?: boolean;
|
|
236
|
+
name?: {
|
|
237
|
+
enabled: boolean;
|
|
238
|
+
text?: string;
|
|
239
|
+
};
|
|
240
|
+
position?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
241
|
+
labels?: {
|
|
242
|
+
enabled: boolean;
|
|
243
|
+
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
244
|
+
};
|
|
245
|
+
formatOptions?: TFormatOptions;
|
|
246
|
+
scale?: {
|
|
247
|
+
min?: number | 'auto';
|
|
248
|
+
max?: number | 'auto';
|
|
249
|
+
stepSize?: number | 'auto';
|
|
250
|
+
};
|
|
251
|
+
};
|
|
252
|
+
|
|
224
253
|
export declare interface BaseColumn {
|
|
225
254
|
id: string;
|
|
226
255
|
name: string;
|
|
@@ -283,6 +312,16 @@ export declare interface CardConfig {
|
|
|
283
312
|
showTrendline?: boolean;
|
|
284
313
|
trendlineWindow?: number;
|
|
285
314
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
315
|
+
rowAggregates?: Array<{
|
|
316
|
+
label?: string;
|
|
317
|
+
function: AggregateFunction;
|
|
318
|
+
groupLevel: string | 'ALL';
|
|
319
|
+
}>;
|
|
320
|
+
columnAggregates?: Array<{
|
|
321
|
+
label?: string;
|
|
322
|
+
function: AggregateFunction;
|
|
323
|
+
pivotLevel: string | 'ALL';
|
|
324
|
+
}>;
|
|
286
325
|
}
|
|
287
326
|
|
|
288
327
|
declare interface CardInteractionConfig {
|
|
@@ -341,6 +380,10 @@ declare interface ClickFilterInteraction {
|
|
|
341
380
|
label?: string;
|
|
342
381
|
}
|
|
343
382
|
|
|
383
|
+
export declare type ColorConfig = {
|
|
384
|
+
segments: Record<string, string>;
|
|
385
|
+
};
|
|
386
|
+
|
|
344
387
|
export declare type ColorRange = {
|
|
345
388
|
start: number;
|
|
346
389
|
end: number;
|
|
@@ -409,7 +452,7 @@ export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGe
|
|
|
409
452
|
|
|
410
453
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
411
454
|
|
|
412
|
-
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
455
|
+
export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
|
|
413
456
|
|
|
414
457
|
export declare type DashboardEventHandlers = {
|
|
415
458
|
onExportData?: (payload: ExportDataPayload) => void;
|
|
@@ -477,6 +520,7 @@ export declare type DashboardStore = {
|
|
|
477
520
|
showDashboardJSON: boolean;
|
|
478
521
|
showFilters: boolean;
|
|
479
522
|
filterValues?: TFilterValue[];
|
|
523
|
+
isDashboardPanelOpen: boolean;
|
|
480
524
|
onEvent?: (event: TEvent) => void;
|
|
481
525
|
onSaveFunction?: (dashboard: TDashboard, description?: string) => void;
|
|
482
526
|
onAddFrame?: (card: TFrame, sheetId: string) => void;
|
|
@@ -511,6 +555,9 @@ export declare interface DataModelEntityReference extends DatabaseEntityReferenc
|
|
|
511
555
|
|
|
512
556
|
export declare interface DatasetEntityReference extends DatabaseEntityReference {
|
|
513
557
|
type: 'dataset';
|
|
558
|
+
datasetType: 'physical' | 'virtual';
|
|
559
|
+
datamodelId: string;
|
|
560
|
+
sql: string;
|
|
514
561
|
id: string;
|
|
515
562
|
domainId: string;
|
|
516
563
|
label: string;
|
|
@@ -532,7 +579,7 @@ export declare interface DataSource {
|
|
|
532
579
|
|
|
533
580
|
export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
|
|
534
581
|
|
|
535
|
-
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-
|
|
582
|
+
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", "Week of MMM DD, YYYY", "Week of MMMM DD, YYYY", "YYYY-WW", "MMM YYYY", "MMMM YYYY", "YYYY-MM", "MM/YYYY", "YYYY MMM", "Q1 YYYY", "YYYY Q1", "1st Quarter YYYY", "YYYY-Q1", "Quarter 1, YYYY", "YYYY", "YY", "custom"];
|
|
536
583
|
|
|
537
584
|
export declare type DateFormatOption = {
|
|
538
585
|
value: DateFormatValue;
|
|
@@ -764,6 +811,7 @@ export declare interface Field {
|
|
|
764
811
|
* If not provided, should be auto-generated from label or name.
|
|
765
812
|
*/
|
|
766
813
|
alias?: string;
|
|
814
|
+
qualifiedFieldName: string;
|
|
767
815
|
dataType: string;
|
|
768
816
|
description?: string;
|
|
769
817
|
qualifiedEntityName?: string;
|
|
@@ -1036,7 +1084,9 @@ export declare interface MetricField extends Field {
|
|
|
1036
1084
|
}
|
|
1037
1085
|
}
|
|
1038
1086
|
*/
|
|
1039
|
-
parameters?:
|
|
1087
|
+
parameters?: {
|
|
1088
|
+
filters?: FilterGroup;
|
|
1089
|
+
};
|
|
1040
1090
|
aliasTemplate?: string;
|
|
1041
1091
|
valueAliases?: Record<string, string>;
|
|
1042
1092
|
}
|
|
@@ -1078,6 +1128,26 @@ export declare interface OrderBy {
|
|
|
1078
1128
|
direction: 'asc' | 'desc';
|
|
1079
1129
|
}
|
|
1080
1130
|
|
|
1131
|
+
/**
|
|
1132
|
+
* Pagination configuration for table queries
|
|
1133
|
+
*/
|
|
1134
|
+
export declare interface PaginationConfig {
|
|
1135
|
+
page: number;
|
|
1136
|
+
pageSize: number;
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
/**
|
|
1140
|
+
* Pagination metadata returned with query results
|
|
1141
|
+
*/
|
|
1142
|
+
export declare interface PaginationMetadata {
|
|
1143
|
+
page: number;
|
|
1144
|
+
pageSize: number;
|
|
1145
|
+
pageCount: number;
|
|
1146
|
+
totalCount: number;
|
|
1147
|
+
hasNextPage: boolean;
|
|
1148
|
+
hasPrevPage: boolean;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1081
1151
|
declare type Params = {
|
|
1082
1152
|
[key: string]: string | number | string[] | number[];
|
|
1083
1153
|
};
|
|
@@ -1086,6 +1156,31 @@ export declare interface PivotByField extends Field {
|
|
|
1086
1156
|
role: 'pivotby';
|
|
1087
1157
|
}
|
|
1088
1158
|
|
|
1159
|
+
/**
|
|
1160
|
+
const config: CardConfig = {
|
|
1161
|
+
groupByColumns: [
|
|
1162
|
+
{ id: 'region', name: 'region', label: 'Region', ... },
|
|
1163
|
+
{ id: 'country', name: 'country', label: 'Country', ... }
|
|
1164
|
+
],
|
|
1165
|
+
pivotByColumns: [
|
|
1166
|
+
{ id: 'year', name: 'year', label: 'Year', ... },
|
|
1167
|
+
{ id: 'quarter', name: 'quarter', label: 'Quarter', ... }
|
|
1168
|
+
],
|
|
1169
|
+
metricColumns: [ ... ],
|
|
1170
|
+
rowAggregates: ['SUM', 'AVG'],
|
|
1171
|
+
columnAggregates: ['SUM'],
|
|
1172
|
+
subtotals: {
|
|
1173
|
+
groupBy: { functions: ['SUM'], levels: ['region'] }, // subtotal at region level
|
|
1174
|
+
pivotBy: { functions: ['SUM'], levels: ['year'] } // subtotal at year level
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
*/
|
|
1178
|
+
export declare enum PivotMarkerEnum {
|
|
1179
|
+
SUBTOTAL = "__SUBTOTAL__",
|
|
1180
|
+
TOTAL = "__TOTAL__",
|
|
1181
|
+
ALL = "__ALL__"
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1089
1184
|
export declare type Placeholders = {
|
|
1090
1185
|
/**
|
|
1091
1186
|
* Placeholder for the card when there are no records to display.
|
|
@@ -1127,6 +1222,15 @@ export declare function resolveDatamodelName(datamodelName: string): string;
|
|
|
1127
1222
|
|
|
1128
1223
|
export declare const resolveDataType: (value: any) => string;
|
|
1129
1224
|
|
|
1225
|
+
export declare function ResourceManagementPanel({ isOpen, onClose, className, onDashboardItemClick, }: ResourceManagementPanelProps): JSX_2.Element;
|
|
1226
|
+
|
|
1227
|
+
declare interface ResourceManagementPanelProps {
|
|
1228
|
+
isOpen: boolean;
|
|
1229
|
+
onClose: () => void;
|
|
1230
|
+
className?: string;
|
|
1231
|
+
onDashboardItemClick?: (dashboardId: string) => void;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1130
1234
|
export declare function ScheduleDashboard({ triggerButtonClassName, }: {
|
|
1131
1235
|
triggerButtonClassName?: string;
|
|
1132
1236
|
}): JSX_2.Element;
|
|
@@ -1158,6 +1262,11 @@ declare type SelectProps = {
|
|
|
1158
1262
|
type?: 'select' | 'combobox';
|
|
1159
1263
|
};
|
|
1160
1264
|
|
|
1265
|
+
export declare const SemaphorContextProvider: ({ children, dashboardProps, }: {
|
|
1266
|
+
children: React.ReactNode;
|
|
1267
|
+
dashboardProps: DashboardProps;
|
|
1268
|
+
}) => JSX_2.Element;
|
|
1269
|
+
|
|
1161
1270
|
declare function SemaphorQueryClient({ children, }: {
|
|
1162
1271
|
children: React.ReactNode;
|
|
1163
1272
|
}): JSX_2.Element;
|
|
@@ -1224,7 +1333,15 @@ export declare type StyleProps = {
|
|
|
1224
1333
|
};
|
|
1225
1334
|
};
|
|
1226
1335
|
|
|
1227
|
-
|
|
1336
|
+
/**
|
|
1337
|
+
* Subtotal configuration for groupBy and pivotBy axes
|
|
1338
|
+
*/
|
|
1339
|
+
export declare interface SubtotalConfig {
|
|
1340
|
+
groupBy?: AggregateConfig;
|
|
1341
|
+
pivotBy?: AggregateConfig;
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
|
|
1228
1345
|
|
|
1229
1346
|
declare interface TableActions {
|
|
1230
1347
|
updateColumnSettingsMap: (columnSettings: ColumnSettingsMap) => void;
|
|
@@ -1251,6 +1368,7 @@ declare type TablePreferences = {
|
|
|
1251
1368
|
selectColumnVisible?: boolean;
|
|
1252
1369
|
columnVisibility?: Record<string, boolean>;
|
|
1253
1370
|
pageSize?: number;
|
|
1371
|
+
enableDevModePagination?: boolean;
|
|
1254
1372
|
};
|
|
1255
1373
|
|
|
1256
1374
|
export declare type TBaseQuery = {
|
|
@@ -1277,6 +1395,7 @@ export declare type TCard = {
|
|
|
1277
1395
|
dataSource?: DataSource;
|
|
1278
1396
|
config?: CardConfig;
|
|
1279
1397
|
interactionConfig?: CardInteractionConfig;
|
|
1398
|
+
paginationConfig?: PaginationConfig;
|
|
1280
1399
|
queryConfig?: QueryConfig;
|
|
1281
1400
|
customCfg?: any;
|
|
1282
1401
|
preferences?: TCardPreferences;
|
|
@@ -1313,6 +1432,10 @@ export declare type TCardPreferences = {
|
|
|
1313
1432
|
datasetOptions?: TDatasetOptions[];
|
|
1314
1433
|
chartOptions?: TChartOptions;
|
|
1315
1434
|
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
1435
|
+
colorConfig?: ColorConfig;
|
|
1436
|
+
xAxisConfig?: AxisConfig;
|
|
1437
|
+
yAxisConfig?: AxisConfig;
|
|
1438
|
+
dataLabelsConfig?: TDataLabelsConfig;
|
|
1316
1439
|
tablePrefs?: TablePreferences;
|
|
1317
1440
|
allowDownload?: boolean;
|
|
1318
1441
|
customVisualCode?: string;
|
|
@@ -1332,6 +1455,34 @@ export declare type TCardPreferences = {
|
|
|
1332
1455
|
kpiVisualOptions?: {
|
|
1333
1456
|
lowerIsBetter?: boolean;
|
|
1334
1457
|
countryLogoId?: string;
|
|
1458
|
+
formatOptions?: TFormatOptions;
|
|
1459
|
+
metricComparison?: {
|
|
1460
|
+
enabled?: boolean;
|
|
1461
|
+
calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
1462
|
+
formatOptions?: TFormatOptions;
|
|
1463
|
+
showArrow?: boolean;
|
|
1464
|
+
showColor?: boolean;
|
|
1465
|
+
conditionalLabel?: boolean;
|
|
1466
|
+
labelName?: string;
|
|
1467
|
+
position?: 'left' | 'right' | 'top';
|
|
1468
|
+
conditionalLabels?: {
|
|
1469
|
+
increase?: string;
|
|
1470
|
+
decrease?: string;
|
|
1471
|
+
noChange?: string;
|
|
1472
|
+
};
|
|
1473
|
+
colorConfig?: {
|
|
1474
|
+
increase?: 'green' | 'red' | 'neutral' | string;
|
|
1475
|
+
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
1476
|
+
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
1477
|
+
};
|
|
1478
|
+
};
|
|
1479
|
+
};
|
|
1480
|
+
pivotTableOptions?: {
|
|
1481
|
+
showRowTotals?: boolean;
|
|
1482
|
+
showColumnTotals?: boolean;
|
|
1483
|
+
showGrandTotal?: boolean;
|
|
1484
|
+
sortRowsBy?: 'label' | 'total' | 'metric';
|
|
1485
|
+
sortColumnsBy?: 'label' | 'total' | 'metric';
|
|
1335
1486
|
};
|
|
1336
1487
|
};
|
|
1337
1488
|
|
|
@@ -1372,7 +1523,7 @@ export declare type TChartOptions = {
|
|
|
1372
1523
|
};
|
|
1373
1524
|
};
|
|
1374
1525
|
|
|
1375
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
1526
|
+
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';
|
|
1376
1527
|
|
|
1377
1528
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
1378
1529
|
columnIdx: number;
|
|
@@ -1425,6 +1576,26 @@ export declare type TDataColumn = {
|
|
|
1425
1576
|
is_nullable?: string;
|
|
1426
1577
|
label?: string;
|
|
1427
1578
|
description?: string;
|
|
1579
|
+
qualifiedFieldName?: string;
|
|
1580
|
+
};
|
|
1581
|
+
|
|
1582
|
+
export declare type TDataLabelsConfig = {
|
|
1583
|
+
enabled?: boolean;
|
|
1584
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
|
|
1585
|
+
anchor?: 'center' | 'start' | 'end';
|
|
1586
|
+
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1587
|
+
display?: 'auto' | boolean;
|
|
1588
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1589
|
+
formatOptions?: TFormatOptions;
|
|
1590
|
+
font?: {
|
|
1591
|
+
size?: number;
|
|
1592
|
+
weight?: 'normal' | 'bold';
|
|
1593
|
+
};
|
|
1594
|
+
color?: 'auto' | string;
|
|
1595
|
+
clamp?: boolean;
|
|
1596
|
+
clip?: boolean;
|
|
1597
|
+
rotation?: number;
|
|
1598
|
+
showTotal?: boolean;
|
|
1428
1599
|
};
|
|
1429
1600
|
|
|
1430
1601
|
export declare type TDatasetOptions = {
|
|
@@ -1469,6 +1640,19 @@ declare type TFilter = {
|
|
|
1469
1640
|
|
|
1470
1641
|
export declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
1471
1642
|
|
|
1643
|
+
export declare type TFormatOptions = {
|
|
1644
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
1645
|
+
decimalPlaces?: number;
|
|
1646
|
+
currency?: string;
|
|
1647
|
+
locale?: string;
|
|
1648
|
+
prefix?: string;
|
|
1649
|
+
suffix?: string;
|
|
1650
|
+
useSuffix?: boolean;
|
|
1651
|
+
negativeInParentheses?: boolean;
|
|
1652
|
+
multiplyBy?: number;
|
|
1653
|
+
dateFormat?: string;
|
|
1654
|
+
};
|
|
1655
|
+
|
|
1472
1656
|
export declare type TFrame = {
|
|
1473
1657
|
id: string;
|
|
1474
1658
|
filterId?: string;
|
|
@@ -1522,14 +1706,34 @@ export declare type TokenParams = {
|
|
|
1522
1706
|
* Main payload for generating a secure access token for a dashboard.
|
|
1523
1707
|
*/
|
|
1524
1708
|
export declare type TokenRequest = {
|
|
1709
|
+
/**
|
|
1710
|
+
* Allowed semantic domains.
|
|
1711
|
+
*/
|
|
1712
|
+
allowedSemanticDomains?: string[];
|
|
1713
|
+
/**
|
|
1714
|
+
* Type of the token request. Default is 'dashboard'.
|
|
1715
|
+
*/
|
|
1716
|
+
type?: 'dashboard' | 'project';
|
|
1717
|
+
/**
|
|
1718
|
+
* Initial dashboard id to be accessed.
|
|
1719
|
+
*/
|
|
1720
|
+
initialDashboardId?: string;
|
|
1525
1721
|
/**
|
|
1526
1722
|
* Identifier of the dashboard to be accessed.
|
|
1527
1723
|
*/
|
|
1528
|
-
dashboardId
|
|
1724
|
+
dashboardId?: string;
|
|
1529
1725
|
/**
|
|
1530
1726
|
* Secret key used for validating access to the dashboard.
|
|
1531
1727
|
*/
|
|
1532
|
-
dashboardSecret
|
|
1728
|
+
dashboardSecret?: string;
|
|
1729
|
+
/**
|
|
1730
|
+
* Unique identifier of the project.
|
|
1731
|
+
*/
|
|
1732
|
+
projectId?: string;
|
|
1733
|
+
/**
|
|
1734
|
+
* Secret key used for validating access to the project.
|
|
1735
|
+
*/
|
|
1736
|
+
projectSecret?: string;
|
|
1533
1737
|
/**
|
|
1534
1738
|
* Token expiry duration in seconds.
|
|
1535
1739
|
*/
|
|
@@ -1539,17 +1743,33 @@ export declare type TokenRequest = {
|
|
|
1539
1743
|
*/
|
|
1540
1744
|
tenantId?: string;
|
|
1541
1745
|
/**
|
|
1542
|
-
* Unique identifier of the
|
|
1746
|
+
* Unique identifier of the tenant user accessing the dashboard.
|
|
1543
1747
|
*/
|
|
1544
1748
|
endUserId?: string;
|
|
1545
1749
|
/**
|
|
1546
|
-
* Email of the
|
|
1750
|
+
* Email of the tenant user (for personalization, audit, or identification).
|
|
1547
1751
|
*/
|
|
1548
1752
|
endUserEmail?: string;
|
|
1753
|
+
/**
|
|
1754
|
+
* Unique identifier of the org user accessing the dashboard.
|
|
1755
|
+
*/
|
|
1756
|
+
orgUserId?: string;
|
|
1757
|
+
/**
|
|
1758
|
+
* Email of the org user (for personalization, audit, or identification).
|
|
1759
|
+
*/
|
|
1760
|
+
orgUserEmail?: string;
|
|
1761
|
+
/**
|
|
1762
|
+
* Display name of the end user.
|
|
1763
|
+
*/
|
|
1764
|
+
displayName?: string;
|
|
1549
1765
|
/**
|
|
1550
1766
|
* Enables self-service editing and lens creation by the end user.
|
|
1551
1767
|
*/
|
|
1552
1768
|
allowEdit?: boolean;
|
|
1769
|
+
/**
|
|
1770
|
+
* Schema level security policy. The schema name for the tenant.
|
|
1771
|
+
*/
|
|
1772
|
+
sls?: string;
|
|
1553
1773
|
/**
|
|
1554
1774
|
* Connection-level security policies.
|
|
1555
1775
|
* Can be a single policy or an array of policies.
|
|
@@ -1648,6 +1868,7 @@ export declare function useCard(cardId: string): {
|
|
|
1648
1868
|
handleDatapointClick: (chart: Chart, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
1649
1869
|
cfg: TChartConfiguration | undefined;
|
|
1650
1870
|
queryKey: string[];
|
|
1871
|
+
pagination: PaginationMetadata_2 | undefined;
|
|
1651
1872
|
};
|
|
1652
1873
|
|
|
1653
1874
|
export declare const useCurrentActiveCard: () => TCard | undefined;
|