Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-notifications

Package Overview
Dependencies
Maintainers
4
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-notifications - npm Package Compare versions

Comparing version 17.1.48 to 17.2.28-beta

helpers/e2e/index.d.ts

4

dist/ej2-notifications.umd.min.js
/*!
* filename: ej2-notifications.umd.min.js
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],e):e(t.ej={},t.ej2Base,t.ej2Buttons,t.ej2Popups)}(this,function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",l="e-toast-container",a="e-toast-full-width",p="e-toast-message",h="e-toast-progress",d="e-toast-close-icon",c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("Left")],i.prototype,"X",void 0),n([e.Property("Top")],i.prototype,"Y",void 0),i}(e.ChildProperty),u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property(null)],i.prototype,"model",void 0),n([e.Property(null)],i.prototype,"click",void 0),i}(e.ChildProperty),f=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("FadeIn")],i.prototype,"effect",void 0),n([e.Property(600)],i.prototype,"duration",void 0),n([e.Property("ease")],i.prototype,"easing",void 0),i}(e.ChildProperty),m=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Complex({effect:"FadeIn",duration:600,easing:"ease"},f)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},f)],i.prototype,"hide",void 0),i}(e.ChildProperty),y=function(t){function f(e,i){return t.call(this,e,i)||this}return o(f,t),f.prototype.getModuleName=function(){return"toast"},f.prototype.getPersistData=function(){return this.addOnPersist([])},f.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(l),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},f.prototype.preRender=function(){this.isDevice=e.Browser.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),e.isNullOrUndefined(this.target)&&(this.target=document.body),this.enableRtl&&this.element.classList.add("e-rtl")},f.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.titleTemplate=null,this.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)})},f.prototype.show=function(t){if(e.isNullOrUndefined(t)||(this.templateChanges(t),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var i="string"==typeof this.target?document.querySelector(this.target):this.target;if(e.isNullOrUndefined(i))return;"BODY"===i.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",i.style.position="relative"),this.setPositioning(this.position),i.appendChild(this.toastContainer)}this.toastEle=this.createElement("div",{className:r,id:e.getUniqueID("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),e.isNullOrUndefined(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget()},f.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(."+l+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hide(i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hide(i)),this.animation.hide.effect=s)},f.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),e.isUndefined(t.title)||e.isNullOrUndefined(this.titleTemplate)||this.title===t.title||this.clearTitleTemplate(),e.isUndefined(t.template)||e.isNullOrUndefined(this.toastTemplate)||this.template===t.template||this.clearToastTemplate()},f.prototype.setCSSClass=function(t){if(!e.isNullOrUndefined(t)){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},f.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add(a):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(a)),this.toastEle.style.height=e.formatUnit(this.height)},f.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},f.prototype.hide=function(t){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof t||"All"!==t)e.isNullOrUndefined(t)&&(t=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(t);else for(var i=0;i<this.toastContainer.childElementCount;i++)this.destroyToast(this.toastContainer.children[i])},f.prototype.fetchEle=function(t,i,s){var o,n,r;if(n="title"===s?this.titleTemplate:"content"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=document.querySelector(i);t.appendChild(l),l.style.display="";var a=l.cloneNode(!0);"title"===s?this.titleTemplate=a:"content"===s?this.contentTemplate=a:this.toastTemplate=a}}catch(t){o=e.compile(i)}return e.isNullOrUndefined(o)||(r=o({},this,s)),e.isNullOrUndefined(r)||!(r.length>0)||e.isNullOrUndefined(r[0].tagName)&&1===r.length?0===t.childElementCount&&(t.innerHTML=i):[].slice.call(r).forEach(function(i){e.isNullOrUndefined(i.tagName)||(i.style.display=""),t.appendChild(i)}),t},f.prototype.clearProgress=function(t){e.isNullOrUndefined(this.intervalId[t])||(clearInterval(this.intervalId[t]),delete this.intervalId[t]),e.isNullOrUndefined(this.progressObj[t])||(clearInterval(this.progressObj[t].intervalId),delete this.progressObj[t])},f.prototype.clearContainerPos=function(){var t=this;this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.toastContainer=null,this.customPosition=!1):([r+"-top-left",r+"-top-right",r+"-bottom-left",r+"-bottom-right",r+"-bottom-center",r+"-top-center",r+"-full-width"].forEach(function(i){!e.isNullOrUndefined(t.toastContainer)&&t.toastContainer.classList.contains(i)&&t.toastContainer.classList.remove(i)}),this.toastContainer=null),e.isNullOrUndefined(this.titleTemplate)||this.clearTitleTemplate(),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},f.prototype.clearTitleTemplate=function(){this.titleTemplate.style.display="none",document.body.appendChild(this.titleTemplate),this.titleTemplate=null},f.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},f.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},f.prototype.destroyToast=function(t){var i=this,s=this.animation.hide,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n=parseInt(t.id.split("toast_")[1],10),r={toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+h))||(this.progressObj[n].progressEle.style.width="0%"),o.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,o)},f.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},f.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},f.prototype.setPositioning=function(t){"number"==typeof t.X||"number"==typeof t.Y||-1!==t.X.indexOf("%")||-1!==t.Y.indexOf("%")?(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0):this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase())},f.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:d+" e-icons "});this.toastEle.appendChild(t)}},f.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:h}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},f.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+h))||(this.progressObj[t].progressEle.style.width="0%")},f.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+h))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},f.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},f.prototype.setIcon=function(){if(!e.isNullOrUndefined(this.icon)&&0!==this.icon.length){var t=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.appendChild(t)}},f.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:"e-toast-title"});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:p});i.appendChild(t),this.toastEle.appendChild(i)}},f.prototype.setContent=function(){var t=this.createElement("div",{className:"e-toast-content"}),i=this.element;if(e.isNullOrUndefined(this.content)||""===this.content){var s=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||s)&&!i.firstElementChild.classList.contains(r)){this.innerEle=document.createDocumentFragment();for(var o=this.createElement("div");0!==i.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);t.appendChild(this.innerEle),[].slice.call(t.children).forEach(function(t){o.appendChild(t.cloneNode(!0))}),this.content=o,this.appendMessageContainer(t)}}else"object"!=typeof this.content||e.isNullOrUndefined(this.content.tagName)?(t=this.fetchEle(t,this.content,"content"),this.appendMessageContainer(t)):(t.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(t))},f.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+p).length>0)this.toastEle.querySelector("."+p).appendChild(t);else{var e=this.createElement("div",{className:p});e.appendChild(t),this.toastEle.appendChild(e)}},f.prototype.actionButtons=function(){var t=this,s=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(o){if(!e.isNullOrUndefined(o.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(o.model.cssClass)||0===o.model.cssClass.length)&&(o.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(o.model,n),e.isNullOrUndefined(o.click)||"function"!=typeof o.click||e.EventHandler.add(n,"click",o.click),s.appendChild(n)}}),s.childElementCount>0&&this.appendMessageContainer(s)},f.prototype.appendToTarget=function(){var t={toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",t),t.cancel||(this.toastEle.style.display="none",this.newestOnTop&&0!==this.toastContainer.childElementCount?this.toastContainer.insertBefore(this.toastEle,this.toastContainer.children[0]):this.toastContainer.appendChild(this.toastEle),e.EventHandler.add(this.toastEle,"click",this.clickHandler,this),this.toastContainer.style.zIndex=s.getZindexPartial(this.toastContainer)+"",this.displayToast(this.toastEle))},f.prototype.clickHandler=function(t){t.stopPropagation();var i=t.target,s=e.closest(i,"."+r),o={element:s,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},n=i.classList.contains(d);this.trigger("click",o),(n&&!o.cancel||o.clickToClose)&&this.destroyToast(s)},f.prototype.displayToast=function(t){var i=this,s=this.animation.show,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n={toastObj:this,element:this.toastEle};o.begin=function(){t.style.display=""},o.end=function(){i.trigger("open",n)},new e.Animation(o).animate(t)},f.prototype.getContainer=function(){return this.element.classList.add(l),this.element},f.prototype.onPropertyChanged=function(t,e){for(var i=this.element,s=0,o=Object.keys(t);s<o.length;s++){switch(o[s]){case"enableRtl":t.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl")}}},n([e.Property("300px")],f.prototype,"width",void 0),n([e.Property("auto")],f.prototype,"height",void 0),n([e.Property(null)],f.prototype,"title",void 0),n([e.Property(null)],f.prototype,"content",void 0),n([e.Property(null)],f.prototype,"icon",void 0),n([e.Property(null)],f.prototype,"cssClass",void 0),n([e.Property(null)],f.prototype,"template",void 0),n([e.Property(!0)],f.prototype,"newestOnTop",void 0),n([e.Property(!1)],f.prototype,"showCloseButton",void 0),n([e.Property(!1)],f.prototype,"showProgressBar",void 0),n([e.Property(5e3)],f.prototype,"timeOut",void 0),n([e.Property(1e3)],f.prototype,"extendedTimeout",void 0),n([e.Complex({},m)],f.prototype,"animation",void 0),n([e.Complex({},c)],f.prototype,"position",void 0),n([e.Collection([{}],u)],f.prototype,"buttons",void 0),n([e.Property(null)],f.prototype,"target",void 0),n([e.Event()],f.prototype,"created",void 0),n([e.Event()],f.prototype,"destroyed",void 0),n([e.Event()],f.prototype,"open",void 0),n([e.Event()],f.prototype,"beforeOpen",void 0),n([e.Event()],f.prototype,"close",void 0),n([e.Event()],f.prototype,"click",void 0),f=n([e.NotifyPropertyChanges],f)}(e.Component);t.ToastPosition=c,t.ButtonModelProps=u,t.ToastAnimations=f,t.ToastAnimationSettings=m,t.Toast=y,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],e):e(t.ej={},t.ej2Base,t.ej2Buttons,t.ej2Popups)}(this,function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",l="e-toast-container",a="e-toast-full-width",p="e-toast-message",d="e-toast-progress",h="e-toast-close-icon",c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("Left")],i.prototype,"X",void 0),n([e.Property("Top")],i.prototype,"Y",void 0),i}(e.ChildProperty),u=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property(null)],i.prototype,"model",void 0),n([e.Property(null)],i.prototype,"click",void 0),i}(e.ChildProperty),f=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("FadeIn")],i.prototype,"effect",void 0),n([e.Property(600)],i.prototype,"duration",void 0),n([e.Property("ease")],i.prototype,"easing",void 0),i}(e.ChildProperty),m=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Complex({effect:"FadeIn",duration:600,easing:"ease"},f)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},f)],i.prototype,"hide",void 0),i}(e.ChildProperty),y=function(t){function f(e,i){return t.call(this,e,i)||this}return o(f,t),f.prototype.getModuleName=function(){return"toast"},f.prototype.getPersistData=function(){return this.addOnPersist([])},f.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(l),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},f.prototype.preRender=function(){this.isDevice=e.Browser.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),e.isNullOrUndefined(this.target)&&(this.target=document.body),this.enableRtl&&this.element.classList.add("e-rtl")},f.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.titleTemplate=null,this.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)})},f.prototype.show=function(t){if(e.isNullOrUndefined(t)||(this.templateChanges(t),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var i="string"==typeof this.target?document.querySelector(this.target):this.target;if(e.isNullOrUndefined(i))return;"BODY"===i.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",i.style.position="relative"),this.setPositioning(this.position),i.appendChild(this.toastContainer)}this.toastEle=this.createElement("div",{className:r,id:e.getUniqueID("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),e.isNullOrUndefined(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget()},f.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(."+l+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hide(i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hide(i)),this.animation.hide.effect=s)},f.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),e.isUndefined(t.title)||e.isNullOrUndefined(this.titleTemplate)||this.title===t.title||this.clearTitleTemplate(),e.isUndefined(t.template)||e.isNullOrUndefined(this.toastTemplate)||this.template===t.template||this.clearToastTemplate()},f.prototype.setCSSClass=function(t){if(!e.isNullOrUndefined(t)){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},f.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add(a):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(a)),this.toastEle.style.height=e.formatUnit(this.height)},f.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},f.prototype.hide=function(t){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof t||"All"!==t)e.isNullOrUndefined(t)&&(t=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(t);else for(var i=0;i<this.toastContainer.childElementCount;i++)this.destroyToast(this.toastContainer.children[i])},f.prototype.fetchEle=function(t,i,s){var o,n,r;if(n="title"===s?this.titleTemplate:"content"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=document.querySelector(i);t.appendChild(l),l.style.display="";var a=l.cloneNode(!0);"title"===s?this.titleTemplate=a:"content"===s?this.contentTemplate=a:this.toastTemplate=a}}catch(t){o=e.compile(i)}return e.isNullOrUndefined(o)||(r=o({},this,s)),e.isNullOrUndefined(r)||!(r.length>0)||e.isNullOrUndefined(r[0].tagName)&&1===r.length?0===t.childElementCount&&(t.innerHTML=i):[].slice.call(r).forEach(function(i){e.isNullOrUndefined(i.tagName)||(i.style.display=""),t.appendChild(i)}),t},f.prototype.clearProgress=function(t){e.isNullOrUndefined(this.intervalId[t])||(clearInterval(this.intervalId[t]),delete this.intervalId[t]),e.isNullOrUndefined(this.progressObj[t])||(clearInterval(this.progressObj[t].intervalId),delete this.progressObj[t])},f.prototype.clearContainerPos=function(){var t=this;this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.toastContainer=null,this.customPosition=!1):([r+"-top-left",r+"-top-right",r+"-bottom-left",r+"-bottom-right",r+"-bottom-center",r+"-top-center",r+"-full-width"].forEach(function(i){!e.isNullOrUndefined(t.toastContainer)&&t.toastContainer.classList.contains(i)&&t.toastContainer.classList.remove(i)}),this.toastContainer=null),e.isNullOrUndefined(this.titleTemplate)||this.clearTitleTemplate(),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},f.prototype.clearTitleTemplate=function(){this.titleTemplate.style.display="none",document.body.appendChild(this.titleTemplate),this.titleTemplate=null},f.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},f.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},f.prototype.destroyToast=function(t){var i=this,s=this.animation.hide,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n=parseInt(t.id.split("toast_")[1],10),r={toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+d))||(this.progressObj[n].progressEle.style.width="0%"),o.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,o)},f.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},f.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},f.prototype.setPositioning=function(t){"number"==typeof t.X||"number"==typeof t.Y||-1!==t.X.indexOf("%")||-1!==t.Y.indexOf("%")?(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0):this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase())},f.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:h+" e-icons "});this.toastEle.appendChild(t)}},f.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:d}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},f.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+d))||(this.progressObj[t].progressEle.style.width="0%")},f.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+d))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},f.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},f.prototype.setIcon=function(){if(!e.isNullOrUndefined(this.icon)&&0!==this.icon.length){var t=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.appendChild(t)}},f.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:"e-toast-title"});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:p});i.appendChild(t),this.toastEle.appendChild(i)}},f.prototype.setContent=function(){var t=this.createElement("div",{className:"e-toast-content"}),i=this.element;if(e.isNullOrUndefined(this.content)||""===this.content){var s=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||s)&&!i.firstElementChild.classList.contains(r)){this.innerEle=document.createDocumentFragment();for(var o=this.createElement("div");0!==i.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);t.appendChild(this.innerEle),[].slice.call(t.children).forEach(function(t){o.appendChild(t.cloneNode(!0))}),this.content=o,this.appendMessageContainer(t)}}else"object"!=typeof this.content||e.isNullOrUndefined(this.content.tagName)?(t=this.fetchEle(t,this.content,"content"),this.appendMessageContainer(t)):(t.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(t))},f.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+p).length>0)this.toastEle.querySelector("."+p).appendChild(t);else{var e=this.createElement("div",{className:p});e.appendChild(t),this.toastEle.appendChild(e)}},f.prototype.actionButtons=function(){var t=this,s=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(o){if(!e.isNullOrUndefined(o.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(o.model.cssClass)||0===o.model.cssClass.length)&&(o.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(o.model,n),e.isNullOrUndefined(o.click)||"function"!=typeof o.click||e.EventHandler.add(n,"click",o.click),s.appendChild(n)}}),s.childElementCount>0&&this.appendMessageContainer(s)},f.prototype.appendToTarget=function(){var t=this,i={toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",i,function(i){i.cancel||(t.toastEle.style.display="none",t.newestOnTop&&0!==t.toastContainer.childElementCount?t.toastContainer.insertBefore(t.toastEle,t.toastContainer.children[0]):t.toastContainer.appendChild(t.toastEle),e.EventHandler.add(t.toastEle,"click",t.clickHandler,t),t.toastContainer.style.zIndex=s.getZindexPartial(t.toastContainer)+"",t.displayToast(t.toastEle))})},f.prototype.clickHandler=function(t){var i=this;t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n={element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},l=s.classList.contains(h);this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(o)})},f.prototype.displayToast=function(t){var i=this,s=this.animation.show,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n={toastObj:this,element:this.toastEle};o.begin=function(){t.style.display=""},o.end=function(){i.trigger("open",n)},new e.Animation(o).animate(t)},f.prototype.getContainer=function(){return this.element.classList.add(l),this.element},f.prototype.onPropertyChanged=function(t,e){for(var i=this.element,s=0,o=Object.keys(t);s<o.length;s++){switch(o[s]){case"enableRtl":t.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl")}}},n([e.Property("300px")],f.prototype,"width",void 0),n([e.Property("auto")],f.prototype,"height",void 0),n([e.Property(null)],f.prototype,"title",void 0),n([e.Property(null)],f.prototype,"content",void 0),n([e.Property(null)],f.prototype,"icon",void 0),n([e.Property(null)],f.prototype,"cssClass",void 0),n([e.Property(null)],f.prototype,"template",void 0),n([e.Property(!0)],f.prototype,"newestOnTop",void 0),n([e.Property(!1)],f.prototype,"showCloseButton",void 0),n([e.Property(!1)],f.prototype,"showProgressBar",void 0),n([e.Property(5e3)],f.prototype,"timeOut",void 0),n([e.Property(1e3)],f.prototype,"extendedTimeout",void 0),n([e.Complex({},m)],f.prototype,"animation",void 0),n([e.Complex({},c)],f.prototype,"position",void 0),n([e.Collection([{}],u)],f.prototype,"buttons",void 0),n([e.Property(null)],f.prototype,"target",void 0),n([e.Event()],f.prototype,"created",void 0),n([e.Event()],f.prototype,"destroyed",void 0),n([e.Event()],f.prototype,"open",void 0),n([e.Event()],f.prototype,"beforeOpen",void 0),n([e.Event()],f.prototype,"close",void 0),n([e.Event()],f.prototype,"click",void 0),f=n([e.NotifyPropertyChanges],f)}(e.Component);t.ToastPosition=c,t.ButtonModelProps=u,t.ToastAnimations=f,t.ToastAnimationSettings=m,t.Toast=y,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-notifications.umd.min.js.map

@@ -515,16 +515,16 @@ import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, NotifyPropertyChanges, Property, Touch, attributes, classList, closest, compile, detach, extend, formatUnit, getUniqueID, isNullOrUndefined, isUndefined, setStyleAttribute } from '@syncfusion/ej2-base';

};
this.trigger('beforeOpen', toastBeforeOpen);
if (toastBeforeOpen.cancel) {
return;
}
this.toastEle.style.display = 'none';
if (this.newestOnTop && this.toastContainer.childElementCount !== 0) {
this.toastContainer.insertBefore(this.toastEle, this.toastContainer.children[0]);
}
else {
this.toastContainer.appendChild(this.toastEle);
}
EventHandler.add(this.toastEle, 'click', this.clickHandler, this);
this.toastContainer.style.zIndex = getZindexPartial(this.toastContainer) + '';
this.displayToast(this.toastEle);
this.trigger('beforeOpen', toastBeforeOpen, (toastBeforeOpenArgs) => {
if (!toastBeforeOpenArgs.cancel) {
this.toastEle.style.display = 'none';
if (this.newestOnTop && this.toastContainer.childElementCount !== 0) {
this.toastContainer.insertBefore(this.toastEle, this.toastContainer.children[0]);
}
else {
this.toastContainer.appendChild(this.toastEle);
}
EventHandler.add(this.toastEle, 'click', this.clickHandler, this);
this.toastContainer.style.zIndex = getZindexPartial(this.toastContainer) + '';
this.displayToast(this.toastEle);
}
});
}

@@ -539,6 +539,7 @@ clickHandler(e) {

let isCloseIcon = target.classList.contains(CLOSEBTN);
this.trigger('click', clickArgs);
if ((isCloseIcon && !clickArgs.cancel) || clickArgs.clickToClose) {
this.destroyToast(toastEle);
}
this.trigger('click', clickArgs, (toastClickArgs) => {
if ((isCloseIcon && !toastClickArgs.cancel) || toastClickArgs.clickToClose) {
this.destroyToast(toastEle);
}
});
}

@@ -545,0 +546,0 @@ displayToast(toastEle) {

@@ -547,2 +547,3 @@ import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, NotifyPropertyChanges, Property, Touch, attributes, classList, closest, compile, detach, extend, formatUnit, getUniqueID, isNullOrUndefined, isUndefined, setStyleAttribute } from '@syncfusion/ej2-base';

Toast.prototype.appendToTarget = function () {
var _this = this;
var toastBeforeOpen = {

@@ -553,18 +554,19 @@ toastObj: this,

};
this.trigger('beforeOpen', toastBeforeOpen);
if (toastBeforeOpen.cancel) {
return;
}
this.toastEle.style.display = 'none';
if (this.newestOnTop && this.toastContainer.childElementCount !== 0) {
this.toastContainer.insertBefore(this.toastEle, this.toastContainer.children[0]);
}
else {
this.toastContainer.appendChild(this.toastEle);
}
EventHandler.add(this.toastEle, 'click', this.clickHandler, this);
this.toastContainer.style.zIndex = getZindexPartial(this.toastContainer) + '';
this.displayToast(this.toastEle);
this.trigger('beforeOpen', toastBeforeOpen, function (toastBeforeOpenArgs) {
if (!toastBeforeOpenArgs.cancel) {
_this.toastEle.style.display = 'none';
if (_this.newestOnTop && _this.toastContainer.childElementCount !== 0) {
_this.toastContainer.insertBefore(_this.toastEle, _this.toastContainer.children[0]);
}
else {
_this.toastContainer.appendChild(_this.toastEle);
}
EventHandler.add(_this.toastEle, 'click', _this.clickHandler, _this);
_this.toastContainer.style.zIndex = getZindexPartial(_this.toastContainer) + '';
_this.displayToast(_this.toastEle);
}
});
};
Toast.prototype.clickHandler = function (e) {
var _this = this;
e.stopPropagation();

@@ -577,6 +579,7 @@ var target = e.target;

var isCloseIcon = target.classList.contains(CLOSEBTN);
this.trigger('click', clickArgs);
if ((isCloseIcon && !clickArgs.cancel) || clickArgs.clickToClose) {
this.destroyToast(toastEle);
}
this.trigger('click', clickArgs, function (toastClickArgs) {
if ((isCloseIcon && !toastClickArgs.cancel) || toastClickArgs.clickToClose) {
_this.destroyToast(toastEle);
}
});
};

@@ -583,0 +586,0 @@ Toast.prototype.displayToast = function (toastEle) {

/*!
* filename: ej2-notifications.min.js
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.notifications=function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",l="e-toast-message",a="e-toast-progress",h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("Left")],i.prototype,"X",void 0),n([e.Property("Top")],i.prototype,"Y",void 0),i}(e.ChildProperty),p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property(null)],i.prototype,"model",void 0),n([e.Property(null)],i.prototype,"click",void 0),i}(e.ChildProperty),d=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("FadeIn")],i.prototype,"effect",void 0),n([e.Property(600)],i.prototype,"duration",void 0),n([e.Property("ease")],i.prototype,"easing",void 0),i}(e.ChildProperty),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Complex({effect:"FadeIn",duration:600,easing:"ease"},d)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},d)],i.prototype,"hide",void 0),i}(e.ChildProperty),u=function(t){function d(e,i){return t.call(this,e,i)||this}return o(d,t),d.prototype.getModuleName=function(){return"toast"},d.prototype.getPersistData=function(){return this.addOnPersist([])},d.prototype.destroy=function(){this.hide("All"),this.element.classList.remove("e-toast-container"),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},d.prototype.preRender=function(){this.isDevice=e.Browser.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),e.isNullOrUndefined(this.target)&&(this.target=document.body),this.enableRtl&&this.element.classList.add("e-rtl")},d.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.titleTemplate=null,this.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)})},d.prototype.show=function(t){if(e.isNullOrUndefined(t)||(this.templateChanges(t),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var i="string"==typeof this.target?document.querySelector(this.target):this.target;if(e.isNullOrUndefined(i))return;"BODY"===i.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",i.style.position="relative"),this.setPositioning(this.position),i.appendChild(this.toastContainer)}this.toastEle=this.createElement("div",{className:r,id:e.getUniqueID("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),e.isNullOrUndefined(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget()},d.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(.e-toast-container)"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hide(i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hide(i)),this.animation.hide.effect=s)},d.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),e.isUndefined(t.title)||e.isNullOrUndefined(this.titleTemplate)||this.title===t.title||this.clearTitleTemplate(),e.isUndefined(t.template)||e.isNullOrUndefined(this.toastTemplate)||this.template===t.template||this.clearToastTemplate()},d.prototype.setCSSClass=function(t){if(!e.isNullOrUndefined(t)){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},d.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add("e-toast-full-width"):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove("e-toast-full-width")),this.toastEle.style.height=e.formatUnit(this.height)},d.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},d.prototype.hide=function(t){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof t||"All"!==t)e.isNullOrUndefined(t)&&(t=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(t);else for(var i=0;i<this.toastContainer.childElementCount;i++)this.destroyToast(this.toastContainer.children[i])},d.prototype.fetchEle=function(t,i,s){var o,n,r;if(n="title"===s?this.titleTemplate:"content"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=document.querySelector(i);t.appendChild(l),l.style.display="";var a=l.cloneNode(!0);"title"===s?this.titleTemplate=a:"content"===s?this.contentTemplate=a:this.toastTemplate=a}}catch(t){o=e.compile(i)}return e.isNullOrUndefined(o)||(r=o({},this,s)),e.isNullOrUndefined(r)||!(r.length>0)||e.isNullOrUndefined(r[0].tagName)&&1===r.length?0===t.childElementCount&&(t.innerHTML=i):[].slice.call(r).forEach(function(i){e.isNullOrUndefined(i.tagName)||(i.style.display=""),t.appendChild(i)}),t},d.prototype.clearProgress=function(t){e.isNullOrUndefined(this.intervalId[t])||(clearInterval(this.intervalId[t]),delete this.intervalId[t]),e.isNullOrUndefined(this.progressObj[t])||(clearInterval(this.progressObj[t].intervalId),delete this.progressObj[t])},d.prototype.clearContainerPos=function(){var t=this;this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.toastContainer=null,this.customPosition=!1):([r+"-top-left",r+"-top-right",r+"-bottom-left",r+"-bottom-right",r+"-bottom-center",r+"-top-center",r+"-full-width"].forEach(function(i){!e.isNullOrUndefined(t.toastContainer)&&t.toastContainer.classList.contains(i)&&t.toastContainer.classList.remove(i)}),this.toastContainer=null),e.isNullOrUndefined(this.titleTemplate)||this.clearTitleTemplate(),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},d.prototype.clearTitleTemplate=function(){this.titleTemplate.style.display="none",document.body.appendChild(this.titleTemplate),this.titleTemplate=null},d.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},d.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},d.prototype.destroyToast=function(t){var i=this,s=this.animation.hide,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n=parseInt(t.id.split("toast_")[1],10),r={toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+a))||(this.progressObj[n].progressEle.style.width="0%"),o.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,o)},d.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},d.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},d.prototype.setPositioning=function(t){"number"==typeof t.X||"number"==typeof t.Y||-1!==t.X.indexOf("%")||-1!==t.Y.indexOf("%")?(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0):this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase())},d.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:"e-toast-close-icon e-icons "});this.toastEle.appendChild(t)}},d.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:a}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},d.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+a))||(this.progressObj[t].progressEle.style.width="0%")},d.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+a))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},d.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},d.prototype.setIcon=function(){if(!e.isNullOrUndefined(this.icon)&&0!==this.icon.length){var t=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.appendChild(t)}},d.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:"e-toast-title"});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:l});i.appendChild(t),this.toastEle.appendChild(i)}},d.prototype.setContent=function(){var t=this.createElement("div",{className:"e-toast-content"}),i=this.element;if(e.isNullOrUndefined(this.content)||""===this.content){var s=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||s)&&!i.firstElementChild.classList.contains(r)){this.innerEle=document.createDocumentFragment();for(var o=this.createElement("div");0!==i.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);t.appendChild(this.innerEle),[].slice.call(t.children).forEach(function(t){o.appendChild(t.cloneNode(!0))}),this.content=o,this.appendMessageContainer(t)}}else"object"!=typeof this.content||e.isNullOrUndefined(this.content.tagName)?(t=this.fetchEle(t,this.content,"content"),this.appendMessageContainer(t)):(t.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(t))},d.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+l).length>0)this.toastEle.querySelector("."+l).appendChild(t);else{var e=this.createElement("div",{className:l});e.appendChild(t),this.toastEle.appendChild(e)}},d.prototype.actionButtons=function(){var t=this,s=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(o){if(!e.isNullOrUndefined(o.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(o.model.cssClass)||0===o.model.cssClass.length)&&(o.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(o.model,n),e.isNullOrUndefined(o.click)||"function"!=typeof o.click||e.EventHandler.add(n,"click",o.click),s.appendChild(n)}}),s.childElementCount>0&&this.appendMessageContainer(s)},d.prototype.appendToTarget=function(){var t={toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",t),t.cancel||(this.toastEle.style.display="none",this.newestOnTop&&0!==this.toastContainer.childElementCount?this.toastContainer.insertBefore(this.toastEle,this.toastContainer.children[0]):this.toastContainer.appendChild(this.toastEle),e.EventHandler.add(this.toastEle,"click",this.clickHandler,this),this.toastContainer.style.zIndex=s.getZindexPartial(this.toastContainer)+"",this.displayToast(this.toastEle))},d.prototype.clickHandler=function(t){t.stopPropagation();var i=t.target,s=e.closest(i,"."+r),o={element:s,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},n=i.classList.contains("e-toast-close-icon");this.trigger("click",o),(n&&!o.cancel||o.clickToClose)&&this.destroyToast(s)},d.prototype.displayToast=function(t){var i=this,s=this.animation.show,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n={toastObj:this,element:this.toastEle};o.begin=function(){t.style.display=""},o.end=function(){i.trigger("open",n)},new e.Animation(o).animate(t)},d.prototype.getContainer=function(){return this.element.classList.add("e-toast-container"),this.element},d.prototype.onPropertyChanged=function(t,e){for(var i=this.element,s=0,o=Object.keys(t);s<o.length;s++)switch(o[s]){case"enableRtl":t.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl")}},n([e.Property("300px")],d.prototype,"width",void 0),n([e.Property("auto")],d.prototype,"height",void 0),n([e.Property(null)],d.prototype,"title",void 0),n([e.Property(null)],d.prototype,"content",void 0),n([e.Property(null)],d.prototype,"icon",void 0),n([e.Property(null)],d.prototype,"cssClass",void 0),n([e.Property(null)],d.prototype,"template",void 0),n([e.Property(!0)],d.prototype,"newestOnTop",void 0),n([e.Property(!1)],d.prototype,"showCloseButton",void 0),n([e.Property(!1)],d.prototype,"showProgressBar",void 0),n([e.Property(5e3)],d.prototype,"timeOut",void 0),n([e.Property(1e3)],d.prototype,"extendedTimeout",void 0),n([e.Complex({},c)],d.prototype,"animation",void 0),n([e.Complex({},h)],d.prototype,"position",void 0),n([e.Collection([{}],p)],d.prototype,"buttons",void 0),n([e.Property(null)],d.prototype,"target",void 0),n([e.Event()],d.prototype,"created",void 0),n([e.Event()],d.prototype,"destroyed",void 0),n([e.Event()],d.prototype,"open",void 0),n([e.Event()],d.prototype,"beforeOpen",void 0),n([e.Event()],d.prototype,"close",void 0),n([e.Event()],d.prototype,"click",void 0),d=n([e.NotifyPropertyChanges],d)}(e.Component);return t.ToastPosition=h,t.ButtonModelProps=p,t.ToastAnimations=d,t.ToastAnimationSettings=c,t.Toast=u,t}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
this.ej=this.ej||{},this.ej.notifications=function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var l=t.length-1;l>=0;l--)(o=t[l])&&(r=(n<3?o(r):n>3?o(e,i,r):o(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",l="e-toast-message",a="e-toast-progress",p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("Left")],i.prototype,"X",void 0),n([e.Property("Top")],i.prototype,"Y",void 0),i}(e.ChildProperty),h=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property(null)],i.prototype,"model",void 0),n([e.Property(null)],i.prototype,"click",void 0),i}(e.ChildProperty),d=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Property("FadeIn")],i.prototype,"effect",void 0),n([e.Property(600)],i.prototype,"duration",void 0),n([e.Property("ease")],i.prototype,"easing",void 0),i}(e.ChildProperty),c=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return o(i,t),n([e.Complex({effect:"FadeIn",duration:600,easing:"ease"},d)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},d)],i.prototype,"hide",void 0),i}(e.ChildProperty),u=function(t){function d(e,i){return t.call(this,e,i)||this}return o(d,t),d.prototype.getModuleName=function(){return"toast"},d.prototype.getPersistData=function(){return this.addOnPersist([])},d.prototype.destroy=function(){this.hide("All"),this.element.classList.remove("e-toast-container"),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},d.prototype.preRender=function(){this.isDevice=e.Browser.isDevice,"300px"===this.width&&(this.width=this.isDevice&&screen.width<768?"100%":"300px"),e.isNullOrUndefined(this.target)&&(this.target=document.body),this.enableRtl&&this.element.classList.add("e-rtl")},d.prototype.render=function(){this.progressObj=[],this.intervalId=[],this.titleTemplate=null,this.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)})},d.prototype.show=function(t){if(e.isNullOrUndefined(t)||(this.templateChanges(t),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var i="string"==typeof this.target?document.querySelector(this.target):this.target;if(e.isNullOrUndefined(i))return;"BODY"===i.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",i.style.position="relative"),this.setPositioning(this.position),i.appendChild(this.toastContainer)}this.toastEle=this.createElement("div",{className:r,id:e.getUniqueID("toast")}),this.setWidthHeight(),this.setCSSClass(this.cssClass),e.isNullOrUndefined(this.template)||""===this.template?this.personalizeToast():this.templateRendering(),this.setProgress(),this.setCloseButton(),this.setAria(),this.appendToTarget()},d.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(.e-toast-container)"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hide(i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hide(i)),this.animation.hide.effect=s)},d.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),e.isUndefined(t.title)||e.isNullOrUndefined(this.titleTemplate)||this.title===t.title||this.clearTitleTemplate(),e.isUndefined(t.template)||e.isNullOrUndefined(this.toastTemplate)||this.template===t.template||this.clearToastTemplate()},d.prototype.setCSSClass=function(t){if(!e.isNullOrUndefined(t)){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},d.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add("e-toast-full-width"):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove("e-toast-full-width")),this.toastEle.style.height=e.formatUnit(this.height)},d.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},d.prototype.hide=function(t){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof t||"All"!==t)e.isNullOrUndefined(t)&&(t=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(t);else for(var i=0;i<this.toastContainer.childElementCount;i++)this.destroyToast(this.toastContainer.children[i])},d.prototype.fetchEle=function(t,i,s){var o,n,r;if(n="title"===s?this.titleTemplate:"content"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=document.querySelector(i);t.appendChild(l),l.style.display="";var a=l.cloneNode(!0);"title"===s?this.titleTemplate=a:"content"===s?this.contentTemplate=a:this.toastTemplate=a}}catch(t){o=e.compile(i)}return e.isNullOrUndefined(o)||(r=o({},this,s)),e.isNullOrUndefined(r)||!(r.length>0)||e.isNullOrUndefined(r[0].tagName)&&1===r.length?0===t.childElementCount&&(t.innerHTML=i):[].slice.call(r).forEach(function(i){e.isNullOrUndefined(i.tagName)||(i.style.display=""),t.appendChild(i)}),t},d.prototype.clearProgress=function(t){e.isNullOrUndefined(this.intervalId[t])||(clearInterval(this.intervalId[t]),delete this.intervalId[t]),e.isNullOrUndefined(this.progressObj[t])||(clearInterval(this.progressObj[t].intervalId),delete this.progressObj[t])},d.prototype.clearContainerPos=function(){var t=this;this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.toastContainer=null,this.customPosition=!1):([r+"-top-left",r+"-top-right",r+"-bottom-left",r+"-bottom-right",r+"-bottom-center",r+"-top-center",r+"-full-width"].forEach(function(i){!e.isNullOrUndefined(t.toastContainer)&&t.toastContainer.classList.contains(i)&&t.toastContainer.classList.remove(i)}),this.toastContainer=null),e.isNullOrUndefined(this.titleTemplate)||this.clearTitleTemplate(),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},d.prototype.clearTitleTemplate=function(){this.titleTemplate.style.display="none",document.body.appendChild(this.titleTemplate),this.titleTemplate=null},d.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},d.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},d.prototype.destroyToast=function(t){var i=this,s=this.animation.hide,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n=parseInt(t.id.split("toast_")[1],10),r={toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+a))||(this.progressObj[n].progressEle.style.width="0%"),o.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,o)},d.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},d.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},d.prototype.setPositioning=function(t){"number"==typeof t.X||"number"==typeof t.Y||-1!==t.X.indexOf("%")||-1!==t.Y.indexOf("%")?(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0):this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase())},d.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:"e-toast-close-icon e-icons "});this.toastEle.appendChild(t)}},d.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:a}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},d.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+a))||(this.progressObj[t].progressEle.style.width="0%")},d.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+a))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},d.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},d.prototype.setIcon=function(){if(!e.isNullOrUndefined(this.icon)&&0!==this.icon.length){var t=this.createElement("div",{className:"e-toast-icon e-icons "+this.icon});this.toastEle.appendChild(t)}},d.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:"e-toast-title"});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:l});i.appendChild(t),this.toastEle.appendChild(i)}},d.prototype.setContent=function(){var t=this.createElement("div",{className:"e-toast-content"}),i=this.element;if(e.isNullOrUndefined(this.content)||""===this.content){var s=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||s)&&!i.firstElementChild.classList.contains(r)){this.innerEle=document.createDocumentFragment();for(var o=this.createElement("div");0!==i.childNodes.length;)this.innerEle.appendChild(this.element.childNodes[0]);t.appendChild(this.innerEle),[].slice.call(t.children).forEach(function(t){o.appendChild(t.cloneNode(!0))}),this.content=o,this.appendMessageContainer(t)}}else"object"!=typeof this.content||e.isNullOrUndefined(this.content.tagName)?(t=this.fetchEle(t,this.content,"content"),this.appendMessageContainer(t)):(t.appendChild(this.content),this.content=this.content.cloneNode(!0),this.appendMessageContainer(t))},d.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+l).length>0)this.toastEle.querySelector("."+l).appendChild(t);else{var e=this.createElement("div",{className:l});e.appendChild(t),this.toastEle.appendChild(e)}},d.prototype.actionButtons=function(){var t=this,s=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(o){if(!e.isNullOrUndefined(o.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(o.model.cssClass)||0===o.model.cssClass.length)&&(o.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(o.model,n),e.isNullOrUndefined(o.click)||"function"!=typeof o.click||e.EventHandler.add(n,"click",o.click),s.appendChild(n)}}),s.childElementCount>0&&this.appendMessageContainer(s)},d.prototype.appendToTarget=function(){var t=this,i={toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",i,function(i){i.cancel||(t.toastEle.style.display="none",t.newestOnTop&&0!==t.toastContainer.childElementCount?t.toastContainer.insertBefore(t.toastEle,t.toastContainer.children[0]):t.toastContainer.appendChild(t.toastEle),e.EventHandler.add(t.toastEle,"click",t.clickHandler,t),t.toastContainer.style.zIndex=s.getZindexPartial(t.toastContainer)+"",t.displayToast(t.toastEle))})},d.prototype.clickHandler=function(t){var i=this;t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n={element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},l=s.classList.contains("e-toast-close-icon");this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(o)})},d.prototype.displayToast=function(t){var i=this,s=this.animation.show,o={duration:s.duration,name:s.effect,timingFunction:s.easing},n={toastObj:this,element:this.toastEle};o.begin=function(){t.style.display=""},o.end=function(){i.trigger("open",n)},new e.Animation(o).animate(t)},d.prototype.getContainer=function(){return this.element.classList.add("e-toast-container"),this.element},d.prototype.onPropertyChanged=function(t,e){for(var i=this.element,s=0,o=Object.keys(t);s<o.length;s++)switch(o[s]){case"enableRtl":t.enableRtl?i.classList.add("e-rtl"):i.classList.remove("e-rtl")}},n([e.Property("300px")],d.prototype,"width",void 0),n([e.Property("auto")],d.prototype,"height",void 0),n([e.Property(null)],d.prototype,"title",void 0),n([e.Property(null)],d.prototype,"content",void 0),n([e.Property(null)],d.prototype,"icon",void 0),n([e.Property(null)],d.prototype,"cssClass",void 0),n([e.Property(null)],d.prototype,"template",void 0),n([e.Property(!0)],d.prototype,"newestOnTop",void 0),n([e.Property(!1)],d.prototype,"showCloseButton",void 0),n([e.Property(!1)],d.prototype,"showProgressBar",void 0),n([e.Property(5e3)],d.prototype,"timeOut",void 0),n([e.Property(1e3)],d.prototype,"extendedTimeout",void 0),n([e.Complex({},c)],d.prototype,"animation",void 0),n([e.Complex({},p)],d.prototype,"position",void 0),n([e.Collection([{}],h)],d.prototype,"buttons",void 0),n([e.Property(null)],d.prototype,"target",void 0),n([e.Event()],d.prototype,"created",void 0),n([e.Event()],d.prototype,"destroyed",void 0),n([e.Event()],d.prototype,"open",void 0),n([e.Event()],d.prototype,"beforeOpen",void 0),n([e.Event()],d.prototype,"close",void 0),n([e.Event()],d.prototype,"click",void 0),d=n([e.NotifyPropertyChanges],d)}(e.Component);return t.ToastPosition=p,t.ButtonModelProps=h,t.ToastAnimations=d,t.ToastAnimationSettings=c,t.Toast=u,t}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
//# sourceMappingURL=ej2-notifications.min.js.map
/*!
* filename: index.d.ts
* version : 17.1.48
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"name": "@syncfusion/ej2-notifications",
"version": "17.1.48",
"description": "A package of Essential JS 2 notification components such as Toast and Badge which used to notify important information to end-users.",
"author": "Syncfusion Inc.",
"license": "SEE LICENSE IN license",
"main": "./dist/ej2-notifications.umd.min.js",
"module": "./index.js",
"es2015": "./dist/es6/ej2-notifications.es2015.js",
"_from": "@syncfusion/ej2-notifications@*",
"_id": "@syncfusion/ej2-notifications@17.1.38",
"_inBundle": false,
"_integrity": "sha512-4vkTtpzH+VjRUZKC6Oe8dSCnyvVppxk1vxgqDlu16AhM4FTFbi9pJh+k+NumXGez7DCvXWHc+FnsRvqRmwYK+g==",
"_location": "/@syncfusion/ej2-notifications",
"_phantomChildren": {},
"_requested": {
"type": "range",
"registry": true,
"raw": "@syncfusion/ej2-notifications@*",
"name": "@syncfusion/ej2-notifications",
"escapedName": "@syncfusion%2fej2-notifications",
"scope": "@syncfusion",
"rawSpec": "*",
"saveSpec": null,
"fetchSpec": "*"
},
"_requiredBy": [
"/",
"/@syncfusion/ej2",
"/@syncfusion/ej2-angular-notifications",
"/@syncfusion/ej2-pdfviewer",
"/@syncfusion/ej2-react-notifications",
"/@syncfusion/ej2-vue-notifications"
],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-notifications/-/ej2-notifications-17.1.38.tgz",
"_shasum": "a57d268bcaf0fb814d6c0daca4a2531cf76e8600",
"_spec": "@syncfusion/ej2-notifications@*",
"_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",
"author": {
"name": "Syncfusion Inc."
},
"bundleDependencies": false,
"dependencies": {
"@syncfusion/ej2-base": "~17.1.48",
"@syncfusion/ej2-buttons": "~17.1.47",
"@syncfusion/ej2-popups": "~17.1.47"
"@syncfusion/ej2-base": "~17.2.28-beta",
"@syncfusion/ej2-buttons": "~17.2.28-beta",
"@syncfusion/ej2-popups": "~17.2.28-beta"
},
"deprecated": false,
"description": "A package of Essential JS 2 notification components such as Toast and Badge which used to notify important information to end-users.",
"devDependencies": {},
"es2015": "./dist/es6/ej2-notifications.es2015.js",
"keywords": [

@@ -35,2 +63,6 @@ "ej2",

],
"license": "SEE LICENSE IN license",
"main": "./dist/ej2-notifications.umd.min.js",
"module": "./index.js",
"name": "@syncfusion/ej2-notifications",
"repository": {

@@ -40,3 +72,4 @@ "type": "git",

},
"version": "17.2.28-beta",
"sideEffects": false
}

@@ -53,2 +53,3 @@ import { Component, Property, ChildProperty, INotifyPropertyChanged, NotifyPropertyChanges, Animation } from '@syncfusion/ej2-base';import { Browser, isNullOrUndefined as isNOU, getUniqueID, formatUnit, EventHandler } from '@syncfusion/ej2-base';import { EmitType, Collection, Complex, setStyleAttribute, Event, Effect, detach, AnimationModel } from '@syncfusion/ej2-base';import { attributes, extend, closest, compile as templateCompiler, classList, BaseEventArgs, isUndefined} from '@syncfusion/ej2-base';import { SwipeEventArgs, Touch } from '@syncfusion/ej2-base';import { ButtonModel, Button } from '@syncfusion/ej2-buttons';import { getZindexPartial } from '@syncfusion/ej2-popups';

* @event
* @blazorProperty 'OnClick'
*/

@@ -222,2 +223,3 @@ click?: EmitType<Event>;

* @event
* @blazorProperty 'Created'
*/

@@ -229,2 +231,3 @@ created?: EmitType<Event>;

* @event
* @blazorProperty 'Destroyed'
*/

@@ -236,2 +239,3 @@ destroyed?: EmitType<Event>;

* @event
* @blazorProperty 'Opened'
*/

@@ -243,2 +247,3 @@ open?: EmitType<ToastOpenArgs>;

* @event
* @blazorProperty 'OnOpen'
*/

@@ -250,2 +255,3 @@ beforeOpen?: EmitType<ToastBeforeOpenArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -257,2 +263,3 @@ close?: EmitType<ToastCloseArgs>;

* @event
* @blazorProperty 'OnClick'
*/

@@ -259,0 +266,0 @@ click?: EmitType<ToastClickEventArgs>;

@@ -101,2 +101,3 @@ import { Component, ChildProperty, INotifyPropertyChanged } from '@syncfusion/ej2-base';

* @event
* @blazorProperty 'OnClick'
*/

@@ -266,2 +267,3 @@ click: EmitType<Event>;

* @event
* @blazorProperty 'Created'
*/

@@ -272,2 +274,3 @@ created: EmitType<Event>;

* @event
* @blazorProperty 'Destroyed'
*/

@@ -278,2 +281,3 @@ destroyed: EmitType<Event>;

* @event
* @blazorProperty 'Opened'
*/

@@ -284,2 +288,3 @@ open: EmitType<ToastOpenArgs>;

* @event
* @blazorProperty 'OnOpen'
*/

@@ -290,2 +295,3 @@ beforeOpen: EmitType<ToastBeforeOpenArgs>;

* @event
* @blazorProperty 'Closed'
*/

@@ -296,2 +302,3 @@ close: EmitType<ToastCloseArgs>;

* @event
* @blazorProperty 'OnClick'
*/

@@ -298,0 +305,0 @@ click: EmitType<ToastClickEventArgs>;

@@ -554,2 +554,3 @@ var __extends = (this && this.__extends) || (function () {

Toast.prototype.appendToTarget = function () {
var _this = this;
var toastBeforeOpen = {

@@ -560,18 +561,19 @@ toastObj: this,

};
this.trigger('beforeOpen', toastBeforeOpen);
if (toastBeforeOpen.cancel) {
return;
}
this.toastEle.style.display = 'none';
if (this.newestOnTop && this.toastContainer.childElementCount !== 0) {
this.toastContainer.insertBefore(this.toastEle, this.toastContainer.children[0]);
}
else {
this.toastContainer.appendChild(this.toastEle);
}
EventHandler.add(this.toastEle, 'click', this.clickHandler, this);
this.toastContainer.style.zIndex = getZindexPartial(this.toastContainer) + '';
this.displayToast(this.toastEle);
this.trigger('beforeOpen', toastBeforeOpen, function (toastBeforeOpenArgs) {
if (!toastBeforeOpenArgs.cancel) {
_this.toastEle.style.display = 'none';
if (_this.newestOnTop && _this.toastContainer.childElementCount !== 0) {
_this.toastContainer.insertBefore(_this.toastEle, _this.toastContainer.children[0]);
}
else {
_this.toastContainer.appendChild(_this.toastEle);
}
EventHandler.add(_this.toastEle, 'click', _this.clickHandler, _this);
_this.toastContainer.style.zIndex = getZindexPartial(_this.toastContainer) + '';
_this.displayToast(_this.toastEle);
}
});
};
Toast.prototype.clickHandler = function (e) {
var _this = this;
e.stopPropagation();

@@ -584,6 +586,7 @@ var target = e.target;

var isCloseIcon = target.classList.contains(CLOSEBTN);
this.trigger('click', clickArgs);
if ((isCloseIcon && !clickArgs.cancel) || clickArgs.clickToClose) {
this.destroyToast(toastEle);
}
this.trigger('click', clickArgs, function (toastClickArgs) {
if ((isCloseIcon && !toastClickArgs.cancel) || toastClickArgs.clickToClose) {
_this.destroyToast(toastEle);
}
});
};

@@ -590,0 +593,0 @@ Toast.prototype.displayToast = function (toastEle) {

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

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

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

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

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

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc