react-semaphor 0.0.5921 → 0.0.6372

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,3 +1,4 @@
1
+ import { ColumnSizingState } from '@tanstack/react-table';
1
2
  import { FontSpec } from 'chart.js';
2
3
  import { JSX as JSX_2 } from 'react/jsx-runtime';
3
4
 
@@ -192,7 +193,10 @@ declare interface ColorRange_2 {
192
193
  declare interface ColumnSettings {
193
194
  type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
194
195
  textAlign: 'left' | 'center' | 'right';
195
- width: string;
196
+ width: number;
197
+ minWidth?: number;
198
+ maxWidth?: number;
199
+ textOverflow?: 'ellipsis' | 'wrap' | 'clip';
196
200
  textWrap: 'wrap' | 'nowrap';
197
201
  numberFormat: {
198
202
  style: 'decimal' | 'currency' | 'percent';
@@ -210,6 +214,8 @@ declare interface ColumnSettings {
210
214
  useCustomFormat: boolean;
211
215
  customFormat: string;
212
216
  useRelativeTime: boolean;
217
+ timezone?: string;
218
+ sourceTimezone?: string;
213
219
  };
214
220
  colorRanges: ColorRange_2[];
215
221
  }
@@ -237,6 +243,33 @@ declare type DashboardPlusProps = {
237
243
  showFooter?: boolean;
238
244
  } & DashboardProps;
239
245
 
246
+ /**
247
+ * Unified dashboard preferences for both card display and UI modes
248
+ */
249
+ export declare type DashboardPreferences = {
250
+ /**
251
+ * Visual display preferences for cards
252
+ * Controls how card content is rendered (headers, footers, etc.)
253
+ */
254
+ cardDisplay?: VisualDisplayPreferences;
255
+ /**
256
+ * UI modes for developer and debug features
257
+ * Controls what developer tools and debug panels are available
258
+ */
259
+ uiMode?: {
260
+ /**
261
+ * Enable developer mode
262
+ * Shows additional controls and debug information
263
+ */
264
+ developer?: boolean;
265
+ /**
266
+ * Enable console mode
267
+ * Shows console panel for debugging
268
+ */
269
+ console?: boolean;
270
+ };
271
+ };
272
+
240
273
  export declare type DashboardProps = {
241
274
  id?: string;
242
275
  /**
@@ -246,10 +279,7 @@ export declare type DashboardProps = {
246
279
  /**
247
280
  * Default filter values for the dashboard. The dashboard will be filtered by these values when the user loads the dashboard.
248
281
  */
249
- defaultFilterValues?: {
250
- filterId: string;
251
- values: string[] | number[];
252
- }[] | TFilterValue[];
282
+ defaultFilterValues?: TFilterValue[];
253
283
  customStyle?: TStyle;
254
284
  currentTheme?: Theme;
255
285
  version?: string;
@@ -270,6 +300,11 @@ export declare type DashboardProps = {
270
300
  * The id of the sheet to be selected when the dashboard is loaded.
271
301
  */
272
302
  selectedSheetId?: string;
303
+ /**
304
+ * Unified preferences for dashboard configuration
305
+ * Includes both card display preferences and UI mode settings
306
+ */
307
+ preferences?: DashboardPreferences;
273
308
  };
274
309
 
275
310
  declare interface DatabaseEntityReference {
@@ -504,7 +539,7 @@ declare type FilterOnClick = {
504
539
  columnIndex: number;
505
540
  };
506
541
 
507
- declare type FilterValue = string | number | boolean | Date | [number, number] | [string, string] | string[] | number[];
542
+ declare type FilterValue = string | number | boolean | Date | null | [number, number] | [string, string] | string[] | number[];
508
543
 
509
544
  export declare type GetDashboardResponse = {
510
545
  dashboard: TDashboard;
@@ -653,7 +688,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
653
688
 
654
689
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
655
690
 
656
- declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
691
+ declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'isNull' | 'isNotNull';
657
692
 
658
693
  declare type OptionsMap = {
659
694
  number: NumberOptions;
@@ -787,6 +822,7 @@ declare type TablePreferences = {
787
822
  columnSettingsMap?: ColumnSettingsMap;
788
823
  selectColumnVisible?: boolean;
789
824
  columnVisibility?: Record<string, boolean>;
825
+ columnSizing?: ColumnSizingState;
790
826
  pageSize?: number;
791
827
  enableDevModePagination?: boolean;
792
828
  };
@@ -825,6 +861,11 @@ export declare type TCard = {
825
861
  lastSelectedSchema?: string;
826
862
  lastSelectedTable?: string;
827
863
  refreshInterval?: string;
864
+ /**
865
+ * Card-specific display preferences that override dashboard-level preferences.
866
+ * If not specified, the card will use the dashboard's display preferences.
867
+ */
868
+ displayPreferences?: VisualDisplayPreferences;
828
869
  };
829
870
 
830
871
  export declare type TCardContext = {
@@ -875,6 +916,7 @@ export declare type TCardPreferences = {
875
916
  kpiVisualOptions?: {
876
917
  lowerIsBetter?: boolean;
877
918
  countryLogoId?: string;
919
+ valueAlignment?: 'left' | 'center';
878
920
  formatOptions?: TFormatOptions;
879
921
  metricComparison?: {
880
922
  enabled?: boolean;
@@ -1122,4 +1164,41 @@ export declare type TStyle = {
1122
1164
  dark?: StyleProps;
1123
1165
  };
1124
1166
 
1167
+ /**
1168
+ * Display mode for visual components - controls which UI elements are shown
1169
+ */
1170
+ export declare type VisualDisplayMode = 'full' | 'content-only' | 'print' | 'embed' | 'table-print';
1171
+
1172
+ /**
1173
+ * Display preferences for controlling visual component rendering
1174
+ */
1175
+ export declare type VisualDisplayPreferences = {
1176
+ /**
1177
+ * Predefined display mode
1178
+ * - 'full': All UI elements (default)
1179
+ * - 'content-only': Just the visualization/table content
1180
+ * - 'print': Optimized for printing (shows title and description, hides interactive elements)
1181
+ * - 'embed': Minimal chrome for embedding in other contexts
1182
+ */
1183
+ mode?: VisualDisplayMode;
1184
+ /**
1185
+ * Override specific UI elements visibility
1186
+ * These overrides take precedence over the mode presets
1187
+ */
1188
+ overrides?: {
1189
+ showHeader?: boolean;
1190
+ showTitle?: boolean;
1191
+ showDescription?: boolean;
1192
+ showTabs?: boolean;
1193
+ showFooter?: boolean;
1194
+ showFilters?: boolean;
1195
+ showBreadcrumbs?: boolean;
1196
+ showRefreshIndicator?: boolean;
1197
+ showFilterInfo?: boolean;
1198
+ showPagination?: boolean;
1199
+ showTableToolbar?: boolean;
1200
+ showColumnSettings?: boolean;
1201
+ };
1202
+ };
1203
+
1125
1204
  export { }
@@ -1,3 +1,4 @@
1
+ import { ColumnSizingState } from '@tanstack/react-table';
1
2
  import { FontSpec } from 'chart.js';
2
3
 
3
4
  export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
@@ -191,7 +192,10 @@ declare interface ColorRange_2 {
191
192
  declare interface ColumnSettings {
192
193
  type: 'none' | 'text' | 'number' | 'date' | 'badge' | 'link' | 'progress';
193
194
  textAlign: 'left' | 'center' | 'right';
194
- width: string;
195
+ width: number;
196
+ minWidth?: number;
197
+ maxWidth?: number;
198
+ textOverflow?: 'ellipsis' | 'wrap' | 'clip';
195
199
  textWrap: 'wrap' | 'nowrap';
196
200
  numberFormat: {
197
201
  style: 'decimal' | 'currency' | 'percent';
@@ -209,6 +213,8 @@ declare interface ColumnSettings {
209
213
  useCustomFormat: boolean;
210
214
  customFormat: string;
211
215
  useRelativeTime: boolean;
216
+ timezone?: string;
217
+ sourceTimezone?: string;
212
218
  };
213
219
  colorRanges: ColorRange_2[];
214
220
  }
@@ -231,6 +237,33 @@ export declare type DashboardEventHandlers = {
231
237
  onExportData?: (payload: ExportDataPayload) => void;
232
238
  };
233
239
 
240
+ /**
241
+ * Unified dashboard preferences for both card display and UI modes
242
+ */
243
+ export declare type DashboardPreferences = {
244
+ /**
245
+ * Visual display preferences for cards
246
+ * Controls how card content is rendered (headers, footers, etc.)
247
+ */
248
+ cardDisplay?: VisualDisplayPreferences;
249
+ /**
250
+ * UI modes for developer and debug features
251
+ * Controls what developer tools and debug panels are available
252
+ */
253
+ uiMode?: {
254
+ /**
255
+ * Enable developer mode
256
+ * Shows additional controls and debug information
257
+ */
258
+ developer?: boolean;
259
+ /**
260
+ * Enable console mode
261
+ * Shows console panel for debugging
262
+ */
263
+ console?: boolean;
264
+ };
265
+ };
266
+
234
267
  export declare type DashboardProps = {
235
268
  id?: string;
236
269
  /**
@@ -240,10 +273,7 @@ export declare type DashboardProps = {
240
273
  /**
241
274
  * Default filter values for the dashboard. The dashboard will be filtered by these values when the user loads the dashboard.
242
275
  */
243
- defaultFilterValues?: {
244
- filterId: string;
245
- values: string[] | number[];
246
- }[] | TFilterValue[];
276
+ defaultFilterValues?: TFilterValue[];
247
277
  customStyle?: TStyle;
248
278
  currentTheme?: Theme;
249
279
  version?: string;
@@ -264,6 +294,11 @@ export declare type DashboardProps = {
264
294
  * The id of the sheet to be selected when the dashboard is loaded.
265
295
  */
266
296
  selectedSheetId?: string;
297
+ /**
298
+ * Unified preferences for dashboard configuration
299
+ * Includes both card display preferences and UI mode settings
300
+ */
301
+ preferences?: DashboardPreferences;
267
302
  };
268
303
 
269
304
  declare interface DatabaseEntityReference {
@@ -498,7 +533,7 @@ declare type FilterOnClick = {
498
533
  columnIndex: number;
499
534
  };
500
535
 
501
- declare type FilterValue = string | number | boolean | Date | [number, number] | [string, string] | string[] | number[];
536
+ declare type FilterValue = string | number | boolean | Date | null | [number, number] | [string, string] | string[] | number[];
502
537
 
503
538
  export declare type GetDashboardResponse = {
504
539
  dashboard: TDashboard;
@@ -647,7 +682,7 @@ declare type OldFilterValue = string | number | null | (string | number)[] | Ran
647
682
 
648
683
  declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
649
684
 
650
- declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between';
685
+ declare type Operator = '=' | '!=' | '>' | '>=' | '<' | '<=' | 'contains' | 'startsWith' | 'endsWith' | 'in' | 'not in' | 'between' | 'isNull' | 'isNotNull';
651
686
 
652
687
  declare type OptionsMap = {
653
688
  number: NumberOptions;
@@ -779,6 +814,7 @@ declare type TablePreferences = {
779
814
  columnSettingsMap?: ColumnSettingsMap;
780
815
  selectColumnVisible?: boolean;
781
816
  columnVisibility?: Record<string, boolean>;
817
+ columnSizing?: ColumnSizingState;
782
818
  pageSize?: number;
783
819
  enableDevModePagination?: boolean;
784
820
  };
@@ -817,6 +853,11 @@ export declare type TCard = {
817
853
  lastSelectedSchema?: string;
818
854
  lastSelectedTable?: string;
819
855
  refreshInterval?: string;
856
+ /**
857
+ * Card-specific display preferences that override dashboard-level preferences.
858
+ * If not specified, the card will use the dashboard's display preferences.
859
+ */
860
+ displayPreferences?: VisualDisplayPreferences;
820
861
  };
821
862
 
822
863
  export declare type TCardContext = {
@@ -867,6 +908,7 @@ export declare type TCardPreferences = {
867
908
  kpiVisualOptions?: {
868
909
  lowerIsBetter?: boolean;
869
910
  countryLogoId?: string;
911
+ valueAlignment?: 'left' | 'center';
870
912
  formatOptions?: TFormatOptions;
871
913
  metricComparison?: {
872
914
  enabled?: boolean;
@@ -1114,4 +1156,41 @@ export declare type TStyle = {
1114
1156
  dark?: StyleProps;
1115
1157
  };
1116
1158
 
1159
+ /**
1160
+ * Display mode for visual components - controls which UI elements are shown
1161
+ */
1162
+ export declare type VisualDisplayMode = 'full' | 'content-only' | 'print' | 'embed' | 'table-print';
1163
+
1164
+ /**
1165
+ * Display preferences for controlling visual component rendering
1166
+ */
1167
+ export declare type VisualDisplayPreferences = {
1168
+ /**
1169
+ * Predefined display mode
1170
+ * - 'full': All UI elements (default)
1171
+ * - 'content-only': Just the visualization/table content
1172
+ * - 'print': Optimized for printing (shows title and description, hides interactive elements)
1173
+ * - 'embed': Minimal chrome for embedding in other contexts
1174
+ */
1175
+ mode?: VisualDisplayMode;
1176
+ /**
1177
+ * Override specific UI elements visibility
1178
+ * These overrides take precedence over the mode presets
1179
+ */
1180
+ overrides?: {
1181
+ showHeader?: boolean;
1182
+ showTitle?: boolean;
1183
+ showDescription?: boolean;
1184
+ showTabs?: boolean;
1185
+ showFooter?: boolean;
1186
+ showFilters?: boolean;
1187
+ showBreadcrumbs?: boolean;
1188
+ showRefreshIndicator?: boolean;
1189
+ showFilterInfo?: boolean;
1190
+ showPagination?: boolean;
1191
+ showTableToolbar?: boolean;
1192
+ showColumnSettings?: boolean;
1193
+ };
1194
+ };
1195
+
1117
1196
  export { }
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.0.5921",
8
+ "version": "0.0.6372",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -88,6 +88,7 @@
88
88
  "clsx": "^2.0.0",
89
89
  "cmdk": "^1.1.1",
90
90
  "date-fns": "^3.6.0",
91
+ "date-fns-tz": "^3.2.0",
91
92
  "immer": "^10.0.3",
92
93
  "jwt-decode": "^4.0.0",
93
94
  "lodash.merge": "^4.6.2",