diff --git a/demo/package.json b/demo/package.json index 97bfbed..e44c3c7 100644 --- a/demo/package.json +++ b/demo/package.json @@ -11,18 +11,18 @@ }, "devDependencies": { "@babel/core": "^7.2.2", - "@babel/preset-env": "^7.2.0", + "@babel/preset-env": "^7.2.3", "babel-loader": "^8.0.4", "cross-env": "^5.2.0", - "css-loader": "^2.0.1", - "file-loader": "^2.0.0", + "css-loader": "^2.1.0", + "file-loader": "^3.0.1", "node-sass": "^4.11.0", "sass-loader": "^7.1.0", - "uglifyjs-webpack-plugin": "^2.0.1", + "uglifyjs-webpack-plugin": "^2.1.1", "vue-loader": "^15.4.2", "vue-template-compiler": "^2.5.21", - "webpack": "^4.27.1", - "webpack-cli": "^3.1.2", - "webpack-dev-server": "^3.1.10" + "webpack": "^4.28.3", + "webpack-cli": "^3.2.0", + "webpack-dev-server": "^3.1.14" } } diff --git a/dist/index.js b/dist/index.js index 05a7cc4..ce503be 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):"object"==typeof exports?exports["vue-js-popover"]=t(require("vue")):e["vue-js-popover"]=t(e.vue)}(window,function(e){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},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="/dist/",n(n.s=5)}([function(e,t,n){var o=n(3);"string"==typeof o&&(o=[[e.i,o,""]]),o.locals&&(e.exports=o.locals);(0,n(6).default)("66dcfc90",o,!0,{})},function(t,n){t.exports=e},function(e,t,n){"use strict";var o=n(0);n.n(o).a},function(e,t,n){(e.exports=n(4)(!1)).push([e.i,".vue-popover{display:block;position:absolute;background:#fff;box-shadow:0px 4px 20px 0px rgba(52,73,94,0.2);padding:5px;border-radius:5px;z-index:998}.vue-popover:before{display:block;position:absolute;width:0;height:0;content:''}.vue-popover.dropdown-position-bottom:before{border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;top:-6px;left:calc(50% - 6px);filter:drop-shadow(0px -2px 2px rgba(52,73,94,0.1))}.vue-popover.dropdown-position-top:before{border-left:6px solid transparent;border-right:6px solid transparent;border-top:6px solid #fff;bottom:-6px;left:calc(50% - 6px);filter:drop-shadow(0px 2px 2px rgba(52,73,94,0.1))}.vue-popover.dropdown-position-left:before{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:6px solid #fff;right:-6px;top:calc(50% - 6px);filter:drop-shadow(2px 0px 2px rgba(52,73,94,0.1))}.vue-popover.dropdown-position-right:before{border-top:6px solid transparent;border-bottom:6px solid transparent;border-right:6px solid #fff;left:-6px;top:calc(50% - 6px);filter:drop-shadow(-2px 0px 2px rgba(52,73,94,0.1))}\n",""])},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var r=(s=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).join("\n")}var s;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r=0&&e<=1}}},data:function(){return{visible:!1,positionClass:"",position:{left:0,top:0}}},mounted:function(){r.$on(this.showEventName,this.showEventListener),r.$on(this.hideEventName,this.hideEventListener)},beforeDestroy:function(){r.$off(this.showEventName,this.showEventListener),r.$off(this.hideEventName,this.hideEventListener)},computed:{showEventName:function(){return"show:".concat(this.event)},hideEventName:function(){return"hide:".concat(this.event)},className:function(){return["vue-popover",this.pointer&&this.positionClass]},style:function(){return function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};document.addEventListener("resize",function(e){r.$emit("hide",{srcEvent:e})}),e.component("Popover",c),e.directive("popover",{bind:function(e,t){var n,o,i,s,a,p,u,c,l=(o=(n=t).arg,i=void 0===o?"":o,s=n.modifiers,a=void 0===s?{}:s,p=n.value,u=void 0===p?{}:p,c=Object.keys(a),{name:"object"===h(u)&&u.name?u.name:i,position:c[0]||u.position||"bottom",value:u});!function(e,t){var n=function(n){r.$emit("show:click",f({},t,{target:e,srcEvent:n})),document.addEventListener("click",function n(o){r.$emit("hide:click",f({},t,{target:e,srcEvent:o})),document.removeEventListener("click",n)}),n.stopPropagation()};e.addEventListener("click",n),e.$popoverRemoveClickHandlers=function(){e.removeEventListener("click",n)}}(e,l),function(e,t){var n=function(n){r.$emit("show:hover",f({},t,{target:e,srcEvent:n}))},o=function(n){r.$emit("hide:hover",f({},t,{target:e,srcEvent:n}))};e.addEventListener("mouseenter",n),e.addEventListener("mouseleave",o),e.$popoverRemoveHoverHandlers=function(){e.removeEventListener("mouseenter",n),e.removeEventListener("mouseleave",o)}}(e,l)},unbind:function(e,t){e.$popoverRemoveHoverHandlers(),e.$popoverRemoveClickHandlers()}}),t.tooltip&&(t.debug&&console.log("vue-js-popover | tooltip active"),e.component("Tooltip",d))}}},function(e,t,n){"use strict";function o(e,t){for(var n=[],o={},r=0;rn.parts.length&&(o.parts.length=n.parts.length)}else{var s=[];for(r=0;rn.parts.length&&(o.parts.length=n.parts.length)}else{var i=[];for(r=0;r