ng-zorro-antd
Version:
An enterprise-class UI components based on Ant Design and Angular
65 lines • 2.78 kB
TypeScript
import * as i0 from "@angular/core";
import { AfterContentInit, ElementRef, EventEmitter, OnChanges, SimpleChanges } from "@angular/core";
import { Observable } from "rxjs";
declare namespace resize_observer_directive_d_exports {
export { NzResizeObserverDirective };
}
export declare class NzResizeObserverDirective implements AfterContentInit, OnChanges {
private readonly resizeObserver;
private readonly elementRef;
private readonly destroyRef;
nzResizeObserverDisabled: boolean;
readonly nzResizeObserve: EventEmitter<ResizeObserverEntry[]>;
private currentSubscription;
private subscribe;
private unsubscribe;
constructor();
ngAfterContentInit(): void;
ngOnChanges(changes: SimpleChanges): void;
static ɵfac: i0.ɵɵFactoryDeclaration<NzResizeObserverDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NzResizeObserverDirective, "[nzResizeObserver]", never, {
"nzResizeObserverDisabled": {
"alias": "nzResizeObserverDisabled";
"required": false;
};
}, {
"nzResizeObserve": "nzResizeObserve";
}, never, never, true, never>;
static ngAcceptInputType_nzResizeObserverDisabled: unknown;
}
export declare class NzResizeObserverModule {
static ɵfac: i0.ɵɵFactoryDeclaration<NzResizeObserverModule, never>;
static ɵmod: i0.ɵɵNgModuleDeclaration<NzResizeObserverModule, never, [typeof NzResizeObserverDirective], [typeof NzResizeObserverDirective]>;
static ɵinj: i0.ɵɵInjectorDeclaration<NzResizeObserverModule>;
}
/**
* Factory that creates a new ResizeObserver and allows us to stub it out in unit tests.
*/
export declare class NzResizeObserverFactory {
create(callback: ResizeObserverCallback): ResizeObserver | null;
static ɵfac: i0.ɵɵFactoryDeclaration<NzResizeObserverFactory, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}
/** An injectable service that allows watching elements for changes to their content. */
export declare class NzResizeObserver {
private nzResizeObserverFactory;
private destroyRef;
/** Keeps track of the existing ResizeObservers so they can be reused. */
private observedElements;
constructor();
observe(elementOrRef: Element | ElementRef<Element>): Observable<ResizeObserverEntry[]>;
/**
* Observes the given element by using the existing ResizeObserver if available, or creating a
* new one if not.
*/
private observeElement;
/**
* Un-observes the given element and cleans up the underlying ResizeObserver if nobody else is
* observing this element.
*/
private unobserveElement;
/** Clean up the underlying ResizeObserver for the specified element. */
private cleanupObserver;
static ɵfac: i0.ɵɵFactoryDeclaration<NzResizeObserver, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
}