ng-click-outside2
Advanced tools
Comparing version 14.0.1 to 15.0.0
@@ -1,2 +0,2 @@ | ||
import { EventEmitter, OnChanges, OnDestroy, SimpleChanges } from '@angular/core'; | ||
import { ElementRef, EventEmitter, NgZone, OnDestroy } from '@angular/core'; | ||
import { NgClickOutsideExcludeToken } from "./ng-click-outside-exclude.directive"; | ||
@@ -21,3 +21,3 @@ import * as i0 from "@angular/core"; | ||
*/ | ||
export declare class NgClickOutsideDirective implements OnChanges, OnDestroy { | ||
export declare class NgClickOutsideDirective implements OnDestroy { | ||
/** | ||
@@ -28,14 +28,2 @@ * Enables directive. | ||
/** | ||
* 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: boolean; | ||
/** | ||
* 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: boolean; | ||
/** | ||
* A comma-separated list of events to cause the trigger. | ||
@@ -45,3 +33,3 @@ * ### For example, for additional mobile support: | ||
*/ | ||
clickOutsideEvents: string; | ||
clickOutsideEvents: string[]; | ||
/** | ||
@@ -52,19 +40,17 @@ * Outside Click Event | ||
excludeDirective: NgClickOutsideExcludeToken | null; | ||
private _el; | ||
private _ngZone; | ||
protected _el: ElementRef<any>; | ||
protected _ngZone: NgZone; | ||
private document; | ||
private _events; | ||
constructor(); | ||
ngOnDestroy(): void; | ||
ngOnChanges(changes: SimpleChanges): void; | ||
private _init; | ||
private _initOnClickBody; | ||
protected _init(): void; | ||
protected _initOnClickBody(): void; | ||
protected _emit(ev: Event): void; | ||
protected _initClickOutsideListener(): void; | ||
protected _removeClickOutsideListener(): void; | ||
private _onClickBody; | ||
private _emit; | ||
private _initClickOutsideListener; | ||
private _removeClickOutsideListener; | ||
private _initAttachOutsideOnClickListener; | ||
private _removeAttachOutsideOnClickListener; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<NgClickOutsideDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClickOutsideDirective, "[clickOutside]", never, { "clickOutsideEnabled": { "alias": "clickOutsideEnabled"; "required": false; }; "attachOutsideOnClick": { "alias": "attachOutsideOnClick"; "required": false; }; "delayClickOutsideInit": { "alias": "delayClickOutsideInit"; "required": false; }; "clickOutsideEvents": { "alias": "clickOutsideEvents"; "required": false; }; }, { "clickOutside": "clickOutside"; }, never, never, true, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClickOutsideDirective, "[clickOutside]:not([delayClickOutsideInit]):not([attachOutsideOnClick])", never, { "clickOutsideEnabled": { "alias": "clickOutsideEnabled"; "required": false; }; "clickOutsideEvents": { "alias": "clickOutsideEvents"; "required": false; }; }, { "clickOutside": "clickOutside"; }, never, never, true, never>; | ||
static ngAcceptInputType_clickOutsideEnabled: unknown; | ||
static ngAcceptInputType_clickOutsideEvents: string | string[]; | ||
} |
{ | ||
"name": "ng-click-outside2", | ||
"version": "14.0.1", | ||
"version": "15.0.0", | ||
"description": "Angular directive for handling click events outside an element.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
export * from './lib/ng-click-outside.directive'; | ||
export * from './lib/ng-click-outside-attach-outside.directive'; | ||
export * from './lib/ng-click-outside-delay-outside.directive'; | ||
export * from './lib/ng-click-outside-exclude.directive'; | ||
export * from './lib/ng-click-outside-emit-on-blur.directive'; |
@@ -38,17 +38,17 @@ # ng-click-outside2 | ||
| 17 | 13.x.x | `ng-click-outside2@^13.0.0` | | ||
| 17 | 14.x.x | `ng-click-outside2@^14.0.0` | | ||
| 17 | 15.x.x | `ng-click-outside2@^15.0.0` | | ||
If you use Angular <= 12 please use the original package. https://www.npmjs.com/package/ng-click-outside | ||
### Options | ||
| Property name | Type | Default | Description | | ||
| ------------- |---------|-----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `attachOutsideOnClick` | boolean | `false` | 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. | | ||
| `clickOutsideEnabled` | boolean | `true` | Enables directive. | | ||
| `clickOutsideEvents` | string | `'click'` | A comma-separated list of events to cause the trigger. For example, for additional mobile support: `[clickOutsideEvents]="'click,touchstart'"`. | | ||
| `delayClickOutsideInit` | boolean | `false` | 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)). | | ||
| `clickOutsideEmitOnBlur` | - | - | If enabled, emits an `blurWindow` event when user clicks outside of applications' window while it's visible. Especially useful if page contains iframes. (Import `NgClickOutsideEmitOnBlurDirective`) | | ||
| `clickOutsideExclude` | string | | A comma-separated string of DOM element queries to exclude when clicking outside of the element. (Import NgClickOutsideExcludeDirective) For example: `[clickOutsideExclude]="'button,.btn-primary'"`. | | ||
| Property name | Type | Default | Description | | ||
| ------------- |---------|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ||
| `attachOutsideOnClick` | boolean | `false` | 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. (Import: `NgClickOutsideAttachOutsideDirective`) | | ||
| `clickOutsideEnabled` | boolean | `true` | Enables directive. | | ||
| `clickOutsideEvents` | string | `'click'` | A comma-separated list of events to cause the trigger. For example, for additional mobile support: `[clickOutsideEvents]="'click,touchstart'"`. | | ||
| `delayClickOutsideInit` | boolean | `false` | 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)). (Import `NgClickOutsideDelayOutsideDirective`) | | ||
| `clickOutsideEmitOnBlur` | - | - | If enabled, emits an `blurWindow` event when user clicks outside of applications' window while it's visible. Especially useful if page contains iframes. (Import `NgClickOutsideEmitOnBlurDirective`) | | ||
| `clickOutsideExclude` | string | | A comma-separated string of DOM element queries to exclude when clicking outside of the element. (Import NgClickOutsideExcludeDirective) For example: `[clickOutsideExclude]="'button,.btn-primary'"`. | | ||
@@ -55,0 +55,0 @@ ## Example Usage |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81995
20
759