semaphor 0.0.57 → 0.0.59

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,5 +1,5 @@
1
- import { D as i } from "../chunks/dashboard-plus-qOIvgNim.js";
2
- import "../chunks/index-zWnvf9QX.js";
1
+ import { D as i } from "../chunks/dashboard-plus-IRCMSJv_.js";
2
+ import "../chunks/index-xyzOo2JH.js";
3
3
  import "react";
4
4
  import "react-dom";
5
5
  export {
@@ -70,7 +70,7 @@ export declare type ConnectionPolicy = {
70
70
 
71
71
  export declare type CustomCard = CardWithContent | CardWithFooter;
72
72
 
73
- export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
73
+ export declare function Dashboard(props: DashboardProps): JSX_2.Element;
74
74
 
75
75
  export declare type DashboardProps = {
76
76
  id?: string;
@@ -136,7 +136,7 @@ declare type FilterOnClick = {
136
136
 
137
137
  export declare type KPICardProps = {
138
138
  card: TCard;
139
- isLoading: boolean;
139
+ isLoading?: boolean;
140
140
  };
141
141
 
142
142
  export declare type LoadingProps = {
@@ -217,16 +217,20 @@ export declare type StyleProps = {
217
217
  export declare type TBaseQuery = {
218
218
  id: string;
219
219
  name: string;
220
+ connectionId: string;
220
221
  sql: string;
222
+ context?: string;
221
223
  description?: string;
222
224
  };
223
225
 
224
226
  export declare type TCard = {
225
227
  id: string;
226
228
  title: string;
229
+ tabTitle?: string;
227
230
  description?: string;
228
231
  info?: string;
229
232
  connectionId?: string;
233
+ datamodelId?: string;
230
234
  type: TChartType;
231
235
  sql?: string;
232
236
  python?: string;
@@ -235,6 +239,7 @@ export declare type TCard = {
235
239
  customCfg?: any;
236
240
  preferences?: TCardPreferences;
237
241
  lastSelectedDatabase?: string;
242
+ lastSelectedDatamodelId?: string;
238
243
  lastSelectedSchema?: string;
239
244
  lastSelectedTable?: string;
240
245
  refreshInterval?: string;
@@ -71,6 +71,7 @@ declare type Actions = {
71
71
  getSelectedSheet: () => TSheet | undefined;
72
72
  getCard: (cardId: string) => TCard | undefined;
73
73
  getSelectedFrame: () => TFrame | undefined;
74
+ getCardFrame: (cardId: string) => TFrame | undefined;
74
75
  getCardSheet: (cardId: string) => TSheet | undefined;
75
76
  getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
76
77
  getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
@@ -96,6 +97,7 @@ declare type Actions_2 = {
96
97
  setIsSqlRunning: (isSqlRunning: boolean) => void;
97
98
  setCard: (card: TCard) => void;
98
99
  setFrame: (frame: TFrame) => void;
100
+ updateCardInFrame: (card: TCard) => void;
99
101
  setSqlGen: (sqlGen: SqlGen) => void;
100
102
  setSqlGenMeasure: (name: string, calc: AggregateCalc) => void;
101
103
  setSqlGenDimension: (dimension: string) => void;
@@ -110,6 +112,7 @@ declare type Actions_2 = {
110
112
  setApplyFilters: (applyFilters: boolean) => void;
111
113
  setFilterValues: (filterValues: TFilterValue[]) => void;
112
114
  setSelectedConnectionId: (connectionId: string) => void;
115
+ setSelectedDatamodelId: (datamodelId: string) => void;
113
116
  setSelectedDatabaseName: (databaseName: string) => void;
114
117
  setSelectedSchemaName: (schemaName: string) => void;
115
118
  setSelectedTableName: (tableName: string) => void;
@@ -197,7 +200,7 @@ export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGe
197
200
 
198
201
  export declare type CustomCard = CardWithContent | CardWithFooter;
199
202
 
200
- export declare function Dashboard(props: DashboardProps): JSX_2.Element | null;
203
+ export declare function Dashboard(props: DashboardProps): JSX_2.Element;
201
204
 
202
205
  export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
203
206
 
@@ -282,11 +285,13 @@ declare type EditorStore = {
282
285
  queryError?: string;
283
286
  pythonStdOut?: string;
284
287
  selectedConnectionId?: string;
288
+ selectedDatamodelId?: string;
285
289
  selectedDatabaseName?: string;
286
290
  selectedSchemaName?: string;
287
291
  selectedTableName?: string;
288
292
  currentColumns?: TDataColumn[];
289
293
  onConnectionChange?: (connectionId: string) => void;
294
+ onDatamodelChange?: (datamodelId: string) => void;
290
295
  onDatabaseChange?: (databaseName: string) => void;
291
296
  onTableChange?: (tableName: string) => void;
292
297
  onSchemaChange?: (schemaName: string) => void;
@@ -368,13 +373,13 @@ export declare function getFilterValueType(filter: TFilter): "string" | "number"
368
373
 
369
374
  export declare function getQualifiedTableName(schemaName: string, tableName: string): string;
370
375
 
371
- export declare function getSql(config: SqlGen, schemaName: string, tableName: string): string | undefined;
376
+ export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string): string | undefined;
372
377
 
373
378
  export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
374
379
 
375
380
  export declare type KPICardProps = {
376
381
  card: TCard;
377
- isLoading: boolean;
382
+ isLoading?: boolean;
378
383
  };
379
384
 
380
385
  export declare type LoadingProps = {
@@ -411,7 +416,7 @@ declare type Params = {
411
416
 
412
417
  export declare const resolveDataType: (value: any) => string;
413
418
 
414
- export declare function SelectComponent({ title, items, value, isLoading, isError, connectionTooltip, onChange, className, showIcon, disabled, }: SelectProps): JSX_2.Element;
419
+ export declare function SelectComponent({ title, items, value, isLoading, isError, connectionTooltip, onChange, showNone, className, showIcon, disabled, }: SelectProps): JSX_2.Element;
415
420
 
416
421
  declare type SelectProps = {
417
422
  title: string;
@@ -423,6 +428,7 @@ declare type SelectProps = {
423
428
  isLoading: boolean;
424
429
  isError: boolean;
425
430
  onChange?: (value: string) => void;
431
+ showNone?: boolean;
426
432
  className?: string;
427
433
  showIcon?: boolean;
428
434
  connectionTooltip?: string;
@@ -483,16 +489,20 @@ export declare function Surfboard({ showControls, showFooter, ...rest }: Dashboa
483
489
  export declare type TBaseQuery = {
484
490
  id: string;
485
491
  name: string;
492
+ connectionId: string;
486
493
  sql: string;
494
+ context?: string;
487
495
  description?: string;
488
496
  };
489
497
 
490
498
  export declare type TCard = {
491
499
  id: string;
492
500
  title: string;
501
+ tabTitle?: string;
493
502
  description?: string;
494
503
  info?: string;
495
504
  connectionId?: string;
505
+ datamodelId?: string;
496
506
  type: TChartType;
497
507
  sql?: string;
498
508
  python?: string;
@@ -501,6 +511,7 @@ export declare type TCard = {
501
511
  customCfg?: any;
502
512
  preferences?: TCardPreferences;
503
513
  lastSelectedDatabase?: string;
514
+ lastSelectedDatamodelId?: string;
504
515
  lastSelectedSchema?: string;
505
516
  lastSelectedTable?: string;
506
517
  refreshInterval?: string;
@@ -700,9 +711,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
700
711
  filteringCards?: {
701
712
  id: string;
702
713
  title: string;
714
+ tabTitle?: string | undefined;
703
715
  description?: string | undefined;
704
716
  info?: string | undefined;
705
717
  connectionId?: string | undefined;
718
+ datamodelId?: string | undefined;
706
719
  type: TChartType;
707
720
  sql?: string | undefined;
708
721
  python?: string | undefined;
@@ -833,6 +846,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
833
846
  } | undefined;
834
847
  } | undefined;
835
848
  lastSelectedDatabase?: string | undefined;
849
+ lastSelectedDatamodelId?: string | undefined;
836
850
  lastSelectedSchema?: string | undefined;
837
851
  lastSelectedTable?: string | undefined;
838
852
  refreshInterval?: string | undefined;
@@ -885,9 +899,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
885
899
  cards?: {
886
900
  id: string;
887
901
  title: string;
902
+ tabTitle?: string | undefined;
888
903
  description?: string | undefined;
889
904
  info?: string | undefined;
890
905
  connectionId?: string | undefined;
906
+ datamodelId?: string | undefined;
891
907
  type: TChartType;
892
908
  sql?: string | undefined;
893
909
  python?: string | undefined;
@@ -1018,6 +1034,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1018
1034
  } | undefined;
1019
1035
  } | undefined;
1020
1036
  lastSelectedDatabase?: string | undefined;
1037
+ lastSelectedDatamodelId?: string | undefined;
1021
1038
  lastSelectedSchema?: string | undefined;
1022
1039
  lastSelectedTable?: string | undefined;
1023
1040
  refreshInterval?: string | undefined;
@@ -1027,9 +1044,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1027
1044
  cards: {
1028
1045
  id: string;
1029
1046
  title: string;
1047
+ tabTitle?: string | undefined;
1030
1048
  description?: string | undefined;
1031
1049
  info?: string | undefined;
1032
1050
  connectionId?: string | undefined;
1051
+ datamodelId?: string | undefined;
1033
1052
  type: TChartType;
1034
1053
  sql?: string | undefined;
1035
1054
  python?: string | undefined;
@@ -1160,6 +1179,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1160
1179
  } | undefined;
1161
1180
  } | undefined;
1162
1181
  lastSelectedDatabase?: string | undefined;
1182
+ lastSelectedDatamodelId?: string | undefined;
1163
1183
  lastSelectedSchema?: string | undefined;
1164
1184
  lastSelectedTable?: string | undefined;
1165
1185
  refreshInterval?: string | undefined;
@@ -1253,7 +1273,9 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1253
1273
  baseQueries?: {
1254
1274
  id: string;
1255
1275
  name: string;
1276
+ connectionId: string;
1256
1277
  sql: string;
1278
+ context?: string | undefined;
1257
1279
  description?: string | undefined;
1258
1280
  }[] | undefined;
1259
1281
  aiScopeTables?: {
@@ -1322,9 +1344,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1322
1344
  selectedCard?: {
1323
1345
  id: string;
1324
1346
  title: string;
1347
+ tabTitle?: string | undefined;
1325
1348
  description?: string | undefined;
1326
1349
  info?: string | undefined;
1327
1350
  connectionId?: string | undefined;
1351
+ datamodelId?: string | undefined;
1328
1352
  type: TChartType;
1329
1353
  sql?: string | undefined;
1330
1354
  python?: string | undefined;
@@ -1455,6 +1479,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1455
1479
  } | undefined;
1456
1480
  } | undefined;
1457
1481
  lastSelectedDatabase?: string | undefined;
1482
+ lastSelectedDatamodelId?: string | undefined;
1458
1483
  lastSelectedSchema?: string | undefined;
1459
1484
  lastSelectedTable?: string | undefined;
1460
1485
  refreshInterval?: string | undefined;
@@ -1576,6 +1601,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1576
1601
  getSelectedSheet: () => TSheet | undefined;
1577
1602
  getCard: (cardId: string) => TCard | undefined;
1578
1603
  getSelectedFrame: () => TFrame | undefined;
1604
+ getCardFrame: (cardId: string) => TFrame | undefined;
1579
1605
  getCardSheet: (cardId: string) => TSheet | undefined;
1580
1606
  getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
1581
1607
  getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
@@ -1593,6 +1619,9 @@ export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?:
1593
1619
  connectionItems: any;
1594
1620
  isConnectionsLoading: boolean;
1595
1621
  isConnectionsError: boolean;
1622
+ modelItems: any;
1623
+ isModelsLoading: boolean;
1624
+ isModelsError: boolean;
1596
1625
  databaseItems: any;
1597
1626
  isDatabasesLoadingOrFetching: boolean;
1598
1627
  isDatabaseError: boolean;
@@ -1610,6 +1639,7 @@ export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?:
1610
1639
  tableName: any;
1611
1640
  schemaName: string;
1612
1641
  handleConnectionChange: (value: string) => void;
1642
+ handleDatamodelChange: (value: string) => void;
1613
1643
  handleDatabaseChange: (value: string) => void;
1614
1644
  handleSchemaChange: (value: string) => void;
1615
1645
  };
@@ -1635,6 +1665,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1635
1665
  setIsSqlRunning: (isSqlRunning: boolean) => void;
1636
1666
  setCard: (card: TCard) => void;
1637
1667
  setFrame: (frame: TFrame) => void;
1668
+ updateCardInFrame: (card: TCard) => void;
1638
1669
  setSqlGen: (sqlGen: SqlGen) => void;
1639
1670
  setSqlGenMeasure: (name: string, calc: AggregateCalc) => void;
1640
1671
  setSqlGenDimension: (dimension: string) => void;
@@ -1649,6 +1680,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1649
1680
  setApplyFilters: (applyFilters: boolean) => void;
1650
1681
  setFilterValues: (filterValues: TFilterValue[]) => void;
1651
1682
  setSelectedConnectionId: (connectionId: string) => void;
1683
+ setSelectedDatamodelId: (datamodelId: string) => void;
1652
1684
  setSelectedDatabaseName: (databaseName: string) => void;
1653
1685
  setSelectedSchemaName: (schemaName: string) => void;
1654
1686
  setSelectedTableName: (tableName: string) => void;
@@ -1672,9 +1704,11 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1672
1704
  cards: {
1673
1705
  id: string;
1674
1706
  title: string;
1707
+ tabTitle?: string | undefined;
1675
1708
  description?: string | undefined;
1676
1709
  info?: string | undefined;
1677
1710
  connectionId?: string | undefined;
1711
+ datamodelId?: string | undefined;
1678
1712
  type: TChartType;
1679
1713
  sql?: string | undefined;
1680
1714
  python?: string | undefined;
@@ -1805,6 +1839,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1805
1839
  } | undefined;
1806
1840
  } | undefined;
1807
1841
  lastSelectedDatabase?: string | undefined;
1842
+ lastSelectedDatamodelId?: string | undefined;
1808
1843
  lastSelectedSchema?: string | undefined;
1809
1844
  lastSelectedTable?: string | undefined;
1810
1845
  refreshInterval?: string | undefined;
@@ -1814,9 +1849,11 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1814
1849
  card: {
1815
1850
  id: string;
1816
1851
  title: string;
1852
+ tabTitle?: string | undefined;
1817
1853
  description?: string | undefined;
1818
1854
  info?: string | undefined;
1819
1855
  connectionId?: string | undefined;
1856
+ datamodelId?: string | undefined;
1820
1857
  type: TChartType;
1821
1858
  sql?: string | undefined;
1822
1859
  python?: string | undefined;
@@ -1947,6 +1984,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1947
1984
  } | undefined;
1948
1985
  } | undefined;
1949
1986
  lastSelectedDatabase?: string | undefined;
1987
+ lastSelectedDatamodelId?: string | undefined;
1950
1988
  lastSelectedSchema?: string | undefined;
1951
1989
  lastSelectedTable?: string | undefined;
1952
1990
  refreshInterval?: string | undefined;
@@ -2006,6 +2044,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2006
2044
  queryError?: string | undefined;
2007
2045
  pythonStdOut?: string | undefined;
2008
2046
  selectedConnectionId?: string | undefined;
2047
+ selectedDatamodelId?: string | undefined;
2009
2048
  selectedDatabaseName?: string | undefined;
2010
2049
  selectedSchemaName?: string | undefined;
2011
2050
  selectedTableName?: string | undefined;
@@ -2015,6 +2054,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2015
2054
  is_nullable?: string | undefined;
2016
2055
  }[] | undefined;
2017
2056
  onConnectionChange?: ((connectionId: string) => void) | undefined;
2057
+ onDatamodelChange?: ((datamodelId: string) => void) | undefined;
2018
2058
  onDatabaseChange?: ((databaseName: string) => void) | undefined;
2019
2059
  onTableChange?: ((tableName: string) => void) | undefined;
2020
2060
  onSchemaChange?: ((schemaName: string) => void) | undefined;
@@ -139,7 +139,7 @@ declare type FilterOnClick = {
139
139
 
140
140
  export declare type KPICardProps = {
141
141
  card: TCard;
142
- isLoading: boolean;
142
+ isLoading?: boolean;
143
143
  };
144
144
 
145
145
  export declare type LoadingProps = {
@@ -222,16 +222,20 @@ export declare function Surfboard({ showControls, showFooter, ...rest }: Dashboa
222
222
  export declare type TBaseQuery = {
223
223
  id: string;
224
224
  name: string;
225
+ connectionId: string;
225
226
  sql: string;
227
+ context?: string;
226
228
  description?: string;
227
229
  };
228
230
 
229
231
  export declare type TCard = {
230
232
  id: string;
231
233
  title: string;
234
+ tabTitle?: string;
232
235
  description?: string;
233
236
  info?: string;
234
237
  connectionId?: string;
238
+ datamodelId?: string;
235
239
  type: TChartType;
236
240
  sql?: string;
237
241
  python?: string;
@@ -240,6 +244,7 @@ export declare type TCard = {
240
244
  customCfg?: any;
241
245
  preferences?: TCardPreferences;
242
246
  lastSelectedDatabase?: string;
247
+ lastSelectedDatamodelId?: string;
243
248
  lastSelectedSchema?: string;
244
249
  lastSelectedTable?: string;
245
250
  refreshInterval?: string;
@@ -133,7 +133,7 @@ declare type FilterOnClick = {
133
133
 
134
134
  export declare type KPICardProps = {
135
135
  card: TCard;
136
- isLoading: boolean;
136
+ isLoading?: boolean;
137
137
  };
138
138
 
139
139
  export declare type LoadingProps = {
@@ -214,16 +214,20 @@ export declare type StyleProps = {
214
214
  export declare type TBaseQuery = {
215
215
  id: string;
216
216
  name: string;
217
+ connectionId: string;
217
218
  sql: string;
219
+ context?: string;
218
220
  description?: string;
219
221
  };
220
222
 
221
223
  export declare type TCard = {
222
224
  id: string;
223
225
  title: string;
226
+ tabTitle?: string;
224
227
  description?: string;
225
228
  info?: string;
226
229
  connectionId?: string;
230
+ datamodelId?: string;
227
231
  type: TChartType;
228
232
  sql?: string;
229
233
  python?: string;
@@ -232,6 +236,7 @@ export declare type TCard = {
232
236
  customCfg?: any;
233
237
  preferences?: TCardPreferences;
234
238
  lastSelectedDatabase?: string;
239
+ lastSelectedDatamodelId?: string;
235
240
  lastSelectedSchema?: string;
236
241
  lastSelectedTable?: string;
237
242
  refreshInterval?: 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.57",
8
+ "version": "0.0.59",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",