@object-ui/types 0.3.0 → 0.5.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 (169) hide show
  1. package/README.md +19 -11
  2. package/dist/api-types.d.ts +7 -0
  3. package/dist/api-types.d.ts.map +1 -1
  4. package/dist/api-types.js +4 -6
  5. package/dist/app.d.ts +17 -0
  6. package/dist/app.d.ts.map +1 -1
  7. package/dist/app.js +4 -3
  8. package/dist/base.d.ts +7 -0
  9. package/dist/base.d.ts.map +1 -1
  10. package/dist/base.js +4 -6
  11. package/dist/blocks.d.ts +332 -0
  12. package/dist/blocks.d.ts.map +1 -0
  13. package/dist/blocks.js +8 -0
  14. package/dist/complex.d.ts +68 -1
  15. package/dist/complex.d.ts.map +1 -1
  16. package/dist/complex.js +4 -5
  17. package/dist/crud.d.ts +181 -3
  18. package/dist/crud.d.ts.map +1 -1
  19. package/dist/crud.js +4 -6
  20. package/dist/data-display.d.ts +54 -2
  21. package/dist/data-display.d.ts.map +1 -1
  22. package/dist/data-display.js +4 -5
  23. package/dist/data-protocol.d.ts +1268 -0
  24. package/dist/data-protocol.d.ts.map +1 -0
  25. package/dist/data-protocol.js +8 -0
  26. package/dist/data.d.ts +22 -1
  27. package/dist/data.d.ts.map +1 -1
  28. package/dist/data.js +4 -6
  29. package/dist/disclosure.d.ts +70 -1
  30. package/dist/disclosure.d.ts.map +1 -1
  31. package/dist/disclosure.js +4 -5
  32. package/dist/feedback.d.ts +68 -1
  33. package/dist/feedback.d.ts.map +1 -1
  34. package/dist/feedback.js +4 -5
  35. package/dist/field-types.d.ts +728 -0
  36. package/dist/field-types.d.ts.map +1 -0
  37. package/dist/field-types.js +8 -0
  38. package/dist/form.d.ts +123 -1
  39. package/dist/form.d.ts.map +1 -1
  40. package/dist/form.js +4 -5
  41. package/dist/index.d.ts +48 -13
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +4 -37
  44. package/dist/layout.d.ts +66 -16
  45. package/dist/layout.d.ts.map +1 -1
  46. package/dist/layout.js +4 -6
  47. package/dist/navigation.d.ts +102 -2
  48. package/dist/navigation.d.ts.map +1 -1
  49. package/dist/navigation.js +4 -5
  50. package/dist/objectql.d.ts +491 -54
  51. package/dist/objectql.d.ts.map +1 -1
  52. package/dist/objectql.js +4 -6
  53. package/dist/overlay.d.ts +31 -1
  54. package/dist/overlay.d.ts.map +1 -1
  55. package/dist/overlay.js +4 -5
  56. package/dist/plugin-scope.d.ts +194 -0
  57. package/dist/plugin-scope.d.ts.map +1 -0
  58. package/dist/plugin-scope.js +8 -0
  59. package/dist/registry.d.ts +7 -0
  60. package/dist/registry.d.ts.map +1 -1
  61. package/dist/registry.js +7 -0
  62. package/dist/reports.d.ts +336 -0
  63. package/dist/reports.d.ts.map +1 -0
  64. package/dist/reports.js +8 -0
  65. package/dist/theme.d.ts +289 -0
  66. package/dist/theme.d.ts.map +1 -0
  67. package/dist/theme.js +8 -0
  68. package/dist/ui-action.d.ts +175 -0
  69. package/dist/ui-action.d.ts.map +1 -0
  70. package/dist/ui-action.js +8 -0
  71. package/dist/views.d.ts +417 -0
  72. package/dist/views.d.ts.map +1 -0
  73. package/dist/views.js +8 -0
  74. package/dist/zod/app.zod.d.ts +120 -0
  75. package/dist/zod/app.zod.d.ts.map +1 -0
  76. package/dist/zod/app.zod.js +60 -0
  77. package/dist/zod/base.zod.d.ts +202 -0
  78. package/dist/zod/base.zod.d.ts.map +1 -0
  79. package/dist/zod/base.zod.js +198 -0
  80. package/dist/zod/blocks.zod.d.ts +834 -0
  81. package/dist/zod/blocks.zod.d.ts.map +1 -0
  82. package/dist/zod/blocks.zod.js +145 -0
  83. package/dist/zod/complex.zod.d.ts +742 -0
  84. package/dist/zod/complex.zod.d.ts.map +1 -0
  85. package/dist/zod/complex.zod.js +233 -0
  86. package/dist/zod/crud.zod.d.ts +598 -0
  87. package/dist/zod/crud.zod.d.ts.map +1 -0
  88. package/dist/zod/crud.zod.js +230 -0
  89. package/dist/zod/data-display.zod.d.ts +996 -0
  90. package/dist/zod/data-display.zod.d.ts.map +1 -0
  91. package/dist/zod/data-display.zod.js +266 -0
  92. package/dist/zod/disclosure.zod.d.ts +267 -0
  93. package/dist/zod/disclosure.zod.d.ts.map +1 -0
  94. package/dist/zod/disclosure.zod.js +84 -0
  95. package/dist/zod/feedback.zod.d.ts +538 -0
  96. package/dist/zod/feedback.zod.d.ts.map +1 -0
  97. package/dist/zod/feedback.zod.js +127 -0
  98. package/dist/zod/form.zod.d.ts +1308 -0
  99. package/dist/zod/form.zod.d.ts.map +1 -0
  100. package/dist/zod/form.zod.js +406 -0
  101. package/dist/zod/index.zod.d.ts +4985 -0
  102. package/dist/zod/index.zod.d.ts.map +1 -0
  103. package/dist/zod/index.zod.js +183 -0
  104. package/dist/zod/layout.zod.d.ts +1048 -0
  105. package/dist/zod/layout.zod.d.ts.map +1 -0
  106. package/dist/zod/layout.zod.js +241 -0
  107. package/dist/zod/navigation.zod.d.ts +486 -0
  108. package/dist/zod/navigation.zod.d.ts.map +1 -0
  109. package/dist/zod/navigation.zod.js +142 -0
  110. package/dist/zod/objectql.zod.d.ts +1261 -0
  111. package/dist/zod/objectql.zod.d.ts.map +1 -0
  112. package/dist/zod/objectql.zod.js +248 -0
  113. package/dist/zod/overlay.zod.d.ts +691 -0
  114. package/dist/zod/overlay.zod.d.ts.map +1 -0
  115. package/dist/zod/overlay.zod.js +179 -0
  116. package/dist/zod/reports.zod.d.ts +1628 -0
  117. package/dist/zod/reports.zod.d.ts.map +1 -0
  118. package/dist/zod/reports.zod.js +152 -0
  119. package/dist/zod/theme.zod.d.ts +611 -0
  120. package/dist/zod/theme.zod.d.ts.map +1 -0
  121. package/dist/zod/theme.zod.js +130 -0
  122. package/dist/zod/views.zod.d.ts +675 -0
  123. package/dist/zod/views.zod.d.ts.map +1 -0
  124. package/dist/zod/views.zod.js +159 -0
  125. package/package.json +9 -1
  126. package/src/__tests__/namespace-exports.test.ts +80 -0
  127. package/src/__tests__/phase2-schemas.test.ts +639 -0
  128. package/src/api-types.ts +8 -0
  129. package/src/app.ts +20 -0
  130. package/src/base.ts +8 -0
  131. package/src/blocks.ts +405 -0
  132. package/src/complex.ts +69 -1
  133. package/src/crud.ts +185 -3
  134. package/src/data-display.ts +60 -2
  135. package/src/data-protocol.ts +1679 -0
  136. package/src/data.ts +21 -1
  137. package/src/disclosure.ts +74 -1
  138. package/src/feedback.ts +76 -2
  139. package/src/field-types.ts +846 -0
  140. package/src/form.ts +131 -1
  141. package/src/index.ts +305 -8
  142. package/src/layout.ts +70 -15
  143. package/src/navigation.ts +109 -2
  144. package/src/objectql.ts +563 -59
  145. package/src/overlay.ts +35 -1
  146. package/src/plugin-scope.ts +210 -0
  147. package/src/registry.ts +8 -0
  148. package/src/reports.ts +408 -0
  149. package/src/theme.ts +351 -0
  150. package/src/ui-action.ts +276 -0
  151. package/src/views.ts +429 -0
  152. package/src/zod/README.md +329 -0
  153. package/src/zod/app.zod.ts +72 -0
  154. package/src/zod/base.zod.ts +229 -0
  155. package/src/zod/blocks.zod.ts +170 -0
  156. package/src/zod/complex.zod.ts +258 -0
  157. package/src/zod/crud.zod.ts +259 -0
  158. package/src/zod/data-display.zod.ts +290 -0
  159. package/src/zod/disclosure.zod.ts +92 -0
  160. package/src/zod/feedback.zod.ts +138 -0
  161. package/src/zod/form.zod.ts +434 -0
  162. package/src/zod/index.zod.ts +425 -0
  163. package/src/zod/layout.zod.ts +262 -0
  164. package/src/zod/navigation.zod.ts +159 -0
  165. package/src/zod/objectql.zod.ts +268 -0
  166. package/src/zod/overlay.zod.ts +196 -0
  167. package/src/zod/reports.zod.ts +183 -0
  168. package/src/zod/theme.zod.ts +155 -0
  169. package/src/zod/views.zod.ts +182 -0
package/src/overlay.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  /**
2
10
  * @object-ui/types - Overlay Component Schemas
3
11
  *
@@ -403,6 +411,31 @@ export interface ContextMenuSchema extends BaseSchema {
403
411
  children: SchemaNode | SchemaNode[];
404
412
  }
405
413
 
414
+ /**
415
+ * Menubar menu
416
+ */
417
+ export interface MenubarMenu {
418
+ /**
419
+ * Menu label
420
+ */
421
+ label: string;
422
+ /**
423
+ * Menu items
424
+ */
425
+ items: MenuItem[];
426
+ }
427
+
428
+ /**
429
+ * Menubar component
430
+ */
431
+ export interface MenubarSchema extends BaseSchema {
432
+ type: 'menubar';
433
+ /**
434
+ * Menubar menus
435
+ */
436
+ menus?: MenubarMenu[];
437
+ }
438
+
406
439
  /**
407
440
  * Union type of all overlay schemas
408
441
  */
@@ -415,4 +448,5 @@ export type OverlaySchema =
415
448
  | TooltipSchema
416
449
  | HoverCardSchema
417
450
  | DropdownMenuSchema
418
- | ContextMenuSchema;
451
+ | ContextMenuSchema
452
+ | MenubarSchema;
@@ -0,0 +1,210 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ /**
10
+ * @object-ui/types - Plugin Scope Isolation
11
+ *
12
+ * Section 3.3: Plugin scope isolation types to prevent conflicts between plugins.
13
+ * Provides scoped component registration, state management, and event bus.
14
+ *
15
+ * @module plugin-scope
16
+ * @packageDocumentation
17
+ */
18
+
19
+ /**
20
+ * Plugin Scope Interface
21
+ *
22
+ * Provides isolated access to the component registry, state management,
23
+ * and event bus for a specific plugin, preventing conflicts between plugins.
24
+ */
25
+ export interface PluginScope {
26
+ /**
27
+ * Plugin name
28
+ */
29
+ name: string;
30
+
31
+ /**
32
+ * Plugin version
33
+ */
34
+ version: string;
35
+
36
+ /**
37
+ * Register a component in the scoped namespace.
38
+ * Components will be registered as "pluginName:type" to prevent conflicts.
39
+ *
40
+ * @param type - Component type identifier (e.g., 'table', 'chart')
41
+ * @param component - Component renderer
42
+ * @param meta - Optional component metadata
43
+ *
44
+ * @example
45
+ * // Plugin 'my-grid' registers a 'table' component
46
+ * // Registered as 'my-grid:table'
47
+ * scope.registerComponent('table', TableComponent, {
48
+ * label: 'Data Table',
49
+ * category: 'data'
50
+ * });
51
+ */
52
+ registerComponent(type: string, component: any, meta?: ComponentMeta): void;
53
+
54
+ /**
55
+ * Get a component from the scoped namespace.
56
+ * First tries scoped lookup (pluginName:type), then falls back to global.
57
+ *
58
+ * @param type - Component type identifier
59
+ * @returns Component renderer or undefined if not found
60
+ */
61
+ getComponent(type: string): any | undefined;
62
+
63
+ /**
64
+ * Scoped state management.
65
+ * Each plugin has its own isolated state that won't conflict with others.
66
+ *
67
+ * @param key - State key unique to this plugin
68
+ * @param initialValue - Initial state value
69
+ * @returns Tuple of [currentValue, setValue]
70
+ *
71
+ * @example
72
+ * const [config, setConfig] = scope.useState('config', { theme: 'light' });
73
+ */
74
+ useState<T>(key: string, initialValue: T): [T, (value: T | ((prev: T) => T)) => void];
75
+
76
+ /**
77
+ * Get scoped state value without setter.
78
+ *
79
+ * @param key - State key
80
+ * @returns Current state value or undefined
81
+ */
82
+ getState<T>(key: string): T | undefined;
83
+
84
+ /**
85
+ * Set scoped state value directly.
86
+ *
87
+ * @param key - State key
88
+ * @param value - New state value
89
+ */
90
+ setState<T>(key: string, value: T): void;
91
+
92
+ /**
93
+ * Subscribe to scoped events.
94
+ * Events are namespaced to prevent cross-plugin conflicts.
95
+ *
96
+ * @param event - Event name (will be prefixed with plugin namespace)
97
+ * @param handler - Event handler function
98
+ * @returns Unsubscribe function
99
+ *
100
+ * @example
101
+ * const unsubscribe = scope.on('data-updated', (data) => {
102
+ * console.log('Scoped event received:', data);
103
+ * });
104
+ */
105
+ on(event: string, handler: PluginEventHandler): () => void;
106
+
107
+ /**
108
+ * Emit a scoped event.
109
+ * Only subscribers within this plugin scope will receive it.
110
+ *
111
+ * @param event - Event name
112
+ * @param data - Event data
113
+ *
114
+ * @example
115
+ * scope.emit('data-updated', { rows: 100 });
116
+ */
117
+ emit(event: string, data?: any): void;
118
+
119
+ /**
120
+ * Emit a global event that all plugins can receive.
121
+ * Use sparingly for cross-plugin communication.
122
+ *
123
+ * @param event - Event name
124
+ * @param data - Event data
125
+ */
126
+ emitGlobal(event: string, data?: any): void;
127
+
128
+ /**
129
+ * Subscribe to global events from any plugin.
130
+ *
131
+ * @param event - Event name
132
+ * @param handler - Event handler function
133
+ * @returns Unsubscribe function
134
+ */
135
+ onGlobal(event: string, handler: PluginEventHandler): () => void;
136
+
137
+ /**
138
+ * Clean up all plugin resources (state, event listeners, etc.)
139
+ * Called automatically when plugin is unloaded.
140
+ */
141
+ cleanup(): void;
142
+ }
143
+
144
+ /**
145
+ * Component metadata for registration
146
+ */
147
+ export interface ComponentMeta {
148
+ label?: string;
149
+ icon?: string;
150
+ category?: string;
151
+ inputs?: ComponentInput[];
152
+ defaultProps?: Record<string, any>;
153
+ defaultChildren?: any[];
154
+ examples?: Record<string, any>;
155
+ isContainer?: boolean;
156
+ resizable?: boolean;
157
+ resizeConstraints?: {
158
+ width?: boolean;
159
+ height?: boolean;
160
+ minWidth?: number;
161
+ maxWidth?: number;
162
+ minHeight?: number;
163
+ maxHeight?: number;
164
+ };
165
+ }
166
+
167
+ /**
168
+ * Component input definition
169
+ */
170
+ export interface ComponentInput {
171
+ name: string;
172
+ type: 'string' | 'number' | 'boolean' | 'enum' | 'array' | 'object' | 'color' | 'date' | 'code' | 'file' | 'slot';
173
+ label?: string;
174
+ defaultValue?: any;
175
+ required?: boolean;
176
+ enum?: string[] | { label: string; value: any }[];
177
+ description?: string;
178
+ advanced?: boolean;
179
+ inputType?: string;
180
+ }
181
+
182
+ /**
183
+ * Event handler type
184
+ */
185
+ export type PluginEventHandler = (data?: any) => void;
186
+
187
+ /**
188
+ * Plugin scope configuration
189
+ */
190
+ export interface PluginScopeConfig {
191
+ /**
192
+ * Whether to enable state isolation (default: true)
193
+ */
194
+ enableStateIsolation?: boolean;
195
+
196
+ /**
197
+ * Whether to enable event isolation (default: true)
198
+ */
199
+ enableEventIsolation?: boolean;
200
+
201
+ /**
202
+ * Whether to allow global event access (default: true)
203
+ */
204
+ allowGlobalEvents?: boolean;
205
+
206
+ /**
207
+ * Maximum state size per plugin in bytes (default: 5MB)
208
+ */
209
+ maxStateSize?: number;
210
+ }
package/src/registry.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
1
9
  import type {
2
10
  DivSchema,
3
11
  SpanSchema,
package/src/reports.ts ADDED
@@ -0,0 +1,408 @@
1
+ /**
2
+ * ObjectUI
3
+ * Copyright (c) 2024-present ObjectStack Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ /**
10
+ * @object-ui/types - Report Schema
11
+ *
12
+ * Defines report configuration for data aggregation, visualization, and export.
13
+ */
14
+
15
+ import type { BaseSchema, SchemaNode } from './base';
16
+ import type { ChartSchema } from './data-display';
17
+ import type { DataSource } from './data';
18
+
19
+ /**
20
+ * Report Export Format
21
+ */
22
+ export type ReportExportFormat = 'pdf' | 'excel' | 'csv' | 'json' | 'html';
23
+
24
+ /**
25
+ * Report Schedule Frequency
26
+ */
27
+ export type ReportScheduleFrequency = 'once' | 'daily' | 'weekly' | 'monthly' | 'quarterly' | 'yearly';
28
+
29
+ /**
30
+ * Report Aggregation Type
31
+ */
32
+ export type ReportAggregationType = 'sum' | 'avg' | 'min' | 'max' | 'count' | 'distinct';
33
+
34
+ /**
35
+ * Report Field Definition
36
+ */
37
+ export interface ReportField {
38
+ /**
39
+ * Field name/identifier
40
+ */
41
+ name: string;
42
+
43
+ /**
44
+ * Display label
45
+ */
46
+ label?: string;
47
+
48
+ /**
49
+ * Field type
50
+ */
51
+ type?: 'string' | 'number' | 'date' | 'boolean';
52
+
53
+ /**
54
+ * Aggregation function
55
+ */
56
+ aggregation?: ReportAggregationType;
57
+
58
+ /**
59
+ * Format string
60
+ */
61
+ format?: string;
62
+
63
+ /**
64
+ * Show in summary
65
+ */
66
+ showInSummary?: boolean;
67
+
68
+ /**
69
+ * Sort order
70
+ */
71
+ sortOrder?: number;
72
+ }
73
+
74
+ /**
75
+ * Report Filter Definition
76
+ */
77
+ export interface ReportFilter {
78
+ /**
79
+ * Field to filter on
80
+ */
81
+ field: string;
82
+
83
+ /**
84
+ * Filter operator
85
+ */
86
+ operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than' | 'between' | 'in' | 'not_in';
87
+
88
+ /**
89
+ * Filter value
90
+ */
91
+ value?: any;
92
+
93
+ /**
94
+ * Multiple values (for 'in' operator)
95
+ */
96
+ values?: any[];
97
+ }
98
+
99
+ /**
100
+ * Report Group By Definition
101
+ */
102
+ export interface ReportGroupBy {
103
+ /**
104
+ * Field to group by
105
+ */
106
+ field: string;
107
+
108
+ /**
109
+ * Display label
110
+ */
111
+ label?: string;
112
+
113
+ /**
114
+ * Sort direction
115
+ */
116
+ sort?: 'asc' | 'desc';
117
+ }
118
+
119
+ /**
120
+ * Report Section Definition
121
+ */
122
+ export interface ReportSection {
123
+ /**
124
+ * Section type
125
+ */
126
+ type: 'header' | 'summary' | 'chart' | 'table' | 'text' | 'page-break';
127
+
128
+ /**
129
+ * Section title
130
+ */
131
+ title?: string;
132
+
133
+ /**
134
+ * Section content
135
+ */
136
+ content?: SchemaNode | SchemaNode[];
137
+
138
+ /**
139
+ * Chart configuration (for type='chart')
140
+ */
141
+ chart?: ChartSchema;
142
+
143
+ /**
144
+ * Columns to display (for type='table')
145
+ */
146
+ columns?: ReportField[];
147
+
148
+ /**
149
+ * Text content (for type='text')
150
+ */
151
+ text?: string;
152
+
153
+ /**
154
+ * Visibility condition
155
+ */
156
+ visible?: boolean | string;
157
+ }
158
+
159
+ /**
160
+ * Report Schedule Configuration
161
+ */
162
+ export interface ReportSchedule {
163
+ /**
164
+ * Schedule enabled
165
+ */
166
+ enabled?: boolean;
167
+
168
+ /**
169
+ * Frequency
170
+ */
171
+ frequency?: ReportScheduleFrequency;
172
+
173
+ /**
174
+ * Specific day of week (for weekly)
175
+ */
176
+ dayOfWeek?: number;
177
+
178
+ /**
179
+ * Specific day of month (for monthly)
180
+ */
181
+ dayOfMonth?: number;
182
+
183
+ /**
184
+ * Time to run (HH:mm format)
185
+ */
186
+ time?: string;
187
+
188
+ /**
189
+ * Timezone
190
+ */
191
+ timezone?: string;
192
+
193
+ /**
194
+ * Email recipients
195
+ */
196
+ recipients?: string[];
197
+
198
+ /**
199
+ * Email subject
200
+ */
201
+ subject?: string;
202
+
203
+ /**
204
+ * Email body
205
+ */
206
+ body?: string;
207
+
208
+ /**
209
+ * Export formats to attach
210
+ */
211
+ formats?: ReportExportFormat[];
212
+ }
213
+
214
+ /**
215
+ * Report Export Configuration
216
+ */
217
+ export interface ReportExportConfig {
218
+ /**
219
+ * Export format
220
+ */
221
+ format: ReportExportFormat;
222
+
223
+ /**
224
+ * Filename template
225
+ */
226
+ filename?: string;
227
+
228
+ /**
229
+ * Include headers
230
+ */
231
+ includeHeaders?: boolean;
232
+
233
+ /**
234
+ * Page orientation (for PDF)
235
+ */
236
+ orientation?: 'portrait' | 'landscape';
237
+
238
+ /**
239
+ * Page size (for PDF)
240
+ */
241
+ pageSize?: 'A4' | 'A3' | 'Letter' | 'Legal';
242
+
243
+ /**
244
+ * Custom options
245
+ */
246
+ options?: Record<string, any>;
247
+ }
248
+
249
+ /**
250
+ * Report Schema - Main report configuration
251
+ */
252
+ export interface ReportSchema extends BaseSchema {
253
+ type: 'report';
254
+
255
+ /**
256
+ * Report title
257
+ */
258
+ title?: string;
259
+
260
+ /**
261
+ * Report description
262
+ */
263
+ description?: string;
264
+
265
+ /**
266
+ * Data source configuration
267
+ */
268
+ dataSource?: DataSource;
269
+
270
+ /**
271
+ * Report fields
272
+ */
273
+ fields?: ReportField[];
274
+
275
+ /**
276
+ * Report filters
277
+ */
278
+ filters?: ReportFilter[];
279
+
280
+ /**
281
+ * Group by configuration
282
+ */
283
+ groupBy?: ReportGroupBy[];
284
+
285
+ /**
286
+ * Report sections
287
+ */
288
+ sections?: ReportSection[];
289
+
290
+ /**
291
+ * Schedule configuration
292
+ */
293
+ schedule?: ReportSchedule;
294
+
295
+ /**
296
+ * Default export format
297
+ */
298
+ defaultExportFormat?: ReportExportFormat;
299
+
300
+ /**
301
+ * Export configurations
302
+ */
303
+ exportConfigs?: Record<ReportExportFormat, ReportExportConfig>;
304
+
305
+ /**
306
+ * Show export buttons
307
+ */
308
+ showExportButtons?: boolean;
309
+
310
+ /**
311
+ * Show print button
312
+ */
313
+ showPrintButton?: boolean;
314
+
315
+ /**
316
+ * Show schedule button
317
+ */
318
+ showScheduleButton?: boolean;
319
+
320
+ /**
321
+ * Auto-refresh interval (in seconds)
322
+ */
323
+ refreshInterval?: number;
324
+
325
+ /**
326
+ * Loading state
327
+ */
328
+ loading?: boolean;
329
+
330
+ /**
331
+ * Report data
332
+ */
333
+ data?: any[];
334
+ }
335
+
336
+ /**
337
+ * Report Builder Schema - Interactive report builder component
338
+ */
339
+ export interface ReportBuilderSchema extends BaseSchema {
340
+ type: 'report-builder';
341
+
342
+ /**
343
+ * Initial report configuration
344
+ */
345
+ report?: ReportSchema;
346
+
347
+ /**
348
+ * Available data sources
349
+ */
350
+ dataSources?: DataSource[];
351
+
352
+ /**
353
+ * Available fields
354
+ */
355
+ availableFields?: ReportField[];
356
+
357
+ /**
358
+ * Show preview
359
+ */
360
+ showPreview?: boolean;
361
+
362
+ /**
363
+ * Save callback
364
+ */
365
+ onSave?: string;
366
+
367
+ /**
368
+ * Cancel callback
369
+ */
370
+ onCancel?: string;
371
+ }
372
+
373
+ /**
374
+ * Report Viewer Schema - Display a generated report
375
+ */
376
+ export interface ReportViewerSchema extends BaseSchema {
377
+ type: 'report-viewer';
378
+
379
+ /**
380
+ * Report to display
381
+ */
382
+ report?: ReportSchema;
383
+
384
+ /**
385
+ * Report data
386
+ */
387
+ data?: any[];
388
+
389
+ /**
390
+ * Show toolbar
391
+ */
392
+ showToolbar?: boolean;
393
+
394
+ /**
395
+ * Allow export
396
+ */
397
+ allowExport?: boolean;
398
+
399
+ /**
400
+ * Allow print
401
+ */
402
+ allowPrint?: boolean;
403
+
404
+ /**
405
+ * Loading state
406
+ */
407
+ loading?: boolean;
408
+ }