semaphor 0.0.85 → 0.0.87
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/chunks/{index-DhjurnP9.js → index-CLf_4nXr.js} +2447 -2391
- package/dist/chunks/{index-BnsJsevV.js → index-CpBdXQXJ.js} +13847 -13596
- package/dist/chunks/index-D3FspidB.js +240 -0
- package/dist/chunks/index-DGgEJUE9.js +412 -0
- package/dist/chunks/{lucide-react-D2-G_iA5.js → lucide-react-CDQZoJjz.js} +1452 -1472
- package/dist/chunks/{lucide-react-BOL6diSu.js → lucide-react-CoTyczdi.js} +4269 -4333
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +28 -25
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +1 -1
- package/dist/types/main.d.ts +54 -13
- package/dist/types/surfboard.d.ts +1 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunks/index-CILbzMWs.js +0 -387
- package/dist/chunks/index-VOC0bH2u.js +0 -245
package/dist/types/main.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { CacheConfig as CacheConfig_2 } from '..';
|
|
|
3
3
|
import { Chart } from 'chart.js';
|
|
4
4
|
import { ChartConfiguration } from 'chart.js';
|
|
5
5
|
import { CustomCard as CustomCard_2 } from '..';
|
|
6
|
+
import { DateRange } from 'react-day-picker';
|
|
6
7
|
import { default as default_2 } from 'react-grid-layout';
|
|
7
8
|
import { FontSpec } from 'chart.js';
|
|
8
9
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -59,10 +60,11 @@ declare type Actions = {
|
|
|
59
60
|
addFilter: (filter: TFilter) => void;
|
|
60
61
|
removeFilter: (filterId: string) => void;
|
|
61
62
|
updateFilter: (filter: TFilter) => void;
|
|
63
|
+
updateFilterId: (filterId: string, newId: string) => void;
|
|
62
64
|
setFilterValues: (filterValues: TFilterValue[] | undefined) => void;
|
|
63
65
|
addOrUpdateFilterValue: (filterValue: TFilterValue) => void;
|
|
64
66
|
addOrUpdateFilterValues: (filterValues: TFilterValue[]) => void;
|
|
65
|
-
|
|
67
|
+
removeFilterValues: (filterId: string) => void;
|
|
66
68
|
replaceFilterValue: (filterValue: TFilterValue) => void;
|
|
67
69
|
setStyle: (style: TStyle) => void;
|
|
68
70
|
getStyle: () => TStyle | undefined;
|
|
@@ -87,6 +89,8 @@ declare type Actions = {
|
|
|
87
89
|
};
|
|
88
90
|
|
|
89
91
|
declare type Actions_2 = {
|
|
92
|
+
setActiveTabCardId: (activeTabCardId: string) => void;
|
|
93
|
+
updateCardTab: (activeTabCardId: string, currentCard: TCard) => void;
|
|
90
94
|
setSortChart: (sortChart: 'asc' | 'desc' | 'none') => void;
|
|
91
95
|
setChartOrientation: (indexAxis: 'x' | 'y') => void;
|
|
92
96
|
setCustomVisualCode: (code: string) => void;
|
|
@@ -109,8 +113,8 @@ declare type Actions_2 = {
|
|
|
109
113
|
setSqlGenMeasure: (name: string, calc: AggregateCalc) => void;
|
|
110
114
|
setSqlGenDimension: (dimension: string) => void;
|
|
111
115
|
setCardType: (type: TChartType) => void;
|
|
112
|
-
setCardSql: (sql: string) => void;
|
|
113
|
-
setCardPython: (python: string) => void;
|
|
116
|
+
setCardSql: (sql: string | undefined) => void;
|
|
117
|
+
setCardPython: (python: string | undefined) => void;
|
|
114
118
|
setPythonStdOut: (pythonStdOut: string) => void;
|
|
115
119
|
setCardCustomCfg: (cfg: any) => void;
|
|
116
120
|
setCardCfg: (cfg: any) => void;
|
|
@@ -159,8 +163,6 @@ declare type BaseFilter = {
|
|
|
159
163
|
connectionType?: 'database' | 'api';
|
|
160
164
|
};
|
|
161
165
|
|
|
162
|
-
export declare const BOOLEAN_DATA_TYPES: string[];
|
|
163
|
-
|
|
164
166
|
export declare type Breakpoint = 'lg' | 'md' | 'sm' | 'xs' | 'xxs';
|
|
165
167
|
|
|
166
168
|
export declare type CacheConfig = {
|
|
@@ -272,14 +274,14 @@ export declare type DashboardStore = {
|
|
|
272
274
|
|
|
273
275
|
export declare const DashboardWC: CustomElementConstructor;
|
|
274
276
|
|
|
275
|
-
export declare const DATE_DATA_TYPES: string[];
|
|
276
|
-
|
|
277
277
|
export declare type DateOptions = {
|
|
278
278
|
locale: string;
|
|
279
279
|
format: string;
|
|
280
280
|
options: Intl.DateTimeFormatOptions;
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
+
export { DateRange }
|
|
284
|
+
|
|
283
285
|
export declare type DisplayDataType = 'string' | 'date' | 'number' | 'none';
|
|
284
286
|
|
|
285
287
|
declare type EditorStore = {
|
|
@@ -290,6 +292,7 @@ declare type EditorStore = {
|
|
|
290
292
|
sqlGen: SqlGen;
|
|
291
293
|
frame: TFrame;
|
|
292
294
|
card: TCard;
|
|
295
|
+
activeTabCardId?: string | null;
|
|
293
296
|
showFilters: boolean;
|
|
294
297
|
applyFilters: boolean;
|
|
295
298
|
filterValues?: TFilterValue[];
|
|
@@ -403,8 +406,16 @@ export declare function getQualifiedTableName(schemaName: string, tableName: str
|
|
|
403
406
|
|
|
404
407
|
export declare function getSql(config: SqlGen, schemaName: string, tableName: string, modelName: string): string | undefined;
|
|
405
408
|
|
|
409
|
+
export declare function isBooleanDataType(dataType: string): boolean;
|
|
410
|
+
|
|
406
411
|
export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
|
|
407
412
|
|
|
413
|
+
export declare function isDateDataType(dataType: string): boolean;
|
|
414
|
+
|
|
415
|
+
export declare function isNumberDataType(dataType: string): boolean;
|
|
416
|
+
|
|
417
|
+
export declare function isTextDataType(dataType: string): boolean;
|
|
418
|
+
|
|
408
419
|
export declare type KPICardProps = {
|
|
409
420
|
card: TCard;
|
|
410
421
|
isLoading?: boolean;
|
|
@@ -417,8 +428,6 @@ export declare type LoadingProps = {
|
|
|
417
428
|
|
|
418
429
|
declare type NoneOptions = {};
|
|
419
430
|
|
|
420
|
-
export declare const NUMBER_DATA_TYPES: string[];
|
|
421
|
-
|
|
422
431
|
export declare type NumberAxisFormat = {
|
|
423
432
|
decimalPlaces?: number;
|
|
424
433
|
suffix?: string;
|
|
@@ -478,9 +487,11 @@ declare type SelectProps = {
|
|
|
478
487
|
disabled?: boolean;
|
|
479
488
|
};
|
|
480
489
|
|
|
481
|
-
|
|
490
|
+
declare function SemaphorQueryClient({ children, }: {
|
|
482
491
|
children: React.ReactNode;
|
|
483
492
|
}): JSX_2.Element;
|
|
493
|
+
export { SemaphorQueryClient as SemaphorDataProvider }
|
|
494
|
+
export { SemaphorQueryClient }
|
|
484
495
|
|
|
485
496
|
export declare type SqlGen = {
|
|
486
497
|
measures?: {
|
|
@@ -550,7 +561,6 @@ export declare type TCard = {
|
|
|
550
561
|
type: TChartType;
|
|
551
562
|
sql?: string;
|
|
552
563
|
python?: string;
|
|
553
|
-
data?: any[];
|
|
554
564
|
cfg?: any;
|
|
555
565
|
customCfg?: any;
|
|
556
566
|
preferences?: TCardPreferences;
|
|
@@ -696,13 +706,12 @@ export declare type TEvent = {
|
|
|
696
706
|
message: any;
|
|
697
707
|
};
|
|
698
708
|
|
|
699
|
-
export declare const TEXT_DATA_TYPES: string[];
|
|
700
|
-
|
|
701
709
|
declare type TFilter = {
|
|
702
710
|
type?: 'single' | 'multiple';
|
|
703
711
|
uiType?: 'radio' | 'dropdown';
|
|
704
712
|
sheetId?: string;
|
|
705
713
|
location?: FilterLocation;
|
|
714
|
+
hide?: boolean;
|
|
706
715
|
id: string;
|
|
707
716
|
connectionId: string;
|
|
708
717
|
title: string;
|
|
@@ -734,6 +743,12 @@ export declare type TLens = {
|
|
|
734
743
|
shared?: boolean;
|
|
735
744
|
};
|
|
736
745
|
|
|
746
|
+
export declare type TSelectedRecord = {
|
|
747
|
+
id: number | string;
|
|
748
|
+
value: string;
|
|
749
|
+
[key: string]: number | string;
|
|
750
|
+
};
|
|
751
|
+
|
|
737
752
|
export declare type TSheet = {
|
|
738
753
|
id: string;
|
|
739
754
|
title?: string;
|
|
@@ -761,6 +776,7 @@ export declare function useCard(cardId: string): {
|
|
|
761
776
|
visualKey: number;
|
|
762
777
|
handleDatapointClick: (chart: Chart, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
763
778
|
cfg: TChartConfiguration | undefined;
|
|
779
|
+
queryKey: string[];
|
|
764
780
|
};
|
|
765
781
|
|
|
766
782
|
export declare const useDashboardActions: () => Actions;
|
|
@@ -769,6 +785,17 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
769
785
|
setState(nextStateOrUpdater: DashboardStore | Partial<DashboardStore> | ((state: WritableDraft<DashboardStore>) => void), shouldReplace?: boolean | undefined): void;
|
|
770
786
|
}>;
|
|
771
787
|
|
|
788
|
+
export declare function useDateFilterHook(filterId: string): {
|
|
789
|
+
records: any;
|
|
790
|
+
isLoading: boolean;
|
|
791
|
+
isFetching: boolean;
|
|
792
|
+
isError: boolean;
|
|
793
|
+
initialDateRange: DateRange | undefined;
|
|
794
|
+
dateRange: DateRange | undefined;
|
|
795
|
+
handleClear: () => void;
|
|
796
|
+
handleChange: (date: DateRange | undefined) => void;
|
|
797
|
+
};
|
|
798
|
+
|
|
772
799
|
export declare const useEditorActions: () => Actions_2;
|
|
773
800
|
|
|
774
801
|
export declare function useEditorAside(token?: AuthToken, _connectionQueryKey?: string): {
|
|
@@ -804,6 +831,20 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
804
831
|
setState(nextStateOrUpdater: EditorStore | Partial<EditorStore> | ((state: WritableDraft<EditorStore>) => void), shouldReplace?: boolean | undefined): void;
|
|
805
832
|
}>;
|
|
806
833
|
|
|
834
|
+
export declare function useTextFilterHook(filterId: string): {
|
|
835
|
+
isLoading: boolean;
|
|
836
|
+
isFetching: boolean;
|
|
837
|
+
isError: boolean;
|
|
838
|
+
records: TSelectedRecord[];
|
|
839
|
+
selectedRecords: TSelectedRecord[];
|
|
840
|
+
handleChange: (selectedRecords: TSelectedRecord[]) => void;
|
|
841
|
+
handleClear: () => void;
|
|
842
|
+
handleSelectAll: (checked: boolean) => void;
|
|
843
|
+
filteredRecords: TSelectedRecord[];
|
|
844
|
+
isSingleSelect: boolean;
|
|
845
|
+
allSelected: boolean;
|
|
846
|
+
};
|
|
847
|
+
|
|
807
848
|
export { }
|
|
808
849
|
|
|
809
850
|
|
|
@@ -284,7 +284,6 @@ export declare type TCard = {
|
|
|
284
284
|
type: TChartType;
|
|
285
285
|
sql?: string;
|
|
286
286
|
python?: string;
|
|
287
|
-
data?: any[];
|
|
288
287
|
cfg?: any;
|
|
289
288
|
customCfg?: any;
|
|
290
289
|
preferences?: TCardPreferences;
|
|
@@ -433,6 +432,7 @@ declare type TFilter = {
|
|
|
433
432
|
uiType?: 'radio' | 'dropdown';
|
|
434
433
|
sheetId?: string;
|
|
435
434
|
location?: FilterLocation;
|
|
435
|
+
hide?: boolean;
|
|
436
436
|
id: string;
|
|
437
437
|
connectionId: string;
|
|
438
438
|
title: string;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -276,7 +276,6 @@ export declare type TCard = {
|
|
|
276
276
|
type: TChartType;
|
|
277
277
|
sql?: string;
|
|
278
278
|
python?: string;
|
|
279
|
-
data?: any[];
|
|
280
279
|
cfg?: any;
|
|
281
280
|
customCfg?: any;
|
|
282
281
|
preferences?: TCardPreferences;
|
|
@@ -425,6 +424,7 @@ declare type TFilter = {
|
|
|
425
424
|
uiType?: 'radio' | 'dropdown';
|
|
426
425
|
sheetId?: string;
|
|
427
426
|
location?: FilterLocation;
|
|
427
|
+
hide?: boolean;
|
|
428
428
|
id: string;
|
|
429
429
|
connectionId: string;
|
|
430
430
|
title: string;
|