blob: fa94538a74985967c29fad93dc6123264aadb8d2 [file] [log] [blame]
{"version":3,"file":"form-field.js","sources":["../../../../../../src/material/form-field/error.ts","../../../../../../src/material/form-field/form-field-animations.ts","../../../../../../src/material/form-field/form-field-control.ts","../../../../../../src/material/form-field/form-field-errors.ts","../../../../../../src/material/form-field/hint.ts","../../../../../../src/material/form-field/label.ts","../../../../../../src/material/form-field/placeholder.ts","../../../../../../src/material/form-field/prefix.ts","../../../../../../src/material/form-field/suffix.ts","../../../../../../src/material/form-field/form-field.ts","../../../../../../src/material/form-field/form-field-module.ts","../../../../../../src/material/form-field/public-api.ts","../../../../../../src/material/form-field/index.ts"],"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 */\n\nimport {Directive, InjectionToken, Input} from '@angular/core';\n\nlet nextUniqueId = 0;\n\n/**\n * Injection token that can be used to reference instances of `MatError`. It serves as\n * alternative token to the actual `MatError` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const MAT_ERROR = new InjectionToken<MatError>('MatError');\n\n/** Single error message to be shown underneath the form field. */\n@Directive({\n selector: 'mat-error',\n host: {\n 'class': 'mat-error',\n 'role': 'alert',\n '[attr.id]': 'id',\n },\n providers: [{provide: MAT_ERROR, useExisting: MatError}],\n})\nexport class MatError {\n @Input() id: string = `mat-error-${nextUniqueId++}`;\n}\n","/**\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 {\n animate,\n state,\n style,\n transition,\n trigger,\n AnimationTriggerMetadata,\n} from '@angular/animations';\n\n/**\n * Animations used by the MatFormField.\n * @docs-private\n */\nexport const matFormFieldAnimations: {\n readonly transitionMessages: AnimationTriggerMetadata\n} = {\n /** Animation that transitions the form field's error and hint messages. */\n transitionMessages: trigger('transitionMessages', [\n // TODO(mmalerba): Use angular animations for label animation as well.\n state('enter', style({ opacity: 1, transform: 'translateY(0%)' })),\n transition('void => enter', [\n style({ opacity: 0, transform: 'translateY(-5px)' }),\n animate('300ms cubic-bezier(0.55, 0, 0.55, 0.2)'),\n ]),\n ])\n};\n","/**\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 */\n\nimport {Observable} from 'rxjs';\nimport {NgControl} from '@angular/forms';\nimport {Directive} from '@angular/core';\n\n\n/** An interface which allows a control to work inside of a `MatFormField`. */\n@Directive()\nexport abstract class MatFormFieldControl<T> {\n /** The value of the control. */\n value: T | null;\n\n /**\n * Stream that emits whenever the state of the control changes such that the parent `MatFormField`\n * needs to run change detection.\n */\n readonly stateChanges: Observable<void>;\n\n /** The element ID for this control. */\n readonly id: string;\n\n /** The placeholder for this control. */\n readonly placeholder: string;\n\n /** Gets the NgControl for this control. */\n readonly ngControl: NgControl | null;\n\n /** Whether the control is focused. */\n readonly focused: boolean;\n\n /** Whether the control is empty. */\n readonly empty: boolean;\n\n /** Whether the `MatFormField` label should try to float. */\n readonly shouldLabelFloat: boolean;\n\n /** Whether the control is required. */\n readonly required: boolean;\n\n /** Whether the control is disabled. */\n readonly disabled: boolean;\n\n /** Whether the control is in an error state. */\n readonly errorState: boolean;\n\n /**\n * An optional name for the control type that can be used to distinguish `mat-form-field` elements\n * based on their control type. The form field will add a class,\n * `mat-form-field-type-{{controlType}}` to its root element.\n */\n readonly controlType?: string;\n\n /**\n * Whether the input is currently in an autofilled state. If property is not present on the\n * control it is assumed to be false.\n */\n readonly autofilled?: boolean;\n\n /**\n * Value of `aria-describedby` that should be merged with the described-by ids\n * which are set by the form-field.\n */\n readonly userAriaDescribedBy?: string;\n\n /** Sets the list of element IDs that currently describe this control. */\n abstract setDescribedByIds(ids: string[]): void;\n\n /** Handles a click on the control's container. */\n abstract onContainerClick(event: MouseEvent): void;\n}\n","/**\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 */\n\n/** @docs-private */\nexport function getMatFormFieldPlaceholderConflictError(): Error {\n return Error('Placeholder attribute and child element were both specified.');\n}\n\n/** @docs-private */\nexport function getMatFormFieldDuplicatedHintError(align: string): Error {\n return Error(`A hint was already declared for 'align=\"${align}\"'.`);\n}\n\n/** @docs-private */\nexport function getMatFormFieldMissingControlError(): Error {\n return Error('mat-form-field must contain a MatFormFieldControl.');\n}\n","/**\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 */\n\nimport {Directive, InjectionToken, Input} from '@angular/core';\n\nlet nextUniqueId = 0;\n\n/**\n * Injection token that can be used to reference instances of `MatHint`. It serves as\n * alternative token to the actual `MatHint` class which could cause unnecessary\n * retention of the class and its directive metadata.\n *\n * *Note*: This is not part of the public API as the MDC-based form-field will not\n * need a lightweight token for `MatHint` and we want to reduce breaking changes.\n */\nexport const _MAT_HINT = new InjectionToken<MatHint>('MatHint');\n\n/** Hint text to be shown underneath the form field control. */\n@Directive({\n selector: 'mat-hint',\n host: {\n 'class': 'mat-hint',\n '[class.mat-form-field-hint-end]': 'align === \"end\"',\n '[attr.id]': 'id',\n // Remove align attribute to prevent it from interfering with layout.\n '[attr.align]': 'null',\n },\n providers: [{provide: _MAT_HINT, useExisting: MatHint}],\n})\nexport class MatHint {\n /** Whether to align the hint label at the start or end of the line. */\n @Input() align: 'start' | 'end' = 'start';\n\n /** Unique ID for the hint. Used for the aria-describedby on the form field control. */\n @Input() id: string = `mat-hint-${nextUniqueId++}`;\n}\n","/**\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 */\n\nimport {Directive} from '@angular/core';\n\n\n/** The floating label for a `mat-form-field`. */\n@Directive({\n selector: 'mat-label'\n})\nexport class MatLabel {}\n","/**\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 */\n\nimport {Directive} from '@angular/core';\n\n\n/**\n * The placeholder text for an `MatFormField`.\n * @deprecated Use `<mat-label>` to specify the label and the `placeholder` attribute to specify the\n * placeholder.\n * @breaking-change 8.0.0\n */\n@Directive({\n selector: 'mat-placeholder'\n})\nexport class MatPlaceholder {}\n","/**\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 */\n\nimport {Directive, InjectionToken} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `MatPrefix`. It serves as\n * alternative token to the actual `MatPrefix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const MAT_PREFIX = new InjectionToken<MatPrefix>('MatPrefix');\n\n/** Prefix to be placed in front of the form field. */\n@Directive({\n selector: '[matPrefix]',\n providers: [{provide: MAT_PREFIX, useExisting: MatPrefix}],\n})\nexport class MatPrefix {}\n","/**\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 */\n\nimport {Directive, InjectionToken} from '@angular/core';\n\n/**\n * Injection token that can be used to reference instances of `MatSuffix`. It serves as\n * alternative token to the actual `MatSuffix` class which could cause unnecessary\n * retention of the class and its directive metadata.\n */\nexport const MAT_SUFFIX = new InjectionToken<MatSuffix>('MatSuffix');\n\n/** Suffix to be placed at the end of the form field. */\n@Directive({\n selector: '[matSuffix]',\n providers: [{provide: MAT_SUFFIX, useExisting: MatSuffix}],\n})\nexport class MatSuffix {}\n","/**\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 */\n\nimport {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {\n AfterContentChecked,\n AfterContentInit,\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n Optional,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n} from '@angular/core';\nimport {\n CanColor, CanColorCtor,\n mixinColor,\n} from '@angular/material/core';\nimport {fromEvent, merge, Subject} from 'rxjs';\nimport {startWith, take, takeUntil} from 'rxjs/operators';\nimport {MAT_ERROR, MatError} from './error';\nimport {matFormFieldAnimations} from './form-field-animations';\nimport {MatFormFieldControl} from './form-field-control';\nimport {\n getMatFormFieldDuplicatedHintError,\n getMatFormFieldMissingControlError,\n getMatFormFieldPlaceholderConflictError,\n} from './form-field-errors';\nimport {_MAT_HINT, MatHint} from './hint';\nimport {MatLabel} from './label';\nimport {MatPlaceholder} from './placeholder';\nimport {MAT_PREFIX, MatPrefix} from './prefix';\nimport {MAT_SUFFIX, MatSuffix} from './suffix';\nimport {Platform} from '@angular/cdk/platform';\nimport {NgControl} from '@angular/forms';\nimport {ANIMATION_MODULE_TYPE} from '@angular/platform-browser/animations';\n\n\nlet nextUniqueId = 0;\nconst floatingLabelScale = 0.75;\nconst outlineGapPadding = 5;\n\n\n/**\n * Boilerplate for applying mixins to MatFormField.\n * @docs-private\n */\nclass MatFormFieldBase {\n constructor(public _elementRef: ElementRef) { }\n}\n\n/**\n * Base class to which we're applying the form field mixins.\n * @docs-private\n */\nconst _MatFormFieldMixinBase: CanColorCtor & typeof MatFormFieldBase =\n mixinColor(MatFormFieldBase, 'primary');\n\n/** Possible appearance styles for the form field. */\nexport type MatFormFieldAppearance = 'legacy' | 'standard' | 'fill' | 'outline';\n\n/** Possible values for the \"floatLabel\" form-field input. */\nexport type FloatLabelType = 'always' | 'never' | 'auto';\n\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/**\n * Injection token that can be used to configure the\n * default options for all form field within an app.\n */\nexport const MAT_FORM_FIELD_DEFAULT_OPTIONS =\n new InjectionToken<MatFormFieldDefaultOptions>('MAT_FORM_FIELD_DEFAULT_OPTIONS');\n\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 const MAT_FORM_FIELD = new InjectionToken<MatFormField>('MatFormField');\n\n/** Container for form controls that applies Material Design styling and behavior. */\n@Component({\n selector: 'mat-form-field',\n exportAs: 'matFormField',\n templateUrl: 'form-field.html',\n // MatInput is a directive and can't have styles, so we need to include its styles here\n // in form-field-input.css. The MatInput styles are fairly minimal so it shouldn't be a\n // big deal for people who aren't using MatInput.\n styleUrls: [\n 'form-field.css',\n 'form-field-fill.css',\n 'form-field-input.css',\n 'form-field-legacy.css',\n 'form-field-outline.css',\n 'form-field-standard.css',\n ],\n animations: [matFormFieldAnimations.transitionMessages],\n host: {\n 'class': 'mat-form-field',\n '[class.mat-form-field-appearance-standard]': 'appearance == \"standard\"',\n '[class.mat-form-field-appearance-fill]': 'appearance == \"fill\"',\n '[class.mat-form-field-appearance-outline]': 'appearance == \"outline\"',\n '[class.mat-form-field-appearance-legacy]': 'appearance == \"legacy\"',\n '[class.mat-form-field-invalid]': '_control.errorState',\n '[class.mat-form-field-can-float]': '_canLabelFloat()',\n '[class.mat-form-field-should-float]': '_shouldLabelFloat()',\n '[class.mat-form-field-has-label]': '_hasFloatingLabel()',\n '[class.mat-form-field-hide-placeholder]': '_hideControlPlaceholder()',\n '[class.mat-form-field-disabled]': '_control.disabled',\n '[class.mat-form-field-autofilled]': '_control.autofilled',\n '[class.mat-focused]': '_control.focused',\n '[class.ng-untouched]': '_shouldForward(\"untouched\")',\n '[class.ng-touched]': '_shouldForward(\"touched\")',\n '[class.ng-pristine]': '_shouldForward(\"pristine\")',\n '[class.ng-dirty]': '_shouldForward(\"dirty\")',\n '[class.ng-valid]': '_shouldForward(\"valid\")',\n '[class.ng-invalid]': '_shouldForward(\"invalid\")',\n '[class.ng-pending]': '_shouldForward(\"pending\")',\n '[class._mat-animation-noopable]': '!_animationsEnabled',\n },\n inputs: ['color'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {provide: MAT_FORM_FIELD, useExisting: MatFormField},\n ]\n})\n\nexport class MatFormField extends _MatFormFieldMixinBase\n implements AfterContentInit, AfterContentChecked, AfterViewInit, OnDestroy, CanColor {\n\n /**\n * Whether the outline gap needs to be calculated\n * immediately on the next change detection run.\n */\n private _outlineGapCalculationNeededImmediately = false;\n\n /** Whether the outline gap needs to be calculated next time the zone has stabilized. */\n private _outlineGapCalculationNeededOnStable = false;\n\n private _destroyed = new Subject<void>();\n\n /** The form-field appearance style. */\n @Input()\n get appearance(): MatFormFieldAppearance { return this._appearance; }\n set appearance(value: MatFormFieldAppearance) {\n const oldValue = this._appearance;\n\n this._appearance = value || (this._defaults && this._defaults.appearance) || 'legacy';\n\n if (this._appearance === 'outline' && oldValue !== value) {\n this._outlineGapCalculationNeededOnStable = true;\n }\n }\n _appearance: MatFormFieldAppearance;\n\n /** Whether the required marker should be hidden. */\n @Input()\n get hideRequiredMarker(): boolean { return this._hideRequiredMarker; }\n set hideRequiredMarker(value: boolean) {\n this._hideRequiredMarker = coerceBooleanProperty(value);\n }\n private _hideRequiredMarker: boolean;\n\n /** Override for the logic that disables the label animation in certain cases. */\n private _showAlwaysAnimate = false;\n\n /** Whether the floating label should always float or not. */\n _shouldAlwaysFloat(): boolean {\n return this.floatLabel === 'always' && !this._showAlwaysAnimate;\n }\n\n /** Whether the label can float or not. */\n _canLabelFloat(): boolean { return this.floatLabel !== 'never'; }\n\n /** State of the mat-hint and mat-error animations. */\n _subscriptAnimationState: string = '';\n\n /** Text for the form field hint. */\n @Input()\n get hintLabel(): string { return this._hintLabel; }\n set hintLabel(value: string) {\n this._hintLabel = value;\n this._processHints();\n }\n private _hintLabel = '';\n\n // Unique id for the hint label.\n readonly _hintLabelId: string = `mat-hint-${nextUniqueId++}`;\n\n // Unique id for the label element.\n readonly _labelId = `mat-form-field-label-${nextUniqueId++}`;\n\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 @Input()\n get floatLabel(): FloatLabelType {\n return this.appearance !== 'legacy' && this._floatLabel === 'never' ? 'auto' : this._floatLabel;\n }\n set floatLabel(value: FloatLabelType) {\n if (value !== this._floatLabel) {\n this._floatLabel = value || this._getDefaultFloatLabelState();\n this._changeDetectorRef.markForCheck();\n }\n }\n private _floatLabel: FloatLabelType;\n\n /** Whether the Angular animations are enabled. */\n _animationsEnabled: boolean;\n\n /**\n * @deprecated\n * @breaking-change 8.0.0\n */\n @ViewChild('underline') underlineRef: ElementRef;\n\n @ViewChild('connectionContainer', {static: true}) _connectionContainerRef: ElementRef;\n @ViewChild('inputContainer') _inputContainerRef: ElementRef;\n @ViewChild('label') private _label: ElementRef<HTMLElement>;\n\n @ContentChild(MatFormFieldControl) _controlNonStatic: MatFormFieldControl<any>;\n @ContentChild(MatFormFieldControl, {static: true}) _controlStatic: MatFormFieldControl<any>;\n get _control() {\n // TODO(crisbeto): we need this workaround in order to support both Ivy and ViewEngine.\n // We should clean this up once Ivy is the default renderer.\n return this._explicitFormFieldControl || this._controlNonStatic || this._controlStatic;\n }\n set _control(value) {\n this._explicitFormFieldControl = value;\n }\n private _explicitFormFieldControl: MatFormFieldControl<any>;\n\n @ContentChild(MatLabel) _labelChildNonStatic: MatLabel;\n @ContentChild(MatLabel, {static: true}) _labelChildStatic: MatLabel;\n @ContentChild(MatPlaceholder) _placeholderChild: MatPlaceholder;\n\n @ContentChildren(MAT_ERROR, {descendants: true}) _errorChildren: QueryList<MatError>;\n @ContentChildren(_MAT_HINT, {descendants: true}) _hintChildren: QueryList<MatHint>;\n @ContentChildren(MAT_PREFIX, {descendants: true}) _prefixChildren: QueryList<MatPrefix>;\n @ContentChildren(MAT_SUFFIX, {descendants: true}) _suffixChildren: QueryList<MatSuffix>;\n\n constructor(\n public _elementRef: ElementRef, private _changeDetectorRef: ChangeDetectorRef,\n /**\n * @deprecated `_labelOptions` parameter no longer being used. To be removed.\n * @breaking-change 12.0.0\n */\n @Inject(ElementRef)\n // Use `ElementRef` here so Angular has something to inject.\n _labelOptions: any,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(MAT_FORM_FIELD_DEFAULT_OPTIONS) private _defaults:\n MatFormFieldDefaultOptions, private _platform: Platform, private _ngZone: NgZone,\n @Optional() @Inject(ANIMATION_MODULE_TYPE) _animationMode: string) {\n super(_elementRef);\n\n this.floatLabel = this._getDefaultFloatLabelState();\n this._animationsEnabled = _animationMode !== 'NoopAnimations';\n\n // Set the default through here so we invoke the setter on the first run.\n this.appearance = (_defaults && _defaults.appearance) ? _defaults.appearance : 'legacy';\n this._hideRequiredMarker = (_defaults && _defaults.hideRequiredMarker != null) ?\n _defaults.hideRequiredMarker : false;\n }\n\n /**\n * Gets the id of the label element. If no label is present, returns `null`.\n */\n getLabelId(): string|null {\n return this._hasFloatingLabel() ? this._labelId : null;\n }\n\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 return this._connectionContainerRef || this._elementRef;\n }\n\n ngAfterContentInit() {\n this._validateControlChild();\n\n const control = this._control;\n\n if (control.controlType) {\n this._elementRef.nativeElement.classList.add(`mat-form-field-type-${control.controlType}`);\n }\n\n // Subscribe to changes in the child control state in order to update the form field UI.\n control.stateChanges.pipe(startWith(null)).subscribe(() => {\n this._validatePlaceholders();\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n\n // Run change detection if the value changes.\n if (control.ngControl && control.ngControl.valueChanges) {\n control.ngControl.valueChanges\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._changeDetectorRef.markForCheck());\n }\n\n // Note that we have to run outside of the `NgZone` explicitly,\n // in order to avoid throwing users into an infinite loop\n // if `zone-patch-rxjs` is included.\n this._ngZone.runOutsideAngular(() => {\n this._ngZone.onStable.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (this._outlineGapCalculationNeededOnStable) {\n this.updateOutlineGap();\n }\n });\n });\n\n // Run change detection and update the outline if the suffix or prefix changes.\n merge(this._prefixChildren.changes, this._suffixChildren.changes).subscribe(() => {\n this._outlineGapCalculationNeededOnStable = true;\n this._changeDetectorRef.markForCheck();\n });\n\n // Re-validate when the number of hints changes.\n this._hintChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._processHints();\n this._changeDetectorRef.markForCheck();\n });\n\n // Update the aria-described by when the number of errors changes.\n this._errorChildren.changes.pipe(startWith(null)).subscribe(() => {\n this._syncDescribedByIds();\n this._changeDetectorRef.markForCheck();\n });\n\n if (this._dir) {\n this._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n if (typeof requestAnimationFrame === 'function') {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => this.updateOutlineGap());\n });\n } else {\n this.updateOutlineGap();\n }\n });\n }\n }\n\n ngAfterContentChecked() {\n this._validateControlChild();\n if (this._outlineGapCalculationNeededImmediately) {\n this.updateOutlineGap();\n }\n }\n\n ngAfterViewInit() {\n // Avoid animations on load.\n this._subscriptAnimationState = 'enter';\n this._changeDetectorRef.detectChanges();\n }\n\n ngOnDestroy() {\n this._destroyed.next();\n this._destroyed.complete();\n }\n\n /** Determines whether a class from the NgControl should be forwarded to the host element. */\n _shouldForward(prop: keyof NgControl): boolean {\n const ngControl = this._control ? this._control.ngControl : null;\n return ngControl && ngControl[prop];\n }\n\n _hasPlaceholder() {\n return !!(this._control && this._control.placeholder || this._placeholderChild);\n }\n\n _hasLabel() {\n return !!(this._labelChildNonStatic || this._labelChildStatic);\n }\n\n _shouldLabelFloat() {\n return this._canLabelFloat() &&\n ((this._control && this._control.shouldLabelFloat) || this._shouldAlwaysFloat());\n }\n\n _hideControlPlaceholder() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return this.appearance === 'legacy' && !this._hasLabel() ||\n this._hasLabel() && !this._shouldLabelFloat();\n }\n\n _hasFloatingLabel() {\n // In the legacy appearance the placeholder is promoted to a label if no label is given.\n return this._hasLabel() || this.appearance === 'legacy' && this._hasPlaceholder();\n }\n\n /** Determines whether to display hints or errors. */\n _getDisplayedMessages(): 'error' | 'hint' {\n return (this._errorChildren && this._errorChildren.length > 0 &&\n this._control.errorState) ? 'error' : 'hint';\n }\n\n /** Animates the placeholder up and locks it in position. */\n _animateAndLockLabel(): void {\n if (this._hasFloatingLabel() && this._canLabelFloat()) {\n // If animations are disabled, we shouldn't go in here,\n // because the `transitionend` will never fire.\n if (this._animationsEnabled && this._label) {\n this._showAlwaysAnimate = true;\n\n fromEvent(this._label.nativeElement, 'transitionend').pipe(take(1)).subscribe(() => {\n this._showAlwaysAnimate = false;\n });\n }\n\n this.floatLabel = 'always';\n this._changeDetectorRef.markForCheck();\n }\n }\n\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 if (this._control.placeholder && this._placeholderChild &&\n (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldPlaceholderConflictError();\n }\n }\n\n /** Does any extra processing that is required when handling the hints. */\n private _processHints() {\n this._validateHints();\n this._syncDescribedByIds();\n }\n\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 if (this._hintChildren && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n let startHint: MatHint;\n let endHint: MatHint;\n this._hintChildren.forEach((hint: MatHint) => {\n if (hint.align === 'start') {\n if (startHint || this.hintLabel) {\n throw getMatFormFieldDuplicatedHintError('start');\n }\n startHint = hint;\n } else if (hint.align === 'end') {\n if (endHint) {\n throw getMatFormFieldDuplicatedHintError('end');\n }\n endHint = hint;\n }\n });\n }\n }\n\n /** Gets the default float label state. */\n private _getDefaultFloatLabelState(): FloatLabelType {\n return (this._defaults && this._defaults.floatLabel) || 'auto';\n }\n\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 if (this._control) {\n let ids: string[] = [];\n\n // TODO(wagnermaciel): Remove the type check when we find the root cause of this bug.\n if (this._control.userAriaDescribedBy &&\n typeof this._control.userAriaDescribedBy === 'string') {\n ids.push(...this._control.userAriaDescribedBy.split(' '));\n }\n\n if (this._getDisplayedMessages() === 'hint') {\n const startHint = this._hintChildren ?\n this._hintChildren.find(hint => hint.align === 'start') : null;\n const endHint = this._hintChildren ?\n this._hintChildren.find(hint => hint.align === 'end') : null;\n\n if (startHint) {\n ids.push(startHint.id);\n } else if (this._hintLabel) {\n ids.push(this._hintLabelId);\n }\n\n if (endHint) {\n ids.push(endHint.id);\n }\n } else if (this._errorChildren) {\n ids.push(...this._errorChildren.map(error => error.id));\n }\n\n this._control.setDescribedByIds(ids);\n }\n }\n\n /** Throws an error if the form field's control is missing. */\n protected _validateControlChild() {\n if (!this._control && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatFormFieldMissingControlError();\n }\n }\n\n /**\n * Updates the width and position of the gap in the outline. Only relevant for the outline\n * appearance.\n */\n updateOutlineGap() {\n const labelEl = this._label ? this._label.nativeElement : null;\n\n if (this.appearance !== 'outline' || !labelEl || !labelEl.children.length ||\n !labelEl.textContent!.trim()) {\n return;\n }\n\n if (!this._platform.isBrowser) {\n // getBoundingClientRect isn't available on the server.\n return;\n }\n // If the element is not present in the DOM, the outline gap will need to be calculated\n // the next time it is checked and in the DOM.\n if (!this._isAttachedToDOM()) {\n this._outlineGapCalculationNeededImmediately = true;\n return;\n }\n\n let startWidth = 0;\n let gapWidth = 0;\n\n const container = this._connectionContainerRef.nativeElement;\n const startEls = container.querySelectorAll('.mat-form-field-outline-start');\n const gapEls = container.querySelectorAll('.mat-form-field-outline-gap');\n\n if (this._label && this._label.nativeElement.children.length) {\n const containerRect = container.getBoundingClientRect();\n\n // If the container's width and height are zero, it means that the element is\n // invisible and we can't calculate the outline gap. Mark the element as needing\n // to be checked the next time the zone stabilizes. We can't do this immediately\n // on the next change detection, because even if the element becomes visible,\n // the `ClientRect` won't be reclaculated immediately. We reset the\n // `_outlineGapCalculationNeededImmediately` flag some we don't run the checks twice.\n if (containerRect.width === 0 && containerRect.height === 0) {\n this._outlineGapCalculationNeededOnStable = true;\n this._outlineGapCalculationNeededImmediately = false;\n return;\n }\n\n const containerStart = this._getStartEnd(containerRect);\n const labelChildren = labelEl.children;\n const labelStart = this._getStartEnd(labelChildren[0].getBoundingClientRect());\n let labelWidth = 0;\n\n for (let i = 0; i < labelChildren.length; i++) {\n labelWidth += (labelChildren[i] as HTMLElement).offsetWidth;\n }\n startWidth = Math.abs(labelStart - containerStart) - outlineGapPadding;\n gapWidth = labelWidth > 0 ? labelWidth * floatingLabelScale + outlineGapPadding * 2 : 0;\n }\n\n for (let i = 0; i < startEls.length; i++) {\n startEls[i].style.width = `${startWidth}px`;\n }\n for (let i = 0; i < gapEls.length; i++) {\n gapEls[i].style.width = `${gapWidth}px`;\n }\n\n this._outlineGapCalculationNeededOnStable =\n this._outlineGapCalculationNeededImmediately = false;\n }\n\n /** Gets the start end of the rect considering the current directionality. */\n private _getStartEnd(rect: ClientRect): number {\n return (this._dir && this._dir.value === 'rtl') ? rect.right : rect.left;\n }\n\n /** Checks whether the form field is attached to the DOM. */\n private _isAttachedToDOM(): boolean {\n const element: HTMLElement = this._elementRef.nativeElement;\n\n if (element.getRootNode) {\n const rootNode = element.getRootNode();\n // If the element is inside the DOM the root node will be either the document\n // or the closest shadow root, otherwise it'll be the element itself.\n return rootNode && rootNode !== element;\n }\n\n // Otherwise fall back to checking if it's in the document. This doesn't account for\n // shadow DOM, however browser that support shadow DOM should support `getRootNode` as well.\n return document.documentElement!.contains(element);\n }\n\n static ngAcceptInputType_hideRequiredMarker: BooleanInput;\n}\n","/**\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 */\n\nimport {ObserversModule} from '@angular/cdk/observers';\nimport {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {MatCommonModule} from '@angular/material/core';\nimport {MatError} from './error';\nimport {MatFormField} from './form-field';\nimport {MatHint} from './hint';\nimport {MatLabel} from './label';\nimport {MatPlaceholder} from './placeholder';\nimport {MatPrefix} from './prefix';\nimport {MatSuffix} from './suffix';\n\n@NgModule({\n declarations: [\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix,\n ],\n imports: [\n CommonModule,\n MatCommonModule,\n ObserversModule,\n ],\n exports: [\n MatCommonModule,\n MatError,\n MatFormField,\n MatHint,\n MatLabel,\n MatPlaceholder,\n MatPrefix,\n MatSuffix,\n ],\n})\nexport class MatFormFieldModule {}\n","/**\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 */\n\nexport * from './form-field-module';\nexport * from './error';\nexport * from './form-field';\nexport {MatFormFieldControl} from './form-field-control';\nexport * from './form-field-errors';\nexport * from './hint';\nexport * from './placeholder';\nexport * from './prefix';\nexport * from './suffix';\nexport * from './label';\nexport * from './form-field-animations';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["nextUniqueId"],"mappings":";;;;;;;;;;;;AAAA;;;;;;;AAQA,A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