Skip to content

Commit 646fffd

Browse files
committed
chore: update to Angular 14
1 parent e82673d commit 646fffd

15 files changed

+52
-47
lines changed

Diff for: angular.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,5 @@
114114
}
115115
}
116116
}
117-
},
118-
"defaultProject": "coreui-free-angular-admin-template"
117+
}
119118
}

Diff for: package.json

+23-23
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@
1414
},
1515
"private": true,
1616
"dependencies": {
17-
"@angular/animations": "~13.3.0",
18-
"@angular/cdk": "~13.3.0",
19-
"@angular/common": "~13.3.0",
20-
"@angular/compiler": "~13.3.0",
21-
"@angular/core": "~13.3.0",
22-
"@angular/forms": "~13.3.0",
23-
"@angular/language-service": "~13.3.0",
24-
"@angular/platform-browser": "~13.3.0",
25-
"@angular/platform-browser-dynamic": "~13.3.0",
26-
"@angular/router": "~13.3.0",
27-
"@coreui/angular": "^4.0.2",
28-
"@coreui/angular-chartjs": "^2.0.2",
17+
"@angular/animations": "^14.0.5",
18+
"@angular/cdk": "^14.0.4",
19+
"@angular/common": "^14.0.5",
20+
"@angular/compiler": "^14.0.5",
21+
"@angular/core": "^14.0.5",
22+
"@angular/forms": "^14.0.5",
23+
"@angular/language-service": "^14.0.5",
24+
"@angular/platform-browser": "^14.0.5",
25+
"@angular/platform-browser-dynamic": "^14.0.5",
26+
"@angular/router": "^14.0.5",
27+
"@coreui/angular": "^4.1.0",
28+
"@coreui/angular-chartjs": "^4.1.0",
2929
"@coreui/chartjs": "^3.0.0",
30-
"@coreui/coreui": "~4.1.6",
30+
"@coreui/coreui": "~4.2.0",
3131
"@coreui/icons": "^2.1.0",
32-
"@coreui/icons-angular": "^3.0.0",
32+
"@coreui/icons-angular": "^4.1.0",
3333
"@coreui/utils": "^1.3.1",
3434
"chart.js": "^3.7.1",
3535
"ngx-perfect-scrollbar": "^10.1.1",
@@ -38,19 +38,19 @@
3838
"zone.js": "~0.11.4"
3939
},
4040
"devDependencies": {
41-
"@angular-devkit/build-angular": "~13.3.0",
42-
"@angular/cli": "~13.3.0",
43-
"@angular/compiler-cli": "~13.3.0",
44-
"@angular/localize": "~13.3.0",
41+
"@angular-devkit/build-angular": "^14.0.5",
42+
"@angular/cli": "^14.0.5",
43+
"@angular/compiler-cli": "^14.0.5",
44+
"@angular/localize": "^14.0.5",
4545
"@types/jasmine": "^4.0.3",
46-
"@types/node": "^16.11.31",
47-
"jasmine-core": "~4.1.0",
48-
"karma": "~6.3.19",
46+
"@types/node": "^16.11.43",
47+
"jasmine-core": "~4.2.0",
48+
"karma": "~6.4.0",
4949
"karma-chrome-launcher": "~3.1.1",
5050
"karma-coverage": "~2.2.0",
51-
"karma-jasmine": "~5.0.0",
51+
"karma-jasmine": "~5.1.0",
5252
"karma-jasmine-html-reporter": "~2.0.0",
53-
"typescript": "~4.6.3"
53+
"typescript": "~4.7.2"
5454
},
5555
"engines": {
5656
"node": "^14.15.0 || >=16.10.0",

Diff for: src/app/views/base/base-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ const routes: Routes = [
2626
children: [
2727
{
2828
path: '',
29+
pathMatch: 'full',
2930
redirectTo: 'cards',
3031
},
3132
{

Diff for: src/app/views/base/list-groups/list-groups.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { FormBuilder } from '@angular/forms';
2+
import { UntypedFormBuilder } from '@angular/forms';
33

44
@Component({
55
selector: 'app-list-groups',
@@ -20,7 +20,7 @@ export class ListGroupsComponent {
2020
});
2121

2222
constructor(
23-
private formBuilder: FormBuilder
23+
private formBuilder: UntypedFormBuilder
2424
) { }
2525

2626
setValue(controlName: string) {

Diff for: src/app/views/buttons/button-groups/button-groups.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
2+
import { UntypedFormBuilder, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
33

44
@Component({
55
selector: 'app-button-groups',
@@ -13,12 +13,12 @@ export class ButtonGroupsComponent {
1313
checkbox2: false,
1414
checkbox3: false
1515
});
16-
formRadio1 = new FormGroup({
17-
radio1: new FormControl('Radio1')
16+
formRadio1 = new UntypedFormGroup({
17+
radio1: new UntypedFormControl('Radio1')
1818
});
1919

2020
constructor(
21-
private formBuilder: FormBuilder
21+
private formBuilder: UntypedFormBuilder
2222
) { }
2323

2424
setCheckBoxValue(controlName: string) {

Diff for: src/app/views/buttons/buttons-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const routes: Routes = [
1414
children: [
1515
{
1616
path: '',
17+
pathMatch: 'full',
1718
redirectTo: 'buttons'
1819
},
1920
{

Diff for: src/app/views/dashboard/dashboard.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { FormControl, FormGroup } from '@angular/forms';
2+
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
33

44
import { DashboardChartsData, IChartProps } from './dashboard-charts-data';
55

@@ -107,8 +107,8 @@ export class DashboardComponent implements OnInit {
107107
];
108108
public mainChart: IChartProps = {};
109109
public chart: Array<IChartProps> = [];
110-
public trafficRadioGroup = new FormGroup({
111-
trafficRadio: new FormControl('Month')
110+
public trafficRadioGroup = new UntypedFormGroup({
111+
trafficRadio: new UntypedFormControl('Month')
112112
});
113113

114114
ngOnInit(): void {

Diff for: src/app/views/forms/checks-radios/checks-radios.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component } from '@angular/core';
2-
import { FormBuilder } from '@angular/forms';
2+
import { UntypedFormBuilder } from '@angular/forms';
33

44
@Component({
55
selector: 'app-checks-radios',
@@ -35,7 +35,7 @@ export class ChecksRadiosComponent {
3535

3636

3737
constructor(
38-
private formBuilder: FormBuilder
38+
private formBuilder: UntypedFormBuilder
3939
) { }
4040

4141
setCheckBoxValue(controlName: string) {

Diff for: src/app/views/forms/forms-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ const routes: Routes = [
1919
children: [
2020
{
2121
path: '',
22+
pathMatch: 'full',
2223
redirectTo: 'form-control'
2324
},
2425
{

Diff for: src/app/views/icons/icons-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const routes: Routes = [
1212
children: [
1313
{
1414
path: '',
15+
pathMatch: 'full',
1516
redirectTo: 'coreui-icons'
1617
},
1718
{

Diff for: src/app/views/notifications/notifications-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const routes: Routes = [
1515
children: [
1616
{
1717
path: '',
18+
pathMatch: 'full',
1819
redirectTo: 'badges'
1920
},
2021
{

Diff for: src/app/views/notifications/toasters/toasters.component.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit, QueryList, ViewChildren } from '@angular/core';
2-
import { FormControl, FormGroup } from '@angular/forms';
2+
import { UntypedFormControl, UntypedFormGroup } from '@angular/forms';
33
import { Observable } from 'rxjs';
44
import { filter } from 'rxjs/operators';
55

@@ -35,13 +35,13 @@ export class ToastersComponent implements OnInit {
3535

3636
formChanges!: Observable<any>;
3737

38-
toasterForm = new FormGroup({
39-
autohide: new FormControl(this.autohide),
40-
delay: new FormControl({value: this.delay, disabled: !this.autohide}),
41-
position: new FormControl(this.position),
42-
fade: new FormControl({value: true, disabled: false}),
43-
closeButton: new FormControl(true),
44-
color: new FormControl('')
38+
toasterForm = new UntypedFormGroup({
39+
autohide: new UntypedFormControl(this.autohide),
40+
delay: new UntypedFormControl({value: this.delay, disabled: !this.autohide}),
41+
position: new UntypedFormControl(this.position),
42+
fade: new UntypedFormControl({value: true, disabled: false}),
43+
closeButton: new UntypedFormControl(true),
44+
color: new UntypedFormControl('')
4545
});
4646

4747
@ViewChildren(ToasterComponent) viewChildren!: QueryList<ToasterComponent>;

Diff for: src/app/views/theme/theme-routing.module.ts

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const routes: Routes = [
1313
children: [
1414
{
1515
path: '',
16+
pathMatch: 'full',
1617
redirectTo: 'colors',
1718
},
1819
{

Diff for: src/components/docs-example/docs-example.component.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export class DocsExampleComponent implements AfterContentInit, AfterViewInit {
3434
const version = packageJson?.config?.coreui_library_short_version;
3535
const docsUrl = packageJson?.config?.coreui_library_docs_url ?? 'https://coreui.io/angular/';
3636
// const path: string = version ? `${version}/#/${value}` : '#';
37-
const path: string = version ? `${version}/${value}` : '';
38-
this._href = `${docsUrl}${path}`;
37+
// const path: string = version ? `${version}/${value}` : '';
38+
this._href = `${docsUrl}${value}`;
3939
}
4040

4141
ngAfterContentInit(): void {

Diff for: tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"experimentalDecorators": true,
1717
"moduleResolution": "node",
1818
"importHelpers": true,
19-
"target": "es2017",
19+
"target": "es2020",
2020
"module": "es2020",
2121
"lib": [
2222
"es2020",

0 commit comments

Comments
 (0)