source: trip-planner-front/node_modules/@angular/material/esm2015/autocomplete/autocomplete.js@ fa375fe

Last change on this file since fa375fe was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 30.3 KB
Line 
1/**
2 * @license
3 * Copyright Google LLC All Rights Reserved.
4 *
5 * Use of this source code is governed by an MIT-style license that can be
6 * found in the LICENSE file at https://angular.io/license
7 */
8import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
9import { coerceBooleanProperty, coerceStringArray } from '@angular/cdk/coercion';
10import { Platform } from '@angular/cdk/platform';
11import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChildren, ElementRef, EventEmitter, Inject, InjectionToken, Input, Output, QueryList, TemplateRef, ViewChild, ViewEncapsulation, Directive, } from '@angular/core';
12import { MAT_OPTGROUP, MAT_OPTION_PARENT_COMPONENT, mixinDisableRipple, MatOption, } from '@angular/material/core';
13import { Subscription } from 'rxjs';
14/**
15 * Autocomplete IDs need to be unique across components, so this counter exists outside of
16 * the component definition.
17 */
18let _uniqueAutocompleteIdCounter = 0;
19/** Event object that is emitted when an autocomplete option is selected. */
20export class MatAutocompleteSelectedEvent {
21 constructor(
22 /** Reference to the autocomplete panel that emitted the event. */
23 source,
24 /** Option that was selected. */
25 option) {
26 this.source = source;
27 this.option = option;
28 }
29}
30// Boilerplate for applying mixins to MatAutocomplete.
31/** @docs-private */
32const _MatAutocompleteMixinBase = mixinDisableRipple(class {
33});
34/** Injection token to be used to override the default options for `mat-autocomplete`. */
35export const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS = new InjectionToken('mat-autocomplete-default-options', {
36 providedIn: 'root',
37 factory: MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY,
38});
39/** @docs-private */
40export function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY() {
41 return { autoActiveFirstOption: false };
42}
43/** Base class with all of the `MatAutocomplete` functionality. */
44export class _MatAutocompleteBase extends _MatAutocompleteMixinBase {
45 constructor(_changeDetectorRef, _elementRef, defaults, platform) {
46 super();
47 this._changeDetectorRef = _changeDetectorRef;
48 this._elementRef = _elementRef;
49 this._activeOptionChanges = Subscription.EMPTY;
50 /** Whether the autocomplete panel should be visible, depending on option length. */
51 this.showPanel = false;
52 this._isOpen = false;
53 /** Function that maps an option's control value to its display value in the trigger. */
54 this.displayWith = null;
55 /** Event that is emitted whenever an option from the list is selected. */
56 this.optionSelected = new EventEmitter();
57 /** Event that is emitted when the autocomplete panel is opened. */
58 this.opened = new EventEmitter();
59 /** Event that is emitted when the autocomplete panel is closed. */
60 this.closed = new EventEmitter();
61 /** Emits whenever an option is activated using the keyboard. */
62 this.optionActivated = new EventEmitter();
63 this._classList = {};
64 /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
65 this.id = `mat-autocomplete-${_uniqueAutocompleteIdCounter++}`;
66 // TODO(crisbeto): the problem that the `inertGroups` option resolves is only present on
67 // Safari using VoiceOver. We should occasionally check back to see whether the bug
68 // wasn't resolved in VoiceOver, and if it has, we can remove this and the `inertGroups`
69 // option altogether.
70 this.inertGroups = (platform === null || platform === void 0 ? void 0 : platform.SAFARI) || false;
71 this._autoActiveFirstOption = !!defaults.autoActiveFirstOption;
72 }
73 /** Whether the autocomplete panel is open. */
74 get isOpen() { return this._isOpen && this.showPanel; }
75 /**
76 * Whether the first option should be highlighted when the autocomplete panel is opened.
77 * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
78 */
79 get autoActiveFirstOption() { return this._autoActiveFirstOption; }
80 set autoActiveFirstOption(value) {
81 this._autoActiveFirstOption = coerceBooleanProperty(value);
82 }
83 /**
84 * Takes classes set on the host mat-autocomplete element and applies them to the panel
85 * inside the overlay container to allow for easy styling.
86 */
87 set classList(value) {
88 if (value && value.length) {
89 this._classList = coerceStringArray(value).reduce((classList, className) => {
90 classList[className] = true;
91 return classList;
92 }, {});
93 }
94 else {
95 this._classList = {};
96 }
97 this._setVisibilityClasses(this._classList);
98 this._elementRef.nativeElement.className = '';
99 }
100 ngAfterContentInit() {
101 this._keyManager = new ActiveDescendantKeyManager(this.options).withWrap();
102 this._activeOptionChanges = this._keyManager.change.subscribe(index => {
103 if (this.isOpen) {
104 this.optionActivated.emit({ source: this, option: this.options.toArray()[index] || null });
105 }
106 });
107 // Set the initial visibility state.
108 this._setVisibility();
109 }
110 ngOnDestroy() {
111 this._activeOptionChanges.unsubscribe();
112 }
113 /**
114 * Sets the panel scrollTop. This allows us to manually scroll to display options
115 * above or below the fold, as they are not actually being focused when active.
116 */
117 _setScrollTop(scrollTop) {
118 if (this.panel) {
119 this.panel.nativeElement.scrollTop = scrollTop;
120 }
121 }
122 /** Returns the panel's scrollTop. */
123 _getScrollTop() {
124 return this.panel ? this.panel.nativeElement.scrollTop : 0;
125 }
126 /** Panel should hide itself when the option list is empty. */
127 _setVisibility() {
128 this.showPanel = !!this.options.length;
129 this._setVisibilityClasses(this._classList);
130 this._changeDetectorRef.markForCheck();
131 }
132 /** Emits the `select` event. */
133 _emitSelectEvent(option) {
134 const event = new MatAutocompleteSelectedEvent(this, option);
135 this.optionSelected.emit(event);
136 }
137 /** Gets the aria-labelledby for the autocomplete panel. */
138 _getPanelAriaLabelledby(labelId) {
139 if (this.ariaLabel) {
140 return null;
141 }
142 const labelExpression = labelId ? labelId + ' ' : '';
143 return this.ariaLabelledby ? labelExpression + this.ariaLabelledby : labelId;
144 }
145 /** Sets the autocomplete visibility classes on a classlist based on the panel is visible. */
146 _setVisibilityClasses(classList) {
147 classList[this._visibleClass] = this.showPanel;
148 classList[this._hiddenClass] = !this.showPanel;
149 }
150}
151_MatAutocompleteBase.decorators = [
152 { type: Directive }
153];
154_MatAutocompleteBase.ctorParameters = () => [
155 { type: ChangeDetectorRef },
156 { type: ElementRef },
157 { type: undefined, decorators: [{ type: Inject, args: [MAT_AUTOCOMPLETE_DEFAULT_OPTIONS,] }] },
158 { type: Platform }
159];
160_MatAutocompleteBase.propDecorators = {
161 template: [{ type: ViewChild, args: [TemplateRef, { static: true },] }],
162 panel: [{ type: ViewChild, args: ['panel',] }],
163 ariaLabel: [{ type: Input, args: ['aria-label',] }],
164 ariaLabelledby: [{ type: Input, args: ['aria-labelledby',] }],
165 displayWith: [{ type: Input }],
166 autoActiveFirstOption: [{ type: Input }],
167 panelWidth: [{ type: Input }],
168 optionSelected: [{ type: Output }],
169 opened: [{ type: Output }],
170 closed: [{ type: Output }],
171 optionActivated: [{ type: Output }],
172 classList: [{ type: Input, args: ['class',] }]
173};
174export class MatAutocomplete extends _MatAutocompleteBase {
175 constructor() {
176 super(...arguments);
177 this._visibleClass = 'mat-autocomplete-visible';
178 this._hiddenClass = 'mat-autocomplete-hidden';
179 }
180}
181MatAutocomplete.decorators = [
182 { type: Component, args: [{
183 selector: 'mat-autocomplete',
184 template: "<ng-template let-formFieldId=\"id\">\n <div class=\"mat-autocomplete-panel\"\n role=\"listbox\"\n [id]=\"id\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"_getPanelAriaLabelledby(formFieldId)\"\n [ngClass]=\"_classList\"\n #panel>\n <ng-content></ng-content>\n </div>\n</ng-template>\n",
185 encapsulation: ViewEncapsulation.None,
186 changeDetection: ChangeDetectionStrategy.OnPush,
187 exportAs: 'matAutocomplete',
188 inputs: ['disableRipple'],
189 host: {
190 'class': 'mat-autocomplete'
191 },
192 providers: [
193 { provide: MAT_OPTION_PARENT_COMPONENT, useExisting: MatAutocomplete }
194 ],
195 styles: [".mat-autocomplete-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;visibility:hidden;max-width:none;max-height:256px;position:relative;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.mat-autocomplete-panel.mat-autocomplete-visible{visibility:visible}.mat-autocomplete-panel.mat-autocomplete-hidden{visibility:hidden}.mat-autocomplete-panel-above .mat-autocomplete-panel{border-radius:0;border-top-left-radius:4px;border-top-right-radius:4px}.mat-autocomplete-panel .mat-divider-horizontal{margin-top:-1px}.cdk-high-contrast-active .mat-autocomplete-panel{outline:solid 1px}mat-autocomplete{display:none}\n"]
196 },] }
197];
198MatAutocomplete.propDecorators = {
199 optionGroups: [{ type: ContentChildren, args: [MAT_OPTGROUP, { descendants: true },] }],
200 options: [{ type: ContentChildren, args: [MatOption, { descendants: true },] }]
201};
202//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0b2NvbXBsZXRlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL21hdGVyaWFsL2F1dG9jb21wbGV0ZS9hdXRvY29tcGxldGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7OztHQU1HO0FBRUgsT0FBTyxFQUFDLDBCQUEwQixFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDN0QsT0FBTyxFQUFlLHFCQUFxQixFQUFFLGlCQUFpQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDN0YsT0FBTyxFQUFDLFFBQVEsRUFBQyxNQUFNLHVCQUF1QixDQUFDO0FBQy9DLE9BQU8sRUFFTCx1QkFBdUIsRUFDdkIsaUJBQWlCLEVBQ2pCLFNBQVMsRUFDVCxlQUFlLEVBQ2YsVUFBVSxFQUNWLFlBQVksRUFDWixNQUFNLEVBQ04sY0FBYyxFQUNkLEtBQUssRUFDTCxNQUFNLEVBQ04sU0FBUyxFQUNULFdBQVcsRUFDWCxTQUFTLEVBQ1QsaUJBQWlCLEVBRWpCLFNBQVMsR0FDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBRUwsWUFBWSxFQUNaLDJCQUEyQixFQUczQixrQkFBa0IsRUFDbEIsU0FBUyxHQUVWLE1BQU0sd0JBQXdCLENBQUM7QUFDaEMsT0FBTyxFQUFDLFlBQVksRUFBQyxNQUFNLE1BQU0sQ0FBQztBQUdsQzs7O0dBR0c7QUFDSCxJQUF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