Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-notifications

Package Overview
Dependencies
Maintainers
4
Versions
100
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.2.28-beta to 17.2.29-beta

6

CHANGELOG.md

@@ -5,2 +5,8 @@ # Changelog

### Toast
#### Bug Fixes
- `#242279` - The DOM selector processing has been prevented in the `title` property. The Toast component now accepts only string and HTML string in the `title` property.
## 16.3.31 (2018-11-07)

@@ -7,0 +13,0 @@

11

dist/ej2-notifications.umd.min.js

@@ -1,11 +0,2 @@

/*!
* filename: ej2-notifications.umd.min.js
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!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})});
!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,o){"use strict";var s=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 o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),n=function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",a="e-toast-container",l="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 s(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 s(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 s(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 s(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 s(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(a),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.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)}),this.renderComplete()},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(."+a+")"),o=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=o)},f.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),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(l):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(l)),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,o){var s,n,r;if(n="content"===o?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var a=null;"title"!==o&&(a=document.querySelector(i),t.appendChild(a),a.style.display="");var l=e.isNullOrUndefined(a)?n:a.cloneNode(!0);"content"===o?this.contentTemplate=l:this.toastTemplate=l}}catch(t){s=e.compile(i)}return e.isNullOrUndefined(s)||(r=s({},this,o,null,!0)),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.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},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,o=this.animation.hide,s={duration:o.duration,name:o.effect,timingFunction:o.easing},n=parseInt(t.id.split("toast_")[1],10),r=e.isBlazor()?{toastContainer:this.toastContainer}:{toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+d))||(this.progressObj[n].progressEle.style.width="0%"),s.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,s)},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){isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0)},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],o=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,o),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(o.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 o=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||o)&&(!i.firstElementChild||!i.firstElementChild.classList.contains(r))){this.innerEle=document.createDocumentFragment();for(var s=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){s.appendChild(t.cloneNode(!0))}),this.content=s,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,o=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(s){if(!e.isNullOrUndefined(s.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(s.model.cssClass)||0===s.model.cssClass.length)&&(s.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(s.model,n),e.isNullOrUndefined(s.click)||"function"!=typeof s.click||e.EventHandler.add(n,"click",s.click),o.appendChild(n)}}),o.childElementCount>0&&this.appendMessageContainer(o)},f.prototype.appendToTarget=function(){var t=this,i=e.isBlazor()?{element:this.toastEle,cancel:!1}:{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=o.getZindexPartial(t.toastContainer)+"",t.displayToast(t.toastEle))})},f.prototype.clickHandler=function(t){var i=this;t.stopPropagation();var o=t.target,s=e.closest(o,"."+r),n=e.isBlazor()?{element:s,cancel:!1,clickToClose:!1,originalEvent:t}:{element:s,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=o.classList.contains(h);this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},f.prototype.displayToast=function(t){var i=this,o=this.animation.show,s={duration:o.duration,name:o.effect,timingFunction:o.easing},n=e.isBlazor()?{element:this.toastEle}:{toastObj:this,element:this.toastEle};s.begin=function(){t.style.display=""},s.end=function(){i.trigger("open",n)},new e.Animation(s).animate(t)},f.prototype.getContainer=function(){return this.element.classList.add(a),this.element},f.prototype.onPropertyChanged=function(t,e){for(var i=this.element,o=0,s=Object.keys(t);o<s.length;o++){switch(s[o]){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

@@ -1,2 +0,2 @@

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';
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, NotifyPropertyChanges, Property, Touch, attributes, classList, closest, compile, detach, extend, formatUnit, getUniqueID, isBlazor, isNullOrUndefined, isUndefined, setStyleAttribute } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';

@@ -134,3 +134,2 @@ import { getZindexPartial } from '@syncfusion/ej2-popups';

this.intervalId = [];
this.titleTemplate = null;
this.contentTemplate = null;

@@ -141,2 +140,3 @@ this.toastTemplate = null;

}
this.renderComplete();
}

@@ -197,5 +197,2 @@ /**

}
if (!isUndefined(toastObj.title) && !isNullOrUndefined(this.titleTemplate) && this.title !== toastObj.title) {
this.clearTitleTemplate();
}
if (!isUndefined(toastObj.template) && !isNullOrUndefined(this.toastTemplate) && this.template !== toastObj.template) {

@@ -252,3 +249,3 @@ this.clearToastTemplate();

let tmpArray;
prob === 'title' ? tempVar = this.titleTemplate : prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
if (!isNullOrUndefined(tempVar)) {

@@ -260,7 +257,10 @@ ele.appendChild(tempVar.cloneNode(true));

if (document.querySelectorAll(value).length > 0) {
let elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
let clo = elem.cloneNode(true);
prob === 'title' ? this.titleTemplate = clo : prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
let elem = null;
if (prob !== 'title') {
elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
}
let clo = isNullOrUndefined(elem) ? tempVar : elem.cloneNode(true);
prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
}

@@ -272,3 +272,3 @@ }

if (!isNullOrUndefined(templateFn)) {
tmpArray = templateFn({}, this, prob);
tmpArray = templateFn({}, this, prob, null, true);
}

@@ -318,5 +318,2 @@ if (!isNullOrUndefined(tmpArray) && tmpArray.length > 0 && !(isNullOrUndefined(tmpArray[0].tagName) && tmpArray.length === 1)) {

}
if (!isNullOrUndefined(this.titleTemplate)) {
this.clearTitleTemplate();
}
if (!isNullOrUndefined(this.contentTemplate)) {

@@ -329,7 +326,2 @@ this.clearContentTemplate();

}
clearTitleTemplate() {
this.titleTemplate.style.display = 'none';
document.body.appendChild(this.titleTemplate);
this.titleTemplate = null;
}
clearContentTemplate() {

@@ -351,3 +343,5 @@ this.contentTemplate.style.display = 'none';

let intervalId = parseInt(toastEle.id.split('toast_')[1], 10);
let toastClose = {
let toastClose = isBlazor() ? {
toastContainer: this.toastContainer
} : {
toastContainer: this.toastContainer,

@@ -379,3 +373,3 @@ toastObj: this,

setPositioning(pos) {
if (typeof (pos.X) === 'number' || typeof (pos.Y) === 'number' || pos.X.indexOf('%') !== -1 || pos.Y.indexOf('%') !== -1) {
if (!isNaN(parseFloat(pos.X)) || !isNaN(parseFloat(pos.Y))) {
setStyleAttribute(this.toastContainer, { 'left': formatUnit(pos.X), 'top': formatUnit(pos.Y) });

@@ -461,3 +455,3 @@ this.customPosition = true;

let isContent = this.element.innerHTML.replace(/\s/g, '') !== '';
if ((ele.children.length > 0 || isContent) && !ele.firstElementChild.classList.contains(ROOT)) {
if ((ele.children.length > 0 || isContent) && !(ele.firstElementChild && ele.firstElementChild.classList.contains(ROOT))) {
this.innerEle = document.createDocumentFragment();

@@ -521,3 +515,6 @@ let tempEle = this.createElement('div');

appendToTarget() {
let toastBeforeOpen = {
let toastBeforeOpen = isBlazor() ? {
element: this.toastEle,
cancel: false
} : {
toastObj: this,

@@ -546,3 +543,5 @@ element: this.toastEle,

let toastEle = closest(target, '.' + ROOT);
let clickArgs = {
let clickArgs = isBlazor() ? {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e
} : {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e, toastObj: this

@@ -562,3 +561,5 @@ };

};
let toastOpen = {
let toastOpen = isBlazor() ? {
element: this.toastEle
} : {
toastObj: this,

@@ -565,0 +566,0 @@ element: this.toastEle,

@@ -1,2 +0,2 @@

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';
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, NotifyPropertyChanges, Property, Touch, attributes, classList, closest, compile, detach, extend, formatUnit, getUniqueID, isBlazor, isNullOrUndefined, isUndefined, setStyleAttribute } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';

@@ -168,3 +168,2 @@ import { getZindexPartial } from '@syncfusion/ej2-popups';

this.intervalId = [];
this.titleTemplate = null;
this.contentTemplate = null;

@@ -175,2 +174,3 @@ this.toastTemplate = null;

}
this.renderComplete();
};

@@ -231,5 +231,2 @@ /**

}
if (!isUndefined(toastObj.title) && !isNullOrUndefined(this.titleTemplate) && this.title !== toastObj.title) {
this.clearTitleTemplate();
}
if (!isUndefined(toastObj.template) && !isNullOrUndefined(this.toastTemplate) && this.template !== toastObj.template) {

@@ -286,3 +283,3 @@ this.clearToastTemplate();

var tmpArray;
prob === 'title' ? tempVar = this.titleTemplate : prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
if (!isNullOrUndefined(tempVar)) {

@@ -294,7 +291,10 @@ ele.appendChild(tempVar.cloneNode(true));

if (document.querySelectorAll(value).length > 0) {
var elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
var clo = elem.cloneNode(true);
prob === 'title' ? this.titleTemplate = clo : prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
var elem = null;
if (prob !== 'title') {
elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
}
var clo = isNullOrUndefined(elem) ? tempVar : elem.cloneNode(true);
prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
}

@@ -306,3 +306,3 @@ }

if (!isNullOrUndefined(templateFn)) {
tmpArray = templateFn({}, this, prob);
tmpArray = templateFn({}, this, prob, null, true);
}

@@ -353,5 +353,2 @@ if (!isNullOrUndefined(tmpArray) && tmpArray.length > 0 && !(isNullOrUndefined(tmpArray[0].tagName) && tmpArray.length === 1)) {

}
if (!isNullOrUndefined(this.titleTemplate)) {
this.clearTitleTemplate();
}
if (!isNullOrUndefined(this.contentTemplate)) {

@@ -364,7 +361,2 @@ this.clearContentTemplate();

};
Toast.prototype.clearTitleTemplate = function () {
this.titleTemplate.style.display = 'none';
document.body.appendChild(this.titleTemplate);
this.titleTemplate = null;
};
Toast.prototype.clearContentTemplate = function () {

@@ -387,3 +379,5 @@ this.contentTemplate.style.display = 'none';

var intervalId = parseInt(toastEle.id.split('toast_')[1], 10);
var toastClose = {
var toastClose = isBlazor() ? {
toastContainer: this.toastContainer
} : {
toastContainer: this.toastContainer,

@@ -415,3 +409,3 @@ toastObj: this,

Toast.prototype.setPositioning = function (pos) {
if (typeof (pos.X) === 'number' || typeof (pos.Y) === 'number' || pos.X.indexOf('%') !== -1 || pos.Y.indexOf('%') !== -1) {
if (!isNaN(parseFloat(pos.X)) || !isNaN(parseFloat(pos.Y))) {
setStyleAttribute(this.toastContainer, { 'left': formatUnit(pos.X), 'top': formatUnit(pos.Y) });

@@ -497,3 +491,3 @@ this.customPosition = true;

var isContent = this.element.innerHTML.replace(/\s/g, '') !== '';
if ((ele.children.length > 0 || isContent) && !ele.firstElementChild.classList.contains(ROOT)) {
if ((ele.children.length > 0 || isContent) && !(ele.firstElementChild && ele.firstElementChild.classList.contains(ROOT))) {
this.innerEle = document.createDocumentFragment();

@@ -559,3 +553,6 @@ var tempEle_1 = this.createElement('div');

var _this = this;
var toastBeforeOpen = {
var toastBeforeOpen = isBlazor() ? {
element: this.toastEle,
cancel: false
} : {
toastObj: this,

@@ -585,3 +582,5 @@ element: this.toastEle,

var toastEle = closest(target, '.' + ROOT);
var clickArgs = {
var clickArgs = isBlazor() ? {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e
} : {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e, toastObj: this

@@ -602,3 +601,5 @@ };

};
var toastOpen = {
var toastOpen = isBlazor() ? {
element: this.toastEle
} : {
toastObj: this,

@@ -605,0 +606,0 @@ element: this.toastEle,

@@ -1,11 +0,2 @@

/*!
* filename: ej2-notifications.min.js
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
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;
this.ej=this.ej||{},this.ej.notifications=function(t,e,i,o){"use strict";var s=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 o(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}}(),n=function(t,e,i,o){var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,o);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r},r="e-toast",a="e-toast-message",l="e-toast-progress",p=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return s(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 s(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 s(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 s(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 s(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.contentTemplate=null,this.toastTemplate=null,this.isDevice&&screen.width<768&&new e.Touch(this.element,{swipe:this.swipeHandler.bind(this)}),this.renderComplete()},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)"),o=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=o)},d.prototype.templateChanges=function(t){e.isUndefined(t.content)||e.isNullOrUndefined(this.contentTemplate)||this.content===t.content||this.clearContentTemplate(),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,o){var s,n,r;if(n="content"===o?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var a=null;"title"!==o&&(a=document.querySelector(i),t.appendChild(a),a.style.display="");var l=e.isNullOrUndefined(a)?n:a.cloneNode(!0);"content"===o?this.contentTemplate=l:this.toastTemplate=l}}catch(t){s=e.compile(i)}return e.isNullOrUndefined(s)||(r=s({},this,o,null,!0)),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.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},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,o=this.animation.hide,s={duration:o.duration,name:o.effect,timingFunction:o.easing},n=parseInt(t.id.split("toast_")[1],10),r=e.isBlazor()?{toastContainer:this.toastContainer}:{toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[n])||e.isNullOrUndefined(t.querySelector("."+l))||(this.progressObj[n].progressEle.style.width="0%"),s.end=function(){i.clearProgress(n),e.detach(t),i.trigger("close",r),0===i.toastContainer.childElementCount&&i.clearContainerPos()},new e.Animation({}).animate(t,s)},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){isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)}),this.customPosition=!0)},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:l}),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("."+l))||(this.progressObj[t].progressEle.style.width="0%")},d.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],o=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,o),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(o.querySelector("."+l))||(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:a});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 o=""!==this.element.innerHTML.replace(/\s/g,"");if((i.children.length>0||o)&&(!i.firstElementChild||!i.firstElementChild.classList.contains(r))){this.innerEle=document.createDocumentFragment();for(var s=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){s.appendChild(t.cloneNode(!0))}),this.content=s,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("."+a).length>0)this.toastEle.querySelector("."+a).appendChild(t);else{var e=this.createElement("div",{className:a});e.appendChild(t),this.toastEle.appendChild(e)}},d.prototype.actionButtons=function(){var t=this,o=this.createElement("div",{className:"e-toast-actions"});[].slice.call(this.buttons).forEach(function(s){if(!e.isNullOrUndefined(s.model)){var n=t.createElement("button");n.setAttribute("type","button"),(e.isNullOrUndefined(s.model.cssClass)||0===s.model.cssClass.length)&&(s.model.cssClass="e-primary"),n.classList.add("e-small"),new i.Button(s.model,n),e.isNullOrUndefined(s.click)||"function"!=typeof s.click||e.EventHandler.add(n,"click",s.click),o.appendChild(n)}}),o.childElementCount>0&&this.appendMessageContainer(o)},d.prototype.appendToTarget=function(){var t=this,i=e.isBlazor()?{element:this.toastEle,cancel:!1}:{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=o.getZindexPartial(t.toastContainer)+"",t.displayToast(t.toastEle))})},d.prototype.clickHandler=function(t){var i=this;t.stopPropagation();var o=t.target,s=e.closest(o,"."+r),n=e.isBlazor()?{element:s,cancel:!1,clickToClose:!1,originalEvent:t}:{element:s,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=o.classList.contains("e-toast-close-icon");this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},d.prototype.displayToast=function(t){var i=this,o=this.animation.show,s={duration:o.duration,name:o.effect,timingFunction:o.easing},n=e.isBlazor()?{element:this.toastEle}:{toastObj:this,element:this.toastEle};s.begin=function(){t.style.display=""},s.end=function(){i.trigger("open",n)},new e.Animation(s).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,o=0,s=Object.keys(t);o<s.length;o++)switch(s[o]){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

@@ -1,10 +0,1 @@

/*!
* filename: index.d.ts
* version : 17.2.28-beta
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
import * as _notifications from '@syncfusion/ej2-notifications';

@@ -11,0 +2,0 @@

@@ -5,3 +5,3 @@ {

"_inBundle": false,
"_integrity": "sha512-4vkTtpzH+VjRUZKC6Oe8dSCnyvVppxk1vxgqDlu16AhM4FTFbi9pJh+k+NumXGez7DCvXWHc+FnsRvqRmwYK+g==",
"_integrity": "sha512-rYq8PQAro7dbqEL8LmqdeFV0OvN28/wpZaJRQ7wXMHY3PETVCqoCjqdqM8rpDhfBRDRjo3F1QDUq/ncTDcFApw==",
"_location": "/@syncfusion/ej2-notifications",

@@ -28,4 +28,4 @@ "_phantomChildren": {},

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-notifications/-/ej2-notifications-17.1.38.tgz",
"_shasum": "a57d268bcaf0fb814d6c0daca4a2531cf76e8600",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-production/@syncfusion/ej2-notifications/-/ej2-notifications-17.1.38.tgz",
"_shasum": "86898fa568edc8a83c475287d89f035ebe546a94",
"_spec": "@syncfusion/ej2-notifications@*",

@@ -38,5 +38,5 @@ "_where": "/jenkins/workspace/ation_hotfix_16.4.0.42_Vol4-CJVRBFC7Z7RSISPRJNEMNQSRMCB6XTG67IJD6R2DVNXFIKQEITTQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.2.28-beta",
"@syncfusion/ej2-buttons": "~17.2.28-beta",
"@syncfusion/ej2-popups": "~17.2.28-beta"
"@syncfusion/ej2-base": "17.2.29-beta",
"@syncfusion/ej2-buttons": "17.2.29-beta",
"@syncfusion/ej2-popups": "17.2.29-beta"
},

@@ -74,4 +74,5 @@ "deprecated": false,

},
"version": "17.2.28-beta",
"typings": "index.d.ts",
"version": "17.2.29-beta",
"sideEffects": false
}

@@ -1,2 +0,2 @@

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';
import { Component, Property, ChildProperty, INotifyPropertyChanged, NotifyPropertyChanges, Animation } from '@syncfusion/ej2-base';import { Browser, isNullOrUndefined as isNOU, getUniqueID, formatUnit, EventHandler, isBlazor } 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';
import {PositionX,PositionY,ToastOpenArgs,ToastBeforeOpenArgs,ToastCloseArgs,ToastClickEventArgs} from "./toast";

@@ -14,2 +14,3 @@ import {ComponentModel} from '@syncfusion/ej2-base';

* @aspType string
* @blazorType string
*/

@@ -22,2 +23,3 @@ X?: PositionX | number | string;

* @aspType string
* @blazorType string
*/

@@ -55,3 +57,3 @@ Y?: PositionY | number | string;

* @event
* @blazorProperty 'OnClick'
* @blazorProperty 'Clicked'
*/

@@ -116,2 +118,3 @@ click?: EmitType<Event>;

* @default '300'
* @blazorType string
*/

@@ -123,2 +126,3 @@ width?: string | number;

* @default 'auto'
* @blazorType string
*/

@@ -128,3 +132,4 @@ height?: string | number;

/**
* Specifies the title to be displayed on the Toast.
* Specifies the title to be displayed on the Toast.
* Works only with string values.
* @default null

@@ -135,4 +140,6 @@ */

/**
* Specifies the content to be displayed on the Toast.
* Specifies the content to be displayed on the Toast.
* Accepts selectors, string values and HTML elements.
* @default null
* @blazorType string
*/

@@ -223,2 +230,3 @@ content?: string | HTMLElement;

* @aspType string
* @blazorType string
*/

@@ -225,0 +233,0 @@ target?: HTMLElement | Element | string;

@@ -21,4 +21,7 @@ import { Component, ChildProperty, INotifyPropertyChanged } from '@syncfusion/ej2-base';

element: HTMLElement;
/** Defines the Toast object. */
toastObj: Toast;
/**
* Defines the Toast object.
* @deprecated
*/
toastObj?: Toast;
/** Defines the prevent action for Toast click event. */

@@ -35,6 +38,9 @@ cancel: boolean;

export interface ToastBeforeOpenArgs extends BaseEventArgs {
/**
* Defines the Toast object.
* @deprecated
*/
toastObj?: Toast;
/** Defines the Toast element. */
element: HTMLElement;
/** Defines the Toast object. */
toastObj: Toast;
/** Defines the prevent action for before opening toast. */

@@ -47,6 +53,9 @@ cancel: boolean;

export interface ToastOpenArgs extends BaseEventArgs {
/**
* Defines the Toast object.
* @deprecated
*/
toastObj?: Toast;
/** Defines the Toast element. */
element: HTMLElement;
/** Defines the Toast object. */
toastObj: Toast;
}

@@ -59,4 +68,7 @@ /**

toastContainer: HTMLElement;
/** Defines the Toast object. */
toastObj: Toast;
/**
* Defines the Toast object.
* @deprecated
*/
toastObj?: Toast;
}

@@ -71,2 +83,3 @@ /**

* @aspType string
* @blazorType string
*/

@@ -78,2 +91,3 @@ X: PositionX | number | string;

* @aspType string
* @blazorType string
*/

@@ -107,3 +121,3 @@ Y: PositionY | number | string;

* @event
* @blazorProperty 'OnClick'
* @blazorProperty 'Clicked'
*/

@@ -164,3 +178,2 @@ click: EmitType<Event>;

private progressObj;
private titleTemplate;
private contentTemplate;

@@ -181,2 +194,3 @@ private toastTemplate;

* @default '300'
* @blazorType string
*/

@@ -187,2 +201,3 @@ width: string | number;

* @default 'auto'
* @blazorType string
*/

@@ -192,2 +207,3 @@ height: string | number;

* Specifies the title to be displayed on the Toast.
* Works only with string values.
* @default null

@@ -198,3 +214,5 @@ */

* Specifies the content to be displayed on the Toast.
* Accepts selectors, string values and HTML elements.
* @default null
* @blazorType string
*/

@@ -273,2 +291,3 @@ content: string | HTMLElement;

* @aspType string
* @blazorType string
*/

@@ -356,3 +375,2 @@ target: HTMLElement | Element | string;

private clearContainerPos;
private clearTitleTemplate;
private clearContentTemplate;

@@ -359,0 +377,0 @@ private clearToastTemplate;

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

import { Component, Property, ChildProperty, NotifyPropertyChanges, Animation } from '@syncfusion/ej2-base';
import { Browser, isNullOrUndefined as isNOU, getUniqueID, formatUnit, EventHandler } from '@syncfusion/ej2-base';
import { Browser, isNullOrUndefined as isNOU, getUniqueID, formatUnit, EventHandler, isBlazor } from '@syncfusion/ej2-base';
import { Collection, Complex, setStyleAttribute, Event, detach } from '@syncfusion/ej2-base';

@@ -176,3 +176,2 @@ import { attributes, extend, closest, compile as templateCompiler, classList, isUndefined } from '@syncfusion/ej2-base';

this.intervalId = [];
this.titleTemplate = null;
this.contentTemplate = null;

@@ -183,2 +182,3 @@ this.toastTemplate = null;

}
this.renderComplete();
};

@@ -239,5 +239,2 @@ /**

}
if (!isUndefined(toastObj.title) && !isNOU(this.titleTemplate) && this.title !== toastObj.title) {
this.clearTitleTemplate();
}
if (!isUndefined(toastObj.template) && !isNOU(this.toastTemplate) && this.template !== toastObj.template) {

@@ -294,3 +291,3 @@ this.clearToastTemplate();

var tmpArray;
prob === 'title' ? tempVar = this.titleTemplate : prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
prob === 'content' ? tempVar = this.contentTemplate : tempVar = this.toastTemplate;
if (!isNOU(tempVar)) {

@@ -302,7 +299,10 @@ ele.appendChild(tempVar.cloneNode(true));

if (document.querySelectorAll(value).length > 0) {
var elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
var clo = elem.cloneNode(true);
prob === 'title' ? this.titleTemplate = clo : prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
var elem = null;
if (prob !== 'title') {
elem = document.querySelector(value);
ele.appendChild(elem);
elem.style.display = '';
}
var clo = isNOU(elem) ? tempVar : elem.cloneNode(true);
prob === 'content' ? this.contentTemplate = clo : this.toastTemplate = clo;
}

@@ -314,3 +314,3 @@ }

if (!isNOU(templateFn)) {
tmpArray = templateFn({}, this, prob);
tmpArray = templateFn({}, this, prob, null, true);
}

@@ -361,5 +361,2 @@ if (!isNOU(tmpArray) && tmpArray.length > 0 && !(isNOU(tmpArray[0].tagName) && tmpArray.length === 1)) {

}
if (!isNOU(this.titleTemplate)) {
this.clearTitleTemplate();
}
if (!isNOU(this.contentTemplate)) {

@@ -372,7 +369,2 @@ this.clearContentTemplate();

};
Toast.prototype.clearTitleTemplate = function () {
this.titleTemplate.style.display = 'none';
document.body.appendChild(this.titleTemplate);
this.titleTemplate = null;
};
Toast.prototype.clearContentTemplate = function () {

@@ -395,3 +387,5 @@ this.contentTemplate.style.display = 'none';

var intervalId = parseInt(toastEle.id.split('toast_')[1], 10);
var toastClose = {
var toastClose = isBlazor() ? {
toastContainer: this.toastContainer
} : {
toastContainer: this.toastContainer,

@@ -423,3 +417,3 @@ toastObj: this,

Toast.prototype.setPositioning = function (pos) {
if (typeof (pos.X) === 'number' || typeof (pos.Y) === 'number' || pos.X.indexOf('%') !== -1 || pos.Y.indexOf('%') !== -1) {
if (!isNaN(parseFloat(pos.X)) || !isNaN(parseFloat(pos.Y))) {
setStyleAttribute(this.toastContainer, { 'left': formatUnit(pos.X), 'top': formatUnit(pos.Y) });

@@ -505,3 +499,3 @@ this.customPosition = true;

var isContent = this.element.innerHTML.replace(/\s/g, '') !== '';
if ((ele.children.length > 0 || isContent) && !ele.firstElementChild.classList.contains(ROOT)) {
if ((ele.children.length > 0 || isContent) && !(ele.firstElementChild && ele.firstElementChild.classList.contains(ROOT))) {
this.innerEle = document.createDocumentFragment();

@@ -567,3 +561,6 @@ var tempEle_1 = this.createElement('div');

var _this = this;
var toastBeforeOpen = {
var toastBeforeOpen = isBlazor() ? {
element: this.toastEle,
cancel: false
} : {
toastObj: this,

@@ -593,3 +590,5 @@ element: this.toastEle,

var toastEle = closest(target, '.' + ROOT);
var clickArgs = {
var clickArgs = isBlazor() ? {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e
} : {
element: toastEle, cancel: false, clickToClose: false, originalEvent: e, toastObj: this

@@ -610,3 +609,5 @@ };

};
var toastOpen = {
var toastOpen = isBlazor() ? {
element: this.toastEle
} : {
toastObj: this,

@@ -613,0 +614,0 @@ element: this.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

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