mat-table-ext 0.0.11 → 1.0.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 +63 -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.mjs +3040 -0
  8. package/fesm2022/mat-table-ext.mjs.map +1 -0
  9. package/index.d.ts +858 -5
  10. package/package.json +16 -22
  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,858 @@
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
+ hide?: boolean;
74
+ disabled?: boolean;
75
+ pinned?: 'left' | 'right';
76
+ left?: string;
77
+ right?: string;
78
+ width?: string;
79
+ resizable?: boolean;
80
+ type: MTExColumnType;
81
+ minWidth?: string;
82
+ maxWidth?: string;
83
+ sortable?: boolean | string;
84
+ sortProp?: MTExColumnSortProp;
85
+ typeParameter?: MTExColumnTypeParameter;
86
+ tag?: MTExColumnTag;
87
+ formatter?: (rowData: any, colDef?: MTExColumn) => void;
88
+ cellTemplate?: TemplateRef<any> | null;
89
+ headerTemplate?: TemplateRef<any> | null;
90
+ showExpand?: boolean;
91
+ description?: string;
92
+ summary?: ((data: any[], colDef?: MTExColumn) => void) | string;
93
+ class?: string;
94
+ groupName?: string;
95
+ }
96
+ interface MTExColumnTag {
97
+ [key: number]: MTExColumnTagValue;
98
+ [key: string]: MTExColumnTagValue;
99
+ }
100
+ interface MTExColumnTagValue {
101
+ text?: string;
102
+ color?: string;
103
+ }
104
+ interface MTExColumnTypeParameter {
105
+ currencyCode?: string;
106
+ display?: string | boolean;
107
+ digitsInfo?: string;
108
+ format?: string;
109
+ locale?: string;
110
+ timezone?: string;
111
+ }
112
+ /** The properties of column sort. */
113
+ interface MTExColumnSortProp {
114
+ arrowPosition?: 'before' | 'after';
115
+ disableClear?: boolean;
116
+ id?: string;
117
+ start?: 'asc' | 'desc';
118
+ }
119
+ /** Column group definition for grouped headers */
120
+ interface MTExColumnGroup {
121
+ name: string;
122
+ label: string;
123
+ columns: string[];
124
+ colspan?: number;
125
+ }
126
+ interface DisplayColumn {
127
+ filter: boolean;
128
+ name: string;
129
+ show: boolean;
130
+ }
131
+ interface RowChange {
132
+ row: {
133
+ [key: string]: any;
134
+ };
135
+ index: number;
136
+ }
137
+ interface RowSelectionChange {
138
+ row: {
139
+ [key: string]: any;
140
+ };
141
+ index: number;
142
+ isSelected: boolean;
143
+ }
144
+ interface ExpansionChange {
145
+ data: {
146
+ [key: string]: any;
147
+ };
148
+ index: number;
149
+ expanded: boolean;
150
+ }
151
+ interface CellTemplateRefMap {
152
+ [key: string]: TemplateRef<any>;
153
+ }
154
+ /** Possible column type values. */
155
+ declare type MTExColumnType = 'selection' | 'string' | 'boolean' | 'number' | 'date' | 'datepicker' | 'textarea';
156
+ interface TooltipProp {
157
+ value: string;
158
+ tooltipPosition?: TooltipPosition;
159
+ }
160
+ declare type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';
161
+ /** Cell template. */
162
+ interface MTExCellTemplate {
163
+ [key: string]: TemplateRef<any>;
164
+ }
165
+ interface FilterSearchValue {
166
+ [key: string]: any;
167
+ }
168
+ interface MTExRow {
169
+ [key: string]: any;
170
+ }
171
+ interface ColumnVisibility {
172
+ [key: string]: any;
173
+ }
174
+ interface MTExColumnPinOption {
175
+ label: string | Observable<string>;
176
+ value: MTExColumnPinValue;
177
+ selected: boolean;
178
+ field: string;
179
+ }
180
+ declare type MTExColumnPinValue = 'left' | 'right' | null;
181
+ /** Row pinning configuration */
182
+ interface RowPinning {
183
+ index: number;
184
+ position: 'top' | 'bottom';
185
+ }
186
+ /** Row pinning position type */
187
+ declare type RowPinPosition = 'top' | 'bottom' | null;
188
+ /** Function type to determine row pinning position */
189
+ declare type RowPinningFunction = (row: any, index: number) => RowPinPosition;
190
+ /** Function type to determine if a row should be hidden */
191
+ declare type RowHidingFilterFunction = (row: any, index: number) => boolean;
192
+ /** Table configuration for pinned tables */
193
+ interface MTExPinnedTableConfig {
194
+ /** Enable row pinning feature */
195
+ enableRowPinning?: boolean;
196
+ /** Maximum height for the top pinned table (e.g., '200px', '20vh'). When set, enables scrolling if rows exceed this height. */
197
+ pinnedTopTableMaxHeight?: string;
198
+ /** Maximum height for the bottom pinned table (e.g., '200px', '20vh'). When set, enables scrolling if rows exceed this height. */
199
+ pinnedBottomTableMaxHeight?: string;
200
+ /** Function to determine which rows should be pinned and their position */
201
+ rowPinningFn?: RowPinningFunction;
202
+ }
203
+ /** Table configuration for row hiding */
204
+ interface MTExRowHidingConfig {
205
+ /** Enable row hiding feature */
206
+ enableRowHiding?: boolean;
207
+ /** Array of row indices to hide */
208
+ hiddenRowIndices?: number[];
209
+ /** Function to determine if a row should be hidden */
210
+ rowHidingFilterFn?: RowHidingFilterFunction;
211
+ }
212
+ /** Event emitted when row pinning changes */
213
+ interface RowPinningChangeEvent {
214
+ row: any;
215
+ position: RowPinPosition;
216
+ index?: number;
217
+ }
218
+ /** Table styling configuration */
219
+ interface MTExTableStyles {
220
+ /** Height of the table container */
221
+ tableHeight?: string;
222
+ /** Width of the table */
223
+ tableWidth?: string;
224
+ /** Height of the toolbar */
225
+ toolbarHeight?: string;
226
+ /** Custom CSS class for the table */
227
+ tableClassName?: string;
228
+ }
229
+ /** PDF export configuration */
230
+ interface MTExPDFConfig {
231
+ /** Orientation for PDF export */
232
+ pdfOrientation?: 'portrait' | 'landscape';
233
+ }
234
+
235
+ declare class MatTableExtService {
236
+ http: HttpClient;
237
+ selectedRow: BehaviorSubject<any>;
238
+ constructor(http: HttpClient);
239
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtService, never>;
240
+ static ɵprov: i0.ɵɵInjectableDeclaration<MatTableExtService>;
241
+ }
242
+
243
+ declare class MatTableExtComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
244
+ dialog: MatDialog;
245
+ service: MatTableExtService;
246
+ formBuilder: FormBuilder;
247
+ domSanitizer: DomSanitizer;
248
+ matIconRegistry: MatIconRegistry;
249
+ private cdr;
250
+ menuTrigger: MatMenuTrigger;
251
+ columnMenuTrigger: MatMenuTrigger;
252
+ paginator: MatPaginator;
253
+ sort: MatSort;
254
+ matTableRef: ElementRef;
255
+ table: MatTable<any>;
256
+ tableElement: ElementRef;
257
+ dataSource: MatTableDataSource<any>;
258
+ columns: MTExColumn[];
259
+ columnResizable: boolean;
260
+ stripedRows: boolean;
261
+ rowHover: boolean;
262
+ inlineRowEditing: boolean;
263
+ inCellEditing: boolean;
264
+ cellPopupEditing: boolean;
265
+ popupRowEditing: boolean;
266
+ enableDelete: boolean;
267
+ rowSelection: boolean;
268
+ multiRowSelection: boolean;
269
+ stickyFooter: boolean;
270
+ stickyHeader: boolean;
271
+ showFooterRow: boolean;
272
+ columnFilter: boolean;
273
+ loadingIndicator: boolean;
274
+ sorting: boolean;
275
+ showToolbar: boolean;
276
+ toolbarTitle: string;
277
+ tableHeight: string;
278
+ toolbarHeight: string;
279
+ tableWidth: string;
280
+ scrollbarH: boolean;
281
+ toolbarTemplate: TemplateRef<any> | undefined;
282
+ columnHidable: boolean;
283
+ columnPinnable: boolean;
284
+ globalSearch: boolean;
285
+ expandRows: boolean;
286
+ dndColumns: boolean;
287
+ showPaginator: boolean;
288
+ showFirstLastButtons: boolean;
289
+ exportButtonEnable: boolean;
290
+ printButtonEnable: boolean;
291
+ pageSizeOptions: number[];
292
+ toolbarTemplateRef: TemplateRef<any> | undefined;
293
+ headerTemplateRef: TemplateRef<any> | null;
294
+ cellTemplateRef: TemplateRef<any> | undefined;
295
+ expansionTemplateRef: TemplateRef<any> | undefined;
296
+ popupEditingTemplateRef: TemplateRef<any> | undefined;
297
+ inlineEditingTemplateRef: TemplateRef<any> | undefined;
298
+ cellEditingTemplateRef: TemplateRef<any> | undefined;
299
+ cellPopupEditingTemplateRef: TemplateRef<any> | undefined;
300
+ cellTemplateRefMap: CellTemplateRefMap;
301
+ tableClassName: string;
302
+ columnGroups: MTExColumnGroup[];
303
+ hiddenRowIndices: number[];
304
+ enableRowHiding: boolean;
305
+ enableRowPinning: boolean;
306
+ topPinnedMaxHeight: string;
307
+ bottomPinnedMaxHeight: string;
308
+ rowPinningFn?: (row: any, index: number) => 'top' | 'bottom' | null;
309
+ rowHidingFilterFn?: (row: any, index: number) => boolean;
310
+ pdfOrientation: 'portrait' | 'landscape';
311
+ inlineChange: EventEmitter<any>;
312
+ cellChange: EventEmitter<any>;
313
+ popupChange: EventEmitter<any>;
314
+ rowDeleted: EventEmitter<any>;
315
+ scroll: EventEmitter<any>;
316
+ selectionChanged: EventEmitter<RowSelectionChange>;
317
+ expansionChange: EventEmitter<ExpansionChange>;
318
+ rowPinningChange: EventEmitter<{
319
+ row: any;
320
+ position: 'top' | 'bottom' | null;
321
+ }>;
322
+ tableID: number;
323
+ columnPinningOptions: MTExColumnPinOption[];
324
+ exportMenuCtrl: boolean;
325
+ columnPinMenuCtrl: boolean;
326
+ hideShowMenuCtrl: boolean;
327
+ rowDataTemp: Record<string, MTExRow>;
328
+ inlineEditingTemplateRefData: any;
329
+ displayedColumns: string[];
330
+ showHideColumnsArray: MTExColumn[];
331
+ columnsList: string[];
332
+ columnsArray: MTExColumn[];
333
+ headersFiltersIds: string[];
334
+ columnsToDisplayWithExpand: string[];
335
+ selection: SelectionModel<any>;
336
+ hiddenCtrl: SelectionModel<any>;
337
+ tableData: MTExRow[];
338
+ filterValues: Record<string, string | number | boolean>;
339
+ pinnedTopRows: any[];
340
+ pinnedBottomRows: any[];
341
+ rowPinMenuPosition: {
342
+ x: string;
343
+ y: string;
344
+ };
345
+ rowPinMenuRow: any;
346
+ globalFilter: string;
347
+ showHideFilter: string;
348
+ individualFilter: string;
349
+ toggleFilters: boolean;
350
+ hideRows: boolean;
351
+ expandedElement: any | null;
352
+ currentRowIndex: number;
353
+ currentRow: MTExRow;
354
+ cellEditing: Record<string, boolean>;
355
+ private originalSizesBeforeEdit;
356
+ hideShowMenuGroup: FormGroup;
357
+ menuX: number;
358
+ menuY: number;
359
+ dynamicDisplayedColumns: any[];
360
+ inputPropertyKeys: string[];
361
+ constructor(dialog: MatDialog, service: MatTableExtService, formBuilder: FormBuilder, domSanitizer: DomSanitizer, matIconRegistry: MatIconRegistry, cdr: ChangeDetectorRef);
362
+ /**
363
+ *
364
+ * @param changes changes captured each time user changes property value.
365
+ */
366
+ /**
367
+ * Handle column pinning changes from ColumnPinningComponent
368
+ * @param updatedColumns Updated columns array with new pinning states
369
+ */
370
+ updateColumns(updatedColumns: MTExColumn[]): void;
371
+ ngOnChanges(changes: SimpleChanges): void;
372
+ ngOnInit(): void;
373
+ ngAfterViewInit(): void;
374
+ private setSorting;
375
+ /**
376
+ * @description Calculate offsets for pinned rows based on sticky headers/footers
377
+ */
378
+ private updatePinnedRowOffsets;
379
+ /**
380
+ * @description Update offsets for each individual pinned row to stack them
381
+ */
382
+ private updateStackedPinnedRowOffsets;
383
+ private onWindowResizeBound;
384
+ /**
385
+ * Copy header cell widths/heights from the top table and apply them to middle and bottom tables.
386
+ * This ensures columns line up when the middle/bottom tables don't render headers.
387
+ */
388
+ private syncColumnSizesFromTop;
389
+ /**
390
+ * Sync column sizes from the currently edited row in the middle table to top/bottom tables.
391
+ * This ensures proper alignment when a row is in edit mode with different height.
392
+ */
393
+ private syncColumnSizesFromEditedRow;
394
+ /**
395
+ * Restore original column widths and row heights from before edit mode.
396
+ */
397
+ private restoreOriginalSizes;
398
+ ngOnDestroy(): void;
399
+ /**
400
+ * @description checks and updates the the column's hide and show properties.
401
+ */
402
+ setColumnHideShow(): void;
403
+ /**
404
+ * @description set the properties of the table.
405
+ * @param changes changes captured each time user changes property value.
406
+ */
407
+ setPropertyValue(changes: SimpleChanges): void;
408
+ /**
409
+ * @description This mapping is used to set and update changesin the table.
410
+ */
411
+ setPropertiesMap: any;
412
+ /**
413
+ * @description used set data source for table.
414
+ * @param value data source value from user.
415
+ */
416
+ setTableDataSource(value: any): void;
417
+ /**
418
+ * @description used create seletion model and set selection column visibility.
419
+ * @param value boolean value to show or hide selection Column from table.
420
+ */
421
+ setRowSelection(value: boolean): void;
422
+ /**
423
+ * @description create filter header row and assigns filter predicate to table data source.
424
+ * @param value boolean value to change visibility of column filter row.
425
+ */
426
+ setColumnFilter(value: boolean): void;
427
+ /**
428
+ * @description This method returns the list of visible column names.
429
+ * @returns list of visible column names.
430
+ */
431
+ getDisplayedColumns(): string[];
432
+ /**
433
+ * @description This method returns the grouped column header definitions.
434
+ * @returns list of grouped column definitions for header row.
435
+ */
436
+ getGroupedColumns(): string[];
437
+ /**
438
+ * @description Returns filter column IDs including placeholders for action columns
439
+ * @returns Array of filter column IDs with action column placeholders
440
+ */
441
+ getFilterColumns(): string[];
442
+ /**
443
+ * @param menuType type of menu to open from toolbar.
444
+ * @param event mouse event to open menu on that location.
445
+ */
446
+ openMenu(menuType: string, event: MouseEvent): void;
447
+ /**
448
+ * @description triggers when menu is closed and reset the required controls.
449
+ */
450
+ menuClosed(): void;
451
+ /**
452
+ * @description set list of columns to display in table.
453
+ * @param columns columns array from user input.
454
+ */
455
+ setColumnsData(columns: MTExColumn[]): void;
456
+ /**
457
+ * @description set list of columns to display in table.
458
+ * @param columns columns array from user input with configurations.
459
+ */
460
+ setColumnsList(columns: MTExColumn[]): void;
461
+ /**
462
+ * @description Take boolean value and name column and update its visibility status in table.
463
+ * @param name name of the column to set visibility.
464
+ * @param value boolean value to set visibility of the column.
465
+ */
466
+ showHideColumn(name: string, value: boolean): void;
467
+ /**
468
+ * @description Toggle hide state for a specific row
469
+ * @param index The row index to hide/unhide
470
+ */
471
+ toggleRowHide(index: number): void;
472
+ /**
473
+ * @description Check if a row index is in the hidden rows list or matches the filter function.
474
+ * @param index The row index to check
475
+ * @returns True if the row is hidden
476
+ */
477
+ isRowHidden(index: number): boolean;
478
+ /**
479
+ * @description Unhide all hidden rows
480
+ */
481
+ unhideAllRows(): void;
482
+ /**
483
+ * @description Open row pin menu
484
+ * @param event Mouse event
485
+ * @param row The row to pin
486
+ */
487
+ openRowPinMenu(event: MouseEvent, row: any): void;
488
+ /**
489
+ * @description Close row pin menu
490
+ */
491
+ closeRowPinMenu(): void;
492
+ pinnedTopDataSource: MatTableDataSource<any>;
493
+ pinnedBtmDataSource: MatTableDataSource<any>;
494
+ /**
495
+ * @description Pin row to top or bottom
496
+ * @param row The row to pin
497
+ * @param position 'top' or 'bottom'
498
+ */
499
+ pinRow(row: any, position: 'top' | 'bottom'): void;
500
+ /**
501
+ * @description Unpin row from any position
502
+ * @param row The row to unpin
503
+ */
504
+ unpinRow(row: any): void;
505
+ /**
506
+ * @description Check if a row is pinned
507
+ * @param row The row to check
508
+ * @returns true if pinned
509
+ */
510
+ isRowPinned(row: any): boolean;
511
+ /**
512
+ * @description Get row pin position
513
+ * @param row The row to check
514
+ * @returns 'top', 'bottom', or null
515
+ */
516
+ getRowPinPosition(row: any): 'top' | 'bottom' | null;
517
+ /**
518
+ * @description Get rows for main data section (excluding pinned rows)
519
+ * @returns Array of non-pinned rows
520
+ */
521
+ getUnpinnedRows(): any[];
522
+ /**
523
+ * @description Get combined data source with pinned rows
524
+ */
525
+ getCombinedDataSource(): any[];
526
+ /**
527
+ * @description Check if row is pinned to top (for CSS class binding)
528
+ */
529
+ isRowPinnedTop: (row: any) => boolean;
530
+ /**
531
+ * @description Check if row is pinned to bottom (for CSS class binding)
532
+ */
533
+ isRowPinnedBottom: (row: any) => boolean;
534
+ /**
535
+ * @description Initialize pinned rows based on function
536
+ */
537
+ initializePinnedRows(): void;
538
+ /**
539
+ * @description Update data source and recalculate pinned row offsets
540
+ */
541
+ private updateDataSourceForPinning;
542
+ /**
543
+ * @description This method will position the selection column to first and also update its visibility.
544
+ * @param value value used to set visibility of the selection column.
545
+ */
546
+ updateSelectionColumnVisibility(value: boolean): void;
547
+ /**
548
+ * @description This method is used to update the position of column in columns array according to its dropped position.
549
+ * @param event CdkDragDrop used to update column position in columns array.
550
+ */
551
+ onDrop(event: CdkDragDrop<any>): void;
552
+ /**
553
+ * @description This method create filter predicate function which will set search value to table filters
554
+ * for both global and individual colum filtering.
555
+ * @returns returns boolean value to filter rows in table.
556
+ */
557
+ createFilter(): (data: any, filter: string) => boolean;
558
+ /**
559
+ * @description assigns the search value to mat table data source to apply the filter.
560
+ * @param searchValue value to be searched from table rows.
561
+ */
562
+ applyGlobalFilter(searchValue: string): void;
563
+ /**
564
+ * @description This method is used to apply column based filtering
565
+ * @param searchValue value to be searched from table rows.
566
+ * @param column filter will be applied based on this column field.
567
+ */
568
+ applyColumnFilter(searchValue: FilterSearchValue, column: MTExColumn): void;
569
+ /**
570
+ * @description This method will take row and its index enable inline editing tools on that row.
571
+ * @param row row on which user wants to do edit.
572
+ * @param index index of the row where inline editing will be enabled.
573
+ */
574
+ enableInlineEditing(row: any, index: number): void;
575
+ /**
576
+ * @description This method will create and return data to inline editing template.
577
+ * @param row row on which user wants to do edit.
578
+ * @param index index of the row where inline editing will be enabled.
579
+ * @param column current column of the table.
580
+ */
581
+ getInlineEditingData(row: MTExRow, index: number, column: MTExColumn): any;
582
+ /**
583
+ * @description This method will take data from inline editing template and update in table data source.
584
+ * @param row updated row from inline editing template.
585
+ */
586
+ updateInlineTemplateData: (row: MTExRow) => void;
587
+ /**
588
+ * @description This method set data for in-cell editing.
589
+ * @param row row on which user wants to do edit.
590
+ * @param index index of the row where inline editing will be enabled.
591
+ */
592
+ setCellData(row: MTExRow, index: number): void;
593
+ /**
594
+ * @description This will restore the data and cencel the inline editing.
595
+ * @param row row on which user wants to do edit.
596
+ * @param index index of the row where inline editing will be enabled.
597
+ */
598
+ cancelInlineEditing(row: MTExRow, index: number): void;
599
+ /**
600
+ * @description This method will save and update the inline editing data and emit the update row and index.
601
+ * @param row row on which user wants to do edit.
602
+ * @param index index of the row where inline editing will be enabled.
603
+ */
604
+ saveInlineEditing(row: MTExRow, index: number): void;
605
+ /**
606
+ * @description This method will save and update the cell editing data and emit the update row and index.
607
+ */
608
+ saveCellEditing(): void;
609
+ /**
610
+ * @description This method will delete the row from the given index and emit the deleted row and index.
611
+ * @param row row to be deleted.
612
+ * @param index index of the row to be deleted.
613
+ */
614
+ deleteRow(row: any, index: number): void;
615
+ /**
616
+ * @description This method will expand or collapse the row and emit expand event.
617
+ * @param row row to be expanded or collapsed.
618
+ * @param expand value used to expand or collapse the row.
619
+ * @param index index of the row.
620
+ */
621
+ expandRow(row: MTExRow, expand: boolean, index: number): void;
622
+ /**
623
+ * @description This method is used to set data for popup component and open editing dialog.
624
+ * @param row row which used want to edit.
625
+ */
626
+ openEditingDialog(row: MTExRow): void;
627
+ /**
628
+ * @description This method is used to open cell popup editing dialog for a single cell.
629
+ * @param row row which contains the cell to edit.
630
+ * @param column column definition of the cell to edit.
631
+ * @param rowIndex index of the row.
632
+ */
633
+ openCellPopupDialog(row: any, column: MTExColumn, rowIndex: number): void;
634
+ /**
635
+ * @description used to check whether all rows are selected.
636
+ */
637
+ isAllSelected(): boolean;
638
+ /**
639
+ * @description this method is used to toggle the all and no rows selection.
640
+ */
641
+ toggleAllRows(): void;
642
+ /**
643
+ * @description This method is used return aria-label for selection column checkboxs.
644
+ * @param row row from table.
645
+ * @returns labels for selection column checkboxs.
646
+ */
647
+ checkboxLabel(row?: any): string;
648
+ /**
649
+ * @description create form control for columns for hiding and and pinning purpose
650
+ * @param columns list of columns to be displayed
651
+ */
652
+ setToolbarMenuControls(columns: MTExColumn[]): void;
653
+ /**
654
+ * @param column current column
655
+ * @param event mouse event used to set the menu position
656
+ */
657
+ openPinnablePropertyMenu(column: MTExColumn, event: MouseEvent): void;
658
+ /**
659
+ * @description This method is used to reset menu checks when required.
660
+ */
661
+ resetMenuChecks(): void;
662
+ /**
663
+ * @description This method is used to filter columns for menus like pinning or hide show menu.
664
+ * @param value search value to filter colunms
665
+ */
666
+ filterColumns(value: string): void;
667
+ /**
668
+ * @description This method is used to open hide show column menu.
669
+ * @param columns columns array to display in hide show menu.
670
+ */
671
+ openHideShowMenu(columns: MTExColumn[]): void;
672
+ /**
673
+ * @param values columns
674
+ */
675
+ updateColumnsHideShow(values: ColumnVisibility): void;
676
+ /**
677
+ * @description This method is called when the table rows are scrolled.
678
+ * @param event scroll event
679
+ */
680
+ onScroll(event: any): void;
681
+ /**
682
+ * @param row row to be toggled
683
+ * @param index index of toggled row
684
+ */
685
+ setSelectedRows(row: any, index: number): void;
686
+ /**
687
+ * @description This method is used to display all hidden rows.
688
+ */
689
+ showHiddenRows(): void;
690
+ /**
691
+ * @description This method is used to hide all selected rows.
692
+ */
693
+ hideSelectedRows(): void;
694
+ /**
695
+ * @description This method is used to recalculate the required values for table.
696
+ */
697
+ reCal(): void;
698
+ /**
699
+ * @description This method is called in constructor method to add SVGs into icon registration.
700
+ */
701
+ addIconsToRegistry(): void;
702
+ /**
703
+ * @description This method is used to export table data.
704
+ * @param type type of file to be exported.
705
+ */
706
+ exportTable(type: string): void;
707
+ /**
708
+ * @description This method is used to print the table with proper styling.
709
+ */
710
+ printTable(): void;
711
+ exportToPDF(): Promise<void>;
712
+ /**
713
+ * @description This method is used to split name of filter row header to get index.
714
+ * @param value value to be splited for index.
715
+ * @returns Will return index of column from value.
716
+ */
717
+ returnIndex(value: string): number;
718
+ /**
719
+ * @description This method is used to manage column filtering, expanded data for exporting.
720
+ * @param ws work sheet
721
+ * @returns custom generated worksheet to be used in export.
722
+ */
723
+ writeSheetData(ws: XLSX.WorkSheet): XLSX.WorkSheet;
724
+ getMergeIndex(merges: any[]): any[];
725
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtComponent, never>;
726
+ 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>;
727
+ }
728
+
729
+ declare class ResizeColumnDirective implements OnInit, OnChanges, OnDestroy {
730
+ private readonly renderer;
731
+ private readonly elementRef;
732
+ private columnsResizable$;
733
+ set columnsResizable(val: boolean);
734
+ get columnsResizable(): boolean;
735
+ index: number;
736
+ private startX;
737
+ private startWidth;
738
+ private readonly column;
739
+ private table;
740
+ private pressed;
741
+ private resizerElement;
742
+ constructor();
743
+ ngOnInit(): void;
744
+ ngOnChanges(): void;
745
+ ngOnDestroy(): void;
746
+ private setupResizing;
747
+ private initializeResizer;
748
+ private cleanup;
749
+ private readonly onMouseDown;
750
+ private readonly onMouseMove;
751
+ private readonly onMouseUp;
752
+ /**
753
+ * @description This method is used to remove resizing handlers from the table headers when column resizing is disabled.
754
+ */
755
+ private removeDragElementFromDom;
756
+ static ɵfac: i0.ɵɵFactoryDeclaration<ResizeColumnDirective, never>;
757
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ResizeColumnDirective, "[columnsResizable]", never, { "columnsResizable": { "alias": "columnsResizable"; "required": false; }; "index": { "alias": "index"; "required": false; }; }, {}, never, never, true, never>;
758
+ }
759
+
760
+ declare class ColumnPinningComponent implements OnInit {
761
+ columns: MTExColumn[];
762
+ columnsChanged: EventEmitter<MTExColumn[]>;
763
+ icons: {
764
+ left: string;
765
+ right: string;
766
+ none: string;
767
+ };
768
+ constructor();
769
+ ngOnInit(): void;
770
+ /**
771
+ * @description This method is called when pin value changes for a column.
772
+ * @param column column of which to set the pin value
773
+ */
774
+ changeValue(column: MTExColumn): void;
775
+ /**
776
+ * @description This method is used to set the column pin value.
777
+ * @param column column of which to set the pin value
778
+ * @param value pin value to set
779
+ */
780
+ setColumnPinValue(column: MTExColumn, value: 'left' | 'right' | null): void;
781
+ static ɵfac: i0.ɵɵFactoryDeclaration<ColumnPinningComponent, never>;
782
+ static ɵcmp: i0.ɵɵComponentDeclaration<ColumnPinningComponent, "app-column-pinning", never, { "columns": { "alias": "columns"; "required": false; }; }, { "columnsChanged": "columnsChanged"; }, never, never, true, never>;
783
+ }
784
+
785
+ declare class EditingComponent implements OnInit {
786
+ dialogRef: MatDialogRef<EditingComponent>;
787
+ dialogData: any;
788
+ service: MatTableExtService;
789
+ templateRef: TemplateRef<any>;
790
+ keys: string[];
791
+ templateKeys: string[];
792
+ types: any;
793
+ templateTypes: any;
794
+ columns: MTExColumn[];
795
+ templateRow: any;
796
+ isCellEdit: boolean;
797
+ cellColumn: MTExColumn;
798
+ cellValue: any;
799
+ cellField: string;
800
+ constructor(dialogRef: MatDialogRef<EditingComponent>, dialogData: any, service: MatTableExtService);
801
+ ngOnInit(): void;
802
+ /**
803
+ * @description This method is used to set data for editing.
804
+ * @param value dialog Data
805
+ */
806
+ setData(value: any): void;
807
+ /**
808
+ * @description This method is used to set the data when data comes in from cus template.
809
+ * @param value template value
810
+ */
811
+ setTemplateRef(value: any): void;
812
+ /**
813
+ * @description This method is triggered when dialog is closed and also emits the dialog closed event data.
814
+ */
815
+ closeDialog(): void; /**
816
+ * @description This method is called when the dialog is closed custom template action.
817
+ * @param row row to be edited.
818
+ * @param keys keys of columns
819
+ * @param types column types
820
+ */
821
+ closeTemplateDialog(row: any, keys: string[], types: string[]): void;
822
+ static ɵfac: i0.ɵɵFactoryDeclaration<EditingComponent, never>;
823
+ static ɵcmp: i0.ɵɵComponentDeclaration<EditingComponent, "app-editing", never, {}, {}, never, never, true, never>;
824
+ }
825
+
826
+ declare class FilterColumnsComponentComponent implements OnInit {
827
+ obj: any;
828
+ filterOutput: EventEmitter<any>;
829
+ stringCtrl: FormControl;
830
+ numberCtrl: FormControl;
831
+ dateCtrl: FormControl;
832
+ textareaCtrl: FormControl;
833
+ booleanCtrl: FormControl;
834
+ selectionCtrl: FormControl;
835
+ constructor();
836
+ ngOnInit(): void;
837
+ /**
838
+ * @description This method is make value is valid and not null.
839
+ * @param value value to check its type.
840
+ */
841
+ checkValue(value: any): void;
842
+ /**
843
+ * @description This method will emit seach value to parent component.
844
+ * @param value value on which base table rows are filtered.
845
+ */
846
+ emitOutput(value: any): void;
847
+ static ɵfac: i0.ɵɵFactoryDeclaration<FilterColumnsComponentComponent, never>;
848
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterColumnsComponentComponent, "app-filter-columns-component", never, { "obj": { "alias": "obj"; "required": false; }; }, { "filterOutput": "filterOutput"; }, never, never, true, never>;
849
+ }
850
+
851
+ declare class MatTableExtModule {
852
+ static ɵfac: i0.ɵɵFactoryDeclaration<MatTableExtModule, never>;
853
+ 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]>;
854
+ static ɵinj: i0.ɵɵInjectorDeclaration<MatTableExtModule>;
855
+ }
856
+
857
+ export { ColumnPinningComponent, EditingComponent, FilterColumnsComponentComponent, MatTableExtComponent, MatTableExtModule, MatTableExtService, ResizeColumnDirective };
858
+ export type { CellTemplateRefMap, ColumnVisibility, DisplayColumn, ExpansionChange, FilterSearchValue, MTExCellTemplate, MTExColumn, MTExColumnGroup, MTExColumnPinOption, MTExColumnPinValue, MTExColumnSortProp, MTExColumnTag, MTExColumnTagValue, MTExColumnType, MTExColumnTypeParameter, MTExPDFConfig, MTExPinnedTableConfig, MTExRow, MTExRowHidingConfig, MTExTableStyles, RowChange, RowHidingFilterFunction, RowPinPosition, RowPinning, RowPinningChangeEvent, RowPinningFunction, RowSelectionChange, TooltipPosition, TooltipProp };