@jvsoft/components 0.0.13-alpha.0 → 0.0.13-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dialog-flotante/dialog-flotante.component.d.ts +32 -0
- package/dialog-flotante/dialog-flotante.interface.d.ts +11 -0
- package/dialog-flotante/index.d.ts +5 -0
- package/fesm2022/jvsoft-components-dialog-flotante.mjs +129 -0
- package/fesm2022/jvsoft-components-dialog-flotante.mjs.map +1 -0
- package/fesm2022/jvsoft-components-lista-arbol.mjs +294 -0
- package/fesm2022/jvsoft-components-lista-arbol.mjs.map +1 -0
- package/fesm2022/jvsoft-components-luces-navidad.mjs +33 -0
- package/fesm2022/jvsoft-components-luces-navidad.mjs.map +1 -0
- package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs +47 -0
- package/fesm2022/jvsoft-components-mat-suffix-search-button.mjs.map +1 -0
- package/fesm2022/jvsoft-components-menu.mjs +102 -0
- package/fesm2022/jvsoft-components-menu.mjs.map +1 -0
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs +91 -0
- package/fesm2022/jvsoft-components-tabla-mantenimiento-components-progress-bar.mjs.map +1 -0
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs +1798 -0
- package/fesm2022/jvsoft-components-tabla-mantenimiento.mjs.map +1 -0
- package/fesm2022/jvsoft-components.mjs +2333 -0
- package/fesm2022/jvsoft-components.mjs.map +1 -0
- package/{index.ts → index.d.ts} +1 -8
- package/lista-arbol/index.d.ts +5 -0
- package/lista-arbol/lista-arbol.component.d.ts +59 -0
- package/lista-arbol/lista-arbol.functions.d.ts +8 -0
- package/luces-navidad/index.d.ts +5 -0
- package/luces-navidad/luces-navidad.component.d.ts +11 -0
- package/mat-suffix-search-button/index.d.ts +5 -0
- package/mat-suffix-search-button/mat-suffix-search-button.component.d.ts +12 -0
- package/menu/index.d.ts +5 -0
- package/menu/menu.component.d.ts +25 -0
- package/menu/menu.interface.d.ts +16 -0
- package/package.json +45 -13
- package/src/styles/base-jvsoft-components.css +9 -0
- package/tabla-mantenimiento/classes/data-model.d.ts +25 -0
- package/tabla-mantenimiento/components/progress-bar/index.d.ts +5 -0
- package/tabla-mantenimiento/components/progress-bar/progress-bar.component.d.ts +30 -0
- package/tabla-mantenimiento/components/progress-bar/public-api.d.ts +1 -0
- package/tabla-mantenimiento/index.d.ts +5 -0
- package/tabla-mantenimiento/interfaces/{archivo.ts → archivo.d.ts} +4 -7
- package/tabla-mantenimiento/interfaces/global/{boton-mantenimiento.ts → boton-mantenimiento.d.ts} +3 -9
- package/tabla-mantenimiento/interfaces/global/{columnas-tabla.ts → columnas-tabla.d.ts} +12 -89
- package/tabla-mantenimiento/interfaces/global/no-export.d.ts +2 -0
- package/tabla-mantenimiento/interfaces/global/{otros.ts → otros.d.ts} +3 -15
- package/tabla-mantenimiento/interfaces/implements/{incluye-tabla-mantenimiento.ts → incluye-tabla-mantenimiento.d.ts} +4 -6
- package/tabla-mantenimiento/interfaces/implements/{index.ts → index.d.ts} +0 -1
- package/tabla-mantenimiento/mat-row-keyboard-selection.directive.d.ts +19 -0
- package/tabla-mantenimiento/pipes/no-sanitize.pipe.d.ts +10 -0
- package/tabla-mantenimiento/pipes/zero-fill.pipe.d.ts +8 -0
- package/tabla-mantenimiento/{public-api.ts → public-api.d.ts} +2 -3
- 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 +21 -0
- package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.d.ts +18 -0
- package/tabla-mantenimiento/tabla-mantenimiento.component.d.ts +147 -0
- package/tabla-mantenimiento/tabla-mantenimiento.functions.d.ts +5 -0
- package/tabla-mantenimiento/tabla-mantenimiento.service.d.ts +8 -0
- package/tabla-mantenimiento/table-util.d.ts +11 -0
- package/CHANGELOG.md +0 -26
- package/build.js +0 -20
- package/dialog-flotante/dialog-flotante.component.html +0 -66
- package/dialog-flotante/dialog-flotante.component.ts +0 -115
- package/dialog-flotante/dialog-flotante.interface.ts +0 -13
- package/dialog-flotante/index.ts +0 -1
- package/dialog-flotante/ng-package.json +0 -5
- package/lista-arbol/lista-arbol.component.html +0 -66
- package/lista-arbol/lista-arbol.component.ts +0 -238
- package/lista-arbol/lista-arbol.functions.ts +0 -46
- package/lista-arbol/ng-package.json +0 -5
- package/luces-navidad/christmas-tree.png +0 -0
- package/luces-navidad/index.ts +0 -1
- package/luces-navidad/luces-navidad.component.html +0 -6
- package/luces-navidad/luces-navidad.component.ts +0 -24
- package/luces-navidad/ng-package.json +0 -5
- package/mat-suffix-search-button/index.ts +0 -1
- package/mat-suffix-search-button/mat-suffix-search-button.component.html +0 -5
- package/mat-suffix-search-button/mat-suffix-search-button.component.ts +0 -36
- package/mat-suffix-search-button/ng-package.json +0 -5
- package/menu/index.ts +0 -1
- package/menu/menu.component.html +0 -40
- package/menu/menu.component.ts +0 -88
- package/menu/menu.interface.ts +0 -16
- package/menu/ng-package.json +0 -5
- package/ng-package.json +0 -17
- package/progress-spinner.zip +0 -0
- package/tabla-mantenimiento/classes/data-model.ts +0 -150
- package/tabla-mantenimiento/components/progress-bar/index.ts +0 -1
- package/tabla-mantenimiento/components/progress-bar/ng-package.json +0 -5
- package/tabla-mantenimiento/components/progress-bar/progress-bar.component.html +0 -10
- package/tabla-mantenimiento/components/progress-bar/progress-bar.component.ts +0 -85
- package/tabla-mantenimiento/components/progress-bar/public-api.ts +0 -2
- package/tabla-mantenimiento/index.ts +0 -1
- package/tabla-mantenimiento/interfaces/global/export-excel-servidor.ts +0 -0
- package/tabla-mantenimiento/interfaces/global/no-export.ts +0 -11
- package/tabla-mantenimiento/mat-row-keyboard-selection.directive.ts +0 -97
- package/tabla-mantenimiento/ng-package.json +0 -5
- package/tabla-mantenimiento/pipes/no-sanitize.pipe.ts +0 -12
- package/tabla-mantenimiento/pipes/zero-fill.pipe.ts +0 -19
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-date/column-type-date.component.html +0 -22
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-date/column-type-date.component.ts +0 -12
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-icons/column-type-icons.component.html +0 -58
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-icons/column-type-icons.component.ts +0 -19
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-money/column-type-money.component.html +0 -40
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-money/column-type-money.component.ts +0 -17
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-number/column-type-number.component.html +0 -25
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-number/column-type-number.component.ts +0 -14
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-progressbar/column-type-progressbar.component.html +0 -28
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-progressbar/column-type-progressbar.component.ts +0 -13
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-sino/column-type-sino.component.html +0 -30
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-sino/column-type-sino.component.ts +0 -38
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-text/column-type-text.component.html +0 -97
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type-text/column-type-text.component.ts +0 -43
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.html +0 -26
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.ts +0 -36
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.module.ts +0 -54
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.html +0 -76
- package/tabla-mantenimiento/tabla-mantenimiento-column-defs/tabla-mantenimiento-column-defs.component.ts +0 -67
- package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.html +0 -7
- package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.ts +0 -39
- package/tabla-mantenimiento/tabla-mantenimiento.component.html +0 -385
- package/tabla-mantenimiento/tabla-mantenimiento.component.ts +0 -951
- package/tabla-mantenimiento/tabla-mantenimiento.functions.ts +0 -57
- package/tabla-mantenimiento/tabla-mantenimiento.service.ts +0 -44
- package/tabla-mantenimiento/table-util.ts +0 -49
- package/tabla-mantenimiento.zip +0 -0
- package/tsconfig.lib.json +0 -16
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
- package/yarn-error.log +0 -68
- /package/dialog-flotante/{public-api.ts → public-api.d.ts} +0 -0
- /package/lista-arbol/{public-api.ts → public-api.d.ts} +0 -0
- /package/luces-navidad/{public-api.ts → public-api.d.ts} +0 -0
- /package/mat-suffix-search-button/{public-api.ts → public-api.d.ts} +0 -0
- /package/menu/{public-api.ts → public-api.d.ts} +0 -0
- /package/tabla-mantenimiento/interfaces/global/{index.ts → index.d.ts} +0 -0
- /package/tabla-mantenimiento/interfaces/{index.ts → index.d.ts} +0 -0
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
<ng-template #cellTemplate let-row="row">
|
|
2
|
-
<span [ngClass]="column.textCss"
|
|
3
|
-
[class.text-sky-700]="(value(row)) >= 0" [class.text-red-700]="(value(row)) < 0"
|
|
4
|
-
*ngIf="value(row)"
|
|
5
|
-
(click)="accionClick(row, $event)">{{ value(row) | number: (column.format || '1.2-2') }}</span>
|
|
6
|
-
</ng-template>
|
|
7
|
-
<ng-template #columnFooterTemplate let-row="row">
|
|
8
|
-
<span *ngIf="column.transformarFooter"
|
|
9
|
-
[class.text-sky-700]="column.transformarFooter() >= 0"
|
|
10
|
-
[class.text-red-700]="column.transformarFooter() < 0"
|
|
11
|
-
>
|
|
12
|
-
<span>{{ column.transformarFooter() | currency: column.simboloMoneda ?? 'S/' }}</span>
|
|
13
|
-
</span>
|
|
14
|
-
</ng-template>
|
|
15
|
-
|
|
16
|
-
<!--<jvs-column-type [column]="column" [cellTemplate]="cellTemplate" [columnFooterTemplate]="columnFooterTemplate"></jvs-column-type>-->
|
|
17
|
-
|
|
18
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
19
|
-
<!-- Definición del encabezado de la columna -->
|
|
20
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
21
|
-
[disabled]="column.sort === false">
|
|
22
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
23
|
-
</th>
|
|
24
|
-
|
|
25
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
26
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
27
|
-
|
|
28
|
-
<ng-container [ngTemplateOutlet]="cellTemplate" [ngTemplateOutletContext]="{row}"></ng-container>
|
|
29
|
-
|
|
30
|
-
</td>
|
|
31
|
-
|
|
32
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
33
|
-
<span *ngIf="column.transformarFooter"
|
|
34
|
-
[class.text-sky-700]="column.transformarFooter() >= 0"
|
|
35
|
-
[class.text-red-700]="column.transformarFooter() < 0"
|
|
36
|
-
>
|
|
37
|
-
<span>{{ column.transformarFooter() | currency: column.simboloMoneda ?? 'S/' }}</span>
|
|
38
|
-
</span>
|
|
39
|
-
</th>
|
|
40
|
-
</ng-container>
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ColumnaMoney} from '../../../interfaces';
|
|
3
|
-
import {ColumnTypeComponent} from '../column-type.component';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'jvs-column-type-money',
|
|
7
|
-
templateUrl: './column-type-money.component.html',
|
|
8
|
-
standalone: false,
|
|
9
|
-
})
|
|
10
|
-
export class ColumnTypeMoneyComponent<T> extends ColumnTypeComponent<T> {
|
|
11
|
-
@Input({required: true}) override column: ColumnaMoney<T> = {} as ColumnaMoney<T>;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value(row: any): number {
|
|
15
|
-
return (this.column.transformar ? this.column.transformar(row):row[this.column.property]);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<ng-template #cellTemplate let-row="row">
|
|
3
|
-
<span *ngIf="column.property && row[column.property]" class="!text-indigo-900 font-semibold">
|
|
4
|
-
{{ row[column.property] | number: (column.format ? column.format : '1.0-2') }}
|
|
5
|
-
</span>
|
|
6
|
-
</ng-template>
|
|
7
|
-
|
|
8
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
9
|
-
<!-- Definición del encabezado de la columna -->
|
|
10
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
11
|
-
[disabled]="column.sort === false">
|
|
12
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
13
|
-
</th>
|
|
14
|
-
|
|
15
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
16
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
17
|
-
|
|
18
|
-
<ng-container [ngTemplateOutlet]="cellTemplate" [ngTemplateOutletContext]="{row}"></ng-container>
|
|
19
|
-
|
|
20
|
-
</td>
|
|
21
|
-
|
|
22
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
23
|
-
{{ column.transformarFooter ? column.transformarFooter() : '' }}
|
|
24
|
-
</th>
|
|
25
|
-
</ng-container>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ColumnaNumber} from '../../../interfaces';
|
|
3
|
-
import {ColumnTypeComponent} from '../column-type.component';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@Component({
|
|
7
|
-
selector: 'jvs-column-type-number',
|
|
8
|
-
standalone: false,
|
|
9
|
-
templateUrl: './column-type-number.component.html'
|
|
10
|
-
})
|
|
11
|
-
export class ColumnTypeNumberComponent<T> extends ColumnTypeComponent<T> {
|
|
12
|
-
@Input({required: true}) override column: ColumnaNumber<T> = {} as ColumnaNumber<T>;
|
|
13
|
-
|
|
14
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
<ng-template #cellTemplate let-row="row">
|
|
2
|
-
<jvs-progress-bar
|
|
3
|
-
[textoCentrado]="!!column.progressbar.textoCentrado"
|
|
4
|
-
[porcentaje]="column.progressbar.porcentaje(row)"
|
|
5
|
-
[coloresValor]="column.progressbar.coloresValor"
|
|
6
|
-
[formatoNumero]="column.progressbar.formatoNumero"
|
|
7
|
-
[textoMostrar]="column.progressbar.textoMostrar ? column.progressbar.textoMostrar(row) : ''"
|
|
8
|
-
></jvs-progress-bar>
|
|
9
|
-
</ng-template>
|
|
10
|
-
|
|
11
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
12
|
-
<!-- Definición del encabezado de la columna -->
|
|
13
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
14
|
-
[disabled]="column.sort === false">
|
|
15
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
16
|
-
</th>
|
|
17
|
-
|
|
18
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
19
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
20
|
-
|
|
21
|
-
<ng-container [ngTemplateOutlet]="cellTemplate" [ngTemplateOutletContext]="{row}"></ng-container>
|
|
22
|
-
|
|
23
|
-
</td>
|
|
24
|
-
|
|
25
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
26
|
-
{{ column.transformarFooter ? column.transformarFooter() : '' }}
|
|
27
|
-
</th>
|
|
28
|
-
</ng-container>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ColumnaProgress} from '../../../interfaces';
|
|
3
|
-
import {ColumnTypeComponent} from '../column-type.component';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'jvs-column-type-progressbar',
|
|
7
|
-
standalone: false,
|
|
8
|
-
templateUrl: './column-type-progressbar.component.html'
|
|
9
|
-
})
|
|
10
|
-
export class ColumnTypeProgressbarComponent<T> extends ColumnTypeComponent<T> {
|
|
11
|
-
@Input({required: true}) override column: ColumnaProgress<T> = {} as ColumnaProgress<T>;
|
|
12
|
-
|
|
13
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<ng-template #cellTemplate let-row="row">
|
|
2
|
-
<mat-icon *ngIf="[column.yesValue, 1, true].includes(row[column.property])"
|
|
3
|
-
[svgIcon]="column.yesIcon ?? 'yes_no:yes'" class="icon-sm"
|
|
4
|
-
[matTooltip]="column.yesTooltip ?? undefined"
|
|
5
|
-
></mat-icon>
|
|
6
|
-
<mat-icon *ngIf="[column.noValue, 0, false].includes(row[column.property])" [svgIcon]="column.noIcon ?? 'yes_no:no'"
|
|
7
|
-
class="icon-sm"
|
|
8
|
-
[matTooltip]="column.noTooltip ?? undefined"
|
|
9
|
-
></mat-icon>
|
|
10
|
-
<span class="cdk-visually-hidden">{{ row[column.property] }}</span>
|
|
11
|
-
</ng-template>
|
|
12
|
-
|
|
13
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
14
|
-
<!-- Definición del encabezado de la columna -->
|
|
15
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
16
|
-
[disabled]="column.sort === false">
|
|
17
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
18
|
-
</th>
|
|
19
|
-
|
|
20
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
21
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
22
|
-
|
|
23
|
-
<ng-container [ngTemplateOutlet]="cellTemplate" [ngTemplateOutletContext]="{row}"></ng-container>
|
|
24
|
-
|
|
25
|
-
</td>
|
|
26
|
-
|
|
27
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
28
|
-
{{ column.transformarFooter ? column.transformarFooter() : '' }}
|
|
29
|
-
</th>
|
|
30
|
-
</ng-container>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import {Component, inject, Input} from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import {MatIconRegistry} from '@angular/material/icon';
|
|
4
|
-
import {DomSanitizer} from '@angular/platform-browser';
|
|
5
|
-
import {ColumnaYesNo} from '../../../interfaces';
|
|
6
|
-
import {ColumnTypeComponent} from '../column-type.component';
|
|
7
|
-
import {MatTable} from '@angular/material/table';
|
|
8
|
-
|
|
9
|
-
const YES_ICON = `
|
|
10
|
-
<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>
|
|
11
|
-
`;
|
|
12
|
-
const NO_ICON = `
|
|
13
|
-
<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>
|
|
14
|
-
`;
|
|
15
|
-
|
|
16
|
-
@Component({
|
|
17
|
-
selector: 'jvs-column-type-sino',
|
|
18
|
-
standalone: false,
|
|
19
|
-
templateUrl: './column-type-sino.component.html'
|
|
20
|
-
})
|
|
21
|
-
export class ColumnTypeSinoComponent<T> extends ColumnTypeComponent<T> {
|
|
22
|
-
@Input({required: true}) override column: ColumnaYesNo<T> = {} as ColumnaYesNo<T>; // 🟢 Solución
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
constructor() {
|
|
26
|
-
super(inject(MatTable)); // 🟢 Llamar al constructor del padre
|
|
27
|
-
const iconRegistry = inject(MatIconRegistry);
|
|
28
|
-
const sanitizer = inject(DomSanitizer);
|
|
29
|
-
|
|
30
|
-
// Note that we provide the icon here as a string literal here due to a limitation in
|
|
31
|
-
// Stackblitz. If you want to provide the icon from a URL, you can use:
|
|
32
|
-
// `iconRegistry.addSvgIcon('thumbs-up', sanitizer.bypassSecurityTrustResourceUrl('icon.svg'));`
|
|
33
|
-
iconRegistry.addSvgIconLiteralInNamespace('yes_no', 'yes', sanitizer.bypassSecurityTrustHtml(YES_ICON));
|
|
34
|
-
iconRegistry.addSvgIconLiteralInNamespace('yes_no', 'no', sanitizer.bypassSecurityTrustHtml(NO_ICON));
|
|
35
|
-
// iconRegistry.addSvgIconLiteral('yesIcon', sanitizer.bypassSecurityTrustHtml(YES_ICON));
|
|
36
|
-
// iconRegistry.addSvgIconLiteral('noIcon', sanitizer.bypassSecurityTrustHtml(NO_ICON));
|
|
37
|
-
}
|
|
38
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
<ng-template #cellTemplate let-row="row">
|
|
2
|
-
<div *ngIf="column.innerHTML; else sinInnerHTML" [class]="column.text?.cssContenedor" [ngStyle]="column.text?.cssStyle" class="hover:!max-h-max"
|
|
3
|
-
[innerHTML]="column.innerHTML(row) | noSanitize">
|
|
4
|
-
</div>
|
|
5
|
-
<ng-template #sinInnerHTML>
|
|
6
|
-
<ng-container *ngIf="column.text && column.text?.separador else campoTextNormal">
|
|
7
|
-
<div [class]="column.text?.cssContenedor">
|
|
8
|
-
<ng-container
|
|
9
|
-
*ngFor="let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)">
|
|
10
|
-
<ng-template *ngIf="column.property" [ngTemplateOutlet]="tipoDatoString"
|
|
11
|
-
[ngTemplateOutletContext]="{ fila: column, tipo: 'text', value: itm, class: column.textCss, row: row }"></ng-template>
|
|
12
|
-
</ng-container>
|
|
13
|
-
</div>
|
|
14
|
-
</ng-container>
|
|
15
|
-
<ng-template #campoTextNormal>
|
|
16
|
-
<ng-template *ngIf="column.property" [ngTemplateOutlet]="tipoDatoString"
|
|
17
|
-
[ngTemplateOutletContext]="{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }"></ng-template>
|
|
18
|
-
</ng-template>
|
|
19
|
-
</ng-template>
|
|
20
|
-
</ng-template>
|
|
21
|
-
|
|
22
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
23
|
-
<!-- Definición del encabezado de la columna -->
|
|
24
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
25
|
-
[disabled]="column.sort === false">
|
|
26
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
27
|
-
</th>
|
|
28
|
-
|
|
29
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
30
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
31
|
-
|
|
32
|
-
<ng-container [ngTemplateOutlet]="cellTemplate" [ngTemplateOutletContext]="{row}"></ng-container>
|
|
33
|
-
|
|
34
|
-
</td>
|
|
35
|
-
|
|
36
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
37
|
-
{{ column.transformarFooter ? column.transformarFooter() : '' }}
|
|
38
|
-
</th>
|
|
39
|
-
</ng-container>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
<!--<ng-container matColumnDef="{{ column.property }}">
|
|
43
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
44
|
-
[disabled]="column.sort === false">
|
|
45
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
46
|
-
</th>
|
|
47
|
-
<ng-container *ngIf="column.innerHTML; else sinInnerHTML">
|
|
48
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(column, row, $event)">
|
|
49
|
-
<div [class]="column.text?.cssContenedor" [ngStyle]="column.text?.cssStyle" class="hover:!max-h-max"
|
|
50
|
-
[innerHTML]="column.innerHTML(row) | noSanitize">
|
|
51
|
-
|
|
52
|
-
</div>
|
|
53
|
-
</td>
|
|
54
|
-
</ng-container>
|
|
55
|
-
<ng-template #sinInnerHTML>
|
|
56
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell>
|
|
57
|
-
<ng-container *ngIf="column.text && column.text?.separador else campoTextNormal">
|
|
58
|
-
<div [class]="column.text?.cssContenedor">
|
|
59
|
-
<ng-container
|
|
60
|
-
*ngFor="let itm of ((column.transformar ? column.transformar(row) : row[column.property]) ?? '').split(column.text.separador)">
|
|
61
|
-
<ng-template *ngIf="column.property" [ngTemplateOutlet]="tipoDatoString"
|
|
62
|
-
[ngTemplateOutletContext]="{ fila: column, tipo: 'text', value: itm, class: column.textCss, row: row }"></ng-template>
|
|
63
|
-
</ng-container>
|
|
64
|
-
</div>
|
|
65
|
-
</ng-container>
|
|
66
|
-
<ng-template #campoTextNormal>
|
|
67
|
-
<ng-template *ngIf="column.property" [ngTemplateOutlet]="tipoDatoString"
|
|
68
|
-
[ngTemplateOutletContext]="{ fila: column, tipo: 'text', value: (column.transformar ? column.transformar(row) : row[column.property]), class: column.textCss, row: row }"></ng-template>
|
|
69
|
-
</ng-template>
|
|
70
|
-
</td>
|
|
71
|
-
</ng-template>
|
|
72
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" style="height: unset !important;" mat-footer-cell
|
|
73
|
-
[innerHTML]="column.transformarFooter ? column.transformarFooter() : ''">
|
|
74
|
-
</th>
|
|
75
|
-
</ng-container>-->
|
|
76
|
-
|
|
77
|
-
<ng-template #tipoDatoString let-row="row" let-fila="fila" let-tipo="tipo" let-value="value" let-format="format"
|
|
78
|
-
let-clase="class">
|
|
79
|
-
<ng-container [ngSwitch]="tipo">
|
|
80
|
-
<ng-container *ngSwitchCase="'text'"><span [ngClass]="clase" *ngIf="value"
|
|
81
|
-
(click)="accionClick(row, $event)">
|
|
82
|
-
<span *ngIf="!fila.zeroFill">{{ value }}</span>
|
|
83
|
-
<span *ngIf="fila.zeroFill">{{ value | zeroFill: fila.zeroFill }}</span>
|
|
84
|
-
</span></ng-container>
|
|
85
|
-
<ng-container *ngSwitchCase="'date'"><span [ngClass]="clase" *ngIf="value"
|
|
86
|
-
(click)="accionClick(row, $event)">{{ value | date: (format || 'dd/MM/yyyy') }}</span></ng-container>
|
|
87
|
-
<ng-container *ngSwitchCase="'number'"><span [ngClass]="clase" *ngIf="value"
|
|
88
|
-
(click)="accionClick(row, $event)">{{ value | number: (format || '0.0-2') }}</span></ng-container>
|
|
89
|
-
<ng-container *ngSwitchCase="'money'"><span [ngClass]="clase"
|
|
90
|
-
[class.text-sky-700]="(value * 1) >= 0" [class.text-red-700]="(value * 1) < 0"
|
|
91
|
-
*ngIf="value" (click)="accionClick(row, $event)">{{ value | number: (format || '1.2-2') }}</span>
|
|
92
|
-
</ng-container>
|
|
93
|
-
|
|
94
|
-
<!-- <span [ngClass]="class" *ngSwitchCase="'date'">{{ value | date: (format || 'dd/MM/yyyy') }}</span>-->
|
|
95
|
-
<!-- <span [ngClass]="class" *ngSwitchCase="'number'">{{ value | number: (format || '0.0-2') }}</span>-->
|
|
96
|
-
</ng-container>
|
|
97
|
-
</ng-template>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import {Component, Input} from '@angular/core';
|
|
2
|
-
import {ColumnTypeComponent} from '../column-type.component';
|
|
3
|
-
import {ColumnaTexto} from '../../../interfaces';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'jvs-column-type-text',
|
|
7
|
-
templateUrl: './column-type-text.component.html',
|
|
8
|
-
standalone: false,
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
export class ColumnTypeTextComponent<T> extends ColumnTypeComponent<T> {
|
|
12
|
-
@Input({required: true}) override column: ColumnaTexto<T> = {} as ColumnaTexto<T>; // 🟢 Solución
|
|
13
|
-
|
|
14
|
-
// @ViewChild('titleTemplate', {static: true}) titleTemplateRef!: TemplateRef<any>;
|
|
15
|
-
// @ViewChild('cellTemplate', {static: true}) cellTemplateRef!: TemplateRef<any>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// export class ColumnTypeTextComponent implements OnInit, AfterViewInit {
|
|
19
|
-
// @Input({required: true}) column!: ColumnaTexto<any>;
|
|
20
|
-
// @ViewChild(MatColumnDef, {static: true}) columnDef!: MatColumnDef;
|
|
21
|
-
//
|
|
22
|
-
// constructor(
|
|
23
|
-
// @Optional() public table: MatTable<any>,
|
|
24
|
-
// ) {
|
|
25
|
-
// }
|
|
26
|
-
//
|
|
27
|
-
// ngOnInit() {
|
|
28
|
-
// }
|
|
29
|
-
//
|
|
30
|
-
// ngAfterViewInit() {
|
|
31
|
-
// if (this.columnDef) {
|
|
32
|
-
// this.table.addColumnDef(this.columnDef);
|
|
33
|
-
// }
|
|
34
|
-
// }
|
|
35
|
-
//
|
|
36
|
-
// accionClick(column: any, item: any, event: any) {
|
|
37
|
-
// if (column.click) {
|
|
38
|
-
// column.click(item);
|
|
39
|
-
// event.stopPropagation();
|
|
40
|
-
// }
|
|
41
|
-
// return false;
|
|
42
|
-
// }
|
|
43
|
-
// }
|
package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.html
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
<ng-container matColumnDef="{{ column.property }}">
|
|
2
|
-
<!-- Definición del encabezado de la columna -->
|
|
3
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell mat-sort-header
|
|
4
|
-
[disabled]="column.sort === false">
|
|
5
|
-
<ng-container *ngIf="columnTitleTemplate; else defaultTitle">
|
|
6
|
-
<ng-container *ngTemplateOutlet="columnTitleTemplate; context: { column: column }"></ng-container>
|
|
7
|
-
</ng-container>
|
|
8
|
-
<ng-template #defaultTitle>
|
|
9
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
10
|
-
</ng-template>
|
|
11
|
-
</th>
|
|
12
|
-
|
|
13
|
-
<!-- Cuerpo de la celda, definido por los hijos -->
|
|
14
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell (click)="accionClick(row, $event)">
|
|
15
|
-
<ng-container *ngTemplateOutlet="cellTemplate; context: { row: row, column: column }"></ng-container>
|
|
16
|
-
</td>
|
|
17
|
-
|
|
18
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell>
|
|
19
|
-
<ng-container *ngIf="columnFooterTemplate; else defaultFooter">
|
|
20
|
-
<ng-container *ngTemplateOutlet="columnFooterTemplate; context: { column: column }"></ng-container>
|
|
21
|
-
</ng-container>
|
|
22
|
-
<ng-template #defaultFooter>
|
|
23
|
-
{{ column.transformarFooter ? column.transformarFooter() : '' }}
|
|
24
|
-
</ng-template>
|
|
25
|
-
</th>
|
|
26
|
-
</ng-container>
|
package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.component.ts
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import {AfterViewInit, Component, Input, OnInit, Optional, TemplateRef, ViewChild} from '@angular/core';
|
|
2
|
-
import {MatColumnDef, MatTable} from '@angular/material/table';
|
|
3
|
-
import {ColumnaTabla} from '../../interfaces';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'jvs-column-type',
|
|
7
|
-
templateUrl: './column-type.component.html',
|
|
8
|
-
standalone: false,
|
|
9
|
-
})
|
|
10
|
-
export class ColumnTypeComponent<T> implements OnInit, AfterViewInit {
|
|
11
|
-
@Input({required: true}) column!: ColumnaTabla<T>;
|
|
12
|
-
@ViewChild(MatColumnDef, {static: true}) columnDef!: MatColumnDef;
|
|
13
|
-
@Input() columnTitleTemplate?: TemplateRef<any>; // Permite personalizar títulos
|
|
14
|
-
@Input() columnFooterTemplate?: TemplateRef<any>; // Permite personalizar footer
|
|
15
|
-
@Input() cellTemplate!: TemplateRef<any>; // Se usa para el contenido de las celdas
|
|
16
|
-
|
|
17
|
-
constructor(@Optional() private table: MatTable<T>) {
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
ngOnInit() {
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
ngAfterViewInit() {
|
|
24
|
-
if (this.columnDef) {
|
|
25
|
-
this.table.addColumnDef(this.columnDef);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
accionClick(item: T, event: Event) {
|
|
30
|
-
if (this.column.click) {
|
|
31
|
-
this.column.click(item);
|
|
32
|
-
event.stopPropagation();
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
}
|
package/tabla-mantenimiento/tabla-mantenimiento-column-defs/column-type/column-type.module.ts
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import {NgModule} from '@angular/core';
|
|
2
|
-
import {CommonModule} from '@angular/common';
|
|
3
|
-
import {MatTableModule} from '@angular/material/table';
|
|
4
|
-
import {MatSortModule} from '@angular/material/sort';
|
|
5
|
-
import {ColumnTypeNumberComponent} from './column-type-number/column-type-number.component';
|
|
6
|
-
import {ColumnTypeDateComponent} from './column-type-date/column-type-date.component';
|
|
7
|
-
import {MatRipple} from '@angular/material/core';
|
|
8
|
-
import {MatTooltipModule} from '@angular/material/tooltip';
|
|
9
|
-
import {MatIcon} from '@angular/material/icon';
|
|
10
|
-
import {ColumnTypeSinoComponent} from './column-type-sino/column-type-sino.component';
|
|
11
|
-
import {ColumnTypeProgressbarComponent} from './column-type-progressbar/column-type-progressbar.component';
|
|
12
|
-
import {NoSanitizePipe} from '../../pipes/no-sanitize.pipe';
|
|
13
|
-
import {ZeroFillPipe} from '../../pipes/zero-fill.pipe';
|
|
14
|
-
import {ProgressBarComponent} from '../../components/progress-bar';
|
|
15
|
-
import {ColumnTypeTextComponent} from './column-type-text/column-type-text.component';
|
|
16
|
-
import {ColumnTypeMoneyComponent} from './column-type-money/column-type-money.component';
|
|
17
|
-
import {ColumnTypeIconsComponent} from './column-type-icons/column-type-icons.component';
|
|
18
|
-
import {ColumnTypeComponent} from './column-type.component';
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
@NgModule({
|
|
22
|
-
declarations: [
|
|
23
|
-
ColumnTypeComponent,
|
|
24
|
-
ColumnTypeTextComponent,
|
|
25
|
-
ColumnTypeMoneyComponent,
|
|
26
|
-
ColumnTypeNumberComponent,
|
|
27
|
-
ColumnTypeDateComponent,
|
|
28
|
-
ColumnTypeIconsComponent,
|
|
29
|
-
ColumnTypeSinoComponent,
|
|
30
|
-
ColumnTypeProgressbarComponent,
|
|
31
|
-
],
|
|
32
|
-
imports: [
|
|
33
|
-
CommonModule,
|
|
34
|
-
MatTableModule,
|
|
35
|
-
MatSortModule,
|
|
36
|
-
MatTooltipModule,
|
|
37
|
-
NoSanitizePipe,
|
|
38
|
-
ZeroFillPipe,
|
|
39
|
-
MatRipple,
|
|
40
|
-
MatIcon,
|
|
41
|
-
ProgressBarComponent,
|
|
42
|
-
],
|
|
43
|
-
exports: [
|
|
44
|
-
ColumnTypeTextComponent,
|
|
45
|
-
ColumnTypeMoneyComponent,
|
|
46
|
-
ColumnTypeNumberComponent,
|
|
47
|
-
ColumnTypeDateComponent,
|
|
48
|
-
ColumnTypeIconsComponent,
|
|
49
|
-
ColumnTypeSinoComponent,
|
|
50
|
-
ColumnTypeProgressbarComponent,
|
|
51
|
-
]
|
|
52
|
-
})
|
|
53
|
-
export class ColumnTypeModule {
|
|
54
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
<ng-content></ng-content>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
<ng-container *ngFor="let column of colDetalle; trackBy: trackByProperty">
|
|
6
|
-
|
|
7
|
-
<ng-container *ngIf="column.type === 'expandir'" [matColumnDef]="column.property">
|
|
8
|
-
|
|
9
|
-
<th *matHeaderCellDef class="w-4" mat-header-cell> <span [innerHTML]="column.label ?? ''">{{ column.label }} </span></th>
|
|
10
|
-
<td *matCellDef="let row" class="w-4 text-center" mat-cell>
|
|
11
|
-
<button type="button" class="boton-circular text-primary-contrast bg-primary mat-elevation-z2" matRipple
|
|
12
|
-
*ngIf="column.click"
|
|
13
|
-
(click)="column.click(row); row.isExpanded = !row.isExpanded; $event.stopPropagation()"
|
|
14
|
-
matTooltip="Expandir / Contraer">
|
|
15
|
-
<mat-icon class="icon-xs" [svgIcon]="(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')"></mat-icon>
|
|
16
|
-
</button>
|
|
17
|
-
<button type="button" class="boton-circular text-primary-contrast bg-primary mat-elevation-z2" matRipple
|
|
18
|
-
*ngIf="!column.click"
|
|
19
|
-
(click)="row.isExpanded = !row.isExpanded; $event.stopPropagation()"
|
|
20
|
-
matTooltip="Expandir / Contraer">
|
|
21
|
-
<mat-icon class="icon-xs" [svgIcon]="(row.isExpanded ? 'roundExpandLess' : 'roundExpandMore')"></mat-icon>
|
|
22
|
-
</button>
|
|
23
|
-
</td>
|
|
24
|
-
<td *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell></td>
|
|
25
|
-
|
|
26
|
-
</ng-container>
|
|
27
|
-
<ng-container *ngIf="column.type === 'checkbox'" [matColumnDef]="column.property">
|
|
28
|
-
|
|
29
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="w-4 text-center" mat-header-cell>
|
|
30
|
-
<mat-checkbox *ngIf="chkLista"
|
|
31
|
-
(click)="$event.stopPropagation()"
|
|
32
|
-
(change)="chkLista.checkbox.establecerTodos($event.checked)"
|
|
33
|
-
[indeterminate]="chkLista.checkbox.algunosActivos"
|
|
34
|
-
[checked]="chkLista.checkbox.todosActivos"
|
|
35
|
-
></mat-checkbox>
|
|
36
|
-
</th>
|
|
37
|
-
<td *matCellDef="let row" class="w-4 text-center" mat-cell>
|
|
38
|
-
<mat-checkbox *ngIf="chkLista"
|
|
39
|
-
(click)="$event.stopPropagation()"
|
|
40
|
-
[(ngModel)]="chkLista.modelosChk[chkLista.generarId(row, (column.chkField ?? column.property), column.chkFieldSeparador)]"
|
|
41
|
-
[ngModelOptions]="{standalone: true}"
|
|
42
|
-
></mat-checkbox>
|
|
43
|
-
|
|
44
|
-
</td>
|
|
45
|
-
<td *matFooterCellDef [ngClass]="column.cssFooterClasses" mat-footer-cell></td>
|
|
46
|
-
|
|
47
|
-
</ng-container>
|
|
48
|
-
<ng-container *ngIf="column.type === 'estiloEstablecido'" [matColumnDef]="column.property">
|
|
49
|
-
|
|
50
|
-
<th *matHeaderCellDef [ngClass]="column.cssClassesTH" class="uppercase text-center" mat-header-cell
|
|
51
|
-
mat-sort-header
|
|
52
|
-
[disabled]="column.sort === false">
|
|
53
|
-
<span [innerHTML]="column.label ?? ''">{{ column.label }} </span>
|
|
54
|
-
<span class="text-red-900 font-bold bg-white">CONFIGURAR ESTILO ESTABLECIDO</span>
|
|
55
|
-
</th>
|
|
56
|
-
<td *matCellDef="let row" [ngClass]="column.cssClasses" mat-cell>
|
|
57
|
-
{{ column.property }}
|
|
58
|
-
<span class="text-red-900 font-bold bg-white">CONFIGURAR ESTILO ESTABLECIDO</span>
|
|
59
|
-
</td>
|
|
60
|
-
<th *matFooterCellDef [ngClass]="column.cssFooterClasses" style="height: unset !important;" mat-footer-cell
|
|
61
|
-
[innerHTML]="column.transformarFooter ? column.transformarFooter() : ''">
|
|
62
|
-
</th>
|
|
63
|
-
|
|
64
|
-
</ng-container>
|
|
65
|
-
|
|
66
|
-
<jvs-column-type-text *ngIf="column.type == 'text'" [column]="column"></jvs-column-type-text>
|
|
67
|
-
<jvs-column-type-money *ngIf="column.type == 'money'" [column]="column"></jvs-column-type-money>
|
|
68
|
-
<jvs-column-type-number *ngIf="column.type == 'number'" [column]="column"></jvs-column-type-number>
|
|
69
|
-
<jvs-column-type-date *ngIf="column.type == 'date'" [column]="column"></jvs-column-type-date>
|
|
70
|
-
<jvs-column-type-icons *ngIf="column.type == 'icons'" [column]="column"></jvs-column-type-icons>
|
|
71
|
-
<jvs-column-type-sino *ngIf="column.type == 'yes_no'" [column]="column"></jvs-column-type-sino>
|
|
72
|
-
<jvs-column-type-progressbar *ngIf="column.type == 'progress'" [column]="column"></jvs-column-type-progressbar>
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
</ng-container>
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import {AfterContentInit, ChangeDetectorRef, Component, ContentChildren, EventEmitter, Input, Optional, Output, QueryList, ViewChildren} from '@angular/core';
|
|
2
|
-
import {CommonModule} from '@angular/common';
|
|
3
|
-
import {MatColumnDef, MatTable, MatTableModule} from '@angular/material/table';
|
|
4
|
-
import {MatCheckboxModule} from '@angular/material/checkbox';
|
|
5
|
-
import {MatIconModule} from '@angular/material/icon';
|
|
6
|
-
import {MatRippleModule} from '@angular/material/core';
|
|
7
|
-
import {MatSortModule} from '@angular/material/sort';
|
|
8
|
-
import {MatTooltipModule} from '@angular/material/tooltip';
|
|
9
|
-
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
|
|
10
|
-
import {ColumnaTabla} from '../interfaces/global';
|
|
11
|
-
import {DataModel} from '../classes/data-model';
|
|
12
|
-
import {ColumnTypeModule} from './column-type/column-type.module';
|
|
13
|
-
|
|
14
|
-
@Component({
|
|
15
|
-
selector: 'jvs-tabla-mantenimiento-column-defs',
|
|
16
|
-
standalone: true,
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
MatCheckboxModule,
|
|
20
|
-
MatIconModule,
|
|
21
|
-
MatRippleModule,
|
|
22
|
-
MatSortModule,
|
|
23
|
-
MatTableModule,
|
|
24
|
-
MatTooltipModule,
|
|
25
|
-
ReactiveFormsModule,
|
|
26
|
-
FormsModule,
|
|
27
|
-
ColumnTypeModule,
|
|
28
|
-
|
|
29
|
-
],
|
|
30
|
-
templateUrl: './tabla-mantenimiento-column-defs.component.html',
|
|
31
|
-
styleUrls: ['./tabla-mantenimiento-column-defs.component.scss']
|
|
32
|
-
})
|
|
33
|
-
export class TablaMantenimientoColumnDefsComponent implements AfterContentInit {
|
|
34
|
-
|
|
35
|
-
@Input() objThis: any;
|
|
36
|
-
@Input() nombreColeccion: any;
|
|
37
|
-
@Input() colDetalle!: ColumnaTabla<any>[];
|
|
38
|
-
|
|
39
|
-
@Input() chkLista!: DataModel; // = new DataModel();
|
|
40
|
-
@Output() chkListaChange = new EventEmitter<DataModel>();
|
|
41
|
-
|
|
42
|
-
@ViewChildren(MatColumnDef) columnDefLocales!: QueryList<MatColumnDef>;
|
|
43
|
-
@ContentChildren(MatColumnDef, {descendants: true}) columnDefEnSubComponentes!: QueryList<MatColumnDef>;
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
constructor(
|
|
47
|
-
@Optional() public table: MatTable<any>, private cdRef: ChangeDetectorRef,
|
|
48
|
-
) {
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
ngAfterContentInit() {
|
|
52
|
-
if (this.table) {
|
|
53
|
-
this.cdRef.detectChanges();
|
|
54
|
-
this.columnDefEnSubComponentes.forEach(refCol => {
|
|
55
|
-
this.table.addColumnDef(refCol);
|
|
56
|
-
});
|
|
57
|
-
this.columnDefLocales.forEach(refCol => {
|
|
58
|
-
this.table.addColumnDef(refCol);
|
|
59
|
-
});
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
trackByProperty<T>(index: number, column: ColumnaTabla<T>) {
|
|
64
|
-
return column.property;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
}
|
package/tabla-mantenimiento/tabla-mantenimiento-menu/tabla-mantenimiento-menu.component.html
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
<mat-menu #menu="matMenu">
|
|
2
|
-
<div class="mat-menu bg-white rounded mat-elevation-z8 shadow botonesContextual w-full">
|
|
3
|
-
<ng-container *ngFor="let btn of subItems">
|
|
4
|
-
<ng-container *ngTemplateOutlet="botonTemplate; context:{btn: btn, item: objThis['seleccionados'][nombreColeccion], barraSuperior: false}"></ng-container>
|
|
5
|
-
</ng-container>
|
|
6
|
-
</div>
|
|
7
|
-
</mat-menu>
|