sigesp 0.8.99-20220616 → 0.9.0-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 +9 -25
- 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 +10 -24
- package/esm2015/lib/sigesp.service.js +1 -3
- package/fesm2015/sigesp.js +9 -25
- 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,7 +1183,7 @@
|
|
|
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
1189
|
var _this = this;
|
|
@@ -1192,29 +1192,15 @@
|
|
|
1192
1192
|
this.sort.sortChange.subscribe(function () { return _this.paginator.pageIndex = 0; });
|
|
1193
1193
|
};
|
|
1194
1194
|
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
|
-
}
|
|
1195
|
+
var numSelected = this.selection.selected.length;
|
|
1196
|
+
var numRows = this.dataSource.data.length;
|
|
1197
|
+
return numSelected === numRows;
|
|
1205
1198
|
};
|
|
1206
1199
|
TableSelectComponent.prototype.masterToggle = function () {
|
|
1207
1200
|
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
|
-
}
|
|
1201
|
+
this.isAllSelected() ?
|
|
1202
|
+
this.selection.clear() :
|
|
1203
|
+
this.dataSource.data.forEach(function (row) { return _this.selection.select(row); });
|
|
1218
1204
|
};
|
|
1219
1205
|
TableSelectComponent.prototype.checkboxLabel = function (row) {
|
|
1220
1206
|
if (!row) {
|
|
@@ -1248,7 +1234,7 @@
|
|
|
1248
1234
|
TableSelectComponent.decorators = [
|
|
1249
1235
|
{ type: i0.Component, args: [{
|
|
1250
1236
|
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
|
|
1237
|
+
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
1238
|
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
1239
|
},] }
|
|
1254
1240
|
];
|
|
@@ -6004,7 +5990,6 @@
|
|
|
6004
5990
|
if (options === void 0) { options = {
|
|
6005
5991
|
disableClose: false,
|
|
6006
5992
|
hasBackdrop: false,
|
|
6007
|
-
disableMasterToggle: false
|
|
6008
5993
|
}; }
|
|
6009
5994
|
var dialogRef = this.dialog.open(TableSelectComponent, {
|
|
6010
5995
|
data: {
|
|
@@ -6012,7 +5997,6 @@
|
|
|
6012
5997
|
columns: columns,
|
|
6013
5998
|
dataSource: dataSource,
|
|
6014
5999
|
columnNames: columnNames,
|
|
6015
|
-
disableMasterToggle: options.disableMasterToggle
|
|
6016
6000
|
},
|
|
6017
6001
|
width: width,
|
|
6018
6002
|
maxHeight: '90vh',
|