1 | /**
|
---|
2 | * @license
|
---|
3 | * Copyright Google LLC All Rights Reserved.
|
---|
4 | *
|
---|
5 | * Use of this source code is governed by an MIT-style license that can be
|
---|
6 | * found in the LICENSE file at https://angular.io/license
|
---|
7 | */
|
---|
8 | import { Observable } from 'rxjs';
|
---|
9 | import { NgControl } from '@angular/forms';
|
---|
10 | /** An interface which allows a control to work inside of a `MatFormField`. */
|
---|
11 | import * as ɵngcc0 from '@angular/core';
|
---|
12 | export declare abstract class MatFormFieldControl<T> {
|
---|
13 | /** The value of the control. */
|
---|
14 | value: T | null;
|
---|
15 | /**
|
---|
16 | * Stream that emits whenever the state of the control changes such that the parent `MatFormField`
|
---|
17 | * needs to run change detection.
|
---|
18 | */
|
---|
19 | readonly stateChanges: Observable<void>;
|
---|
20 | /** The element ID for this control. */
|
---|
21 | readonly id: string;
|
---|
22 | /** The placeholder for this control. */
|
---|
23 | readonly placeholder: string;
|
---|
24 | /** Gets the NgControl for this control. */
|
---|
25 | readonly ngControl: NgControl | null;
|
---|
26 | /** Whether the control is focused. */
|
---|
27 | readonly focused: boolean;
|
---|
28 | /** Whether the control is empty. */
|
---|
29 | readonly empty: boolean;
|
---|
30 | /** Whether the `MatFormField` label should try to float. */
|
---|
31 | readonly shouldLabelFloat: boolean;
|
---|
32 | /** Whether the control is required. */
|
---|
33 | readonly required: boolean;
|
---|
34 | /** Whether the control is disabled. */
|
---|
35 | readonly disabled: boolean;
|
---|
36 | /** Whether the control is in an error state. */
|
---|
37 | readonly errorState: boolean;
|
---|
38 | /**
|
---|
39 | * An optional name for the control type that can be used to distinguish `mat-form-field` elements
|
---|
40 | * based on their control type. The form field will add a class,
|
---|
41 | * `mat-form-field-type-{{controlType}}` to its root element.
|
---|
42 | */
|
---|
43 | readonly controlType?: string;
|
---|
44 | /**
|
---|
45 | * Whether the input is currently in an autofilled state. If property is not present on the
|
---|
46 | * control it is assumed to be false.
|
---|
47 | */
|
---|
48 | readonly autofilled?: boolean;
|
---|
49 | /**
|
---|
50 | * Value of `aria-describedby` that should be merged with the described-by ids
|
---|
51 | * which are set by the form-field.
|
---|
52 | */
|
---|
53 | readonly userAriaDescribedBy?: string;
|
---|
54 | /** Sets the list of element IDs that currently describe this control. */
|
---|
55 | abstract setDescribedByIds(ids: string[]): void;
|
---|
56 | /** Handles a click on the control's container. */
|
---|
57 | abstract onContainerClick(event: MouseEvent): void;
|
---|
58 | static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatFormFieldControl<any>, never>;
|
---|
59 | static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<MatFormFieldControl<any>, never, never, {}, {}, never>;
|
---|
60 | }
|
---|
61 |
|
---|
62 | //# sourceMappingURL=form-field-control.d.ts.map |
---|