utn-cli 2.0.28 → 2.0.30
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/commands/commit.js +1 -1
- package/package.json +1 -1
- package/templates/backend/package.json +4 -3
- package/templates/frontend/package.json +23 -26
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.css +5 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.html +14 -0
- package/templates/frontend/src/app/Componentes/Nucleo/tabla/tabla.component.ts +34 -13
package/commands/commit.js
CHANGED
|
@@ -2,7 +2,7 @@ import { hacerPreguntaTrim, closeReadLine } from '../utils/index.js';
|
|
|
2
2
|
import { execSync } from 'child_process';
|
|
3
3
|
|
|
4
4
|
async function confirmarPaso(pregunta) {
|
|
5
|
-
const respuesta = await hacerPreguntaTrim(`${pregunta} (Sí/
|
|
5
|
+
const respuesta = await hacerPreguntaTrim(`${pregunta} (Sí/No) [Sí]: `);
|
|
6
6
|
const respuestaNormalizada = respuesta.trim().toLowerCase();
|
|
7
7
|
if (respuesta === '' || respuestaNormalizada === 'si' || respuestaNormalizada === 'sí' || respuestaNormalizada === 's') {
|
|
8
8
|
return true;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "nombre_de_desarrollador",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"nodemon": "^3.1.
|
|
18
|
+
"nodemon": "^3.1.14"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"bcryptjs": "^2.4.3",
|
|
@@ -23,8 +23,9 @@
|
|
|
23
23
|
"express": "^4.22.1",
|
|
24
24
|
"helmet": "^7.2.0",
|
|
25
25
|
"jsonwebtoken": "^9.0.3",
|
|
26
|
-
"mysql2": "^3.
|
|
27
|
-
"nodemailer": "^
|
|
26
|
+
"mysql2": "^3.18.2",
|
|
27
|
+
"nodemailer": "^6.10.1",
|
|
28
|
+
"pdf-lib": "^1.17.1",
|
|
28
29
|
"pdfkit": "^0.15.2"
|
|
29
30
|
}
|
|
30
31
|
}
|
|
@@ -11,36 +11,33 @@
|
|
|
11
11
|
"private": true,
|
|
12
12
|
"packageManager": "npm@10.8.2",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@angular/animations": "^
|
|
15
|
-
"@angular/cdk": "^
|
|
16
|
-
"@angular/common": "^
|
|
17
|
-
"@angular/compiler": "^
|
|
18
|
-
"@angular/core": "^
|
|
19
|
-
"@angular/forms": "^
|
|
20
|
-
"@angular/material": "^
|
|
21
|
-
"@angular/platform-browser": "^
|
|
22
|
-
"@angular/platform-browser-dynamic": "^
|
|
23
|
-
"@angular/router": "^
|
|
24
|
-
"chart.js": "^4.5.1",
|
|
14
|
+
"@angular/animations": "^19.2.0",
|
|
15
|
+
"@angular/cdk": "^19.2.0",
|
|
16
|
+
"@angular/common": "^19.2.0",
|
|
17
|
+
"@angular/compiler": "^19.2.0",
|
|
18
|
+
"@angular/core": "^19.2.0",
|
|
19
|
+
"@angular/forms": "^19.2.19",
|
|
20
|
+
"@angular/material": "^19.2.19",
|
|
21
|
+
"@angular/platform-browser": "^19.2.0",
|
|
22
|
+
"@angular/platform-browser-dynamic": "^19.2.19",
|
|
23
|
+
"@angular/router": "^19.2.19",
|
|
24
|
+
"chart.js": "^4.5.1",
|
|
25
25
|
"ng2-charts": "^8.0.0",
|
|
26
26
|
"rxjs": "~7.8.0",
|
|
27
27
|
"tslib": "^2.3.0",
|
|
28
|
-
"zone.js": "^0.
|
|
28
|
+
"zone.js": "^0.15.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@angular-devkit/build-angular": "^
|
|
32
|
-
"@angular/
|
|
33
|
-
"@angular/cli": "^
|
|
34
|
-
"@
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"karma": "
|
|
39
|
-
"karma-
|
|
40
|
-
"karma-
|
|
41
|
-
"
|
|
42
|
-
"karma-jasmine-html-reporter": "^2.1.0",
|
|
43
|
-
"typescript": "~5.9.2",
|
|
44
|
-
"vitest": "^4.0.8"
|
|
31
|
+
"@angular-devkit/build-angular": "^19.2.22",
|
|
32
|
+
"@angular/cli": "^19.2.22",
|
|
33
|
+
"@angular/compiler-cli": "^19.2.19",
|
|
34
|
+
"@types/jasmine": "~5.1.0",
|
|
35
|
+
"jasmine-core": "~5.6.0",
|
|
36
|
+
"karma": "~6.4.0",
|
|
37
|
+
"karma-chrome-launcher": "~3.2.0",
|
|
38
|
+
"karma-coverage": "~2.2.0",
|
|
39
|
+
"karma-jasmine": "~5.1.0",
|
|
40
|
+
"karma-jasmine-html-reporter": "~2.1.0",
|
|
41
|
+
"typescript": "~5.7.2"
|
|
45
42
|
}
|
|
46
43
|
}
|
|
@@ -299,6 +299,11 @@ tr.example-element-row:hover {
|
|
|
299
299
|
gap: 10px !important; /* Espacio uniforme entre elementos */
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
+
.contenedor-columnas {
|
|
303
|
+
width: 100%;
|
|
304
|
+
justify-content: center;
|
|
305
|
+
}
|
|
306
|
+
|
|
302
307
|
/* Forzamos que Input, Select y Botón sean idénticos en ancho */
|
|
303
308
|
.custom-input,
|
|
304
309
|
mat-select.custom-input,
|
|
@@ -9,6 +9,20 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
<div class="centro"></div>
|
|
11
11
|
<div class="derecha">
|
|
12
|
+
<mat-menu #menuColumnas="matMenu">
|
|
13
|
+
@for(col of columnas; track $index){
|
|
14
|
+
<button mat-menu-item>
|
|
15
|
+
<mat-checkbox [(ngModel)]="col.Visible" (change)="recalcularColumnas()">
|
|
16
|
+
{{ col.Alias }}
|
|
17
|
+
</mat-checkbox>
|
|
18
|
+
</button>
|
|
19
|
+
}
|
|
20
|
+
</mat-menu>
|
|
21
|
+
<div class="contenedor-columnas">
|
|
22
|
+
<button mat-icon-button [matMenuTriggerFor]="menuColumnas" matTooltip="Mostrar/Ocultar columnas">
|
|
23
|
+
<mat-icon>view_column</mat-icon>
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
12
26
|
<input #valorFiltroInput id="valorFiltro" type="text" class="custom-input" placeholder="Filtrar"
|
|
13
27
|
(keydown.enter)="AplicarFiltro()">
|
|
14
28
|
@if(mostrarElBotonDeFiltro){
|
|
@@ -11,6 +11,9 @@ import { MatSelectModule } from '@angular/material/select';
|
|
|
11
11
|
import { MensajeConfirmacionComponent } from '../mensaje-confirmacion/mensaje-confirmacion';
|
|
12
12
|
import { MatDialog } from '@angular/material/dialog';
|
|
13
13
|
import { MatBadgeModule } from '@angular/material/badge';
|
|
14
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
15
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
16
|
+
import { FormsModule } from '@angular/forms';
|
|
14
17
|
|
|
15
18
|
@Component({
|
|
16
19
|
selector: 'app-tabla',
|
|
@@ -31,20 +34,24 @@ import { MatBadgeModule } from '@angular/material/badge';
|
|
|
31
34
|
MatSortModule,
|
|
32
35
|
MatInputModule,
|
|
33
36
|
MatSelectModule,
|
|
34
|
-
MatBadgeModule
|
|
37
|
+
MatBadgeModule,
|
|
38
|
+
MatMenuModule,
|
|
39
|
+
MatCheckboxModule,
|
|
40
|
+
FormsModule,
|
|
41
|
+
],
|
|
35
42
|
templateUrl: './tabla.component.html',
|
|
36
43
|
styleUrl: './tabla.component.css'
|
|
37
44
|
})
|
|
38
45
|
export class TablaComponent implements OnInit, OnChanges {
|
|
39
|
-
@Input() columnas: { Llave: string, Alias: string, TipoDeFiltro: string }[] = [];
|
|
46
|
+
@Input() columnas: { Llave: string, Alias: string, TipoDeFiltro: string, Visible?: boolean }[] = [];
|
|
40
47
|
@Input() subColumnas: { Llave: string, Alias: string }[] = [];
|
|
41
48
|
@Input() datos: any[] = [];
|
|
42
|
-
@Input() acciones:
|
|
43
|
-
@Input() accionesDinamicas:
|
|
44
|
-
@Input() accionesSiempreClickeable:
|
|
45
|
-
@Input() subAcciones:
|
|
49
|
+
@Input() acciones: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; }[] = [];
|
|
50
|
+
@Input() accionesDinamicas: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; Mostrar: (row: any) => boolean }[] = [];
|
|
51
|
+
@Input() accionesSiempreClickeable: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; }[] = [];
|
|
52
|
+
@Input() subAcciones: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; }[] = [];
|
|
46
53
|
@Input() subAccionesSiempreClickeable: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; }[] = [];
|
|
47
|
-
@Input() subAccionesDinamicas:
|
|
54
|
+
@Input() subAccionesDinamicas: { icono: string; color: string; textoAyuda: string; ejecutar: (row: any) => void; badge?: (row: any) => string | number | undefined | null; Mostrar: (row: any) => boolean }[] = [];
|
|
48
55
|
@Input() desplegable: boolean = false
|
|
49
56
|
@Input() atributoDesplegable: string = ''
|
|
50
57
|
public llavesColumnas: string[] = [];
|
|
@@ -147,17 +154,31 @@ export class TablaComponent implements OnInit, OnChanges {
|
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
private inicializarColumnas(): void {
|
|
150
|
-
this.
|
|
151
|
-
|
|
157
|
+
this.columnas.forEach(c => {
|
|
158
|
+
if (c.Visible === undefined) {
|
|
159
|
+
c.Visible = true;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
this.recalcularColumnas();
|
|
163
|
+
}
|
|
152
164
|
|
|
153
|
-
|
|
165
|
+
public recalcularColumnas(): void {
|
|
166
|
+
const columnasVisibles = this.columnas.filter(c => c.Visible).map(c => c.Llave);
|
|
167
|
+
this.llavesColumnas = [];
|
|
168
|
+
if (this.desplegable) {
|
|
169
|
+
this.llavesColumnas.push('expand');
|
|
170
|
+
}
|
|
171
|
+
this.llavesColumnas.push(...columnasVisibles);
|
|
172
|
+
this.tieneColumnaEstado = this.columnas.some(c => c.Llave === 'Estado');
|
|
173
|
+
if (this.acciones.length ||
|
|
174
|
+
this.accionesSiempreClickeable.length ||
|
|
175
|
+
this.accionesDinamicas.length) {
|
|
154
176
|
this.llavesColumnas.push('acciones');
|
|
155
177
|
}
|
|
156
|
-
|
|
157
178
|
if (this.desplegable) {
|
|
158
|
-
this.llavesColumnas.unshift('expand');
|
|
159
179
|
this.llavesSubColumnas = this.subColumnas.map(c => c.Llave);
|
|
160
|
-
if (this.subAcciones.length ||
|
|
180
|
+
if (this.subAcciones.length ||
|
|
181
|
+
this.subAccionesSiempreClickeable.length) {
|
|
161
182
|
this.llavesSubColumnas.push('subAcciones');
|
|
162
183
|
}
|
|
163
184
|
}
|