@sneat/datagrid 0.1.3 → 0.1.4
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/fesm2022/sneat-datagrid.mjs +326 -0
- package/fesm2022/sneat-datagrid.mjs.map +1 -0
- package/package.json +14 -2
- package/types/sneat-datagrid.d.ts +70 -0
- package/eslint.config.js +0 -7
- package/ng-package.json +0 -7
- package/project.json +0 -38
- package/src/index.ts +0 -2
- package/src/lib/components/cell-popover/cell-popover.component.html +0 -64
- package/src/lib/components/cell-popover/cell-popover.component.spec.ts +0 -168
- package/src/lib/components/cell-popover/cell-popover.component.ts +0 -62
- package/src/lib/components/cell-popover/index.ts +0 -1
- package/src/lib/components/data-grid/data-grid.component.spec.ts +0 -635
- package/src/lib/components/data-grid/data-grid.component.ts +0 -297
- package/src/lib/components/data-grid/index.ts +0 -1
- package/src/lib/components/index.ts +0 -2
- package/src/lib/tabulator/index.ts +0 -1
- package/src/lib/tabulator/tabulator-options.spec.ts +0 -142
- package/src/lib/tabulator/tabulator-options.ts +0 -37
- package/src/test-setup.ts +0 -3
- package/tsconfig.json +0 -13
- package/tsconfig.lib.json +0 -19
- package/tsconfig.lib.prod.json +0 -7
- package/tsconfig.spec.json +0 -31
- package/vite.config.mts +0 -10
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AfterViewInit,
|
|
3
|
-
Component,
|
|
4
|
-
ElementRef,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
OnChanges,
|
|
8
|
-
Output,
|
|
9
|
-
SimpleChanges,
|
|
10
|
-
ViewChild,
|
|
11
|
-
inject,
|
|
12
|
-
} from '@angular/core';
|
|
13
|
-
import { ErrorLogger, IErrorLogger } from '@sneat/core';
|
|
14
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
15
|
-
// @ts-ignore
|
|
16
|
-
import {
|
|
17
|
-
Tabulator,
|
|
18
|
-
SelectRowModule,
|
|
19
|
-
MenuModule,
|
|
20
|
-
InteractionModule,
|
|
21
|
-
Module,
|
|
22
|
-
RowContextMenuSignature,
|
|
23
|
-
} from 'tabulator-tables';
|
|
24
|
-
import { IGridColumn } from '@sneat/grid';
|
|
25
|
-
import { TabulatorColumn, TabulatorOptions } from '../../tabulator';
|
|
26
|
-
|
|
27
|
-
class AdvertModule extends Module {
|
|
28
|
-
public static override moduleName = 'advert';
|
|
29
|
-
|
|
30
|
-
override initialize() {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
Tabulator.registerModule([
|
|
36
|
-
InteractionModule,
|
|
37
|
-
SelectRowModule,
|
|
38
|
-
AdvertModule,
|
|
39
|
-
MenuModule,
|
|
40
|
-
]);
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
// export interface IGridDef {
|
|
44
|
-
// columns: IGridColumn[],
|
|
45
|
-
// rows?: unknown[],
|
|
46
|
-
// groupBy?: string;
|
|
47
|
-
// }
|
|
48
|
-
//
|
|
49
|
-
// export const getTabulatorCols = (cols: IGridColumn[]): any[] => cols.map(c => {
|
|
50
|
-
// const v = {...c};
|
|
51
|
-
// delete v.dbType;
|
|
52
|
-
// return v;
|
|
53
|
-
// });
|
|
54
|
-
//
|
|
55
|
-
// export interface IGridColumn {
|
|
56
|
-
// field: string;
|
|
57
|
-
// colName?: string;
|
|
58
|
-
// dbType: string;
|
|
59
|
-
// title: string;
|
|
60
|
-
// tooltip?: (cell: any) => string;
|
|
61
|
-
// formatter?: any;
|
|
62
|
-
// hozAlign?: 'left' | 'right';
|
|
63
|
-
// widthShrink?: number;
|
|
64
|
-
// widthGrow?: number;
|
|
65
|
-
// width?: number | string;
|
|
66
|
-
// }
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* This is a wrapper class for the tabulator JS library.
|
|
70
|
-
* For more info see http://tabulator.info
|
|
71
|
-
*/
|
|
72
|
-
@Component({
|
|
73
|
-
selector: 'sneat-datagrid',
|
|
74
|
-
template: `
|
|
75
|
-
<div id="tabulator" #tabulatorDiv></div>
|
|
76
|
-
<p class="ion-margin-start">Rows: {{ data?.length }}</p>
|
|
77
|
-
`,
|
|
78
|
-
imports: [],
|
|
79
|
-
})
|
|
80
|
-
export class DataGridComponent implements AfterViewInit, OnChanges {
|
|
81
|
-
private readonly errorLogger = inject<IErrorLogger>(ErrorLogger);
|
|
82
|
-
|
|
83
|
-
@Input() layout?: 'fitData' | 'fitColumns' = 'fitColumns';
|
|
84
|
-
@Input() data?: unknown[] = [];
|
|
85
|
-
@Input() columns?: IGridColumn[] = [];
|
|
86
|
-
@Input() groupBy?: string;
|
|
87
|
-
@Input() height?: string;
|
|
88
|
-
@Input() maxHeight?: string | number;
|
|
89
|
-
@Input() rowContextMenu?: RowContextMenuSignature;
|
|
90
|
-
@ViewChild('tabulatorDiv', { static: true }) tabulatorDiv?: ElementRef;
|
|
91
|
-
|
|
92
|
-
@Input() rowClick?: (event: Event, row: unknown) => void;
|
|
93
|
-
|
|
94
|
-
@Output() readonly rowSelected = new EventEmitter<{
|
|
95
|
-
row: unknown;
|
|
96
|
-
event?: Event;
|
|
97
|
-
}>();
|
|
98
|
-
|
|
99
|
-
@Output() readonly rowDeselected = new EventEmitter<{
|
|
100
|
-
row: unknown;
|
|
101
|
-
event?: Event;
|
|
102
|
-
}>();
|
|
103
|
-
|
|
104
|
-
// private tab = document.createElement('div');
|
|
105
|
-
private tabulator?: Tabulator;
|
|
106
|
-
|
|
107
|
-
@Input() public selectable?: boolean | number | 'highlight';
|
|
108
|
-
|
|
109
|
-
private tabulatorOptions?: TabulatorOptions;
|
|
110
|
-
private clickEvent?: Event;
|
|
111
|
-
|
|
112
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
113
|
-
try {
|
|
114
|
-
if (
|
|
115
|
-
(changes['data'] && this.data && this.columns) ||
|
|
116
|
-
(changes['columns'] && this.columns) ||
|
|
117
|
-
(changes['rowClick'] && this.rowClick)
|
|
118
|
-
) {
|
|
119
|
-
this.drawTable();
|
|
120
|
-
}
|
|
121
|
-
} catch (ex) {
|
|
122
|
-
this.errorLogger.logError(
|
|
123
|
-
ex,
|
|
124
|
-
'Failed to process ngOnChanges in DataGridComponent',
|
|
125
|
-
);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// ngOnDestroy(): void {
|
|
130
|
-
// console.log('DataGridComponent.ngOnDestroy()', this.tabulator);
|
|
131
|
-
// try { // TODO: destroy Tabulator
|
|
132
|
-
// if (this.tabulator?.element) {
|
|
133
|
-
// // noinspection TypeScriptValidateJSTypes
|
|
134
|
-
// this.tabulator.element.tabulator('destroy');
|
|
135
|
-
// }
|
|
136
|
-
// } catch (ex) {
|
|
137
|
-
// this.errorLogger.logError(ex, 'Failed to destroy tabulator');
|
|
138
|
-
// }
|
|
139
|
-
// }
|
|
140
|
-
|
|
141
|
-
ngAfterViewInit(): void /* Intentionally not ngOnInit */ {
|
|
142
|
-
if (this.tabulator) {
|
|
143
|
-
try {
|
|
144
|
-
this.tabulator.redraw();
|
|
145
|
-
} catch (e) {
|
|
146
|
-
this.errorLogger.logError(e, 'Failed to redraw tabulator', {
|
|
147
|
-
show: false,
|
|
148
|
-
report: false,
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
private drawTable(): void {
|
|
155
|
-
if (!this.data || !this.columns) {
|
|
156
|
-
console.warn('drawTable()', 'columns:', this.columns, 'data:', this.data);
|
|
157
|
-
return;
|
|
158
|
-
}
|
|
159
|
-
try {
|
|
160
|
-
if (!this.tabulatorDiv) {
|
|
161
|
-
this.errorLogger.logError(new Error('!this.tabulatorDiv'));
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (this.tabulatorOptions) {
|
|
165
|
-
this.tabulatorOptions = { ...this.tabulatorOptions, data: this.data };
|
|
166
|
-
this.tabulator
|
|
167
|
-
?.setData(this.data)
|
|
168
|
-
.catch(this.errorLogger.logErrorHandler('Failed to set data'));
|
|
169
|
-
} else {
|
|
170
|
-
this.createTabulatorGrid();
|
|
171
|
-
}
|
|
172
|
-
// this.tabulatorDiv.nativeElement.appendChild(this.tab);
|
|
173
|
-
// tabulator.redraw();
|
|
174
|
-
} catch (e) {
|
|
175
|
-
this.errorLogger.logError(e, 'Failed to drawTable');
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
private createTabulatorGrid(): void {
|
|
180
|
-
this.setTabulatorOptions();
|
|
181
|
-
if (!this.tabulator) {
|
|
182
|
-
this.tabulatorOptions = {
|
|
183
|
-
...this.tabulatorOptions,
|
|
184
|
-
// rowClick: function (e, row) {
|
|
185
|
-
// console.log('rowClick1', row);
|
|
186
|
-
// },
|
|
187
|
-
// rowSelect: function (row) {
|
|
188
|
-
// console.log('rowSelect', row);
|
|
189
|
-
// },
|
|
190
|
-
// rowDeselect: function (row) {
|
|
191
|
-
// console.log('rowDeselect', row);
|
|
192
|
-
// }
|
|
193
|
-
};
|
|
194
|
-
this.tabulator = new Tabulator(
|
|
195
|
-
this.tabulatorDiv?.nativeElement,
|
|
196
|
-
this.tabulatorOptions,
|
|
197
|
-
);
|
|
198
|
-
this.tabulator.on('rowClick', (event: Event, row: unknown) => {
|
|
199
|
-
this.clickEvent = event;
|
|
200
|
-
if (this.rowClick) {
|
|
201
|
-
this.rowClick(event, row);
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
this.tabulator.on('rowSelected', (row: unknown) =>
|
|
205
|
-
this.rowSelected.emit({ row, event: this.clickEvent }),
|
|
206
|
-
);
|
|
207
|
-
this.tabulator.on('rowDeselected', (row: unknown) =>
|
|
208
|
-
this.rowDeselected.emit({ row, event: this.clickEvent }),
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
private setTabulatorOptions(): void {
|
|
214
|
-
this.tabulatorOptions = {
|
|
215
|
-
// tooltipsHeader: true, // enable header tooltips
|
|
216
|
-
// tooltipGenerationMode: 'hover',
|
|
217
|
-
rowContextMenu: this.rowContextMenu,
|
|
218
|
-
selectableRows: this.selectable,
|
|
219
|
-
data: this.data,
|
|
220
|
-
// reactiveData: true, // enable data reactivity
|
|
221
|
-
columns: this.columns?.map((c) => {
|
|
222
|
-
const col: TabulatorColumn = {
|
|
223
|
-
// TODO(help-wanted): Use strongly typed Tabulator col def
|
|
224
|
-
field: c.field,
|
|
225
|
-
title: c.title || c.field || c.title,
|
|
226
|
-
// headerTooltip: () =>
|
|
227
|
-
// `${c.colName || c.title || c.field}: ${c.dbType}`,
|
|
228
|
-
};
|
|
229
|
-
if (c.colName !== 'Id' && c.colName?.endsWith('Id')) {
|
|
230
|
-
col.formatter = 'link';
|
|
231
|
-
col.formatterParams = {
|
|
232
|
-
url: 'test-url',
|
|
233
|
-
};
|
|
234
|
-
col.cellClick = (e: Event, cell: unknown) => {
|
|
235
|
-
void cell;
|
|
236
|
-
e.preventDefault();
|
|
237
|
-
e.stopPropagation();
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
if (c.tooltip) {
|
|
241
|
-
col.tooltip = c.tooltip;
|
|
242
|
-
}
|
|
243
|
-
if (c.formatter) {
|
|
244
|
-
col.formatter = c.formatter;
|
|
245
|
-
}
|
|
246
|
-
if (c.hozAlign) {
|
|
247
|
-
col.hozAlign = c.hozAlign;
|
|
248
|
-
}
|
|
249
|
-
if (c.headerHozAlign) {
|
|
250
|
-
col.headerHozAlign = c.headerHozAlign;
|
|
251
|
-
}
|
|
252
|
-
if (c.widthGrow) {
|
|
253
|
-
col.widthGrow = c.widthGrow;
|
|
254
|
-
}
|
|
255
|
-
if (c.widthShrink) {
|
|
256
|
-
col.widthShrink = c.widthShrink;
|
|
257
|
-
}
|
|
258
|
-
if (c.width !== undefined) {
|
|
259
|
-
col.width = c.width;
|
|
260
|
-
}
|
|
261
|
-
// console.log('col:', col);
|
|
262
|
-
return col;
|
|
263
|
-
}),
|
|
264
|
-
layout: this.layout || 'fitColumns',
|
|
265
|
-
};
|
|
266
|
-
if (this.height) {
|
|
267
|
-
this.tabulatorOptions = {
|
|
268
|
-
...this.tabulatorOptions,
|
|
269
|
-
height: this.height,
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
if (this.maxHeight) {
|
|
273
|
-
this.tabulatorOptions = {
|
|
274
|
-
...this.tabulatorOptions,
|
|
275
|
-
maxHeight: this.maxHeight,
|
|
276
|
-
};
|
|
277
|
-
}
|
|
278
|
-
if (this.groupBy) {
|
|
279
|
-
this.tabulatorOptions = {
|
|
280
|
-
...this.tabulatorOptions,
|
|
281
|
-
groupBy: this.groupBy,
|
|
282
|
-
groupHeader: (value: unknown, count: number) => {
|
|
283
|
-
// value - the value all members of this group share
|
|
284
|
-
// count - the number of rows in this group
|
|
285
|
-
// data - an array of all the row data objects in this group
|
|
286
|
-
// group - the group component for the group
|
|
287
|
-
// console.log('groupHeader', value);
|
|
288
|
-
return `${
|
|
289
|
-
this.groupBy
|
|
290
|
-
}: ${value} <span class="ion-margin-start">(${count} ${
|
|
291
|
-
count === 1 ? 'record' : 'records'
|
|
292
|
-
})</span>`;
|
|
293
|
-
},
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './data-grid.component';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './tabulator-options';
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { TabulatorColumn, TabulatorOptions } from './tabulator-options';
|
|
2
|
-
|
|
3
|
-
describe('Tabulator Types', () => {
|
|
4
|
-
describe('TabulatorColumn', () => {
|
|
5
|
-
it('should accept valid column definition', () => {
|
|
6
|
-
const column: TabulatorColumn = {
|
|
7
|
-
field: 'testField',
|
|
8
|
-
title: 'Test Title',
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
expect(column.field).toBe('testField');
|
|
12
|
-
expect(column.title).toBe('Test Title');
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
it('should accept column with formatter', () => {
|
|
16
|
-
const column: TabulatorColumn = {
|
|
17
|
-
field: 'amount',
|
|
18
|
-
title: 'Amount',
|
|
19
|
-
formatter: 'money',
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
expect(column.formatter).toBe('money');
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
it('should accept column with width', () => {
|
|
26
|
-
const column: TabulatorColumn = {
|
|
27
|
-
field: 'id',
|
|
28
|
-
title: 'ID',
|
|
29
|
-
width: 100,
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
expect(column.width).toBe(100);
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
it('should accept column with alignment', () => {
|
|
36
|
-
const column: TabulatorColumn = {
|
|
37
|
-
field: 'price',
|
|
38
|
-
title: 'Price',
|
|
39
|
-
hozAlign: 'right',
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
expect(column.hozAlign).toBe('right');
|
|
43
|
-
});
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
describe('TabulatorOptions', () => {
|
|
47
|
-
it('should accept valid options', () => {
|
|
48
|
-
const options: TabulatorOptions = {
|
|
49
|
-
data: [{ id: 1, name: 'Test' }],
|
|
50
|
-
layout: 'fitColumns',
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
expect(options.data).toBeDefined();
|
|
54
|
-
expect(options.layout).toBe('fitColumns');
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
it('should accept columns in options', () => {
|
|
58
|
-
const options: TabulatorOptions = {
|
|
59
|
-
columns: [
|
|
60
|
-
{ field: 'id', title: 'ID' },
|
|
61
|
-
{ field: 'name', title: 'Name' },
|
|
62
|
-
],
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
expect(options.columns).toBeDefined();
|
|
66
|
-
expect(options.columns?.length).toBe(2);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('should accept height options', () => {
|
|
70
|
-
const optionsWithHeight: TabulatorOptions = {
|
|
71
|
-
height: '400px',
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
expect(optionsWithHeight.height).toBe('400px');
|
|
75
|
-
|
|
76
|
-
const optionsWithNumericHeight: TabulatorOptions = {
|
|
77
|
-
height: 500,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
expect(optionsWithNumericHeight.height).toBe(500);
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
it('should accept maxHeight option', () => {
|
|
84
|
-
const options: TabulatorOptions = {
|
|
85
|
-
maxHeight: 600,
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
expect(options.maxHeight).toBe(600);
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
it('should accept layout options', () => {
|
|
92
|
-
const fitDataOptions: TabulatorOptions = {
|
|
93
|
-
layout: 'fitData',
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
expect(fitDataOptions.layout).toBe('fitData');
|
|
97
|
-
|
|
98
|
-
const fitColumnsOptions: TabulatorOptions = {
|
|
99
|
-
layout: 'fitColumns',
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
expect(fitColumnsOptions.layout).toBe('fitColumns');
|
|
103
|
-
});
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
describe('Type Compatibility', () => {
|
|
107
|
-
it('should work with empty options', () => {
|
|
108
|
-
const options: TabulatorOptions = {};
|
|
109
|
-
|
|
110
|
-
expect(options).toBeDefined();
|
|
111
|
-
});
|
|
112
|
-
|
|
113
|
-
it('should work with minimal column definition', () => {
|
|
114
|
-
const column: TabulatorColumn = {
|
|
115
|
-
field: 'id',
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
expect(column.field).toBe('id');
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
it('should support complex options configuration', () => {
|
|
122
|
-
const options: TabulatorOptions = {
|
|
123
|
-
data: [
|
|
124
|
-
{ id: 1, name: 'John', age: 30 },
|
|
125
|
-
{ id: 2, name: 'Jane', age: 25 },
|
|
126
|
-
],
|
|
127
|
-
columns: [
|
|
128
|
-
{ field: 'id', title: 'ID', width: 50 },
|
|
129
|
-
{ field: 'name', title: 'Name', hozAlign: 'left' },
|
|
130
|
-
{ field: 'age', title: 'Age', hozAlign: 'right' },
|
|
131
|
-
],
|
|
132
|
-
layout: 'fitColumns',
|
|
133
|
-
height: 400,
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
expect(options.data?.length).toBe(2);
|
|
137
|
-
expect(options.columns?.length).toBe(3);
|
|
138
|
-
expect(options.layout).toBe('fitColumns');
|
|
139
|
-
expect(options.height).toBe(400);
|
|
140
|
-
});
|
|
141
|
-
});
|
|
142
|
-
});
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { ColumnDefinition, Options } from 'tabulator-tables';
|
|
2
|
-
|
|
3
|
-
export type TabulatorColumn = ColumnDefinition;
|
|
4
|
-
|
|
5
|
-
// export interface TabulatorColumn {
|
|
6
|
-
// field: string;
|
|
7
|
-
// title?: string;
|
|
8
|
-
// formatter?: 'link' | 'progress' | 'html' | 'text' | 'number' | 'money' | 'image' | 'tickCross';
|
|
9
|
-
// formatterParams?: unknown;
|
|
10
|
-
// cellClick?: (e: Event, cell: unknown) => void;
|
|
11
|
-
// headerTooltip?: () => string;
|
|
12
|
-
// tooltip?: (cell: unknown) => string;
|
|
13
|
-
// hozAlign?: 'left' | 'right';
|
|
14
|
-
// headerHozAlign?: 'left' | 'right';
|
|
15
|
-
// widthShrink?: number;
|
|
16
|
-
// widthGrow?: number;
|
|
17
|
-
// width?: number | string;
|
|
18
|
-
// }
|
|
19
|
-
|
|
20
|
-
export type TabulatorOptions = Options;
|
|
21
|
-
// export interface TabulatorOptions {
|
|
22
|
-
// readonly tooltipsHeader?: boolean;
|
|
23
|
-
// readonly tooltipGenerationMode?: 'hover' | 'mouseover';
|
|
24
|
-
// readonly reactiveData?: boolean;
|
|
25
|
-
// readonly selectable?: boolean | number | 'highlight';
|
|
26
|
-
// readonly data?: unknown[];
|
|
27
|
-
// readonly layout?: 'fitData' | 'fitColumns';
|
|
28
|
-
// readonly columns?: TabulatorColumn[];
|
|
29
|
-
// readonly height?: string | number;
|
|
30
|
-
// readonly maxHeight?: string | number;
|
|
31
|
-
// readonly groupBy?: string;
|
|
32
|
-
// readonly groupHeader?: (value: unknown, count: number) => string;
|
|
33
|
-
// readonly rowClick?: (event: Event, row: unknown) => void;
|
|
34
|
-
// readonly rowSelect?: (row: unknown) => void;
|
|
35
|
-
// readonly rowDeselect?: (row: unknown) => void;
|
|
36
|
-
// readonly rowContextMenu?: IRowMenu[];
|
|
37
|
-
// }
|
package/src/test-setup.ts
DELETED
package/tsconfig.json
DELETED
package/tsconfig.lib.json
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "../../tsconfig.lib.base.json",
|
|
3
|
-
"exclude": [
|
|
4
|
-
"vite.config.ts",
|
|
5
|
-
"vite.config.mts",
|
|
6
|
-
"vitest.config.ts",
|
|
7
|
-
"vitest.config.mts",
|
|
8
|
-
"src/**/*.test.ts",
|
|
9
|
-
"src/**/*.spec.ts",
|
|
10
|
-
"src/**/*.test.tsx",
|
|
11
|
-
"src/**/*.spec.tsx",
|
|
12
|
-
"src/**/*.test.js",
|
|
13
|
-
"src/**/*.spec.js",
|
|
14
|
-
"src/**/*.test.jsx",
|
|
15
|
-
"src/**/*.spec.jsx",
|
|
16
|
-
"src/test-setup.ts",
|
|
17
|
-
"src/lib/testing/**/*"
|
|
18
|
-
]
|
|
19
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
package/tsconfig.spec.json
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"outDir": "../../dist/out-tsc",
|
|
5
|
-
"types": [
|
|
6
|
-
"vitest/globals",
|
|
7
|
-
"vitest/importMeta",
|
|
8
|
-
"vite/client",
|
|
9
|
-
"node",
|
|
10
|
-
"vitest"
|
|
11
|
-
]
|
|
12
|
-
},
|
|
13
|
-
"include": [
|
|
14
|
-
"vite.config.ts",
|
|
15
|
-
"vite.config.mts",
|
|
16
|
-
"vitest.config.ts",
|
|
17
|
-
"vitest.config.mts",
|
|
18
|
-
"src/**/*.test.ts",
|
|
19
|
-
"src/**/*.spec.ts",
|
|
20
|
-
"src/**/*.test.tsx",
|
|
21
|
-
"src/**/*.spec.tsx",
|
|
22
|
-
"src/**/*.test.js",
|
|
23
|
-
"src/**/*.spec.js",
|
|
24
|
-
"src/**/*.test.jsx",
|
|
25
|
-
"src/**/*.spec.jsx",
|
|
26
|
-
"src/**/*.d.ts"
|
|
27
|
-
],
|
|
28
|
-
"files": [
|
|
29
|
-
"src/test-setup.ts"
|
|
30
|
-
]
|
|
31
|
-
}
|
package/vite.config.mts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types='vitest' />
|
|
2
|
-
import { defineConfig } from 'vitest/config';
|
|
3
|
-
import { createBaseViteConfig } from '../../vite.config.base';
|
|
4
|
-
|
|
5
|
-
export default defineConfig(() =>
|
|
6
|
-
createBaseViteConfig({
|
|
7
|
-
dirname: __dirname,
|
|
8
|
-
name: 'datagrid',
|
|
9
|
-
}),
|
|
10
|
-
);
|