@potop/public-dashboard 0.1.3 → 0.1.5
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/index.d.ts +27 -0
- package/dist/redash-public-dashboard.js +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
|
|
3
|
+
export interface PublicDashboardEmbedProps {
|
|
4
|
+
/** Redash origin, e.g. https://redash.example.com */
|
|
5
|
+
redashUrl: string;
|
|
6
|
+
/** Public dashboard share token (doubles as the api key). */
|
|
7
|
+
token: string;
|
|
8
|
+
/** Global parameter values keyed by parameter name. */
|
|
9
|
+
parameters?: Record<string, unknown>;
|
|
10
|
+
/** Called once the dashboard payload has loaded. */
|
|
11
|
+
onLoad?: (info: { id: number; name: string }) => void;
|
|
12
|
+
/** Called on load failure. */
|
|
13
|
+
onError?: (error: unknown) => void;
|
|
14
|
+
/** Called when a chart point is clicked inside a widget. */
|
|
15
|
+
onChartClick?: (data: Record<string, unknown>) => void;
|
|
16
|
+
/** Called when a link inside any widget (chart, table cell, heatmap, card, …)
|
|
17
|
+
* is clicked. Only fires when the producer gates allow it — typically
|
|
18
|
+
* target="_parent" + parentLinksProcessingEnabled. */
|
|
19
|
+
onLinkClick?: (href: string, target: string) => void;
|
|
20
|
+
/** Rendered while the dashboard payload is loading. */
|
|
21
|
+
loadingComponent?: React.ReactNode;
|
|
22
|
+
className?: string;
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const PublicDashboardEmbed: React.ComponentType<PublicDashboardEmbedProps>;
|
|
27
|
+
export default PublicDashboardEmbed;
|