@adminforth/dashboard 1.4.2 → 1.6.0
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/custom/api/dashboardApi.ts +137 -5
- package/custom/model/dashboard.types.ts +32 -22
- package/custom/runtime/DashboardRuntime.vue +2 -3
- package/custom/skills/adminforth-dashboard/SKILL.md +165 -179
- package/custom/widgets/KpiCardWidget.vue +172 -9
- package/custom/widgets/chart/ChartWidget.vue +5 -5
- package/custom/widgets/registry.ts +4 -4
- package/dist/custom/api/dashboardApi.d.ts +46 -2
- package/dist/custom/api/dashboardApi.js +90 -5
- package/dist/custom/api/dashboardApi.ts +137 -5
- package/dist/custom/model/dashboard.types.d.ts +30 -14
- package/dist/custom/model/dashboard.types.js +2 -2
- package/dist/custom/model/dashboard.types.ts +32 -22
- package/dist/custom/queries/useDashboardConfig.d.ts +106 -104
- package/dist/custom/queries/useWidgetData.d.ts +106 -104
- package/dist/custom/runtime/DashboardRuntime.vue +2 -3
- package/dist/custom/skills/adminforth-dashboard/SKILL.md +165 -179
- package/dist/custom/widgets/KpiCardWidget.vue +172 -9
- package/dist/custom/widgets/chart/ChartWidget.vue +5 -5
- package/dist/custom/widgets/registry.js +4 -4
- package/dist/custom/widgets/registry.ts +4 -4
- package/dist/endpoint/dashboard.d.ts +2 -4
- package/dist/endpoint/dashboard.js +1 -21
- package/dist/endpoint/groups.d.ts +1 -0
- package/dist/endpoint/groups.js +61 -48
- package/dist/endpoint/widgets.d.ts +1 -0
- package/dist/endpoint/widgets.js +167 -64
- package/dist/schema/api.d.ts +11710 -2785
- package/dist/schema/api.js +118 -26
- package/dist/schema/widget.d.ts +425 -1980
- package/dist/schema/widget.js +13 -374
- package/dist/schema/widgets/charts.d.ts +1689 -0
- package/dist/schema/widgets/charts.js +92 -0
- package/dist/schema/widgets/common.d.ts +275 -0
- package/dist/schema/widgets/common.js +171 -0
- package/dist/schema/widgets/gauge-card.d.ts +172 -0
- package/dist/schema/widgets/gauge-card.js +28 -0
- package/dist/schema/widgets/kpi-card.d.ts +212 -0
- package/dist/schema/widgets/kpi-card.js +43 -0
- package/dist/schema/widgets/pivot-table.d.ts +196 -0
- package/dist/schema/widgets/pivot-table.js +17 -0
- package/dist/schema/widgets/table.d.ts +130 -0
- package/dist/schema/widgets/table.js +12 -0
- package/dist/services/dashboardConfigService.d.ts +4 -0
- package/dist/services/dashboardConfigService.js +46 -0
- package/dist/services/widgetDataService.js +96 -2
- package/endpoint/dashboard.ts +2 -33
- package/endpoint/groups.ts +91 -72
- package/endpoint/widgets.ts +260 -87
- package/package.json +1 -1
- package/schema/api.ts +148 -28
- package/schema/widget.ts +43 -425
- package/schema/widgets/charts.ts +113 -0
- package/schema/widgets/common.ts +194 -0
- package/schema/widgets/gauge-card.ts +34 -0
- package/schema/widgets/kpi-card.ts +49 -0
- package/schema/widgets/pivot-table.ts +24 -0
- package/schema/widgets/table.ts +18 -0
- package/services/dashboardConfigService.ts +73 -0
- package/services/widgetDataService.ts +129 -3
package/dist/schema/widget.js
CHANGED
|
@@ -1,378 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'number_delta',
|
|
16
|
-
'currency_delta',
|
|
17
|
-
]).optional();
|
|
18
|
-
const ChartFieldRefSchema = z.object({
|
|
19
|
-
field: z.string(),
|
|
20
|
-
label: z.string().optional(),
|
|
21
|
-
format: ValueFormatSchema,
|
|
22
|
-
}).strict();
|
|
23
|
-
const FieldRefSchema = z.union([
|
|
24
|
-
z.string(),
|
|
25
|
-
z.object({
|
|
26
|
-
field: z.string(),
|
|
27
|
-
label: z.string().optional(),
|
|
28
|
-
format: ValueFormatSchema,
|
|
29
|
-
}).strict(),
|
|
30
|
-
]);
|
|
31
|
-
const JsonValueSchema = z.lazy(() => z.union([
|
|
32
|
-
z.string(),
|
|
33
|
-
z.number(),
|
|
34
|
-
z.boolean(),
|
|
35
|
-
z.null(),
|
|
36
|
-
z.array(JsonValueSchema),
|
|
37
|
-
z.record(z.string(), JsonValueSchema),
|
|
38
|
-
]));
|
|
39
|
-
const FilterExpressionSchema = z.lazy(() => z.union([
|
|
40
|
-
z.array(FilterExpressionSchema),
|
|
41
|
-
z.object({
|
|
42
|
-
and: z.array(FilterExpressionSchema),
|
|
43
|
-
}).strict(),
|
|
44
|
-
z.object({
|
|
45
|
-
or: z.array(FilterExpressionSchema),
|
|
46
|
-
}).strict(),
|
|
47
|
-
z.object({
|
|
48
|
-
field: z.string(),
|
|
49
|
-
eq: JsonValueSchema.optional(),
|
|
50
|
-
neq: JsonValueSchema.optional(),
|
|
51
|
-
gt: JsonValueSchema.optional(),
|
|
52
|
-
gte: JsonValueSchema.optional(),
|
|
53
|
-
lt: JsonValueSchema.optional(),
|
|
54
|
-
lte: JsonValueSchema.optional(),
|
|
55
|
-
in: z.array(JsonValueSchema).optional(),
|
|
56
|
-
not_in: z.array(JsonValueSchema).optional(),
|
|
57
|
-
like: JsonValueSchema.optional(),
|
|
58
|
-
ilike: JsonValueSchema.optional(),
|
|
59
|
-
}).strict(),
|
|
60
|
-
]));
|
|
61
|
-
const QueryAggregateOperationSchema = z.enum([
|
|
62
|
-
'sum',
|
|
63
|
-
'count',
|
|
64
|
-
'count_distinct',
|
|
65
|
-
'avg',
|
|
66
|
-
'min',
|
|
67
|
-
'max',
|
|
68
|
-
'median',
|
|
69
|
-
]);
|
|
70
|
-
const QueryFieldSelectItemSchema = z.object({
|
|
71
|
-
field: z.string(),
|
|
72
|
-
as: z.string().optional(),
|
|
73
|
-
grain: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
74
|
-
}).strict();
|
|
75
|
-
const QueryAggregateSelectItemSchema = z.object({
|
|
76
|
-
agg: QueryAggregateOperationSchema,
|
|
77
|
-
field: z.string().optional(),
|
|
78
|
-
as: z.string(),
|
|
79
|
-
filters: FilterExpressionSchema.optional(),
|
|
80
|
-
}).strict().superRefine((item, ctx) => {
|
|
81
|
-
if (!['count'].includes(item.agg) && !item.field) {
|
|
82
|
-
ctx.addIssue({
|
|
83
|
-
code: 'custom',
|
|
84
|
-
path: ['field'],
|
|
85
|
-
message: `field is required for ${item.agg}`,
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
const QueryCalcSelectItemSchema = z.object({
|
|
90
|
-
calc: z.string(),
|
|
91
|
-
as: z.string(),
|
|
92
|
-
}).strict();
|
|
93
|
-
const QuerySelectItemSchema = z.union([
|
|
94
|
-
QueryFieldSelectItemSchema,
|
|
95
|
-
QueryAggregateSelectItemSchema,
|
|
96
|
-
QueryCalcSelectItemSchema,
|
|
97
|
-
]);
|
|
98
|
-
const QueryGroupByItemSchema = z.union([
|
|
99
|
-
z.string(),
|
|
100
|
-
z.object({
|
|
101
|
-
field: z.string(),
|
|
102
|
-
as: z.string().optional(),
|
|
103
|
-
grain: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
104
|
-
timezone: z.string().optional(),
|
|
105
|
-
}).strict(),
|
|
106
|
-
]);
|
|
107
|
-
const QueryOrderByItemSchema = z.object({
|
|
108
|
-
field: z.string(),
|
|
109
|
-
direction: z.enum(['asc', 'desc']).optional(),
|
|
110
|
-
}).strict();
|
|
111
|
-
const TimeSeriesConfigSchema = z.object({
|
|
112
|
-
field: z.string(),
|
|
113
|
-
grain: z.enum(['day', 'week', 'month', 'year']),
|
|
114
|
-
timezone: z.string().optional(),
|
|
115
|
-
}).strict();
|
|
116
|
-
const PeriodConfigSchema = z.object({
|
|
117
|
-
field: z.string(),
|
|
118
|
-
gte: JsonValueSchema.optional(),
|
|
119
|
-
lt: JsonValueSchema.optional(),
|
|
120
|
-
}).strict();
|
|
121
|
-
const BucketConfigSchema = z.object({
|
|
122
|
-
field: z.string(),
|
|
123
|
-
buckets: z.array(z.object({
|
|
124
|
-
label: z.string(),
|
|
125
|
-
min: z.number().optional(),
|
|
126
|
-
max: z.number().optional(),
|
|
127
|
-
}).strict()),
|
|
128
|
-
}).strict();
|
|
129
|
-
const QueryCalcItemSchema = z.object({
|
|
130
|
-
calc: z.string(),
|
|
131
|
-
as: z.string(),
|
|
132
|
-
}).strict();
|
|
133
|
-
const FormattingConfigSchema = z.record(z.string(), JsonValueSchema);
|
|
134
|
-
const VariablesConfigSchema = z.record(z.string(), JsonValueSchema);
|
|
135
|
-
export const QueryConfigSchema = z.object({
|
|
136
|
-
resource: z.string(),
|
|
137
|
-
select: z.array(QuerySelectItemSchema).optional(),
|
|
138
|
-
filters: FilterExpressionSchema.optional(),
|
|
139
|
-
group_by: z.array(QueryGroupByItemSchema).optional(),
|
|
140
|
-
order_by: z.array(QueryOrderByItemSchema).optional(),
|
|
141
|
-
limit: z.number().int().positive().optional(),
|
|
142
|
-
offset: z.number().int().nonnegative().optional(),
|
|
143
|
-
time_series: TimeSeriesConfigSchema.optional(),
|
|
144
|
-
period: PeriodConfigSchema.optional(),
|
|
145
|
-
bucket: BucketConfigSchema.optional(),
|
|
146
|
-
calcs: z.array(QueryCalcItemSchema).optional(),
|
|
147
|
-
formatting: FormattingConfigSchema.optional(),
|
|
148
|
-
}).strict();
|
|
149
|
-
const FunnelQueryStepSchema = z.object({
|
|
150
|
-
name: z.string(),
|
|
151
|
-
resource: z.string(),
|
|
152
|
-
metric: QueryAggregateSelectItemSchema,
|
|
153
|
-
filters: FilterExpressionSchema.optional(),
|
|
154
|
-
}).strict();
|
|
155
|
-
export const FunnelQueryConfigSchema = z.object({
|
|
156
|
-
steps: z.array(FunnelQueryStepSchema).min(1),
|
|
157
|
-
calcs: z.array(QueryCalcItemSchema).optional(),
|
|
158
|
-
}).strict();
|
|
159
|
-
const EditableWidgetBaseSchema = z.object({
|
|
160
|
-
label: z.string().optional(),
|
|
161
|
-
variables: VariablesConfigSchema.optional(),
|
|
162
|
-
size: DashboardWidgetSizeSchema.optional(),
|
|
163
|
-
width: z.number().positive('Width must be greater than 0').optional(),
|
|
164
|
-
height: z.number().positive('Height must be greater than 0').optional(),
|
|
165
|
-
min_width: z.number().nonnegative('Min width must be a non-negative number').optional(),
|
|
166
|
-
max_width: z.number().nonnegative('Max width must be a non-negative number').nullable().optional(),
|
|
167
|
-
}).strict();
|
|
168
|
-
const StoredWidgetBaseSchema = EditableWidgetBaseSchema.extend({
|
|
169
|
-
id: z.string(),
|
|
170
|
-
group_id: z.string(),
|
|
171
|
-
order: z.number(),
|
|
172
|
-
});
|
|
173
|
-
const TableViewConfigSchema = z.object({
|
|
174
|
-
columns: z.array(FieldRefSchema).optional(),
|
|
175
|
-
pagination: z.boolean().optional(),
|
|
176
|
-
page_size: z.number().int().positive().optional(),
|
|
177
|
-
}).strict();
|
|
178
|
-
const ChartBaseSchema = z.object({
|
|
179
|
-
title: z.string().optional(),
|
|
180
|
-
}).strict();
|
|
181
|
-
const ChartBucketSchema = z.object({
|
|
182
|
-
label: z.string().min(1, 'Bucket label is required'),
|
|
183
|
-
min: z.number().optional(),
|
|
184
|
-
max: z.number().optional(),
|
|
185
|
-
}).strict();
|
|
186
|
-
const ChartSeriesRefSchema = z.object({
|
|
187
|
-
field: z.string(),
|
|
188
|
-
label: z.string().optional(),
|
|
189
|
-
}).strict();
|
|
190
|
-
const LineChartSchema = ChartBaseSchema.extend({
|
|
191
|
-
type: z.literal('line'),
|
|
192
|
-
x: ChartFieldRefSchema,
|
|
193
|
-
y: z.array(ChartFieldRefSchema).min(1),
|
|
194
|
-
series: ChartSeriesRefSchema.optional(),
|
|
195
|
-
color: z.string().optional(),
|
|
196
|
-
colors: z.array(z.string()).optional(),
|
|
197
|
-
});
|
|
198
|
-
const BarChartSchema = ChartBaseSchema.extend({
|
|
199
|
-
type: z.literal('bar'),
|
|
200
|
-
x: ChartFieldRefSchema,
|
|
201
|
-
y: ChartFieldRefSchema,
|
|
202
|
-
color: z.string().optional(),
|
|
203
|
-
});
|
|
204
|
-
const StackedBarChartSchema = ChartBaseSchema.extend({
|
|
205
|
-
type: z.literal('stacked_bar'),
|
|
206
|
-
x: ChartFieldRefSchema,
|
|
207
|
-
y: z.union([ChartFieldRefSchema, z.array(ChartFieldRefSchema).min(1)]),
|
|
208
|
-
series: ChartSeriesRefSchema.optional(),
|
|
209
|
-
colors: z.array(z.string()).optional(),
|
|
210
|
-
});
|
|
211
|
-
const PieChartSchema = ChartBaseSchema.extend({
|
|
212
|
-
type: z.literal('pie'),
|
|
213
|
-
label: ChartFieldRefSchema,
|
|
214
|
-
value: ChartFieldRefSchema,
|
|
215
|
-
colors: z.array(z.string()).optional(),
|
|
216
|
-
});
|
|
217
|
-
const HistogramChartSchema = ChartBaseSchema.extend({
|
|
218
|
-
type: z.literal('histogram'),
|
|
219
|
-
x: ChartFieldRefSchema,
|
|
220
|
-
y: ChartFieldRefSchema,
|
|
221
|
-
buckets: z.array(ChartBucketSchema).optional(),
|
|
222
|
-
color: z.string().optional(),
|
|
223
|
-
});
|
|
224
|
-
const FunnelChartSchema = ChartBaseSchema.extend({
|
|
225
|
-
type: z.literal('funnel'),
|
|
226
|
-
label: ChartFieldRefSchema.optional(),
|
|
227
|
-
value: ChartFieldRefSchema.optional(),
|
|
228
|
-
colors: z.array(z.string()).optional(),
|
|
229
|
-
});
|
|
230
|
-
export const ChartConfigSchema = z.discriminatedUnion('type', [
|
|
231
|
-
LineChartSchema,
|
|
232
|
-
BarChartSchema,
|
|
233
|
-
StackedBarChartSchema,
|
|
234
|
-
PieChartSchema,
|
|
235
|
-
HistogramChartSchema,
|
|
236
|
-
FunnelChartSchema,
|
|
237
|
-
]);
|
|
238
|
-
const KpiCardViewConfigSchema = z.object({
|
|
239
|
-
title: z.string().optional(),
|
|
240
|
-
value: z.object({
|
|
241
|
-
field: z.string(),
|
|
242
|
-
format: ValueFormatSchema,
|
|
243
|
-
prefix: z.string().optional(),
|
|
244
|
-
suffix: z.string().optional(),
|
|
245
|
-
}).strict(),
|
|
246
|
-
subtitle: z.object({
|
|
247
|
-
text: z.string().optional(),
|
|
248
|
-
field: z.string().optional(),
|
|
249
|
-
}).strict().optional(),
|
|
250
|
-
comparison: JsonValueSchema.optional(),
|
|
251
|
-
sparkline: JsonValueSchema.optional(),
|
|
252
|
-
}).strict();
|
|
253
|
-
const GaugeCardViewConfigSchema = z.object({
|
|
254
|
-
title: z.string().optional(),
|
|
255
|
-
value: z.object({
|
|
256
|
-
field: z.string(),
|
|
257
|
-
format: ValueFormatSchema,
|
|
258
|
-
prefix: z.string().optional(),
|
|
259
|
-
suffix: z.string().optional(),
|
|
260
|
-
}).strict(),
|
|
261
|
-
target: z.object({
|
|
262
|
-
value: z.number().optional(),
|
|
263
|
-
field: z.string().optional(),
|
|
264
|
-
label: z.string().optional(),
|
|
265
|
-
}).strict().optional(),
|
|
266
|
-
progress: z.object({
|
|
267
|
-
value_field: z.string(),
|
|
268
|
-
target_value: z.number().optional(),
|
|
269
|
-
target_field: z.string().optional(),
|
|
270
|
-
format: ValueFormatSchema,
|
|
271
|
-
}).strict().optional(),
|
|
272
|
-
color: z.string().optional(),
|
|
273
|
-
}).strict();
|
|
274
|
-
const PivotTableViewConfigSchema = z.object({
|
|
275
|
-
rows: z.array(FieldRefSchema).min(1),
|
|
276
|
-
columns: z.array(FieldRefSchema).optional(),
|
|
277
|
-
values: z.array(z.object({
|
|
278
|
-
field: z.string(),
|
|
279
|
-
label: z.string().optional(),
|
|
280
|
-
format: ValueFormatSchema,
|
|
281
|
-
aggregation: z.enum(['sum', 'count', 'avg', 'min', 'max']).optional(),
|
|
282
|
-
}).strict()).min(1),
|
|
283
|
-
}).strict();
|
|
284
|
-
const EditableEmptyWidgetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
285
|
-
target: z.literal('empty'),
|
|
286
|
-
});
|
|
287
|
-
export const EmptyWidgetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
288
|
-
target: z.literal('empty'),
|
|
289
|
-
});
|
|
290
|
-
const EditableTableWidgetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
291
|
-
target: z.literal('table'),
|
|
292
|
-
table: TableViewConfigSchema.optional(),
|
|
293
|
-
query: QueryConfigSchema,
|
|
294
|
-
});
|
|
295
|
-
const TableWidgetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
296
|
-
target: z.literal('table'),
|
|
297
|
-
table: TableViewConfigSchema.optional(),
|
|
298
|
-
query: QueryConfigSchema,
|
|
299
|
-
});
|
|
300
|
-
const EditableChartWidgetTargetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
301
|
-
target: z.literal('chart'),
|
|
302
|
-
chart: ChartConfigSchema,
|
|
303
|
-
query: z.union([QueryConfigSchema, FunnelQueryConfigSchema]),
|
|
304
|
-
}).superRefine((widget, ctx) => {
|
|
305
|
-
const isFunnelChart = widget.chart.type === 'funnel';
|
|
306
|
-
const isFunnelQuery = 'steps' in widget.query;
|
|
307
|
-
if (isFunnelChart && !isFunnelQuery) {
|
|
308
|
-
ctx.addIssue({
|
|
309
|
-
code: 'custom',
|
|
310
|
-
path: ['query'],
|
|
311
|
-
message: 'Funnel charts must use steps query',
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
});
|
|
315
|
-
const ChartWidgetTargetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
316
|
-
target: z.literal('chart'),
|
|
317
|
-
chart: ChartConfigSchema,
|
|
318
|
-
query: z.union([QueryConfigSchema, FunnelQueryConfigSchema]),
|
|
319
|
-
}).superRefine((widget, ctx) => {
|
|
320
|
-
const isFunnelChart = widget.chart.type === 'funnel';
|
|
321
|
-
const isFunnelQuery = 'steps' in widget.query;
|
|
322
|
-
if (isFunnelChart && !isFunnelQuery) {
|
|
323
|
-
ctx.addIssue({
|
|
324
|
-
code: 'custom',
|
|
325
|
-
path: ['query'],
|
|
326
|
-
message: 'Funnel charts must use steps query',
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
});
|
|
330
|
-
const EditableKpiCardWidgetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
331
|
-
target: z.literal('kpi_card'),
|
|
332
|
-
card: KpiCardViewConfigSchema,
|
|
333
|
-
query: QueryConfigSchema,
|
|
334
|
-
});
|
|
335
|
-
const KpiCardWidgetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
336
|
-
target: z.literal('kpi_card'),
|
|
337
|
-
card: KpiCardViewConfigSchema,
|
|
338
|
-
query: QueryConfigSchema,
|
|
339
|
-
});
|
|
340
|
-
const EditableGaugeCardWidgetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
341
|
-
target: z.literal('gauge_card'),
|
|
342
|
-
card: GaugeCardViewConfigSchema,
|
|
343
|
-
query: QueryConfigSchema,
|
|
344
|
-
});
|
|
345
|
-
const GaugeCardWidgetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
346
|
-
target: z.literal('gauge_card'),
|
|
347
|
-
card: GaugeCardViewConfigSchema,
|
|
348
|
-
query: QueryConfigSchema,
|
|
349
|
-
});
|
|
350
|
-
const EditablePivotTableWidgetConfigSchema = EditableWidgetBaseSchema.extend({
|
|
351
|
-
target: z.literal('pivot_table'),
|
|
352
|
-
pivot: PivotTableViewConfigSchema,
|
|
353
|
-
query: QueryConfigSchema,
|
|
354
|
-
});
|
|
355
|
-
const PivotTableWidgetConfigSchema = StoredWidgetBaseSchema.extend({
|
|
356
|
-
target: z.literal('pivot_table'),
|
|
357
|
-
pivot: PivotTableViewConfigSchema,
|
|
358
|
-
query: QueryConfigSchema,
|
|
359
|
-
});
|
|
360
|
-
export const EditableDashboardWidgetConfigSchema = z.discriminatedUnion('target', [
|
|
361
|
-
EditableEmptyWidgetConfigSchema,
|
|
362
|
-
EditableTableWidgetConfigSchema,
|
|
363
|
-
EditableChartWidgetTargetConfigSchema,
|
|
364
|
-
EditableKpiCardWidgetConfigSchema,
|
|
365
|
-
EditableGaugeCardWidgetConfigSchema,
|
|
366
|
-
EditablePivotTableWidgetConfigSchema,
|
|
367
|
-
]);
|
|
368
|
-
export const WidgetConfigSchema = z.discriminatedUnion('target', [
|
|
369
|
-
EditableTableWidgetConfigSchema,
|
|
370
|
-
EditableChartWidgetTargetConfigSchema,
|
|
371
|
-
EditableKpiCardWidgetConfigSchema,
|
|
372
|
-
EditableGaugeCardWidgetConfigSchema,
|
|
373
|
-
EditablePivotTableWidgetConfigSchema,
|
|
374
|
-
]);
|
|
375
|
-
export const StoredWidgetConfigSchema = z.discriminatedUnion('target', [
|
|
2
|
+
export { BarChartWidgetConfigSchema, ChartWidgetTargetConfigSchema, BarChartSchema, FunnelChartWidgetConfigSchema, FunnelChartSchema, HistogramChartSchema, HistogramChartWidgetConfigSchema, LineChartWidgetConfigSchema, LineChartSchema, PieChartSchema, PieChartWidgetConfigSchema, StackedBarChartSchema, StackedBarChartWidgetConfigSchema, } from './widgets/charts.js';
|
|
3
|
+
export { GaugeCardWidgetConfigSchema, GaugeCardViewConfigSchema, } from './widgets/gauge-card.js';
|
|
4
|
+
export { KpiCardViewConfigSchema, KpiCardWidgetConfigSchema, } from './widgets/kpi-card.js';
|
|
5
|
+
export { PivotTableViewConfigSchema, PivotTableWidgetConfigSchema, } from './widgets/pivot-table.js';
|
|
6
|
+
export { TableViewConfigSchema, TableWidgetConfigSchema, } from './widgets/table.js';
|
|
7
|
+
export { EmptyWidgetConfigSchema, FunnelQueryConfigSchema, QueryConfigSchema, WidgetEditableBaseSchema, } from './widgets/common.js';
|
|
8
|
+
import { ChartWidgetTargetConfigSchema } from './widgets/charts.js';
|
|
9
|
+
import { GaugeCardWidgetConfigSchema } from './widgets/gauge-card.js';
|
|
10
|
+
import { KpiCardWidgetConfigSchema } from './widgets/kpi-card.js';
|
|
11
|
+
import { PivotTableWidgetConfigSchema } from './widgets/pivot-table.js';
|
|
12
|
+
import { TableWidgetConfigSchema } from './widgets/table.js';
|
|
13
|
+
import { EmptyWidgetConfigSchema } from './widgets/common.js';
|
|
14
|
+
export const WidgetConfigSchema = z.union([
|
|
376
15
|
EmptyWidgetConfigSchema,
|
|
377
16
|
TableWidgetConfigSchema,
|
|
378
17
|
ChartWidgetTargetConfigSchema,
|