semaphor 0.0.39 → 0.0.40
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/2DAFLIRC-QTWUtXuy.js +9088 -0
- package/dist/index-XWUQkOs_.js +56502 -0
- package/dist/react-semaphor.d.ts +260 -3
- package/dist/react-semaphor.js +34 -53338
- package/dist/react-semaphor.umd.cjs +1258 -154
- package/dist/style.css +1 -1
- package/package.json +3 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
12
12
|
import { Layout } from 'react-grid-layout';
|
|
13
13
|
import { Layouts } from 'react-grid-layout';
|
|
14
14
|
import { Point } from 'chart.js';
|
|
15
|
+
import { default as React_2 } from 'react';
|
|
15
16
|
import { default as ReactGridLayout_2 } from 'react-grid-layout';
|
|
16
17
|
import { StoreApi } from 'zustand';
|
|
17
18
|
import { UseBoundStore } from 'zustand';
|
|
@@ -178,6 +179,15 @@ export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
|
178
179
|
|
|
179
180
|
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
180
181
|
|
|
182
|
+
export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
|
|
183
|
+
|
|
184
|
+
declare type DashboardCardProps = {
|
|
185
|
+
card: TCard;
|
|
186
|
+
footer?: React_2.ReactNode;
|
|
187
|
+
showControls?: boolean;
|
|
188
|
+
fetchCardData?: boolean;
|
|
189
|
+
} & React_2.HTMLAttributes<HTMLDivElement>;
|
|
190
|
+
|
|
181
191
|
export declare function DashboardPlus({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
182
192
|
|
|
183
193
|
declare type DashboardPlusProps = {
|
|
@@ -200,7 +210,7 @@ export declare type DashboardProps = {
|
|
|
200
210
|
};
|
|
201
211
|
|
|
202
212
|
export declare function DashboardProvider({ children }: {
|
|
203
|
-
children:
|
|
213
|
+
children: React_2.ReactNode;
|
|
204
214
|
}): JSX_2.Element;
|
|
205
215
|
|
|
206
216
|
export declare type DashboardStore = {
|
|
@@ -342,6 +352,8 @@ export declare type LoadingProps = {
|
|
|
342
352
|
|
|
343
353
|
export declare const NUMBER_DATA_TYPES: string[];
|
|
344
354
|
|
|
355
|
+
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
356
|
+
|
|
345
357
|
declare type Params = {
|
|
346
358
|
[key: string]: string | number | string[] | number[];
|
|
347
359
|
};
|
|
@@ -350,7 +362,7 @@ export declare const PYTHON_DEFAULT_CODE = "import pandas as pd\ndf = pd.DataFra
|
|
|
350
362
|
|
|
351
363
|
export declare const resolveDataType: (value: any) => string;
|
|
352
364
|
|
|
353
|
-
export declare function SelectComponent({ title, items, value, isLoading, isError, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
|
|
365
|
+
export declare function SelectComponent({ title, items, value, isLoading, isError, connectionTooltip, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
|
|
354
366
|
|
|
355
367
|
declare type SelectProps = {
|
|
356
368
|
title: string;
|
|
@@ -364,6 +376,7 @@ declare type SelectProps = {
|
|
|
364
376
|
onChange?: (value: string) => void;
|
|
365
377
|
className?: string;
|
|
366
378
|
showIcon?: boolean;
|
|
379
|
+
connectionTooltip?: string;
|
|
367
380
|
};
|
|
368
381
|
|
|
369
382
|
export declare function SemaphorQueryClient({ children, }: {
|
|
@@ -451,10 +464,35 @@ export declare type TCardPreferences = {
|
|
|
451
464
|
suffix?: string;
|
|
452
465
|
enabled?: boolean | string;
|
|
453
466
|
};
|
|
467
|
+
datasetOptions?: TDatasetOptions[];
|
|
468
|
+
chartOptions?: TChartOptions;
|
|
454
469
|
};
|
|
455
470
|
|
|
456
471
|
declare type TChartConfiguration = ChartConfiguration;
|
|
457
472
|
|
|
473
|
+
export declare type TChartOptions = {
|
|
474
|
+
type?: TChartType;
|
|
475
|
+
scales?: {
|
|
476
|
+
y?: {
|
|
477
|
+
type: 'linear' | 'logarithmic';
|
|
478
|
+
min: number;
|
|
479
|
+
max: number;
|
|
480
|
+
ticks: {
|
|
481
|
+
stepSize: number;
|
|
482
|
+
};
|
|
483
|
+
};
|
|
484
|
+
x?: {
|
|
485
|
+
type: 'linear' | 'logarithmic';
|
|
486
|
+
min: number;
|
|
487
|
+
max: number;
|
|
488
|
+
ticks: {
|
|
489
|
+
stepSize: number;
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
indexAxis?: 'x' | 'y' | undefined;
|
|
494
|
+
};
|
|
495
|
+
|
|
458
496
|
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'custom';
|
|
459
497
|
|
|
460
498
|
export declare type TDashboard = {
|
|
@@ -474,6 +512,19 @@ export declare type TDataColumn = {
|
|
|
474
512
|
is_nullable?: string;
|
|
475
513
|
};
|
|
476
514
|
|
|
515
|
+
export declare type TDatasetOptions = {
|
|
516
|
+
idx: number;
|
|
517
|
+
type?: 'bar' | 'line';
|
|
518
|
+
fill?: string | number;
|
|
519
|
+
datalabels?: {
|
|
520
|
+
display?: boolean;
|
|
521
|
+
align?: string;
|
|
522
|
+
anchor?: string;
|
|
523
|
+
clamp?: boolean;
|
|
524
|
+
color?: string;
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
|
|
477
528
|
export declare type TEvent = {
|
|
478
529
|
type: 'success' | 'error' | 'info' | 'warning';
|
|
479
530
|
message: any;
|
|
@@ -490,6 +541,7 @@ declare type TFilter = {
|
|
|
490
541
|
table: string;
|
|
491
542
|
database: string;
|
|
492
543
|
sql: string;
|
|
544
|
+
operation: Operation;
|
|
493
545
|
};
|
|
494
546
|
|
|
495
547
|
declare type TFilterValue = FilterForString | FilterForEqual | FilterForCompare | FilterForBetween | FilterForIn | FilterForDate;
|
|
@@ -612,6 +664,40 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
612
664
|
suffix?: string | undefined;
|
|
613
665
|
enabled?: string | boolean | undefined;
|
|
614
666
|
} | undefined;
|
|
667
|
+
datasetOptions?: {
|
|
668
|
+
idx: number;
|
|
669
|
+
type?: "bar" | "line" | undefined;
|
|
670
|
+
fill?: string | number | undefined;
|
|
671
|
+
datalabels?: {
|
|
672
|
+
display?: boolean | undefined;
|
|
673
|
+
align?: string | undefined;
|
|
674
|
+
anchor?: string | undefined;
|
|
675
|
+
clamp?: boolean | undefined;
|
|
676
|
+
color?: string | undefined;
|
|
677
|
+
} | undefined;
|
|
678
|
+
}[] | undefined;
|
|
679
|
+
chartOptions?: {
|
|
680
|
+
type?: TChartType | undefined;
|
|
681
|
+
scales?: {
|
|
682
|
+
y?: {
|
|
683
|
+
type: "linear" | "logarithmic";
|
|
684
|
+
min: number;
|
|
685
|
+
max: number;
|
|
686
|
+
ticks: {
|
|
687
|
+
stepSize: number;
|
|
688
|
+
};
|
|
689
|
+
} | undefined;
|
|
690
|
+
x?: {
|
|
691
|
+
type: "linear" | "logarithmic";
|
|
692
|
+
min: number;
|
|
693
|
+
max: number;
|
|
694
|
+
ticks: {
|
|
695
|
+
stepSize: number;
|
|
696
|
+
};
|
|
697
|
+
} | undefined;
|
|
698
|
+
} | undefined;
|
|
699
|
+
indexAxis?: "x" | "y" | undefined;
|
|
700
|
+
} | undefined;
|
|
615
701
|
} | undefined;
|
|
616
702
|
lastSelectedDatabase?: string | undefined;
|
|
617
703
|
lastSelectedSchema?: string | undefined;
|
|
@@ -690,6 +776,40 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
690
776
|
suffix?: string | undefined;
|
|
691
777
|
enabled?: string | boolean | undefined;
|
|
692
778
|
} | undefined;
|
|
779
|
+
datasetOptions?: {
|
|
780
|
+
idx: number;
|
|
781
|
+
type?: "bar" | "line" | undefined;
|
|
782
|
+
fill?: string | number | undefined;
|
|
783
|
+
datalabels?: {
|
|
784
|
+
display?: boolean | undefined;
|
|
785
|
+
align?: string | undefined;
|
|
786
|
+
anchor?: string | undefined;
|
|
787
|
+
clamp?: boolean | undefined;
|
|
788
|
+
color?: string | undefined;
|
|
789
|
+
} | undefined;
|
|
790
|
+
}[] | undefined;
|
|
791
|
+
chartOptions?: {
|
|
792
|
+
type?: TChartType | undefined;
|
|
793
|
+
scales?: {
|
|
794
|
+
y?: {
|
|
795
|
+
type: "linear" | "logarithmic";
|
|
796
|
+
min: number;
|
|
797
|
+
max: number;
|
|
798
|
+
ticks: {
|
|
799
|
+
stepSize: number;
|
|
800
|
+
};
|
|
801
|
+
} | undefined;
|
|
802
|
+
x?: {
|
|
803
|
+
type: "linear" | "logarithmic";
|
|
804
|
+
min: number;
|
|
805
|
+
max: number;
|
|
806
|
+
ticks: {
|
|
807
|
+
stepSize: number;
|
|
808
|
+
};
|
|
809
|
+
} | undefined;
|
|
810
|
+
} | undefined;
|
|
811
|
+
indexAxis?: "x" | "y" | undefined;
|
|
812
|
+
} | undefined;
|
|
693
813
|
} | undefined;
|
|
694
814
|
lastSelectedDatabase?: string | undefined;
|
|
695
815
|
lastSelectedSchema?: string | undefined;
|
|
@@ -725,6 +845,40 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
725
845
|
suffix?: string | undefined;
|
|
726
846
|
enabled?: string | boolean | undefined;
|
|
727
847
|
} | undefined;
|
|
848
|
+
datasetOptions?: {
|
|
849
|
+
idx: number;
|
|
850
|
+
type?: "bar" | "line" | undefined;
|
|
851
|
+
fill?: string | number | undefined;
|
|
852
|
+
datalabels?: {
|
|
853
|
+
display?: boolean | undefined;
|
|
854
|
+
align?: string | undefined;
|
|
855
|
+
anchor?: string | undefined;
|
|
856
|
+
clamp?: boolean | undefined;
|
|
857
|
+
color?: string | undefined;
|
|
858
|
+
} | undefined;
|
|
859
|
+
}[] | undefined;
|
|
860
|
+
chartOptions?: {
|
|
861
|
+
type?: TChartType | undefined;
|
|
862
|
+
scales?: {
|
|
863
|
+
y?: {
|
|
864
|
+
type: "linear" | "logarithmic";
|
|
865
|
+
min: number;
|
|
866
|
+
max: number;
|
|
867
|
+
ticks: {
|
|
868
|
+
stepSize: number;
|
|
869
|
+
};
|
|
870
|
+
} | undefined;
|
|
871
|
+
x?: {
|
|
872
|
+
type: "linear" | "logarithmic";
|
|
873
|
+
min: number;
|
|
874
|
+
max: number;
|
|
875
|
+
ticks: {
|
|
876
|
+
stepSize: number;
|
|
877
|
+
};
|
|
878
|
+
} | undefined;
|
|
879
|
+
} | undefined;
|
|
880
|
+
indexAxis?: "x" | "y" | undefined;
|
|
881
|
+
} | undefined;
|
|
728
882
|
} | undefined;
|
|
729
883
|
lastSelectedDatabase?: string | undefined;
|
|
730
884
|
lastSelectedSchema?: string | undefined;
|
|
@@ -787,6 +941,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
787
941
|
table: string;
|
|
788
942
|
database: string;
|
|
789
943
|
sql: string;
|
|
944
|
+
operation: Operation;
|
|
790
945
|
}[] | undefined;
|
|
791
946
|
customCards?: ({
|
|
792
947
|
cardId: string;
|
|
@@ -844,6 +999,40 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
844
999
|
suffix?: string | undefined;
|
|
845
1000
|
enabled?: string | boolean | undefined;
|
|
846
1001
|
} | undefined;
|
|
1002
|
+
datasetOptions?: {
|
|
1003
|
+
idx: number;
|
|
1004
|
+
type?: "bar" | "line" | undefined;
|
|
1005
|
+
fill?: string | number | undefined;
|
|
1006
|
+
datalabels?: {
|
|
1007
|
+
display?: boolean | undefined;
|
|
1008
|
+
align?: string | undefined;
|
|
1009
|
+
anchor?: string | undefined;
|
|
1010
|
+
clamp?: boolean | undefined;
|
|
1011
|
+
color?: string | undefined;
|
|
1012
|
+
} | undefined;
|
|
1013
|
+
}[] | undefined;
|
|
1014
|
+
chartOptions?: {
|
|
1015
|
+
type?: TChartType | undefined;
|
|
1016
|
+
scales?: {
|
|
1017
|
+
y?: {
|
|
1018
|
+
type: "linear" | "logarithmic";
|
|
1019
|
+
min: number;
|
|
1020
|
+
max: number;
|
|
1021
|
+
ticks: {
|
|
1022
|
+
stepSize: number;
|
|
1023
|
+
};
|
|
1024
|
+
} | undefined;
|
|
1025
|
+
x?: {
|
|
1026
|
+
type: "linear" | "logarithmic";
|
|
1027
|
+
min: number;
|
|
1028
|
+
max: number;
|
|
1029
|
+
ticks: {
|
|
1030
|
+
stepSize: number;
|
|
1031
|
+
};
|
|
1032
|
+
} | undefined;
|
|
1033
|
+
} | undefined;
|
|
1034
|
+
indexAxis?: "x" | "y" | undefined;
|
|
1035
|
+
} | undefined;
|
|
847
1036
|
} | undefined;
|
|
848
1037
|
lastSelectedDatabase?: string | undefined;
|
|
849
1038
|
lastSelectedSchema?: string | undefined;
|
|
@@ -973,7 +1162,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
973
1162
|
|
|
974
1163
|
export declare const useEditorActions: () => Actions_2;
|
|
975
1164
|
|
|
976
|
-
export declare function useEditorAside(token?: AuthToken,
|
|
1165
|
+
export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {
|
|
977
1166
|
connectionItems: any;
|
|
978
1167
|
isConnectionsLoading: boolean;
|
|
979
1168
|
isConnectionsError: boolean;
|
|
@@ -1076,6 +1265,40 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1076
1265
|
suffix?: string | undefined;
|
|
1077
1266
|
enabled?: string | boolean | undefined;
|
|
1078
1267
|
} | undefined;
|
|
1268
|
+
datasetOptions?: {
|
|
1269
|
+
idx: number;
|
|
1270
|
+
type?: "bar" | "line" | undefined;
|
|
1271
|
+
fill?: string | number | undefined;
|
|
1272
|
+
datalabels?: {
|
|
1273
|
+
display?: boolean | undefined;
|
|
1274
|
+
align?: string | undefined;
|
|
1275
|
+
anchor?: string | undefined;
|
|
1276
|
+
clamp?: boolean | undefined;
|
|
1277
|
+
color?: string | undefined;
|
|
1278
|
+
} | undefined;
|
|
1279
|
+
}[] | undefined;
|
|
1280
|
+
chartOptions?: {
|
|
1281
|
+
type?: TChartType | undefined;
|
|
1282
|
+
scales?: {
|
|
1283
|
+
y?: {
|
|
1284
|
+
type: "linear" | "logarithmic";
|
|
1285
|
+
min: number;
|
|
1286
|
+
max: number;
|
|
1287
|
+
ticks: {
|
|
1288
|
+
stepSize: number;
|
|
1289
|
+
};
|
|
1290
|
+
} | undefined;
|
|
1291
|
+
x?: {
|
|
1292
|
+
type: "linear" | "logarithmic";
|
|
1293
|
+
min: number;
|
|
1294
|
+
max: number;
|
|
1295
|
+
ticks: {
|
|
1296
|
+
stepSize: number;
|
|
1297
|
+
};
|
|
1298
|
+
} | undefined;
|
|
1299
|
+
} | undefined;
|
|
1300
|
+
indexAxis?: "x" | "y" | undefined;
|
|
1301
|
+
} | undefined;
|
|
1079
1302
|
} | undefined;
|
|
1080
1303
|
lastSelectedDatabase?: string | undefined;
|
|
1081
1304
|
lastSelectedSchema?: string | undefined;
|
|
@@ -1111,6 +1334,40 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1111
1334
|
suffix?: string | undefined;
|
|
1112
1335
|
enabled?: string | boolean | undefined;
|
|
1113
1336
|
} | undefined;
|
|
1337
|
+
datasetOptions?: {
|
|
1338
|
+
idx: number;
|
|
1339
|
+
type?: "bar" | "line" | undefined;
|
|
1340
|
+
fill?: string | number | undefined;
|
|
1341
|
+
datalabels?: {
|
|
1342
|
+
display?: boolean | undefined;
|
|
1343
|
+
align?: string | undefined;
|
|
1344
|
+
anchor?: string | undefined;
|
|
1345
|
+
clamp?: boolean | undefined;
|
|
1346
|
+
color?: string | undefined;
|
|
1347
|
+
} | undefined;
|
|
1348
|
+
}[] | undefined;
|
|
1349
|
+
chartOptions?: {
|
|
1350
|
+
type?: TChartType | undefined;
|
|
1351
|
+
scales?: {
|
|
1352
|
+
y?: {
|
|
1353
|
+
type: "linear" | "logarithmic";
|
|
1354
|
+
min: number;
|
|
1355
|
+
max: number;
|
|
1356
|
+
ticks: {
|
|
1357
|
+
stepSize: number;
|
|
1358
|
+
};
|
|
1359
|
+
} | undefined;
|
|
1360
|
+
x?: {
|
|
1361
|
+
type: "linear" | "logarithmic";
|
|
1362
|
+
min: number;
|
|
1363
|
+
max: number;
|
|
1364
|
+
ticks: {
|
|
1365
|
+
stepSize: number;
|
|
1366
|
+
};
|
|
1367
|
+
} | undefined;
|
|
1368
|
+
} | undefined;
|
|
1369
|
+
indexAxis?: "x" | "y" | undefined;
|
|
1370
|
+
} | undefined;
|
|
1114
1371
|
} | undefined;
|
|
1115
1372
|
lastSelectedDatabase?: string | undefined;
|
|
1116
1373
|
lastSelectedSchema?: string | undefined;
|