semaphor 0.0.64 → 0.0.65

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.
@@ -14,6 +14,7 @@ import { StoreApi } from 'zustand';
14
14
  import { UseBoundStore } from 'zustand';
15
15
 
16
16
  declare type Actions = {
17
+ setInitStore: () => void;
17
18
  setGlobalStyle: (style: TStyle) => void;
18
19
  setLenses: (lenses: TLens[]) => void;
19
20
  setSelectedLensId: (lensId: string) => void;
@@ -67,6 +68,7 @@ declare type Actions = {
67
68
  getStyle: () => TStyle | undefined;
68
69
  setOnSaveFunction: (onSaveFunction: (dashboard: TDashboard) => void) => void;
69
70
  setOnAddCard: (onAddCard: (card: TCard, sheetId: string) => void) => void;
71
+ setOnAcceptChanges: (onAcceptChanges: (frame: TFrame, dashboard: TDashboard) => void) => void;
70
72
  setOnUpdateCard: (onUpdateCard: (card: TCard, sheetId: string) => void) => void;
71
73
  setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
72
74
  setOnEvent: (onEvent: (event: TEvent) => void) => void;
@@ -95,6 +97,7 @@ declare type Actions_2 = {
95
97
  setQueryError: (error: string) => void;
96
98
  setRunSql: (runSql: boolean) => void;
97
99
  setCardPreferences: (preferences: TCardPreferences) => void;
100
+ setCustomCardPreferences: (customPreferences: TCustomCardPreferences) => void;
98
101
  setFilterOnClickField: (field: string) => void;
99
102
  setFilterOnClickColumnIndex: (index: number) => void;
100
103
  setIsSqlRunning: (isSqlRunning: boolean) => void;
@@ -250,6 +253,7 @@ export declare type DashboardStore = {
250
253
  onEvent?: (event: TEvent) => void;
251
254
  onSaveFunction?: (dashboard: TDashboard) => void;
252
255
  onAddFrame?: (card: TFrame, sheetId: string) => void;
256
+ onAcceptChanges?: (frame: TFrame, dashboard: TDashboard) => void;
253
257
  onUpdateCard?: (card: TCard, sheetId: string) => void;
254
258
  onRemoveCard?: (card: TCard, sheetId: string) => void;
255
259
  actions: Actions;
@@ -505,6 +509,7 @@ export declare type TCard = {
505
509
  id: string;
506
510
  title: string;
507
511
  tabTitle?: string;
512
+ displayTab?: boolean;
508
513
  description?: string;
509
514
  info?: string;
510
515
  connectionId?: string;
@@ -516,6 +521,7 @@ export declare type TCard = {
516
521
  cfg?: any;
517
522
  customCfg?: any;
518
523
  preferences?: TCardPreferences;
524
+ customCardPreferences?: TCustomCardPreferences;
519
525
  lastSelectedDatabase?: string;
520
526
  lastSelectedDatamodelId?: string;
521
527
  lastSelectedSchema?: string;
@@ -587,6 +593,23 @@ export declare type TColumnSetting<T extends DisplayDataType> = {
587
593
  options: OptionsMap[T];
588
594
  };
589
595
 
596
+ export declare type TCustomCardPreferences = {
597
+ url: string;
598
+ componentName: string;
599
+ type?: 'iframe' | 'component';
600
+ visualType?: 'single' | 'multiple';
601
+ settings?: any;
602
+ dataInputCardIds?: {
603
+ [key: number]: {
604
+ cardId: string;
605
+ };
606
+ };
607
+ inputData?: {
608
+ cardId: string;
609
+ data: Record<string, any>[];
610
+ }[];
611
+ };
612
+
590
613
  export declare type TDashboard = {
591
614
  id: string;
592
615
  title?: string;
@@ -786,6 +809,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
786
809
  id: string;
787
810
  title: string;
788
811
  tabTitle?: string | undefined;
812
+ displayTab?: boolean | undefined;
789
813
  description?: string | undefined;
790
814
  info?: string | undefined;
791
815
  connectionId?: string | undefined;
@@ -919,6 +943,24 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
919
943
  isDynamicText?: boolean | undefined;
920
944
  } | undefined;
921
945
  } | undefined;
946
+ customCardPreferences?: {
947
+ url: string;
948
+ componentName: string;
949
+ type?: "iframe" | "component" | undefined;
950
+ visualType?: "single" | "multiple" | undefined;
951
+ settings?: any;
952
+ dataInputCardIds?: {
953
+ [x: number]: {
954
+ cardId: string;
955
+ };
956
+ } | undefined;
957
+ inputData?: {
958
+ cardId: string;
959
+ data: {
960
+ [x: string]: any;
961
+ }[];
962
+ }[] | undefined;
963
+ } | undefined;
922
964
  lastSelectedDatabase?: string | undefined;
923
965
  lastSelectedDatamodelId?: string | undefined;
924
966
  lastSelectedSchema?: string | undefined;
@@ -973,6 +1015,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
973
1015
  id: string;
974
1016
  title: string;
975
1017
  tabTitle?: string | undefined;
1018
+ displayTab?: boolean | undefined;
976
1019
  description?: string | undefined;
977
1020
  info?: string | undefined;
978
1021
  connectionId?: string | undefined;
@@ -1106,6 +1149,24 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1106
1149
  isDynamicText?: boolean | undefined;
1107
1150
  } | undefined;
1108
1151
  } | undefined;
1152
+ customCardPreferences?: {
1153
+ url: string;
1154
+ componentName: string;
1155
+ type?: "iframe" | "component" | undefined;
1156
+ visualType?: "single" | "multiple" | undefined;
1157
+ settings?: any;
1158
+ dataInputCardIds?: {
1159
+ [x: number]: {
1160
+ cardId: string;
1161
+ };
1162
+ } | undefined;
1163
+ inputData?: {
1164
+ cardId: string;
1165
+ data: {
1166
+ [x: string]: any;
1167
+ }[];
1168
+ }[] | undefined;
1169
+ } | undefined;
1109
1170
  lastSelectedDatabase?: string | undefined;
1110
1171
  lastSelectedDatamodelId?: string | undefined;
1111
1172
  lastSelectedSchema?: string | undefined;
@@ -1119,6 +1180,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1119
1180
  id: string;
1120
1181
  title: string;
1121
1182
  tabTitle?: string | undefined;
1183
+ displayTab?: boolean | undefined;
1122
1184
  description?: string | undefined;
1123
1185
  info?: string | undefined;
1124
1186
  connectionId?: string | undefined;
@@ -1252,6 +1314,24 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1252
1314
  isDynamicText?: boolean | undefined;
1253
1315
  } | undefined;
1254
1316
  } | undefined;
1317
+ customCardPreferences?: {
1318
+ url: string;
1319
+ componentName: string;
1320
+ type?: "iframe" | "component" | undefined;
1321
+ visualType?: "single" | "multiple" | undefined;
1322
+ settings?: any;
1323
+ dataInputCardIds?: {
1324
+ [x: number]: {
1325
+ cardId: string;
1326
+ };
1327
+ } | undefined;
1328
+ inputData?: {
1329
+ cardId: string;
1330
+ data: {
1331
+ [x: string]: any;
1332
+ }[];
1333
+ }[] | undefined;
1334
+ } | undefined;
1255
1335
  lastSelectedDatabase?: string | undefined;
1256
1336
  lastSelectedDatamodelId?: string | undefined;
1257
1337
  lastSelectedSchema?: string | undefined;
@@ -1420,6 +1500,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1420
1500
  id: string;
1421
1501
  title: string;
1422
1502
  tabTitle?: string | undefined;
1503
+ displayTab?: boolean | undefined;
1423
1504
  description?: string | undefined;
1424
1505
  info?: string | undefined;
1425
1506
  connectionId?: string | undefined;
@@ -1553,6 +1634,24 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1553
1634
  isDynamicText?: boolean | undefined;
1554
1635
  } | undefined;
1555
1636
  } | undefined;
1637
+ customCardPreferences?: {
1638
+ url: string;
1639
+ componentName: string;
1640
+ type?: "iframe" | "component" | undefined;
1641
+ visualType?: "single" | "multiple" | undefined;
1642
+ settings?: any;
1643
+ dataInputCardIds?: {
1644
+ [x: number]: {
1645
+ cardId: string;
1646
+ };
1647
+ } | undefined;
1648
+ inputData?: {
1649
+ cardId: string;
1650
+ data: {
1651
+ [x: string]: any;
1652
+ }[];
1653
+ }[] | undefined;
1654
+ } | undefined;
1556
1655
  lastSelectedDatabase?: string | undefined;
1557
1656
  lastSelectedDatamodelId?: string | undefined;
1558
1657
  lastSelectedSchema?: string | undefined;
@@ -1616,9 +1715,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1616
1715
  onEvent?: ((event: TEvent) => void) | undefined;
1617
1716
  onSaveFunction?: ((dashboard: TDashboard) => void) | undefined;
1618
1717
  onAddFrame?: ((card: TFrame, sheetId: string) => void) | undefined;
1718
+ onAcceptChanges?: ((frame: TFrame, dashboard: TDashboard) => void) | undefined;
1619
1719
  onUpdateCard?: ((card: TCard, sheetId: string) => void) | undefined;
1620
1720
  onRemoveCard?: ((card: TCard, sheetId: string) => void) | undefined;
1621
1721
  actions: {
1722
+ setInitStore: () => void;
1622
1723
  setGlobalStyle: (style: TStyle) => void;
1623
1724
  setLenses: (lenses: TLens[]) => void;
1624
1725
  setSelectedLensId: (lensId: string) => void;
@@ -1672,6 +1773,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
1672
1773
  getStyle: () => TStyle | undefined;
1673
1774
  setOnSaveFunction: (onSaveFunction: (dashboard: TDashboard) => void) => void;
1674
1775
  setOnAddCard: (onAddCard: (card: TCard, sheetId: string) => void) => void;
1776
+ setOnAcceptChanges: (onAcceptChanges: (frame: TFrame, dashboard: TDashboard) => void) => void;
1675
1777
  setOnUpdateCard: (onUpdateCard: (card: TCard, sheetId: string) => void) => void;
1676
1778
  setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
1677
1779
  setOnEvent: (onEvent: (event: TEvent) => void) => void;
@@ -1738,6 +1840,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1738
1840
  setQueryError: (error: string) => void;
1739
1841
  setRunSql: (runSql: boolean) => void;
1740
1842
  setCardPreferences: (preferences: TCardPreferences) => void;
1843
+ setCustomCardPreferences: (customPreferences: TCustomCardPreferences) => void;
1741
1844
  setFilterOnClickField: (field: string) => void;
1742
1845
  setFilterOnClickColumnIndex: (index: number) => void;
1743
1846
  setIsSqlRunning: (isSqlRunning: boolean) => void;
@@ -1784,6 +1887,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1784
1887
  id: string;
1785
1888
  title: string;
1786
1889
  tabTitle?: string | undefined;
1890
+ displayTab?: boolean | undefined;
1787
1891
  description?: string | undefined;
1788
1892
  info?: string | undefined;
1789
1893
  connectionId?: string | undefined;
@@ -1917,6 +2021,24 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1917
2021
  isDynamicText?: boolean | undefined;
1918
2022
  } | undefined;
1919
2023
  } | undefined;
2024
+ customCardPreferences?: {
2025
+ url: string;
2026
+ componentName: string;
2027
+ type?: "iframe" | "component" | undefined;
2028
+ visualType?: "single" | "multiple" | undefined;
2029
+ settings?: any;
2030
+ dataInputCardIds?: {
2031
+ [x: number]: {
2032
+ cardId: string;
2033
+ };
2034
+ } | undefined;
2035
+ inputData?: {
2036
+ cardId: string;
2037
+ data: {
2038
+ [x: string]: any;
2039
+ }[];
2040
+ }[] | undefined;
2041
+ } | undefined;
1920
2042
  lastSelectedDatabase?: string | undefined;
1921
2043
  lastSelectedDatamodelId?: string | undefined;
1922
2044
  lastSelectedSchema?: string | undefined;
@@ -1929,6 +2051,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1929
2051
  id: string;
1930
2052
  title: string;
1931
2053
  tabTitle?: string | undefined;
2054
+ displayTab?: boolean | undefined;
1932
2055
  description?: string | undefined;
1933
2056
  info?: string | undefined;
1934
2057
  connectionId?: string | undefined;
@@ -2062,6 +2185,24 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
2062
2185
  isDynamicText?: boolean | undefined;
2063
2186
  } | undefined;
2064
2187
  } | undefined;
2188
+ customCardPreferences?: {
2189
+ url: string;
2190
+ componentName: string;
2191
+ type?: "iframe" | "component" | undefined;
2192
+ visualType?: "single" | "multiple" | undefined;
2193
+ settings?: any;
2194
+ dataInputCardIds?: {
2195
+ [x: number]: {
2196
+ cardId: string;
2197
+ };
2198
+ } | undefined;
2199
+ inputData?: {
2200
+ cardId: string;
2201
+ data: {
2202
+ [x: string]: any;
2203
+ }[];
2204
+ }[] | undefined;
2205
+ } | undefined;
2065
2206
  lastSelectedDatabase?: string | undefined;
2066
2207
  lastSelectedDatamodelId?: string | undefined;
2067
2208
  lastSelectedSchema?: string | undefined;
@@ -235,6 +235,7 @@ export declare type TCard = {
235
235
  id: string;
236
236
  title: string;
237
237
  tabTitle?: string;
238
+ displayTab?: boolean;
238
239
  description?: string;
239
240
  info?: string;
240
241
  connectionId?: string;
@@ -246,6 +247,7 @@ export declare type TCard = {
246
247
  cfg?: any;
247
248
  customCfg?: any;
248
249
  preferences?: TCardPreferences;
250
+ customCardPreferences?: TCustomCardPreferences;
249
251
  lastSelectedDatabase?: string;
250
252
  lastSelectedDatamodelId?: string;
251
253
  lastSelectedSchema?: string;
@@ -315,6 +317,23 @@ export declare type TColumnSetting<T extends DisplayDataType> = {
315
317
  options: OptionsMap[T];
316
318
  };
317
319
 
320
+ export declare type TCustomCardPreferences = {
321
+ url: string;
322
+ componentName: string;
323
+ type?: 'iframe' | 'component';
324
+ visualType?: 'single' | 'multiple';
325
+ settings?: any;
326
+ dataInputCardIds?: {
327
+ [key: number]: {
328
+ cardId: string;
329
+ };
330
+ };
331
+ inputData?: {
332
+ cardId: string;
333
+ data: Record<string, any>[];
334
+ }[];
335
+ };
336
+
318
337
  export declare type TDashboard = {
319
338
  id: string;
320
339
  title?: string;
@@ -227,6 +227,7 @@ export declare type TCard = {
227
227
  id: string;
228
228
  title: string;
229
229
  tabTitle?: string;
230
+ displayTab?: boolean;
230
231
  description?: string;
231
232
  info?: string;
232
233
  connectionId?: string;
@@ -238,6 +239,7 @@ export declare type TCard = {
238
239
  cfg?: any;
239
240
  customCfg?: any;
240
241
  preferences?: TCardPreferences;
242
+ customCardPreferences?: TCustomCardPreferences;
241
243
  lastSelectedDatabase?: string;
242
244
  lastSelectedDatamodelId?: string;
243
245
  lastSelectedSchema?: string;
@@ -307,6 +309,23 @@ export declare type TColumnSetting<T extends DisplayDataType> = {
307
309
  options: OptionsMap[T];
308
310
  };
309
311
 
312
+ export declare type TCustomCardPreferences = {
313
+ url: string;
314
+ componentName: string;
315
+ type?: 'iframe' | 'component';
316
+ visualType?: 'single' | 'multiple';
317
+ settings?: any;
318
+ dataInputCardIds?: {
319
+ [key: number]: {
320
+ cardId: string;
321
+ };
322
+ };
323
+ inputData?: {
324
+ cardId: string;
325
+ data: Record<string, any>[];
326
+ }[];
327
+ };
328
+
310
329
  export declare type TDashboard = {
311
330
  id: string;
312
331
  title?: 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.64",
8
+ "version": "0.0.65",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",
@@ -83,7 +83,7 @@
83
83
  "immer": "^10.0.3",
84
84
  "jwt-decode": "^4.0.0",
85
85
  "lodash": "^4.17.21",
86
- "lucide-react": "^0.379.0",
86
+ "lucide-react": "^0.453.0",
87
87
  "ms": "^2.1.3",
88
88
  "next-themes": "^0.3.0",
89
89
  "react": "^18.2.0",