brainloper-ui 14.0.10 → 14.0.11
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/esm2020/src/app/modules/brainloper-ui/components/data-table/data-table.component.mjs +17 -17
- package/fesm2015/brainloper-ui.mjs +16 -16
- package/fesm2015/brainloper-ui.mjs.map +1 -1
- package/fesm2020/brainloper-ui.mjs +16 -16
- package/fesm2020/brainloper-ui.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1558,6 +1558,20 @@ class DataTableComponent {
|
|
|
1558
1558
|
icon: 'fa-plus-circle',
|
|
1559
1559
|
tooltip: 'Nuevo',
|
|
1560
1560
|
},
|
|
1561
|
+
{
|
|
1562
|
+
action: 'income',
|
|
1563
|
+
conditionShowHeader: () => this.selectedRows.length === 0 && this.configuration.income,
|
|
1564
|
+
condition: () => false,
|
|
1565
|
+
icon: 'fa-user-plus',
|
|
1566
|
+
tooltip: 'Ingreso',
|
|
1567
|
+
},
|
|
1568
|
+
{
|
|
1569
|
+
action: 'exit',
|
|
1570
|
+
conditionShowHeader: () => this.selectedRows.length === 0 && this.configuration.exit,
|
|
1571
|
+
condition: () => false,
|
|
1572
|
+
icon: 'fa-user-times',
|
|
1573
|
+
tooltip: 'Salida',
|
|
1574
|
+
},
|
|
1561
1575
|
{
|
|
1562
1576
|
action: 'exportToExcel',
|
|
1563
1577
|
conditionShowHeader: () => this.selectedRows.length === 0 &&
|
|
@@ -1610,20 +1624,6 @@ class DataTableComponent {
|
|
|
1610
1624
|
icon: 'fa-trash',
|
|
1611
1625
|
tooltip: 'Eliminar',
|
|
1612
1626
|
},
|
|
1613
|
-
{
|
|
1614
|
-
action: 'income',
|
|
1615
|
-
conditionShowHeader: () => this.selectedRows.length === 0 && this.configuration.income,
|
|
1616
|
-
condition: () => false,
|
|
1617
|
-
icon: 'fa-user-plus',
|
|
1618
|
-
tooltip: 'Ingreso',
|
|
1619
|
-
},
|
|
1620
|
-
{
|
|
1621
|
-
action: 'exit',
|
|
1622
|
-
conditionShowHeader: () => this.selectedRows.length === 0 && this.configuration.exit,
|
|
1623
|
-
condition: () => false,
|
|
1624
|
-
icon: 'fa-user-times',
|
|
1625
|
-
tooltip: 'Salida',
|
|
1626
|
-
},
|
|
1627
1627
|
];
|
|
1628
1628
|
this.paginatorTranslate.itemsPerPageLabel = 'Elementos por página';
|
|
1629
1629
|
this.paginatorTranslate.nextPageLabel = 'Siguiente página';
|
|
@@ -1987,10 +1987,10 @@ class DataTableComponent {
|
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
1989
|
DataTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DataTableComponent, deps: [{ token: i1.MatDialog }, { token: HttpService }, { token: MessageService }, { token: FunctionsService }, { token: i5.MatPaginatorIntl }, { token: ExportDataService }], target: i0.ɵɵFactoryTarget.Component });
|
|
1990
|
-
DataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DataTableComponent, selector: "data-table", inputs: { title: "title", columns: "columns", data: "data", combo: "combo", configuration: "configuration", reloadTable: "reloadTable", url: "url", params: "params", titleLoading: "titleLoading", messageLoading: "messageLoading", headerFileXlsm: "headerFileXlsm", headerFilters: "headerFilters", xslxTitleFields: "xslxTitleFields", xslxSheetNameFields: "xslxSheetNameFields", xslxBodyFields: "xslxBodyFields", xslxParams: "xslxParams" }, outputs: { clickRow: "clickRow", add: "add", edit: "edit", delete: "delete", print: "print", exportXslxByRow: "exportXslxByRow", active: "active", selected: "selected", view: "view", closeOrder: "closeOrder", packOff: "packOff", advance: "advance", income: "income", exit: "exit", internalData: "internalData" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"contenedor-tabla\">\r\n <app-filters [headerFilters]=\"headerFilters\" (applyFilters)=\"applyFilters($event)\">\r\n </app-filters>\r\n\r\n <div style='display: flex; flex-direction: row; justify-content: space-between; align-items: center;'>\r\n <div style='flex:1; font-size: 1rem;'>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>0 && selectedRows.length<2'> {{selectedRows.length}} Seleccionado </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>1'> {{selectedRows.length}} Seleccionados </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length<1 && !configuration.hideTitle'> {{title}} </p></strong>\r\n </div>\r\n\r\n <div *ngIf=\"!configuration.hideFilter\" style='flex:3; padding-right: 10px; margin-bottom: 5px;'>\r\n <mat-form-field class='filter'>\r\n <input type=\"text\" [(ngModel)]='filters' (keyup)='changeFilters()' matInput placeholder=\"Filtrar\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonsTable\"></ng-container>\r\n\r\n </div>\r\n\r\n <table class=\"table_Eter table-hover\">\r\n <thead class=\"dark\">\r\n <tr >\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'>\r\n <mat-checkbox color='primary' (change)='seletecAllEvent($event)' [(ngModel)]='selectAll' [indeterminate]='indeterminateState'> </mat-checkbox> </th>\r\n <th\r\n [class]=\"column.style?.movil\"\r\n *ngFor='let column of columns' scope=\"col\"\r\n [ngStyle]=\"column.style\"\r\n >{{column.label}}</th>\r\n <th *ngIf=\"shouldShowMenu()\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class='mat-elevation-z3'>\r\n\r\n <tr style=\"cursor: pointer;\" *ngFor='let row of data' (click)='clickOnRoW(row)' [class]=\"checkboxs[row[configuration.primaryKey]]?'selected-row':''\">\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'> <mat-checkbox color='primary' [(ngModel)]='checkboxs[row[configuration.primaryKey]]' (click)='clicked($event)' (change)='selection(row, $event)'> </mat-checkbox> </th>\r\n <th [class]='column.style?.movil' [ngStyle]='column.style' scope=\"row\" *ngFor='let column of columns'>{{ row[column.ID] }}</th>\r\n\r\n <th *ngIf=\"shouldShowMenu()\" style=\"display: flex; justify-content: center; align-items: center; overflow: visible;\">\r\n <mat-icon\r\n (click)=\"showMenu($event)\"\r\n [matMenuTriggerFor]=\"menu\"\r\n matRipple\r\n class=\"menu_more_vert\"\r\n aria-hidden=\"false\"\r\n aria-label=\"Example delete icon\"\r\n >more_vert</mat-icon>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngFor=\"let btn of buttonsConfig\" >\r\n <button *ngIf=\"btn.condition()\" (click)=\"action(btn.action, row)\" mat-menu-item class=\"d-flex align-items-center w-100\" >\r\n <i class=\"fa {{btn.icon}} btn-accion\" style=\"font-size:120%; margin-right: 10px\"></i>\r\n {{btn.tooltip}}\r\n </button>\r\n </div>\r\n\r\n </mat-menu>\r\n </th>\r\n\r\n </tr>\r\n\r\n\r\n </tbody>\r\n\r\n </table>\r\n\r\n <div *ngIf='length == 0 && data.length == 0' style=\"margin-left: 10px;\"> <strong>No se encontr\u00F3 informaci\u00F3n</strong></div>\r\n\r\n <mat-paginator *ngIf=\"paginatorActive\"\r\n [length]=\"length\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons\r\n (page)=\"changePage($event)\"></mat-paginator>\r\n\r\n </div>\r\n\r\n<ng-template #buttonsTable let-fontSize=\"fontSize\" let-marginRight=\"marginRight\" style='flex:0.5; display:flex; flex-direction: row; justify-content: flex-end;'>\r\n <ng-container *ngFor=\"let btn of buttonsConfig\">\r\n <div *ngIf=\"btn.conditionShowHeader()\" (click)=\"action(btn.action)\" matTooltip=\"{{btn.tooltip}}\" matTooltipPosition=\"above\">\r\n <i class=\"fa {{btn.icon}} btn-accion\" [ngStyle]=\"{'font-size': fontSize ? fontSize : '170%', 'margin-right': marginRight ? marginRight : '15px'}\"></i>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".contenedor-tabla{width:100%;overflow-x:auto}.table_Eter{width:100%;margin-bottom:4px;color:primary;border-collapse:collapse}.table_Eter .dark th{color:#fff;background-color:#343a40;border-color:#454d55;text-align:center;vertical-align:middle}.table_Eter thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table_Eter th,.table_Eter td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}th{text-align:inherit}*,*:before,*:after{box-sizing:border-box}.btn-accion{cursor:pointer}mat-form-field{padding:0!important;width:100%}.filter{padding:0;margin-bottom:10px;width:100%}.filter ::ng-deep .mat-form-field-underline{bottom:3px!important}.filter ::ng-deep .mat-form-field-infix{border:0!important}.filter ::ng-deep .mat-form-field-wrapper{padding:0}.filter ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-wrapper{padding:0}.selected-row{color:#212529;background-color:#00000013}button:focus{outline:none!important}@media only screen and (max-width: 600px){.no-movil{display:none}}::ng-deep .mat-paginator{background:transparent!important}@media screen and (max-width: 400px){.filter{padding:0;margin-bottom:40px;width:70%}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i8$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i13.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FiltersComponent, selector: "app-filters", inputs: ["headerFilters"], outputs: ["applyFilters"] }] });
|
|
1990
|
+
DataTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: DataTableComponent, selector: "data-table", inputs: { title: "title", columns: "columns", data: "data", combo: "combo", configuration: "configuration", reloadTable: "reloadTable", url: "url", params: "params", titleLoading: "titleLoading", messageLoading: "messageLoading", headerFileXlsm: "headerFileXlsm", headerFilters: "headerFilters", xslxTitleFields: "xslxTitleFields", xslxSheetNameFields: "xslxSheetNameFields", xslxBodyFields: "xslxBodyFields", xslxParams: "xslxParams" }, outputs: { clickRow: "clickRow", add: "add", edit: "edit", delete: "delete", print: "print", exportXslxByRow: "exportXslxByRow", active: "active", selected: "selected", view: "view", closeOrder: "closeOrder", packOff: "packOff", advance: "advance", income: "income", exit: "exit", internalData: "internalData" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"contenedor-tabla\">\r\n <app-filters [headerFilters]=\"headerFilters\" (applyFilters)=\"applyFilters($event)\">\r\n </app-filters>\r\n\r\n <div style='display: flex; flex-direction: row; justify-content: space-between; align-items: center;'>\r\n <div style='flex:1; font-size: 1rem;'>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>0 && selectedRows.length<2 && configuration.selectable'> {{selectedRows.length}} Seleccionado </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>1'> {{selectedRows.length}} Seleccionados </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length<1 && !configuration.hideTitle'> {{title}} </p></strong>\r\n </div>\r\n\r\n <div *ngIf=\"!configuration.hideFilter\" style='flex:3; padding-right: 10px; margin-bottom: 5px;'>\r\n <mat-form-field class='filter'>\r\n <input type=\"text\" [(ngModel)]='filters' (keyup)='changeFilters()' matInput placeholder=\"Filtrar\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonsTable\"></ng-container>\r\n\r\n </div>\r\n\r\n <table class=\"table_Eter table-hover\">\r\n <thead class=\"dark\">\r\n <tr >\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'>\r\n <mat-checkbox color='primary' (change)='seletecAllEvent($event)' [(ngModel)]='selectAll' [indeterminate]='indeterminateState'> </mat-checkbox> </th>\r\n <th\r\n [class]=\"column.style?.movil\"\r\n *ngFor='let column of columns' scope=\"col\"\r\n [ngStyle]=\"column.style\"\r\n >{{column.label}}</th>\r\n <th *ngIf=\"shouldShowMenu()\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class='mat-elevation-z3'>\r\n\r\n <tr style=\"cursor: pointer;\" *ngFor='let row of data' (click)='clickOnRoW(row)' [class]=\"checkboxs[row[configuration.primaryKey]]?'selected-row':''\">\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'> <mat-checkbox color='primary' [(ngModel)]='checkboxs[row[configuration.primaryKey]]' (click)='clicked($event)' (change)='selection(row, $event)'> </mat-checkbox> </th>\r\n <th [class]='column.style?.movil' [ngStyle]='column.style' scope=\"row\" *ngFor='let column of columns'>{{ row[column.ID] }}</th>\r\n\r\n <th *ngIf=\"shouldShowMenu()\" style=\"display: flex; justify-content: center; align-items: center; overflow: visible;\">\r\n <mat-icon\r\n (click)=\"showMenu($event)\"\r\n [matMenuTriggerFor]=\"menu\"\r\n matRipple\r\n class=\"menu_more_vert\"\r\n aria-hidden=\"false\"\r\n aria-label=\"Example delete icon\"\r\n >more_vert</mat-icon>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngFor=\"let btn of buttonsConfig\" >\r\n <button *ngIf=\"btn.condition()\" (click)=\"action(btn.action, row)\" mat-menu-item class=\"d-flex align-items-center w-100\" >\r\n <i class=\"fa {{btn.icon}} btn-accion\" style=\"font-size:120%; margin-right: 10px\"></i>\r\n {{btn.tooltip}}\r\n </button>\r\n </div>\r\n\r\n </mat-menu>\r\n </th>\r\n\r\n </tr>\r\n\r\n\r\n </tbody>\r\n\r\n </table>\r\n\r\n <div *ngIf='length == 0 && data.length == 0' style=\"margin-left: 10px;\"> <strong>No se encontr\u00F3 informaci\u00F3n</strong></div>\r\n\r\n <mat-paginator *ngIf=\"paginatorActive\"\r\n [length]=\"length\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons\r\n (page)=\"changePage($event)\"></mat-paginator>\r\n\r\n </div>\r\n\r\n<ng-template #buttonsTable let-fontSize=\"fontSize\" let-marginRight=\"marginRight\" style='flex:0.5; display:flex; flex-direction: row; justify-content: flex-end;'>\r\n <ng-container *ngFor=\"let btn of buttonsConfig\">\r\n <div *ngIf=\"btn.conditionShowHeader()\" (click)=\"action(btn.action)\" matTooltip=\"{{btn.tooltip}}\" matTooltipPosition=\"above\">\r\n <i class=\"fa {{btn.icon}} btn-accion\" [ngStyle]=\"{'font-size': fontSize ? fontSize : '170%', 'margin-right': marginRight ? marginRight : '15px'}\"></i>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".contenedor-tabla{width:100%;overflow-x:auto}.table_Eter{width:100%;margin-bottom:4px;color:primary;border-collapse:collapse}.table_Eter .dark th{color:#fff;background-color:#343a40;border-color:#454d55;text-align:center;vertical-align:middle}.table_Eter thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table_Eter th,.table_Eter td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}th{text-align:inherit}*,*:before,*:after{box-sizing:border-box}.btn-accion{cursor:pointer}mat-form-field{padding:0!important;width:100%}.filter{padding:0;margin-bottom:10px;width:100%}.filter ::ng-deep .mat-form-field-underline{bottom:3px!important}.filter ::ng-deep .mat-form-field-infix{border:0!important}.filter ::ng-deep .mat-form-field-wrapper{padding:0}.filter ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-wrapper{padding:0}.selected-row{color:#212529;background-color:#00000013}button:focus{outline:none!important}@media only screen and (max-width: 600px){.no-movil{display:none}}::ng-deep .mat-paginator{background:transparent!important}@media screen and (max-width: 400px){.filter{padding:0;margin-bottom:40px;width:70%}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i8$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i3$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i13.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i7$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: FiltersComponent, selector: "app-filters", inputs: ["headerFilters"], outputs: ["applyFilters"] }] });
|
|
1991
1991
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: DataTableComponent, decorators: [{
|
|
1992
1992
|
type: Component,
|
|
1993
|
-
args: [{ selector: 'data-table', template: "<div class=\"contenedor-tabla\">\r\n <app-filters [headerFilters]=\"headerFilters\" (applyFilters)=\"applyFilters($event)\">\r\n </app-filters>\r\n\r\n <div style='display: flex; flex-direction: row; justify-content: space-between; align-items: center;'>\r\n <div style='flex:1; font-size: 1rem;'>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>0 && selectedRows.length<2'> {{selectedRows.length}} Seleccionado </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>1'> {{selectedRows.length}} Seleccionados </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length<1 && !configuration.hideTitle'> {{title}} </p></strong>\r\n </div>\r\n\r\n <div *ngIf=\"!configuration.hideFilter\" style='flex:3; padding-right: 10px; margin-bottom: 5px;'>\r\n <mat-form-field class='filter'>\r\n <input type=\"text\" [(ngModel)]='filters' (keyup)='changeFilters()' matInput placeholder=\"Filtrar\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonsTable\"></ng-container>\r\n\r\n </div>\r\n\r\n <table class=\"table_Eter table-hover\">\r\n <thead class=\"dark\">\r\n <tr >\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'>\r\n <mat-checkbox color='primary' (change)='seletecAllEvent($event)' [(ngModel)]='selectAll' [indeterminate]='indeterminateState'> </mat-checkbox> </th>\r\n <th\r\n [class]=\"column.style?.movil\"\r\n *ngFor='let column of columns' scope=\"col\"\r\n [ngStyle]=\"column.style\"\r\n >{{column.label}}</th>\r\n <th *ngIf=\"shouldShowMenu()\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class='mat-elevation-z3'>\r\n\r\n <tr style=\"cursor: pointer;\" *ngFor='let row of data' (click)='clickOnRoW(row)' [class]=\"checkboxs[row[configuration.primaryKey]]?'selected-row':''\">\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'> <mat-checkbox color='primary' [(ngModel)]='checkboxs[row[configuration.primaryKey]]' (click)='clicked($event)' (change)='selection(row, $event)'> </mat-checkbox> </th>\r\n <th [class]='column.style?.movil' [ngStyle]='column.style' scope=\"row\" *ngFor='let column of columns'>{{ row[column.ID] }}</th>\r\n\r\n <th *ngIf=\"shouldShowMenu()\" style=\"display: flex; justify-content: center; align-items: center; overflow: visible;\">\r\n <mat-icon\r\n (click)=\"showMenu($event)\"\r\n [matMenuTriggerFor]=\"menu\"\r\n matRipple\r\n class=\"menu_more_vert\"\r\n aria-hidden=\"false\"\r\n aria-label=\"Example delete icon\"\r\n >more_vert</mat-icon>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngFor=\"let btn of buttonsConfig\" >\r\n <button *ngIf=\"btn.condition()\" (click)=\"action(btn.action, row)\" mat-menu-item class=\"d-flex align-items-center w-100\" >\r\n <i class=\"fa {{btn.icon}} btn-accion\" style=\"font-size:120%; margin-right: 10px\"></i>\r\n {{btn.tooltip}}\r\n </button>\r\n </div>\r\n\r\n </mat-menu>\r\n </th>\r\n\r\n </tr>\r\n\r\n\r\n </tbody>\r\n\r\n </table>\r\n\r\n <div *ngIf='length == 0 && data.length == 0' style=\"margin-left: 10px;\"> <strong>No se encontr\u00F3 informaci\u00F3n</strong></div>\r\n\r\n <mat-paginator *ngIf=\"paginatorActive\"\r\n [length]=\"length\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons\r\n (page)=\"changePage($event)\"></mat-paginator>\r\n\r\n </div>\r\n\r\n<ng-template #buttonsTable let-fontSize=\"fontSize\" let-marginRight=\"marginRight\" style='flex:0.5; display:flex; flex-direction: row; justify-content: flex-end;'>\r\n <ng-container *ngFor=\"let btn of buttonsConfig\">\r\n <div *ngIf=\"btn.conditionShowHeader()\" (click)=\"action(btn.action)\" matTooltip=\"{{btn.tooltip}}\" matTooltipPosition=\"above\">\r\n <i class=\"fa {{btn.icon}} btn-accion\" [ngStyle]=\"{'font-size': fontSize ? fontSize : '170%', 'margin-right': marginRight ? marginRight : '15px'}\"></i>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".contenedor-tabla{width:100%;overflow-x:auto}.table_Eter{width:100%;margin-bottom:4px;color:primary;border-collapse:collapse}.table_Eter .dark th{color:#fff;background-color:#343a40;border-color:#454d55;text-align:center;vertical-align:middle}.table_Eter thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table_Eter th,.table_Eter td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}th{text-align:inherit}*,*:before,*:after{box-sizing:border-box}.btn-accion{cursor:pointer}mat-form-field{padding:0!important;width:100%}.filter{padding:0;margin-bottom:10px;width:100%}.filter ::ng-deep .mat-form-field-underline{bottom:3px!important}.filter ::ng-deep .mat-form-field-infix{border:0!important}.filter ::ng-deep .mat-form-field-wrapper{padding:0}.filter ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-wrapper{padding:0}.selected-row{color:#212529;background-color:#00000013}button:focus{outline:none!important}@media only screen and (max-width: 600px){.no-movil{display:none}}::ng-deep .mat-paginator{background:transparent!important}@media screen and (max-width: 400px){.filter{padding:0;margin-bottom:40px;width:70%}}\n"] }]
|
|
1993
|
+
args: [{ selector: 'data-table', template: "<div class=\"contenedor-tabla\">\r\n <app-filters [headerFilters]=\"headerFilters\" (applyFilters)=\"applyFilters($event)\">\r\n </app-filters>\r\n\r\n <div style='display: flex; flex-direction: row; justify-content: space-between; align-items: center;'>\r\n <div style='flex:1; font-size: 1rem;'>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>0 && selectedRows.length<2 && configuration.selectable'> {{selectedRows.length}} Seleccionado </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length>1'> {{selectedRows.length}} Seleccionados </p></strong>\r\n <strong><p style='margin:0' *ngIf='selectedRows.length<1 && !configuration.hideTitle'> {{title}} </p></strong>\r\n </div>\r\n\r\n <div *ngIf=\"!configuration.hideFilter\" style='flex:3; padding-right: 10px; margin-bottom: 5px;'>\r\n <mat-form-field class='filter'>\r\n <input type=\"text\" [(ngModel)]='filters' (keyup)='changeFilters()' matInput placeholder=\"Filtrar\">\r\n </mat-form-field>\r\n </div>\r\n\r\n <ng-container *ngTemplateOutlet=\"buttonsTable\"></ng-container>\r\n\r\n </div>\r\n\r\n <table class=\"table_Eter table-hover\">\r\n <thead class=\"dark\">\r\n <tr >\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'>\r\n <mat-checkbox color='primary' (change)='seletecAllEvent($event)' [(ngModel)]='selectAll' [indeterminate]='indeterminateState'> </mat-checkbox> </th>\r\n <th\r\n [class]=\"column.style?.movil\"\r\n *ngFor='let column of columns' scope=\"col\"\r\n [ngStyle]=\"column.style\"\r\n >{{column.label}}</th>\r\n <th *ngIf=\"shouldShowMenu()\"></th>\r\n </tr>\r\n </thead>\r\n <tbody class='mat-elevation-z3'>\r\n\r\n <tr style=\"cursor: pointer;\" *ngFor='let row of data' (click)='clickOnRoW(row)' [class]=\"checkboxs[row[configuration.primaryKey]]?'selected-row':''\">\r\n <th *ngIf='configuration.selectable' style='justify-content: center;'> <mat-checkbox color='primary' [(ngModel)]='checkboxs[row[configuration.primaryKey]]' (click)='clicked($event)' (change)='selection(row, $event)'> </mat-checkbox> </th>\r\n <th [class]='column.style?.movil' [ngStyle]='column.style' scope=\"row\" *ngFor='let column of columns'>{{ row[column.ID] }}</th>\r\n\r\n <th *ngIf=\"shouldShowMenu()\" style=\"display: flex; justify-content: center; align-items: center; overflow: visible;\">\r\n <mat-icon\r\n (click)=\"showMenu($event)\"\r\n [matMenuTriggerFor]=\"menu\"\r\n matRipple\r\n class=\"menu_more_vert\"\r\n aria-hidden=\"false\"\r\n aria-label=\"Example delete icon\"\r\n >more_vert</mat-icon>\r\n\r\n <mat-menu #menu=\"matMenu\">\r\n <div *ngFor=\"let btn of buttonsConfig\" >\r\n <button *ngIf=\"btn.condition()\" (click)=\"action(btn.action, row)\" mat-menu-item class=\"d-flex align-items-center w-100\" >\r\n <i class=\"fa {{btn.icon}} btn-accion\" style=\"font-size:120%; margin-right: 10px\"></i>\r\n {{btn.tooltip}}\r\n </button>\r\n </div>\r\n\r\n </mat-menu>\r\n </th>\r\n\r\n </tr>\r\n\r\n\r\n </tbody>\r\n\r\n </table>\r\n\r\n <div *ngIf='length == 0 && data.length == 0' style=\"margin-left: 10px;\"> <strong>No se encontr\u00F3 informaci\u00F3n</strong></div>\r\n\r\n <mat-paginator *ngIf=\"paginatorActive\"\r\n [length]=\"length\" [pageSize]=\"pageSize\" [pageSizeOptions]=\"pageSizeOptions\" showFirstLastButtons\r\n (page)=\"changePage($event)\"></mat-paginator>\r\n\r\n </div>\r\n\r\n<ng-template #buttonsTable let-fontSize=\"fontSize\" let-marginRight=\"marginRight\" style='flex:0.5; display:flex; flex-direction: row; justify-content: flex-end;'>\r\n <ng-container *ngFor=\"let btn of buttonsConfig\">\r\n <div *ngIf=\"btn.conditionShowHeader()\" (click)=\"action(btn.action)\" matTooltip=\"{{btn.tooltip}}\" matTooltipPosition=\"above\">\r\n <i class=\"fa {{btn.icon}} btn-accion\" [ngStyle]=\"{'font-size': fontSize ? fontSize : '170%', 'margin-right': marginRight ? marginRight : '15px'}\"></i>\r\n </div>\r\n </ng-container>\r\n</ng-template>\r\n\r\n", styles: [".contenedor-tabla{width:100%;overflow-x:auto}.table_Eter{width:100%;margin-bottom:4px;color:primary;border-collapse:collapse}.table_Eter .dark th{color:#fff;background-color:#343a40;border-color:#454d55;text-align:center;vertical-align:middle}.table_Eter thead th{vertical-align:bottom;border-bottom:2px solid #dee2e6}.table_Eter th,.table_Eter td{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6}th{text-align:inherit}*,*:before,*:after{box-sizing:border-box}.btn-accion{cursor:pointer}mat-form-field{padding:0!important;width:100%}.filter{padding:0;margin-bottom:10px;width:100%}.filter ::ng-deep .mat-form-field-underline{bottom:3px!important}.filter ::ng-deep .mat-form-field-infix{border:0!important}.filter ::ng-deep .mat-form-field-wrapper{padding:0}.filter ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-wrapper{padding:0}.selected-row{color:#212529;background-color:#00000013}button:focus{outline:none!important}@media only screen and (max-width: 600px){.no-movil{display:none}}::ng-deep .mat-paginator{background:transparent!important}@media screen and (max-width: 400px){.filter{padding:0;margin-bottom:40px;width:70%}}\n"] }]
|
|
1994
1994
|
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: HttpService }, { type: MessageService }, { type: FunctionsService }, { type: i5.MatPaginatorIntl }, { type: ExportDataService }]; }, propDecorators: { title: [{
|
|
1995
1995
|
type: Input
|
|
1996
1996
|
}], columns: [{
|