semaphor 0.0.24 → 0.0.26

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,17 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  /// <reference types="react-grid-layout" />
3
3
 
4
- import { BubbleDataPoint } from 'chart.js';
5
- import { Chart as Chart_2 } from 'chart.js';
6
- import { ChartConfiguration } from 'chart.js';
7
- import { ChartTypeRegistry } from 'chart.js';
8
4
  import { Draft } from 'immer';
9
5
  import { FC } from 'react';
10
6
  import { FontSpec } from 'chart.js';
11
7
  import { JSX as JSX_2 } from 'react/jsx-runtime';
12
8
  import { Layout } from 'react-grid-layout';
13
- import { Point } from 'chart.js';
14
- import { default as React_2 } from 'react';
15
9
  import { StoreApi } from 'zustand';
16
10
  import { UseBoundStore } from 'zustand';
17
11
 
@@ -21,26 +15,23 @@ declare type Actions = {
21
15
  setCustomCards: (customCards: CustomCard[]) => void;
22
16
  setAuthToken: (authToken: AuthToken) => void;
23
17
  setThemeStyle: (themeStyle: StyleProps) => void;
24
- setIsEditorSaveEvent: (isEditorSaveEvent: boolean) => void;
25
18
  setBookmarkKey: (bookmarkKey: string) => void;
26
19
  setDashboard: (dashboard: TDashboard) => void;
27
20
  setDashboardTheme: (theme: 'light' | 'dark' | 'system') => void;
28
- setDashboardTitle: (title: string) => void;
29
- setDashboardDescription: (description: string) => void;
30
21
  setSheets: (sheets: TSheet[]) => void;
31
- setSheetTitle: (sheetId: string, title: string) => void;
32
- setSheetDescription: (sheetId: string, description: string) => void;
33
22
  setSelectedSheetId: (sheetId: string | null) => void;
34
23
  setSheetLayout: (sheetId: string, layout: ReactGridLayout.Layout[]) => void;
35
- setCards: (sheetId: string, cards: TCard[]) => void;
36
24
  setSelectedCardId: (sheetId: string, cardId: string | null) => void;
37
- setSelectedCard: (card: TCard | null) => void;
25
+ setSelectedFrameId: (frameId: string) => void;
38
26
  setCardTitle: (sheetId: string, cardId: string, title: string) => void;
39
27
  setCardSql: (sheetId: string, cardId: string, sql: string) => void;
40
28
  setCardDescription: (sheetId: string, cardId: string, description: string) => void;
41
- setCardData: (sheetId: string, cardId: string, data: any[]) => void;
42
- addCard: (sheetId: string, card: TCard) => void;
29
+ setFrameCardData: (sheetId: string, cardId: string, data: any[]) => void;
30
+ addFrame: (sheetId: string, frame: TFrame) => void;
31
+ updateFrame: (sheetId: string, frame: TFrame) => void;
43
32
  updateCard: (sheetId: string, card: TCard) => void;
33
+ updateFrameCard?: (sheetId: string, frameId: string, card: TCard) => void;
34
+ removeFrame: (sheetId: string, frameId: string) => void;
44
35
  removeCard: (sheetId: string, card: TCard) => void;
45
36
  setIsDashboardEditing: (editing: boolean) => void;
46
37
  setShowContext: (show: boolean) => void;
@@ -63,9 +54,8 @@ declare type Actions = {
63
54
  setOnEvent: (onEvent: (event: TEvent) => void) => void;
64
55
  getDashboard: () => TDashboard | undefined;
65
56
  getSelectedSheet: () => TSheet | undefined;
66
- getSelectedSheetCards: () => TCard[] | undefined;
67
57
  getCard: (cardId: string) => TCard | undefined;
68
- getSelectedCard: () => TCard | undefined;
58
+ getSelectedFrame: () => TFrame | undefined;
69
59
  getSelectedSheetLayout: () => ReactGridLayout.Layout[] | undefined;
70
60
  handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
71
61
  };
@@ -79,6 +69,7 @@ declare type Actions_2 = {
79
69
  setFilterOnClickField: (field: string) => void;
80
70
  setIsSqlRunning: (isSqlRunning: boolean) => void;
81
71
  setCard: (card: TCard) => void;
72
+ setFrame: (frame: TFrame) => void;
82
73
  setSqlGen: (sqlGen: SqlGen) => void;
83
74
  setSqlGenMeasure: (name: string, calc: AggregateCalc) => void;
84
75
  setSqlGenDimension: (dimension: string) => void;
@@ -99,11 +90,11 @@ declare type Actions_2 = {
99
90
  setOnDatabaseChange: (onDatabaseChange: (databaseName: string) => void) => void;
100
91
  setOnSchemaChange: (onSchemaChange: (schemaName: string) => void) => void;
101
92
  setOnTableChange: (onTableChange: (tableNmae: string) => void) => void;
102
- setOnSave: (onSave: (card: TCard) => void) => void;
93
+ setOnSave: (onSave: (card: TFrame) => void) => void;
103
94
  setOnClose: (onClose: () => void) => void;
104
95
  };
105
96
 
106
- declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
97
+ export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
107
98
 
108
99
  export declare type AuthToken = {
109
100
  accessToken: string;
@@ -130,6 +121,8 @@ export declare type Bookmark = {
130
121
  filterValues?: TFilterValue[];
131
122
  };
132
123
 
124
+ export declare const BOOLEAN_DATA_TYPES: string[];
125
+
133
126
  declare type CardWithContent = BaseCustomCard & {
134
127
  content: React.FC<{
135
128
  card: TCard;
@@ -150,19 +143,12 @@ declare type CardWithFooter = BaseCustomCard & {
150
143
 
151
144
  export declare function cleanCard(card: TCard): TCard;
152
145
 
146
+ export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
147
+
153
148
  export declare type CustomCard = CardWithContent | CardWithFooter;
154
149
 
155
150
  export declare function Dashboard(props: DashboardProps): JSX_2.Element;
156
151
 
157
- export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
158
-
159
- declare type DashboardCardProps = {
160
- card: TCard;
161
- footer?: React_2.ReactNode;
162
- showControls?: boolean;
163
- fetchCardData?: boolean;
164
- } & React_2.HTMLAttributes<HTMLDivElement>;
165
-
166
152
  export declare function DashboardPlus({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
167
153
 
168
154
  declare type DashboardPlusProps = {
@@ -196,6 +182,7 @@ export declare type DashboardStore = {
196
182
  bookmarkKey?: string;
197
183
  dashboard: TDashboard;
198
184
  selectedSheetId?: string | null | undefined;
185
+ selectedFrameId?: string | null;
199
186
  selectedCardId?: string | null;
200
187
  selectedCard?: TCard | null;
201
188
  isDashboardEditing: boolean;
@@ -204,10 +191,9 @@ export declare type DashboardStore = {
204
191
  showDashboardJSON: boolean;
205
192
  showFilters: boolean;
206
193
  filterValues?: TFilterValue[];
207
- isEditorSaveEvent: boolean;
208
194
  onEvent?: (event: TEvent) => void;
209
195
  onSaveFunction?: (dashboard: TDashboard) => void;
210
- onAddCard?: (card: TCard, sheetId: string) => void;
196
+ onAddFrame?: (card: TFrame, sheetId: string) => void;
211
197
  onUpdateCard?: (card: TCard, sheetId: string) => void;
212
198
  onRemoveCard?: (card: TCard, sheetId: string) => void;
213
199
  actions: Actions;
@@ -215,12 +201,15 @@ export declare type DashboardStore = {
215
201
 
216
202
  export declare const DashboardWC: CustomElementConstructor;
217
203
 
204
+ export declare const DATE_DATA_TYPES: string[];
205
+
218
206
  declare type EditorStore = {
219
207
  isShowingVisual: boolean;
220
208
  runSql: boolean;
221
209
  isSqlRunning: boolean;
222
210
  actions: Actions_2;
223
211
  sqlGen: SqlGen;
212
+ frame: TFrame;
224
213
  card: TCard;
225
214
  showFilters: boolean;
226
215
  applyFilters: boolean;
@@ -234,7 +223,7 @@ declare type EditorStore = {
234
223
  onDatabaseChange?: (databaseName: string) => void;
235
224
  onTableChange?: (tableName: string) => void;
236
225
  onSchemaChange?: (schemaName: string) => void;
237
- onSave?: (card: TCard) => void;
226
+ onSave?: (card: TFrame) => void;
238
227
  onClose?: () => void;
239
228
  };
240
229
 
@@ -272,15 +261,24 @@ declare type FilterForString = BaseFilter & {
272
261
  values: [string];
273
262
  };
274
263
 
264
+ export declare function fmt(str: string): string;
265
+
275
266
  export declare function getBookmarkKey(dashboardId: string): string;
276
267
 
268
+ export declare function getColumnDataType(column: TDataColumn): string;
269
+
277
270
  export declare function getDashbaordStateWithoutData(dashboardState: TDashboard): {
278
271
  sheets: {
279
- cards: TCard[] | undefined;
272
+ frames: {
273
+ cards: TCard[];
274
+ id: string;
275
+ activeCardId: string;
276
+ }[] | undefined;
280
277
  id: string;
281
278
  title?: string | undefined;
282
279
  description?: string | undefined;
283
280
  layout?: Layout[] | undefined;
281
+ cards?: TCard[] | undefined;
284
282
  }[] | undefined;
285
283
  id: string;
286
284
  title?: string | undefined;
@@ -290,11 +288,41 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
290
288
  customCards?: CustomCard[] | undefined;
291
289
  };
292
290
 
291
+ export declare function getFilterValueType(filter: TFilter): "string" | "number" | "date" | "boolean";
292
+
293
+ export declare function getQualifiedTableName(schemaName: string, tableName: string): string;
294
+
295
+ export declare function getSql(config: SqlGen, schemaName: string, tableName: string): string | undefined;
296
+
297
+ export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
298
+
293
299
  export declare type LoadingProps = {
294
300
  message?: string;
295
301
  };
296
302
 
297
- declare type SqlGen = {
303
+ export declare const NUMBER_DATA_TYPES: string[];
304
+
305
+ export declare const resolveDataType: (value: any) => string;
306
+
307
+ export declare function SelectComponent({ title, items, value, isLoading, isError, onChange, }: SelectProps): JSX_2.Element;
308
+
309
+ declare type SelectProps = {
310
+ title: string;
311
+ items: {
312
+ id: string;
313
+ name: string;
314
+ }[];
315
+ value: string;
316
+ isLoading: boolean;
317
+ isError: boolean;
318
+ onChange?: (value: string) => void;
319
+ };
320
+
321
+ export declare function SemaphorQueryClient({ children, }: {
322
+ children: React.ReactNode;
323
+ }): JSX_2.Element;
324
+
325
+ export declare type SqlGen = {
298
326
  measures?: {
299
327
  name: string;
300
328
  calc: AggregateCalc;
@@ -339,7 +367,6 @@ export declare type TCard = {
339
367
  sql?: string;
340
368
  data?: any[];
341
369
  cfg?: any;
342
- childCards?: any[];
343
370
  customCfg?: any;
344
371
  preferences?: TCardPreferences;
345
372
  lastSelectedDatabase?: string;
@@ -367,8 +394,6 @@ export declare type TCardPreferences = {
367
394
  };
368
395
  };
369
396
 
370
- declare type TChartConfiguration = ChartConfiguration;
371
-
372
397
  declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'custom';
373
398
 
374
399
  export declare type TDashboard = {
@@ -381,7 +406,7 @@ export declare type TDashboard = {
381
406
  customCards?: CustomCard[];
382
407
  };
383
408
 
384
- declare type TDataColumn = {
409
+ export declare type TDataColumn = {
385
410
  column_name: string;
386
411
  data_type: string;
387
412
  is_nullable?: string;
@@ -392,6 +417,8 @@ export declare type TEvent = {
392
417
  message: any;
393
418
  };
394
419
 
420
+ export declare const TEXT_DATA_TYPES: string[];
421
+
395
422
  declare type TFilter = {
396
423
  id: string;
397
424
  connectionId: string;
@@ -405,12 +432,19 @@ declare type TFilter = {
405
432
 
406
433
  declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
407
434
 
435
+ export declare type TFrame = {
436
+ id: string;
437
+ cards: TCard[];
438
+ activeCardId: string;
439
+ };
440
+
408
441
  export declare type TSheet = {
409
442
  id: string;
410
443
  title?: string;
411
444
  description?: string;
412
445
  layout?: ReactGridLayout.Layout[];
413
446
  cards?: TCard[];
447
+ frames?: TFrame[];
414
448
  };
415
449
 
416
450
  /**
@@ -422,7 +456,6 @@ export declare type TStyle = {
422
456
  };
423
457
 
424
458
  export declare function useActions(): {
425
- setDashboardTitle: (title: string) => void;
426
459
  getStyle: () => TStyle | undefined;
427
460
  getDashboard: () => TDashboard | undefined;
428
461
  setOnSaveFunction: (onSaveFunction: (dashboard: TDashboard) => void) => void;
@@ -431,17 +464,6 @@ export declare function useActions(): {
431
464
  setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
432
465
  };
433
466
 
434
- export declare function useCard(cardId: string): {
435
- data: any;
436
- card: TCard;
437
- isError: boolean;
438
- isLoading: boolean;
439
- isFetching: boolean;
440
- visualKey: number;
441
- handleDatapointClick: (chart: Chart_2<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint | null)[], unknown>, datasetIndex: number, clickIndex: number, value: number) => void;
442
- cfg: TChartConfiguration | undefined;
443
- };
444
-
445
467
  export declare function useDashboard({ id, version, authToken, customStyle, currentTheme, onSave, onEvent, }: UseDashboardProps): {
446
468
  isLoading: boolean;
447
469
  isError: boolean;
@@ -497,7 +519,6 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
497
519
  sql?: string | undefined;
498
520
  data?: any[] | undefined;
499
521
  cfg?: any;
500
- childCards?: any[] | undefined;
501
522
  customCfg?: any;
502
523
  preferences?: {
503
524
  filterOnClick?: boolean | undefined;
@@ -550,7 +571,6 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
550
571
  sql?: string | undefined;
551
572
  data?: any[] | undefined;
552
573
  cfg?: any;
553
- childCards?: any[] | undefined;
554
574
  customCfg?: any;
555
575
  preferences?: {
556
576
  filterOnClick?: boolean | undefined;
@@ -568,6 +588,36 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
568
588
  lastSelectedTable?: string | undefined;
569
589
  refreshInterval?: string | undefined;
570
590
  }[] | undefined;
591
+ frames?: {
592
+ id: string;
593
+ cards: {
594
+ id: string;
595
+ title: string;
596
+ description?: string | undefined;
597
+ connectionId?: string | undefined;
598
+ type: TChartType;
599
+ sql?: string | undefined;
600
+ data?: any[] | undefined;
601
+ cfg?: any;
602
+ customCfg?: any;
603
+ preferences?: {
604
+ filterOnClick?: boolean | undefined;
605
+ filterOnClickField?: string | undefined;
606
+ formatNumber?: {
607
+ format?: string | undefined;
608
+ currency?: string | undefined;
609
+ locale?: string | undefined;
610
+ suffix?: string | undefined;
611
+ enabled?: string | boolean | undefined;
612
+ } | undefined;
613
+ } | undefined;
614
+ lastSelectedDatabase?: string | undefined;
615
+ lastSelectedSchema?: string | undefined;
616
+ lastSelectedTable?: string | undefined;
617
+ refreshInterval?: string | undefined;
618
+ }[];
619
+ activeCardId: string;
620
+ }[] | undefined;
571
621
  }[] | undefined;
572
622
  style?: {
573
623
  default: {
@@ -644,6 +694,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
644
694
  })[] | undefined;
645
695
  };
646
696
  selectedSheetId?: string | null | undefined;
697
+ selectedFrameId?: string | null | undefined;
647
698
  selectedCardId?: string | null | undefined;
648
699
  selectedCard?: {
649
700
  id: string;
@@ -654,7 +705,6 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
654
705
  sql?: string | undefined;
655
706
  data?: any[] | undefined;
656
707
  cfg?: any;
657
- childCards?: any[] | undefined;
658
708
  customCfg?: any;
659
709
  preferences?: {
660
710
  filterOnClick?: boolean | undefined;
@@ -726,10 +776,9 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
726
776
  operation: "in" | "not in";
727
777
  values: (string | number)[];
728
778
  })[] | undefined;
729
- isEditorSaveEvent: boolean;
730
779
  onEvent?: ((event: TEvent) => void) | undefined;
731
780
  onSaveFunction?: ((dashboard: TDashboard) => void) | undefined;
732
- onAddCard?: ((card: TCard, sheetId: string) => void) | undefined;
781
+ onAddFrame?: ((card: TFrame, sheetId: string) => void) | undefined;
733
782
  onUpdateCard?: ((card: TCard, sheetId: string) => void) | undefined;
734
783
  onRemoveCard?: ((card: TCard, sheetId: string) => void) | undefined;
735
784
  actions: {
@@ -738,26 +787,23 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
738
787
  setCustomCards: (customCards: CustomCard[]) => void;
739
788
  setAuthToken: (authToken: AuthToken) => void;
740
789
  setThemeStyle: (themeStyle: StyleProps) => void;
741
- setIsEditorSaveEvent: (isEditorSaveEvent: boolean) => void;
742
790
  setBookmarkKey: (bookmarkKey: string) => void;
743
791
  setDashboard: (dashboard: TDashboard) => void;
744
792
  setDashboardTheme: (theme: 'light' | 'dark' | 'system') => void;
745
- setDashboardTitle: (title: string) => void;
746
- setDashboardDescription: (description: string) => void;
747
793
  setSheets: (sheets: TSheet[]) => void;
748
- setSheetTitle: (sheetId: string, title: string) => void;
749
- setSheetDescription: (sheetId: string, description: string) => void;
750
794
  setSelectedSheetId: (sheetId: string | null) => void;
751
795
  setSheetLayout: (sheetId: string, layout: ReactGridLayout.Layout[]) => void;
752
- setCards: (sheetId: string, cards: TCard[]) => void;
753
796
  setSelectedCardId: (sheetId: string, cardId: string | null) => void;
754
- setSelectedCard: (card: TCard | null) => void;
797
+ setSelectedFrameId: (frameId: string) => void;
755
798
  setCardTitle: (sheetId: string, cardId: string, title: string) => void;
756
799
  setCardSql: (sheetId: string, cardId: string, sql: string) => void;
757
800
  setCardDescription: (sheetId: string, cardId: string, description: string) => void;
758
- setCardData: (sheetId: string, cardId: string, data: any[]) => void;
759
- addCard: (sheetId: string, card: TCard) => void;
801
+ setFrameCardData: (sheetId: string, cardId: string, data: any[]) => void;
802
+ addFrame: (sheetId: string, frame: TFrame) => void;
803
+ updateFrame: (sheetId: string, frame: TFrame) => void;
760
804
  updateCard: (sheetId: string, card: TCard) => void;
805
+ updateFrameCard?: ((sheetId: string, frameId: string, card: TCard) => void) | undefined;
806
+ removeFrame: (sheetId: string, frameId: string) => void;
761
807
  removeCard: (sheetId: string, card: TCard) => void;
762
808
  setIsDashboardEditing: (editing: boolean) => void;
763
809
  setShowContext: (show: boolean) => void;
@@ -780,9 +826,8 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
780
826
  setOnEvent: (onEvent: (event: TEvent) => void) => void;
781
827
  getDashboard: () => TDashboard | undefined;
782
828
  getSelectedSheet: () => TSheet | undefined;
783
- getSelectedSheetCards: () => TCard[] | undefined;
784
829
  getCard: (cardId: string) => TCard | undefined;
785
- getSelectedCard: () => TCard | undefined;
830
+ getSelectedFrame: () => TFrame | undefined;
786
831
  getSelectedSheetLayout: () => ReactGridLayout.Layout[] | undefined;
787
832
  handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
788
833
  };
@@ -791,6 +836,30 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
791
836
 
792
837
  export declare const useEditorActions: () => Actions_2;
793
838
 
839
+ export declare function useEditorAside(token?: AuthToken, connectionQueryKey?: string): {
840
+ connectionItems: any;
841
+ isConnectionsLoading: boolean;
842
+ isConnectionsError: boolean;
843
+ databaseItems: any;
844
+ isDatabasesLoadingOrFetching: boolean;
845
+ isDatabaseError: boolean;
846
+ schemaItems: any;
847
+ isSchemaLoadingOrFetching: boolean;
848
+ isSchemaError: boolean;
849
+ tableItems: any;
850
+ isTableLoadingOrFetching: boolean;
851
+ isTableError: boolean;
852
+ columns: TDataColumn[];
853
+ isColumnsLoadingOrFetching: boolean;
854
+ isColumnsError: boolean;
855
+ isAPIConnection: boolean;
856
+ tableName: string;
857
+ schemaName: string;
858
+ handleConnectionChange: (value: string) => void;
859
+ handleDatabaseChange: (value: string) => void;
860
+ handleSchemaChange: (value: string) => void;
861
+ };
862
+
794
863
  export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "setState"> & {
795
864
  setState(nextStateOrUpdater: EditorStore | Partial<EditorStore> | ((state: {
796
865
  isShowingVisual: boolean;
@@ -805,6 +874,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
805
874
  setFilterOnClickField: (field: string) => void;
806
875
  setIsSqlRunning: (isSqlRunning: boolean) => void;
807
876
  setCard: (card: TCard) => void;
877
+ setFrame: (frame: TFrame) => void;
808
878
  setSqlGen: (sqlGen: SqlGen) => void;
809
879
  setSqlGenMeasure: (name: string, calc: AggregateCalc) => void;
810
880
  setSqlGenDimension: (dimension: string) => void;
@@ -825,7 +895,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
825
895
  setOnDatabaseChange: (onDatabaseChange: (databaseName: string) => void) => void;
826
896
  setOnSchemaChange: (onSchemaChange: (schemaName: string) => void) => void;
827
897
  setOnTableChange: (onTableChange: (tableNmae: string) => void) => void;
828
- setOnSave: (onSave: (card: TCard) => void) => void;
898
+ setOnSave: (onSave: (card: TFrame) => void) => void;
829
899
  setOnClose: (onClose: () => void) => void;
830
900
  };
831
901
  sqlGen: {
@@ -835,6 +905,36 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
835
905
  }[] | undefined;
836
906
  dimensions?: string[] | undefined;
837
907
  };
908
+ frame: {
909
+ id: string;
910
+ cards: {
911
+ id: string;
912
+ title: string;
913
+ description?: string | undefined;
914
+ connectionId?: string | undefined;
915
+ type: TChartType;
916
+ sql?: string | undefined;
917
+ data?: any[] | undefined;
918
+ cfg?: any;
919
+ customCfg?: any;
920
+ preferences?: {
921
+ filterOnClick?: boolean | undefined;
922
+ filterOnClickField?: string | undefined;
923
+ formatNumber?: {
924
+ format?: string | undefined;
925
+ currency?: string | undefined;
926
+ locale?: string | undefined;
927
+ suffix?: string | undefined;
928
+ enabled?: string | boolean | undefined;
929
+ } | undefined;
930
+ } | undefined;
931
+ lastSelectedDatabase?: string | undefined;
932
+ lastSelectedSchema?: string | undefined;
933
+ lastSelectedTable?: string | undefined;
934
+ refreshInterval?: string | undefined;
935
+ }[];
936
+ activeCardId: string;
937
+ };
838
938
  card: {
839
939
  id: string;
840
940
  title: string;
@@ -844,7 +944,6 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
844
944
  sql?: string | undefined;
845
945
  data?: any[] | undefined;
846
946
  cfg?: any;
847
- childCards?: any[] | undefined;
848
947
  customCfg?: any;
849
948
  preferences?: {
850
949
  filterOnClick?: boolean | undefined;
@@ -926,7 +1025,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
926
1025
  onDatabaseChange?: ((databaseName: string) => void) | undefined;
927
1026
  onTableChange?: ((tableName: string) => void) | undefined;
928
1027
  onSchemaChange?: ((schemaName: string) => void) | undefined;
929
- onSave?: ((card: TCard) => void) | undefined;
1028
+ onSave?: ((card: TFrame) => void) | undefined;
930
1029
  onClose?: (() => void) | undefined;
931
1030
  }) => void), shouldReplace?: boolean | undefined): void;
932
1031
  }>;