@jvsoft/components 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dialog-flotante/dialog-flotante.component.scss +36 -0
- package/fesm2022/jvsoft-components-dialog-flotante.mjs +21 -10
- package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +5 -3
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -1
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +689 -408
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -1
- package/fesm2022/jvsoft-components.mjs +704 -479
- package/fesm2022/jvsoft-components.mjs.map +1 -1
- package/index.d.ts +1 -1
- package/luces-navidad/luces-navidad.component.scss +125 -0
- package/package.json +13 -14
- package/src/styles/base-jvsoft-components.css +9 -0
- package/src/styles/base.scss +9 -0
- package/tabla-mantenimiento/components/progress-bar/progress-bar.component.d.ts +3 -3
- package/tabla-mantenimiento/interfaces/archivo.d.ts +26 -0
- package/tabla-mantenimiento/interfaces/global/columnas-tabla.d.ts +97 -73
- package/tabla-mantenimiento/interfaces/implements/incluye-tabla-mantenimiento.d.ts +12 -0
- package/tabla-mantenimiento/interfaces/implements/index.d.ts +1 -0
- package/tabla-mantenimiento/interfaces/index.d.ts +3 -0
- package/tabla-mantenimiento/public-api.d.ts +1 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-date/column-type-date.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-icons/column-type-icons.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-money/column-type-money.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-number/column-type-number.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-progressbar/column-type-progressbar.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-sino/column-type-sino.component.d.ts +9 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-text/column-type-text.component.d.ts +8 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.d.ts +18 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.module.d.ts +23 -0
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.d.ts +5 -10
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.scss +0 -0
- package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.scss +0 -0
- package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +14 -12
- package/tabla-mantenimiento/tabla-mantenimiento.component.scss +219 -0
- package/fesm2022/jvsoft-components-progress-spinner.mjs +0 -78
- package/fesm2022/jvsoft-components-progress-spinner.mjs.map +0 -1
- package/progress-spinner/index.d.ts +0 -5
- package/progress-spinner/progress-spinner.component.d.ts +0 -9
- package/progress-spinner/progress-spinner.service.d.ts +0 -25
- package/progress-spinner/public-api.d.ts +0 -2
- /package/src/{styles.scss → styles/tailwind.scss} +0 -0
|
@@ -1,225 +1,42 @@
|
|
|
1
1
|
import { __decorate } from 'tslib';
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
2
|
+
import { trigger, state, transition, style, animate } from '@angular/animations';
|
|
3
|
+
import { TemplatePortal } from '@angular/cdk/portal';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
5
|
import { CommonModule, DecimalPipe } from '@angular/common';
|
|
6
|
-
import * as
|
|
7
|
-
import {
|
|
8
|
-
import * as
|
|
6
|
+
import * as i0 from '@angular/core';
|
|
7
|
+
import { EventEmitter, HostListener, Output, Input, Directive, ViewChild, Optional, Component, inject, Pipe, NgModule, ContentChildren, ViewChildren, Injectable, ElementRef, HostBinding } from '@angular/core';
|
|
8
|
+
import * as i1$2 from '@angular/forms';
|
|
9
|
+
import { Validators, FormControl, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
10
|
+
import * as i14 from '@angular/material/badge';
|
|
11
|
+
import { MatBadgeModule } from '@angular/material/badge';
|
|
12
|
+
import * as i3$1 from '@angular/material/checkbox';
|
|
9
13
|
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
10
|
-
import * as
|
|
14
|
+
import * as i5$1 from '@angular/material/core';
|
|
15
|
+
import { MatRipple, MatRippleModule } from '@angular/material/core';
|
|
16
|
+
import * as i6 from '@angular/material/divider';
|
|
11
17
|
import { MatDividerModule } from '@angular/material/divider';
|
|
12
|
-
import * as
|
|
13
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
+
import * as i5 from '@angular/material/icon';
|
|
19
|
+
import { MatIconRegistry, MatIcon, MatIconModule } from '@angular/material/icon';
|
|
14
20
|
import * as i8 from '@angular/material/menu';
|
|
15
21
|
import { MatMenuModule } from '@angular/material/menu';
|
|
16
22
|
import * as i9 from '@angular/material/paginator';
|
|
17
23
|
import { MatPaginatorModule, MatPaginator, MAT_PAGINATOR_DEFAULT_OPTIONS } from '@angular/material/paginator';
|
|
18
|
-
import * as
|
|
19
|
-
import { MatRippleModule } from '@angular/material/core';
|
|
20
|
-
import * as i6 from '@angular/material/sort';
|
|
24
|
+
import * as i3 from '@angular/material/sort';
|
|
21
25
|
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
22
|
-
import * as
|
|
23
|
-
import {
|
|
24
|
-
import * as
|
|
26
|
+
import * as i2 from '@angular/material/table';
|
|
27
|
+
import { MatColumnDef, MatTable, MatTableModule, MatTableDataSource, MatFooterRow, MatRow } from '@angular/material/table';
|
|
28
|
+
import * as i4 from '@angular/material/tooltip';
|
|
25
29
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
26
|
-
import { Subject, takeUntil, of, fromEvent } from 'rxjs';
|
|
27
|
-
import shortHash from 'shorthash2';
|
|
28
30
|
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
31
|
import moment from 'moment';
|
|
32
|
+
import { Subject, takeUntil, of, fromEvent } from 'rxjs';
|
|
33
|
+
import { map, filter, take } from 'rxjs/operators';
|
|
34
|
+
import shortHash from 'shorthash2';
|
|
35
|
+
import * as i1$1 from '@angular/platform-browser';
|
|
36
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
36
37
|
import * as XLSX from 'xlsx';
|
|
37
38
|
import * as i2$1 from '@angular/cdk/overlay';
|
|
38
39
|
|
|
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
40
|
function buscarEnArray(coleccion, idBuscar, dato) {
|
|
224
41
|
if (!Array.isArray(coleccion) || coleccion.length === 0)
|
|
225
42
|
return null; // 🔹 Validación de entrada
|
|
@@ -390,10 +207,563 @@ class ForCheckboxModel {
|
|
|
390
207
|
const activos = this.cantidadActivos;
|
|
391
208
|
return activos > 0 && total !== activos;
|
|
392
209
|
}
|
|
393
|
-
establecerTodos(activo) {
|
|
394
|
-
Object.keys(this.modeloCheck.modelosChk).forEach(idx => this.modeloCheck.modelosChk[idx] = activo);
|
|
210
|
+
establecerTodos(activo) {
|
|
211
|
+
Object.keys(this.modeloCheck.modelosChk).forEach(idx => this.modeloCheck.modelosChk[idx] = activo);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
class MatRowKeyboardSelectionDirective {
|
|
216
|
+
el;
|
|
217
|
+
rows;
|
|
218
|
+
renderedData;
|
|
219
|
+
tabla; // Entrada: Referencia a la tabla
|
|
220
|
+
rowModel; // Entrada: Modelo de fila actual
|
|
221
|
+
seleccionarSiguiente = new EventEmitter(); // Salida: Evento al seleccionar siguiente
|
|
222
|
+
unsubscriber$ = new Subject();
|
|
223
|
+
constructor(el) {
|
|
224
|
+
this.el = el;
|
|
225
|
+
}
|
|
226
|
+
ngOnInit() {
|
|
227
|
+
// Asignar tabindex si no está definido
|
|
228
|
+
if (this.el.nativeElement.tabIndex < 0) {
|
|
229
|
+
this.el.nativeElement.tabIndex = 0;
|
|
230
|
+
}
|
|
231
|
+
// Obtener la fuente de datos de la tabla
|
|
232
|
+
const dataSource = this.tabla.dataSource;
|
|
233
|
+
// Suscribirse a los cambios en los datos
|
|
234
|
+
dataSource.connect().pipe(takeUntil(this.unsubscriber$)).subscribe(data => {
|
|
235
|
+
this.renderedData = data;
|
|
236
|
+
this.rows = Array.from(this.getTableRows());
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
ngOnDestroy() {
|
|
240
|
+
// Finalizar la suscripción al destruir la directiva
|
|
241
|
+
this.unsubscriber$.next(null);
|
|
242
|
+
this.unsubscriber$.complete();
|
|
243
|
+
}
|
|
244
|
+
onKeydown(event) {
|
|
245
|
+
var element = event.target;
|
|
246
|
+
if (element.tagName === "INPUT") {
|
|
247
|
+
event.stopPropagation();
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
const currentIndex = this.renderedData.findIndex(row => row === this.rowModel);
|
|
251
|
+
const eRef = event.target;
|
|
252
|
+
this.rows = this.rows.filter(elem => elem.hasAttribute('id'));
|
|
253
|
+
const arrayFilas = Array.from(this.rows);
|
|
254
|
+
const fElem = arrayFilas.filter(elem => elem.id == eRef.id).pop();
|
|
255
|
+
const cElemIdx = arrayFilas.findIndex(elem => elem == fElem);
|
|
256
|
+
let newRow;
|
|
257
|
+
// Controlar las teclas presionadas
|
|
258
|
+
switch (event.key) {
|
|
259
|
+
case 'ArrowDown':
|
|
260
|
+
newRow = this.rows[cElemIdx + 1];
|
|
261
|
+
break;
|
|
262
|
+
case 'ArrowUp':
|
|
263
|
+
newRow = this.rows[cElemIdx - 1];
|
|
264
|
+
break;
|
|
265
|
+
case 'Enter':
|
|
266
|
+
case ' ':
|
|
267
|
+
this.seleccionarSiguiente.next(this.renderedData[currentIndex]);
|
|
268
|
+
event.preventDefault();
|
|
269
|
+
break;
|
|
270
|
+
}
|
|
271
|
+
// Enfocar la nueva fila seleccionada
|
|
272
|
+
if (newRow) {
|
|
273
|
+
newRow.classList.add('estaFocus');
|
|
274
|
+
newRow.focus();
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
getTableRows() {
|
|
279
|
+
let el = this.el.nativeElement;
|
|
280
|
+
// Recorrer los elementos padres hasta encontrar la tabla
|
|
281
|
+
while (el && el.parentNode) {
|
|
282
|
+
el = el.parentNode;
|
|
283
|
+
// Verificar si es una tabla de material
|
|
284
|
+
if (el.tagName && el.tagName.toLowerCase() === 'mat-table' || el.hasAttribute('mat-table')) {
|
|
285
|
+
return el.querySelectorAll('mat-row, tr[mat-row]');
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return undefined;
|
|
289
|
+
}
|
|
290
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MatRowKeyboardSelectionDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
291
|
+
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 });
|
|
292
|
+
}
|
|
293
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: MatRowKeyboardSelectionDirective, decorators: [{
|
|
294
|
+
type: Directive,
|
|
295
|
+
args: [{
|
|
296
|
+
selector: '[matRowKeyboardSelection]'
|
|
297
|
+
}]
|
|
298
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { tabla: [{
|
|
299
|
+
type: Input,
|
|
300
|
+
args: ['matRowKeyboardSelection']
|
|
301
|
+
}], rowModel: [{
|
|
302
|
+
type: Input
|
|
303
|
+
}], seleccionarSiguiente: [{
|
|
304
|
+
type: Output
|
|
305
|
+
}], onKeydown: [{
|
|
306
|
+
type: HostListener,
|
|
307
|
+
args: ['keydown', ['$event']]
|
|
308
|
+
}] } });
|
|
309
|
+
|
|
310
|
+
class ColumnTypeComponent {
|
|
311
|
+
table;
|
|
312
|
+
column;
|
|
313
|
+
columnDef;
|
|
314
|
+
columnTitleTemplate; // Permite personalizar títulos
|
|
315
|
+
columnFooterTemplate; // Permite personalizar footer
|
|
316
|
+
cellTemplate; // Se usa para el contenido de las celdas
|
|
317
|
+
constructor(table) {
|
|
318
|
+
this.table = table;
|
|
319
|
+
}
|
|
320
|
+
ngOnInit() {
|
|
321
|
+
}
|
|
322
|
+
ngAfterViewInit() {
|
|
323
|
+
if (this.columnDef) {
|
|
324
|
+
this.table.addColumnDef(this.columnDef);
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
accionClick(item, event) {
|
|
328
|
+
if (this.column.click) {
|
|
329
|
+
this.column.click(item);
|
|
330
|
+
event.stopPropagation();
|
|
331
|
+
}
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeComponent, deps: [{ token: i2.MatTable, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
335
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeComponent, isStandalone: false, selector: "jvs-column-type", inputs: { column: "column", columnTitleTemplate: "columnTitleTemplate", columnFooterTemplate: "columnFooterTemplate", cellTemplate: "cellTemplate" }, viewQueries: [{ propertyName: "columnDef", first: true, predicate: MatColumnDef, descendants: true, static: true }], ngImport: i0, template: "<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <ng-container *ngIf=\"columnTitleTemplate; else defaultTitle\">\n <ng-container *ngTemplateOutlet=\"columnTitleTemplate; context: { column: column }\"></ng-container>\n </ng-container>\n <ng-template #defaultTitle>\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </ng-template>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n <ng-container *ngTemplateOutlet=\"cellTemplate; context: { row: row, column: column }\"></ng-container>\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n <ng-container *ngIf=\"columnFooterTemplate; else defaultFooter\">\n <ng-container *ngTemplateOutlet=\"columnFooterTemplate; context: { column: column }\"></ng-container>\n </ng-container>\n <ng-template #defaultFooter>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </ng-template>\n </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }] });
|
|
336
|
+
}
|
|
337
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeComponent, decorators: [{
|
|
338
|
+
type: Component,
|
|
339
|
+
args: [{ selector: 'jvs-column-type', standalone: false, template: "<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <ng-container *ngIf=\"columnTitleTemplate; else defaultTitle\">\n <ng-container *ngTemplateOutlet=\"columnTitleTemplate; context: { column: column }\"></ng-container>\n </ng-container>\n <ng-template #defaultTitle>\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </ng-template>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n <ng-container *ngTemplateOutlet=\"cellTemplate; context: { row: row, column: column }\"></ng-container>\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n <ng-container *ngIf=\"columnFooterTemplate; else defaultFooter\">\n <ng-container *ngTemplateOutlet=\"columnFooterTemplate; context: { column: column }\"></ng-container>\n </ng-container>\n <ng-template #defaultFooter>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </ng-template>\n </th>\n</ng-container>\n" }]
|
|
340
|
+
}], ctorParameters: () => [{ type: i2.MatTable, decorators: [{
|
|
341
|
+
type: Optional
|
|
342
|
+
}] }], propDecorators: { column: [{
|
|
343
|
+
type: Input,
|
|
344
|
+
args: [{ required: true }]
|
|
345
|
+
}], columnDef: [{
|
|
346
|
+
type: ViewChild,
|
|
347
|
+
args: [MatColumnDef, { static: true }]
|
|
348
|
+
}], columnTitleTemplate: [{
|
|
349
|
+
type: Input
|
|
350
|
+
}], columnFooterTemplate: [{
|
|
351
|
+
type: Input
|
|
352
|
+
}], cellTemplate: [{
|
|
353
|
+
type: Input
|
|
354
|
+
}] } });
|
|
355
|
+
|
|
356
|
+
class ColumnTypeNumberComponent extends ColumnTypeComponent {
|
|
357
|
+
column = {};
|
|
358
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeNumberComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
359
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeNumberComponent, isStandalone: false, selector: "jvs-column-type-number", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "\n<ng-template #cellTemplate let-row=\"row\">\n\t\t\t\t<span *ngIf=\"column.property && row[column.property]\" class=\"!text-indigo-900 font-semibold\">\n\t\t\t\t\t{{ row[column.property] | number: (column.format ? column.format : '1.0-2') }}\n\t\t\t\t</span>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
360
|
+
}
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeNumberComponent, decorators: [{
|
|
362
|
+
type: Component,
|
|
363
|
+
args: [{ selector: 'jvs-column-type-number', standalone: false, template: "\n<ng-template #cellTemplate let-row=\"row\">\n\t\t\t\t<span *ngIf=\"column.property && row[column.property]\" class=\"!text-indigo-900 font-semibold\">\n\t\t\t\t\t{{ row[column.property] | number: (column.format ? column.format : '1.0-2') }}\n\t\t\t\t</span>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n" }]
|
|
364
|
+
}], propDecorators: { column: [{
|
|
365
|
+
type: Input,
|
|
366
|
+
args: [{ required: true }]
|
|
367
|
+
}] } });
|
|
368
|
+
|
|
369
|
+
class ColumnTypeDateComponent extends ColumnTypeComponent {
|
|
370
|
+
column = {};
|
|
371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeDateComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
372
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeDateComponent, isStandalone: false, selector: "jvs-column-type-date", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\n {{ row[column.property] | date: (column.format ? column.format : 'dd/MM/yyyy') }}\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }] });
|
|
373
|
+
}
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeDateComponent, decorators: [{
|
|
375
|
+
type: Component,
|
|
376
|
+
args: [{ selector: 'jvs-column-type-date', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\n {{ row[column.property] | date: (column.format ? column.format : 'dd/MM/yyyy') }}\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n" }]
|
|
377
|
+
}], propDecorators: { column: [{
|
|
378
|
+
type: Input,
|
|
379
|
+
args: [{ required: true }]
|
|
380
|
+
}] } });
|
|
381
|
+
|
|
382
|
+
const YES_ICON = `
|
|
383
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59z"/></svg>
|
|
384
|
+
`;
|
|
385
|
+
const NO_ICON = `
|
|
386
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12z"/></svg>
|
|
387
|
+
`;
|
|
388
|
+
class ColumnTypeSinoComponent extends ColumnTypeComponent {
|
|
389
|
+
column = {}; // 🟢 Solución
|
|
390
|
+
constructor() {
|
|
391
|
+
super(inject(MatTable)); // 🟢 Llamar al constructor del padre
|
|
392
|
+
const iconRegistry = inject(MatIconRegistry);
|
|
393
|
+
const sanitizer = inject(DomSanitizer);
|
|
394
|
+
// Note that we provide the icon here as a string literal here due to a limitation in
|
|
395
|
+
// Stackblitz. If you want to provide the icon from a URL, you can use:
|
|
396
|
+
// `iconRegistry.addSvgIcon('thumbs-up', sanitizer.bypassSecurityTrustResourceUrl('icon.svg'));`
|
|
397
|
+
iconRegistry.addSvgIconLiteralInNamespace('yes_no', 'yes', sanitizer.bypassSecurityTrustHtml(YES_ICON));
|
|
398
|
+
iconRegistry.addSvgIconLiteralInNamespace('yes_no', 'no', sanitizer.bypassSecurityTrustHtml(NO_ICON));
|
|
399
|
+
// iconRegistry.addSvgIconLiteral('yesIcon', sanitizer.bypassSecurityTrustHtml(YES_ICON));
|
|
400
|
+
// iconRegistry.addSvgIconLiteral('noIcon', sanitizer.bypassSecurityTrustHtml(NO_ICON));
|
|
401
|
+
}
|
|
402
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeSinoComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
403
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeSinoComponent, isStandalone: false, selector: "jvs-column-type-sino", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\n <mat-icon *ngIf=\"[column.yesValue, 1, true].includes(row[column.property])\"\n [svgIcon]=\"column.yesIcon ?? 'yes_no:yes'\" class=\"icon-sm\"\n [matTooltip]=\"column.yesTooltip ?? undefined\"\n ></mat-icon>\n <mat-icon *ngIf=\"[column.noValue, 0, false].includes(row[column.property])\" [svgIcon]=\"column.noIcon ?? 'yes_no:no'\"\n class=\"icon-sm\"\n [matTooltip]=\"column.noTooltip ?? undefined\"\n ></mat-icon>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
404
|
+
}
|
|
405
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeSinoComponent, decorators: [{
|
|
406
|
+
type: Component,
|
|
407
|
+
args: [{ selector: 'jvs-column-type-sino', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\n <mat-icon *ngIf=\"[column.yesValue, 1, true].includes(row[column.property])\"\n [svgIcon]=\"column.yesIcon ?? 'yes_no:yes'\" class=\"icon-sm\"\n [matTooltip]=\"column.yesTooltip ?? undefined\"\n ></mat-icon>\n <mat-icon *ngIf=\"[column.noValue, 0, false].includes(row[column.property])\" [svgIcon]=\"column.noIcon ?? 'yes_no:no'\"\n class=\"icon-sm\"\n [matTooltip]=\"column.noTooltip ?? undefined\"\n ></mat-icon>\n <span class=\"cdk-visually-hidden\">{{ row[column.property] }}</span>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n" }]
|
|
408
|
+
}], ctorParameters: () => [], propDecorators: { column: [{
|
|
409
|
+
type: Input,
|
|
410
|
+
args: [{ required: true }]
|
|
411
|
+
}] } });
|
|
412
|
+
|
|
413
|
+
class ProgressBarComponent {
|
|
414
|
+
objThis;
|
|
415
|
+
porcentaje = 0;
|
|
416
|
+
textoCentrado = false;
|
|
417
|
+
_textoMostrar = '';
|
|
418
|
+
get textoMostrar() { return this._textoMostrar; }
|
|
419
|
+
set textoMostrar(val) { this._textoMostrar = val; }
|
|
420
|
+
_formatoNumero = '';
|
|
421
|
+
get formatoNumero() { return this._formatoNumero; }
|
|
422
|
+
set formatoNumero(val) { this._formatoNumero = val ?? '1.0-0'; }
|
|
423
|
+
_coloresValor = [];
|
|
424
|
+
get coloresValor() { return this._coloresValor; }
|
|
425
|
+
set coloresValor(val) {
|
|
426
|
+
if (!val || !Array.isArray(val)) {
|
|
427
|
+
this._coloresValor = [
|
|
428
|
+
{ valorMaximo: 1, class: 'p-0' },
|
|
429
|
+
{ valorMaximo: 40, class: 'bg-red-400 text-red-900' },
|
|
430
|
+
// {valorMaximo: 35, class: 'bg-red-600 text-red-100'},
|
|
431
|
+
{ valorMaximo: 80, class: 'bg-yellow-600 text-yellow-100' },
|
|
432
|
+
{ valorMaximo: 100, class: 'bg-green-600 text-green-100' },
|
|
433
|
+
];
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
this._coloresValor = val;
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
constructor() { }
|
|
440
|
+
ngOnInit() {
|
|
441
|
+
}
|
|
442
|
+
colorEstilo() {
|
|
443
|
+
let estiloFin = null;
|
|
444
|
+
let claseFin = null;
|
|
445
|
+
let encontro = false;
|
|
446
|
+
this.coloresValor = this.ordenarPorPropiedad(this.coloresValor, 'valorMaximo');
|
|
447
|
+
this.coloresValor.forEach(estilo => {
|
|
448
|
+
if (!encontro && (this.porcentaje <= estilo.valorMaximo)) {
|
|
449
|
+
// console.log(this.porcentaje, estilo, (this.porcentaje < estilo.valorMaximo));
|
|
450
|
+
encontro = true;
|
|
451
|
+
estiloFin = estilo.style;
|
|
452
|
+
claseFin = estilo.class;
|
|
453
|
+
}
|
|
454
|
+
});
|
|
455
|
+
return {
|
|
456
|
+
style: estiloFin ?? '',
|
|
457
|
+
class: claseFin ?? '',
|
|
458
|
+
};
|
|
459
|
+
}
|
|
460
|
+
ordenarPorPropiedad(objData, propiedad, numeros = false) {
|
|
461
|
+
if (numeros) {
|
|
462
|
+
return objData.sort((a, b) => a[propiedad] - b[propiedad]);
|
|
463
|
+
}
|
|
464
|
+
return objData.sort((a, b) => (a[propiedad] > b[propiedad]) ? 1 : ((b[propiedad] > a[propiedad]) ? -1 : 0));
|
|
465
|
+
}
|
|
466
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
467
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ProgressBarComponent, isStandalone: true, selector: "jvs-progress-bar", inputs: { objThis: "objThis", porcentaje: "porcentaje", textoCentrado: "textoCentrado", textoMostrar: "textoMostrar", formatoNumero: "formatoNumero", coloresValor: "coloresValor" }, host: { classAttribute: "jvs-progress-bar" }, 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", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }] });
|
|
468
|
+
}
|
|
469
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
470
|
+
type: Component,
|
|
471
|
+
args: [{ selector: 'jvs-progress-bar', imports: [
|
|
472
|
+
CommonModule,
|
|
473
|
+
DecimalPipe
|
|
474
|
+
], host: {
|
|
475
|
+
class: 'jvs-progress-bar',
|
|
476
|
+
}, 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" }]
|
|
477
|
+
}], ctorParameters: () => [], propDecorators: { objThis: [{
|
|
478
|
+
type: Input
|
|
479
|
+
}], porcentaje: [{
|
|
480
|
+
type: Input
|
|
481
|
+
}], textoCentrado: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], textoMostrar: [{
|
|
484
|
+
type: Input
|
|
485
|
+
}], formatoNumero: [{
|
|
486
|
+
type: Input
|
|
487
|
+
}], coloresValor: [{
|
|
488
|
+
type: Input
|
|
489
|
+
}] } });
|
|
490
|
+
|
|
491
|
+
class ColumnTypeProgressbarComponent extends ColumnTypeComponent {
|
|
492
|
+
column = {};
|
|
493
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeProgressbarComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
494
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeProgressbarComponent, isStandalone: false, selector: "jvs-column-type-progressbar", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\n <jvs-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) : ''\"\n ></jvs-progress-bar>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: ProgressBarComponent, selector: "jvs-progress-bar", inputs: ["objThis", "porcentaje", "textoCentrado", "textoMostrar", "formatoNumero", "coloresValor"] }] });
|
|
495
|
+
}
|
|
496
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeProgressbarComponent, decorators: [{
|
|
497
|
+
type: Component,
|
|
498
|
+
args: [{ selector: 'jvs-column-type-progressbar', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\n <jvs-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) : ''\"\n ></jvs-progress-bar>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n" }]
|
|
499
|
+
}], propDecorators: { column: [{
|
|
500
|
+
type: Input,
|
|
501
|
+
args: [{ required: true }]
|
|
502
|
+
}] } });
|
|
503
|
+
|
|
504
|
+
class NoSanitizePipe {
|
|
505
|
+
domSanitizer;
|
|
506
|
+
constructor(domSanitizer) {
|
|
507
|
+
this.domSanitizer = domSanitizer;
|
|
508
|
+
}
|
|
509
|
+
transform(html) {
|
|
510
|
+
return this.domSanitizer.bypassSecurityTrustHtml(html);
|
|
511
|
+
}
|
|
512
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
513
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, isStandalone: true, name: "noSanitize" });
|
|
514
|
+
}
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: NoSanitizePipe, decorators: [{
|
|
516
|
+
type: Pipe,
|
|
517
|
+
args: [{ name: 'noSanitize' }]
|
|
518
|
+
}], ctorParameters: () => [{ type: i1$1.DomSanitizer }] });
|
|
519
|
+
|
|
520
|
+
class ZeroFillPipe {
|
|
521
|
+
transform(value, digitos, ...args) {
|
|
522
|
+
let s = value + '';
|
|
523
|
+
while (s.length < digitos) {
|
|
524
|
+
s = '0' + s;
|
|
525
|
+
}
|
|
526
|
+
return s;
|
|
527
|
+
}
|
|
528
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
529
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, isStandalone: true, name: "zeroFill" });
|
|
530
|
+
}
|
|
531
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ZeroFillPipe, decorators: [{
|
|
532
|
+
type: Pipe,
|
|
533
|
+
args: [{
|
|
534
|
+
name: 'zeroFill',
|
|
535
|
+
}]
|
|
536
|
+
}] });
|
|
537
|
+
function zeroFill(value, digitos, ...args) {
|
|
538
|
+
return new ZeroFillPipe().transform(value, digitos, args);
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
// export * from './progress-spinner.service';
|
|
542
|
+
|
|
543
|
+
class ColumnTypeTextComponent extends ColumnTypeComponent {
|
|
544
|
+
column = {}; // 🟢 Solución
|
|
545
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeTextComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
546
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeTextComponent, isStandalone: false, selector: "jvs-column-type-text", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\n <div *ngIf=\"column.innerHTML; else sinInnerHTML\" [class]=\"column.text?.cssContenedor\" [ngStyle]=\"column.text?.cssStyle\" class=\"hover:!max-h-max\"\n [innerHTML]=\"column.innerHTML(row) | noSanitize\">\n </div>\n <ng-template #sinInnerHTML>\n <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container\n *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [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\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n </ng-template>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n\n\n<!--<ng-container matColumnDef=\"{{ column.property }}\">\n<th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </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\"\n [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 <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container\n *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [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\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n </td>\n</ng-template>\n<th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell\n [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n</th>\n</ng-container>-->\n\n<ng-template #tipoDatoString let-row=\"row\" let-fila=\"fila\" let-tipo=\"tipo\" let-value=\"value\" let-format=\"format\"\n let-clase=\"class\">\n <ng-container [ngSwitch]=\"tipo\">\n <ng-container *ngSwitchCase=\"'text'\"><span [ngClass]=\"clase\" *ngIf=\"value\"\n (click)=\"accionClick(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\"\n (click)=\"accionClick(row, $event)\">{{ value | date: (format || 'dd/MM/yyyy') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'number'\"><span [ngClass]=\"clase\" *ngIf=\"value\"\n (click)=\"accionClick(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(row, $event)\">{{ value | number: (format || '1.2-2') }}</span>\n </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", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: NoSanitizePipe, name: "noSanitize" }, { kind: "pipe", type: ZeroFillPipe, name: "zeroFill" }] });
|
|
547
|
+
}
|
|
548
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeTextComponent, decorators: [{
|
|
549
|
+
type: Component,
|
|
550
|
+
args: [{ selector: 'jvs-column-type-text', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\n <div *ngIf=\"column.innerHTML; else sinInnerHTML\" [class]=\"column.text?.cssContenedor\" [ngStyle]=\"column.text?.cssStyle\" class=\"hover:!max-h-max\"\n [innerHTML]=\"column.innerHTML(row) | noSanitize\">\n </div>\n <ng-template #sinInnerHTML>\n <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container\n *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [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\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n </ng-template>\n</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n\n\n<!--<ng-container matColumnDef=\"{{ column.property }}\">\n<th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </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\"\n [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 <ng-container *ngIf=\"column.text && column.text?.separador else campoTextNormal\">\n <div [class]=\"column.text?.cssContenedor\">\n <ng-container\n *ngFor=\"let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)\">\n <ng-template *ngIf=\"column.property\" [ngTemplateOutlet]=\"tipoDatoString\"\n [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\"\n [ngTemplateOutletContext]=\"{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }\"></ng-template>\n </ng-template>\n </td>\n</ng-template>\n<th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell\n [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n</th>\n</ng-container>-->\n\n<ng-template #tipoDatoString let-row=\"row\" let-fila=\"fila\" let-tipo=\"tipo\" let-value=\"value\" let-format=\"format\"\n let-clase=\"class\">\n <ng-container [ngSwitch]=\"tipo\">\n <ng-container *ngSwitchCase=\"'text'\"><span [ngClass]=\"clase\" *ngIf=\"value\"\n (click)=\"accionClick(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\"\n (click)=\"accionClick(row, $event)\">{{ value | date: (format || 'dd/MM/yyyy') }}</span></ng-container>\n <ng-container *ngSwitchCase=\"'number'\"><span [ngClass]=\"clase\" *ngIf=\"value\"\n (click)=\"accionClick(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(row, $event)\">{{ value | number: (format || '1.2-2') }}</span>\n </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" }]
|
|
551
|
+
}], propDecorators: { column: [{
|
|
552
|
+
type: Input,
|
|
553
|
+
args: [{ required: true }]
|
|
554
|
+
}] } });
|
|
555
|
+
|
|
556
|
+
class ColumnTypeMoneyComponent extends ColumnTypeComponent {
|
|
557
|
+
column = {};
|
|
558
|
+
value(row) {
|
|
559
|
+
return (this.column.transformar ? this.column.transformar(row) : row[this.column.property]);
|
|
560
|
+
}
|
|
561
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeMoneyComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
562
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeMoneyComponent, isStandalone: false, selector: "jvs-column-type-money", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\n <span [ngClass]=\"column.textCss\"\n [class.text-sky-700]=\"(value(row)) >= 0\" [class.text-red-700]=\"(value(row)) < 0\"\n *ngIf=\"value(row)\"\n (click)=\"accionClick(row, $event)\">{{ value(row) | number: (column.format || '1.2-2') }}</span>\n</ng-template>\n<ng-template #columnFooterTemplate let-row=\"row\">\n\t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\"\n [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</ng-template>\n\n<!--<jvs-column-type [column]=\"column\" [cellTemplate]=\"cellTemplate\" [columnFooterTemplate]=\"columnFooterTemplate\"></jvs-column-type>-->\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n \t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\"\n [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 </th>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "pipe", type: i1.DecimalPipe, name: "number" }, { kind: "pipe", type: i1.CurrencyPipe, name: "currency" }] });
|
|
563
|
+
}
|
|
564
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeMoneyComponent, decorators: [{
|
|
565
|
+
type: Component,
|
|
566
|
+
args: [{ selector: 'jvs-column-type-money', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\n <span [ngClass]=\"column.textCss\"\n [class.text-sky-700]=\"(value(row)) >= 0\" [class.text-red-700]=\"(value(row)) < 0\"\n *ngIf=\"value(row)\"\n (click)=\"accionClick(row, $event)\">{{ value(row) | number: (column.format || '1.2-2') }}</span>\n</ng-template>\n<ng-template #columnFooterTemplate let-row=\"row\">\n\t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\"\n [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</ng-template>\n\n<!--<jvs-column-type [column]=\"column\" [cellTemplate]=\"cellTemplate\" [columnFooterTemplate]=\"columnFooterTemplate\"></jvs-column-type>-->\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n \t\t<span *ngIf=\"column.transformarFooter\"\n [class.text-sky-700]=\"column.transformarFooter() >= 0\"\n [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 </th>\n</ng-container>\n" }]
|
|
567
|
+
}], propDecorators: { column: [{
|
|
568
|
+
type: Input,
|
|
569
|
+
args: [{ required: true }]
|
|
570
|
+
}] } });
|
|
571
|
+
|
|
572
|
+
class ColumnTypeIconsComponent extends ColumnTypeComponent {
|
|
573
|
+
column = {};
|
|
574
|
+
obtenerItems(columna, row) {
|
|
575
|
+
if (typeof columna.items === 'function') {
|
|
576
|
+
return columna.items(row);
|
|
577
|
+
}
|
|
578
|
+
return columna.items;
|
|
579
|
+
}
|
|
580
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeIconsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
581
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: ColumnTypeIconsComponent, isStandalone: false, selector: "jvs-column-type-icons", inputs: { column: "column" }, usesInheritance: true, ngImport: i0, template: "<ng-template #cellTemplate let-row=\"row\">\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\"\n [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\"\n [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</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n\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", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "component", type: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
582
|
+
}
|
|
583
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeIconsComponent, decorators: [{
|
|
584
|
+
type: Component,
|
|
585
|
+
args: [{ selector: 'jvs-column-type-icons', standalone: false, template: "<ng-template #cellTemplate let-row=\"row\">\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\"\n [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\"\n [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</ng-template>\n\n<ng-container matColumnDef=\"{{ column.property }}\">\n <!-- Definici\u00F3n del encabezado de la columna -->\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n </th>\n\n <!-- Cuerpo de la celda, definido por los hijos -->\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell (click)=\"accionClick(row, $event)\">\n\n <ng-container [ngTemplateOutlet]=\"cellTemplate\" [ngTemplateOutletContext]=\"{row}\"></ng-container>\n\n </td>\n\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" mat-footer-cell>\n {{ column.transformarFooter ? column.transformarFooter() : '' }}\n </th>\n</ng-container>\n\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" }]
|
|
586
|
+
}], propDecorators: { column: [{
|
|
587
|
+
type: Input,
|
|
588
|
+
args: [{ required: true }]
|
|
589
|
+
}] } });
|
|
590
|
+
|
|
591
|
+
class ColumnTypeModule {
|
|
592
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
593
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeModule, declarations: [ColumnTypeComponent,
|
|
594
|
+
ColumnTypeTextComponent,
|
|
595
|
+
ColumnTypeMoneyComponent,
|
|
596
|
+
ColumnTypeNumberComponent,
|
|
597
|
+
ColumnTypeDateComponent,
|
|
598
|
+
ColumnTypeIconsComponent,
|
|
599
|
+
ColumnTypeSinoComponent,
|
|
600
|
+
ColumnTypeProgressbarComponent], imports: [CommonModule,
|
|
601
|
+
MatTableModule,
|
|
602
|
+
MatSortModule,
|
|
603
|
+
MatTooltipModule,
|
|
604
|
+
NoSanitizePipe,
|
|
605
|
+
ZeroFillPipe,
|
|
606
|
+
MatRipple,
|
|
607
|
+
MatIcon,
|
|
608
|
+
ProgressBarComponent], exports: [ColumnTypeTextComponent,
|
|
609
|
+
ColumnTypeMoneyComponent,
|
|
610
|
+
ColumnTypeNumberComponent,
|
|
611
|
+
ColumnTypeDateComponent,
|
|
612
|
+
ColumnTypeIconsComponent,
|
|
613
|
+
ColumnTypeSinoComponent,
|
|
614
|
+
ColumnTypeProgressbarComponent] });
|
|
615
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeModule, imports: [CommonModule,
|
|
616
|
+
MatTableModule,
|
|
617
|
+
MatSortModule,
|
|
618
|
+
MatTooltipModule,
|
|
619
|
+
MatIcon,
|
|
620
|
+
ProgressBarComponent] });
|
|
621
|
+
}
|
|
622
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: ColumnTypeModule, decorators: [{
|
|
623
|
+
type: NgModule,
|
|
624
|
+
args: [{
|
|
625
|
+
declarations: [
|
|
626
|
+
ColumnTypeComponent,
|
|
627
|
+
ColumnTypeTextComponent,
|
|
628
|
+
ColumnTypeMoneyComponent,
|
|
629
|
+
ColumnTypeNumberComponent,
|
|
630
|
+
ColumnTypeDateComponent,
|
|
631
|
+
ColumnTypeIconsComponent,
|
|
632
|
+
ColumnTypeSinoComponent,
|
|
633
|
+
ColumnTypeProgressbarComponent,
|
|
634
|
+
],
|
|
635
|
+
imports: [
|
|
636
|
+
CommonModule,
|
|
637
|
+
MatTableModule,
|
|
638
|
+
MatSortModule,
|
|
639
|
+
MatTooltipModule,
|
|
640
|
+
NoSanitizePipe,
|
|
641
|
+
ZeroFillPipe,
|
|
642
|
+
MatRipple,
|
|
643
|
+
MatIcon,
|
|
644
|
+
ProgressBarComponent,
|
|
645
|
+
],
|
|
646
|
+
exports: [
|
|
647
|
+
ColumnTypeTextComponent,
|
|
648
|
+
ColumnTypeMoneyComponent,
|
|
649
|
+
ColumnTypeNumberComponent,
|
|
650
|
+
ColumnTypeDateComponent,
|
|
651
|
+
ColumnTypeIconsComponent,
|
|
652
|
+
ColumnTypeSinoComponent,
|
|
653
|
+
ColumnTypeProgressbarComponent,
|
|
654
|
+
]
|
|
655
|
+
}]
|
|
656
|
+
}] });
|
|
657
|
+
|
|
658
|
+
class TablaMantenimientoColumnDefsComponent {
|
|
659
|
+
table;
|
|
660
|
+
cdRef;
|
|
661
|
+
objThis;
|
|
662
|
+
nombreColeccion;
|
|
663
|
+
colDetalle;
|
|
664
|
+
chkLista; // = new DataModel();
|
|
665
|
+
chkListaChange = new EventEmitter();
|
|
666
|
+
columnDefLocales;
|
|
667
|
+
columnDefEnSubComponentes;
|
|
668
|
+
constructor(table, cdRef) {
|
|
669
|
+
this.table = table;
|
|
670
|
+
this.cdRef = cdRef;
|
|
671
|
+
}
|
|
672
|
+
ngAfterContentInit() {
|
|
673
|
+
if (this.table) {
|
|
674
|
+
this.cdRef.detectChanges();
|
|
675
|
+
this.columnDefEnSubComponentes.forEach(refCol => {
|
|
676
|
+
this.table.addColumnDef(refCol);
|
|
677
|
+
});
|
|
678
|
+
this.columnDefLocales.forEach(refCol => {
|
|
679
|
+
this.table.addColumnDef(refCol);
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
trackByProperty(index, column) {
|
|
684
|
+
return column.property;
|
|
685
|
+
}
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoColumnDefsComponent, deps: [{ token: i2.MatTable, optional: true }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
687
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.7", type: TablaMantenimientoColumnDefsComponent, isStandalone: true, selector: "jvs-tabla-mantenimiento-column-defs", inputs: { objThis: "objThis", nombreColeccion: "nombreColeccion", colDetalle: "colDetalle", chkLista: "chkLista" }, outputs: { chkListaChange: "chkListaChange" }, queries: [{ propertyName: "columnDefEnSubComponentes", predicate: MatColumnDef, descendants: true }], viewQueries: [{ propertyName: "columnDefLocales", 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 <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 <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 === 'estiloEstablecido'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell\n mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n <span class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n {{ column.property }}\n <span class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </td>\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell\n [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n </th>\n\n </ng-container>\n\n <jvs-column-type-text *ngIf=\"column.type == 'text'\" [column]=\"column\"></jvs-column-type-text>\n <jvs-column-type-money *ngIf=\"column.type == 'money'\" [column]=\"column\"></jvs-column-type-money>\n <jvs-column-type-number *ngIf=\"column.type == 'number'\" [column]=\"column\"></jvs-column-type-number>\n <jvs-column-type-date *ngIf=\"column.type == 'date'\" [column]=\"column\"></jvs-column-type-date>\n <jvs-column-type-icons *ngIf=\"column.type == 'icons'\" [column]=\"column\"></jvs-column-type-icons>\n <jvs-column-type-sino *ngIf=\"column.type == 'yes_no'\" [column]=\"column\"></jvs-column-type-sino>\n <jvs-column-type-progressbar *ngIf=\"column.type == 'progress'\" [column]=\"column\"></jvs-column-type-progressbar>\n\n\n\n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.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: i5.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatRippleModule }, { kind: "directive", type: i5$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "component", type: i3.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ColumnTypeModule }, { kind: "component", type: ColumnTypeTextComponent, selector: "jvs-column-type-text", inputs: ["column"] }, { kind: "component", type: ColumnTypeMoneyComponent, selector: "jvs-column-type-money", inputs: ["column"] }, { kind: "component", type: ColumnTypeNumberComponent, selector: "jvs-column-type-number", inputs: ["column"] }, { kind: "component", type: ColumnTypeDateComponent, selector: "jvs-column-type-date", inputs: ["column"] }, { kind: "component", type: ColumnTypeIconsComponent, selector: "jvs-column-type-icons", inputs: ["column"] }, { kind: "component", type: ColumnTypeSinoComponent, selector: "jvs-column-type-sino", inputs: ["column"] }, { kind: "component", type: ColumnTypeProgressbarComponent, selector: "jvs-column-type-progressbar", inputs: ["column"] }] });
|
|
688
|
+
}
|
|
689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoColumnDefsComponent, decorators: [{
|
|
690
|
+
type: Component,
|
|
691
|
+
args: [{ selector: 'jvs-tabla-mantenimiento-column-defs', standalone: true, imports: [
|
|
692
|
+
CommonModule,
|
|
693
|
+
MatCheckboxModule,
|
|
694
|
+
MatIconModule,
|
|
695
|
+
MatRippleModule,
|
|
696
|
+
MatSortModule,
|
|
697
|
+
MatTableModule,
|
|
698
|
+
MatTooltipModule,
|
|
699
|
+
ReactiveFormsModule,
|
|
700
|
+
FormsModule,
|
|
701
|
+
ColumnTypeModule,
|
|
702
|
+
], 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 <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 <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 === 'estiloEstablecido'\" [matColumnDef]=\"column.property\">\n\n <th *matHeaderCellDef [ngClass]=\"column.cssClassesTH\" class=\"uppercase text-center\" mat-header-cell\n mat-sort-header\n [disabled]=\"column.sort === false\">\n <span [innerHTML]=\"column.label ?? ''\">{{ column.label }} </span>\n <span class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </th>\n <td *matCellDef=\"let row\" [ngClass]=\"column.cssClasses\" mat-cell>\n {{ column.property }}\n <span class=\"text-red-900 font-bold bg-white\">CONFIGURAR ESTILO ESTABLECIDO</span>\n </td>\n <th *matFooterCellDef [ngClass]=\"column.cssFooterClasses\" style=\"height: unset !important;\" mat-footer-cell\n [innerHTML]=\"column.transformarFooter ? column.transformarFooter() : ''\">\n </th>\n\n </ng-container>\n\n <jvs-column-type-text *ngIf=\"column.type == 'text'\" [column]=\"column\"></jvs-column-type-text>\n <jvs-column-type-money *ngIf=\"column.type == 'money'\" [column]=\"column\"></jvs-column-type-money>\n <jvs-column-type-number *ngIf=\"column.type == 'number'\" [column]=\"column\"></jvs-column-type-number>\n <jvs-column-type-date *ngIf=\"column.type == 'date'\" [column]=\"column\"></jvs-column-type-date>\n <jvs-column-type-icons *ngIf=\"column.type == 'icons'\" [column]=\"column\"></jvs-column-type-icons>\n <jvs-column-type-sino *ngIf=\"column.type == 'yes_no'\" [column]=\"column\"></jvs-column-type-sino>\n <jvs-column-type-progressbar *ngIf=\"column.type == 'progress'\" [column]=\"column\"></jvs-column-type-progressbar>\n\n\n\n</ng-container>\n" }]
|
|
703
|
+
}], ctorParameters: () => [{ type: i2.MatTable, decorators: [{
|
|
704
|
+
type: Optional
|
|
705
|
+
}] }, { type: i0.ChangeDetectorRef }], propDecorators: { objThis: [{
|
|
706
|
+
type: Input
|
|
707
|
+
}], nombreColeccion: [{
|
|
708
|
+
type: Input
|
|
709
|
+
}], colDetalle: [{
|
|
710
|
+
type: Input
|
|
711
|
+
}], chkLista: [{
|
|
712
|
+
type: Input
|
|
713
|
+
}], chkListaChange: [{
|
|
714
|
+
type: Output
|
|
715
|
+
}], columnDefLocales: [{
|
|
716
|
+
type: ViewChildren,
|
|
717
|
+
args: [MatColumnDef]
|
|
718
|
+
}], columnDefEnSubComponentes: [{
|
|
719
|
+
type: ContentChildren,
|
|
720
|
+
args: [MatColumnDef, { descendants: true }]
|
|
721
|
+
}] } });
|
|
722
|
+
|
|
723
|
+
class TablaMantenimientoMenuComponent {
|
|
724
|
+
objThis;
|
|
725
|
+
nombreColeccion;
|
|
726
|
+
item;
|
|
727
|
+
derechosActuales;
|
|
728
|
+
// @Input() modalPrincipal;
|
|
729
|
+
// @Input() botonDisabled = (btn: BotonMantenimiento, item: any) => [];
|
|
730
|
+
opcionSelecionada = new EventEmitter();
|
|
731
|
+
menu;
|
|
732
|
+
subItems;
|
|
733
|
+
botonTemplate;
|
|
734
|
+
constructor() {
|
|
735
|
+
}
|
|
736
|
+
ngOnInit() {
|
|
395
737
|
}
|
|
738
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
739
|
+
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: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.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"] }] });
|
|
396
740
|
}
|
|
741
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoMenuComponent, decorators: [{
|
|
742
|
+
type: Component,
|
|
743
|
+
args: [{ selector: 'jvs-tabla-mantenimiento-menu', standalone: true, imports: [
|
|
744
|
+
CommonModule,
|
|
745
|
+
MatMenuModule,
|
|
746
|
+
], 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" }]
|
|
747
|
+
}], ctorParameters: () => [], propDecorators: { objThis: [{
|
|
748
|
+
type: Input
|
|
749
|
+
}], nombreColeccion: [{
|
|
750
|
+
type: Input
|
|
751
|
+
}], item: [{
|
|
752
|
+
type: Input
|
|
753
|
+
}], derechosActuales: [{
|
|
754
|
+
type: Input
|
|
755
|
+
}], opcionSelecionada: [{
|
|
756
|
+
type: Output
|
|
757
|
+
}], menu: [{
|
|
758
|
+
type: ViewChild,
|
|
759
|
+
args: ['menu', { static: true }]
|
|
760
|
+
}], subItems: [{
|
|
761
|
+
type: Input,
|
|
762
|
+
args: [{ required: true }]
|
|
763
|
+
}], botonTemplate: [{
|
|
764
|
+
type: Input,
|
|
765
|
+
args: [{ required: true }]
|
|
766
|
+
}] } });
|
|
397
767
|
|
|
398
768
|
const getFileName = (name) => {
|
|
399
769
|
const timeSpan = new Date().toISOString();
|
|
@@ -438,101 +808,6 @@ class TableUtil {
|
|
|
438
808
|
}
|
|
439
809
|
}
|
|
440
810
|
|
|
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
811
|
class TablaMantenimientoService {
|
|
537
812
|
get templateBotonesComunes() {
|
|
538
813
|
return [
|
|
@@ -661,6 +936,7 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
661
936
|
// FILTRO BUSQUEDA
|
|
662
937
|
opcFiltroActual = {};
|
|
663
938
|
capitalizarTexto = capitalizarTexto;
|
|
939
|
+
_seleccionado = {};
|
|
664
940
|
cCampoBusqueda = new FormControl('');
|
|
665
941
|
chkLista = new DataModel();
|
|
666
942
|
constructor(fb, overlay, viewContainerRef, tablaMantenimientoService, cdRef) {
|
|
@@ -669,6 +945,7 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
669
945
|
this.viewContainerRef = viewContainerRef;
|
|
670
946
|
this.tablaMantenimientoService = tablaMantenimientoService;
|
|
671
947
|
this.cdRef = cdRef;
|
|
948
|
+
// this._seleccionado[this.nombreColeccion] = null;
|
|
672
949
|
}
|
|
673
950
|
_ctrlBusqueda = '';
|
|
674
951
|
get ctrlBusqueda() {
|
|
@@ -720,17 +997,49 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
720
997
|
...btnActual
|
|
721
998
|
};
|
|
722
999
|
}
|
|
723
|
-
if (
|
|
724
|
-
listaInicial[idx].text
|
|
725
|
-
|
|
726
|
-
|
|
1000
|
+
if (listaInicial[idx].type == 'text') {
|
|
1001
|
+
if (!listaInicial[idx].text) {
|
|
1002
|
+
listaInicial[idx].text = {
|
|
1003
|
+
cssStyle: {}
|
|
1004
|
+
};
|
|
1005
|
+
}
|
|
1006
|
+
else if (!listaInicial[idx].text.cssStyle) {
|
|
1007
|
+
listaInicial[idx].text.cssStyle = {};
|
|
1008
|
+
}
|
|
1009
|
+
listaInicial[idx].text.cssStyle = { ...listaInicial[idx].text.cssStyle, ...{ 'max-height': this.itemSize + 'px' } };
|
|
727
1010
|
}
|
|
728
|
-
else if (
|
|
729
|
-
|
|
1011
|
+
else if (listaInicial[idx].type == 'estado') {
|
|
1012
|
+
const mutar = {
|
|
1013
|
+
...listaInicial[idx],
|
|
1014
|
+
type: 'icons',
|
|
1015
|
+
iconsDef: {
|
|
1016
|
+
soloIcono: true,
|
|
1017
|
+
iconSize: '16px',
|
|
1018
|
+
items: [
|
|
1019
|
+
// {
|
|
1020
|
+
// icon: 'roundToggleOff', contentCss: 'text-gray-400',
|
|
1021
|
+
// esVisible: (row) => row['iCredDepenTareaEstado'] == 0
|
|
1022
|
+
// },
|
|
1023
|
+
// {
|
|
1024
|
+
// icon: 'roundToggleOn', contentCss: 'text-green-600',
|
|
1025
|
+
// esVisible: (row) => row['iCredDepenTareaEstado'] == 1
|
|
1026
|
+
// },
|
|
1027
|
+
]
|
|
1028
|
+
},
|
|
1029
|
+
};
|
|
1030
|
+
if (listaInicial[idx].estados) {
|
|
1031
|
+
listaInicial[idx].estados.forEach((estado) => {
|
|
1032
|
+
if (Array.isArray(mutar.iconsDef.items)) {
|
|
1033
|
+
mutar.iconsDef.items.push({
|
|
1034
|
+
icon: estado.icon, contentCss: estado.cssClasses,
|
|
1035
|
+
esVisible: (row) => row[listaInicial[idx].property] == estado.estado,
|
|
1036
|
+
});
|
|
1037
|
+
}
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
listaInicial[idx] = mutar;
|
|
730
1041
|
}
|
|
731
|
-
listaInicial[idx].text.cssStyle = { ...listaInicial[idx].text.cssStyle, ...{ 'max-height': this.itemSize + 'px' } };
|
|
732
1042
|
if (btnActual.type == 'custom') {
|
|
733
|
-
listaInicial[idx]['visibleAlias'] = listaInicial[idx].visible ?? true;
|
|
734
1043
|
listaInicial[idx].visible = false;
|
|
735
1044
|
}
|
|
736
1045
|
});
|
|
@@ -826,10 +1135,16 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
826
1135
|
get tieneCheckbox() {
|
|
827
1136
|
return this.columnasTabla && this.columnasTabla.length > 0 && this.columnasTabla.find(col => col.type === 'checkbox') || false;
|
|
828
1137
|
}
|
|
1138
|
+
get buscarItemSeleccionado() {
|
|
1139
|
+
return this.dataSource.data.find(itm => this._seleccionado === this.propiedadSeleccion(itm));
|
|
1140
|
+
}
|
|
829
1141
|
get objSeleccionado() {
|
|
830
|
-
return this.objThis?.['seleccionados']?.[this.nombreColeccion];
|
|
1142
|
+
return this.buscarItemSeleccionado; // ?? this.objThis?.['seleccionados']?.[this.nombreColeccion];
|
|
831
1143
|
}
|
|
832
1144
|
set objSeleccionado(val) {
|
|
1145
|
+
if (val) {
|
|
1146
|
+
this.seleccionarItem(val, true);
|
|
1147
|
+
}
|
|
833
1148
|
if (!this.objThis) {
|
|
834
1149
|
this.objThis = {};
|
|
835
1150
|
}
|
|
@@ -868,16 +1183,20 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
868
1183
|
this.dataSuscription.subscribe(res => {
|
|
869
1184
|
if (res) {
|
|
870
1185
|
if (this.objSeleccionado) {
|
|
1186
|
+
console.log('SELECCIONADO');
|
|
871
1187
|
if (this.idTabla && this.idTabla.length > 0) {
|
|
1188
|
+
console.log('ID TABLA');
|
|
872
1189
|
const arrayData = this.idTabla.map(d => this.objSeleccionado[d]);
|
|
873
|
-
|
|
1190
|
+
console.log(arrayData);
|
|
874
1191
|
const busqueda = buscarEnArray(res, this.idTabla, arrayData);
|
|
1192
|
+
console.log(busqueda);
|
|
875
1193
|
if (busqueda) {
|
|
876
1194
|
console.log(busqueda);
|
|
877
1195
|
this.objSeleccionado = busqueda;
|
|
878
1196
|
}
|
|
879
1197
|
}
|
|
880
1198
|
else {
|
|
1199
|
+
console.log('eLSE ID TABLA');
|
|
881
1200
|
const dataStr = res.find((itm) => shortHash(JSON.stringify({
|
|
882
1201
|
...itm, claseFinal: undefined
|
|
883
1202
|
})) == shortHash(JSON.stringify({ ...this.objSeleccionado, claseFinal: undefined })));
|
|
@@ -896,14 +1215,6 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
896
1215
|
this.componenteCargadoTotalmente = true;
|
|
897
1216
|
this.cdRef.detectChanges();
|
|
898
1217
|
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
1218
|
this.table.addColumnDef(columnDef);
|
|
908
1219
|
// this.cdRef.detectChanges();
|
|
909
1220
|
});
|
|
@@ -920,9 +1231,9 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
920
1231
|
this.agregarBotonesExportacion();
|
|
921
1232
|
}
|
|
922
1233
|
}
|
|
923
|
-
trackByFn(index, item) {
|
|
924
|
-
return this.
|
|
925
|
-
}
|
|
1234
|
+
trackByFn = (index, item) => {
|
|
1235
|
+
return this.propiedadSeleccion(item);
|
|
1236
|
+
};
|
|
926
1237
|
agregarBotonesExportacion() {
|
|
927
1238
|
const fnAddBoton = (condicion, tipoBoton) => {
|
|
928
1239
|
if (condicion) {
|
|
@@ -987,7 +1298,7 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
987
1298
|
if (this.campoAnulado && (item[this.campoAnulado] == 1)) {
|
|
988
1299
|
claseFinal = claseFinal.concat(this.classAnulado);
|
|
989
1300
|
}
|
|
990
|
-
if (this.objSeleccionado == item) {
|
|
1301
|
+
if (this.objSeleccionado == item || this.esSeleccionActual(item)) {
|
|
991
1302
|
claseFinal = claseFinal.concat(this.classSeleccionado);
|
|
992
1303
|
}
|
|
993
1304
|
claseFinal = claseFinal.concat(this.condicionesClaseFila(item));
|
|
@@ -1103,7 +1414,24 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
1103
1414
|
}
|
|
1104
1415
|
return disabled;
|
|
1105
1416
|
}
|
|
1417
|
+
propiedadSeleccion(item) {
|
|
1418
|
+
return `${this.nombreColeccion}_${this.idTablaValor(item)}`;
|
|
1419
|
+
}
|
|
1420
|
+
esSeleccionActual(item) {
|
|
1421
|
+
return this._seleccionado === this.propiedadSeleccion(item);
|
|
1422
|
+
}
|
|
1423
|
+
seleccionarItem(item, forzado = false) {
|
|
1424
|
+
const idItem = this.propiedadSeleccion(item);
|
|
1425
|
+
console.log(this._seleccionado, idItem);
|
|
1426
|
+
if (forzado) {
|
|
1427
|
+
this._seleccionado = idItem;
|
|
1428
|
+
}
|
|
1429
|
+
else {
|
|
1430
|
+
this._seleccionado = this._seleccionado === idItem ? null : idItem;
|
|
1431
|
+
}
|
|
1432
|
+
}
|
|
1106
1433
|
opcMenu(item, objMenu, modal = null, retorno = false) {
|
|
1434
|
+
console.log(this.buscarItemSeleccionado);
|
|
1107
1435
|
console.log(objMenu);
|
|
1108
1436
|
// let salir = this.readOnly;
|
|
1109
1437
|
// if (salir && this.readOnly === 'permitirSeleccion' && ['ver', 'seleccionar'].includes(objMenu.tipo)) {
|
|
@@ -1159,7 +1487,7 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
1159
1487
|
acumulador[nColumn] = dataGeneradoPorHtml.sheetToJson[idx][columna.label];
|
|
1160
1488
|
}
|
|
1161
1489
|
else {
|
|
1162
|
-
if (columna.innerHTML) {
|
|
1490
|
+
if (columna.type == 'text' && columna.innerHTML) {
|
|
1163
1491
|
const convertirHtmlATexto = (html) => {
|
|
1164
1492
|
const elementoTemporal = document.createElement('div');
|
|
1165
1493
|
elementoTemporal.innerHTML = html;
|
|
@@ -1246,15 +1574,27 @@ let TablaMantenimientoComponent = class TablaMantenimientoComponent {
|
|
|
1246
1574
|
this.accionRecargar.emit(this.opcFiltroActual);
|
|
1247
1575
|
// this.accionRecargar.emit({ ...this.opcFiltroActual, ...{seleccionado: this.objSeleccionado}});
|
|
1248
1576
|
}
|
|
1249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoComponent, deps: [{ token: i1$
|
|
1577
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.7", ngImport: i0, type: TablaMantenimientoComponent, deps: [{ token: i1$2.FormBuilder }, { token: i2$1.Overlay }, { token: i0.ViewContainerRef }, { token: TablaMantenimientoService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
1250
1578
|
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
1579
|
{ 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: [
|
|
1580
|
+
], queries: [{ propertyName: "columnDefs", predicate: MatColumnDef, descendants: true }], 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 <pre>{{ this.chkLista.modelosChk | json }}</pre>\n <pre>{{ this.chkLista.checkbox.cantidadActivos | json }}</pre>\n <pre>{{ this.chkLista.checkbox.algunosActivos | json }}</pre>\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 [trackBy]=\"trackByFn\"\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)=\"seleccionarItem(row); 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]=\"propiedadSeleccion(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: [":root{--tabla-mantenimiento-seleccion-fondo: rgb(179, 217, 252);--tabla-mantenimiento-seleccion-texto: rgb(1, 84, 164);--mat-paginator-container-size: 30px}: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}.jvs-tabla-mantenimiento{width:inherit}.jvs-tabla-mantenimiento .contenedor-botones>*:first-child{@apply rounded-l;}.jvs-tabla-mantenimiento .contenedor-botones>*:last-child{@apply rounded-r;}.jvs-tabla-mantenimiento .mat-mdc-menu-content:not(:empty){@apply flex flex-col items-start;padding:0!important}.jvs-tabla-mantenimiento .mat-mdc-menu-item{line-height:24px!important;height:24px!important;min-height:24px!important}.jvs-tabla-mantenimiento .mat-mdc-menu-panel{min-height:auto!important}.jvs-tabla-mantenimiento .mat-mdc-table .mat-mdc-cell,.jvs-tabla-mantenimiento .mat-mdc-table .mat-mdc-header-cell .mat-mdc-footer-cell{white-space:unset}.jvs-tabla-mantenimiento .table-container{max-height:600px!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-table-sticky-border-elem-right{border-left:1px solid #e0e0e0}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}.jvs-tabla-mantenimiento .table-mantenimiento tr.regAnulado .mat-mdc-cell{color:unset!important}.jvs-tabla-mantenimiento .table-mantenimiento .bg-primary-activo .numeracionFila{@apply rounded-full bg-primary-contrast text-primary mx-1 p-1 w-6 h-6;}.jvs-tabla-mantenimiento .table-mantenimiento th .form-input{@apply w-auto;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell,.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell,.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell{border-width:1px;border-style:solid}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:not(.celda-numeracion-fila){padding:.05rem .25rem}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:last-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:last-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:last-of-type:not(.celda-numeracion-fila){padding:0 .25rem}.jvs-tabla-mantenimiento .table-mantenimiento .student-element-detail{overflow:hidden;display:flex;align-items:center;justify-content:center}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-header-row{height:25px!important;color:rgb(var(--color-primary))!important;background-color:rgb(var(--color-primary-contrast))!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-header-cell{padding:5px;font-size:10px;line-height:10px;font-weight:700!important;color:inherit}.jvs-tabla-mantenimiento .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):hover,.jvs-tabla-mantenimiento .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):focus{background-color:rgba(var(--color-primary-contrast),.04)}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-row .mat-mdc-cell,.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-footer-row .mat-mdc-cell{font-size:10px}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-row .mat-mdc-footer-cell:empty,.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-footer-row .mat-mdc-footer-cell:empty{border-width:0!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-cell{@apply leading-tight;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell{border-color:#d4d0d0;@apply text-center uppercase;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container{@apply flex items-center justify-between w-full;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-content{@apply inline w-full text-center;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-arrow{@apply flex-none;}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-sort-header-content{width:100%;text-align:center;display:unset;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3$1.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.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i5.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$1.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i3.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i2.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i2.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i2.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i2.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i2.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i2.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i2.MatFooterCellDef, selector: "[matFooterCellDef]" }, { kind: "directive", type: i2.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "directive", type: i2.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i2.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { kind: "component", type: i2.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i2.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: i2.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i4.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.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
1581
|
trigger('detailExpand', [
|
|
1254
1582
|
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
1255
1583
|
state('expanded', style({ height: '*' })),
|
|
1256
1584
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1257
1585
|
]),
|
|
1586
|
+
trigger('fadeInUp', [
|
|
1587
|
+
transition(':enter', [
|
|
1588
|
+
style({
|
|
1589
|
+
transform: 'translateY(20px)',
|
|
1590
|
+
opacity: 0
|
|
1591
|
+
}),
|
|
1592
|
+
animate(`400ms cubic-bezier(0.35, 0, 0.25, 1)`, style({
|
|
1593
|
+
transform: 'translateY(0)',
|
|
1594
|
+
opacity: 1
|
|
1595
|
+
}))
|
|
1596
|
+
])
|
|
1597
|
+
]),
|
|
1258
1598
|
] });
|
|
1259
1599
|
};
|
|
1260
1600
|
TablaMantenimientoComponent = TablaMantenimientoComponent_1 = __decorate([
|
|
@@ -1287,10 +1627,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
1287
1627
|
state('expanded', style({ height: '*' })),
|
|
1288
1628
|
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
1289
1629
|
]),
|
|
1630
|
+
trigger('fadeInUp', [
|
|
1631
|
+
transition(':enter', [
|
|
1632
|
+
style({
|
|
1633
|
+
transform: 'translateY(20px)',
|
|
1634
|
+
opacity: 0
|
|
1635
|
+
}),
|
|
1636
|
+
animate(`400ms cubic-bezier(0.35, 0, 0.25, 1)`, style({
|
|
1637
|
+
transform: 'translateY(0)',
|
|
1638
|
+
opacity: 1
|
|
1639
|
+
}))
|
|
1640
|
+
])
|
|
1641
|
+
]),
|
|
1290
1642
|
], providers: [
|
|
1291
1643
|
{ 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$
|
|
1644
|
+
], 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 <pre>{{ this.chkLista.modelosChk | json }}</pre>\n <pre>{{ this.chkLista.checkbox.cantidadActivos | json }}</pre>\n <pre>{{ this.chkLista.checkbox.algunosActivos | json }}</pre>\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 [trackBy]=\"trackByFn\"\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)=\"seleccionarItem(row); 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]=\"propiedadSeleccion(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: [":root{--tabla-mantenimiento-seleccion-fondo: rgb(179, 217, 252);--tabla-mantenimiento-seleccion-texto: rgb(1, 84, 164);--mat-paginator-container-size: 30px}: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}.jvs-tabla-mantenimiento{width:inherit}.jvs-tabla-mantenimiento .contenedor-botones>*:first-child{@apply rounded-l;}.jvs-tabla-mantenimiento .contenedor-botones>*:last-child{@apply rounded-r;}.jvs-tabla-mantenimiento .mat-mdc-menu-content:not(:empty){@apply flex flex-col items-start;padding:0!important}.jvs-tabla-mantenimiento .mat-mdc-menu-item{line-height:24px!important;height:24px!important;min-height:24px!important}.jvs-tabla-mantenimiento .mat-mdc-menu-panel{min-height:auto!important}.jvs-tabla-mantenimiento .mat-mdc-table .mat-mdc-cell,.jvs-tabla-mantenimiento .mat-mdc-table .mat-mdc-header-cell .mat-mdc-footer-cell{white-space:unset}.jvs-tabla-mantenimiento .table-container{max-height:600px!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-table-sticky-border-elem-right{border-left:1px solid #e0e0e0}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-table-sticky-border-elem-left{border-right:1px solid #e0e0e0}.jvs-tabla-mantenimiento .table-mantenimiento tr.regAnulado .mat-mdc-cell{color:unset!important}.jvs-tabla-mantenimiento .table-mantenimiento .bg-primary-activo .numeracionFila{@apply rounded-full bg-primary-contrast text-primary mx-1 p-1 w-6 h-6;}.jvs-tabla-mantenimiento .table-mantenimiento th .form-input{@apply w-auto;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell,.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell,.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell{border-width:1px;border-style:solid}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:not(.celda-numeracion-fila){padding:.05rem .25rem}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell:last-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-cell:last-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:first-of-type:not(.celda-numeracion-fila),.jvs-tabla-mantenimiento .table-mantenimiento td.mat-mdc-footer-cell:last-of-type:not(.celda-numeracion-fila){padding:0 .25rem}.jvs-tabla-mantenimiento .table-mantenimiento .student-element-detail{overflow:hidden;display:flex;align-items:center;justify-content:center}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-header-row{height:25px!important;color:rgb(var(--color-primary))!important;background-color:rgb(var(--color-primary-contrast))!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-header-cell{padding:5px;font-size:10px;line-height:10px;font-weight:700!important;color:inherit}.jvs-tabla-mantenimiento .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):hover,.jvs-tabla-mantenimiento .table-mantenimiento .mdc-data-table__row:not(.mdc-data-table__row--selected):not(.elemento-seleccionado):focus{background-color:rgba(var(--color-primary-contrast),.04)}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-row .mat-mdc-cell,.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-footer-row .mat-mdc-cell{font-size:10px}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-row .mat-mdc-footer-cell:empty,.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-footer-row .mat-mdc-footer-cell:empty{border-width:0!important}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-cell{@apply leading-tight;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell{border-color:#d4d0d0;@apply text-center uppercase;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container{@apply flex items-center justify-between w-full;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-content{@apply inline w-full text-center;}.jvs-tabla-mantenimiento .table-mantenimiento th.mat-mdc-header-cell .mat-sort-header-container .mat-sort-header-arrow{@apply flex-none;}.jvs-tabla-mantenimiento .table-mantenimiento .mat-mdc-sort-header-content{width:100%;text-align:center;display:unset;align-items:center}\n"] }]
|
|
1645
|
+
}], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: i2$1.Overlay }, { type: i0.ViewContainerRef }, { type: TablaMantenimientoService }, { type: i0.ChangeDetectorRef }], propDecorators: { id: [{
|
|
1294
1646
|
type: HostBinding
|
|
1295
1647
|
}], virtualScroll: [{
|
|
1296
1648
|
type: Input
|
|
@@ -1369,7 +1721,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
1369
1721
|
args: [MatTable, { static: false }]
|
|
1370
1722
|
}], columnDefs: [{
|
|
1371
1723
|
type: ContentChildren,
|
|
1372
|
-
args: [MatColumnDef]
|
|
1724
|
+
args: [MatColumnDef, { descendants: true }]
|
|
1373
1725
|
}], derechosActuales: [{
|
|
1374
1726
|
type: Input
|
|
1375
1727
|
}], rows: [{
|
|
@@ -1395,87 +1747,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.7", ngImpor
|
|
|
1395
1747
|
type: Input
|
|
1396
1748
|
}] } });
|
|
1397
1749
|
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
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));
|
|
1750
|
+
function tipoValorFuncion(datoParam, ...param) {
|
|
1751
|
+
if (typeof datoParam === 'function') {
|
|
1752
|
+
return datoParam(...param);
|
|
1450
1753
|
}
|
|
1451
|
-
|
|
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" }] });
|
|
1754
|
+
return datoParam;
|
|
1453
1755
|
}
|
|
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
1756
|
|
|
1476
1757
|
/**
|
|
1477
1758
|
* Generated bundle index. Do not edit.
|
|
1478
1759
|
*/
|
|
1479
1760
|
|
|
1480
|
-
export { ProgressBarComponent, TablaMantenimientoComponent, TablaMantenimientoService };
|
|
1761
|
+
export { ProgressBarComponent, TablaMantenimientoComponent, TablaMantenimientoService, tipoValorFuncion };
|
|
1481
1762
|
//# sourceMappingURL=jvsoft-components-tabla-mantenimiento.mjs.map
|