@jvsoft/components 0.0.2

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.
Files changed (51) hide show
  1. package/README.md +63 -0
  2. package/dialog-flotante/dialog-flotante.component.d.ts +32 -0
  3. package/dialog-flotante/dialog-flotante.interface.d.ts +11 -0
  4. package/dialog-flotante/index.d.ts +5 -0
  5. package/dialog-flotante/public-api.d.ts +1 -0
  6. package/fesm2022/jvsoft-components-dialog-flotante.mjs +119 -0
  7. package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -0
  8. package/fesm2022/jvsoft-components-luces-navidad.mjs +33 -0
  9. package/fesm2022/jvsoft-components-luces-navidad.mjs.map +1 -0
  10. package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs +47 -0
  11. package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs.map +1 -0
  12. package/fesm2022/jvsoft-components-progress-spinner.mjs +78 -0
  13. package/fesm2022/jvsoft-components-progress-spinner.mjs.map +1 -0
  14. package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +89 -0
  15. package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -0
  16. package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +1481 -0
  17. package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -0
  18. package/fesm2022/jvsoft-components.mjs +1714 -0
  19. package/fesm2022/jvsoft-components.mjs.map +1 -0
  20. package/index.d.ts +5 -0
  21. package/luces-navidad/index.d.ts +5 -0
  22. package/luces-navidad/luces-navidad.component.d.ts +11 -0
  23. package/luces-navidad/public-api.d.ts +1 -0
  24. package/mat-suffix-search-button/index.d.ts +5 -0
  25. package/mat-suffix-search-button/mat-suffix-search-button.component.d.ts +12 -0
  26. package/mat-suffix-search-button/public-api.d.ts +1 -0
  27. package/package.json +53 -0
  28. package/progress-spinner/index.d.ts +5 -0
  29. package/progress-spinner/progress-spinner.component.d.ts +9 -0
  30. package/progress-spinner/progress-spinner.service.d.ts +25 -0
  31. package/progress-spinner/public-api.d.ts +2 -0
  32. package/src/styles.scss +3 -0
  33. package/tabla-mantenimiento/classes/data-model.d.ts +25 -0
  34. package/tabla-mantenimiento/components/progress-bar/index.d.ts +5 -0
  35. package/tabla-mantenimiento/components/progress-bar/progress-bar.component.d.ts +30 -0
  36. package/tabla-mantenimiento/components/progress-bar/public-api.d.ts +1 -0
  37. package/tabla-mantenimiento/index.d.ts +5 -0
  38. package/tabla-mantenimiento/interfaces/global/boton-mantenimiento.d.ts +41 -0
  39. package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +108 -0
  40. package/tabla-mantenimiento/interfaces/global/index.d.ts +3 -0
  41. package/tabla-mantenimiento/interfaces/global/otros.d.ts +26 -0
  42. package/tabla-mantenimiento/mat-row-keyboard-selection.directive.d.ts +19 -0
  43. package/tabla-mantenimiento/pipes/no-sanitize.pipe.d.ts +10 -0
  44. package/tabla-mantenimiento/pipes/zero-fill.pipe.d.ts +8 -0
  45. package/tabla-mantenimiento/public-api.d.ts +3 -0
  46. package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.d.ts +26 -0
  47. package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.d.ts +18 -0
  48. package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +143 -0
  49. package/tabla-mantenimiento/tabla-mantenimiento.functions.d.ts +5 -0
  50. package/tabla-mantenimiento/tabla-mantenimiento.service.d.ts +8 -0
  51. package/tabla-mantenimiento/table-util.d.ts +11 -0
@@ -0,0 +1,1481 @@
1
+ import { __decorate } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { Pipe, EventEmitter, ViewChildren, Output, Input, Optional, Component, ViewChild, HostListener, Directive, Injectable, ElementRef, ContentChildren, HostBinding } from '@angular/core';
4
+ import * as i2 from '@angular/common';
5
+ import { CommonModule, DecimalPipe } from '@angular/common';
6
+ import * as i1$1 from '@angular/forms';
7
+ import { ReactiveFormsModule, FormsModule, Validators, FormControl, FormGroup } from '@angular/forms';
8
+ import * as i3 from '@angular/material/checkbox';
9
+ import { MatCheckboxModule } from '@angular/material/checkbox';
10
+ import * as i6$1 from '@angular/material/divider';
11
+ import { MatDividerModule } from '@angular/material/divider';
12
+ import * as i4 from '@angular/material/icon';
13
+ import { MatIconModule } from '@angular/material/icon';
14
+ import * as i8 from '@angular/material/menu';
15
+ import { MatMenuModule } from '@angular/material/menu';
16
+ import * as i9 from '@angular/material/paginator';
17
+ import { MatPaginatorModule, MatPaginator, MAT_PAGINATOR_DEFAULT_OPTIONS } from '@angular/material/paginator';
18
+ import * as i5 from '@angular/material/core';
19
+ import { MatRippleModule } from '@angular/material/core';
20
+ import * as i6 from '@angular/material/sort';
21
+ import { MatSortModule, MatSort } from '@angular/material/sort';
22
+ import * as i12 from '@angular/material/table';
23
+ import { MatTableModule, MatColumnDef, MatTableDataSource, MatTable, MatFooterRow, MatRow } from '@angular/material/table';
24
+ import * as i7 from '@angular/material/tooltip';
25
+ import { MatTooltipModule } from '@angular/material/tooltip';
26
+ import { Subject, takeUntil, of, fromEvent } from 'rxjs';
27
+ import shortHash from 'shorthash2';
28
+ import { untilDestroyed, UntilDestroy } from '@ngneat/until-destroy';
29
+ import { map, filter, take } from 'rxjs/operators';
30
+ import { TemplatePortal } from '@angular/cdk/portal';
31
+ import { trigger, state, transition, style, animate } from '@angular/animations';
32
+ import * as i1 from '@angular/platform-browser';
33
+ import * as i14 from '@angular/material/badge';
34
+ import { MatBadgeModule } from '@angular/material/badge';
35
+ import moment from 'moment';
36
+ import * as XLSX from 'xlsx';
37
+ import * as i2$1 from '@angular/cdk/overlay';
38
+
39
+ class NoSanitizePipe {
40
+ domSanitizer;
41
+ constructor(domSanitizer) {
42
+ this.domSanitizer = domSanitizer;
43
+ }
44
+ transform(html) {
45
+ return this.domSanitizer.bypassSecurityTrustHtml(html);
46
+ }
47
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
48
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, isStandalone: true, name: "noSanitize" });
49
+ }
50
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, decorators: [{
51
+ type: Pipe,
52
+ args: [{ name: 'noSanitize' }]
53
+ }], ctorParameters: () => [{ type: i1.DomSanitizer }] });
54
+
55
+ class ZeroFillPipe {
56
+ transform(value, digitos, ...args) {
57
+ let s = value + '';
58
+ while (s.length < digitos) {
59
+ s = '0' + s;
60
+ }
61
+ return s;
62
+ }
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
64
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, isStandalone: true, name: "zeroFill" });
65
+ }
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, decorators: [{
67
+ type: Pipe,
68
+ args: [{
69
+ name: 'zeroFill',
70
+ }]
71
+ }] });
72
+ function zeroFill(value, digitos, ...args) {
73
+ return new ZeroFillPipe().transform(value, digitos, args);
74
+ }
75
+
76
+ class TablaMantenimientoColumnDefsComponent {
77
+ table;
78
+ cdRef;
79
+ objThis;
80
+ nombreColeccion;
81
+ colDetalle;
82
+ chkLista; // = new DataModel();
83
+ chkListaChange = new EventEmitter();
84
+ columnDef;
85
+ constructor(table, cdRef) {
86
+ this.table = table;
87
+ this.cdRef = cdRef;
88
+ console.log(this.chkLista);
89
+ // this.chkLista.checkbox.establecerTodos(true)
90
+ }
91
+ ngAfterContentInit() {
92
+ if (this.table) {
93
+ this.cdRef.detectChanges();
94
+ this.columnDef.forEach(refCol => {
95
+ this.table.addColumnDef(refCol);
96
+ });
97
+ }
98
+ }
99
+ trackByProperty(index, column) {
100
+ return column.property;
101
+ }
102
+ verTexto(row, campo, glue = ' ') {
103
+ if (typeof campo == 'string') {
104
+ return row[campo];
105
+ }
106
+ // console.log('CARGAR TEXTO');
107
+ let strFinal = '';
108
+ const arrFinal = [];
109
+ campo.forEach((c) => {
110
+ if (c.charAt(0) == '*') {
111
+ arrFinal.push(c.replace('*', ''));
112
+ }
113
+ else {
114
+ arrFinal.push((row[c] ?? '').toString().trim());
115
+ }
116
+ });
117
+ strFinal = arrFinal.join(glue);
118
+ return strFinal;
119
+ }
120
+ camposNulos(row, campos) {
121
+ let rpta = false;
122
+ campos.forEach(campo => {
123
+ if (!rpta && !row[campo]) {
124
+ rpta = true;
125
+ }
126
+ });
127
+ return rpta;
128
+ }
129
+ accionClick(column, item, event) {
130
+ if (column.click) {
131
+ column.click(item);
132
+ event.stopPropagation();
133
+ }
134
+ return false;
135
+ }
136
+ obtenerItems(columna, row) {
137
+ if (typeof columna.items === 'function') {
138
+ return columna.items(row);
139
+ }
140
+ return columna.items;
141
+ }
142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoColumnDefsComponent, deps: [{ token: i12.MatTable, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
143
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "19.1.7", type: TablaMantenimientoColumnDefsComponent, isStandalone: true, selector: "jvs-tabla-mantenimiento-column-defs", inputs: { objThis: "objThis", nombreColeccion: "nombreColeccion", colDetalle: "colDetalle", chkLista: ["chkLista", "chkLista", (value) => WritableStream] }, outputs: { chkListaChange: "chkListaChange" }, viewQueries: [{ propertyName: "columnDef", predicate: MatColumnDef, descendants: true }], ngImport: i0, template: "<ng-content></ng-content>\n\n\n\n<ng-container *ngFor=\"let column of colDetalle; trackBy: trackByProperty\">\n\n <ng-container *ngIf=\"column.type === 'expandir'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef class=\"w-4\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" class=\"w-4 text-center\" mat-cell>\n <button type=\"button\" class=\"boton-circular text-primary-contrast bg-primary mat-elevation-z2\" matRipple\n *ngIf=\"column.click\"\n (click)=\"column.click(row); row.isExpanded = !row.isExpanded; $event.stopPropagation()\"\n matTooltip=\"Expandir / Contraer\">\n <mat-icon class=\"icon-xs\" [svgIcon]=\"(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')\"></mat-icon>\n </button>\n <button type=\"button\" class=\"boton-circular text-primary-contrast bg-primary mat-elevation-z2\" matRipple\n *ngIf=\"!column.click\"\n (click)=\"row.isExpanded = !row.isExpanded; $event.stopPropagation()\"\n matTooltip=\"Expandir / Contraer\">\n <mat-icon class=\"icon-xs\" [svgIcon]=\"(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')\"></mat-icon>\n </button>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'checkbox'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"w-4 text-center\" mat-header-cell>\n\n <mat-checkbox *ngIf=\"chkLista\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"chkLista.checkbox.establecerTodos($event.checked)\"\n [indeterminate]=\"chkLista.checkbox.algunosActivos\"\n [checked]=\"chkLista.checkbox.todosActivos\"\n ></mat-checkbox>\n </th>\n <td *matCellDef=\"let row\" class=\"w-4 text-center\" mat-cell>\n\n <mat-checkbox *ngIf=\"chkLista\"\n (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"chkLista.modelosChk[chkLista.generarId(row, (column.chkField ?? column.property), column.chkFieldSeparador)]\"\n [ngModelOptions]=\"{standalone: true}\"\n ></mat-checkbox>\n\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'text' || column.type === 'estiloEstablecido'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" >\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n <span *ngIf=\"column.type == 'estiloEstablecido'\" class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </th>\n <ng-container *ngIf=\"column.innerHTML; else sinInnerHTML\">\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(column, row, $event)\">\n <div [class]=\"column.text?.cssContenedor\" [ngStyle]=\"column.text?.cssStyle\" class=\"hover:!max-h-max\" [innerHTML]=\"column.innerHTML(row) | noSanitize\">\n\n </div>\n </td>\n </ng-container>\n <ng-template #sinInnerHTML>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <!--\t\t\t<span *ngIf=\"column.property && !column.textArray\">{{ row[column.property] }}</span>-->\n <!--\t\t\t<span *ngIf=\"column.property && column.textArray\">{{ verTexto(row, column.textArray) }}</span>-->\n <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : (column.textArray ? verTexto(row, column.textArray) : row[column.property])) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: itm, class: column.textCss, row: row }\"></ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #campoTextNormal>\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : (column.textArray ? verTexto(row, column.textArray) : row[column.property])), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n <span *ngIf=\"column.type == 'estiloEstablecido'\" class=\"text-red-900 font-bold\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </td>\n </ng-template>\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n </th>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'text_rows'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <p *ngFor=\"let fila of column.text_rows\" style=\"font: unset; letter-spacing: unset\">\n <ng-container *ngIf=\"row[fila.value]\">\n <ng-container *ngIf=\"fila.siCampoNulo && camposNulos(row, fila.siCampoNulo)\">\n <span [ngClass]=\"fila.cssLabelClasses\" *ngIf=\"fila.label\">{{ fila.label }}:</span><br *ngIf=\"fila.salto\">\n <ng-template [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: fila, tipo: fila.valueType || 'text', value: (fila.textArray ? verTexto(row, fila.textArray) : row[fila.value]), format: fila.valueFormat, class: fila.cssValueClasses }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!fila.siCampoNulo\">\n <span [ngClass]=\"fila.cssLabelClasses\" *ngIf=\"fila.label\">{{ fila.label }}:</span><br *ngIf=\"fila.salto\">\n <ng-template [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: fila, tipo: fila.valueType || 'text', value: (fila.textArray ? verTexto(row, fila.textArray) : row[fila.value]), format: fila.valueFormat, class: fila.cssValueClasses }\"></ng-template>\n </ng-container>\n </ng-container>\n </p>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'money'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" class=\"text-right\" mat-cell>\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'money', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row, format: (column.format ?? '1.2-2') }\"></ng-template>\n </td>\n <td *matFooterCellDef class=\"text-right\" [ngClass]=\"column.cssFooterClasses\" mat-cell>\n\t\t\t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\" [class.text-red-700]=\"column.transformarFooter() < 0\"\n >\n\t\t\t\t\t<span>{{ column.transformarFooter() | currency: column.simboloMoneda ?? 'S/' }}</span>\n\t\t\t\t</span>\n </td>\n </ng-container>\n <ng-container *ngIf=\"column.type === 'number'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n\t\t\t\t<span *ngIf=\"column.property && row[column.property]\" class=\"!text-indigo-900 font-semibold\">\n\t\t\t\t\t<span *ngIf=\"column.zeroFill\">{{ row[column.property] | zeroFill: column.zeroFill }}</span>\n\t\t\t\t\t<span *ngIf=\"!column.zeroFill\">{{ row[column.property] | number: (column.format ? column.format : '1.0-2') }}</span>\n\t\t\t\t</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'date'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell><span *ngIf=\"column.property\">{{ row[column.property] | date: (column.format ? column.format : 'dd/MM/yyyy') }}</span></td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icon'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <ng-container [ngSwitch]=\"row[column.property]\">\n <ng-container *ngFor=\"let opc of column.opcSwitchIcon.casos\">\n <mat-icon *ngSwitchCase=\"opc.case\" [ngClass]=\"opc.cssClasses\" style=\"height: unset; width: unset;\" [svgIcon]=\"opc.icon\"\n [matTooltip]=\"opc.campoTooltip ? row[opc.campoTooltip] : (opc.tooltip ?? '')\" [matTooltipDisabled]=\"!opc.tooltip && !opc.campoTooltip\"\n class=\"icon-sm\"></mat-icon>\n </ng-container>\n <ng-container *ngIf=\"column.opcSwitchIcon.default\">\n <div *ngSwitchDefault></div>\n </ng-container>\n </ng-container>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icon_checkbox'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" [ngClass]=\"column.headerCssClasses\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <mat-icon [svgIcon]=\"(row[column.property] == 1 ? 'checkboxChecked20Regular' : 'checkboxUnchecked20Regular' )\" class=\"icon-sm\"></mat-icon>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'progress'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" [ngClass]=\"column.headerCssClasses\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n<!-- <jvsoft-progress-bar\n [textoCentrado]=\"column.progressbar.textoCentrado\"\n [porcentaje]=\"(column.progressbar.porcentaje(row))\"\n [coloresValor]=\"column.progressbar.coloresValor\"\n [formatoNumero]=\"column.progressbar.formatoNumero\"\n [textoMostrar]=\"column.progressbar.textoMostrar ? column.progressbar.textoMostrar(row) : undefined\"\n ></jvsoft-progress-bar>-->\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'buttons'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n\n <div class=\"flex\">\n <ng-container *ngFor=\"let field of column.fields\">\n <a *ngIf=\"field.href && row[field.campo]\"\n [href]=\"field.href.pre + row[field.campo]\"\n [target]=\"field.href.target ? field.href.target : '_self'\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n <a *ngIf=\"!field.fnClick && !field.href && row[field.campo]\"\n (click)=\"$event.stopPropagation()\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n <a *ngIf=\"field.fnClick && row[field.campo]\"\n (click)=\"objThis[field.fnClick](row, field.fnClickData); $event.stopPropagation()\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n </ng-container>\n </div>\n\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icons'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <div class=\"flex items-center justify-center\" [ngClass]=\"{ '-space-x-1': !column.iconsDef?.soloIcono }\"\n >\n <ng-container *ngFor=\"let icon of obtenerItems(column.iconsDef, row)\">\n <ng-container *ngIf=\"!column.iconsDef?.soloIcono; else soloIcono\">\n <button matRipple type=\"button\" *ngIf=\"!icon.esVisible || icon.esVisible(row)\"\n (click)=\"icon.click ? icon.click(row) : false;\"\n class=\"flex items-center justify-center p-1 rounded border shadow-sm hover:shadow-lg\"\n [ngClass]=\"icon.contentCss\"\n [matTooltip]=\"icon.toolTip ?? row[icon.toolTipField ?? '_field_']\"\n [matTooltipDisabled]=\"!icon.toolTip && !icon.toolTipField\"\n >\n <ng-container [ngTemplateOutlet]=\"iconoConTamanio\" [ngTemplateOutletContext]=\"{icon: icon.icon, iconClass: icon.cssClass, size: (icon.iconSize ?? column.iconsDef?.iconSize)}\"></ng-container>\n </button>\n </ng-container>\n <ng-template #soloIcono>\n <div *ngIf=\"!icon.esVisible || icon.esVisible(row)\" [ngClass]=\"icon.contentCss\"\n class=\"flex items-center\"\n [matTooltip]=\"icon.toolTip ?? row[icon.toolTipField ?? '_field_']\"\n [matTooltipDisabled]=\"!icon.toolTip && !icon.toolTipField\"\n >\n <ng-container [ngTemplateOutlet]=\"iconoConTamanio\" [ngTemplateOutletContext]=\"{icon: icon.icon, iconClass: icon.cssClass, size: (icon.iconSize ?? column.iconsDef?.iconSize)}\"></ng-container>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <span class=\"cdk-visually-hidden\" *ngIf=\"column.innerHTMLInvisible\" [innerHTML]=\"column.innerHTMLInvisible(row)\"></span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n </ng-container>\n\n\n</ng-container>\n\n<ng-template #tipoDatoString let-row=\"row\" let-fila=\"fila\" let-tipo=\"tipo\" let-value=\"value\" let-format=\"format\" let-clase=\"class\">\n <ng-container [ngSwitch]=\"tipo\">\n <ng-container *ngSwitchCase=\"'text'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\">\n <span *ngIf=\"!fila.zeroFill\">{{ value }}</span>\n <span *ngIf=\"fila.zeroFill\">{{ value | zeroFill: fila.zeroFill }}</span>\n </span></ng-container>\n <ng-container *ngSwitchCase=\"'date'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | date: (format || 'dd/MM/yyyy') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'number'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | number: (format || '0.0-2') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'money'\"><span [ngClass]=\"clase\"\n [class.text-sky-700]=\"(value * 1) >= 0\" [class.text-red-700]=\"(value * 1) < 0\"\n *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | number: (format || '1.2-2') }}</span></ng-container>\n\n <!--\t\t<span [ngClass]=\"class\" *ngSwitchCase=\"'date'\">{{ value | date: (format || 'dd/MM/yyyy') }}</span>-->\n <!--\t\t<span [ngClass]=\"class\" *ngSwitchCase=\"'number'\">{{ value | number: (format || '0.0-2') }}</span>-->\n </ng-container>\n</ng-template>\n\n<ng-template #iconoConTamanio let-icon=\"icon\" let-iconClass=\"iconClass\" let-size=\"size\">\n <mat-icon *ngIf=\"size\" [svgIcon]=\"icon\" [ngClass]=\"iconClass\" [inline]=\"true\"\n [style.font-size]=\"size\"\n [style.height]=\"size\"\n [style.width]=\"size\"\n ></mat-icon>\n <mat-icon *ngIf=\"!size\" [svgIcon]=\"icon\" [ngClass]=\"iconClass\"></mat-icon>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }, { kind: "pipe", type: i2.CurrencyPipe, name: "currency" }, { kind: "pipe", type: i2.DatePipe, name: "date" }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i5.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "component", type: i6.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i12.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i12.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i12.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i12.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i12.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i12.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i12.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: NoSanitizePipe, name: "noSanitize" }, { kind: "pipe", type: ZeroFillPipe, name: "zeroFill" }] });
144
+ }
145
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoColumnDefsComponent, decorators: [{
146
+ type: Component,
147
+ args: [{ selector: 'jvs-tabla-mantenimiento-column-defs', standalone: true, imports: [
148
+ CommonModule,
149
+ MatCheckboxModule,
150
+ MatIconModule,
151
+ MatRippleModule,
152
+ MatSortModule,
153
+ MatTableModule,
154
+ MatTooltipModule,
155
+ ReactiveFormsModule,
156
+ FormsModule,
157
+ NoSanitizePipe,
158
+ ZeroFillPipe,
159
+ ], template: "<ng-content></ng-content>\n\n\n\n<ng-container *ngFor=\"let column of colDetalle; trackBy: trackByProperty\">\n\n <ng-container *ngIf=\"column.type === 'expandir'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef class=\"w-4\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" class=\"w-4 text-center\" mat-cell>\n <button type=\"button\" class=\"boton-circular text-primary-contrast bg-primary mat-elevation-z2\" matRipple\n *ngIf=\"column.click\"\n (click)=\"column.click(row); row.isExpanded = !row.isExpanded; $event.stopPropagation()\"\n matTooltip=\"Expandir / Contraer\">\n <mat-icon class=\"icon-xs\" [svgIcon]=\"(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')\"></mat-icon>\n </button>\n <button type=\"button\" class=\"boton-circular text-primary-contrast bg-primary mat-elevation-z2\" matRipple\n *ngIf=\"!column.click\"\n (click)=\"row.isExpanded = !row.isExpanded; $event.stopPropagation()\"\n matTooltip=\"Expandir / Contraer\">\n <mat-icon class=\"icon-xs\" [svgIcon]=\"(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')\"></mat-icon>\n </button>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'checkbox'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"w-4 text-center\" mat-header-cell>\n\n <mat-checkbox *ngIf=\"chkLista\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"chkLista.checkbox.establecerTodos($event.checked)\"\n [indeterminate]=\"chkLista.checkbox.algunosActivos\"\n [checked]=\"chkLista.checkbox.todosActivos\"\n ></mat-checkbox>\n </th>\n <td *matCellDef=\"let row\" class=\"w-4 text-center\" mat-cell>\n\n <mat-checkbox *ngIf=\"chkLista\"\n (click)=\"$event.stopPropagation()\"\n [(ngModel)]=\"chkLista.modelosChk[chkLista.generarId(row, (column.chkField ?? column.property), column.chkFieldSeparador)]\"\n [ngModelOptions]=\"{standalone: true}\"\n ></mat-checkbox>\n\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'text' || column.type === 'estiloEstablecido'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" >\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n <span *ngIf=\"column.type == 'estiloEstablecido'\" class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </th>\n <ng-container *ngIf=\"column.innerHTML; else sinInnerHTML\">\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(column, row, $event)\">\n <div [class]=\"column.text?.cssContenedor\" [ngStyle]=\"column.text?.cssStyle\" class=\"hover:!max-h-max\" [innerHTML]=\"column.innerHTML(row) | noSanitize\">\n\n </div>\n </td>\n </ng-container>\n <ng-template #sinInnerHTML>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <!--\t\t\t<span *ngIf=\"column.property && !column.textArray\">{{ row[column.property] }}</span>-->\n <!--\t\t\t<span *ngIf=\"column.property && column.textArray\">{{ verTexto(row, column.textArray) }}</span>-->\n <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : (column.textArray ? verTexto(row, column.textArray) : row[column.property])) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: itm, class: column.textCss, row: row }\"></ng-template>\n </ng-container>\n </div>\n </ng-container>\n <ng-template #campoTextNormal>\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : (column.textArray ? verTexto(row, column.textArray) : row[column.property])), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n <span *ngIf=\"column.type == 'estiloEstablecido'\" class=\"text-red-900 font-bold\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </td>\n </ng-template>\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n </th>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'text_rows'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <p *ngFor=\"let fila of column.text_rows\" style=\"font: unset; letter-spacing: unset\">\n <ng-container *ngIf=\"row[fila.value]\">\n <ng-container *ngIf=\"fila.siCampoNulo && camposNulos(row, fila.siCampoNulo)\">\n <span [ngClass]=\"fila.cssLabelClasses\" *ngIf=\"fila.label\">{{ fila.label }}:</span><br *ngIf=\"fila.salto\">\n <ng-template [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: fila, tipo: fila.valueType || 'text', value: (fila.textArray ? verTexto(row, fila.textArray) : row[fila.value]), format: fila.valueFormat, class: fila.cssValueClasses }\"></ng-template>\n </ng-container>\n <ng-container *ngIf=\"!fila.siCampoNulo\">\n <span [ngClass]=\"fila.cssLabelClasses\" *ngIf=\"fila.label\">{{ fila.label }}:</span><br *ngIf=\"fila.salto\">\n <ng-template [ngTemplateOutlet]=\"tipoDatoString\" [ngTemplateOutletContext]=\"{ fila: fila, tipo: fila.valueType || 'text', value: (fila.textArray ? verTexto(row, fila.textArray) : row[fila.value]), format: fila.valueFormat, class: fila.cssValueClasses }\"></ng-template>\n </ng-container>\n </ng-container>\n </p>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'money'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" class=\"text-right\" mat-cell>\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'money', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row, format: (column.format ?? '1.2-2') }\"></ng-template>\n </td>\n <td *matFooterCellDef class=\"text-right\" [ngClass]=\"column.cssFooterClasses\" mat-cell>\n\t\t\t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\" [class.text-red-700]=\"column.transformarFooter() < 0\"\n >\n\t\t\t\t\t<span>{{ column.transformarFooter() | currency: column.simboloMoneda ?? 'S/' }}</span>\n\t\t\t\t</span>\n </td>\n </ng-container>\n <ng-container *ngIf=\"column.type === 'number'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n\t\t\t\t<span *ngIf=\"column.property && row[column.property]\" class=\"!text-indigo-900 font-semibold\">\n\t\t\t\t\t<span *ngIf=\"column.zeroFill\">{{ row[column.property] | zeroFill: column.zeroFill }}</span>\n\t\t\t\t\t<span *ngIf=\"!column.zeroFill\">{{ row[column.property] | number: (column.format ? column.format : '1.0-2') }}</span>\n\t\t\t\t</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'date'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell mat-sort-header [disabled]=\"column.sort === false\" > <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell><span *ngIf=\"column.property\">{{ row[column.property] | date: (column.format ? column.format : 'dd/MM/yyyy') }}</span></td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icon'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <ng-container [ngSwitch]=\"row[column.property]\">\n <ng-container *ngFor=\"let opc of column.opcSwitchIcon.casos\">\n <mat-icon *ngSwitchCase=\"opc.case\" [ngClass]=\"opc.cssClasses\" style=\"height: unset; width: unset;\" [svgIcon]=\"opc.icon\"\n [matTooltip]=\"opc.campoTooltip ? row[opc.campoTooltip] : (opc.tooltip ?? '')\" [matTooltipDisabled]=\"!opc.tooltip && !opc.campoTooltip\"\n class=\"icon-sm\"></mat-icon>\n </ng-container>\n <ng-container *ngIf=\"column.opcSwitchIcon.default\">\n <div *ngSwitchDefault></div>\n </ng-container>\n </ng-container>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icon_checkbox'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" [ngClass]=\"column.headerCssClasses\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <mat-icon [svgIcon]=\"(row[column.property] == 1 ? 'checkboxChecked20Regular' : 'checkboxUnchecked20Regular' )\" class=\"icon-sm\"></mat-icon>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'progress'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" [ngClass]=\"column.headerCssClasses\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n<!-- <jvsoft-progress-bar\n [textoCentrado]=\"column.progressbar.textoCentrado\"\n [porcentaje]=\"(column.progressbar.porcentaje(row))\"\n [coloresValor]=\"column.progressbar.coloresValor\"\n [formatoNumero]=\"column.progressbar.formatoNumero\"\n [textoMostrar]=\"column.progressbar.textoMostrar ? column.progressbar.textoMostrar(row) : undefined\"\n ></jvsoft-progress-bar>-->\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'buttons'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n\n <div class=\"flex\">\n <ng-container *ngFor=\"let field of column.fields\">\n <a *ngIf=\"field.href && row[field.campo]\"\n [href]=\"field.href.pre + row[field.campo]\"\n [target]=\"field.href.target ? field.href.target : '_self'\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n <a *ngIf=\"!field.fnClick && !field.href && row[field.campo]\"\n (click)=\"$event.stopPropagation()\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n <a *ngIf=\"field.fnClick && row[field.campo]\"\n (click)=\"objThis[field.fnClick](row, field.fnClickData); $event.stopPropagation()\"\n [matTooltip]=\"row[field.campo]\"\n class=\"w-6 h-6 btn-rounded-30 {{field.class}}\"\n >\n <mat-icon [svgIcon]=\"field.icono\" class=\"icon-sm\"></mat-icon>\n </a>\n </ng-container>\n </div>\n\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n\n </ng-container>\n <ng-container *ngIf=\"column.type === 'icons'\" [matColumnDef]=\"column.property\" [stickyEnd]=\"column.stickyEnd\" [sticky]=\"column.sticky\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase\" mat-header-cell> <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span></th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n <div class=\"flex items-center justify-center\" [ngClass]=\"{ '-space-x-1': !column.iconsDef?.soloIcono }\"\n >\n <ng-container *ngFor=\"let icon of obtenerItems(column.iconsDef, row)\">\n <ng-container *ngIf=\"!column.iconsDef?.soloIcono; else soloIcono\">\n <button matRipple type=\"button\" *ngIf=\"!icon.esVisible || icon.esVisible(row)\"\n (click)=\"icon.click ? icon.click(row) : false;\"\n class=\"flex items-center justify-center p-1 rounded border shadow-sm hover:shadow-lg\"\n [ngClass]=\"icon.contentCss\"\n [matTooltip]=\"icon.toolTip ?? row[icon.toolTipField ?? '_field_']\"\n [matTooltipDisabled]=\"!icon.toolTip && !icon.toolTipField\"\n >\n <ng-container [ngTemplateOutlet]=\"iconoConTamanio\" [ngTemplateOutletContext]=\"{icon: icon.icon, iconClass: icon.cssClass, size: (icon.iconSize ?? column.iconsDef?.iconSize)}\"></ng-container>\n </button>\n </ng-container>\n <ng-template #soloIcono>\n <div *ngIf=\"!icon.esVisible || icon.esVisible(row)\" [ngClass]=\"icon.contentCss\"\n class=\"flex items-center\"\n [matTooltip]=\"icon.toolTip ?? row[icon.toolTipField ?? '_field_']\"\n [matTooltipDisabled]=\"!icon.toolTip && !icon.toolTipField\"\n >\n <ng-container [ngTemplateOutlet]=\"iconoConTamanio\" [ngTemplateOutletContext]=\"{icon: icon.icon, iconClass: icon.cssClass, size: (icon.iconSize ?? column.iconsDef?.iconSize)}\"></ng-container>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <span class=\"cdk-visually-hidden\" *ngIf=\"column.innerHTMLInvisible\" [innerHTML]=\"column.innerHTMLInvisible(row)\"></span>\n </td>\n <td *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell></td>\n </ng-container>\n\n\n</ng-container>\n\n<ng-template #tipoDatoString let-row=\"row\" let-fila=\"fila\" let-tipo=\"tipo\" let-value=\"value\" let-format=\"format\" let-clase=\"class\">\n <ng-container [ngSwitch]=\"tipo\">\n <ng-container *ngSwitchCase=\"'text'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\">\n <span *ngIf=\"!fila.zeroFill\">{{ value }}</span>\n <span *ngIf=\"fila.zeroFill\">{{ value | zeroFill: fila.zeroFill }}</span>\n </span></ng-container>\n <ng-container *ngSwitchCase=\"'date'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | date: (format || 'dd/MM/yyyy') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'number'\"><span [ngClass]=\"clase\" *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | number: (format || '0.0-2') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'money'\"><span [ngClass]=\"clase\"\n [class.text-sky-700]=\"(value * 1) >= 0\" [class.text-red-700]=\"(value * 1) < 0\"\n *ngIf=\"value\" (click)=\"accionClick(fila, row, $event)\" >{{ value | number: (format || '1.2-2') }}</span></ng-container>\n\n <!--\t\t<span [ngClass]=\"class\" *ngSwitchCase=\"'date'\">{{ value | date: (format || 'dd/MM/yyyy') }}</span>-->\n <!--\t\t<span [ngClass]=\"class\" *ngSwitchCase=\"'number'\">{{ value | number: (format || '0.0-2') }}</span>-->\n </ng-container>\n</ng-template>\n\n<ng-template #iconoConTamanio let-icon=\"icon\" let-iconClass=\"iconClass\" let-size=\"size\">\n <mat-icon *ngIf=\"size\" [svgIcon]=\"icon\" [ngClass]=\"iconClass\" [inline]=\"true\"\n [style.font-size]=\"size\"\n [style.height]=\"size\"\n [style.width]=\"size\"\n ></mat-icon>\n <mat-icon *ngIf=\"!size\" [svgIcon]=\"icon\" [ngClass]=\"iconClass\"></mat-icon>\n</ng-template>\n" }]
160
+ }], ctorParameters: () => [{ type: i12.MatTable, decorators: [{
161
+ type: Optional
162
+ }] }, { type: i0.ChangeDetectorRef }], propDecorators: { objThis: [{
163
+ type: Input
164
+ }], nombreColeccion: [{
165
+ type: Input
166
+ }], colDetalle: [{
167
+ type: Input
168
+ }], chkLista: [{
169
+ type: Input,
170
+ args: [{ transform: (value) => WritableStream }]
171
+ }], chkListaChange: [{
172
+ type: Output
173
+ }], columnDef: [{
174
+ type: ViewChildren,
175
+ args: [MatColumnDef]
176
+ }] } });
177
+
178
+ class TablaMantenimientoMenuComponent {
179
+ objThis;
180
+ nombreColeccion;
181
+ item;
182
+ derechosActuales;
183
+ // @Input() modalPrincipal;
184
+ // @Input() botonDisabled = (btn: BotonMantenimiento, item: any) => [];
185
+ opcionSelecionada = new EventEmitter();
186
+ menu;
187
+ subItems;
188
+ botonTemplate;
189
+ constructor() {
190
+ }
191
+ ngOnInit() {
192
+ }
193
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
194
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: TablaMantenimientoMenuComponent, isStandalone: true, selector: "jvs-tabla-mantenimiento-menu", inputs: { objThis: "objThis", nombreColeccion: "nombreColeccion", item: "item", derechosActuales: "derechosActuales", subItems: "subItems", botonTemplate: "botonTemplate" }, outputs: { opcionSelecionada: "opcionSelecionada" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["menu"], descendants: true, static: true }], ngImport: i0, template: "<mat-menu #menu=\"matMenu\">\n <div class=\"mat-menu bg-white rounded mat-elevation-z8 shadow botonesContextual w-full\">\n <ng-container *ngFor=\"let btn of subItems\">\n <ng-container *ngTemplateOutlet=\"botonTemplate; context:{btn: btn, item: objThis['seleccionados'][nombreColeccion], barraSuperior: false}\"></ng-container>\n </ng-container>\n </div>\n</mat-menu>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }] });
195
+ }
196
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoMenuComponent, decorators: [{
197
+ type: Component,
198
+ args: [{ selector: 'jvs-tabla-mantenimiento-menu', standalone: true, imports: [
199
+ CommonModule,
200
+ MatMenuModule,
201
+ ], template: "<mat-menu #menu=\"matMenu\">\n <div class=\"mat-menu bg-white rounded mat-elevation-z8 shadow botonesContextual w-full\">\n <ng-container *ngFor=\"let btn of subItems\">\n <ng-container *ngTemplateOutlet=\"botonTemplate; context:{btn: btn, item: objThis['seleccionados'][nombreColeccion], barraSuperior: false}\"></ng-container>\n </ng-container>\n </div>\n</mat-menu>\n" }]
202
+ }], ctorParameters: () => [], propDecorators: { objThis: [{
203
+ type: Input
204
+ }], nombreColeccion: [{
205
+ type: Input
206
+ }], item: [{
207
+ type: Input
208
+ }], derechosActuales: [{
209
+ type: Input
210
+ }], opcionSelecionada: [{
211
+ type: Output
212
+ }], menu: [{
213
+ type: ViewChild,
214
+ args: ['menu', { static: true }]
215
+ }], subItems: [{
216
+ type: Input,
217
+ args: [{ required: true }]
218
+ }], botonTemplate: [{
219
+ type: Input,
220
+ args: [{ required: true }]
221
+ }] } });
222
+
223
+ function buscarEnArray(coleccion, idBuscar, dato) {
224
+ if (!Array.isArray(coleccion) || coleccion.length === 0)
225
+ return null; // 🔹 Validación de entrada
226
+ return Array.isArray(idBuscar)
227
+ ? coleccion.find(item => idBuscar.every((campo, idx) => item[campo] === dato[idx])) || null
228
+ : coleccion.find(item => item[idBuscar] === dato) || null;
229
+ }
230
+ function formatearFecha(val, hora = '00:00:00') {
231
+ if (val) {
232
+ if (val.length <= 10) {
233
+ val = val + ' ' + hora;
234
+ }
235
+ return new Date(val);
236
+ }
237
+ return val;
238
+ }
239
+ function esNumero(value) {
240
+ return !isNaN(Number(value));
241
+ }
242
+ function capitalizarTexto(texto) {
243
+ texto = texto.replace(/_/g, ' ');
244
+ texto = texto.replace(/-/g, ' ');
245
+ const textoCortado = texto.split(' ');
246
+ const nText = [];
247
+ textoCortado.forEach(textActual => {
248
+ nText.push(textActual.charAt(0).toUpperCase() + textActual.slice(1));
249
+ });
250
+ return nText.join(' ');
251
+ }
252
+ function getBrowserName() {
253
+ const agent = window.navigator.userAgent.toLowerCase();
254
+ switch (true) {
255
+ case agent.indexOf('edge') > -1:
256
+ return 'edge';
257
+ case agent.indexOf('opr') > -1 && !!window.opr:
258
+ return 'opera';
259
+ case agent.indexOf('chrome') > -1 && !!window.chrome:
260
+ return 'chrome';
261
+ case agent.indexOf('trident') > -1:
262
+ return 'ie';
263
+ case agent.indexOf('firefox') > -1:
264
+ return 'firefox';
265
+ case agent.indexOf('safari') > -1:
266
+ return 'safari';
267
+ default:
268
+ return 'other';
269
+ }
270
+ }
271
+
272
+ class DataModel {
273
+ modelosChk = {}; // Usar any para valores dinámicos
274
+ checkbox;
275
+ constructor() {
276
+ this.checkbox = new ForCheckboxModel(this);
277
+ }
278
+ generarId(row, campoValor, separador = '') {
279
+ if (typeof campoValor == 'string') {
280
+ campoValor = [campoValor];
281
+ }
282
+ return campoValor.map(data => row[data]).join(separador);
283
+ }
284
+ // Agrega controles al objeto modelosChk
285
+ agregarControles(lista, idLista, limpiar = true, campoValor = null, campoValorSeparador = '') {
286
+ if (limpiar) {
287
+ this.modelosChk = {};
288
+ }
289
+ const asignarValor = (dat, idLista, campoValor, key) => {
290
+ if (!key) {
291
+ key = dat[idLista] + (campoValor.includes('.') ? '' : `.${campoValor}`);
292
+ }
293
+ const mat = campoValor.match(/^([in])[A-Z][a-zA-Z]+/);
294
+ if (mat) {
295
+ this.modelosChk[key] = dat[campoValor] * 1;
296
+ }
297
+ else {
298
+ this.modelosChk[key] = dat[campoValor];
299
+ }
300
+ };
301
+ lista.forEach(dat => {
302
+ if (campoValor === null) {
303
+ // Caso 1: Sin campoValor, se asigna false
304
+ this.modelosChk[dat[idLista]] = false;
305
+ }
306
+ else if (typeof campoValor === 'string') {
307
+ // Caso 2: campoValor es un string
308
+ asignarValor(dat, idLista, campoValor, dat[idLista]);
309
+ }
310
+ else if (campoValorSeparador) {
311
+ const idStr = this.generarId(dat, campoValor, campoValorSeparador);
312
+ // Caso 2: campoValor es un string
313
+ asignarValor(dat, idLista, '.', idStr);
314
+ }
315
+ else {
316
+ // Caso 3: campoValor es un array de strings
317
+ campoValor.forEach(data => asignarValor(dat, idLista, data));
318
+ }
319
+ });
320
+ }
321
+ // Establece el estado de un índice
322
+ setState(idx, state) {
323
+ this.modelosChk[idx] = state;
324
+ }
325
+ // Obtiene el estado de un índice
326
+ getState(idx) {
327
+ return this.modelosChk[idx];
328
+ }
329
+ getDataMultiple(idx) {
330
+ const camposMod = Object.keys(this.modelosChk).filter(key => key.split('.')[0] == idx);
331
+ const vRet = {};
332
+ camposMod.forEach(key => {
333
+ vRet[key.split('.')[1]] = this.modelosChk[key];
334
+ });
335
+ return vRet;
336
+ }
337
+ // Genera una lista basada en el estado de los índices
338
+ generarLista(tipoRetorno = null, esCampoNumerico = false) {
339
+ const strLista = [];
340
+ const objLista = {};
341
+ Object.keys(this.modelosChk).forEach(key => {
342
+ if ((esCampoNumerico && esNumero(this.modelosChk[key])) ||
343
+ (this.modelosChk[key])) {
344
+ strLista.push(key);
345
+ objLista[key] = this.modelosChk[key];
346
+ }
347
+ });
348
+ if (tipoRetorno === 'array') {
349
+ return strLista;
350
+ }
351
+ if (tipoRetorno === 'object') {
352
+ return objLista;
353
+ }
354
+ return strLista.join(',');
355
+ }
356
+ generarFormGroupFromModelosChk(tipo) {
357
+ const formGroupObj = {};
358
+ let validadores = [];
359
+ if (tipo == 'number') {
360
+ validadores = [
361
+ Validators.required,
362
+ Validators.min(1)
363
+ ];
364
+ }
365
+ Object.keys(this.modelosChk).forEach(key => {
366
+ formGroupObj[key] = new FormControl(this.modelosChk[key], validadores);
367
+ });
368
+ return new FormGroup(formGroupObj);
369
+ // return this.formBuilder.group(formGroupObj);
370
+ }
371
+ }
372
+ class ForCheckboxModel {
373
+ modeloCheck;
374
+ constructor(modeloCheck) {
375
+ this.modeloCheck = modeloCheck;
376
+ }
377
+ get cantidadActivos() {
378
+ return Object.values(this.modeloCheck.modelosChk).filter(Boolean).length;
379
+ }
380
+ get existenActivados() {
381
+ return this.cantidadActivos > 0;
382
+ }
383
+ get todosActivos() {
384
+ const total = Object.keys(this.modeloCheck.modelosChk).length;
385
+ const activos = this.cantidadActivos;
386
+ return activos > 0 && total === activos;
387
+ }
388
+ get algunosActivos() {
389
+ const total = Object.keys(this.modeloCheck.modelosChk).length;
390
+ const activos = this.cantidadActivos;
391
+ return activos > 0 && total !== activos;
392
+ }
393
+ establecerTodos(activo) {
394
+ Object.keys(this.modeloCheck.modelosChk).forEach(idx => this.modeloCheck.modelosChk[idx] = activo);
395
+ }
396
+ }
397
+
398
+ const getFileName = (name) => {
399
+ const timeSpan = new Date().toISOString();
400
+ const sheetName = name || 'ExportResult';
401
+ const fileName = `${sheetName}-${timeSpan}`;
402
+ return {
403
+ sheetName,
404
+ fileName
405
+ };
406
+ };
407
+ class TableUtil {
408
+ static exportTableToExcelV2(targetTableElm, name) {
409
+ const { sheetName, fileName } = getFileName(name);
410
+ console.log(targetTableElm);
411
+ const wb = XLSX.utils.table_to_book(targetTableElm, {
412
+ sheet: sheetName
413
+ });
414
+ XLSX.writeFile(wb, `${fileName}.xlsx`);
415
+ }
416
+ static exportTableToExcel(tableId, name) {
417
+ const { sheetName, fileName } = getFileName(name);
418
+ const targetTableElm = document.getElementById(tableId);
419
+ console.log(targetTableElm);
420
+ const wb = XLSX.utils.table_to_book(targetTableElm, {
421
+ sheet: sheetName
422
+ });
423
+ // XLSX.writeFile(wb, `${fileName}.xlsx`);
424
+ }
425
+ static exportArrayToExcel(arr, name) {
426
+ const { sheetName, fileName } = getFileName(name);
427
+ const wb = XLSX.utils.book_new();
428
+ const ws = XLSX.utils.json_to_sheet(arr, { dateNF: 'dd/MM/yyyy' });
429
+ XLSX.utils.book_append_sheet(wb, ws, sheetName);
430
+ XLSX.writeFile(wb, `${fileName}.xlsx`);
431
+ }
432
+ static getWorkBook(htmlTableId, data) {
433
+ const targetTableElm = document.getElementById(htmlTableId);
434
+ const tableToSheet = XLSX.utils.table_to_sheet(targetTableElm, { raw: true });
435
+ const jsonToSheet = XLSX.utils.json_to_sheet(data);
436
+ const sheetToJson = XLSX.utils.sheet_to_json(tableToSheet);
437
+ return { tableToSheet, jsonToSheet, sheetToJson };
438
+ }
439
+ }
440
+
441
+ class MatRowKeyboardSelectionDirective {
442
+ el;
443
+ rows;
444
+ renderedData;
445
+ tabla; // Entrada: Referencia a la tabla
446
+ rowModel; // Entrada: Modelo de fila actual
447
+ seleccionarSiguiente = new EventEmitter(); // Salida: Evento al seleccionar siguiente
448
+ unsubscriber$ = new Subject();
449
+ constructor(el) {
450
+ this.el = el;
451
+ }
452
+ ngOnInit() {
453
+ // Asignar tabindex si no está definido
454
+ if (this.el.nativeElement.tabIndex < 0) {
455
+ this.el.nativeElement.tabIndex = 0;
456
+ }
457
+ // Obtener la fuente de datos de la tabla
458
+ const dataSource = this.tabla.dataSource;
459
+ // Suscribirse a los cambios en los datos
460
+ dataSource.connect().pipe(takeUntil(this.unsubscriber$)).subscribe(data => {
461
+ this.renderedData = data;
462
+ this.rows = Array.from(this.getTableRows());
463
+ });
464
+ }
465
+ ngOnDestroy() {
466
+ // Finalizar la suscripción al destruir la directiva
467
+ this.unsubscriber$.next(null);
468
+ this.unsubscriber$.complete();
469
+ }
470
+ onKeydown(event) {
471
+ var element = event.target;
472
+ if (element.tagName === "INPUT") {
473
+ event.stopPropagation();
474
+ }
475
+ else {
476
+ const currentIndex = this.renderedData.findIndex(row => row === this.rowModel);
477
+ const eRef = event.target;
478
+ this.rows = this.rows.filter(elem => elem.hasAttribute('id'));
479
+ const arrayFilas = Array.from(this.rows);
480
+ const fElem = arrayFilas.filter(elem => elem.id == eRef.id).pop();
481
+ const cElemIdx = arrayFilas.findIndex(elem => elem == fElem);
482
+ let newRow;
483
+ // Controlar las teclas presionadas
484
+ switch (event.key) {
485
+ case 'ArrowDown':
486
+ newRow = this.rows[cElemIdx + 1];
487
+ break;
488
+ case 'ArrowUp':
489
+ newRow = this.rows[cElemIdx - 1];
490
+ break;
491
+ case 'Enter':
492
+ case ' ':
493
+ this.seleccionarSiguiente.next(this.renderedData[currentIndex]);
494
+ event.preventDefault();
495
+ break;
496
+ }
497
+ // Enfocar la nueva fila seleccionada
498
+ if (newRow) {
499
+ newRow.classList.add('estaFocus');
500
+ newRow.focus();
501
+ }
502
+ }
503
+ }
504
+ getTableRows() {
505
+ let el = this.el.nativeElement;
506
+ // Recorrer los elementos padres hasta encontrar la tabla
507
+ while (el && el.parentNode) {
508
+ el = el.parentNode;
509
+ // Verificar si es una tabla de material
510
+ if (el.tagName && el.tagName.toLowerCase() === 'mat-table' || el.hasAttribute('mat-table')) {
511
+ return el.querySelectorAll('mat-row, tr[mat-row]');
512
+ }
513
+ }
514
+ return undefined;
515
+ }
516
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MatRowKeyboardSelectionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
517
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.7", type: MatRowKeyboardSelectionDirective, isStandalone: true, selector: "[matRowKeyboardSelection]", inputs: { tabla: ["matRowKeyboardSelection", "tabla"], rowModel: "rowModel" }, outputs: { seleccionarSiguiente: "seleccionarSiguiente" }, host: { listeners: { "keydown": "onKeydown($event)" } }, ngImport: i0 });
518
+ }
519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MatRowKeyboardSelectionDirective, decorators: [{
520
+ type: Directive,
521
+ args: [{
522
+ selector: '[matRowKeyboardSelection]'
523
+ }]
524
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { tabla: [{
525
+ type: Input,
526
+ args: ['matRowKeyboardSelection']
527
+ }], rowModel: [{
528
+ type: Input
529
+ }], seleccionarSiguiente: [{
530
+ type: Output
531
+ }], onKeydown: [{
532
+ type: HostListener,
533
+ args: ['keydown', ['$event']]
534
+ }] } });
535
+
536
+ class TablaMantenimientoService {
537
+ get templateBotonesComunes() {
538
+ return [
539
+ { icono: 'roundAdd', tipo: 'nuevo', class: 'text-green-100 !bg-green-600', sinCondicion: true },
540
+ { icono: 'roundEdit', tipo: 'editar', class: 'text-amber-900 !bg-amber-300' },
541
+ { icono: 'roundDelete', tipo: 'eliminar', class: 'text-red-100 !bg-red-700' },
542
+ { icono: 'roundDelete', tipo: 'eliminar_fila', class: 'text-red-100 !bg-red-700' },
543
+ { icono: 'roundPrint', tipo: 'imprimir', class: '!bg-blue-100 text-blue-700' },
544
+ { icono: 'roundDownload', tipo: 'descargar', class: '!bg-blue-100 text-blue-700' },
545
+ { icono: 'roundFolder', tipo: 'ver_archivos', class: '!bg-green-100 text-green-700' },
546
+ { icono: 'fa5FilePdf', tipo: 'exportar_pdf', label: 'Exportar a PDF', class: 'bg-pdf-light text-pdf' },
547
+ { icono: 'fa5FileExcel', tipo: 'exportar_excel', label: 'Exportar a Excel', class: 'bg-excel-light text-excel' },
548
+ { icono: 'fa5sFileExport', tipo: 'exportacion_avanzada', label: 'Exportación Avanzada', class: '!text-indigo-600 !bg-indigo-100' },
549
+ { icono: 'icSave', tipo: 'guardar', class: '!text-indigo-100 !bg-indigo-600' },
550
+ { icono: 'icCancel', tipo: 'cancelar', class: '!text-cyan-100 !bg-cyan-600' },
551
+ {
552
+ icono: 'roundFactCheck', tipo: 'seleccionar',
553
+ class: 'text-blue-100 bg-blue-700 dark:text-blue-100 dark:bg-blue-700'
554
+ },
555
+ { icono: 'roundListAlt', tipo: 'detalle', class: 'text-blue-100 bg-blue-700 dark:text-blue-100 dark:bg-blue-700' },
556
+ { icono: 'roundPublic', tipo: 'ver_mapa', class: 'text-blue-100 bg-blue-700 dark:text-blue-100 dark:bg-blue-700' },
557
+ { icono: 'icCheck', tipo: 'activar', },
558
+ { icono: 'icClose', tipo: 'desactivar', },
559
+ { icono: 'fa5sLock', tipo: 'cerrar', },
560
+ { icono: 'fa5sLockOpen', tipo: 'abrir', },
561
+ ];
562
+ }
563
+ get templateColumnasTabla() {
564
+ return [
565
+ { label: '#', labelLista: 'Numeración', property: 'numeracion_automatica', type: 'numeracion_automatica' },
566
+ ];
567
+ }
568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
569
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoService, providedIn: 'root' });
570
+ }
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoService, decorators: [{
572
+ type: Injectable,
573
+ args: [{
574
+ providedIn: 'root',
575
+ }]
576
+ }] });
577
+
578
+ var TablaMantenimientoComponent_1;
579
+ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
580
+ static { TablaMantenimientoComponent_1 = this; }
581
+ fb;
582
+ overlay;
583
+ viewContainerRef;
584
+ tablaMantenimientoService;
585
+ cdRef;
586
+ static nextId = 0;
587
+ id = `jvs-tabla-mantenimiento-id-${TablaMantenimientoComponent_1.nextId++}`;
588
+ get templateBotonesComunes() {
589
+ return this.tablaMantenimientoService.templateBotonesComunes;
590
+ }
591
+ ;
592
+ get templateColumnasTabla() {
593
+ return this.tablaMantenimientoService.templateColumnasTabla;
594
+ }
595
+ ;
596
+ virtualScroll = false;
597
+ itemSize = 48;
598
+ headerize = 48;
599
+ placeholderHeight = 0;
600
+ dataSuscription;
601
+ objThis;
602
+ nombreColeccion;
603
+ ctrlBusquedaValue = '';
604
+ ctrlBusquedaPlaceholder = 'Buscar...';
605
+ filtroCampos = true;
606
+ paginador = true;
607
+ esTabla = true;
608
+ readOnly = false;
609
+ filaExtraHeader;
610
+ filaFooter = false;
611
+ botonesCRUD = 'CUD';
612
+ dblclickItem = new EventEmitter();
613
+ objBotonesCRUD = [
614
+ { tipo: 'nuevo', sinCondicion: true },
615
+ { tipo: 'editar' },
616
+ { tipo: 'eliminar' },
617
+ ];
618
+ classSeleccionado = ['elemento-seleccionado', /*'!bg-primary-activo','text-primary-contrast', */ 'mat-elevation-z8', /*'dark:!bg-primary-dark-activo',*/ 'border-y-2 border-primary-contrast', 'font-bold', 'text-2xl'];
619
+ // @Input() classAnulado = ['line-through', 'text-red', 'italic'];
620
+ classAnulado = ['elemento-anulado', /*'line-through', */ 'text-red-900', 'bg-red-200'];
621
+ campoAnulado = null;
622
+ campoAnuladoMensaje = null;
623
+ opcionSelecionada = new EventEmitter();
624
+ opcBusqueda = new EventEmitter();
625
+ accionRecargar = new EventEmitter();
626
+ isRecargarUsed = false;
627
+ filaExtraTemplate;
628
+ paginator;
629
+ sort;
630
+ exportarExcel = true;
631
+ // MIO
632
+ pageSize = 25;
633
+ pageSizeOptions = [5, 10, 25, 50, 100, 500, 1000];
634
+ dataSourceChange = new EventEmitter();
635
+ resultados = new EventEmitter();
636
+ resultadosConLabel = new EventEmitter();
637
+ dataFiltro = new EventEmitter();
638
+ // FIN FILTRO BUSQUEDA
639
+ dataSource = new MatTableDataSource(); // or whatever type of datasource you have
640
+ // this is where the magic happens:
641
+ table;
642
+ columnDefs;
643
+ componenteCargadoTotalmente = false;
644
+ /////////////////////
645
+ paginacion = {
646
+ pageSize: 25,
647
+ pageSizeOptions: [],
648
+ pageCurrent: null,
649
+ pageIndex: 0,
650
+ pageLength: null,
651
+ };
652
+ // All that's left is to add them to the table ourselves:
653
+ ignorarDerechos = false;
654
+ derechosActuales = null;
655
+ // listaCRUD: BotonMantenimiento[] = [];
656
+ rows;
657
+ rowFooter;
658
+ mouseEvent$;
659
+ overlayRef;
660
+ userMenu;
661
+ // FILTRO BUSQUEDA
662
+ opcFiltroActual = {};
663
+ capitalizarTexto = capitalizarTexto;
664
+ cCampoBusqueda = new FormControl('');
665
+ chkLista = new DataModel();
666
+ constructor(fb, overlay, viewContainerRef, tablaMantenimientoService, cdRef) {
667
+ this.fb = fb;
668
+ this.overlay = overlay;
669
+ this.viewContainerRef = viewContainerRef;
670
+ this.tablaMantenimientoService = tablaMantenimientoService;
671
+ this.cdRef = cdRef;
672
+ }
673
+ _ctrlBusqueda = '';
674
+ get ctrlBusqueda() {
675
+ return this._ctrlBusqueda;
676
+ }
677
+ set ctrlBusqueda(val) {
678
+ if (val == '') {
679
+ val = 'simple';
680
+ }
681
+ this._ctrlBusqueda = val;
682
+ }
683
+ // @Input() leyenda;
684
+ _leyenda = undefined;
685
+ get leyenda() {
686
+ return this._leyenda;
687
+ }
688
+ set leyenda(val) {
689
+ if (typeof val == 'string') {
690
+ this._leyenda = { text: val };
691
+ }
692
+ else {
693
+ this._leyenda = val;
694
+ }
695
+ }
696
+ // @Input() idTabla: string[];
697
+ _idTabla = [];
698
+ get idTabla() {
699
+ return this._idTabla;
700
+ }
701
+ set idTabla(val) {
702
+ if (Array.isArray(val)) {
703
+ this._idTabla = val;
704
+ }
705
+ else {
706
+ this._idTabla.push(val);
707
+ }
708
+ }
709
+ _columnasTabla = [];
710
+ get columnasTabla() {
711
+ return this._columnasTabla ?? [];
712
+ }
713
+ set columnasTabla(val) {
714
+ const reemplazarConTemplate = (listaInicial = []) => {
715
+ listaInicial.forEach((btnActual, idx) => {
716
+ const btnEnTemplate = buscarEnArray(this.templateColumnasTabla, 'property', btnActual.property);
717
+ if (btnEnTemplate) {
718
+ listaInicial[idx] = {
719
+ ...btnEnTemplate,
720
+ ...btnActual
721
+ };
722
+ }
723
+ if (!!!listaInicial[idx].text) {
724
+ listaInicial[idx].text = {
725
+ cssStyle: {}
726
+ };
727
+ }
728
+ else if (!!!listaInicial[idx].text.cssStyle) {
729
+ listaInicial[idx].text.cssStyle = {};
730
+ }
731
+ listaInicial[idx].text.cssStyle = { ...listaInicial[idx].text.cssStyle, ...{ 'max-height': this.itemSize + 'px' } };
732
+ if (btnActual.type == 'custom') {
733
+ listaInicial[idx]['visibleAlias'] = listaInicial[idx].visible ?? true;
734
+ listaInicial[idx].visible = false;
735
+ }
736
+ });
737
+ return listaInicial;
738
+ };
739
+ this._columnasTabla = val ? reemplazarConTemplate(val) : [];
740
+ }
741
+ // @Input() botonesMenu: BotonMantenimiento[] = [];
742
+ _botonesMenu = {
743
+ crud: undefined,
744
+ principal: [],
745
+ izquierda: [],
746
+ derecha: [],
747
+ secundario: [],
748
+ inferior: [],
749
+ };
750
+ get botonesMenu() {
751
+ return this._botonesMenu;
752
+ }
753
+ get botonesMenuFinal() {
754
+ const nuevoBotonesMenu = this.botonesMenu;
755
+ // Iteramos sobre cada sección de botones
756
+ Object.keys(nuevoBotonesMenu).forEach(seccion => {
757
+ nuevoBotonesMenu[seccion] = nuevoBotonesMenu[seccion]?.filter((boton) => {
758
+ if (this.readOnly) {
759
+ if (boton.subItems) {
760
+ boton.subItems = boton.subItems.filter((subItem) => subItem.ignorarReadOnly === true);
761
+ return boton.subItems.length < 1;
762
+ }
763
+ return boton.ignorarReadOnly === true;
764
+ }
765
+ return true;
766
+ }); // Filtramos los botones nulos
767
+ });
768
+ return nuevoBotonesMenu;
769
+ }
770
+ set botonesMenu(val) {
771
+ const reemplazarConTemplate = (listaInicial = []) => listaInicial.map((btnActual) => {
772
+ const btnEnTemplate = buscarEnArray(this.templateBotonesComunes, 'tipo', btnActual.tipoTemplate ?? btnActual.tipo);
773
+ if (btnEnTemplate) {
774
+ if (btnActual.tipoTemplate && !btnActual.label) {
775
+ btnEnTemplate.label = undefined;
776
+ }
777
+ if (btnActual.subItems) {
778
+ return { ...btnEnTemplate, ...btnActual, seccion: this.nombreColeccion, subItems: reemplazarConTemplate(btnActual.subItems) };
779
+ }
780
+ return { ...btnEnTemplate, ...btnActual, seccion: this.nombreColeccion };
781
+ }
782
+ return btnActual;
783
+ });
784
+ if (val?.crud) {
785
+ this.objBotonesCRUD = this.templateBotonesComunes
786
+ .filter(obj => ['nuevo', 'editar', 'eliminar'].includes(obj.tipo))
787
+ .map(obj => val.crud?.find(o => o.tipo === obj.tipo) ?? obj);
788
+ }
789
+ Object.keys(val).forEach(btnKey => {
790
+ if (val[btnKey]) {
791
+ val[btnKey] = reemplazarConTemplate(val[btnKey]);
792
+ }
793
+ });
794
+ this._botonesMenu = { ...this._botonesMenu, ...val };
795
+ }
796
+ get listaMenuCompleto() {
797
+ let menuTotal = [];
798
+ menuTotal = menuTotal.concat(this.botonesMenu.izquierda ?? []);
799
+ menuTotal = menuTotal.concat(this.botonesMenu.crud ?? []);
800
+ menuTotal = menuTotal.concat(this.botonesMenu.principal ?? []);
801
+ menuTotal = menuTotal.concat(this.botonesMenu.derecha ?? []);
802
+ menuTotal = menuTotal.concat(this.botonesMenu.secundario ?? []);
803
+ menuTotal = menuTotal.concat(this.botonesMenu.inferior ?? []);
804
+ return menuTotal;
805
+ }
806
+ get objVisibleColumns() {
807
+ return this.columnasTabla.filter(column => {
808
+ if (column.visible == undefined) {
809
+ column.visible = true;
810
+ }
811
+ if (this.filaExtraTemplate) {
812
+ column.sort = false;
813
+ }
814
+ if (column.esVisible != undefined) {
815
+ column.visible = column.esVisible();
816
+ }
817
+ if (column.noMostrar != undefined) {
818
+ column.visible = !column.noMostrar();
819
+ }
820
+ return column.visible;
821
+ });
822
+ }
823
+ get visibleColumns() {
824
+ return this.objVisibleColumns.map(column => column.property);
825
+ }
826
+ get tieneCheckbox() {
827
+ return this.columnasTabla && this.columnasTabla.length > 0 && this.columnasTabla.find(col => col.type === 'checkbox') || false;
828
+ }
829
+ get objSeleccionado() {
830
+ return this.objThis?.['seleccionados']?.[this.nombreColeccion];
831
+ }
832
+ set objSeleccionado(val) {
833
+ if (!this.objThis) {
834
+ this.objThis = {};
835
+ }
836
+ if (!this.objThis['seleccionados']) {
837
+ this.objThis['seleccionados'] = {};
838
+ }
839
+ this.objThis['seleccionados'][this.nombreColeccion] = val;
840
+ }
841
+ get idsSeleccionado() {
842
+ return this.chkLista.generarLista();
843
+ }
844
+ idTablaValor(data) {
845
+ if (data) {
846
+ if (this.idTabla.length < 1) {
847
+ return shortHash(JSON.stringify({ data, claseFinal: undefined }));
848
+ }
849
+ return this.idTabla.map(d => data[d]).join('-');
850
+ }
851
+ return '';
852
+ }
853
+ condicionesClaseFila = (item) => [];
854
+ ngOnInit() {
855
+ // this.sharedService.dataRutaActual$.pipe(untilDestroyed(this)).subscribe(datRouteData => {
856
+ // if (datRouteData) {
857
+ // this.derechosActuales = datRouteData['derechos'];
858
+ // if (!this.ignorarDerechos) {
859
+ // this.ignorarDerechos = datRouteData['ignorarDerechos'] ?? false;
860
+ // }
861
+ // }
862
+ // });
863
+ this.paginacion.pageSize = this.pageSize;
864
+ this.paginacion.pageSizeOptions = this.pageSizeOptions;
865
+ this.actualizarCrud();
866
+ this.agregarBotonesExportacion();
867
+ if (this.dataSuscription) {
868
+ this.dataSuscription.subscribe(res => {
869
+ if (res) {
870
+ if (this.objSeleccionado) {
871
+ if (this.idTabla && this.idTabla.length > 0) {
872
+ const arrayData = this.idTabla.map(d => this.objSeleccionado[d]);
873
+ // console.log(arrayData);
874
+ const busqueda = buscarEnArray(res, this.idTabla, arrayData);
875
+ if (busqueda) {
876
+ console.log(busqueda);
877
+ this.objSeleccionado = busqueda;
878
+ }
879
+ }
880
+ else {
881
+ const dataStr = res.find((itm) => shortHash(JSON.stringify({
882
+ ...itm, claseFinal: undefined
883
+ })) == shortHash(JSON.stringify({ ...this.objSeleccionado, claseFinal: undefined })));
884
+ if (dataStr) {
885
+ this.objSeleccionado = dataStr;
886
+ }
887
+ }
888
+ }
889
+ this.setData(res);
890
+ }
891
+ });
892
+ }
893
+ this.isRecargarUsed = this.accionRecargar.observed;
894
+ }
895
+ ngAfterContentInit() {
896
+ this.componenteCargadoTotalmente = true;
897
+ this.cdRef.detectChanges();
898
+ this.columnDefs.forEach(columnDef => {
899
+ const col = this.columnasTabla.find(col => col.property == columnDef.name);
900
+ if (col) {
901
+ col.visible = col['visibleAlias'] ?? col.visible;
902
+ if (col['visibleAlias']) {
903
+ delete col['visibleAlias'];
904
+ // col['visibleAlias'] = undefined;
905
+ }
906
+ }
907
+ this.table.addColumnDef(columnDef);
908
+ // this.cdRef.detectChanges();
909
+ });
910
+ // console.log(a);
911
+ if (this.ctrlBusquedaValue) {
912
+ this.cCampoBusqueda.setValue(this.ctrlBusquedaValue);
913
+ }
914
+ }
915
+ ngOnChanges(changes) {
916
+ if (changes['botonesCRUD'] || changes['ctrlBusqueda']) {
917
+ this.actualizarCrud();
918
+ }
919
+ if (changes['botonesMenu']) {
920
+ this.agregarBotonesExportacion();
921
+ }
922
+ }
923
+ trackByFn(index, item) {
924
+ return this.nombreColeccion + '_' + this.idTablaValor(item);
925
+ }
926
+ agregarBotonesExportacion() {
927
+ const fnAddBoton = (condicion, tipoBoton) => {
928
+ if (condicion) {
929
+ const objBoton = buscarEnArray(this.templateBotonesComunes, 'tipo', tipoBoton);
930
+ const objBotonEnInferior = buscarEnArray((this.botonesMenu?.inferior ?? []), 'tipo', tipoBoton);
931
+ if (!objBotonEnInferior && objBoton) {
932
+ if (!this.botonesMenu.inferior) {
933
+ this.botonesMenu.inferior = [];
934
+ }
935
+ this.botonesMenu?.inferior?.push({
936
+ ...objBoton,
937
+ esIndependiente: true,
938
+ });
939
+ }
940
+ }
941
+ };
942
+ fnAddBoton((this.exportarExcel && this.esTabla), 'exportar_excel');
943
+ }
944
+ actualizarCrud() {
945
+ const operacionesCRUD = {
946
+ 'C': 'nuevo',
947
+ 'U': 'editar',
948
+ 'D': 'eliminar'
949
+ };
950
+ const agregarBoton = (tipo) => {
951
+ let botonComun = buscarEnArray(this.templateBotonesComunes, 'tipo', tipo);
952
+ if (botonComun) {
953
+ const personalizado = buscarEnArray(this.objBotonesCRUD, 'tipo', tipo);
954
+ const boton = personalizado ? { ...botonComun, ...personalizado } : botonComun;
955
+ if (this.botonesMenu.crud) {
956
+ this.botonesMenu.crud.push(boton);
957
+ }
958
+ }
959
+ };
960
+ const lstCRUD = (this.botonesMenu.crud ?? []).map(i => i.tipo);
961
+ if (lstCRUD.length > 0) {
962
+ for (const operacion of (this.botonesCRUD || "").toUpperCase()) {
963
+ const operacionKey = operacion;
964
+ if (lstCRUD.includes(operacion) && operacionesCRUD[operacionKey]) {
965
+ agregarBoton(operacionesCRUD[operacionKey]);
966
+ }
967
+ }
968
+ }
969
+ else {
970
+ this.botonesMenu.crud = [];
971
+ for (const operacion of (this.botonesCRUD || "").toUpperCase()) {
972
+ const operacionKey = operacion;
973
+ if (operacionesCRUD[operacionKey]) {
974
+ agregarBoton(operacionesCRUD[operacionKey]);
975
+ }
976
+ }
977
+ }
978
+ if (this.ctrlBusqueda === 'simple') {
979
+ this.cCampoBusqueda.valueChanges.pipe(untilDestroyed(this)).subscribe(value => this.onFilterChange(value ?? ''));
980
+ }
981
+ if (this.botonesCRUD === '-') {
982
+ this.botonesMenu.crud = [];
983
+ }
984
+ }
985
+ classFila(item) {
986
+ let claseFinal = [];
987
+ if (this.campoAnulado && (item[this.campoAnulado] == 1)) {
988
+ claseFinal = claseFinal.concat(this.classAnulado);
989
+ }
990
+ if (this.objSeleccionado == item) {
991
+ claseFinal = claseFinal.concat(this.classSeleccionado);
992
+ }
993
+ claseFinal = claseFinal.concat(this.condicionesClaseFila(item));
994
+ item.claseFinal = claseFinal;
995
+ return claseFinal;
996
+ }
997
+ subItemsActivos(btn, item) {
998
+ return btn.subItems.filter((sub) => !sub.esVisible || sub.esVisible(item)).length > 0;
999
+ }
1000
+ get noData() {
1001
+ if (!this.esTabla) {
1002
+ return of(true);
1003
+ }
1004
+ if (!this.dataSource || !this.table) {
1005
+ return of(true);
1006
+ }
1007
+ // @ts-ignore
1008
+ return this.table.dataSource?.connect().pipe(map(data => data?.length === 0));
1009
+ }
1010
+ onFilterChange(value) {
1011
+ if (!this.dataSource) {
1012
+ return;
1013
+ }
1014
+ value = value.trim();
1015
+ value = value.toLowerCase();
1016
+ this.dataSource.filter = value;
1017
+ }
1018
+ toggleColumnVisibility(column, event) {
1019
+ event.stopPropagation();
1020
+ event.stopImmediatePropagation();
1021
+ column.visible = !column.visible;
1022
+ }
1023
+ cargarData(retorno = false) {
1024
+ if (this.ctrlBusqueda && this.ctrlBusqueda == 'simple') {
1025
+ if (!retorno) {
1026
+ this.dataSource.paginator = this.paginator;
1027
+ this.dataSource.sort = this.sort;
1028
+ }
1029
+ const aS = this.dataSource?.data;
1030
+ if ((!aS || !aS[0] || !aS[0]['iTotalRegistros'])) {
1031
+ return false;
1032
+ }
1033
+ }
1034
+ const dPag = {
1035
+ iPaginacion: 1,
1036
+ iPageSize: this.paginator?.pageSize ? this.paginator?.pageSize : this.paginacion.pageCurrent?.pageSize,
1037
+ iPageNumber: (this.paginator?.pageIndex ? this.paginator?.pageIndex : 0) + 1,
1038
+ };
1039
+ if (this.ctrlBusqueda && this.ctrlBusqueda == 'query') {
1040
+ dPag['cCampoBusqueda'] = this.cCampoBusqueda.value;
1041
+ }
1042
+ if (retorno) {
1043
+ return dPag;
1044
+ }
1045
+ this.resultados.emit(dPag);
1046
+ this.opcBusqueda.emit(dPag);
1047
+ }
1048
+ // FIN FILTRO BUSQUEDA INTEGRAR
1049
+ setData(data) {
1050
+ this.dataSource = new MatTableDataSource(data);
1051
+ this.dataSource.sortingDataAccessor = (item, property) => {
1052
+ const dColumn = buscarEnArray(this.columnasTabla, 'property', property);
1053
+ if (dColumn) {
1054
+ switch (dColumn.sortType ?? dColumn.type) {
1055
+ case 'number':
1056
+ return item[property] * 1;
1057
+ case 'date':
1058
+ return formatearFecha(item[property]);
1059
+ }
1060
+ }
1061
+ if (item) {
1062
+ switch (property) {
1063
+ case 'fromDate':
1064
+ return new Date(item['fromDate']);
1065
+ default:
1066
+ return item[property];
1067
+ }
1068
+ }
1069
+ };
1070
+ // this.paginator.length = (data && data[0] && data[0]['iTotalRegistros']) ? data[0]['iTotalRegistros'] : data.length;
1071
+ // this.dataSource.paginator = this.paginator;
1072
+ if (this.sort) {
1073
+ this.dataSource.sort = this.sort;
1074
+ }
1075
+ // this.dataSource.filter = this.filter;
1076
+ this.dataSourceChange.emit(this.dataSource);
1077
+ // this.dataSource.paginator.pageSize = this.paginacion.pageSize;
1078
+ if (data && data[0] && data[0]['iPageNumber']) {
1079
+ this.paginacion.pageIndex = (data && data[0] && data[0]['iPageNumber']) ? data[0]['iPageNumber'] : 0;
1080
+ }
1081
+ this.paginacion.pageLength = (data && data[0] && data[0]['iTotalRegistros']) ? data[0]['iTotalRegistros'] : data.length;
1082
+ if (data && data[0] && !data[0]['iTotalRegistros']) {
1083
+ this.dataSource.paginator = this.paginator;
1084
+ }
1085
+ if (this.tieneCheckbox) {
1086
+ this.chkLista.agregarControles(data, this.tieneCheckbox.property, !this.tieneCheckbox.chkFieldPersistente, (this.tieneCheckbox.chkField ?? null), this.tieneCheckbox.chkFieldSeparador);
1087
+ }
1088
+ }
1089
+ botonDisabled(btn, item) {
1090
+ let disabled;
1091
+ if (!btn.sinCondicion) {
1092
+ if (btn.estaDeshabilitado) {
1093
+ disabled = btn.estaDeshabilitado(item, this);
1094
+ }
1095
+ else {
1096
+ disabled = !this.objSeleccionado;
1097
+ }
1098
+ }
1099
+ if (!disabled && !btn.esIndependiente && !btn.ignorarDerecho && this.derechosActuales) {
1100
+ // if (!this.usuarioService.esEquipoJVSoft()) {
1101
+ disabled = !(this.derechosActuales[btn.cDerechoCodigo ?? btn.tipo]);
1102
+ // }
1103
+ }
1104
+ return disabled;
1105
+ }
1106
+ opcMenu(item, objMenu, modal = null, retorno = false) {
1107
+ console.log(objMenu);
1108
+ // let salir = this.readOnly;
1109
+ // if (salir && this.readOnly === 'permitirSeleccion' && ['ver', 'seleccionar'].includes(objMenu.tipo)) {
1110
+ // salir = false;
1111
+ // }
1112
+ // if (salir) {
1113
+ // return false;
1114
+ // }
1115
+ // console.warn(objMenu);
1116
+ if (objMenu.tipo == 'exportar_excel' && this.exportarExcel) {
1117
+ /*
1118
+ TableUtil.exportArrayToExcel(this.dataSource.data.map(x => {
1119
+ const columnasNumeros = this.objVisibleColumns.filter(column => ['money', 'number'].includes(column.type));
1120
+ columnasNumeros.forEach(columna => {
1121
+ x[columna.property] *= 1;
1122
+ });
1123
+ return x;
1124
+ }), 'TEST');
1125
+ */
1126
+ const dataGeneradoPorHtml = TableUtil.getWorkBook('tabla_' + this.nombreColeccion, []);
1127
+ const objetosExtraidos = this.dataSource.filteredData.map((objeto, idx) => this.objVisibleColumns.reduce((acumulador, columna) => {
1128
+ // console.log(propiedad);
1129
+ const nColumn = (columna.labelLista ?? columna.label).toUpperCase().replace('<BR>', ' ');
1130
+ switch (columna.type) {
1131
+ case 'date':
1132
+ // acumulador[nColumn] = (new DatePipe('es-PE')).transform(objeto[columna.property], 'dd/MM/yyyy' /*'yyyy-MM-dd'*/);
1133
+ // new Date(dateString.replace(/(\d{2}:\d{2}:\d{2}):\w{2}/, '$1'));
1134
+ // acumulador[nColumn] = new Date(objeto[columna.property].replace(/(\d{2}:\d{2}:\d{2}):\w{2}/, '$1'));
1135
+ // acumulador[nColumn] = formatearFechaFormato(objeto[columna.property], 'dd/MM/yyyy');
1136
+ // acumulador[nColumn] = formatearFechaTimezone(objeto[columna.property]);
1137
+ // acumulador[nColumn] = new Date(objeto[columna.property]);
1138
+ let fecha = objeto[columna.property];
1139
+ if (objeto[columna.property]) {
1140
+ fecha = new Date(objeto[columna.property].replace(/(\d{2}:\d{2}:\d{2}):\w{2}/, '$1'));
1141
+ if (getBrowserName() == 'chrome') {
1142
+ fecha = moment(objeto[columna.property], true).add(2, 'minutes').toDate();
1143
+ }
1144
+ }
1145
+ acumulador[nColumn] = fecha;
1146
+ // acumulador[nColumn] = objeto[columna.property];
1147
+ break;
1148
+ case 'number':
1149
+ case 'money':
1150
+ acumulador[nColumn] = objeto[columna.property] * 1;
1151
+ break;
1152
+ default:
1153
+ if (columna.property == 'numeracion_automatica') {
1154
+ acumulador[nColumn] = idx + 1;
1155
+ }
1156
+ else {
1157
+ if (columna.type == 'custom') {
1158
+ // dataGeneradoPorHtml.sheetToJson
1159
+ acumulador[nColumn] = dataGeneradoPorHtml.sheetToJson[idx][columna.label];
1160
+ }
1161
+ else {
1162
+ if (columna.innerHTML) {
1163
+ const convertirHtmlATexto = (html) => {
1164
+ const elementoTemporal = document.createElement('div');
1165
+ elementoTemporal.innerHTML = html;
1166
+ return elementoTemporal.textContent || "";
1167
+ };
1168
+ acumulador[nColumn] = convertirHtmlATexto(columna.innerHTML(objeto));
1169
+ }
1170
+ else if (columna.transformar) {
1171
+ acumulador[nColumn] = columna.transformar(objeto);
1172
+ }
1173
+ else {
1174
+ acumulador[nColumn] = objeto[columna.property];
1175
+ }
1176
+ }
1177
+ }
1178
+ break;
1179
+ }
1180
+ return acumulador;
1181
+ }, {}));
1182
+ // TableUtil.exportTableToExcel('tabla_' + this.nombreColeccion);
1183
+ // console.log(objetosExtraidos);
1184
+ TableUtil.exportArrayToExcel(objetosExtraidos, this.nombreColeccion);
1185
+ // this.tableExporter.exportTable('xlsx', {fileName: 'JVSoftExport'});
1186
+ }
1187
+ const opAdic = { seccion: this.nombreColeccion };
1188
+ if (item) {
1189
+ opAdic['item'] = item;
1190
+ }
1191
+ if (this.tieneCheckbox) {
1192
+ // itmsSeleccionados = this.formulariosGlobalesService.generarLista(this.nombreColeccion);
1193
+ opAdic['idsSeleccionados'] = this.idsSeleccionado;
1194
+ }
1195
+ // opAdic['refTabla'] = this;
1196
+ objMenu = { ...objMenu, ...opAdic };
1197
+ if (retorno) {
1198
+ return objMenu;
1199
+ }
1200
+ // console.warn(objMenu);
1201
+ this.opcionSelecionada.emit(objMenu);
1202
+ return 1;
1203
+ }
1204
+ emitirResultados(evento = {}) {
1205
+ this.opcFiltroActual = { ...this.opcFiltroActual, ...evento, ...this.cargarData(true) };
1206
+ // console.warn('resultadosFILTRO', this.opcFiltroActual);
1207
+ this.resultados.emit(this.opcFiltroActual);
1208
+ }
1209
+ abrirMenuContextual({ x, y }, user) {
1210
+ // console.log(user);
1211
+ // this.opcMenu(user, {tipo: 'ver'});
1212
+ this.objSeleccionado = user;
1213
+ this.cerrarMenuContextual();
1214
+ const positionStrategy = this.overlay.position().flexibleConnectedTo({ x, y }).withPositions([
1215
+ {
1216
+ originX: 'end',
1217
+ originY: 'bottom',
1218
+ overlayX: 'end',
1219
+ overlayY: 'top',
1220
+ },
1221
+ ]);
1222
+ this.overlayRef = this.overlay.create({
1223
+ positionStrategy,
1224
+ scrollStrategy: this.overlay.scrollStrategies.close(),
1225
+ });
1226
+ this.overlayRef.attach(new TemplatePortal(this.userMenu, this.viewContainerRef, {
1227
+ // $implicit: user
1228
+ item: user,
1229
+ }));
1230
+ this.mouseEvent$ = fromEvent(document, 'click').pipe(filter(event => {
1231
+ const clickTarget = event.target;
1232
+ return !!this.overlayRef && !this.overlayRef.overlayElement.contains(clickTarget);
1233
+ }), take(1)).subscribe(() => this.cerrarMenuContextual());
1234
+ }
1235
+ cerrarMenuContextual() {
1236
+ this.mouseEvent$ && this.mouseEvent$.unsubscribe();
1237
+ if (this.overlayRef) {
1238
+ this.overlayRef.dispose();
1239
+ this.overlayRef = undefined;
1240
+ }
1241
+ }
1242
+ emitirAccionRecargar() {
1243
+ if (!this.idTabla) {
1244
+ this.objSeleccionado = null;
1245
+ }
1246
+ this.accionRecargar.emit(this.opcFiltroActual);
1247
+ // this.accionRecargar.emit({ ...this.opcFiltroActual, ...{seleccionado: this.objSeleccionado}});
1248
+ }
1249
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoComponent, deps: [{ token: i1$1.FormBuilder }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: TablaMantenimientoService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1250
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: TablaMantenimientoComponent, isStandalone: true, selector: "jvs-tabla-mantenimiento", inputs: { virtualScroll: "virtualScroll", itemSize: "itemSize", headerize: "headerize", dataSuscription: "dataSuscription", objThis: "objThis", nombreColeccion: "nombreColeccion", ctrlBusquedaValue: "ctrlBusquedaValue", ctrlBusquedaPlaceholder: "ctrlBusquedaPlaceholder", filtroCampos: "filtroCampos", paginador: "paginador", esTabla: "esTabla", readOnly: "readOnly", filaExtraHeader: "filaExtraHeader", filaFooter: "filaFooter", botonesCRUD: "botonesCRUD", objBotonesCRUD: "objBotonesCRUD", classSeleccionado: "classSeleccionado", classAnulado: "classAnulado", campoAnulado: "campoAnulado", campoAnuladoMensaje: "campoAnuladoMensaje", filaExtraTemplate: "filaExtraTemplate", exportarExcel: "exportarExcel", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", derechosActuales: "derechosActuales", ctrlBusqueda: "ctrlBusqueda", leyenda: "leyenda", idTabla: "idTabla", columnasTabla: "columnasTabla", botonesMenu: "botonesMenu", condicionesClaseFila: "condicionesClaseFila" }, outputs: { dblclickItem: "dblclickItem", opcionSelecionada: "opcionSelecionada", opcBusqueda: "opcBusqueda", accionRecargar: "accionRecargar", dataSourceChange: "dataSourceChange", resultados: "resultados", resultadosConLabel: "resultadosConLabel", dataFiltro: "dataFiltro" }, host: { properties: { "id": "this.id" }, classAttribute: "jvs-tabla-mantenimiento" }, providers: [
1251
+ { provide: MAT_PAGINATOR_DEFAULT_OPTIONS, useValue: { formFieldAppearance: 'outline' } }
1252
+ ], queries: [{ propertyName: "columnDefs", predicate: MatColumnDef }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }, { propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "rowFooter", first: true, predicate: MatFooterRow, descendants: true, read: ElementRef }, { propertyName: "userMenu", first: true, predicate: ["userMenu"], descendants: true }, { propertyName: "rows", predicate: MatRow, descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div class=\"flex flex-col h-fit\">\n <div class=\"grow flex items-center justify-between bg-white\">\n <ng-content select=\"[filtro]\"></ng-content>\n </div>\n\n <div class=\"flex flex-col border-t\">\n <div class=\"flex-1 bg-app-bar flex items-center justify-between p-1\">\n <!-- <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">-->\n <!-- </div>-->\n <div class=\"flex items-center flex-wrap mr-1 h-full\" *ngIf=\"leyenda\">\n <span class=\"font-bold\" [class]=\"leyenda.class\">{{ leyenda.text }}</span>\n </div>\n <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">\n <div *ngIf=\"(botonesMenuFinal.izquierda ?? []).length > 0 \" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.izquierda; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.izquierda?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.crud ?? []).length > 0\" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.crud; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.crud?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.principal ?? []).length > 0\" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.principal; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.principal?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.derecha ?? []).length > 0\" class=\"flex-auto flex items-center justify-end contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.derecha; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.derecha?.length}}\"></ng-container>\n </ng-container>\n </div>\n <ng-content select=\"[objetosMenuPegado]\"></ng-content>\n </div>\n <div class=\"flex flex-1 sm:hidden items-center flex-wrap gap-1\">\n <button class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1\"\n matRipple\n matTooltip=\"Botones de Acci\u00F3n\"\n type=\"button\"\n [matMenuTriggerFor]=\"menuOpciones\"\n >\n <mat-icon class=\"icon-xs\" svgIcon=\"roundMenu\"></mat-icon>\n </button>\n </div>\n <div class=\"flex-none flex items-center justify-end border-l-2\">\n <div class=\"flex-1 sm:flex-none flex items-center justify-end\">\n <ng-content select=\"[objetosMenu]\"></ng-content>\n </div>\n </div>\n <div *ngIf=\"ctrlBusqueda\" class=\"hidden flex-initial sm:flex items-center form-input max-w-[150px] bg-card rounded-full border m-1 px-1 border-l-2\"\n >\n <mat-icon svgIcon=\"roundSearch\" class=\"icon-xs\"></mat-icon>\n <input [formControl]=\"cCampoBusqueda\"\n class=\"text-xs px-1 py-1 border-0 outline-none w-full bg-transparent max-w-sm\"\n [placeholder]=\"ctrlBusquedaPlaceholder\"\n (keyup.enter)=\"ctrlBusqueda == 'query' ? cargarData() : false;\"\n type=\"search\">\n </div>\n <div class=\"flex-none flex items-center justify-end border-l-2\">\n <ng-content select=\"[botonesFiltro]\"></ng-content>\n <button matRipple *ngIf=\"isRecargarUsed || ctrlBusqueda == 'query'\"\n class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1 text-green-700\"\n matTooltip=\"Actualizar datos\"\n (click)=\"(ctrlBusqueda == 'query' ? cargarData() : emitirAccionRecargar())\"\n type=\"button\">\n <mat-icon svgIcon=\"roundRefresh\" class=\"icon-xs\"></mat-icon>\n\n </button>\n <button matRipple [matMenuTriggerFor]=\"columnFilterMenu\" *ngIf=\"filtroCampos\"\n class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1\"\n matTooltip=\"Columnas Filtro\"\n type=\"button\">\n <mat-icon svgIcon=\"roundFilterList\" class=\"icon-xs\"></mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.secundario ?? []).length > 0\" class=\"flex-1 bg-app-bar flex items-center justify-between p-1 border-t\">\n <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">\n <div class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.secundario; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.secundario?.length}}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"grow flex flex-col items-stretch contenedor-tabla\" [ngClass]=\"{'table-container overflow-auto': esTabla}\">\n <ng-content select=\"[cuerpo]\"></ng-content>\n\n <table [id]=\"'tabla_' + nombreColeccion\" [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"true\"\n [hidden]=\"!esTabla\"\n class=\"flex-1 table-mantenimiento table-auto h-fit\" mat-table matSort\n #tablaMantenimiento\n >\n\n <!--<table [dataSource]=\"dataSource\" class=\"table-mantenimiento table-auto h-auto w-full justify-center\" mat-table matSort>-->\n\n\n <ng-content select=\"[tableDefinitions]\"></ng-content>\n <ng-container matColumnDef=\"numeracion_automatica\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 16px !important\">N\u00BA</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\" class=\"p-0 celda-numeracion-fila\">\n <div class=\"flex items-center justify-center font-bold numeracionFila\">\n <ng-container *ngIf=\"esTabla && paginador\">\n {{ (this.paginator?.pageIndex == 0 ? i + 1 : 1 + i + (this.paginator?.pageIndex ?? 1) * (this.paginator?.pageSize ?? 1)) }}\n </ng-container>\n <ng-container *ngIf=\"!paginador\">\n {{ (i + 1) }}\n </ng-container>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"uppercase\"></td>\n </ng-container>\n <jvs-tabla-mantenimiento-column-defs [objThis]=\"this\" [colDetalle]=\"columnasTabla\"\n [nombreColeccion]=\"nombreColeccion\" [(chkLista)]=\"chkLista\"></jvs-tabla-mantenimiento-column-defs>\n\n <tr *matHeaderRowDef=\"visibleColumns; sticky: true\" mat-header-row class=\"title\" matHeader\n [style.height.px]=\"placeholderHeight\"\n ></tr>\n\n <ng-container *ngIf=\"!!filaExtraHeader\">\n <tr mat-row *matRowDef=\"let row; columns: ['filaExtraHeader']\" class=\"student-detail-row\"\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n ></tr>\n\n <ng-container matColumnDef=\"filaExtraHeader\">\n <td mat-cell *matCellDef=\"let row; let i = dataIndex\" [attr.colspan]=\"visibleColumns.length\">\n\n <div class=\"row m-0 student-element-detail\"\n [@detailExpand]=\"(i == 0 && filaExtraHeader.esVisible && filaExtraHeader.esVisible()) ? 'expanded' : 'collapsed'\"\n [style.padding-right.px]=\"row.isExpanded ? 5 : 0\"\n [style.padding-left.px]=\"row.isExpanded ? 5 : 0\"\n >\n <ng-container *ngIf=\"filaExtraHeader.template\"\n [ngTemplateOutlet]=\"filaExtraHeader.template\"\n [ngTemplateOutletContext]=\"{ row: row }\"></ng-container>\n </div>\n\n </td>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"filaFooter\">\n <tr *matFooterRowDef=\"visibleColumns\" mat-footer-row\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n [id]=\"nombreColeccion + '_filaFooter'\"\n ></tr>\n </ng-container>\n\n <!--\t<tr\n *matRowDef=\"let row; columns: visibleColumns;\"\n class=\"hover:bg-secondary trans-ease-out cursor-pointer\"\n mat-row></tr>-->\n <tr\n [matRowKeyboardSelection]=\"tablaMantenimiento\"\n [rowModel]=\"row\"\n (seleccionarSiguiente)=\"opcMenu($event, {seccion: nombreColeccion, tipo: 'ver'});\"\n\n *matRowDef=\"let row; columns: visibleColumns;\"\n (click)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'ver'});\"\n (dblclick)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'seleccionar'}); dblclickItem.emit(row)\"\n (contextmenu)=\"(abrirMenuContextual($event, row)); $event. preventDefault();\"\n [ngClass]=\"classFila(row)\"\n @fadeInUp\n class=\"trans-ease-out cursor-pointer h-auto\"\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n [id]=\"nombreColeccion + '_' + idTablaValor(row)\"\n [matTooltip]=\"row[campoAnuladoMensaje ?? '']\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"bg-red-700 text-red-100 m-0\"\n [matTooltipDisabled]=\"!campoAnuladoMensaje || !row[campoAnuladoMensaje]\"\n [class.regAnulado]=\"row[campoAnulado ?? ''] == 1\"\n (keyup.delete)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'eliminar'})\"\n mat-row></tr>\n <ng-container *ngIf=\"filaExtraTemplate\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"student-detail-row h-0\"></tr>\n\n <ng-container matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"visibleColumns.length\">\n\n <div class=\"row m-0 student-element-detail\"\n [@detailExpand]=\"row.isExpanded ? 'expanded' : 'collapsed'\"\n [style.padding-right.px]=\"row.isExpanded ? 5 : 0\"\n [style.padding-left.px]=\"row.isExpanded ? 5 : 0\"\n >\n <ng-container [ngTemplateOutlet]=\"filaExtraTemplate\"\n [ngTemplateOutletContext]=\"{ row: row }\"></ng-container>\n </div>\n\n </td>\n </ng-container>\n </ng-container>\n </table>\n\n <ng-container *ngIf=\"componenteCargadoTotalmente\">\n <div *ngIf=\"(noData | async) && esTabla\" class=\"flex-1 text-center text-secondary font-medium\">\n No se encontraron datos\n </div>\n </ng-container>\n </div>\n <ng-content select=\"[appendTable]\"></ng-content>\n <div class=\"flex-1 bg-app-bar flex flex-col sm:flex-row items-start justify-between p-1\">\n <div class=\"flex-1 flex items-start flex-wrap gap-1\">\n <div *ngIf=\"(botonesMenuFinal.inferior ?? []).length > 0\" class=\" flex items-center flex-wrap\">\n <ng-container *ngFor=\"let btn of botonesMenu.inferior; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.inferior?.length}}\"></ng-container>\n </ng-container>\n </div>\n </div>\n\n <div *ngIf=\"esTabla && paginador\" class=\"flex-1 sm:flex-none flex items-center justify-end\">\n <mat-paginator class=\"tabla-mantenimiento-paginador\" [pageSizeOptions]=\"paginacion.pageSizeOptions\" [pageIndex]=\"paginacion.pageIndex - 1\" [length]=\"paginacion.pageLength\" [pageSize]=\"paginacion.pageSize\" (page)=\"paginacion.pageCurrent = $event; emitirResultados();\" ></mat-paginator>\n </div>\n </div>\n </div>\n\n</div>\n\n\n\n<!-- SECCION DE TEMPLATES O MENUS -->\n\n\n<mat-menu #columnFilterMenu=\"matMenu\" xPosition=\"before\" yPosition=\"below\">\n <ng-container *ngFor=\"let column of columnasTabla\">\n <button (click)=\"toggleColumnVisibility(column, $event)\" *ngIf=\"!column.noMostrar || !column.noMostrar()\"\n class=\"checkbox-item mat-menu-item\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" [(ngModel)]=\"column.visible\" [ngModelOptions]=\"{standalone: true}\" color=\"primary\">\n <span [innerHTML]=\"(column.labelLista ?? column.label).replace('<br>', ' ')\"></span>\n </mat-checkbox>\n </button>\n </ng-container>\n</mat-menu>\n\n\n\n\n\n\n<ng-template #botonesSuperiores let-btn=\"btn\" let-idx=\"idx\">\n <ng-container *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: true, idx: idx}\"></ng-container>\n</ng-template>\n\n<ng-template #botonesContextual let-btn=\"btn\" let-item=\"item\" let-barraSuperior=\"barraSuperior\" let-idx=\"idx\">\n\n <ng-container *ngIf=\"barraSuperior; else noBarraSuperior\">\n\n <!--\t\t<button mat-button style=\"min-width: unset; border: 1px !important;\" class=\"uppercase border border-gray rounded-none h-full px-1 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\">-->\n <!--\t\t\t<mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" size=\"15px\" class=\"icon-xs\"></mat-icon>-->\n <!--\t\t</button>-->\n <ng-container *ngIf=\"btn.subItems && btn.subItems.length > 0\">\n <button matRipple [matRippleUnbounded]=\"false\" class=\"flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary disabled:!bg-gray-300 dark:disabled:!bg-gray-500 mat-elevation-z2\" type=\"button\"\n\n *ngIf=\"(!btn.esVisible || btn.esVisible(item, this)) && subItemsActivos(btn, item)\"\n [class]=\"(btn.class?btn.class:'')\"\n\n (click)=\"opcMenu(item, btn)\"\n [style.min-width]=\"(btn.soloIcono ? 'unset' : '')\"\n [matTooltip]=\"btn.tooltip || (btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo))) \"\n [matMenuTriggerFor]=\"menuOtrosBarra.menu\"\n\n [matBadge]=\"btn.badge\"\n matBadgeSize=\"small\"\n >\n <mat-icon class=\"icon-xs\" [class.mr-0.5]=\"!btn.soloIcono\" *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" ></mat-icon>\n <span class=\"whitespace-nowrap\" *ngIf=\"!btn.soloIcono\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n <mat-icon class=\"icon-xs\" svgIcon=\"fa5sCaretDown\" ></mat-icon>\n </button>\n\n <jvs-tabla-mantenimiento-menu #menuOtrosBarra\n [objThis]=\"objThis\"\n [nombreColeccion]=\"nombreColeccion\"\n [item]=\"item\"\n [derechosActuales]=\"derechosActuales\"\n [subItems]=\"btn.subItems\"\n (opcionSelecionada)=\"opcMenu($event.item, $event.btn)\"\n [botonTemplate]=\"botonesContextual\"\n >\n </jvs-tabla-mantenimiento-menu>\n </ng-container>\n <ng-container *ngIf=\"!btn.subItems || btn.subItems.length == 0\">\n <button class=\"flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary disabled:!bg-gray-300 dark:disabled:!bg-gray-500 mat-elevation-z2\" type=\"button\"\n\n *ngIf=\"!btn.esVisible || btn.esVisible(item, this)\"\n [class]=\"(btn.class?btn.class:'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo])) && !(['nuevo', 'editar', 'eliminar'].includes(btn.tipo))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn)\"\n [style.min-width]=\"(btn.soloIcono ? 'unset' : '')\"\n [matTooltip]=\"btn.tooltip || (btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo))) \"\n\n [matBadge]=\"btn.badge\"\n matBadgeSize=\"small\"\n >\n <mat-icon class=\"icon-xs\" [class.mr-0.5]=\"!btn.soloIcono\" *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\"></mat-icon>\n <span class=\"whitespace-nowrap\" *ngIf=\"!btn.soloIcono\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n </button>\n\n </ng-container>\n\n </ng-container>\n <ng-template #noBarraSuperior>\n\n <ng-container *ngIf=\"btn.subItems && btn.subItems.length > 0\">\n <button class=\"flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\" mat-menu-item type=\"button\"\n *ngIf=\"!btn.noContextual && (!btn.esVisible || btn.esVisible(item, this))\"\n [class]=\"(btn.class?btn.class.replace('text-white', '').replace('bg', 'text'):'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo]))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn); $event.stopPropagation();\"\n [matMenuTriggerFor]=\"menuOtrosBarra.menu\"\n >\n <div class=\"flex w-full items-center justify-between uppercase text-2xs\"\n >\n <mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\"\n class=\"flex-none icon-xs\"\n ></mat-icon>\n <span class=\"grow text-2xs\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n <mat-icon class=\"flex-none icon-xs\" svgIcon=\"fa5sCaretRight\"></mat-icon>\n </div>\n </button>\n\n <jvs-tabla-mantenimiento-menu #menuOtrosBarra\n [objThis]=\"objThis\"\n [nombreColeccion]=\"nombreColeccion\"\n [item]=\"item\"\n [derechosActuales]=\"derechosActuales\"\n [subItems]=\"btn.subItems\"\n (opcionSelecionada)=\"opcMenu($event.item, $event.btn)\"\n [botonTemplate]=\"botonesContextual\"\n >\n </jvs-tabla-mantenimiento-menu>\n </ng-container>\n <ng-container *ngIf=\"!btn.subItems || btn.subItems.length == 0\">\n <ng-container *ngIf=\"btn.tipo == '-#SEPARADOR#-'; else itemsNormales\">\n <mat-divider></mat-divider>\n </ng-container>\n <ng-template #itemsNormales>\n <button class=\"flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\" mat-menu-item type=\"button\"\n *ngIf=\"!btn.noContextual && (!btn.esVisible || btn.esVisible(item, this))\"\n [class]=\"(btn.class?btn.class.replace('text-white', '').replace('bg', 'text'):'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo]))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn)\"\n >\n <div class=\"flex w-full items-center justify-between uppercase text-2xs\">\n <mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" class=\"flex-none icon-xs\"\n ></mat-icon>\n <span class=\"grow text-2xs\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n </div>\n </button>\n </ng-template>\n\n </ng-container>\n\n </ng-template>\n\n</ng-template>\n\n<ng-template #userMenu let-item=\"item\">\n <div class=\"mat-menu bg-white rounded mat-elevation-z8 shadow botonesContextual\">\n <ng-container *ngFor=\"let btn of listaMenuCompleto\">\n <ng-container *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: false}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n\n<mat-menu #menuOpciones=\"matMenu\" xPosition=\"before\" yPosition=\"below\">\n <ng-container *ngFor=\"let btn of listaMenuCompleto\">\n <ng-container\n *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: false}\"></ng-container>\n </ng-container>\n</mat-menu>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;:root{--tabla-mantenimiento-seleccion-fondo: rgb(179, 217, 252);--tabla-mantenimiento-seleccion-texto: rgb(1, 84, 164)}:root .table-mantenimiento .elemento-seleccionado{background-color:var(--tabla-mantenimiento-seleccion-fondo)!important;color:var(--tabla-mantenimiento-seleccion-texto)!important;border-color:var(--tabla-mantenimiento-seleccion-texto)!important}html{--mat-paginator-container-size: 30px}:host{width:inherit}:host .example-viewport{height:500px;width:100%;border:1px solid black}:host .table{width:100%}:host ::ng-deep .mat-mdc-menu-content:not(:empty){@apply flex flex-col items-start;padding:0!important}:host ::ng-deep .mat-mdc-menu-item{line-height:24px!important;height:24px!important;min-height:24px!important}:host ::ng-deep .mat-mdc-menu-panel{min-height:auto!important}:host ::ng-deep .mat-mdc-table .mat-mdc-cell,:host ::ng-deep .mat-mdc-table .mat-mdc-header-cell .mat-mdc-footer-cell{white-space:unset}:host .table-container{max-height:600px!important}:host ::ng-deep .table-mantenimiento .mat-mdc-table-sticky-border-elem-right{border-left:1px solid #e0e0e0}:host ::ng-deep .table-mantenimiento .mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}:host ::ng-deep .table-mantenimiento tr.regAnulado .mat-mdc-cell{color:unset!important}:host ::ng-deep .table-mantenimiento .bg-primary-activo .numeracionFila{@apply rounded-full bg-primary-contrast text-primary mx-1 p-1 w-6 h-6;}:host ::ng-deep .table-mantenimiento th .form-input{@apply w-auto;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell,:host ::ng-deep .table-mantenimiento td.mat-mdc-cell,:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell{border-width:1px;border-style:solid}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:not(.celda-numeracion-fila){padding:.05rem .25rem}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:last-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:last-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:last-of-type:not(.celda-numeracion-fila){padding:0 .25rem}:host ::ng-deep .table-mantenimiento .student-element-detail{overflow:hidden;display:flex;align-items:center;justify-content:center}:host ::ng-deep .table-mantenimiento .mat-mdc-header-row{height:25px!important;color:rgb(var(--color-primary))!important;background-color:rgb(var(--color-primary-contrast))!important}:host ::ng-deep .table-mantenimiento .mat-mdc-header-cell{padding:5px;font-size:10px;line-height:10px;font-weight:700!important;color:inherit}:host ::ng-deep .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):hover,:host ::ng-deep .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):focus{background-color:rgba(var(--color-primary-contrast),.04)}:host ::ng-deep .table-mantenimiento .mat-mdc-row .mat-mdc-cell,:host ::ng-deep .table-mantenimiento .mat-mdc-footer-row .mat-mdc-cell{font-size:10px}:host ::ng-deep .table-mantenimiento .mat-mdc-row .mat-mdc-footer-cell:empty,:host ::ng-deep .table-mantenimiento .mat-mdc-footer-row .mat-mdc-footer-cell:empty{border-width:0!important}:host ::ng-deep .table-mantenimiento .mat-mdc-cell{@apply leading-tight;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell{border-color:#d4d0d0;@apply text-center uppercase;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container{@apply flex items-center justify-between w-full;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-content{@apply inline w-full text-center;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-arrow{@apply flex-none;}:host ::ng-deep .table-mantenimiento .mat-mdc-sort-header-content{width:100%;text-align:center;display:unset;align-items:center}:host .rotate{animation:rotation 2s infinite linear}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}:host .contenedor-botones>*:first-child{@apply rounded-l;}:host .contenedor-botones>*:last-child{@apply rounded-r;}.jvs-tabla-mantenimiento{width:inherit}.tabla-mantenimiento-boton-superior-firmar{@apply tabla-mantenimiento-boton-superior mat-elevation-z2 px-2 uppercase;@apply rounded disabled:bg-gray-300 dark:disabled:bg-gray-500 !important;}.tabla-mantenimiento-boton-superior{@apply flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary;}.tabla-mantenimiento-boton-contextual{@apply flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent;}.tabla-mantenimiento-paginador{--mat-form-field-container-height: 36px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 6px;--mat-form-field-filled-with-label-container-padding-top: 6px;--mat-form-field-filled-with-label-container-padding-bottom: 6px}.tabla-mantenimiento-paginador{--mat-select-arrow-transform: none}.tabla-mantenimiento-paginador{--mdc-checkbox-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mat-checkbox-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-switch-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mdc-radio-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mat-radio-touch-target-display: none}.tabla-mantenimiento-paginador{--mdc-list-list-item-one-line-container-height: 24px;--mdc-list-list-item-two-line-container-height: 48px;--mdc-list-list-item-three-line-container-height: 56px}.tabla-mantenimiento-paginador{--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.tabla-mantenimiento-paginador .mdc-list-item__start,.tabla-mantenimiento-paginador .mdc-list-item__end{--mdc-radio-state-layer-size: 28px}.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:40px}.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:56px}.tabla-mantenimiento-paginador{--mat-paginator-container-size: 40px;--mat-paginator-form-field-container-height: 36px;--mat-paginator-form-field-container-vertical-padding: 6px;--mat-paginator-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 32px}.tabla-mantenimiento-paginador{--mdc-text-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-filled-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-protected-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-outlined-button-container-height: 24px}.tabla-mantenimiento-paginador{--mat-text-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-filled-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-protected-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-outlined-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-icon-button-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 28px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:2px}.tabla-mantenimiento-paginador{--mat-fab-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-fab-small-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-table-header-container-height: 40px;--mat-table-footer-container-height: 36px;--mat-table-row-item-container-height: 36px}.tabla-mantenimiento-paginador{--mat-expansion-header-collapsed-state-height: 36px;--mat-expansion-header-expanded-state-height: 48px}.tabla-mantenimiento-paginador{--mat-stepper-header-height: 42px}.tabla-mantenimiento-paginador{--mat-toolbar-standard-height: 52px;--mat-toolbar-mobile-height: 44px}.tabla-mantenimiento-paginador{--mat-tree-node-min-height: 28px}.tabla-mantenimiento-paginador{--mat-standard-button-toggle-height: 24px}.tabla-mantenimiento-paginador .mat-mdc-paginator-container{min-height:unset!important}.tabla-mantenimiento-paginador .mat-mdc-text-field-wrapper{@apply px-1;}.tabla-mantenimiento-paginador .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix{height:25px!important;min-height:25px;max-height:25px;@apply py-0;}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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: "pipe", type: i2.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i6$1.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i4.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i9.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i5.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i6.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i12.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i12.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i12.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i12.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i12.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i12.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i12.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i12.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i12.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i12.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i12.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i12.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i12.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i12.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: TablaMantenimientoColumnDefsComponent, selector: "jvs-tabla-mantenimiento-column-defs", inputs: ["objThis", "nombreColeccion", "colDetalle", "chkLista"], outputs: ["chkListaChange"] }, { kind: "ngmodule", type: MatBadgeModule }, { kind: "directive", type: i14.MatBadge, selector: "[matBadge]", inputs: ["matBadgeColor", "matBadgeOverlap", "matBadgeDisabled", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "component", type: TablaMantenimientoMenuComponent, selector: "jvs-tabla-mantenimiento-menu", inputs: ["objThis", "nombreColeccion", "item", "derechosActuales", "subItems", "botonTemplate"], outputs: ["opcionSelecionada"] }, { kind: "directive", type: MatRowKeyboardSelectionDirective, selector: "[matRowKeyboardSelection]", inputs: ["matRowKeyboardSelection", "rowModel"], outputs: ["seleccionarSiguiente"] }], animations: [
1253
+ trigger('detailExpand', [
1254
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
1255
+ state('expanded', style({ height: '*' })),
1256
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1257
+ ]),
1258
+ ] });
1259
+ };
1260
+ TablaMantenimientoComponent = TablaMantenimientoComponent_1 = __decorate([
1261
+ UntilDestroy({ checkProperties: true })
1262
+ ], TablaMantenimientoComponent);
1263
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoComponent, decorators: [{
1264
+ type: Component,
1265
+ args: [{ selector: 'jvs-tabla-mantenimiento', standalone: true, imports: [
1266
+ CommonModule,
1267
+ FormsModule,
1268
+ MatCheckboxModule,
1269
+ MatDividerModule,
1270
+ MatIconModule,
1271
+ MatMenuModule,
1272
+ MatPaginatorModule,
1273
+ MatRippleModule,
1274
+ MatSortModule,
1275
+ MatTableModule,
1276
+ MatTooltipModule,
1277
+ ReactiveFormsModule,
1278
+ TablaMantenimientoColumnDefsComponent,
1279
+ MatBadgeModule,
1280
+ TablaMantenimientoMenuComponent,
1281
+ MatRowKeyboardSelectionDirective,
1282
+ ], host: {
1283
+ class: 'jvs-tabla-mantenimiento',
1284
+ }, animations: [
1285
+ trigger('detailExpand', [
1286
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
1287
+ state('expanded', style({ height: '*' })),
1288
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
1289
+ ]),
1290
+ ], providers: [
1291
+ { provide: MAT_PAGINATOR_DEFAULT_OPTIONS, useValue: { formFieldAppearance: 'outline' } }
1292
+ ], template: "<div class=\"flex flex-col h-fit\">\n <div class=\"grow flex items-center justify-between bg-white\">\n <ng-content select=\"[filtro]\"></ng-content>\n </div>\n\n <div class=\"flex flex-col border-t\">\n <div class=\"flex-1 bg-app-bar flex items-center justify-between p-1\">\n <!-- <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">-->\n <!-- </div>-->\n <div class=\"flex items-center flex-wrap mr-1 h-full\" *ngIf=\"leyenda\">\n <span class=\"font-bold\" [class]=\"leyenda.class\">{{ leyenda.text }}</span>\n </div>\n <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">\n <div *ngIf=\"(botonesMenuFinal.izquierda ?? []).length > 0 \" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.izquierda; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.izquierda?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.crud ?? []).length > 0\" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.crud; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.crud?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.principal ?? []).length > 0\" class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.principal; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.principal?.length}}\"></ng-container>\n </ng-container>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.derecha ?? []).length > 0\" class=\"flex-auto flex items-center justify-end contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.derecha; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.derecha?.length}}\"></ng-container>\n </ng-container>\n </div>\n <ng-content select=\"[objetosMenuPegado]\"></ng-content>\n </div>\n <div class=\"flex flex-1 sm:hidden items-center flex-wrap gap-1\">\n <button class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1\"\n matRipple\n matTooltip=\"Botones de Acci\u00F3n\"\n type=\"button\"\n [matMenuTriggerFor]=\"menuOpciones\"\n >\n <mat-icon class=\"icon-xs\" svgIcon=\"roundMenu\"></mat-icon>\n </button>\n </div>\n <div class=\"flex-none flex items-center justify-end border-l-2\">\n <div class=\"flex-1 sm:flex-none flex items-center justify-end\">\n <ng-content select=\"[objetosMenu]\"></ng-content>\n </div>\n </div>\n <div *ngIf=\"ctrlBusqueda\" class=\"hidden flex-initial sm:flex items-center form-input max-w-[150px] bg-card rounded-full border m-1 px-1 border-l-2\"\n >\n <mat-icon svgIcon=\"roundSearch\" class=\"icon-xs\"></mat-icon>\n <input [formControl]=\"cCampoBusqueda\"\n class=\"text-xs px-1 py-1 border-0 outline-none w-full bg-transparent max-w-sm\"\n [placeholder]=\"ctrlBusquedaPlaceholder\"\n (keyup.enter)=\"ctrlBusqueda == 'query' ? cargarData() : false;\"\n type=\"search\">\n </div>\n <div class=\"flex-none flex items-center justify-end border-l-2\">\n <ng-content select=\"[botonesFiltro]\"></ng-content>\n <button matRipple *ngIf=\"isRecargarUsed || ctrlBusqueda == 'query'\"\n class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1 text-green-700\"\n matTooltip=\"Actualizar datos\"\n (click)=\"(ctrlBusqueda == 'query' ? cargarData() : emitirAccionRecargar())\"\n type=\"button\">\n <mat-icon svgIcon=\"roundRefresh\" class=\"icon-xs\"></mat-icon>\n\n </button>\n <button matRipple [matMenuTriggerFor]=\"columnFilterMenu\" *ngIf=\"filtroCampos\"\n class=\"flex items-center justify-center text-2xs leading-none rounded-full p-1\"\n matTooltip=\"Columnas Filtro\"\n type=\"button\">\n <mat-icon svgIcon=\"roundFilterList\" class=\"icon-xs\"></mat-icon>\n </button>\n </div>\n </div>\n\n <div *ngIf=\"(botonesMenuFinal.secundario ?? []).length > 0\" class=\"flex-1 bg-app-bar flex items-center justify-between p-1 border-t\">\n <div class=\"hidden flex-1 sm:flex items-center flex-wrap gap-1\">\n <div class=\" flex items-center flex-wrap contenedor-botones\">\n <ng-container *ngFor=\"let btn of botonesMenu.secundario; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.secundario?.length}}\"></ng-container>\n </ng-container>\n </div>\n </div>\n </div>\n <div class=\"grow flex flex-col items-stretch contenedor-tabla\" [ngClass]=\"{'table-container overflow-auto': esTabla}\">\n <ng-content select=\"[cuerpo]\"></ng-content>\n\n <table [id]=\"'tabla_' + nombreColeccion\" [dataSource]=\"dataSource\" [multiTemplateDataRows]=\"true\"\n [hidden]=\"!esTabla\"\n class=\"flex-1 table-mantenimiento table-auto h-fit\" mat-table matSort\n #tablaMantenimiento\n >\n\n <!--<table [dataSource]=\"dataSource\" class=\"table-mantenimiento table-auto h-auto w-full justify-center\" mat-table matSort>-->\n\n\n <ng-content select=\"[tableDefinitions]\"></ng-content>\n <ng-container matColumnDef=\"numeracion_automatica\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 16px !important\">N\u00BA</th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\" class=\"p-0 celda-numeracion-fila\">\n <div class=\"flex items-center justify-center font-bold numeracionFila\">\n <ng-container *ngIf=\"esTabla && paginador\">\n {{ (this.paginator?.pageIndex == 0 ? i + 1 : 1 + i + (this.paginator?.pageIndex ?? 1) * (this.paginator?.pageSize ?? 1)) }}\n </ng-container>\n <ng-container *ngIf=\"!paginador\">\n {{ (i + 1) }}\n </ng-container>\n </div>\n </td>\n <td mat-footer-cell *matFooterCellDef class=\"uppercase\"></td>\n </ng-container>\n <jvs-tabla-mantenimiento-column-defs [objThis]=\"this\" [colDetalle]=\"columnasTabla\"\n [nombreColeccion]=\"nombreColeccion\" [(chkLista)]=\"chkLista\"></jvs-tabla-mantenimiento-column-defs>\n\n <tr *matHeaderRowDef=\"visibleColumns; sticky: true\" mat-header-row class=\"title\" matHeader\n [style.height.px]=\"placeholderHeight\"\n ></tr>\n\n <ng-container *ngIf=\"!!filaExtraHeader\">\n <tr mat-row *matRowDef=\"let row; columns: ['filaExtraHeader']\" class=\"student-detail-row\"\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n ></tr>\n\n <ng-container matColumnDef=\"filaExtraHeader\">\n <td mat-cell *matCellDef=\"let row; let i = dataIndex\" [attr.colspan]=\"visibleColumns.length\">\n\n <div class=\"row m-0 student-element-detail\"\n [@detailExpand]=\"(i == 0 && filaExtraHeader.esVisible && filaExtraHeader.esVisible()) ? 'expanded' : 'collapsed'\"\n [style.padding-right.px]=\"row.isExpanded ? 5 : 0\"\n [style.padding-left.px]=\"row.isExpanded ? 5 : 0\"\n >\n <ng-container *ngIf=\"filaExtraHeader.template\"\n [ngTemplateOutlet]=\"filaExtraHeader.template\"\n [ngTemplateOutletContext]=\"{ row: row }\"></ng-container>\n </div>\n\n </td>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"filaFooter\">\n <tr *matFooterRowDef=\"visibleColumns\" mat-footer-row\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n [id]=\"nombreColeccion + '_filaFooter'\"\n ></tr>\n </ng-container>\n\n <!--\t<tr\n *matRowDef=\"let row; columns: visibleColumns;\"\n class=\"hover:bg-secondary trans-ease-out cursor-pointer\"\n mat-row></tr>-->\n <tr\n [matRowKeyboardSelection]=\"tablaMantenimiento\"\n [rowModel]=\"row\"\n (seleccionarSiguiente)=\"opcMenu($event, {seccion: nombreColeccion, tipo: 'ver'});\"\n\n *matRowDef=\"let row; columns: visibleColumns;\"\n (click)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'ver'});\"\n (dblclick)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'seleccionar'}); dblclickItem.emit(row)\"\n (contextmenu)=\"(abrirMenuContextual($event, row)); $event. preventDefault();\"\n [ngClass]=\"classFila(row)\"\n @fadeInUp\n class=\"trans-ease-out cursor-pointer h-auto\"\n [style.height.px]=\"(virtualScroll ? (itemSize ? itemSize : 0) : 0)\"\n [id]=\"nombreColeccion + '_' + idTablaValor(row)\"\n [matTooltip]=\"row[campoAnuladoMensaje ?? '']\"\n matTooltipPosition=\"below\"\n matTooltipClass=\"bg-red-700 text-red-100 m-0\"\n [matTooltipDisabled]=\"!campoAnuladoMensaje || !row[campoAnuladoMensaje]\"\n [class.regAnulado]=\"row[campoAnulado ?? ''] == 1\"\n (keyup.delete)=\"opcMenu(row, {seccion: nombreColeccion, tipo: 'eliminar'})\"\n mat-row></tr>\n <ng-container *ngIf=\"filaExtraTemplate\">\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"student-detail-row h-0\"></tr>\n\n <ng-container matColumnDef=\"expandedDetail\">\n <td mat-cell *matCellDef=\"let row\" [attr.colspan]=\"visibleColumns.length\">\n\n <div class=\"row m-0 student-element-detail\"\n [@detailExpand]=\"row.isExpanded ? 'expanded' : 'collapsed'\"\n [style.padding-right.px]=\"row.isExpanded ? 5 : 0\"\n [style.padding-left.px]=\"row.isExpanded ? 5 : 0\"\n >\n <ng-container [ngTemplateOutlet]=\"filaExtraTemplate\"\n [ngTemplateOutletContext]=\"{ row: row }\"></ng-container>\n </div>\n\n </td>\n </ng-container>\n </ng-container>\n </table>\n\n <ng-container *ngIf=\"componenteCargadoTotalmente\">\n <div *ngIf=\"(noData | async) && esTabla\" class=\"flex-1 text-center text-secondary font-medium\">\n No se encontraron datos\n </div>\n </ng-container>\n </div>\n <ng-content select=\"[appendTable]\"></ng-content>\n <div class=\"flex-1 bg-app-bar flex flex-col sm:flex-row items-start justify-between p-1\">\n <div class=\"flex-1 flex items-start flex-wrap gap-1\">\n <div *ngIf=\"(botonesMenuFinal.inferior ?? []).length > 0\" class=\" flex items-center flex-wrap\">\n <ng-container *ngFor=\"let btn of botonesMenu.inferior; let idx = index;\">\n <ng-container *ngTemplateOutlet=\"botonesSuperiores; context:{btn: btn, idx: {inicio: idx, fin: botonesMenu.inferior?.length}}\"></ng-container>\n </ng-container>\n </div>\n </div>\n\n <div *ngIf=\"esTabla && paginador\" class=\"flex-1 sm:flex-none flex items-center justify-end\">\n <mat-paginator class=\"tabla-mantenimiento-paginador\" [pageSizeOptions]=\"paginacion.pageSizeOptions\" [pageIndex]=\"paginacion.pageIndex - 1\" [length]=\"paginacion.pageLength\" [pageSize]=\"paginacion.pageSize\" (page)=\"paginacion.pageCurrent = $event; emitirResultados();\" ></mat-paginator>\n </div>\n </div>\n </div>\n\n</div>\n\n\n\n<!-- SECCION DE TEMPLATES O MENUS -->\n\n\n<mat-menu #columnFilterMenu=\"matMenu\" xPosition=\"before\" yPosition=\"below\">\n <ng-container *ngFor=\"let column of columnasTabla\">\n <button (click)=\"toggleColumnVisibility(column, $event)\" *ngIf=\"!column.noMostrar || !column.noMostrar()\"\n class=\"checkbox-item mat-menu-item\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" [(ngModel)]=\"column.visible\" [ngModelOptions]=\"{standalone: true}\" color=\"primary\">\n <span [innerHTML]=\"(column.labelLista ?? column.label).replace('<br>', ' ')\"></span>\n </mat-checkbox>\n </button>\n </ng-container>\n</mat-menu>\n\n\n\n\n\n\n<ng-template #botonesSuperiores let-btn=\"btn\" let-idx=\"idx\">\n <ng-container *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: true, idx: idx}\"></ng-container>\n</ng-template>\n\n<ng-template #botonesContextual let-btn=\"btn\" let-item=\"item\" let-barraSuperior=\"barraSuperior\" let-idx=\"idx\">\n\n <ng-container *ngIf=\"barraSuperior; else noBarraSuperior\">\n\n <!--\t\t<button mat-button style=\"min-width: unset; border: 1px !important;\" class=\"uppercase border border-gray rounded-none h-full px-1 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\">-->\n <!--\t\t\t<mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" size=\"15px\" class=\"icon-xs\"></mat-icon>-->\n <!--\t\t</button>-->\n <ng-container *ngIf=\"btn.subItems && btn.subItems.length > 0\">\n <button matRipple [matRippleUnbounded]=\"false\" class=\"flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary disabled:!bg-gray-300 dark:disabled:!bg-gray-500 mat-elevation-z2\" type=\"button\"\n\n *ngIf=\"(!btn.esVisible || btn.esVisible(item, this)) && subItemsActivos(btn, item)\"\n [class]=\"(btn.class?btn.class:'')\"\n\n (click)=\"opcMenu(item, btn)\"\n [style.min-width]=\"(btn.soloIcono ? 'unset' : '')\"\n [matTooltip]=\"btn.tooltip || (btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo))) \"\n [matMenuTriggerFor]=\"menuOtrosBarra.menu\"\n\n [matBadge]=\"btn.badge\"\n matBadgeSize=\"small\"\n >\n <mat-icon class=\"icon-xs\" [class.mr-0.5]=\"!btn.soloIcono\" *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" ></mat-icon>\n <span class=\"whitespace-nowrap\" *ngIf=\"!btn.soloIcono\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n <mat-icon class=\"icon-xs\" svgIcon=\"fa5sCaretDown\" ></mat-icon>\n </button>\n\n <jvs-tabla-mantenimiento-menu #menuOtrosBarra\n [objThis]=\"objThis\"\n [nombreColeccion]=\"nombreColeccion\"\n [item]=\"item\"\n [derechosActuales]=\"derechosActuales\"\n [subItems]=\"btn.subItems\"\n (opcionSelecionada)=\"opcMenu($event.item, $event.btn)\"\n [botonTemplate]=\"botonesContextual\"\n >\n </jvs-tabla-mantenimiento-menu>\n </ng-container>\n <ng-container *ngIf=\"!btn.subItems || btn.subItems.length == 0\">\n <button class=\"flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary disabled:!bg-gray-300 dark:disabled:!bg-gray-500 mat-elevation-z2\" type=\"button\"\n\n *ngIf=\"!btn.esVisible || btn.esVisible(item, this)\"\n [class]=\"(btn.class?btn.class:'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo])) && !(['nuevo', 'editar', 'eliminar'].includes(btn.tipo))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn)\"\n [style.min-width]=\"(btn.soloIcono ? 'unset' : '')\"\n [matTooltip]=\"btn.tooltip || (btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo))) \"\n\n [matBadge]=\"btn.badge\"\n matBadgeSize=\"small\"\n >\n <mat-icon class=\"icon-xs\" [class.mr-0.5]=\"!btn.soloIcono\" *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\"></mat-icon>\n <span class=\"whitespace-nowrap\" *ngIf=\"!btn.soloIcono\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n </button>\n\n </ng-container>\n\n </ng-container>\n <ng-template #noBarraSuperior>\n\n <ng-container *ngIf=\"btn.subItems && btn.subItems.length > 0\">\n <button class=\"flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\" mat-menu-item type=\"button\"\n *ngIf=\"!btn.noContextual && (!btn.esVisible || btn.esVisible(item, this))\"\n [class]=\"(btn.class?btn.class.replace('text-white', '').replace('bg', 'text'):'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo]))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn); $event.stopPropagation();\"\n [matMenuTriggerFor]=\"menuOtrosBarra.menu\"\n >\n <div class=\"flex w-full items-center justify-between uppercase text-2xs\"\n >\n <mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\"\n class=\"flex-none icon-xs\"\n ></mat-icon>\n <span class=\"grow text-2xs\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n <mat-icon class=\"flex-none icon-xs\" svgIcon=\"fa5sCaretRight\"></mat-icon>\n </div>\n </button>\n\n <jvs-tabla-mantenimiento-menu #menuOtrosBarra\n [objThis]=\"objThis\"\n [nombreColeccion]=\"nombreColeccion\"\n [item]=\"item\"\n [derechosActuales]=\"derechosActuales\"\n [subItems]=\"btn.subItems\"\n (opcionSelecionada)=\"opcMenu($event.item, $event.btn)\"\n [botonTemplate]=\"botonesContextual\"\n >\n </jvs-tabla-mantenimiento-menu>\n </ng-container>\n <ng-container *ngIf=\"!btn.subItems || btn.subItems.length == 0\">\n <ng-container *ngIf=\"btn.tipo == '-#SEPARADOR#-'; else itemsNormales\">\n <mat-divider></mat-divider>\n </ng-container>\n <ng-template #itemsNormales>\n <button class=\"flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent\" mat-menu-item type=\"button\"\n *ngIf=\"!btn.noContextual && (!btn.esVisible || btn.esVisible(item, this))\"\n [class]=\"(btn.class?btn.class.replace('text-white', '').replace('bg', 'text'):'text-secondary')\"\n [ngClass]=\"{'text-secondary italic': !ignorarDerechos && !btn.esIndependiente && (!btn.ignorarDerecho && (!derechosActuales || !derechosActuales[btn.cDerechoCodigo ?? btn.tipo]))}\"\n [disabled]=\"!btn.esIndependiente && botonDisabled(btn, item)\"\n (click)=\"opcMenu(item, btn)\"\n >\n <div class=\"flex w-full items-center justify-between uppercase text-2xs\">\n <mat-icon *ngIf=\"btn.icono\" [svgIcon]=\"btn.icono\" class=\"flex-none icon-xs\"\n ></mat-icon>\n <span class=\"grow text-2xs\">{{ btn.label ? btn.label : ( (derechosActuales && derechosActuales[btn.cDerechoCodigo ?? btn.tipo]) ? derechosActuales[btn.cDerechoCodigo ?? btn.tipo]['cDerechoNombre'] : capitalizarTexto(btn.tipo)) }}</span>\n </div>\n </button>\n </ng-template>\n\n </ng-container>\n\n </ng-template>\n\n</ng-template>\n\n<ng-template #userMenu let-item=\"item\">\n <div class=\"mat-menu bg-white rounded mat-elevation-z8 shadow botonesContextual\">\n <ng-container *ngFor=\"let btn of listaMenuCompleto\">\n <ng-container *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: false}\"></ng-container>\n </ng-container>\n </div>\n</ng-template>\n\n\n<mat-menu #menuOpciones=\"matMenu\" xPosition=\"before\" yPosition=\"below\">\n <ng-container *ngFor=\"let btn of listaMenuCompleto\">\n <ng-container\n *ngTemplateOutlet=\"botonesContextual; context:{btn: btn, item: objSeleccionado, barraSuperior: false}\"></ng-container>\n </ng-container>\n</mat-menu>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;:root{--tabla-mantenimiento-seleccion-fondo: rgb(179, 217, 252);--tabla-mantenimiento-seleccion-texto: rgb(1, 84, 164)}:root .table-mantenimiento .elemento-seleccionado{background-color:var(--tabla-mantenimiento-seleccion-fondo)!important;color:var(--tabla-mantenimiento-seleccion-texto)!important;border-color:var(--tabla-mantenimiento-seleccion-texto)!important}html{--mat-paginator-container-size: 30px}:host{width:inherit}:host .example-viewport{height:500px;width:100%;border:1px solid black}:host .table{width:100%}:host ::ng-deep .mat-mdc-menu-content:not(:empty){@apply flex flex-col items-start;padding:0!important}:host ::ng-deep .mat-mdc-menu-item{line-height:24px!important;height:24px!important;min-height:24px!important}:host ::ng-deep .mat-mdc-menu-panel{min-height:auto!important}:host ::ng-deep .mat-mdc-table .mat-mdc-cell,:host ::ng-deep .mat-mdc-table .mat-mdc-header-cell .mat-mdc-footer-cell{white-space:unset}:host .table-container{max-height:600px!important}:host ::ng-deep .table-mantenimiento .mat-mdc-table-sticky-border-elem-right{border-left:1px solid #e0e0e0}:host ::ng-deep .table-mantenimiento .mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}:host ::ng-deep .table-mantenimiento tr.regAnulado .mat-mdc-cell{color:unset!important}:host ::ng-deep .table-mantenimiento .bg-primary-activo .numeracionFila{@apply rounded-full bg-primary-contrast text-primary mx-1 p-1 w-6 h-6;}:host ::ng-deep .table-mantenimiento th .form-input{@apply w-auto;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell,:host ::ng-deep .table-mantenimiento td.mat-mdc-cell,:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell{border-width:1px;border-style:solid}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:not(.celda-numeracion-fila){padding:.05rem .25rem}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell:last-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-cell:last-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:first-of-type:not(.celda-numeracion-fila),:host ::ng-deep .table-mantenimiento td.mat-mdc-footer-cell:last-of-type:not(.celda-numeracion-fila){padding:0 .25rem}:host ::ng-deep .table-mantenimiento .student-element-detail{overflow:hidden;display:flex;align-items:center;justify-content:center}:host ::ng-deep .table-mantenimiento .mat-mdc-header-row{height:25px!important;color:rgb(var(--color-primary))!important;background-color:rgb(var(--color-primary-contrast))!important}:host ::ng-deep .table-mantenimiento .mat-mdc-header-cell{padding:5px;font-size:10px;line-height:10px;font-weight:700!important;color:inherit}:host ::ng-deep .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):hover,:host ::ng-deep .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):focus{background-color:rgba(var(--color-primary-contrast),.04)}:host ::ng-deep .table-mantenimiento .mat-mdc-row .mat-mdc-cell,:host ::ng-deep .table-mantenimiento .mat-mdc-footer-row .mat-mdc-cell{font-size:10px}:host ::ng-deep .table-mantenimiento .mat-mdc-row .mat-mdc-footer-cell:empty,:host ::ng-deep .table-mantenimiento .mat-mdc-footer-row .mat-mdc-footer-cell:empty{border-width:0!important}:host ::ng-deep .table-mantenimiento .mat-mdc-cell{@apply leading-tight;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell{border-color:#d4d0d0;@apply text-center uppercase;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container{@apply flex items-center justify-between w-full;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-content{@apply inline w-full text-center;}:host ::ng-deep .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-arrow{@apply flex-none;}:host ::ng-deep .table-mantenimiento .mat-mdc-sort-header-content{width:100%;text-align:center;display:unset;align-items:center}:host .rotate{animation:rotation 2s infinite linear}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(359deg)}}:host .contenedor-botones>*:first-child{@apply rounded-l;}:host .contenedor-botones>*:last-child{@apply rounded-r;}.jvs-tabla-mantenimiento{width:inherit}.tabla-mantenimiento-boton-superior-firmar{@apply tabla-mantenimiento-boton-superior mat-elevation-z2 px-2 uppercase;@apply rounded disabled:bg-gray-300 dark:disabled:bg-gray-500 !important;}.tabla-mantenimiento-boton-superior{@apply flex items-center justify-between uppercase text-2xs leading-none rounded-none px-2 py-1 bg-opacity-95 hover:bg-opacity-100 disabled:opacity-50 disabled:text-secondary;}.tabla-mantenimiento-boton-contextual{@apply flex items-center justify-between uppercase w-full rounded-none px-2 disabled:opacity-50 disabled:text-secondary disabled:bg-transparent;}.tabla-mantenimiento-paginador{--mat-form-field-container-height: 36px;--mat-form-field-filled-label-display: none;--mat-form-field-container-vertical-padding: 6px;--mat-form-field-filled-with-label-container-padding-top: 6px;--mat-form-field-filled-with-label-container-padding-bottom: 6px}.tabla-mantenimiento-paginador{--mat-select-arrow-transform: none}.tabla-mantenimiento-paginador{--mdc-checkbox-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mat-checkbox-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-chip.mat-mdc-standard-chip{--mdc-chip-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-switch-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mdc-radio-state-layer-size: 28px}.tabla-mantenimiento-paginador{--mat-radio-touch-target-display: none}.tabla-mantenimiento-paginador{--mdc-list-list-item-one-line-container-height: 24px;--mdc-list-list-item-two-line-container-height: 48px;--mdc-list-list-item-three-line-container-height: 56px}.tabla-mantenimiento-paginador{--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.tabla-mantenimiento-paginador .mdc-list-item__start,.tabla-mantenimiento-paginador .mdc-list-item__end{--mdc-radio-state-layer-size: 28px}.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:40px}.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.tabla-mantenimiento-paginador .mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:56px}.tabla-mantenimiento-paginador{--mat-paginator-container-size: 40px;--mat-paginator-form-field-container-height: 36px;--mat-paginator-form-field-container-vertical-padding: 6px;--mat-paginator-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-tab-header{--mdc-secondary-navigation-tab-container-height: 32px}.tabla-mantenimiento-paginador{--mdc-text-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-filled-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-protected-button-container-height: 24px}.tabla-mantenimiento-paginador{--mdc-outlined-button-container-height: 24px}.tabla-mantenimiento-paginador{--mat-text-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-filled-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-protected-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-outlined-button-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-icon-button-touch-target-display: none}.tabla-mantenimiento-paginador .mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 28px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:2px}.tabla-mantenimiento-paginador{--mat-fab-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-fab-small-touch-target-display: none}.tabla-mantenimiento-paginador{--mat-table-header-container-height: 40px;--mat-table-footer-container-height: 36px;--mat-table-row-item-container-height: 36px}.tabla-mantenimiento-paginador{--mat-expansion-header-collapsed-state-height: 36px;--mat-expansion-header-expanded-state-height: 48px}.tabla-mantenimiento-paginador{--mat-stepper-header-height: 42px}.tabla-mantenimiento-paginador{--mat-toolbar-standard-height: 52px;--mat-toolbar-mobile-height: 44px}.tabla-mantenimiento-paginador{--mat-tree-node-min-height: 28px}.tabla-mantenimiento-paginador{--mat-standard-button-toggle-height: 24px}.tabla-mantenimiento-paginador .mat-mdc-paginator-container{min-height:unset!important}.tabla-mantenimiento-paginador .mat-mdc-text-field-wrapper{@apply px-1;}.tabla-mantenimiento-paginador .mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-form-field-infix{height:25px!important;min-height:25px;max-height:25px;@apply py-0;}\n"] }]
1293
+ }], ctorParameters: () => [{ type: i1$1.FormBuilder }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: TablaMantenimientoService }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
1294
+ type: HostBinding
1295
+ }], virtualScroll: [{
1296
+ type: Input
1297
+ }], itemSize: [{
1298
+ type: Input
1299
+ }], headerize: [{
1300
+ type: Input
1301
+ }], dataSuscription: [{
1302
+ type: Input
1303
+ }], objThis: [{
1304
+ type: Input,
1305
+ args: [{ required: true }]
1306
+ }], nombreColeccion: [{
1307
+ type: Input,
1308
+ args: [{ required: true }]
1309
+ }], ctrlBusquedaValue: [{
1310
+ type: Input
1311
+ }], ctrlBusquedaPlaceholder: [{
1312
+ type: Input
1313
+ }], filtroCampos: [{
1314
+ type: Input
1315
+ }], paginador: [{
1316
+ type: Input
1317
+ }], esTabla: [{
1318
+ type: Input
1319
+ }], readOnly: [{
1320
+ type: Input
1321
+ }], filaExtraHeader: [{
1322
+ type: Input
1323
+ }], filaFooter: [{
1324
+ type: Input
1325
+ }], botonesCRUD: [{
1326
+ type: Input
1327
+ }], dblclickItem: [{
1328
+ type: Output
1329
+ }], objBotonesCRUD: [{
1330
+ type: Input
1331
+ }], classSeleccionado: [{
1332
+ type: Input
1333
+ }], classAnulado: [{
1334
+ type: Input
1335
+ }], campoAnulado: [{
1336
+ type: Input
1337
+ }], campoAnuladoMensaje: [{
1338
+ type: Input
1339
+ }], opcionSelecionada: [{
1340
+ type: Output
1341
+ }], opcBusqueda: [{
1342
+ type: Output
1343
+ }], accionRecargar: [{
1344
+ type: Output
1345
+ }], filaExtraTemplate: [{
1346
+ type: Input
1347
+ }], paginator: [{
1348
+ type: ViewChild,
1349
+ args: [MatPaginator]
1350
+ }], sort: [{
1351
+ type: ViewChild,
1352
+ args: [MatSort]
1353
+ }], exportarExcel: [{
1354
+ type: Input
1355
+ }], pageSize: [{
1356
+ type: Input
1357
+ }], pageSizeOptions: [{
1358
+ type: Input
1359
+ }], dataSourceChange: [{
1360
+ type: Output
1361
+ }], resultados: [{
1362
+ type: Output
1363
+ }], resultadosConLabel: [{
1364
+ type: Output
1365
+ }], dataFiltro: [{
1366
+ type: Output
1367
+ }], table: [{
1368
+ type: ViewChild,
1369
+ args: [MatTable, { static: false }]
1370
+ }], columnDefs: [{
1371
+ type: ContentChildren,
1372
+ args: [MatColumnDef]
1373
+ }], derechosActuales: [{
1374
+ type: Input
1375
+ }], rows: [{
1376
+ type: ViewChildren,
1377
+ args: [MatRow, { read: ElementRef }]
1378
+ }], rowFooter: [{
1379
+ type: ViewChild,
1380
+ args: [MatFooterRow, { read: ElementRef }]
1381
+ }], userMenu: [{
1382
+ type: ViewChild,
1383
+ args: ['userMenu']
1384
+ }], ctrlBusqueda: [{
1385
+ type: Input
1386
+ }], leyenda: [{
1387
+ type: Input
1388
+ }], idTabla: [{
1389
+ type: Input
1390
+ }], columnasTabla: [{
1391
+ type: Input
1392
+ }], botonesMenu: [{
1393
+ type: Input
1394
+ }], condicionesClaseFila: [{
1395
+ type: Input
1396
+ }] } });
1397
+
1398
+ class ProgressBarComponent {
1399
+ objThis;
1400
+ porcentaje = 0;
1401
+ textoCentrado = false;
1402
+ _textoMostrar = '';
1403
+ get textoMostrar() { return this._textoMostrar; }
1404
+ set textoMostrar(val) { this._textoMostrar = val; }
1405
+ _formatoNumero = '';
1406
+ get formatoNumero() { return this._formatoNumero; }
1407
+ set formatoNumero(val) { this._formatoNumero = val ?? '1.0-0'; }
1408
+ _coloresValor = [];
1409
+ get coloresValor() { return this._coloresValor; }
1410
+ set coloresValor(val) {
1411
+ if (!val || !Array.isArray(val)) {
1412
+ this._coloresValor = [
1413
+ { valorMaximo: 1, class: 'p-0' },
1414
+ { valorMaximo: 40, class: 'bg-red-400 text-red-900' },
1415
+ // {valorMaximo: 35, class: 'bg-red-600 text-red-100'},
1416
+ { valorMaximo: 80, class: 'bg-yellow-600 text-yellow-100' },
1417
+ { valorMaximo: 100, class: 'bg-green-600 text-green-100' },
1418
+ ];
1419
+ }
1420
+ else {
1421
+ this._coloresValor = val;
1422
+ }
1423
+ }
1424
+ constructor() { }
1425
+ ngOnInit() {
1426
+ }
1427
+ colorEstilo() {
1428
+ let estiloFin = null;
1429
+ let claseFin = null;
1430
+ let encontro = false;
1431
+ this.coloresValor = this.ordenarPorPropiedad(this.coloresValor, 'valorMaximo');
1432
+ this.coloresValor.forEach(estilo => {
1433
+ if (!encontro && (this.porcentaje <= estilo.valorMaximo)) {
1434
+ // console.log(this.porcentaje, estilo, (this.porcentaje < estilo.valorMaximo));
1435
+ encontro = true;
1436
+ estiloFin = estilo.style;
1437
+ claseFin = estilo.class;
1438
+ }
1439
+ });
1440
+ return {
1441
+ style: estiloFin ?? '',
1442
+ class: claseFin ?? '',
1443
+ };
1444
+ }
1445
+ ordenarPorPropiedad(objData, propiedad, numeros = false) {
1446
+ if (numeros) {
1447
+ return objData.sort((a, b) => a[propiedad] - b[propiedad]);
1448
+ }
1449
+ return objData.sort((a, b) => (a[propiedad] > b[propiedad]) ? 1 : ((b[propiedad] > a[propiedad]) ? -1 : 0));
1450
+ }
1451
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1452
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ProgressBarComponent, isStandalone: true, selector: "jvsoft-progress-bar", inputs: { objThis: "objThis", porcentaje: "porcentaje", textoCentrado: "textoCentrado", textoMostrar: "textoMostrar", formatoNumero: "formatoNumero", coloresValor: "coloresValor" }, ngImport: i0, template: "<div class=\"w-full bg-gray-200 text-gray-700 rounded-full\" [class.text-center]=\"textoCentrado\">\n\t<div class=\"text-xxs font-medium text-center p-1 leading-none rounded-full\"\n\t\t [ngClass]=\"colorEstilo().class ? colorEstilo().class : 'bg-blue-600 text-blue-100'\"\n\t\t [style]=\"colorEstilo().style ? colorEstilo().style : ''\"\n\t\t [style.width]=\"(textoCentrado ? 100 : porcentaje) + '%'\"\n\t>\n <span *ngIf=\"textoMostrar else defaultText;\" class=\"whitespace-nowrap\">{{ textoMostrar }}</span>\n <ng-template #defaultText>{{ porcentaje | number: formatoNumero }}%</ng-template>\n </div>\n</div>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.DecimalPipe, name: "number" }] });
1453
+ }
1454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressBarComponent, decorators: [{
1455
+ type: Component,
1456
+ args: [{ selector: 'jvsoft-progress-bar', imports: [
1457
+ CommonModule,
1458
+ DecimalPipe
1459
+ ], template: "<div class=\"w-full bg-gray-200 text-gray-700 rounded-full\" [class.text-center]=\"textoCentrado\">\n\t<div class=\"text-xxs font-medium text-center p-1 leading-none rounded-full\"\n\t\t [ngClass]=\"colorEstilo().class ? colorEstilo().class : 'bg-blue-600 text-blue-100'\"\n\t\t [style]=\"colorEstilo().style ? colorEstilo().style : ''\"\n\t\t [style.width]=\"(textoCentrado ? 100 : porcentaje) + '%'\"\n\t>\n <span *ngIf=\"textoMostrar else defaultText;\" class=\"whitespace-nowrap\">{{ textoMostrar }}</span>\n <ng-template #defaultText>{{ porcentaje | number: formatoNumero }}%</ng-template>\n </div>\n</div>\n", styles: ["@tailwind base;@tailwind components;@tailwind utilities;\n"] }]
1460
+ }], ctorParameters: () => [], propDecorators: { objThis: [{
1461
+ type: Input
1462
+ }], porcentaje: [{
1463
+ type: Input
1464
+ }], textoCentrado: [{
1465
+ type: Input
1466
+ }], textoMostrar: [{
1467
+ type: Input
1468
+ }], formatoNumero: [{
1469
+ type: Input
1470
+ }], coloresValor: [{
1471
+ type: Input
1472
+ }] } });
1473
+
1474
+ // export * from './progress-spinner.service';
1475
+
1476
+ /**
1477
+ * Generated bundle index. Do not edit.
1478
+ */
1479
+
1480
+ export { ProgressBarComponent, TablaMantenimientoComponent, TablaMantenimientoService };
1481
+ //# sourceMappingURL=jvsoft-components-tabla-mantenimiento.mjs.map