chore(console): angular 14 (#3799)

* eslint schematics

* cli, core migrations

* material

* schematics

* ng-qrcode update

* fix input, formfield errorstatemixin

* other packages

* downgrade codemirror

* codemirror

* @next of alphas

Co-authored-by: Livio Spring <[email protected]>
This commit is contained in:
Max Peintner
2022-06-27 13:17:17 +00:00
committed by GitHub
co-authored by Livio Spring
parent 12d4d3ea0b
commit fb0f29aa32
41 changed files with 5012 additions and 9824 deletions
@@ -1,11 +1,11 @@
import { Injectable } from '@angular/core';
import { FormControl, FormGroupDirective, NgForm } from '@angular/forms';
import { UntypedFormControl, FormGroupDirective, NgForm } from '@angular/forms';
/** Provider that defines how form controls behave with regards to displaying error messages. */
@Injectable({ providedIn: 'root' })
export class ErrorStateMatcher {
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.touched || (form && form.submitted)));
}
}
@@ -13,7 +13,7 @@ export class ErrorStateMatcher {
/** Error state matcher that matches when a control is invalid and dirty. */
@Injectable()
export class ShowOnDirtyErrorStateMatcher implements ErrorStateMatcher {
isErrorState(control: FormControl | null, form: FormGroupDirective | NgForm | null): boolean {
isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean {
return !!(control && control.invalid && (control.dirty || (form && form.submitted)));
}
}
@@ -28,11 +28,17 @@ let nextUniqueId = 0;
const _MatInputBase = mixinErrorState(
class {
readonly stateChanges = new Subject<void>();
constructor(
public _defaultErrorStateMatcher: ErrorStateMatcher,
public _parentForm: NgForm,
public _parentFormGroup: FormGroupDirective,
/** @docs-private */
/**
* Form control bound to the component.
* Implemented as part of `MatFormFieldControl`.
* @docs-private
*/
public ngControl: NgControl,
) {}
},
@@ -98,7 +104,7 @@ export class InputDirective
* Implemented as part of MatFormFieldControl.
* @docs-private
*/
readonly stateChanges: Subject<void> = new Subject<void>();
override readonly stateChanges: Subject<void> = new Subject<void>();
/**
* Implemented as part of MatFormFieldControl.