source: trip-planner-front/node_modules/@angular/cdk/observers/observe-content.d.ts@ e29cc2e

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

initial commit

  • Property mode set to 100644
File size: 3.8 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 { BooleanInput, NumberInput } from '@angular/cdk/coercion';
9import { AfterContentInit, ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core';
10import { Observable } from 'rxjs';
11/**
12 * Factory that creates a new MutationObserver and allows us to stub it out in unit tests.
13 * @docs-private
14 */
15import * as ɵngcc0 from '@angular/core';
16export declare class MutationObserverFactory {
17 create(callback: MutationCallback): MutationObserver | null;
18 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<MutationObserverFactory, never>;
19}
20/** An injectable service that allows watching elements for changes to their content. */
21export declare class ContentObserver implements OnDestroy {
22 private _mutationObserverFactory;
23 /** Keeps track of the existing MutationObservers so they can be reused. */
24 private _observedElements;
25 constructor(_mutationObserverFactory: MutationObserverFactory);
26 ngOnDestroy(): void;
27 /**
28 * Observe content changes on an element.
29 * @param element The element to observe for content changes.
30 */
31 observe(element: Element): Observable<MutationRecord[]>;
32 /**
33 * Observe content changes on an element.
34 * @param element The element to observe for content changes.
35 */
36 observe(element: ElementRef<Element>): Observable<MutationRecord[]>;
37 /**
38 * Observes the given element by using the existing MutationObserver if available, or creating a
39 * new one if not.
40 */
41 private _observeElement;
42 /**
43 * Un-observes the given element and cleans up the underlying MutationObserver if nobody else is
44 * observing this element.
45 */
46 private _unobserveElement;
47 /** Clean up the underlying MutationObserver for the specified element. */
48 private _cleanupObserver;
49 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ContentObserver, never>;
50}
51/**
52 * Directive that triggers a callback whenever the content of
53 * its associated element has changed.
54 */
55export declare class CdkObserveContent implements AfterContentInit, OnDestroy {
56 private _contentObserver;
57 private _elementRef;
58 private _ngZone;
59 /** Event emitted for each change in the element's content. */
60 readonly event: EventEmitter<MutationRecord[]>;
61 /**
62 * Whether observing content is disabled. This option can be used
63 * to disconnect the underlying MutationObserver until it is needed.
64 */
65 get disabled(): any;
66 set disabled(value: any);
67 private _disabled;
68 /** Debounce interval for emitting the changes. */
69 get debounce(): number;
70 set debounce(value: number);
71 private _debounce;
72 private _currentSubscription;
73 constructor(_contentObserver: ContentObserver, _elementRef: ElementRef<HTMLElement>, _ngZone: NgZone);
74 ngAfterContentInit(): void;
75 ngOnDestroy(): void;
76 private _subscribe;
77 private _unsubscribe;
78 static ngAcceptInputType_disabled: BooleanInput;
79 static ngAcceptInputType_debounce: NumberInput;
80 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<CdkObserveContent, never>;
81 static ɵdir: ɵngcc0.ɵɵDirectiveDeclaration<CdkObserveContent, "[cdkObserveContent]", ["cdkObserveContent"], { "disabled": "cdkObserveContentDisabled"; "debounce": "debounce"; }, { "event": "cdkObserveContent"; }, never>;
82}
83export declare class ObserversModule {
84 static ɵfac: ɵngcc0.ɵɵFactoryDeclaration<ObserversModule, never>;
85 static ɵmod: ɵngcc0.ɵɵNgModuleDeclaration<ObserversModule, [typeof CdkObserveContent], never, [typeof CdkObserveContent]>;
86 static ɵinj: ɵngcc0.ɵɵInjectorDeclaration<ObserversModule>;
87}
88
89//# sourceMappingURL=observe-content.d.ts.map
Note: See TracBrowser for help on using the repository browser.