@@ -39,71 +39,6 @@ import {
3939
4040type SortDirection = 'asc' | 'desc' | null ;
4141
42- /**
43- * Column configuration for the data table.
44- * @interface Column
45- */
46- interface Column {
47- /** Display name of the column */
48- header : string ;
49- /** Key to access the data field in each row object */
50- accessorKey : string ;
51- /** Optional CSS classes for the column header */
52- className ?: string ;
53- /** Optional CSS classes for the column cells */
54- cellClassName ?: string ;
55- /** Width of the column (e.g., '80px' or 80) */
56- width ?: string | number ;
57- /** Whether sorting is enabled for this column (default: true) */
58- sortable ?: boolean ;
59- /** Whether filtering is enabled for this column (default: true) */
60- filterable ?: boolean ;
61- /** Whether column resizing is enabled (default: true) */
62- resizable ?: boolean ;
63- }
64-
65- /**
66- * Schema definition for the enterprise data table component.
67- * Supports sorting, pagination, search, row selection, CSV export, and row actions.
68- * @interface DataTableSchema
69- */
70- interface DataTableSchema {
71- /** Optional caption text displayed above the table */
72- caption ?: string ;
73- /** Array of column definitions */
74- columns : Column [ ] ;
75- /** Array of data objects to display. Each object should have an 'id' field for stable row identification */
76- data : any [ ] ;
77- /** Enable/disable pagination (default: true) */
78- pagination ?: boolean ;
79- /** Number of rows per page (default: 10) */
80- pageSize ?: number ;
81- /** Enable/disable search across all columns (default: true) */
82- searchable ?: boolean ;
83- /** Enable/disable row selection with checkboxes (default: false) */
84- selectable ?: boolean ;
85- /** Enable/disable column sorting (default: true) */
86- sortable ?: boolean ;
87- /** Enable/disable CSV export button (default: false) */
88- exportable ?: boolean ;
89- /** Show/hide edit and delete action buttons for each row (default: false) */
90- rowActions ?: boolean ;
91- /** Enable/disable column resizing by dragging (default: true) */
92- resizableColumns ?: boolean ;
93- /** Enable/disable column reordering by dragging (default: true) */
94- reorderableColumns ?: boolean ;
95- /** Callback function triggered when the edit button is clicked */
96- onRowEdit ?: ( row : any ) => void ;
97- /** Callback function triggered when the delete button is clicked */
98- onRowDelete ?: ( row : any ) => void ;
99- /** Callback function triggered when row selection changes, receives array of selected rows */
100- onSelectionChange ?: ( selectedRows : any [ ] ) => void ;
101- /** Callback function triggered when columns are reordered */
102- onColumnsReorder ?: ( columns : Column [ ] ) => void ;
103- /** Optional CSS classes for the table container */
104- className ?: string ;
105- }
106-
10742/**
10843 * Enterprise-level data table component with Airtable-like features.
10944 *
0 commit comments