Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-notifications

Package Overview
Dependencies
Maintainers
3
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-notifications - npm Package Compare versions

Comparing version 19.4.52 to 20.1.47

.github/PULL_REQUEST_TEMPLATE/Bug.md

6

CHANGELOG.md

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

### Toast
#### Bug Fixes
- `I367641` - Now, the icon in the toast with type `warning` that is displayed using the toast utility method works properly.
## 19.3.43 (2021-09-30)

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

4

dist/ej2-notifications.umd.min.js
/*!
* filename: ej2-notifications.umd.min.js
* version : 19.4.52
* version : 20.1.47
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

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

*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],e):e(t.ej={},t.ej2Base,t.ej2Buttons,t.ej2Popups)}(this,function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(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",a="e-toast-container",l="e-toast-title",h="e-toast-full-width",p="e-toast-content",d="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 o(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 o(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 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),v=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"},y)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},y)],i.prototype,"hide",void 0),i}(e.ChildProperty),g=function(t){function y(e,i){var s=t.call(this,e,i)||this;return s.toastCollection=[],s}return o(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(a),e.setStyleAttribute(this.element,{position:"","z-index":""}),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isBlazorServer()||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.isBlazorServer()&&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(),this.initRenderClass=this.element.className},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 s="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(s))return;"BODY"===s.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",s.style.position="relative"),this.setPositioning(this.position),s.appendChild(this.toastContainer)}this.isBlazorServer()&&this.element.classList.contains("e-control")?this.isToastModel(t):(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)),this.isReact&&this.renderReactTemplates())},y.prototype.showToast=function(t,e){this.toastEle=this.element.querySelector("#"+t),this.show(e)},y.prototype.isToastModel=function(t){this.toastContainer=this.element,this.setPositioning(this.position);e.isNullOrUndefined(this.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(t)},y.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,"."+r+":not(."+a+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",i)),this.animation.hide.effect=s)},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(h):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(h)),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){this.hideToast("",t)},y.prototype.hideToast=function(t,i){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof i||"All"!==i)e.isNullOrUndefined(i)&&(i=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(i,t);else for(var s=0;s<this.toastContainer.childElementCount;s++)this.destroyToast(this.toastContainer.children[s],t)},y.prototype.fetchEle=function(t,i,s){i="string"==typeof i?this.sanitizeHelper(i):i;var o,n,r,a;if(a=t.classList.contains(l)?this.element.id+"title":t.classList.contains(p)?this.element.id+"content":this.element.id+"template",n="content"===s?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"!==s&&(h=document.querySelector(i),t.appendChild(h),h.style.display="");var d=e.isNullOrUndefined(h)?n:h.cloneNode(!0);"content"===s?this.contentTemplate=d:this.toastTemplate=d}}catch(t){o=e.compile(i)}if(!e.isNullOrUndefined(o))if(this.isBlazorServer()){r=o({},this,s,a,!0)}else r=o({},this,s,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)}),t},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.removeToastContainer=function(t){t&&this.toastContainer.classList.contains("e-toast-util")&&e.detach(this.toastContainer)},y.prototype.clearContainerPos=function(t){var i=this;this.isBlazorServer()?this.toastContainer=null:(this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.removeToastContainer(t),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(t){!e.isNullOrUndefined(i.toastContainer)&&i.toastContainer.classList.contains(t)&&i.toastContainer.classList.remove(t)}),this.removeToastContainer(t),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.isBlazorServer=function(){return e.isBlazor()&&this.isServerRendered},y.prototype.destroyToast=function(t,i){for(var s,o=this,n=0;n<this.toastCollection.length;n++)this.toastCollection[n].element[0]===t&&(s=this.toastCollection[n],this.toastCollection.splice(n,1));var r={options:this,cancel:!1,type:i,element:t,toastContainer:this.toastContainer},a=this.animation.hide,l={duration:a.duration,name:a.effect,timingFunction:a.easing},h=parseInt(t.id.split("toast_")[1],10),p=this.isBlazorServer()?{options:s,toastContainer:this.toastContainer}:{options:s,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",r,function(i){i.cancel||(e.isNullOrUndefined(o.progressObj[h])||e.isNullOrUndefined(t.querySelector("."+c))||(o.progressObj[h].progressEle.style.width="0%"),l.end=function(){o.clearProgress(h),o.isBlazorServer()&&!e.isNullOrUndefined(s)||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos(!0)},new e.Animation({}).animate(t,l))})},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){this.isBlazorServer()||(isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(this.customPosition=!0,e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)})))},y.prototype.setCloseButton=function(){if(this.showCloseButton){this.l10n=new e.L10n("toast",{close:"Close"},this.locale),this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close"),i=this.createElement("div",{className:u+" e-icons ",attrs:{tabindex:"0","aria-label":t}});this.toastEle.classList.add("e-toast-header-close-icon"),this.toastEle.appendChild(i)}},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],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("."+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;e="Ltr"===this.progressDirection?100-e:e,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.classList.add("e-toast-header-icon"),this.toastEle.appendChild(t)}},y.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:l});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:d});i.appendChild(t),this.toastEle.appendChild(i)}},y.prototype.setContent=function(){var t=this.createElement("div",{className:p}),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||!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))},y.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+d).length>0)this.toastEle.querySelector("."+d).appendChild(t);else{var e=this.createElement("div",{className:d});e.appendChild(t),this.toastEle.appendChild(e)}},y.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)},y.prototype.appendToTarget=function(t){var i=this,o=this.isBlazorServer()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",o,function(o){if(o.cancel){if(i.isBlazorServer()){var n=parseInt(i.toastEle.id.split("toast_")[1],10);i.clearProgress(n),e.detach(i.toastEle),0===i.toastContainer.childElementCount&&i.clearContainerPos()}}else i.isBlazorServer()||(i.toastEle.style.display="none"),i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.isBlazorServer()||i.toastContainer.appendChild(i.toastEle),e.removeClass([i.toastEle],"e-blazor-toast-hidden"),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),e.EventHandler.add(i.toastEle,"keydown",i.keyDownHandler,i),i.toastContainer.style.zIndex=s.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t)})},y.prototype.clickHandler=function(t){var i=this;this.isBlazorServer()||t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n=this.isBlazorServer()?{element:o,cancel:!1,clickToClose:!1,originalEvent:t}:{element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=s.classList.contains(u);this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(o,"click")})},y.prototype.keyDownHandler=function(t){if(t.target.classList.contains(u)&&(13===t.keyCode||32===t.keyCode)){var i=t.target,s=e.closest(i,"."+r);this.destroyToast(s,"key")}},y.prototype.displayToast=function(t,i){var s=this,o=this.animation.show,n={duration:o.duration,name:o.effect,timingFunction:o.easing},r=this.isBlazorServer()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){s.trigger("open",r)},new e.Animation(n).animate(t)},y.prototype.getContainer=function(){return this.element.classList.add(a),this.element},y.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")],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("Rtl")],y.prototype,"progressDirection",void 0),n([e.Property(1e3)],y.prototype,"extendedTimeout",void 0),n([e.Complex({},v)],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,"beforeClose",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);!function(i){(t.ToastUtility||(t.ToastUtility={})).show=function(t,i,s){var o;document.querySelector("."+a)?o=document.querySelector("."+a):(o=e.createElement("div",{className:r+" "+a+" e-toast-util"}),document.body.appendChild(o));var n,l;if("string"==typeof t){var h=void 0,p=void 0;if(e.isNullOrUndefined(i))h="",p="";else switch(i){case"Warning":h="e-toast-warning",p="e-toast-warning-icon";break;case"Success":h="e-toast-success",p="e-toast-success-icon";break;case"Error":h="e-toast-danger",p="e-toast-error-icon";break;case"Information":h="e-toast-info",p="e-toast-info-icon"}l={content:t,cssClass:h,icon:p,timeOut:e.isNullOrUndefined(s)?5e3:s}}else l=t;return(n=new g(l)).appendTo(o),n.show(),n}}(),t.ToastPosition=f,t.ButtonModelProps=m,t.ToastAnimations=y,t.ToastAnimationSettings=v,t.Toast=g,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-popups")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-buttons","@syncfusion/ej2-popups"],e):e(t.ej={},t.ej2Base,t.ej2Buttons,t.ej2Popups)}(this,function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(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",a="e-toast-container",l="e-toast-title",h="e-toast-full-width",p="e-toast-content",d="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 o(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 o(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 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),v=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"},y)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},y)],i.prototype,"hide",void 0),i}(e.ChildProperty),g=function(t){function y(e,i){var s=t.call(this,e,i)||this;return s.toastCollection=[],s}return o(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(a),e.setStyleAttribute(this.element,{position:"","z-index":""}),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isBlazorServer()||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.isBlazorServer()&&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(),this.initRenderClass=this.element.className},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 s="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(s))return;"BODY"===s.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",s.style.position="relative"),this.setPositioning(this.position),s.appendChild(this.toastContainer)}this.isBlazorServer()&&this.element.classList.contains("e-control")?this.isToastModel(t):(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)),this.isReact&&this.renderReactTemplates())},y.prototype.showToast=function(t,e){this.toastEle=this.element.querySelector("#"+t),this.show(e)},y.prototype.isToastModel=function(t){this.toastContainer=this.element,this.setPositioning(this.position);e.isNullOrUndefined(this.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(t)},y.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,"."+r+":not(."+a+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",i)),this.animation.hide.effect=s)},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(h):(this.toastEle.style.width=e.formatUnit(this.width),this.toastContainer.classList.remove(h)),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){this.hideToast("",t)},y.prototype.hideToast=function(t,i){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof i||"All"!==i)e.isNullOrUndefined(i)&&(i=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(i,t);else for(var s=0;s<this.toastContainer.childElementCount;s++)this.destroyToast(this.toastContainer.children[s],t)},y.prototype.fetchEle=function(t,i,s){i="string"==typeof i?this.sanitizeHelper(i):i;var o,n,r,a;if(a=t.classList.contains(l)?this.element.id+"title":t.classList.contains(p)?this.element.id+"content":this.element.id+"template",n="content"===s?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"!==s&&(h=document.querySelector(i),t.appendChild(h),h.style.display="");var d=e.isNullOrUndefined(h)?n:h.cloneNode(!0);"content"===s?this.contentTemplate=d:this.toastTemplate=d}else o=e.compile(i)}catch(t){o=e.compile(i)}if(!e.isNullOrUndefined(o))if(this.isBlazorServer()){r=o({},this,s,a,!0)}else r=o({},this,s,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)}),t},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.removeToastContainer=function(t){t&&this.toastContainer.classList.contains("e-toast-util")&&e.detach(this.toastContainer)},y.prototype.clearContainerPos=function(t){var i=this;this.isBlazorServer()?this.toastContainer=null:(this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.removeToastContainer(t),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(t){!e.isNullOrUndefined(i.toastContainer)&&i.toastContainer.classList.contains(t)&&i.toastContainer.classList.remove(t)}),this.removeToastContainer(t),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.isBlazorServer=function(){return e.isBlazor()&&this.isServerRendered},y.prototype.destroyToast=function(t,i){for(var s,o=this,n=0;n<this.toastCollection.length;n++)this.toastCollection[n].element[0]===t&&(s=this.toastCollection[n],this.toastCollection.splice(n,1));var r={options:this,cancel:!1,type:i,element:t,toastContainer:this.toastContainer},a=this.animation.hide,l={duration:a.duration,name:a.effect,timingFunction:a.easing},h=parseInt(t.id.split("toast_")[1],10),p=this.isBlazorServer()?{options:s,toastContainer:this.toastContainer}:{options:s,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",r,function(i){i.cancel||(e.isNullOrUndefined(o.progressObj[h])||e.isNullOrUndefined(t.querySelector("."+c))||(o.progressObj[h].progressEle.style.width="0%"),l.end=function(){o.clearProgress(h),o.isBlazorServer()&&!e.isNullOrUndefined(s)||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos(!0)},new e.Animation({}).animate(t,l))})},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){this.isBlazorServer()||(isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(this.customPosition=!0,e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)})))},y.prototype.setCloseButton=function(){if(this.showCloseButton){this.l10n=new e.L10n("toast",{close:"Close"},this.locale),this.l10n.setLocale(this.locale);var t=this.l10n.getConstant("close"),i=this.createElement("div",{className:u+" e-icons ",attrs:{tabindex:"0","aria-label":t}});this.toastEle.classList.add("e-toast-header-close-icon"),this.toastEle.appendChild(i)}},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],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("."+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;e="Ltr"===this.progressDirection?100-e:e,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.classList.add("e-toast-header-icon"),this.toastEle.appendChild(t)}},y.prototype.setTitle=function(){if(!e.isNullOrUndefined(this.title)){var t=this.createElement("div",{className:l});t=this.fetchEle(t,this.title,"title");var i=this.createElement("div",{className:d});i.appendChild(t),this.toastEle.appendChild(i)}},y.prototype.setContent=function(){var t=this.createElement("div",{className:p}),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||!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))},y.prototype.appendMessageContainer=function(t){if(this.toastEle.querySelectorAll("."+d).length>0)this.toastEle.querySelector("."+d).appendChild(t);else{var e=this.createElement("div",{className:d});e.appendChild(t),this.toastEle.appendChild(e)}},y.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)},y.prototype.appendToTarget=function(t){var i=this,o=this.isBlazorServer()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",o,function(o){if(o.cancel){if(i.isBlazorServer()){var n=parseInt(i.toastEle.id.split("toast_")[1],10);i.clearProgress(n),e.detach(i.toastEle),0===i.toastContainer.childElementCount&&i.clearContainerPos()}}else i.isBlazorServer()||(i.toastEle.style.display="none"),i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.isBlazorServer()||i.toastContainer.appendChild(i.toastEle),e.removeClass([i.toastEle],"e-blazor-toast-hidden"),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),e.EventHandler.add(i.toastEle,"keydown",i.keyDownHandler,i),i.toastContainer.style.zIndex=s.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t)})},y.prototype.clickHandler=function(t){var i=this;this.isBlazorServer()||t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n=this.isBlazorServer()?{element:o,cancel:!1,clickToClose:!1,originalEvent:t}:{element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=s.classList.contains(u);this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(o,"click")})},y.prototype.keyDownHandler=function(t){if(t.target.classList.contains(u)&&(13===t.keyCode||32===t.keyCode)){var i=t.target,s=e.closest(i,"."+r);this.destroyToast(s,"key")}},y.prototype.displayToast=function(t,i){var s=this,o=this.animation.show,n={duration:o.duration,name:o.effect,timingFunction:o.easing},r=this.isBlazorServer()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){s.trigger("open",r)},new e.Animation(n).animate(t)},y.prototype.getContainer=function(){return this.element.classList.add(a),this.element},y.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")],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("Rtl")],y.prototype,"progressDirection",void 0),n([e.Property(1e3)],y.prototype,"extendedTimeout",void 0),n([e.Complex({},v)],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,"beforeClose",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);!function(i){(t.ToastUtility||(t.ToastUtility={})).show=function(t,i,s){var o;document.querySelector("."+a)?o=document.querySelector("."+a):(o=e.createElement("div",{className:r+" "+a+" e-toast-util"}),document.body.appendChild(o));var n,l;if("string"==typeof t){var h=void 0,p=void 0;if(e.isNullOrUndefined(i))h="",p="";else switch(i){case"Warning":h="e-toast-warning",p="e-toast-warning-icon";break;case"Success":h="e-toast-success",p="e-toast-success-icon";break;case"Error":h="e-toast-danger",p="e-toast-error-icon";break;case"Information":h="e-toast-info",p="e-toast-info-icon"}l={content:t,cssClass:h,icon:p,timeOut:e.isNullOrUndefined(s)?5e3:s}}else l=t;return(n=new g(l)).appendTo(o),n.show(),n}}(),t.ToastPosition=f,t.ButtonModelProps=m,t.ToastAnimations=y,t.ToastAnimationSettings=v,t.Toast=g,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-notifications.umd.min.js.map

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

}
else {
templateFn = compile(value);
}
}

@@ -366,0 +369,0 @@ catch (e) {

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

}
else {
templateFn = compile(value);
}
}

@@ -401,0 +404,0 @@ catch (e) {

/*!
* filename: ej2-notifications.min.js
* version : 19.4.52
* version : 20.1.47
* Copyright Syncfusion Inc. 2001 - 2020. All rights reserved.

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

*/
this.ej=this.ej||{},this.ej.notifications=function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(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",a="e-toast-container",l="e-toast-message",h="e-toast-progress",d="e-toast-close-icon",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),c=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),u=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),f=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"},u)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},u)],i.prototype,"hide",void 0),i}(e.ChildProperty),m=function(t){function u(e,i){var s=t.call(this,e,i)||this;return s.toastCollection=[],s}return o(u,t),u.prototype.getModuleName=function(){return"toast"},u.prototype.getPersistData=function(){return this.addOnPersist([])},u.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(a),e.setStyleAttribute(this.element,{position:"","z-index":""}),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isBlazorServer()||t.prototype.destroy.call(this)},u.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.isBlazorServer()&&this.element.classList.add("e-rtl")},u.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(),this.initRenderClass=this.element.className},u.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 s="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(s))return;"BODY"===s.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",s.style.position="relative"),this.setPositioning(this.position),s.appendChild(this.toastContainer)}if(this.isBlazorServer()&&this.element.classList.contains("e-control"))return void this.isToastModel(t);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)),this.isReact&&this.renderReactTemplates()},u.prototype.showToast=function(t,e){this.toastEle=this.element.querySelector("#"+t),this.show(e)},u.prototype.isToastModel=function(t){this.toastContainer=this.element,this.setPositioning(this.position);var i=this;e.isNullOrUndefined(i.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(t)},u.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,"."+r+":not(."+a+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",i)),this.animation.hide.effect=s)},u.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()},u.prototype.setCSSClass=function(t){if(t){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},u.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)},u.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},u.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),s={cancel:!1,helper:null};e.extend(i,i,s),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},u.prototype.hide=function(t){this.hideToast("",t)},u.prototype.hideToast=function(t,i){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof i||"All"!==i)e.isNullOrUndefined(i)&&(i=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(i,t);else for(var s=0;s<this.toastContainer.childElementCount;s++)this.destroyToast(this.toastContainer.children[s],t)},u.prototype.fetchEle=function(t,i,s){i="string"==typeof i?this.sanitizeHelper(i):i;var o,n,r,a;if(a=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"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=null;"title"!==s&&(l=document.querySelector(i),t.appendChild(l),l.style.display="");var h=e.isNullOrUndefined(l)?n:l.cloneNode(!0);"content"===s?this.contentTemplate=h:this.toastTemplate=h}}catch(t){o=e.compile(i)}if(!e.isNullOrUndefined(o))if(this.isBlazorServer()){r=o({},this,s,a,!0)}else r=o({},this,s,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)}),t},u.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])},u.prototype.removeToastContainer=function(t){t&&this.toastContainer.classList.contains("e-toast-util")&&e.detach(this.toastContainer)},u.prototype.clearContainerPos=function(t){var i=this;if(this.isBlazorServer())return void(this.toastContainer=null);this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.removeToastContainer(t),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(t){!e.isNullOrUndefined(i.toastContainer)&&i.toastContainer.classList.contains(t)&&i.toastContainer.classList.remove(t)}),this.removeToastContainer(t),this.toastContainer=null),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},u.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},u.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},u.prototype.isBlazorServer=function(){return e.isBlazor()&&this.isServerRendered},u.prototype.destroyToast=function(t,i){for(var s,o=this,n=0;n<this.toastCollection.length;n++)this.toastCollection[n].element[0]===t&&(s=this.toastCollection[n],this.toastCollection.splice(n,1));var r={options:this,cancel:!1,type:i,element:t,toastContainer:this.toastContainer},a=this.animation.hide,l={duration:a.duration,name:a.effect,timingFunction:a.easing},d=parseInt(t.id.split("toast_")[1],10),p=this.isBlazorServer()?{options:s,toastContainer:this.toastContainer}:{options:s,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",r,function(i){i.cancel||(e.isNullOrUndefined(o.progressObj[d])||e.isNullOrUndefined(t.querySelector("."+h))||(o.progressObj[d].progressEle.style.width="0%"),l.end=function(){o.clearProgress(d),o.isBlazorServer()&&!e.isNullOrUndefined(s)||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos(!0)},new e.Animation({}).animate(t,l))})},u.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},u.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},u.prototype.setPositioning=function(t){this.isBlazorServer()||(isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(this.customPosition=!0,e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)})))},u.prototype.setCloseButton=function(){if(this.showCloseButton){var t={close:"Close"};this.l10n=new e.L10n("toast",t,this.locale),this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("close"),s=this.createElement("div",{className:d+" e-icons ",attrs:{tabindex:"0","aria-label":i}});this.toastEle.classList.add("e-toast-header-close-icon"),this.toastEle.appendChild(s)}},u.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:h}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},u.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+h))||(this.progressObj[t].progressEle.style.width="0%")},u.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+h))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},u.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;e="Ltr"===this.progressDirection?100-e:e,t.progressEle.style.width=e+"%"},u.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.classList.add("e-toast-header-icon"),this.toastEle.appendChild(t)}},u.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)}},u.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||!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))},u.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)}},u.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)},u.prototype.appendToTarget=function(t){var i=this,o=this.isBlazorServer()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",o,function(o){if(o.cancel){if(i.isBlazorServer()){var n=parseInt(i.toastEle.id.split("toast_")[1],10);i.clearProgress(n),e.detach(i.toastEle),0===i.toastContainer.childElementCount&&i.clearContainerPos()}}else i.isBlazorServer()||(i.toastEle.style.display="none"),i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.isBlazorServer()||i.toastContainer.appendChild(i.toastEle),e.removeClass([i.toastEle],"e-blazor-toast-hidden"),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),e.EventHandler.add(i.toastEle,"keydown",i.keyDownHandler,i),i.toastContainer.style.zIndex=s.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t)})},u.prototype.clickHandler=function(t){var i=this;this.isBlazorServer()||t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n=this.isBlazorServer()?{element:o,cancel:!1,clickToClose:!1,originalEvent:t}:{element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=s.classList.contains(d);this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(o,"click")})},u.prototype.keyDownHandler=function(t){if(t.target.classList.contains(d)&&(13===t.keyCode||32===t.keyCode)){var i=t.target,s=e.closest(i,"."+r);this.destroyToast(s,"key")}},u.prototype.displayToast=function(t,i){var s=this,o=this.animation.show,n={duration:o.duration,name:o.effect,timingFunction:o.easing},r=this.isBlazorServer()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){s.trigger("open",r)},new e.Animation(n).animate(t)},u.prototype.getContainer=function(){return this.element.classList.add(a),this.element},u.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")],u.prototype,"width",void 0),n([e.Property("auto")],u.prototype,"height",void 0),n([e.Property(null)],u.prototype,"title",void 0),n([e.Property(null)],u.prototype,"content",void 0),n([e.Property(!0)],u.prototype,"enableHtmlSanitizer",void 0),n([e.Property(null)],u.prototype,"icon",void 0),n([e.Property(null)],u.prototype,"cssClass",void 0),n([e.Property(null)],u.prototype,"template",void 0),n([e.Property(!0)],u.prototype,"newestOnTop",void 0),n([e.Property(!1)],u.prototype,"showCloseButton",void 0),n([e.Property(!1)],u.prototype,"showProgressBar",void 0),n([e.Property(5e3)],u.prototype,"timeOut",void 0),n([e.Property("Rtl")],u.prototype,"progressDirection",void 0),n([e.Property(1e3)],u.prototype,"extendedTimeout",void 0),n([e.Complex({},f)],u.prototype,"animation",void 0),n([e.Complex({},p)],u.prototype,"position",void 0),n([e.Collection([{}],c)],u.prototype,"buttons",void 0),n([e.Property(null)],u.prototype,"target",void 0),n([e.Event()],u.prototype,"created",void 0),n([e.Event()],u.prototype,"beforeSanitizeHtml",void 0),n([e.Event()],u.prototype,"destroyed",void 0),n([e.Event()],u.prototype,"open",void 0),n([e.Event()],u.prototype,"beforeOpen",void 0),n([e.Event()],u.prototype,"beforeClose",void 0),n([e.Event()],u.prototype,"close",void 0),n([e.Event()],u.prototype,"click",void 0),u=n([e.NotifyPropertyChanges],u)}(e.Component);return function(t){function i(t,i,s){var o;document.querySelector("."+a)?o=document.querySelector("."+a):(o=e.createElement("div",{className:r+" "+a+" e-toast-util"}),document.body.appendChild(o));var n,l;if("string"==typeof t){var h=void 0,d=void 0;if(e.isNullOrUndefined(i))h="",d="";else switch(i){case"Warning":h="e-toast-warning",d="e-toast-warning-icon";break;case"Success":h="e-toast-success",d="e-toast-success-icon";break;case"Error":h="e-toast-danger",d="e-toast-error-icon";break;case"Information":h="e-toast-info",d="e-toast-info-icon"}l={content:t,cssClass:h,icon:d,timeOut:e.isNullOrUndefined(s)?5e3:s}}else l=t;return(n=new m(l)).appendTo(o),n.show(),n}t.show=i}(t.ToastUtility||(t.ToastUtility={})),t.ToastPosition=p,t.ButtonModelProps=c,t.ToastAnimations=u,t.ToastAnimationSettings=f,t.Toast=m,t}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
this.ej=this.ej||{},this.ej.notifications=function(t,e,i,s){"use strict";var o=function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function s(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)}}(),n=function(t,e,i,s){var o,n=arguments.length,r=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,s);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(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",a="e-toast-container",l="e-toast-message",h="e-toast-progress",d="e-toast-close-icon",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),c=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),u=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),f=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"},u)],i.prototype,"show",void 0),n([e.Complex({effect:"FadeOut",duration:600,easing:"ease"},u)],i.prototype,"hide",void 0),i}(e.ChildProperty),m=function(t){function u(e,i){var s=t.call(this,e,i)||this;return s.toastCollection=[],s}return o(u,t),u.prototype.getModuleName=function(){return"toast"},u.prototype.getPersistData=function(){return this.addOnPersist([])},u.prototype.destroy=function(){this.hide("All"),this.element.classList.remove(a),e.setStyleAttribute(this.element,{position:"","z-index":""}),e.isNullOrUndefined(this.refElement)||e.isNullOrUndefined(this.refElement.parentElement)||(this.refElement.parentElement.insertBefore(this.element,this.refElement),e.detach(this.refElement),this.refElement=void 0),this.isBlazorServer()||t.prototype.destroy.call(this)},u.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.isBlazorServer()&&this.element.classList.add("e-rtl")},u.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(),this.initRenderClass=this.element.className},u.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 s="string"==typeof this.target?document.querySelector(this.target):document.body;if(e.isNullOrUndefined(s))return;"BODY"===s.tagName?this.toastContainer.style.position="fixed":(this.toastContainer.style.position="absolute",s.style.position="relative"),this.setPositioning(this.position),s.appendChild(this.toastContainer)}if(this.isBlazorServer()&&this.element.classList.contains("e-control"))return void this.isToastModel(t);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)),this.isReact&&this.renderReactTemplates()},u.prototype.showToast=function(t,e){this.toastEle=this.element.querySelector("#"+t),this.show(e)},u.prototype.isToastModel=function(t){this.toastContainer=this.element,this.setPositioning(this.position);var i=this;e.isNullOrUndefined(i.element.lastElementChild)||this.setProgress(),this.setAria(),this.appendToTarget(t)},u.prototype.swipeHandler=function(t){var i=e.closest(t.originalEvent.target,"."+r+":not(."+a+")"),s=this.animation.hide.effect;e.isNullOrUndefined(i)||("Right"===t.swipeDirection?(this.animation.hide.effect="SlideRightOut",this.hideToast("swipe",i)):"Left"===t.swipeDirection&&(this.animation.hide.effect="SlideLeftOut",this.hideToast("swipe",i)),this.animation.hide.effect=s)},u.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()},u.prototype.setCSSClass=function(t){if(t){var i=-1!==t.indexOf(",")?",":" ";e.classList(this.toastEle,t.split(i),[])}},u.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)},u.prototype.templateRendering=function(){this.fetchEle(this.toastEle,this.template,"template")},u.prototype.sanitizeHelper=function(t){if(this.enableHtmlSanitizer){var i=e.SanitizeHtmlHelper.beforeSanitize(),s={cancel:!1,helper:null};e.extend(i,i,s),this.trigger("beforeSanitizeHtml",i),i.cancel&&!e.isNullOrUndefined(i.helper)?t=i.helper(t):i.cancel||(t=e.SanitizeHtmlHelper.serializeValue(i,t))}return t},u.prototype.hide=function(t){this.hideToast("",t)},u.prototype.hideToast=function(t,i){if(!e.isNullOrUndefined(this.toastContainer)&&0!==this.toastContainer.childElementCount)if("string"!=typeof i||"All"!==i)e.isNullOrUndefined(i)&&(i=this.newestOnTop?this.toastContainer.lastElementChild:this.toastContainer.firstElementChild),this.destroyToast(i,t);else for(var s=0;s<this.toastContainer.childElementCount;s++)this.destroyToast(this.toastContainer.children[s],t)},u.prototype.fetchEle=function(t,i,s){i="string"==typeof i?this.sanitizeHelper(i):i;var o,n,r,a;if(a=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"===s?this.contentTemplate:this.toastTemplate,!e.isNullOrUndefined(n))return t.appendChild(n.cloneNode(!0)),t;try{if(document.querySelectorAll(i).length>0){var l=null;"title"!==s&&(l=document.querySelector(i),t.appendChild(l),l.style.display="");var h=e.isNullOrUndefined(l)?n:l.cloneNode(!0);"content"===s?this.contentTemplate=h:this.toastTemplate=h}else o=e.compile(i)}catch(t){o=e.compile(i)}if(!e.isNullOrUndefined(o))if(this.isBlazorServer()){r=o({},this,s,a,!0)}else r=o({},this,s,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)}),t},u.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])},u.prototype.removeToastContainer=function(t){t&&this.toastContainer.classList.contains("e-toast-util")&&e.detach(this.toastContainer)},u.prototype.clearContainerPos=function(t){var i=this;if(this.isBlazorServer())return void(this.toastContainer=null);this.customPosition?(e.setStyleAttribute(this.toastContainer,{left:"",top:""}),this.removeToastContainer(t),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(t){!e.isNullOrUndefined(i.toastContainer)&&i.toastContainer.classList.contains(t)&&i.toastContainer.classList.remove(t)}),this.removeToastContainer(t),this.toastContainer=null),e.isNullOrUndefined(this.contentTemplate)||this.clearContentTemplate(),e.isNullOrUndefined(this.toastTemplate)||this.clearToastTemplate()},u.prototype.clearContentTemplate=function(){this.contentTemplate.style.display="none",document.body.appendChild(this.contentTemplate),this.contentTemplate=null},u.prototype.clearToastTemplate=function(){this.toastTemplate.style.display="none",document.body.appendChild(this.toastTemplate),this.toastTemplate=null},u.prototype.isBlazorServer=function(){return e.isBlazor()&&this.isServerRendered},u.prototype.destroyToast=function(t,i){for(var s,o=this,n=0;n<this.toastCollection.length;n++)this.toastCollection[n].element[0]===t&&(s=this.toastCollection[n],this.toastCollection.splice(n,1));var r={options:this,cancel:!1,type:i,element:t,toastContainer:this.toastContainer},a=this.animation.hide,l={duration:a.duration,name:a.effect,timingFunction:a.easing},d=parseInt(t.id.split("toast_")[1],10),p=this.isBlazorServer()?{options:s,toastContainer:this.toastContainer}:{options:s,toastContainer:this.toastContainer,toastObj:this};this.trigger("beforeClose",r,function(i){i.cancel||(e.isNullOrUndefined(o.progressObj[d])||e.isNullOrUndefined(t.querySelector("."+h))||(o.progressObj[d].progressEle.style.width="0%"),l.end=function(){o.clearProgress(d),o.isBlazorServer()&&!e.isNullOrUndefined(s)||e.detach(t),o.trigger("close",p),0===o.toastContainer.childElementCount&&o.clearContainerPos(!0)},new e.Animation({}).animate(t,l))})},u.prototype.personalizeToast=function(){this.setIcon(),this.setTitle(),this.setContent(),this.actionButtons()},u.prototype.setAria=function(){e.attributes(this.toastEle,{role:"alert"})},u.prototype.setPositioning=function(t){this.isBlazorServer()||(isNaN(parseFloat(t.X))&&isNaN(parseFloat(t.Y))?this.toastContainer.classList.add(r+"-"+t.Y.toString().toLowerCase()+"-"+t.X.toString().toLowerCase()):(this.customPosition=!0,e.setStyleAttribute(this.toastContainer,{left:e.formatUnit(t.X),top:e.formatUnit(t.Y)})))},u.prototype.setCloseButton=function(){if(this.showCloseButton){var t={close:"Close"};this.l10n=new e.L10n("toast",t,this.locale),this.l10n.setLocale(this.locale);var i=this.l10n.getConstant("close"),s=this.createElement("div",{className:d+" e-icons ",attrs:{tabindex:"0","aria-label":i}});this.toastEle.classList.add("e-toast-header-close-icon"),this.toastEle.appendChild(s)}},u.prototype.setProgress=function(){if(this.timeOut>0){var t=parseInt(this.toastEle.id.split("toast_")[1],10);this.intervalId[t]=window.setTimeout(this.destroyToast.bind(this,this.toastEle),this.timeOut),this.progressObj[t]={hideEta:null,intervalId:null,maxHideTime:null,element:null,timeOutId:null,progressEle:null},this.progressObj[t].maxHideTime=parseFloat(this.timeOut+""),this.progressObj[t].hideEta=(new Date).getTime()+this.progressObj[t].maxHideTime,this.progressObj[t].element=this.toastEle,this.extendedTimeout>0&&(e.EventHandler.add(this.toastEle,"mouseover",this.toastHoverAction.bind(this,t)),e.EventHandler.add(this.toastEle,"mouseleave",this.delayedToastProgress.bind(this,t)),this.progressObj[t].timeOutId=this.intervalId[t]),this.showProgressBar&&(this.progressBarEle=this.createElement("div",{className:h}),this.toastEle.insertBefore(this.progressBarEle,this.toastEle.children[0]),this.progressObj[t].intervalId=setInterval(this.updateProgressBar.bind(this,this.progressObj[t]),10),this.progressObj[t].progressEle=this.progressBarEle)}},u.prototype.toastHoverAction=function(t){clearTimeout(this.progressObj[t].timeOutId),clearInterval(this.progressObj[t].intervalId),this.progressObj[t].hideEta=0;var i=this.progressObj[t].element;e.isNullOrUndefined(i.querySelector("."+h))||(this.progressObj[t].progressEle.style.width="0%")},u.prototype.delayedToastProgress=function(t){var i=this.progressObj[t],s=i.element;i.timeOutId=window.setTimeout(this.destroyToast.bind(this,s),this.extendedTimeout),i.maxHideTime=parseFloat(this.extendedTimeout+""),i.hideEta=(new Date).getTime()+i.maxHideTime,e.isNullOrUndefined(s.querySelector("."+h))||(i.intervalId=setInterval(this.updateProgressBar.bind(this,i),10))},u.prototype.updateProgressBar=function(t){var e=(t.hideEta-(new Date).getTime())/t.maxHideTime*100;e="Ltr"===this.progressDirection?100-e:e,t.progressEle.style.width=e+"%"},u.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.classList.add("e-toast-header-icon"),this.toastEle.appendChild(t)}},u.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)}},u.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||!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))},u.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)}},u.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)},u.prototype.appendToTarget=function(t){var i=this,o=this.isBlazorServer()?{options:t,element:this.toastEle,cancel:!1}:{options:t,toastObj:this,element:this.toastEle,cancel:!1};this.trigger("beforeOpen",o,function(o){if(o.cancel){if(i.isBlazorServer()){var n=parseInt(i.toastEle.id.split("toast_")[1],10);i.clearProgress(n),e.detach(i.toastEle),0===i.toastContainer.childElementCount&&i.clearContainerPos()}}else i.isBlazorServer()||(i.toastEle.style.display="none"),i.newestOnTop&&0!==i.toastContainer.childElementCount?i.toastContainer.insertBefore(i.toastEle,i.toastContainer.children[0]):i.isBlazorServer()||i.toastContainer.appendChild(i.toastEle),e.removeClass([i.toastEle],"e-blazor-toast-hidden"),e.EventHandler.add(i.toastEle,"click",i.clickHandler,i),e.EventHandler.add(i.toastEle,"keydown",i.keyDownHandler,i),i.toastContainer.style.zIndex=s.getZindexPartial(i.toastContainer)+"",i.displayToast(i.toastEle,t)})},u.prototype.clickHandler=function(t){var i=this;this.isBlazorServer()||t.stopPropagation();var s=t.target,o=e.closest(s,"."+r),n=this.isBlazorServer()?{element:o,cancel:!1,clickToClose:!1,originalEvent:t}:{element:o,cancel:!1,clickToClose:!1,originalEvent:t,toastObj:this},a=s.classList.contains(d);this.trigger("click",n,function(t){(a&&!t.cancel||t.clickToClose)&&i.destroyToast(o,"click")})},u.prototype.keyDownHandler=function(t){if(t.target.classList.contains(d)&&(13===t.keyCode||32===t.keyCode)){var i=t.target,s=e.closest(i,"."+r);this.destroyToast(s,"key")}},u.prototype.displayToast=function(t,i){var s=this,o=this.animation.show,n={duration:o.duration,name:o.effect,timingFunction:o.easing},r=this.isBlazorServer()?{options:i,element:this.toastEle}:{options:i,toastObj:this,element:this.toastEle};n.begin=function(){t.style.display=""},n.end=function(){s.trigger("open",r)},new e.Animation(n).animate(t)},u.prototype.getContainer=function(){return this.element.classList.add(a),this.element},u.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")],u.prototype,"width",void 0),n([e.Property("auto")],u.prototype,"height",void 0),n([e.Property(null)],u.prototype,"title",void 0),n([e.Property(null)],u.prototype,"content",void 0),n([e.Property(!0)],u.prototype,"enableHtmlSanitizer",void 0),n([e.Property(null)],u.prototype,"icon",void 0),n([e.Property(null)],u.prototype,"cssClass",void 0),n([e.Property(null)],u.prototype,"template",void 0),n([e.Property(!0)],u.prototype,"newestOnTop",void 0),n([e.Property(!1)],u.prototype,"showCloseButton",void 0),n([e.Property(!1)],u.prototype,"showProgressBar",void 0),n([e.Property(5e3)],u.prototype,"timeOut",void 0),n([e.Property("Rtl")],u.prototype,"progressDirection",void 0),n([e.Property(1e3)],u.prototype,"extendedTimeout",void 0),n([e.Complex({},f)],u.prototype,"animation",void 0),n([e.Complex({},p)],u.prototype,"position",void 0),n([e.Collection([{}],c)],u.prototype,"buttons",void 0),n([e.Property(null)],u.prototype,"target",void 0),n([e.Event()],u.prototype,"created",void 0),n([e.Event()],u.prototype,"beforeSanitizeHtml",void 0),n([e.Event()],u.prototype,"destroyed",void 0),n([e.Event()],u.prototype,"open",void 0),n([e.Event()],u.prototype,"beforeOpen",void 0),n([e.Event()],u.prototype,"beforeClose",void 0),n([e.Event()],u.prototype,"close",void 0),n([e.Event()],u.prototype,"click",void 0),u=n([e.NotifyPropertyChanges],u)}(e.Component);return function(t){function i(t,i,s){var o;document.querySelector("."+a)?o=document.querySelector("."+a):(o=e.createElement("div",{className:r+" "+a+" e-toast-util"}),document.body.appendChild(o));var n,l;if("string"==typeof t){var h=void 0,d=void 0;if(e.isNullOrUndefined(i))h="",d="";else switch(i){case"Warning":h="e-toast-warning",d="e-toast-warning-icon";break;case"Success":h="e-toast-success",d="e-toast-success-icon";break;case"Error":h="e-toast-danger",d="e-toast-error-icon";break;case"Information":h="e-toast-info",d="e-toast-info-icon"}l={content:t,cssClass:h,icon:d,timeOut:e.isNullOrUndefined(s)?5e3:s}}else l=t;return(n=new m(l)).appendTo(o),n.show(),n}t.show=i}(t.ToastUtility||(t.ToastUtility={})),t.ToastPosition=p,t.ButtonModelProps=c,t.ToastAnimations=u,t.ToastAnimationSettings=f,t.Toast=m,t}({},ej.base,ej.buttons,ej.popups),this.ejs=ej;
//# sourceMappingURL=ej2-notifications.min.js.map
/*!
* filename: index.d.ts
* version : 19.4.52
* version : 20.1.47
* Copyright Syncfusion Inc. 2001 - 2020. 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@19.3.53",
"_id": "@syncfusion/ej2-notifications@19.6.0",
"_inBundle": false,
"_integrity": "sha512-RkX0CDCYxU8B1rEiIoPJTQSxUJCKpv12MN+Cmx+rWe1B8JEUSOqqGwOoANUF+WTV8D1UB+SsZ6NOeTb2ackPeQ==",
"_integrity": "sha512-IC6XT2O4k6d0f5oQcuHhUmofD6LDMIWCLB44DaRRfXhUwS1iqr+dAqQ+l3I4jwsx56XPj2PWywIBisWSGVabxg==",
"_location": "/@syncfusion/ej2-notifications",

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

],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-notifications/-/ej2-notifications-19.3.53.tgz",
"_shasum": "7f163135defb8ec07fc1f09d28cf3dced24c6674",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-notifications/-/ej2-notifications-19.6.0.tgz",
"_shasum": "59f5abe9da4aa748ea0739dc4036e3e6e66c528a",
"_spec": "@syncfusion/ej2-notifications@*",

@@ -37,5 +37,5 @@ "_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~19.4.52",
"@syncfusion/ej2-buttons": "~19.4.52",
"@syncfusion/ej2-popups": "~19.4.52"
"@syncfusion/ej2-base": "~20.1.47",
"@syncfusion/ej2-buttons": "~20.1.47",
"@syncfusion/ej2-popups": "~20.1.47"
},

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

"typings": "index.d.ts",
"version": "19.4.52",
"version": "20.1.47",
"sideEffects": false
}

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

}
else {
templateFn = templateCompiler(value);
}
}

@@ -410,0 +413,0 @@ catch (e) {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc