@object-ui/types 3.0.3 → 3.1.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 (85) hide show
  1. package/dist/app.d.ts +217 -0
  2. package/dist/app.d.ts.map +1 -1
  3. package/dist/app.js +85 -1
  4. package/dist/complex.d.ts +128 -0
  5. package/dist/complex.d.ts.map +1 -1
  6. package/dist/data-display.d.ts +105 -1
  7. package/dist/data-display.d.ts.map +1 -1
  8. package/dist/data.d.ts +45 -0
  9. package/dist/data.d.ts.map +1 -1
  10. package/dist/designer.d.ts +197 -35
  11. package/dist/designer.d.ts.map +1 -1
  12. package/dist/designer.js +11 -1
  13. package/dist/index.d.ts +21 -10
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -0
  16. package/dist/layout.d.ts +39 -2
  17. package/dist/layout.d.ts.map +1 -1
  18. package/dist/navigation.d.ts +27 -0
  19. package/dist/navigation.d.ts.map +1 -1
  20. package/dist/objectql.d.ts +641 -7
  21. package/dist/objectql.d.ts.map +1 -1
  22. package/dist/record-components.d.ts +160 -0
  23. package/dist/record-components.d.ts.map +1 -0
  24. package/dist/record-components.js +8 -0
  25. package/dist/reports.d.ts +37 -0
  26. package/dist/reports.d.ts.map +1 -1
  27. package/dist/theme.d.ts +5 -0
  28. package/dist/theme.d.ts.map +1 -1
  29. package/dist/views.d.ts +324 -4
  30. package/dist/views.d.ts.map +1 -1
  31. package/dist/workflow.d.ts +198 -0
  32. package/dist/workflow.d.ts.map +1 -1
  33. package/dist/zod/app.zod.d.ts +42 -2
  34. package/dist/zod/app.zod.d.ts.map +1 -1
  35. package/dist/zod/app.zod.js +61 -1
  36. package/dist/zod/complex.zod.d.ts +122 -0
  37. package/dist/zod/complex.zod.d.ts.map +1 -1
  38. package/dist/zod/complex.zod.js +57 -0
  39. package/dist/zod/data-display.zod.d.ts +4 -0
  40. package/dist/zod/data-display.zod.d.ts.map +1 -1
  41. package/dist/zod/data-display.zod.js +2 -0
  42. package/dist/zod/form.zod.d.ts +6 -6
  43. package/dist/zod/index.zod.d.ts +365 -41
  44. package/dist/zod/index.zod.d.ts.map +1 -1
  45. package/dist/zod/index.zod.js +2 -2
  46. package/dist/zod/layout.zod.d.ts +6 -6
  47. package/dist/zod/navigation.zod.d.ts +58 -12
  48. package/dist/zod/navigation.zod.d.ts.map +1 -1
  49. package/dist/zod/navigation.zod.js +21 -9
  50. package/dist/zod/objectql.zod.d.ts +515 -27
  51. package/dist/zod/objectql.zod.d.ts.map +1 -1
  52. package/dist/zod/objectql.zod.js +162 -0
  53. package/dist/zod/reports.zod.d.ts +38 -38
  54. package/dist/zod/views.zod.d.ts +163 -7
  55. package/dist/zod/views.zod.d.ts.map +1 -1
  56. package/dist/zod/views.zod.js +22 -3
  57. package/package.json +2 -2
  58. package/src/__tests__/app-creation-types.test.ts +177 -0
  59. package/src/__tests__/dashboard-config.test.ts +208 -0
  60. package/src/__tests__/examples-metadata-compliance.test.ts +264 -0
  61. package/src/__tests__/navigation-model.test.ts +406 -0
  62. package/src/__tests__/p1-spec-alignment.test.ts +660 -0
  63. package/src/__tests__/p2-spec-exports.test.ts +312 -0
  64. package/src/__tests__/phase2-schemas.test.ts +108 -0
  65. package/src/app.ts +377 -0
  66. package/src/complex.ts +130 -0
  67. package/src/data-display.ts +107 -0
  68. package/src/data.ts +49 -0
  69. package/src/designer.ts +219 -30
  70. package/src/index.ts +194 -3
  71. package/src/layout.ts +55 -2
  72. package/src/navigation.ts +20 -0
  73. package/src/objectql.ts +757 -8
  74. package/src/record-components.ts +188 -0
  75. package/src/reports.ts +43 -0
  76. package/src/theme.ts +6 -0
  77. package/src/views.ts +344 -4
  78. package/src/workflow.ts +226 -0
  79. package/src/zod/app.zod.ts +74 -1
  80. package/src/zod/complex.zod.ts +59 -0
  81. package/src/zod/data-display.zod.ts +2 -0
  82. package/src/zod/index.zod.ts +5 -0
  83. package/src/zod/navigation.zod.ts +22 -10
  84. package/src/zod/objectql.zod.ts +167 -0
  85. package/src/zod/views.zod.ts +22 -3
@@ -53,7 +53,27 @@ export type { SelectionConfig } from '@objectstack/spec/ui';
53
53
  * Canonical definition from @objectstack/spec/ui.
54
54
  */
55
55
  export type { PaginationConfig } from '@objectstack/spec/ui';
56
- import type { ViewData, ListColumn, SelectionConfig, PaginationConfig, GroupingConfig, RowColorConfig } from '@objectstack/spec/ui';
56
+ import type { ViewData, ListColumn, SelectionConfig, PaginationConfig, GroupingConfig, RowColorConfig, GalleryConfig, TimelineConfig } from '@objectstack/spec/ui';
57
+ /**
58
+ * Gallery configuration extended with legacy fields for backward compatibility.
59
+ * Spec fields from GalleryConfigSchema take priority; legacy fields serve as fallbacks.
60
+ */
61
+ export type ListViewGalleryConfig = GalleryConfig & {
62
+ /** Legacy: image field (deprecated, use coverField) */
63
+ imageField?: string;
64
+ /** Legacy: subtitle field */
65
+ subtitleField?: string;
66
+ [key: string]: any;
67
+ };
68
+ /**
69
+ * Timeline configuration extended with legacy fields for backward compatibility.
70
+ * Spec fields from TimelineConfigSchema take priority; legacy fields serve as fallbacks.
71
+ */
72
+ export type ListViewTimelineConfig = TimelineConfig & {
73
+ /** Legacy: date field (deprecated, use startDateField) */
74
+ dateField?: string;
75
+ [key: string]: any;
76
+ };
57
77
  /**
58
78
  * Kanban Configuration
59
79
  * Canonical definition from @objectstack/spec/ui (KanbanConfigSchema).
@@ -107,6 +127,81 @@ export interface SortConfig {
107
127
  /** Sort order */
108
128
  order: 'asc' | 'desc';
109
129
  }
130
+ /**
131
+ * ObjectUI-native QuickFilter format.
132
+ * Each quick filter renders as a toggle button with explicit id, label, and filter conditions.
133
+ */
134
+ export interface ObjectUIQuickFilterItem {
135
+ /** Unique identifier for this quick filter */
136
+ id: string;
137
+ /** Display label for the filter button */
138
+ label: string;
139
+ /** Filter conditions to apply when activated */
140
+ filters: Array<any[] | string>;
141
+ /** Icon name (Lucide icon identifier) */
142
+ icon?: string;
143
+ /** Default active state */
144
+ defaultActive?: boolean;
145
+ }
146
+ /**
147
+ * Spec-format QuickFilter item (from @objectstack/spec).
148
+ * A single field-level predicate: `{ field, operator, value }`.
149
+ * Automatically converted to ObjectUI format at runtime.
150
+ */
151
+ export interface SpecQuickFilterItem {
152
+ /** Field name to filter on */
153
+ field: string;
154
+ /** Filter operator (e.g. 'eq', 'equals', 'contains', 'gt', etc.) */
155
+ operator: string;
156
+ /** Value to compare against */
157
+ value: unknown;
158
+ /** Optional display label (auto-generated if omitted) */
159
+ label?: string;
160
+ /** Icon name (Lucide icon identifier) */
161
+ icon?: string;
162
+ /** Default active state */
163
+ defaultActive?: boolean;
164
+ }
165
+ /**
166
+ * Union type for QuickFilter items — accepts both ObjectUI and Spec formats.
167
+ */
168
+ export type QuickFilterItem = ObjectUIQuickFilterItem | SpecQuickFilterItem;
169
+ /**
170
+ * ObjectUI-native ConditionalFormatting rule.
171
+ * Uses field/operator/value for declarative comparisons.
172
+ */
173
+ export interface ObjectUIConditionalFormattingRule {
174
+ /** Field name to evaluate */
175
+ field: string;
176
+ /** Comparison operator */
177
+ operator: 'equals' | 'not_equals' | 'contains' | 'greater_than' | 'less_than' | 'in';
178
+ /** Value to compare against */
179
+ value: unknown;
180
+ /** CSS-compatible background color */
181
+ backgroundColor?: string;
182
+ /** CSS-compatible text color */
183
+ textColor?: string;
184
+ /** CSS-compatible border color */
185
+ borderColor?: string;
186
+ /** Template expression override (e.g., '${data.amount > 1000}') */
187
+ expression?: string;
188
+ }
189
+ /**
190
+ * Spec-format ConditionalFormatting rule (from @objectstack/spec).
191
+ * Uses a plain expression string with a style map.
192
+ * Automatically evaluated at runtime via ExpressionEvaluator.
193
+ */
194
+ export interface SpecConditionalFormattingRule {
195
+ /** Plain condition expression (e.g., "status == 'overdue'") or template expression (e.g., "${data.amount > 1000}") */
196
+ condition: string;
197
+ /** Style map to apply when condition matches (e.g., { backgroundColor: '#fee2e2', color: '#991b1b' }) */
198
+ style: Record<string, string>;
199
+ }
200
+ /**
201
+ * Union type for ConditionalFormatting rules — accepts both ObjectUI and Spec formats.
202
+ * Rules are evaluated in order; first matching rule wins.
203
+ */
204
+ export type ConditionalFormattingRule = ObjectUIConditionalFormattingRule | SpecConditionalFormattingRule;
110
205
  /**
111
206
  * ObjectGrid Schema
112
207
  * A specialized grid component that automatically fetches and displays data from ObjectQL objects.
@@ -314,6 +409,12 @@ export interface ObjectGridSchema extends BaseSchema {
314
409
  * @default false
315
410
  */
316
411
  editable?: boolean;
412
+ /**
413
+ * Enable single-click editing mode
414
+ * When true with editable, clicking a cell enters edit mode (instead of double-click)
415
+ * @default false
416
+ */
417
+ singleClickEdit?: boolean;
317
418
  /**
318
419
  * Grouping Configuration (Airtable-style)
319
420
  * Groups rows by specified fields with collapsible sections.
@@ -340,6 +441,28 @@ export interface ObjectGridSchema extends BaseSchema {
340
441
  * @default 0
341
442
  */
342
443
  frozenColumns?: number;
444
+ /**
445
+ * Row height preset for the grid.
446
+ * Controls the density of grid rows.
447
+ * Aligned with @objectstack/spec RowHeight enum.
448
+ * @default 'compact'
449
+ */
450
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
451
+ /**
452
+ * Export options configuration for exporting grid data.
453
+ * Supports csv, xlsx, json, and pdf formats.
454
+ * Aligned with @objectstack/spec ListViewSchema.exportOptions.
455
+ */
456
+ exportOptions?: {
457
+ /** Formats available for export */
458
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
459
+ /** Maximum number of records to export (0 = unlimited) */
460
+ maxRecords?: number;
461
+ /** Include column headers in export */
462
+ includeHeaders?: boolean;
463
+ /** Custom file name prefix */
464
+ fileNamePrefix?: string;
465
+ };
343
466
  /**
344
467
  * Navigation configuration for row click behavior.
345
468
  * Controls how record detail is displayed when a row is clicked.
@@ -351,6 +474,40 @@ export interface ObjectGridSchema extends BaseSchema {
351
474
  * Called with recordId and action ('view' | 'edit').
352
475
  */
353
476
  onNavigate?: (recordId: string | number, action?: string) => void;
477
+ /**
478
+ * Conditional formatting rules for row/cell styling.
479
+ * Aligned with @objectstack/spec ListViewSchema.conditionalFormatting.
480
+ * Supports both ObjectUI field/operator/value rules and Spec expression-based { condition, style } rules.
481
+ */
482
+ conditionalFormatting?: ConditionalFormattingRule[];
483
+ /**
484
+ * Enable virtual scrolling for large datasets.
485
+ * Aligned with @objectstack/spec ListViewSchema.virtualScroll.
486
+ * @default false
487
+ */
488
+ virtualScroll?: boolean;
489
+ /**
490
+ * Row action identifiers (action names from ActionSchema).
491
+ * Aligned with @objectstack/spec ListViewSchema.rowActions.
492
+ */
493
+ rowSpecActions?: string[];
494
+ /**
495
+ * Bulk action identifiers (action names from ActionSchema).
496
+ * Aligned with @objectstack/spec ListViewSchema.bulkActions.
497
+ */
498
+ bulkSpecActions?: string[];
499
+ /**
500
+ * Empty state configuration shown when no data is available.
501
+ * Aligned with @objectstack/spec ListViewSchema.emptyState.
502
+ */
503
+ emptyState?: {
504
+ /** Title text for the empty state */
505
+ title?: string;
506
+ /** Message/description for the empty state */
507
+ message?: string;
508
+ /** Icon name (Lucide icon identifier) */
509
+ icon?: string;
510
+ };
354
511
  }
355
512
  /**
356
513
  * Form Section Configuration
@@ -689,6 +846,11 @@ export interface ObjectViewSchema extends BaseSchema {
689
846
  * @default true
690
847
  */
691
848
  showFilters?: boolean;
849
+ /**
850
+ * Show sort controls
851
+ * @default true
852
+ */
853
+ showSort?: boolean;
692
854
  /**
693
855
  * Show create button
694
856
  * @default true
@@ -701,7 +863,7 @@ export interface ObjectViewSchema extends BaseSchema {
701
863
  showRefresh?: boolean;
702
864
  /**
703
865
  * Show view switcher (for multi-view)
704
- * When false (default), view type is fixed at creation in ViewDesigner
866
+ * When false (default), view type is fixed at creation in ViewConfigPanel
705
867
  * @default false
706
868
  */
707
869
  showViewSwitcher?: boolean;
@@ -722,6 +884,46 @@ export interface ObjectViewSchema extends BaseSchema {
722
884
  * Custom CSS class
723
885
  */
724
886
  className?: string;
887
+ /**
888
+ * View tab bar UX configuration (inline add, context menu, overflow, indicators).
889
+ */
890
+ viewTabBar?: ViewTabBarConfig;
891
+ /**
892
+ * Show "+" button in ViewSwitcher to create a new view.
893
+ * Typically gated on admin permission.
894
+ */
895
+ allowCreateView?: boolean;
896
+ /**
897
+ * Per-view action icons shown in ViewSwitcher (e.g., share, settings, duplicate, delete).
898
+ */
899
+ viewActions?: Array<{
900
+ type: 'share' | 'settings' | 'duplicate' | 'delete';
901
+ icon?: string;
902
+ }>;
903
+ }
904
+ /**
905
+ * View Tab Bar Configuration
906
+ * Controls the UX of the view tab bar (inline add, context menu, overflow, indicators).
907
+ */
908
+ export interface ViewTabBarConfig {
909
+ /** Show inline "+" button to create new views @default true */
910
+ showAddButton?: boolean;
911
+ /** Allow inline renaming by double-clicking tab @default true */
912
+ inlineRename?: boolean;
913
+ /** Show context menu on right-click @default true */
914
+ contextMenu?: boolean;
915
+ /** Allow drag-reorder of view tabs @default false */
916
+ reorderable?: boolean;
917
+ /** Max visible tabs before overflow → "More" dropdown @default 6 */
918
+ maxVisibleTabs?: number;
919
+ /** Show filter/sort indicator badges on tabs @default true */
920
+ showIndicators?: boolean;
921
+ /** Show "Save as View" when filters differ from saved @default true */
922
+ showSaveAsView?: boolean;
923
+ /** Show pinned views section @default true */
924
+ showPinnedSection?: boolean;
925
+ /** Group tabs by personal/shared @default false */
926
+ showVisibilityGroups?: boolean;
725
927
  }
726
928
  /**
727
929
  * Named List View Definition
@@ -743,6 +945,121 @@ export interface NamedListView {
743
945
  }>;
744
946
  /** Type-specific options (kanban groupField, calendar startDateField, etc.) */
745
947
  options?: Record<string, any>;
948
+ /** Show search box in toolbar @default true */
949
+ showSearch?: boolean;
950
+ /** Show sort controls in toolbar @default true */
951
+ showSort?: boolean;
952
+ /** Show filter controls in toolbar @default true */
953
+ showFilters?: boolean;
954
+ /** Show hide-fields button in toolbar @default false */
955
+ showHideFields?: boolean;
956
+ /** Show group button in toolbar @default true */
957
+ showGroup?: boolean;
958
+ /** Show color button in toolbar @default false */
959
+ showColor?: boolean;
960
+ /** Show density/row-height button in toolbar @default false */
961
+ showDensity?: boolean;
962
+ /** Allow data export @default undefined */
963
+ allowExport?: boolean;
964
+ /** Show alternating row colors @default false */
965
+ striped?: boolean;
966
+ /** Show cell borders @default false */
967
+ bordered?: boolean;
968
+ /** Color field for row/card coloring */
969
+ color?: string;
970
+ /** Enable inline editing @default false */
971
+ inlineEdit?: boolean;
972
+ /** Wrap column headers in grid view @default false */
973
+ wrapHeaders?: boolean;
974
+ /** Navigate to record detail view when row is clicked @default true */
975
+ clickIntoRecordDetails?: boolean;
976
+ /** Add records via a form dialog @default false */
977
+ addRecordViaForm?: boolean;
978
+ /** Enable inline add/delete of records @default false */
979
+ addDeleteRecordsInline?: boolean;
980
+ /** Collapse all grouped sections by default @default false */
981
+ collapseAllByDefault?: boolean;
982
+ /** Field name for custom text color */
983
+ fieldTextColor?: string;
984
+ /** Prefix field displayed before the main title */
985
+ prefixField?: string;
986
+ /** View description */
987
+ description?: string;
988
+ /** Show field descriptions below headers @default false */
989
+ showDescription?: boolean;
990
+ /** Navigation configuration for row click behavior */
991
+ navigation?: ViewNavigationConfig;
992
+ /** Row selection mode */
993
+ selection?: {
994
+ type: 'none' | 'single' | 'multiple';
995
+ };
996
+ /** Pagination configuration */
997
+ pagination?: {
998
+ pageSize: number;
999
+ pageSizeOptions?: number[];
1000
+ };
1001
+ /** Fields that support text search */
1002
+ searchableFields?: string[];
1003
+ /** Fields available for filter UI */
1004
+ filterableFields?: string[];
1005
+ /** Allow column resizing @default false */
1006
+ resizable?: boolean;
1007
+ /** Density mode for controlling row/item spacing */
1008
+ densityMode?: 'compact' | 'comfortable' | 'spacious';
1009
+ /**
1010
+ * Row height for list/grid view rows.
1011
+ * Aligned with @objectstack/spec RowHeight enum.
1012
+ */
1013
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
1014
+ /** Fields to hide from the current view */
1015
+ hiddenFields?: string[];
1016
+ /** Export options configuration */
1017
+ exportOptions?: {
1018
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
1019
+ maxRecords?: number;
1020
+ includeHeaders?: boolean;
1021
+ fileNamePrefix?: string;
1022
+ };
1023
+ /** Row action identifiers */
1024
+ rowActions?: string[];
1025
+ /** Bulk action identifiers */
1026
+ bulkActions?: string[];
1027
+ /** View sharing configuration */
1028
+ sharing?: {
1029
+ visibility?: 'private' | 'team' | 'organization' | 'public';
1030
+ enabled?: boolean;
1031
+ };
1032
+ /** Add record configuration */
1033
+ addRecord?: {
1034
+ enabled?: boolean;
1035
+ position?: string;
1036
+ mode?: string;
1037
+ formView?: string;
1038
+ };
1039
+ /** Conditional formatting rules.
1040
+ * Supports both ObjectUI field/operator/value rules and Spec expression-based { condition, style } rules. */
1041
+ conditionalFormatting?: ConditionalFormattingRule[];
1042
+ /** Quick filter buttons for predefined filter presets.
1043
+ * Supports both ObjectUI format and Spec format (auto-converted at runtime). */
1044
+ quickFilters?: QuickFilterItem[];
1045
+ /** Show total record count @default false */
1046
+ showRecordCount?: boolean;
1047
+ /** Allow printing the view @default false */
1048
+ allowPrinting?: boolean;
1049
+ /** Enable virtual scrolling for large datasets @default false */
1050
+ virtualScroll?: boolean;
1051
+ /** Empty state configuration */
1052
+ emptyState?: {
1053
+ title?: string;
1054
+ message?: string;
1055
+ icon?: string;
1056
+ };
1057
+ /** ARIA attributes for accessibility */
1058
+ aria?: {
1059
+ label?: string;
1060
+ describedBy?: string;
1061
+ live?: 'polite' | 'assertive' | 'off';
1062
+ };
746
1063
  }
747
1064
  /**
748
1065
  * Navigation configuration for row/item click behavior.
@@ -785,6 +1102,25 @@ export interface ListViewSchema extends BaseSchema {
785
1102
  objectName: string;
786
1103
  /** View Type (grid, kanban, etc.) @default 'grid' */
787
1104
  viewType?: 'grid' | 'kanban' | 'gallery' | 'calendar' | 'timeline' | 'gantt' | 'map';
1105
+ /**
1106
+ * Data Source Configuration.
1107
+ * Aligned with @objectstack/spec ViewDataSchema.
1108
+ * Supports provider: 'object' (fetch from objectName), 'value' (inline items), 'api' (custom endpoint).
1109
+ * If not provided, defaults to fetching from objectName via dataSource.find().
1110
+ */
1111
+ data?: ViewData;
1112
+ /**
1113
+ * Grouping Configuration (Airtable-style).
1114
+ * Groups rows by specified fields with collapsible sections.
1115
+ * Aligned with @objectstack/spec GroupingConfigSchema.
1116
+ */
1117
+ grouping?: GroupingConfig;
1118
+ /**
1119
+ * Row Color Configuration (Airtable-style).
1120
+ * Colors rows based on field values.
1121
+ * Aligned with @objectstack/spec RowColorConfigSchema.
1122
+ */
1123
+ rowColor?: RowColorConfig;
788
1124
  /** Columns definition (string field names or full column config) */
789
1125
  columns?: string[] | Array<{
790
1126
  field: string;
@@ -798,16 +1134,23 @@ export interface ListViewSchema extends BaseSchema {
798
1134
  type?: string;
799
1135
  link?: boolean;
800
1136
  action?: string;
1137
+ /** Pin column to left or right edge */
1138
+ pinned?: 'left' | 'right';
1139
+ /** Column footer summary/aggregation (e.g., 'count', 'sum', 'avg') */
1140
+ summary?: string | {
1141
+ type: 'count' | 'sum' | 'avg' | 'min' | 'max';
1142
+ field?: string;
1143
+ };
801
1144
  }>;
802
1145
  /** Fields to fetch/display (alias for simple string[] columns) */
803
1146
  fields?: string[];
804
1147
  /** Filter conditions */
805
1148
  filters?: Array<any[] | string>;
806
- /** Sort order */
1149
+ /** Sort order. Supports array of objects or legacy string format "field desc" */
807
1150
  sort?: Array<{
808
1151
  field: string;
809
1152
  order: 'asc' | 'desc';
810
- }>;
1153
+ } | string>;
811
1154
  /** Fields that support text search */
812
1155
  searchableFields?: string[];
813
1156
  /** Fields available for filter UI */
@@ -827,6 +1170,24 @@ export interface ListViewSchema extends BaseSchema {
827
1170
  striped?: boolean;
828
1171
  /** Show cell borders @default false */
829
1172
  bordered?: boolean;
1173
+ /** Show search box in toolbar @default true */
1174
+ showSearch?: boolean;
1175
+ /** Show sort controls in toolbar @default true */
1176
+ showSort?: boolean;
1177
+ /** Show filter controls in toolbar @default true */
1178
+ showFilters?: boolean;
1179
+ /** Show hide-fields button in toolbar @default false */
1180
+ showHideFields?: boolean;
1181
+ /** Show group button in toolbar @default true */
1182
+ showGroup?: boolean;
1183
+ /** Show color button in toolbar @default false */
1184
+ showColor?: boolean;
1185
+ /** Show density/row-height button in toolbar @default false */
1186
+ showDensity?: boolean;
1187
+ /** Allow data export @default undefined */
1188
+ allowExport?: boolean;
1189
+ /** Color field for row/card coloring */
1190
+ color?: string;
830
1191
  /** Navigation config for row click behavior */
831
1192
  navigation?: ViewNavigationConfig;
832
1193
  /**
@@ -858,12 +1219,248 @@ export interface ListViewSchema extends BaseSchema {
858
1219
  dependenciesField?: string;
859
1220
  [key: string]: any;
860
1221
  };
1222
+ /** Gallery-specific configuration. Aligned with @objectstack/spec GalleryConfigSchema. */
1223
+ gallery?: ListViewGalleryConfig;
1224
+ /** Timeline-specific configuration. Aligned with @objectstack/spec TimelineConfigSchema. */
1225
+ timeline?: ListViewTimelineConfig;
861
1226
  /** Visual Component overrides (legacy, prefer typed configs above) */
862
1227
  options?: Record<string, any>;
1228
+ /**
1229
+ * Empty state configuration shown when no data is available.
1230
+ * Aligned with @objectstack/spec ListViewSchema.emptyState.
1231
+ */
1232
+ emptyState?: {
1233
+ /** Title text for the empty state */
1234
+ title?: string;
1235
+ /** Message/description for the empty state */
1236
+ message?: string;
1237
+ /** Icon name (Lucide icon identifier) for the empty state */
1238
+ icon?: string;
1239
+ };
1240
+ /**
1241
+ * Quick filter buttons for predefined filter presets.
1242
+ * Supports both ObjectUI format and Spec format (auto-converted at runtime).
1243
+ */
1244
+ quickFilters?: QuickFilterItem[];
1245
+ /**
1246
+ * Fields to hide from the current view.
1247
+ * Hides columns in grid view or fields in other view types.
1248
+ */
1249
+ hiddenFields?: string[];
1250
+ /**
1251
+ * Custom field display order. Fields listed first appear first.
1252
+ * Fields not listed are appended in their original order.
1253
+ */
1254
+ fieldOrder?: string[];
1255
+ /**
1256
+ * Export options configuration for exporting list data.
1257
+ * Supports both ObjectUI object format and spec simple string[] format.
1258
+ * Spec format: ['csv', 'xlsx'] (simple array of format strings)
1259
+ * ObjectUI format: { formats, maxRecords, includeHeaders, fileNamePrefix }
1260
+ */
1261
+ exportOptions?: Array<'csv' | 'xlsx' | 'json' | 'pdf'> | {
1262
+ /** Formats available for export */
1263
+ formats?: Array<'csv' | 'xlsx' | 'json' | 'pdf'>;
1264
+ /** Maximum number of records to export (0 = unlimited) */
1265
+ maxRecords?: number;
1266
+ /** Include column headers in export */
1267
+ includeHeaders?: boolean;
1268
+ /** Custom file name prefix */
1269
+ fileNamePrefix?: string;
1270
+ };
1271
+ /**
1272
+ * Density mode for controlling row/item spacing.
1273
+ * Aligned with @objectstack/spec DensityMode.
1274
+ */
1275
+ densityMode?: 'compact' | 'comfortable' | 'spacious';
1276
+ /**
1277
+ * Row height for list/grid view rows.
1278
+ * Aligned with @objectstack/spec RowHeight enum.
1279
+ */
1280
+ rowHeight?: 'compact' | 'short' | 'medium' | 'tall' | 'extra_tall';
1281
+ /**
1282
+ * Conditional formatting rules for row/cell styling.
1283
+ * Rules are evaluated in order; first matching rule wins.
1284
+ * Supports both ObjectUI field/operator/value rules and spec expression-based { condition, style } rules.
1285
+ */
1286
+ conditionalFormatting?: ConditionalFormattingRule[];
1287
+ /**
1288
+ * Enable inline editing for list view fields.
1289
+ * When true, cells become editable on click/double-click.
1290
+ */
1291
+ inlineEdit?: boolean;
1292
+ /** Wrap column headers in grid view @default false */
1293
+ wrapHeaders?: boolean;
1294
+ /** Navigate to record detail view when row is clicked @default true */
1295
+ clickIntoRecordDetails?: boolean;
1296
+ /** Add records via a form dialog @default false */
1297
+ addRecordViaForm?: boolean;
1298
+ /** Enable inline add/delete of records @default false */
1299
+ addDeleteRecordsInline?: boolean;
1300
+ /** Collapse all grouped sections by default @default false */
1301
+ collapseAllByDefault?: boolean;
1302
+ /** Field name for custom text color */
1303
+ fieldTextColor?: string;
1304
+ /** Prefix field displayed before the main title */
1305
+ prefixField?: string;
1306
+ /** Show field descriptions below headers @default false */
1307
+ showDescription?: boolean;
1308
+ /**
1309
+ * ARIA attributes for accessibility.
1310
+ * Applied to the root list container element.
1311
+ */
1312
+ aria?: {
1313
+ /** Accessible label for the list view */
1314
+ label?: string;
1315
+ /** ID of the element that describes the list view */
1316
+ describedBy?: string;
1317
+ /** Live region politeness for dynamic updates */
1318
+ live?: 'polite' | 'assertive' | 'off';
1319
+ };
1320
+ /**
1321
+ * View sharing configuration.
1322
+ * Supports both ObjectUI format { visibility, enabled } and spec format { type, lockedBy }.
1323
+ * Controls who can see this view and enables share UI.
1324
+ */
1325
+ sharing?: {
1326
+ /** Visibility level for the view (ObjectUI format) */
1327
+ visibility?: 'private' | 'team' | 'organization' | 'public';
1328
+ /** Whether sharing controls are shown in the toolbar */
1329
+ enabled?: boolean;
1330
+ /** Sharing type (spec format: personal or collaborative) */
1331
+ type?: 'personal' | 'collaborative';
1332
+ /** User who locked the view (spec format) */
1333
+ lockedBy?: string;
1334
+ };
1335
+ /**
1336
+ * User Filters Configuration (Airtable Interfaces-style).
1337
+ *
1338
+ * Supports three display modes configured by `element`:
1339
+ * - 'dropdown': Each field renders as a dropdown selector badge (e.g., "Status ∨")
1340
+ * - 'tabs': Named filter presets rendered as a tab bar (e.g., "Tab | my customers | All records")
1341
+ * - 'toggle': Each filter field renders as an on/off toggle button
1342
+ */
1343
+ userFilters?: {
1344
+ /** UI element type for displaying filters */
1345
+ element: 'dropdown' | 'tabs' | 'toggle';
1346
+ /**
1347
+ * Field-level filter definitions (used by 'dropdown' and 'toggle' modes).
1348
+ * Each field appears as an independent filter control in the toolbar.
1349
+ */
1350
+ fields?: Array<{
1351
+ /** Field name to filter on */
1352
+ field: string;
1353
+ /** Display label (defaults to field label from objectDef) */
1354
+ label?: string;
1355
+ /** Filter input type */
1356
+ type?: 'select' | 'multi-select' | 'boolean' | 'date-range' | 'text';
1357
+ /** Static options (overrides auto-derived from objectDef) */
1358
+ options?: Array<{
1359
+ label: string;
1360
+ value: string | number | boolean;
1361
+ color?: string;
1362
+ }>;
1363
+ /** Show record count per option */
1364
+ showCount?: boolean;
1365
+ /** Default selected values */
1366
+ defaultValues?: (string | number | boolean)[];
1367
+ }>;
1368
+ /**
1369
+ * Named filter presets (used by 'tabs' mode).
1370
+ * Each tab represents a pre-configured filter combination.
1371
+ */
1372
+ tabs?: Array<{
1373
+ /** Unique tab identifier */
1374
+ id: string;
1375
+ /** Tab display label */
1376
+ label: string;
1377
+ /** Filter conditions to apply when this tab is active */
1378
+ filters: Array<any[] | string>;
1379
+ /** Icon name (Lucide icon identifier) */
1380
+ icon?: string;
1381
+ /** Whether this is the default active tab */
1382
+ default?: boolean;
1383
+ }>;
1384
+ /** Allow users to add new filter tabs at runtime */
1385
+ allowAddTab?: boolean;
1386
+ /** Show "All records" tab (tabs mode) */
1387
+ showAllRecords?: boolean;
1388
+ };
1389
+ /**
1390
+ * Row action identifiers (action names from ActionSchema).
1391
+ * Aligned with @objectstack/spec ListViewSchema.rowActions.
1392
+ */
1393
+ rowActions?: string[];
1394
+ /**
1395
+ * Bulk action identifiers (action names from ActionSchema).
1396
+ * Aligned with @objectstack/spec ListViewSchema.bulkActions.
1397
+ */
1398
+ bulkActions?: string[];
1399
+ /**
1400
+ * Enable virtual scrolling for large datasets.
1401
+ * Aligned with @objectstack/spec ListViewSchema.virtualScroll.
1402
+ * @default false
1403
+ */
1404
+ virtualScroll?: boolean;
1405
+ /**
1406
+ * User actions configuration.
1407
+ * Controls what UI actions are available to end users.
1408
+ * Aligned with @objectstack/spec ListViewSchema.userActions.
1409
+ */
1410
+ userActions?: {
1411
+ sort?: boolean;
1412
+ search?: boolean;
1413
+ filter?: boolean;
1414
+ rowHeight?: boolean;
1415
+ addRecordForm?: boolean;
1416
+ buttons?: string[];
1417
+ };
1418
+ /**
1419
+ * Appearance configuration.
1420
+ * Aligned with @objectstack/spec ListViewSchema.appearance.
1421
+ */
1422
+ appearance?: {
1423
+ showDescription?: boolean;
1424
+ allowedVisualizations?: string[];
1425
+ };
1426
+ /**
1427
+ * View tabs configuration.
1428
+ * Aligned with @objectstack/spec ListViewSchema.tabs.
1429
+ */
1430
+ tabs?: Array<{
1431
+ name: string;
1432
+ label: string;
1433
+ icon?: string;
1434
+ view?: string;
1435
+ filter?: any;
1436
+ order?: number;
1437
+ pinned?: boolean;
1438
+ isDefault?: boolean;
1439
+ visible?: string;
1440
+ }>;
1441
+ /**
1442
+ * Add record configuration.
1443
+ * Aligned with @objectstack/spec ListViewSchema.addRecord.
1444
+ */
1445
+ addRecord?: {
1446
+ enabled?: boolean;
1447
+ position?: string;
1448
+ mode?: string;
1449
+ formView?: string;
1450
+ };
1451
+ /**
1452
+ * Show total record count in the view.
1453
+ * Aligned with @objectstack/spec ListViewSchema.showRecordCount.
1454
+ * @default false
1455
+ */
1456
+ showRecordCount?: boolean;
1457
+ /**
1458
+ * Allow printing the view.
1459
+ * Aligned with @objectstack/spec ListViewSchema.allowPrinting.
1460
+ * @default false
1461
+ */
1462
+ allowPrinting?: boolean;
863
1463
  }
864
- /**
865
- * Object Map Component Schema
866
- */
867
1464
  export interface ObjectMapSchema extends BaseSchema {
868
1465
  type: 'object-map';
869
1466
  /** ObjectQL object name */
@@ -920,6 +1517,43 @@ export interface ObjectKanbanSchema extends BaseSchema {
920
1517
  titleField?: string;
921
1518
  /** Fields to display on card */
922
1519
  cardFields?: string[];
1520
+ /**
1521
+ * Enable Quick Add button at the bottom of each column.
1522
+ * When true, a "+" button appears allowing inline card creation.
1523
+ * @default false
1524
+ */
1525
+ quickAdd?: boolean;
1526
+ /**
1527
+ * Field name to use as cover image on cards.
1528
+ * The field value should be a URL string or file object with a `url` property.
1529
+ */
1530
+ coverImageField?: string;
1531
+ /**
1532
+ * Allow columns to be collapsed/expanded.
1533
+ * Collapsed columns show only the title and card count.
1534
+ * @default false
1535
+ */
1536
+ allowCollapse?: boolean;
1537
+ /**
1538
+ * Conditional formatting rules for card coloring.
1539
+ * Cards are colored based on field values matching conditions.
1540
+ */
1541
+ conditionalFormatting?: KanbanConditionalFormattingRule[];
1542
+ }
1543
+ /**
1544
+ * Conditional formatting rule for Kanban cards
1545
+ */
1546
+ export interface KanbanConditionalFormattingRule {
1547
+ /** Field name to check */
1548
+ field: string;
1549
+ /** Operator for comparison */
1550
+ operator: 'equals' | 'not_equals' | 'contains' | 'in';
1551
+ /** Value to compare against */
1552
+ value: string | string[];
1553
+ /** Background color to apply (Tailwind class or CSS color) */
1554
+ backgroundColor?: string;
1555
+ /** Border color to apply (Tailwind class or CSS color) */
1556
+ borderColor?: string;
923
1557
  }
924
1558
  /**
925
1559
  * Object Chart Component Schema