@object-ui/types 0.3.1 → 2.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 (141) hide show
  1. package/README.md +1 -1
  2. package/dist/ai.d.ts +376 -0
  3. package/dist/ai.d.ts.map +1 -0
  4. package/dist/ai.js +8 -0
  5. package/dist/app.d.ts +10 -0
  6. package/dist/app.d.ts.map +1 -1
  7. package/dist/blocks.d.ts +332 -0
  8. package/dist/blocks.d.ts.map +1 -0
  9. package/dist/blocks.js +8 -0
  10. package/dist/crud.d.ts +177 -3
  11. package/dist/crud.d.ts.map +1 -1
  12. package/dist/data-display.d.ts +35 -0
  13. package/dist/data-display.d.ts.map +1 -1
  14. package/dist/data-protocol.d.ts +1268 -0
  15. package/dist/data-protocol.d.ts.map +1 -0
  16. package/dist/data-protocol.js +8 -0
  17. package/dist/data.d.ts +74 -1
  18. package/dist/data.d.ts.map +1 -1
  19. package/dist/designer.d.ts +473 -0
  20. package/dist/designer.d.ts.map +1 -0
  21. package/dist/designer.js +8 -0
  22. package/dist/field-types.d.ts +353 -11
  23. package/dist/field-types.d.ts.map +1 -1
  24. package/dist/form.d.ts +35 -1
  25. package/dist/form.d.ts.map +1 -1
  26. package/dist/index.d.ts +58 -4
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +18 -0
  29. package/dist/layout.d.ts +63 -8
  30. package/dist/layout.d.ts.map +1 -1
  31. package/dist/mobile.d.ts +186 -0
  32. package/dist/mobile.d.ts.map +1 -0
  33. package/dist/mobile.js +8 -0
  34. package/dist/objectql.d.ts +337 -89
  35. package/dist/objectql.d.ts.map +1 -1
  36. package/dist/permissions.d.ts +150 -0
  37. package/dist/permissions.d.ts.map +1 -0
  38. package/dist/permissions.js +8 -0
  39. package/dist/plugin-scope.d.ts +194 -0
  40. package/dist/plugin-scope.d.ts.map +1 -0
  41. package/dist/plugin-scope.js +8 -0
  42. package/dist/reports.d.ts +336 -0
  43. package/dist/reports.d.ts.map +1 -0
  44. package/dist/reports.js +8 -0
  45. package/dist/tenant.d.ts +138 -0
  46. package/dist/tenant.d.ts.map +1 -0
  47. package/dist/tenant.js +8 -0
  48. package/dist/theme.d.ts +180 -0
  49. package/dist/theme.d.ts.map +1 -0
  50. package/dist/theme.js +8 -0
  51. package/dist/ui-action.d.ts +290 -0
  52. package/dist/ui-action.d.ts.map +1 -0
  53. package/dist/ui-action.js +8 -0
  54. package/dist/views.d.ts +427 -0
  55. package/dist/views.d.ts.map +1 -0
  56. package/dist/views.js +8 -0
  57. package/dist/widget.d.ts +181 -0
  58. package/dist/widget.d.ts.map +1 -0
  59. package/dist/widget.js +8 -0
  60. package/dist/workflow.d.ts +340 -0
  61. package/dist/workflow.d.ts.map +1 -0
  62. package/dist/workflow.js +8 -0
  63. package/dist/zod/app.zod.d.ts +120 -0
  64. package/dist/zod/app.zod.d.ts.map +1 -0
  65. package/dist/zod/app.zod.js +60 -0
  66. package/dist/zod/blocks.zod.d.ts +834 -0
  67. package/dist/zod/blocks.zod.d.ts.map +1 -0
  68. package/dist/zod/blocks.zod.js +145 -0
  69. package/dist/zod/complex.zod.d.ts +4 -4
  70. package/dist/zod/complex.zod.js +1 -1
  71. package/dist/zod/crud.zod.d.ts +598 -0
  72. package/dist/zod/crud.zod.d.ts.map +1 -0
  73. package/dist/zod/crud.zod.js +230 -0
  74. package/dist/zod/data-display.zod.js +1 -1
  75. package/dist/zod/disclosure.zod.js +1 -1
  76. package/dist/zod/feedback.zod.d.ts +10 -10
  77. package/dist/zod/feedback.zod.js +1 -1
  78. package/dist/zod/form.zod.d.ts +4 -4
  79. package/dist/zod/form.zod.js +1 -1
  80. package/dist/zod/index.zod.d.ts +2032 -30
  81. package/dist/zod/index.zod.d.ts.map +1 -1
  82. package/dist/zod/index.zod.js +96 -19
  83. package/dist/zod/layout.zod.d.ts +134 -2
  84. package/dist/zod/layout.zod.d.ts.map +1 -1
  85. package/dist/zod/layout.zod.js +35 -1
  86. package/dist/zod/navigation.zod.js +1 -1
  87. package/dist/zod/objectql.zod.d.ts +34 -18
  88. package/dist/zod/objectql.zod.d.ts.map +1 -1
  89. package/dist/zod/objectql.zod.js +9 -1
  90. package/dist/zod/overlay.zod.js +1 -1
  91. package/dist/zod/reports.zod.d.ts +1628 -0
  92. package/dist/zod/reports.zod.d.ts.map +1 -0
  93. package/dist/zod/reports.zod.js +152 -0
  94. package/dist/zod/theme.zod.d.ts +1292 -0
  95. package/dist/zod/theme.zod.d.ts.map +1 -0
  96. package/dist/zod/theme.zod.js +260 -0
  97. package/dist/zod/views.zod.d.ts +675 -0
  98. package/dist/zod/views.zod.d.ts.map +1 -0
  99. package/dist/zod/views.zod.js +159 -0
  100. package/package.json +3 -2
  101. package/src/__tests__/namespace-exports.test.ts +36 -0
  102. package/src/__tests__/phase2-schemas.test.ts +634 -0
  103. package/src/ai.ts +454 -0
  104. package/src/app.ts +12 -0
  105. package/src/blocks.ts +405 -0
  106. package/src/crud.ts +180 -3
  107. package/src/data-display.ts +31 -0
  108. package/src/data-protocol.ts +1679 -0
  109. package/src/data.ts +84 -1
  110. package/src/designer.ts +509 -0
  111. package/src/field-types.ts +392 -11
  112. package/src/form.ts +35 -1
  113. package/src/index.ts +426 -0
  114. package/src/layout.ts +66 -8
  115. package/src/mobile.ts +205 -0
  116. package/src/objectql.ts +412 -94
  117. package/src/permissions.ts +166 -0
  118. package/src/plugin-scope.ts +210 -0
  119. package/src/reports.ts +408 -0
  120. package/src/tenant.ts +153 -0
  121. package/src/theme.ts +238 -0
  122. package/src/ui-action.ts +415 -0
  123. package/src/views.ts +436 -0
  124. package/src/widget.ts +197 -0
  125. package/src/workflow.ts +409 -0
  126. package/src/zod/app.zod.ts +72 -0
  127. package/src/zod/blocks.zod.ts +170 -0
  128. package/src/zod/complex.zod.ts +1 -1
  129. package/src/zod/crud.zod.ts +259 -0
  130. package/src/zod/data-display.zod.ts +1 -1
  131. package/src/zod/disclosure.zod.ts +1 -1
  132. package/src/zod/feedback.zod.ts +1 -1
  133. package/src/zod/form.zod.ts +1 -1
  134. package/src/zod/index.zod.ts +178 -19
  135. package/src/zod/layout.zod.ts +39 -1
  136. package/src/zod/navigation.zod.ts +1 -1
  137. package/src/zod/objectql.zod.ts +9 -1
  138. package/src/zod/overlay.zod.ts +1 -1
  139. package/src/zod/reports.zod.ts +183 -0
  140. package/src/zod/theme.zod.ts +296 -0
  141. package/src/zod/views.zod.ts +182 -0
package/src/blocks.ts ADDED
@@ -0,0 +1,405 @@
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 - Block Schema
11
+ *
12
+ * Defines reusable component blocks for composition and templating.
13
+ */
14
+
15
+ import type { BaseSchema, SchemaNode } from './base';
16
+
17
+ /**
18
+ * Block Variable Definition
19
+ */
20
+ export interface BlockVariable {
21
+ /**
22
+ * Variable name
23
+ */
24
+ name: string;
25
+
26
+ /**
27
+ * Display label
28
+ */
29
+ label?: string;
30
+
31
+ /**
32
+ * Variable type
33
+ */
34
+ type?: 'string' | 'number' | 'boolean' | 'object' | 'array' | 'component';
35
+
36
+ /**
37
+ * Default value
38
+ */
39
+ defaultValue?: any;
40
+
41
+ /**
42
+ * Description/help text
43
+ */
44
+ description?: string;
45
+
46
+ /**
47
+ * Whether this variable is required
48
+ */
49
+ required?: boolean;
50
+
51
+ /**
52
+ * Validation rules
53
+ */
54
+ validation?: any;
55
+
56
+ /**
57
+ * Enum options (for string/number types)
58
+ */
59
+ enum?: any[];
60
+ }
61
+
62
+ /**
63
+ * Block Slot Definition
64
+ */
65
+ export interface BlockSlot {
66
+ /**
67
+ * Slot name
68
+ */
69
+ name: string;
70
+
71
+ /**
72
+ * Display label
73
+ */
74
+ label?: string;
75
+
76
+ /**
77
+ * Description
78
+ */
79
+ description?: string;
80
+
81
+ /**
82
+ * Default content
83
+ */
84
+ defaultContent?: SchemaNode | SchemaNode[];
85
+
86
+ /**
87
+ * Allowed component types
88
+ */
89
+ allowedTypes?: string[];
90
+
91
+ /**
92
+ * Maximum number of children
93
+ */
94
+ maxChildren?: number;
95
+
96
+ /**
97
+ * Whether this slot is required
98
+ */
99
+ required?: boolean;
100
+ }
101
+
102
+ /**
103
+ * Block Metadata
104
+ */
105
+ export interface BlockMetadata {
106
+ /**
107
+ * Block name/identifier
108
+ */
109
+ name: string;
110
+
111
+ /**
112
+ * Display label
113
+ */
114
+ label?: string;
115
+
116
+ /**
117
+ * Block description
118
+ */
119
+ description?: string;
120
+
121
+ /**
122
+ * Block category
123
+ */
124
+ category?: string;
125
+
126
+ /**
127
+ * Block icon
128
+ */
129
+ icon?: string;
130
+
131
+ /**
132
+ * Block tags for search
133
+ */
134
+ tags?: string[];
135
+
136
+ /**
137
+ * Author/creator
138
+ */
139
+ author?: string;
140
+
141
+ /**
142
+ * Version
143
+ */
144
+ version?: string;
145
+
146
+ /**
147
+ * License
148
+ */
149
+ license?: string;
150
+
151
+ /**
152
+ * Repository URL
153
+ */
154
+ repository?: string;
155
+
156
+ /**
157
+ * Preview image URL
158
+ */
159
+ preview?: string;
160
+
161
+ /**
162
+ * Is this a premium/paid block
163
+ */
164
+ premium?: boolean;
165
+ }
166
+
167
+ /**
168
+ * Block Schema - Reusable component block
169
+ */
170
+ export interface BlockSchema extends BaseSchema {
171
+ type: 'block';
172
+
173
+ /**
174
+ * Block metadata
175
+ */
176
+ meta?: BlockMetadata;
177
+
178
+ /**
179
+ * Block variables/props
180
+ */
181
+ variables?: BlockVariable[];
182
+
183
+ /**
184
+ * Block slots for content injection
185
+ */
186
+ slots?: BlockSlot[];
187
+
188
+ /**
189
+ * Block template (component tree)
190
+ */
191
+ template?: SchemaNode | SchemaNode[];
192
+
193
+ /**
194
+ * Variable values (when using a block)
195
+ */
196
+ values?: Record<string, any>;
197
+
198
+ /**
199
+ * Slot content (when using a block)
200
+ */
201
+ slotContent?: Record<string, SchemaNode | SchemaNode[]>;
202
+
203
+ /**
204
+ * Block reference (for reusing saved blocks)
205
+ */
206
+ blockRef?: string;
207
+
208
+ /**
209
+ * Enable edit mode
210
+ */
211
+ editable?: boolean;
212
+ }
213
+
214
+ /**
215
+ * Block Library Item
216
+ */
217
+ export interface BlockLibraryItem {
218
+ /**
219
+ * Unique identifier
220
+ */
221
+ id: string;
222
+
223
+ /**
224
+ * Block metadata
225
+ */
226
+ meta: BlockMetadata;
227
+
228
+ /**
229
+ * Block schema
230
+ */
231
+ schema: BlockSchema;
232
+
233
+ /**
234
+ * Installation count
235
+ */
236
+ installs?: number;
237
+
238
+ /**
239
+ * Rating (1-5)
240
+ */
241
+ rating?: number;
242
+
243
+ /**
244
+ * Number of ratings
245
+ */
246
+ ratingCount?: number;
247
+
248
+ /**
249
+ * Last updated timestamp
250
+ */
251
+ updatedAt?: string;
252
+
253
+ /**
254
+ * Created timestamp
255
+ */
256
+ createdAt?: string;
257
+ }
258
+
259
+ /**
260
+ * Block Library Schema - Browse and install blocks
261
+ */
262
+ export interface BlockLibrarySchema extends BaseSchema {
263
+ type: 'block-library';
264
+
265
+ /**
266
+ * Library API endpoint
267
+ */
268
+ apiEndpoint?: string;
269
+
270
+ /**
271
+ * Filter by category
272
+ */
273
+ category?: string;
274
+
275
+ /**
276
+ * Search query
277
+ */
278
+ searchQuery?: string;
279
+
280
+ /**
281
+ * Filter by tags
282
+ */
283
+ tags?: string[];
284
+
285
+ /**
286
+ * Show premium blocks
287
+ */
288
+ showPremium?: boolean;
289
+
290
+ /**
291
+ * Blocks to display
292
+ */
293
+ blocks?: BlockLibraryItem[];
294
+
295
+ /**
296
+ * Loading state
297
+ */
298
+ loading?: boolean;
299
+
300
+ /**
301
+ * Install callback
302
+ */
303
+ onInstall?: string;
304
+
305
+ /**
306
+ * Preview callback
307
+ */
308
+ onPreview?: string;
309
+ }
310
+
311
+ /**
312
+ * Block Editor Schema - Edit/create blocks
313
+ */
314
+ export interface BlockEditorSchema extends BaseSchema {
315
+ type: 'block-editor';
316
+
317
+ /**
318
+ * Block being edited
319
+ */
320
+ block?: BlockSchema;
321
+
322
+ /**
323
+ * Show variable editor
324
+ */
325
+ showVariables?: boolean;
326
+
327
+ /**
328
+ * Show slot editor
329
+ */
330
+ showSlots?: boolean;
331
+
332
+ /**
333
+ * Show template editor
334
+ */
335
+ showTemplate?: boolean;
336
+
337
+ /**
338
+ * Show preview
339
+ */
340
+ showPreview?: boolean;
341
+
342
+ /**
343
+ * Save callback
344
+ */
345
+ onSave?: string;
346
+
347
+ /**
348
+ * Cancel callback
349
+ */
350
+ onCancel?: string;
351
+ }
352
+
353
+ /**
354
+ * Block Instance Schema - Use a saved block
355
+ */
356
+ export interface BlockInstanceSchema extends BaseSchema {
357
+ type: 'block-instance';
358
+
359
+ /**
360
+ * Block reference ID
361
+ */
362
+ blockId: string;
363
+
364
+ /**
365
+ * Block name (for local blocks)
366
+ */
367
+ blockName?: string;
368
+
369
+ /**
370
+ * Variable values
371
+ */
372
+ values?: Record<string, any>;
373
+
374
+ /**
375
+ * Slot content
376
+ */
377
+ slotContent?: Record<string, SchemaNode | SchemaNode[]>;
378
+
379
+ /**
380
+ * Override styles
381
+ */
382
+ overrideStyles?: boolean;
383
+ }
384
+
385
+ /**
386
+ * Component Schema Extension - For base component metadata
387
+ */
388
+ export interface ComponentSchema extends BaseSchema {
389
+ type: 'component';
390
+
391
+ /**
392
+ * Component name/identifier
393
+ */
394
+ componentName?: string;
395
+
396
+ /**
397
+ * Component props
398
+ */
399
+ props?: Record<string, any>;
400
+
401
+ /**
402
+ * Component children
403
+ */
404
+ children?: SchemaNode | SchemaNode[];
405
+ }
package/src/crud.ts CHANGED
@@ -20,8 +20,70 @@ import type { BaseSchema, SchemaNode } from './base';
20
20
  import type { FormField } from './form';
21
21
  import type { TableColumn } from './data-display';
22
22
 
23
+ /**
24
+ * Action execution mode for chaining
25
+ */
26
+ export type ActionExecutionMode = 'sequential' | 'parallel';
27
+
28
+ /**
29
+ * Action callback configuration
30
+ */
31
+ export interface ActionCallback {
32
+ /**
33
+ * Callback type
34
+ */
35
+ type: 'toast' | 'message' | 'redirect' | 'reload' | 'custom' | 'ajax' | 'dialog';
36
+ /**
37
+ * Message to display
38
+ */
39
+ message?: string;
40
+ /**
41
+ * Redirect URL
42
+ */
43
+ url?: string;
44
+ /**
45
+ * API endpoint for ajax callback
46
+ */
47
+ api?: string;
48
+ /**
49
+ * HTTP method for ajax callback
50
+ */
51
+ method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
52
+ /**
53
+ * Dialog schema to open
54
+ */
55
+ dialog?: SchemaNode;
56
+ /**
57
+ * Custom callback handler expression
58
+ */
59
+ handler?: string;
60
+ }
61
+
62
+ /**
63
+ * Conditional action configuration
64
+ */
65
+ export interface ActionCondition {
66
+ /**
67
+ * Condition expression
68
+ * @example "${data.status === 'active'}"
69
+ */
70
+ expression: string;
71
+ /**
72
+ * Action to execute if condition is true
73
+ */
74
+ then?: ActionSchema | ActionSchema[];
75
+ /**
76
+ * Action to execute if condition is false
77
+ */
78
+ else?: ActionSchema | ActionSchema[];
79
+ }
80
+
23
81
  /**
24
82
  * Action button configuration for CRUD operations
83
+ * Enhanced with Phase 2 features: ajax, confirm, dialog, chaining, conditional execution
84
+ *
85
+ * @deprecated Use `UIActionSchema` from `@object-ui/types` (re-exported from `ui-action.ts`) for new code.
86
+ * This legacy interface will be removed in a future major version.
25
87
  */
26
88
  export interface ActionSchema extends BaseSchema {
27
89
  type: 'action';
@@ -48,10 +110,11 @@ export interface ActionSchema extends BaseSchema {
48
110
  disabled?: boolean;
49
111
  /**
50
112
  * Action type
113
+ * Enhanced in Phase 2 with 'ajax', 'confirm', 'dialog'
51
114
  */
52
- actionType?: 'button' | 'link' | 'dropdown';
115
+ actionType?: 'button' | 'link' | 'dropdown' | 'ajax' | 'confirm' | 'dialog';
53
116
  /**
54
- * API endpoint to call
117
+ * API endpoint to call (for ajax actions)
55
118
  */
56
119
  api?: string;
57
120
  /**
@@ -60,13 +123,93 @@ export interface ActionSchema extends BaseSchema {
60
123
  */
61
124
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
62
125
  /**
63
- * Confirmation message before execution
126
+ * Request body/data
127
+ */
128
+ data?: any;
129
+ /**
130
+ * Request headers
131
+ */
132
+ headers?: Record<string, string>;
133
+ /**
134
+ * Confirmation dialog configuration (for confirm actions)
135
+ */
136
+ confirm?: {
137
+ /**
138
+ * Confirmation title
139
+ */
140
+ title?: string;
141
+ /**
142
+ * Confirmation message
143
+ */
144
+ message?: string;
145
+ /**
146
+ * Confirm button text
147
+ */
148
+ confirmText?: string;
149
+ /**
150
+ * Cancel button text
151
+ */
152
+ cancelText?: string;
153
+ /**
154
+ * Confirm button variant
155
+ */
156
+ confirmVariant?: 'default' | 'destructive' | 'outline' | 'secondary' | 'ghost';
157
+ };
158
+ /**
159
+ * Legacy confirmation message (deprecated - use confirm object instead)
160
+ * @deprecated Use confirm.message instead
64
161
  */
65
162
  confirmText?: string;
163
+ /**
164
+ * Dialog configuration (for dialog actions)
165
+ */
166
+ dialog?: {
167
+ /**
168
+ * Dialog title
169
+ */
170
+ title?: string;
171
+ /**
172
+ * Dialog content
173
+ */
174
+ content?: SchemaNode | SchemaNode[];
175
+ /**
176
+ * Dialog size
177
+ */
178
+ size?: 'sm' | 'default' | 'lg' | 'xl' | 'full';
179
+ /**
180
+ * Dialog actions
181
+ */
182
+ actions?: ActionSchema[];
183
+ };
66
184
  /**
67
185
  * Success message after execution
68
186
  */
69
187
  successMessage?: string;
188
+ /**
189
+ * Error message on failure
190
+ */
191
+ errorMessage?: string;
192
+ /**
193
+ * Success callback (Phase 2)
194
+ */
195
+ onSuccess?: ActionCallback;
196
+ /**
197
+ * Failure callback (Phase 2)
198
+ */
199
+ onFailure?: ActionCallback;
200
+ /**
201
+ * Action chaining - actions to execute after this one (Phase 2)
202
+ */
203
+ chain?: ActionSchema[];
204
+ /**
205
+ * Chain execution mode
206
+ * @default 'sequential'
207
+ */
208
+ chainMode?: ActionExecutionMode;
209
+ /**
210
+ * Conditional execution (Phase 2)
211
+ */
212
+ condition?: ActionCondition;
70
213
  /**
71
214
  * Whether to reload data after action
72
215
  * @default true
@@ -85,6 +228,40 @@ export interface ActionSchema extends BaseSchema {
85
228
  * Redirect URL after success
86
229
  */
87
230
  redirect?: string;
231
+ /**
232
+ * Action logging/tracking (Phase 2)
233
+ */
234
+ tracking?: {
235
+ /**
236
+ * Enable tracking
237
+ */
238
+ enabled?: boolean;
239
+ /**
240
+ * Event name
241
+ */
242
+ event?: string;
243
+ /**
244
+ * Additional metadata
245
+ */
246
+ metadata?: Record<string, any>;
247
+ };
248
+ /**
249
+ * Timeout in milliseconds
250
+ */
251
+ timeout?: number;
252
+ /**
253
+ * Retry configuration
254
+ */
255
+ retry?: {
256
+ /**
257
+ * Maximum retry attempts
258
+ */
259
+ maxAttempts?: number;
260
+ /**
261
+ * Delay between retries (in ms)
262
+ */
263
+ delay?: number;
264
+ };
88
265
  }
89
266
 
90
267
  /**
@@ -253,6 +253,11 @@ export interface TableColumn {
253
253
  * @default true
254
254
  */
255
255
  resizable?: boolean;
256
+ /**
257
+ * Whether column is editable (for inline editing)
258
+ * @default true
259
+ */
260
+ editable?: boolean;
256
261
  /**
257
262
  * Custom cell renderer function
258
263
  */
@@ -377,6 +382,32 @@ export interface DataTableSchema extends BaseSchema {
377
382
  * Columns reorder handler
378
383
  */
379
384
  onColumnsReorder?: (columns: TableColumn[]) => void;
385
+ /**
386
+ * Enable inline cell editing
387
+ * When true, cells become editable on double-click or Enter key
388
+ * @default false
389
+ */
390
+ editable?: boolean;
391
+ /**
392
+ * Cell value change handler
393
+ * Called when a cell value is edited
394
+ */
395
+ onCellChange?: (rowIndex: number, columnKey: string, newValue: any, row: any) => void;
396
+ /**
397
+ * Row save handler
398
+ * Called when saving changes for a single row
399
+ */
400
+ onRowSave?: (rowIndex: number, changes: Record<string, any>, row: any) => void | Promise<void>;
401
+ /**
402
+ * Batch save handler
403
+ * Called when saving changes for multiple rows
404
+ */
405
+ onBatchSave?: (changes: Array<{ rowIndex: number; changes: Record<string, any>; row: any }>) => void | Promise<void>;
406
+ /**
407
+ * Row click handler
408
+ * Called when a row is clicked
409
+ */
410
+ onRowClick?: (row: any) => void;
380
411
  }
381
412
 
382
413
  /**