semaphor 0.0.28 → 0.0.29
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 +31 -14
- package/dist/react-semaphor.js +9326 -9432
- package/dist/react-semaphor.umd.cjs +80 -80
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -10,8 +10,9 @@ import { FC } from 'react';
|
|
|
10
10
|
import { FontSpec } from 'chart.js';
|
|
11
11
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
12
12
|
import { Layout } from 'react-grid-layout';
|
|
13
|
+
import { Layouts } from 'react-grid-layout';
|
|
13
14
|
import { Point } from 'chart.js';
|
|
14
|
-
import { default as
|
|
15
|
+
import { default as ReactGridLayout_2 } from 'react-grid-layout';
|
|
15
16
|
import { StoreApi } from 'zustand';
|
|
16
17
|
import { UseBoundStore } from 'zustand';
|
|
17
18
|
|
|
@@ -26,7 +27,8 @@ declare type Actions = {
|
|
|
26
27
|
setDashboardTheme: (theme: 'light' | 'dark' | 'system') => void;
|
|
27
28
|
setSheets: (sheets: TSheet[]) => void;
|
|
28
29
|
setSelectedSheetId: (sheetId: string | null) => void;
|
|
29
|
-
setSheetLayout: (sheetId: string, layout:
|
|
30
|
+
setSheetLayout: (sheetId: string, layout: ReactGridLayout_2.Layout[]) => void;
|
|
31
|
+
setSheetLayouts: (sheetId: string, layouts: ReactGridLayout_2.Layouts) => void;
|
|
30
32
|
setSelectedCardId: (sheetId: string, cardId: string | null) => void;
|
|
31
33
|
setSelectedFrameId: (frameId: string) => void;
|
|
32
34
|
setCardTitle: (sheetId: string, cardId: string, title: string) => void;
|
|
@@ -62,7 +64,8 @@ declare type Actions = {
|
|
|
62
64
|
getSelectedSheet: () => TSheet | undefined;
|
|
63
65
|
getCard: (cardId: string) => TCard | undefined;
|
|
64
66
|
getSelectedFrame: () => TFrame | undefined;
|
|
65
|
-
getSelectedSheetLayout: () =>
|
|
67
|
+
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
68
|
+
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
66
69
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
67
70
|
};
|
|
68
71
|
|
|
@@ -161,15 +164,6 @@ export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
|
161
164
|
|
|
162
165
|
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
163
166
|
|
|
164
|
-
export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
|
|
165
|
-
|
|
166
|
-
declare type DashboardCardProps = {
|
|
167
|
-
card: TCard;
|
|
168
|
-
footer?: React_2.ReactNode;
|
|
169
|
-
showControls?: boolean;
|
|
170
|
-
fetchCardData?: boolean;
|
|
171
|
-
} & React_2.HTMLAttributes<HTMLDivElement>;
|
|
172
|
-
|
|
173
167
|
export declare function DashboardPlus({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
174
168
|
|
|
175
169
|
declare type DashboardPlusProps = {
|
|
@@ -299,6 +293,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
|
|
|
299
293
|
title?: string | undefined;
|
|
300
294
|
description?: string | undefined;
|
|
301
295
|
layout?: Layout[] | undefined;
|
|
296
|
+
layouts?: Layouts | undefined;
|
|
302
297
|
cards?: TCard[] | undefined;
|
|
303
298
|
}[] | undefined;
|
|
304
299
|
id: string;
|
|
@@ -472,6 +467,7 @@ export declare type TSheet = {
|
|
|
472
467
|
title?: string;
|
|
473
468
|
description?: string;
|
|
474
469
|
layout?: ReactGridLayout.Layout[];
|
|
470
|
+
layouts?: ReactGridLayout.Layouts;
|
|
475
471
|
cards?: TCard[];
|
|
476
472
|
frames?: TFrame[];
|
|
477
473
|
};
|
|
@@ -602,6 +598,25 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
602
598
|
resizeHandles?: ("s" | "w" | "e" | "n" | "sw" | "nw" | "se" | "ne")[] | undefined;
|
|
603
599
|
isBounded?: boolean | undefined;
|
|
604
600
|
}[] | undefined;
|
|
601
|
+
layouts?: {
|
|
602
|
+
[x: string]: {
|
|
603
|
+
i: string;
|
|
604
|
+
x: number;
|
|
605
|
+
y: number;
|
|
606
|
+
w: number;
|
|
607
|
+
h: number;
|
|
608
|
+
minW?: number | undefined;
|
|
609
|
+
maxW?: number | undefined;
|
|
610
|
+
minH?: number | undefined;
|
|
611
|
+
maxH?: number | undefined;
|
|
612
|
+
moved?: boolean | undefined;
|
|
613
|
+
static?: boolean | undefined;
|
|
614
|
+
isDraggable?: boolean | undefined;
|
|
615
|
+
isResizable?: boolean | undefined;
|
|
616
|
+
resizeHandles?: ("s" | "w" | "e" | "n" | "sw" | "nw" | "se" | "ne")[] | undefined;
|
|
617
|
+
isBounded?: boolean | undefined;
|
|
618
|
+
}[];
|
|
619
|
+
} | undefined;
|
|
605
620
|
cards?: {
|
|
606
621
|
id: string;
|
|
607
622
|
title: string;
|
|
@@ -832,7 +847,8 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
832
847
|
setDashboardTheme: (theme: 'light' | 'dark' | 'system') => void;
|
|
833
848
|
setSheets: (sheets: TSheet[]) => void;
|
|
834
849
|
setSelectedSheetId: (sheetId: string | null) => void;
|
|
835
|
-
setSheetLayout: (sheetId: string, layout:
|
|
850
|
+
setSheetLayout: (sheetId: string, layout: ReactGridLayout_2.Layout[]) => void;
|
|
851
|
+
setSheetLayouts: (sheetId: string, layouts: ReactGridLayout_2.Layouts) => void;
|
|
836
852
|
setSelectedCardId: (sheetId: string, cardId: string | null) => void;
|
|
837
853
|
setSelectedFrameId: (frameId: string) => void;
|
|
838
854
|
setCardTitle: (sheetId: string, cardId: string, title: string) => void;
|
|
@@ -868,7 +884,8 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
868
884
|
getSelectedSheet: () => TSheet | undefined;
|
|
869
885
|
getCard: (cardId: string) => TCard | undefined;
|
|
870
886
|
getSelectedFrame: () => TFrame | undefined;
|
|
871
|
-
getSelectedSheetLayout: () =>
|
|
887
|
+
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
888
|
+
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
872
889
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
873
890
|
};
|
|
874
891
|
}) => void), shouldReplace?: boolean | undefined): void;
|