UNPKG

@angular/material

Version:
716 lines 108 kB
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { ChangeDetectorRef, Directive, ElementRef, forwardRef, Host, Inject, InjectionToken, Input, NgZone, Optional, ViewContainerRef, } from '@angular/core'; import { DOCUMENT } from '@angular/common'; import { coerceBooleanProperty } from '@angular/cdk/coercion'; import { DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey } from '@angular/cdk/keycodes'; import { _getEventTarget } from '@angular/cdk/platform'; import { TemplatePortal } from '@angular/cdk/portal'; import { ViewportRuler } from '@angular/cdk/scrolling'; import { Overlay, OverlayConfig, } from '@angular/cdk/overlay'; import { NG_VALUE_ACCESSOR } from '@angular/forms'; import { MatOptionSelectionChange, _countGroupLabelsBeforeOption, _getOptionScrollPosition, } from '@angular/material/core'; import { MAT_FORM_FIELD } from '@angular/material/form-field'; import { defer, fromEvent, merge, of as observableOf, Subject, Subscription } from 'rxjs'; import { delay, filter, map, switchMap, take, tap, startWith } from 'rxjs/operators'; import { _MatAutocompleteOriginBase } from './autocomplete-origin'; import { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, _MatAutocompleteBase, } from './autocomplete'; import * as i0 from "@angular/core"; import * as i1 from "@angular/cdk/overlay"; import * as i2 from "@angular/cdk/bidi"; import * as i3 from "@angular/cdk/scrolling"; import * as i4 from "@angular/material/form-field"; /** * Provider that allows the autocomplete to register as a ControlValueAccessor. * @docs-private */ export const MAT_AUTOCOMPLETE_VALUE_ACCESSOR = { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MatAutocompleteTrigger), multi: true, }; /** * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel. * @docs-private */ export function getMatAutocompleteMissingPanelError() { return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' + 'Make sure that the id passed to the `matAutocomplete` is correct and that ' + "you're attempting to open it after the ngAfterContentInit hook."); } /** Injection token that determines the scroll handling while the autocomplete panel is open. */ export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY = new InjectionToken('mat-autocomplete-scroll-strategy'); /** @docs-private */ export function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay) { return () => overlay.scrollStrategies.reposition(); } /** @docs-private */ export const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = { provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY, deps: [Overlay], useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, }; /** Base class with all of the `MatAutocompleteTrigger` functionality. */ export class _MatAutocompleteTriggerBase { /** * Whether the autocomplete is disabled. When disabled, the element will * act as a regular input and the user won't be able to open the panel. */ get autocompleteDisabled() { return this._autocompleteDisabled; } set autocompleteDisabled(value) { this._autocompleteDisabled = coerceBooleanProperty(value); } constructor(_element, _overlay, _viewContainerRef, _zone, _changeDetectorRef, scrollStrategy, _dir, _formField, _document, _viewportRuler, _defaults) { this._element = _element; this._overlay = _overlay; this._viewContainerRef = _viewContainerRef; this._zone = _zone; this._changeDetectorRef = _changeDetectorRef; this._dir = _dir; this._formField = _formField; this._document = _document; this._viewportRuler = _viewportRuler; this._defaults = _defaults; this._componentDestroyed = false; this._autocompleteDisabled = false; /** Whether or not the label state is being overridden. */ this._manuallyFloatingLabel = false; /** Subscription to viewport size changes. */ this._viewportSubscription = Subscription.EMPTY; /** * Whether the autocomplete can open the next time it is focused. Used to prevent a focused, * closed autocomplete from being reopened if the user switches to another browser tab and then * comes back. */ this._canOpenOnNextFocus = true; /** Stream of keyboard events that can close the panel. */ this._closeKeyEventStream = new Subject(); /** * Event handler for when the window is blurred. Needs to be an * arrow function in order to preserve the context. */ this._windowBlurHandler = () => { // If the user blurred the window while the autocomplete is focused, it means that it'll be // refocused when they come back. In this case we want to skip the first focus event, if the // pane was closed, in order to avoid reopening it unintentionally. this._canOpenOnNextFocus = this._document.activeElement !== this._element.nativeElement || this.panelOpen; }; /** `View -> model callback called when value changes` */ this._onChange = () => { }; /** `View -> model callback called when autocomplete has been touched` */ this._onTouched = () => { }; /** * Position of the autocomplete panel relative to the trigger element. A position of `auto` * will render the panel underneath the trigger if there is enough space for it to fit in * the viewport, otherwise the panel will be shown above it. If the position is set to * `above` or `below`, the panel will always be shown above or below the trigger. no matter * whether it fits completely in the viewport. */ this.position = 'auto'; /** * `autocomplete` attribute to be set on the input element. * @docs-private */ this.autocompleteAttribute = 'off'; this._overlayAttached = false; /** Stream of changes to the selection state of the autocomplete options. */ this.optionSelections = defer(() => { const options = this.autocomplete ? this.autocomplete.options : null; if (options) { return options.changes.pipe(startWith(options), switchMap(() => merge(...options.map(option => option.onSelectionChange)))); } // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined. // Return a stream that we'll replace with the real one once everything is in place. return this._zone.onStable.pipe(take(1), switchMap(() => this.optionSelections)); }); this._scrollStrategy = scrollStrategy; } ngAfterViewInit() { const window = this._getWindow(); if (typeof window !== 'undefined') { this._zone.runOutsideAngular(() => window.addEventListener('blur', this._windowBlurHandler)); } } ngOnChanges(changes) { if (changes['position'] && this._positionStrategy) { this._setStrategyPositions(this._positionStrategy); if (this.panelOpen) { this._overlayRef.updatePosition(); } } } ngOnDestroy() { const window = this._getWindow(); if (typeof window !== 'undefined') { window.removeEventListener('blur', this._windowBlurHandler); } this._viewportSubscription.unsubscribe(); this._componentDestroyed = true; this._destroyPanel(); this._closeKeyEventStream.complete(); } /** Whether or not the autocomplete panel is open. */ get panelOpen() { return this._overlayAttached && this.autocomplete.showPanel; } /** Opens the autocomplete suggestion panel. */ openPanel() { this._attachOverlay(); this._floatLabel(); } /** Closes the autocomplete suggestion panel. */ closePanel() { this._resetLabel(); if (!this._overlayAttached) { return; } if (this.panelOpen) { // Only emit if the panel was visible. // The `NgZone.onStable` always emits outside of the Angular zone, // so all the subscriptions from `_subscribeToClosingActions()` are also outside of the Angular zone. // We should manually run in Angular zone to update UI after panel closing. this._zone.run(() => { this.autocomplete.closed.emit(); }); } this.autocomplete._isOpen = this._overlayAttached = false; this._pendingAutoselectedOption = null; if (this._overlayRef && this._overlayRef.hasAttached()) { this._overlayRef.detach(); this._closingActionsSubscription.unsubscribe(); } // Note that in some cases this can end up being called after the component is destroyed. // Add a check to ensure that we don't try to run change detection on a destroyed view. if (!this._componentDestroyed) { // We need to trigger change detection manually, because // `fromEvent` doesn't seem to do it at the proper time. // This ensures that the label is reset when the // user clicks outside. this._changeDetectorRef.detectChanges(); } } /** * Updates the position of the autocomplete suggestion panel to ensure that it fits all options * within the viewport. */ updatePosition() { if (this._overlayAttached) { this._overlayRef.updatePosition(); } } /** * A stream of actions that should close the autocomplete panel, including * when an option is selected, on blur, and when TAB is pressed. */ get panelClosingActions() { return merge(this.optionSelections, this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)), this._closeKeyEventStream, this._getOutsideClickStream(), this._overlayRef ? this._overlayRef.detachments().pipe(filter(() => this._overlayAttached)) : observableOf()).pipe( // Normalize the output so we return a consistent type. map(event => (event instanceof MatOptionSelectionChange ? event : null))); } /** The currently active option, coerced to MatOption type. */ get activeOption() { if (this.autocomplete && this.autocomplete._keyManager) { return this.autocomplete._keyManager.activeItem; } return null; } /** Stream of clicks outside of the autocomplete panel. */ _getOutsideClickStream() { return merge(fromEvent(this._document, 'click'), fromEvent(this._document, 'auxclick'), fromEvent(this._document, 'touchend')).pipe(filter(event => { // If we're in the Shadow DOM, the event target will be the shadow root, so we have to // fall back to check the first element in the path of the click event. const clickTarget = _getEventTarget(event); const formField = this._formField ? this._formField._elementRef.nativeElement : null; const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null; return (this._overlayAttached && clickTarget !== this._element.nativeElement && // Normally focus moves inside `mousedown` so this condition will almost always be // true. Its main purpose is to handle the case where the input is focused from an // outside click which propagates up to the `body` listener within the same sequence // and causes the panel to close immediately (see #3106). this._document.activeElement !== this._element.nativeElement && (!formField || !formField.contains(clickTarget)) && (!customOrigin || !customOrigin.contains(clickTarget)) && !!this._overlayRef && !this._overlayRef.overlayElement.contains(clickTarget)); })); } // Implemented as part of ControlValueAccessor. writeValue(value) { Promise.resolve(null).then(() => this._assignOptionValue(value)); } // Implemented as part of ControlValueAccessor. registerOnChange(fn) { this._onChange = fn; } // Implemented as part of ControlValueAccessor. registerOnTouched(fn) { this._onTouched = fn; } // Implemented as part of ControlValueAccessor. setDisabledState(isDisabled) { this._element.nativeElement.disabled = isDisabled; } _handleKeydown(event) { const keyCode = event.keyCode; const hasModifier = hasModifierKey(event); // Prevent the default action on all escape key presses. This is here primarily to bring IE // in line with other browsers. By default, pressing escape on IE will cause it to revert // the input value to the one that it had on focus, however it won't dispatch any events // which means that the model value will be out of sync with the view. if (keyCode === ESCAPE && !hasModifier) { event.preventDefault(); } if (this.activeOption && keyCode === ENTER && this.panelOpen && !hasModifier) { this.activeOption._selectViaInteraction(); this._resetActiveItem(); event.preventDefault(); } else if (this.autocomplete) { const prevActiveItem = this.autocomplete._keyManager.activeItem; const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW; if (keyCode === TAB || (isArrowKey && !hasModifier && this.panelOpen)) { this.autocomplete._keyManager.onKeydown(event); } else if (isArrowKey && this._canOpen()) { this.openPanel(); } if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) { this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0); if (this.autocomplete.autoSelectActiveOption && this.activeOption) { if (!this._pendingAutoselectedOption) { this._valueBeforeAutoSelection = this._element.nativeElement.value; } this._pendingAutoselectedOption = this.activeOption; this._assignOptionValue(this.activeOption.value); } } } } _handleInput(event) { let target = event.target; let value = target.value; // Based on `NumberValueAccessor` from forms. if (target.type === 'number') { value = value == '' ? null : parseFloat(value); } // If the input has a placeholder, IE will fire the `input` event on page load, // focus and blur, in addition to when the user actually changed the value. To // filter out all of the extra events, we save the value on focus and between // `input` events, and we check whether it changed. // See: https://connect.microsoft.com/IE/feedback/details/885747/ if (this._previousValue !== value) { this._previousValue = value; this._pendingAutoselectedOption = null; this._onChange(value); if (this._canOpen() && this._document.activeElement === event.target) { this.openPanel(); } } } _handleFocus() { if (!this._canOpenOnNextFocus) { this._canOpenOnNextFocus = true; } else if (this._canOpen()) { this._previousValue = this._element.nativeElement.value; this._attachOverlay(); this._floatLabel(true); } } _handleClick() { if (this._canOpen() && !this.panelOpen) { this.openPanel(); } } /** * In "auto" mode, the label will animate down as soon as focus is lost. * This causes the value to jump when selecting an option with the mouse. * This method manually floats the label until the panel can be closed. * @param shouldAnimate Whether the label should be animated when it is floated. */ _floatLabel(shouldAnimate = false) { if (this._formField && this._formField.floatLabel === 'auto') { if (shouldAnimate) { this._formField._animateAndLockLabel(); } else { this._formField.floatLabel = 'always'; } this._manuallyFloatingLabel = true; } } /** If the label has been manually elevated, return it to its normal state. */ _resetLabel() { if (this._manuallyFloatingLabel) { if (this._formField) { this._formField.floatLabel = 'auto'; } this._manuallyFloatingLabel = false; } } /** * This method listens to a stream of panel closing actions and resets the * stream every time the option list changes. */ _subscribeToClosingActions() { const firstStable = this._zone.onStable.pipe(take(1)); const optionChanges = this.autocomplete.options.changes.pipe(tap(() => this._positionStrategy.reapplyLastPosition()), // Defer emitting to the stream until the next tick, because changing // bindings in here will cause "changed after checked" errors. delay(0)); // When the zone is stable initially, and when the option list changes... return (merge(firstStable, optionChanges) .pipe( // create a new stream of panelClosingActions, replacing any previous streams // that were created, and flatten it so our stream only emits closing events... switchMap(() => { // The `NgZone.onStable` always emits outside of the Angular zone, thus we have to re-enter // the Angular zone. This will lead to change detection being called outside of the Angular // zone and the `autocomplete.opened` will also emit outside of the Angular. this._zone.run(() => { const wasOpen = this.panelOpen; this._resetActiveItem(); this.autocomplete._setVisibility(); this._changeDetectorRef.detectChanges(); if (this.panelOpen) { this._overlayRef.updatePosition(); } if (wasOpen !== this.panelOpen) { // If the `panelOpen` state changed, we need to make sure to emit the `opened` or // `closed` event, because we may not have emitted it. This can happen // - if the users opens the panel and there are no options, but the // options come in slightly later or as a result of the value changing, // - if the panel is closed after the user entered a string that did not match any // of the available options, // - if a valid string is entered after an invalid one. if (this.panelOpen) { this.autocomplete.opened.emit(); } else { this.autocomplete.closed.emit(); } } }); return this.panelClosingActions; }), // when the first closing event occurs... take(1)) // set the value, close the panel, and complete. .subscribe(event => this._setValueAndClose(event))); } /** Destroys the autocomplete suggestion panel. */ _destroyPanel() { if (this._overlayRef) { this.closePanel(); this._overlayRef.dispose(); this._overlayRef = null; } } _assignOptionValue(value) { const toDisplay = this.autocomplete && this.autocomplete.displayWith ? this.autocomplete.displayWith(value) : value; // Simply falling back to an empty string if the display value is falsy does not work properly. // The display value can also be the number zero and shouldn't fall back to an empty string. this._updateNativeInputValue(toDisplay != null ? toDisplay : ''); } _updateNativeInputValue(value) { // If it's used within a `MatFormField`, we should set it through the property so it can go // through change detection. if (this._formField) { this._formField._control.value = value; } else { this._element.nativeElement.value = value; } this._previousValue = value; } /** * This method closes the panel, and if a value is specified, also sets the associated * control to that value. It will also mark the control as dirty if this interaction * stemmed from the user. */ _setValueAndClose(event) { const toSelect = event ? event.source : this._pendingAutoselectedOption; if (toSelect) { this._clearPreviousSelectedOption(toSelect); this._assignOptionValue(toSelect.value); this._onChange(toSelect.value); this.autocomplete._emitSelectEvent(toSelect); this._element.nativeElement.focus(); } this.closePanel(); } /** * Clear any previous selected option and emit a selection change event for this option */ _clearPreviousSelectedOption(skip) { this.autocomplete.options.forEach(option => { if (option !== skip && option.selected) { option.deselect(); } }); } _attachOverlay() { if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) { throw getMatAutocompleteMissingPanelError(); } let overlayRef = this._overlayRef; if (!overlayRef) { this._portal = new TemplatePortal(this.autocomplete.template, this._viewContainerRef, { id: this._formField?.getLabelId(), }); overlayRef = this._overlay.create(this._getOverlayConfig()); this._overlayRef = overlayRef; this._handleOverlayEvents(overlayRef); this._viewportSubscription = this._viewportRuler.change().subscribe(() => { if (this.panelOpen && overlayRef) { overlayRef.updateSize({ width: this._getPanelWidth() }); } }); } else { // Update the trigger, panel width and direction, in case anything has changed. this._positionStrategy.setOrigin(this._getConnectedElement()); overlayRef.updateSize({ width: this._getPanelWidth() }); } if (overlayRef && !overlayRef.hasAttached()) { overlayRef.attach(this._portal); this._closingActionsSubscription = this._subscribeToClosingActions(); } const wasOpen = this.panelOpen; this.autocomplete._setVisibility(); this.autocomplete._isOpen = this._overlayAttached = true; this.autocomplete._setColor(this._formField?.color); // We need to do an extra `panelOpen` check in here, because the // autocomplete won't be shown if there are no options. if (this.panelOpen && wasOpen !== this.panelOpen) { this.autocomplete.opened.emit(); } } _getOverlayConfig() { return new OverlayConfig({ positionStrategy: this._getOverlayPosition(), scrollStrategy: this._scrollStrategy(), width: this._getPanelWidth(), direction: this._dir ?? undefined, panelClass: this._defaults?.overlayPanelClass, }); } _getOverlayPosition() { const strategy = this._overlay .position() .flexibleConnectedTo(this._getConnectedElement()) .withFlexibleDimensions(false) .withPush(false); this._setStrategyPositions(strategy); this._positionStrategy = strategy; return strategy; } /** Sets the positions on a position strategy based on the directive's input state. */ _setStrategyPositions(positionStrategy) { // Note that we provide horizontal fallback positions, even though by default the dropdown // width matches the input, because consumers can override the width. See #18854. const belowPositions = [ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' }, { originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top' }, ]; // The overlay edge connected to the trigger should have squared corners, while // the opposite end has rounded corners. We apply a CSS class to swap the // border-radius based on the overlay position. const panelClass = this._aboveClass; const abovePositions = [ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass }, { originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass }, ]; let positions; if (this.position === 'above') { positions = abovePositions; } else if (this.position === 'below') { positions = belowPositions; } else { positions = [...belowPositions, ...abovePositions]; } positionStrategy.withPositions(positions); } _getConnectedElement() { if (this.connectedTo) { return this.connectedTo.elementRef; } return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element; } _getPanelWidth() { return this.autocomplete.panelWidth || this._getHostWidth(); } /** Returns the width of the input element, so the panel width can match it. */ _getHostWidth() { return this._getConnectedElement().nativeElement.getBoundingClientRect().width; } /** * Resets the active item to -1 so arrow events will activate the * correct options, or to 0 if the consumer opted into it. */ _resetActiveItem() { const autocomplete = this.autocomplete; if (autocomplete.autoActiveFirstOption) { // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because // the former will find the next enabled option, if the first one is disabled. autocomplete._keyManager.setFirstItemActive(); } else { autocomplete._keyManager.setActiveItem(-1); } } /** Determines whether the panel can be opened. */ _canOpen() { const element = this._element.nativeElement; return !element.readOnly && !element.disabled && !this._autocompleteDisabled; } /** Use defaultView of injected document if available or fallback to global window reference */ _getWindow() { return this._document?.defaultView || window; } /** Scrolls to a particular option in the list. */ _scrollToOption(index) { // Given that we are not actually focusing active options, we must manually adjust scroll // to reveal options below the fold. First, we find the offset of the option from the top // of the panel. If that offset is below the fold, the new scrollTop will be the offset - // the panel height + the option height, so the active option will be just visible at the // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop // will become the offset. If that offset is visible within the panel already, the scrollTop is // not adjusted. const autocomplete = this.autocomplete; const labelCount = _countGroupLabelsBeforeOption(index, autocomplete.options, autocomplete.optionGroups); if (index === 0 && labelCount === 1) { // If we've got one group label before the option and we're at the top option, // scroll the list to the top. This is better UX than scrolling the list to the // top of the option, because it allows the user to read the top group's label. autocomplete._setScrollTop(0); } else if (autocomplete.panel) { const option = autocomplete.options.toArray()[index]; if (option) { const element = option._getHostElement(); const newScrollPosition = _getOptionScrollPosition(element.offsetTop, element.offsetHeight, autocomplete._getScrollTop(), autocomplete.panel.nativeElement.offsetHeight); autocomplete._setScrollTop(newScrollPosition); } } } /** Handles keyboard events coming from the overlay panel. */ _handleOverlayEvents(overlayRef) { // Use the `keydownEvents` in order to take advantage of // the overlay event targeting provided by the CDK overlay. overlayRef.keydownEvents().subscribe(event => { // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines. // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction if ((event.keyCode === ESCAPE && !hasModifierKey(event)) || (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) { // If the user had typed something in before we autoselected an option, and they decided // to cancel the selection, restore the input value to the one they had typed in. if (this._pendingAutoselectedOption) { this._updateNativeInputValue(this._valueBeforeAutoSelection ?? ''); this._pendingAutoselectedOption = null; } this._closeKeyEventStream.next(); this._resetActiveItem(); // We need to stop propagation, otherwise the event will eventually // reach the input itself and cause the overlay to be reopened. event.stopPropagation(); event.preventDefault(); } }); // Subscribe to the pointer events stream so that it doesn't get picked up by other overlays. // TODO(crisbeto): we should switch `_getOutsideClickStream` eventually to use this stream, // but the behvior isn't exactly the same and it ends up breaking some internal tests. overlayRef.outsidePointerEvents().subscribe(); } } _MatAutocompleteTriggerBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: _MatAutocompleteTriggerBase, deps: [{ token: i0.ElementRef }, { token: i1.Overlay }, { token: i0.ViewContainerRef }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: MAT_AUTOCOMPLETE_SCROLL_STRATEGY }, { token: i2.Directionality, optional: true }, { token: MAT_FORM_FIELD, host: true, optional: true }, { token: DOCUMENT, optional: true }, { token: i3.ViewportRuler }, { token: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); _MatAutocompleteTriggerBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0-rc.0", type: _MatAutocompleteTriggerBase, inputs: { autocomplete: ["matAutocomplete", "autocomplete"], position: ["matAutocompletePosition", "position"], connectedTo: ["matAutocompleteConnectedTo", "connectedTo"], autocompleteAttribute: ["autocomplete", "autocompleteAttribute"], autocompleteDisabled: ["matAutocompleteDisabled", "autocompleteDisabled"] }, usesOnChanges: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: _MatAutocompleteTriggerBase, decorators: [{ type: Directive }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.Overlay }, { type: i0.ViewContainerRef }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: undefined, decorators: [{ type: Inject, args: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY] }] }, { type: i2.Directionality, decorators: [{ type: Optional }] }, { type: i4.MatFormField, decorators: [{ type: Optional }, { type: Inject, args: [MAT_FORM_FIELD] }, { type: Host }] }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [DOCUMENT] }] }, { type: i3.ViewportRuler }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [MAT_AUTOCOMPLETE_DEFAULT_OPTIONS] }] }]; }, propDecorators: { autocomplete: [{ type: Input, args: ['matAutocomplete'] }], position: [{ type: Input, args: ['matAutocompletePosition'] }], connectedTo: [{ type: Input, args: ['matAutocompleteConnectedTo'] }], autocompleteAttribute: [{ type: Input, args: ['autocomplete'] }], autocompleteDisabled: [{ type: Input, args: ['matAutocompleteDisabled'] }] } }); export class MatAutocompleteTrigger extends _MatAutocompleteTriggerBase { constructor() { super(...arguments); this._aboveClass = 'mat-mdc-autocomplete-panel-above'; } } MatAutocompleteTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive }); MatAutocompleteTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0-rc.0", type: MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", host: { listeners: { "focusin": "_handleFocus()", "blur": "_onTouched()", "input": "_handleInput($event)", "keydown": "_handleKeydown($event)", "click": "_handleClick()" }, properties: { "attr.autocomplete": "autocompleteAttribute", "attr.role": "autocompleteDisabled ? null : \"combobox\"", "attr.aria-autocomplete": "autocompleteDisabled ? null : \"list\"", "attr.aria-activedescendant": "(panelOpen && activeOption) ? activeOption.id : null", "attr.aria-expanded": "autocompleteDisabled ? null : panelOpen.toString()", "attr.aria-owns": "(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id", "attr.aria-haspopup": "autocompleteDisabled ? null : \"listbox\"" }, classAttribute: "mat-mdc-autocomplete-trigger" }, providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesInheritance: true, ngImport: i0 }); i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatAutocompleteTrigger, decorators: [{ type: Directive, args: [{ selector: `input[matAutocomplete], textarea[matAutocomplete]`, host: { 'class': 'mat-mdc-autocomplete-trigger', '[attr.autocomplete]': 'autocompleteAttribute', '[attr.role]': 'autocompleteDisabled ? null : "combobox"', '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : "list"', '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null', '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()', '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id', '[attr.aria-haspopup]': 'autocompleteDisabled ? null : "listbox"', // Note: we use `focusin`, as opposed to `focus`, in order to open the panel // a little earlier. This avoids issues where IE delays the focusing of the input. '(focusin)': '_handleFocus()', '(blur)': '_onTouched()', '(input)': '_handleInput($event)', '(keydown)': '_handleKeydown($event)', '(click)': '_handleClick()', }, exportAs: 'matAutocompleteTrigger', providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR], }] }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLXRyaWdnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvbWF0ZXJpY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