semaphor 0.0.38 → 0.0.39
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.
- package/dist/react-semaphor.d.ts +21 -0
- package/dist/react-semaphor.js +14179 -13880
- package/dist/react-semaphor.umd.cjs +131 -124
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ declare type Actions = {
|
|
|
35
35
|
setCardTitle: (sheetId: string, cardId: string, title: string) => void;
|
|
36
36
|
setCardInfo: (cardId: string, info: string) => void;
|
|
37
37
|
setCardSql: (sheetId: string, cardId: string, sql: string) => void;
|
|
38
|
+
setCardPython: (cardId: string, pythonCode: string) => void;
|
|
38
39
|
setCardDescription: (sheetId: string, cardId: string, description: string) => void;
|
|
39
40
|
setFrameCardData: (sheetId: string, cardId: string, data: any[]) => void;
|
|
40
41
|
addFrame: (sheetId: string, frame: TFrame) => void;
|
|
@@ -80,6 +81,7 @@ declare type Actions_2 = {
|
|
|
80
81
|
setNumberFormat: (format: string, currency: string, locale: string, suffix: string) => void;
|
|
81
82
|
setIsShowingVisual: (isShowingVisual: boolean) => void;
|
|
82
83
|
setQueryResultColumns: (columns: string[]) => void;
|
|
84
|
+
setQueryError: (error: string) => void;
|
|
83
85
|
setRunSql: (runSql: boolean) => void;
|
|
84
86
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
85
87
|
setFilterOnClickField: (field: string) => void;
|
|
@@ -92,6 +94,8 @@ declare type Actions_2 = {
|
|
|
92
94
|
setSqlGenDimension: (dimension: string) => void;
|
|
93
95
|
setCardType: (type: TChartType) => void;
|
|
94
96
|
setCardSql: (sql: string) => void;
|
|
97
|
+
setCardPython: (python: string) => void;
|
|
98
|
+
setPythonStdOut: (pythonStdOut: string) => void;
|
|
95
99
|
setCardData: (data: any[]) => void;
|
|
96
100
|
setCardCustomCfg: (cfg: any) => void;
|
|
97
101
|
setCardCfg: (cfg: any) => void;
|
|
@@ -241,6 +245,8 @@ declare type EditorStore = {
|
|
|
241
245
|
applyFilters: boolean;
|
|
242
246
|
filterValues?: TFilterValue[];
|
|
243
247
|
queryResultColumns: string[];
|
|
248
|
+
queryError?: string;
|
|
249
|
+
pythonStdOut?: string;
|
|
244
250
|
selectedConnectionId?: string;
|
|
245
251
|
selectedDatabaseName?: string;
|
|
246
252
|
selectedSchemaName?: string;
|
|
@@ -340,6 +346,8 @@ declare type Params = {
|
|
|
340
346
|
[key: string]: string | number | string[] | number[];
|
|
341
347
|
};
|
|
342
348
|
|
|
349
|
+
export declare const PYTHON_DEFAULT_CODE = "import pandas as pd\ndf = pd.DataFrame(data) # 'data' contains the query result\nresult = df.to_dict('records') # must return 'result' as [dict] type\n";
|
|
350
|
+
|
|
343
351
|
export declare const resolveDataType: (value: any) => string;
|
|
344
352
|
|
|
345
353
|
export declare function SelectComponent({ title, items, value, isLoading, isError, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
|
|
@@ -413,6 +421,7 @@ export declare type TCard = {
|
|
|
413
421
|
connectionId?: string;
|
|
414
422
|
type: TChartType;
|
|
415
423
|
sql?: string;
|
|
424
|
+
python?: string;
|
|
416
425
|
data?: any[];
|
|
417
426
|
cfg?: any;
|
|
418
427
|
customCfg?: any;
|
|
@@ -584,6 +593,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
584
593
|
connectionId?: string | undefined;
|
|
585
594
|
type: TChartType;
|
|
586
595
|
sql?: string | undefined;
|
|
596
|
+
python?: string | undefined;
|
|
587
597
|
data?: any[] | undefined;
|
|
588
598
|
cfg?: any;
|
|
589
599
|
customCfg?: any;
|
|
@@ -661,6 +671,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
661
671
|
connectionId?: string | undefined;
|
|
662
672
|
type: TChartType;
|
|
663
673
|
sql?: string | undefined;
|
|
674
|
+
python?: string | undefined;
|
|
664
675
|
data?: any[] | undefined;
|
|
665
676
|
cfg?: any;
|
|
666
677
|
customCfg?: any;
|
|
@@ -695,6 +706,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
695
706
|
connectionId?: string | undefined;
|
|
696
707
|
type: TChartType;
|
|
697
708
|
sql?: string | undefined;
|
|
709
|
+
python?: string | undefined;
|
|
698
710
|
data?: any[] | undefined;
|
|
699
711
|
cfg?: any;
|
|
700
712
|
customCfg?: any;
|
|
@@ -813,6 +825,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
813
825
|
connectionId?: string | undefined;
|
|
814
826
|
type: TChartType;
|
|
815
827
|
sql?: string | undefined;
|
|
828
|
+
python?: string | undefined;
|
|
816
829
|
data?: any[] | undefined;
|
|
817
830
|
cfg?: any;
|
|
818
831
|
customCfg?: any;
|
|
@@ -915,6 +928,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
915
928
|
setCardTitle: (sheetId: string, cardId: string, title: string) => void;
|
|
916
929
|
setCardInfo: (cardId: string, info: string) => void;
|
|
917
930
|
setCardSql: (sheetId: string, cardId: string, sql: string) => void;
|
|
931
|
+
setCardPython: (cardId: string, pythonCode: string) => void;
|
|
918
932
|
setCardDescription: (sheetId: string, cardId: string, description: string) => void;
|
|
919
933
|
setFrameCardData: (sheetId: string, cardId: string, data: any[]) => void;
|
|
920
934
|
addFrame: (sheetId: string, frame: TFrame) => void;
|
|
@@ -993,6 +1007,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
993
1007
|
setNumberFormat: (format: string, currency: string, locale: string, suffix: string) => void;
|
|
994
1008
|
setIsShowingVisual: (isShowingVisual: boolean) => void;
|
|
995
1009
|
setQueryResultColumns: (columns: string[]) => void;
|
|
1010
|
+
setQueryError: (error: string) => void;
|
|
996
1011
|
setRunSql: (runSql: boolean) => void;
|
|
997
1012
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
998
1013
|
setFilterOnClickField: (field: string) => void;
|
|
@@ -1005,6 +1020,8 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1005
1020
|
setSqlGenDimension: (dimension: string) => void;
|
|
1006
1021
|
setCardType: (type: TChartType) => void;
|
|
1007
1022
|
setCardSql: (sql: string) => void;
|
|
1023
|
+
setCardPython: (python: string) => void;
|
|
1024
|
+
setPythonStdOut: (pythonStdOut: string) => void;
|
|
1008
1025
|
setCardData: (data: any[]) => void;
|
|
1009
1026
|
setCardCustomCfg: (cfg: any) => void;
|
|
1010
1027
|
setCardCfg: (cfg: any) => void;
|
|
@@ -1040,6 +1057,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1040
1057
|
connectionId?: string | undefined;
|
|
1041
1058
|
type: TChartType;
|
|
1042
1059
|
sql?: string | undefined;
|
|
1060
|
+
python?: string | undefined;
|
|
1043
1061
|
data?: any[] | undefined;
|
|
1044
1062
|
cfg?: any;
|
|
1045
1063
|
customCfg?: any;
|
|
@@ -1074,6 +1092,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1074
1092
|
connectionId?: string | undefined;
|
|
1075
1093
|
type: TChartType;
|
|
1076
1094
|
sql?: string | undefined;
|
|
1095
|
+
python?: string | undefined;
|
|
1077
1096
|
data?: any[] | undefined;
|
|
1078
1097
|
cfg?: any;
|
|
1079
1098
|
customCfg?: any;
|
|
@@ -1150,6 +1169,8 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1150
1169
|
values: (string | number)[];
|
|
1151
1170
|
})[] | undefined;
|
|
1152
1171
|
queryResultColumns: string[];
|
|
1172
|
+
queryError?: string | undefined;
|
|
1173
|
+
pythonStdOut?: string | undefined;
|
|
1153
1174
|
selectedConnectionId?: string | undefined;
|
|
1154
1175
|
selectedDatabaseName?: string | undefined;
|
|
1155
1176
|
selectedSchemaName?: string | undefined;
|