react-semaphor 0.1.133 → 0.1.135

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.
Files changed (30) hide show
  1. package/dist/chunks/{dashboard-controls-YCOwB4c7.js → dashboard-controls-Dz-HNOt0.js} +3 -3
  2. package/dist/chunks/{dashboard-controls-C1rIPoLI.js → dashboard-controls-SNuLGNMJ.js} +1 -1
  3. package/dist/chunks/{dashboard-export-dialog-CsU5-_Nc.js → dashboard-export-dialog-6OgxzaOv.js} +1 -1
  4. package/dist/chunks/{dashboard-export-dialog-BpjTGwvL.js → dashboard-export-dialog-F5ppxzE8.js} +3 -3
  5. package/dist/chunks/{dashboard-json-BwJ6kZV2.js → dashboard-json-8B1JnYXr.js} +1 -1
  6. package/dist/chunks/{dashboard-json-DDxHEaDO.js → dashboard-json-C4ljJnTT.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-DdK_bxBz.js → edit-dashboard-visual-BSWr5EPZ.js} +4659 -4532
  8. package/dist/chunks/edit-dashboard-visual-C33J_sua.js +200 -0
  9. package/dist/chunks/{editor-action-buttons-CK2siDBM.js → editor-action-buttons-9s0yBbmV.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-CmA0eoCZ.js → editor-action-buttons-tJu_KzGS.js} +1 -1
  11. package/dist/chunks/index-DACjdh6Y.js +1081 -0
  12. package/dist/chunks/{index-DilTtW4W.js → index-DwAURM9i.js} +33356 -32368
  13. package/dist/chunks/{resource-management-panel-Bt1zi1Yb.js → resource-management-panel-DdP_LmsO.js} +2 -2
  14. package/dist/chunks/{resource-management-panel-Fs9hg3pC.js → resource-management-panel-Dh8Yibzp.js} +1 -1
  15. package/dist/chunks/{use-visual-utils-CzQAEa-2.js → use-visual-utils-CPl04Dbj.js} +1 -1
  16. package/dist/chunks/{use-visual-utils-Cjv_OnmO.js → use-visual-utils-De8153dM.js} +1 -1
  17. package/dist/dashboard/index.cjs +1 -1
  18. package/dist/dashboard/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/style.css +1 -1
  22. package/dist/surfboard/index.cjs +1 -1
  23. package/dist/surfboard/index.js +1 -1
  24. package/dist/types/dashboard.d.ts +51 -0
  25. package/dist/types/main.d.ts +60 -0
  26. package/dist/types/surfboard.d.ts +51 -0
  27. package/dist/types/types.d.ts +51 -0
  28. package/package.json +1 -1
  29. package/dist/chunks/edit-dashboard-visual-BoV4X2or.js +0 -195
  30. package/dist/chunks/index-BCmbfOd2.js +0 -1081
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-BCmbfOd2.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/index-DACjdh6Y.js"),r=require("../types/index.cjs");exports.Surfboard=e.DashboardPlus;exports.EMPTY_SELECTION=r.EMPTY_SELECTION;
@@ -1,4 +1,4 @@
1
- import { a } from "../chunks/index-DilTtW4W.js";
1
+ import { a } from "../chunks/index-DwAURM9i.js";
2
2
  import { EMPTY_SELECTION as E } from "../types/index.js";
3
3
  export {
4
4
  E as EMPTY_SELECTION,
@@ -1213,6 +1213,11 @@ export declare type TCard = {
1213
1213
  * If not specified, the card will use the dashboard's display preferences.
1214
1214
  */
1215
1215
  displayPreferences?: VisualDisplayPreferences;
1216
+ /**
1217
+ * Inline filter definitions for this card.
1218
+ * Configured by editors via the visual editor settings.
1219
+ */
1220
+ inlineFilters?: TInlineFilter[];
1216
1221
  };
1217
1222
 
1218
1223
  export declare type TCardContext = {
@@ -1371,6 +1376,14 @@ export declare type TCustomCardPreferences = {
1371
1376
  }[];
1372
1377
  };
1373
1378
 
1379
+ declare type TCustomFilterPreferences = {
1380
+ url: string;
1381
+ componentName: string;
1382
+ pluginFilterType?: string;
1383
+ icon?: string;
1384
+ settings?: Record<string, string | number | boolean>;
1385
+ };
1386
+
1374
1387
  export declare type TDashboard = {
1375
1388
  id: string;
1376
1389
  title?: string;
@@ -1463,6 +1476,9 @@ declare type TFilter = {
1463
1476
  excludeSheetIds?: string[];
1464
1477
  applyToCardIds?: string[];
1465
1478
  excludeCardIds?: string[];
1479
+ customFilterPreferences?: TCustomFilterPreferences;
1480
+ /** Whether to show the label above the filter (default: true) */
1481
+ showLabel?: boolean;
1466
1482
  };
1467
1483
 
1468
1484
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
@@ -1529,6 +1545,41 @@ declare interface TimeDrillStep {
1529
1545
 
1530
1546
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1531
1547
 
1548
+ /**
1549
+ * Inline filter definition stored on a card.
1550
+ * Inline filters appear on the right-hand side of the card header,
1551
+ * allowing ad-hoc data exploration without affecting other cards.
1552
+ */
1553
+ export declare type TInlineFilter = {
1554
+ id: string;
1555
+ column: string;
1556
+ title: string;
1557
+ dataType: string;
1558
+ table: string;
1559
+ database: string;
1560
+ connectionId: string;
1561
+ operation: Operation;
1562
+ sql: string;
1563
+ /** Selection type: 'single' allows one value, 'multiple' allows many */
1564
+ type?: 'single' | 'multiple';
1565
+ /** UI component for single-select filters */
1566
+ uiType?: 'radio' | 'dropdown' | 'tabs';
1567
+ /** Date picker type: 'range' for full calendar, 'months' for month picker */
1568
+ dateSelectionMode?: DateSelectionMode;
1569
+ /** Default values applied when the dashboard first loads */
1570
+ defaultValues?: (string | number)[];
1571
+ /** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
1572
+ defaultDateFilter?: RelativeDateFilter;
1573
+ /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
1574
+ searchMode?: 'text' | 'numeric' | 'auto';
1575
+ /** Custom filter UI from a plugin */
1576
+ customFilterPreferences?: TCustomFilterPreferences;
1577
+ /** Width of the inline filter in pixels (default: 250) */
1578
+ width?: number;
1579
+ /** Whether to show the label above the filter (default: true) */
1580
+ showLabel?: boolean;
1581
+ };
1582
+
1532
1583
  export declare type TLegendOptions = {
1533
1584
  display?: boolean;
1534
1585
  position?: 'top' | 'left' | 'bottom' | 'right';
@@ -68,6 +68,13 @@ declare type Actions = {
68
68
  setCardKpiOptions: (sheetId: string, cardId: string, kpiOptions: Record<string, any>) => void;
69
69
  updateCardFilters: (cardId: string, filters: FilterGroup | undefined) => void;
70
70
  clearCardFilters: (cardId: string) => void;
71
+ setCardInlineFilterValue: (cardId: string, filterValue: TFilterValue) => void;
72
+ removeCardInlineFilterValue: (cardId: string, filterId: string) => void;
73
+ getCardInlineFilterValues: (cardId: string) => TFilterValue[];
74
+ clearAllInlineFilterValues: () => void;
75
+ setInlineFilterValuesMap: (map: Record<string, TFilterValue[]>) => void;
76
+ setCardInlineFilterMode: (sheetId: string, cardId: string, filterId: string, filterMode: 'include' | 'exclude') => void;
77
+ setCardInlineFilterDefaultValues: (sheetId: string, cardId: string, filterId: string, defaultValues: (string | number)[] | undefined) => void;
71
78
  addFrame: (sheetId: string, frame: TFrame, position?: 'start' | 'end') => void;
72
79
  updateFrame: (sheetId: string, frame: TFrame) => void;
73
80
  updateCard: (sheetId: string, card: TCard) => void;
@@ -765,6 +772,8 @@ export declare type DashboardStore = {
765
772
  showDashboardJSON: boolean;
766
773
  showFilters: boolean;
767
774
  filterValues?: TFilterValue[];
775
+ /** Runtime-only inline filter values, keyed by cardId. Not persisted with dashboard. */
776
+ inlineFilterValuesMap: Record<string, TFilterValue[]>;
768
777
  isDashboardPanelOpen: boolean;
769
778
  drillHistory: Array<{
770
779
  sourceDashboardId: string;
@@ -2149,6 +2158,11 @@ export declare type TCard = {
2149
2158
  * If not specified, the card will use the dashboard's display preferences.
2150
2159
  */
2151
2160
  displayPreferences?: VisualDisplayPreferences;
2161
+ /**
2162
+ * Inline filter definitions for this card.
2163
+ * Configured by editors via the visual editor settings.
2164
+ */
2165
+ inlineFilters?: TInlineFilter[];
2152
2166
  };
2153
2167
 
2154
2168
  export declare type TCardContext = {
@@ -2309,6 +2323,14 @@ export declare type TCustomCardPreferences = {
2309
2323
  }[];
2310
2324
  };
2311
2325
 
2326
+ declare type TCustomFilterPreferences = {
2327
+ url: string;
2328
+ componentName: string;
2329
+ pluginFilterType?: string;
2330
+ icon?: string;
2331
+ settings?: Record<string, string | number | boolean>;
2332
+ };
2333
+
2312
2334
  export declare type TDashboard = {
2313
2335
  id: string;
2314
2336
  title?: string;
@@ -2401,6 +2423,9 @@ declare type TFilter = {
2401
2423
  excludeSheetIds?: string[];
2402
2424
  applyToCardIds?: string[];
2403
2425
  excludeCardIds?: string[];
2426
+ customFilterPreferences?: TCustomFilterPreferences;
2427
+ /** Whether to show the label above the filter (default: true) */
2428
+ showLabel?: boolean;
2404
2429
  };
2405
2430
 
2406
2431
  export declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
@@ -2473,6 +2498,41 @@ export declare interface TimeDrillStep {
2473
2498
 
2474
2499
  export declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
2475
2500
 
2501
+ /**
2502
+ * Inline filter definition stored on a card.
2503
+ * Inline filters appear on the right-hand side of the card header,
2504
+ * allowing ad-hoc data exploration without affecting other cards.
2505
+ */
2506
+ export declare type TInlineFilter = {
2507
+ id: string;
2508
+ column: string;
2509
+ title: string;
2510
+ dataType: string;
2511
+ table: string;
2512
+ database: string;
2513
+ connectionId: string;
2514
+ operation: Operation;
2515
+ sql: string;
2516
+ /** Selection type: 'single' allows one value, 'multiple' allows many */
2517
+ type?: 'single' | 'multiple';
2518
+ /** UI component for single-select filters */
2519
+ uiType?: 'radio' | 'dropdown' | 'tabs';
2520
+ /** Date picker type: 'range' for full calendar, 'months' for month picker */
2521
+ dateSelectionMode?: DateSelectionMode;
2522
+ /** Default values applied when the dashboard first loads */
2523
+ defaultValues?: (string | number)[];
2524
+ /** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
2525
+ defaultDateFilter?: RelativeDateFilter;
2526
+ /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
2527
+ searchMode?: 'text' | 'numeric' | 'auto';
2528
+ /** Custom filter UI from a plugin */
2529
+ customFilterPreferences?: TCustomFilterPreferences;
2530
+ /** Width of the inline filter in pixels (default: 250) */
2531
+ width?: number;
2532
+ /** Whether to show the label above the filter (default: true) */
2533
+ showLabel?: boolean;
2534
+ };
2535
+
2476
2536
  export declare type TLegendOptions = {
2477
2537
  display?: boolean;
2478
2538
  position?: 'top' | 'left' | 'bottom' | 'right';
@@ -1218,6 +1218,11 @@ export declare type TCard = {
1218
1218
  * If not specified, the card will use the dashboard's display preferences.
1219
1219
  */
1220
1220
  displayPreferences?: VisualDisplayPreferences;
1221
+ /**
1222
+ * Inline filter definitions for this card.
1223
+ * Configured by editors via the visual editor settings.
1224
+ */
1225
+ inlineFilters?: TInlineFilter[];
1221
1226
  };
1222
1227
 
1223
1228
  export declare type TCardContext = {
@@ -1376,6 +1381,14 @@ export declare type TCustomCardPreferences = {
1376
1381
  }[];
1377
1382
  };
1378
1383
 
1384
+ declare type TCustomFilterPreferences = {
1385
+ url: string;
1386
+ componentName: string;
1387
+ pluginFilterType?: string;
1388
+ icon?: string;
1389
+ settings?: Record<string, string | number | boolean>;
1390
+ };
1391
+
1379
1392
  export declare type TDashboard = {
1380
1393
  id: string;
1381
1394
  title?: string;
@@ -1468,6 +1481,9 @@ declare type TFilter = {
1468
1481
  excludeSheetIds?: string[];
1469
1482
  applyToCardIds?: string[];
1470
1483
  excludeCardIds?: string[];
1484
+ customFilterPreferences?: TCustomFilterPreferences;
1485
+ /** Whether to show the label above the filter (default: true) */
1486
+ showLabel?: boolean;
1471
1487
  };
1472
1488
 
1473
1489
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
@@ -1534,6 +1550,41 @@ declare interface TimeDrillStep {
1534
1550
 
1535
1551
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1536
1552
 
1553
+ /**
1554
+ * Inline filter definition stored on a card.
1555
+ * Inline filters appear on the right-hand side of the card header,
1556
+ * allowing ad-hoc data exploration without affecting other cards.
1557
+ */
1558
+ export declare type TInlineFilter = {
1559
+ id: string;
1560
+ column: string;
1561
+ title: string;
1562
+ dataType: string;
1563
+ table: string;
1564
+ database: string;
1565
+ connectionId: string;
1566
+ operation: Operation;
1567
+ sql: string;
1568
+ /** Selection type: 'single' allows one value, 'multiple' allows many */
1569
+ type?: 'single' | 'multiple';
1570
+ /** UI component for single-select filters */
1571
+ uiType?: 'radio' | 'dropdown' | 'tabs';
1572
+ /** Date picker type: 'range' for full calendar, 'months' for month picker */
1573
+ dateSelectionMode?: DateSelectionMode;
1574
+ /** Default values applied when the dashboard first loads */
1575
+ defaultValues?: (string | number)[];
1576
+ /** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
1577
+ defaultDateFilter?: RelativeDateFilter;
1578
+ /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
1579
+ searchMode?: 'text' | 'numeric' | 'auto';
1580
+ /** Custom filter UI from a plugin */
1581
+ customFilterPreferences?: TCustomFilterPreferences;
1582
+ /** Width of the inline filter in pixels (default: 250) */
1583
+ width?: number;
1584
+ /** Whether to show the label above the filter (default: true) */
1585
+ showLabel?: boolean;
1586
+ };
1587
+
1537
1588
  export declare type TLegendOptions = {
1538
1589
  display?: boolean;
1539
1590
  position?: 'top' | 'left' | 'bottom' | 'right';
@@ -1210,6 +1210,11 @@ export declare type TCard = {
1210
1210
  * If not specified, the card will use the dashboard's display preferences.
1211
1211
  */
1212
1212
  displayPreferences?: VisualDisplayPreferences;
1213
+ /**
1214
+ * Inline filter definitions for this card.
1215
+ * Configured by editors via the visual editor settings.
1216
+ */
1217
+ inlineFilters?: TInlineFilter[];
1213
1218
  };
1214
1219
 
1215
1220
  export declare type TCardContext = {
@@ -1368,6 +1373,14 @@ export declare type TCustomCardPreferences = {
1368
1373
  }[];
1369
1374
  };
1370
1375
 
1376
+ declare type TCustomFilterPreferences = {
1377
+ url: string;
1378
+ componentName: string;
1379
+ pluginFilterType?: string;
1380
+ icon?: string;
1381
+ settings?: Record<string, string | number | boolean>;
1382
+ };
1383
+
1371
1384
  export declare type TDashboard = {
1372
1385
  id: string;
1373
1386
  title?: string;
@@ -1460,6 +1473,9 @@ declare type TFilter = {
1460
1473
  excludeSheetIds?: string[];
1461
1474
  applyToCardIds?: string[];
1462
1475
  excludeCardIds?: string[];
1476
+ customFilterPreferences?: TCustomFilterPreferences;
1477
+ /** Whether to show the label above the filter (default: true) */
1478
+ showLabel?: boolean;
1463
1479
  };
1464
1480
 
1465
1481
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
@@ -1526,6 +1542,41 @@ declare interface TimeDrillStep {
1526
1542
 
1527
1543
  declare type TimeGranularity = 'day' | 'week' | 'month' | 'quarter' | 'year';
1528
1544
 
1545
+ /**
1546
+ * Inline filter definition stored on a card.
1547
+ * Inline filters appear on the right-hand side of the card header,
1548
+ * allowing ad-hoc data exploration without affecting other cards.
1549
+ */
1550
+ export declare type TInlineFilter = {
1551
+ id: string;
1552
+ column: string;
1553
+ title: string;
1554
+ dataType: string;
1555
+ table: string;
1556
+ database: string;
1557
+ connectionId: string;
1558
+ operation: Operation;
1559
+ sql: string;
1560
+ /** Selection type: 'single' allows one value, 'multiple' allows many */
1561
+ type?: 'single' | 'multiple';
1562
+ /** UI component for single-select filters */
1563
+ uiType?: 'radio' | 'dropdown' | 'tabs';
1564
+ /** Date picker type: 'range' for full calendar, 'months' for month picker */
1565
+ dateSelectionMode?: DateSelectionMode;
1566
+ /** Default values applied when the dashboard first loads */
1567
+ defaultValues?: (string | number)[];
1568
+ /** Default relative date filter (e.g., "Last 7 days") applied on dashboard load */
1569
+ defaultDateFilter?: RelativeDateFilter;
1570
+ /** Search mode for numeric filters: 'text' treats as text, 'numeric' enables operators (>, <, =) */
1571
+ searchMode?: 'text' | 'numeric' | 'auto';
1572
+ /** Custom filter UI from a plugin */
1573
+ customFilterPreferences?: TCustomFilterPreferences;
1574
+ /** Width of the inline filter in pixels (default: 250) */
1575
+ width?: number;
1576
+ /** Whether to show the label above the filter (default: true) */
1577
+ showLabel?: boolean;
1578
+ };
1579
+
1529
1580
  export declare type TLegendOptions = {
1530
1581
  display?: boolean;
1531
1582
  position?: 'top' | 'left' | 'bottom' | 'right';
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.133",
8
+ "version": "0.1.135",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",