@progress/kendo-angular-notification 4.0.0-next.202204011524 → 4.0.0-next.202204060714
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
3
|
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
4
|
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/animations"),require("@progress/kendo-angular-l10n"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularNotification",["exports","@angular/core","rxjs/operators","@progress/kendo-licensing","@angular/animations","@progress/kendo-angular-l10n","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularNotification={},e.ng.core,e.rxjs.operators,e.KendoLicensing,e.ng.animations,e.KendoAngularL10N,e.ng.common)}(this,function(e,a,t,s,i,n,o){"use strict";function r(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}function c(){this.hideAfter=5e3,this.position={horizontal:"right",vertical:"top"},this.animation={type:"fade",duration:500},this.closable=!1,this.type={style:"none",icon:!0}}var l=r(a),p=r(i),u=r(n),f=r(o),d={name:"@progress/kendo-angular-notification",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1648826609,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"};var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;Object.create;var g=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}function o(e){var t=n.call(this)||this;return t.service=e,t}return h(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i),o}(n.ComponentMessages),m=(g.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:g,deps:[{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Directive}),g.ɵdir=l.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:g,selector:"[kendoNotificationLocalizedMessages]",inputs:{closeTitle:"closeTitle"},providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return g})}],usesInheritance:!0,ngImport:l}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:g,decorators:[{type:a.Directive,args:[{providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return g})}],selector:"[kendoNotificationLocalizedMessages]"}]}],ctorParameters:function(){return[{type:u.LocalizationService}]},propDecorators:{closeTitle:[{type:a.Input}]}}),Object.defineProperty(y.prototype,"containerClass",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"closeButtonTitle",{get:function(){return this.closeTitle||this.localizationService.get("closeTitle")},enumerable:!1,configurable:!0}),y.prototype.notificationClasses=function(){return(this.type?this.typeClass():"")+"\n "+(this.closable?"k-notification-closable":"")},y.prototype.ngOnInit=function(){clearTimeout(this.hideTimeout)},y.prototype.ngOnDestroy=function(){clearTimeout(this.hideTimeout),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},y.prototype.ngAfterViewInit=function(){var e=this;this.closable||this.animation||this.setHideTimeout(),!this.closable&&this.animation&&this.animationEnd.pipe(t.take(1)).subscribe(function(){return e.setHideTimeout()}),this.animation&&this.animate(this.animation)},y.prototype.typeClass=function(){return{none:"",success:"k-notification-success",warning:"k-notification-warning",error:"k-notification-error",info:"k-notification-info"}[this.type.style]},y.prototype.typeIconClass=function(){return{none:"",success:"k-i-success",warning:"k-i-warning",error:"k-i-error",info:"k-i-info"}[this.type.style]},y.prototype.onCloseClick=function(){clearTimeout(this.hideTimeout),this.hide()},y.prototype.hide=function(e){var t=this,n=getComputedStyle(this.element.nativeElement).height;if(this.animation&&n)return this.animate(this.animation,!0),void this.animationEnd.subscribe(function(){t.emitClose(e)});this.emitClose(e)},y.prototype.setHideTimeout=function(){var e=this,t=this.hideAfter||this.defaultHideAfter;this.hideTimeout=window.setTimeout(function(){return e.onCloseClick()},t)},y.prototype.emitClose=function(e){e&&e.destroy(),this.close.emit()},y.prototype.play=function(e,t){var n=this,e=this.builder.build(e),i=this.element.nativeElement,o=(this.renderer.addClass(i,"k-notification-container-animating"),e.create(t));o.onDone(function(){n.renderer.removeClass(i,"k-notification-container-animating"),n.animationEnd.emit(),o&&(o.destroy(),o=null)}),o.play()},y.prototype.animate=function(e,t){var n=this.element.nativeElement,i=e.duration,o=n.offsetHeight,e="slide"===e.type?this.slideAnimation(o,i,t):this.fadeAnimation(i,t);this.play(e,n)},y.prototype.slideAnimation=function(e,t,n){return n?(n=t,[i.style({height:e+"px"}),i.animate(n+"ms ease-in",i.style({overflow:"hidden",height:0}))]):(n=e,e=t,[i.style({overflow:"hidden",height:0}),i.animate(e+"ms ease-in",i.style({height:n+"px"}))])},y.prototype.fadeAnimation=function(e,t){return t?(t=e,[i.style({opacity:1}),i.animate(t+"ms ease-in",i.style({opacity:0}))]):(t=e,[i.style({opacity:0}),i.animate(t+"ms ease-in",i.style({opacity:1}))])},y);function y(e,t,n,i,o){var r=this;this.cdr=e,this.element=t,this.renderer=n,this.builder=i,this.localizationService=o,this.close=new a.EventEmitter,this.width=null,this.height=null,this.defaultHideAfter=5e3,this.animationEnd=new a.EventEmitter,this.rtl=!1,s.validatePackage(d),this.dynamicRTLSubscription=o.changes.subscribe(function(e){e=e.rtl;r.rtl=e,r.direction=r.rtl?"rtl":"ltr"})}m.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,deps:[{token:l.ChangeDetectorRef},{token:l.ElementRef},{token:l.Renderer2},{token:p.AnimationBuilder},{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),m.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:m,selector:"kendo-notification",inputs:{templateRef:"templateRef",templateString:"templateString",width:"width",height:"height",cssClass:"cssClass",hideAfter:"hideAfter",closable:"closable",type:"type",animation:"animation"},host:{properties:{"attr.dir":"this.direction","class.k-notification-container":"this.containerClass"}},providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.notification"}],viewQueries:[{propertyName:"container",first:!0,predicate:["container"],descendants:!0,read:a.ViewContainerRef,static:!0}],ngImport:l,template:'\n <ng-container kendoNotificationLocalizedMessages\n i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n <div class="k-widget k-notification {{ notificationClasses() }}"\n [ngClass]="cssClass"\n [style.height.px]="height"\n [style.width.px]="width">\n <div class="k-notification-wrap k-hstack">\n <span *ngIf="type && type.icon && type.style !== \'none\'" class="k-icon" [ngClass]="typeIconClass()"></span>\n\n <div class="k-notification-content">\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n <ng-container #container></ng-container>\n </div>\n\n <a *ngIf="closable" class="k-icon k-i-close" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>\n </div>\n </div>\n ',isInline:!0,directives:[{type:g,selector:"[kendoNotificationLocalizedMessages]",inputs:["closeTitle"]},{type:f.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:f.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:f.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,decorators:[{type:a.Component,args:[{selector:"kendo-notification",template:'\n <ng-container kendoNotificationLocalizedMessages\n i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n <div class="k-widget k-notification {{ notificationClasses() }}"\n [ngClass]="cssClass"\n [style.height.px]="height"\n [style.width.px]="width">\n <div class="k-notification-wrap k-hstack">\n <span *ngIf="type && type.icon && type.style !== \'none\'" class="k-icon" [ngClass]="typeIconClass()"></span>\n\n <div class="k-notification-content">\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n <ng-container #container></ng-container>\n </div>\n\n <a *ngIf="closable" class="k-icon k-i-close" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>\n </div>\n </div>\n ',providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.notification"}]}]}],ctorParameters:function(){return[{type:l.ChangeDetectorRef},{type:l.ElementRef},{type:l.Renderer2},{type:p.AnimationBuilder},{type:u.LocalizationService}]},propDecorators:{container:[{type:a.ViewChild,args:["container",{read:a.ViewContainerRef,static:!0}]}],templateRef:[{type:a.Input}],templateString:[{type:a.Input}],width:[{type:a.Input}],height:[{type:a.Input}],cssClass:[{type:a.Input}],hideAfter:[{type:a.Input}],closable:[{type:a.Input}],type:[{type:a.Input}],animation:[{type:a.Input}],direction:[{type:a.HostBinding,args:["attr.dir"]}],containerClass:[{type:a.HostBinding,args:["class.k-notification-container"]}]}});C.prototype.ngOnDestroy=function(){this.notifications.forEach(function(e){e.closeClickSubscription&&e.closeClickSubscription.unsubscribe()}),this.notifications=[]},C.prototype.addNotification=function(e){this.position=e.position,this.id=this.position.horizontal+" "+this.position.vertical;var t=this.resolver.resolveComponentFactory(m),n=this.container.createComponent(t),i=(this.applySettings(n,e),null);return"function"==typeof e.content&&(t=this.resolver.resolveComponentFactory(e.content),i=n.instance.container.createComponent(t)),n.changeDetectorRef.detectChanges(),this.notifications.push(n.instance),e.appendTo&&this.applyAbsolutePosition(e.appendTo),this.applyPosition(),this.applyContainerWrap(),{afterHide:n.instance.close,hide:function(){return n.instance.hide(i)},notification:n,content:i||null}},C.prototype.hide=function(e){var t=e.instance,n=this.notifications.indexOf(t);this.notifications.splice(n,1),t.closeClickSubscription&&t.closeClickSubscription.unsubscribe(),t.templateRef=null,t.templateString=null,e.destroy()},C.prototype.applyContainerWrap=function(){var e="right"===this.position.horizontal?"wrap-reverse":"wrap";this.renderer.setStyle(this.group.nativeElement,"flex-wrap",e)},C.prototype.applySettings=function(e,t){var n=this,i=e.instance,o=t.content,r=t.animation||null,o=(i.closeClickSubscription=i.close.subscribe(function(){return n.hide(e)}),"string"==typeof o&&(i.templateString=o),o instanceof a.TemplateRef&&(i.templateRef=o),i.animation=r,t.type);o&&void 0===o.style&&(o.style="none"),o&&void 0===o.icon&&(o.icon=!0),i.type=o,i.closeTitle=t.closeTitle,t.cssClass&&(i.cssClass=t.cssClass),i.closable=t.closable,i.hideAfter=t.hideAfter,i.width=t.width,i.height=t.height},C.prototype.applyAbsolutePosition=function(e){var e=e.element.nativeElement,t=this.element.nativeElement.children[0];"static"===window.getComputedStyle(e).position&&this.renderer.setStyle(e,"position","relative"),this.renderer.setStyle(t,"position","absolute")},C.prototype.applyPosition=function(){var t=this.element.nativeElement.children[0],e=t.getBoundingClientRect().width/2,n=this.setContainerPosition(this.position,e);Object.keys(n).forEach(function(e){t.style[e]=n[e]})},C.prototype.setContainerPosition=function(e,t){var t={horizontal:{left:{left:0,alignItems:"flex-start"},right:{right:0,alignItems:"flex-start"},center:{left:"50%",marginLeft:-t+"px",alignItems:"center"}},vertical:{top:{top:0},bottom:{bottom:0}}},n=t.horizontal[e.horizontal],t=t.vertical[e.vertical];return Object.assign({},n,t)};var v=C;function C(e,t,n){this.element=e,this.renderer=t,this.resolver=n,this.id="",this.notifications=[]}v.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:v,deps:[{token:l.ElementRef},{token:l.Renderer2},{token:l.ComponentFactoryResolver}],target:l.ɵɵFactoryTarget.Component}),v.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:v,selector:"kendo-notification-container",inputs:{id:"id"},viewQueries:[{propertyName:"container",first:!0,predicate:["container"],descendants:!0,read:a.ViewContainerRef,static:!0},{propertyName:"group",first:!0,predicate:["group"],descendants:!0,static:!0}],ngImport:l,template:'\n <div #group class="k-notification-group">\n <ng-container #container></ng-container>\n </div>\n ',isInline:!0}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:v,decorators:[{type:a.Component,args:[{selector:"kendo-notification-container",template:'\n <div #group class="k-notification-group">\n <ng-container #container></ng-container>\n </div>\n '}]}],ctorParameters:function(){return[{type:l.ElementRef},{type:l.Renderer2},{type:l.ComponentFactoryResolver}]},propDecorators:{container:[{type:a.ViewChild,args:["container",{read:a.ViewContainerRef,static:!0}]}],group:[{type:a.ViewChild,args:["group",{static:!0}]}],id:[{type:a.Input}]}});var k=new a.InjectionToken("Notification Container"),f=(I.prototype.show=function(e){if(!e)throw new Error("NotificationSettings settings are required");var t=this.findGroupContainer(e),n=e.position||this.position,i=n.horizontal+" "+n.vertical,o=this.notificationContainers.find(function(e){return t.nativeElement.contains(e.element.nativeElement)&&e.id===i});if(!o){o=(r=this.resolver.resolveComponentFactory(v).create(this.injector)).instance,this.appRef.attachView(r.hostView);var r=r.location.nativeElement,a=this.findGroupContainer(e);if(!a)throw new Error("\n View Container not found! Inject the NOTIFICATION_CONTAINER or define a specific ViewContainerRef via\n the appendTo option. See http://www.telerik.com/kendo-angular-ui/components/notification/api/NOTIFICATION_CONTAINER/\n for more details.\n ");a.nativeElement.appendChild(r),this.notificationContainers.push(o)}return e.position=n,o.addNotification(e)},Object.defineProperty(I.prototype,"appRef",{get:function(){return this.applicationRef||(this.applicationRef=this.injector.get(a.ApplicationRef)),this.applicationRef},enumerable:!1,configurable:!0}),I.prototype.findGroupContainer=function(e){return e.appendTo?e.appendTo.element:this.container||((e=this.appRef.components&&this.appRef.components[0])?e.location:null)},I);function I(e,t,n){this.resolver=e,this.injector=t,this.container=n,this.notificationContainers=[],this.position={horizontal:"right",vertical:"top"}}f.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f,deps:[{token:l.ComponentFactoryResolver},{token:l.Injector},{token:k,optional:!0}],target:l.ɵɵFactoryTarget.Injectable}),f.ɵprov=l.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f,decorators:[{type:a.Injectable}],ctorParameters:function(){return[{type:l.ComponentFactoryResolver},{type:l.Injector},{type:l.ElementRef,decorators:[{type:a.Inject,args:[k]},{type:a.Optional}]}]}});n=function(){};n.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,deps:[],target:l.ɵɵFactoryTarget.NgModule}),n.ɵmod=l.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,declarations:[m,v,g],imports:[o.CommonModule],exports:[m,v]}),n.ɵinj=l.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,providers:[f],imports:[[o.CommonModule]]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,decorators:[{type:a.NgModule,args:[{declarations:[m,v,g],entryComponents:[m,v],imports:[o.CommonModule],exports:[m,v],providers:[f]}]}]}),e.NOTIFICATION_CONTAINER=k,e.NotificationComponent=m,e.NotificationContainerComponent=v,e.NotificationModule=n,e.NotificationService=f,e.NotificationSettings=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
5
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("rxjs/operators"),require("@progress/kendo-licensing"),require("@angular/animations"),require("@progress/kendo-angular-l10n"),require("@angular/common")):"function"==typeof define&&define.amd?define("KendoAngularNotification",["exports","@angular/core","rxjs/operators","@progress/kendo-licensing","@angular/animations","@progress/kendo-angular-l10n","@angular/common"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KendoAngularNotification={},e.ng.core,e.rxjs.operators,e.KendoLicensing,e.ng.animations,e.KendoAngularL10N,e.ng.common)}(this,function(e,a,t,s,i,n,o){"use strict";function r(n){if(n&&n.__esModule)return n;var i=Object.create(null);return n&&Object.keys(n).forEach(function(e){var t;"default"!==e&&(t=Object.getOwnPropertyDescriptor(n,e),Object.defineProperty(i,e,t.get?t:{enumerable:!0,get:function(){return n[e]}}))}),i.default=n,Object.freeze(i)}function c(){this.hideAfter=5e3,this.position={horizontal:"right",vertical:"top"},this.animation={type:"fade",duration:500},this.closable=!1,this.type={style:"none",icon:!0}}var l=r(a),p=r(i),u=r(n),f=r(o),d={name:"@progress/kendo-angular-notification",productName:"Kendo UI for Angular",productCodes:["KENDOUIANGULAR","KENDOUICOMPLETE"],publishDate:1649229220,version:"",licensingDocsUrl:"https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning"};var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};Object.create;Object.create;var g=function(n){var e=o,t=n;if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}function o(e){var t=n.call(this)||this;return t.service=e,t}return h(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i),o}(n.ComponentMessages),m=(g.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:g,deps:[{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Directive}),g.ɵdir=l.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:g,selector:"[kendoNotificationLocalizedMessages]",inputs:{closeTitle:"closeTitle"},providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return g})}],usesInheritance:!0,ngImport:l}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:g,decorators:[{type:a.Directive,args:[{providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return g})}],selector:"[kendoNotificationLocalizedMessages]"}]}],ctorParameters:function(){return[{type:u.LocalizationService}]},propDecorators:{closeTitle:[{type:a.Input}]}}),Object.defineProperty(y.prototype,"containerClass",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"closeButtonTitle",{get:function(){return this.closeTitle||this.localizationService.get("closeTitle")},enumerable:!1,configurable:!0}),y.prototype.notificationClasses=function(){return(this.type?this.typeClass():"")+"\n "+(this.closable?"k-notification-closable":"")},y.prototype.ngOnInit=function(){clearTimeout(this.hideTimeout)},y.prototype.ngOnDestroy=function(){clearTimeout(this.hideTimeout),this.dynamicRTLSubscription&&this.dynamicRTLSubscription.unsubscribe()},y.prototype.ngAfterViewInit=function(){var e=this;this.closable||this.animation||this.setHideTimeout(),!this.closable&&this.animation&&this.animationEnd.pipe(t.take(1)).subscribe(function(){return e.setHideTimeout()}),this.animation&&this.animate(this.animation)},y.prototype.typeClass=function(){return{none:"",success:"k-notification-success",warning:"k-notification-warning",error:"k-notification-error",info:"k-notification-info"}[this.type.style]},y.prototype.typeIconClass=function(){return{none:"",success:"k-i-success",warning:"k-i-warning",error:"k-i-error",info:"k-i-info"}[this.type.style]},y.prototype.onCloseClick=function(){clearTimeout(this.hideTimeout),this.hide()},y.prototype.hide=function(e){var t=this,n=getComputedStyle(this.element.nativeElement).height;if(this.animation&&n)return this.animate(this.animation,!0),void this.animationEnd.subscribe(function(){t.emitClose(e)});this.emitClose(e)},y.prototype.setHideTimeout=function(){var e=this,t=this.hideAfter||this.defaultHideAfter;this.hideTimeout=window.setTimeout(function(){return e.onCloseClick()},t)},y.prototype.emitClose=function(e){e&&e.destroy(),this.close.emit()},y.prototype.play=function(e,t){var n=this,e=this.builder.build(e),i=this.element.nativeElement,o=(this.renderer.addClass(i,"k-notification-container-animating"),e.create(t));o.onDone(function(){n.renderer.removeClass(i,"k-notification-container-animating"),n.animationEnd.emit(),o&&(o.destroy(),o=null)}),o.play()},y.prototype.animate=function(e,t){var n=this.element.nativeElement,i=e.duration,o=n.offsetHeight,e="slide"===e.type?this.slideAnimation(o,i,t):this.fadeAnimation(i,t);this.play(e,n)},y.prototype.slideAnimation=function(e,t,n){return n?(n=t,[i.style({height:e+"px"}),i.animate(n+"ms ease-in",i.style({overflow:"hidden",height:0}))]):(n=e,e=t,[i.style({overflow:"hidden",height:0}),i.animate(e+"ms ease-in",i.style({height:n+"px"}))])},y.prototype.fadeAnimation=function(e,t){return t?(t=e,[i.style({opacity:1}),i.animate(t+"ms ease-in",i.style({opacity:0}))]):(t=e,[i.style({opacity:0}),i.animate(t+"ms ease-in",i.style({opacity:1}))])},y);function y(e,t,n,i,o){var r=this;this.cdr=e,this.element=t,this.renderer=n,this.builder=i,this.localizationService=o,this.close=new a.EventEmitter,this.width=null,this.height=null,this.defaultHideAfter=5e3,this.animationEnd=new a.EventEmitter,this.rtl=!1,s.validatePackage(d),this.dynamicRTLSubscription=o.changes.subscribe(function(e){e=e.rtl;r.rtl=e,r.direction=r.rtl?"rtl":"ltr"})}m.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,deps:[{token:l.ChangeDetectorRef},{token:l.ElementRef},{token:l.Renderer2},{token:p.AnimationBuilder},{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),m.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:m,selector:"kendo-notification",inputs:{templateRef:"templateRef",templateString:"templateString",width:"width",height:"height",cssClass:"cssClass",hideAfter:"hideAfter",closable:"closable",type:"type",animation:"animation"},host:{properties:{"attr.dir":"this.direction","class.k-notification-container":"this.containerClass"}},providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.notification"}],viewQueries:[{propertyName:"container",first:!0,predicate:["container"],descendants:!0,read:a.ViewContainerRef,static:!0}],ngImport:l,template:'\n <ng-container kendoNotificationLocalizedMessages\n i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n <div class="k-widget k-notification {{ notificationClasses() }}"\n [ngClass]="cssClass"\n [style.height.px]="height"\n [style.width.px]="width">\n <div class="k-notification-wrap k-hstack">\n <span *ngIf="type && type.icon && type.style !== \'none\'" class="k-icon" [ngClass]="typeIconClass()"></span>\n\n <div class="k-notification-content">\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n <ng-container #container></ng-container>\n </div>\n\n <a *ngIf="closable" class="k-icon k-i-close" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>\n </div>\n </div>\n ',isInline:!0,directives:[{type:g,selector:"[kendoNotificationLocalizedMessages]",inputs:["closeTitle"]},{type:f.NgClass,selector:"[ngClass]",inputs:["class","ngClass"]},{type:f.NgIf,selector:"[ngIf]",inputs:["ngIf","ngIfThen","ngIfElse"]},{type:f.NgTemplateOutlet,selector:"[ngTemplateOutlet]",inputs:["ngTemplateOutletContext","ngTemplateOutlet"]}]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,decorators:[{type:a.Component,args:[{selector:"kendo-notification",template:'\n <ng-container kendoNotificationLocalizedMessages\n i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"\n closeTitle="Close"\n >\n </ng-container>\n <div class="k-widget k-notification {{ notificationClasses() }}"\n [ngClass]="cssClass"\n [style.height.px]="height"\n [style.width.px]="width">\n <div class="k-notification-wrap k-hstack">\n <span *ngIf="type && type.icon && type.style !== \'none\'" class="k-icon" [ngClass]="typeIconClass()"></span>\n\n <div class="k-notification-content">\n <ng-template\n [ngIf]="templateRef"\n [ngTemplateOutlet]="templateRef">\n </ng-template>\n <ng-template\n [ngIf]="templateString">\n {{ templateString }}\n </ng-template>\n <ng-container #container></ng-container>\n </div>\n\n <a *ngIf="closable" class="k-icon k-i-close" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>\n </div>\n </div>\n ',providers:[n.LocalizationService,{provide:n.L10N_PREFIX,useValue:"kendo.notification"}]}]}],ctorParameters:function(){return[{type:l.ChangeDetectorRef},{type:l.ElementRef},{type:l.Renderer2},{type:p.AnimationBuilder},{type:u.LocalizationService}]},propDecorators:{container:[{type:a.ViewChild,args:["container",{read:a.ViewContainerRef,static:!0}]}],templateRef:[{type:a.Input}],templateString:[{type:a.Input}],width:[{type:a.Input}],height:[{type:a.Input}],cssClass:[{type:a.Input}],hideAfter:[{type:a.Input}],closable:[{type:a.Input}],type:[{type:a.Input}],animation:[{type:a.Input}],direction:[{type:a.HostBinding,args:["attr.dir"]}],containerClass:[{type:a.HostBinding,args:["class.k-notification-container"]}]}});C.prototype.ngOnDestroy=function(){this.notifications.forEach(function(e){e.closeClickSubscription&&e.closeClickSubscription.unsubscribe()}),this.notifications=[]},C.prototype.addNotification=function(e){this.position=e.position,this.id=this.position.horizontal+" "+this.position.vertical;var t=this.resolver.resolveComponentFactory(m),n=this.container.createComponent(t),i=(this.applySettings(n,e),null);return"function"==typeof e.content&&(t=this.resolver.resolveComponentFactory(e.content),i=n.instance.container.createComponent(t)),n.changeDetectorRef.detectChanges(),this.notifications.push(n.instance),e.appendTo&&this.applyAbsolutePosition(e.appendTo),this.applyPosition(),this.applyContainerWrap(),{afterHide:n.instance.close,hide:function(){return n.instance.hide(i)},notification:n,content:i||null}},C.prototype.hide=function(e){var t=e.instance,n=this.notifications.indexOf(t);this.notifications.splice(n,1),t.closeClickSubscription&&t.closeClickSubscription.unsubscribe(),t.templateRef=null,t.templateString=null,e.destroy()},C.prototype.applyContainerWrap=function(){var e="right"===this.position.horizontal?"wrap-reverse":"wrap";this.renderer.setStyle(this.group.nativeElement,"flex-wrap",e)},C.prototype.applySettings=function(e,t){var n=this,i=e.instance,o=t.content,r=t.animation||null,o=(i.closeClickSubscription=i.close.subscribe(function(){return n.hide(e)}),"string"==typeof o&&(i.templateString=o),o instanceof a.TemplateRef&&(i.templateRef=o),i.animation=r,t.type);o&&void 0===o.style&&(o.style="none"),o&&void 0===o.icon&&(o.icon=!0),i.type=o,i.closeTitle=t.closeTitle,t.cssClass&&(i.cssClass=t.cssClass),i.closable=t.closable,i.hideAfter=t.hideAfter,i.width=t.width,i.height=t.height},C.prototype.applyAbsolutePosition=function(e){var e=e.element.nativeElement,t=this.element.nativeElement.children[0];"static"===window.getComputedStyle(e).position&&this.renderer.setStyle(e,"position","relative"),this.renderer.setStyle(t,"position","absolute")},C.prototype.applyPosition=function(){var t=this.element.nativeElement.children[0],e=t.getBoundingClientRect().width/2,n=this.setContainerPosition(this.position,e);Object.keys(n).forEach(function(e){t.style[e]=n[e]})},C.prototype.setContainerPosition=function(e,t){var t={horizontal:{left:{left:0,alignItems:"flex-start"},right:{right:0,alignItems:"flex-start"},center:{left:"50%",marginLeft:-t+"px",alignItems:"center"}},vertical:{top:{top:0},bottom:{bottom:0}}},n=t.horizontal[e.horizontal],t=t.vertical[e.vertical];return Object.assign({},n,t)};var v=C;function C(e,t,n){this.element=e,this.renderer=t,this.resolver=n,this.id="",this.notifications=[]}v.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:v,deps:[{token:l.ElementRef},{token:l.Renderer2},{token:l.ComponentFactoryResolver}],target:l.ɵɵFactoryTarget.Component}),v.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:v,selector:"kendo-notification-container",inputs:{id:"id"},viewQueries:[{propertyName:"container",first:!0,predicate:["container"],descendants:!0,read:a.ViewContainerRef,static:!0},{propertyName:"group",first:!0,predicate:["group"],descendants:!0,static:!0}],ngImport:l,template:'\n <div #group class="k-notification-group">\n <ng-container #container></ng-container>\n </div>\n ',isInline:!0}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:v,decorators:[{type:a.Component,args:[{selector:"kendo-notification-container",template:'\n <div #group class="k-notification-group">\n <ng-container #container></ng-container>\n </div>\n '}]}],ctorParameters:function(){return[{type:l.ElementRef},{type:l.Renderer2},{type:l.ComponentFactoryResolver}]},propDecorators:{container:[{type:a.ViewChild,args:["container",{read:a.ViewContainerRef,static:!0}]}],group:[{type:a.ViewChild,args:["group",{static:!0}]}],id:[{type:a.Input}]}});var k=new a.InjectionToken("Notification Container"),f=(I.prototype.show=function(e){if(!e)throw new Error("NotificationSettings settings are required");var t=this.findGroupContainer(e),n=e.position||this.position,i=n.horizontal+" "+n.vertical,o=this.notificationContainers.find(function(e){return t.nativeElement.contains(e.element.nativeElement)&&e.id===i});if(!o){o=(r=this.resolver.resolveComponentFactory(v).create(this.injector)).instance,this.appRef.attachView(r.hostView);var r=r.location.nativeElement,a=this.findGroupContainer(e);if(!a)throw new Error("\n View Container not found! Inject the NOTIFICATION_CONTAINER or define a specific ViewContainerRef via\n the appendTo option. See http://www.telerik.com/kendo-angular-ui/components/notification/api/NOTIFICATION_CONTAINER/\n for more details.\n ");a.nativeElement.appendChild(r),this.notificationContainers.push(o)}return e.position=n,o.addNotification(e)},Object.defineProperty(I.prototype,"appRef",{get:function(){return this.applicationRef||(this.applicationRef=this.injector.get(a.ApplicationRef)),this.applicationRef},enumerable:!1,configurable:!0}),I.prototype.findGroupContainer=function(e){return e.appendTo?e.appendTo.element:this.container||((e=this.appRef.components&&this.appRef.components[0])?e.location:null)},I);function I(e,t,n){this.resolver=e,this.injector=t,this.container=n,this.notificationContainers=[],this.position={horizontal:"right",vertical:"top"}}f.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f,deps:[{token:l.ComponentFactoryResolver},{token:l.Injector},{token:k,optional:!0}],target:l.ɵɵFactoryTarget.Injectable}),f.ɵprov=l.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:f,decorators:[{type:a.Injectable}],ctorParameters:function(){return[{type:l.ComponentFactoryResolver},{type:l.Injector},{type:l.ElementRef,decorators:[{type:a.Inject,args:[k]},{type:a.Optional}]}]}});n=function(){};n.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,deps:[],target:l.ɵɵFactoryTarget.NgModule}),n.ɵmod=l.ɵɵngDeclareNgModule({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,declarations:[m,v,g],imports:[o.CommonModule],exports:[m,v]}),n.ɵinj=l.ɵɵngDeclareInjector({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,providers:[f],imports:[[o.CommonModule]]}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:n,decorators:[{type:a.NgModule,args:[{declarations:[m,v,g],entryComponents:[m,v],imports:[o.CommonModule],exports:[m,v],providers:[f]}]}]}),e.NOTIFICATION_CONTAINER=k,e.NotificationComponent=m,e.NotificationContainerComponent=v,e.NotificationModule=n,e.NotificationService=f,e.NotificationSettings=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -9,7 +9,7 @@ export const packageMetadata = {
|
|
|
9
9
|
name: '@progress/kendo-angular-notification',
|
|
10
10
|
productName: 'Kendo UI for Angular',
|
|
11
11
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
12
|
-
publishDate:
|
|
12
|
+
publishDate: 1649229220,
|
|
13
13
|
version: '',
|
|
14
14
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
15
15
|
};
|
|
@@ -69,7 +69,7 @@ const packageMetadata = {
|
|
|
69
69
|
name: '@progress/kendo-angular-notification',
|
|
70
70
|
productName: 'Kendo UI for Angular',
|
|
71
71
|
productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
|
|
72
|
-
publishDate:
|
|
72
|
+
publishDate: 1649229220,
|
|
73
73
|
version: '',
|
|
74
74
|
licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
|
|
75
75
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-angular-notification",
|
|
3
|
-
"version": "4.0.0-next.
|
|
3
|
+
"version": "4.0.0-next.202204060714",
|
|
4
4
|
"description": "Kendo UI Notification for Angular",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Progress",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@angular/animations": "^12.0.0 || ^13.0.0",
|
|
28
28
|
"@angular/common": "^12.0.0 || ^13.0.0",
|
|
29
29
|
"@angular/core": "^12.0.0 || ^13.0.0",
|
|
30
|
-
"@progress/kendo-angular-common": "next",
|
|
31
|
-
"@progress/kendo-angular-l10n": "next",
|
|
30
|
+
"@progress/kendo-angular-common": ">3.0.0-next",
|
|
31
|
+
"@progress/kendo-angular-l10n": ">4.0.0-next",
|
|
32
32
|
"@progress/kendo-licensing": "^1.0.2",
|
|
33
33
|
"rxjs": "^6.5.3 || ^7.0.0"
|
|
34
34
|
},
|