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

@syncfusion/ej2-notifications

Package Overview
Dependencies
Maintainers
3
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.3.30 to 17.4.39

2

CHANGELOG.md

@@ -74,2 +74,2 @@ # Changelog

- **Template**: User customized element can be defined for the toast using the template property.
- **Template**: User customized element can be defined for the toast using the template property.
/*!
* filename: ej2-notifications.umd.min.js
* version : 17.3.30
* version : 17.4.39
* 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,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 l=t.length-1;l>=0;l--)(s=t[l])&&(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",l="e-toast-container",a="e-toast-title",p="e-toast-full-width",d="e-toast-content",h="e-toast-message",c="e-toast-progress",u="e-toast-close-icon",f=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),m=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),y=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),g=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"},y)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},y)],i.prototype,"hide",void 0),i}(e.ChildProperty),v=function(t){function y(e,i){var o=t.call(this,e,i)||this;return o.toastCollection=[],o}return s(y,t),y.prototype.getModuleName=function(){return"toast"},y.prototype.getPersistData=function(){return this.addOnPersist([])},y.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(l),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},y.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")},y.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()},y.prototype.show=function(t){var i;if(e.isNullOrUndefined(t)||(this.templateChanges(t),i=JSON.parse(JSON.stringify(t)),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var o="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(o))return;"BODY"===o.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",o.style.position="relative"),this.setPositioning(this.position),o.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(t),e.isNullOrUndefined(i)||(e.extend(i,{element:[this.toastEle]},!0),this.toastCollection.push(i))},y.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(."+l+")"),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)},y.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()},y.prototype.setCSSClass=function(t){if(t){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},y.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add(p):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(p)),this.toastEle.style.height=e.formatUnit(this.height)},y.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},y.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.classList.contains("blazor-template")?this.toastContainer.lastElementChild.previousSibling: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])},y.prototype.fetchEle=function(t,i,o){var s,n,r,l,p,h=Object.keys(window);if(l=t.classList.contains(a)?this.element.id+"title":t.classList.contains(d)?this.element.id+"content":this.element.id+"template",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 c=null;"title"!==o&&(c=document.querySelector(i),t.appendChild(c),c.style.display="");var u=e.isNullOrUndefined(c)?n:c.cloneNode(!0);"content"===o?this.contentTemplate=u:this.toastTemplate=u}}catch(t){s=e.compile(i),p=i}if(!e.isNullOrUndefined(s))if(e.isBlazor()){var f=!(-1!==h.indexOf("ejsInterop")&&!this.isStringTemplate&&0===p.indexOf("<div>Blazor"))||this.isStringTemplate;r=s({},this,o,l,f)}else r=s({},this,o,null,!0);return 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)}),-1===h.indexOf("ejsInterop")||this.isStringTemplate||0!==p.indexOf("<div>Blazor")||this.blazorTemplate(l)),t},y.prototype.blazorTemplate=function(t){t===this.element.id+"title"?e.updateBlazorTemplate(t,"Title",this,!1):t===this.element.id+"content"?e.updateBlazorTemplate(t,"Content",this,!1):e.updateBlazorTemplate(t,"Template",this,!1)},y.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])},y.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()},y.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},y.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},y.prototype.destroyToast=function(t){for(var i,o=this,s=0;s<this.toastCollection.length;s++)this.toastCollection[s].element[0]===t&&(i=this.toastCollection[s],this.toastCollection.splice(s,1));var n=this.animation.hide,r={duration:n.duration,name:n.effect,timingFunction:n.easing},l=parseInt(t.id.split("toast_")[1],10),a=e.isBlazor()?{options:i,toastContainer:this.toastContainer}:{options:i,toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[l])||e.isNullOrUndefined(t.querySelector("."+c))||(this.progressObj[l].progressEle.style.width="0%"),r.end=function(){o.clearProgress(l),t.querySelector(".blazor-inner-template")||e.detach(t),o.trigger("close",a),0===o.toastContainer.childElementCount&&o.clearContainerPos()},new e.Animation({}).animate(t,r)},y.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},y.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},y.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)},y.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:u+" e-icons "});this.toastEle.appendChild(t)}},y.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:c}),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)}},y.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("."+c))||(this.progressObj[t].progressEle.style.width="0%")},y.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("."+c))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},y.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},y.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)}},y.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:a});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:h});i.appendChild(t),this.toastEle.appendChild(i)}},y.prototype.setContent=function(){var t=this.createElement("div",{className:d}),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))},y.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+h).length>0)this.toastEle.querySelector("."+h).appendChild(t);else{var e=this.createElement("div",{className:h});e.appendChild(t),this.toastEle.appendChild(e)}},y.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)},y.prototype.appendToTarget=function(t){var i=this,s=e.isBlazor()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",s,function(s){s.cancel||(i.toastEle.style.display="none",i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.toastContainer.appendChild(i.toastEle),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),i.toastContainer.style.zIndex=o.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t))})},y.prototype.clickHandler=function(t){var i=this;e.isBlazor()||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},l=o.classList.contains(u);this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},y.prototype.displayToast=function(t,i){var o=this,s=this.animation.show,n={duration:s.duration,name:s.effect,timingFunction:s.easing},r=e.isBlazor()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){o.trigger("open",r)},new e.Animation(n).animate(t)},y.prototype.getContainer=function(){return this.element.classList.add(l),this.element},y.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")],y.prototype,"width",void 0),n([e.Property("auto")],y.prototype,"height",void 0),n([e.Property(null)],y.prototype,"title",void 0),n([e.Property(null)],y.prototype,"content",void 0),n([e.Property(null)],y.prototype,"icon",void 0),n([e.Property(null)],y.prototype,"cssClass",void 0),n([e.Property(null)],y.prototype,"template",void 0),n([e.Property(!0)],y.prototype,"newestOnTop",void 0),n([e.Property(!1)],y.prototype,"showCloseButton",void 0),n([e.Property(!1)],y.prototype,"showProgressBar",void 0),n([e.Property(5e3)],y.prototype,"timeOut",void 0),n([e.Property(1e3)],y.prototype,"extendedTimeout",void 0),n([e.Complex({},g)],y.prototype,"animation",void 0),n([e.Complex({},f)],y.prototype,"position",void 0),n([e.Collection([{}],m)],y.prototype,"buttons",void 0),n([e.Property(null)],y.prototype,"target",void 0),n([e.Event()],y.prototype,"created",void 0),n([e.Event()],y.prototype,"destroyed",void 0),n([e.Event()],y.prototype,"open",void 0),n([e.Event()],y.prototype,"beforeOpen",void 0),n([e.Event()],y.prototype,"close",void 0),n([e.Event()],y.prototype,"click",void 0),y=n([e.NotifyPropertyChanges],y)}(e.Component);t.ToastPosition=f,t.ButtonModelProps=m,t.ToastAnimations=y,t.ToastAnimationSettings=g,t.Toast=v,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 l=t.length-1;l>=0;l--)(s=t[l])&&(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",l="e-toast-container",a="e-toast-title",p="e-toast-full-width",d="e-toast-content",h="e-toast-message",c="e-toast-progress",u="e-toast-close-icon",f=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),m=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),y=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),g=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"},y)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},y)],i.prototype,"hide",void 0),i}(e.ChildProperty),v=function(t){function y(e,i){var o=t.call(this,e,i)||this;return o.toastCollection=[],o}return s(y,t),y.prototype.getModuleName=function(){return"toast"},y.prototype.getPersistData=function(){return this.addOnPersist([])},y.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(l),e.setStyleAttribute(this.element,{position:"","z-index":""}),t.prototype.destroy.call(this)},y.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")},y.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()},y.prototype.show=function(t){var i;if(e.isNullOrUndefined(t)||(this.templateChanges(t),i=JSON.parse(JSON.stringify(t)),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var o="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(o))return;"BODY"===o.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",o.style.position="relative"),this.setPositioning(this.position),o.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(t),e.isNullOrUndefined(i)||(e.extend(i,{element:[this.toastEle]},!0),this.toastCollection.push(i))},y.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,".e-toast:not(."+l+")"),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)},y.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()},y.prototype.setCSSClass=function(t){if(t){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},y.prototype.setWidthHeight=function(){"300px"===this.width?this.toastEle.style.width=e.formatUnit(this.width):"100%"===this.width?this.toastContainer.classList.add(p):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(p)),this.toastEle.style.height=e.formatUnit(this.height)},y.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},y.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize();e.extend(i,i,{cancel:!1,helper:null}),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},y.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.classList.contains("blazor-template")?this.toastContainer.lastElementChild.previousSibling: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])},y.prototype.fetchEle=function(t,i,o){i="string"==typeof i?this.sanitizeHelper(i):i;var s,n,r,l,p,h=Object.keys(window);if(l=t.classList.contains(a)?this.element.id+"title":t.classList.contains(d)?this.element.id+"content":this.element.id+"template",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 c=null;"title"!==o&&(c=document.querySelector(i),t.appendChild(c),c.style.display="");var u=e.isNullOrUndefined(c)?n:c.cloneNode(!0);"content"===o?this.contentTemplate=u:this.toastTemplate=u}}catch(t){s=e.compile(i),p=i}if(!e.isNullOrUndefined(s))if(e.isBlazor()){var f=!(-1!==h.indexOf("ejsInterop")&&!this.isStringTemplate&&0===p.indexOf("<div>Blazor"))||this.isStringTemplate;r=s({},this,o,l,f)}else r=s({},this,o,null,!0);return 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)}),-1===h.indexOf("ejsInterop")||this.isStringTemplate||0!==p.indexOf("<div>Blazor")||this.blazorTemplate(l)),t},y.prototype.blazorTemplate=function(t){t===this.element.id+"title"?e.updateBlazorTemplate(t,"Title",this,!1):t===this.element.id+"content"?e.updateBlazorTemplate(t,"Content",this,!1):e.updateBlazorTemplate(t,"Template",this,!1)},y.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])},y.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()},y.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},y.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},y.prototype.destroyToast=function(t){for(var i,o=this,s=0;s<this.toastCollection.length;s++)this.toastCollection[s].element[0]===t&&(i=this.toastCollection[s],this.toastCollection.splice(s,1));var n=this.animation.hide,r={duration:n.duration,name:n.effect,timingFunction:n.easing},l=parseInt(t.id.split("toast_")[1],10),a=e.isBlazor()?{options:i,toastContainer:this.toastContainer}:{options:i,toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[l])||e.isNullOrUndefined(t.querySelector("."+c))||(this.progressObj[l].progressEle.style.width="0%"),r.end=function(){o.clearProgress(l),t.querySelector(".blazor-inner-template")||e.detach(t),o.trigger("close",a),0===o.toastContainer.childElementCount&&o.clearContainerPos()},new e.Animation({}).animate(t,r)},y.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},y.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},y.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)},y.prototype.setCloseButton=function(){if(this.showCloseButton){var t=this.createElement("div",{className:u+" e-icons "});this.toastEle.appendChild(t)}},y.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:c}),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)}},y.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("."+c))||(this.progressObj[t].progressEle.style.width="0%")},y.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("."+c))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},y.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;t.progressEle.style.width=e+"%"},y.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)}},y.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:a});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:h});i.appendChild(t),this.toastEle.appendChild(i)}},y.prototype.setContent=function(){var t=this.createElement("div",{className:d}),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))},y.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+h).length>0)this.toastEle.querySelector("."+h).appendChild(t);else{var e=this.createElement("div",{className:h});e.appendChild(t),this.toastEle.appendChild(e)}},y.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)},y.prototype.appendToTarget=function(t){var i=this,s=e.isBlazor()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",s,function(s){s.cancel||(i.toastEle.style.display="none",i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.toastContainer.appendChild(i.toastEle),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),i.toastContainer.style.zIndex=o.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t))})},y.prototype.clickHandler=function(t){var i=this;e.isBlazor()||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},l=o.classList.contains(u);this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},y.prototype.displayToast=function(t,i){var o=this,s=this.animation.show,n={duration:s.duration,name:s.effect,timingFunction:s.easing},r=e.isBlazor()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){o.trigger("open",r)},new e.Animation(n).animate(t)},y.prototype.getContainer=function(){return this.element.classList.add(l),this.element},y.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")],y.prototype,"width",void 0),n([e.Property("auto")],y.prototype,"height",void 0),n([e.Property(null)],y.prototype,"title",void 0),n([e.Property(null)],y.prototype,"content",void 0),n([e.Property(!0)],y.prototype,"enableHtmlSanitizer",void 0),n([e.Property(null)],y.prototype,"icon",void 0),n([e.Property(null)],y.prototype,"cssClass",void 0),n([e.Property(null)],y.prototype,"template",void 0),n([e.Property(!0)],y.prototype,"newestOnTop",void 0),n([e.Property(!1)],y.prototype,"showCloseButton",void 0),n([e.Property(!1)],y.prototype,"showProgressBar",void 0),n([e.Property(5e3)],y.prototype,"timeOut",void 0),n([e.Property(1e3)],y.prototype,"extendedTimeout",void 0),n([e.Complex({},g)],y.prototype,"animation",void 0),n([e.Complex({},f)],y.prototype,"position",void 0),n([e.Collection([{}],m)],y.prototype,"buttons",void 0),n([e.Property(null)],y.prototype,"target",void 0),n([e.Event()],y.prototype,"created",void 0),n([e.Event()],y.prototype,"beforeSanitizeHtml",void 0),n([e.Event()],y.prototype,"destroyed",void 0),n([e.Event()],y.prototype,"open",void 0),n([e.Event()],y.prototype,"beforeOpen",void 0),n([e.Event()],y.prototype,"close",void 0),n([e.Event()],y.prototype,"click",void 0),y=n([e.NotifyPropertyChanges],y)}(e.Component);t.ToastPosition=f,t.ButtonModelProps=m,t.ToastAnimations=y,t.ToastAnimationSettings=g,t.Toast=v,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, isBlazor, isNullOrUndefined, isUndefined, setStyleAttribute, updateBlazorTemplate } from '@syncfusion/ej2-base';
import { Animation, Browser, ChildProperty, Collection, Complex, Component, Event, EventHandler, NotifyPropertyChanges, Property, SanitizeHtmlHelper, Touch, attributes, classList, closest, compile, detach, extend, formatUnit, getUniqueID, isBlazor, isNullOrUndefined, isUndefined, setStyleAttribute, updateBlazorTemplate } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';

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

/**
* @hidden
*/
sanitizeHelper(value) {
if (this.enableHtmlSanitizer) {
let item = SanitizeHtmlHelper.beforeSanitize();
let beforeEvent = {
cancel: false,
helper: null
};
extend(item, item, beforeEvent);
this.trigger('beforeSanitizeHtml', item);
if (item.cancel && !isNullOrUndefined(item.helper)) {
value = item.helper(value);
}
else if (!item.cancel) {
value = SanitizeHtmlHelper.serializeValue(item, value);
}
}
return value;
}
/**
* To Hide Toast element on a document.

@@ -253,2 +274,3 @@ * To Hide all toast element when passing 'All'.

fetchEle(ele, value, prob) {
value = typeof (value) === 'string' ? this.sanitizeHelper(value) : value;
let templateFn;

@@ -657,2 +679,5 @@ let tempVar;

__decorate([
Property(true)
], Toast.prototype, "enableHtmlSanitizer", void 0);
__decorate([
Property(null)

@@ -698,2 +723,5 @@ ], Toast.prototype, "icon", void 0);

Event()
], Toast.prototype, "beforeSanitizeHtml", void 0);
__decorate([
Event()
], Toast.prototype, "destroyed", void 0);

@@ -700,0 +728,0 @@ __decorate([

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

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

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

/**
* @hidden
*/
Toast.prototype.sanitizeHelper = function (value) {
if (this.enableHtmlSanitizer) {
var item = SanitizeHtmlHelper.beforeSanitize();
var beforeEvent = {
cancel: false,
helper: null
};
extend(item, item, beforeEvent);
this.trigger('beforeSanitizeHtml', item);
if (item.cancel && !isNullOrUndefined(item.helper)) {
value = item.helper(value);
}
else if (!item.cancel) {
value = SanitizeHtmlHelper.serializeValue(item, value);
}
}
return value;
};
/**
* To Hide Toast element on a document.

@@ -288,2 +309,3 @@ * To Hide all toast element when passing 'All'.

Toast.prototype.fetchEle = function (ele, value, prob) {
value = typeof (value) === 'string' ? this.sanitizeHelper(value) : value;
var templateFn;

@@ -698,2 +720,5 @@ var tempVar;

__decorate([
Property(true)
], Toast.prototype, "enableHtmlSanitizer", void 0);
__decorate([
Property(null)

@@ -739,2 +764,5 @@ ], Toast.prototype, "icon", void 0);

Event()
], Toast.prototype, "beforeSanitizeHtml", void 0);
__decorate([
Event()
], Toast.prototype, "destroyed", void 0);

@@ -741,0 +769,0 @@ __decorate([

/*!
* filename: ej2-notifications.min.js
* version : 17.3.30
* version : 17.4.39
* 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,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 l=t.length-1;l>=0;l--)(s=t[l])&&(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",l="e-toast-message",a="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){var o=t.call(this,e,i)||this;return o.toastCollection=[],o}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){var i;if(e.isNullOrUndefined(t)||(this.templateChanges(t),i=JSON.parse(JSON.stringify(t)),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var o="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(o))return;"BODY"===o.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",o.style.position="relative"),this.setPositioning(this.position),o.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(t),e.isNullOrUndefined(i)||(e.extend(i,{element:[this.toastEle]},!0),this.toastCollection.push(i))},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(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.classList.contains("blazor-template")?this.toastContainer.lastElementChild.previousSibling: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,l,a,p=Object.keys(window);if(l=t.classList.contains("e-toast-title")?this.element.id+"title":t.classList.contains("e-toast-content")?this.element.id+"content":this.element.id+"template",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 h=null;"title"!==o&&(h=document.querySelector(i),t.appendChild(h),h.style.display="");var d=e.isNullOrUndefined(h)?n:h.cloneNode(!0);"content"===o?this.contentTemplate=d:this.toastTemplate=d}}catch(t){s=e.compile(i),a=i}return e.isNullOrUndefined(s)||(r=e.isBlazor()?s({},this,o,l,!(-1!==p.indexOf("ejsInterop")&&!this.isStringTemplate&&0===a.indexOf("<div>Blazor"))||this.isStringTemplate):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)}),-1===p.indexOf("ejsInterop")||this.isStringTemplate||0!==a.indexOf("<div>Blazor")||this.blazorTemplate(l)),t},d.prototype.blazorTemplate=function(t){t===this.element.id+"title"?e.updateBlazorTemplate(t,"Title",this,!1):t===this.element.id+"content"?e.updateBlazorTemplate(t,"Content",this,!1):e.updateBlazorTemplate(t,"Template",this,!1)},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){for(var i,o=this,s=0;s<this.toastCollection.length;s++)this.toastCollection[s].element[0]===t&&(i=this.toastCollection[s],this.toastCollection.splice(s,1));var n=this.animation.hide,r={duration:n.duration,name:n.effect,timingFunction:n.easing},l=parseInt(t.id.split("toast_")[1],10),p=e.isBlazor()?{options:i,toastContainer:this.toastContainer}:{options:i,toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[l])||e.isNullOrUndefined(t.querySelector("."+a))||(this.progressObj[l].progressEle.style.width="0%"),r.end=function(){o.clearProgress(l),t.querySelector(".blazor-inner-template")||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos()},new e.Animation({}).animate(t,r)},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: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],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("."+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 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("."+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,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(t){var i=this,s=e.isBlazor()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",s,function(s){s.cancel||(i.toastEle.style.display="none",i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.toastContainer.appendChild(i.toastEle),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),i.toastContainer.style.zIndex=o.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t))})},d.prototype.clickHandler=function(t){var i=this;e.isBlazor()||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},l=o.classList.contains("e-toast-close-icon");this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},d.prototype.displayToast=function(t,i){var o=this,s=this.animation.show,n={duration:s.duration,name:s.effect,timingFunction:s.easing},r=e.isBlazor()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){o.trigger("open",r)},new e.Animation(n).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;
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 l=t.length-1;l>=0;l--)(s=t[l])&&(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",l="e-toast-message",a="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){var o=t.call(this,e,i)||this;return o.toastCollection=[],o}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){var i;if(e.isNullOrUndefined(t)||(this.templateChanges(t),i=JSON.parse(JSON.stringify(t)),e.extend(this,this,t)),e.isNullOrUndefined(this.toastContainer)){this.toastContainer=this.getContainer();var o="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(o))return;"BODY"===o.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",o.style.position="relative"),this.setPositioning(this.position),o.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(t),e.isNullOrUndefined(i)||(e.extend(i,{element:[this.toastEle]},!0),this.toastCollection.push(i))},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(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.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),o={cancel:!1,helper:null};e.extend(i,i,o),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},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.classList.contains("blazor-template")?this.toastContainer.lastElementChild.previousSibling: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){i="string"==typeof i?this.sanitizeHelper(i):i;var s,n,r,l,a,p=Object.keys(window);if(l=t.classList.contains("e-toast-title")?this.element.id+"title":t.classList.contains("e-toast-content")?this.element.id+"content":this.element.id+"template",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 h=null;"title"!==o&&(h=document.querySelector(i),t.appendChild(h),h.style.display="");var d=e.isNullOrUndefined(h)?n:h.cloneNode(!0);"content"===o?this.contentTemplate=d:this.toastTemplate=d}}catch(t){s=e.compile(i),a=i}return e.isNullOrUndefined(s)||(r=e.isBlazor()?s({},this,o,l,!(-1!==p.indexOf("ejsInterop")&&!this.isStringTemplate&&0===a.indexOf("<div>Blazor"))||this.isStringTemplate):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)}),-1===p.indexOf("ejsInterop")||this.isStringTemplate||0!==a.indexOf("<div>Blazor")||this.blazorTemplate(l)),t},d.prototype.blazorTemplate=function(t){t===this.element.id+"title"?e.updateBlazorTemplate(t,"Title",this,!1):t===this.element.id+"content"?e.updateBlazorTemplate(t,"Content",this,!1):e.updateBlazorTemplate(t,"Template",this,!1)},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){for(var i,o=this,s=0;s<this.toastCollection.length;s++)this.toastCollection[s].element[0]===t&&(i=this.toastCollection[s],this.toastCollection.splice(s,1));var n=this.animation.hide,r={duration:n.duration,name:n.effect,timingFunction:n.easing},l=parseInt(t.id.split("toast_")[1],10),p=e.isBlazor()?{options:i,toastContainer:this.toastContainer}:{options:i,toastContainer:this.toastContainer,toastObj:this};e.isNullOrUndefined(this.progressObj[l])||e.isNullOrUndefined(t.querySelector("."+a))||(this.progressObj[l].progressEle.style.width="0%"),r.end=function(){o.clearProgress(l),t.querySelector(".blazor-inner-template")||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos()},new e.Animation({}).animate(t,r)},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: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],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("."+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 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("."+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,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(t){var i=this,s=e.isBlazor()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",s,function(s){s.cancel||(i.toastEle.style.display="none",i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.toastContainer.appendChild(i.toastEle),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),i.toastContainer.style.zIndex=o.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t))})},d.prototype.clickHandler=function(t){var i=this;e.isBlazor()||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},l=o.classList.contains("e-toast-close-icon");this.trigger("click",n,function(t){(l&&!t.cancel||t.clickToClose)&&i.destroyToast(s)})},d.prototype.displayToast=function(t,i){var o=this,s=this.animation.show,n={duration:s.duration,name:s.effect,timingFunction:s.easing},r=e.isBlazor()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){o.trigger("open",r)},new e.Animation(n).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(!0)],d.prototype,"enableHtmlSanitizer",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,"beforeSanitizeHtml",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.3.30
* version : 17.4.39
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

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

{
"_from": "@syncfusion/ej2-notifications@*",
"_id": "@syncfusion/ej2-notifications@17.3.27",
"_id": "@syncfusion/ej2-notifications@17.2.48",
"_inBundle": false,
"_integrity": "sha512-hu6XphIhtbEIvkvk2a1loL0afJ0N42jprVWBifagnef277jThxiYpY/yUQq6sW7CQYYjYG/P8BErTcPiEmu7Eg==",
"_integrity": "sha512-GPH2/kQTEJlO4FL6dhX1OUd1Ru5UGV4Tj0do42SINoQJxgkAqMXC11lJxT8qdD0QeLhkU/3aa6xm7iDdvCLAUw==",
"_location": "/@syncfusion/ej2-notifications",

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

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-notifications/-/ej2-notifications-17.3.27.tgz",
"_shasum": "7f5fdc2287c2752cf5dcb31710794d220e7cb5ba",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-notifications/-/ej2-notifications-17.2.48.tgz",
"_shasum": "748de0db083f9ed916d54525d09ba1adfab1d58c",
"_spec": "@syncfusion/ej2-notifications@*",

@@ -37,5 +37,5 @@ "_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.3.27",
"@syncfusion/ej2-buttons": "~17.3.27",
"@syncfusion/ej2-popups": "~17.3.29"
"@syncfusion/ej2-base": "~17.4.39",
"@syncfusion/ej2-buttons": "~17.4.39",
"@syncfusion/ej2-popups": "~17.4.39"
},

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

"typings": "index.d.ts",
"version": "17.3.30",
"version": "17.4.39",
"sideEffects": false
}

@@ -1,3 +0,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, updateBlazorTemplate, isBlazor } 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";
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, updateBlazorTemplate, isBlazor, SanitizeHtmlHelper } from '@syncfusion/ej2-base';import { ButtonModel, Button } from '@syncfusion/ej2-buttons';import { getZindexPartial } from '@syncfusion/ej2-popups';
import {PositionX,PositionY,BeforeSanitizeHtmlArgs,ToastOpenArgs,ToastBeforeOpenArgs,ToastCloseArgs,ToastClickEventArgs} from "./toast";
import {ComponentModel} from '@syncfusion/ej2-base';

@@ -142,2 +142,8 @@

/**
* Defines whether to allow the cross-scripting site or not.
* @default true
*/
enableHtmlSanitizer?: boolean;
/**
* Defines CSS classes to specify an icon for the Toast which is to be displayed at top left corner of the Toast.

@@ -236,2 +242,9 @@ * @default null

/**
* Event triggers before sanitize the value.
* @event
* @blazorProperty 'OnSanitizeHtml'
*/
beforeSanitizeHtml?: EmitType<BeforeSanitizeHtmlArgs>;
/**
* Triggers the event after the Toast gets destroyed.

@@ -238,0 +251,0 @@ * @event

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

import { ToastAnimationsModel, ToastAnimationSettingsModel } from './toast-model';
export interface SanitizeSelectors {
/** Returns the tags. */
tags?: string[];
/** Returns the attributes. */
attributes?: SanitizeRemoveAttrs[];
}
export interface BeforeSanitizeHtmlArgs {
/** Illustrates whether the current action needs to be prevented or not. */
cancel?: boolean;
/** It is a callback function and executed it before our inbuilt action. It should return HTML as a string.
* @function
* @param {string} value - Returns the value.
* @returns {string}
*/
helper?: Function;
/** Returns the selectors object which carrying both tags and attributes selectors to block list of cross-site scripting attack.
* Also possible to modify the block list in this event.
*/
selectors?: SanitizeSelectors;
}
export interface SanitizeRemoveAttrs {
/** Defines the attribute name to sanitize */
attribute?: string;
/** Defines the selector that sanitize the specified attributes within the selector */
selector?: string;
}
/**

@@ -227,2 +253,7 @@ * Specifies the options for positioning the Toast in Y axis.

/**
* Defines whether to allow the cross-scripting site or not.
* @default true
*/
enableHtmlSanitizer: boolean;
/**
* Defines CSS classes to specify an icon for the Toast which is to be displayed at top left corner of the Toast.

@@ -308,2 +339,8 @@ * @default null

/**
* Event triggers before sanitize the value.
* @event
* @blazorProperty 'OnSanitizeHtml'
*/
beforeSanitizeHtml: EmitType<BeforeSanitizeHtmlArgs>;
/**
* Triggers the event after the Toast gets destroyed.

@@ -373,2 +410,6 @@ * @event

/**
* @hidden
*/
sanitizeHelper(value: string): string;
/**
* To Hide Toast element on a document.

@@ -375,0 +416,0 @@ * To Hide all toast element when passing 'All'.

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

import { attributes, extend, closest, compile as templateCompiler, classList, isUndefined } from '@syncfusion/ej2-base';
import { Touch, updateBlazorTemplate, isBlazor } from '@syncfusion/ej2-base';
import { Touch, updateBlazorTemplate, isBlazor, SanitizeHtmlHelper } from '@syncfusion/ej2-base';
import { Button } from '@syncfusion/ej2-buttons';

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

/**
* @hidden
*/
Toast.prototype.sanitizeHelper = function (value) {
if (this.enableHtmlSanitizer) {
var item = SanitizeHtmlHelper.beforeSanitize();
var beforeEvent = {
cancel: false,
helper: null
};
extend(item, item, beforeEvent);
this.trigger('beforeSanitizeHtml', item);
if (item.cancel && !isNOU(item.helper)) {
value = item.helper(value);
}
else if (!item.cancel) {
value = SanitizeHtmlHelper.serializeValue(item, value);
}
}
return value;
};
/**
* To Hide Toast element on a document.

@@ -296,2 +317,3 @@ * To Hide all toast element when passing 'All'.

Toast.prototype.fetchEle = function (ele, value, prob) {
value = typeof (value) === 'string' ? this.sanitizeHelper(value) : value;
var templateFn;

@@ -706,2 +728,5 @@ var tempVar;

__decorate([
Property(true)
], Toast.prototype, "enableHtmlSanitizer", void 0);
__decorate([
Property(null)

@@ -747,2 +772,5 @@ ], Toast.prototype, "icon", void 0);

Event()
], Toast.prototype, "beforeSanitizeHtml", void 0);
__decorate([
Event()
], Toast.prototype, "destroyed", void 0);

@@ -749,0 +777,0 @@ __decorate([

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