Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ng-click-outside2

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ng-click-outside2 - npm Package Compare versions

Comparing version 11.1.0 to 11.2.0

53

lib/ng-click-outside.directive.d.ts
import { ElementRef, EventEmitter, NgZone, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Directove to detect clicks outside of the current element
*
* ```typescript
* @Component({
* selector: 'app',
* template: `
* <div (clickOutside)="onClickedOutside($event)">Click outside this</div>
* `
* })
* export class AppComponent {
* onClickedOutside(e: Event) {
* console.log('Clicked outside:', e);
* }
* }
* ```
*/
export declare class NgClickOutsideDirective implements OnInit, OnChanges, OnDestroy {

@@ -7,9 +24,45 @@ private _el;

private document;
/**
* Enables directive.
*/
clickOutsideEnabled: boolean;
/**
* 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;
/**
* If enabled, emits an event when user clicks outside of applications' window while it's visible.
* Especially useful if page contains iframes.
*/
emitOnBlur: boolean;
/**
* A comma-separated string of DOM element queries to exclude when clicking outside of the element.
* For example: `[exclude]="'button,.btn-primary'"`.
*/
exclude: string;
/**
* 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`).
*/
excludeBeforeClick: boolean;
/**
* A comma-separated list of events to cause the trigger.
* ### For example, for additional mobile support:
* `[clickOutsideEvents]="'click,touchstart'"`
*/
clickOutsideEvents: string;
/**
* Outside Click Event
*/
clickOutside: EventEmitter<Event>;

@@ -16,0 +69,0 @@ private _nodesExcluded;

2

package.json
{
"name": "ng-click-outside2",
"version": "11.1.0",
"version": "11.2.0",
"description": "Angular directive for handling click events outside an element.",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -29,5 +29,5 @@ # ng-click-outside2

| Angular | Version | NPM |
| -- |---------|---|
| 13 | 10.x.x | `ng-click-outside2@^10.0.0` |
| 14 | 11.x.x | `ng-click-outside2@^11.0.0` |
|---------|---------|---|
| 13 | 10.x.x | `ng-click-outside2@^10.0.0` |
| 14,15,16 | 11.x.x | `ng-click-outside2@^11.0.0` |

@@ -38,3 +38,3 @@ If you still use Angular <= 12 please use the original package. https://www.npmjs.com/package/ng-click-outside

Add `ClickOutsideModule` to your list of module imports:
Add `NgClickOutsideDirective` to your list of module imports:

@@ -41,0 +41,0 @@ ```typescript

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc