semaphor 0.0.122 → 0.0.124

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-B8Czf9DR.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-Bg0LYX7P.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-DhcjOqn7.js";
1
+ import { D as f } from "../chunks/dashboard-plus-1MhnSpH0.js";
2
2
  import { EMPTY_SELECTION as a } from "../types/index.js";
3
3
  export {
4
4
  a as EMPTY_SELECTION,
@@ -308,6 +308,7 @@ declare interface DatabaseEntityReference {
308
308
  connectionId: string;
309
309
  connectionType: ConnectionType;
310
310
  type: EntityType;
311
+ dbObjectType?: string;
311
312
  dialect?: Dialect;
312
313
  database?: string;
313
314
  schema?: string;
@@ -941,6 +942,12 @@ export declare type TCardPreferences = {
941
942
  sortRowsBy?: 'label' | 'total' | 'metric';
942
943
  sortColumnsBy?: 'label' | 'total' | 'metric';
943
944
  };
945
+ displayOptions?: {
946
+ showFilterInfo?: boolean;
947
+ showCardToolbar?: boolean;
948
+ showChrome?: boolean;
949
+ allowScroll?: boolean;
950
+ };
944
951
  };
945
952
 
946
953
  export declare type TChartOptions = {
@@ -1110,6 +1117,7 @@ export declare type TFormatOptions = {
1110
1117
 
1111
1118
  export declare type TFrame = {
1112
1119
  id: string;
1120
+ visualId?: string;
1113
1121
  filterId?: string;
1114
1122
  cards: TCard[];
1115
1123
  activeCardId: string;
@@ -580,6 +580,7 @@ export declare interface DatabaseEntityReference {
580
580
  connectionId: string;
581
581
  connectionType: ConnectionType;
582
582
  type: EntityType;
583
+ dbObjectType?: string;
583
584
  dialect?: Dialect;
584
585
  database?: string;
585
586
  schema?: string;
@@ -644,7 +645,7 @@ export declare type Dialect = 'mysql' | 'postgresql' | 'bigquery' | 'redshift' |
644
645
 
645
646
  export declare type DisplayDataType = 'string' | 'date' | 'number' | 'html' | 'none';
646
647
 
647
- export declare function downloadPdf(password?: string): Promise<void>;
648
+ export declare function downloadPdf(apiServiceUrl: string, password?: string): Promise<void>;
648
649
 
649
650
  declare interface DrillActions {
650
651
  updateDrillHierarchies: (h: DrillHierarchy[]) => void;
@@ -963,6 +964,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
963
964
  frames: {
964
965
  cards: TCard[];
965
966
  id: string;
967
+ visualId?: string;
966
968
  filterId?: string;
967
969
  activeCardId: string;
968
970
  }[] | undefined;
@@ -1053,7 +1055,7 @@ declare interface InlineDrillInteraction {
1053
1055
  label?: string;
1054
1056
  }
1055
1057
 
1056
- export declare function invalidateToken(): Promise<any>;
1058
+ export declare function invalidateToken(apiServiceUrl: string): Promise<any>;
1057
1059
 
1058
1060
  export declare function isBooleanDataType(dataType: string): boolean;
1059
1061
 
@@ -1146,6 +1148,11 @@ export declare interface MetricField extends Field {
1146
1148
  valueAliases?: Record<string, string>;
1147
1149
  }
1148
1150
 
1151
+ declare interface MinimalResourceForSharing {
1152
+ id: string;
1153
+ title: string;
1154
+ }
1155
+
1149
1156
  export declare type ModelItem = DropdownItem;
1150
1157
 
1151
1158
  declare type NoneOptions = {};
@@ -1277,18 +1284,24 @@ export declare function resolveDatamodelName(datamodelName: string): string;
1277
1284
 
1278
1285
  export declare const resolveDataType: (value: any) => string;
1279
1286
 
1280
- export declare function ResourceManagementPanel({ isOpen, onClose, className, onDashboardItemClick, }: ResourceManagementPanelProps): JSX_2.Element;
1287
+ export declare function ResourceManagementPanel({ isOpen, onClose, className, onDashboardItemClick, variant, }: ResourceManagementPanelProps): JSX_2.Element;
1281
1288
 
1282
1289
  declare interface ResourceManagementPanelProps {
1283
1290
  isOpen: boolean;
1284
1291
  onClose: () => void;
1285
1292
  className?: string;
1286
1293
  onDashboardItemClick?: (dashboardId: string) => void;
1294
+ variant?: 'overlay' | 'inline';
1295
+ }
1296
+
1297
+ export declare enum ResourceType {
1298
+ DASHBOARD = "dashboard",
1299
+ VISUAL = "visual"
1287
1300
  }
1288
1301
 
1289
1302
  export declare function ScheduleDashboard({ triggerButtonClassName, }: {
1290
1303
  triggerButtonClassName?: string;
1291
- }): JSX_2.Element;
1304
+ }): JSX_2.Element | null;
1292
1305
 
1293
1306
  export declare type SchemaItem = DropdownItem;
1294
1307
 
@@ -1328,6 +1341,16 @@ declare function SemaphorQueryClient({ children, }: {
1328
1341
  export { SemaphorQueryClient as SemaphorDataProvider }
1329
1342
  export { SemaphorQueryClient }
1330
1343
 
1344
+ export declare function ShareDialog({ resource, resourceType, onClose, onShareSuccess, onRemoveSuccess, }: ShareDialogProps): JSX_2.Element;
1345
+
1346
+ declare interface ShareDialogProps {
1347
+ resource: MinimalResourceForSharing;
1348
+ resourceType: ResourceType;
1349
+ onClose: () => void;
1350
+ onShareSuccess?: () => void;
1351
+ onRemoveSuccess?: () => void;
1352
+ }
1353
+
1331
1354
  export declare interface SortByField extends Field {
1332
1355
  role: 'sortby';
1333
1356
  direction: 'asc' | 'desc';
@@ -1396,7 +1419,7 @@ export declare interface SubtotalConfig {
1396
1419
  pivotBy?: AggregateConfig;
1397
1420
  }
1398
1421
 
1399
- export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
1422
+ export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
1400
1423
 
1401
1424
  declare interface TableActions {
1402
1425
  updateColumnSettingsMap: (columnSettings: ColumnSettingsMap) => void;
@@ -1547,6 +1570,12 @@ export declare type TCardPreferences = {
1547
1570
  sortRowsBy?: 'label' | 'total' | 'metric';
1548
1571
  sortColumnsBy?: 'label' | 'total' | 'metric';
1549
1572
  };
1573
+ displayOptions?: {
1574
+ showFilterInfo?: boolean;
1575
+ showCardToolbar?: boolean;
1576
+ showChrome?: boolean;
1577
+ allowScroll?: boolean;
1578
+ };
1550
1579
  };
1551
1580
 
1552
1581
  declare type TChartConfiguration = ChartConfiguration;
@@ -1718,6 +1747,7 @@ export declare type TFormatOptions = {
1718
1747
 
1719
1748
  export declare type TFrame = {
1720
1749
  id: string;
1750
+ visualId?: string;
1721
1751
  filterId?: string;
1722
1752
  cards: TCard[];
1723
1753
  activeCardId: string;
@@ -1836,6 +1866,14 @@ export declare type TokenProps = {
1836
1866
  * UI behavior and feature flags.
1837
1867
  */
1838
1868
  config?: UIConfig;
1869
+ /**
1870
+ * Dataservice URL.
1871
+ */
1872
+ dataServiceUrl: string;
1873
+ /**
1874
+ * API service URL.
1875
+ */
1876
+ apiServiceUrl: string;
1839
1877
  };
1840
1878
 
1841
1879
  /**
@@ -1986,6 +2024,11 @@ export declare type UIConfig = {
1986
2024
  * Defaults to true unless explicitly disabled.
1987
2025
  */
1988
2026
  showAdvancedMode?: boolean;
2027
+ /**
2028
+ * Enables the Info tab in the editor/explorer view.
2029
+ * Defaults to true unless explicitly disabled.
2030
+ */
2031
+ showInfoTab?: boolean;
1989
2032
  /**
1990
2033
  * Enables the AI-powered dashboard assistant.
1991
2034
  * Defaults to true unless explicitly disabled.
@@ -311,6 +311,7 @@ declare interface DatabaseEntityReference {
311
311
  connectionId: string;
312
312
  connectionType: ConnectionType;
313
313
  type: EntityType;
314
+ dbObjectType?: string;
314
315
  dialect?: Dialect;
315
316
  database?: string;
316
317
  schema?: string;
@@ -816,7 +817,7 @@ export declare type StyleProps = {
816
817
  };
817
818
  };
818
819
 
819
- export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element | null;
820
+ export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
820
821
 
821
822
  declare type TablePreferences = {
822
823
  columnSettingsMap?: ColumnSettingsMap;
@@ -946,6 +947,12 @@ export declare type TCardPreferences = {
946
947
  sortRowsBy?: 'label' | 'total' | 'metric';
947
948
  sortColumnsBy?: 'label' | 'total' | 'metric';
948
949
  };
950
+ displayOptions?: {
951
+ showFilterInfo?: boolean;
952
+ showCardToolbar?: boolean;
953
+ showChrome?: boolean;
954
+ allowScroll?: boolean;
955
+ };
949
956
  };
950
957
 
951
958
  export declare type TChartOptions = {
@@ -1115,6 +1122,7 @@ export declare type TFormatOptions = {
1115
1122
 
1116
1123
  export declare type TFrame = {
1117
1124
  id: string;
1125
+ visualId?: string;
1118
1126
  filterId?: string;
1119
1127
  cards: TCard[];
1120
1128
  activeCardId: string;
@@ -305,6 +305,7 @@ declare interface DatabaseEntityReference {
305
305
  connectionId: string;
306
306
  connectionType: ConnectionType;
307
307
  type: EntityType;
308
+ dbObjectType?: string;
308
309
  dialect?: Dialect;
309
310
  database?: string;
310
311
  schema?: string;
@@ -938,6 +939,12 @@ export declare type TCardPreferences = {
938
939
  sortRowsBy?: 'label' | 'total' | 'metric';
939
940
  sortColumnsBy?: 'label' | 'total' | 'metric';
940
941
  };
942
+ displayOptions?: {
943
+ showFilterInfo?: boolean;
944
+ showCardToolbar?: boolean;
945
+ showChrome?: boolean;
946
+ allowScroll?: boolean;
947
+ };
941
948
  };
942
949
 
943
950
  export declare type TChartOptions = {
@@ -1107,6 +1114,7 @@ export declare type TFormatOptions = {
1107
1114
 
1108
1115
  export declare type TFrame = {
1109
1116
  id: string;
1117
+ visualId?: string;
1110
1118
  filterId?: string;
1111
1119
  cards: TCard[];
1112
1120
  activeCardId: 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.122",
8
+ "version": "0.0.124",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -39,12 +39,6 @@
39
39
  },
40
40
  "./style.css": "./dist/style.css"
41
41
  },
42
- "scripts": {
43
- "dev": "vite",
44
- "build": "tsc && vite build",
45
- "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
46
- "preview": "vite preview"
47
- },
48
42
  "dependencies": {
49
43
  "@ai-sdk/react": "^2.0.7",
50
44
  "@dnd-kit/core": "^6.3.1",
@@ -113,45 +107,5 @@
113
107
  "peerDependencies": {
114
108
  "react": "^18.0.0 || ^19.0.0",
115
109
  "react-dom": "^18.0.0 || ^19.0.0"
116
- },
117
- "devDependencies": {
118
- "@microsoft/api-extractor": "^7.52.1",
119
- "@tanstack/react-query-devtools": "^5.62.15",
120
- "@types/chart.js": "^2.9.41",
121
- "@types/dompurify": "^3.0.5",
122
- "@types/jsoneditor": "^9.9.5",
123
- "@types/lodash.merge": "^4.6.9",
124
- "@types/ms": "^0.7.34",
125
- "@types/node": "^20.14.2",
126
- "@types/postcss-prefix-selector": "^1.16.3",
127
- "@types/prismjs": "^1.26.3",
128
- "@types/react": "^18.2.43",
129
- "@types/react-dom": "^18.2.17",
130
- "@types/react-grid-layout": "^1.3.5",
131
- "@types/uuid": "^9.0.7",
132
- "@typescript-eslint/eslint-plugin": "^6.14.0",
133
- "@typescript-eslint/parser": "^6.14.0",
134
- "@vitejs/plugin-react": "^4.2.1",
135
- "and": "^0.0.3",
136
- "autoprefixer": "^10.4.18",
137
- "babel-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
138
- "eslint": "^8.55.0",
139
- "eslint-plugin-react-compiler": "^19.0.0-beta-e552027-20250112",
140
- "eslint-plugin-react-hooks": "^4.6.0",
141
- "eslint-plugin-react-refresh": "^0.4.5",
142
- "path": "^0.12.7",
143
- "postcss": "^8.4.35",
144
- "postcss-prefix-selector": "^2.1.0",
145
- "postcss-preset-env": "^10.0.9",
146
- "prettier-plugin-tailwindcss": "^0.6.1",
147
- "react": "^18.2.0",
148
- "react-dom": "^18.2.0",
149
- "rollup-plugin-visualizer": "^5.12.0",
150
- "simple-zustand-devtools": "^1.1.0",
151
- "tailwindcss": "^3.4.1",
152
- "typescript": "^5.4.5",
153
- "vite": "^5.0.8",
154
- "vite-plugin-css-injected-by-js": "^3.5.1",
155
- "vite-plugin-dts": "^4.5.0"
156
110
  }
157
- }
111
+ }