mat-table-ext 0.0.7 → 0.0.9

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 (89) hide show
  1. package/.editorconfig +16 -0
  2. package/.vscode/extensions.json +4 -0
  3. package/.vscode/launch.json +20 -0
  4. package/.vscode/tasks.json +42 -0
  5. package/LICENSE +21 -0
  6. package/angular.json +150 -0
  7. package/package.json +46 -58
  8. package/projects/mat-table-ext/.browserslistrc +16 -0
  9. package/projects/mat-table-ext/README.md +57 -0
  10. package/projects/mat-table-ext/karma.conf.js +44 -0
  11. package/projects/mat-table-ext/ng-package.json +9 -0
  12. package/projects/mat-table-ext/package.json +38 -0
  13. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.html +7 -0
  14. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.scss +9 -0
  15. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.spec.ts +23 -0
  16. package/projects/mat-table-ext/src/lib/components/column-pinning/column-pinning.component.ts +48 -0
  17. package/projects/mat-table-ext/src/lib/components/editing/editing.component.html +55 -0
  18. package/projects/mat-table-ext/src/lib/components/editing/editing.component.scss +19 -0
  19. package/projects/mat-table-ext/src/lib/components/editing/editing.component.spec.ts +23 -0
  20. package/projects/mat-table-ext/src/lib/components/editing/editing.component.ts +110 -0
  21. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.html +26 -0
  22. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.scss +0 -0
  23. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.spec.ts +23 -0
  24. package/projects/mat-table-ext/src/lib/components/filter-columns-component/filter-columns-component.component.ts +54 -0
  25. package/projects/mat-table-ext/src/lib/directives/resize-column.directive.ts +103 -0
  26. package/projects/mat-table-ext/src/lib/mat-table-ext.component.html +285 -0
  27. package/projects/mat-table-ext/src/lib/mat-table-ext.component.spec.ts +25 -0
  28. package/projects/mat-table-ext/src/lib/mat-table-ext.component.ts +985 -0
  29. package/projects/mat-table-ext/src/lib/mat-table-ext.module.ts +127 -0
  30. package/projects/mat-table-ext/src/lib/mat-table-ext.scss +181 -0
  31. package/projects/mat-table-ext/src/lib/mat-table-ext.service.spec.ts +16 -0
  32. package/projects/mat-table-ext/src/lib/mat-table-ext.service.ts +12 -0
  33. package/projects/mat-table-ext/src/lib/models/tableExtModels.ts +85 -0
  34. package/{public-api.d.ts → projects/mat-table-ext/src/public-api.ts} +5 -1
  35. package/projects/mat-table-ext/src/test.ts +27 -0
  36. package/projects/mat-table-ext/tsconfig.lib.json +15 -0
  37. package/projects/mat-table-ext/tsconfig.lib.prod.json +10 -0
  38. package/projects/mat-table-ext/tsconfig.spec.json +17 -0
  39. package/projects/mat-table-ext-example/.browserslistrc +16 -0
  40. package/projects/mat-table-ext-example/karma.conf.js +44 -0
  41. package/projects/mat-table-ext-example/src/app/app.component.html +576 -0
  42. package/projects/mat-table-ext-example/src/app/app.component.scss +0 -0
  43. package/projects/mat-table-ext-example/src/app/app.component.spec.ts +31 -0
  44. package/projects/mat-table-ext-example/src/app/app.component.ts +173 -0
  45. package/projects/mat-table-ext-example/src/app/app.module.ts +40 -0
  46. package/projects/mat-table-ext-example/src/app/service/custom-table.service.spec.ts +16 -0
  47. package/projects/mat-table-ext-example/src/app/service/custom-table.service.ts +18 -0
  48. package/projects/mat-table-ext-example/src/assets/.gitkeep +0 -0
  49. package/projects/mat-table-ext-example/src/assets/data.json +100003 -0
  50. package/projects/mat-table-ext-example/src/environments/environment.prod.ts +3 -0
  51. package/projects/mat-table-ext-example/src/environments/environment.ts +16 -0
  52. package/projects/mat-table-ext-example/src/favicon.ico +0 -0
  53. package/projects/mat-table-ext-example/src/index.html +14 -0
  54. package/projects/mat-table-ext-example/src/main.ts +12 -0
  55. package/projects/mat-table-ext-example/src/polyfills.ts +53 -0
  56. package/projects/mat-table-ext-example/src/styles.scss +23 -0
  57. package/projects/mat-table-ext-example/src/test.ts +26 -0
  58. package/projects/mat-table-ext-example/tsconfig.app.json +15 -0
  59. package/projects/mat-table-ext-example/tsconfig.spec.json +18 -0
  60. package/tsconfig.json +38 -0
  61. package/esm2020/lib/components/column-pinning/column-pinning.component.mjs +0 -58
  62. package/esm2020/lib/components/editing/editing.component.mjs +0 -122
  63. package/esm2020/lib/components/filter-columns-component/filter-columns-component.component.mjs +0 -68
  64. package/esm2020/lib/directives/resize-column.directive.mjs +0 -99
  65. package/esm2020/lib/mat-table-ext.component.mjs +0 -1021
  66. package/esm2020/lib/mat-table-ext.module.mjs +0 -237
  67. package/esm2020/lib/mat-table-ext.service.mjs +0 -20
  68. package/esm2020/lib/models/tableExtModels.mjs +0 -2
  69. package/esm2020/mat-table-ext.mjs +0 -5
  70. package/esm2020/public-api.mjs +0 -11
  71. package/fesm2015/mat-table-ext.mjs +0 -1585
  72. package/fesm2015/mat-table-ext.mjs.map +0 -1
  73. package/fesm2020/mat-table-ext.mjs +0 -1582
  74. package/fesm2020/mat-table-ext.mjs.map +0 -1
  75. package/index.d.ts +0 -5
  76. package/lib/components/column-pinning/column-pinning.component.d.ts +0 -27
  77. package/lib/components/editing/editing.component.d.ts +0 -42
  78. package/lib/components/filter-columns-component/filter-columns-component.component.d.ts +0 -26
  79. package/lib/directives/resize-column.directive.d.ts +0 -27
  80. package/lib/mat-table-ext.component.d.ts +0 -348
  81. package/lib/mat-table-ext.module.d.ts +0 -58
  82. package/lib/mat-table-ext.service.d.ts +0 -11
  83. package/lib/models/tableExtModels.d.ts +0 -76
  84. /package/{assets → projects/mat-table-ext/assets}/_theming.scss +0 -0
  85. /package/{assets → projects/mat-table-ext/assets}/pinIcon.svg +0 -0
  86. /package/{assets → projects/mat-table-ext/assets}/pinLeft.svg +0 -0
  87. /package/{assets → projects/mat-table-ext/assets}/pinNone.svg +0 -0
  88. /package/{assets → projects/mat-table-ext/assets}/pinRight.svg +0 -0
  89. /package/{assets → projects/mat-table-ext/assets}/pinned.svg +0 -0
@@ -0,0 +1,285 @@
1
+ <div [style.width]="tableWidth">
2
+ <mat-form-field class="global-search-field" appearance="fill" *ngIf="globalSearch">
3
+ <mat-label>Search</mat-label>
4
+ <input matInput [ngModel]="globalFilter" (ngModelChange)="applyGlobalFilter($event)" placeholder="Ex. Mia" #input>
5
+ </mat-form-field>
6
+ <mat-toolbar class="toolbar-container" *ngIf="showToolbar" [style.height]="toolbarHeight?toolbarHeight:'50px'">
7
+ <span class="toolbar-title" *ngIf="toolbarTitle">{{toolbarTitle}}</span>
8
+ <ng-container *ngIf="toolbarTemplateRef" [ngTemplateOutlet]="toolbarTemplateRef"></ng-container>
9
+ <span class="example-spacer"></span>
10
+ <ng-container *ngIf="rowSelection || multiRowSelection">
11
+ <button class="hide-button" mat-stroked-button color="primary" (click)="hideSelectedRows()">
12
+ Hide Rows
13
+ </button>
14
+ <button class="hide-button" mat-stroked-button color="primary" (click)="showHiddenRows()">
15
+ Show All Rows
16
+ </button>
17
+ </ng-container>
18
+ <button *ngIf="columnHidable" class="hide-button" mat-stroked-button color="primary"
19
+ (click)="openMenu('hideShow',$event)" matTooltip="Column Visibility" matTooltipPosition="above">
20
+ <mat-icon>visibility</mat-icon>
21
+ </button>
22
+ <button *ngIf="columnPinnable" class="pin-button" mat-stroked-button color="primary"
23
+ (click)="openMenu('columnPin',$event)" matTooltip="Column Pinning">
24
+ <mat-icon svgIcon="pinIcon"></mat-icon>
25
+ </button>
26
+ <button *ngIf="exportButtonEnable" class="export-button" mat-stroked-button color="primary"
27
+ (click)="openMenu('export',$event)" matTooltip="Table Data Export">
28
+ <mat-icon>import_export</mat-icon> <span>Export</span>
29
+ <mat-icon>expand_more</mat-icon>
30
+ </button>
31
+ <div style="visibility: hidden; position:fixed" [matMenuTriggerFor]="menu" [style.left.px]="menuX"
32
+ [style.top.px]="menuY"></div>
33
+ </mat-toolbar>
34
+ <mat-menu #menu="matMenu" (closed)="menuClosed()" id="exportMenu">
35
+ <ng-container *ngIf="exportMenuCtrl">
36
+ <mat-option (click)="exportTable('xlsx')">Export to Excel</mat-option>
37
+ <mat-option (click)="exportTable('csv')">Export to CSV</mat-option>
38
+ </ng-container>
39
+ </mat-menu>
40
+ <div style="visibility: hidden; position:fixed" #columnMenuTrigger="matMenuTrigger" [matMenuTriggerFor]="columnMenu"
41
+ [style.left.px]="menuX" [style.top.px]="menuY">
42
+ </div>
43
+ <mat-menu #columnMenu="matMenu" (closed)="resetMenuChecks()">
44
+ <div class="toolbar-menu-container" *ngIf="hideShowMenuCtrl" [formGroup]="hideShowMenuGroup"
45
+ (click)="$event.stopPropagation()">
46
+ <h4 class="column-headers">Visible Columns</h4>
47
+ <mat-form-field appearance="fill" style="width: -webkit-fill-available;">
48
+ <mat-label>Filter Columns</mat-label>
49
+ <input matInput [(ngModel)]="showHideFilter" (ngModelChange)="filterColumns($event)"
50
+ [ngModelOptions]="{standalone: true}">
51
+ </mat-form-field>
52
+ <div class="showHide-menu-columns-list">
53
+ <div class="toolbar-menu-item" *ngFor="let column of showHideColumnsArray">
54
+ <mat-checkbox color="primary" class="toolbar-menu-checkbox" style="width: max-content;"
55
+ [formControlName]="column.field" (change)="setColumnHideShow()">{{column.header}}</mat-checkbox>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <div class="toolbar-menu-container" *ngIf="columnPinMenuCtrl" (click)="$event.stopPropagation()">
60
+ <h4 class="column-headers">Pin Columns</h4>
61
+ <form class="example-form">
62
+ <mat-form-field appearance="fill" style="width: -webkit-fill-available;">
63
+ <mat-label>Filter Columns</mat-label>
64
+ <input matInput [(ngModel)]="showHideFilter" (ngModelChange)="filterColumns($event)"
65
+ [ngModelOptions]="{standalone: true}">
66
+ </mat-form-field>
67
+ </form>
68
+ <div class="showHide-menu-columns-list">
69
+ <app-column-pinning [columns]="showHideColumnsArray"></app-column-pinning>
70
+ </div>
71
+ </div>
72
+ </mat-menu>
73
+
74
+ <mat-progress-bar *ngIf="loadingIndicator" mode="indeterminate"></mat-progress-bar>
75
+ <section id="tableContainer" class="mat-table-ext-container" (scroll)="onScroll($event)"
76
+ [style.height]="tableHeight ? tableHeight :'max-content'">
77
+ <table mat-table [id]="'matTableExt'+tableID" [dataSource]="dataSource" matSort cdkDropList
78
+ cdkDropListOrientation="horizontal" multiTemplateDataRows (cdkDropListDropped)="onDrop($event)"
79
+ (click)="saveCellEditing()" [style.width]="scrollbarH?'max-content':'100%'">
80
+ <!-- Row selection column -->
81
+ <ng-container matColumnDef="select">
82
+ <th mat-header-cell *matHeaderCellDef cdkDragLockAxis="x" cdkDrag [cdkDragDisabled]="!dndColumns">
83
+ <mat-checkbox (change)="$event ? toggleAllRows() : null"
84
+ [checked]="selection.hasValue() && isAllSelected()"
85
+ [indeterminate]="selection.hasValue() && !isAllSelected()" [aria-label]="checkboxLabel()">
86
+ </mat-checkbox>
87
+ </th>
88
+ <td mat-cell *matCellDef="let row;let i = dataIndex">
89
+ <mat-checkbox (click)="$event.stopPropagation()" (change)="$event ? setSelectedRows(row,i) : null"
90
+ [checked]="selection.isSelected(row)" [aria-label]="checkboxLabel(row)">
91
+ </mat-checkbox>
92
+ </td>
93
+ <ng-container *ngIf="showFooterRow">
94
+ <td mat-footer-cell *matFooterCellDef></td>
95
+ </ng-container>
96
+ </ng-container>
97
+ <!--dynamic columns are being generated here-->
98
+ <div matColumnDef="{{column['field']}}" [sticky]="column.pinned == 'left' ? true:false"
99
+ [stickyEnd]="column.pinned == 'right' ? true:false" *ngFor="let column of columnsArray; let i = index">
100
+ <th mat-header-cell *matHeaderCellDef [style.width]="column.width" [style.maxWidth]="column.maxWidth"
101
+ [style.minWidth]="column.minWidth" cdkDragLockAxis="x" cdkDrag [cdkDragDisabled]="!dndColumns"
102
+ [columnsResizable]="columnResizable" [index]="i">
103
+ <span *ngIf="!headerTemplateRef" matTooltip="{{column.headerTooltip?.value}}"
104
+ [matTooltipPosition]="column?.headerTooltip?.tooltipPosition!" mat-sort-header
105
+ [disabled]="!sorting || column.disabled === true">{{column.header}}</span>
106
+ <ng-container *ngIf="headerTemplateRef" [ngTemplateOutlet]="headerTemplateRef"
107
+ [ngTemplateOutletContext]="{data:column}"></ng-container>
108
+ <ng-container *ngIf="column.headerTemplate" [ngTemplateOutlet]="column.headerTemplate"
109
+ [ngTemplateOutletContext]="{data:column}"></ng-container>
110
+ </th>
111
+ <td mat-cell *matCellDef="let row ;let i=dataIndex">
112
+ <div *ngIf="!row.editable && !cellEditing[i +'_'+column.field]"
113
+ (dblclick)="cellEditing[i +'_'+column.field] = inCellEditing;setCellData(row,i)"
114
+ matTooltip="{{column.cellTooltip?.value}}"
115
+ [matTooltipPosition]="column?.cellTooltip?.tooltipPosition!">
116
+ <span
117
+ *ngIf="!cellTemplateRef && !column?.cellTemplate && !cellTemplateRefMap[column.field]">{{row[column.field]}}</span>
118
+ <ng-container *ngIf="cellTemplateRefMap[column.field]"
119
+ [ngTemplateOutlet]="cellTemplateRefMap[column.field]"
120
+ [ngTemplateOutletContext]="{row:row,column:column,index:i}">
121
+ </ng-container>
122
+ <ng-container
123
+ *ngIf="cellTemplateRef && column.cellTemplate && !cellTemplateRefMap[column.field]"
124
+ [ngTemplateOutlet]="column.cellTemplate"
125
+ [ngTemplateOutletContext]="{row:row,column:column,index:i}">
126
+ </ng-container>
127
+ <ng-container
128
+ *ngIf="!cellTemplateRef && column.cellTemplate && !cellTemplateRefMap[column.field]"
129
+ [ngTemplateOutlet]="column.cellTemplate"
130
+ [ngTemplateOutletContext]="{row:row,column:column,index:i}">
131
+ </ng-container>
132
+ <ng-container
133
+ *ngIf="cellTemplateRef && !column.cellTemplate && !cellTemplateRefMap[column.field]"
134
+ [ngTemplateOutlet]="cellTemplateRef"
135
+ [ngTemplateOutletContext]="{row:row,column:column,index:i}">
136
+ </ng-container>
137
+ </div>
138
+ <div *ngIf="row.editable || cellEditing[i +'_'+column.field]" (click)="$event.stopPropagation()">
139
+ <ng-container *ngIf="inlineEditingTemplateRef && !cellEditing[i +'_'+column.field]"
140
+ [ngTemplateOutlet]="inlineEditingTemplateRef"
141
+ [ngTemplateOutletContext]="{data:getInlineEditingData(row,i,column)}"></ng-container>
142
+ <ng-container *ngIf="cellEditingTemplateRef && !(row.editable)"
143
+ [ngTemplateOutlet]="cellEditingTemplateRef"
144
+ [ngTemplateOutletContext]="{data:getInlineEditingData(row,i,column)}"></ng-container>
145
+ <ng-container *ngIf="!inlineEditingTemplateRef && (row.editable) && rowDataTemp['e'+i]">
146
+ <mat-form-field *ngIf="column.type == 'number'" appearance="outline"
147
+ class="inline-editing-field">
148
+ <input matInput type="number" [(ngModel)]="rowDataTemp['e'+i][column.field]"
149
+ [ngModelOptions]="{standalone: true}">
150
+ </mat-form-field>
151
+ <mat-form-field style="width: 100%;" *ngIf="column.type == 'string'" appearance="outline"
152
+ class="inline-editing-field">
153
+ <input matInput type="text" [(ngModel)]="rowDataTemp['e'+i][column.field]"
154
+ [ngModelOptions]="{standalone: true}">
155
+ </mat-form-field>
156
+ <mat-form-field *ngIf="column.type == 'date'" appearance="outline"
157
+ class="inline-editing-field">
158
+ <input matInput type="date" [(ngModel)]="rowDataTemp['e'+i][column.field]"
159
+ [ngModelOptions]="{standalone: true}">
160
+ </mat-form-field>
161
+ <mat-form-field *ngIf="column.type == 'selection'" appearance="outline"
162
+ class="inline-editing-field">
163
+ <mat-select [value]="rowDataTemp['e'+i][column.field]"
164
+ [(ngModel)]="rowDataTemp['e'+i][column.field]">
165
+ <mat-option *ngFor="let option of column.options" [value]="option">
166
+ {{option}}
167
+ </mat-option>
168
+ </mat-select>
169
+ </mat-form-field>
170
+ <mat-checkbox (click)="$event.stopPropagation()" *ngIf="column.type == 'boolean'"
171
+ color="primary" [(ngModel)]="row[column.field]"></mat-checkbox>
172
+ </ng-container>
173
+ <ng-container *ngIf="!cellEditingTemplateRef && cellEditing[i +'_'+column.field]">
174
+ <mat-form-field *ngIf="column.type == 'number'" appearance="outline"
175
+ class="inline-editing-field">
176
+ <input matInput type="number" [(ngModel)]="rowDataTemp['e'+i][column.field]"
177
+ [ngModelOptions]="{standalone: true}">
178
+ </mat-form-field>
179
+ <mat-form-field *ngIf="column.type == 'string'" appearance="outline"
180
+ class="inline-editing-field">
181
+ <input matInput type="text" [(ngModel)]="rowDataTemp['e'+i][column.field]"
182
+ [ngModelOptions]="{standalone: true}">
183
+ </mat-form-field>
184
+ <mat-form-field *ngIf="column.type == 'date'" appearance="outline"
185
+ class="inline-editing-field">
186
+ <input matInput type="date" [(ngModel)]="rowDataTemp['e'+i][column.field]"
187
+ [ngModelOptions]="{standalone: true}">
188
+ </mat-form-field>
189
+ <mat-form-field *ngIf="column.type == 'selection'" appearance="outline"
190
+ class="inline-editing-field">
191
+ <mat-select [value]="rowDataTemp['e'+i][column.field]"
192
+ [(ngModel)]="rowDataTemp['e'+i][column.field]">
193
+ <mat-option *ngFor="let option of column.options" [value]="option">
194
+ {{option}}
195
+ </mat-option>
196
+ </mat-select>
197
+ </mat-form-field>
198
+ <mat-checkbox (click)="$event.stopPropagation()" *ngIf="column.type == 'boolean'"
199
+ color="primary" [(ngModel)]="row[column.field]"></mat-checkbox>
200
+ </ng-container>
201
+ </div>
202
+ </td>
203
+ <ng-container *ngIf="showFooterRow">
204
+ <td mat-footer-cell *matFooterCellDef> {{column.footerText}} </td>
205
+ </ng-container>
206
+ </div>
207
+ <ng-container matColumnDef="edit" stickyEnd="false">
208
+ <th mat-header-cell cdkDragLockAxis="x" cdkDrag [cdkDragDisabled]="true" *matHeaderCellDef
209
+ class="action-column-cells"> Edit </th>
210
+ <td mat-cell *matCellDef="let row; let i = dataIndex" class="inline-edit-column-cell">
211
+ <mat-icon class="edit-column-icons" *ngIf="!row.editable && !row.editmodal" aria-hidden="false"
212
+ (click)="enableInlineEditing(row,i)" fontIcon="edit_note">
213
+ </mat-icon>
214
+ <div class="inline-editing-controls" *ngIf="row.editable && !row.editmodal">
215
+ <mat-icon class="edit-column-icons" aria-hidden="false" (click)="saveInlineEditing(row,i)"
216
+ fontIcon="done"></mat-icon>
217
+ <mat-icon class="edit-column-icons" aria-hidden="false" (click)="cancelInlineEditing(row,i)"
218
+ fontIcon="close"></mat-icon>
219
+ </div>
220
+ </td>
221
+ <td mat-footer-cell *matFooterCellDef> edit </td>
222
+ </ng-container>
223
+ <ng-container matColumnDef="popup" stickyEnd="false">
224
+ <th mat-header-cell cdkDragLockAxis="x" cdkDrag [cdkDragDisabled]="true" *matHeaderCellDef
225
+ class="action-column-cells"> Popup
226
+ </th>
227
+ <td mat-cell *matCellDef="let row; let i = index">
228
+ <mat-icon aria-hidden="false" (click)="openEditingDialog(row)" fontIcon="edit">
229
+ </mat-icon>
230
+ </td>
231
+ <td mat-footer-cell *matFooterCellDef></td>
232
+ </ng-container>
233
+
234
+ <ng-container matColumnDef="delete">
235
+ <th mat-header-cell cdkDragLockAxis="x" cdkDrag [cdkDragDisabled]="true" *matHeaderCellDef
236
+ class="action-column-cells"> Delete
237
+ </th>
238
+ <td mat-cell *matCellDef="let row;let i=dataIndex">
239
+ <mat-icon (click)="deleteRow(row,i)" aria-hidden="false" aria-label="Example home icon"
240
+ fontIcon="delete">
241
+ </mat-icon>
242
+ </td>
243
+ <td mat-footer-cell *matFooterCellDef></td>
244
+ </ng-container>
245
+ <!-- Expanded Content Column - The detail row is made up of this one column that spans across all columns -->
246
+ <ng-container *ngIf="expandRows" matColumnDef="expandedDetail">
247
+ <td mat-cell *matCellDef="let element;let i=dataIndex "
248
+ [attr.colspan]="columnsToDisplayWithExpand.length">
249
+ <div class="example-element-detail"
250
+ [@detailExpand]="element == expandedElement ? 'expanded' : 'collapsed'">
251
+ <ng-container *ngIf="expansionTemplateRef" [ngTemplateOutlet]="expansionTemplateRef"
252
+ [ngTemplateOutletContext]="{$explicit:element,row:element,index:i}">
253
+ </ng-container>
254
+ </div>
255
+ </td>
256
+ </ng-container>
257
+ <ng-container *ngFor="let ids of headersFiltersIds; let i=index" [matColumnDef]="ids">
258
+ <th mat-header-cell *matHeaderCellDef>
259
+ <div class="filters-container" [class.animate]="toggleFilters">
260
+ <app-filter-columns-component [obj]="columnsArray[returnIndex(ids)]"
261
+ (filterOutput)="applyColumnFilter($event,columnsArray[returnIndex(ids)])"></app-filter-columns-component>
262
+ </div>
263
+ </th>
264
+ </ng-container>
265
+ <tr mat-header-row *matHeaderRowDef=" getDisplayedColumns(); sticky: stickyHeader"></tr>
266
+ <tr mat-row *matRowDef="let row; columns:getDisplayedColumns(); let i=dataIndex;" class="data-row"
267
+ [ngClass]="{'data-row':expandRows,'stripedRows':(stripedRows && i % 2 == 1),'hoverClass':rowHover, 'hidden':hiddenCtrl.isSelected(row) && hideRows,'example-expanded-row':expandedElement === row}"
268
+ (click)="expandRow(row, row !== expandedElement,i)">
269
+ </tr>
270
+ <tr style="height: 0px;" mat-header-row class="no-default-height" *matHeaderRowDef="headersFiltersIds">
271
+ </tr>
272
+ <ng-container *ngIf="expandRows">
273
+ <tr style="height: 0px;" mat-row *matRowDef="let row; columns: ['expandedDetail']"
274
+ [ngClass]="{'example-detail-row': (expandRows && row === expandedElement),'expand-row':row !== expandedElement}">
275
+ </tr>
276
+ </ng-container>
277
+ <ng-container *ngIf="showFooterRow">
278
+ <tr mat-footer-row *matFooterRowDef="getDisplayedColumns(); sticky: stickyFooter"></tr>
279
+ </ng-container>
280
+ </table>
281
+ </section>
282
+ <mat-paginator *ngIf="showPaginator" [pageSizeOptions]="pageSizeOptions"
283
+ [showFirstLastButtons]="showFirstLastButtons">
284
+ </mat-paginator>
285
+ </div>
@@ -0,0 +1,25 @@
1
+ import { ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { MatTableExtComponent } from './mat-table-ext.component';
4
+
5
+ describe('MatTableExtComponent', () => {
6
+ let component: MatTableExtComponent;
7
+ let fixture: ComponentFixture<MatTableExtComponent>;
8
+
9
+ beforeEach(async () => {
10
+ await TestBed.configureTestingModule({
11
+ declarations: [ MatTableExtComponent ]
12
+ })
13
+ .compileComponents();
14
+ });
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(MatTableExtComponent);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });