react-semaphor 0.0.560 → 0.0.562

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-94qkdRuS.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-DowivGLd.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { D as f } from "../chunks/dashboard-plus-CFmFuIzW.js";
1
+ import { D as f } from "../chunks/dashboard-plus-BYsfLtBi.js";
2
2
  import { EMPTY_SELECTION as a } from "../types/index.js";
3
3
  export {
4
4
  a as EMPTY_SELECTION,
@@ -88,6 +88,16 @@ declare interface CardConfig {
88
88
  showTrendline?: boolean;
89
89
  trendlineWindow?: number;
90
90
  trendlineGranularity?: 'day' | 'week' | 'month';
91
+ rowAggregates?: Array<{
92
+ label?: string;
93
+ function: AggregateFunction;
94
+ groupLevel: string | 'ALL';
95
+ }>;
96
+ columnAggregates?: Array<{
97
+ label?: string;
98
+ function: AggregateFunction;
99
+ pivotLevel: string | 'ALL';
100
+ }>;
91
101
  }
92
102
 
93
103
  declare interface CardInteractionConfig {
@@ -863,7 +873,7 @@ export declare type TChartOptions = {
863
873
  };
864
874
  };
865
875
 
866
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
876
+ 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';
867
877
 
868
878
  export declare type TColumnSetting<T extends DisplayDataType> = {
869
879
  columnIdx: number;
@@ -200,6 +200,14 @@ declare type Actions_2 = TableActions & ExplorerActions & DrillActions & {
200
200
 
201
201
  export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
202
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
+
203
211
  export declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDIAN' | 'DISTINCT';
204
212
 
205
213
  declare type AIContext = {
@@ -285,6 +293,16 @@ export declare interface CardConfig {
285
293
  showTrendline?: boolean;
286
294
  trendlineWindow?: number;
287
295
  trendlineGranularity?: 'day' | 'week' | 'month';
296
+ rowAggregates?: Array<{
297
+ label?: string;
298
+ function: AggregateFunction;
299
+ groupLevel: string | 'ALL';
300
+ }>;
301
+ columnAggregates?: Array<{
302
+ label?: string;
303
+ function: AggregateFunction;
304
+ pivotLevel: string | 'ALL';
305
+ }>;
288
306
  }
289
307
 
290
308
  declare interface CardInteractionConfig {
@@ -385,6 +403,13 @@ declare interface ColumnSettings {
385
403
 
386
404
  declare type ColumnSettingsMap = Record<string, ColumnSettings>;
387
405
 
406
+ export declare interface ColumnSubtotalMeta {
407
+ alias: string;
408
+ subtotalLevel?: string;
409
+ isColumnSubtotal?: boolean;
410
+ isColumnTotal?: boolean;
411
+ }
412
+
388
413
  export declare type ColumnType = 'string' | 'number' | 'date';
389
414
 
390
415
  declare type ComboBoxOption = {
@@ -1112,14 +1137,35 @@ export declare interface PivotByField extends Field {
1112
1137
  role: 'pivotby';
1113
1138
  }
1114
1139
 
1115
- export declare interface PivotColumnSchema {
1116
- alias: string;
1117
- metricId: string;
1118
- metricName: string;
1119
- metricLabel?: string;
1120
- pivotValues: string[];
1121
- pivotFields: string[];
1122
- displayLabel?: string;
1140
+ /**
1141
+ const config: CardConfig = {
1142
+ groupByColumns: [
1143
+ { id: 'region', name: 'region', label: 'Region', ... },
1144
+ { id: 'country', name: 'country', label: 'Country', ... }
1145
+ ],
1146
+ pivotByColumns: [
1147
+ { id: 'year', name: 'year', label: 'Year', ... },
1148
+ { id: 'quarter', name: 'quarter', label: 'Quarter', ... }
1149
+ ],
1150
+ metricColumns: [ ... ],
1151
+ rowAggregates: ['SUM', 'AVG'],
1152
+ columnAggregates: ['SUM'],
1153
+ subtotals: {
1154
+ groupBy: { functions: ['SUM'], levels: ['region'] }, // subtotal at region level
1155
+ pivotBy: { functions: ['SUM'], levels: ['year'] } // subtotal at year level
1156
+ }
1157
+ };
1158
+ */
1159
+ export declare enum PivotMarkerEnum {
1160
+ SUBTOTAL = "__SUBTOTAL__",
1161
+ TOTAL = "__TOTAL__",
1162
+ ALL = "__ALL__"
1163
+ }
1164
+
1165
+ export declare interface PivotRowMetadata {
1166
+ isSubtotal?: boolean;
1167
+ subtotalLevel?: string | null;
1168
+ isGrandTotal?: boolean;
1123
1169
  }
1124
1170
 
1125
1171
  export declare type Placeholders = {
@@ -1274,6 +1320,14 @@ export declare type StyleProps = {
1274
1320
  };
1275
1321
  };
1276
1322
 
1323
+ /**
1324
+ * Subtotal configuration for groupBy and pivotBy axes
1325
+ */
1326
+ export declare interface SubtotalConfig {
1327
+ groupBy?: AggregateConfig;
1328
+ pivotBy?: AggregateConfig;
1329
+ }
1330
+
1277
1331
  export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
1278
1332
 
1279
1333
  declare interface TableActions {
@@ -1431,7 +1485,7 @@ export declare type TChartOptions = {
1431
1485
  };
1432
1486
  };
1433
1487
 
1434
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
1488
+ 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';
1435
1489
 
1436
1490
  export declare type TColumnSetting<T extends DisplayDataType> = {
1437
1491
  columnIdx: number;
@@ -1633,6 +1687,10 @@ export declare type TokenRequest = {
1633
1687
  * Enables self-service editing and lens creation by the end user.
1634
1688
  */
1635
1689
  allowEdit?: boolean;
1690
+ /**
1691
+ * Schema level security policy. The schema name for the tenant.
1692
+ */
1693
+ sls?: string;
1636
1694
  /**
1637
1695
  * Connection-level security policies.
1638
1696
  * Can be a single policy or an array of policies.
@@ -88,6 +88,16 @@ declare interface CardConfig {
88
88
  showTrendline?: boolean;
89
89
  trendlineWindow?: number;
90
90
  trendlineGranularity?: 'day' | 'week' | 'month';
91
+ rowAggregates?: Array<{
92
+ label?: string;
93
+ function: AggregateFunction;
94
+ groupLevel: string | 'ALL';
95
+ }>;
96
+ columnAggregates?: Array<{
97
+ label?: string;
98
+ function: AggregateFunction;
99
+ pivotLevel: string | 'ALL';
100
+ }>;
91
101
  }
92
102
 
93
103
  declare interface CardInteractionConfig {
@@ -868,7 +878,7 @@ export declare type TChartOptions = {
868
878
  };
869
879
  };
870
880
 
871
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
881
+ 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';
872
882
 
873
883
  export declare type TColumnSetting<T extends DisplayDataType> = {
874
884
  columnIdx: number;
@@ -87,6 +87,16 @@ declare interface CardConfig {
87
87
  showTrendline?: boolean;
88
88
  trendlineWindow?: number;
89
89
  trendlineGranularity?: 'day' | 'week' | 'month';
90
+ rowAggregates?: Array<{
91
+ label?: string;
92
+ function: AggregateFunction;
93
+ groupLevel: string | 'ALL';
94
+ }>;
95
+ columnAggregates?: Array<{
96
+ label?: string;
97
+ function: AggregateFunction;
98
+ pivotLevel: string | 'ALL';
99
+ }>;
90
100
  }
91
101
 
92
102
  declare interface CardInteractionConfig {
@@ -860,7 +870,7 @@ export declare type TChartOptions = {
860
870
  };
861
871
  };
862
872
 
863
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'pivotTable' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
873
+ 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';
864
874
 
865
875
  export declare type TColumnSetting<T extends DisplayDataType> = {
866
876
  columnIdx: number;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.560",
8
+ "version": "0.0.562",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",