@object-ui/types 0.3.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.
- package/LICENSE +21 -0
- package/README.md +304 -0
- package/dist/api-types.d.ts +451 -0
- package/dist/api-types.d.ts.map +1 -0
- package/dist/api-types.js +10 -0
- package/dist/app.d.ts +120 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +7 -0
- package/dist/base.d.ts +360 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +10 -0
- package/dist/complex.d.ts +433 -0
- package/dist/complex.d.ts.map +1 -0
- package/dist/complex.js +9 -0
- package/dist/crud.d.ts +457 -0
- package/dist/crud.d.ts.map +1 -0
- package/dist/crud.js +10 -0
- package/dist/data-display.d.ts +599 -0
- package/dist/data-display.d.ts.map +1 -0
- package/dist/data-display.js +9 -0
- package/dist/data.d.ts +295 -0
- package/dist/data.d.ts.map +1 -0
- package/dist/data.js +10 -0
- package/dist/disclosure.d.ts +107 -0
- package/dist/disclosure.d.ts.map +1 -0
- package/dist/disclosure.js +9 -0
- package/dist/feedback.d.ts +159 -0
- package/dist/feedback.d.ts.map +1 -0
- package/dist/feedback.js +9 -0
- package/dist/form.d.ts +932 -0
- package/dist/form.d.ts.map +1 -0
- package/dist/form.js +9 -0
- package/dist/index.d.ts +108 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/layout.d.ts +418 -0
- package/dist/layout.d.ts.map +1 -0
- package/dist/layout.js +10 -0
- package/dist/navigation.d.ts +224 -0
- package/dist/navigation.d.ts.map +1 -0
- package/dist/navigation.js +9 -0
- package/dist/objectql.d.ts +254 -0
- package/dist/objectql.d.ts.map +1 -0
- package/dist/objectql.js +10 -0
- package/dist/overlay.d.ts +396 -0
- package/dist/overlay.d.ts.map +1 -0
- package/dist/overlay.js +9 -0
- package/dist/registry.d.ts +85 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +1 -0
- package/package.json +82 -0
- package/src/api-types.ts +464 -0
- package/src/app.ts +138 -0
- package/src/base.ts +416 -0
- package/src/complex.ts +465 -0
- package/src/crud.ts +467 -0
- package/src/data-display.ts +630 -0
- package/src/data.ts +341 -0
- package/src/disclosure.ts +113 -0
- package/src/feedback.ts +170 -0
- package/src/form.ts +954 -0
- package/src/index.ts +350 -0
- package/src/layout.ts +451 -0
- package/src/navigation.ts +235 -0
- package/src/objectql.ts +301 -0
- package/src/overlay.ts +418 -0
- package/src/registry.ts +182 -0
|
@@ -0,0 +1,630 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @object-ui/types - Data Display Component Schemas
|
|
3
|
+
*
|
|
4
|
+
* Type definitions for components that display data and information.
|
|
5
|
+
*
|
|
6
|
+
* @module data-display
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { BaseSchema, SchemaNode } from './base';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Alert component
|
|
14
|
+
*/
|
|
15
|
+
export interface AlertSchema extends BaseSchema {
|
|
16
|
+
type: 'alert';
|
|
17
|
+
/**
|
|
18
|
+
* Alert title
|
|
19
|
+
*/
|
|
20
|
+
title?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Alert description/message
|
|
23
|
+
*/
|
|
24
|
+
description?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Alert variant
|
|
27
|
+
* @default 'default'
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'default' | 'destructive';
|
|
30
|
+
/**
|
|
31
|
+
* Alert icon
|
|
32
|
+
*/
|
|
33
|
+
icon?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Whether alert is dismissible
|
|
36
|
+
*/
|
|
37
|
+
dismissible?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Dismiss handler
|
|
40
|
+
*/
|
|
41
|
+
onDismiss?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Child content
|
|
44
|
+
*/
|
|
45
|
+
children?: SchemaNode | SchemaNode[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Statistic component for dashboards
|
|
50
|
+
*/
|
|
51
|
+
export interface StatisticSchema extends BaseSchema {
|
|
52
|
+
type: 'statistic';
|
|
53
|
+
/**
|
|
54
|
+
* The label/title of the statistic (e.g. "Total Revenue")
|
|
55
|
+
*/
|
|
56
|
+
label?: string;
|
|
57
|
+
/**
|
|
58
|
+
* The main value (e.g. "$45,231.89")
|
|
59
|
+
*/
|
|
60
|
+
value: string | number;
|
|
61
|
+
/**
|
|
62
|
+
* Optional trend indicator
|
|
63
|
+
*/
|
|
64
|
+
trend?: 'up' | 'down' | 'neutral';
|
|
65
|
+
/**
|
|
66
|
+
* Additional description (e.g. "+20.1% from last month")
|
|
67
|
+
*/
|
|
68
|
+
description?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Optional icon name
|
|
71
|
+
*/
|
|
72
|
+
icon?: string;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Badge component
|
|
77
|
+
*/
|
|
78
|
+
export interface BadgeSchema extends BaseSchema {
|
|
79
|
+
type: 'badge';
|
|
80
|
+
/**
|
|
81
|
+
* Badge text
|
|
82
|
+
*/
|
|
83
|
+
label?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Badge variant
|
|
86
|
+
* @default 'default'
|
|
87
|
+
*/
|
|
88
|
+
variant?: 'default' | 'secondary' | 'destructive' | 'outline';
|
|
89
|
+
/**
|
|
90
|
+
* Badge icon
|
|
91
|
+
*/
|
|
92
|
+
icon?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Child content
|
|
95
|
+
*/
|
|
96
|
+
children?: SchemaNode | SchemaNode[];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Avatar component
|
|
101
|
+
*/
|
|
102
|
+
export interface AvatarSchema extends BaseSchema {
|
|
103
|
+
type: 'avatar';
|
|
104
|
+
/**
|
|
105
|
+
* Image source URL
|
|
106
|
+
*/
|
|
107
|
+
src?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Alt text
|
|
110
|
+
*/
|
|
111
|
+
alt?: string;
|
|
112
|
+
/**
|
|
113
|
+
* Fallback text (initials)
|
|
114
|
+
*/
|
|
115
|
+
fallback?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Avatar size
|
|
118
|
+
* @default 'default'
|
|
119
|
+
*/
|
|
120
|
+
size?: 'sm' | 'default' | 'lg' | 'xl';
|
|
121
|
+
/**
|
|
122
|
+
* Avatar shape
|
|
123
|
+
* @default 'circle'
|
|
124
|
+
*/
|
|
125
|
+
shape?: 'circle' | 'square';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* List component
|
|
130
|
+
*/
|
|
131
|
+
export interface ListSchema extends BaseSchema {
|
|
132
|
+
type: 'list';
|
|
133
|
+
/**
|
|
134
|
+
* List items
|
|
135
|
+
*/
|
|
136
|
+
items: ListItem[];
|
|
137
|
+
/**
|
|
138
|
+
* Whether list is ordered
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
ordered?: boolean;
|
|
142
|
+
/**
|
|
143
|
+
* List item dividers
|
|
144
|
+
* @default false
|
|
145
|
+
*/
|
|
146
|
+
dividers?: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Dense/compact layout
|
|
149
|
+
* @default false
|
|
150
|
+
*/
|
|
151
|
+
dense?: boolean;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* List item
|
|
156
|
+
*/
|
|
157
|
+
export interface ListItem {
|
|
158
|
+
/**
|
|
159
|
+
* Unique item identifier
|
|
160
|
+
*/
|
|
161
|
+
id?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Item label/title
|
|
164
|
+
*/
|
|
165
|
+
label?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Item description
|
|
168
|
+
*/
|
|
169
|
+
description?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Item icon
|
|
172
|
+
*/
|
|
173
|
+
icon?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Item avatar image
|
|
176
|
+
*/
|
|
177
|
+
avatar?: string;
|
|
178
|
+
/**
|
|
179
|
+
* Whether item is disabled
|
|
180
|
+
*/
|
|
181
|
+
disabled?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* Click handler
|
|
184
|
+
*/
|
|
185
|
+
onClick?: () => void;
|
|
186
|
+
/**
|
|
187
|
+
* Item content (schema nodes)
|
|
188
|
+
*/
|
|
189
|
+
content?: SchemaNode | SchemaNode[];
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Table column definition
|
|
194
|
+
*/
|
|
195
|
+
export interface TableColumn {
|
|
196
|
+
/**
|
|
197
|
+
* Column header text
|
|
198
|
+
*/
|
|
199
|
+
header: string;
|
|
200
|
+
/**
|
|
201
|
+
* Key to access data in row object
|
|
202
|
+
*/
|
|
203
|
+
accessorKey: string;
|
|
204
|
+
/**
|
|
205
|
+
* Header CSS class
|
|
206
|
+
*/
|
|
207
|
+
className?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Cell CSS class
|
|
210
|
+
*/
|
|
211
|
+
cellClassName?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Column width
|
|
214
|
+
*/
|
|
215
|
+
width?: string | number;
|
|
216
|
+
/**
|
|
217
|
+
* Column minimum width
|
|
218
|
+
*/
|
|
219
|
+
minWidth?: string | number;
|
|
220
|
+
/**
|
|
221
|
+
* Text alignment
|
|
222
|
+
* @default 'left'
|
|
223
|
+
*/
|
|
224
|
+
align?: 'left' | 'center' | 'right';
|
|
225
|
+
/**
|
|
226
|
+
* Pin column to side
|
|
227
|
+
*/
|
|
228
|
+
fixed?: 'left' | 'right';
|
|
229
|
+
/**
|
|
230
|
+
* Data type for formatting
|
|
231
|
+
*/
|
|
232
|
+
type?: 'text' | 'number' | 'date' | 'datetime' | 'currency' | 'percent' | 'boolean' | 'action';
|
|
233
|
+
/**
|
|
234
|
+
* Whether column is sortable
|
|
235
|
+
* @default true
|
|
236
|
+
*/
|
|
237
|
+
sortable?: boolean;
|
|
238
|
+
/**
|
|
239
|
+
* Whether column is filterable
|
|
240
|
+
* @default true
|
|
241
|
+
*/
|
|
242
|
+
filterable?: boolean;
|
|
243
|
+
/**
|
|
244
|
+
* Whether column is resizable
|
|
245
|
+
* @default true
|
|
246
|
+
*/
|
|
247
|
+
resizable?: boolean;
|
|
248
|
+
/**
|
|
249
|
+
* Custom cell renderer function
|
|
250
|
+
*/
|
|
251
|
+
cell?: (value: any, row: any) => any;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* Simple table component
|
|
256
|
+
*/
|
|
257
|
+
export interface TableSchema extends BaseSchema {
|
|
258
|
+
type: 'table';
|
|
259
|
+
/**
|
|
260
|
+
* Table caption
|
|
261
|
+
*/
|
|
262
|
+
caption?: string;
|
|
263
|
+
/**
|
|
264
|
+
* Table columns
|
|
265
|
+
*/
|
|
266
|
+
columns: TableColumn[];
|
|
267
|
+
/**
|
|
268
|
+
* Table data rows
|
|
269
|
+
*/
|
|
270
|
+
data: any[];
|
|
271
|
+
/**
|
|
272
|
+
* Table footer content
|
|
273
|
+
*/
|
|
274
|
+
footer?: SchemaNode | SchemaNode[] | string;
|
|
275
|
+
/**
|
|
276
|
+
* Whether table has hover effect
|
|
277
|
+
* @default true
|
|
278
|
+
*/
|
|
279
|
+
hoverable?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* Whether table has striped rows
|
|
282
|
+
* @default false
|
|
283
|
+
*/
|
|
284
|
+
striped?: boolean;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* Enterprise data table with advanced features
|
|
289
|
+
*/
|
|
290
|
+
export interface DataTableSchema extends BaseSchema {
|
|
291
|
+
type: 'data-table';
|
|
292
|
+
/**
|
|
293
|
+
* Table caption
|
|
294
|
+
*/
|
|
295
|
+
caption?: string;
|
|
296
|
+
/**
|
|
297
|
+
* Table toolbar actions/content
|
|
298
|
+
*/
|
|
299
|
+
toolbar?: SchemaNode[];
|
|
300
|
+
/**
|
|
301
|
+
* Table columns
|
|
302
|
+
*/
|
|
303
|
+
columns: TableColumn[];
|
|
304
|
+
/**
|
|
305
|
+
* Table data rows
|
|
306
|
+
*/
|
|
307
|
+
data: any[];
|
|
308
|
+
/**
|
|
309
|
+
* Enable pagination
|
|
310
|
+
* @default true
|
|
311
|
+
*/
|
|
312
|
+
pagination?: boolean;
|
|
313
|
+
/**
|
|
314
|
+
* Rows per page
|
|
315
|
+
* @default 10
|
|
316
|
+
*/
|
|
317
|
+
pageSize?: number;
|
|
318
|
+
/**
|
|
319
|
+
* Enable search
|
|
320
|
+
* @default true
|
|
321
|
+
*/
|
|
322
|
+
searchable?: boolean;
|
|
323
|
+
/**
|
|
324
|
+
* Enable row selection
|
|
325
|
+
* @default false
|
|
326
|
+
*/
|
|
327
|
+
selectable?: boolean;
|
|
328
|
+
/**
|
|
329
|
+
* Enable column sorting
|
|
330
|
+
* @default true
|
|
331
|
+
*/
|
|
332
|
+
sortable?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Enable CSV export
|
|
335
|
+
* @default false
|
|
336
|
+
*/
|
|
337
|
+
exportable?: boolean;
|
|
338
|
+
/**
|
|
339
|
+
* Show row actions (edit/delete)
|
|
340
|
+
* @default false
|
|
341
|
+
*/
|
|
342
|
+
rowActions?: boolean;
|
|
343
|
+
/**
|
|
344
|
+
* Enable column resizing
|
|
345
|
+
* @default true
|
|
346
|
+
*/
|
|
347
|
+
resizableColumns?: boolean;
|
|
348
|
+
/**
|
|
349
|
+
* Enable column reordering
|
|
350
|
+
* @default true
|
|
351
|
+
*/
|
|
352
|
+
reorderableColumns?: boolean;
|
|
353
|
+
/**
|
|
354
|
+
* Row edit handler
|
|
355
|
+
*/
|
|
356
|
+
onRowEdit?: (row: any) => void;
|
|
357
|
+
/**
|
|
358
|
+
* Row delete handler
|
|
359
|
+
*/
|
|
360
|
+
onRowDelete?: (row: any) => void;
|
|
361
|
+
/**
|
|
362
|
+
* Selection change handler
|
|
363
|
+
*/
|
|
364
|
+
onSelectionChange?: (selectedRows: any[]) => void;
|
|
365
|
+
/**
|
|
366
|
+
* Columns reorder handler
|
|
367
|
+
*/
|
|
368
|
+
onColumnsReorder?: (columns: TableColumn[]) => void;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Markdown renderer component
|
|
373
|
+
*/
|
|
374
|
+
export interface MarkdownSchema extends BaseSchema {
|
|
375
|
+
type: 'markdown';
|
|
376
|
+
/**
|
|
377
|
+
* Markdown content
|
|
378
|
+
*/
|
|
379
|
+
content: string;
|
|
380
|
+
/**
|
|
381
|
+
* Whether to sanitize HTML
|
|
382
|
+
* @default true
|
|
383
|
+
*/
|
|
384
|
+
sanitize?: boolean;
|
|
385
|
+
/**
|
|
386
|
+
* Custom components for markdown elements
|
|
387
|
+
*/
|
|
388
|
+
components?: Record<string, any>;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* Tree view node
|
|
393
|
+
*/
|
|
394
|
+
export interface TreeNode {
|
|
395
|
+
/**
|
|
396
|
+
* Unique node identifier
|
|
397
|
+
*/
|
|
398
|
+
id: string;
|
|
399
|
+
/**
|
|
400
|
+
* Node label
|
|
401
|
+
*/
|
|
402
|
+
label: string;
|
|
403
|
+
/**
|
|
404
|
+
* Node icon
|
|
405
|
+
*/
|
|
406
|
+
icon?: string;
|
|
407
|
+
/**
|
|
408
|
+
* Whether node is expanded by default
|
|
409
|
+
* @default false
|
|
410
|
+
*/
|
|
411
|
+
defaultExpanded?: boolean;
|
|
412
|
+
/**
|
|
413
|
+
* Whether node is selectable
|
|
414
|
+
* @default true
|
|
415
|
+
*/
|
|
416
|
+
selectable?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* Child nodes
|
|
419
|
+
*/
|
|
420
|
+
children?: TreeNode[];
|
|
421
|
+
/**
|
|
422
|
+
* Additional data
|
|
423
|
+
*/
|
|
424
|
+
data?: any;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Tree view component
|
|
429
|
+
*/
|
|
430
|
+
export interface TreeViewSchema extends BaseSchema {
|
|
431
|
+
type: 'tree-view';
|
|
432
|
+
/**
|
|
433
|
+
* Tree data
|
|
434
|
+
*/
|
|
435
|
+
data: TreeNode[];
|
|
436
|
+
/**
|
|
437
|
+
* Default expanded node IDs
|
|
438
|
+
*/
|
|
439
|
+
defaultExpandedIds?: string[];
|
|
440
|
+
/**
|
|
441
|
+
* Default selected node IDs
|
|
442
|
+
*/
|
|
443
|
+
defaultSelectedIds?: string[];
|
|
444
|
+
/**
|
|
445
|
+
* Controlled expanded node IDs
|
|
446
|
+
*/
|
|
447
|
+
expandedIds?: string[];
|
|
448
|
+
/**
|
|
449
|
+
* Controlled selected node IDs
|
|
450
|
+
*/
|
|
451
|
+
selectedIds?: string[];
|
|
452
|
+
/**
|
|
453
|
+
* Enable multi-selection
|
|
454
|
+
* @default false
|
|
455
|
+
*/
|
|
456
|
+
multiSelect?: boolean;
|
|
457
|
+
/**
|
|
458
|
+
* Show lines connecting nodes
|
|
459
|
+
* @default true
|
|
460
|
+
*/
|
|
461
|
+
showLines?: boolean;
|
|
462
|
+
/**
|
|
463
|
+
* Node select handler
|
|
464
|
+
*/
|
|
465
|
+
onSelectChange?: (selectedIds: string[]) => void;
|
|
466
|
+
/**
|
|
467
|
+
* Node expand handler
|
|
468
|
+
*/
|
|
469
|
+
onExpandChange?: (expandedIds: string[]) => void;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/**
|
|
473
|
+
* Chart type
|
|
474
|
+
*/
|
|
475
|
+
export type ChartType = 'line' | 'bar' | 'area' | 'pie' | 'donut' | 'radar' | 'scatter';
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* Chart data series
|
|
479
|
+
*/
|
|
480
|
+
export interface ChartSeries {
|
|
481
|
+
/**
|
|
482
|
+
* Series name
|
|
483
|
+
*/
|
|
484
|
+
name: string;
|
|
485
|
+
/**
|
|
486
|
+
* Series data points
|
|
487
|
+
*/
|
|
488
|
+
data: number[];
|
|
489
|
+
/**
|
|
490
|
+
* Series color
|
|
491
|
+
*/
|
|
492
|
+
color?: string;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Chart component
|
|
497
|
+
*/
|
|
498
|
+
export interface ChartSchema extends BaseSchema {
|
|
499
|
+
type: 'chart';
|
|
500
|
+
/**
|
|
501
|
+
* Chart type
|
|
502
|
+
*/
|
|
503
|
+
chartType: ChartType;
|
|
504
|
+
/**
|
|
505
|
+
* Chart title
|
|
506
|
+
*/
|
|
507
|
+
title?: string;
|
|
508
|
+
/**
|
|
509
|
+
* Chart description
|
|
510
|
+
*/
|
|
511
|
+
description?: string;
|
|
512
|
+
/**
|
|
513
|
+
* X-axis labels/categories
|
|
514
|
+
*/
|
|
515
|
+
categories?: string[];
|
|
516
|
+
/**
|
|
517
|
+
* Data series
|
|
518
|
+
*/
|
|
519
|
+
series: ChartSeries[];
|
|
520
|
+
/**
|
|
521
|
+
* Chart height
|
|
522
|
+
*/
|
|
523
|
+
height?: string | number;
|
|
524
|
+
/**
|
|
525
|
+
* Chart width
|
|
526
|
+
*/
|
|
527
|
+
width?: string | number;
|
|
528
|
+
/**
|
|
529
|
+
* Show legend
|
|
530
|
+
* @default true
|
|
531
|
+
*/
|
|
532
|
+
showLegend?: boolean;
|
|
533
|
+
/**
|
|
534
|
+
* Show grid
|
|
535
|
+
* @default true
|
|
536
|
+
*/
|
|
537
|
+
showGrid?: boolean;
|
|
538
|
+
/**
|
|
539
|
+
* Enable animations
|
|
540
|
+
* @default true
|
|
541
|
+
*/
|
|
542
|
+
animate?: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* Chart configuration (library-specific)
|
|
545
|
+
*/
|
|
546
|
+
config?: Record<string, any>;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* Timeline event
|
|
551
|
+
*/
|
|
552
|
+
export interface TimelineEvent {
|
|
553
|
+
/**
|
|
554
|
+
* Event unique identifier
|
|
555
|
+
*/
|
|
556
|
+
id?: string;
|
|
557
|
+
/**
|
|
558
|
+
* Event title
|
|
559
|
+
*/
|
|
560
|
+
title: string;
|
|
561
|
+
/**
|
|
562
|
+
* Event description
|
|
563
|
+
*/
|
|
564
|
+
description?: string;
|
|
565
|
+
/**
|
|
566
|
+
* Event date/time
|
|
567
|
+
*/
|
|
568
|
+
date: string | Date;
|
|
569
|
+
/**
|
|
570
|
+
* Event icon
|
|
571
|
+
*/
|
|
572
|
+
icon?: string;
|
|
573
|
+
/**
|
|
574
|
+
* Event color
|
|
575
|
+
*/
|
|
576
|
+
color?: string;
|
|
577
|
+
/**
|
|
578
|
+
* Event content
|
|
579
|
+
*/
|
|
580
|
+
content?: SchemaNode | SchemaNode[];
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
/**
|
|
584
|
+
* Timeline component
|
|
585
|
+
*/
|
|
586
|
+
export interface TimelineSchema extends BaseSchema {
|
|
587
|
+
type: 'timeline';
|
|
588
|
+
/**
|
|
589
|
+
* Timeline events
|
|
590
|
+
*/
|
|
591
|
+
events: TimelineEvent[];
|
|
592
|
+
/**
|
|
593
|
+
* Timeline orientation
|
|
594
|
+
* @default 'vertical'
|
|
595
|
+
*/
|
|
596
|
+
orientation?: 'vertical' | 'horizontal';
|
|
597
|
+
/**
|
|
598
|
+
* Timeline position (for vertical)
|
|
599
|
+
* @default 'left'
|
|
600
|
+
*/
|
|
601
|
+
position?: 'left' | 'right' | 'alternate';
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
/**
|
|
605
|
+
* Union type of all data display schemas
|
|
606
|
+
*/
|
|
607
|
+
export type DataDisplaySchema =
|
|
608
|
+
| AlertSchema
|
|
609
|
+
| BadgeSchema
|
|
610
|
+
| AvatarSchema
|
|
611
|
+
| ListSchema
|
|
612
|
+
| TableSchema
|
|
613
|
+
| DataTableSchema
|
|
614
|
+
| MarkdownSchema
|
|
615
|
+
| TreeViewSchema
|
|
616
|
+
| ChartSchema
|
|
617
|
+
| TimelineSchema
|
|
618
|
+
| HtmlSchema
|
|
619
|
+
| StatisticSchema;
|
|
620
|
+
|
|
621
|
+
/**
|
|
622
|
+
* Raw HTML component
|
|
623
|
+
*/
|
|
624
|
+
export interface HtmlSchema extends BaseSchema {
|
|
625
|
+
type: 'html';
|
|
626
|
+
/**
|
|
627
|
+
* The HTML content string
|
|
628
|
+
*/
|
|
629
|
+
html: string;
|
|
630
|
+
}
|