react-semaphor 0.0.5323 → 0.0.5921
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-BbSiLlXL.js +20527 -0
- package/dist/chunks/dashboard-plus-eWa7yST3.js +346 -0
- package/dist/chunks/index-BoQ03saJ.js +859 -0
- package/dist/chunks/{index-DORmhDA9.js → index-s7sbyt-u.js} +44445 -32932
- 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 +127 -4
- package/dist/types/main.d.ts +242 -9
- package/dist/types/surfboard.d.ts +127 -4
- package/dist/types/types.d.ts +126 -3
- package/package.json +9 -7
- 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/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,10 +200,19 @@ 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 = {
|
|
204
214
|
selectedEntities: SelectedEntities;
|
|
215
|
+
fileAttachments?: FileAttachment[];
|
|
205
216
|
};
|
|
206
217
|
|
|
207
218
|
export declare type AIScopeTable = {
|
|
@@ -221,6 +232,25 @@ export declare type AuthToken = {
|
|
|
221
232
|
refreshToken?: string;
|
|
222
233
|
};
|
|
223
234
|
|
|
235
|
+
export declare type AxisConfig = {
|
|
236
|
+
enabled?: boolean;
|
|
237
|
+
name?: {
|
|
238
|
+
enabled: boolean;
|
|
239
|
+
text?: string;
|
|
240
|
+
};
|
|
241
|
+
position?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
242
|
+
labels?: {
|
|
243
|
+
enabled: boolean;
|
|
244
|
+
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
245
|
+
};
|
|
246
|
+
formatOptions?: TFormatOptions;
|
|
247
|
+
scale?: {
|
|
248
|
+
min?: number | 'auto';
|
|
249
|
+
max?: number | 'auto';
|
|
250
|
+
stepSize?: number | 'auto';
|
|
251
|
+
};
|
|
252
|
+
};
|
|
253
|
+
|
|
224
254
|
export declare interface BaseColumn {
|
|
225
255
|
id: string;
|
|
226
256
|
name: string;
|
|
@@ -283,6 +313,16 @@ export declare interface CardConfig {
|
|
|
283
313
|
showTrendline?: boolean;
|
|
284
314
|
trendlineWindow?: number;
|
|
285
315
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
316
|
+
rowAggregates?: Array<{
|
|
317
|
+
label?: string;
|
|
318
|
+
function: AggregateFunction;
|
|
319
|
+
groupLevel: string | 'ALL';
|
|
320
|
+
}>;
|
|
321
|
+
columnAggregates?: Array<{
|
|
322
|
+
label?: string;
|
|
323
|
+
function: AggregateFunction;
|
|
324
|
+
pivotLevel: string | 'ALL';
|
|
325
|
+
}>;
|
|
286
326
|
}
|
|
287
327
|
|
|
288
328
|
declare interface CardInteractionConfig {
|
|
@@ -341,6 +381,10 @@ declare interface ClickFilterInteraction {
|
|
|
341
381
|
label?: string;
|
|
342
382
|
}
|
|
343
383
|
|
|
384
|
+
export declare type ColorConfig = {
|
|
385
|
+
segments: Record<string, string>;
|
|
386
|
+
};
|
|
387
|
+
|
|
344
388
|
export declare type ColorRange = {
|
|
345
389
|
start: number;
|
|
346
390
|
end: number;
|
|
@@ -409,7 +453,7 @@ export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGe
|
|
|
409
453
|
|
|
410
454
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
411
455
|
|
|
412
|
-
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
456
|
+
export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
|
|
413
457
|
|
|
414
458
|
export declare type DashboardEventHandlers = {
|
|
415
459
|
onExportData?: (payload: ExportDataPayload) => void;
|
|
@@ -477,6 +521,7 @@ export declare type DashboardStore = {
|
|
|
477
521
|
showDashboardJSON: boolean;
|
|
478
522
|
showFilters: boolean;
|
|
479
523
|
filterValues?: TFilterValue[];
|
|
524
|
+
isDashboardPanelOpen: boolean;
|
|
480
525
|
onEvent?: (event: TEvent) => void;
|
|
481
526
|
onSaveFunction?: (dashboard: TDashboard, description?: string) => void;
|
|
482
527
|
onAddFrame?: (card: TFrame, sheetId: string) => void;
|
|
@@ -511,6 +556,9 @@ export declare interface DataModelEntityReference extends DatabaseEntityReferenc
|
|
|
511
556
|
|
|
512
557
|
export declare interface DatasetEntityReference extends DatabaseEntityReference {
|
|
513
558
|
type: 'dataset';
|
|
559
|
+
datasetType: 'physical' | 'virtual';
|
|
560
|
+
datamodelId: string;
|
|
561
|
+
sql: string;
|
|
514
562
|
id: string;
|
|
515
563
|
domainId: string;
|
|
516
564
|
label: string;
|
|
@@ -532,7 +580,7 @@ export declare interface DataSource {
|
|
|
532
580
|
|
|
533
581
|
export declare type DataType = 'string' | 'number' | 'date' | 'datetime' | 'boolean' | 'json' | 'geo';
|
|
534
582
|
|
|
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-
|
|
583
|
+
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
584
|
|
|
537
585
|
export declare type DateFormatOption = {
|
|
538
586
|
value: DateFormatValue;
|
|
@@ -764,6 +812,7 @@ export declare interface Field {
|
|
|
764
812
|
* If not provided, should be auto-generated from label or name.
|
|
765
813
|
*/
|
|
766
814
|
alias?: string;
|
|
815
|
+
qualifiedFieldName: string;
|
|
767
816
|
dataType: string;
|
|
768
817
|
description?: string;
|
|
769
818
|
qualifiedEntityName?: string;
|
|
@@ -776,6 +825,17 @@ export declare interface Field {
|
|
|
776
825
|
role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
|
|
777
826
|
}
|
|
778
827
|
|
|
828
|
+
declare type FileAttachment = {
|
|
829
|
+
id: string;
|
|
830
|
+
name: string;
|
|
831
|
+
size: number;
|
|
832
|
+
type: string;
|
|
833
|
+
data?: string;
|
|
834
|
+
url?: string;
|
|
835
|
+
preview?: string;
|
|
836
|
+
uploadProgress?: number;
|
|
837
|
+
};
|
|
838
|
+
|
|
779
839
|
export declare interface FileEntityReference extends DatabaseEntityReference {
|
|
780
840
|
id: string;
|
|
781
841
|
type: 'file' | 'url' | 'upload';
|
|
@@ -1036,7 +1096,9 @@ export declare interface MetricField extends Field {
|
|
|
1036
1096
|
}
|
|
1037
1097
|
}
|
|
1038
1098
|
*/
|
|
1039
|
-
parameters?:
|
|
1099
|
+
parameters?: {
|
|
1100
|
+
filters?: FilterGroup;
|
|
1101
|
+
};
|
|
1040
1102
|
aliasTemplate?: string;
|
|
1041
1103
|
valueAliases?: Record<string, string>;
|
|
1042
1104
|
}
|
|
@@ -1078,6 +1140,26 @@ export declare interface OrderBy {
|
|
|
1078
1140
|
direction: 'asc' | 'desc';
|
|
1079
1141
|
}
|
|
1080
1142
|
|
|
1143
|
+
/**
|
|
1144
|
+
* Pagination configuration for table queries
|
|
1145
|
+
*/
|
|
1146
|
+
export declare interface PaginationConfig {
|
|
1147
|
+
page: number;
|
|
1148
|
+
pageSize: number;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/**
|
|
1152
|
+
* Pagination metadata returned with query results
|
|
1153
|
+
*/
|
|
1154
|
+
export declare interface PaginationMetadata {
|
|
1155
|
+
page: number;
|
|
1156
|
+
pageSize: number;
|
|
1157
|
+
pageCount: number;
|
|
1158
|
+
totalCount: number;
|
|
1159
|
+
hasNextPage: boolean;
|
|
1160
|
+
hasPrevPage: boolean;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1081
1163
|
declare type Params = {
|
|
1082
1164
|
[key: string]: string | number | string[] | number[];
|
|
1083
1165
|
};
|
|
@@ -1086,6 +1168,31 @@ export declare interface PivotByField extends Field {
|
|
|
1086
1168
|
role: 'pivotby';
|
|
1087
1169
|
}
|
|
1088
1170
|
|
|
1171
|
+
/**
|
|
1172
|
+
const config: CardConfig = {
|
|
1173
|
+
groupByColumns: [
|
|
1174
|
+
{ id: 'region', name: 'region', label: 'Region', ... },
|
|
1175
|
+
{ id: 'country', name: 'country', label: 'Country', ... }
|
|
1176
|
+
],
|
|
1177
|
+
pivotByColumns: [
|
|
1178
|
+
{ id: 'year', name: 'year', label: 'Year', ... },
|
|
1179
|
+
{ id: 'quarter', name: 'quarter', label: 'Quarter', ... }
|
|
1180
|
+
],
|
|
1181
|
+
metricColumns: [ ... ],
|
|
1182
|
+
rowAggregates: ['SUM', 'AVG'],
|
|
1183
|
+
columnAggregates: ['SUM'],
|
|
1184
|
+
subtotals: {
|
|
1185
|
+
groupBy: { functions: ['SUM'], levels: ['region'] }, // subtotal at region level
|
|
1186
|
+
pivotBy: { functions: ['SUM'], levels: ['year'] } // subtotal at year level
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
*/
|
|
1190
|
+
export declare enum PivotMarkerEnum {
|
|
1191
|
+
SUBTOTAL = "__SUBTOTAL__",
|
|
1192
|
+
TOTAL = "__TOTAL__",
|
|
1193
|
+
ALL = "__ALL__"
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1089
1196
|
export declare type Placeholders = {
|
|
1090
1197
|
/**
|
|
1091
1198
|
* Placeholder for the card when there are no records to display.
|
|
@@ -1127,6 +1234,15 @@ export declare function resolveDatamodelName(datamodelName: string): string;
|
|
|
1127
1234
|
|
|
1128
1235
|
export declare const resolveDataType: (value: any) => string;
|
|
1129
1236
|
|
|
1237
|
+
export declare function ResourceManagementPanel({ isOpen, onClose, className, onDashboardItemClick, }: ResourceManagementPanelProps): JSX_2.Element;
|
|
1238
|
+
|
|
1239
|
+
declare interface ResourceManagementPanelProps {
|
|
1240
|
+
isOpen: boolean;
|
|
1241
|
+
onClose: () => void;
|
|
1242
|
+
className?: string;
|
|
1243
|
+
onDashboardItemClick?: (dashboardId: string) => void;
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1130
1246
|
export declare function ScheduleDashboard({ triggerButtonClassName, }: {
|
|
1131
1247
|
triggerButtonClassName?: string;
|
|
1132
1248
|
}): JSX_2.Element;
|
|
@@ -1158,6 +1274,11 @@ declare type SelectProps = {
|
|
|
1158
1274
|
type?: 'select' | 'combobox';
|
|
1159
1275
|
};
|
|
1160
1276
|
|
|
1277
|
+
export declare const SemaphorContextProvider: ({ children, dashboardProps, }: {
|
|
1278
|
+
children: React.ReactNode;
|
|
1279
|
+
dashboardProps: DashboardProps;
|
|
1280
|
+
}) => JSX_2.Element;
|
|
1281
|
+
|
|
1161
1282
|
declare function SemaphorQueryClient({ children, }: {
|
|
1162
1283
|
children: React.ReactNode;
|
|
1163
1284
|
}): JSX_2.Element;
|
|
@@ -1224,7 +1345,15 @@ export declare type StyleProps = {
|
|
|
1224
1345
|
};
|
|
1225
1346
|
};
|
|
1226
1347
|
|
|
1227
|
-
|
|
1348
|
+
/**
|
|
1349
|
+
* Subtotal configuration for groupBy and pivotBy axes
|
|
1350
|
+
*/
|
|
1351
|
+
export declare interface SubtotalConfig {
|
|
1352
|
+
groupBy?: AggregateConfig;
|
|
1353
|
+
pivotBy?: AggregateConfig;
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
|
|
1228
1357
|
|
|
1229
1358
|
declare interface TableActions {
|
|
1230
1359
|
updateColumnSettingsMap: (columnSettings: ColumnSettingsMap) => void;
|
|
@@ -1251,6 +1380,7 @@ declare type TablePreferences = {
|
|
|
1251
1380
|
selectColumnVisible?: boolean;
|
|
1252
1381
|
columnVisibility?: Record<string, boolean>;
|
|
1253
1382
|
pageSize?: number;
|
|
1383
|
+
enableDevModePagination?: boolean;
|
|
1254
1384
|
};
|
|
1255
1385
|
|
|
1256
1386
|
export declare type TBaseQuery = {
|
|
@@ -1277,6 +1407,7 @@ export declare type TCard = {
|
|
|
1277
1407
|
dataSource?: DataSource;
|
|
1278
1408
|
config?: CardConfig;
|
|
1279
1409
|
interactionConfig?: CardInteractionConfig;
|
|
1410
|
+
paginationConfig?: PaginationConfig;
|
|
1280
1411
|
queryConfig?: QueryConfig;
|
|
1281
1412
|
customCfg?: any;
|
|
1282
1413
|
preferences?: TCardPreferences;
|
|
@@ -1313,6 +1444,10 @@ export declare type TCardPreferences = {
|
|
|
1313
1444
|
datasetOptions?: TDatasetOptions[];
|
|
1314
1445
|
chartOptions?: TChartOptions;
|
|
1315
1446
|
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
1447
|
+
colorConfig?: ColorConfig;
|
|
1448
|
+
xAxisConfig?: AxisConfig;
|
|
1449
|
+
yAxisConfig?: AxisConfig;
|
|
1450
|
+
dataLabelsConfig?: TDataLabelsConfig;
|
|
1316
1451
|
tablePrefs?: TablePreferences;
|
|
1317
1452
|
allowDownload?: boolean;
|
|
1318
1453
|
customVisualCode?: string;
|
|
@@ -1332,6 +1467,34 @@ export declare type TCardPreferences = {
|
|
|
1332
1467
|
kpiVisualOptions?: {
|
|
1333
1468
|
lowerIsBetter?: boolean;
|
|
1334
1469
|
countryLogoId?: string;
|
|
1470
|
+
formatOptions?: TFormatOptions;
|
|
1471
|
+
metricComparison?: {
|
|
1472
|
+
enabled?: boolean;
|
|
1473
|
+
calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
1474
|
+
formatOptions?: TFormatOptions;
|
|
1475
|
+
showArrow?: boolean;
|
|
1476
|
+
showColor?: boolean;
|
|
1477
|
+
conditionalLabel?: boolean;
|
|
1478
|
+
labelName?: string;
|
|
1479
|
+
position?: 'left' | 'right' | 'top';
|
|
1480
|
+
conditionalLabels?: {
|
|
1481
|
+
increase?: string;
|
|
1482
|
+
decrease?: string;
|
|
1483
|
+
noChange?: string;
|
|
1484
|
+
};
|
|
1485
|
+
colorConfig?: {
|
|
1486
|
+
increase?: 'green' | 'red' | 'neutral' | string;
|
|
1487
|
+
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
1488
|
+
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
1489
|
+
};
|
|
1490
|
+
};
|
|
1491
|
+
};
|
|
1492
|
+
pivotTableOptions?: {
|
|
1493
|
+
showRowTotals?: boolean;
|
|
1494
|
+
showColumnTotals?: boolean;
|
|
1495
|
+
showGrandTotal?: boolean;
|
|
1496
|
+
sortRowsBy?: 'label' | 'total' | 'metric';
|
|
1497
|
+
sortColumnsBy?: 'label' | 'total' | 'metric';
|
|
1335
1498
|
};
|
|
1336
1499
|
};
|
|
1337
1500
|
|
|
@@ -1372,7 +1535,7 @@ export declare type TChartOptions = {
|
|
|
1372
1535
|
};
|
|
1373
1536
|
};
|
|
1374
1537
|
|
|
1375
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
1538
|
+
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
1539
|
|
|
1377
1540
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
1378
1541
|
columnIdx: number;
|
|
@@ -1425,6 +1588,26 @@ export declare type TDataColumn = {
|
|
|
1425
1588
|
is_nullable?: string;
|
|
1426
1589
|
label?: string;
|
|
1427
1590
|
description?: string;
|
|
1591
|
+
qualifiedFieldName?: string;
|
|
1592
|
+
};
|
|
1593
|
+
|
|
1594
|
+
export declare type TDataLabelsConfig = {
|
|
1595
|
+
enabled?: boolean;
|
|
1596
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
|
|
1597
|
+
anchor?: 'center' | 'start' | 'end';
|
|
1598
|
+
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1599
|
+
display?: 'auto' | boolean;
|
|
1600
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1601
|
+
formatOptions?: TFormatOptions;
|
|
1602
|
+
font?: {
|
|
1603
|
+
size?: number;
|
|
1604
|
+
weight?: 'normal' | 'bold';
|
|
1605
|
+
};
|
|
1606
|
+
color?: 'auto' | string;
|
|
1607
|
+
clamp?: boolean;
|
|
1608
|
+
clip?: boolean;
|
|
1609
|
+
rotation?: number;
|
|
1610
|
+
showTotal?: boolean;
|
|
1428
1611
|
};
|
|
1429
1612
|
|
|
1430
1613
|
export declare type TDatasetOptions = {
|
|
@@ -1469,6 +1652,19 @@ declare type TFilter = {
|
|
|
1469
1652
|
|
|
1470
1653
|
export declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
1471
1654
|
|
|
1655
|
+
export declare type TFormatOptions = {
|
|
1656
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
1657
|
+
decimalPlaces?: number;
|
|
1658
|
+
currency?: string;
|
|
1659
|
+
locale?: string;
|
|
1660
|
+
prefix?: string;
|
|
1661
|
+
suffix?: string;
|
|
1662
|
+
useSuffix?: boolean;
|
|
1663
|
+
negativeInParentheses?: boolean;
|
|
1664
|
+
multiplyBy?: number;
|
|
1665
|
+
dateFormat?: string;
|
|
1666
|
+
};
|
|
1667
|
+
|
|
1472
1668
|
export declare type TFrame = {
|
|
1473
1669
|
id: string;
|
|
1474
1670
|
filterId?: string;
|
|
@@ -1522,14 +1718,34 @@ export declare type TokenParams = {
|
|
|
1522
1718
|
* Main payload for generating a secure access token for a dashboard.
|
|
1523
1719
|
*/
|
|
1524
1720
|
export declare type TokenRequest = {
|
|
1721
|
+
/**
|
|
1722
|
+
* Allowed semantic domains.
|
|
1723
|
+
*/
|
|
1724
|
+
allowedSemanticDomains?: string[];
|
|
1725
|
+
/**
|
|
1726
|
+
* Type of the token request. Default is 'dashboard'.
|
|
1727
|
+
*/
|
|
1728
|
+
type?: 'dashboard' | 'project';
|
|
1729
|
+
/**
|
|
1730
|
+
* Initial dashboard id to be accessed.
|
|
1731
|
+
*/
|
|
1732
|
+
initialDashboardId?: string;
|
|
1525
1733
|
/**
|
|
1526
1734
|
* Identifier of the dashboard to be accessed.
|
|
1527
1735
|
*/
|
|
1528
|
-
dashboardId
|
|
1736
|
+
dashboardId?: string;
|
|
1529
1737
|
/**
|
|
1530
1738
|
* Secret key used for validating access to the dashboard.
|
|
1531
1739
|
*/
|
|
1532
|
-
dashboardSecret
|
|
1740
|
+
dashboardSecret?: string;
|
|
1741
|
+
/**
|
|
1742
|
+
* Unique identifier of the project.
|
|
1743
|
+
*/
|
|
1744
|
+
projectId?: string;
|
|
1745
|
+
/**
|
|
1746
|
+
* Secret key used for validating access to the project.
|
|
1747
|
+
*/
|
|
1748
|
+
projectSecret?: string;
|
|
1533
1749
|
/**
|
|
1534
1750
|
* Token expiry duration in seconds.
|
|
1535
1751
|
*/
|
|
@@ -1539,17 +1755,33 @@ export declare type TokenRequest = {
|
|
|
1539
1755
|
*/
|
|
1540
1756
|
tenantId?: string;
|
|
1541
1757
|
/**
|
|
1542
|
-
* Unique identifier of the
|
|
1758
|
+
* Unique identifier of the tenant user accessing the dashboard.
|
|
1543
1759
|
*/
|
|
1544
1760
|
endUserId?: string;
|
|
1545
1761
|
/**
|
|
1546
|
-
* Email of the
|
|
1762
|
+
* Email of the tenant user (for personalization, audit, or identification).
|
|
1547
1763
|
*/
|
|
1548
1764
|
endUserEmail?: string;
|
|
1765
|
+
/**
|
|
1766
|
+
* Unique identifier of the org user accessing the dashboard.
|
|
1767
|
+
*/
|
|
1768
|
+
orgUserId?: string;
|
|
1769
|
+
/**
|
|
1770
|
+
* Email of the org user (for personalization, audit, or identification).
|
|
1771
|
+
*/
|
|
1772
|
+
orgUserEmail?: string;
|
|
1773
|
+
/**
|
|
1774
|
+
* Display name of the end user.
|
|
1775
|
+
*/
|
|
1776
|
+
displayName?: string;
|
|
1549
1777
|
/**
|
|
1550
1778
|
* Enables self-service editing and lens creation by the end user.
|
|
1551
1779
|
*/
|
|
1552
1780
|
allowEdit?: boolean;
|
|
1781
|
+
/**
|
|
1782
|
+
* Schema level security policy. The schema name for the tenant.
|
|
1783
|
+
*/
|
|
1784
|
+
sls?: string;
|
|
1553
1785
|
/**
|
|
1554
1786
|
* Connection-level security policies.
|
|
1555
1787
|
* Can be a single policy or an array of policies.
|
|
@@ -1648,6 +1880,7 @@ export declare function useCard(cardId: string): {
|
|
|
1648
1880
|
handleDatapointClick: (chart: Chart, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
1649
1881
|
cfg: TChartConfiguration | undefined;
|
|
1650
1882
|
queryKey: string[];
|
|
1883
|
+
pagination: PaginationMetadata_2 | undefined;
|
|
1651
1884
|
};
|
|
1652
1885
|
|
|
1653
1886
|
export declare const useCurrentActiveCard: () => TCard | undefined;
|
|
@@ -7,6 +7,7 @@ declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDI
|
|
|
7
7
|
|
|
8
8
|
declare type AIContext = {
|
|
9
9
|
selectedEntities: SelectedEntities;
|
|
10
|
+
fileAttachments?: FileAttachment[];
|
|
10
11
|
};
|
|
11
12
|
|
|
12
13
|
export declare type AIScopeTable = {
|
|
@@ -26,6 +27,25 @@ export declare type AuthToken = {
|
|
|
26
27
|
refreshToken?: string;
|
|
27
28
|
};
|
|
28
29
|
|
|
30
|
+
export declare type AxisConfig = {
|
|
31
|
+
enabled?: boolean;
|
|
32
|
+
name?: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
text?: string;
|
|
35
|
+
};
|
|
36
|
+
position?: 'auto' | 'top' | 'bottom' | 'left' | 'right';
|
|
37
|
+
labels?: {
|
|
38
|
+
enabled: boolean;
|
|
39
|
+
rotation?: 'auto' | 0 | 45 | 90 | -45 | -90;
|
|
40
|
+
};
|
|
41
|
+
formatOptions?: TFormatOptions;
|
|
42
|
+
scale?: {
|
|
43
|
+
min?: number | 'auto';
|
|
44
|
+
max?: number | 'auto';
|
|
45
|
+
stepSize?: number | 'auto';
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
|
|
29
49
|
declare interface BaseColumn {
|
|
30
50
|
id: string;
|
|
31
51
|
name: string;
|
|
@@ -88,6 +108,16 @@ declare interface CardConfig {
|
|
|
88
108
|
showTrendline?: boolean;
|
|
89
109
|
trendlineWindow?: number;
|
|
90
110
|
trendlineGranularity?: 'day' | 'week' | 'month';
|
|
111
|
+
rowAggregates?: Array<{
|
|
112
|
+
label?: string;
|
|
113
|
+
function: AggregateFunction;
|
|
114
|
+
groupLevel: string | 'ALL';
|
|
115
|
+
}>;
|
|
116
|
+
columnAggregates?: Array<{
|
|
117
|
+
label?: string;
|
|
118
|
+
function: AggregateFunction;
|
|
119
|
+
pivotLevel: string | 'ALL';
|
|
120
|
+
}>;
|
|
91
121
|
}
|
|
92
122
|
|
|
93
123
|
declare interface CardInteractionConfig {
|
|
@@ -142,6 +172,10 @@ declare interface ClickFilterInteraction {
|
|
|
142
172
|
label?: string;
|
|
143
173
|
}
|
|
144
174
|
|
|
175
|
+
export declare type ColorConfig = {
|
|
176
|
+
segments: Record<string, string>;
|
|
177
|
+
};
|
|
178
|
+
|
|
145
179
|
export declare type ColorRange = {
|
|
146
180
|
start: number;
|
|
147
181
|
end: number;
|
|
@@ -270,7 +304,7 @@ declare interface DataSource {
|
|
|
270
304
|
selectedEntities: SelectedEntities;
|
|
271
305
|
}
|
|
272
306
|
|
|
273
|
-
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-
|
|
307
|
+
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"];
|
|
274
308
|
|
|
275
309
|
declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
|
|
276
310
|
|
|
@@ -373,6 +407,7 @@ declare interface Field {
|
|
|
373
407
|
* If not provided, should be auto-generated from label or name.
|
|
374
408
|
*/
|
|
375
409
|
alias?: string;
|
|
410
|
+
qualifiedFieldName: string;
|
|
376
411
|
dataType: string;
|
|
377
412
|
description?: string;
|
|
378
413
|
qualifiedEntityName?: string;
|
|
@@ -385,6 +420,17 @@ declare interface Field {
|
|
|
385
420
|
role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
|
|
386
421
|
}
|
|
387
422
|
|
|
423
|
+
declare type FileAttachment = {
|
|
424
|
+
id: string;
|
|
425
|
+
name: string;
|
|
426
|
+
size: number;
|
|
427
|
+
type: string;
|
|
428
|
+
data?: string;
|
|
429
|
+
url?: string;
|
|
430
|
+
preview?: string;
|
|
431
|
+
uploadProgress?: number;
|
|
432
|
+
};
|
|
433
|
+
|
|
388
434
|
declare interface FileEntityReference extends DatabaseEntityReference {
|
|
389
435
|
id: string;
|
|
390
436
|
type: 'file' | 'url' | 'upload';
|
|
@@ -580,7 +626,9 @@ declare interface MetricField extends Field {
|
|
|
580
626
|
}
|
|
581
627
|
}
|
|
582
628
|
*/
|
|
583
|
-
parameters?:
|
|
629
|
+
parameters?: {
|
|
630
|
+
filters?: FilterGroup;
|
|
631
|
+
};
|
|
584
632
|
aliasTemplate?: string;
|
|
585
633
|
valueAliases?: Record<string, string>;
|
|
586
634
|
}
|
|
@@ -620,6 +668,14 @@ declare interface OrderBy {
|
|
|
620
668
|
direction: 'asc' | 'desc';
|
|
621
669
|
}
|
|
622
670
|
|
|
671
|
+
/**
|
|
672
|
+
* Pagination configuration for table queries
|
|
673
|
+
*/
|
|
674
|
+
declare interface PaginationConfig {
|
|
675
|
+
page: number;
|
|
676
|
+
pageSize: number;
|
|
677
|
+
}
|
|
678
|
+
|
|
623
679
|
declare type Params = {
|
|
624
680
|
[key: string]: string | number | string[] | number[];
|
|
625
681
|
};
|
|
@@ -725,13 +781,14 @@ export declare type StyleProps = {
|
|
|
725
781
|
};
|
|
726
782
|
};
|
|
727
783
|
|
|
728
|
-
export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
784
|
+
export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
|
|
729
785
|
|
|
730
786
|
declare type TablePreferences = {
|
|
731
787
|
columnSettingsMap?: ColumnSettingsMap;
|
|
732
788
|
selectColumnVisible?: boolean;
|
|
733
789
|
columnVisibility?: Record<string, boolean>;
|
|
734
790
|
pageSize?: number;
|
|
791
|
+
enableDevModePagination?: boolean;
|
|
735
792
|
};
|
|
736
793
|
|
|
737
794
|
export declare type TBaseQuery = {
|
|
@@ -758,6 +815,7 @@ export declare type TCard = {
|
|
|
758
815
|
dataSource?: DataSource;
|
|
759
816
|
config?: CardConfig;
|
|
760
817
|
interactionConfig?: CardInteractionConfig;
|
|
818
|
+
paginationConfig?: PaginationConfig;
|
|
761
819
|
queryConfig?: QueryConfig;
|
|
762
820
|
customCfg?: any;
|
|
763
821
|
preferences?: TCardPreferences;
|
|
@@ -794,6 +852,10 @@ export declare type TCardPreferences = {
|
|
|
794
852
|
datasetOptions?: TDatasetOptions[];
|
|
795
853
|
chartOptions?: TChartOptions;
|
|
796
854
|
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
855
|
+
colorConfig?: ColorConfig;
|
|
856
|
+
xAxisConfig?: AxisConfig;
|
|
857
|
+
yAxisConfig?: AxisConfig;
|
|
858
|
+
dataLabelsConfig?: TDataLabelsConfig;
|
|
797
859
|
tablePrefs?: TablePreferences;
|
|
798
860
|
allowDownload?: boolean;
|
|
799
861
|
customVisualCode?: string;
|
|
@@ -813,6 +875,34 @@ export declare type TCardPreferences = {
|
|
|
813
875
|
kpiVisualOptions?: {
|
|
814
876
|
lowerIsBetter?: boolean;
|
|
815
877
|
countryLogoId?: string;
|
|
878
|
+
formatOptions?: TFormatOptions;
|
|
879
|
+
metricComparison?: {
|
|
880
|
+
enabled?: boolean;
|
|
881
|
+
calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
|
|
882
|
+
formatOptions?: TFormatOptions;
|
|
883
|
+
showArrow?: boolean;
|
|
884
|
+
showColor?: boolean;
|
|
885
|
+
conditionalLabel?: boolean;
|
|
886
|
+
labelName?: string;
|
|
887
|
+
position?: 'left' | 'right' | 'top';
|
|
888
|
+
conditionalLabels?: {
|
|
889
|
+
increase?: string;
|
|
890
|
+
decrease?: string;
|
|
891
|
+
noChange?: string;
|
|
892
|
+
};
|
|
893
|
+
colorConfig?: {
|
|
894
|
+
increase?: 'green' | 'red' | 'neutral' | string;
|
|
895
|
+
decrease?: 'green' | 'red' | 'neutral' | string;
|
|
896
|
+
noChange?: 'green' | 'red' | 'neutral' | string;
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
pivotTableOptions?: {
|
|
901
|
+
showRowTotals?: boolean;
|
|
902
|
+
showColumnTotals?: boolean;
|
|
903
|
+
showGrandTotal?: boolean;
|
|
904
|
+
sortRowsBy?: 'label' | 'total' | 'metric';
|
|
905
|
+
sortColumnsBy?: 'label' | 'total' | 'metric';
|
|
816
906
|
};
|
|
817
907
|
};
|
|
818
908
|
|
|
@@ -851,7 +941,7 @@ export declare type TChartOptions = {
|
|
|
851
941
|
};
|
|
852
942
|
};
|
|
853
943
|
|
|
854
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
|
|
944
|
+
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';
|
|
855
945
|
|
|
856
946
|
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
857
947
|
columnIdx: number;
|
|
@@ -904,6 +994,26 @@ export declare type TDataColumn = {
|
|
|
904
994
|
is_nullable?: string;
|
|
905
995
|
label?: string;
|
|
906
996
|
description?: string;
|
|
997
|
+
qualifiedFieldName?: string;
|
|
998
|
+
};
|
|
999
|
+
|
|
1000
|
+
export declare type TDataLabelsConfig = {
|
|
1001
|
+
enabled?: boolean;
|
|
1002
|
+
position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
|
|
1003
|
+
anchor?: 'center' | 'start' | 'end';
|
|
1004
|
+
align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
|
|
1005
|
+
display?: 'auto' | boolean;
|
|
1006
|
+
format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
|
|
1007
|
+
formatOptions?: TFormatOptions;
|
|
1008
|
+
font?: {
|
|
1009
|
+
size?: number;
|
|
1010
|
+
weight?: 'normal' | 'bold';
|
|
1011
|
+
};
|
|
1012
|
+
color?: 'auto' | string;
|
|
1013
|
+
clamp?: boolean;
|
|
1014
|
+
clip?: boolean;
|
|
1015
|
+
rotation?: number;
|
|
1016
|
+
showTotal?: boolean;
|
|
907
1017
|
};
|
|
908
1018
|
|
|
909
1019
|
export declare type TDatasetOptions = {
|
|
@@ -948,6 +1058,19 @@ declare type TFilter = {
|
|
|
948
1058
|
|
|
949
1059
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
950
1060
|
|
|
1061
|
+
export declare type TFormatOptions = {
|
|
1062
|
+
type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
|
|
1063
|
+
decimalPlaces?: number;
|
|
1064
|
+
currency?: string;
|
|
1065
|
+
locale?: string;
|
|
1066
|
+
prefix?: string;
|
|
1067
|
+
suffix?: string;
|
|
1068
|
+
useSuffix?: boolean;
|
|
1069
|
+
negativeInParentheses?: boolean;
|
|
1070
|
+
multiplyBy?: number;
|
|
1071
|
+
dateFormat?: string;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
951
1074
|
export declare type TFrame = {
|
|
952
1075
|
id: string;
|
|
953
1076
|
filterId?: string;
|