@adminforth/dashboard 1.0.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.
Files changed (107) hide show
  1. package/.woodpecker/buildRelease.sh +13 -0
  2. package/.woodpecker/buildSlackNotify.sh +46 -0
  3. package/.woodpecker/release.yml +57 -0
  4. package/README.md +59 -0
  5. package/custom/api/dashboardApi.ts +213 -0
  6. package/custom/composables/useElementSize.ts +41 -0
  7. package/custom/model/dashboard.types.ts +73 -0
  8. package/custom/package.json +9 -0
  9. package/custom/pnpm-lock.yaml +24 -0
  10. package/custom/queries/useDashboardConfig.ts +51 -0
  11. package/custom/queries/useWidgetData.ts +51 -0
  12. package/custom/runtime/DashboardGroup.vue +185 -0
  13. package/custom/runtime/DashboardPage.vue +122 -0
  14. package/custom/runtime/DashboardRuntime.vue +435 -0
  15. package/custom/runtime/WidgetRenderer.vue +60 -0
  16. package/custom/runtime/WidgetShell.vue +152 -0
  17. package/custom/skills/adminforth-dashboard/SKILL.md +125 -0
  18. package/custom/widgets/chart/ChartWidget.vue +188 -0
  19. package/custom/widgets/chart/bar/BarChart.vue +167 -0
  20. package/custom/widgets/chart/chart.types.ts +34 -0
  21. package/custom/widgets/chart/chart.utils.ts +54 -0
  22. package/custom/widgets/chart/funnel/FunnelChart.vue +197 -0
  23. package/custom/widgets/chart/histogram/HistogramChart.vue +21 -0
  24. package/custom/widgets/chart/line/LineChart.vue +175 -0
  25. package/custom/widgets/chart/pie/PieChart.vue +161 -0
  26. package/custom/widgets/chart/stacked-bar/StackedBarChart.vue +256 -0
  27. package/custom/widgets/gauge-card/GaugeCardWidget.vue +107 -0
  28. package/custom/widgets/kpi-card/KpiCardWidget.vue +73 -0
  29. package/custom/widgets/pivot-table/PivotTableWidget.vue +122 -0
  30. package/custom/widgets/registry.ts +51 -0
  31. package/custom/widgets/table/TableWidget.vue +110 -0
  32. package/dist/custom/api/dashboardApi.d.ts +32 -0
  33. package/dist/custom/api/dashboardApi.js +179 -0
  34. package/dist/custom/api/dashboardApi.ts +213 -0
  35. package/dist/custom/composables/useElementSize.d.ts +8 -0
  36. package/dist/custom/composables/useElementSize.js +30 -0
  37. package/dist/custom/composables/useElementSize.ts +41 -0
  38. package/dist/custom/model/dashboard.types.d.ts +45 -0
  39. package/dist/custom/model/dashboard.types.js +14 -0
  40. package/dist/custom/model/dashboard.types.ts +73 -0
  41. package/dist/custom/package.json +9 -0
  42. package/dist/custom/pnpm-lock.yaml +24 -0
  43. package/dist/custom/queries/useDashboardConfig.d.ts +112 -0
  44. package/dist/custom/queries/useDashboardConfig.js +57 -0
  45. package/dist/custom/queries/useDashboardConfig.ts +51 -0
  46. package/dist/custom/queries/useWidgetData.d.ts +90 -0
  47. package/dist/custom/queries/useWidgetData.js +57 -0
  48. package/dist/custom/queries/useWidgetData.ts +51 -0
  49. package/dist/custom/runtime/DashboardGroup.vue +185 -0
  50. package/dist/custom/runtime/DashboardPage.vue +122 -0
  51. package/dist/custom/runtime/DashboardRuntime.vue +435 -0
  52. package/dist/custom/runtime/WidgetRenderer.vue +60 -0
  53. package/dist/custom/runtime/WidgetShell.vue +152 -0
  54. package/dist/custom/skills/adminforth-dashboard/SKILL.md +125 -0
  55. package/dist/custom/widgets/chart/ChartWidget.vue +188 -0
  56. package/dist/custom/widgets/chart/bar/BarChart.vue +167 -0
  57. package/dist/custom/widgets/chart/chart.types.d.ts +25 -0
  58. package/dist/custom/widgets/chart/chart.types.js +2 -0
  59. package/dist/custom/widgets/chart/chart.types.ts +34 -0
  60. package/dist/custom/widgets/chart/chart.utils.d.ts +5 -0
  61. package/dist/custom/widgets/chart/chart.utils.js +52 -0
  62. package/dist/custom/widgets/chart/chart.utils.ts +54 -0
  63. package/dist/custom/widgets/chart/funnel/FunnelChart.vue +197 -0
  64. package/dist/custom/widgets/chart/histogram/HistogramChart.vue +21 -0
  65. package/dist/custom/widgets/chart/line/LineChart.vue +175 -0
  66. package/dist/custom/widgets/chart/pie/PieChart.vue +161 -0
  67. package/dist/custom/widgets/chart/stacked-bar/StackedBarChart.vue +256 -0
  68. package/dist/custom/widgets/gauge-card/GaugeCardWidget.vue +107 -0
  69. package/dist/custom/widgets/kpi-card/KpiCardWidget.vue +73 -0
  70. package/dist/custom/widgets/pivot-table/PivotTableWidget.vue +122 -0
  71. package/dist/custom/widgets/registry.d.ts +11 -0
  72. package/dist/custom/widgets/registry.js +47 -0
  73. package/dist/custom/widgets/registry.ts +51 -0
  74. package/dist/custom/widgets/table/TableWidget.vue +110 -0
  75. package/dist/endpoint/dashboard.d.ts +7 -0
  76. package/dist/endpoint/dashboard.js +29 -0
  77. package/dist/endpoint/groups.d.ts +30 -0
  78. package/dist/endpoint/groups.js +131 -0
  79. package/dist/endpoint/widgets.d.ts +15 -0
  80. package/dist/endpoint/widgets.js +182 -0
  81. package/dist/index.d.ts +13 -0
  82. package/dist/index.js +124 -0
  83. package/dist/schema/api.d.ts +1205 -0
  84. package/dist/schema/api.js +84 -0
  85. package/dist/schema/widget.d.ts +514 -0
  86. package/dist/schema/widget.js +133 -0
  87. package/dist/services/dashboardConfigService.d.ts +35 -0
  88. package/dist/services/dashboardConfigService.js +79 -0
  89. package/dist/services/widgetConfigValidator.d.ts +8 -0
  90. package/dist/services/widgetConfigValidator.js +65 -0
  91. package/dist/services/widgetDataService.d.ts +20 -0
  92. package/dist/services/widgetDataService.js +32 -0
  93. package/dist/types.d.ts +8 -0
  94. package/dist/types.js +1 -0
  95. package/endpoint/dashboard.ts +32 -0
  96. package/endpoint/groups.ts +213 -0
  97. package/endpoint/widgets.ts +255 -0
  98. package/index.ts +141 -0
  99. package/package.json +64 -0
  100. package/schema/api.ts +99 -0
  101. package/schema/widget.ts +159 -0
  102. package/services/dashboardConfigService.ts +136 -0
  103. package/services/widgetConfigValidator.ts +93 -0
  104. package/services/widgetDataService.ts +57 -0
  105. package/shims-vue.d.ts +5 -0
  106. package/tsconfig.json +18 -0
  107. package/types.ts +8 -0
@@ -0,0 +1,84 @@
1
+ import { toJSONSchema, z } from 'zod';
2
+ import { StoredWidgetConfigSchema, WidgetConfigSchema } from './widget.js';
3
+ function toAdminForthJsonSchema(schema) {
4
+ return toJSONSchema(schema, { target: 'draft-7' });
5
+ }
6
+ export const DashboardErrorResponseZodSchema = z.object({
7
+ error: z.string(),
8
+ validationErrors: z.array(z.object({
9
+ field: z.string(),
10
+ message: z.string(),
11
+ })).optional(),
12
+ });
13
+ export const DashboardGroupZodSchema = z.object({
14
+ id: z.string(),
15
+ label: z.string(),
16
+ order: z.number(),
17
+ });
18
+ export const DashboardConfigZodSchema = z.object({
19
+ version: z.number(),
20
+ groups: z.array(DashboardGroupZodSchema),
21
+ widgets: z.array(StoredWidgetConfigSchema),
22
+ });
23
+ export const DashboardResponseZodSchema = z.object({
24
+ id: z.string(),
25
+ slug: z.string(),
26
+ label: z.string(),
27
+ revision: z.number(),
28
+ config: DashboardConfigZodSchema,
29
+ });
30
+ export const DashboardApiResponseZodSchema = z.union([
31
+ DashboardResponseZodSchema,
32
+ DashboardErrorResponseZodSchema,
33
+ ]);
34
+ export const DashboardWidgetDataResponseZodSchema = z.union([
35
+ z.object({
36
+ widget: StoredWidgetConfigSchema,
37
+ data: z.unknown(),
38
+ }),
39
+ DashboardErrorResponseZodSchema,
40
+ ]);
41
+ export const SlugRequestZodSchema = z.object({
42
+ slug: z.string().optional(),
43
+ }).strict();
44
+ export const GroupIdRequestZodSchema = z.object({
45
+ slug: z.string().optional(),
46
+ groupId: z.string(),
47
+ }).strict();
48
+ export const MoveGroupRequestZodSchema = z.object({
49
+ slug: z.string().optional(),
50
+ groupId: z.string(),
51
+ direction: z.enum(['up', 'down']),
52
+ }).strict();
53
+ export const SetGroupConfigRequestZodSchema = z.object({
54
+ slug: z.string().optional(),
55
+ groupId: z.string(),
56
+ config: DashboardGroupZodSchema,
57
+ }).strict();
58
+ export const WidgetIdRequestZodSchema = z.object({
59
+ slug: z.string().optional(),
60
+ widgetId: z.string(),
61
+ }).strict();
62
+ export const MoveWidgetRequestZodSchema = z.object({
63
+ slug: z.string().optional(),
64
+ widgetId: z.string(),
65
+ direction: z.enum(['up', 'down']),
66
+ }).strict();
67
+ export const SetWidgetConfigRequestZodSchema = z.object({
68
+ slug: z.string().optional(),
69
+ widgetId: z.string(),
70
+ config: WidgetConfigSchema,
71
+ }).strict();
72
+ export const DashboardErrorResponseSchema = toAdminForthJsonSchema(DashboardErrorResponseZodSchema);
73
+ export const DashboardGroupSchema = toAdminForthJsonSchema(DashboardGroupZodSchema);
74
+ export const DashboardConfigSchema = toAdminForthJsonSchema(DashboardConfigZodSchema);
75
+ export const DashboardResponseSchema = toAdminForthJsonSchema(DashboardResponseZodSchema);
76
+ export const DashboardApiResponseSchema = toAdminForthJsonSchema(DashboardApiResponseZodSchema);
77
+ export const DashboardWidgetDataResponseSchema = toAdminForthJsonSchema(DashboardWidgetDataResponseZodSchema);
78
+ export const SlugRequestSchema = toAdminForthJsonSchema(SlugRequestZodSchema);
79
+ export const GroupIdRequestSchema = toAdminForthJsonSchema(GroupIdRequestZodSchema);
80
+ export const MoveGroupRequestSchema = toAdminForthJsonSchema(MoveGroupRequestZodSchema);
81
+ export const SetGroupConfigRequestSchema = toAdminForthJsonSchema(SetGroupConfigRequestZodSchema);
82
+ export const WidgetIdRequestSchema = toAdminForthJsonSchema(WidgetIdRequestZodSchema);
83
+ export const MoveWidgetRequestSchema = toAdminForthJsonSchema(MoveWidgetRequestZodSchema);
84
+ export const SetWidgetConfigRequestSchema = toAdminForthJsonSchema(SetWidgetConfigRequestZodSchema);
@@ -0,0 +1,514 @@
1
+ import { z } from 'zod';
2
+ export type DashboardWidgetConfigValidationError = {
3
+ field: string;
4
+ message: string;
5
+ };
6
+ export declare const ChartConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
7
+ title: z.ZodOptional<z.ZodString>;
8
+ type: z.ZodLiteral<"line">;
9
+ x_field: z.ZodOptional<z.ZodString>;
10
+ y_field: z.ZodOptional<z.ZodString>;
11
+ series_name: z.ZodOptional<z.ZodString>;
12
+ color: z.ZodOptional<z.ZodString>;
13
+ }, z.core.$strip>, z.ZodObject<{
14
+ title: z.ZodOptional<z.ZodString>;
15
+ type: z.ZodLiteral<"bar">;
16
+ label_field: z.ZodOptional<z.ZodString>;
17
+ value_field: z.ZodOptional<z.ZodString>;
18
+ bucket_field: z.ZodOptional<z.ZodString>;
19
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
20
+ label: z.ZodString;
21
+ min: z.ZodOptional<z.ZodNumber>;
22
+ max: z.ZodOptional<z.ZodNumber>;
23
+ }, z.core.$strip>>>;
24
+ color: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip>, z.ZodObject<{
26
+ title: z.ZodOptional<z.ZodString>;
27
+ type: z.ZodLiteral<"stacked_bar">;
28
+ x_field: z.ZodOptional<z.ZodString>;
29
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
30
+ name: z.ZodString;
31
+ field: z.ZodString;
32
+ color: z.ZodOptional<z.ZodString>;
33
+ }, z.core.$strip>>>;
34
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ title: z.ZodOptional<z.ZodString>;
37
+ type: z.ZodLiteral<"pie">;
38
+ label_field: z.ZodOptional<z.ZodString>;
39
+ value_field: z.ZodOptional<z.ZodString>;
40
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
41
+ }, z.core.$strip>, z.ZodObject<{
42
+ title: z.ZodOptional<z.ZodString>;
43
+ type: z.ZodLiteral<"histogram">;
44
+ label_field: z.ZodOptional<z.ZodString>;
45
+ value_field: z.ZodOptional<z.ZodString>;
46
+ bucket_field: z.ZodOptional<z.ZodString>;
47
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ label: z.ZodString;
49
+ min: z.ZodOptional<z.ZodNumber>;
50
+ max: z.ZodOptional<z.ZodNumber>;
51
+ }, z.core.$strip>>>;
52
+ color: z.ZodOptional<z.ZodString>;
53
+ }, z.core.$strip>, z.ZodObject<{
54
+ title: z.ZodOptional<z.ZodString>;
55
+ type: z.ZodLiteral<"funnel">;
56
+ label_field: z.ZodOptional<z.ZodString>;
57
+ value_field: z.ZodOptional<z.ZodString>;
58
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
59
+ }, z.core.$strip>], "type">;
60
+ export declare const DashboardWidgetQuerySchema: z.ZodObject<{
61
+ resource: z.ZodString;
62
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
63
+ order: z.ZodOptional<z.ZodObject<{
64
+ field: z.ZodString;
65
+ direction: z.ZodEnum<{
66
+ asc: "asc";
67
+ desc: "desc";
68
+ }>;
69
+ }, z.core.$strip>>;
70
+ limit: z.ZodOptional<z.ZodNumber>;
71
+ }, z.core.$strip>;
72
+ export declare const EmptyWidgetConfigSchema: z.ZodObject<{
73
+ id: z.ZodOptional<z.ZodString>;
74
+ group_id: z.ZodOptional<z.ZodString>;
75
+ label: z.ZodOptional<z.ZodString>;
76
+ size: z.ZodOptional<z.ZodEnum<{
77
+ small: "small";
78
+ medium: "medium";
79
+ large: "large";
80
+ wide: "wide";
81
+ full: "full";
82
+ }>>;
83
+ width: z.ZodOptional<z.ZodNumber>;
84
+ height: z.ZodOptional<z.ZodNumber>;
85
+ minWidth: z.ZodOptional<z.ZodNumber>;
86
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
87
+ order: z.ZodOptional<z.ZodNumber>;
88
+ target: z.ZodLiteral<"empty">;
89
+ }, z.core.$strip>;
90
+ export declare const WidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ id: z.ZodOptional<z.ZodString>;
92
+ group_id: z.ZodOptional<z.ZodString>;
93
+ label: z.ZodOptional<z.ZodString>;
94
+ size: z.ZodOptional<z.ZodEnum<{
95
+ small: "small";
96
+ medium: "medium";
97
+ large: "large";
98
+ wide: "wide";
99
+ full: "full";
100
+ }>>;
101
+ width: z.ZodOptional<z.ZodNumber>;
102
+ height: z.ZodOptional<z.ZodNumber>;
103
+ minWidth: z.ZodOptional<z.ZodNumber>;
104
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
105
+ order: z.ZodOptional<z.ZodNumber>;
106
+ target: z.ZodLiteral<"table">;
107
+ table: z.ZodOptional<z.ZodUnknown>;
108
+ query: z.ZodOptional<z.ZodObject<{
109
+ resource: z.ZodString;
110
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
111
+ order: z.ZodOptional<z.ZodObject<{
112
+ field: z.ZodString;
113
+ direction: z.ZodEnum<{
114
+ asc: "asc";
115
+ desc: "desc";
116
+ }>;
117
+ }, z.core.$strip>>;
118
+ limit: z.ZodOptional<z.ZodNumber>;
119
+ }, z.core.$strip>>;
120
+ }, z.core.$strip>, z.ZodObject<{
121
+ id: z.ZodOptional<z.ZodString>;
122
+ group_id: z.ZodOptional<z.ZodString>;
123
+ label: z.ZodOptional<z.ZodString>;
124
+ size: z.ZodOptional<z.ZodEnum<{
125
+ small: "small";
126
+ medium: "medium";
127
+ large: "large";
128
+ wide: "wide";
129
+ full: "full";
130
+ }>>;
131
+ width: z.ZodOptional<z.ZodNumber>;
132
+ height: z.ZodOptional<z.ZodNumber>;
133
+ minWidth: z.ZodOptional<z.ZodNumber>;
134
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
135
+ order: z.ZodOptional<z.ZodNumber>;
136
+ target: z.ZodLiteral<"chart">;
137
+ chart: z.ZodDiscriminatedUnion<[z.ZodObject<{
138
+ title: z.ZodOptional<z.ZodString>;
139
+ type: z.ZodLiteral<"line">;
140
+ x_field: z.ZodOptional<z.ZodString>;
141
+ y_field: z.ZodOptional<z.ZodString>;
142
+ series_name: z.ZodOptional<z.ZodString>;
143
+ color: z.ZodOptional<z.ZodString>;
144
+ }, z.core.$strip>, z.ZodObject<{
145
+ title: z.ZodOptional<z.ZodString>;
146
+ type: z.ZodLiteral<"bar">;
147
+ label_field: z.ZodOptional<z.ZodString>;
148
+ value_field: z.ZodOptional<z.ZodString>;
149
+ bucket_field: z.ZodOptional<z.ZodString>;
150
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
151
+ label: z.ZodString;
152
+ min: z.ZodOptional<z.ZodNumber>;
153
+ max: z.ZodOptional<z.ZodNumber>;
154
+ }, z.core.$strip>>>;
155
+ color: z.ZodOptional<z.ZodString>;
156
+ }, z.core.$strip>, z.ZodObject<{
157
+ title: z.ZodOptional<z.ZodString>;
158
+ type: z.ZodLiteral<"stacked_bar">;
159
+ x_field: z.ZodOptional<z.ZodString>;
160
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
161
+ name: z.ZodString;
162
+ field: z.ZodString;
163
+ color: z.ZodOptional<z.ZodString>;
164
+ }, z.core.$strip>>>;
165
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ title: z.ZodOptional<z.ZodString>;
168
+ type: z.ZodLiteral<"pie">;
169
+ label_field: z.ZodOptional<z.ZodString>;
170
+ value_field: z.ZodOptional<z.ZodString>;
171
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
172
+ }, z.core.$strip>, z.ZodObject<{
173
+ title: z.ZodOptional<z.ZodString>;
174
+ type: z.ZodLiteral<"histogram">;
175
+ label_field: z.ZodOptional<z.ZodString>;
176
+ value_field: z.ZodOptional<z.ZodString>;
177
+ bucket_field: z.ZodOptional<z.ZodString>;
178
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
179
+ label: z.ZodString;
180
+ min: z.ZodOptional<z.ZodNumber>;
181
+ max: z.ZodOptional<z.ZodNumber>;
182
+ }, z.core.$strip>>>;
183
+ color: z.ZodOptional<z.ZodString>;
184
+ }, z.core.$strip>, z.ZodObject<{
185
+ title: z.ZodOptional<z.ZodString>;
186
+ type: z.ZodLiteral<"funnel">;
187
+ label_field: z.ZodOptional<z.ZodString>;
188
+ value_field: z.ZodOptional<z.ZodString>;
189
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
190
+ }, z.core.$strip>], "type">;
191
+ query: z.ZodObject<{
192
+ resource: z.ZodString;
193
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
194
+ order: z.ZodOptional<z.ZodObject<{
195
+ field: z.ZodString;
196
+ direction: z.ZodEnum<{
197
+ asc: "asc";
198
+ desc: "desc";
199
+ }>;
200
+ }, z.core.$strip>>;
201
+ limit: z.ZodOptional<z.ZodNumber>;
202
+ }, z.core.$strip>;
203
+ }, z.core.$strip>, z.ZodObject<{
204
+ id: z.ZodOptional<z.ZodString>;
205
+ group_id: z.ZodOptional<z.ZodString>;
206
+ label: z.ZodOptional<z.ZodString>;
207
+ size: z.ZodOptional<z.ZodEnum<{
208
+ small: "small";
209
+ medium: "medium";
210
+ large: "large";
211
+ wide: "wide";
212
+ full: "full";
213
+ }>>;
214
+ width: z.ZodOptional<z.ZodNumber>;
215
+ height: z.ZodOptional<z.ZodNumber>;
216
+ minWidth: z.ZodOptional<z.ZodNumber>;
217
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
218
+ order: z.ZodOptional<z.ZodNumber>;
219
+ target: z.ZodLiteral<"kpi_card">;
220
+ kpi_card: z.ZodOptional<z.ZodUnknown>;
221
+ query: z.ZodOptional<z.ZodObject<{
222
+ resource: z.ZodString;
223
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
224
+ order: z.ZodOptional<z.ZodObject<{
225
+ field: z.ZodString;
226
+ direction: z.ZodEnum<{
227
+ asc: "asc";
228
+ desc: "desc";
229
+ }>;
230
+ }, z.core.$strip>>;
231
+ limit: z.ZodOptional<z.ZodNumber>;
232
+ }, z.core.$strip>>;
233
+ }, z.core.$strip>, z.ZodObject<{
234
+ id: z.ZodOptional<z.ZodString>;
235
+ group_id: z.ZodOptional<z.ZodString>;
236
+ label: z.ZodOptional<z.ZodString>;
237
+ size: z.ZodOptional<z.ZodEnum<{
238
+ small: "small";
239
+ medium: "medium";
240
+ large: "large";
241
+ wide: "wide";
242
+ full: "full";
243
+ }>>;
244
+ width: z.ZodOptional<z.ZodNumber>;
245
+ height: z.ZodOptional<z.ZodNumber>;
246
+ minWidth: z.ZodOptional<z.ZodNumber>;
247
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
248
+ order: z.ZodOptional<z.ZodNumber>;
249
+ target: z.ZodLiteral<"gauge_card">;
250
+ gauge_card: z.ZodOptional<z.ZodUnknown>;
251
+ query: z.ZodOptional<z.ZodObject<{
252
+ resource: z.ZodString;
253
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
254
+ order: z.ZodOptional<z.ZodObject<{
255
+ field: z.ZodString;
256
+ direction: z.ZodEnum<{
257
+ asc: "asc";
258
+ desc: "desc";
259
+ }>;
260
+ }, z.core.$strip>>;
261
+ limit: z.ZodOptional<z.ZodNumber>;
262
+ }, z.core.$strip>>;
263
+ }, z.core.$strip>, z.ZodObject<{
264
+ id: z.ZodOptional<z.ZodString>;
265
+ group_id: z.ZodOptional<z.ZodString>;
266
+ label: z.ZodOptional<z.ZodString>;
267
+ size: z.ZodOptional<z.ZodEnum<{
268
+ small: "small";
269
+ medium: "medium";
270
+ large: "large";
271
+ wide: "wide";
272
+ full: "full";
273
+ }>>;
274
+ width: z.ZodOptional<z.ZodNumber>;
275
+ height: z.ZodOptional<z.ZodNumber>;
276
+ minWidth: z.ZodOptional<z.ZodNumber>;
277
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
278
+ order: z.ZodOptional<z.ZodNumber>;
279
+ target: z.ZodLiteral<"pivot_table">;
280
+ pivot_table: z.ZodOptional<z.ZodUnknown>;
281
+ query: z.ZodOptional<z.ZodObject<{
282
+ resource: z.ZodString;
283
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
284
+ order: z.ZodOptional<z.ZodObject<{
285
+ field: z.ZodString;
286
+ direction: z.ZodEnum<{
287
+ asc: "asc";
288
+ desc: "desc";
289
+ }>;
290
+ }, z.core.$strip>>;
291
+ limit: z.ZodOptional<z.ZodNumber>;
292
+ }, z.core.$strip>>;
293
+ }, z.core.$strip>], "target">;
294
+ export declare const StoredWidgetConfigSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
295
+ id: z.ZodOptional<z.ZodString>;
296
+ group_id: z.ZodOptional<z.ZodString>;
297
+ label: z.ZodOptional<z.ZodString>;
298
+ size: z.ZodOptional<z.ZodEnum<{
299
+ small: "small";
300
+ medium: "medium";
301
+ large: "large";
302
+ wide: "wide";
303
+ full: "full";
304
+ }>>;
305
+ width: z.ZodOptional<z.ZodNumber>;
306
+ height: z.ZodOptional<z.ZodNumber>;
307
+ minWidth: z.ZodOptional<z.ZodNumber>;
308
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
309
+ order: z.ZodOptional<z.ZodNumber>;
310
+ target: z.ZodLiteral<"empty">;
311
+ }, z.core.$strip>, z.ZodObject<{
312
+ id: z.ZodOptional<z.ZodString>;
313
+ group_id: z.ZodOptional<z.ZodString>;
314
+ label: z.ZodOptional<z.ZodString>;
315
+ size: z.ZodOptional<z.ZodEnum<{
316
+ small: "small";
317
+ medium: "medium";
318
+ large: "large";
319
+ wide: "wide";
320
+ full: "full";
321
+ }>>;
322
+ width: z.ZodOptional<z.ZodNumber>;
323
+ height: z.ZodOptional<z.ZodNumber>;
324
+ minWidth: z.ZodOptional<z.ZodNumber>;
325
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
326
+ order: z.ZodOptional<z.ZodNumber>;
327
+ target: z.ZodLiteral<"table">;
328
+ table: z.ZodOptional<z.ZodUnknown>;
329
+ query: z.ZodOptional<z.ZodObject<{
330
+ resource: z.ZodString;
331
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
332
+ order: z.ZodOptional<z.ZodObject<{
333
+ field: z.ZodString;
334
+ direction: z.ZodEnum<{
335
+ asc: "asc";
336
+ desc: "desc";
337
+ }>;
338
+ }, z.core.$strip>>;
339
+ limit: z.ZodOptional<z.ZodNumber>;
340
+ }, z.core.$strip>>;
341
+ }, z.core.$strip>, z.ZodObject<{
342
+ id: z.ZodOptional<z.ZodString>;
343
+ group_id: z.ZodOptional<z.ZodString>;
344
+ label: z.ZodOptional<z.ZodString>;
345
+ size: z.ZodOptional<z.ZodEnum<{
346
+ small: "small";
347
+ medium: "medium";
348
+ large: "large";
349
+ wide: "wide";
350
+ full: "full";
351
+ }>>;
352
+ width: z.ZodOptional<z.ZodNumber>;
353
+ height: z.ZodOptional<z.ZodNumber>;
354
+ minWidth: z.ZodOptional<z.ZodNumber>;
355
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
356
+ order: z.ZodOptional<z.ZodNumber>;
357
+ target: z.ZodLiteral<"chart">;
358
+ chart: z.ZodDiscriminatedUnion<[z.ZodObject<{
359
+ title: z.ZodOptional<z.ZodString>;
360
+ type: z.ZodLiteral<"line">;
361
+ x_field: z.ZodOptional<z.ZodString>;
362
+ y_field: z.ZodOptional<z.ZodString>;
363
+ series_name: z.ZodOptional<z.ZodString>;
364
+ color: z.ZodOptional<z.ZodString>;
365
+ }, z.core.$strip>, z.ZodObject<{
366
+ title: z.ZodOptional<z.ZodString>;
367
+ type: z.ZodLiteral<"bar">;
368
+ label_field: z.ZodOptional<z.ZodString>;
369
+ value_field: z.ZodOptional<z.ZodString>;
370
+ bucket_field: z.ZodOptional<z.ZodString>;
371
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
372
+ label: z.ZodString;
373
+ min: z.ZodOptional<z.ZodNumber>;
374
+ max: z.ZodOptional<z.ZodNumber>;
375
+ }, z.core.$strip>>>;
376
+ color: z.ZodOptional<z.ZodString>;
377
+ }, z.core.$strip>, z.ZodObject<{
378
+ title: z.ZodOptional<z.ZodString>;
379
+ type: z.ZodLiteral<"stacked_bar">;
380
+ x_field: z.ZodOptional<z.ZodString>;
381
+ series: z.ZodOptional<z.ZodArray<z.ZodObject<{
382
+ name: z.ZodString;
383
+ field: z.ZodString;
384
+ color: z.ZodOptional<z.ZodString>;
385
+ }, z.core.$strip>>>;
386
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
387
+ }, z.core.$strip>, z.ZodObject<{
388
+ title: z.ZodOptional<z.ZodString>;
389
+ type: z.ZodLiteral<"pie">;
390
+ label_field: z.ZodOptional<z.ZodString>;
391
+ value_field: z.ZodOptional<z.ZodString>;
392
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
393
+ }, z.core.$strip>, z.ZodObject<{
394
+ title: z.ZodOptional<z.ZodString>;
395
+ type: z.ZodLiteral<"histogram">;
396
+ label_field: z.ZodOptional<z.ZodString>;
397
+ value_field: z.ZodOptional<z.ZodString>;
398
+ bucket_field: z.ZodOptional<z.ZodString>;
399
+ buckets: z.ZodOptional<z.ZodArray<z.ZodObject<{
400
+ label: z.ZodString;
401
+ min: z.ZodOptional<z.ZodNumber>;
402
+ max: z.ZodOptional<z.ZodNumber>;
403
+ }, z.core.$strip>>>;
404
+ color: z.ZodOptional<z.ZodString>;
405
+ }, z.core.$strip>, z.ZodObject<{
406
+ title: z.ZodOptional<z.ZodString>;
407
+ type: z.ZodLiteral<"funnel">;
408
+ label_field: z.ZodOptional<z.ZodString>;
409
+ value_field: z.ZodOptional<z.ZodString>;
410
+ colors: z.ZodOptional<z.ZodArray<z.ZodString>>;
411
+ }, z.core.$strip>], "type">;
412
+ query: z.ZodObject<{
413
+ resource: z.ZodString;
414
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
415
+ order: z.ZodOptional<z.ZodObject<{
416
+ field: z.ZodString;
417
+ direction: z.ZodEnum<{
418
+ asc: "asc";
419
+ desc: "desc";
420
+ }>;
421
+ }, z.core.$strip>>;
422
+ limit: z.ZodOptional<z.ZodNumber>;
423
+ }, z.core.$strip>;
424
+ }, z.core.$strip>, z.ZodObject<{
425
+ id: z.ZodOptional<z.ZodString>;
426
+ group_id: z.ZodOptional<z.ZodString>;
427
+ label: z.ZodOptional<z.ZodString>;
428
+ size: z.ZodOptional<z.ZodEnum<{
429
+ small: "small";
430
+ medium: "medium";
431
+ large: "large";
432
+ wide: "wide";
433
+ full: "full";
434
+ }>>;
435
+ width: z.ZodOptional<z.ZodNumber>;
436
+ height: z.ZodOptional<z.ZodNumber>;
437
+ minWidth: z.ZodOptional<z.ZodNumber>;
438
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
439
+ order: z.ZodOptional<z.ZodNumber>;
440
+ target: z.ZodLiteral<"kpi_card">;
441
+ kpi_card: z.ZodOptional<z.ZodUnknown>;
442
+ query: z.ZodOptional<z.ZodObject<{
443
+ resource: z.ZodString;
444
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
445
+ order: z.ZodOptional<z.ZodObject<{
446
+ field: z.ZodString;
447
+ direction: z.ZodEnum<{
448
+ asc: "asc";
449
+ desc: "desc";
450
+ }>;
451
+ }, z.core.$strip>>;
452
+ limit: z.ZodOptional<z.ZodNumber>;
453
+ }, z.core.$strip>>;
454
+ }, z.core.$strip>, z.ZodObject<{
455
+ id: z.ZodOptional<z.ZodString>;
456
+ group_id: z.ZodOptional<z.ZodString>;
457
+ label: z.ZodOptional<z.ZodString>;
458
+ size: z.ZodOptional<z.ZodEnum<{
459
+ small: "small";
460
+ medium: "medium";
461
+ large: "large";
462
+ wide: "wide";
463
+ full: "full";
464
+ }>>;
465
+ width: z.ZodOptional<z.ZodNumber>;
466
+ height: z.ZodOptional<z.ZodNumber>;
467
+ minWidth: z.ZodOptional<z.ZodNumber>;
468
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
469
+ order: z.ZodOptional<z.ZodNumber>;
470
+ target: z.ZodLiteral<"gauge_card">;
471
+ gauge_card: z.ZodOptional<z.ZodUnknown>;
472
+ query: z.ZodOptional<z.ZodObject<{
473
+ resource: z.ZodString;
474
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
475
+ order: z.ZodOptional<z.ZodObject<{
476
+ field: z.ZodString;
477
+ direction: z.ZodEnum<{
478
+ asc: "asc";
479
+ desc: "desc";
480
+ }>;
481
+ }, z.core.$strip>>;
482
+ limit: z.ZodOptional<z.ZodNumber>;
483
+ }, z.core.$strip>>;
484
+ }, z.core.$strip>, z.ZodObject<{
485
+ id: z.ZodOptional<z.ZodString>;
486
+ group_id: z.ZodOptional<z.ZodString>;
487
+ label: z.ZodOptional<z.ZodString>;
488
+ size: z.ZodOptional<z.ZodEnum<{
489
+ small: "small";
490
+ medium: "medium";
491
+ large: "large";
492
+ wide: "wide";
493
+ full: "full";
494
+ }>>;
495
+ width: z.ZodOptional<z.ZodNumber>;
496
+ height: z.ZodOptional<z.ZodNumber>;
497
+ minWidth: z.ZodOptional<z.ZodNumber>;
498
+ maxWidth: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
499
+ order: z.ZodOptional<z.ZodNumber>;
500
+ target: z.ZodLiteral<"pivot_table">;
501
+ pivot_table: z.ZodOptional<z.ZodUnknown>;
502
+ query: z.ZodOptional<z.ZodObject<{
503
+ resource: z.ZodString;
504
+ select: z.ZodOptional<z.ZodArray<z.ZodString>>;
505
+ order: z.ZodOptional<z.ZodObject<{
506
+ field: z.ZodString;
507
+ direction: z.ZodEnum<{
508
+ asc: "asc";
509
+ desc: "desc";
510
+ }>;
511
+ }, z.core.$strip>>;
512
+ limit: z.ZodOptional<z.ZodNumber>;
513
+ }, z.core.$strip>>;
514
+ }, z.core.$strip>], "target">;