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

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

initial commit

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