v-click-outside-x
Advanced tools
Comparing version 4.0.14 to 4.0.15
@@ -28,6 +28,6 @@ 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); } | ||
var commonHandler = function _onCommonEvent(context, instances, event, arg) { | ||
var commonHandler = function onCommonEvent(context, instances, event, arg) { | ||
var target = event.target; | ||
var itemIteratee = function _itemIteratee(item) { | ||
var itemIteratee = function itemIteratee(item) { | ||
var el = item.el; | ||
@@ -62,3 +62,3 @@ | ||
var getEventHandler = function _getEventHandler(useCapture, arg) { | ||
var getEventHandler = function getEventHandler(useCapture, arg) { | ||
if (useCapture) { | ||
@@ -103,4 +103,4 @@ if (captureEventHandlers[arg]) { | ||
* @type {VClickOutsidePlugin.directive} | ||
* @property {!object} $_captureInstances - Registered capture instances. | ||
* @property {!object} $_nonCaptureInstances - Registered non-capture instances. | ||
* @property {!object} $captureInstances - Registered capture instances. | ||
* @property {!object} $nonCaptureInstances - Registered non-capture instances. | ||
* @property {Function} $_onCaptureEvent - Event handler for capture events. | ||
@@ -117,12 +117,12 @@ * @property {Function} $_onNonCaptureEvent - Event handler for non-capture events. | ||
export var directive = Object.defineProperties({}, { | ||
$_captureInstances: { | ||
$captureInstances: { | ||
value: captureInstances | ||
}, | ||
$_nonCaptureInstances: { | ||
$nonCaptureInstances: { | ||
value: nonCaptureInstances | ||
}, | ||
$_captureEventHandlers: { | ||
$captureEventHandlers: { | ||
value: captureEventHandlers | ||
}, | ||
$_nonCaptureEventHandlers: { | ||
$nonCaptureEventHandlers: { | ||
value: nonCaptureEventHandlers | ||
@@ -166,7 +166,7 @@ }, | ||
value: function unbind(el) { | ||
var compareElements = function _compareElements(item) { | ||
var compareElements = function compareElements(item) { | ||
return item.el !== el; | ||
}; | ||
var instancesIteratee = function _instancesIteratee(instances) { | ||
var instancesIteratee = function instancesIteratee(instances) { | ||
var instanceKeys = Object.keys(instances); | ||
@@ -177,3 +177,3 @@ | ||
var keysIteratee = function _keysIteratee(eventName) { | ||
var keysIteratee = function keysIteratee(eventName) { | ||
var newInstance = instances[eventName].filter(compareElements); | ||
@@ -203,3 +203,3 @@ | ||
enumerable: true, | ||
value: '4.0.14' | ||
value: '4.0.15' | ||
} | ||
@@ -206,0 +206,0 @@ }); |
@@ -5,9 +5,9 @@ /*! | ||
"copywrite": "Copyright (c) 2018-present", | ||
"date": "2019-07-26T23:39:05.541Z", | ||
"date": "2019-07-31T17:42:01.813Z", | ||
"describe": "", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
"file": "v-click-outside-x.js", | ||
"hash": "ae6d0004f5f9ad016bbb", | ||
"hash": "207bc2d3bc1d1b650c71", | ||
"license": "MIT", | ||
"version": "4.0.14" | ||
"version": "4.0.15" | ||
} | ||
@@ -162,6 +162,6 @@ */ | ||
var commonHandler = function _onCommonEvent(context, instances, event, arg) { | ||
var commonHandler = function onCommonEvent(context, instances, event, arg) { | ||
var target = event.target; | ||
var itemIteratee = function _itemIteratee(item) { | ||
var itemIteratee = function itemIteratee(item) { | ||
var el = item.el; | ||
@@ -196,3 +196,3 @@ | ||
var getEventHandler = function _getEventHandler(useCapture, arg) { | ||
var getEventHandler = function getEventHandler(useCapture, arg) { | ||
if (useCapture) { | ||
@@ -237,4 +237,4 @@ if (captureEventHandlers[arg]) { | ||
* @type {VClickOutsidePlugin.directive} | ||
* @property {!object} $_captureInstances - Registered capture instances. | ||
* @property {!object} $_nonCaptureInstances - Registered non-capture instances. | ||
* @property {!object} $captureInstances - Registered capture instances. | ||
* @property {!object} $nonCaptureInstances - Registered non-capture instances. | ||
* @property {Function} $_onCaptureEvent - Event handler for capture events. | ||
@@ -251,12 +251,12 @@ * @property {Function} $_onNonCaptureEvent - Event handler for non-capture events. | ||
var directive = Object.defineProperties({}, { | ||
$_captureInstances: { | ||
$captureInstances: { | ||
value: captureInstances | ||
}, | ||
$_nonCaptureInstances: { | ||
$nonCaptureInstances: { | ||
value: nonCaptureInstances | ||
}, | ||
$_captureEventHandlers: { | ||
$captureEventHandlers: { | ||
value: captureEventHandlers | ||
}, | ||
$_nonCaptureEventHandlers: { | ||
$nonCaptureEventHandlers: { | ||
value: nonCaptureEventHandlers | ||
@@ -300,7 +300,7 @@ }, | ||
value: function unbind(el) { | ||
var compareElements = function _compareElements(item) { | ||
var compareElements = function compareElements(item) { | ||
return item.el !== el; | ||
}; | ||
var instancesIteratee = function _instancesIteratee(instances) { | ||
var instancesIteratee = function instancesIteratee(instances) { | ||
var instanceKeys = Object.keys(instances); | ||
@@ -311,3 +311,3 @@ | ||
var keysIteratee = function _keysIteratee(eventName) { | ||
var keysIteratee = function keysIteratee(eventName) { | ||
var newInstance = instances[eventName].filter(compareElements); | ||
@@ -337,3 +337,3 @@ | ||
enumerable: true, | ||
value: '4.0.14' | ||
value: '4.0.15' | ||
} | ||
@@ -340,0 +340,0 @@ }); |
@@ -5,12 +5,12 @@ /*! | ||
"copywrite": "Copyright (c) 2018-present", | ||
"date": "2019-07-26T23:39:05.541Z", | ||
"date": "2019-07-31T17:42:01.813Z", | ||
"describe": "", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
"file": "v-click-outside-x.min.js", | ||
"hash": "854063cb92c0e4d965bb", | ||
"hash": "4903db581c5efc479a28", | ||
"license": "MIT", | ||
"version": "4.0.14" | ||
"version": "4.0.15" | ||
} | ||
*/ | ||
!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.14"}});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.15"}});function y(e){e.directive("click-outside",b)}}])}); | ||
//# sourceMappingURL=v-click-outside-x.min.js.map |
{ | ||
"name": "v-click-outside-x", | ||
"version": "4.0.14", | ||
"version": "4.0.15", | ||
"description": "Vue directive to react on clicks outside an element.", | ||
@@ -63,4 +63,4 @@ "homepage": "https://github.com/Xotic750/v-click-outside-x.git", | ||
"@babel/runtime": "^7.5.5", | ||
"@prorenata/eslint-config-vue": "^1.13.14", | ||
"@types/jest": "^24.0.15", | ||
"@xotic750/eslint-config-recommended": "^1.0.4", | ||
"@types/jest": "^24.0.16", | ||
"@types/node": "^12.6.8", | ||
@@ -73,5 +73,3 @@ "@typescript-eslint/eslint-plugin": "^1.13.0", | ||
"babel-plugin-lodash": "^3.3.4", | ||
"caniuse-lite": "^1.0.30000985", | ||
"chalk": "^2.4.2", | ||
"concurrently": "^4.1.1", | ||
"caniuse-lite": "^1.0.30000988", | ||
"cross-env": "^5.2.0", | ||
@@ -90,4 +88,4 @@ "eslint": "=5.16.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.14.0", | ||
"eslint-plugin-jsdoc": "^15.7.2", | ||
"eslint-plugin-jest": "^22.14.1", | ||
"eslint-plugin-jsdoc": "^15.8.0", | ||
"eslint-plugin-json": "^1.4.0", | ||
@@ -101,9 +99,6 @@ "eslint-plugin-lodash": "^5.1.0", | ||
"eslint-plugin-switch-case": "^1.1.2", | ||
"eslint-plugin-vue": "^5.2.3", | ||
"friendly-errors-webpack-plugin": "^1.7.0", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^24.8.0", | ||
"jest-cli": "^24.8.0", | ||
"jest-file": "^1.0.0", | ||
"jsdoc-to-markdown": "^5.0.0", | ||
"lodash": "^4.17.15", | ||
@@ -114,11 +109,10 @@ "lodash-webpack-plugin": "^0.11.5", | ||
"nodemon": "^1.19.1", | ||
"prettier": "=1.14.3", | ||
"prettier": "^1.18.2", | ||
"rimraf": "^2.6.3", | ||
"semver": "^6.3.0", | ||
"source-map-loader": "^0.2.4", | ||
"terser-webpack-plugin": "^1.3.0", | ||
"terser-webpack-plugin": "^1.4.1", | ||
"typescript": "^3.5.3", | ||
"vue": "^2.6.10", | ||
"webpack": "^4.38.0", | ||
"webpack-bundle-analyzer": "^3.3.2", | ||
"webpack-bundle-analyzer": "^3.4.1", | ||
"webpack-cli": "^3.3.6", | ||
@@ -125,0 +119,0 @@ "webpack-merge": "^4.2.1" |
@@ -21,6 +21,6 @@ /** | ||
*/ | ||
const commonHandler = function _onCommonEvent(context, instances, event, arg) { | ||
const commonHandler = function onCommonEvent(context, instances, event, arg) { | ||
const {target} = event; | ||
const itemIteratee = function _itemIteratee(item) { | ||
const itemIteratee = function itemIteratee(item) { | ||
const {el} = item; | ||
@@ -54,3 +54,3 @@ | ||
*/ | ||
const getEventHandler = function _getEventHandler(useCapture, arg) { | ||
const getEventHandler = function getEventHandler(useCapture, arg) { | ||
if (useCapture) { | ||
@@ -94,4 +94,4 @@ if (captureEventHandlers[arg]) { | ||
* @type {VClickOutsidePlugin.directive} | ||
* @property {!object} $_captureInstances - Registered capture instances. | ||
* @property {!object} $_nonCaptureInstances - Registered non-capture instances. | ||
* @property {!object} $captureInstances - Registered capture instances. | ||
* @property {!object} $nonCaptureInstances - Registered non-capture instances. | ||
* @property {Function} $_onCaptureEvent - Event handler for capture events. | ||
@@ -108,15 +108,15 @@ * @property {Function} $_onNonCaptureEvent - Event handler for non-capture events. | ||
{ | ||
$_captureInstances: { | ||
$captureInstances: { | ||
value: captureInstances, | ||
}, | ||
$_nonCaptureInstances: { | ||
$nonCaptureInstances: { | ||
value: nonCaptureInstances, | ||
}, | ||
$_captureEventHandlers: { | ||
$captureEventHandlers: { | ||
value: captureEventHandlers, | ||
}, | ||
$_nonCaptureEventHandlers: { | ||
$nonCaptureEventHandlers: { | ||
value: nonCaptureEventHandlers, | ||
@@ -156,7 +156,3 @@ }, | ||
if (typeof document === 'object' && document) { | ||
document.addEventListener( | ||
arg, | ||
getEventHandler(useCapture, arg), | ||
useCapture, | ||
); | ||
document.addEventListener(arg, getEventHandler(useCapture, arg), useCapture); | ||
} | ||
@@ -169,7 +165,7 @@ } | ||
value: function unbind(el) { | ||
const compareElements = function _compareElements(item) { | ||
const compareElements = function compareElements(item) { | ||
return item.el !== el; | ||
}; | ||
const instancesIteratee = function _instancesIteratee(instances) { | ||
const instancesIteratee = function instancesIteratee(instances) { | ||
const instanceKeys = Object.keys(instances); | ||
@@ -180,3 +176,3 @@ | ||
const keysIteratee = function _keysIteratee(eventName) { | ||
const keysIteratee = function keysIteratee(eventName) { | ||
const newInstance = instances[eventName].filter(compareElements); | ||
@@ -188,7 +184,3 @@ | ||
if (typeof document === 'object' && document) { | ||
document.removeEventListener( | ||
eventName, | ||
getEventHandler(useCapture, eventName), | ||
useCapture, | ||
); | ||
document.removeEventListener(eventName, getEventHandler(useCapture, eventName), useCapture); | ||
} | ||
@@ -211,3 +203,3 @@ | ||
enumerable: true, | ||
value: '4.0.14', | ||
value: '4.0.15', | ||
}, | ||
@@ -214,0 +206,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
63
11
78890
697