import * as i0 from '@angular/core'; import { OnDestroy, ElementRef, NgZone } from '@angular/core'; /** * Optimization for Treeshaking: https://angular.io/guide/lightweight-injection-tokens */ declare abstract class NgClickOutsideExcludeToken { abstract isExclude(target: any): boolean; } /** * Directive to exclude elements from the click-outside */ declare class NgClickOutsideExcludeDirective extends NgClickOutsideExcludeToken { /** * A comma-separated string of DOM element queries to exclude when clicking outside of the element. * For example: `[exclude]="'button,.btn-primary'"`. */ clickOutsideExclude: i0.InputSignal; private document; excludeCheck(): HTMLElement[]; isExclude(target: any): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive to detect clicks outside of the current element * * ```typescript * @Component({ * selector: 'app', * template: ` *
Click outside this
* ` * }) * export class AppComponent { * onClickedOutside(e: Event) { * console.log('Clicked outside:', e); * } * } * ``` */ declare class NgClickOutsideDirective implements OnDestroy { /** * Enables directive. */ clickOutsideEnabled: i0.InputSignalWithTransform; /** * A comma-separated list of events to cause the trigger. * ### For example, for additional mobile support: * `[clickOutsideEvents]="'click,touchstart'"` */ clickOutsideEvents: i0.InputSignalWithTransform; /** * Outside Click Event */ clickOutside: i0.OutputEmitterRef; excludeDirective: NgClickOutsideExcludeToken | null; protected _el: ElementRef; protected _ngZone: NgZone; private document; lastRemoved?: Node[]; mutationObserver?: MutationObserver; constructor(); ngOnDestroy(): void; protected _init(): void; protected _initOnClickBody(): void; protected _emit(ev: Event): void; protected initListener(): void; private initMutationObserver; protected _initClickOutsideListener(): void; protected _removeClickOutsideListener(): void; private _onClickBody; protected gotRemoved(target: Node, list?: Node[] | undefined): boolean; private resetLastRemovedList; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Directive only starts after a single click and the outside click event handler * will then be removed after a click outside has occurred. */ declare class NgClickOutsideAttachOutsideDirective extends NgClickOutsideDirective implements OnDestroy { /** * By default, the outside click event handler is automatically attached. * * Explicitely setting this to `true`sets the handler after the element is clicked. The outside click event handler * will then be removed after a click outside has occurred. */ attachOutsideOnClick: i0.InputSignalWithTransform; constructor(); ngOnDestroy(): void; protected _init(): void; protected _emit(ev: Event): void; protected _initAttachOutsideOnClickListener(): void; protected _removeAttachOutsideOnClickListener(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * Click oustside Directive but with an setTimeout on the listener * This may help for items that are conditionally shown ([see issue #13](https://github.com/arkon/ng-click-outside/issues/13)). */ declare class NgClickOutsideDelayOutsideDirective extends NgClickOutsideDirective { /** * Delays the initialization of the click outside handler. * This may help for items that are conditionally shown ([see issue #13](https://github.com/arkon/ng-click-outside/issues/13)). */ delayClickOutsideInit: i0.InputSignalWithTransform; protected _initOnClickBody(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * emits an event when user clicks outside of applications' window while it's visible. * Especially useful if page contains iframes. */ declare class NgClickOutsideEmitOnBlurDirective implements OnDestroy { private _ngZone; private document; blurWindow: i0.OutputEmitterRef; constructor(); ngOnDestroy(): void; private _initWindowBlurListener; /** * Resolves problem with outside click on iframe * @see https://github.com/arkon/ng-click-outside/issues/32 */ private _onWindowBlur; private _removeWindowBlurListener; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } export { NgClickOutsideAttachOutsideDirective, NgClickOutsideDelayOutsideDirective, NgClickOutsideDirective, NgClickOutsideEmitOnBlurDirective, NgClickOutsideExcludeDirective, NgClickOutsideExcludeToken };