4
4
5
5
``` ts
6
6
7
+ import { AbstractControl } from ' @angular/forms' ;
7
8
import { AfterViewInit } from ' @angular/core' ;
8
9
import { ChangeDetectorRef } from ' @angular/core' ;
9
10
import { CheckboxRequiredValidator } from ' @angular/forms' ;
@@ -12,14 +13,18 @@ import { ElementRef } from '@angular/core';
12
13
import { EventEmitter } from ' @angular/core' ;
13
14
import { FocusableOption } from ' @angular/cdk/a11y' ;
14
15
import * as i0 from ' @angular/core' ;
15
- import * as i2 from ' @angular/material/core' ;
16
+ import * as i3 from ' @angular/material/core' ;
16
17
import { InjectionToken } from ' @angular/core' ;
17
18
import { MatRipple } from ' @angular/material/core' ;
18
19
import { NgZone } from ' @angular/core' ;
20
+ import { OnChanges } from ' @angular/core' ;
19
21
import { Provider } from ' @angular/core' ;
22
+ import { SimpleChanges } from ' @angular/core' ;
20
23
import { ThemePalette } from ' @angular/material/core' ;
24
+ import { ValidationErrors } from ' @angular/forms' ;
25
+ import { Validator } from ' @angular/forms' ;
21
26
22
- // @public (undocumented)
27
+ // @public @deprecated (undocumented)
23
28
export const MAT_CHECKBOX_CONTROL_VALUE_ACCESSOR: any ;
24
29
25
30
// @public
@@ -28,11 +33,11 @@ export const MAT_CHECKBOX_DEFAULT_OPTIONS: InjectionToken<MatCheckboxDefaultOpti
28
33
// @public
29
34
export function MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(): MatCheckboxDefaultOptions ;
30
35
31
- // @public (undocumented)
36
+ // @public @deprecated (undocumented)
32
37
export const MAT_CHECKBOX_REQUIRED_VALIDATOR: Provider ;
33
38
34
39
// @public (undocumented)
35
- export class MatCheckbox implements AfterViewInit , ControlValueAccessor , FocusableOption {
40
+ export class MatCheckbox implements AfterViewInit , OnChanges , ControlValueAccessor , Validator , FocusableOption {
36
41
constructor (_elementRef : ElementRef <HTMLElement >, _changeDetectorRef : ChangeDetectorRef , _ngZone : NgZone , tabIndex : string , _animationMode ? : string | undefined , _options ? : MatCheckboxDefaultOptions | undefined );
37
42
protected _animationClasses: {
38
43
uncheckedToChecked: string ;
@@ -87,6 +92,8 @@ export class MatCheckbox implements AfterViewInit, ControlValueAccessor, Focusab
87
92
// (undocumented)
88
93
ngAfterViewInit(): void ;
89
94
// (undocumented)
95
+ ngOnChanges(changes : SimpleChanges ): void ;
96
+ // (undocumented)
90
97
_onBlur(): void ;
91
98
// (undocumented)
92
99
_onInputClick(): void ;
@@ -101,13 +108,17 @@ export class MatCheckbox implements AfterViewInit, ControlValueAccessor, Focusab
101
108
registerOnChange(fn : (value : any ) => void ): void ;
102
109
// (undocumented)
103
110
registerOnTouched(fn : any ): void ;
111
+ // (undocumented)
112
+ registerOnValidatorChange(fn : () => void ): void ;
104
113
required: boolean ;
105
114
// @deprecated
106
115
ripple: MatRipple ;
107
116
// (undocumented)
108
117
setDisabledState(isDisabled : boolean ): void ;
109
118
tabIndex: number ;
110
119
toggle(): void ;
120
+ // (undocumented)
121
+ validate(control : AbstractControl <boolean >): ValidationErrors | null ;
111
122
value: string ;
112
123
// (undocumented)
113
124
writeValue(value : any ): void ;
@@ -139,18 +150,18 @@ export class MatCheckboxModule {
139
150
// (undocumented)
140
151
static ɵinj: i0 .ɵɵInjectorDeclaration <MatCheckboxModule >;
141
152
// (undocumented)
142
- static ɵmod: i0 .ɵɵNgModuleDeclaration <MatCheckboxModule , never , [typeof i2 .MatCommonModule , typeof i2 . MatRippleModule , typeof _MatCheckboxRequiredValidatorModule , typeof i3 .MatCheckbox ], [typeof i3 .MatCheckbox , typeof i2 .MatCommonModule , typeof _MatCheckboxRequiredValidatorModule ]>;
153
+ static ɵmod: i0 .ɵɵNgModuleDeclaration <MatCheckboxModule , never , [typeof i2 .MatCheckbox , typeof i3 .MatCommonModule ], [typeof i2 .MatCheckbox , typeof i3 .MatCommonModule ]>;
143
154
}
144
155
145
- // @public
156
+ // @public @deprecated
146
157
export class MatCheckboxRequiredValidator extends CheckboxRequiredValidator {
147
158
// (undocumented)
148
159
static ɵdir: i0 .ɵɵDirectiveDeclaration <MatCheckboxRequiredValidator , " mat-checkbox[required][formControlName], mat-checkbox[required][formControl], mat-checkbox[required][ngModel]" , never , {}, {}, never , never , true , never >;
149
160
// (undocumented)
150
161
static ɵfac: i0 .ɵɵFactoryDeclaration <MatCheckboxRequiredValidator , never >;
151
162
}
152
163
153
- // @public
164
+ // @public @deprecated (undocumented)
154
165
export class _MatCheckboxRequiredValidatorModule {
155
166
// (undocumented)
156
167
static ɵfac: i0 .ɵɵFactoryDeclaration <_MatCheckboxRequiredValidatorModule , never >;
0 commit comments