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/fesm2015/sigesp.js
CHANGED
|
@@ -870,6 +870,7 @@ class MPlanUnicoCuenta {
|
|
|
870
870
|
}
|
|
871
871
|
|
|
872
872
|
class TableSelectComponent {
|
|
873
|
+
//disableMasterToggle: boolean = false;
|
|
873
874
|
constructor(dialogRef, dialogData) {
|
|
874
875
|
this.dialogRef = dialogRef;
|
|
875
876
|
this.dialogData = dialogData;
|
|
@@ -878,7 +879,6 @@ class TableSelectComponent {
|
|
|
878
879
|
this.selections = [];
|
|
879
880
|
this.names = [];
|
|
880
881
|
this.loaded = false;
|
|
881
|
-
this.disableMasterToggle = false;
|
|
882
882
|
this.columns.push(...dialogData.columns);
|
|
883
883
|
this.columnsAux = dialogData.columns;
|
|
884
884
|
this.data = dialogData.dataSource;
|
|
@@ -886,36 +886,22 @@ class TableSelectComponent {
|
|
|
886
886
|
if (this.dialogData.columnNames) {
|
|
887
887
|
this.names = this.dialogData.columnNames;
|
|
888
888
|
}
|
|
889
|
-
this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
889
|
+
// this.disableMasterToggle = this.dialogData.disableMasterToggle
|
|
890
890
|
}
|
|
891
891
|
ngAfterViewInit() {
|
|
892
892
|
this.dataSource.paginator = this.paginator;
|
|
893
893
|
this.dataSource.sort = this.sort;
|
|
894
|
-
this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
|
|
894
|
+
// this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
|
|
895
895
|
}
|
|
896
896
|
isAllSelected() {
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
return numSelected === numRows;
|
|
901
|
-
}
|
|
902
|
-
else {
|
|
903
|
-
const numSelected = this.selection.selected.length;
|
|
904
|
-
const numRows = this.dataSource.filteredData.length;
|
|
905
|
-
return numSelected === numRows;
|
|
906
|
-
}
|
|
897
|
+
const numSelected = this.selection.selected.length;
|
|
898
|
+
const numRows = this.dataSource.data.length;
|
|
899
|
+
return numSelected === numRows;
|
|
907
900
|
}
|
|
908
901
|
masterToggle() {
|
|
909
|
-
|
|
910
|
-
this.
|
|
911
|
-
|
|
912
|
-
this.dataSource.data.forEach(row => this.selection.select(row));
|
|
913
|
-
}
|
|
914
|
-
else {
|
|
915
|
-
this.isAllSelected() ?
|
|
916
|
-
this.selection.clear() :
|
|
917
|
-
this.dataSource.filteredData.forEach(row => this.selection.select(row));
|
|
918
|
-
}
|
|
902
|
+
this.isAllSelected() ?
|
|
903
|
+
this.selection.clear() :
|
|
904
|
+
this.dataSource.data.forEach(row => this.selection.select(row));
|
|
919
905
|
}
|
|
920
906
|
checkboxLabel(row) {
|
|
921
907
|
if (!row) {
|
|
@@ -948,7 +934,7 @@ class TableSelectComponent {
|
|
|
948
934
|
TableSelectComponent.decorators = [
|
|
949
935
|
{ type: Component, args: [{
|
|
950
936
|
selector: 'app-table-select',
|
|
951
|
-
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]=\"
|
|
937
|
+
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",
|
|
952
938
|
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}"]
|
|
953
939
|
},] }
|
|
954
940
|
];
|
|
@@ -957,8 +943,8 @@ TableSelectComponent.ctorParameters = () => [
|
|
|
957
943
|
{ type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
958
944
|
];
|
|
959
945
|
TableSelectComponent.propDecorators = {
|
|
960
|
-
paginator: [{ type: ViewChild, args: [MatPaginator,] }],
|
|
961
|
-
sort: [{ type: ViewChild, args: [MatSort,] }]
|
|
946
|
+
paginator: [{ type: ViewChild, args: [MatPaginator, { static: true },] }],
|
|
947
|
+
sort: [{ type: ViewChild, args: [MatSort, { static: true },] }]
|
|
962
948
|
};
|
|
963
949
|
|
|
964
950
|
class MConfigurationSPG {
|
|
@@ -5514,7 +5500,6 @@ class SigespService {
|
|
|
5514
5500
|
columns, title, dataSource, columnNames = null, width = '450px', options = {
|
|
5515
5501
|
disableClose: false,
|
|
5516
5502
|
hasBackdrop: false,
|
|
5517
|
-
disableMasterToggle: false
|
|
5518
5503
|
}) {
|
|
5519
5504
|
let dialogRef = this.dialog.open(TableSelectComponent, {
|
|
5520
5505
|
data: {
|
|
@@ -5522,7 +5507,6 @@ class SigespService {
|
|
|
5522
5507
|
columns: columns,
|
|
5523
5508
|
dataSource: dataSource,
|
|
5524
5509
|
columnNames,
|
|
5525
|
-
disableMasterToggle: options.disableMasterToggle
|
|
5526
5510
|
},
|
|
5527
5511
|
width: width,
|
|
5528
5512
|
maxHeight: '90vh',
|