@sneat/datagrid 0.27.51 → 0.27.52

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.
@@ -1,423 +1,289 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, EventEmitter, Input, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { ErrorLogger } from '@sneat/core';
4
- import { Module, Tabulator, InteractionModule, SelectRowModule, SelectRangeModule, KeybindingsModule, MenuModule } from 'tabulator-tables';
5
-
6
- class AdvertModule extends Module {
7
- static { this.moduleName = 'advert'; }
8
- initialize() {
9
- return;
10
- }
11
- }
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild, inject } from "@angular/core";
3
+ import { ErrorLogger } from "@sneat/core";
4
+ import { InteractionModule, KeybindingsModule, MenuModule, Module, SelectRangeModule, SelectRowModule, Tabulator } from "tabulator-tables";
5
+ var AdvertModule = class extends Module {
6
+ static {
7
+ this.moduleName = "advert";
8
+ }
9
+ initialize() {}
10
+ };
12
11
  Tabulator.registerModule([
13
- InteractionModule,
14
- SelectRowModule,
15
- // SelectRange enables opt-in cell/range selection (selectableRange input).
16
- // KeybindingsModule wires the arrow-key navigation SelectRange relies on;
17
- // its default bindings are only *active* when we don't disable them via
18
- // the `keybindings` table option, which we do unless selectableRange is on
19
- // (see setTabulatorOptions()) so existing consumers see no behaviour change.
20
- SelectRangeModule,
21
- KeybindingsModule,
22
- AdvertModule,
23
- MenuModule,
12
+ InteractionModule,
13
+ SelectRowModule,
14
+ SelectRangeModule,
15
+ KeybindingsModule,
16
+ AdvertModule,
17
+ MenuModule
24
18
  ]);
25
- // export interface IGridDef {
26
- // columns: IGridColumn[],
27
- // rows?: unknown[],
28
- // groupBy?: string;
29
- // }
30
- //
31
- // export const getTabulatorCols = (cols: IGridColumn[]): any[] => cols.map(c => {
32
- // const v = {...c};
33
- // delete v.dbType;
34
- // return v;
35
- // });
36
- //
37
- // export interface IGridColumn {
38
- // field: string;
39
- // colName?: string;
40
- // dbType: string;
41
- // title: string;
42
- // tooltip?: (cell: any) => string;
43
- // formatter?: any;
44
- // hozAlign?: 'left' | 'right';
45
- // widthShrink?: number;
46
- // widthGrow?: number;
47
- // width?: number | string;
48
- // }
49
- /**
50
- * This is a wrapper class for the tabulator JS library.
51
- * For more info see http://tabulator.info
52
- */
53
- class DataGridComponent {
54
- constructor() {
55
- this.errorLogger = inject(ErrorLogger);
56
- // TODO: Skipped for migration because:
57
- // Your application code writes to the input. This prevents migration.
58
- this.layout = 'fitColumns';
59
- // TODO: Skipped for migration because:
60
- // Your application code writes to the input. This prevents migration.
61
- this.data = [];
62
- // TODO: Skipped for migration because:
63
- // Your application code writes to the input. This prevents migration.
64
- this.columns = [];
65
- this.rowSelected = new EventEmitter();
66
- this.rowDeselected = new EventEmitter();
67
- /**
68
- * Emitted when a single cell becomes the active selection, either via a
69
- * mouse click (always, regardless of `selectableRange`) or, once
70
- * `selectableRange` is enabled, via keyboard arrow-key navigation between
71
- * cells. Not emitted for multi-cell range drag-selection.
72
- */
73
- this.cellSelected = new EventEmitter();
74
- }
75
- ngOnChanges(changes) {
76
- try {
77
- if ((changes['data'] && this.data && this.columns) ||
78
- (changes['columns'] && this.columns) ||
79
- (changes['rowClick'] && this.rowClick)) {
80
- this.drawTable();
81
- }
82
- else if (changes['columnMarkers'] && this.tabulator && this.columns) {
83
- // columnMarkers can arrive after the initial draw (e.g. a semantic
84
- // layer resolving markers asynchronously) — refresh header markers
85
- // in place without a full data redraw.
86
- const columnDefinitions = this.buildColumnDefinitions();
87
- if (columnDefinitions) {
88
- this.tabulator.setColumns(columnDefinitions);
89
- }
90
- }
91
- }
92
- catch (ex) {
93
- this.errorLogger.logError(ex, 'Failed to process ngOnChanges in DataGridComponent');
94
- }
95
- }
96
- // ngOnDestroy(): void {
97
- // console.log('DataGridComponent.ngOnDestroy()', this.tabulator);
98
- // try { // TODO: destroy Tabulator
99
- // if (this.tabulator?.element) {
100
- // // noinspection TypeScriptValidateJSTypes
101
- // this.tabulator.element.tabulator('destroy');
102
- // }
103
- // } catch (ex) {
104
- // this.errorLogger.logError(ex, 'Failed to destroy tabulator');
105
- // }
106
- // }
107
- ngAfterViewInit() {
108
- if (this.tabulator) {
109
- try {
110
- this.tabulator.redraw();
111
- }
112
- catch (e) {
113
- this.errorLogger.logError(e, 'Failed to redraw tabulator', {
114
- show: false,
115
- report: false,
116
- });
117
- }
118
- }
119
- }
120
- drawTable() {
121
- if (!this.data || !this.columns) {
122
- console.warn('drawTable()', 'columns:', this.columns, 'data:', this.data);
123
- return;
124
- }
125
- try {
126
- if (!this.tabulatorDiv) {
127
- this.errorLogger.logError(new Error('!this.tabulatorDiv'));
128
- return;
129
- }
130
- if (this.tabulatorOptions) {
131
- this.tabulatorOptions = { ...this.tabulatorOptions, data: this.data };
132
- this.tabulator
133
- ?.setData(this.data)
134
- .catch(this.errorLogger.logErrorHandler('Failed to set data'));
135
- }
136
- else {
137
- this.createTabulatorGrid();
138
- }
139
- // this.tabulatorDiv.nativeElement.appendChild(this.tab);
140
- // tabulator.redraw();
141
- }
142
- catch (e) {
143
- this.errorLogger.logError(e, 'Failed to drawTable');
144
- }
145
- }
146
- createTabulatorGrid() {
147
- this.setTabulatorOptions();
148
- if (!this.tabulator) {
149
- this.tabulatorOptions = {
150
- ...this.tabulatorOptions,
151
- // rowClick: function (e, row) {
152
- // console.log('rowClick1', row);
153
- // },
154
- // rowSelect: function (row) {
155
- // console.log('rowSelect', row);
156
- // },
157
- // rowDeselect: function (row) {
158
- // console.log('rowDeselect', row);
159
- // }
160
- };
161
- this.tabulator = new Tabulator(this.tabulatorDiv?.nativeElement, this.tabulatorOptions);
162
- this.tabulator.on('rowClick', (event, row) => {
163
- this.clickEvent = event;
164
- if (this.rowClick) {
165
- this.rowClick(event, row);
166
- }
167
- });
168
- this.tabulator.on('rowSelected', (row) => this.rowSelected.emit({ row, event: this.clickEvent }));
169
- this.tabulator.on('rowDeselected', (row) => this.rowDeselected.emit({ row, event: this.clickEvent }));
170
- // Mouse-click selection: fires regardless of selectableRange.
171
- this.tabulator.on('cellClick', (_event, cell) => {
172
- this.emitCellSelected(cell);
173
- });
174
- // Keyboard-driven selection: only fires once selectableRange is on —
175
- // the SelectRange module is inert otherwise. A plain click always
176
- // creates a *new* range (rangeAdded), so listening to rangeChanged
177
- // (bounds moved on the *existing* range) picks up arrow-key
178
- // navigation and single-cell drag adjustments without double-firing
179
- // alongside the cellClick handler above.
180
- this.tabulator.on('rangeChanged', (range) => {
181
- this.handleRangeChanged(range);
182
- });
183
- }
184
- }
185
- /** column.index is the field's position in the `columns` input array. */
186
- emitCellSelected(cell) {
187
- const field = cell.getField();
188
- this.cellSelected.emit({
189
- row: cell.getRow(),
190
- column: {
191
- field,
192
- index: this.columns?.findIndex((c) => c.field === field) ?? -1,
193
- },
194
- value: cell.getValue(),
195
- rowData: cell.getData(),
196
- });
197
- }
198
- handleRangeChanged(range) {
199
- const bounds = range.getBounds();
200
- // Only report single-cell selections; multi-cell range drag-selection
201
- // is visual-only for now (out of scope for this task).
202
- if (bounds.start.getElement() === bounds.end.getElement()) {
203
- this.emitCellSelected(bounds.end);
204
- }
205
- }
206
- buildColumnDefinitions() {
207
- return this.columns?.map((c) => {
208
- const col = {
209
- // TODO(help-wanted): Use strongly typed Tabulator col def
210
- field: c.field,
211
- title: c.title || c.field || c.title,
212
- // headerTooltip: () =>
213
- // `${c.colName || c.title || c.field}: ${c.dbType}`,
214
- };
215
- if (c.colName !== 'Id' && c.colName?.endsWith('Id')) {
216
- col.formatter = 'link';
217
- col.formatterParams = {
218
- url: 'test-url',
219
- };
220
- col.cellClick = (e, cell) => {
221
- void cell;
222
- e.preventDefault();
223
- e.stopPropagation();
224
- };
225
- }
226
- if (c.tooltip) {
227
- col.tooltip = c.tooltip;
228
- }
229
- if (c.formatter) {
230
- col.formatter = c.formatter;
231
- }
232
- if (c.hozAlign) {
233
- col.hozAlign = c.hozAlign;
234
- }
235
- if (c.headerHozAlign) {
236
- col.headerHozAlign = c.headerHozAlign;
237
- }
238
- if (c.widthGrow) {
239
- col.widthGrow = c.widthGrow;
240
- }
241
- if (c.widthShrink) {
242
- col.widthShrink = c.widthShrink;
243
- }
244
- if (c.width !== undefined) {
245
- col.width = c.width;
246
- }
247
- const marker = c.field ? this.columnMarkers?.[c.field] : undefined;
248
- if (marker) {
249
- col.titleFormatter = this.buildColumnMarkerTitleFormatter(marker);
250
- }
251
- // console.log('col:', col);
252
- return col;
253
- });
254
- }
255
- /**
256
- * Renders the column's title text plus an unobtrusive marker badge.
257
- * Inline styles (rather than a stylesheet) keep this correct regardless
258
- * of the host app's CSS and Angular's view encapsulation — Tabulator
259
- * renders headers into plain DOM nodes outside the component's template,
260
- * which emulated encapsulation would not otherwise scope styles onto.
261
- */
262
- buildColumnMarkerTitleFormatter(marker) {
263
- return (cell) => {
264
- const wrapper = document.createElement('span');
265
- wrapper.style.display = 'inline-flex';
266
- wrapper.style.alignItems = 'center';
267
- wrapper.style.gap = '4px';
268
- const titleSpan = document.createElement('span');
269
- titleSpan.textContent = String(cell.getValue() ?? '');
270
- wrapper.appendChild(titleSpan);
271
- const markerSpan = document.createElement('span');
272
- markerSpan.textContent = marker.label;
273
- markerSpan.style.display = 'inline-block';
274
- markerSpan.style.fontSize = '0.65em';
275
- markerSpan.style.fontWeight = '600';
276
- markerSpan.style.lineHeight = '1.4';
277
- markerSpan.style.padding = '0 4px';
278
- markerSpan.style.borderRadius = '3px';
279
- markerSpan.style.opacity = '0.75';
280
- markerSpan.style.whiteSpace = 'nowrap';
281
- markerSpan.style.border =
282
- marker.kind === 'inferred'
283
- ? '1px dashed currentColor'
284
- : '1px solid currentColor';
285
- if (marker.kind === 'inferred') {
286
- markerSpan.style.fontStyle = 'italic';
287
- }
288
- if (marker.title) {
289
- markerSpan.title = marker.title;
290
- }
291
- wrapper.appendChild(markerSpan);
292
- return wrapper;
293
- };
294
- }
295
- setTabulatorOptions() {
296
- this.tabulatorOptions = {
297
- // tooltipsHeader: true, // enable header tooltips
298
- // tooltipGenerationMode: 'hover',
299
- rowContextMenu: this.rowContextMenu,
300
- selectableRows: this.selectable,
301
- data: this.data,
302
- // reactiveData: true, // enable data reactivity
303
- columns: this.buildColumnDefinitions(),
304
- layout: this.layout || 'fitColumns',
305
- };
306
- if (this.selectableRange) {
307
- this.tabulatorOptions = {
308
- ...this.tabulatorOptions,
309
- selectableRange: this.selectableRange,
310
- };
311
- }
312
- else {
313
- // Registering KeybindingsModule activates its default arrow/page/home
314
- // keybindings table-wide (they only *do* something in modules that
315
- // subscribe to them, but scrolling/focus side effects are otherwise
316
- // observable). Explicitly disabling them keeps existing consumers'
317
- // behaviour identical unless they opt into selectableRange.
318
- this.tabulatorOptions = {
319
- ...this.tabulatorOptions,
320
- keybindings: false,
321
- };
322
- }
323
- if (this.height) {
324
- this.tabulatorOptions = {
325
- ...this.tabulatorOptions,
326
- height: this.height,
327
- };
328
- }
329
- if (this.maxHeight) {
330
- this.tabulatorOptions = {
331
- ...this.tabulatorOptions,
332
- maxHeight: this.maxHeight,
333
- };
334
- }
335
- if (this.groupBy) {
336
- this.tabulatorOptions = {
337
- ...this.tabulatorOptions,
338
- groupBy: this.groupBy,
339
- groupHeader: (value, count) => {
340
- // value - the value all members of this group share
341
- // count - the number of rows in this group
342
- // data - an array of all the row data objects in this group
343
- // group - the group component for the group
344
- // console.log('groupHeader', value);
345
- return `${this.groupBy}: ${value} <span class="ion-margin-start">(${count} ${count === 1 ? 'record' : 'records'})</span>`;
346
- },
347
- };
348
- }
349
- }
350
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DataGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
351
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.3", type: DataGridComponent, isStandalone: true, selector: "sneat-datagrid", inputs: { layout: "layout", data: "data", columns: "columns", groupBy: "groupBy", height: "height", maxHeight: "maxHeight", rowContextMenu: "rowContextMenu", rowClick: "rowClick", selectableRange: "selectableRange", columnMarkers: "columnMarkers", selectable: "selectable" }, outputs: { rowSelected: "rowSelected", rowDeselected: "rowDeselected", cellSelected: "cellSelected" }, viewQueries: [{ propertyName: "tabulatorDiv", first: true, predicate: ["tabulatorDiv"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
19
+ var DataGridComponent = class DataGridComponent {
20
+ constructor() {
21
+ this.errorLogger = inject(ErrorLogger);
22
+ this.layout = "fitColumns";
23
+ this.data = [];
24
+ this.columns = [];
25
+ this.rowSelected = new EventEmitter();
26
+ this.rowDeselected = new EventEmitter();
27
+ this.cellSelected = new EventEmitter();
28
+ }
29
+ ngOnChanges(changes) {
30
+ try {
31
+ if (changes["data"] && this.data && this.columns || changes["columns"] && this.columns || changes["rowClick"] && this.rowClick) this.drawTable();
32
+ else if (changes["columnMarkers"] && this.tabulator && this.columns) {
33
+ const columnDefinitions = this.buildColumnDefinitions();
34
+ if (columnDefinitions) this.tabulator.setColumns(columnDefinitions);
35
+ }
36
+ } catch (ex) {
37
+ this.errorLogger.logError(ex, "Failed to process ngOnChanges in DataGridComponent");
38
+ }
39
+ }
40
+ ngAfterViewInit() {
41
+ if (this.tabulator) try {
42
+ this.tabulator.redraw();
43
+ } catch (e) {
44
+ this.errorLogger.logError(e, "Failed to redraw tabulator", {
45
+ show: false,
46
+ report: false
47
+ });
48
+ }
49
+ }
50
+ drawTable() {
51
+ if (!this.data || !this.columns) {
52
+ console.warn("drawTable()", "columns:", this.columns, "data:", this.data);
53
+ return;
54
+ }
55
+ try {
56
+ if (!this.tabulatorDiv) {
57
+ this.errorLogger.logError(/* @__PURE__ */ new Error("!this.tabulatorDiv"));
58
+ return;
59
+ }
60
+ if (this.tabulatorOptions) {
61
+ this.tabulatorOptions = {
62
+ ...this.tabulatorOptions,
63
+ data: this.data
64
+ };
65
+ this.tabulator?.setData(this.data).catch(this.errorLogger.logErrorHandler("Failed to set data"));
66
+ } else this.createTabulatorGrid();
67
+ } catch (e) {
68
+ this.errorLogger.logError(e, "Failed to drawTable");
69
+ }
70
+ }
71
+ createTabulatorGrid() {
72
+ this.setTabulatorOptions();
73
+ if (!this.tabulator) {
74
+ this.tabulatorOptions = { ...this.tabulatorOptions };
75
+ this.tabulator = new Tabulator(this.tabulatorDiv?.nativeElement, this.tabulatorOptions);
76
+ this.tabulator.on("rowClick", (event, row) => {
77
+ this.clickEvent = event;
78
+ if (this.rowClick) this.rowClick(event, row);
79
+ });
80
+ this.tabulator.on("rowSelected", (row) => this.rowSelected.emit({
81
+ row,
82
+ event: this.clickEvent
83
+ }));
84
+ this.tabulator.on("rowDeselected", (row) => this.rowDeselected.emit({
85
+ row,
86
+ event: this.clickEvent
87
+ }));
88
+ this.tabulator.on("cellClick", (_event, cell) => {
89
+ this.emitCellSelected(cell);
90
+ });
91
+ this.tabulator.on("rangeChanged", (range) => {
92
+ this.handleRangeChanged(range);
93
+ });
94
+ }
95
+ }
96
+ emitCellSelected(cell) {
97
+ const field = cell.getField();
98
+ this.cellSelected.emit({
99
+ row: cell.getRow(),
100
+ column: {
101
+ field,
102
+ index: this.columns?.findIndex((c) => c.field === field) ?? -1
103
+ },
104
+ value: cell.getValue(),
105
+ rowData: cell.getData()
106
+ });
107
+ }
108
+ handleRangeChanged(range) {
109
+ const bounds = range.getBounds();
110
+ if (bounds.start.getElement() === bounds.end.getElement()) this.emitCellSelected(bounds.end);
111
+ }
112
+ buildColumnDefinitions() {
113
+ return this.columns?.map((c) => {
114
+ const col = {
115
+ field: c.field,
116
+ title: c.title || c.field || c.title
117
+ };
118
+ if (c.colName !== "Id" && c.colName?.endsWith("Id")) {
119
+ col.formatter = "link";
120
+ col.formatterParams = { url: "test-url" };
121
+ col.cellClick = (e, cell) => {
122
+ e.preventDefault();
123
+ e.stopPropagation();
124
+ };
125
+ }
126
+ if (c.tooltip) col.tooltip = c.tooltip;
127
+ if (c.formatter) col.formatter = c.formatter;
128
+ if (c.hozAlign) col.hozAlign = c.hozAlign;
129
+ if (c.headerHozAlign) col.headerHozAlign = c.headerHozAlign;
130
+ if (c.widthGrow) col.widthGrow = c.widthGrow;
131
+ if (c.widthShrink) col.widthShrink = c.widthShrink;
132
+ if (c.width !== void 0) col.width = c.width;
133
+ const marker = c.field ? this.columnMarkers?.[c.field] : void 0;
134
+ if (marker) col.titleFormatter = this.buildColumnMarkerTitleFormatter(marker);
135
+ return col;
136
+ });
137
+ }
138
+ buildColumnMarkerTitleFormatter(marker) {
139
+ return (cell) => {
140
+ const wrapper = document.createElement("span");
141
+ wrapper.style.display = "inline-flex";
142
+ wrapper.style.alignItems = "center";
143
+ wrapper.style.gap = "4px";
144
+ const titleSpan = document.createElement("span");
145
+ titleSpan.textContent = String(cell.getValue() ?? "");
146
+ wrapper.appendChild(titleSpan);
147
+ const markerSpan = document.createElement("span");
148
+ markerSpan.textContent = marker.label;
149
+ markerSpan.style.display = "inline-block";
150
+ markerSpan.style.fontSize = "0.65em";
151
+ markerSpan.style.fontWeight = "600";
152
+ markerSpan.style.lineHeight = "1.4";
153
+ markerSpan.style.padding = "0 4px";
154
+ markerSpan.style.borderRadius = "3px";
155
+ markerSpan.style.opacity = "0.75";
156
+ markerSpan.style.whiteSpace = "nowrap";
157
+ markerSpan.style.border = marker.kind === "inferred" ? "1px dashed currentColor" : "1px solid currentColor";
158
+ if (marker.kind === "inferred") markerSpan.style.fontStyle = "italic";
159
+ if (marker.title) markerSpan.title = marker.title;
160
+ wrapper.appendChild(markerSpan);
161
+ return wrapper;
162
+ };
163
+ }
164
+ setTabulatorOptions() {
165
+ this.tabulatorOptions = {
166
+ rowContextMenu: this.rowContextMenu,
167
+ selectableRows: this.selectable,
168
+ data: this.data,
169
+ columns: this.buildColumnDefinitions(),
170
+ layout: this.layout || "fitColumns"
171
+ };
172
+ if (this.selectableRange) this.tabulatorOptions = {
173
+ ...this.tabulatorOptions,
174
+ selectableRange: this.selectableRange
175
+ };
176
+ else this.tabulatorOptions = {
177
+ ...this.tabulatorOptions,
178
+ keybindings: false
179
+ };
180
+ if (this.height) this.tabulatorOptions = {
181
+ ...this.tabulatorOptions,
182
+ height: this.height
183
+ };
184
+ if (this.maxHeight) this.tabulatorOptions = {
185
+ ...this.tabulatorOptions,
186
+ maxHeight: this.maxHeight
187
+ };
188
+ if (this.groupBy) this.tabulatorOptions = {
189
+ ...this.tabulatorOptions,
190
+ groupBy: this.groupBy,
191
+ groupHeader: (value, count) => {
192
+ return `${this.groupBy}: ${value} <span class="ion-margin-start">(${count} ${count === 1 ? "record" : "records"})</span>`;
193
+ }
194
+ };
195
+ }
196
+ static {
197
+ this.ɵfac = i0.ɵɵngDeclareFactory({
198
+ minVersion: "12.0.0",
199
+ version: "22.2.6",
200
+ ngImport: i0,
201
+ type: DataGridComponent,
202
+ deps: [],
203
+ target: i0.ɵɵFactoryTarget.Component
204
+ });
205
+ }
206
+ static {
207
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
208
+ minVersion: "14.0.0",
209
+ version: "22.2.6",
210
+ type: DataGridComponent,
211
+ isStandalone: true,
212
+ selector: "sneat-datagrid",
213
+ inputs: {
214
+ layout: "layout",
215
+ data: "data",
216
+ columns: "columns",
217
+ groupBy: "groupBy",
218
+ height: "height",
219
+ maxHeight: "maxHeight",
220
+ rowContextMenu: "rowContextMenu",
221
+ rowClick: "rowClick",
222
+ selectableRange: "selectableRange",
223
+ columnMarkers: "columnMarkers",
224
+ selectable: "selectable"
225
+ },
226
+ outputs: {
227
+ rowSelected: "rowSelected",
228
+ rowDeselected: "rowDeselected",
229
+ cellSelected: "cellSelected"
230
+ },
231
+ viewQueries: [{
232
+ propertyName: "tabulatorDiv",
233
+ first: true,
234
+ predicate: ["tabulatorDiv"],
235
+ descendants: true,
236
+ static: true
237
+ }],
238
+ usesOnChanges: true,
239
+ ngImport: i0,
240
+ template: `
352
241
  <div id="tabulator" #tabulatorDiv></div>
353
242
  <p class="ion-margin-start">Rows: {{ data?.length }}</p>
354
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
355
- }
356
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DataGridComponent, decorators: [{
357
- type: Component,
358
- args: [{
359
- selector: 'sneat-datagrid',
360
- template: `
243
+ `,
244
+ isInline: true,
245
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
246
+ });
247
+ }
248
+ };
249
+ i0.ɵɵngDeclareClassMetadata({
250
+ minVersion: "12.0.0",
251
+ version: "22.2.6",
252
+ ngImport: i0,
253
+ type: DataGridComponent,
254
+ decorators: [{
255
+ type: Component,
256
+ args: [{
257
+ selector: "sneat-datagrid",
258
+ template: `
361
259
  <div id="tabulator" #tabulatorDiv></div>
362
260
  <p class="ion-margin-start">Rows: {{ data?.length }}</p>
363
261
  `,
364
- changeDetection: ChangeDetectionStrategy.OnPush,
365
- imports: [],
366
- }]
367
- }], propDecorators: { layout: [{
368
- type: Input
369
- }], data: [{
370
- type: Input
371
- }], columns: [{
372
- type: Input
373
- }], groupBy: [{
374
- type: Input
375
- }], height: [{
376
- type: Input
377
- }], maxHeight: [{
378
- type: Input
379
- }], rowContextMenu: [{
380
- type: Input
381
- }], tabulatorDiv: [{
382
- type: ViewChild,
383
- args: ['tabulatorDiv', { static: true }]
384
- }], rowClick: [{
385
- type: Input
386
- }], rowSelected: [{
387
- type: Output
388
- }], rowDeselected: [{
389
- type: Output
390
- }], selectableRange: [{
391
- type: Input
392
- }], columnMarkers: [{
393
- type: Input
394
- }], cellSelected: [{
395
- type: Output
396
- }], selectable: [{
397
- type: Input
398
- }] } });
399
-
400
- // export interface TabulatorOptions {
401
- // readonly tooltipsHeader?: boolean;
402
- // readonly tooltipGenerationMode?: 'hover' | 'mouseover';
403
- // readonly reactiveData?: boolean;
404
- // readonly selectable?: boolean | number | 'highlight';
405
- // readonly data?: unknown[];
406
- // readonly layout?: 'fitData' | 'fitColumns';
407
- // readonly columns?: TabulatorColumn[];
408
- // readonly height?: string | number;
409
- // readonly maxHeight?: string | number;
410
- // readonly groupBy?: string;
411
- // readonly groupHeader?: (value: unknown, count: number) => string;
412
- // readonly rowClick?: (event: Event, row: unknown) => void;
413
- // readonly rowSelect?: (row: unknown) => void;
414
- // readonly rowDeselect?: (row: unknown) => void;
415
- // readonly rowContextMenu?: IRowMenu[];
416
- // }
417
-
418
- /**
419
- * Generated bundle index. Do not edit.
420
- */
421
-
262
+ changeDetection: ChangeDetectionStrategy.OnPush,
263
+ imports: []
264
+ }]
265
+ }],
266
+ propDecorators: {
267
+ layout: [{ type: Input }],
268
+ data: [{ type: Input }],
269
+ columns: [{ type: Input }],
270
+ groupBy: [{ type: Input }],
271
+ height: [{ type: Input }],
272
+ maxHeight: [{ type: Input }],
273
+ rowContextMenu: [{ type: Input }],
274
+ tabulatorDiv: [{
275
+ type: ViewChild,
276
+ args: ["tabulatorDiv", { static: true }]
277
+ }],
278
+ rowClick: [{ type: Input }],
279
+ rowSelected: [{ type: Output }],
280
+ rowDeselected: [{ type: Output }],
281
+ selectableRange: [{ type: Input }],
282
+ columnMarkers: [{ type: Input }],
283
+ cellSelected: [{ type: Output }],
284
+ selectable: [{ type: Input }]
285
+ }
286
+ });
422
287
  export { DataGridComponent };
423
- //# sourceMappingURL=sneat-datagrid.mjs.map
288
+
289
+ //# sourceMappingURL=sneat-datagrid.mjs.map