chore(deps): upgrade Angular 18 → 19

- ng update @angular/core@19 @angular/cli@19 @angular/material@19 @angular-eslint/schematics@19
- Migration: remove standalone:true (now default in v19) from 60 components
- Migration: zone.js 0.14 → 0.15
- Fix pre-existing build budget error: raise initial bundle limit to 5mb (app ships large static JSON assets)
This commit is contained in:
2026-04-26 06:25:02 +02:00
parent b8eb8a9393
commit 5400294d45
65 changed files with 5875 additions and 4710 deletions
@@ -1,63 +1,58 @@
import { Component, Input, OnChanges } from '@angular/core';
//import { ChartDataset } from 'chart.js';
import { BaseChartDirective } from 'ng2-charts';
import { UtilitiesService } from '@services';
import { DoughnutConfig } from '@models';
@Component({
selector: 'app-pie-chart',
standalone: true,
imports: [
BaseChartDirective
],
templateUrl: './pie-chart.component.html'
})
export class PieChartComponent implements OnChanges {
public displayCharts = false;
public chartConfig: DoughnutConfig = this._utilitiesService.getDoughnutChartConfig();
constructor(
private _utilitiesService: UtilitiesService
) { }
@Input() names: string[] = [];
@Input() values: number[] = [];
@Input() headers: string[] = [];
@Input() colors: {
backgroundColor: string[],
borderColor: string[]
} = {
backgroundColor: this._utilitiesService.getSeriesColors(0.8, 'all'),
borderColor: this._utilitiesService.getSeriesColors(1, 'all')
};
@Input() legend: boolean = false;
ngOnChanges() {
this._loadDoughnutChart();
}
private _loadDoughnutChart(): void {
this.chartConfig.doughnutChartLabels = [...this.names];
this.chartConfig.doughnutChartDatasets[0].data = [...this.values];
this.chartConfig.doughnutChartDatasets[0].label = 'Nombre total de sauts';
this.chartConfig.doughnutChartDatasets[0].backgroundColor = this.colors.backgroundColor;
this.chartConfig.doughnutChartDatasets[0].borderColor = this.colors.borderColor;
this.chartConfig.doughnutChartDatasets[0].borderWidth = 2;
this.chartConfig.doughnutChartLegend = this.legend;
this.displayCharts = true;
}
/*private _loadDoughnutChart(): void {
const dataset: ChartDataset<'doughnut'> = {
data: [...this.values],
label: 'Nombre total de sauts',
backgroundColor: this._utilitiesService.getSeriesColors(0.8),
borderColor: this._utilitiesService.getSeriesColors(1),
borderWidth: 1
};
this.chartConfig.doughnutChartLabels = [...this.names];
this.chartConfig.doughnutChartDatasets!.push(dataset);
this.displayCharts = true;
}*/
}
import { Component, Input, OnChanges } from '@angular/core';
//import { ChartDataset } from 'chart.js';
import { BaseChartDirective } from 'ng2-charts';
import { UtilitiesService } from '@services';
import { DoughnutConfig } from '@models';
@Component({
selector: 'app-pie-chart',
imports: [BaseChartDirective],
templateUrl: './pie-chart.component.html',
})
export class PieChartComponent implements OnChanges {
public displayCharts = false;
public chartConfig: DoughnutConfig = this._utilitiesService.getDoughnutChartConfig();
constructor(private _utilitiesService: UtilitiesService) {}
@Input() names: string[] = [];
@Input() values: number[] = [];
@Input() headers: string[] = [];
@Input() colors: {
backgroundColor: string[];
borderColor: string[];
} = {
backgroundColor: this._utilitiesService.getSeriesColors(0.8, 'all'),
borderColor: this._utilitiesService.getSeriesColors(1, 'all'),
};
@Input() legend: boolean = false;
ngOnChanges() {
this._loadDoughnutChart();
}
private _loadDoughnutChart(): void {
this.chartConfig.doughnutChartLabels = [...this.names];
this.chartConfig.doughnutChartDatasets[0].data = [...this.values];
this.chartConfig.doughnutChartDatasets[0].label = 'Nombre total de sauts';
this.chartConfig.doughnutChartDatasets[0].backgroundColor = this.colors.backgroundColor;
this.chartConfig.doughnutChartDatasets[0].borderColor = this.colors.borderColor;
this.chartConfig.doughnutChartDatasets[0].borderWidth = 2;
this.chartConfig.doughnutChartLegend = this.legend;
this.displayCharts = true;
}
/*private _loadDoughnutChart(): void {
const dataset: ChartDataset<'doughnut'> = {
data: [...this.values],
label: 'Nombre total de sauts',
backgroundColor: this._utilitiesService.getSeriesColors(0.8),
borderColor: this._utilitiesService.getSeriesColors(1),
borderWidth: 1
};
this.chartConfig.doughnutChartLabels = [...this.names];
this.chartConfig.doughnutChartDatasets!.push(dataset);
this.displayCharts = true;
}*/
}