v-click-outside-x
Advanced tools
Comparing version 4.0.15 to 4.0.16
@@ -154,2 +154,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
}) === 1) { | ||
/* istanbul ignore next */ | ||
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document) { | ||
@@ -179,2 +180,3 @@ document.addEventListener(arg, getEventHandler(useCapture, arg), useCapture); | ||
} else { | ||
/* istanbul ignore next */ | ||
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document) { | ||
@@ -199,3 +201,3 @@ document.removeEventListener(eventName, getEventHandler(useCapture, eventName), useCapture); | ||
enumerable: true, | ||
value: '4.0.15' | ||
value: '4.0.16' | ||
} | ||
@@ -202,0 +204,0 @@ }); |
@@ -5,9 +5,9 @@ /*! | ||
"copywrite": "Copyright (c) 2018-present", | ||
"date": "2019-07-31T17:42:01.813Z", | ||
"date": "2019-08-07T21:17:53.380Z", | ||
"describe": "", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
"file": "v-click-outside-x.js", | ||
"hash": "207bc2d3bc1d1b650c71", | ||
"hash": "0372740c8418f0a1b7e2", | ||
"license": "MIT", | ||
"version": "4.0.15" | ||
"version": "4.0.16" | ||
} | ||
@@ -288,2 +288,3 @@ */ | ||
}) === 1) { | ||
/* istanbul ignore next */ | ||
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document) { | ||
@@ -313,2 +314,3 @@ document.addEventListener(arg, getEventHandler(useCapture, arg), useCapture); | ||
} else { | ||
/* istanbul ignore next */ | ||
if ((typeof document === "undefined" ? "undefined" : _typeof(document)) === 'object' && document) { | ||
@@ -333,3 +335,3 @@ document.removeEventListener(eventName, getEventHandler(useCapture, eventName), useCapture); | ||
enumerable: true, | ||
value: '4.0.15' | ||
value: '4.0.16' | ||
} | ||
@@ -336,0 +338,0 @@ }); |
@@ -5,12 +5,12 @@ /*! | ||
"copywrite": "Copyright (c) 2018-present", | ||
"date": "2019-07-31T17:42:01.813Z", | ||
"date": "2019-08-07T21:17:53.380Z", | ||
"describe": "", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
"file": "v-click-outside-x.min.js", | ||
"hash": "4903db581c5efc479a28", | ||
"hash": "e2def3ff7da8ffef1535", | ||
"license": "MIT", | ||
"version": "4.0.15" | ||
"version": "4.0.16" | ||
} | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vClickOutsideX=t():e.vClickOutsideX=t()}(function(){"use strict";return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")()}(),function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,"directive",function(){return b}),n.d(t,"install",function(){return y});var c=Object.create(null),f=Object.create(null),l=Object.create(null),a=Object.create(null),d=[c,f],p=function(e,t,n,r){var o=n.target;t[r].forEach(function(t){var r=t.el;if(r!==o&&!r.contains(o)){var u=t.binding;u.modifiers.stop&&n.stopPropagation(),u.modifiers.prevent&&n.preventDefault(),u.value.call(e,n)}})},s=function(e,t){return e?l[t]?l[t]:(l[t]=function(e){p(this,c,e,t)},l[t]):a[t]?a[t]:(a[t]=function(e){p(this,f,e,t)},a[t])},b=Object.defineProperties({},{$captureInstances:{value:c},$nonCaptureInstances:{value:f},$captureEventHandlers:{value:l},$nonCaptureEventHandlers:{value:a},bind:{value:function(e,t){if("function"!=typeof t.value)throw new TypeError("Binding value must be a function.");var n=t.arg||"click",o=u({},t,{},{arg:n,modifiers:u({},{capture:!1,prevent:!1,stop:!1},{},t.modifiers)}),i=o.modifiers.capture,l=i?c:f;Array.isArray(l[n])||(l[n]=[]),1===l[n].push({el:e,binding:o})&&"object"===("undefined"==typeof document?"undefined":r(document))&&document&&document.addEventListener(n,s(i,n),i)}},unbind:{value:function(e){var t=function(t){return t.el!==e};d.forEach(function(e){var n=Object.keys(e);if(n.length){var o=e===c;n.forEach(function(n){var u=e[n].filter(t);u.length?e[n]=u:("object"===("undefined"==typeof document?"undefined":r(document))&&document&&document.removeEventListener(n,s(o,n),o),delete e[n])})}})}},version:{enumerable:!0,value:"4.0.15"}});function y(e){e.directive("click-outside",b)}}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.vClickOutsideX=t():e.vClickOutsideX=t()}(function(){"use strict";return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:Function("return this")()}(),function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(n,!0).forEach(function(t){i(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(n).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.r(t),n.d(t,"directive",function(){return b}),n.d(t,"install",function(){return y});var c=Object.create(null),f=Object.create(null),l=Object.create(null),a=Object.create(null),d=[c,f],p=function(e,t,n,r){var o=n.target;t[r].forEach(function(t){var r=t.el;if(r!==o&&!r.contains(o)){var u=t.binding;u.modifiers.stop&&n.stopPropagation(),u.modifiers.prevent&&n.preventDefault(),u.value.call(e,n)}})},s=function(e,t){return e?l[t]?l[t]:(l[t]=function(e){p(this,c,e,t)},l[t]):a[t]?a[t]:(a[t]=function(e){p(this,f,e,t)},a[t])},b=Object.defineProperties({},{$captureInstances:{value:c},$nonCaptureInstances:{value:f},$captureEventHandlers:{value:l},$nonCaptureEventHandlers:{value:a},bind:{value:function(e,t){if("function"!=typeof t.value)throw new TypeError("Binding value must be a function.");var n=t.arg||"click",o=u({},t,{},{arg:n,modifiers:u({},{capture:!1,prevent:!1,stop:!1},{},t.modifiers)}),i=o.modifiers.capture,l=i?c:f;Array.isArray(l[n])||(l[n]=[]),1===l[n].push({el:e,binding:o})&&"object"===("undefined"==typeof document?"undefined":r(document))&&document&&document.addEventListener(n,s(i,n),i)}},unbind:{value:function(e){var t=function(t){return t.el!==e};d.forEach(function(e){var n=Object.keys(e);if(n.length){var o=e===c;n.forEach(function(n){var u=e[n].filter(t);u.length?e[n]=u:("object"===("undefined"==typeof document?"undefined":r(document))&&document&&document.removeEventListener(n,s(o,n),o),delete e[n])})}})}},version:{enumerable:!0,value:"4.0.16"}});function y(e){e.directive("click-outside",b)}}])}); | ||
//# sourceMappingURL=v-click-outside-x.min.js.map |
{ | ||
"name": "v-click-outside-x", | ||
"version": "4.0.15", | ||
"version": "4.0.16", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
@@ -31,3 +31,3 @@ "homepage": "https://github.com/Xotic750/v-click-outside-x.git", | ||
"test": "npm run clean:coverage && jest", | ||
"test:ci": "npm run test -- --ci --maxWorkers=2", | ||
"test:ci": "npm run test -- --ci --maxWorkers=2 --coverage --coverageReporters=text-lcov | coveralls", | ||
"test:coverage": "npm run test -- --coverage" | ||
@@ -64,7 +64,7 @@ }, | ||
"@babel/runtime": "^7.5.5", | ||
"@xotic750/eslint-config-recommended": "^1.0.4", | ||
"@types/jest": "^24.0.16", | ||
"@types/node": "^12.6.8", | ||
"@types/jest": "^24.0.17", | ||
"@types/node": "^12.7.0", | ||
"@typescript-eslint/eslint-plugin": "^1.13.0", | ||
"@typescript-eslint/parser": "^1.13.0", | ||
"@xotic750/eslint-config-recommended": "^1.0.6", | ||
"babel-core": "^7.0.0-0", | ||
@@ -74,3 +74,4 @@ "babel-eslint": "^10.0.2", | ||
"babel-plugin-lodash": "^3.3.4", | ||
"caniuse-lite": "^1.0.30000988", | ||
"caniuse-lite": "^1.0.30000989", | ||
"coveralls": "^3.0.6", | ||
"cross-env": "^5.2.0", | ||
@@ -89,6 +90,6 @@ "eslint": "=5.16.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.14.1", | ||
"eslint-plugin-jest": "^22.15.0", | ||
"eslint-plugin-jsdoc": "^15.8.0", | ||
"eslint-plugin-json": "^1.4.0", | ||
"eslint-plugin-lodash": "^5.1.0", | ||
"eslint-plugin-lodash": "^5.1.1", | ||
"eslint-plugin-no-use-extend-native": "^0.4.1", | ||
@@ -107,3 +108,3 @@ "eslint-plugin-prefer-object-spread": "^1.2.1", | ||
"mkdirp": "^0.5.1", | ||
"node-notifier": "^5.4.0", | ||
"node-notifier": "^5.4.1", | ||
"nodemon": "^1.19.1", | ||
@@ -116,3 +117,3 @@ "prettier": "^1.18.2", | ||
"typescript": "^3.5.3", | ||
"webpack": "^4.38.0", | ||
"webpack": "^4.39.1", | ||
"webpack-bundle-analyzer": "^3.4.1", | ||
@@ -119,0 +120,0 @@ "webpack-cli": "^3.3.6", |
@@ -26,2 +26,8 @@ <a href="https://travis-ci.org/Xotic750/v-click-outside-x" | ||
</a> | ||
<a | ||
href="https://coveralls.io/github/Xotic750/v-click-outside-x?branch=master" | ||
title="Coverage Status"> | ||
<img src="https://coveralls.io/repos/github/Xotic750/v-click-outside-x/badge.svg?branch=master" | ||
alt="Coverage Status" height="18"> | ||
</a> | ||
@@ -53,10 +59,10 @@ <a name="v-click-outside-x"></a> | ||
```js | ||
```html | ||
<script> | ||
export default { | ||
methods: { | ||
onClickOutside (event) { | ||
console.log('Clicked outside. Event: ', event) | ||
} | ||
} | ||
onClickOutside(event) { | ||
console.log('Clicked outside. Event: ', event); | ||
}, | ||
}, | ||
}; | ||
@@ -72,15 +78,13 @@ </script> | ||
```js | ||
import * as vClickOutside from 'v-click-outside-x' | ||
```html | ||
<script> | ||
export default { | ||
directives: { | ||
clickOutside: vClickOutside.directive | ||
clickOutside: vClickOutside.directive, | ||
}, | ||
methods: { | ||
onClickOutside (event) { | ||
console.log('Clicked outside. Event: ', event) | ||
} | ||
} | ||
onClickOutside(event) { | ||
console.log('Clicked outside. Event: ', event); | ||
}, | ||
}, | ||
}; | ||
@@ -103,3 +107,3 @@ </script> | ||
```js | ||
```html | ||
<template> | ||
@@ -125,10 +129,10 @@ <!-- the click event´s propagation will be stopped --> | ||
```js | ||
```html | ||
<script> | ||
export default { | ||
methods: { | ||
onClickOutside (event) { | ||
console.log('Clicked outside. Event: ', event) | ||
} | ||
} | ||
onClickOutside(event) { | ||
console.log('Clicked outside. Event: ', event); | ||
}, | ||
}, | ||
}; | ||
@@ -147,16 +151,16 @@ </script> | ||
```js | ||
```html | ||
<script> | ||
export default { | ||
methods: { | ||
onClickOutside1 (event) { | ||
console.log('Clicked outside 1. Event: ', event) | ||
onClickOutside1(event) { | ||
console.log('Clicked outside 1. Event: ', event); | ||
}, | ||
onClickOutside2 (event) { | ||
console.log('Clicked outside 2. Event: ', event) | ||
onClickOutside2(event) { | ||
console.log('Clicked outside 2. Event: ', event); | ||
}, | ||
onClickOutside3 (event) { | ||
console.log('Clicked outside 3. Event: ', event) | ||
} | ||
} | ||
onClickOutside3(event) { | ||
console.log('Clicked outside 3. Event: ', event); | ||
}, | ||
}, | ||
}; | ||
@@ -163,0 +167,0 @@ </script> |
@@ -151,2 +151,3 @@ /** | ||
if (instances[arg].push({el, binding: normalisedBinding}) === 1) { | ||
/* istanbul ignore next */ | ||
if (typeof document === 'object' && document) { | ||
@@ -177,2 +178,3 @@ document.addEventListener(arg, getEventHandler(useCapture, arg), useCapture); | ||
} else { | ||
/* istanbul ignore next */ | ||
if (typeof document === 'object' && document) { | ||
@@ -197,3 +199,3 @@ document.removeEventListener(eventName, getEventHandler(useCapture, eventName), useCapture); | ||
enumerable: true, | ||
value: '4.0.15', | ||
value: '4.0.16', | ||
}, | ||
@@ -200,0 +202,0 @@ }, |
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
79778
703
175
64