mat-table-ext 0.0.11 → 1.0.0-beta.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 (33) hide show
  1. package/README.md +57 -57
  2. package/assets/_theming.scss +7 -7
  3. package/assets/pinLeft.svg +11 -11
  4. package/assets/pinNone.svg +5 -5
  5. package/assets/pinRight.svg +11 -11
  6. package/assets/pinned.svg +6 -2
  7. package/fesm2022/mat-table-ext-test1.mjs +3019 -0
  8. package/fesm2022/mat-table-ext-test1.mjs.map +1 -0
  9. package/index.d.ts +774 -5
  10. package/package.json +13 -21
  11. package/esm2020/lib/components/column-pinning/column-pinning.component.mjs +0 -58
  12. package/esm2020/lib/components/editing/editing.component.mjs +0 -122
  13. package/esm2020/lib/components/filter-columns-component/filter-columns-component.component.mjs +0 -68
  14. package/esm2020/lib/directives/resize-column.directive.mjs +0 -99
  15. package/esm2020/lib/mat-table-ext.component.mjs +0 -1020
  16. package/esm2020/lib/mat-table-ext.module.mjs +0 -237
  17. package/esm2020/lib/mat-table-ext.service.mjs +0 -20
  18. package/esm2020/lib/models/tableExtModels.mjs +0 -2
  19. package/esm2020/mat-table-ext.mjs +0 -5
  20. package/esm2020/public-api.mjs +0 -11
  21. package/fesm2015/mat-table-ext.mjs +0 -1584
  22. package/fesm2015/mat-table-ext.mjs.map +0 -1
  23. package/fesm2020/mat-table-ext.mjs +0 -1581
  24. package/fesm2020/mat-table-ext.mjs.map +0 -1
  25. package/lib/components/column-pinning/column-pinning.component.d.ts +0 -27
  26. package/lib/components/editing/editing.component.d.ts +0 -42
  27. package/lib/components/filter-columns-component/filter-columns-component.component.d.ts +0 -26
  28. package/lib/directives/resize-column.directive.d.ts +0 -27
  29. package/lib/mat-table-ext.component.d.ts +0 -348
  30. package/lib/mat-table-ext.module.d.ts +0 -58
  31. package/lib/mat-table-ext.service.d.ts +0 -11
  32. package/lib/models/tableExtModels.d.ts +0 -76
  33. package/public-api.d.ts +0 -7
package/index.d.ts CHANGED
@@ -1,5 +1,774 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="mat-table-ext" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { TemplateRef, OnInit, OnChanges, AfterViewInit, OnDestroy, ElementRef, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
3
+ import * as i1 from '@angular/common';
4
+ import * as i2 from '@ngx-translate/core';
5
+ import * as i3 from '@angular/material/table';
6
+ import { MatTable, MatTableDataSource } from '@angular/material/table';
7
+ import * as i4 from '@angular/forms';
8
+ import { FormBuilder, FormGroup, FormControl } from '@angular/forms';
9
+ import * as i5 from '@angular/material/core';
10
+ import * as i6 from '@angular/cdk/a11y';
11
+ import * as i7 from '@angular/cdk/accordion';
12
+ import * as i8 from '@angular/cdk/clipboard';
13
+ import * as i9 from '@angular/cdk/stepper';
14
+ import * as i10 from '@angular/cdk/table';
15
+ import * as i11 from '@angular/cdk/tree';
16
+ import * as i12 from '@angular/cdk/drag-drop';
17
+ import { CdkDragDrop } from '@angular/cdk/drag-drop';
18
+ import * as i13 from '@angular/material/autocomplete';
19
+ import * as i14 from '@angular/material/badge';
20
+ import * as i15 from '@angular/material/bottom-sheet';
21
+ import * as i16 from '@angular/material/button';
22
+ import * as i17 from '@angular/material/button-toggle';
23
+ import * as i18 from '@angular/material/card';
24
+ import * as i19 from '@angular/material/checkbox';
25
+ import * as i20 from '@angular/material/chips';
26
+ import * as i21 from '@angular/material/stepper';
27
+ import * as i22 from '@angular/material/datepicker';
28
+ import * as i23 from '@angular/material/dialog';
29
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
30
+ import * as i24 from '@angular/material/divider';
31
+ import * as i25 from '@angular/material/expansion';
32
+ import * as i26 from '@angular/material/grid-list';
33
+ import * as i27 from '@angular/material/icon';
34
+ import { MatIconRegistry } from '@angular/material/icon';
35
+ import * as i28 from '@angular/material/input';
36
+ import * as i29 from '@angular/material/list';
37
+ import * as i30 from '@angular/material/menu';
38
+ import { MatMenuTrigger } from '@angular/material/menu';
39
+ import * as i31 from '@angular/material/paginator';
40
+ import { MatPaginator } from '@angular/material/paginator';
41
+ import * as i32 from '@angular/material/progress-bar';
42
+ import * as i33 from '@angular/material/progress-spinner';
43
+ import * as i34 from '@angular/material/radio';
44
+ import * as i35 from '@angular/material/select';
45
+ import * as i36 from '@angular/material/sidenav';
46
+ import * as i37 from '@angular/material/slider';
47
+ import * as i38 from '@angular/material/slide-toggle';
48
+ import * as i39 from '@angular/material/snack-bar';
49
+ import * as i40 from '@angular/material/sort';
50
+ import { MatSort } from '@angular/material/sort';
51
+ import * as i41 from '@angular/material/tabs';
52
+ import * as i42 from '@angular/material/toolbar';
53
+ import * as i43 from '@angular/material/tooltip';
54
+ import * as i44 from '@angular/material/tree';
55
+ import * as i45 from '@angular/cdk/portal';
56
+ import * as i46 from '@angular/cdk/scrolling';
57
+ import * as i47 from '@angular/material/form-field';
58
+ import { SelectionModel } from '@angular/cdk/collections';
59
+ import { Observable, BehaviorSubject } from 'rxjs';
60
+ import { HttpClient } from '@angular/common/http';
61
+ import { DomSanitizer } from '@angular/platform-browser';
62
+ import * as XLSX from 'xlsx';
63
+
64
+ /** Column definition of mat-table-ext. */
65
+ interface MTExColumn {
66
+ field: string;
67
+ options?: string[];
68
+ header?: string;
69
+ name?: string;
70
+ footerText?: string;
71
+ headerTooltip?: TooltipProp;
72
+ cellTooltip?: TooltipProp;
73
+ pinned?: 'left' | 'right' | null;
74
+ width?: string;
75
+ disabled?: boolean;
76
+ minWidth?: string;
77
+ maxWidth?: string;
78
+ hide?: boolean;
79
+ type: MTExColumnType;
80
+ cellTemplate?: TemplateRef<any> | null;
81
+ headerTemplate?: TemplateRef<any> | null;
82
+ groupName?: string;
83
+ }
84
+ /** Column group definition for grouped headers */
85
+ interface MTExColumnGroup {
86
+ name: string;
87
+ label: string;
88
+ columns: string[];
89
+ colspan?: number;
90
+ }
91
+ interface DisplayColumn {
92
+ filter: boolean;
93
+ name: string;
94
+ show: boolean;
95
+ }
96
+ interface RowChange {
97
+ row: {
98
+ [key: string]: any;
99
+ };
100
+ index: number;
101
+ }
102
+ interface RowSelectionChange {
103
+ row: {
104
+ [key: string]: any;
105
+ };
106
+ index: number;
107
+ isSelected: boolean;
108
+ }
109
+ interface ExpansionChange {
110
+ data: {
111
+ [key: string]: any;
112
+ };
113
+ index: number;
114
+ expanded: boolean;
115
+ }
116
+ interface CellTemplateRefMap {
117
+ [key: string]: TemplateRef<any>;
118
+ }
119
+ /** Possible column type values. */
120
+ declare type MTExColumnType = 'selection' | 'string' | 'boolean' | 'number' | 'date' | 'datepicker' | 'textarea';
121
+ interface TooltipProp {
122
+ value: string;
123
+ tooltipPosition?: TooltipPosition;
124
+ }
125
+ declare type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
126
+ /** Cell template. */
127
+ interface MTExCellTemplate {
128
+ [key: string]: TemplateRef<any>;
129
+ }
130
+ interface FilterSearchValue {
131
+ [key: string]: any;
132
+ }
133
+ interface MTExRow {
134
+ [key: string]: any;
135
+ }
136
+ interface ColumnVisibility {
137
+ [key: string]: any;
138
+ }
139
+ interface MTExColumnPinOption {
140
+ label: string | Observable<string>;
141
+ value: MTExColumnPinValue;
142
+ selected: boolean;
143
+ field: string;
144
+ }
145
+ declare type MTExColumnPinValue = 'left' | 'right' | null;
146
+ /** Row pinning configuration */
147
+ interface RowPinning {
148
+ index: number;
149
+ position: 'top' | 'bottom';
150
+ }
151
+
152
+ declare class MatTableExtService {
153
+ http: HttpClient;
154
+ selectedRow: BehaviorSubject<any>;
155
+ constructor(http: HttpClient);
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtService, never>;
157
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatTableExtService>;
158
+ }
159
+
160
+ declare class MatTableExtComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
161
+ dialog: MatDialog;
162
+ service: MatTableExtService;
163
+ formBuilder: FormBuilder;
164
+ domSanitizer: DomSanitizer;
165
+ matIconRegistry: MatIconRegistry;
166
+ private cdr;
167
+ menuTrigger: MatMenuTrigger;
168
+ columnMenuTrigger: MatMenuTrigger;
169
+ paginator: MatPaginator;
170
+ sort: MatSort;
171
+ matTableRef: ElementRef;
172
+ table: MatTable<any>;
173
+ tableElement: ElementRef;
174
+ dataSource: MatTableDataSource<any>;
175
+ columns: MTExColumn[];
176
+ columnResizable: boolean;
177
+ stripedRows: boolean;
178
+ rowHover: boolean;
179
+ inlineRowEditing: boolean;
180
+ inCellEditing: boolean;
181
+ cellPopupEditing: boolean;
182
+ popupRowEditing: boolean;
183
+ enableDelete: boolean;
184
+ rowSelection: boolean;
185
+ multiRowSelection: boolean;
186
+ stickyFooter: boolean;
187
+ stickyHeader: boolean;
188
+ showFooterRow: boolean;
189
+ columnFilter: boolean;
190
+ loadingIndicator: boolean;
191
+ sorting: boolean;
192
+ showToolbar: boolean;
193
+ toolbarTitle: string;
194
+ tableHeight: string;
195
+ toolbarHeight: string;
196
+ tableWidth: string;
197
+ scrollbarH: boolean;
198
+ toolbarTemplate: TemplateRef<any> | undefined;
199
+ columnHidable: boolean;
200
+ columnPinnable: boolean;
201
+ globalSearch: boolean;
202
+ expandRows: boolean;
203
+ dndColumns: boolean;
204
+ showPaginator: boolean;
205
+ showFirstLastButtons: boolean;
206
+ exportButtonEnable: boolean;
207
+ printButtonEnable: boolean;
208
+ pageSizeOptions: number[];
209
+ toolbarTemplateRef: TemplateRef<any> | undefined;
210
+ headerTemplateRef: TemplateRef<any> | null;
211
+ cellTemplateRef: TemplateRef<any> | undefined;
212
+ expansionTemplateRef: TemplateRef<any> | undefined;
213
+ popupEditingTemplateRef: TemplateRef<any> | undefined;
214
+ inlineEditingTemplateRef: TemplateRef<any> | undefined;
215
+ cellEditingTemplateRef: TemplateRef<any> | undefined;
216
+ cellPopupEditingTemplateRef: TemplateRef<any> | undefined;
217
+ cellTemplateRefMap: CellTemplateRefMap;
218
+ tableClassName: string;
219
+ columnGroups: MTExColumnGroup[];
220
+ hiddenRowIndices: number[];
221
+ enableRowHiding: boolean;
222
+ enableRowPinning: boolean;
223
+ topPinnedMaxHeight: string;
224
+ bottomPinnedMaxHeight: string;
225
+ rowPinningFn?: (row: any, index: number) => 'top' | 'bottom' | null;
226
+ rowHidingFilterFn?: (row: any, index: number) => boolean;
227
+ pdfOrientation: 'portrait' | 'landscape';
228
+ inlineChange: EventEmitter<any>;
229
+ cellChange: EventEmitter<any>;
230
+ popupChange: EventEmitter<any>;
231
+ rowDeleted: EventEmitter<any>;
232
+ scroll: EventEmitter<any>;
233
+ selectionChanged: EventEmitter<RowSelectionChange>;
234
+ expansionChange: EventEmitter<ExpansionChange>;
235
+ rowPinningChange: EventEmitter<{
236
+ row: any;
237
+ position: 'top' | 'bottom' | null;
238
+ }>;
239
+ tableID: number;
240
+ columnPinningOptions: MTExColumnPinOption[];
241
+ exportMenuCtrl: boolean;
242
+ columnPinMenuCtrl: boolean;
243
+ hideShowMenuCtrl: boolean;
244
+ rowDataTemp: Record<string, MTExRow>;
245
+ inlineEditingTemplateRefData: any;
246
+ displayedColumns: string[];
247
+ showHideColumnsArray: MTExColumn[];
248
+ columnsList: string[];
249
+ columnsArray: MTExColumn[];
250
+ headersFiltersIds: string[];
251
+ columnsToDisplayWithExpand: string[];
252
+ selection: SelectionModel<any>;
253
+ hiddenCtrl: SelectionModel<any>;
254
+ tableData: MTExRow[];
255
+ filterValues: Record<string, string | number | boolean>;
256
+ pinnedTopRows: any[];
257
+ pinnedBottomRows: any[];
258
+ rowPinMenuPosition: {
259
+ x: string;
260
+ y: string;
261
+ };
262
+ rowPinMenuRow: any;
263
+ globalFilter: string;
264
+ showHideFilter: string;
265
+ individualFilter: string;
266
+ toggleFilters: boolean;
267
+ hideRows: boolean;
268
+ expandedElement: any | null;
269
+ currentRowIndex: number;
270
+ currentRow: MTExRow;
271
+ cellEditing: Record<string, boolean>;
272
+ private originalSizesBeforeEdit;
273
+ hideShowMenuGroup: FormGroup;
274
+ menuX: number;
275
+ menuY: number;
276
+ dynamicDisplayedColumns: any[];
277
+ inputPropertyKeys: string[];
278
+ constructor(dialog: MatDialog, service: MatTableExtService, formBuilder: FormBuilder, domSanitizer: DomSanitizer, matIconRegistry: MatIconRegistry, cdr: ChangeDetectorRef);
279
+ /**
280
+ *
281
+ * @param changes changes captured each time user changes property value.
282
+ */
283
+ /**
284
+ * Handle column pinning changes from ColumnPinningComponent
285
+ * @param updatedColumns Updated columns array with new pinning states
286
+ */
287
+ updateColumns(updatedColumns: MTExColumn[]): void;
288
+ ngOnChanges(changes: SimpleChanges): void;
289
+ ngOnInit(): void;
290
+ ngAfterViewInit(): void;
291
+ /**
292
+ * @description Calculate offsets for pinned rows based on sticky headers/footers
293
+ */
294
+ private updatePinnedRowOffsets;
295
+ /**
296
+ * @description Update offsets for each individual pinned row to stack them
297
+ */
298
+ private updateStackedPinnedRowOffsets;
299
+ private onWindowResizeBound;
300
+ /**
301
+ * Copy header cell widths/heights from the top table and apply them to middle and bottom tables.
302
+ * This ensures columns line up when the middle/bottom tables don't render headers.
303
+ */
304
+ private syncColumnSizesFromTop;
305
+ /**
306
+ * Sync column sizes from the currently edited row in the middle table to top/bottom tables.
307
+ * This ensures proper alignment when a row is in edit mode with different height.
308
+ */
309
+ private syncColumnSizesFromEditedRow;
310
+ /**
311
+ * Restore original column widths and row heights from before edit mode.
312
+ */
313
+ private restoreOriginalSizes;
314
+ ngOnDestroy(): void;
315
+ /**
316
+ * @description checks and updates the the column's hide and show properties.
317
+ */
318
+ setColumnHideShow(): void;
319
+ /**
320
+ * @description set the properties of the table.
321
+ * @param changes changes captured each time user changes property value.
322
+ */
323
+ setPropertyValue(changes: SimpleChanges): void;
324
+ /**
325
+ * @description This mapping is used to set and update changesin the table.
326
+ */
327
+ setPropertiesMap: any;
328
+ /**
329
+ * @description used set data source for table.
330
+ * @param value data source value from user.
331
+ */
332
+ setTableDataSource(value: any): void;
333
+ /**
334
+ * @description used create seletion model and set selection column visibility.
335
+ * @param value boolean value to show or hide selection Column from table.
336
+ */
337
+ setRowSelection(value: boolean): void;
338
+ /**
339
+ * @description create filter header row and assigns filter predicate to table data source.
340
+ * @param value boolean value to change visibility of column filter row.
341
+ */
342
+ setColumnFilter(value: boolean): void;
343
+ /**
344
+ * @description This method returns the list of visible column names.
345
+ * @returns list of visible column names.
346
+ */
347
+ getDisplayedColumns(): string[];
348
+ /**
349
+ * @description This method returns the grouped column header definitions.
350
+ * @returns list of grouped column definitions for header row.
351
+ */
352
+ getGroupedColumns(): string[];
353
+ /**
354
+ * @description Returns filter column IDs including placeholders for action columns
355
+ * @returns Array of filter column IDs with action column placeholders
356
+ */
357
+ getFilterColumns(): string[];
358
+ /**
359
+ * @param menuType type of menu to open from toolbar.
360
+ * @param event mouse event to open menu on that location.
361
+ */
362
+ openMenu(menuType: string, event: MouseEvent): void;
363
+ /**
364
+ * @description triggers when menu is closed and reset the required controls.
365
+ */
366
+ menuClosed(): void;
367
+ /**
368
+ * @description set list of columns to display in table.
369
+ * @param columns columns array from user input.
370
+ */
371
+ setColumnsData(columns: MTExColumn[]): void;
372
+ /**
373
+ * @description set list of columns to display in table.
374
+ * @param columns columns array from user input with configurations.
375
+ */
376
+ setColumnsList(columns: MTExColumn[]): void;
377
+ /**
378
+ * @description Take boolean value and name column and update its visibility status in table.
379
+ * @param name name of the column to set visibility.
380
+ * @param value boolean value to set visibility of the column.
381
+ */
382
+ showHideColumn(name: string, value: boolean): void;
383
+ /**
384
+ * @description Toggle hide state for a specific row
385
+ * @param index The row index to hide/unhide
386
+ */
387
+ toggleRowHide(index: number): void;
388
+ /**
389
+ * @description Check if a row index is in the hidden rows list or matches the filter function.
390
+ * @param index The row index to check
391
+ * @returns True if the row is hidden
392
+ */
393
+ isRowHidden(index: number): boolean;
394
+ /**
395
+ * @description Unhide all hidden rows
396
+ */
397
+ unhideAllRows(): void;
398
+ /**
399
+ * @description Open row pin menu
400
+ * @param event Mouse event
401
+ * @param row The row to pin
402
+ */
403
+ openRowPinMenu(event: MouseEvent, row: any): void;
404
+ /**
405
+ * @description Close row pin menu
406
+ */
407
+ closeRowPinMenu(): void;
408
+ pinnedTopDataSource: MatTableDataSource<any>;
409
+ pinnedBtmDataSource: MatTableDataSource<any>;
410
+ /**
411
+ * @description Pin row to top or bottom
412
+ * @param row The row to pin
413
+ * @param position 'top' or 'bottom'
414
+ */
415
+ pinRow(row: any, position: 'top' | 'bottom'): void;
416
+ /**
417
+ * @description Unpin row from any position
418
+ * @param row The row to unpin
419
+ */
420
+ unpinRow(row: any): void;
421
+ /**
422
+ * @description Check if a row is pinned
423
+ * @param row The row to check
424
+ * @returns true if pinned
425
+ */
426
+ isRowPinned(row: any): boolean;
427
+ /**
428
+ * @description Get row pin position
429
+ * @param row The row to check
430
+ * @returns 'top', 'bottom', or null
431
+ */
432
+ getRowPinPosition(row: any): 'top' | 'bottom' | null;
433
+ /**
434
+ * @description Get rows for main data section (excluding pinned rows)
435
+ * @returns Array of non-pinned rows
436
+ */
437
+ getUnpinnedRows(): any[];
438
+ /**
439
+ * @description Get combined data source with pinned rows
440
+ */
441
+ getCombinedDataSource(): any[];
442
+ /**
443
+ * @description Check if row is pinned to top (for CSS class binding)
444
+ */
445
+ isRowPinnedTop: (row: any) => boolean;
446
+ /**
447
+ * @description Check if row is pinned to bottom (for CSS class binding)
448
+ */
449
+ isRowPinnedBottom: (row: any) => boolean;
450
+ /**
451
+ * @description Initialize pinned rows based on function
452
+ */
453
+ initializePinnedRows(): void;
454
+ /**
455
+ * @description Update data source and recalculate pinned row offsets
456
+ */
457
+ private updateDataSourceForPinning;
458
+ /**
459
+ * @description This method will position the selection column to first and also update its visibility.
460
+ * @param value value used to set visibility of the selection column.
461
+ */
462
+ updateSelectionColumnVisibility(value: boolean): void;
463
+ /**
464
+ * @description This method is used to update the position of column in columns array according to its dropped position.
465
+ * @param event CdkDragDrop used to update column position in columns array.
466
+ */
467
+ onDrop(event: CdkDragDrop<any>): void;
468
+ /**
469
+ * @description This method create filter predicate function which will set search value to table filters
470
+ * for both global and individual colum filtering.
471
+ * @returns returns boolean value to filter rows in table.
472
+ */
473
+ createFilter(): (data: any, filter: string) => boolean;
474
+ /**
475
+ * @description assigns the search value to mat table data source to apply the filter.
476
+ * @param searchValue value to be searched from table rows.
477
+ */
478
+ applyGlobalFilter(searchValue: string): void;
479
+ /**
480
+ * @description This method is used to apply column based filtering
481
+ * @param searchValue value to be searched from table rows.
482
+ * @param column filter will be applied based on this column field.
483
+ */
484
+ applyColumnFilter(searchValue: FilterSearchValue, column: MTExColumn): void;
485
+ /**
486
+ * @description This method will take row and its index enable inline editing tools on that row.
487
+ * @param row row on which user wants to do edit.
488
+ * @param index index of the row where inline editing will be enabled.
489
+ */
490
+ enableInlineEditing(row: any, index: number): void;
491
+ /**
492
+ * @description This method will create and return data to inline editing template.
493
+ * @param row row on which user wants to do edit.
494
+ * @param index index of the row where inline editing will be enabled.
495
+ * @param column current column of the table.
496
+ */
497
+ getInlineEditingData(row: MTExRow, index: number, column: MTExColumn): any;
498
+ /**
499
+ * @description This method will take data from inline editing template and update in table data source.
500
+ * @param row updated row from inline editing template.
501
+ */
502
+ updateInlineTemplateData: (row: MTExRow) => void;
503
+ /**
504
+ * @description This method set data for in-cell editing.
505
+ * @param row row on which user wants to do edit.
506
+ * @param index index of the row where inline editing will be enabled.
507
+ */
508
+ setCellData(row: MTExRow, index: number): void;
509
+ /**
510
+ * @description This will restore the data and cencel the inline editing.
511
+ * @param row row on which user wants to do edit.
512
+ * @param index index of the row where inline editing will be enabled.
513
+ */
514
+ cancelInlineEditing(row: MTExRow, index: number): void;
515
+ /**
516
+ * @description This method will save and update the inline editing data and emit the update row and index.
517
+ * @param row row on which user wants to do edit.
518
+ * @param index index of the row where inline editing will be enabled.
519
+ */
520
+ saveInlineEditing(row: MTExRow, index: number): void;
521
+ /**
522
+ * @description This method will save and update the cell editing data and emit the update row and index.
523
+ */
524
+ saveCellEditing(): void;
525
+ /**
526
+ * @description This method will delete the row from the given index and emit the deleted row and index.
527
+ * @param row row to be deleted.
528
+ * @param index index of the row to be deleted.
529
+ */
530
+ deleteRow(row: any, index: number): void;
531
+ /**
532
+ * @description This method will expand or collapse the row and emit expand event.
533
+ * @param row row to be expanded or collapsed.
534
+ * @param expand value used to expand or collapse the row.
535
+ * @param index index of the row.
536
+ */
537
+ expandRow(row: MTExRow, expand: boolean, index: number): void;
538
+ /**
539
+ * @description This method is used to set data for popup component and open editing dialog.
540
+ * @param row row which used want to edit.
541
+ */
542
+ openEditingDialog(row: MTExRow): void;
543
+ /**
544
+ * @description This method is used to open cell popup editing dialog for a single cell.
545
+ * @param row row which contains the cell to edit.
546
+ * @param column column definition of the cell to edit.
547
+ * @param rowIndex index of the row.
548
+ */
549
+ openCellPopupDialog(row: any, column: MTExColumn, rowIndex: number): void;
550
+ /**
551
+ * @description used to check whether all rows are selected.
552
+ */
553
+ isAllSelected(): boolean;
554
+ /**
555
+ * @description this method is used to toggle the all and no rows selection.
556
+ */
557
+ toggleAllRows(): void;
558
+ /**
559
+ * @description This method is used return aria-label for selection column checkboxs.
560
+ * @param row row from table.
561
+ * @returns labels for selection column checkboxs.
562
+ */
563
+ checkboxLabel(row?: any): string;
564
+ /**
565
+ * @description create form control for columns for hiding and and pinning purpose
566
+ * @param columns list of columns to be displayed
567
+ */
568
+ setToolbarMenuControls(columns: MTExColumn[]): void;
569
+ /**
570
+ * @param column current column
571
+ * @param event mouse event used to set the menu position
572
+ */
573
+ openPinnablePropertyMenu(column: MTExColumn, event: MouseEvent): void;
574
+ /**
575
+ * @description This method is used to reset menu checks when required.
576
+ */
577
+ resetMenuChecks(): void;
578
+ /**
579
+ * @description This method is used to filter columns for menus like pinning or hide show menu.
580
+ * @param value search value to filter colunms
581
+ */
582
+ filterColumns(value: string): void;
583
+ /**
584
+ * @description This method is used to open hide show column menu.
585
+ * @param columns columns array to display in hide show menu.
586
+ */
587
+ openHideShowMenu(columns: MTExColumn[]): void;
588
+ /**
589
+ * @param values columns
590
+ */
591
+ updateColumnsHideShow(values: ColumnVisibility): void;
592
+ /**
593
+ * @description This method is called when the table rows are scrolled.
594
+ * @param event scroll event
595
+ */
596
+ onScroll(event: any): void;
597
+ /**
598
+ * @param row row to be toggled
599
+ * @param index index of toggled row
600
+ */
601
+ setSelectedRows(row: any, index: number): void;
602
+ /**
603
+ * @description This method is used to display all hidden rows.
604
+ */
605
+ showHiddenRows(): void;
606
+ /**
607
+ * @description This method is used to hide all selected rows.
608
+ */
609
+ hideSelectedRows(): void;
610
+ /**
611
+ * @description This method is used to recalculate the required values for table.
612
+ */
613
+ reCal(): void;
614
+ /**
615
+ * @description This method is called in constructor method to add SVGs into icon registration.
616
+ */
617
+ addIconsToRegistry(): void;
618
+ /**
619
+ * @description This method is used to export table data.
620
+ * @param type type of file to be exported.
621
+ */
622
+ exportTable(type: string): void;
623
+ /**
624
+ * @description This method is used to print the table with proper styling.
625
+ */
626
+ printTable(): void;
627
+ exportToPDF(): Promise<void>;
628
+ /**
629
+ * @description This method is used to split name of filter row header to get index.
630
+ * @param value value to be splited for index.
631
+ * @returns Will return index of column from value.
632
+ */
633
+ returnIndex(value: string): number;
634
+ /**
635
+ * @description This method is used to manage column filtering, expanded data for exporting.
636
+ * @param ws work sheet
637
+ * @returns custom generated worksheet to be used in export.
638
+ */
639
+ writeSheetData(ws: XLSX.WorkSheet): XLSX.WorkSheet;
640
+ getMergeIndex(merges: any[]): any[];
641
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtComponent, never>;
642
+ static ɵcmp: i0.ɵɵComponentDeclaration<MatTableExtComponent, "mat-table-ext", never, { "dataSource": { "alias": "dataSource"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "columnResizable": { "alias": "columnResizable"; "required": false; }; "stripedRows": { "alias": "stripedRows"; "required": false; }; "rowHover": { "alias": "rowHover"; "required": false; }; "inlineRowEditing": { "alias": "inlineRowEditing"; "required": false; }; "inCellEditing": { "alias": "inCellEditing"; "required": false; }; "cellPopupEditing": { "alias": "cellPopupEditing"; "required": false; }; "popupRowEditing": { "alias": "popupRowEditing"; "required": false; }; "enableDelete": { "alias": "enableDelete"; "required": false; }; "rowSelection": { "alias": "rowSelection"; "required": false; }; "multiRowSelection": { "alias": "multiRowSelection"; "required": false; }; "stickyFooter": { "alias": "stickyFooter"; "required": false; }; "stickyHeader": { "alias": "stickyHeader"; "required": false; }; "showFooterRow": { "alias": "showFooterRow"; "required": false; }; "columnFilter": { "alias": "columnFilter"; "required": false; }; "loadingIndicator": { "alias": "loadingIndicator"; "required": false; }; "sorting": { "alias": "sorting"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarTitle": { "alias": "toolbarTitle"; "required": false; }; "tableHeight": { "alias": "tableHeight"; "required": false; }; "toolbarHeight": { "alias": "toolbarHeight"; "required": false; }; "tableWidth": { "alias": "tableWidth"; "required": false; }; "scrollbarH": { "alias": "scrollbarH"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "columnHidable": { "alias": "columnHidable"; "required": false; }; "columnPinnable": { "alias": "columnPinnable"; "required": false; }; "globalSearch": { "alias": "globalSearch"; "required": false; }; "expandRows": { "alias": "expandRows"; "required": false; }; "dndColumns": { "alias": "dndColumns"; "required": false; }; "showPaginator": { "alias": "showPaginator"; "required": false; }; "showFirstLastButtons": { "alias": "showFirstLastButtons"; "required": false; }; "exportButtonEnable": { "alias": "exportButtonEnable"; "required": false; }; "printButtonEnable": { "alias": "printButtonEnable"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "toolbarTemplateRef": { "alias": "toolbarTemplateRef"; "required": false; }; "headerTemplateRef": { "alias": "headerTemplateRef"; "required": false; }; "cellTemplateRef": { "alias": "cellTemplateRef"; "required": false; }; "expansionTemplateRef": { "alias": "expansionTemplateRef"; "required": false; }; "popupEditingTemplateRef": { "alias": "popupEditingTemplateRef"; "required": false; }; "inlineEditingTemplateRef": { "alias": "inlineEditingTemplateRef"; "required": false; }; "cellEditingTemplateRef": { "alias": "cellEditingTemplateRef"; "required": false; }; "cellPopupEditingTemplateRef": { "alias": "cellPopupEditingTemplateRef"; "required": false; }; "cellTemplateRefMap": { "alias": "cellTemplateRefMap"; "required": false; }; "tableClassName": { "alias": "tableClassName"; "required": false; }; "columnGroups": { "alias": "columnGroups"; "required": false; }; "hiddenRowIndices": { "alias": "hiddenRowIndices"; "required": false; }; "enableRowHiding": { "alias": "enableRowHiding"; "required": false; }; "enableRowPinning": { "alias": "enableRowPinning"; "required": false; }; "topPinnedMaxHeight": { "alias": "topPinnedMaxHeight"; "required": false; }; "bottomPinnedMaxHeight": { "alias": "bottomPinnedMaxHeight"; "required": false; }; "rowPinningFn": { "alias": "rowPinningFn"; "required": false; }; "rowHidingFilterFn": { "alias": "rowHidingFilterFn"; "required": false; }; "pdfOrientation": { "alias": "pdfOrientation"; "required": false; }; }, { "inlineChange": "inlineChange"; "cellChange": "cellChange"; "popupChange": "popupChange"; "rowDeleted": "rowDeleted"; "scroll": "scroll"; "selectionChanged": "selectionChanged"; "expansionChange": "expansionChange"; "rowPinningChange": "rowPinningChange"; }, never, never, true, never>;
643
+ }
644
+
645
+ declare class ResizeColumnDirective implements OnInit, OnChanges, OnDestroy {
646
+ private readonly renderer;
647
+ private readonly elementRef;
648
+ private columnsResizable$;
649
+ set columnsResizable(val: boolean);
650
+ get columnsResizable(): boolean;
651
+ index: number;
652
+ private startX;
653
+ private startWidth;
654
+ private readonly column;
655
+ private table;
656
+ private pressed;
657
+ private resizerElement;
658
+ constructor();
659
+ ngOnInit(): void;
660
+ ngOnChanges(): void;
661
+ ngOnDestroy(): void;
662
+ private setupResizing;
663
+ private initializeResizer;
664
+ private cleanup;
665
+ private readonly onMouseDown;
666
+ private readonly onMouseMove;
667
+ private readonly onMouseUp;
668
+ /**
669
+ * @description This method is used to remove resizing handlers from the table headers when column resizing is disabled.
670
+ */
671
+ private removeDragElementFromDom;
672
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResizeColumnDirective, never>;
673
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeColumnDirective, "[columnsResizable]", never, { "columnsResizable": { "alias": "columnsResizable"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, {}, never, never, true, never>;
674
+ }
675
+
676
+ declare class ColumnPinningComponent implements OnInit {
677
+ columns: MTExColumn[];
678
+ columnsChanged: EventEmitter<MTExColumn[]>;
679
+ icons: {
680
+ left: string;
681
+ right: string;
682
+ none: string;
683
+ };
684
+ constructor();
685
+ ngOnInit(): void;
686
+ /**
687
+ * @description This method is called when pin value changes for a column.
688
+ * @param column column of which to set the pin value
689
+ */
690
+ changeValue(column: MTExColumn): void;
691
+ /**
692
+ * @description This method is used to set the column pin value.
693
+ * @param column column of which to set the pin value
694
+ * @param value pin value to set
695
+ */
696
+ setColumnPinValue(column: MTExColumn, value: 'left' | 'right' | null): void;
697
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnPinningComponent, never>;
698
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnPinningComponent, "app-column-pinning", never, { "columns": { "alias": "columns"; "required": false; }; }, { "columnsChanged": "columnsChanged"; }, never, never, true, never>;
699
+ }
700
+
701
+ declare class EditingComponent implements OnInit {
702
+ dialogRef: MatDialogRef<EditingComponent>;
703
+ dialogData: any;
704
+ service: MatTableExtService;
705
+ templateRef: TemplateRef<any>;
706
+ keys: string[];
707
+ templateKeys: string[];
708
+ types: any;
709
+ templateTypes: any;
710
+ columns: MTExColumn[];
711
+ templateRow: any;
712
+ isCellEdit: boolean;
713
+ cellColumn: MTExColumn;
714
+ cellValue: any;
715
+ cellField: string;
716
+ constructor(dialogRef: MatDialogRef<EditingComponent>, dialogData: any, service: MatTableExtService);
717
+ ngOnInit(): void;
718
+ /**
719
+ * @description This method is used to set data for editing.
720
+ * @param value dialog Data
721
+ */
722
+ setData(value: any): void;
723
+ /**
724
+ * @description This method is used to set the data when data comes in from cus template.
725
+ * @param value template value
726
+ */
727
+ setTemplateRef(value: any): void;
728
+ /**
729
+ * @description This method is triggered when dialog is closed and also emits the dialog closed event data.
730
+ */
731
+ closeDialog(): void; /**
732
+ * @description This method is called when the dialog is closed custom template action.
733
+ * @param row row to be edited.
734
+ * @param keys keys of columns
735
+ * @param types column types
736
+ */
737
+ closeTemplateDialog(row: any, keys: string[], types: string[]): void;
738
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditingComponent, never>;
739
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditingComponent, "app-editing", never, {}, {}, never, never, true, never>;
740
+ }
741
+
742
+ declare class FilterColumnsComponentComponent implements OnInit {
743
+ obj: any;
744
+ filterOutput: EventEmitter<any>;
745
+ stringCtrl: FormControl;
746
+ numberCtrl: FormControl;
747
+ dateCtrl: FormControl;
748
+ textareaCtrl: FormControl;
749
+ booleanCtrl: FormControl;
750
+ selectionCtrl: FormControl;
751
+ constructor();
752
+ ngOnInit(): void;
753
+ /**
754
+ * @description This method is make value is valid and not null.
755
+ * @param value value to check its type.
756
+ */
757
+ checkValue(value: any): void;
758
+ /**
759
+ * @description This method will emit seach value to parent component.
760
+ * @param value value on which base table rows are filtered.
761
+ */
762
+ emitOutput(value: any): void;
763
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterColumnsComponentComponent, never>;
764
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterColumnsComponentComponent, "app-filter-columns-component", never, { "obj": { "alias": "obj"; "required": false; }; }, { "filterOutput": "filterOutput"; }, never, never, true, never>;
765
+ }
766
+
767
+ declare class MatTableExtModule {
768
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtModule, never>;
769
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MatTableExtModule, never, [typeof i1.CommonModule, typeof i2.TranslateModule, typeof i3.MatTableModule, typeof i4.FormsModule, typeof i4.ReactiveFormsModule, typeof i5.MatNativeDateModule, typeof i6.A11yModule, typeof i7.CdkAccordionModule, typeof i8.ClipboardModule, typeof i9.CdkStepperModule, typeof i10.CdkTableModule, typeof i11.CdkTreeModule, typeof i12.DragDropModule, typeof i13.MatAutocompleteModule, typeof i14.MatBadgeModule, typeof i15.MatBottomSheetModule, typeof i16.MatButtonModule, typeof i17.MatButtonToggleModule, typeof i18.MatCardModule, typeof i19.MatCheckboxModule, typeof i20.MatChipsModule, typeof i21.MatStepperModule, typeof i22.MatDatepickerModule, typeof i23.MatDialogModule, typeof i24.MatDividerModule, typeof i25.MatExpansionModule, typeof i26.MatGridListModule, typeof i27.MatIconModule, typeof i28.MatInputModule, typeof i29.MatListModule, typeof i30.MatMenuModule, typeof i5.MatNativeDateModule, typeof i31.MatPaginatorModule, typeof i32.MatProgressBarModule, typeof i33.MatProgressSpinnerModule, typeof i34.MatRadioModule, typeof i5.MatRippleModule, typeof i35.MatSelectModule, typeof i36.MatSidenavModule, typeof i37.MatSliderModule, typeof i38.MatSlideToggleModule, typeof i39.MatSnackBarModule, typeof i40.MatSortModule, typeof i41.MatTabsModule, typeof i42.MatToolbarModule, typeof i43.MatTooltipModule, typeof i44.MatTreeModule, typeof i45.PortalModule, typeof i46.ScrollingModule, typeof i47.MatFormFieldModule, typeof MatTableExtComponent, typeof ResizeColumnDirective, typeof ColumnPinningComponent, typeof EditingComponent, typeof FilterColumnsComponentComponent], [typeof MatTableExtComponent, typeof ResizeColumnDirective, typeof ColumnPinningComponent, typeof EditingComponent, typeof FilterColumnsComponentComponent]>;
770
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatTableExtModule>;
771
+ }
772
+
773
+ export { ColumnPinningComponent, EditingComponent, FilterColumnsComponentComponent, MatTableExtComponent, MatTableExtModule, MatTableExtService, ResizeColumnDirective };
774
+ export type { CellTemplateRefMap, ColumnVisibility, DisplayColumn, ExpansionChange, FilterSearchValue, MTExCellTemplate, MTExColumn, MTExColumnGroup, MTExColumnPinOption, MTExColumnPinValue, MTExColumnType, MTExRow, RowChange, RowPinning, RowSelectionChange, TooltipPosition, TooltipProp };