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.
@@ -6,6 +6,7 @@ declare type AggregateFunction = 'COUNT' | 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'MEDI
6
6
 
7
7
  declare type AIContext = {
8
8
  selectedEntities: SelectedEntities;
9
+ fileAttachments?: FileAttachment[];
9
10
  };
10
11
 
11
12
  export declare type AIScopeTable = {
@@ -25,6 +26,25 @@ export declare type AuthToken = {
25
26
  refreshToken?: string;
26
27
  };
27
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
+
28
48
  declare interface BaseColumn {
29
49
  id: string;
30
50
  name: string;
@@ -87,6 +107,16 @@ declare interface CardConfig {
87
107
  showTrendline?: boolean;
88
108
  trendlineWindow?: number;
89
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
+ }>;
90
120
  }
91
121
 
92
122
  declare interface CardInteractionConfig {
@@ -141,6 +171,10 @@ declare interface ClickFilterInteraction {
141
171
  label?: string;
142
172
  }
143
173
 
174
+ export declare type ColorConfig = {
175
+ segments: Record<string, string>;
176
+ };
177
+
144
178
  export declare type ColorRange = {
145
179
  start: number;
146
180
  end: number;
@@ -264,7 +298,7 @@ declare interface DataSource {
264
298
  selectedEntities: SelectedEntities;
265
299
  }
266
300
 
267
- 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"];
301
+ 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"];
268
302
 
269
303
  declare type DateFormatValue = (typeof DATE_FORMAT_VALUES)[number];
270
304
 
@@ -367,6 +401,7 @@ declare interface Field {
367
401
  * If not provided, should be auto-generated from label or name.
368
402
  */
369
403
  alias?: string;
404
+ qualifiedFieldName: string;
370
405
  dataType: string;
371
406
  description?: string;
372
407
  qualifiedEntityName?: string;
@@ -379,6 +414,17 @@ declare interface Field {
379
414
  role?: 'groupby' | 'metric' | 'sortby' | 'pivotby';
380
415
  }
381
416
 
417
+ declare type FileAttachment = {
418
+ id: string;
419
+ name: string;
420
+ size: number;
421
+ type: string;
422
+ data?: string;
423
+ url?: string;
424
+ preview?: string;
425
+ uploadProgress?: number;
426
+ };
427
+
382
428
  declare interface FileEntityReference extends DatabaseEntityReference {
383
429
  id: string;
384
430
  type: 'file' | 'url' | 'upload';
@@ -574,7 +620,9 @@ declare interface MetricField extends Field {
574
620
  }
575
621
  }
576
622
  */
577
- parameters?: Record<string, any>;
623
+ parameters?: {
624
+ filters?: FilterGroup;
625
+ };
578
626
  aliasTemplate?: string;
579
627
  valueAliases?: Record<string, string>;
580
628
  }
@@ -614,6 +662,14 @@ declare interface OrderBy {
614
662
  direction: 'asc' | 'desc';
615
663
  }
616
664
 
665
+ /**
666
+ * Pagination configuration for table queries
667
+ */
668
+ declare interface PaginationConfig {
669
+ page: number;
670
+ pageSize: number;
671
+ }
672
+
617
673
  declare type Params = {
618
674
  [key: string]: string | number | string[] | number[];
619
675
  };
@@ -724,6 +780,7 @@ declare type TablePreferences = {
724
780
  selectColumnVisible?: boolean;
725
781
  columnVisibility?: Record<string, boolean>;
726
782
  pageSize?: number;
783
+ enableDevModePagination?: boolean;
727
784
  };
728
785
 
729
786
  export declare type TBaseQuery = {
@@ -750,6 +807,7 @@ export declare type TCard = {
750
807
  dataSource?: DataSource;
751
808
  config?: CardConfig;
752
809
  interactionConfig?: CardInteractionConfig;
810
+ paginationConfig?: PaginationConfig;
753
811
  queryConfig?: QueryConfig;
754
812
  customCfg?: any;
755
813
  preferences?: TCardPreferences;
@@ -786,6 +844,10 @@ export declare type TCardPreferences = {
786
844
  datasetOptions?: TDatasetOptions[];
787
845
  chartOptions?: TChartOptions;
788
846
  columnSettings?: TColumnSetting<DisplayDataType>[];
847
+ colorConfig?: ColorConfig;
848
+ xAxisConfig?: AxisConfig;
849
+ yAxisConfig?: AxisConfig;
850
+ dataLabelsConfig?: TDataLabelsConfig;
789
851
  tablePrefs?: TablePreferences;
790
852
  allowDownload?: boolean;
791
853
  customVisualCode?: string;
@@ -805,6 +867,34 @@ export declare type TCardPreferences = {
805
867
  kpiVisualOptions?: {
806
868
  lowerIsBetter?: boolean;
807
869
  countryLogoId?: string;
870
+ formatOptions?: TFormatOptions;
871
+ metricComparison?: {
872
+ enabled?: boolean;
873
+ calculationType?: 'difference' | 'change' | 'change_difference' | 'ratio';
874
+ formatOptions?: TFormatOptions;
875
+ showArrow?: boolean;
876
+ showColor?: boolean;
877
+ conditionalLabel?: boolean;
878
+ labelName?: string;
879
+ position?: 'left' | 'right' | 'top';
880
+ conditionalLabels?: {
881
+ increase?: string;
882
+ decrease?: string;
883
+ noChange?: string;
884
+ };
885
+ colorConfig?: {
886
+ increase?: 'green' | 'red' | 'neutral' | string;
887
+ decrease?: 'green' | 'red' | 'neutral' | string;
888
+ noChange?: 'green' | 'red' | 'neutral' | string;
889
+ };
890
+ };
891
+ };
892
+ pivotTableOptions?: {
893
+ showRowTotals?: boolean;
894
+ showColumnTotals?: boolean;
895
+ showGrandTotal?: boolean;
896
+ sortRowsBy?: 'label' | 'total' | 'metric';
897
+ sortColumnsBy?: 'label' | 'total' | 'metric';
808
898
  };
809
899
  };
810
900
 
@@ -843,7 +933,7 @@ export declare type TChartOptions = {
843
933
  };
844
934
  };
845
935
 
846
- declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'stackedLine' | 'table' | 'kpi' | 'pyramid' | 'tornado' | 'range' | 'text' | 'map' | 'funnel' | 'custom';
936
+ 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';
847
937
 
848
938
  export declare type TColumnSetting<T extends DisplayDataType> = {
849
939
  columnIdx: number;
@@ -896,6 +986,26 @@ export declare type TDataColumn = {
896
986
  is_nullable?: string;
897
987
  label?: string;
898
988
  description?: string;
989
+ qualifiedFieldName?: string;
990
+ };
991
+
992
+ export declare type TDataLabelsConfig = {
993
+ enabled?: boolean;
994
+ position?: 'center' | 'top' | 'bottom' | 'left' | 'right' | 'auto' | 'custom';
995
+ anchor?: 'center' | 'start' | 'end';
996
+ align?: 'center' | 'start' | 'end' | 'top' | 'bottom' | number;
997
+ display?: 'auto' | boolean;
998
+ format?: 'auto' | 'number' | 'currency' | 'percent' | 'none';
999
+ formatOptions?: TFormatOptions;
1000
+ font?: {
1001
+ size?: number;
1002
+ weight?: 'normal' | 'bold';
1003
+ };
1004
+ color?: 'auto' | string;
1005
+ clamp?: boolean;
1006
+ clip?: boolean;
1007
+ rotation?: number;
1008
+ showTotal?: boolean;
899
1009
  };
900
1010
 
901
1011
  export declare type TDatasetOptions = {
@@ -940,6 +1050,19 @@ declare type TFilter = {
940
1050
 
941
1051
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
942
1052
 
1053
+ export declare type TFormatOptions = {
1054
+ type?: 'auto' | 'number' | 'currency' | 'percent' | 'scientific' | 'date';
1055
+ decimalPlaces?: number;
1056
+ currency?: string;
1057
+ locale?: string;
1058
+ prefix?: string;
1059
+ suffix?: string;
1060
+ useSuffix?: boolean;
1061
+ negativeInParentheses?: boolean;
1062
+ multiplyBy?: number;
1063
+ dateFormat?: string;
1064
+ };
1065
+
943
1066
  export declare type TFrame = {
944
1067
  id: string;
945
1068
  filterId?: string;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.5323",
8
+ "version": "0.0.5921",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -46,7 +46,7 @@
46
46
  "preview": "vite preview"
47
47
  },
48
48
  "dependencies": {
49
- "@ai-sdk/react": "^1.1.18",
49
+ "@ai-sdk/react": "^2.0.7",
50
50
  "@dnd-kit/core": "^6.3.1",
51
51
  "@dnd-kit/sortable": "^10.0.0",
52
52
  "@dnd-kit/utilities": "^3.2.2",
@@ -55,6 +55,7 @@
55
55
  "@r2wc/react-to-web-component": "^2.0.4",
56
56
  "@radix-ui/react-accordion": "^1.2.2",
57
57
  "@radix-ui/react-alert-dialog": "^1.1.4",
58
+ "@radix-ui/react-avatar": "^1.1.10",
58
59
  "@radix-ui/react-checkbox": "^1.1.3",
59
60
  "@radix-ui/react-collapsible": "^1.1.2",
60
61
  "@radix-ui/react-context-menu": "^2.2.15",
@@ -64,12 +65,13 @@
64
65
  "@radix-ui/react-icons": "^1.3.2",
65
66
  "@radix-ui/react-label": "^2.1.1",
66
67
  "@radix-ui/react-popover": "^1.1.4",
67
- "@radix-ui/react-progress": "^1.1.7",
68
+ "@radix-ui/react-progress": "^1.0.3",
68
69
  "@radix-ui/react-radio-group": "^1.2.2",
69
70
  "@radix-ui/react-scroll-area": "^1.2.2",
70
71
  "@radix-ui/react-select": "^2.1.4",
71
72
  "@radix-ui/react-separator": "^1.1.1",
72
- "@radix-ui/react-slot": "^1.2.2",
73
+ "@radix-ui/react-slider": "^1.3.5",
74
+ "@radix-ui/react-slot": "^1.2.3",
73
75
  "@radix-ui/react-switch": "^1.1.2",
74
76
  "@radix-ui/react-tabs": "^1.1.2",
75
77
  "@radix-ui/react-toggle": "^1.1.1",
@@ -77,7 +79,7 @@
77
79
  "@tailwindcss/container-queries": "^0.1.1",
78
80
  "@tanstack/react-query": "^5.62.15",
79
81
  "@tanstack/react-table": "^8.11.7",
80
- "ai": "^4.1.46",
82
+ "ai": "^5.0.7",
81
83
  "chart.js": "^4.4.1",
82
84
  "chartjs-chart-funnel": "^4.2.4",
83
85
  "chartjs-chart-geo": "^4.3.4",
@@ -85,7 +87,7 @@
85
87
  "class-variance-authority": "^0.7.0",
86
88
  "clsx": "^2.0.0",
87
89
  "cmdk": "^1.1.1",
88
- "date-fns": "^3.3.1",
90
+ "date-fns": "^3.6.0",
89
91
  "immer": "^10.0.3",
90
92
  "jwt-decode": "^4.0.0",
91
93
  "lodash.merge": "^4.6.2",
@@ -93,7 +95,7 @@
93
95
  "ms": "^2.1.3",
94
96
  "next-themes": "^0.4.4",
95
97
  "prism-react-renderer": "^2.4.1",
96
- "react-day-picker": "^8.10.0",
98
+ "react-day-picker": "^9.9.0",
97
99
  "react-error-boundary": "^4.1.2",
98
100
  "react-grid-layout": "^1.5.0",
99
101
  "react-icons": "^5.0.1",