1 | {"version":3,"file":"form-field.d.ts","sources":["form-field.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { AfterContentChecked, AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, InjectionToken, NgZone, QueryList, OnDestroy } from '@angular/core';\nimport { CanColor } from '@angular/material/core';\nimport { MatError } from './error';\nimport { MatFormFieldControl } from './form-field-control';\nimport { MatHint } from './hint';\nimport { MatLabel } from './label';\nimport { MatPlaceholder } from './placeholder';\nimport { MatPrefix } from './prefix';\nimport { MatSuffix } from './suffix';\nimport { Platform } from '@angular/cdk/platform';\nimport { NgControl } from '@angular/forms';\n/**\n * Boilerplate for applying mixins to MatFormField.\n * @docs-private\n */\ndeclare const _MatFormFieldBase: import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanColor> & {\n new (_elementRef: ElementRef): {\n _elementRef: ElementRef;\n };\n};\n/** Possible appearance styles for the form field. */\nexport declare type MatFormFieldAppearance = 'legacy' | 'standard' | 'fill' | 'outline';\n/** Possible values for the \"floatLabel\" form-field input. */\nexport declare type FloatLabelType = 'always' | 'never' | 'auto';\n/**\n * Represents the default options for the form field that can be configured\n * using the `MAT_FORM_FIELD_DEFAULT_OPTIONS` injection token.\n */\nexport interface MatFormFieldDefaultOptions {\n appearance?: MatFormFieldAppearance;\n hideRequiredMarker?: boolean;\n /**\n * Whether the label for form-fields should by default float `always`,\n * `never`, or `auto` (only when necessary).\n */\n floatLabel?: FloatLabelType;\n}\n/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nexport declare const MAT_FORM_FIELD_DEFAULT_OPTIONS: InjectionToken<MatFormFieldDefaultOptions>;\n/**\n * Injection token that can be used to inject an instances of `MatFormField`. It serves\n * as alternative token to the actual `MatFormField` class which would cause unnecessary\n * retention of the `MatFormField` class and its component metadata.\n */\nexport declare const MAT_FORM_FIELD: InjectionToken<MatFormField>;\n/** Container for form controls that applies Material Design styling and behavior. */\nexport declare class MatFormField extends _MatFormFieldBase implements AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy, CanColor {\n private _changeDetectorRef;\n private _dir;\n private _defaults;\n private _platform;\n private _ngZone;\n /**\n * Whether the outline gap needs to be calculated\n * immediately on the next change detection run.\n */\n private _outlineGapCalculationNeededImmediately;\n /** Whether the outline gap needs to be calculated next time the zone has stabilized. */\n private _outlineGapCalculationNeededOnStable;\n private readonly _destroyed;\n /** The form-field appearance style. */\n get appearance(): MatFormFieldAppearance;\n set appearance(value: MatFormFieldAppearance);\n _appearance: MatFormFieldAppearance;\n /** Whether the required marker should be hidden. */\n get hideRequiredMarker(): boolean;\n set hideRequiredMarker(value: boolean);\n private _hideRequiredMarker;\n /** Override for the logic that disables the label animation in certain cases. */\n private _showAlwaysAnimate;\n /** Whether the floating label should always float or not. */\n _shouldAlwaysFloat(): boolean;\n /** Whether the label can float or not. */\n _canLabelFloat(): boolean;\n /** State of the mat-hint and mat-error animations. */\n _subscriptAnimationState: string;\n /** Text for the form field hint. */\n get hintLabel(): string;\n set hintLabel(value: string);\n private _hintLabel;\n readonly _hintLabelId: string;\n readonly _labelId: string;\n /**\n * Whether the label should always float, never float or float as the user types.\n *\n * Note: only the legacy appearance supports the `never` option. `never` was originally added as a\n * way to make the floating label emulate the behavior of a standard input placeholder. However\n * the form field now supports both floating labels and placeholders. Therefore in the non-legacy\n * appearances the `never` option has been disabled in favor of just using the placeholder.\n */\n get floatLabel(): FloatLabelType;\n set floatLabel(value: FloatLabelType);\n private _floatLabel;\n /** Whether the Angular animations are enabled. */\n _animationsEnabled: boolean;\n /**\n * @deprecated\n * @breaking-change 8.0.0\n */\n underlineRef: ElementRef;\n _connectionContainerRef: ElementRef;\n _inputContainerRef: ElementRef;\n private _label;\n _controlNonStatic: MatFormFieldControl<any>;\n _controlStatic: MatFormFieldControl<any>;\n get _control(): MatFormFieldControl<any>;\n set _control(value: MatFormFieldControl<any>);\n private _explicitFormFieldControl;\n _labelChildNonStatic: MatLabel;\n _labelChildStatic: MatLabel;\n _placeholderChild: MatPlaceholder;\n _errorChildren: QueryList<MatError>;\n _hintChildren: QueryList<MatHint>;\n _prefixChildren: QueryList<MatPrefix>;\n _suffixChildren: QueryList<MatSuffix>;\n constructor(elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, \n /**\n * @deprecated `_labelOptions` parameter no longer being used. To be removed.\n * @breaking-change 12.0.0\n */\n _labelOptions: any, _dir: Directionality, _defaults: MatFormFieldDefaultOptions, _platform: Platform, _ngZone: NgZone, _animationMode: string);\n /**\n * Gets the id of the label element. If no label is present, returns `null`.\n */\n getLabelId(): string | null;\n /**\n * Gets an ElementRef for the element that a overlay attached to the form-field should be\n * positioned relative to.\n */\n getConnectedOverlayOrigin(): ElementRef;\n ngAfterContentInit(): void;\n ngAfterContentChecked(): void;\n ngAfterViewInit(): void;\n ngOnDestroy(): void;\n /** Determines whether a class from the NgControl should be forwarded to the host element. */\n _shouldForward(prop: keyof NgControl): boolean;\n _hasPlaceholder(): boolean;\n _hasLabel(): boolean;\n _shouldLabelFloat(): boolean;\n _hideControlPlaceholder(): boolean;\n _hasFloatingLabel(): boolean;\n /** Determines whether to display hints or errors. */\n _getDisplayedMessages(): 'error' | 'hint';\n /** Animates the placeholder up and locks it in position. */\n _animateAndLockLabel(): void;\n /**\n * Ensure that there is only one placeholder (either `placeholder` attribute on the child control\n * or child element with the `mat-placeholder` directive).\n */\n private _validatePlaceholders;\n /** Does any extra processing that is required when handling the hints. */\n private _processHints;\n /**\n * Ensure that there is a maximum of one of each `<mat-hint>` alignment specified, with the\n * attribute being considered as `align=\"start\"`.\n */\n private _validateHints;\n /** Gets the default float label state. */\n private _getDefaultFloatLabelState;\n /**\n * Sets the list of element IDs that describe the child control. This allows the control to update\n * its `aria-describedby` attribute accordingly.\n */\n private _syncDescribedByIds;\n /** Throws an error if the form field's control is missing. */\n protected _validateControlChild(): void;\n /**\n * Updates the width and position of the gap in the outline. Only relevant for the outline\n * appearance.\n */\n updateOutlineGap(): void;\n /** Gets the start end of the rect considering the current directionality. */\n private _getStartEnd;\n /** Checks whether the form field is attached to the DOM. */\n private _isAttachedToDOM;\n static ngAcceptInputType_hideRequiredMarker: BooleanInput;\n}\nexport {};\n"]} |
---|