diff --git a/dist/vuedals.js b/dist/vuedals.js index 7bc3d8d..07a7c76 100644 --- a/dist/vuedals.js +++ b/dist/vuedals.js @@ -262,4 +262,4 @@ function(module,exports,__webpack_require__){ // 7.1.13 ToObject(argument) var defined=__webpack_require__(39);module.exports=function(it){return Object(defined(it))}},/* 51 */ /***/ -function(module,exports){module.exports={render:function(){var _vm=this,_h=_vm.$createElement,_c=_vm._self._c||_h;return _c("transition",{attrs:{tag:"div",name:"vuedal"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.vuedals.length,expression:"vuedals.length"}],staticClass:"vuedals"},_vm._l(_vm.vuedals,function(vuedal,index){return _c("div",{key:vuedal,staticClass:"vuedal",class:_vm.getCssClasses(index)},[vuedal.title||vuedal.dismisable?_c("header",[_c("span",{staticClass:"title"},[_vm._v(_vm._s(vuedal.title))]),_vm._v(" "),vuedal.dismisable?_c("span",{staticClass:"close",on:{click:function($event){_vm.dismiss()}}},[_vm._v("×")]):_vm._e()]):_vm._e(),_vm._v(" "),_c(vuedal.component,_vm._b({tag:"component"},"component",vuedal.props))],1)}))])},staticRenderFns:[]}}])}); \ No newline at end of file +function(module,exports){module.exports={render:function(){var _vm=this,_h=_vm.$createElement,_c=_vm._self._c||_h;return _c("transition",{attrs:{tag:"div",name:"vuedal"}},[_c("div",{directives:[{name:"show",rawName:"v-show",value:_vm.vuedals.length,expression:"vuedals.length"}],staticClass:"vuedals"},_vm._l(_vm.vuedals,function(vuedal,index){return _c("div",{key:index,staticClass:"vuedal",class:_vm.getCssClasses(index)},[!vuedal.title&&!vuedal.dismisable||vuedal.header?_vm._e():_c("header",[_c("span",{staticClass:"title"},[_vm._v(_vm._s(vuedal.title))]),_vm._v(" "),vuedal.dismisable?_c("span",{staticClass:"close",on:{click:function($event){_vm.dismiss()}}},[_vm._v("×")]):_vm._e()]),_vm._v(" "),vuedal.header?_c("header",[_c(vuedal.header.component,_vm._b({tag:"component"},"component",vuedal.header.props))],1):_vm._e(),_vm._v(" "),_c(vuedal.component,_vm._b({tag:"component"},"component",vuedal.props))],1)}))])},staticRenderFns:[]}}])}); \ No newline at end of file diff --git a/dist/vuedals.min.js b/dist/vuedals.min.js index 7528eea..69a5ccc 100644 --- a/dist/vuedals.min.js +++ b/dist/vuedals.min.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Vuedals",[],t):"object"==typeof exports?exports.Vuedals=t():e.Vuedals=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.Bus=void 0;var o=n(1),i=r(o),u=n(22),s=r(u);t.default={install:function(e){e.prototype.$vuedals=new e({name:"$vuedals",created:function(){var e=this;i.default.$on("opened",function(t){e.$emit("vuedals:opened",t)}),i.default.$on("closed",function(t){e.$emit("vuedals:closed",t)}),i.default.$on("destroyed",function(t){e.$emit("vuedals:destroyed",t)}),this.$on("new",function(t){e.open(t)}),this.$on("close",function(t){e.close(t)})},methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.default.$emit("new",e)},close:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.default.$emit("close",e)}}}),e.mixin({created:function(){this.$on("vuedals:new",function(e){i.default.$emit("new",e)}),this.$on("vuedals:close",function(e){i.default.$emit("close",e)})}})}},t.Bus=i.default,t.Component=s.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=r(o),u=n(3),s=r(u),a=null,c=function(){function e(){return(0,i.default)(this,e),a||(this.events={},a=this),a}return(0,s.default)(e,[{key:"$emit",value:function(e,t){if(this.events[e])for(var n=this.events[e],r=0,o=n.length;r=0&&x.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function a(e,t){var n,r,o;if(t.singleton){var i=m++;n=h||(h=s(t)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!0)}else n=s(t),r=f.bind(null,n),o=function(){u(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=y(t,o);else{var i=document.createTextNode(o),u=e.childNodes;u[t]&&e.removeChild(u[t]),u.length?e.insertBefore(i,u[t]):e.appendChild(i)}}function f(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var l={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},p=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=d(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,m=0,x=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=p()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null,t=this.vuedals.length-1;s.default.$emit("closed",{index:t,instance:this.vuedals[t],data:e}),this.vuedals[t].onClose(e),this.splice(t),document.querySelector(".vuedals").scrollTop=0},dismiss:function(){var e=this.vuedals.length-1;s.default.$emit("dismissed",{index:e,instance:this.vuedals[e]}),this.vuedals[e].onDismiss(),this.splice(e),document.querySelector(".vuedals").scrollTop=0},getCssClasses:function(e){var t=this.vuedals[e],n=t.name+" "+t.size;return ec;)for(var d,p=s(arguments[c++]),v=f?r(p).concat(f(p)):r(p),h=v.length,m=0;h>m;)l.call(p,d=v[m++])&&(n[d]=p[d]);return n}:a},function(e,t,n){var r=n(34),o=n(47);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(36),i=n(40)(!1),u=n(44)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),a=0,c=[];for(n in s)n!=u&&r(s,n)&&c.push(n);for(;t.length>a;)r(s,n=t[a++])&&(~i(c,n)||c.push(n));return c}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(37),o=n(39);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(38);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(36),o=n(41),i=n(43);e.exports=function(e){return function(t,n,u){var s,a=r(t),c=o(a.length),f=i(u,c);if(e&&n!=n){for(;c>f;)if(s=a[f++],s!=s)return!0}else for(;c>f;f++)if((e||f in a)&&a[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(42),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(42),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(45)("keys"),o=n(46);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(8),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(39);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{tag:"div",name:"vuedal"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.vuedals.length,expression:"vuedals.length"}],staticClass:"vuedals"},e._l(e.vuedals,function(t,r){return n("div",{key:t,staticClass:"vuedal",class:e.getCssClasses(r)},[t.title||t.dismisable?n("header",[n("span",{staticClass:"title"},[e._v(e._s(t.title))]),e._v(" "),t.dismisable?n("span",{staticClass:"close",on:{click:function(t){e.dismiss()}}},[e._v("×")]):e._e()]):e._e(),e._v(" "),n(t.component,e._b({tag:"component"},"component",t.props))],1)}))])},staticRenderFns:[]}}])}); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("Vuedals",[],t):"object"==typeof exports?exports.Vuedals=t():e.Vuedals=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.Component=t.Bus=void 0;var o=n(1),i=r(o),u=n(22),s=r(u);t.default={install:function(e){e.prototype.$vuedals=new e({name:"$vuedals",created:function(){var e=this;i.default.$on("opened",function(t){e.$emit("vuedals:opened",t)}),i.default.$on("closed",function(t){e.$emit("vuedals:closed",t)}),i.default.$on("destroyed",function(t){e.$emit("vuedals:destroyed",t)}),this.$on("new",function(t){e.open(t)}),this.$on("close",function(t){e.close(t)})},methods:{open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.default.$emit("new",e)},close:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i.default.$emit("close",e)}}}),e.mixin({created:function(){this.$on("vuedals:new",function(e){i.default.$emit("new",e)}),this.$on("vuedals:close",function(e){i.default.$emit("close",e)})}})}},t.Bus=i.default,t.Component=s.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),i=r(o),u=n(3),s=r(u),a=null,c=function(){function e(){return(0,i.default)(this,e),a||(this.events={},a=this),a}return(0,s.default)(e,[{key:"$emit",value:function(e,t){if(this.events[e])for(var n=this.events[e],r=0,o=n.length;r=0&&x.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function a(e,t){var n,r,o;if(t.singleton){var i=m++;n=h||(h=s(t)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!0)}else n=s(t),r=f.bind(null,n),o=function(){u(n)};return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=y(t,o);else{var i=document.createTextNode(o),u=e.childNodes;u[t]&&e.removeChild(u[t]),u.length?e.insertBefore(i,u[t]):e.appendChild(i)}}function f(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var l={},d=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},p=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=d(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,m=0,x=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=p()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],u=0;u0&&void 0!==arguments[0]?arguments[0]:null,t=this.vuedals.length-1;s.default.$emit("closed",{index:t,instance:this.vuedals[t],data:e}),this.vuedals[t].onClose(e),this.splice(t),document.querySelector(".vuedals").scrollTop=0},dismiss:function(){var e=this.vuedals.length-1;s.default.$emit("dismissed",{index:e,instance:this.vuedals[e]}),this.vuedals[e].onDismiss(),this.splice(e),document.querySelector(".vuedals").scrollTop=0},getCssClasses:function(e){var t=this.vuedals[e],n=t.name+" "+t.size;return ec;)for(var d,p=s(arguments[c++]),v=f?r(p).concat(f(p)):r(p),h=v.length,m=0;h>m;)l.call(p,d=v[m++])&&(n[d]=p[d]);return n}:a},function(e,t,n){var r=n(34),o=n(47);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(35),o=n(36),i=n(40)(!1),u=n(44)("IE_PROTO");e.exports=function(e,t){var n,s=o(e),a=0,c=[];for(n in s)n!=u&&r(s,n)&&c.push(n);for(;t.length>a;)r(s,n=t[a++])&&(~i(c,n)||c.push(n));return c}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(37),o=n(39);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(38);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(36),o=n(41),i=n(43);e.exports=function(e){return function(t,n,u){var s,a=r(t),c=o(a.length),f=i(u,c);if(e&&n!=n){for(;c>f;)if(s=a[f++],s!=s)return!0}else for(;c>f;f++)if((e||f in a)&&a[f]===n)return e||f||0;return!e&&-1}}},function(e,t,n){var r=n(42),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(42),o=Math.max,i=Math.min;e.exports=function(e,t){return e=r(e),e<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(45)("keys"),o=n(46);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(8),o="__core-js_shared__",i=r[o]||(r[o]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(39);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports={render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{tag:"div",name:"vuedal"}},[n("div",{directives:[{name:"show",rawName:"v-show",value:e.vuedals.length,expression:"vuedals.length"}],staticClass:"vuedals"},e._l(e.vuedals,function(t,r){return n("div",{key:r,staticClass:"vuedal",class:e.getCssClasses(r)},[!t.title&&!t.dismisable||t.header?e._e():n("header",[n("span",{staticClass:"title"},[e._v(e._s(t.title))]),e._v(" "),t.dismisable?n("span",{staticClass:"close",on:{click:function(t){e.dismiss()}}},[e._v("×")]):e._e()]),e._v(" "),t.header?n("header",[n(t.header.component,e._b({tag:"component"},"component",t.header.props))],1):e._e(),e._v(" "),n(t.component,e._b({tag:"component"},"component",t.props))],1)}))])},staticRenderFns:[]}}])}); \ No newline at end of file