ngx-aur-mat-table 0.0.2 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
3
- typeof define === 'function' && define.amd ? define('ngx-aur-mat-table', ['exports', '@angular/core'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-aur-mat-table"] = {}, global.ng.core));
5
- })(this, (function (exports, i0) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/sort'), require('@angular/material/table'), require('@angular/material/paginator'), require('@angular/cdk/collections'), require('@angular/material/form-field'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/icon'), require('@angular/common'), require('@angular/material/input'), require('@angular/material/tooltip'), require('@angular/platform-browser/animations'), require('@angular/platform-browser')) :
3
+ typeof define === 'function' && define.amd ? define('ngx-aur-mat-table', ['exports', '@angular/core', '@angular/material/sort', '@angular/material/table', '@angular/material/paginator', '@angular/cdk/collections', '@angular/material/form-field', '@angular/material/checkbox', '@angular/material/button', '@angular/material/icon', '@angular/common', '@angular/material/input', '@angular/material/tooltip', '@angular/platform-browser/animations', '@angular/platform-browser'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-aur-mat-table"] = {}, global.ng.core, global.ng.material.sort, global.ng.material.table, global.ng.material.paginator, global.ng.cdk.collections, global.ng.material.formField, global.ng.material.checkbox, global.ng.material.button, global.ng.material.icon, global.ng.common, global.ng.material.input, global.ng.material.tooltip, global.ng.platformBrowser.animations, global.ng.platformBrowser));
5
+ })(this, (function (exports, i0, i6, i2, i7, collections, i1, i3, i4, i5, i8, i9, i10, animations, platformBrowser) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,38 +23,207 @@
23
23
  }
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
+ var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
+ var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
+ var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
29
+ var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
+ var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
31
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
32
+ var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
33
+ var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
34
+ var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
35
+ var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
26
36
 
27
- var NgxAurMatTableService = /** @class */ (function () {
28
- function NgxAurMatTableService() {
37
+ var SelectionProvider = /** @class */ (function () {
38
+ function SelectionProvider(ctx, columns, tableDataSource) {
39
+ this.COLUMN_NAME = 'tbl_selects';
40
+ this.context = ctx;
41
+ this.selection = new collections.SelectionModel(ctx.multiple, []);
42
+ this.tableDataSource = tableDataSource;
43
+ this.initCheckboxColumn(columns);
29
44
  }
30
- return NgxAurMatTableService;
45
+ SelectionProvider.prototype.initCheckboxColumn = function (columns) {
46
+ if (this.context.position === 'start') {
47
+ columns.unshift(this.COLUMN_NAME);
48
+ }
49
+ else {
50
+ columns.push(this.COLUMN_NAME);
51
+ }
52
+ };
53
+ SelectionProvider.prototype.bind = function (selected, onSelect, onDeselect) {
54
+ var _this = this;
55
+ this.selection.changed
56
+ .subscribe(function (event) {
57
+ if (event.added) {
58
+ onSelect.emit(event.added);
59
+ }
60
+ if (event.removed) {
61
+ onDeselect.emit(event.removed);
62
+ }
63
+ selected.emit(_this.selection.selected);
64
+ });
65
+ };
66
+ SelectionProvider.prototype.masterToggle = function () {
67
+ var _this = this;
68
+ this.isAllSelected() ?
69
+ this.selection.clear() :
70
+ this.tableDataSource.data.forEach(function (row) { return _this.selection.select(row); });
71
+ };
72
+ SelectionProvider.prototype.isAllSelected = function () {
73
+ var numSelected = this.selection.selected.length;
74
+ var numRows = this.tableDataSource.data.length;
75
+ return numSelected === numRows;
76
+ };
77
+ return SelectionProvider;
78
+ }());
79
+
80
+ var RowActionProvider = /** @class */ (function () {
81
+ function RowActionProvider(ctx, columns) {
82
+ this.COLUMN_NAME = 'tbl_actions';
83
+ this.context = ctx;
84
+ if (ctx.position === 'start') {
85
+ columns.unshift(this.COLUMN_NAME);
86
+ }
87
+ else {
88
+ columns.push(this.COLUMN_NAME);
89
+ }
90
+ }
91
+ return RowActionProvider;
92
+ }());
93
+
94
+ var DataPropertyGetterPipe = /** @class */ (function () {
95
+ function DataPropertyGetterPipe() {
96
+ }
97
+ DataPropertyGetterPipe.prototype.transform = function (object, keyName) {
98
+ var args = [];
99
+ for (var _i = 2; _i < arguments.length; _i++) {
100
+ args[_i - 2] = arguments[_i];
101
+ }
102
+ return object[keyName];
103
+ };
104
+ return DataPropertyGetterPipe;
31
105
  }());
32
- NgxAurMatTableService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
33
- NgxAurMatTableServiceprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableService, providedIn: 'root' });
34
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableService, decorators: [{
35
- type: i0.Injectable,
106
+ DataPropertyGetterPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
107
+ DataPropertyGetterPipepipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, name: "dataPropertyGetter" });
108
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, decorators: [{
109
+ type: i0.Pipe,
36
110
  args: [{
37
- providedIn: 'root'
111
+ name: 'dataPropertyGetter'
38
112
  }]
39
- }], ctorParameters: function () { return []; } });
113
+ }] });
40
114
 
41
115
  var NgxAurMatTableComponent = /** @class */ (function () {
42
116
  function NgxAurMatTableComponent() {
117
+ this.tableDataSource = new i2.MatTableDataSource([]);
118
+ this.displayedColumns = [];
119
+ this.isPageable = false;
120
+ this.isSortable = false;
121
+ this.isFilterable = false;
122
+ this.tableColumns = [];
123
+ this.paginationSizes = [5, 10, 15];
124
+ this.defaultPageSize = this.paginationSizes[1];
125
+ this.sort = new i0.EventEmitter();
126
+ this.onRowAction = new i0.EventEmitter();
127
+ this.selected = new i0.EventEmitter();
128
+ this.onSelect = new i0.EventEmitter();
129
+ this.onDeselect = new i0.EventEmitter();
130
+ this.onRowClick = new i0.EventEmitter();
43
131
  }
132
+ Object.defineProperty(NgxAurMatTableComponent.prototype, "tableData", {
133
+ // this property needs to have a setter, to dynamically get changes from parent component
134
+ set: function (data) {
135
+ this.setTableDataSource(data);
136
+ },
137
+ enumerable: false,
138
+ configurable: true
139
+ });
44
140
  NgxAurMatTableComponent.prototype.ngOnInit = function () {
141
+ this.displayedColumns = this.tableColumns.map(function (tableColumn) { return tableColumn.name; });
142
+ if (this.rowActionable) {
143
+ this.rowActionsProvider = new RowActionProvider(this.rowActionable, this.displayedColumns);
144
+ }
145
+ else if (this.selectable) {
146
+ this.selectionProvider = new SelectionProvider(this.selectable, this.displayedColumns, this.tableDataSource);
147
+ this.selectionProvider.bind(this.selected, this.onSelect, this.onDeselect);
148
+ }
149
+ };
150
+ // we need this, in order to make pagination work with *ngIf
151
+ NgxAurMatTableComponent.prototype.ngAfterViewInit = function () {
152
+ this.tableDataSource.paginator = this.matPaginator;
153
+ };
154
+ NgxAurMatTableComponent.prototype.setTableDataSource = function (data) {
155
+ this.tableDataSource = new i2.MatTableDataSource(data);
156
+ this.tableDataSource.paginator = this.matPaginator;
157
+ this.tableDataSource.sort = this.matSort;
158
+ };
159
+ NgxAurMatTableComponent.prototype.applyFilter = function (event) {
160
+ var filterValue = event.target.value;
161
+ this.tableDataSource.filter = filterValue.trim().toLowerCase();
162
+ };
163
+ NgxAurMatTableComponent.prototype.sortTable = function (sortParameters) {
164
+ // defining name of data property, to sort by, instead of column name
165
+ // @ts-ignore
166
+ sortParameters.active = this.tableColumns.find(function (column) { return column.name === sortParameters.active; }).dataKey;
167
+ this.sort.emit(sortParameters);
168
+ };
169
+ NgxAurMatTableComponent.prototype.emitRowAction = function (action, row, $event) {
170
+ $event.stopPropagation();
171
+ this.onRowAction.emit({ action: action, value: row });
172
+ };
173
+ NgxAurMatTableComponent.prototype.masterToggle = function () {
174
+ this.selectionProvider.masterToggle();
175
+ };
176
+ NgxAurMatTableComponent.prototype.isAllSelected = function () {
177
+ return this.selectionProvider.isAllSelected();
45
178
  };
46
179
  return NgxAurMatTableComponent;
47
180
  }());
48
181
  NgxAurMatTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
49
- NgxAurMatTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NgxAurMatTableComponent, selector: "aur-mat-table", ngImport: i0__namespace, template: "\n <p>\n ngx-aur-mat-table works!\n </p>\n ", isInline: true });
182
+ NgxAurMatTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NgxAurMatTableComponent, selector: "aur-mat-table", inputs: { isPageable: "isPageable", isSortable: "isSortable", isFilterable: "isFilterable", tableColumns: "tableColumns", paginationSizes: "paginationSizes", defaultPageSize: "defaultPageSize", rowActionable: "rowActionable", selectable: "selectable", tableData: "tableData" }, outputs: { sort: "sort", onRowAction: "onRowAction", selected: "selected", onSelect: "onSelect", onDeselect: "onDeselect", onRowClick: "onRowClick" }, viewQueries: [{ propertyName: "matPaginator", first: true, predicate: i7.MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: i6.MatSort, descendants: true, static: true }], ngImport: i0__namespace, template: "<ng-container>\r\n\r\n <!-- Filter -->\r\n <ng-container *ngIf=\"isFilterable\">\r\n <mat-form-field>\r\n <mat-label>Filter</mat-label>\r\n <input matInput (keyup)=\"applyFilter($event)\" placeholder=\"filter\">\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <!-- Table -->\r\n <table mat-table [dataSource]=\"tableDataSource\" matSort (matSortChange)=\"sortTable($event)\">\r\n\r\n <!-- selection-column-->\r\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selectionProvider.selection.toggle(row) : null\"\r\n [checked]=\"selectionProvider.selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- action column -->\r\n <ng-container *ngIf=\"rowActionsProvider\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button\r\n (click)=\"emitRowAction(action.action, element, $event)\"\r\n [matTooltip]=\"action.tooltip? action.tooltip: ''\"\r\n *ngFor=\"let action of rowActionable.actions\">\r\n <mat-icon [style.color]=\"action.color\">\r\n {{action.icon}}\r\n </mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\r\n\r\n <!-- if sortable column header -->\r\n <ng-container *ngIf=\"tableColumn.isSortable; else notSortable\">\r\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"tableColumn.name\"\r\n [arrowPosition]=\"tableColumn.position === 'right' ? 'before' : 'after'\">\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <!-- else not sortable -->\r\n <ng-template #notSortable>\r\n <th mat-header-cell *matHeaderCellDef\r\n [class.text-right]=\"tableColumn.position == 'right'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-template>\r\n\r\n <!-- header value-->\r\n <ng-template #headerValue>\r\n <mat-icon *ngIf=\"tableColumn.headerIcon\"\r\n [matTooltip]=\"tableColumn.headerTooltip? tableColumn.headerTooltip: ''\"\r\n [style.color]=\"tableColumn.headerIconColor\">{{tableColumn.headerIcon}}</mat-icon>\r\n <span *ngIf=\"!tableColumn.headerIcon || tableColumn.headerIconWithText\"\r\n [matTooltip]=\"tableColumn.headerTooltip? tableColumn.headerTooltip: ''\"\r\n >{{tableColumn.name}}</span>\r\n </ng-template>\r\n\r\n <!-- column data -->\r\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"tableColumn.position == 'right'\">\r\n <span *ngIf=\"!tableColumn.valueIcon\">{{element | dataPropertyGetter: tableColumn.dataKey}}</span>\r\n <mat-icon *ngIf=\"tableColumn.valueIcon\"\r\n [style.color]=\"tableColumn.valueIconColor? tableColumn.valueIconColor(element): null\"\r\n >{{tableColumn.valueIcon}}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row (click)=\"onRowAction.emit(row)\" *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n\r\n <!-- Pagination -->\r\n <mat-paginator *ngIf=\"isPageable\"\r\n [pageSizeOptions]=\"paginationSizes\"\r\n [pageSize]=\"defaultPageSize\"\r\n showFirstLastButtons>\r\n </mat-paginator>\r\n</ng-container>\r\n", styles: ["table{width:100%}th,td{padding:10px!important}mat-form-field{width:40%}.text-right{text-align:right!important}\n"], components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i2__namespace.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i3__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6__namespace.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "sortActionDescription", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i2__namespace.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i2__namespace.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i7__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i8__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatLabel, selector: "mat-label" }, { type: i9__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i6__namespace.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i2__namespace.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i2__namespace.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i2__namespace.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i2__namespace.MatCellDef, selector: "[matCellDef]" }, { type: i2__namespace.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i8__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i8__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i2__namespace.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }], pipes: { "dataPropertyGetter": DataPropertyGetterPipe } });
50
183
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableComponent, decorators: [{
51
184
  type: i0.Component,
52
185
  args: [{
53
186
  selector: 'aur-mat-table',
54
- template: "\n <p>\n ngx-aur-mat-table works!\n </p>\n ",
55
- styles: []
187
+ templateUrl: './ngx-aur-mat-table.component.html',
188
+ styleUrls: ['./ngx-aur-mat-table.component.scss']
56
189
  }]
57
- }], ctorParameters: function () { return []; } });
190
+ }], ctorParameters: function () { return []; }, propDecorators: { matPaginator: [{
191
+ type: i0.ViewChild,
192
+ args: [i7.MatPaginator, { static: false }]
193
+ }], matSort: [{
194
+ type: i0.ViewChild,
195
+ args: [i6.MatSort, { static: true }]
196
+ }], isPageable: [{
197
+ type: i0.Input
198
+ }], isSortable: [{
199
+ type: i0.Input
200
+ }], isFilterable: [{
201
+ type: i0.Input
202
+ }], tableColumns: [{
203
+ type: i0.Input
204
+ }], paginationSizes: [{
205
+ type: i0.Input
206
+ }], defaultPageSize: [{
207
+ type: i0.Input
208
+ }], sort: [{
209
+ type: i0.Output
210
+ }], rowActionable: [{
211
+ type: i0.Input
212
+ }], onRowAction: [{
213
+ type: i0.Output
214
+ }], selectable: [{
215
+ type: i0.Input
216
+ }], selected: [{
217
+ type: i0.Output
218
+ }], onSelect: [{
219
+ type: i0.Output
220
+ }], onDeselect: [{
221
+ type: i0.Output
222
+ }], onRowClick: [{
223
+ type: i0.Output
224
+ }], tableData: [{
225
+ type: i0.Input
226
+ }] } });
58
227
 
59
228
  var NgxAurMatTableModule = /** @class */ (function () {
60
229
  function NgxAurMatTableModule() {
@@ -62,15 +231,51 @@
62
231
  return NgxAurMatTableModule;
63
232
  }());
64
233
  NgxAurMatTableModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
65
- NgxAurMatTableModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, declarations: [NgxAurMatTableComponent], exports: [NgxAurMatTableComponent] });
66
- NgxAurMatTableModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, imports: [[]] });
234
+ NgxAurMatTableModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, declarations: [NgxAurMatTableComponent,
235
+ DataPropertyGetterPipe], imports: [platformBrowser.BrowserModule,
236
+ animations.BrowserAnimationsModule,
237
+ i5.MatIconModule,
238
+ i2.MatTableModule,
239
+ i7.MatPaginatorModule,
240
+ i4.MatButtonModule,
241
+ i9.MatInputModule,
242
+ i6.MatSortModule,
243
+ i10.MatTooltipModule,
244
+ i3.MatCheckboxModule,
245
+ i1.MatFormFieldModule], exports: [NgxAurMatTableComponent] });
246
+ NgxAurMatTableModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, imports: [[
247
+ platformBrowser.BrowserModule,
248
+ animations.BrowserAnimationsModule,
249
+ i5.MatIconModule,
250
+ i2.MatTableModule,
251
+ i7.MatPaginatorModule,
252
+ i4.MatButtonModule,
253
+ i9.MatInputModule,
254
+ i6.MatSortModule,
255
+ i10.MatTooltipModule,
256
+ i3.MatCheckboxModule,
257
+ i1.MatFormFieldModule
258
+ ]] });
67
259
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, decorators: [{
68
260
  type: i0.NgModule,
69
261
  args: [{
70
262
  declarations: [
71
- NgxAurMatTableComponent
263
+ NgxAurMatTableComponent,
264
+ DataPropertyGetterPipe
265
+ ],
266
+ imports: [
267
+ platformBrowser.BrowserModule,
268
+ animations.BrowserAnimationsModule,
269
+ i5.MatIconModule,
270
+ i2.MatTableModule,
271
+ i7.MatPaginatorModule,
272
+ i4.MatButtonModule,
273
+ i9.MatInputModule,
274
+ i6.MatSortModule,
275
+ i10.MatTooltipModule,
276
+ i3.MatCheckboxModule,
277
+ i1.MatFormFieldModule
72
278
  ],
73
- imports: [],
74
279
  exports: [
75
280
  NgxAurMatTableComponent
76
281
  ]
@@ -85,9 +290,9 @@
85
290
  * Generated bundle index. Do not edit.
86
291
  */
87
292
 
293
+ exports.DataPropertyGetterPipe = DataPropertyGetterPipe;
88
294
  exports.NgxAurMatTableComponent = NgxAurMatTableComponent;
89
295
  exports.NgxAurMatTableModule = NgxAurMatTableModule;
90
- exports.NgxAurMatTableService = NgxAurMatTableService;
91
296
 
92
297
  Object.defineProperty(exports, '__esModule', { value: true });
93
298
 
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-aur-mat-table.umd.js","sources":["../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.service.ts","../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.component.ts","../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.module.ts","../../../projects/ngx-aur-mat-table/src/public-api.ts","../../../projects/ngx-aur-mat-table/src/ngx-aur-mat-table.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxAurMatTableService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'aur-mat-table',\n template: `\n <p>\n ngx-aur-mat-table works!\n </p>\n `,\n styles: [\n ]\n})\nexport class NgxAurMatTableComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { NgxAurMatTableComponent } from './ngx-aur-mat-table.component';\n\n\n\n@NgModule({\n declarations: [\n NgxAurMatTableComponent\n ],\n imports: [\n ],\n exports: [\n NgxAurMatTableComponent\n ]\n})\nexport class NgxAurMatTableModule { }\n","/*\n * Public API Surface of ngx-aur-mat-table\n */\n\nexport * from './lib/ngx-aur-mat-table.service';\nexport * from './lib/ngx-aur-mat-table.component';\nexport * from './lib/ngx-aur-mat-table.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i0","Injectable","Component","NgModule"],"mappings":";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,oBAAA,kBAAA,YAAA;IAAA,IAAA,SAAA,oBAAA,GAAA;;;;4IAAa,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAAF,aAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6IAApB,oBAAoB,EAAA,YAAA,EAAA,CAR7B,uBAAuB,CAAA,EAAA,OAAA,EAAA,CAKvB,uBAAuB,CAAA,EAAA,CAAA,CAAA;IAGd,oBAAA,CAAA,IAAA,GAAAA,aAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAAA,aAAA,EAAA,IAAA,EAAA,oBAAoB,YANtB,EACR,CAAA,EAAA,CAAA,CAAA;sHAKU,oBAAoB,EAAA,UAAA,EAAA,CAAA;sBAVhCG,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACR,oBAAA,YAAY,EAAE;4BACZ,uBAAuB;IACxB,qBAAA;IACD,oBAAA,OAAO,EAAE,EACR;IACD,oBAAA,OAAO,EAAE;4BACP,uBAAuB;IACxB,qBAAA;qBACF,CAAA;;;ICdD;;IAEG;;ICFH;;IAEG;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ngx-aur-mat-table.umd.js","sources":["../../../projects/ngx-aur-mat-table/src/lib/SelectionProvider.ts","../../../projects/ngx-aur-mat-table/src/lib/RowActionProvider.ts","../../../projects/ngx-aur-mat-table/src/lib/data-property-getter-pipe/data-property-getter.pipe.ts","../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.component.ts","../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.component.html","../../../projects/ngx-aur-mat-table/src/lib/ngx-aur-mat-table.module.ts","../../../projects/ngx-aur-mat-table/src/public-api.ts","../../../projects/ngx-aur-mat-table/src/ngx-aur-mat-table.ts"],"sourcesContent":["import {SelectionModel} from '@angular/cdk/collections';\r\nimport {MatTableDataSource} from '@angular/material/table';\r\nimport {EventEmitter} from '@angular/core';\r\n\r\nexport interface SelectableContext {\r\n position?: 'start' | 'end';\r\n multiple?: boolean;\r\n}\r\n\r\nexport class SelectionProvider<T> {\r\n\r\n public readonly COLUMN_NAME = 'tbl_selects';\r\n selection: SelectionModel<T>;\r\n context: SelectableContext;\r\n tableDataSource: MatTableDataSource<T>;\r\n\r\n constructor(ctx: SelectableContext, columns: string[], tableDataSource: MatTableDataSource<T>) {\r\n this.context = ctx;\r\n this.selection = new SelectionModel<T>(ctx.multiple, []);\r\n this.tableDataSource = tableDataSource;\r\n this.initCheckboxColumn(columns);\r\n }\r\n\r\n initCheckboxColumn(columns: string[]) {\r\n if (this.context.position === 'start') {\r\n columns.unshift(this.COLUMN_NAME);\r\n } else {\r\n columns.push(this.COLUMN_NAME);\r\n }\r\n }\r\n\r\n bind(selected: EventEmitter<T[]>, onSelect: EventEmitter<T[]>, onDeselect: EventEmitter<T[]>) {\r\n this.selection.changed\r\n .subscribe(event => {\r\n if (event.added) {\r\n onSelect.emit(event.added);\r\n }\r\n if (event.removed) {\r\n onDeselect.emit(event.removed);\r\n }\r\n selected.emit(this.selection.selected);\r\n });\r\n }\r\n\r\n masterToggle() {\r\n this.isAllSelected() ?\r\n this.selection.clear() :\r\n this.tableDataSource.data.forEach(row => this.selection.select(row));\r\n }\r\n\r\n isAllSelected(): boolean {\r\n const numSelected = this.selection.selected.length;\r\n const numRows = this.tableDataSource.data.length;\r\n return numSelected === numRows;\r\n }\r\n}\r\n","export interface ActionEvent<T> {\r\n action: string;\r\n value: T;\r\n}\r\n\r\nexport interface RowActionContext {\r\n position?: 'start' | 'end';\r\n actions: ActionContext[];\r\n}\r\n\r\nexport interface ActionContext {\r\n icon: string;\r\n action: string;\r\n color?: string;\r\n tooltip?: string;\r\n}\r\n\r\nexport class RowActionProvider<T> {\r\n\r\n readonly COLUMN_NAME = 'tbl_actions';\r\n context: RowActionContext;\r\n\r\n constructor(ctx: RowActionContext, columns: string[]) {\r\n this.context = ctx;\r\n if (ctx.position === 'start') {\r\n columns.unshift(this.COLUMN_NAME);\r\n } else {\r\n columns.push(this.COLUMN_NAME);\r\n }\r\n }\r\n}\r\n","import {Pipe, PipeTransform} from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'dataPropertyGetter'\r\n})\r\nexport class DataPropertyGetterPipe implements PipeTransform {\r\n\r\n transform(object: any, keyName: string, ...args: unknown[]): unknown {\r\n return object[keyName];\r\n }\r\n\r\n}\r\n","import {AfterViewInit, Component, EventEmitter, Input, OnInit, Output, ViewChild} from '@angular/core';\nimport {TableColumn} from './TableColumn';\nimport {MatSort, Sort} from '@angular/material/sort';\nimport {MatTableDataSource} from '@angular/material/table';\nimport {MatPaginator} from '@angular/material/paginator';\nimport {SelectableContext, SelectionProvider} from './SelectionProvider';\nimport {ActionEvent, RowActionContext, RowActionProvider} from './RowActionProvider';\n\n@Component({\n selector: 'aur-mat-table',\n templateUrl: './ngx-aur-mat-table.component.html',\n styleUrls: ['./ngx-aur-mat-table.component.scss']\n})\nexport class NgxAurMatTableComponent<T> implements OnInit, AfterViewInit {\n\n public tableDataSource = new MatTableDataSource<T>([]);\n public displayedColumns: string[] = [];\n // @ts-ignore\n @ViewChild(MatPaginator, {static: false}) matPaginator: MatPaginator;\n // @ts-ignore\n @ViewChild(MatSort, {static: true}) matSort: MatSort;\n\n @Input() isPageable = false;\n @Input() isSortable = false;\n @Input() isFilterable = false;\n @Input() tableColumns: TableColumn<T>[] = [];\n @Input() paginationSizes: number[] = [5, 10, 15];\n @Input() defaultPageSize = this.paginationSizes[1];\n\n @Output() sort: EventEmitter<Sort> = new EventEmitter();\n\n // @ts-ignore\n @Input() rowActionable: RowActionContext;\n @Output() onRowAction: EventEmitter<ActionEvent<T>> = new EventEmitter<ActionEvent<T>>();\n\n // @ts-ignore\n @Input() selectable: SelectableContext;\n @Output() selected = new EventEmitter<T[]>();\n @Output() onSelect = new EventEmitter<T[]>();\n @Output() onDeselect = new EventEmitter<T[]>();\n\n @Output() onRowClick = new EventEmitter<T>();\n\n // this property needs to have a setter, to dynamically get changes from parent component\n @Input() set tableData(data: T[]) {\n this.setTableDataSource(data);\n }\n\n // @ts-ignore\n selectionProvider: SelectionProvider<T>;\n // @ts-ignore\n rowActionsProvider: RowActionProvider<T>;\n\n constructor() {\n }\n\n ngOnInit(): void {\n this.displayedColumns = this.tableColumns.map((tableColumn: TableColumn<any>) => tableColumn.name);\n if (this.rowActionable) {\n this.rowActionsProvider = new RowActionProvider<T>(this.rowActionable, this.displayedColumns);\n } else if (this.selectable) {\n this.selectionProvider = new SelectionProvider<T>(this.selectable, this.displayedColumns, this.tableDataSource);\n this.selectionProvider.bind(this.selected, this.onSelect, this.onDeselect);\n }\n }\n\n // we need this, in order to make pagination work with *ngIf\n ngAfterViewInit(): void {\n this.tableDataSource.paginator = this.matPaginator;\n }\n\n\n setTableDataSource(data: any) {\n this.tableDataSource = new MatTableDataSource<any>(data);\n this.tableDataSource.paginator = this.matPaginator;\n this.tableDataSource.sort = this.matSort;\n }\n\n applyFilter(event: Event) {\n const filterValue = (event.target as HTMLInputElement).value;\n this.tableDataSource.filter = filterValue.trim().toLowerCase();\n }\n\n sortTable(sortParameters: Sort) {\n // defining name of data property, to sort by, instead of column name\n // @ts-ignore\n sortParameters.active = this.tableColumns.find(column => column.name === sortParameters.active).dataKey;\n this.sort.emit(sortParameters);\n }\n\n emitRowAction(action: string, row: T, $event: MouseEvent) {\n $event.stopPropagation();\n this.onRowAction.emit({action, value: row});\n }\n\n masterToggle() {\n this.selectionProvider.masterToggle();\n }\n\n isAllSelected(): boolean {\n return this.selectionProvider.isAllSelected();\n }\n}\n","<ng-container>\r\n\r\n <!-- Filter -->\r\n <ng-container *ngIf=\"isFilterable\">\r\n <mat-form-field>\r\n <mat-label>Filter</mat-label>\r\n <input matInput (keyup)=\"applyFilter($event)\" placeholder=\"filter\">\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <!-- Table -->\r\n <table mat-table [dataSource]=\"tableDataSource\" matSort (matSortChange)=\"sortTable($event)\">\r\n\r\n <!-- selection-column-->\r\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selectionProvider.selection.toggle(row) : null\"\r\n [checked]=\"selectionProvider.selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- action column -->\r\n <ng-container *ngIf=\"rowActionsProvider\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button\r\n (click)=\"emitRowAction(action.action, element, $event)\"\r\n [matTooltip]=\"action.tooltip? action.tooltip: ''\"\r\n *ngFor=\"let action of rowActionable.actions\">\r\n <mat-icon [style.color]=\"action.color\">\r\n {{action.icon}}\r\n </mat-icon>\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container *ngFor=\"let tableColumn of tableColumns\" [matColumnDef]=\"tableColumn.name\">\r\n\r\n <!-- if sortable column header -->\r\n <ng-container *ngIf=\"tableColumn.isSortable; else notSortable\">\r\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"tableColumn.name\"\r\n [arrowPosition]=\"tableColumn.position === 'right' ? 'before' : 'after'\">\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-container>\r\n <!-- else not sortable -->\r\n <ng-template #notSortable>\r\n <th mat-header-cell *matHeaderCellDef\r\n [class.text-right]=\"tableColumn.position == 'right'\"\r\n >\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-template>\r\n\r\n <!-- header value-->\r\n <ng-template #headerValue>\r\n <mat-icon *ngIf=\"tableColumn.headerIcon\"\r\n [matTooltip]=\"tableColumn.headerTooltip? tableColumn.headerTooltip: ''\"\r\n [style.color]=\"tableColumn.headerIconColor\">{{tableColumn.headerIcon}}</mat-icon>\r\n <span *ngIf=\"!tableColumn.headerIcon || tableColumn.headerIconWithText\"\r\n [matTooltip]=\"tableColumn.headerTooltip? tableColumn.headerTooltip: ''\"\r\n >{{tableColumn.name}}</span>\r\n </ng-template>\r\n\r\n <!-- column data -->\r\n <td mat-cell *matCellDef=\"let element\" [class.text-right]=\"tableColumn.position == 'right'\">\r\n <span *ngIf=\"!tableColumn.valueIcon\">{{element | dataPropertyGetter: tableColumn.dataKey}}</span>\r\n <mat-icon *ngIf=\"tableColumn.valueIcon\"\r\n [style.color]=\"tableColumn.valueIconColor? tableColumn.valueIconColor(element): null\"\r\n >{{tableColumn.valueIcon}}</mat-icon>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\r\n <tr mat-row (click)=\"onRowAction.emit(row)\" *matRowDef=\"let row; columns: displayedColumns;\"></tr>\r\n </table>\r\n\r\n <!-- Pagination -->\r\n <mat-paginator *ngIf=\"isPageable\"\r\n [pageSizeOptions]=\"paginationSizes\"\r\n [pageSize]=\"defaultPageSize\"\r\n showFirstLastButtons>\r\n </mat-paginator>\r\n</ng-container>\r\n","import {NgModule} from '@angular/core';\nimport {NgxAurMatTableComponent} from './ngx-aur-mat-table.component';\nimport {BrowserAnimationsModule} from \"@angular/platform-browser/animations\";\nimport {BrowserModule} from \"@angular/platform-browser\";\nimport {MatIconModule} from \"@angular/material/icon\";\nimport {MatTableModule} from \"@angular/material/table\";\nimport {MatPaginatorModule} from \"@angular/material/paginator\";\nimport {MatButtonModule} from \"@angular/material/button\";\nimport {MatInputModule} from \"@angular/material/input\";\nimport {MatSort, MatSortModule} from \"@angular/material/sort\";\nimport {MatTooltipModule} from \"@angular/material/tooltip\";\nimport {MatCheckboxModule} from \"@angular/material/checkbox\";\nimport {MatFormFieldModule} from \"@angular/material/form-field\";\nimport {DataPropertyGetterPipe} from \"./data-property-getter-pipe/data-property-getter.pipe\";\n\n\n@NgModule({\n declarations: [\n NgxAurMatTableComponent,\n DataPropertyGetterPipe\n ],\n imports: [\n BrowserModule,\n BrowserAnimationsModule,\n MatIconModule,\n MatTableModule,\n MatPaginatorModule,\n MatButtonModule,\n MatInputModule,\n MatSortModule,\n MatTooltipModule,\n MatCheckboxModule,\n MatFormFieldModule\n ],\n exports: [\n NgxAurMatTableComponent\n ]\n})\nexport class NgxAurMatTableModule {\n}\n","/*\n * Public API Surface of ngx-aur-mat-table\n */\n\nexport * from './lib/ngx-aur-mat-table.component';\nexport * from './lib/ngx-aur-mat-table.module';\nexport * from './lib/data-property-getter-pipe/data-property-getter.pipe';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["SelectionModel","i0","Pipe","MatTableDataSource","EventEmitter","MatPaginator","MatSort","i1","i2","i3","i4","i5","i6","i7","i8","i9","i10","i11.DataPropertyGetterPipe","Component","ViewChild","Input","Output","BrowserModule","BrowserAnimationsModule","MatIconModule","MatTableModule","MatPaginatorModule","MatButtonModule","MatInputModule","MatSortModule","MatTooltipModule","MatCheckboxModule","MatFormFieldModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IASA,IAAA,iBAAA,kBAAA,YAAA;IAOI,IAAA,SAAA,iBAAA,CAAY,GAAsB,EAAE,OAAiB,EAAE,eAAsC,EAAA;IAL7E,QAAA,IAAW,CAAA,WAAA,GAAG,aAAa,CAAC;IAMxC,QAAA,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACnB,QAAA,IAAI,CAAC,SAAS,GAAG,IAAIA,0BAAc,CAAI,GAAG,CAAC,QAAQ,EAAE,EAAE,CA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qB,6BAAa;gBACbC,kCAAuB;gBACvBC,gBAAa;gBACbC,iBAAc;gBACdC,qBAAkB;gBAClBC,kBAAe;gBACfC,iBAAc;gBACdC,gBAAa;gBACbC,oBAAgB;gBAChBC,oBAAiB;gBACjBC,qBAAkB;aACnB,CAAA,EAAA,CAAA,CAAA;sHAKU,oBAAoB,EAAA,UAAA,EAAA,CAAA;sBAtBhCC,WAAQ;IAAC,YAAA,IAAA,EAAA,CAAA;IACR,oBAAA,YAAY,EAAE;4BACZ,uBAAuB;4BACvB,sBAAsB;IACvB,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACPX,6BAAa;4BACbC,kCAAuB;4BACvBC,gBAAa;4BACbC,iBAAc;4BACdC,qBAAkB;4BAClBC,kBAAe;4BACfC,iBAAc;4BACdC,gBAAa;4BACbC,oBAAgB;4BAChBC,oBAAiB;4BACjBC,qBAAkB;IACnB,qBAAA;IACD,oBAAA,OAAO,EAAE;4BACP,uBAAuB;IACxB,qBAAA;qBACF,CAAA;;;ICrCD;;IAEG;;ICFH;;IAEG;;;;;;;;;;;;"}
@@ -0,0 +1,13 @@
1
+ export class RowActionProvider {
2
+ constructor(ctx, columns) {
3
+ this.COLUMN_NAME = 'tbl_actions';
4
+ this.context = ctx;
5
+ if (ctx.position === 'start') {
6
+ columns.unshift(this.COLUMN_NAME);
7
+ }
8
+ else {
9
+ columns.push(this.COLUMN_NAME);
10
+ }
11
+ }
12
+ }
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUm93QWN0aW9uUHJvdmlkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtYXVyLW1hdC10YWJsZS9zcmMvbGliL1Jvd0FjdGlvblByb3ZpZGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlCQSxNQUFNLE9BQU8saUJBQWlCO0lBSzFCLFlBQVksR0FBcU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Ghpcy5jb250ZXh0ID0gY3R4O1xyXG4gICAgICAgIGlmIChjdHgucG9zaXRpb24gPT09ICdzdGFydCcpIHtcclxuICAgICAgICAgICAgY29sdW1ucy51bnNoaWZ0KHRoaXMuQ09MVU1OX05BTUUpO1xyXG4gICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgIGNvbHVtbnMucHVzaCh0aGlzLkNPTFVNTl9OQU1FKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcbn1cclxuIl19
@@ -0,0 +1,41 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
2
+ export class SelectionProvider {
3
+ constructor(ctx, columns, tableDataSource) {
4
+ this.COLUMN_NAME = 'tbl_selects';
5
+ this.context = ctx;
6
+ this.selection = new SelectionModel(ctx.multiple, []);
7
+ this.tableDataSource = tableDataSource;
8
+ this.initCheckboxColumn(columns);
9
+ }
10
+ initCheckboxColumn(columns) {
11
+ if (this.context.position === 'start') {
12
+ columns.unshift(this.COLUMN_NAME);
13
+ }
14
+ else {
15
+ columns.push(this.COLUMN_NAME);
16
+ }
17
+ }
18
+ bind(selected, onSelect, onDeselect) {
19
+ this.selection.changed
20
+ .subscribe(event => {
21
+ if (event.added) {
22
+ onSelect.emit(event.added);
23
+ }
24
+ if (event.removed) {
25
+ onDeselect.emit(event.removed);
26
+ }
27
+ selected.emit(this.selection.selected);
28
+ });
29
+ }
30
+ masterToggle() {
31
+ this.isAllSelected() ?
32
+ this.selection.clear() :
33
+ this.tableDataSource.data.forEach(row => this.selection.select(row));
34
+ }
35
+ isAllSelected() {
36
+ const numSelected = this.selection.selected.length;
37
+ const numRows = this.tableDataSource.data.length;
38
+ return numSelected === numRows;
39
+ }
40
+ }
41
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VsZWN0aW9uUHJvdmlkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gt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Tl9OQU1FKTtcclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgYmluZChzZWxlY3RlZDogRXZlbnRFbWl0dGVyPFRbXT4sIG9uU2VsZWN0OiBFdmVudEVtaXR0ZXI8VFtdPiwgb25EZXNlbGVjdDogRXZlbnRFbWl0dGVyPFRbXT4pIHtcclxuICAgICAgICB0aGlzLnNlbGVjdGlvbi5jaGFuZ2VkXHJcbiAgICAgICAgICAgIC5zdWJzY3JpYmUoZXZlbnQgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKGV2ZW50LmFkZGVkKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgb25TZWxlY3QuZW1pdChldmVudC5hZGRlZCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnQucmVtb3ZlZCkge1xyXG4gICAgICAgICAgICAgICAgICAgIG9uRGVzZWxlY3QuZW1pdChldmVudC5yZW1vdmVkKTtcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkLmVtaXQodGhpcy5zZWxlY3Rpb24uc2VsZWN0ZWQpO1xyXG4gICAgICAgICAgICB9KTtcclxuICAgIH1cclxuXHJcbiAgICBtYXN0ZXJUb2dnbGUoKSB7XHJcbiAgICAgICAgdGhpcy5pc0FsbFNlbGVjdGVkKCkgP1xyXG4gICAgICAgICAgICB0aGlzLnNlbGVjdGlvbi5jbGVhcigpIDpcclxuICAgICAgICAgICAgdGhpcy50YWJsZURhdGFTb3VyY2UuZGF0YS5mb3JFYWNoKHJvdyA9PiB0aGlzLnNlbGVjdGlvbi5zZWxlY3Qocm93KSk7XHJcbiAgICB9XHJcblxyXG4gICAgaXNBbGxTZWxlY3RlZCgpOiBib29sZWFuIHtcclxuICAgICAgICBjb25zdCBudW1TZWxlY3RlZCA9IHRoaXMuc2VsZWN0aW9uLnNlbGVjdGVkLmxlbmd0aDtcclxuICAgICAgICBjb25zdCBudW1Sb3dzID0gdGhpcy50YWJsZURhdGFTb3VyY2UuZGF0YS5sZW5ndGg7XHJcbiAgICAgICAgcmV0dXJuIG51bVNlbGVjdGVkID09PSBudW1Sb3dzO1xyXG4gICAgfVxyXG59XHJcbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiVGFibGVDb2x1bW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtYXVyLW1hdC10YWJsZS9zcmMvbGliL1RhYmxlQ29sdW1uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIFRhYmxlQ29sdW1uPFQ+IHtcclxuICAgIG5hbWU6IHN0cmluZztcclxuICAgIGRhdGFLZXk6IHN0cmluZztcclxuICAgIHBvc2l0aW9uPzogJ3JpZ2h0JyB8ICdsZWZ0JztcclxuICAgIGlzU29ydGFibGU/OiBib29sZWFuO1xyXG4gICAgaGVhZGVySWNvbj86IHN0cmluZztcclxuICAgIGhlYWRlckljb25Db2xvcj86IHN0cmluZztcclxuICAgIGhlYWRlckljb25XaXRoVGV4dD86IGJvb2xlYW47XHJcbiAgICBoZWFkZXJUb29sdGlwPzogc3RyaW5nO1xyXG4gICAgdmFsdWVJY29uPzogc3RyaW5nO1xyXG4gICAgdmFsdWVJY29uQ29sb3I/OiAodmFsdWU6IFQpID0+IHN0cmluZztcclxufVxyXG4iXX0=
@@ -0,0 +1,16 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class DataPropertyGetterPipe {
4
+ transform(object, keyName, ...args) {
5
+ return object[keyName];
6
+ }
7
+ }
8
+ DataPropertyGetterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DataPropertyGetterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
9
+ DataPropertyGetterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DataPropertyGetterPipe, name: "dataPropertyGetter" });
10
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: DataPropertyGetterPipe, decorators: [{
11
+ type: Pipe,
12
+ args: [{
13
+ name: 'dataPropertyGetter'
14
+ }]
15
+ }] });
16
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1wcm9wZXJ0eS1nZXR0ZXIucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC1hdXItbWF0LXRhYmxlL3NyYy9saWIvZGF0YS1wcm9wZXJ0eS1nZXR0ZXItcGlwZS9kYXRhLXByb3BlcnR5LWdldHRlci5waXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBQyxJQUFJLEVBQWdCLE1BQU0sZUFBZSxDQUFDOztBQUtsRCxNQUFNLE9BQU8sc0JBQXNCO0lBRWpDLFNBQVMsQ0FBQyxNQUFXLEVBQUUsT0FBZSxFQUFFLEdBQUcsSUFBZTtRQUN4RCxPQUFPLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUN6QixDQUFDOztvSEFKVSxzQkFBc0I7a0hBQXRCLHNCQUFzQjs0RkFBdEIsc0JBQXNCO2tCQUhsQyxJQUFJO21CQUFDO29CQUNKLElBQUksRUFBRSxvQkFBb0I7aUJBQzNCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHtQaXBlLCBQaXBlVHJhbnNmb3JtfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbkBQaXBlKHtcclxuICBuYW1lOiAnZGF0YVByb3BlcnR5R2V0dG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