source: trip-planner-front/node_modules/@angular/cdk/text-field/autofill.d.ts@ 6c1585f

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

initial commit

  • Property mode set to 100644
File size: 2.7 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 { Platform } from '@angular/cdk/platform';
9import { ElementRef, EventEmitter, NgZone, OnDestroy, OnInit } from '@angular/core';
10import { Observable } from 'rxjs';
11/** An event that is emitted when the autofill state of an input changes. */
12import * as ɵngcc0 from '@angular/core';
13export declare type AutofillEvent = {
14 /** The element whose autofill state changes. */
15 target: Element;
16 /** Whether the element is currently autofilled. */
17 isAutofilled: boolean;
18};
19/**
20 * An injectable service that can be used to monitor the autofill state of an input.
21 * Based on the following blog post:
22 * https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7
23 */
24export declare class AutofillMonitor implements OnDestroy {
25 private _platform;
26 private _ngZone;
27 private _monitoredElements;
28 constructor(_platform: Platform, _ngZone: NgZone);
29 /**
30 * Monitor for changes in the autofill state of the given input element.
31 * @param element The element to monitor.
32 * @return A stream of autofill state changes.
33 */
34 monitor(element: Element): Observable<AutofillEvent>;
35 /**
36 * Monitor for changes in the autofill state of the given input element.
37 * @param element The element to monitor.
38 * @return A stream of autofill state changes.
39 */
40 monitor(element: ElementRef<Element>): Observable<AutofillEvent>;
41 /**
42 * Stop monitoring the autofill state of the given input element.
43 * @param element The element to stop monitoring.
44 */
45 stopMonitoring(element: Element): void;
46 /**
47 * Stop monitoring the autofill state of the given input element.
48 * @param element The element to stop monitoring.
49 */
50 stopMonitoring(element: ElementRef<Element>): void;
51 ngOnDestroy(): void;
52 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<AutofillMonitor, never>;
53}
54/** A directive that can be used to monitor the autofill state of an input. */
55export declare class CdkAutofill implements OnDestroy, OnInit {
56 private _elementRef;
57 private _autofillMonitor;
58 /** Emits when the autofill state of the element changes. */
59 readonly cdkAutofill: EventEmitter<AutofillEvent>;
60 constructor(_elementRef: ElementRef<HTMLElement>, _autofillMonitor: AutofillMonitor);
61 ngOnInit(): void;
62 ngOnDestroy(): void;
63 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkAutofill, never>;
64 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkAutofill, "[cdkAutofill]", never, {}, { "cdkAutofill": "cdkAutofill"; }, never>;
65}
66
67//# sourceMappingURL=autofill.d.ts.map
Note: See TracBrowser for help on using the repository browser.