@progress/kendo-angular-notification 4.0.1 → 11.0.0-develop.101
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.
- package/LICENSE.md +1 -1
- package/NOTICE.txt +4 -4
- package/README.md +1 -1
- package/{esm2015/main.js → esm2020/index.mjs} +1 -1
- package/{esm2015/localization/localized-messages.directive.js → esm2020/localization/localized-messages.directive.mjs} +5 -5
- package/{esm2015/models/animation.js → esm2020/models/animation.mjs} +1 -1
- package/{esm2015/models/type.js → esm2020/models/notification-ref.mjs} +1 -1
- package/{esm2015/models/notification-settings.js → esm2020/models/notification-settings.mjs} +1 -1
- package/{esm2015/models/notification-ref.js → esm2020/models/position.mjs} +1 -1
- package/{esm2015/models/position.js → esm2020/models/type.mjs} +1 -1
- package/{esm2015/notification.component.js → esm2020/notification.component.mjs} +76 -46
- package/{esm2015/notification.container.component.js → esm2020/notification.container.component.mjs} +6 -6
- package/{esm2015/notification.module.js → esm2020/notification.module.mjs} +7 -6
- package/{esm2015/package-metadata.js → esm2020/package-metadata.mjs} +3 -3
- package/{esm2015/kendo-angular-notification.js → esm2020/progress-kendo-angular-notification.mjs} +2 -2
- package/{esm2015/services/notification.service.js → esm2020/services/notification.service.mjs} +8 -7
- package/{esm2015/utils/animations.js → esm2020/utils/animations.mjs} +1 -1
- package/fesm2015/progress-kendo-angular-notification.mjs +741 -0
- package/{fesm2015/kendo-angular-notification.js → fesm2020/progress-kendo-angular-notification.mjs} +96 -65
- package/{main.d.ts → index.d.ts} +1 -1
- package/localization/localized-messages.directive.d.ts +1 -1
- package/models/animation.d.ts +1 -1
- package/models/notification-ref.d.ts +2 -2
- package/models/notification-settings.d.ts +1 -1
- package/models/position.d.ts +1 -1
- package/models/type.d.ts +1 -1
- package/notification.component.d.ts +7 -1
- package/notification.container.component.d.ts +1 -1
- package/notification.module.d.ts +3 -2
- package/package-metadata.d.ts +1 -1
- package/package.json +28 -54
- package/{kendo-angular-notification.d.ts → progress-kendo-angular-notification.d.ts} +2 -2
- package/schematics/ngAdd/index.js +5 -7
- package/services/notification.service.d.ts +1 -1
- package/utils/animations.d.ts +1 -1
- package/bundles/kendo-angular-notification.umd.js +0 -5
- package/schematics/ngAdd/index.js.map +0 -1
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2021 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
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){var i;return n&&n.__esModule?n:(i=Object.create(null),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:1668698763,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 m=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),g=(m.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,deps:[{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Directive}),m.ɵdir=l.ɵɵngDeclareDirective({minVersion:"12.0.0",version:"12.2.16",type:m,selector:"[kendoNotificationLocalizedMessages]",inputs:{closeTitle:"closeTitle"},providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return m})}],usesInheritance:!0,ngImport:l}),l.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:m,decorators:[{type:a.Directive,args:[{providers:[{provide:n.ComponentMessages,useExisting:a.forwardRef(function(){return m})}],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-check-outline",warning:"k-i-exclamation-circle",error:"k-i-x-outline",info:"k-i-info-circle"}[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;this.animation&&n?(this.animate(this.animation,!0),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"})}g.ɵfac=l.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"12.2.16",ngImport:l,type:g,deps:[{token:l.ChangeDetectorRef},{token:l.ElementRef},{token:l.Renderer2},{token:p.AnimationBuilder},{token:u.LocalizationService}],target:l.ɵɵFactoryTarget.Component}),g.ɵcmp=l.ɵɵngDeclareComponent({minVersion:"12.0.0",version:"12.2.16",type:g,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-x" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>\n </div>\n </div>\n ',isInline:!0,directives:[{type:m,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:g,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-x" [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(g),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:[g,v,m],imports:[o.CommonModule],exports:[g,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:[g,v,m],entryComponents:[g,v],imports:[o.CommonModule],exports:[g,v],providers:[f]}]}]}),e.NOTIFICATION_CONTAINER=k,e.NotificationComponent=g,e.NotificationContainerComponent=v,e.NotificationModule=n,e.NotificationService=f,e.NotificationSettings=c,Object.defineProperty(e,"__esModule",{value:!0})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../tooling/schematics/ngAdd/index.ts"],"names":[],"mappings":";;AAAA,2DAKqC;AAErC,mBAAyB,OAAY;IACjC,MAAM,YAAY,mCACX,OAAO,KACV,YAAY,EAAE,oBAAoB,EAClC,OAAO,EAAE,cAAc,CAAC,wBAAwB;OACnD,CAAC;IAEF,OAAO,8BAAiB,CAAC,4BAA4B,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC;AACnF,CAAC;AARD,4BAQC"}
|