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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/dashboard-plus-Bhud1IPW.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-eWa7yST3.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-CNVP0HeC.js";
1
+ import { D as f } from "../chunks/dashboard-plus-BbSiLlXL.js";
2
2
  import { EMPTY_SELECTION as a } from "../types/index.js";
3
3
  export {
4
4
  a as EMPTY_SELECTION,
@@ -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;
@@ -194,7 +228,7 @@ declare type ConnectionType = 'GoogleSheets' | 'MySQL' | 'MSSQL' | 'PostgreSQL'
194
228
 
195
229
  export declare type CustomCard = CardWithContent | CardWithFooter;
196
230
 
197
- export declare function Dashboard(props: DashboardProps): JSX_2.Element;
231
+ export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
198
232
 
199
233
  export declare type DashboardEventHandlers = {
200
234
  onExportData?: (payload: ExportDataPayload) => void;
@@ -267,7 +301,7 @@ declare interface DataSource {
267
301
  selectedEntities: SelectedEntities;
268
302
  }
269
303
 
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-MM", "MMMM YYYY", "custom"];
304
+ 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
305
 
272
306
  declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
273
307
 
@@ -370,6 +404,7 @@ declare interface Field {
370
404
  * If not provided, should be auto-generated from label or name.
371
405
  */
372
406
  alias?: string;
407
+ qualifiedFieldName: string;
373
408
  dataType: string;
374
409
  description?: string;
375
410
  qualifiedEntityName?: string;
@@ -382,6 +417,17 @@ declare interface Field {
382
417
  role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
383
418
  }
384
419
 
420
+ declare type FileAttachment = {
421
+ id: string;
422
+ name: string;
423
+ size: number;
424
+ type: string;
425
+ data?: string;
426
+ url?: string;
427
+ preview?: string;
428
+ uploadProgress?: number;
429
+ };
430
+
385
431
  declare interface FileEntityReference extends DatabaseEntityReference {
386
432
  id: string;
387
433
  type: 'file' | 'url' | 'upload';
@@ -577,7 +623,9 @@ declare interface MetricField extends Field {
577
623
  }
578
624
  }
579
625
  */
580
- parameters?: Record<string, any>;
626
+ parameters?: {
627
+ filters?: FilterGroup;
628
+ };
581
629
  aliasTemplate?: string;
582
630
  valueAliases?: Record<string, string>;
583
631
  }
@@ -617,6 +665,14 @@ declare interface OrderBy {
617
665
  direction: 'asc' | 'desc';
618
666
  }
619
667
 
668
+ /**
669
+ * Pagination configuration for table queries
670
+ */
671
+ declare interface PaginationConfig {
672
+ page: number;
673
+ pageSize: number;
674
+ }
675
+
620
676
  declare type Params = {
621
677
  [key: string]: string | number | string[] | number[];
622
678
  };
@@ -727,6 +783,7 @@ declare type TablePreferences = {
727
783
  selectColumnVisible?: boolean;
728
784
  columnVisibility?: Record<string, boolean>;
729
785
  pageSize?: number;
786
+ enableDevModePagination?: boolean;
730
787
  };
731
788
 
732
789
  export declare type TBaseQuery = {
@@ -753,6 +810,7 @@ export declare type TCard = {
753
810
  dataSource?: DataSource;
754
811
  config?: CardConfig;
755
812
  interactionConfig?: CardInteractionConfig;
813
+ paginationConfig?: PaginationConfig;
756
814
  queryConfig?: QueryConfig;
757
815
  customCfg?: any;
758
816
  preferences?: TCardPreferences;
@@ -789,6 +847,10 @@ export declare type TCardPreferences = {
789
847
  datasetOptions?: TDatasetOptions[];
790
848
  chartOptions?: TChartOptions;
791
849
  columnSettings?: TColumnSetting<DisplayDataType>[];
850
+ colorConfig?: ColorConfig;
851
+ xAxisConfig?: AxisConfig;
852
+ yAxisConfig?: AxisConfig;
853
+ dataLabelsConfig?: TDataLabelsConfig;
792
854
  tablePrefs?: TablePreferences;
793
855
  allowDownload?: boolean;
794
856
  customVisualCode?: string;
@@ -808,6 +870,34 @@ export declare type TCardPreferences = {
808
870
  kpiVisualOptions?: {
809
871
  lowerIsBetter?: boolean;
810
872
  countryLogoId?: string;
873
+ formatOptions?: TFormatOptions;
874
+ metricComparison?: {
875
+ enabled?: boolean;
876
+ calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
877
+ formatOptions?: TFormatOptions;
878
+ showArrow?: boolean;
879
+ showColor?: boolean;
880
+ conditionalLabel?: boolean;
881
+ labelName?: string;
882
+ position?: 'left' | 'right' | 'top';
883
+ conditionalLabels?: {
884
+ increase?: string;
885
+ decrease?: string;
886
+ noChange?: string;
887
+ };
888
+ colorConfig?: {
889
+ increase?: 'green' | 'red' | 'neutral' | string;
890
+ decrease?: 'green' | 'red' | 'neutral' | string;
891
+ noChange?: 'green' | 'red' | 'neutral' | string;
892
+ };
893
+ };
894
+ };
895
+ pivotTableOptions?: {
896
+ showRowTotals?: boolean;
897
+ showColumnTotals?: boolean;
898
+ showGrandTotal?: boolean;
899
+ sortRowsBy?: 'label' | 'total' | 'metric';
900
+ sortColumnsBy?: 'label' | 'total' | 'metric';
811
901
  };
812
902
  };
813
903
 
@@ -846,7 +936,7 @@ export declare type TChartOptions = {
846
936
  };
847
937
  };
848
938
 
849
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
939
+ 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
940
 
851
941
  export declare type TColumnSetting<T extends DisplayDataType> = {
852
942
  columnIdx: number;
@@ -899,6 +989,26 @@ export declare type TDataColumn = {
899
989
  is_nullable?: string;
900
990
  label?: string;
901
991
  description?: string;
992
+ qualifiedFieldName?: string;
993
+ };
994
+
995
+ export declare type TDataLabelsConfig = {
996
+ enabled?: boolean;
997
+ position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
998
+ anchor?: 'center' | 'start' | 'end';
999
+ align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
1000
+ display?: 'auto' | boolean;
1001
+ format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
1002
+ formatOptions?: TFormatOptions;
1003
+ font?: {
1004
+ size?: number;
1005
+ weight?: 'normal' | 'bold';
1006
+ };
1007
+ color?: 'auto' | string;
1008
+ clamp?: boolean;
1009
+ clip?: boolean;
1010
+ rotation?: number;
1011
+ showTotal?: boolean;
902
1012
  };
903
1013
 
904
1014
  export declare type TDatasetOptions = {
@@ -943,6 +1053,19 @@ declare type TFilter = {
943
1053
 
944
1054
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
945
1055
 
1056
+ export declare type TFormatOptions = {
1057
+ type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
1058
+ decimalPlaces?: number;
1059
+ currency?: string;
1060
+ locale?: string;
1061
+ prefix?: string;
1062
+ suffix?: string;
1063
+ useSuffix?: boolean;
1064
+ negativeInParentheses?: boolean;
1065
+ multiplyBy?: number;
1066
+ dateFormat?: string;
1067
+ };
1068
+
946
1069
  export declare type TFrame = {
947
1070
  id: string;
948
1071
  filterId?: string;