@object-ui/types 0.3.0 → 0.3.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.
Files changed (115) 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 +7 -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/complex.d.ts +68 -1
  12. package/dist/complex.d.ts.map +1 -1
  13. package/dist/complex.js +4 -5
  14. package/dist/crud.d.ts +7 -0
  15. package/dist/crud.d.ts.map +1 -1
  16. package/dist/crud.js +4 -6
  17. package/dist/data-display.d.ts +54 -2
  18. package/dist/data-display.d.ts.map +1 -1
  19. package/dist/data-display.js +4 -5
  20. package/dist/data.d.ts +16 -0
  21. package/dist/data.d.ts.map +1 -1
  22. package/dist/data.js +4 -6
  23. package/dist/disclosure.d.ts +70 -1
  24. package/dist/disclosure.d.ts.map +1 -1
  25. package/dist/disclosure.js +4 -5
  26. package/dist/feedback.d.ts +68 -1
  27. package/dist/feedback.d.ts.map +1 -1
  28. package/dist/feedback.js +4 -5
  29. package/dist/field-types.d.ts +386 -0
  30. package/dist/field-types.d.ts.map +1 -0
  31. package/dist/field-types.js +8 -0
  32. package/dist/form.d.ts +123 -1
  33. package/dist/form.d.ts.map +1 -1
  34. package/dist/form.js +4 -5
  35. package/dist/index.d.ts +21 -13
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +4 -37
  38. package/dist/layout.d.ts +66 -16
  39. package/dist/layout.d.ts.map +1 -1
  40. package/dist/layout.js +4 -6
  41. package/dist/navigation.d.ts +102 -2
  42. package/dist/navigation.d.ts.map +1 -1
  43. package/dist/navigation.js +4 -5
  44. package/dist/objectql.d.ts +484 -54
  45. package/dist/objectql.d.ts.map +1 -1
  46. package/dist/objectql.js +4 -6
  47. package/dist/overlay.d.ts +31 -1
  48. package/dist/overlay.d.ts.map +1 -1
  49. package/dist/overlay.js +4 -5
  50. package/dist/registry.d.ts +7 -0
  51. package/dist/registry.d.ts.map +1 -1
  52. package/dist/registry.js +7 -0
  53. package/dist/zod/base.zod.d.ts +202 -0
  54. package/dist/zod/base.zod.d.ts.map +1 -0
  55. package/dist/zod/base.zod.js +198 -0
  56. package/dist/zod/complex.zod.d.ts +742 -0
  57. package/dist/zod/complex.zod.d.ts.map +1 -0
  58. package/dist/zod/complex.zod.js +233 -0
  59. package/dist/zod/data-display.zod.d.ts +996 -0
  60. package/dist/zod/data-display.zod.d.ts.map +1 -0
  61. package/dist/zod/data-display.zod.js +266 -0
  62. package/dist/zod/disclosure.zod.d.ts +267 -0
  63. package/dist/zod/disclosure.zod.d.ts.map +1 -0
  64. package/dist/zod/disclosure.zod.js +84 -0
  65. package/dist/zod/feedback.zod.d.ts +538 -0
  66. package/dist/zod/feedback.zod.d.ts.map +1 -0
  67. package/dist/zod/feedback.zod.js +127 -0
  68. package/dist/zod/form.zod.d.ts +1308 -0
  69. package/dist/zod/form.zod.d.ts.map +1 -0
  70. package/dist/zod/form.zod.js +406 -0
  71. package/dist/zod/index.zod.d.ts +3174 -0
  72. package/dist/zod/index.zod.d.ts.map +1 -0
  73. package/dist/zod/index.zod.js +106 -0
  74. package/dist/zod/layout.zod.d.ts +1048 -0
  75. package/dist/zod/layout.zod.d.ts.map +1 -0
  76. package/dist/zod/layout.zod.js +241 -0
  77. package/dist/zod/navigation.zod.d.ts +486 -0
  78. package/dist/zod/navigation.zod.d.ts.map +1 -0
  79. package/dist/zod/navigation.zod.js +142 -0
  80. package/dist/zod/objectql.zod.d.ts +1261 -0
  81. package/dist/zod/objectql.zod.d.ts.map +1 -0
  82. package/dist/zod/objectql.zod.js +248 -0
  83. package/dist/zod/overlay.zod.d.ts +691 -0
  84. package/dist/zod/overlay.zod.d.ts.map +1 -0
  85. package/dist/zod/overlay.zod.js +179 -0
  86. package/package.json +9 -1
  87. package/src/api-types.ts +8 -0
  88. package/src/app.ts +8 -0
  89. package/src/base.ts +8 -0
  90. package/src/complex.ts +69 -1
  91. package/src/crud.ts +8 -0
  92. package/src/data-display.ts +60 -2
  93. package/src/data.ts +18 -0
  94. package/src/disclosure.ts +74 -1
  95. package/src/feedback.ts +76 -2
  96. package/src/field-types.ts +465 -0
  97. package/src/form.ts +131 -1
  98. package/src/index.ts +91 -8
  99. package/src/layout.ts +70 -15
  100. package/src/navigation.ts +109 -2
  101. package/src/objectql.ts +555 -59
  102. package/src/overlay.ts +35 -1
  103. package/src/registry.ts +8 -0
  104. package/src/zod/README.md +329 -0
  105. package/src/zod/base.zod.ts +229 -0
  106. package/src/zod/complex.zod.ts +258 -0
  107. package/src/zod/data-display.zod.ts +290 -0
  108. package/src/zod/disclosure.zod.ts +92 -0
  109. package/src/zod/feedback.zod.ts +138 -0
  110. package/src/zod/form.zod.ts +434 -0
  111. package/src/zod/index.zod.ts +277 -0
  112. package/src/zod/layout.zod.ts +262 -0
  113. package/src/zod/navigation.zod.ts +159 -0
  114. package/src/zod/objectql.zod.ts +268 -0
  115. package/src/zod/overlay.zod.ts +196 -0
package/src/objectql.ts CHANGED
@@ -1,9 +1,19 @@
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 - ObjectQL Component Schemas
3
11
  *
4
12
  * Type definitions for ObjectQL-specific components.
5
13
  * These schemas enable building ObjectQL-aware interfaces directly from object metadata.
6
14
  *
15
+ * Now aligned with @objectstack/spec view.zod schema for better interoperability.
16
+ *
7
17
  * @module objectql
8
18
  * @packageDocumentation
9
19
  */
@@ -13,42 +23,338 @@ import type { TableColumn } from './data-display';
13
23
  import type { FormField } from './form';
14
24
 
15
25
  /**
16
- * ObjectTable Schema
17
- * A specialized table component that automatically fetches and displays data from ObjectQL objects.
18
- * It reads the object schema from ObjectQL and generates columns automatically.
26
+ * HTTP Method for API requests
27
+ */
28
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
29
+
30
+ /**
31
+ * HTTP Request Configuration for API Provider
32
+ * Aligned with @objectstack/spec HttpRequestSchema
33
+ */
34
+ export interface HttpRequest {
35
+ /** API endpoint URL */
36
+ url: string;
37
+ /** HTTP method (default: GET) */
38
+ method?: HttpMethod;
39
+ /** Custom HTTP headers */
40
+ headers?: Record<string, string>;
41
+ /** Query parameters */
42
+ params?: Record<string, unknown>;
43
+ /** Request body for POST/PUT/PATCH - supports JSON objects, strings, FormData, or Blob */
44
+ body?: Record<string, unknown> | string | FormData | Blob;
45
+ }
46
+
47
+ /**
48
+ * View Data Source Configuration
49
+ * Aligned with @objectstack/spec ViewDataSchema
50
+ *
51
+ * Supports three modes:
52
+ * 1. 'object': Standard Protocol - Auto-connects to ObjectStack Metadata and Data APIs
53
+ * 2. 'api': Custom API - Explicitly provided API URLs
54
+ * 3. 'value': Static Data - Hardcoded data array
55
+ */
56
+ export type ViewData =
57
+ | {
58
+ provider: 'object';
59
+ /** Target object name */
60
+ object: string;
61
+ }
62
+ | {
63
+ provider: 'api';
64
+ /** Configuration for fetching data */
65
+ read?: HttpRequest;
66
+ /** Configuration for submitting data (for forms/editable tables) */
67
+ write?: HttpRequest;
68
+ }
69
+ | {
70
+ provider: 'value';
71
+ /** Static data array */
72
+ items: unknown[];
73
+ };
74
+
75
+ /**
76
+ * List Column Configuration
77
+ * Enhanced version aligned with @objectstack/spec ListColumnSchema
78
+ */
79
+ export interface ListColumn {
80
+ /** Field name (snake_case) */
81
+ field: string;
82
+ /** Display label override */
83
+ label?: string;
84
+ /** Column width in pixels */
85
+ width?: number;
86
+ /** Text alignment */
87
+ align?: 'left' | 'center' | 'right';
88
+ /** Hide column by default */
89
+ hidden?: boolean;
90
+ /** Allow sorting by this column */
91
+ sortable?: boolean;
92
+ /** Allow resizing this column */
93
+ resizable?: boolean;
94
+ /** Allow text wrapping */
95
+ wrap?: boolean;
96
+ /** Renderer type override (e.g., "currency", "date") */
97
+ type?: string;
98
+ }
99
+
100
+ /**
101
+ * Selection Configuration
102
+ * Aligned with @objectstack/spec SelectionConfigSchema
103
+ */
104
+ export interface SelectionConfig {
105
+ /** Selection mode */
106
+ type?: 'none' | 'single' | 'multiple';
107
+ }
108
+
109
+ /**
110
+ * Pagination Configuration
111
+ * Aligned with @objectstack/spec PaginationConfigSchema
112
+ */
113
+ export interface PaginationConfig {
114
+ /** Number of records per page (default: 25) */
115
+ pageSize?: number;
116
+ /** Available page size options */
117
+ pageSizeOptions?: number[];
118
+ }
119
+
120
+ /**
121
+ * Kanban Configuration
122
+ * Aligned with @objectstack/spec KanbanConfigSchema
123
+ */
124
+ export interface KanbanConfig {
125
+ /** Field to group columns by (usually status/select) */
126
+ groupByField: string;
127
+ /** Field to sum at top of column (e.g. amount) */
128
+ summarizeField?: string;
129
+ /** Fields to show on cards */
130
+ columns: string[];
131
+ }
132
+
133
+ /**
134
+ * Calendar Configuration
135
+ * Aligned with @objectstack/spec CalendarConfigSchema
136
+ */
137
+ export interface CalendarConfig {
138
+ /** Start date field */
139
+ startDateField: string;
140
+ /** End date field */
141
+ endDateField?: string;
142
+ /** Title field */
143
+ titleField: string;
144
+ /** Color field */
145
+ colorField?: string;
146
+ }
147
+
148
+ /**
149
+ * Gantt Configuration
150
+ * Aligned with @objectstack/spec GanttConfigSchema
19
151
  */
20
- export interface ObjectTableSchema extends BaseSchema {
21
- type: 'object-table';
152
+ export interface GanttConfig {
153
+ /** Start date field */
154
+ startDateField: string;
155
+ /** End date field */
156
+ endDateField: string;
157
+ /** Title field */
158
+ titleField: string;
159
+ /** Progress field (0-100) */
160
+ progressField?: string;
161
+ /** Dependencies field */
162
+ dependenciesField?: string;
163
+ }
164
+
165
+ /**
166
+ * Sort Configuration
167
+ */
168
+ export interface SortConfig {
169
+ /** Field to sort by */
170
+ field: string;
171
+ /** Sort order */
172
+ order: 'asc' | 'desc';
173
+ }
174
+
175
+ /**
176
+ * ObjectGrid Schema
177
+ * A specialized grid component that automatically fetches and displays data from ObjectQL objects.
178
+ * Implements the grid view type from @objectstack/spec view.zod ListView schema.
179
+ *
180
+ * Features:
181
+ * - Traditional table/grid with CRUD operations
182
+ * - Search, filters, pagination
183
+ * - Column resizing, sorting
184
+ * - Row selection
185
+ * - Inline editing support
186
+ */
187
+ export interface ObjectGridSchema extends BaseSchema {
188
+ type: 'object-grid';
189
+
190
+ /**
191
+ * Internal name for the view
192
+ */
193
+ name?: string;
194
+
195
+ /**
196
+ * Display label override
197
+ */
198
+ label?: string;
22
199
 
23
200
  /**
24
201
  * ObjectQL object name (e.g., 'users', 'accounts', 'contacts')
202
+ * Used when data provider is 'object' or not specified
25
203
  */
26
204
  objectName: string;
27
205
 
28
206
  /**
29
- * Optional title for the table
207
+ * Data Source Configuration
208
+ * Aligned with @objectstack/spec ViewDataSchema
209
+ * If not provided, defaults to { provider: 'object', object: objectName }
30
210
  */
31
- title?: string;
211
+ data?: ViewData;
32
212
 
33
213
  /**
34
- * Optional description
214
+ * Columns Configuration
215
+ * Can be either:
216
+ * - Array of field names (simple): ['name', 'email', 'status']
217
+ * - Array of ListColumn objects (enhanced): [{ field: 'name', label: 'Full Name', width: 200 }]
35
218
  */
36
- description?: string;
219
+ columns?: string[] | ListColumn[];
220
+
221
+ /**
222
+ * Filter criteria (JSON Rules format)
223
+ * Array-based filter configuration
224
+ */
225
+ filter?: any[];
226
+
227
+ /**
228
+ * Sort Configuration
229
+ * Can be either:
230
+ * - Legacy string format: "name desc"
231
+ * - Array of sort configs: [{ field: 'name', order: 'desc' }]
232
+ */
233
+ sort?: string | SortConfig[];
234
+
235
+ /**
236
+ * Fields enabled for search
237
+ * Defines which fields are searchable when using the search box
238
+ */
239
+ searchableFields?: string[];
240
+
241
+ /**
242
+ * Enable column resizing
243
+ * Allows users to drag column borders to resize
244
+ */
245
+ resizable?: boolean;
246
+
247
+ /**
248
+ * Striped row styling
249
+ * Alternating row background colors
250
+ */
251
+ striped?: boolean;
37
252
 
38
253
  /**
39
- * Field names to display as columns
40
- * If not specified, uses all visible fields from object schema
254
+ * Show borders
255
+ * Display borders around cells
256
+ */
257
+ bordered?: boolean;
258
+
259
+ /**
260
+ * Row Selection Configuration
261
+ * Aligned with @objectstack/spec SelectionConfigSchema
262
+ */
263
+ selection?: SelectionConfig;
264
+
265
+ /**
266
+ * Pagination Configuration
267
+ * Aligned with @objectstack/spec PaginationConfigSchema
268
+ */
269
+ pagination?: PaginationConfig;
270
+
271
+ /**
272
+ * Custom CSS class
273
+ */
274
+ className?: string;
275
+
276
+ // ===== LEGACY FIELDS (for backward compatibility) =====
277
+ // These fields are deprecated but maintained for backward compatibility
278
+ // They will be mapped to the new structure internally
279
+
280
+ /**
281
+ * @deprecated Use columns instead
282
+ * Legacy field names to display
41
283
  */
42
284
  fields?: string[];
43
285
 
44
286
  /**
45
- * Custom column configurations
46
- * Overrides auto-generated columns for specific fields
287
+ * @deprecated Use data with provider: 'value' instead
288
+ * Legacy inline data support
289
+ */
290
+ staticData?: any[];
291
+
292
+ /**
293
+ * @deprecated Use selection.type instead
294
+ * Legacy selection mode
295
+ */
296
+ selectable?: boolean | 'single' | 'multiple';
297
+
298
+ /**
299
+ * @deprecated Use pagination.pageSize instead
300
+ * Legacy page size
301
+ */
302
+ pageSize?: number;
303
+
304
+ /**
305
+ * @deprecated Use searchableFields instead
306
+ * Legacy search toggle
307
+ */
308
+ showSearch?: boolean;
309
+
310
+ /**
311
+ * @deprecated Use filter property instead
312
+ * Legacy filters toggle
313
+ */
314
+ showFilters?: boolean;
315
+
316
+ /**
317
+ * @deprecated Use pagination config instead
318
+ * Legacy pagination toggle
319
+ */
320
+ showPagination?: boolean;
321
+
322
+ /**
323
+ * @deprecated Use sort instead
324
+ * Legacy sort configuration
325
+ */
326
+ defaultSort?: {
327
+ field: string;
328
+ order: 'asc' | 'desc';
329
+ };
330
+
331
+ /**
332
+ * @deprecated Use filter instead
333
+ * Legacy default filters
334
+ */
335
+ defaultFilters?: Record<string, any>;
336
+
337
+ /**
338
+ * @deprecated Moved to top-level resizable
339
+ * Legacy resizable columns flag
340
+ */
341
+ resizableColumns?: boolean;
342
+
343
+ /**
344
+ * @deprecated Use label instead
345
+ * Legacy title field
47
346
  */
48
- columns?: TableColumn[];
347
+ title?: string;
348
+
349
+ /**
350
+ * @deprecated No direct replacement (consider using label with additional context)
351
+ * Legacy description field
352
+ */
353
+ description?: string;
49
354
 
50
355
  /**
51
356
  * Enable/disable built-in operations
357
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
52
358
  */
53
359
  operations?: {
54
360
  /**
@@ -89,62 +395,40 @@ export interface ObjectTableSchema extends BaseSchema {
89
395
  };
90
396
 
91
397
  /**
92
- * Default filters to apply
93
- */
94
- defaultFilters?: Record<string, any>;
95
-
96
- /**
97
- * Default sort configuration
398
+ * Custom row actions
399
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
98
400
  */
99
- defaultSort?: {
100
- field: string;
101
- order: 'asc' | 'desc';
102
- };
401
+ rowActions?: string[];
103
402
 
104
403
  /**
105
- * Page size
106
- * @default 10
404
+ * Custom batch actions
405
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
107
406
  */
108
- pageSize?: number;
407
+ batchActions?: string[];
109
408
 
110
409
  /**
111
- * Enable row selection
410
+ * Enable inline cell editing (Grid mode)
411
+ * When true, cells become editable on double-click or Enter key
412
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
112
413
  * @default false
113
414
  */
114
- selectable?: boolean | 'single' | 'multiple';
115
-
116
- /**
117
- * Show search box
118
- * @default true
119
- */
120
- showSearch?: boolean;
121
-
122
- /**
123
- * Show filters
124
- * @default true
125
- */
126
- showFilters?: boolean;
127
-
128
- /**
129
- * Show pagination
130
- * @default true
131
- */
132
- showPagination?: boolean;
415
+ editable?: boolean;
133
416
 
134
417
  /**
135
- * Custom row actions
418
+ * Enable keyboard navigation (Grid mode)
419
+ * Arrow keys, Tab, Enter for cell navigation
420
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
421
+ * @default true when editable is true
136
422
  */
137
- rowActions?: string[];
423
+ keyboardNavigation?: boolean;
138
424
 
139
425
  /**
140
- * Custom batch actions
426
+ * Number of columns to freeze (left-pin)
427
+ * Useful for keeping certain columns visible while scrolling
428
+ * NOTE: This is ObjectUI-specific and not part of @objectstack/spec
429
+ * @default 0
141
430
  */
142
- batchActions?: string[];
143
-
144
- /**
145
- * Custom CSS class
146
- */
147
- className?: string;
431
+ frozenColumns?: number;
148
432
  }
149
433
 
150
434
  /**
@@ -188,10 +472,18 @@ export interface ObjectFormSchema extends BaseSchema {
188
472
 
189
473
  /**
190
474
  * Custom field configurations
191
- * Overrides auto-generated fields for specific fields
475
+ * Overrides auto-generated fields for specific fields.
476
+ * When used with inline field definitions (without dataSource), this becomes the primary field source.
192
477
  */
193
478
  customFields?: FormField[];
194
479
 
480
+ /**
481
+ * Inline initial data for demo/static forms
482
+ * When provided along with customFields (or inline field definitions), the form can work without a data source.
483
+ * Useful for documentation examples and prototyping.
484
+ */
485
+ initialData?: Record<string, any>;
486
+
195
487
  /**
196
488
  * Field groups for organized layout
197
489
  */
@@ -293,9 +585,213 @@ export interface ObjectFormSchema extends BaseSchema {
293
585
  className?: string;
294
586
  }
295
587
 
588
+ /**
589
+ * ObjectView Schema
590
+ * A complete object management interface combining ObjectTable and ObjectForm.
591
+ * Provides list view with search, filters, and integrated create/edit dialogs.
592
+ */
593
+ export interface ObjectViewSchema extends BaseSchema {
594
+ type: 'object-view';
595
+
596
+ /**
597
+ * ObjectQL object name (e.g., 'users', 'accounts', 'contacts')
598
+ */
599
+ objectName: string;
600
+
601
+ /**
602
+ * Optional title for the view
603
+ */
604
+ title?: string;
605
+
606
+ /**
607
+ * Optional description
608
+ */
609
+ description?: string;
610
+
611
+ /**
612
+ * Layout mode for create/edit operations
613
+ * - drawer: Side drawer (default, recommended for forms)
614
+ * - modal: Center modal dialog
615
+ * - page: Navigate to separate page (requires onNavigate handler)
616
+ * @default 'drawer'
617
+ */
618
+ layout?: 'drawer' | 'modal' | 'page';
619
+
620
+ /**
621
+ * Table/Grid configuration
622
+ * Inherits from ObjectGridSchema
623
+ */
624
+ table?: Partial<Omit<ObjectGridSchema, 'type' | 'objectName'>>;
625
+
626
+ /**
627
+ * Form configuration
628
+ * Inherits from ObjectFormSchema
629
+ */
630
+ form?: Partial<Omit<ObjectFormSchema, 'type' | 'objectName' | 'mode'>>;
631
+
632
+ /**
633
+ * Show search box
634
+ * @default true
635
+ */
636
+ showSearch?: boolean;
637
+
638
+ /**
639
+ * Show filters
640
+ * @default true
641
+ */
642
+ showFilters?: boolean;
643
+
644
+ /**
645
+ * Show create button
646
+ * @default true
647
+ */
648
+ showCreate?: boolean;
649
+
650
+ /**
651
+ * Show refresh button
652
+ * @default true
653
+ */
654
+ showRefresh?: boolean;
655
+
656
+ /**
657
+ * Enable/disable built-in operations
658
+ */
659
+ operations?: {
660
+ create?: boolean;
661
+ read?: boolean;
662
+ update?: boolean;
663
+ delete?: boolean;
664
+ };
665
+
666
+ /**
667
+ * Callback when navigating to detail page (page layout mode)
668
+ */
669
+ onNavigate?: (recordId: string | number, mode: 'view' | 'edit') => void;
670
+
671
+ /**
672
+ * Custom CSS class
673
+ */
674
+ className?: string;
675
+ }
676
+
677
+ /**
678
+ * Generic View Definition
679
+ * Aligned with @objectstack/spec View/ListView
680
+ * Defines the data requirement, not just the visual component.
681
+ */
682
+ export interface ListViewSchema extends BaseSchema {
683
+ type: 'list-view';
684
+
685
+ /** Object Name */
686
+ objectName: string;
687
+
688
+ /** View Type (grid, kanban, etc) */
689
+ viewType?: 'grid' | 'kanban' | 'calendar' | 'gantt' | 'map' | 'chart';
690
+
691
+ /** Fields to fetch/display */
692
+ fields?: string[];
693
+
694
+ /** Filter conditions */
695
+ filters?: Array<any[] | string>; // placeholder for FilterCondition
696
+
697
+ /** Sort order */
698
+ sort?: Array<{ field: string; order: 'asc' | 'desc' }>;
699
+
700
+ /** Visual Component overrides */
701
+ options?: Record<string, any>;
702
+ }
703
+
704
+ /**
705
+ * Object Map Component Schema
706
+ */
707
+ export interface ObjectMapSchema extends BaseSchema {
708
+ type: 'object-map';
709
+ /** ObjectQL object name */
710
+ objectName: string;
711
+ /** Field containing location data (or lat/long pair) */
712
+ locationField?: string;
713
+ /** Field for marker title */
714
+ titleField?: string;
715
+ }
716
+
717
+ /**
718
+ * Object Gantt Component Schema
719
+ */
720
+ export interface ObjectGanttSchema extends BaseSchema {
721
+ type: 'object-gantt';
722
+ /** ObjectQL object name */
723
+ objectName: string;
724
+ /** Field for task start date */
725
+ startDateField?: string;
726
+ /** Field for task end date */
727
+ endDateField?: string;
728
+ /** Field for task title/name */
729
+ titleField?: string;
730
+ /** Field for task dependencies */
731
+ dependencyField?: string;
732
+ /** Field for progress (0-100) */
733
+ progressField?: string;
734
+ }
735
+
736
+ /**
737
+ * Object Calendar Component Schema
738
+ */
739
+ export interface ObjectCalendarSchema extends BaseSchema {
740
+ type: 'object-calendar';
741
+ /** ObjectQL object name */
742
+ objectName: string;
743
+ /** Field for event start */
744
+ startDateField?: string;
745
+ /** Field for event end */
746
+ endDateField?: string;
747
+ /** Field for event title */
748
+ titleField?: string;
749
+ /** Default view mode */
750
+ defaultView?: 'month' | 'week' | 'day' | 'agenda';
751
+ }
752
+
753
+ /**
754
+ * Object Kanban Component Schema
755
+ */
756
+ export interface ObjectKanbanSchema extends BaseSchema {
757
+ type: 'object-kanban';
758
+ /** ObjectQL object name */
759
+ objectName: string;
760
+ /** Field to group columns by (e.g. status) */
761
+ groupField: string;
762
+ /** Field for card title */
763
+ titleField?: string;
764
+ /** Fields to display on card */
765
+ cardFields?: string[];
766
+ }
767
+
768
+ /**
769
+ * Object Chart Component Schema
770
+ */
771
+ export interface ObjectChartSchema extends BaseSchema {
772
+ type: 'object-chart';
773
+ /** ObjectQL object name */
774
+ objectName: string;
775
+ /** Chart type */
776
+ chartType: 'bar' | 'line' | 'pie' | 'area' | 'scatter';
777
+ /** Field for X axis (categories) */
778
+ xAxisField: string;
779
+ /** Fields for Y axis (values) */
780
+ yAxisFields?: string[];
781
+ /** Aggregation function */
782
+ aggregation?: 'cardinality' | 'sum' | 'avg' | 'min' | 'max';
783
+ }
784
+
296
785
  /**
297
786
  * Union type of all ObjectQL component schemas
298
787
  */
299
788
  export type ObjectQLComponentSchema =
300
- | ObjectTableSchema
301
- | ObjectFormSchema;
789
+ | ObjectGridSchema
790
+ | ObjectFormSchema
791
+ | ObjectViewSchema
792
+ | ObjectMapSchema
793
+ | ObjectGanttSchema
794
+ | ObjectCalendarSchema
795
+ | ObjectKanbanSchema
796
+ | ObjectChartSchema
797
+ | ListViewSchema;