sigesp 0.8.100-20220705 → 0.9.1-20220727
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.
- package/bundles/sigesp.umd.js +12 -29
- package/bundles/sigesp.umd.js.map +1 -1
- package/bundles/sigesp.umd.min.js +2 -2
- package/bundles/sigesp.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/table-select/table-select.component.js +13 -27
- package/esm2015/lib/sigesp.service.js +1 -3
- package/fesm2015/sigesp.js +12 -28
- package/fesm2015/sigesp.js.map +1 -1
- package/lib/shared/components/table-select/table-select.component.d.ts +0 -2
- package/lib/sigesp.service.d.ts +0 -1
- package/package.json +1 -1
- package/sigesp.metadata.json +1 -1
package/bundles/sigesp.umd.js
CHANGED
|
@@ -1166,6 +1166,7 @@
|
|
|
1166
1166
|
}());
|
|
1167
1167
|
|
|
1168
1168
|
var TableSelectComponent = /** @class */ (function () {
|
|
1169
|
+
//disableMasterToggle: boolean = false;
|
|
1169
1170
|
function TableSelectComponent(dialogRef, dialogData) {
|
|
1170
1171
|
var _a;
|
|
1171
1172
|
this.dialogRef = dialogRef;
|
|
@@ -1175,7 +1176,6 @@
|
|
|
1175
1176
|
this.selections = [];
|
|
1176
1177
|
this.names = [];
|
|
1177
1178
|
this.loaded = false;
|
|
1178
|
-
this.disableMasterToggle = false;
|
|
1179
1179
|
(_a = this.columns).push.apply(_a, __spread(dialogData.columns));
|
|
1180
1180
|
this.columnsAux = dialogData.columns;
|
|
1181
1181
|
this.data = dialogData.dataSource;
|
|
@@ -1183,38 +1183,23 @@
|
|
|
1183
1183
|
if (this.dialogData.columnNames) {
|
|
1184
1184
|
this.names = this.dialogData.columnNames;
|
|
1185
1185
|
}
|
|
1186
|
-
this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
1186
|
+
// this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
1187
1187
|
}
|
|
1188
1188
|
TableSelectComponent.prototype.ngAfterViewInit = function () {
|
|
1189
|
-
var _this = this;
|
|
1190
1189
|
this.dataSource.paginator = this.paginator;
|
|
1191
1190
|
this.dataSource.sort = this.sort;
|
|
1192
|
-
this.sort.sortChange.subscribe(
|
|
1191
|
+
// this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
|
|
1193
1192
|
};
|
|
1194
1193
|
TableSelectComponent.prototype.isAllSelected = function () {
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
return numSelected === numRows;
|
|
1199
|
-
}
|
|
1200
|
-
else {
|
|
1201
|
-
var numSelected = this.selection.selected.length;
|
|
1202
|
-
var numRows = this.dataSource.filteredData.length;
|
|
1203
|
-
return numSelected === numRows;
|
|
1204
|
-
}
|
|
1194
|
+
var numSelected = this.selection.selected.length;
|
|
1195
|
+
var numRows = this.dataSource.data.length;
|
|
1196
|
+
return numSelected === numRows;
|
|
1205
1197
|
};
|
|
1206
1198
|
TableSelectComponent.prototype.masterToggle = function () {
|
|
1207
1199
|
var _this = this;
|
|
1208
|
-
|
|
1209
|
-
this.
|
|
1210
|
-
|
|
1211
|
-
this.dataSource.data.forEach(function (row) { return _this.selection.select(row); });
|
|
1212
|
-
}
|
|
1213
|
-
else {
|
|
1214
|
-
this.isAllSelected() ?
|
|
1215
|
-
this.selection.clear() :
|
|
1216
|
-
this.dataSource.filteredData.forEach(function (row) { return _this.selection.select(row); });
|
|
1217
|
-
}
|
|
1200
|
+
this.isAllSelected() ?
|
|
1201
|
+
this.selection.clear() :
|
|
1202
|
+
this.dataSource.data.forEach(function (row) { return _this.selection.select(row); });
|
|
1218
1203
|
};
|
|
1219
1204
|
TableSelectComponent.prototype.checkboxLabel = function (row) {
|
|
1220
1205
|
if (!row) {
|
|
@@ -1248,7 +1233,7 @@
|
|
|
1248
1233
|
TableSelectComponent.decorators = [
|
|
1249
1234
|
{ type: i0.Component, args: [{
|
|
1250
1235
|
selector: 'app-table-select',
|
|
1251
|
-
template: "<div class=\"container\">\r\n <!-- HEADER DE EL COMPONENTE -->\r\n <div class=\"header mainColor\">\r\n <!-- T\u00CDTULO -->\r\n <h2>{{dialogData.title}}</h2>\r\n <!-- BTN CERRAR -->\r\n <div class=\"close\">\r\n <div class=\"btn\" (click)=\"cancelDialog()\">\r\n <icon-m [name]=\"'close'\" [color]=\"'black'\"></icon-m>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- BODY -->\r\n <div class=\"body\">\r\n <!-- FILTER -->\r\n <div class=\"filter\">\r\n <mat-form-field class=\"input\">\r\n <input type=\"text\" matInput placeholder=\"Filtrar\"\r\n (keyup)=\"filterTable($event.target.value)\">\r\n </mat-form-field>\r\n </div>\r\n <!-- TABLA -->\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n\r\n <!-- CHECKS -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [disabled]=\"
|
|
1236
|
+
template: "<div class=\"container\">\r\n <!-- HEADER DE EL COMPONENTE -->\r\n <div class=\"header mainColor\">\r\n <!-- T\u00CDTULO -->\r\n <h2>{{dialogData.title}}</h2>\r\n <!-- BTN CERRAR -->\r\n <div class=\"close\">\r\n <div class=\"btn\" (click)=\"cancelDialog()\">\r\n <icon-m [name]=\"'close'\" [color]=\"'black'\"></icon-m>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- BODY -->\r\n <div class=\"body\">\r\n <!-- FILTER -->\r\n <div class=\"filter\">\r\n <mat-form-field class=\"input\">\r\n <input type=\"text\" matInput placeholder=\"Filtrar\"\r\n (keyup)=\"filterTable($event.target.value)\">\r\n </mat-form-field>\r\n </div>\r\n <!-- TABLA -->\r\n <div class=\"table-container\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n\r\n <!-- CHECKS -->\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [disabled]=\"getFilter()\" color=\"primary\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\" \r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\"\r\n [aria-label]=\"checkboxLabel()\"\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 ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\" color=\"primary\"\r\n [aria-label]=\"checkboxLabel(row)\"></mat-checkbox>\r\n </td>\r\n </ng-container>\r\n\r\n <!-- DATA -->\r\n <ng-container *ngFor=\"let column of columnsAux; let i = index\" [matColumnDef]=\"column\">\r\n <th mat-header-cell *matHeaderCellDef mat-sort-header> \r\n {{(names[i] ? names[i] : column) | uppercase}} \r\n </th>\r\n <td mat-cell *matCellDef=\"let row\"> \r\n {{row[column]}} \r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columns\"></tr>\r\n <tr mat-row *matRowDef=\"let row; columns: columns;\"\r\n (click)=\"selection.toggle(row)\">\r\n </tr>\r\n </table>\r\n <mat-paginator [pageSizeOptions]=\"[5, 10, 25, 100]\" showFirstLastButtons class=\"paginator\"></mat-paginator>\r\n </div>\r\n\r\n <div class=\"buttons\">\r\n <button mat-raised-button color=\"primary\" \r\n [disabled]=\"selection.selected.length==0\"\r\n (click)=\"closeDialog()\">Aceptar</button>\r\n </div>\r\n </div>\r\n</div>\r\n",
|
|
1252
1237
|
styles: [".container .header{border-radius:5px 5px 0 0;display:grid;grid-template-columns:repeat(10,10%);padding:15px;text-align:center}.container .header h2{grid-column:1/10;margin:0;text-align:left}.container .header .close{align-items:center;display:flex;grid-column:10/11;justify-content:center}.container .header .close .btn{align-items:center;background:#fff;border-radius:50%;cursor:pointer;display:flex;height:30px;justify-content:center;width:30px}.container .header .close .btn Icon{display:flex}.container .body{margin-top:10px;padding:15px}.container .body .filter .input,.container .body .table-container table{width:100%}.container .body .table-container table .row:hover{background:#777;cursor:pointer}.container .body .table-container table .mat-cell{padding-bottom:5px!important;padding-right:5px!important;padding-top:5px!important}.container .body .paginator{margin-top:15px}.container .body .buttons{display:flex;justify-content:flex-end;padding:10px}.container .body .buttons button{font-size:17px}"]
|
|
1253
1238
|
},] }
|
|
1254
1239
|
];
|
|
@@ -1257,8 +1242,8 @@
|
|
|
1257
1242
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [i2.MAT_DIALOG_DATA,] }] }
|
|
1258
1243
|
]; };
|
|
1259
1244
|
TableSelectComponent.propDecorators = {
|
|
1260
|
-
paginator: [{ type: i0.ViewChild, args: [paginator.MatPaginator,] }],
|
|
1261
|
-
sort: [{ type: i0.ViewChild, args: [sort.MatSort,] }]
|
|
1245
|
+
paginator: [{ type: i0.ViewChild, args: [paginator.MatPaginator, { static: true },] }],
|
|
1246
|
+
sort: [{ type: i0.ViewChild, args: [sort.MatSort, { static: true },] }]
|
|
1262
1247
|
};
|
|
1263
1248
|
|
|
1264
1249
|
var MConfigurationSPG = /** @class */ (function () {
|
|
@@ -6004,7 +5989,6 @@
|
|
|
6004
5989
|
if (options === void 0) { options = {
|
|
6005
5990
|
disableClose: false,
|
|
6006
5991
|
hasBackdrop: false,
|
|
6007
|
-
disableMasterToggle: false
|
|
6008
5992
|
}; }
|
|
6009
5993
|
var dialogRef = this.dialog.open(TableSelectComponent, {
|
|
6010
5994
|
data: {
|
|
@@ -6012,7 +5996,6 @@
|
|
|
6012
5996
|
columns: columns,
|
|
6013
5997
|
dataSource: dataSource,
|
|
6014
5998
|
columnNames: columnNames,
|
|
6015
|
-
disableMasterToggle: options.disableMasterToggle
|
|
6016
5999
|
},
|
|
6017
6000
|
width: width,
|
|
6018
6001
|
maxHeight: '90vh',
|