mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 11:02:16 +00:00
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:
co-authored by
Livio Spring
parent
12d4d3ea0b
commit
fb0f29aa32
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user