semaphor 0.0.47 → 0.0.49
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/chunks/dashboard-plus-4h_dG_jo.js +210 -0
- package/dist/chunks/dashboard-plus-zWycIkYs.js +4326 -0
- package/dist/chunks/index-TDaW4qPC.js +421 -0
- package/dist/chunks/index-qjDx7Ig8.js +53791 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/dashboard.d.ts +64 -2
- package/dist/types/main.d.ts +570 -12
- package/dist/types/surfboard.d.ts +64 -2
- package/dist/types/types.d.ts +64 -2
- package/package.json +5 -1
- package/dist/chunks/dashboard-plus-1eyVwWds.js +0 -228
- package/dist/chunks/dashboard-plus-k_LsKxv1.js +0 -10751
- package/dist/chunks/index-J6hHt1a9.js +0 -43449
- package/dist/chunks/index-gGj_6O-g.js +0 -364
|
@@ -3,6 +3,14 @@ import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
|
3
3
|
|
|
4
4
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
5
5
|
|
|
6
|
+
export declare type AIScopeTable = {
|
|
7
|
+
connectinonId: string;
|
|
8
|
+
connectionType: string;
|
|
9
|
+
databaseName?: string;
|
|
10
|
+
schemaName?: string;
|
|
11
|
+
tableName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
6
14
|
export declare type AuthToken = {
|
|
7
15
|
accessToken: string;
|
|
8
16
|
refreshToken?: string;
|
|
@@ -48,6 +56,12 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
48
56
|
}>;
|
|
49
57
|
};
|
|
50
58
|
|
|
59
|
+
export declare type ColorRange = {
|
|
60
|
+
start: number;
|
|
61
|
+
end: number;
|
|
62
|
+
color: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
51
65
|
export declare type ConnectionPolicy = {
|
|
52
66
|
connectionId?: string;
|
|
53
67
|
name: string;
|
|
@@ -75,6 +89,14 @@ export declare type DashboardProps = {
|
|
|
75
89
|
ErrorComponent?: (props: ErrorProps) => React.ReactNode;
|
|
76
90
|
};
|
|
77
91
|
|
|
92
|
+
export declare type DateOptions = {
|
|
93
|
+
locale: string;
|
|
94
|
+
format: string;
|
|
95
|
+
options: Intl.DateTimeFormatOptions;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export declare type DisplayDataType = 'string' | 'date' | 'number';
|
|
99
|
+
|
|
78
100
|
export declare type ErrorProps = {
|
|
79
101
|
message?: string;
|
|
80
102
|
};
|
|
@@ -123,8 +145,28 @@ export declare type LoadingProps = {
|
|
|
123
145
|
message?: string;
|
|
124
146
|
};
|
|
125
147
|
|
|
148
|
+
export declare type NumberAxisFormat = {
|
|
149
|
+
decimalPlaces?: number;
|
|
150
|
+
suffix?: string;
|
|
151
|
+
currency?: string;
|
|
152
|
+
locale?: string;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
export declare type NumberOptions = {
|
|
156
|
+
locale: string;
|
|
157
|
+
currency?: string;
|
|
158
|
+
options: Intl.NumberFormatOptions;
|
|
159
|
+
colorRanges?: ColorRange[];
|
|
160
|
+
};
|
|
161
|
+
|
|
126
162
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
127
163
|
|
|
164
|
+
declare type OptionsMap = {
|
|
165
|
+
number: NumberOptions;
|
|
166
|
+
string: StringOptions;
|
|
167
|
+
date: DateOptions;
|
|
168
|
+
};
|
|
169
|
+
|
|
128
170
|
declare type Params = {
|
|
129
171
|
[key: string]: string | number | string[] | number[];
|
|
130
172
|
};
|
|
@@ -137,6 +179,10 @@ export declare type SqlGen = {
|
|
|
137
179
|
dimensions?: string[];
|
|
138
180
|
};
|
|
139
181
|
|
|
182
|
+
declare type StringOptions = {
|
|
183
|
+
maxLength?: number;
|
|
184
|
+
};
|
|
185
|
+
|
|
140
186
|
/**
|
|
141
187
|
* Style propeerites for the dashboard
|
|
142
188
|
*/
|
|
@@ -163,6 +209,9 @@ export declare type StyleProps = {
|
|
|
163
209
|
/** chart options */
|
|
164
210
|
options?: any;
|
|
165
211
|
};
|
|
212
|
+
table?: {
|
|
213
|
+
tableHeaderColor?: string;
|
|
214
|
+
};
|
|
166
215
|
};
|
|
167
216
|
|
|
168
217
|
export declare function Surfboard({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
@@ -206,14 +255,19 @@ export declare type TCardPreferences = {
|
|
|
206
255
|
filterOnClickField?: string;
|
|
207
256
|
filterOnClickColumnIndex?: number;
|
|
208
257
|
formatNumber?: {
|
|
209
|
-
|
|
258
|
+
decimalPlaces?: number;
|
|
210
259
|
currency?: string;
|
|
211
260
|
locale?: string;
|
|
212
261
|
suffix?: string;
|
|
213
262
|
enabled?: boolean | string;
|
|
263
|
+
colorRanges?: ColorRange[];
|
|
214
264
|
};
|
|
265
|
+
numberAxisFormat?: NumberAxisFormat;
|
|
215
266
|
datasetOptions?: TDatasetOptions[];
|
|
216
267
|
chartOptions?: TChartOptions;
|
|
268
|
+
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
269
|
+
allowDownload?: boolean;
|
|
270
|
+
customVisualCode?: string;
|
|
217
271
|
};
|
|
218
272
|
|
|
219
273
|
export declare type TChartOptions = {
|
|
@@ -239,7 +293,13 @@ export declare type TChartOptions = {
|
|
|
239
293
|
indexAxis?: 'x' | 'y' | undefined;
|
|
240
294
|
};
|
|
241
295
|
|
|
242
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'custom';
|
|
296
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'pyramid' | 'range' | 'custom';
|
|
297
|
+
|
|
298
|
+
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
299
|
+
columnIdx: number;
|
|
300
|
+
type: T;
|
|
301
|
+
options: OptionsMap[T];
|
|
302
|
+
};
|
|
243
303
|
|
|
244
304
|
export declare type TDashboard = {
|
|
245
305
|
id: string;
|
|
@@ -250,6 +310,8 @@ export declare type TDashboard = {
|
|
|
250
310
|
filters?: TFilter[];
|
|
251
311
|
customCards?: CustomCard[];
|
|
252
312
|
baseQueries?: TBaseQuery[];
|
|
313
|
+
aiScopeTables?: AIScopeTable[];
|
|
314
|
+
globalStyle?: TStyle;
|
|
253
315
|
};
|
|
254
316
|
|
|
255
317
|
export declare type TDataColumn = {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -2,6 +2,14 @@ import { FontSpec } from 'chart.js';
|
|
|
2
2
|
|
|
3
3
|
export declare type AggregateCalc = 'AVG' | 'MIN' | 'MAX' | 'SUM' | 'COUNT' | 'COUNT_DISTINCT';
|
|
4
4
|
|
|
5
|
+
export declare type AIScopeTable = {
|
|
6
|
+
connectinonId: string;
|
|
7
|
+
connectionType: string;
|
|
8
|
+
databaseName?: string;
|
|
9
|
+
schemaName?: string;
|
|
10
|
+
tableName: string;
|
|
11
|
+
};
|
|
12
|
+
|
|
5
13
|
export declare type AuthToken = {
|
|
6
14
|
accessToken: string;
|
|
7
15
|
refreshToken?: string;
|
|
@@ -47,6 +55,12 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
47
55
|
}>;
|
|
48
56
|
};
|
|
49
57
|
|
|
58
|
+
export declare type ColorRange = {
|
|
59
|
+
start: number;
|
|
60
|
+
end: number;
|
|
61
|
+
color: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
50
64
|
export declare type ConnectionPolicy = {
|
|
51
65
|
connectionId?: string;
|
|
52
66
|
name: string;
|
|
@@ -69,6 +83,14 @@ export declare type DashboardProps = {
|
|
|
69
83
|
ErrorComponent?: (props: ErrorProps) => React.ReactNode;
|
|
70
84
|
};
|
|
71
85
|
|
|
86
|
+
export declare type DateOptions = {
|
|
87
|
+
locale: string;
|
|
88
|
+
format: string;
|
|
89
|
+
options: Intl.DateTimeFormatOptions;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export declare type DisplayDataType = 'string' | 'date' | 'number';
|
|
93
|
+
|
|
72
94
|
export declare type ErrorProps = {
|
|
73
95
|
message?: string;
|
|
74
96
|
};
|
|
@@ -117,8 +139,28 @@ export declare type LoadingProps = {
|
|
|
117
139
|
message?: string;
|
|
118
140
|
};
|
|
119
141
|
|
|
142
|
+
export declare type NumberAxisFormat = {
|
|
143
|
+
decimalPlaces?: number;
|
|
144
|
+
suffix?: string;
|
|
145
|
+
currency?: string;
|
|
146
|
+
locale?: string;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
export declare type NumberOptions = {
|
|
150
|
+
locale: string;
|
|
151
|
+
currency?: string;
|
|
152
|
+
options: Intl.NumberFormatOptions;
|
|
153
|
+
colorRanges?: ColorRange[];
|
|
154
|
+
};
|
|
155
|
+
|
|
120
156
|
declare type Operation = '=' | '>' | '<' | '>=' | '<=' | '!=' | 'in' | 'not in' | 'like' | 'not like' | 'between' | 'not between' | 'is null' | 'is not null';
|
|
121
157
|
|
|
158
|
+
declare type OptionsMap = {
|
|
159
|
+
number: NumberOptions;
|
|
160
|
+
string: StringOptions;
|
|
161
|
+
date: DateOptions;
|
|
162
|
+
};
|
|
163
|
+
|
|
122
164
|
declare type Params = {
|
|
123
165
|
[key: string]: string | number | string[] | number[];
|
|
124
166
|
};
|
|
@@ -131,6 +173,10 @@ export declare type SqlGen = {
|
|
|
131
173
|
dimensions?: string[];
|
|
132
174
|
};
|
|
133
175
|
|
|
176
|
+
declare type StringOptions = {
|
|
177
|
+
maxLength?: number;
|
|
178
|
+
};
|
|
179
|
+
|
|
134
180
|
/**
|
|
135
181
|
* Style propeerites for the dashboard
|
|
136
182
|
*/
|
|
@@ -157,6 +203,9 @@ export declare type StyleProps = {
|
|
|
157
203
|
/** chart options */
|
|
158
204
|
options?: any;
|
|
159
205
|
};
|
|
206
|
+
table?: {
|
|
207
|
+
tableHeaderColor?: string;
|
|
208
|
+
};
|
|
160
209
|
};
|
|
161
210
|
|
|
162
211
|
export declare type TBaseQuery = {
|
|
@@ -198,14 +247,19 @@ export declare type TCardPreferences = {
|
|
|
198
247
|
filterOnClickField?: string;
|
|
199
248
|
filterOnClickColumnIndex?: number;
|
|
200
249
|
formatNumber?: {
|
|
201
|
-
|
|
250
|
+
decimalPlaces?: number;
|
|
202
251
|
currency?: string;
|
|
203
252
|
locale?: string;
|
|
204
253
|
suffix?: string;
|
|
205
254
|
enabled?: boolean | string;
|
|
255
|
+
colorRanges?: ColorRange[];
|
|
206
256
|
};
|
|
257
|
+
numberAxisFormat?: NumberAxisFormat;
|
|
207
258
|
datasetOptions?: TDatasetOptions[];
|
|
208
259
|
chartOptions?: TChartOptions;
|
|
260
|
+
columnSettings?: TColumnSetting<DisplayDataType>[];
|
|
261
|
+
allowDownload?: boolean;
|
|
262
|
+
customVisualCode?: string;
|
|
209
263
|
};
|
|
210
264
|
|
|
211
265
|
export declare type TChartOptions = {
|
|
@@ -231,7 +285,13 @@ export declare type TChartOptions = {
|
|
|
231
285
|
indexAxis?: 'x' | 'y' | undefined;
|
|
232
286
|
};
|
|
233
287
|
|
|
234
|
-
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'custom';
|
|
288
|
+
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'pyramid' | 'range' | 'custom';
|
|
289
|
+
|
|
290
|
+
export declare type TColumnSetting<T extends DisplayDataType> = {
|
|
291
|
+
columnIdx: number;
|
|
292
|
+
type: T;
|
|
293
|
+
options: OptionsMap[T];
|
|
294
|
+
};
|
|
235
295
|
|
|
236
296
|
export declare type TDashboard = {
|
|
237
297
|
id: string;
|
|
@@ -242,6 +302,8 @@ export declare type TDashboard = {
|
|
|
242
302
|
filters?: TFilter[];
|
|
243
303
|
customCards?: CustomCard[];
|
|
244
304
|
baseQueries?: TBaseQuery[];
|
|
305
|
+
aiScopeTables?: AIScopeTable[];
|
|
306
|
+
globalStyle?: TStyle;
|
|
245
307
|
};
|
|
246
308
|
|
|
247
309
|
export declare type TDataColumn = {
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"email": "support@semaphor.cloud"
|
|
6
6
|
},
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"version": "0.0.
|
|
8
|
+
"version": "0.0.49",
|
|
9
9
|
"description": "Fully interactive and customizable dashboards for your apps.",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"react",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"preview": "vite preview"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
+
"@ai-sdk/react": "^0.0.36",
|
|
48
49
|
"@headlessui/react": "^1.7.18",
|
|
49
50
|
"@monaco-editor/react": "^4.6.0",
|
|
50
51
|
"@r2wc/react-to-web-component": "^2.0.3",
|
|
@@ -69,6 +70,7 @@
|
|
|
69
70
|
"@tailwindcss/container-queries": "^0.1.1",
|
|
70
71
|
"@tanstack/react-query": "^5.15.0",
|
|
71
72
|
"@tanstack/react-table": "^8.11.7",
|
|
73
|
+
"ai": "^3.3.0",
|
|
72
74
|
"chart.js": "^4.4.1",
|
|
73
75
|
"chartjs-plugin-datalabels": "^2.2.0",
|
|
74
76
|
"class-variance-authority": "^0.7.0",
|
|
@@ -81,6 +83,7 @@
|
|
|
81
83
|
"lodash": "^4.17.21",
|
|
82
84
|
"lucide-react": "^0.379.0",
|
|
83
85
|
"ms": "^2.1.3",
|
|
86
|
+
"next-themes": "^0.3.0",
|
|
84
87
|
"react": "^18.2.0",
|
|
85
88
|
"react-day-picker": "^8.10.0",
|
|
86
89
|
"react-dom": "^18.2.0",
|
|
@@ -90,6 +93,7 @@
|
|
|
90
93
|
"react-resizable-panels": "^1.0.7",
|
|
91
94
|
"react-select": "^5.8.0",
|
|
92
95
|
"react-split-pane": "^2.0.3",
|
|
96
|
+
"sonner": "^1.5.0",
|
|
93
97
|
"tailwind-merge": "^2.1.0",
|
|
94
98
|
"tailwindcss-animate": "^1.0.7",
|
|
95
99
|
"uuid": "^9.0.1",
|