react-semaphor 0.0.31 → 0.0.32
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 +13 -8
- package/dist/react-semaphor.js +4361 -4356
- package/dist/react-semaphor.umd.cjs +54 -54
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { StoreApi } from 'zustand';
|
|
|
7
7
|
import { UseBoundStore } from 'zustand';
|
|
8
8
|
|
|
9
9
|
declare type Actions = {
|
|
10
|
+
setAuthToken: (authToken: AuthToken) => void;
|
|
10
11
|
setThemeStyle: (themeStyle: StyleProps) => void;
|
|
11
12
|
setIsEditorSaveEvent: (isEditorSaveEvent: boolean) => void;
|
|
12
13
|
setDashboard: (dashboard: TDashboard) => void;
|
|
@@ -51,6 +52,11 @@ declare type Actions = {
|
|
|
51
52
|
getSelectedSheetLayout: () => ReactGridLayout.Layout[] | undefined;
|
|
52
53
|
};
|
|
53
54
|
|
|
55
|
+
export declare type AuthToken = {
|
|
56
|
+
accessToken: string;
|
|
57
|
+
refreshToken: string;
|
|
58
|
+
};
|
|
59
|
+
|
|
54
60
|
declare type BaseFilter = {
|
|
55
61
|
filterId: TFilter['id'];
|
|
56
62
|
expression?: string;
|
|
@@ -66,20 +72,13 @@ export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
|
66
72
|
export declare function DashboardPlus({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
67
73
|
|
|
68
74
|
declare type DashboardPlusProps = {
|
|
69
|
-
id: string;
|
|
70
|
-
authToken: string;
|
|
71
|
-
style?: TStyle;
|
|
72
|
-
currentTheme?: 'light' | 'dark' | 'system';
|
|
73
|
-
onSave?: (dashboard: TDashboard) => void;
|
|
74
|
-
LoadingComponent?: (props: LoadingProps) => React.ReactNode;
|
|
75
|
-
ErrorComponent?: (props: ErrorProps) => React.ReactNode;
|
|
76
75
|
showControls?: boolean;
|
|
77
76
|
showFooter?: boolean;
|
|
78
77
|
} & DashboardProps;
|
|
79
78
|
|
|
80
79
|
export declare type DashboardProps = {
|
|
81
80
|
id: string;
|
|
82
|
-
authToken:
|
|
81
|
+
authToken: AuthToken | undefined;
|
|
83
82
|
style?: TStyle;
|
|
84
83
|
currentTheme?: 'light' | 'dark' | 'system';
|
|
85
84
|
onEvent?: (event: TEvent) => void;
|
|
@@ -89,6 +88,7 @@ export declare type DashboardProps = {
|
|
|
89
88
|
};
|
|
90
89
|
|
|
91
90
|
declare type DashboardStore = {
|
|
91
|
+
authToken?: AuthToken;
|
|
92
92
|
theme?: 'light' | 'dark' | 'system';
|
|
93
93
|
themeStyle?: StyleProps;
|
|
94
94
|
dashboard: TDashboard;
|
|
@@ -256,6 +256,10 @@ export declare function useActions(): {
|
|
|
256
256
|
|
|
257
257
|
export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardStore>, "setState"> & {
|
|
258
258
|
setState(nextStateOrUpdater: DashboardStore | Partial<DashboardStore> | ((state: {
|
|
259
|
+
authToken?: {
|
|
260
|
+
accessToken: string;
|
|
261
|
+
refreshToken: string;
|
|
262
|
+
} | undefined;
|
|
259
263
|
theme?: "light" | "dark" | "system" | undefined;
|
|
260
264
|
themeStyle?: {
|
|
261
265
|
dashboardPanel?: string | undefined;
|
|
@@ -465,6 +469,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
465
469
|
onUpdateCard?: ((card: TCard, sheetId: string) => void) | undefined;
|
|
466
470
|
onRemoveCard?: ((card: TCard, sheetId: string) => void) | undefined;
|
|
467
471
|
actions: {
|
|
472
|
+
setAuthToken: (authToken: AuthToken) => void;
|
|
468
473
|
setThemeStyle: (themeStyle: StyleProps) => void;
|
|
469
474
|
setIsEditorSaveEvent: (isEditorSaveEvent: boolean) => void;
|
|
470
475
|
setDashboard: (dashboard: TDashboard) => void;
|