semaphor 0.0.34 → 0.0.36
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 +66 -0
- package/dist/react-semaphor.js +15860 -15405
- package/dist/react-semaphor.umd.cjs +177 -148
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -53,6 +53,7 @@ declare type Actions = {
|
|
|
53
53
|
updateFilter: (filter: TFilter) => void;
|
|
54
54
|
setFilterValues: (filterValues: TFilterValue[] | undefined) => void;
|
|
55
55
|
addOrUpdateFilterValue: (filterValue: TFilterValue) => void;
|
|
56
|
+
addOrUpdateFilterValues: (filterValues: TFilterValue[]) => void;
|
|
56
57
|
removeFilterValue: (filterId: string) => void;
|
|
57
58
|
replaceFilterValue: (filterValue: TFilterValue) => void;
|
|
58
59
|
setStyle: (style: TStyle) => void;
|
|
@@ -69,15 +70,20 @@ declare type Actions = {
|
|
|
69
70
|
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
70
71
|
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
71
72
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
73
|
+
addBaseQuery: (baseQuery: TBaseQuery) => void;
|
|
74
|
+
removeBaseQuery: (baseQueryId: string) => void;
|
|
75
|
+
setBaseQueries: (baseQueries: TBaseQuery[]) => void;
|
|
72
76
|
};
|
|
73
77
|
|
|
74
78
|
declare type Actions_2 = {
|
|
75
79
|
setCardRefreshInterval: (refreshInterval: string) => void;
|
|
76
80
|
setNumberFormat: (format: string, currency: string, locale: string, suffix: string) => void;
|
|
77
81
|
setIsShowingVisual: (isShowingVisual: boolean) => void;
|
|
82
|
+
setQueryResultColumns: (columns: string[]) => void;
|
|
78
83
|
setRunSql: (runSql: boolean) => void;
|
|
79
84
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
80
85
|
setFilterOnClickField: (field: string) => void;
|
|
86
|
+
setFilterOnClickColumnIndex: (index: number) => void;
|
|
81
87
|
setIsSqlRunning: (isSqlRunning: boolean) => void;
|
|
82
88
|
setCard: (card: TCard) => void;
|
|
83
89
|
setFrame: (frame: TFrame) => void;
|
|
@@ -234,6 +240,7 @@ declare type EditorStore = {
|
|
|
234
240
|
showFilters: boolean;
|
|
235
241
|
applyFilters: boolean;
|
|
236
242
|
filterValues?: TFilterValue[];
|
|
243
|
+
queryResultColumns: string[];
|
|
237
244
|
selectedConnectionId?: string;
|
|
238
245
|
selectedDatabaseName?: string;
|
|
239
246
|
selectedSchemaName?: string;
|
|
@@ -281,6 +288,11 @@ declare type FilterForString = BaseFilter & {
|
|
|
281
288
|
values: [string];
|
|
282
289
|
};
|
|
283
290
|
|
|
291
|
+
declare type FilterOnClick = {
|
|
292
|
+
expression?: string;
|
|
293
|
+
columnIndex: number;
|
|
294
|
+
};
|
|
295
|
+
|
|
284
296
|
export declare function fmt(str: string): string;
|
|
285
297
|
|
|
286
298
|
export declare function getBookmarkKey(dashboardId: string): string;
|
|
@@ -307,6 +319,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
|
|
|
307
319
|
style?: TStyle | undefined;
|
|
308
320
|
filters?: TFilter[] | undefined;
|
|
309
321
|
customCards?: CustomCard[] | undefined;
|
|
322
|
+
baseQueries?: TBaseQuery[] | undefined;
|
|
310
323
|
};
|
|
311
324
|
|
|
312
325
|
export declare function getFilterValueType(filter: TFilter): "string" | "number" | "date" | "boolean";
|
|
@@ -385,6 +398,13 @@ export declare type StyleProps = {
|
|
|
385
398
|
};
|
|
386
399
|
};
|
|
387
400
|
|
|
401
|
+
export declare type TBaseQuery = {
|
|
402
|
+
id: string;
|
|
403
|
+
name: string;
|
|
404
|
+
sql: string;
|
|
405
|
+
description?: string;
|
|
406
|
+
};
|
|
407
|
+
|
|
388
408
|
export declare type TCard = {
|
|
389
409
|
id: string;
|
|
390
410
|
title: string;
|
|
@@ -411,8 +431,10 @@ export declare type TCardContext = {
|
|
|
411
431
|
};
|
|
412
432
|
|
|
413
433
|
export declare type TCardPreferences = {
|
|
434
|
+
onClickFilter?: FilterOnClick[];
|
|
414
435
|
filterOnClick?: boolean;
|
|
415
436
|
filterOnClickField?: string;
|
|
437
|
+
filterOnClickColumnIndex?: number;
|
|
416
438
|
formatNumber?: {
|
|
417
439
|
format?: string;
|
|
418
440
|
currency?: string;
|
|
@@ -434,6 +456,7 @@ export declare type TDashboard = {
|
|
|
434
456
|
style?: TStyle;
|
|
435
457
|
filters?: TFilter[];
|
|
436
458
|
customCards?: CustomCard[];
|
|
459
|
+
baseQueries?: TBaseQuery[];
|
|
437
460
|
};
|
|
438
461
|
|
|
439
462
|
export declare type TDataColumn = {
|
|
@@ -565,8 +588,13 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
565
588
|
cfg?: any;
|
|
566
589
|
customCfg?: any;
|
|
567
590
|
preferences?: {
|
|
591
|
+
onClickFilter?: {
|
|
592
|
+
expression?: string | undefined;
|
|
593
|
+
columnIndex: number;
|
|
594
|
+
}[] | undefined;
|
|
568
595
|
filterOnClick?: boolean | undefined;
|
|
569
596
|
filterOnClickField?: string | undefined;
|
|
597
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
570
598
|
formatNumber?: {
|
|
571
599
|
format?: string | undefined;
|
|
572
600
|
currency?: string | undefined;
|
|
@@ -637,8 +665,13 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
637
665
|
cfg?: any;
|
|
638
666
|
customCfg?: any;
|
|
639
667
|
preferences?: {
|
|
668
|
+
onClickFilter?: {
|
|
669
|
+
expression?: string | undefined;
|
|
670
|
+
columnIndex: number;
|
|
671
|
+
}[] | undefined;
|
|
640
672
|
filterOnClick?: boolean | undefined;
|
|
641
673
|
filterOnClickField?: string | undefined;
|
|
674
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
642
675
|
formatNumber?: {
|
|
643
676
|
format?: string | undefined;
|
|
644
677
|
currency?: string | undefined;
|
|
@@ -666,8 +699,13 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
666
699
|
cfg?: any;
|
|
667
700
|
customCfg?: any;
|
|
668
701
|
preferences?: {
|
|
702
|
+
onClickFilter?: {
|
|
703
|
+
expression?: string | undefined;
|
|
704
|
+
columnIndex: number;
|
|
705
|
+
}[] | undefined;
|
|
669
706
|
filterOnClick?: boolean | undefined;
|
|
670
707
|
filterOnClickField?: string | undefined;
|
|
708
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
671
709
|
formatNumber?: {
|
|
672
710
|
format?: string | undefined;
|
|
673
711
|
currency?: string | undefined;
|
|
@@ -757,6 +795,12 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
757
795
|
card: TCard;
|
|
758
796
|
}>;
|
|
759
797
|
})[] | undefined;
|
|
798
|
+
baseQueries?: {
|
|
799
|
+
id: string;
|
|
800
|
+
name: string;
|
|
801
|
+
sql: string;
|
|
802
|
+
description?: string | undefined;
|
|
803
|
+
}[] | undefined;
|
|
760
804
|
};
|
|
761
805
|
selectedSheetId?: string | null | undefined;
|
|
762
806
|
selectedFrameId?: string | null | undefined;
|
|
@@ -773,8 +817,13 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
773
817
|
cfg?: any;
|
|
774
818
|
customCfg?: any;
|
|
775
819
|
preferences?: {
|
|
820
|
+
onClickFilter?: {
|
|
821
|
+
expression?: string | undefined;
|
|
822
|
+
columnIndex: number;
|
|
823
|
+
}[] | undefined;
|
|
776
824
|
filterOnClick?: boolean | undefined;
|
|
777
825
|
filterOnClickField?: string | undefined;
|
|
826
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
778
827
|
formatNumber?: {
|
|
779
828
|
format?: string | undefined;
|
|
780
829
|
currency?: string | undefined;
|
|
@@ -884,6 +933,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
884
933
|
updateFilter: (filter: TFilter) => void;
|
|
885
934
|
setFilterValues: (filterValues: TFilterValue[] | undefined) => void;
|
|
886
935
|
addOrUpdateFilterValue: (filterValue: TFilterValue) => void;
|
|
936
|
+
addOrUpdateFilterValues: (filterValues: TFilterValue[]) => void;
|
|
887
937
|
removeFilterValue: (filterId: string) => void;
|
|
888
938
|
replaceFilterValue: (filterValue: TFilterValue) => void;
|
|
889
939
|
setStyle: (style: TStyle) => void;
|
|
@@ -900,6 +950,9 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
900
950
|
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
901
951
|
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
902
952
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
953
|
+
addBaseQuery: (baseQuery: TBaseQuery) => void;
|
|
954
|
+
removeBaseQuery: (baseQueryId: string) => void;
|
|
955
|
+
setBaseQueries: (baseQueries: TBaseQuery[]) => void;
|
|
903
956
|
};
|
|
904
957
|
}) => void), shouldReplace?: boolean | undefined): void;
|
|
905
958
|
}>;
|
|
@@ -939,9 +992,11 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
939
992
|
setCardRefreshInterval: (refreshInterval: string) => void;
|
|
940
993
|
setNumberFormat: (format: string, currency: string, locale: string, suffix: string) => void;
|
|
941
994
|
setIsShowingVisual: (isShowingVisual: boolean) => void;
|
|
995
|
+
setQueryResultColumns: (columns: string[]) => void;
|
|
942
996
|
setRunSql: (runSql: boolean) => void;
|
|
943
997
|
setCardPreferences: (preferences: TCardPreferences) => void;
|
|
944
998
|
setFilterOnClickField: (field: string) => void;
|
|
999
|
+
setFilterOnClickColumnIndex: (index: number) => void;
|
|
945
1000
|
setIsSqlRunning: (isSqlRunning: boolean) => void;
|
|
946
1001
|
setCard: (card: TCard) => void;
|
|
947
1002
|
setFrame: (frame: TFrame) => void;
|
|
@@ -989,8 +1044,13 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
989
1044
|
cfg?: any;
|
|
990
1045
|
customCfg?: any;
|
|
991
1046
|
preferences?: {
|
|
1047
|
+
onClickFilter?: {
|
|
1048
|
+
expression?: string | undefined;
|
|
1049
|
+
columnIndex: number;
|
|
1050
|
+
}[] | undefined;
|
|
992
1051
|
filterOnClick?: boolean | undefined;
|
|
993
1052
|
filterOnClickField?: string | undefined;
|
|
1053
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
994
1054
|
formatNumber?: {
|
|
995
1055
|
format?: string | undefined;
|
|
996
1056
|
currency?: string | undefined;
|
|
@@ -1018,8 +1078,13 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1018
1078
|
cfg?: any;
|
|
1019
1079
|
customCfg?: any;
|
|
1020
1080
|
preferences?: {
|
|
1081
|
+
onClickFilter?: {
|
|
1082
|
+
expression?: string | undefined;
|
|
1083
|
+
columnIndex: number;
|
|
1084
|
+
}[] | undefined;
|
|
1021
1085
|
filterOnClick?: boolean | undefined;
|
|
1022
1086
|
filterOnClickField?: string | undefined;
|
|
1087
|
+
filterOnClickColumnIndex?: number | undefined;
|
|
1023
1088
|
formatNumber?: {
|
|
1024
1089
|
format?: string | undefined;
|
|
1025
1090
|
currency?: string | undefined;
|
|
@@ -1084,6 +1149,7 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1084
1149
|
operation: "in" | "not in";
|
|
1085
1150
|
values: (string | number)[];
|
|
1086
1151
|
})[] | undefined;
|
|
1152
|
+
queryResultColumns: string[];
|
|
1087
1153
|
selectedConnectionId?: string | undefined;
|
|
1088
1154
|
selectedDatabaseName?: string | undefined;
|
|
1089
1155
|
selectedSchemaName?: string | undefined;
|