source: trip-planner-front/node_modules/@angular/material/autocomplete/autocomplete.d.ts@ ceaed42

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

adding new components

  • Property mode set to 100644
File size: 7.6 KB
RevLine 
[6a3a178]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 { BooleanInput } from '@angular/cdk/coercion';
10import { Platform } from '@angular/cdk/platform';
11import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, QueryList, TemplateRef, OnDestroy } from '@angular/core';
12import { CanDisableRipple, _MatOptgroupBase, _MatOptionBase, MatOption, MatOptgroup } from '@angular/material/core';
13/** Event object that is emitted when an autocomplete option is selected. */
[fa375fe]14import * as ɵngcc0 from '@angular/core';
[6a3a178]15export declare class MatAutocompleteSelectedEvent {
16 /** Reference to the autocomplete panel that emitted the event. */
17 source: _MatAutocompleteBase;
18 /** Option that was selected. */
19 option: _MatOptionBase;
20 constructor(
21 /** Reference to the autocomplete panel that emitted the event. */
22 source: _MatAutocompleteBase,
23 /** Option that was selected. */
24 option: _MatOptionBase);
25}
26/** Event object that is emitted when an autocomplete option is activated. */
27export interface MatAutocompleteActivatedEvent {
28 /** Reference to the autocomplete panel that emitted the event. */
29 source: _MatAutocompleteBase;
30 /** Option that was selected. */
31 option: _MatOptionBase | null;
32}
33/** @docs-private */
34declare const _MatAutocompleteMixinBase: import("@angular/material/core/common-behaviors/constructor").Constructor<CanDisableRipple> & import("@angular/material/core/common-behaviors/constructor").AbstractConstructor<CanDisableRipple> & {
35 new (): {};
36};
37/** Default `mat-autocomplete` options that can be overridden. */
38export interface MatAutocompleteDefaultOptions {
39 /** Whether the first option should be highlighted when an autocomplete panel is opened. */
40 autoActiveFirstOption?: boolean;
41 /** Class or list of classes to be applied to the autocomplete's overlay panel. */
42 overlayPanelClass?: string | string[];
43}
44/** Injection token to be used to override the default options for `mat-autocomplete`. */
45export declare const MAT_AUTOCOMPLETE_DEFAULT_OPTIONS: InjectionToken<MatAutocompleteDefaultOptions>;
46/** @docs-private */
47export declare function MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY(): MatAutocompleteDefaultOptions;
48/** Base class with all of the `MatAutocomplete` functionality. */
49export declare abstract class _MatAutocompleteBase extends _MatAutocompleteMixinBase implements AfterContentInit, CanDisableRipple, OnDestroy {
50 private _changeDetectorRef;
51 private _elementRef;
52 private _activeOptionChanges;
53 /** Class to apply to the panel when it's visible. */
54 protected abstract _visibleClass: string;
55 /** Class to apply to the panel when it's hidden. */
56 protected abstract _hiddenClass: string;
57 /** Manages active item in option list based on key events. */
58 _keyManager: ActiveDescendantKeyManager<_MatOptionBase>;
59 /** Whether the autocomplete panel should be visible, depending on option length. */
60 showPanel: boolean;
61 /** Whether the autocomplete panel is open. */
62 get isOpen(): boolean;
63 _isOpen: boolean;
64 /** @docs-private */
65 template: TemplateRef<any>;
66 /** Element for the panel containing the autocomplete options. */
67 panel: ElementRef;
68 /** Reference to all options within the autocomplete. */
69 abstract options: QueryList<_MatOptionBase>;
70 /** Reference to all option groups within the autocomplete. */
71 abstract optionGroups: QueryList<_MatOptgroupBase>;
72 /** Aria label of the autocomplete. */
73 ariaLabel: string;
74 /** Input that can be used to specify the `aria-labelledby` attribute. */
75 ariaLabelledby: string;
76 /** Function that maps an option's control value to its display value in the trigger. */
77 displayWith: ((value: any) => string) | null;
78 /**
79 * Whether the first option should be highlighted when the autocomplete panel is opened.
80 * Can be configured globally through the `MAT_AUTOCOMPLETE_DEFAULT_OPTIONS` token.
81 */
82 get autoActiveFirstOption(): boolean;
83 set autoActiveFirstOption(value: boolean);
84 private _autoActiveFirstOption;
85 /**
86 * Specify the width of the autocomplete panel. Can be any CSS sizing value, otherwise it will
87 * match the width of its host.
88 */
89 panelWidth: string | number;
90 /** Event that is emitted whenever an option from the list is selected. */
91 readonly optionSelected: EventEmitter<MatAutocompleteSelectedEvent>;
92 /** Event that is emitted when the autocomplete panel is opened. */
93 readonly opened: EventEmitter<void>;
94 /** Event that is emitted when the autocomplete panel is closed. */
95 readonly closed: EventEmitter<void>;
96 /** Emits whenever an option is activated using the keyboard. */
97 readonly optionActivated: EventEmitter<MatAutocompleteActivatedEvent>;
98 /**
99 * Takes classes set on the host mat-autocomplete element and applies them to the panel
100 * inside the overlay container to allow for easy styling.
101 */
102 set classList(value: string | string[]);
103 _classList: {
104 [key: string]: boolean;
105 };
106 /** Unique ID to be used by autocomplete trigger's "aria-owns" property. */
107 id: string;
108 /**
109 * Tells any descendant `mat-optgroup` to use the inert a11y pattern.
110 * @docs-private
111 */
112 readonly inertGroups: boolean;
113 constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef<HTMLElement>, defaults: MatAutocompleteDefaultOptions, platform?: Platform);
114 ngAfterContentInit(): void;
115 ngOnDestroy(): void;
116 /**
117 * Sets the panel scrollTop. This allows us to manually scroll to display options
118 * above or below the fold, as they are not actually being focused when active.
119 */
120 _setScrollTop(scrollTop: number): void;
121 /** Returns the panel's scrollTop. */
122 _getScrollTop(): number;
123 /** Panel should hide itself when the option list is empty. */
124 _setVisibility(): void;
125 /** Emits the `select` event. */
126 _emitSelectEvent(option: _MatOptionBase): void;
127 /** Gets the aria-labelledby for the autocomplete panel. */
128 _getPanelAriaLabelledby(labelId: string | null): string | null;
129 /** Sets the autocomplete visibility classes on a classlist based on the panel is visible. */
130 private _setVisibilityClasses;
131 static ngAcceptInputType_autoActiveFirstOption: BooleanInput;
132 static ngAcceptInputType_disableRipple: BooleanInput;
[fa375fe]133 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<_MatAutocompleteBase, never>;
134 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<_MatAutocompleteBase, never, never, { "displayWith": "displayWith"; "autoActiveFirstOption": "autoActiveFirstOption"; "classList": "class"; "ariaLabel": "aria-label"; "ariaLabelledby": "aria-labelledby"; "panelWidth": "panelWidth"; }, { "optionSelected": "optionSelected"; "opened": "opened"; "closed": "closed"; "optionActivated": "optionActivated"; }, never>;
[6a3a178]135}
136export declare class MatAutocomplete extends _MatAutocompleteBase {
137 /** Reference to all option groups within the autocomplete. */
138 optionGroups: QueryList<MatOptgroup>;
139 /** Reference to all options within the autocomplete. */
140 options: QueryList<MatOption>;
141 protected _visibleClass: string;
142 protected _hiddenClass: string;
[fa375fe]143 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MatAutocomplete, never>;
144 static ɵcmp: ɵngcc0.ɵɵComponentDeclaration<MatAutocomplete, "mat-autocomplete", ["matAutocomplete"], { "disableRipple": "disableRipple"; }, {}, ["optionGroups", "options"], ["*"]>;
[6a3a178]145}
146export {};
[fa375fe]147
148//# sourceMappingURL=autocomplete.d.ts.map
Note: See TracBrowser for help on using the repository browser.