vue-izitoast
Advanced tools
Comparing version 1.0.1 to 1.1.0
@@ -87,2 +87,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
function plugin(Vue, options = {}) { | ||
@@ -141,3 +143,3 @@ if (options && options.constructor !== Object) throw 'Options must be a object'; | ||
if (!eventName || eventName.constructor !== String) throw 'Event Name must be a string'; | ||
if (eventName !== 'iziToast-open' || eventName !== 'iziToast-close') throw 'Event Name has only two possible values: iziToast-open or iziToast-close'; | ||
if (eventName !== 'iziToast-open' && eventName !== 'iziToast-close') throw 'Event Name has only two possible values: iziToast-open or iziToast-close'; | ||
}, | ||
@@ -144,0 +146,0 @@ methods: { |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["vue-izitoast"]=e():t["vue-izitoast"]=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var i=o(1),n=o.n(i);function s(t,e={}){if(e&&e.constructor!==Object)throw"Options must be a object";t.version&&Number(t.version.split(".")[0]);s.installed=!0;n.a.settings(Object.assign({},{zindex:99999,layout:1,balloon:!1,close:!0,closeOnEscape:!1,rtl:!1,position:"bottomRight",timeout:5e3,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}},e));const o=new t({_izi:n.a,_checkParams(t,e,o){if(!t||t.constructor!==String)throw"Message must be a string";if(e&&e.constructor!==String)throw"Title must be a string";if(o&&o.constructor!==Object)throw"Options must be a object"},_checkEventNames(t){if(!t||t.constructor!==String)throw"Event Name must be a string";if("iziToast-open"!==t||"iziToast-close"!==t)throw"Event Name has only two possible values: iziToast-open or iziToast-close"},methods:{show(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.show(Object.assign({},o,{message:t,title:e}))},hide(t=null,e={}){if(t&&t.constructor!==String&&(t=document.querySelector(t)),t&&t.constructor===HTMLDivElement||(t=document.querySelector(".iziToast")),e&&e.constructor!==Object)throw"Options must be a object";this.$options._izi.hide(e,t)},progress(t,e={},o=(()=>{})){if(t&&t.constructor!==String&&(t=document.querySelector(t)),t&&t.constructor===HTMLDivElement||(t=document.querySelector(".iziToast")),e&&e.constructor!==Object)throw"Options must be a object";if(o&&o.constructor!==Function)throw"Callback must be a function";return this.$options._izi.progress(t,e,o)},destroy(){this.$options._izi.destroy()},info(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.info(Object.assign({},o,{message:t,title:e}))},success(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.success(Object.assign({},o,{message:t,title:e}))},warning(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.warning(Object.assign({},o,{message:t,title:e}))},error(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.error(Object.assign({},o,{message:t,title:e}))},question(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.question(Object.assign({},o,{message:t,title:e}))},on(t,e){if(this.$options._checkEventNames(t),!e||e.constructor!==Function)throw"Callback must be a function";document.addEventListener(t,e)},off(t){this.$options._checkEventNames(t),document.removeEventListener(t)}}});Object.defineProperty(t.prototype,"$toast",{get:()=>o})}"undefined"!=typeof window&&window.Vue&&window.Vue.use(s)},function(t,e,o){(function(o){var i,n,s;void 0!==o||(window||this.window||this.global),n=[],i=function(t){"use strict";var e={},o=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),i=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),n="undefined"!=typeof InstallTrigger,s="ontouchstart"in document.documentElement,a=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],r={},l={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,rtl:!1,position:"bottomRight",target:"",targetFirst:!0,toastOnce:!1,timeout:5e3,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var c=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),o};c.prototype=window.Event.prototype,window.CustomEvent=c}var d=function(t,e,o){if("[object Object]"===Object.prototype.toString.call(t))for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(o,t[i],i,t);else if(t)for(var n=0,s=t.length;n<s;n++)e.call(o,t[n],n,t)},u=function(t,e){var o={};return d(t,function(e,i){o[i]=t[i]}),d(e,function(t,i){o[i]=e[i]}),o},p=function(t){var e=document.createDocumentFragment(),o=document.createElement("div");for(o.innerHTML=t;o.firstChild;)e.appendChild(o.firstChild);return e},m={move:function(t,e,o,s){var a;0!==s&&(t.classList.add("iziToast-dragged"),t.style.transform="translateX("+s+"px)",s>0?(a=(180-s)/180)<.3&&e.hide(u(o,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):(a=(180+s)/180)<.3&&e.hide(u(o,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=a,a<.3&&((i||n)&&(t.style.left=s+"px"),t.parentNode.style.opacity=.3,this.stopMoving(t,null)))},startMoving:function(t,e,o,i){i=i||window.event;var n=s?i.touches[0].clientX:i.clientX,a=t.style.transform.replace("px)",""),r=n-(a=a.replace("translateX(",""));t.classList.remove(o.transitionIn),t.classList.remove(o.transitionInMobile),t.style.transition="",s?document.ontouchmove=function(i){i.preventDefault();var n=(i=i||window.event).touches[0].clientX-r;m.move(t,e,o,n)}:document.onmousemove=function(i){i.preventDefault();var n=(i=i||window.event).clientX-r;m.move(t,e,o,n)}},stopMoving:function(t,e){s?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains("iziToast-dragged")&&(t.classList.remove("iziToast-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout(function(){t.style.transition=""},400))}};return e.destroy=function(){d(document.querySelectorAll(".iziToast-wrapper"),function(t,e){t.remove()}),d(document.querySelectorAll(".iziToast"),function(t,e){t.remove()}),document.removeEventListener("iziToast-opened",{},!1),document.removeEventListener("iziToast-opening",{},!1),document.removeEventListener("iziToast-closing",{},!1),document.removeEventListener("iziToast-closed",{},!1),document.removeEventListener("keyup",{},!1),r={}},e.settings=function(t){e.destroy(),r=t,l=u(l,t||{})},d({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},function(t,o){e[o]=function(e){var o=u(r,e||{});o=u(t,o||{}),this.show(o)}}),e.progress=function(t,e,o){var i=this,n=u(i.settings,t||{}),s=e.querySelector(".iziToast-progressbar div");return{start:function(){null!==s&&(s.style.transition="width "+n.timeout+"ms "+n.progressBarEasing,s.style.width="0%"),n.TIME.START=(new Date).getTime(),n.TIME.END=n.TIME.START+n.timeout,n.TIME.TIMER=setTimeout(function(){clearTimeout(n.TIME.TIMER),e.classList.contains("iziToast-closing")||(i.hide(n,e,"timeout"),"function"==typeof o&&o.apply(i))},n.timeout)},pause:function(){if(n.TIME.REMAINING=n.TIME.END-(new Date).getTime(),clearTimeout(n.TIME.TIMER),null!==s){var t=window.getComputedStyle(s).getPropertyValue("width");s.style.transition="none",s.style.width=t}"function"==typeof o&&setTimeout(function(){o.apply(i)},10)},resume:function(){null!==s&&(s.style.transition="width "+n.TIME.REMAINING+"ms "+n.progressBarEasing,s.style.width="0%"),n.TIME.END=(new Date).getTime()+n.TIME.REMAINING,n.TIME.TIMER=setTimeout(function(){clearTimeout(n.TIME.TIMER),e.classList.contains("iziToast-closing")||(i.hide(n,e,"timeout"),"function"==typeof o&&o.apply(i))},n.TIME.REMAINING)},reset:function(){clearTimeout(n.TIME.TIMER),null!==s&&(s.style.transition="none",s.style.width="100%"),"function"==typeof o&&setTimeout(function(){o.apply(i)},10)}}},e.hide=function(t,e,i){var n=u(this.settings,t||{});i=i||null,"object"!=typeof e&&(e=document.querySelector(e)),e.classList.add("iziToast-closing"),n.closedBy=i,n.REF=e.getAttribute("data-iziToast-ref"),function(){var t=document.querySelector(".iziToast-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),o=(e=e.split(",")).indexOf(n.REF);-1!==o&&e.splice(o,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout(function(){t.remove()},700))}}(),(n.transitionIn||n.transitionInMobile)&&(e.classList.remove(n.transitionIn),e.classList.remove(n.transitionInMobile)),o||window.innerWidth<=568?n.transitionOutMobile&&e.classList.add(n.transitionOutMobile):n.transitionOut&&e.classList.add(n.transitionOut);var s=e.parentNode.offsetHeight;e.parentNode.style.height=s+"px",e.style.pointerEvents="none",(!o||window.innerWidth>568)&&(e.parentNode.style.transitionDelay="0.2s");try{n.closedBy=i;var a=new CustomEvent("iziToast-closing",{detail:n,bubbles:!0,cancelable:!0});document.dispatchEvent(a)}catch(t){console.warn(t)}setTimeout(function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout(function(){e.parentNode.remove();try{n.closedBy=i;var t=new CustomEvent("iziToast-closed",{detail:n,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==n.onClosed&&n.onClosed.apply(null,[n,e,i])},1e3)},200),void 0!==n.onClosing&&n.onClosing.apply(null,[n,e,i])},e.show=function(t){var e=this,i=u(r,t||{});if((i=u(l,i)).TIME={},i.toastOnce&&i.id&&document.querySelectorAll(".iziToast#"+i.id).length>0)return!1;i.REF=(new Date).getTime()+Math.floor(1e7*Math.random()+1);var n,c={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),icon:document.createElement("i"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),wrapper:null};c.toast.setAttribute("data-iziToast-ref",i.REF),c.toast.appendChild(c.toastBody),c.toastCapsule.appendChild(c.toast),function(){if(c.toast.classList.add("iziToast"),c.toast.classList.add("iziToast-opening"),c.toastCapsule.classList.add("iziToast-capsule"),c.toastBody.classList.add("iziToast-body"),c.toastTexts.classList.add("iziToast-texts"),o||window.innerWidth<=568?i.transitionInMobile&&c.toast.classList.add(i.transitionInMobile):i.transitionIn&&c.toast.classList.add(i.transitionIn),i.class){var t=i.class.split(" ");d(t,function(t,e){c.toast.classList.add(t)})}var e;i.id&&(c.toast.id=i.id),i.rtl&&c.toast.classList.add("iziToast-rtl"),i.layout>1&&c.toast.classList.add("iziToast-layout"+i.layout),i.balloon&&c.toast.classList.add("iziToast-balloon"),i.maxWidth&&(isNaN(i.maxWidth)?c.toast.style.maxWidth=i.maxWidth:c.toast.style.maxWidth=i.maxWidth+"px"),""===i.theme&&"light"===i.theme||c.toast.classList.add("iziToast-theme-"+i.theme),i.color&&("#"==(e=i.color).substring(0,1)||"rgb"==e.substring(0,3)||"hsl"==e.substring(0,3)?c.toast.style.background=i.color:c.toast.classList.add("iziToast-color-"+i.color)),i.backgroundColor&&(c.toast.style.background=i.backgroundColor,i.balloon&&(c.toast.style.borderColor=i.backgroundColor))}(),i.image&&(c.cover.classList.add("iziToast-cover"),c.cover.style.width=i.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(i.image.replace(/ /g,""))?c.cover.style.backgroundImage="url(data:image/png;base64,"+i.image.replace(/ /g,"")+")":c.cover.style.backgroundImage="url("+i.image+")",i.rtl?c.toastBody.style.marginRight=i.imageWidth+10+"px":c.toastBody.style.marginLeft=i.imageWidth+10+"px",c.toast.appendChild(c.cover)),i.close?(c.buttonClose=document.createElement("button"),c.buttonClose.classList.add("iziToast-close"),c.buttonClose.addEventListener("click",function(t){t.target,e.hide(i,c.toast,"button")}),c.toast.appendChild(c.buttonClose)):i.rtl?c.toast.style.paddingLeft="18px":c.toast.style.paddingRight="18px",i.timeout&&(i.progressBar&&(c.progressBar=document.createElement("div"),c.progressBarDiv=document.createElement("div"),c.progressBar.classList.add("iziToast-progressbar"),c.progressBarDiv.style.background=i.progressBarColor,c.progressBar.appendChild(c.progressBarDiv),c.toast.appendChild(c.progressBar)),i.pauseOnHover&&!i.resetOnHover&&(c.toast.addEventListener("mouseenter",function(t){this.classList.add("iziToast-paused"),e.progress(i,c.toast).pause()}),c.toast.addEventListener("mouseleave",function(t){this.classList.remove("iziToast-paused"),e.progress(i,c.toast).resume()})),i.resetOnHover&&(c.toast.addEventListener("mouseenter",function(t){this.classList.add("iziToast-reseted"),e.progress(i,c.toast).reset()}),c.toast.addEventListener("mouseleave",function(t){this.classList.remove("iziToast-reseted"),e.progress(i,c.toast).start()}))),i.icon&&(c.icon.setAttribute("class","iziToast-icon "+i.icon),i.iconText&&c.icon.appendChild(document.createTextNode(i.iconText)),i.rtl?c.toastBody.style.paddingRight="33px":c.toastBody.style.paddingLeft="33px",i.iconColor&&(c.icon.style.color=i.iconColor),c.toastBody.appendChild(c.icon)),i.title.length>0&&(c.strong=document.createElement("strong"),c.strong.classList.add("iziToast-title"),c.strong.appendChild(p(i.title)),c.toastTexts.appendChild(c.strong),i.titleColor&&(c.strong.style.color=i.titleColor),i.titleSize&&(isNaN(i.titleSize)?c.strong.style.fontSize=i.titleSize:c.strong.style.fontSize=i.titleSize+"px"),i.titleLineHeight&&(isNaN(i.titleSize)?c.strong.style.lineHeight=i.titleLineHeight:c.strong.style.lineHeight=i.titleLineHeight+"px")),i.message.length>0&&(c.p=document.createElement("p"),c.p.classList.add("iziToast-message"),c.p.appendChild(p(i.message)),c.toastTexts.appendChild(c.p),i.messageColor&&(c.p.style.color=i.messageColor),i.messageSize&&(isNaN(i.titleSize)?c.p.style.fontSize=i.messageSize:c.p.style.fontSize=i.messageSize+"px"),i.messageLineHeight&&(isNaN(i.titleSize)?c.p.style.lineHeight=i.messageLineHeight:c.p.style.lineHeight=i.messageLineHeight+"px")),i.title.length>0&&i.message.length>0&&(i.rtl?c.strong.style.marginLeft="10px":2===i.layout||i.rtl||(c.strong.style.marginRight="10px")),c.toastBody.appendChild(c.toastTexts),i.inputs.length>0&&(c.inputs.classList.add("iziToast-inputs"),d(i.inputs,function(t,o){c.inputs.appendChild(p(t[0])),(n=c.inputs.childNodes)[o].classList.add("iziToast-inputs-child"),t[3]&&setTimeout(function(){n[o].focus()},300),n[o].addEventListener(t[1],function(o){return(0,t[2])(e,c.toast,this,o)})})),c.toastBody.appendChild(c.inputs),i.buttons.length>0&&(c.buttons.classList.add("iziToast-buttons"),d(i.buttons,function(t,o){c.buttons.appendChild(p(t[0]));var i=c.buttons.childNodes;i[o].classList.add("iziToast-buttons-child"),t[2]&&setTimeout(function(){i[o].focus()},300),i[o].addEventListener("click",function(o){return o.preventDefault(),(0,t[1])(e,c.toast,this,o,n)})})),c.toastBody.appendChild(c.buttons),i.message.length>0&&(i.inputs.length>0||i.buttons.length>0)&&(c.p.style.marginBottom="0"),(i.inputs.length>0||i.buttons.length>0)&&(i.rtl?c.toastTexts.style.marginLeft="10px":c.toastTexts.style.marginRight="10px",i.inputs.length>0&&i.buttons.length>0&&(i.rtl?c.inputs.style.marginLeft="8px":c.inputs.style.marginRight="8px")),c.toastCapsule.style.visibility="hidden",setTimeout(function(){var t=c.toast.offsetHeight,o=c.toast.currentStyle||window.getComputedStyle(c.toast),n=o.marginTop;n=n.split("px"),n=parseInt(n[0]);var s=o.marginBottom;s=s.split("px"),s=parseInt(s[0]),c.toastCapsule.style.visibility="",c.toastCapsule.style.height=t+s+n+"px",setTimeout(function(){c.toastCapsule.style.height="auto",i.target&&(c.toastCapsule.style.overflow="visible")},500),i.timeout&&e.progress(i,c.toast).start()},100),function(){var t=i.position;if(i.target)c.wrapper=document.querySelector(i.target),c.wrapper.classList.add("iziToast-target"),i.targetFirst?c.wrapper.insertBefore(c.toastCapsule,c.wrapper.firstChild):c.wrapper.appendChild(c.toastCapsule);else{if(-1==a.indexOf(i.position))return void console.warn("[iziToast] Incorrect position.\nIt can be › "+a);t=o||window.innerWidth<=568?"bottomLeft"==i.position||"bottomRight"==i.position||"bottomCenter"==i.position?"iziToast-wrapper-bottomCenter":"topLeft"==i.position||"topRight"==i.position||"topCenter"==i.position?"iziToast-wrapper-topCenter":"iziToast-wrapper-center":"iziToast-wrapper-"+t,c.wrapper=document.querySelector(".iziToast-wrapper."+t),c.wrapper||(c.wrapper=document.createElement("div"),c.wrapper.classList.add("iziToast-wrapper"),c.wrapper.classList.add(t),document.body.appendChild(c.wrapper)),"topLeft"==i.position||"topCenter"==i.position||"topRight"==i.position?c.wrapper.insertBefore(c.toastCapsule,c.wrapper.firstChild):c.wrapper.appendChild(c.toastCapsule)}isNaN(i.zindex)?console.warn("[iziToast] Invalid zIndex."):c.wrapper.style.zIndex=i.zindex}(),i.overlay&&(null!==document.querySelector(".iziToast-overlay.fadeIn")?(c.overlay=document.querySelector(".iziToast-overlay"),c.overlay.setAttribute("data-iziToast-ref",c.overlay.getAttribute("data-iziToast-ref")+","+i.REF),isNaN(i.zindex)||null===i.zindex||(c.overlay.style.zIndex=i.zindex-1)):(c.overlay.classList.add("iziToast-overlay"),c.overlay.classList.add("fadeIn"),c.overlay.style.background=i.overlayColor,c.overlay.setAttribute("data-iziToast-ref",i.REF),isNaN(i.zindex)||null===i.zindex||(c.overlay.style.zIndex=i.zindex-1),document.querySelector("body").appendChild(c.overlay)),i.overlayClose?(c.overlay.removeEventListener("click",{}),c.overlay.addEventListener("click",function(t){e.hide(i,c.toast,"overlay")})):c.overlay.removeEventListener("click",{})),function(){if(i.animateInside){c.toast.classList.add("iziToast-animateInside");var t=[200,100,300];"bounceInLeft"!=i.transitionIn&&"bounceInRight"!=i.transitionIn||(t=[400,200,400]),i.title.length>0&&setTimeout(function(){c.strong.classList.add("slideIn")},t[0]),i.message.length>0&&setTimeout(function(){c.p.classList.add("slideIn")},t[1]),i.icon&&setTimeout(function(){c.icon.classList.add("revealIn")},t[2]);var e=150;i.buttons.length>0&&c.buttons&&setTimeout(function(){d(c.buttons.childNodes,function(t,o){setTimeout(function(){t.classList.add("revealIn")},e),e+=150})},i.inputs.length>0?150:0),i.inputs.length>0&&c.inputs&&(e=150,d(c.inputs.childNodes,function(t,o){setTimeout(function(){t.classList.add("revealIn")},e),e+=150}))}}(),i.onOpening.apply(null,[i,c.toast]);try{var g=new CustomEvent("iziToast-opening",{detail:i,bubbles:!0,cancelable:!0});document.dispatchEvent(g)}catch(t){console.warn(t)}setTimeout(function(){c.toast.classList.remove("iziToast-opening"),c.toast.classList.add("iziToast-opened");try{var t=new CustomEvent("iziToast-opened",{detail:i,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}i.onOpened.apply(null,[i,c.toast])},1e3),i.drag&&(s?(c.toast.addEventListener("touchstart",function(t){m.startMoving(this,e,i,t)},!1),c.toast.addEventListener("touchend",function(t){m.stopMoving(this,t)},!1)):(c.toast.addEventListener("mousedown",function(t){t.preventDefault(),m.startMoving(this,e,i,t)},!1),c.toast.addEventListener("mouseup",function(t){t.preventDefault(),m.stopMoving(this,t)},!1))),i.closeOnEscape&&document.addEventListener("keyup",function(t){27==(t=t||window.event).keyCode&&e.hide(i,c.toast,"esc")}),e.toast=c.toast},e}(),void 0===(s="function"==typeof i?i.apply(e,n):i)||(t.exports=s)}).call(e,o(2))},function(t,e){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(o=window)}t.exports=o}])}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["vue-izitoast"]=e():t["vue-izitoast"]=e()}("undefined"!=typeof self?self:this,function(){return function(t){var e={};function o(i){if(e[i])return e[i].exports;var n=e[i]={i:i,l:!1,exports:{}};return t[i].call(n.exports,n,n.exports,o),n.l=!0,n.exports}return o.m=t,o.c=e,o.d=function(t,e,i){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:i})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=0)}([function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=s;var i=o(1),n=o.n(i);function s(t,e={}){if(e&&e.constructor!==Object)throw"Options must be a object";t.version&&Number(t.version.split(".")[0]);s.installed=!0;n.a.settings(Object.assign({},{zindex:99999,layout:1,balloon:!1,close:!0,closeOnEscape:!1,rtl:!1,position:"bottomRight",timeout:5e3,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}},e));const o=new t({_izi:n.a,_checkParams(t,e,o){if(!t||t.constructor!==String)throw"Message must be a string";if(e&&e.constructor!==String)throw"Title must be a string";if(o&&o.constructor!==Object)throw"Options must be a object"},_checkEventNames(t){if(!t||t.constructor!==String)throw"Event Name must be a string";if("iziToast-open"!==t&&"iziToast-close"!==t)throw"Event Name has only two possible values: iziToast-open or iziToast-close"},methods:{show(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.show(Object.assign({},o,{message:t,title:e}))},hide(t=null,e={}){if(t&&t.constructor!==String&&(t=document.querySelector(t)),t&&t.constructor===HTMLDivElement||(t=document.querySelector(".iziToast")),e&&e.constructor!==Object)throw"Options must be a object";this.$options._izi.hide(e,t)},progress(t,e={},o=(()=>{})){if(t&&t.constructor!==String&&(t=document.querySelector(t)),t&&t.constructor===HTMLDivElement||(t=document.querySelector(".iziToast")),e&&e.constructor!==Object)throw"Options must be a object";if(o&&o.constructor!==Function)throw"Callback must be a function";return this.$options._izi.progress(t,e,o)},destroy(){this.$options._izi.destroy()},info(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.info(Object.assign({},o,{message:t,title:e}))},success(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.success(Object.assign({},o,{message:t,title:e}))},warning(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.warning(Object.assign({},o,{message:t,title:e}))},error(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.error(Object.assign({},o,{message:t,title:e}))},question(t,e="",o={}){this.$options._checkParams(t,e,o),this.$options._izi.question(Object.assign({},o,{message:t,title:e}))},on(t,e){if(this.$options._checkEventNames(t),!e||e.constructor!==Function)throw"Callback must be a function";document.addEventListener(t,e)},off(t){this.$options._checkEventNames(t),document.removeEventListener(t)}}});Object.defineProperty(t.prototype,"$toast",{get:()=>o})}"undefined"!=typeof window&&window.Vue&&window.Vue.use(s)},function(t,e,o){(function(o){var i,n,s;void 0!==o||(window||this.window||this.global),n=[],i=function(t){"use strict";var e={},o=(document.querySelector("body"),!!/Mobi/.test(navigator.userAgent)),i=/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor),n="undefined"!=typeof InstallTrigger,s="ontouchstart"in document.documentElement,a=["bottomRight","bottomLeft","bottomCenter","topRight","topLeft","topCenter","center"],r={},l={id:null,class:"",title:"",titleColor:"",titleSize:"",titleLineHeight:"",message:"",messageColor:"",messageSize:"",messageLineHeight:"",backgroundColor:"",theme:"light",color:"",icon:"",iconText:"",iconColor:"",image:"",imageWidth:50,maxWidth:null,zindex:null,layout:1,balloon:!1,close:!0,closeOnEscape:!1,rtl:!1,position:"bottomRight",target:"",targetFirst:!0,toastOnce:!1,timeout:5e3,animateInside:!0,drag:!0,pauseOnHover:!0,resetOnHover:!1,progressBar:!0,progressBarColor:"",progressBarEasing:"linear",overlay:!1,overlayClose:!1,overlayColor:"rgba(0, 0, 0, 0.6)",transitionIn:"fadeInUp",transitionOut:"fadeOut",transitionInMobile:"fadeInUp",transitionOutMobile:"fadeOutDown",buttons:{},inputs:{},onOpening:function(){},onOpened:function(){},onClosing:function(){},onClosed:function(){}};if("remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),"function"!=typeof window.CustomEvent){var c=function(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var o=document.createEvent("CustomEvent");return o.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),o};c.prototype=window.Event.prototype,window.CustomEvent=c}var d=function(t,e,o){if("[object Object]"===Object.prototype.toString.call(t))for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.call(o,t[i],i,t);else if(t)for(var n=0,s=t.length;n<s;n++)e.call(o,t[n],n,t)},u=function(t,e){var o={};return d(t,function(e,i){o[i]=t[i]}),d(e,function(t,i){o[i]=e[i]}),o},p=function(t){var e=document.createDocumentFragment(),o=document.createElement("div");for(o.innerHTML=t;o.firstChild;)e.appendChild(o.firstChild);return e},m={move:function(t,e,o,s){var a;0!==s&&(t.classList.add("iziToast-dragged"),t.style.transform="translateX("+s+"px)",s>0?(a=(180-s)/180)<.3&&e.hide(u(o,{transitionOut:"fadeOutRight",transitionOutMobile:"fadeOutRight"}),t,"drag"):(a=(180+s)/180)<.3&&e.hide(u(o,{transitionOut:"fadeOutLeft",transitionOutMobile:"fadeOutLeft"}),t,"drag"),t.style.opacity=a,a<.3&&((i||n)&&(t.style.left=s+"px"),t.parentNode.style.opacity=.3,this.stopMoving(t,null)))},startMoving:function(t,e,o,i){i=i||window.event;var n=s?i.touches[0].clientX:i.clientX,a=t.style.transform.replace("px)",""),r=n-(a=a.replace("translateX(",""));t.classList.remove(o.transitionIn),t.classList.remove(o.transitionInMobile),t.style.transition="",s?document.ontouchmove=function(i){i.preventDefault();var n=(i=i||window.event).touches[0].clientX-r;m.move(t,e,o,n)}:document.onmousemove=function(i){i.preventDefault();var n=(i=i||window.event).clientX-r;m.move(t,e,o,n)}},stopMoving:function(t,e){s?document.ontouchmove=function(){}:document.onmousemove=function(){},t.style.opacity="",t.style.transform="",t.classList.contains("iziToast-dragged")&&(t.classList.remove("iziToast-dragged"),t.style.transition="transform 0.4s ease, opacity 0.4s ease",setTimeout(function(){t.style.transition=""},400))}};return e.destroy=function(){d(document.querySelectorAll(".iziToast-wrapper"),function(t,e){t.remove()}),d(document.querySelectorAll(".iziToast"),function(t,e){t.remove()}),document.removeEventListener("iziToast-opened",{},!1),document.removeEventListener("iziToast-opening",{},!1),document.removeEventListener("iziToast-closing",{},!1),document.removeEventListener("iziToast-closed",{},!1),document.removeEventListener("keyup",{},!1),r={}},e.settings=function(t){e.destroy(),r=t,l=u(l,t||{})},d({info:{color:"blue",icon:"ico-info"},success:{color:"green",icon:"ico-success"},warning:{color:"orange",icon:"ico-warning"},error:{color:"red",icon:"ico-error"},question:{color:"yellow",icon:"ico-question"}},function(t,o){e[o]=function(e){var o=u(r,e||{});o=u(t,o||{}),this.show(o)}}),e.progress=function(t,e,o){var i=this,n=u(i.settings,t||{}),s=e.querySelector(".iziToast-progressbar div");return{start:function(){null!==s&&(s.style.transition="width "+n.timeout+"ms "+n.progressBarEasing,s.style.width="0%"),n.TIME.START=(new Date).getTime(),n.TIME.END=n.TIME.START+n.timeout,n.TIME.TIMER=setTimeout(function(){clearTimeout(n.TIME.TIMER),e.classList.contains("iziToast-closing")||(i.hide(n,e,"timeout"),"function"==typeof o&&o.apply(i))},n.timeout)},pause:function(){if(n.TIME.REMAINING=n.TIME.END-(new Date).getTime(),clearTimeout(n.TIME.TIMER),null!==s){var t=window.getComputedStyle(s).getPropertyValue("width");s.style.transition="none",s.style.width=t}"function"==typeof o&&setTimeout(function(){o.apply(i)},10)},resume:function(){null!==s&&(s.style.transition="width "+n.TIME.REMAINING+"ms "+n.progressBarEasing,s.style.width="0%"),n.TIME.END=(new Date).getTime()+n.TIME.REMAINING,n.TIME.TIMER=setTimeout(function(){clearTimeout(n.TIME.TIMER),e.classList.contains("iziToast-closing")||(i.hide(n,e,"timeout"),"function"==typeof o&&o.apply(i))},n.TIME.REMAINING)},reset:function(){clearTimeout(n.TIME.TIMER),null!==s&&(s.style.transition="none",s.style.width="100%"),"function"==typeof o&&setTimeout(function(){o.apply(i)},10)}}},e.hide=function(t,e,i){var n=u(this.settings,t||{});i=i||null,"object"!=typeof e&&(e=document.querySelector(e)),e.classList.add("iziToast-closing"),n.closedBy=i,n.REF=e.getAttribute("data-iziToast-ref"),function(){var t=document.querySelector(".iziToast-overlay");if(null!==t){var e=t.getAttribute("data-iziToast-ref"),o=(e=e.split(",")).indexOf(n.REF);-1!==o&&e.splice(o,1),t.setAttribute("data-iziToast-ref",e.join()),0===e.length&&(t.classList.remove("fadeIn"),t.classList.add("fadeOut"),setTimeout(function(){t.remove()},700))}}(),(n.transitionIn||n.transitionInMobile)&&(e.classList.remove(n.transitionIn),e.classList.remove(n.transitionInMobile)),o||window.innerWidth<=568?n.transitionOutMobile&&e.classList.add(n.transitionOutMobile):n.transitionOut&&e.classList.add(n.transitionOut);var s=e.parentNode.offsetHeight;e.parentNode.style.height=s+"px",e.style.pointerEvents="none",(!o||window.innerWidth>568)&&(e.parentNode.style.transitionDelay="0.2s");try{n.closedBy=i;var a=new CustomEvent("iziToast-closing",{detail:n,bubbles:!0,cancelable:!0});document.dispatchEvent(a)}catch(t){console.warn(t)}setTimeout(function(){e.parentNode.style.height="0px",e.parentNode.style.overflow="",setTimeout(function(){e.parentNode.remove();try{n.closedBy=i;var t=new CustomEvent("iziToast-closed",{detail:n,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}void 0!==n.onClosed&&n.onClosed.apply(null,[n,e,i])},1e3)},200),void 0!==n.onClosing&&n.onClosing.apply(null,[n,e,i])},e.show=function(t){var e=this,i=u(r,t||{});if((i=u(l,i)).TIME={},i.toastOnce&&i.id&&document.querySelectorAll(".iziToast#"+i.id).length>0)return!1;i.REF=(new Date).getTime()+Math.floor(1e7*Math.random()+1);var n,c={body:document.querySelector("body"),overlay:document.createElement("div"),toast:document.createElement("div"),toastBody:document.createElement("div"),toastTexts:document.createElement("div"),toastCapsule:document.createElement("div"),icon:document.createElement("i"),cover:document.createElement("div"),buttons:document.createElement("div"),inputs:document.createElement("div"),wrapper:null};c.toast.setAttribute("data-iziToast-ref",i.REF),c.toast.appendChild(c.toastBody),c.toastCapsule.appendChild(c.toast),function(){if(c.toast.classList.add("iziToast"),c.toast.classList.add("iziToast-opening"),c.toastCapsule.classList.add("iziToast-capsule"),c.toastBody.classList.add("iziToast-body"),c.toastTexts.classList.add("iziToast-texts"),o||window.innerWidth<=568?i.transitionInMobile&&c.toast.classList.add(i.transitionInMobile):i.transitionIn&&c.toast.classList.add(i.transitionIn),i.class){var t=i.class.split(" ");d(t,function(t,e){c.toast.classList.add(t)})}var e;i.id&&(c.toast.id=i.id),i.rtl&&c.toast.classList.add("iziToast-rtl"),i.layout>1&&c.toast.classList.add("iziToast-layout"+i.layout),i.balloon&&c.toast.classList.add("iziToast-balloon"),i.maxWidth&&(isNaN(i.maxWidth)?c.toast.style.maxWidth=i.maxWidth:c.toast.style.maxWidth=i.maxWidth+"px"),""===i.theme&&"light"===i.theme||c.toast.classList.add("iziToast-theme-"+i.theme),i.color&&("#"==(e=i.color).substring(0,1)||"rgb"==e.substring(0,3)||"hsl"==e.substring(0,3)?c.toast.style.background=i.color:c.toast.classList.add("iziToast-color-"+i.color)),i.backgroundColor&&(c.toast.style.background=i.backgroundColor,i.balloon&&(c.toast.style.borderColor=i.backgroundColor))}(),i.image&&(c.cover.classList.add("iziToast-cover"),c.cover.style.width=i.imageWidth+"px",function(t){try{return btoa(atob(t))==t}catch(t){return!1}}(i.image.replace(/ /g,""))?c.cover.style.backgroundImage="url(data:image/png;base64,"+i.image.replace(/ /g,"")+")":c.cover.style.backgroundImage="url("+i.image+")",i.rtl?c.toastBody.style.marginRight=i.imageWidth+10+"px":c.toastBody.style.marginLeft=i.imageWidth+10+"px",c.toast.appendChild(c.cover)),i.close?(c.buttonClose=document.createElement("button"),c.buttonClose.classList.add("iziToast-close"),c.buttonClose.addEventListener("click",function(t){t.target,e.hide(i,c.toast,"button")}),c.toast.appendChild(c.buttonClose)):i.rtl?c.toast.style.paddingLeft="18px":c.toast.style.paddingRight="18px",i.timeout&&(i.progressBar&&(c.progressBar=document.createElement("div"),c.progressBarDiv=document.createElement("div"),c.progressBar.classList.add("iziToast-progressbar"),c.progressBarDiv.style.background=i.progressBarColor,c.progressBar.appendChild(c.progressBarDiv),c.toast.appendChild(c.progressBar)),i.pauseOnHover&&!i.resetOnHover&&(c.toast.addEventListener("mouseenter",function(t){this.classList.add("iziToast-paused"),e.progress(i,c.toast).pause()}),c.toast.addEventListener("mouseleave",function(t){this.classList.remove("iziToast-paused"),e.progress(i,c.toast).resume()})),i.resetOnHover&&(c.toast.addEventListener("mouseenter",function(t){this.classList.add("iziToast-reseted"),e.progress(i,c.toast).reset()}),c.toast.addEventListener("mouseleave",function(t){this.classList.remove("iziToast-reseted"),e.progress(i,c.toast).start()}))),i.icon&&(c.icon.setAttribute("class","iziToast-icon "+i.icon),i.iconText&&c.icon.appendChild(document.createTextNode(i.iconText)),i.rtl?c.toastBody.style.paddingRight="33px":c.toastBody.style.paddingLeft="33px",i.iconColor&&(c.icon.style.color=i.iconColor),c.toastBody.appendChild(c.icon)),i.title.length>0&&(c.strong=document.createElement("strong"),c.strong.classList.add("iziToast-title"),c.strong.appendChild(p(i.title)),c.toastTexts.appendChild(c.strong),i.titleColor&&(c.strong.style.color=i.titleColor),i.titleSize&&(isNaN(i.titleSize)?c.strong.style.fontSize=i.titleSize:c.strong.style.fontSize=i.titleSize+"px"),i.titleLineHeight&&(isNaN(i.titleSize)?c.strong.style.lineHeight=i.titleLineHeight:c.strong.style.lineHeight=i.titleLineHeight+"px")),i.message.length>0&&(c.p=document.createElement("p"),c.p.classList.add("iziToast-message"),c.p.appendChild(p(i.message)),c.toastTexts.appendChild(c.p),i.messageColor&&(c.p.style.color=i.messageColor),i.messageSize&&(isNaN(i.titleSize)?c.p.style.fontSize=i.messageSize:c.p.style.fontSize=i.messageSize+"px"),i.messageLineHeight&&(isNaN(i.titleSize)?c.p.style.lineHeight=i.messageLineHeight:c.p.style.lineHeight=i.messageLineHeight+"px")),i.title.length>0&&i.message.length>0&&(i.rtl?c.strong.style.marginLeft="10px":2===i.layout||i.rtl||(c.strong.style.marginRight="10px")),c.toastBody.appendChild(c.toastTexts),i.inputs.length>0&&(c.inputs.classList.add("iziToast-inputs"),d(i.inputs,function(t,o){c.inputs.appendChild(p(t[0])),(n=c.inputs.childNodes)[o].classList.add("iziToast-inputs-child"),t[3]&&setTimeout(function(){n[o].focus()},300),n[o].addEventListener(t[1],function(o){return(0,t[2])(e,c.toast,this,o)})})),c.toastBody.appendChild(c.inputs),i.buttons.length>0&&(c.buttons.classList.add("iziToast-buttons"),d(i.buttons,function(t,o){c.buttons.appendChild(p(t[0]));var i=c.buttons.childNodes;i[o].classList.add("iziToast-buttons-child"),t[2]&&setTimeout(function(){i[o].focus()},300),i[o].addEventListener("click",function(o){return o.preventDefault(),(0,t[1])(e,c.toast,this,o,n)})})),c.toastBody.appendChild(c.buttons),i.message.length>0&&(i.inputs.length>0||i.buttons.length>0)&&(c.p.style.marginBottom="0"),(i.inputs.length>0||i.buttons.length>0)&&(i.rtl?c.toastTexts.style.marginLeft="10px":c.toastTexts.style.marginRight="10px",i.inputs.length>0&&i.buttons.length>0&&(i.rtl?c.inputs.style.marginLeft="8px":c.inputs.style.marginRight="8px")),c.toastCapsule.style.visibility="hidden",setTimeout(function(){var t=c.toast.offsetHeight,o=c.toast.currentStyle||window.getComputedStyle(c.toast),n=o.marginTop;n=n.split("px"),n=parseInt(n[0]);var s=o.marginBottom;s=s.split("px"),s=parseInt(s[0]),c.toastCapsule.style.visibility="",c.toastCapsule.style.height=t+s+n+"px",setTimeout(function(){c.toastCapsule.style.height="auto",i.target&&(c.toastCapsule.style.overflow="visible")},500),i.timeout&&e.progress(i,c.toast).start()},100),function(){var t=i.position;if(i.target)c.wrapper=document.querySelector(i.target),c.wrapper.classList.add("iziToast-target"),i.targetFirst?c.wrapper.insertBefore(c.toastCapsule,c.wrapper.firstChild):c.wrapper.appendChild(c.toastCapsule);else{if(-1==a.indexOf(i.position))return void console.warn("[iziToast] Incorrect position.\nIt can be › "+a);t=o||window.innerWidth<=568?"bottomLeft"==i.position||"bottomRight"==i.position||"bottomCenter"==i.position?"iziToast-wrapper-bottomCenter":"topLeft"==i.position||"topRight"==i.position||"topCenter"==i.position?"iziToast-wrapper-topCenter":"iziToast-wrapper-center":"iziToast-wrapper-"+t,c.wrapper=document.querySelector(".iziToast-wrapper."+t),c.wrapper||(c.wrapper=document.createElement("div"),c.wrapper.classList.add("iziToast-wrapper"),c.wrapper.classList.add(t),document.body.appendChild(c.wrapper)),"topLeft"==i.position||"topCenter"==i.position||"topRight"==i.position?c.wrapper.insertBefore(c.toastCapsule,c.wrapper.firstChild):c.wrapper.appendChild(c.toastCapsule)}isNaN(i.zindex)?console.warn("[iziToast] Invalid zIndex."):c.wrapper.style.zIndex=i.zindex}(),i.overlay&&(null!==document.querySelector(".iziToast-overlay.fadeIn")?(c.overlay=document.querySelector(".iziToast-overlay"),c.overlay.setAttribute("data-iziToast-ref",c.overlay.getAttribute("data-iziToast-ref")+","+i.REF),isNaN(i.zindex)||null===i.zindex||(c.overlay.style.zIndex=i.zindex-1)):(c.overlay.classList.add("iziToast-overlay"),c.overlay.classList.add("fadeIn"),c.overlay.style.background=i.overlayColor,c.overlay.setAttribute("data-iziToast-ref",i.REF),isNaN(i.zindex)||null===i.zindex||(c.overlay.style.zIndex=i.zindex-1),document.querySelector("body").appendChild(c.overlay)),i.overlayClose?(c.overlay.removeEventListener("click",{}),c.overlay.addEventListener("click",function(t){e.hide(i,c.toast,"overlay")})):c.overlay.removeEventListener("click",{})),function(){if(i.animateInside){c.toast.classList.add("iziToast-animateInside");var t=[200,100,300];"bounceInLeft"!=i.transitionIn&&"bounceInRight"!=i.transitionIn||(t=[400,200,400]),i.title.length>0&&setTimeout(function(){c.strong.classList.add("slideIn")},t[0]),i.message.length>0&&setTimeout(function(){c.p.classList.add("slideIn")},t[1]),i.icon&&setTimeout(function(){c.icon.classList.add("revealIn")},t[2]);var e=150;i.buttons.length>0&&c.buttons&&setTimeout(function(){d(c.buttons.childNodes,function(t,o){setTimeout(function(){t.classList.add("revealIn")},e),e+=150})},i.inputs.length>0?150:0),i.inputs.length>0&&c.inputs&&(e=150,d(c.inputs.childNodes,function(t,o){setTimeout(function(){t.classList.add("revealIn")},e),e+=150}))}}(),i.onOpening.apply(null,[i,c.toast]);try{var g=new CustomEvent("iziToast-opening",{detail:i,bubbles:!0,cancelable:!0});document.dispatchEvent(g)}catch(t){console.warn(t)}setTimeout(function(){c.toast.classList.remove("iziToast-opening"),c.toast.classList.add("iziToast-opened");try{var t=new CustomEvent("iziToast-opened",{detail:i,bubbles:!0,cancelable:!0});document.dispatchEvent(t)}catch(t){console.warn(t)}i.onOpened.apply(null,[i,c.toast])},1e3),i.drag&&(s?(c.toast.addEventListener("touchstart",function(t){m.startMoving(this,e,i,t)},!1),c.toast.addEventListener("touchend",function(t){m.stopMoving(this,t)},!1)):(c.toast.addEventListener("mousedown",function(t){t.preventDefault(),m.startMoving(this,e,i,t)},!1),c.toast.addEventListener("mouseup",function(t){t.preventDefault(),m.stopMoving(this,t)},!1))),i.closeOnEscape&&document.addEventListener("keyup",function(t){27==(t=t||window.event).keyCode&&e.hide(i,c.toast,"esc")}),e.toast=c.toast},e}(),void 0===(s="function"==typeof i?i.apply(e,n):i)||(t.exports=s)}).call(e,o(2))},function(t,e){var o;o=function(){return this}();try{o=o||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(o=window)}t.exports=o}])}); |
{ | ||
"name": "vue-izitoast", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Elegant, responsive, flexible and lightweight notification plugin implemented for Vue 2 of iziToast", | ||
@@ -45,35 +45,35 @@ "main": "dist/vue-izitoast.js", | ||
"dependencies": { | ||
"izitoast": "dolce/iziToast#76fe906" | ||
"izitoast": "^1.3.0" | ||
}, | ||
"peerDependencies": { | ||
"izitoast": "dolce/iziToast#76fe906", | ||
"izitoast": "^1.3.0", | ||
"vue": "^2.0.0" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-eslint": "^8.2.1", | ||
"babel-loader": "^7.1.2", | ||
"babel-core": "^6.26.3", | ||
"babel-eslint": "^8.2.3", | ||
"babel-loader": "^7.1.4", | ||
"babel-plugin-transform-runtime": "^6.23.0", | ||
"babel-preset-env": "^1.6.1", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-stage-3": "^6.24.1", | ||
"chalk": "^2.3.1", | ||
"chalk": "^2.4.1", | ||
"compression-webpack-plugin": "^1.1.6", | ||
"cross-env": "^5.1.3", | ||
"cross-spawn": "^6.0.4", | ||
"eslint": "^4.17.0", | ||
"cross-env": "^5.1.5", | ||
"cross-spawn": "^6.0.5", | ||
"eslint": "^4.19.1", | ||
"eslint-friendly-formatter": "^3.0.0", | ||
"eslint-loader": "^1.9.0", | ||
"eslint-plugin-import": "^2.8.0", | ||
"friendly-errors-webpack-plugin": "^1.6.1", | ||
"eslint-plugin-import": "^2.12.0", | ||
"friendly-errors-webpack-plugin": "^1.7.0", | ||
"ora": "^1.4.0", | ||
"rimraf": "^2.6.2", | ||
"semver": "^5.5.0", | ||
"shelljs": "^0.8.1", | ||
"shelljs": "^0.8.2", | ||
"uglify-es": "^3.3.9", | ||
"uglifyjs-webpack-plugin": "^1.1.8", | ||
"webpack": "^3.11.0", | ||
"webpack-bundle-analyzer": "^2.10.0", | ||
"webpack-dev-middleware": "^2.0.5", | ||
"webpack-merge": "^4.1.1" | ||
"uglifyjs-webpack-plugin": "^1.2.5", | ||
"webpack": "^3.12.0", | ||
"webpack-bundle-analyzer": "^2.12.0", | ||
"webpack-dev-middleware": "^2.0.6", | ||
"webpack-merge": "^4.1.2" | ||
} | ||
} |
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
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
0
0
84391
+ Addedizitoast@1.4.0(transitive)
+ Addednanoid@3.3.8(transitive)
- Removednanoid@3.3.7(transitive)
Updatedizitoast@^1.3.0