UNPKG

14.6 kBJavaScriptView Raw
1import * as i0 from '@angular/core';
2import { Component, ViewEncapsulation, ChangeDetectionStrategy, ContentChildren, forwardRef, Directive, NgModule } from '@angular/core';
3import { MAT_LEGACY_OPTION_PARENT_COMPONENT, MAT_LEGACY_OPTGROUP, MatLegacyOption, MatLegacyOptionModule } from '@angular/material/legacy-core';
4import { _MatAutocompleteBase, _MatAutocompleteTriggerBase, _MatAutocompleteOriginBase, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/autocomplete';
5export { MAT_AUTOCOMPLETE_DEFAULT_OPTIONS as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS, MAT_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY as MAT_LEGACY_AUTOCOMPLETE_DEFAULT_OPTIONS_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY, MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER as MAT_LEGACY_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER, MatAutocompleteSelectedEvent as MatLegacyAutocompleteSelectedEvent, getMatAutocompleteMissingPanelError as getMatLegacyAutocompleteMissingPanelError } from '@angular/material/autocomplete';
6import * as i1 from '@angular/common';
7import { CommonModule } from '@angular/common';
8import { OverlayModule } from '@angular/cdk/overlay';
9import { MatCommonModule } from '@angular/material/core';
10import { CdkScrollableModule } from '@angular/cdk/scrolling';
11import { NG_VALUE_ACCESSOR } from '@angular/forms';
12
13/**
14 * @license
15 * Copyright Google LLC All Rights Reserved.
16 *
17 * Use of this source code is governed by an MIT-style license that can be
18 * found in the LICENSE file at https://angular.io/license
19 */
20/**
21 * @deprecated Use `MatAutocomplete` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
22 * @breaking-change 17.0.0
23 */
24class MatLegacyAutocomplete extends _MatAutocompleteBase {
25 constructor() {
26 super(...arguments);
27 this._visibleClass = 'mat-autocomplete-visible';
28 this._hiddenClass = 'mat-autocomplete-hidden';
29 }
30}
31MatLegacyAutocomplete.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocomplete, deps: null, target: i0.ɵɵFactoryTarget.Component });
32MatLegacyAutocomplete.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.0-rc.0", type: MatLegacyAutocomplete, selector: "mat-autocomplete", inputs: { disableRipple: "disableRipple" }, host: { classAttribute: "mat-autocomplete" }, providers: [{ provide: MAT_LEGACY_OPTION_PARENT_COMPONENT, useExisting: MatLegacyAutocomplete }], queries: [{ propertyName: "optionGroups", predicate: MAT_LEGACY_OPTGROUP, descendants: true }, { propertyName: "options", predicate: MatLegacyOption, descendants: true }], exportAs: ["matAutocomplete"], usesInheritance: true, ngImport: i0, 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", 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}"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
33i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocomplete, decorators: [{
34 type: Component,
35 args: [{ selector: 'mat-autocomplete', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, exportAs: 'matAutocomplete', inputs: ['disableRipple'], host: {
36 'class': 'mat-autocomplete',
37 }, providers: [{ provide: MAT_LEGACY_OPTION_PARENT_COMPONENT, useExisting: MatLegacyAutocomplete }], 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", 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}"] }]
38 }], propDecorators: { optionGroups: [{
39 type: ContentChildren,
40 args: [MAT_LEGACY_OPTGROUP, { descendants: true }]
41 }], options: [{
42 type: ContentChildren,
43 args: [MatLegacyOption, { descendants: true }]
44 }] } });
45
46/**
47 * @license
48 * Copyright Google LLC All Rights Reserved.
49 *
50 * Use of this source code is governed by an MIT-style license that can be
51 * found in the LICENSE file at https://angular.io/license
52 */
53/**
54 * Provider that allows the autocomplete to register as a ControlValueAccessor.
55 * @docs-private
56 * @deprecated Use `MAT_AUTOCOMPLETE_VALUE_ACCESSOR` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
57 * @breaking-change 17.0.0
58 */
59const MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR = {
60 provide: NG_VALUE_ACCESSOR,
61 useExisting: forwardRef(() => MatLegacyAutocompleteTrigger),
62 multi: true,
63};
64/**
65 * @deprecated Use `MatAutocompleteTrigger` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
66 * @breaking-change 17.0.0
67 */
68class MatLegacyAutocompleteTrigger extends _MatAutocompleteTriggerBase {
69 constructor() {
70 super(...arguments);
71 this._aboveClass = 'mat-autocomplete-panel-above';
72 }
73}
74MatLegacyAutocompleteTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteTrigger, deps: null, target: i0.ɵɵFactoryTarget.Directive });
75MatLegacyAutocompleteTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0-rc.0", type: MatLegacyAutocompleteTrigger, 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-autocomplete-trigger" }, providers: [MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR], exportAs: ["matAutocompleteTrigger"], usesInheritance: true, ngImport: i0 });
76i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteTrigger, decorators: [{
77 type: Directive,
78 args: [{
79 selector: `input[matAutocomplete], textarea[matAutocomplete]`,
80 host: {
81 'class': 'mat-autocomplete-trigger',
82 '[attr.autocomplete]': 'autocompleteAttribute',
83 '[attr.role]': 'autocompleteDisabled ? null : "combobox"',
84 '[attr.aria-autocomplete]': 'autocompleteDisabled ? null : "list"',
85 '[attr.aria-activedescendant]': '(panelOpen && activeOption) ? activeOption.id : null',
86 '[attr.aria-expanded]': 'autocompleteDisabled ? null : panelOpen.toString()',
87 '[attr.aria-owns]': '(autocompleteDisabled || !panelOpen) ? null : autocomplete?.id',
88 '[attr.aria-haspopup]': 'autocompleteDisabled ? null : "listbox"',
89 // Note: we use `focusin`, as opposed to `focus`, in order to open the panel
90 // a little earlier. This avoids issues where IE delays the focusing of the input.
91 '(focusin)': '_handleFocus()',
92 '(blur)': '_onTouched()',
93 '(input)': '_handleInput($event)',
94 '(keydown)': '_handleKeydown($event)',
95 '(click)': '_handleClick()',
96 },
97 exportAs: 'matAutocompleteTrigger',
98 providers: [MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR],
99 }]
100 }] });
101
102/**
103 * @license
104 * Copyright Google LLC All Rights Reserved.
105 *
106 * Use of this source code is governed by an MIT-style license that can be
107 * found in the LICENSE file at https://angular.io/license
108 */
109/**
110 * Directive applied to an element to make it usable
111 * as a connection point for an autocomplete panel.
112 * @deprecated Use `MatAutocompleteOrigin` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
113 * @breaking-change 17.0.0
114 */
115class MatLegacyAutocompleteOrigin extends _MatAutocompleteOriginBase {
116}
117MatLegacyAutocompleteOrigin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteOrigin, deps: null, target: i0.ɵɵFactoryTarget.Directive });
118MatLegacyAutocompleteOrigin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.0-rc.0", type: MatLegacyAutocompleteOrigin, selector: "[matAutocompleteOrigin]", exportAs: ["matAutocompleteOrigin"], usesInheritance: true, ngImport: i0 });
119i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteOrigin, decorators: [{
120 type: Directive,
121 args: [{
122 selector: '[matAutocompleteOrigin]',
123 exportAs: 'matAutocompleteOrigin',
124 }]
125 }] });
126
127/**
128 * @license
129 * Copyright Google LLC All Rights Reserved.
130 *
131 * Use of this source code is governed by an MIT-style license that can be
132 * found in the LICENSE file at https://angular.io/license
133 */
134/**
135 * @deprecated Use `MatAutocompleteModule` from `@angular/material/autocomplete` instead. See https://material.angular.io/guide/mdc-migration for information about migrating.
136 * @breaking-change 17.0.0
137 */
138class MatLegacyAutocompleteModule {
139}
140MatLegacyAutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
141MatLegacyAutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteModule, declarations: [MatLegacyAutocomplete, MatLegacyAutocompleteTrigger, MatLegacyAutocompleteOrigin], imports: [OverlayModule, MatLegacyOptionModule, MatCommonModule, CommonModule], exports: [MatLegacyAutocomplete,
142 MatLegacyAutocompleteTrigger,
143 MatLegacyAutocompleteOrigin,
144 CdkScrollableModule,
145 MatLegacyOptionModule,
146 MatCommonModule] });
147MatLegacyAutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteModule, providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [OverlayModule, MatLegacyOptionModule, MatCommonModule, CommonModule, CdkScrollableModule,
148 MatLegacyOptionModule,
149 MatCommonModule] });
150i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.0-rc.0", ngImport: i0, type: MatLegacyAutocompleteModule, decorators: [{
151 type: NgModule,
152 args: [{
153 imports: [OverlayModule, MatLegacyOptionModule, MatCommonModule, CommonModule],
154 exports: [
155 MatLegacyAutocomplete,
156 MatLegacyAutocompleteTrigger,
157 MatLegacyAutocompleteOrigin,
158 CdkScrollableModule,
159 MatLegacyOptionModule,
160 MatCommonModule,
161 ],
162 declarations: [MatLegacyAutocomplete, MatLegacyAutocompleteTrigger, MatLegacyAutocompleteOrigin],
163 providers: [MAT_AUTOCOMPLETE_SCROLL_STRATEGY_FACTORY_PROVIDER],
164 }]
165 }] });
166
167/**
168 * @license
169 * Copyright Google LLC All Rights Reserved.
170 *
171 * Use of this source code is governed by an MIT-style license that can be
172 * found in the LICENSE file at https://angular.io/license
173 */
174
175/**
176 * @license
177 * Copyright Google LLC All Rights Reserved.
178 *
179 * Use of this source code is governed by an MIT-style license that can be
180 * found in the LICENSE file at https://angular.io/license
181 */
182
183/**
184 * Generated bundle index. Do not edit.
185 */
186
187export { MAT_LEGACY_AUTOCOMPLETE_VALUE_ACCESSOR, MatLegacyAutocomplete, MatLegacyAutocompleteModule, MatLegacyAutocompleteOrigin, MatLegacyAutocompleteTrigger };
188//# sourceMappingURL=legacy-autocomplete.mjs.map