semaphor 0.0.23 → 0.0.24
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 -7
- package/dist/react-semaphor.js +3856 -3852
- package/dist/react-semaphor.umd.cjs +73 -73
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -110,6 +110,11 @@ export declare type AuthToken = {
|
|
|
110
110
|
refreshToken: string;
|
|
111
111
|
};
|
|
112
112
|
|
|
113
|
+
declare type BaseCustomCard = {
|
|
114
|
+
cardId: string;
|
|
115
|
+
replaceDefault?: boolean;
|
|
116
|
+
};
|
|
117
|
+
|
|
113
118
|
declare type BaseFilter = {
|
|
114
119
|
filterId: TFilter['id'];
|
|
115
120
|
expression?: string;
|
|
@@ -125,19 +130,28 @@ export declare type Bookmark = {
|
|
|
125
130
|
filterValues?: TFilterValue[];
|
|
126
131
|
};
|
|
127
132
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
export declare type CustomCard = {
|
|
131
|
-
cardId: string;
|
|
133
|
+
declare type CardWithContent = BaseCustomCard & {
|
|
132
134
|
content: React.FC<{
|
|
133
135
|
card: TCard;
|
|
134
136
|
}>;
|
|
135
137
|
footer?: React.FC<{
|
|
136
138
|
card: TCard;
|
|
137
139
|
}>;
|
|
138
|
-
replaceDefault?: boolean;
|
|
139
140
|
};
|
|
140
141
|
|
|
142
|
+
declare type CardWithFooter = BaseCustomCard & {
|
|
143
|
+
content?: React.FC<{
|
|
144
|
+
card: TCard;
|
|
145
|
+
}>;
|
|
146
|
+
footer: React.FC<{
|
|
147
|
+
card: TCard;
|
|
148
|
+
}>;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
export declare function cleanCard(card: TCard): TCard;
|
|
152
|
+
|
|
153
|
+
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
154
|
+
|
|
141
155
|
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
142
156
|
|
|
143
157
|
export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
|
|
@@ -163,6 +177,7 @@ export declare type DashboardProps = {
|
|
|
163
177
|
currentTheme?: 'light' | 'dark' | 'system';
|
|
164
178
|
version?: string;
|
|
165
179
|
customCards?: CustomCard[];
|
|
180
|
+
onChartElementClicked?: (card: TCard, fieldValues: any) => void;
|
|
166
181
|
onEvent?: (event: TEvent) => void;
|
|
167
182
|
onSave?: (dashboard: TDashboard) => void;
|
|
168
183
|
LoadingComponent?: (props: LoadingProps) => React.ReactNode;
|
|
@@ -608,16 +623,25 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
608
623
|
database: string;
|
|
609
624
|
sql: string;
|
|
610
625
|
}[] | undefined;
|
|
611
|
-
customCards?: {
|
|
626
|
+
customCards?: ({
|
|
612
627
|
cardId: string;
|
|
628
|
+
replaceDefault?: boolean | undefined;
|
|
613
629
|
content: FC<{
|
|
614
630
|
card: TCard;
|
|
615
631
|
}>;
|
|
616
632
|
footer?: FC<{
|
|
617
633
|
card: TCard;
|
|
618
634
|
}> | undefined;
|
|
635
|
+
} | {
|
|
636
|
+
cardId: string;
|
|
619
637
|
replaceDefault?: boolean | undefined;
|
|
620
|
-
|
|
638
|
+
content?: FC<{
|
|
639
|
+
card: TCard;
|
|
640
|
+
}> | undefined;
|
|
641
|
+
footer: FC<{
|
|
642
|
+
card: TCard;
|
|
643
|
+
}>;
|
|
644
|
+
})[] | undefined;
|
|
621
645
|
};
|
|
622
646
|
selectedSheetId?: string | null | undefined;
|
|
623
647
|
selectedCardId?: string | null | undefined;
|