ng-click-outside2
Advanced tools
Comparing version 10.0.4 to 11.0.0
@@ -6,3 +6,3 @@ import { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core'; | ||
private _ngZone; | ||
private platformId; | ||
private document; | ||
clickOutsideEnabled: boolean; | ||
@@ -18,3 +18,3 @@ attachOutsideOnClick: boolean; | ||
private _events; | ||
constructor(_el: ElementRef, _ngZone: NgZone, platformId: Object); | ||
constructor(_el: ElementRef, _ngZone: NgZone, document: Document); | ||
ngOnInit(): void; | ||
@@ -41,3 +41,3 @@ ngOnDestroy(): void; | ||
static ɵfac: i0.ɵɵFactoryDeclaration<NgClickOutsideDirective, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClickOutsideDirective, "[clickOutside]", never, { "clickOutsideEnabled": "clickOutsideEnabled"; "attachOutsideOnClick": "attachOutsideOnClick"; "delayClickOutsideInit": "delayClickOutsideInit"; "emitOnBlur": "emitOnBlur"; "exclude": "exclude"; "excludeBeforeClick": "excludeBeforeClick"; "clickOutsideEvents": "clickOutsideEvents"; }, { "clickOutside": "clickOutside"; }, never>; | ||
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClickOutsideDirective, "[clickOutside]", never, { "clickOutsideEnabled": "clickOutsideEnabled"; "attachOutsideOnClick": "attachOutsideOnClick"; "delayClickOutsideInit": "delayClickOutsideInit"; "emitOnBlur": "emitOnBlur"; "exclude": "exclude"; "excludeBeforeClick": "excludeBeforeClick"; "clickOutsideEvents": "clickOutsideEvents"; }, { "clickOutside": "clickOutside"; }, never, never, false>; | ||
} |
@@ -0,0 +0,0 @@ import * as i0 from "@angular/core"; |
{ | ||
"name": "ng-click-outside2", | ||
"version": "10.0.4", | ||
"version": "11.0.0", | ||
"description": "Angular directive for handling click events outside an element.", | ||
@@ -20,4 +20,4 @@ "license": "MIT", | ||
"peerDependencies": { | ||
"@angular/common": ">=13.0.0", | ||
"@angular/core": ">=13.0.0" | ||
"@angular/common": ">=14.0.0", | ||
"@angular/core": ">=14.0.0" | ||
}, | ||
@@ -32,3 +32,3 @@ "dependencies": { | ||
"fesm2015": "fesm2015/ng-click-outside2.mjs", | ||
"typings": "ng-click-outside2.d.ts", | ||
"typings": "index.d.ts", | ||
"exports": { | ||
@@ -39,3 +39,3 @@ "./package.json": { | ||
".": { | ||
"types": "./ng-click-outside2.d.ts", | ||
"types": "./index.d.ts", | ||
"esm2020": "./esm2020/ng-click-outside2.mjs", | ||
@@ -42,0 +42,0 @@ "es2020": "./fesm2020/ng-click-outside2.mjs", |
export * from './lib/ng-click-outside.module'; | ||
export * from './lib/ng-click-outside.directive'; |
# ng-click-outside2 | ||
angular 13 version of https://www.npmjs.com/package/ng-click-outside If you still use Angular 12 or older please use the original package. | ||
[![NPM](https://img.shields.io/npm/v/ng-click-outside2?color=orange&style=flat-square)](https://www.npmjs.com/package/ng-click-outside2) | ||
[![License](https://img.shields.io/github/license/Kr0san89/ng-click-outside?color=blue&style=flat-square)](https://github.com/Kr0san89/ng-click-outside/blob/master/LICENSE) | ||
Migration | ||
Angular directive for handling click events outside an element. | ||
``` | ||
// change imports | ||
import { ClickOutsideModule } from 'ng-click-outside'; | ||
// to | ||
import {NgClickOutsideModule} from 'ng-click-outside2'; | ||
// and in Module import | ||
ClickOutsideModule | ||
// to | ||
NgClickOutsideModule | ||
``` | ||
--- | ||
Angular directive for handling click events outside an element. Useful for things like reacting to clicking | ||
outside of a dropdown menu or modal dialog. | ||
Like binding to a regular `click` event in a template, you can do something like this: | ||
@@ -31,2 +15,7 @@ | ||
## Table of contents | ||
1. [Installation](#installation) | ||
2. [Compatibility](#compatibility) | ||
3. [Usage](#usage) | ||
4. [Migration from ng-click-outside](#migration-from-ng-click-outside) | ||
@@ -36,6 +25,13 @@ ## Installation | ||
```shell | ||
npm install --save ng-click-outside | ||
npm install --save ng-click-outside2 | ||
``` | ||
## Compatibility | ||
| Angular | Version | NPM | | ||
| -- |---------|---| | ||
| 13 | 10.x.x | `ng-click-outside2@^10.0.0` | | ||
| 14 | 11.x.x | `ng-click-outside2@^11.0.0` | | ||
If you still use Angular <= 12 please use the original package. https://www.npmjs.com/package/ng-click-outside | ||
## Usage | ||
@@ -83,1 +79,16 @@ | ||
| `excludeBeforeClick` | boolean | `false` | By default, `clickOutside` registers excluded DOM elements on init. This property refreshes the list before the `clickOutside` event is triggered. This is useful for ensuring that excluded elements added to the DOM after init are excluded (e.g. ng2-bootstrap popover: this allows for clicking inside the `.popover-content` area if specified in `exclude`). | | ||
## Migration from ng-click-outside | ||
``` | ||
// change imports | ||
import { ClickOutsideModule } from 'ng-click-outside'; | ||
// to | ||
import {NgClickOutsideModule} from 'ng-click-outside2'; | ||
// and in Module import | ||
ClickOutsideModule | ||
// to | ||
NgClickOutsideModule | ||
``` | ||
--- |
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
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
92
67460
628