1 | {"version":3,"file":"autocomplete.js","sources":["../../../../../../src/material/autocomplete/autocomplete.ts","../../../../../../src/material/autocomplete/autocomplete-origin.ts","../../../../../../src/material/autocomplete/autocomplete-trigger.ts","../../../../../../src/material/autocomplete/autocomplete-module.ts","../../../../../../src/material/autocomplete/public-api.ts","../../../../../../src/material/autocomplete/index.ts"],"names":["observableOf"],"mappings":";;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAqCA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;AACA,IAAI,4BAA4B,GAAG,CAAC,CAAC;AAErC;AACA,MAAa,4BAA4B;AACzC,IAAE;AACF;AACA,IAAW,MAA4B;AACtC;AACA,IAAU,MAAsB;AAAI,QAF1B,WAAM,GAAN,MAAM,CAAsB;AAAC,QAE7B,WAAM,GAAN,MAAM,CAAgB;AAAC,KAAI;AACtC,CAAC;AAWD;AACA;AACA,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAAQ,CAAA,CAAC,CAAC;AAW/D;AACA,MAAa,gCAAgC,GACzC,IAAI,cAAc,CAAgC,kCAAkC,EAAE;AAC1F,IAAM,UAAU,EAAE,MAAM;AACxB,IAAM,OAAO,EAAE,wCAAwC;AACvD,CAAK,EAAE;AAEP;AACA,SAAgB,wCAAwC;AAAK,IAC3D,OAAO,EAAC,qBAAqB,EAAE,KAAK,EAAC,CAAC;AACxC,CAAC;AAED;AACA,MACsB,oBAAqB,SAAQ,yBAAyB;AAAG,IAyG7E,YACU,kBAAqC,EACrC,WAAoC,EACF,QAAuC,EACjF,QAAmB;AACvB,QAAI,KAAK,EAAE,CAAC;AACZ,QALY,uBAAkB,GAAlB,kBAAkB,CAAmB;AAAC,QACtC,gBAAW,GAAX,WAAW,CAAyB;AAAC,QAzGvC,yBAAoB,GAAG,YAAY,CAAC,KAAK,CAAC;AACpD;AAEoC,QASlC,cAAS,GAAY,KAAK,CAAC;AAC7B,QAGE,YAAO,GAAY,KAAK,CAAC;AAC3B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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 {ActiveDescendantKeyManager} from '@angular/cdk/a11y';\nimport {BooleanInput, coerceBooleanProperty, coerceStringArray} from '@angular/cdk/coercion';\nimport {Platform} from '@angular/cdk/platform';\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Inject,\n InjectionToken,\n Input,\n Output,\n QueryList,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n OnDestroy,\n Directive,\n} from '@angular/core';\nimport {\n CanDisableRipple,\n MAT_OPTGROUP,\n MAT_OPTION_PARENT_COMPONENT,\n _MatOptgroupBase,\n _MatOptionBase,\n mixinDisableRipple,\n MatOption,\n MatOptgroup,\n} from '@angular/material/core';\nimport {Subscription} from 'rxjs';\n\n\n/**\n * Autocomplete IDs need to be unique across components, so this counter exists outside of\n * the component definition.\n */\nlet _uniqueAutocompleteIdCounter = 0;\n\n/** Event object that is emitted when an autocomplete option is selected. */\nexport class MatAutocompleteSelectedEvent {\n constructor(\n /** Reference to the autocomplete panel that emitted the event. */\n public source: _MatAutocompleteBase,\n /** Option that was selected. */\n public option: _MatOptionBase) { }\n}\n\n/** Event object that is emitted when an autocomplete option is activated. */\nexport interface MatAutocompleteActivatedEvent {\n /** Reference to the autocomplete panel that emitted the event. */\n source: _MatAutocompleteBase;\n\n /** Option that was selected. */\n option: _MatOptionBase|null;\n}\n\n// Boilerplate for applying mixins to MatAutocomplete.\n/** @docs-private */\nconst _MatAutocompleteMixinBase = mixinDisableRipple(class {});\n\n/** Default `mat-autocomplete` options that can be overridden. */\nexport interface MatAutocompleteDefaultOptions {\n /** Whether the first option should be highlighted when an autocomplete panel is opened. */\n autoActiveFirstOption?: boolean;\n\n /** Class or list of classes to be applied to the autocomplete's overlay panel. */\n overlayPanelClass?: string | string[];\n}\n\n/** Injection token to be used to override the default options for `mat-autocomplete`. */\nexport const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS =\n new InjectionToken<MatAutocompleteDefaultOptions>('mat-autocomplete-default-options', {\n providedIn: 'root',\n factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,\n });\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions {\n return {autoActiveFirstOption: false};\n}\n\n/** Base class with all of the `MatAutocomplete` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase implements\n AfterContentInit, CanDisableRipple, OnDestroy {\n private _activeOptionChanges = Subscription.EMPTY;\n\n /** Class to apply to the panel when it's visible. */\n protected abstract _visibleClass: string;\n\n /** Class to apply to the panel when it's hidden. */\n protected abstract _hiddenClass: string;\n\n /** Manages active item in option list based on key events. */\n _keyManager: ActiveDescendantKeyManager<_MatOptionBase>;\n\n /** Whether the autocomplete panel should be visible, depending on option length. */\n showPanel: boolean = false;\n\n /** Whether the autocomplete panel is open. */\n get isOpen(): boolean { return this._isOpen && this.showPanel; }\n _isOpen: boolean = false;\n\n // The @ViewChild query for TemplateRef here needs to be static because some code paths\n // lead to the overlay being created before change detection has finished for this component.\n // Notably, another component may trigger `focus` on the autocomplete-trigger.\n\n /** @docs-private */\n @ViewChild(TemplateRef, {static: true}) template: TemplateRef<any>;\n\n /** Element for the panel containing the autocomplete options. */\n @ViewChild('panel') panel: ElementRef;\n\n /** Reference to all options within the autocomplete. */\n abstract options: QueryList<_MatOptionBase>;\n\n /** Reference to all option groups within the autocomplete. */\n abstract optionGroups: QueryList<_MatOptgroupBase>;\n\n /** Aria label of the autocomplete. */\n @Input('aria-label') ariaLabel: string;\n\n /** Input that can be used to specify the `aria-labelledby` attribute. */\n @Input('aria-labelledby') ariaLabelledby: string;\n\n /** Function that maps an option's control value to its display value in the trigger. */\n @Input() displayWith: ((value: any) => string) | null = null;\n\n /**\n * Whether the first option should be highlighted when the autocomplete panel is opened.\n * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.\n */\n @Input()\n get autoActiveFirstOption(): boolean { return this._autoActiveFirstOption; }\n set autoActiveFirstOption(value: boolean) {\n this._autoActiveFirstOption = coerceBooleanProperty(value);\n }\n private _autoActiveFirstOption: boolean;\n\n /**\n * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will\n * match the width of its host.\n */\n @Input() panelWidth: string | number;\n\n /** Event that is emitted whenever an option from the list is selected. */\n @Output() readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent> =\n new EventEmitter<MatAutocompleteSelectedEvent>();\n\n /** Event that is emitted when the autocomplete panel is opened. */\n @Output() readonly opened: EventEmitter<void> = new EventEmitter<void>();\n\n /** Event that is emitted when the autocomplete panel is closed. */\n @Output() readonly closed: EventEmitter<void> = new EventEmitter<void>();\n\n /** Emits whenever an option is activated using the keyboard. */\n @Output() readonly optionActivated: EventEmitter<MatAutocompleteActivatedEvent> =\n new EventEmitter<MatAutocompleteActivatedEvent>();\n\n /**\n * Takes classes set on the host mat-autocomplete element and applies them to the panel\n * inside the overlay container to allow for easy styling.\n */\n @Input('class')\n set classList(value: string | string[]) {\n if (value && value.length) {\n this._classList = coerceStringArray(value).reduce((classList, className) => {\n classList[className] = true;\n return classList;\n }, {} as {[key: string]: boolean});\n } else {\n this._classList = {};\n }\n\n this._setVisibilityClasses(this._classList);\n this._elementRef.nativeElement.className = '';\n }\n _classList: {[key: string]: boolean} = {};\n\n /** Unique ID to be used by autocomplete trigger's \"aria-owns\" property. */\n id: string = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;\n\n /**\n * Tells any descendant `mat-optgroup` to use the inert a11y pattern.\n * @docs-private\n */\n readonly inertGroups: boolean;\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _elementRef: ElementRef<HTMLElement>,\n @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS) defaults: MatAutocompleteDefaultOptions,\n platform?: Platform) {\n super();\n\n // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on\n // Safari using VoiceOver. We should occasionally check back to see whether the bug\n // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`\n // option altogether.\n this.inertGroups = platform?.SAFARI || false;\n this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;\n }\n\n ngAfterContentInit() {\n this._keyManager = new ActiveDescendantKeyManager<_MatOptionBase>(this.options).withWrap();\n this._activeOptionChanges = this._keyManager.change.subscribe(index => {\n if (this.isOpen) {\n this.optionActivated.emit({source: this, option: this.options.toArray()[index] || null});\n }\n });\n\n // Set the initial visibility state.\n this._setVisibility();\n }\n\n ngOnDestroy() {\n this._activeOptionChanges.unsubscribe();\n }\n\n /**\n * Sets the panel scrollTop. This allows us to manually scroll to display options\n * above or below the fold, as they are not actually being focused when active.\n */\n _setScrollTop(scrollTop: number): void {\n if (this.panel) {\n this.panel.nativeElement.scrollTop = scrollTop;\n }\n }\n\n /** Returns the panel's scrollTop. */\n _getScrollTop(): number {\n return this.panel ? this.panel.nativeElement.scrollTop : 0;\n }\n\n /** Panel should hide itself when the option list is empty. */\n _setVisibility() {\n this.showPanel = !!this.options.length;\n this._setVisibilityClasses(this._classList);\n this._changeDetectorRef.markForCheck();\n }\n\n /** Emits the `select` event. */\n _emitSelectEvent(option: _MatOptionBase): void {\n const event = new MatAutocompleteSelectedEvent(this, option);\n this.optionSelected.emit(event);\n }\n\n /** Gets the aria-labelledby for the autocomplete panel. */\n _getPanelAriaLabelledby(labelId: string | null): string | null {\n if (this.ariaLabel) {\n return null;\n }\n\n const labelExpression = labelId ? labelId + ' ' : '';\n return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;\n }\n\n\n /** Sets the autocomplete visibility classes on a classlist based on the panel is visible. */\n private _setVisibilityClasses(classList: {[key: string]: boolean}) {\n classList[this._visibleClass] = this.showPanel;\n classList[this._hiddenClass] = !this.showPanel;\n }\n\n static ngAcceptInputType_autoActiveFirstOption: BooleanInput;\n static ngAcceptInputType_disableRipple: BooleanInput;\n}\n\n@Component({\n selector: 'mat-autocomplete',\n templateUrl: 'autocomplete.html',\n styleUrls: ['autocomplete.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n exportAs: 'matAutocomplete',\n inputs: ['disableRipple'],\n host: {\n 'class': 'mat-autocomplete'\n },\n providers: [\n {provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete}\n ]\n})\nexport class MatAutocomplete extends _MatAutocompleteBase {\n /** Reference to all option groups within the autocomplete. */\n @ContentChildren(MAT_OPTGROUP, {descendants: true}) optionGroups: QueryList<MatOptgroup>;\n /** Reference to all options within the autocomplete. */\n @ContentChildren(MatOption, {descendants: true}) options: QueryList<MatOption>;\n protected _visibleClass = 'mat-autocomplete-visible';\n protected _hiddenClass = 'mat-autocomplete-hidden';\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, ElementRef} from '@angular/core';\n\n/** Base class containing all of the functionality for `MatAutocompleteOrigin`. */\n@Directive()\nexport abstract class _MatAutocompleteOriginBase {\n constructor(\n /** Reference to the element on which the directive is applied. */\n public elementRef: ElementRef<HTMLElement>) {}\n}\n\n/**\n * Directive applied to an element to make it usable\n * as a connection point for an autocomplete panel.\n */\n@Directive({\n selector: '[matAutocompleteOrigin]',\n exportAs: 'matAutocompleteOrigin',\n})\nexport class MatAutocompleteOrigin extends _MatAutocompleteOriginBase {}\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 {Directionality} from '@angular/cdk/bidi';\nimport {BooleanInput, coerceBooleanProperty} from '@angular/cdk/coercion';\nimport {DOWN_ARROW, ENTER, ESCAPE, TAB, UP_ARROW, hasModifierKey} from '@angular/cdk/keycodes';\nimport {\n FlexibleConnectedPositionStrategy,\n Overlay,\n OverlayConfig,\n OverlayRef,\n PositionStrategy,\n ScrollStrategy,\n ConnectedPosition,\n} from '@angular/cdk/overlay';\nimport {_getEventTarget} from '@angular/cdk/platform';\nimport {TemplatePortal} from '@angular/cdk/portal';\nimport {ViewportRuler} from '@angular/cdk/scrolling';\nimport {DOCUMENT} from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n forwardRef,\n Host,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n OnChanges,\n SimpleChanges,\n} from '@angular/core';\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from '@angular/forms';\nimport {\n _countGroupLabelsBeforeOption,\n _getOptionScrollPosition,\n MatOption,\n MatOptionSelectionChange,\n} from '@angular/material/core';\nimport {MAT_FORM_FIELD, MatFormField} from '@angular/material/form-field';\nimport {defer, fromEvent, merge, Observable, of as observableOf, Subject, Subscription} from 'rxjs';\nimport {delay, filter, map, switchMap, take, tap} from 'rxjs/operators';\n\nimport {\n _MatAutocompleteBase,\n MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,\n MatAutocompleteDefaultOptions\n} from './autocomplete';\nimport {_MatAutocompleteOriginBase} from './autocomplete-origin';\n\n\n/** Injection token that determines the scroll handling while the autocomplete panel is open. */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY =\n new InjectionToken<() => ScrollStrategy>('mat-autocomplete-scroll-strategy');\n\n/** @docs-private */\nexport function MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition();\n}\n\n/** @docs-private */\nexport const MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MAT_AUTOCOMPLETE_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY,\n};\n\n/**\n * Provider that allows the autocomplete to register as a ControlValueAccessor.\n * @docs-private\n */\nexport const MAT_AUTOCOMPLETE_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MatAutocompleteTrigger),\n multi: true\n};\n\n/**\n * Creates an error to be thrown when attempting to use an autocomplete trigger without a panel.\n * @docs-private\n */\nexport function getMatAutocompleteMissingPanelError(): Error {\n return Error('Attempting to open an undefined instance of `mat-autocomplete`. ' +\n 'Make sure that the id passed to the `matAutocomplete` is correct and that ' +\n 'you\\'re attempting to open it after the ngAfterContentInit hook.');\n}\n\n/** Base class with all of the `MatAutocompleteTrigger` functionality. */\n@Directive()\nexport abstract class _MatAutocompleteTriggerBase implements ControlValueAccessor, AfterViewInit,\n OnChanges, OnDestroy {\n\n private _overlayRef: OverlayRef | null;\n private _portal: TemplatePortal;\n private _componentDestroyed = false;\n private _autocompleteDisabled = false;\n private _scrollStrategy: () => ScrollStrategy;\n\n /** Old value of the native input. Used to work around issues with the `input` event on IE. */\n private _previousValue: string | number | null;\n\n /** Strategy that is used to position the panel. */\n private _positionStrategy: FlexibleConnectedPositionStrategy;\n\n /** Whether or not the label state is being overridden. */\n private _manuallyFloatingLabel = false;\n\n /** The subscription for closing actions (some are bound to document). */\n private _closingActionsSubscription: Subscription;\n\n /** Subscription to viewport size changes. */\n private _viewportSubscription = Subscription.EMPTY;\n\n /**\n * Whether the autocomplete can open the next time it is focused. Used to prevent a focused,\n * closed autocomplete from being reopened if the user switches to another browser tab and then\n * comes back.\n */\n private _canOpenOnNextFocus = true;\n\n /** Stream of keyboard events that can close the panel. */\n private readonly _closeKeyEventStream = new Subject<void>();\n\n /**\n * Event handler for when the window is blurred. Needs to be an\n * arrow function in order to preserve the context.\n */\n private _windowBlurHandler = () => {\n // If the user blurred the window while the autocomplete is focused, it means that it'll be\n // refocused when they come back. In this case we want to skip the first focus event, if the\n // pane was closed, in order to avoid reopening it unintentionally.\n this._canOpenOnNextFocus =\n this._document.activeElement !== this._element.nativeElement || this.panelOpen;\n }\n\n /** `View -> model callback called when value changes` */\n _onChange: (value: any) => void = () => {};\n\n /** `View -> model callback called when autocomplete has been touched` */\n _onTouched = () => {};\n\n /** The autocomplete panel to be attached to this trigger. */\n @Input('matAutocomplete') autocomplete: _MatAutocompleteBase;\n\n /**\n * Position of the autocomplete panel relative to the trigger element. A position of `auto`\n * will render the panel underneath the trigger if there is enough space for it to fit in\n * the viewport, otherwise the panel will be shown above it. If the position is set to\n * `above` or `below`, the panel will always be shown above or below the trigger. no matter\n * whether it fits completely in the viewport.\n */\n @Input('matAutocompletePosition') position: 'auto' | 'above' | 'below' = 'auto';\n\n /**\n * Reference relative to which to position the autocomplete panel.\n * Defaults to the autocomplete trigger element.\n */\n @Input('matAutocompleteConnectedTo') connectedTo: _MatAutocompleteOriginBase;\n\n /**\n * `autocomplete` attribute to be set on the input element.\n * @docs-private\n */\n @Input('autocomplete') autocompleteAttribute: string = 'off';\n\n /**\n * Whether the autocomplete is disabled. When disabled, the element will\n * act as a regular input and the user won't be able to open the panel.\n */\n @Input('matAutocompleteDisabled')\n get autocompleteDisabled(): boolean { return this._autocompleteDisabled; }\n set autocompleteDisabled(value: boolean) {\n this._autocompleteDisabled = coerceBooleanProperty(value);\n }\n\n constructor(private _element: ElementRef<HTMLInputElement>, private _overlay: Overlay,\n private _viewContainerRef: ViewContainerRef,\n private _zone: NgZone,\n private _changeDetectorRef: ChangeDetectorRef,\n @Inject(MAT_AUTOCOMPLETE_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional() @Inject(MAT_FORM_FIELD) @Host() private _formField: MatFormField,\n @Optional() @Inject(DOCUMENT) private _document: any,\n private _viewportRuler: ViewportRuler,\n @Optional() @Inject(MAT_AUTOCOMPLETE_DEFAULT_OPTIONS)\n private _defaults?: MatAutocompleteDefaultOptions) {\n this._scrollStrategy = scrollStrategy;\n }\n\n /** Class to apply to the panel when it's above the input. */\n protected abstract _aboveClass: string;\n\n ngAfterViewInit() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n this._zone.runOutsideAngular(() => window.addEventListener('blur', this._windowBlurHandler));\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['position'] && this._positionStrategy) {\n this._setStrategyPositions(this._positionStrategy);\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n }\n }\n }\n\n ngOnDestroy() {\n const window = this._getWindow();\n\n if (typeof window !== 'undefined') {\n window.removeEventListener('blur', this._windowBlurHandler);\n }\n\n this._viewportSubscription.unsubscribe();\n this._componentDestroyed = true;\n this._destroyPanel();\n this._closeKeyEventStream.complete();\n }\n\n /** Whether or not the autocomplete panel is open. */\n get panelOpen(): boolean {\n return this._overlayAttached && this.autocomplete.showPanel;\n }\n private _overlayAttached: boolean = false;\n\n /** Opens the autocomplete suggestion panel. */\n openPanel(): void {\n this._attachOverlay();\n this._floatLabel();\n }\n\n /** Closes the autocomplete suggestion panel. */\n closePanel(): void {\n this._resetLabel();\n\n if (!this._overlayAttached) {\n return;\n }\n\n if (this.panelOpen) {\n // Only emit if the panel was visible.\n this.autocomplete.closed.emit();\n }\n\n this.autocomplete._isOpen = this._overlayAttached = false;\n\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n this._closingActionsSubscription.unsubscribe();\n }\n\n // Note that in some cases this can end up being called after the component is destroyed.\n // Add a check to ensure that we don't try to run change detection on a destroyed view.\n if (!this._componentDestroyed) {\n // We need to trigger change detection manually, because\n // `fromEvent` doesn't seem to do it at the proper time.\n // This ensures that the label is reset when the\n // user clicks outside.\n this._changeDetectorRef.detectChanges();\n }\n }\n\n /**\n * Updates the position of the autocomplete suggestion panel to ensure that it fits all options\n * within the viewport.\n */\n updatePosition(): void {\n if (this._overlayAttached) {\n this._overlayRef!.updatePosition();\n }\n }\n\n /**\n * A stream of actions that should close the autocomplete panel, including\n * when an option is selected, on blur, and when TAB is pressed.\n */\n get panelClosingActions(): Observable<MatOptionSelectionChange|null> {\n return merge(\n this.optionSelections,\n this.autocomplete._keyManager.tabOut.pipe(filter(() => this._overlayAttached)),\n this._closeKeyEventStream,\n this._getOutsideClickStream(),\n this._overlayRef ?\n this._overlayRef.detachments().pipe(filter(() => this._overlayAttached)) :\n observableOf()\n ).pipe(\n // Normalize the output so we return a consistent type.\n map(event => event instanceof MatOptionSelectionChange ? event : null)\n );\n }\n\n /** Stream of autocomplete option selections. */\n readonly optionSelections: Observable<MatOptionSelectionChange> = defer(() => {\n if (this.autocomplete && this.autocomplete.options) {\n return merge(...this.autocomplete.options.map(option => option.onSelectionChange));\n }\n\n // If there are any subscribers before `ngAfterViewInit`, the `autocomplete` will be undefined.\n // Return a stream that we'll replace with the real one once everything is in place.\n return this._zone.onStable\n .pipe(take(1), switchMap(() => this.optionSelections));\n }) as Observable<MatOptionSelectionChange>;\n\n /** The currently active option, coerced to MatOption type. */\n get activeOption(): MatOption | null {\n if (this.autocomplete && this.autocomplete._keyManager) {\n return this.autocomplete._keyManager.activeItem;\n }\n\n return null;\n }\n\n /** Stream of clicks outside of the autocomplete panel. */\n private _getOutsideClickStream(): Observable<any> {\n return merge(\n fromEvent(this._document, 'click') as Observable<MouseEvent>,\n fromEvent(this._document, 'auxclick') as Observable<MouseEvent>,\n fromEvent(this._document, 'touchend') as Observable<TouchEvent>)\n .pipe(filter(event => {\n // If we're in the Shadow DOM, the event target will be the shadow root, so we have to\n // fall back to check the first element in the path of the click event.\n const clickTarget = _getEventTarget<HTMLElement>(event)!;\n const formField = this._formField ? this._formField._elementRef.nativeElement : null;\n const customOrigin = this.connectedTo ? this.connectedTo.elementRef.nativeElement : null;\n\n return this._overlayAttached && clickTarget !== this._element.nativeElement &&\n (!formField || !formField.contains(clickTarget)) &&\n (!customOrigin || !customOrigin.contains(clickTarget)) &&\n (!!this._overlayRef && !this._overlayRef.overlayElement.contains(clickTarget));\n }));\n }\n\n // Implemented as part of ControlValueAccessor.\n writeValue(value: any): void {\n Promise.resolve(null).then(() => this._setTriggerValue(value));\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnChange(fn: (value: any) => {}): void {\n this._onChange = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n registerOnTouched(fn: () => {}) {\n this._onTouched = fn;\n }\n\n // Implemented as part of ControlValueAccessor.\n setDisabledState(isDisabled: boolean) {\n this._element.nativeElement.disabled = isDisabled;\n }\n\n _handleKeydown(event: KeyboardEvent): void {\n const keyCode = event.keyCode;\n\n // Prevent the default action on all escape key presses. This is here primarily to bring IE\n // in line with other browsers. By default, pressing escape on IE will cause it to revert\n // the input value to the one that it had on focus, however it won't dispatch any events\n // which means that the model value will be out of sync with the view.\n if (keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n }\n\n if (this.activeOption && keyCode === ENTER && this.panelOpen) {\n this.activeOption._selectViaInteraction();\n this._resetActiveItem();\n event.preventDefault();\n } else if (this.autocomplete) {\n const prevActiveItem = this.autocomplete._keyManager.activeItem;\n const isArrowKey = keyCode === UP_ARROW || keyCode === DOWN_ARROW;\n\n if (this.panelOpen || keyCode === TAB) {\n this.autocomplete._keyManager.onKeydown(event);\n } else if (isArrowKey && this._canOpen()) {\n this.openPanel();\n }\n\n if (isArrowKey || this.autocomplete._keyManager.activeItem !== prevActiveItem) {\n this._scrollToOption(this.autocomplete._keyManager.activeItemIndex || 0);\n }\n }\n }\n\n _handleInput(event: KeyboardEvent): void {\n let target = event.target as HTMLInputElement;\n let value: number | string | null = target.value;\n\n // Based on `NumberValueAccessor` from forms.\n if (target.type === 'number') {\n value = value == '' ? null : parseFloat(value);\n }\n\n // If the input has a placeholder, IE will fire the `input` event on page load,\n // focus and blur, in addition to when the user actually changed the value. To\n // filter out all of the extra events, we save the value on focus and between\n // `input` events, and we check whether it changed.\n // See: https://connect.microsoft.com/IE/feedback/details/885747/\n if (this._previousValue !== value) {\n this._previousValue = value;\n this._onChange(value);\n\n if (this._canOpen() && this._document.activeElement === event.target) {\n this.openPanel();\n }\n }\n }\n\n _handleFocus(): void {\n if (!this._canOpenOnNextFocus) {\n this._canOpenOnNextFocus = true;\n } else if (this._canOpen()) {\n this._previousValue = this._element.nativeElement.value;\n this._attachOverlay();\n this._floatLabel(true);\n }\n }\n\n /**\n * In \"auto\" mode, the label will animate down as soon as focus is lost.\n * This causes the value to jump when selecting an option with the mouse.\n * This method manually floats the label until the panel can be closed.\n * @param shouldAnimate Whether the label should be animated when it is floated.\n */\n private _floatLabel(shouldAnimate = false): void {\n if (this._formField && this._formField.floatLabel === 'auto') {\n if (shouldAnimate) {\n this._formField._animateAndLockLabel();\n } else {\n this._formField.floatLabel = 'always';\n }\n\n this._manuallyFloatingLabel = true;\n }\n }\n\n /** If the label has been manually elevated, return it to its normal state. */\n private _resetLabel(): void {\n if (this._manuallyFloatingLabel) {\n this._formField.floatLabel = 'auto';\n this._manuallyFloatingLabel = false;\n }\n }\n\n /**\n * This method listens to a stream of panel closing actions and resets the\n * stream every time the option list changes.\n */\n private _subscribeToClosingActions(): Subscription {\n const firstStable = this._zone.onStable.pipe(take(1));\n const optionChanges = this.autocomplete.options.changes.pipe(\n tap(() => this._positionStrategy.reapplyLastPosition()),\n // Defer emitting to the stream until the next tick, because changing\n // bindings in here will cause \"changed after checked\" errors.\n delay(0)\n );\n\n // When the zone is stable initially, and when the option list changes...\n return merge(firstStable, optionChanges)\n .pipe(\n // create a new stream of panelClosingActions, replacing any previous streams\n // that were created, and flatten it so our stream only emits closing events...\n switchMap(() => {\n const wasOpen = this.panelOpen;\n this._resetActiveItem();\n this.autocomplete._setVisibility();\n\n if (this.panelOpen) {\n this._overlayRef!.updatePosition();\n\n // If the `panelOpen` state changed, we need to make sure to emit the `opened`\n // event, because we may not have emitted it when the panel was attached. This\n // can happen if the users opens the panel and there are no options, but the\n // options come in slightly later or as a result of the value changing.\n if (wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n return this.panelClosingActions;\n }),\n // when the first closing event occurs...\n take(1))\n // set the value, close the panel, and complete.\n .subscribe(event => this._setValueAndClose(event));\n }\n\n /** Destroys the autocomplete suggestion panel. */\n private _destroyPanel(): void {\n if (this._overlayRef) {\n this.closePanel();\n this._overlayRef.dispose();\n this._overlayRef = null;\n }\n }\n\n private _setTriggerValue(value: any): void {\n const toDisplay = this.autocomplete && this.autocomplete.displayWith ?\n this.autocomplete.displayWith(value) :\n value;\n\n // Simply falling back to an empty string if the display value is falsy does not work properly.\n // The display value can also be the number zero and shouldn't fall back to an empty string.\n const inputValue = toDisplay != null ? toDisplay : '';\n\n // If it's used within a `MatFormField`, we should set it through the property so it can go\n // through change detection.\n if (this._formField) {\n this._formField._control.value = inputValue;\n } else {\n this._element.nativeElement.value = inputValue;\n }\n\n this._previousValue = inputValue;\n }\n\n /**\n * This method closes the panel, and if a value is specified, also sets the associated\n * control to that value. It will also mark the control as dirty if this interaction\n * stemmed from the user.\n */\n private _setValueAndClose(event: MatOptionSelectionChange | null): void {\n if (event && event.source) {\n this._clearPreviousSelectedOption(event.source);\n this._setTriggerValue(event.source.value);\n this._onChange(event.source.value);\n this._element.nativeElement.focus();\n this.autocomplete._emitSelectEvent(event.source);\n }\n\n this.closePanel();\n }\n\n /**\n * Clear any previous selected option and emit a selection change event for this option\n */\n private _clearPreviousSelectedOption(skip: MatOption) {\n this.autocomplete.options.forEach(option => {\n if (option !== skip && option.selected) {\n option.deselect();\n }\n });\n }\n\n private _attachOverlay(): void {\n if (!this.autocomplete && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw getMatAutocompleteMissingPanelError();\n }\n\n let overlayRef = this._overlayRef;\n\n if (!overlayRef) {\n this._portal = new TemplatePortal(this.autocomplete.template,\n this._viewContainerRef,\n {id: this._formField?.getLabelId()});\n overlayRef = this._overlay.create(this._getOverlayConfig());\n this._overlayRef = overlayRef;\n\n // Use the `keydownEvents` in order to take advantage of\n // the overlay event targeting provided by the CDK overlay.\n overlayRef.keydownEvents().subscribe(event => {\n // Close when pressing ESCAPE or ALT + UP_ARROW, based on the a11y guidelines.\n // See: https://www.w3.org/TR/wai-aria-practices-1.1/#textbox-keyboard-interaction\n if ((event.keyCode === ESCAPE && !hasModifierKey(event)) ||\n (event.keyCode === UP_ARROW && hasModifierKey(event, 'altKey'))) {\n this._closeKeyEventStream.next();\n this._resetActiveItem();\n\n // We need to stop propagation, otherwise the event will eventually\n // reach the input itself and cause the overlay to be reopened.\n event.stopPropagation();\n event.preventDefault();\n }\n });\n\n this._viewportSubscription = this._viewportRuler.change().subscribe(() => {\n if (this.panelOpen && overlayRef) {\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n });\n } else {\n // Update the trigger, panel width and direction, in case anything has changed.\n this._positionStrategy.setOrigin(this._getConnectedElement());\n overlayRef.updateSize({width: this._getPanelWidth()});\n }\n\n if (overlayRef && !overlayRef.hasAttached()) {\n overlayRef.attach(this._portal);\n this._closingActionsSubscription = this._subscribeToClosingActions();\n }\n\n const wasOpen = this.panelOpen;\n\n this.autocomplete._setVisibility();\n this.autocomplete._isOpen = this._overlayAttached = true;\n\n // We need to do an extra `panelOpen` check in here, because the\n // autocomplete won't be shown if there are no options.\n if (this.panelOpen && wasOpen !== this.panelOpen) {\n this.autocomplete.opened.emit();\n }\n }\n\n private _getOverlayConfig(): OverlayConfig {\n return new OverlayConfig({\n positionStrategy: this._getOverlayPosition(),\n scrollStrategy: this._scrollStrategy(),\n width: this._getPanelWidth(),\n direction: this._dir,\n panelClass: this._defaults?.overlayPanelClass,\n });\n }\n\n private _getOverlayPosition(): PositionStrategy {\n const strategy = this._overlay.position()\n .flexibleConnectedTo(this._getConnectedElement())\n .withFlexibleDimensions(false)\n .withPush(false);\n\n this._setStrategyPositions(strategy);\n this._positionStrategy = strategy;\n return strategy;\n }\n\n /** Sets the positions on a position strategy based on the directive's input state. */\n private _setStrategyPositions(positionStrategy: FlexibleConnectedPositionStrategy) {\n // Note that we provide horizontal fallback positions, even though by default the dropdown\n // width matches the input, because consumers can override the width. See #18854.\n const belowPositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top'},\n {originX: 'end', originY: 'bottom', overlayX: 'end', overlayY: 'top'}\n ];\n\n // The overlay edge connected to the trigger should have squared corners, while\n // the opposite end has rounded corners. We apply a CSS class to swap the\n // border-radius based on the overlay position.\n const panelClass = this._aboveClass;\n const abovePositions: ConnectedPosition[] = [\n {originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', panelClass},\n {originX: 'end', originY: 'top', overlayX: 'end', overlayY: 'bottom', panelClass}\n ];\n\n let positions: ConnectedPosition[];\n\n if (this.position === 'above') {\n positions = abovePositions;\n } else if (this.position === 'below') {\n positions = belowPositions;\n } else {\n positions = [...belowPositions, ...abovePositions];\n }\n\n positionStrategy.withPositions(positions);\n }\n\n private _getConnectedElement(): ElementRef<HTMLElement> {\n if (this.connectedTo) {\n return this.connectedTo.elementRef;\n }\n\n return this._formField ? this._formField.getConnectedOverlayOrigin() : this._element;\n }\n\n private _getPanelWidth(): number | string {\n return this.autocomplete.panelWidth || this._getHostWidth();\n }\n\n /** Returns the width of the input element, so the panel width can match it. */\n private _getHostWidth(): number {\n return this._getConnectedElement().nativeElement.getBoundingClientRect().width;\n }\n\n /**\n * Resets the active item to -1 so arrow events will activate the\n * correct options, or to 0 if the consumer opted into it.\n */\n private _resetActiveItem(): void {\n const autocomplete = this.autocomplete;\n\n if (autocomplete.autoActiveFirstOption) {\n // Note that we go through `setFirstItemActive`, rather than `setActiveItem(0)`, because\n // the former will find the next enabled option, if the first one is disabled.\n autocomplete._keyManager.setFirstItemActive();\n } else {\n autocomplete._keyManager.setActiveItem(-1);\n }\n }\n\n /** Determines whether the panel can be opened. */\n private _canOpen(): boolean {\n const element = this._element.nativeElement;\n return !element.readOnly && !element.disabled && !this._autocompleteDisabled;\n }\n\n /** Use defaultView of injected document if available or fallback to global window reference */\n private _getWindow(): Window {\n return this._document?.defaultView || window;\n }\n\n /** Scrolls to a particular option in the list. */\n private _scrollToOption(index: number): void {\n // Given that we are not actually focusing active options, we must manually adjust scroll\n // to reveal options below the fold. First, we find the offset of the option from the top\n // of the panel. If that offset is below the fold, the new scrollTop will be the offset -\n // the panel height + the option height, so the active option will be just visible at the\n // bottom of the panel. If that offset is above the top of the visible panel, the new scrollTop\n // will become the offset. If that offset is visible within the panel already, the scrollTop is\n // not adjusted.\n const autocomplete = this.autocomplete;\n const labelCount = _countGroupLabelsBeforeOption(index,\n autocomplete.options, autocomplete.optionGroups);\n\n if (index === 0 && labelCount === 1) {\n // If we've got one group label before the option and we're at the top option,\n // scroll the list to the top. This is better UX than scrolling the list to the\n // top of the option, because it allows the user to read the top group's label.\n autocomplete._setScrollTop(0);\n } else if (autocomplete.panel) {\n const option = autocomplete.options.toArray()[index];\n\n if (option) {\n const element = option._getHostElement();\n const newScrollPosition = _getOptionScrollPosition(\n element.offsetTop,\n element.offsetHeight,\n autocomplete._getScrollTop(),\n autocomplete.panel.nativeElement.offsetHeight\n );\n\n autocomplete._setScrollTop(newScrollPosition);\n }\n }\n }\n\n static ngAcceptInputType_autocompleteDisabled: BooleanInput;\n}\n\n\n@Directive({\n selector: `input[matAutocomplete], textarea[matAutocomplete]`,\n host: {\n 'class': 'mat-autocomplete-trigger',\n '[attr.autocomplete]': 'autocompleteAttribute',\n '[attr.role]': 'autocompleteDisabled ? null : \"combobox\"',\n '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : \"list\"',\n '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',\n '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',\n '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',\n '[attr.aria-haspopup]': '!autocompleteDisabled',\n // Note: we use `focusin`, as opposed to `focus`, in order to open the panel\n // a little earlier. This avoids issues where IE delays the focusing of the input.\n '(focusin)': '_handleFocus()',\n '(blur)': '_onTouched()',\n '(input)': '_handleInput($event)',\n '(keydown)': '_handleKeydown($event)',\n },\n exportAs: 'matAutocompleteTrigger',\n providers: [MAT_AUTOCOMPLETE_VALUE_ACCESSOR]\n})\nexport class MatAutocompleteTrigger extends _MatAutocompleteTriggerBase {\n protected _aboveClass = 'mat-autocomplete-panel-above';\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 {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {OverlayModule} from '@angular/cdk/overlay';\nimport {MatOptionModule, MatCommonModule} from '@angular/material/core';\nimport {CdkScrollableModule} from '@angular/cdk/scrolling';\nimport {MatAutocomplete} from './autocomplete';\nimport {\n MatAutocompleteTrigger,\n MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './autocomplete-trigger';\nimport {MatAutocompleteOrigin} from './autocomplete-origin';\n\n\n@NgModule({\n imports: [\n OverlayModule,\n MatOptionModule,\n MatCommonModule,\n CommonModule\n ],\n exports: [\n MatAutocomplete,\n MatAutocompleteTrigger,\n MatAutocompleteOrigin,\n CdkScrollableModule,\n MatOptionModule,\n MatCommonModule,\n ],\n declarations: [MatAutocomplete, MatAutocompleteTrigger, MatAutocompleteOrigin],\n providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MatAutocompleteModule {}\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 './autocomplete';\nexport * from './autocomplete-module';\nexport * from './autocomplete-trigger';\nexport * from './autocomplete-origin';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"]} |
---|