deepspotscreen-sdk 0.0.1
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/README.md +485 -0
- package/dist/DeepspotSDK-CyX06_c2.js +1486 -0
- package/dist/DeepspotSDK-g7o9tAip.cjs +546 -0
- package/dist/_commonjsHelpers-MeVG4QFm.cjs +1 -0
- package/dist/_commonjsHelpers-bAxELxBV.js +8 -0
- package/dist/apexcharts.common-DGzslxI3.cjs +808 -0
- package/dist/apexcharts.common-k3hLWpB8.js +8956 -0
- package/dist/components/DashboardElement.d.ts +18 -0
- package/dist/components/ReportElement.d.ts +15 -0
- package/dist/core/ApiClient.d.ts +41 -0
- package/dist/core/DeepspotSDK.d.ts +11 -0
- package/dist/core/EmbedInstance.d.ts +46 -0
- package/dist/deepspot-sdk.esm.js +1704 -0
- package/dist/deepspot-sdk.js +1655 -0
- package/dist/html2canvas.esm-CzwMv54K.js +4870 -0
- package/dist/html2canvas.esm-EoNFmhrp.cjs +22 -0
- package/dist/index.d.ts +146 -0
- package/dist/index.es-C-ai08UC.js +5632 -0
- package/dist/index.es-ELJ1Oc0z.cjs +18 -0
- package/dist/index.es-TiU5c3LF.js +5632 -0
- package/dist/jspdf.es.min-D6GjoB2T.cjs +243 -0
- package/dist/jspdf.es.min-Ge0fRUwj.js +8107 -0
- package/dist/jspdf.es.min-d9hlG26J.js +8107 -0
- package/dist/layout/GridLayout.d.ts +25 -0
- package/dist/purify.es-CuxL4pit.js +471 -0
- package/dist/purify.es-D_pYQKft.cjs +3 -0
- package/dist/react/index.cjs +1 -0
- package/dist/react/index.d.ts +33 -0
- package/dist/react/index.mjs +188 -0
- package/dist/renderer/CardRenderer.d.ts +6 -0
- package/dist/renderer/ChartRenderer.d.ts +19 -0
- package/dist/renderer/DashboardRenderer.d.ts +64 -0
- package/dist/renderer/FilterRenderer.d.ts +20 -0
- package/dist/renderer/ReportRenderer.d.ts +14 -0
- package/dist/renderer/TableRenderer.d.ts +8 -0
- package/dist/types.d.ts +140 -0
- package/dist/utils.d.ts +4 -0
- package/dist/vue/index.cjs +1 -0
- package/dist/vue/index.d.ts +212 -0
- package/dist/vue/index.mjs +138 -0
- package/package.json +69 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
export declare interface ComponentConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
type: ComponentType;
|
|
4
|
+
title: string;
|
|
5
|
+
position: ComponentPosition;
|
|
6
|
+
tabId: string;
|
|
7
|
+
pageId: string;
|
|
8
|
+
properties?: {
|
|
9
|
+
xAxis?: string;
|
|
10
|
+
yAxis?: string | string[];
|
|
11
|
+
selectedYAxisColumn?: any;
|
|
12
|
+
columns?: string[];
|
|
13
|
+
metric?: string;
|
|
14
|
+
aggregation?: string;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
suffix?: string;
|
|
17
|
+
currencySymbol?: string;
|
|
18
|
+
backgroundColor?: string;
|
|
19
|
+
textColor?: string;
|
|
20
|
+
colors?: Record<string, string>;
|
|
21
|
+
showLegend?: boolean;
|
|
22
|
+
xAxisLabel?: string;
|
|
23
|
+
yAxisLabel?: string;
|
|
24
|
+
content?: string;
|
|
25
|
+
style?: Record<string, any>;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface ComponentPosition {
|
|
30
|
+
x: number;
|
|
31
|
+
y: number;
|
|
32
|
+
w: number;
|
|
33
|
+
h: number;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
declare type ComponentType = 'bar' | 'line' | 'pie' | 'donut' | 'area' | 'table' | 'number-card' | 'filter' | 'text';
|
|
37
|
+
|
|
38
|
+
export declare interface DashboardPage {
|
|
39
|
+
pageId: string;
|
|
40
|
+
title: string;
|
|
41
|
+
backgroundColor?: string;
|
|
42
|
+
tabs: PageTab[];
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export declare class DeepspotSDK {
|
|
46
|
+
private readonly apiClient;
|
|
47
|
+
constructor(config: SDKConfig);
|
|
48
|
+
embedDashboard(options: EmbedDashboardOptions): Promise<EmbedInstance>;
|
|
49
|
+
embedReport(options: EmbedReportOptions): Promise<EmbedInstance>;
|
|
50
|
+
private createRoot;
|
|
51
|
+
private showLoading;
|
|
52
|
+
private showError;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export declare interface EmbedDashboardOptions {
|
|
56
|
+
dashboardId: string;
|
|
57
|
+
container: string | HTMLElement;
|
|
58
|
+
/** Controls what navigation is visible and what gets lazy-loaded */
|
|
59
|
+
embedLevel?: EmbedLevel;
|
|
60
|
+
userId?: string;
|
|
61
|
+
tenantId?: string;
|
|
62
|
+
theme?: 'light' | 'dark';
|
|
63
|
+
filters?: Record<string, any>;
|
|
64
|
+
/** Initial page to show — required for embedLevel 'tab' and 'page' */
|
|
65
|
+
pageId?: string;
|
|
66
|
+
/** Initial tab to show — required for embedLevel 'tab' */
|
|
67
|
+
tabId?: string;
|
|
68
|
+
hideFilters?: boolean;
|
|
69
|
+
hideExport?: boolean;
|
|
70
|
+
height?: string;
|
|
71
|
+
onReady?: () => void;
|
|
72
|
+
onFilterChange?: (filters: Record<string, any>) => void;
|
|
73
|
+
onTabSwitch?: (pageId: string, tabId: string) => void;
|
|
74
|
+
onPageSwitch?: (pageId: string) => void;
|
|
75
|
+
onError?: (error: string) => void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export declare interface EmbedInstance {
|
|
79
|
+
setFilter(field: string, value: any): void;
|
|
80
|
+
setFilters(filters: Record<string, any>): void;
|
|
81
|
+
goToPage(pageId: string): void;
|
|
82
|
+
goToTab(pageId: string, tabId: string): void;
|
|
83
|
+
refresh(): void;
|
|
84
|
+
exportPDF(): void;
|
|
85
|
+
destroy(): void;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
declare type EmbedLevel = 'report' | 'tab' | 'page' | 'dashboard';
|
|
89
|
+
|
|
90
|
+
export declare interface EmbedReportOptions {
|
|
91
|
+
dashboardId: string;
|
|
92
|
+
componentId: string;
|
|
93
|
+
container: string | HTMLElement;
|
|
94
|
+
userId?: string;
|
|
95
|
+
tenantId?: string;
|
|
96
|
+
theme?: 'light' | 'dark';
|
|
97
|
+
filters?: Record<string, any>;
|
|
98
|
+
height?: string;
|
|
99
|
+
onReady?: () => void;
|
|
100
|
+
onError?: (error: string) => void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare interface FilterDefinition {
|
|
104
|
+
filterId: string;
|
|
105
|
+
label: string;
|
|
106
|
+
type: 'dropdown' | 'multi-select' | 'date-range' | 'text-input' | 'number-input';
|
|
107
|
+
options?: string[];
|
|
108
|
+
defaultValue?: any;
|
|
109
|
+
targetComponents: string[];
|
|
110
|
+
filterOperator?: string;
|
|
111
|
+
applyToField?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export declare interface PageTab {
|
|
115
|
+
id: string;
|
|
116
|
+
title: string;
|
|
117
|
+
tabOrder?: number;
|
|
118
|
+
isDefault?: boolean;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export declare interface RenderResponse {
|
|
122
|
+
embedType: 'dashboard' | 'report';
|
|
123
|
+
embedLevel: EmbedLevel;
|
|
124
|
+
dashboard: {
|
|
125
|
+
name: string;
|
|
126
|
+
theme: 'light' | 'dark';
|
|
127
|
+
/** ALL pages + tabs metadata — always returned for building navigation */
|
|
128
|
+
pages: DashboardPage[];
|
|
129
|
+
};
|
|
130
|
+
/** Currently active page ID */
|
|
131
|
+
activePage: string;
|
|
132
|
+
/** Currently active tab ID */
|
|
133
|
+
activeTab: string;
|
|
134
|
+
/** ONLY components belonging to the active page + tab */
|
|
135
|
+
components: ComponentConfig[];
|
|
136
|
+
/** Pre-executed SQL results — only for active tab's components */
|
|
137
|
+
data: Record<string, Record<string, any>[]>;
|
|
138
|
+
filters: FilterDefinition[];
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export declare interface SDKConfig {
|
|
142
|
+
apiKey: string;
|
|
143
|
+
baseUrl: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export { }
|