Skip to content

Commit dd61dfc

Browse files
committed
feat: angular update
1 parent 216d9a7 commit dd61dfc

7 files changed

Lines changed: 2967 additions & 1547 deletions

File tree

carrental-web/src/angular/carrental/angular.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,10 @@
155155
}
156156
}
157157
},
158-
"defaultProject": "testproject",
159158
"cli": {
160159
"analytics": false,
161-
"defaultCollection": "@angular-eslint/schematics"
160+
"schematicCollections": [
161+
"@angular-eslint/schematics"
162+
]
162163
}
163164
}

carrental-web/src/angular/carrental/package-lock.json

Lines changed: 2936 additions & 1517 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

carrental-web/src/angular/carrental/package.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
},
1717
"private": true,
1818
"dependencies": {
19-
"@angular/animations": "~13.1.3",
20-
"@angular/common": "~13.1.3",
21-
"@angular/compiler": "~13.1.3",
22-
"@angular/core": "~13.1.3",
23-
"@angular/forms": "~13.1.3",
24-
"@angular/localize": "~13.1.3",
25-
"@angular/platform-browser": "~13.1.3",
26-
"@angular/platform-browser-dynamic": "~13.1.3",
27-
"@angular/router": "~13.1.3",
19+
"@angular/animations": "^14.0.0",
20+
"@angular/common": "^14.0.0",
21+
"@angular/compiler": "^14.0.0",
22+
"@angular/core": "^14.0.0",
23+
"@angular/forms": "^14.0.0",
24+
"@angular/localize": "^14.0.0",
25+
"@angular/platform-browser": "^14.0.0",
26+
"@angular/platform-browser-dynamic": "^14.0.0",
27+
"@angular/router": "^14.0.0",
2828
"bootstrap": "^4.5.2",
2929
"core-js": "^3.19.1",
3030
"popper.js": "^1.16.1",
@@ -33,10 +33,10 @@
3333
"zone.js": "~0.11.4"
3434
},
3535
"devDependencies": {
36-
"@angular-devkit/build-angular": "~13.1.3",
37-
"@angular/cli": "~13.1.3",
38-
"@angular/compiler-cli": "~13.1.3",
39-
"@angular/language-service": "~13.1.3",
36+
"@angular-devkit/build-angular": "^14.0.0",
37+
"@angular/cli": "^14.0.0",
38+
"@angular/compiler-cli": "^14.0.0",
39+
"@angular/language-service": "^14.0.0",
4040
"@types/jasmine": "~3.10.0",
4141
"@types/jasminewd2": "~2.0.3",
4242
"@types/node": "^14.0.0",
@@ -53,7 +53,7 @@
5353
"npm-run-all": "^4.1.5",
5454
"ts-node": "~10.4.0",
5555
"rimraf": "^3.0.2",
56-
"typescript": "~4.4.4",
56+
"typescript": "~4.7.3",
5757
"webpack-bundle-analyzer": "^4.5.0",
5858
"eslint": "^7.26.0",
5959
"eslint-plugin-import": "^2.22.1",

carrental-web/src/angular/carrental/src/app/crvalues/crvalues.component.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,30 @@
1818
import { By } from '@angular/platform-browser';
1919
import { DebugElement } from '@angular/core';
2020
import { TestBed, waitForAsync } from '@angular/core/testing';
21-
import { FormBuilder } from '@angular/forms';
21+
import { UntypedFormBuilder } from '@angular/forms';
2222
import { CrValuesComponent } from './crvalues.component';
2323
import { CrPortfolio } from '../dtos/crTypes';
2424

2525
describe('Component: CrValues', () => {
2626

2727
it('validate should return false', () => {
28-
const component = new CrValuesComponent(new FormBuilder());
28+
const component = new CrValuesComponent(new UntypedFormBuilder());
2929
const param = new CrPortfolioImplTest(null, null, null, null);
3030
component.crvalues = param;
3131
component.ngOnInit();
3232
expect(!component.form.valid).toBeTruthy();
3333
});
3434

3535
it('validate should return true', () => {
36-
const component = new CrValuesComponent(new FormBuilder());
36+
const component = new CrValuesComponent(new UntypedFormBuilder());
3737
const param = new CrPortfolioImplTest(1, 1, 1, 1);
3838
component.crvalues = param;
3939
component.ngOnInit();
4040
expect(component.form.valid).toBeTruthy();
4141
});
4242

4343
it('validate should return false', () => {
44-
const component = new CrValuesComponent(new FormBuilder());
44+
const component = new CrValuesComponent(new UntypedFormBuilder());
4545
const param = new CrPortfolioImplTest(-1, -1, -1, -1);
4646
component.crvalues = param;
4747
component.ngOnInit();

carrental-web/src/angular/carrental/src/app/crvalues/crvalues.component.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
limitations under the License.
1515
*/
1616
import { Component, OnInit, Input , OnDestroy, EventEmitter, Output} from '@angular/core';
17-
import { FormGroup, FormControl, FormBuilder, Validators, AbstractControl } from '@angular/forms';
17+
import { UntypedFormGroup, UntypedFormControl, UntypedFormBuilder, Validators, AbstractControl } from '@angular/forms';
1818
import { CrPortfolio } from '../dtos/crTypes';
1919
import { CrValuesValidators } from '../shared/crvalues.validators';
2020
import { Subscription } from 'rxjs';
@@ -26,13 +26,13 @@ import { Utils } from '../shared/utils';
2626
styleUrls: ['./crvalues.component.scss']
2727
})
2828
export class CrValuesComponent implements OnInit, OnDestroy {
29-
form: FormGroup;
29+
form: UntypedFormGroup;
3030
fcNames = ['anzahlPkw', 'anzahlLkw', 'mieteAbgerechnetPkw', 'mieteAbgerechnetLkw'];
3131
@Input() crvalues: CrPortfolio;
3232
updateTotalsSub: any[] = [];
3333
@Output() valuesValid = new EventEmitter<boolean>();
3434

35-
constructor(fb: FormBuilder) {
35+
constructor(fb: UntypedFormBuilder) {
3636
this.form = fb.group({
3737
anzahlPkw: ['', CrValuesValidators.positiveIntValidator],
3838
mieteAbgerechnetPkw: ['', CrValuesValidators.positiveIntValidator],
@@ -42,21 +42,21 @@ export class CrValuesComponent implements OnInit, OnDestroy {
4242
}
4343

4444
ngOnInit() {
45-
let fc = <FormControl>this.form.controls[this.fcNames[0]];
45+
let fc = <UntypedFormControl>this.form.controls[this.fcNames[0]];
4646
fc.setValue(this.crvalues.anzahlPkw);
4747
this.updateTotalsSub.push(fc.valueChanges.subscribe(value => {this.crvalues.anzahlPkw = value; this.updateTotals(value);}));
48-
fc = <FormControl>this.form.controls[this.fcNames[1]];
48+
fc = <UntypedFormControl>this.form.controls[this.fcNames[1]];
4949
fc.setValue(this.crvalues.anzahlLkw);
5050
this.updateTotalsSub.push(fc.valueChanges.subscribe(value => {this.crvalues.anzahlLkw = value; this.updateTotals(value);}));
51-
fc = <FormControl>this.form.controls[this.fcNames[2]];
51+
fc = <UntypedFormControl>this.form.controls[this.fcNames[2]];
5252
fc.setValue(this.crvalues.mieteAbgerechnetPkw);
5353
this.updateTotalsSub.push(fc.valueChanges.subscribe(value => {
5454
const myValue = Utils.removeSeparators(value);
5555
this.crvalues.mieteAbgerechnetPkw = value;
5656
this.updateTotals(value);
5757

5858
}));
59-
fc = <FormControl>this.form.controls[this.fcNames[3]];
59+
fc = <UntypedFormControl>this.form.controls[this.fcNames[3]];
6060
fc.setValue(this.crvalues.mieteAbgerechnetLkw);
6161
this.updateTotalsSub.push(fc.valueChanges.subscribe(value => {
6262
const myValue = Utils.removeSeparators(value);

carrental-web/src/angular/carrental/src/app/shared/crvalues.validators.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
16-
import { FormControl } from '@angular/forms';
16+
import { UntypedFormControl } from '@angular/forms';
1717

1818
export class CrValuesValidators {
19-
static positiveIntValidator(control: FormControl) {
19+
static positiveIntValidator(control: UntypedFormControl) {
2020
const valueStr = control.value ? control.value.toString(10).split('').filter(c => c != '\'').join('') : '';
2121
const myValue = parseInt(valueStr, 20);
2222
const ret = isNaN(myValue);

carrental-web/src/angular/carrental/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"module": "esnext",
1414
"moduleResolution": "node",
1515
"importHelpers": true,
16-
"target": "es2015",
16+
"target": "es2020",
1717
"typeRoots": [
1818
"node_modules/@types"
1919
],

0 commit comments

Comments
 (0)