@progress/kendo-angular-notification 3.0.6-dev.202203091018 → 4.0.0-next.202203230842

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.
Files changed (67) hide show
  1. package/bundles/kendo-angular-notification.umd.js +5 -0
  2. package/{dist/es/models/notification-ref.js → esm2015/kendo-angular-notification.js} +4 -0
  3. package/esm2015/localization/localized-messages.directive.js +38 -0
  4. package/{dist/es → esm2015}/main.js +2 -0
  5. package/{dist/es2015 → esm2015}/models/animation.js +1 -0
  6. package/{dist/es2015 → esm2015}/models/notification-ref.js +1 -0
  7. package/{dist/es2015 → esm2015}/models/notification-settings.js +0 -0
  8. package/{dist/es → esm2015}/models/position.js +1 -0
  9. package/{dist/es2015 → esm2015}/models/type.js +1 -0
  10. package/{dist/es2015 → esm2015}/notification.component.js +85 -73
  11. package/{dist/es2015 → esm2015}/notification.container.component.js +25 -27
  12. package/{dist/es → esm2015}/notification.module.js +16 -16
  13. package/{dist/es2015 → esm2015}/package-metadata.js +1 -1
  14. package/{dist/es2015 → esm2015}/services/notification.service.js +14 -12
  15. package/{dist/es2015 → esm2015}/utils/animations.js +0 -0
  16. package/{dist/fesm2015/index.js → fesm2015/kendo-angular-notification.js} +170 -146
  17. package/{dist/es/models/animation.js → kendo-angular-notification.d.ts} +5 -0
  18. package/{dist/es2015/localization → localization}/localized-messages.directive.d.ts +3 -0
  19. package/{dist/es2015/main.d.ts → main.d.ts} +1 -0
  20. package/{dist/es2015/models → models}/animation.d.ts +0 -0
  21. package/{dist/es2015/models → models}/notification-ref.d.ts +0 -0
  22. package/{dist/es2015/models → models}/notification-settings.d.ts +0 -0
  23. package/{dist/es2015/models → models}/position.d.ts +0 -0
  24. package/{dist/es2015/models → models}/type.d.ts +0 -0
  25. package/{dist/es2015/notification.component.d.ts → notification.component.d.ts} +5 -2
  26. package/{dist/es2015/notification.container.component.d.ts → notification.container.component.d.ts} +3 -1
  27. package/{dist/es2015/notification.module.d.ts → notification.module.d.ts} +8 -0
  28. package/{dist/es2015/package-metadata.d.ts → package-metadata.d.ts} +0 -0
  29. package/package.json +33 -96
  30. package/schematics/ngAdd/index.js +5 -2
  31. package/schematics/ngAdd/index.js.map +1 -1
  32. package/{dist/es2015/services → services}/notification.service.d.ts +4 -1
  33. package/{dist/es2015/utils → utils}/animations.d.ts +0 -0
  34. package/dist/cdn/js/kendo-angular-notification.js +0 -20
  35. package/dist/cdn/main.js +0 -5
  36. package/dist/es/index.js +0 -10
  37. package/dist/es/localization/localized-messages.directive.js +0 -38
  38. package/dist/es/models/notification-settings.js +0 -54
  39. package/dist/es/models/type.js +0 -4
  40. package/dist/es/notification.component.js +0 -222
  41. package/dist/es/notification.container.component.js +0 -154
  42. package/dist/es/package-metadata.js +0 -15
  43. package/dist/es/services/notification.service.js +0 -135
  44. package/dist/es/utils/animations.js +0 -41
  45. package/dist/es2015/index.d.ts +0 -10
  46. package/dist/es2015/index.js +0 -10
  47. package/dist/es2015/index.metadata.json +0 -1
  48. package/dist/es2015/localization/localized-messages.directive.js +0 -34
  49. package/dist/es2015/main.js +0 -8
  50. package/dist/es2015/models/position.js +0 -4
  51. package/dist/es2015/notification.module.js +0 -53
  52. package/dist/fesm5/index.js +0 -677
  53. package/dist/npm/index.js +0 -15
  54. package/dist/npm/localization/localized-messages.directive.js +0 -40
  55. package/dist/npm/main.js +0 -15
  56. package/dist/npm/models/animation.js +0 -6
  57. package/dist/npm/models/notification-ref.js +0 -6
  58. package/dist/npm/models/notification-settings.js +0 -56
  59. package/dist/npm/models/position.js +0 -6
  60. package/dist/npm/models/type.js +0 -6
  61. package/dist/npm/notification.component.js +0 -224
  62. package/dist/npm/notification.container.component.js +0 -156
  63. package/dist/npm/notification.module.js +0 -58
  64. package/dist/npm/package-metadata.js +0 -17
  65. package/dist/npm/services/notification.service.js +0 -137
  66. package/dist/npm/utils/animations.js +0 -47
  67. package/dist/systemjs/kendo-angular-notification.js +0 -5
@@ -0,0 +1,5 @@
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){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:1648024886,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})});
@@ -2,3 +2,7 @@
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
+ /**
6
+ * Generated bundle index. Do not edit.
7
+ */
8
+ export * from './main';
@@ -0,0 +1,38 @@
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
+ import { Directive, forwardRef, Input } from '@angular/core';
6
+ import { ComponentMessages } from '@progress/kendo-angular-l10n';
7
+ import * as i0 from "@angular/core";
8
+ import * as i1 from "@progress/kendo-angular-l10n";
9
+ /**
10
+ * @hidden
11
+ */
12
+ export class LocalizedMessagesDirective extends ComponentMessages {
13
+ constructor(service) {
14
+ super();
15
+ this.service = service;
16
+ }
17
+ }
18
+ LocalizedMessagesDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, deps: [{ token: i1.LocalizationService }], target: i0.ɵɵFactoryTarget.Directive });
19
+ LocalizedMessagesDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: LocalizedMessagesDirective, selector: "[kendoNotificationLocalizedMessages]", inputs: { closeTitle: "closeTitle" }, providers: [
20
+ {
21
+ provide: ComponentMessages,
22
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
23
+ }
24
+ ], usesInheritance: true, ngImport: i0 });
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: LocalizedMessagesDirective, decorators: [{
26
+ type: Directive,
27
+ args: [{
28
+ providers: [
29
+ {
30
+ provide: ComponentMessages,
31
+ useExisting: forwardRef(() => LocalizedMessagesDirective)
32
+ }
33
+ ],
34
+ selector: `[kendoNotificationLocalizedMessages]`
35
+ }]
36
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }]; }, propDecorators: { closeTitle: [{
37
+ type: Input
38
+ }] } });
@@ -6,3 +6,5 @@ export { NotificationSettings } from './models/notification-settings';
6
6
  export { NotificationComponent } from './notification.component';
7
7
  export { NotificationService, NOTIFICATION_CONTAINER } from './services/notification.service';
8
8
  export { NotificationModule } from './notification.module';
9
+ // WRT error NG3001: Unsupported private class
10
+ export { NotificationContainerComponent } from './notification.container.component';
@@ -2,3 +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
+ export {};
@@ -2,3 +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
+ export {};
@@ -2,3 +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
+ export {};
@@ -2,3 +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
+ export {};
@@ -2,19 +2,22 @@
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
- import * as tslib_1 from "tslib";
6
- import { Component, EventEmitter, HostBinding, Input, TemplateRef, ChangeDetectorRef, ViewChild, ViewContainerRef, ElementRef, Renderer2 } from '@angular/core';
7
- import { AnimationBuilder } from '@angular/animations';
5
+ import { Component, EventEmitter, HostBinding, Input, ViewChild, ViewContainerRef } from '@angular/core';
8
6
  import { take } from 'rxjs/operators';
9
7
  import { validatePackage } from '@progress/kendo-licensing';
10
8
  import { packageMetadata } from './package-metadata';
11
9
  import { fadeAnimation, fadeCloseAnimation, slideAnimation, slideCloseAnimation } from './utils/animations';
12
10
  import { LocalizationService, L10N_PREFIX } from '@progress/kendo-angular-l10n';
11
+ import * as i0 from "@angular/core";
12
+ import * as i1 from "@angular/animations";
13
+ import * as i2 from "@progress/kendo-angular-l10n";
14
+ import * as i3 from "./localization/localized-messages.directive";
15
+ import * as i4 from "@angular/common";
13
16
  /**
14
17
  * @hidden
15
18
  *
16
19
  */
17
- let NotificationComponent = class NotificationComponent {
20
+ export class NotificationComponent {
18
21
  constructor(cdr, element, renderer, builder, localizationService) {
19
22
  this.cdr = cdr;
20
23
  this.element = element;
@@ -137,60 +140,48 @@ let NotificationComponent = class NotificationComponent {
137
140
  fadeAnimation(duration, onclose) {
138
141
  return onclose ? fadeCloseAnimation(duration) : fadeAnimation(duration);
139
142
  }
140
- };
141
- tslib_1.__decorate([
142
- ViewChild('container', { read: ViewContainerRef, static: true }),
143
- tslib_1.__metadata("design:type", ViewContainerRef)
144
- ], NotificationComponent.prototype, "container", void 0);
145
- tslib_1.__decorate([
146
- Input(),
147
- tslib_1.__metadata("design:type", TemplateRef)
148
- ], NotificationComponent.prototype, "templateRef", void 0);
149
- tslib_1.__decorate([
150
- Input(),
151
- tslib_1.__metadata("design:type", String)
152
- ], NotificationComponent.prototype, "templateString", void 0);
153
- tslib_1.__decorate([
154
- Input(),
155
- tslib_1.__metadata("design:type", Number)
156
- ], NotificationComponent.prototype, "width", void 0);
157
- tslib_1.__decorate([
158
- Input(),
159
- tslib_1.__metadata("design:type", Number)
160
- ], NotificationComponent.prototype, "height", void 0);
161
- tslib_1.__decorate([
162
- Input(),
163
- tslib_1.__metadata("design:type", Object)
164
- ], NotificationComponent.prototype, "cssClass", void 0);
165
- tslib_1.__decorate([
166
- Input(),
167
- tslib_1.__metadata("design:type", Number)
168
- ], NotificationComponent.prototype, "hideAfter", void 0);
169
- tslib_1.__decorate([
170
- Input(),
171
- tslib_1.__metadata("design:type", Boolean)
172
- ], NotificationComponent.prototype, "closable", void 0);
173
- tslib_1.__decorate([
174
- Input(),
175
- tslib_1.__metadata("design:type", Object)
176
- ], NotificationComponent.prototype, "type", void 0);
177
- tslib_1.__decorate([
178
- Input(),
179
- tslib_1.__metadata("design:type", Object)
180
- ], NotificationComponent.prototype, "animation", void 0);
181
- tslib_1.__decorate([
182
- HostBinding('attr.dir'),
183
- tslib_1.__metadata("design:type", String)
184
- ], NotificationComponent.prototype, "direction", void 0);
185
- tslib_1.__decorate([
186
- HostBinding('class.k-notification-container'),
187
- tslib_1.__metadata("design:type", Boolean),
188
- tslib_1.__metadata("design:paramtypes", [])
189
- ], NotificationComponent.prototype, "containerClass", null);
190
- NotificationComponent = tslib_1.__decorate([
191
- Component({
192
- selector: 'kendo-notification',
193
- template: `
143
+ }
144
+ NotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.AnimationBuilder }, { token: i2.LocalizationService }], target: i0.ɵɵFactoryTarget.Component });
145
+ NotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NotificationComponent, 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: [
146
+ LocalizationService,
147
+ {
148
+ provide: L10N_PREFIX,
149
+ useValue: 'kendo.notification'
150
+ }
151
+ ], viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: `
152
+ <ng-container kendoNotificationLocalizedMessages
153
+ i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"
154
+ closeTitle="Close"
155
+ >
156
+ </ng-container>
157
+ <div class="k-widget k-notification {{ notificationClasses() }}"
158
+ [ngClass]="cssClass"
159
+ [style.height.px]="height"
160
+ [style.width.px]="width">
161
+ <div class="k-notification-wrap k-hstack">
162
+ <span *ngIf="type && type.icon && type.style !== 'none'" class="k-icon" [ngClass]="typeIconClass()"></span>
163
+
164
+ <div class="k-notification-content">
165
+ <ng-template
166
+ [ngIf]="templateRef"
167
+ [ngTemplateOutlet]="templateRef">
168
+ </ng-template>
169
+ <ng-template
170
+ [ngIf]="templateString">
171
+ {{ templateString }}
172
+ </ng-template>
173
+ <ng-container #container></ng-container>
174
+ </div>
175
+
176
+ <a *ngIf="closable" class="k-icon k-i-close" [attr.title]="closeButtonTitle" (click)="onCloseClick()"></a>
177
+ </div>
178
+ </div>
179
+ `, isInline: true, directives: [{ type: i3.LocalizedMessagesDirective, selector: "[kendoNotificationLocalizedMessages]", inputs: ["closeTitle"] }, { type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
180
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationComponent, decorators: [{
181
+ type: Component,
182
+ args: [{
183
+ selector: 'kendo-notification',
184
+ template: `
194
185
  <ng-container kendoNotificationLocalizedMessages
195
186
  i18n-closeTitle="kendo.notification.closeTitle|The title of the close button"
196
187
  closeTitle="Close"
@@ -219,18 +210,39 @@ NotificationComponent = tslib_1.__decorate([
219
210
  </div>
220
211
  </div>
221
212
  `,
222
- providers: [
223
- LocalizationService,
224
- {
225
- provide: L10N_PREFIX,
226
- useValue: 'kendo.notification'
227
- }
228
- ]
229
- }),
230
- tslib_1.__metadata("design:paramtypes", [ChangeDetectorRef,
231
- ElementRef,
232
- Renderer2,
233
- AnimationBuilder,
234
- LocalizationService])
235
- ], NotificationComponent);
236
- export { NotificationComponent };
213
+ providers: [
214
+ LocalizationService,
215
+ {
216
+ provide: L10N_PREFIX,
217
+ useValue: 'kendo.notification'
218
+ }
219
+ ]
220
+ }]
221
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.AnimationBuilder }, { type: i2.LocalizationService }]; }, propDecorators: { container: [{
222
+ type: ViewChild,
223
+ args: ['container', { read: ViewContainerRef, static: true }]
224
+ }], templateRef: [{
225
+ type: Input
226
+ }], templateString: [{
227
+ type: Input
228
+ }], width: [{
229
+ type: Input
230
+ }], height: [{
231
+ type: Input
232
+ }], cssClass: [{
233
+ type: Input
234
+ }], hideAfter: [{
235
+ type: Input
236
+ }], closable: [{
237
+ type: Input
238
+ }], type: [{
239
+ type: Input
240
+ }], animation: [{
241
+ type: Input
242
+ }], direction: [{
243
+ type: HostBinding,
244
+ args: ['attr.dir']
245
+ }], containerClass: [{
246
+ type: HostBinding,
247
+ args: ['class.k-notification-container']
248
+ }] } });
@@ -2,14 +2,13 @@
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
- import * as tslib_1 from "tslib";
6
- import { Component, Input, ElementRef, ComponentFactoryResolver, ViewContainerRef, Renderer2, ViewChild, TemplateRef } from '@angular/core';
5
+ import { Component, Input, ViewContainerRef, ViewChild, TemplateRef } from '@angular/core';
7
6
  import { NotificationComponent } from './notification.component';
7
+ import * as i0 from "@angular/core";
8
8
  /**
9
9
  * @hidden
10
- *
11
10
  */
12
- let NotificationContainerComponent = class NotificationContainerComponent {
11
+ export class NotificationContainerComponent {
13
12
  constructor(element, renderer, resolver) {
14
13
  this.element = element;
15
14
  this.renderer = renderer;
@@ -127,30 +126,29 @@ let NotificationContainerComponent = class NotificationContainerComponent {
127
126
  const vertical = positionLayout.vertical[position.vertical];
128
127
  return Object.assign({}, horizontal, vertical);
129
128
  }
130
- };
131
- tslib_1.__decorate([
132
- ViewChild('container', { read: ViewContainerRef, static: true }),
133
- tslib_1.__metadata("design:type", ViewContainerRef)
134
- ], NotificationContainerComponent.prototype, "container", void 0);
135
- tslib_1.__decorate([
136
- ViewChild('group', { static: true }),
137
- tslib_1.__metadata("design:type", ElementRef)
138
- ], NotificationContainerComponent.prototype, "group", void 0);
139
- tslib_1.__decorate([
140
- Input(),
141
- tslib_1.__metadata("design:type", String)
142
- ], NotificationContainerComponent.prototype, "id", void 0);
143
- NotificationContainerComponent = tslib_1.__decorate([
144
- Component({
145
- selector: 'kendo-notification-container',
146
- template: `
129
+ }
130
+ NotificationContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationContainerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Component });
131
+ NotificationContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: NotificationContainerComponent, selector: "kendo-notification-container", inputs: { id: "id" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }, { propertyName: "group", first: true, predicate: ["group"], descendants: true, static: true }], ngImport: i0, template: `
132
+ <div #group class="k-notification-group">
133
+ <ng-container #container></ng-container>
134
+ </div>
135
+ `, isInline: true });
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationContainerComponent, decorators: [{
137
+ type: Component,
138
+ args: [{
139
+ selector: 'kendo-notification-container',
140
+ template: `
147
141
  <div #group class="k-notification-group">
148
142
  <ng-container #container></ng-container>
149
143
  </div>
150
144
  `
151
- }),
152
- tslib_1.__metadata("design:paramtypes", [ElementRef,
153
- Renderer2,
154
- ComponentFactoryResolver])
155
- ], NotificationContainerComponent);
156
- export { NotificationContainerComponent };
145
+ }]
146
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ComponentFactoryResolver }]; }, propDecorators: { container: [{
147
+ type: ViewChild,
148
+ args: ['container', { read: ViewContainerRef, static: true }]
149
+ }], group: [{
150
+ type: ViewChild,
151
+ args: ['group', { static: true }]
152
+ }], id: [{
153
+ type: Input
154
+ }] } });
@@ -2,13 +2,13 @@
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
- import * as tslib_1 from "tslib";
6
5
  import { NgModule } from '@angular/core';
7
6
  import { CommonModule } from '@angular/common';
8
7
  import { NotificationService } from './services/notification.service';
9
8
  import { NotificationComponent } from './notification.component';
10
9
  import { NotificationContainerComponent } from './notification.container.component';
11
10
  import { LocalizedMessagesDirective } from './localization/localized-messages.directive';
11
+ import * as i0 from "@angular/core";
12
12
  /**
13
13
  * Represents the [NgModule]({{ site.data.urls.angular['ngmoduleapi'] }})
14
14
  * definition for the Notification component.
@@ -39,18 +39,18 @@ import { LocalizedMessagesDirective } from './localization/localized-messages.di
39
39
  * platformBrowserDynamic().bootstrapModule(AppModule);
40
40
  * ```
41
41
  */
42
- var NotificationModule = /** @class */ (function () {
43
- function NotificationModule() {
44
- }
45
- NotificationModule = tslib_1.__decorate([
46
- NgModule({
47
- declarations: [NotificationComponent, NotificationContainerComponent, LocalizedMessagesDirective],
48
- entryComponents: [NotificationComponent, NotificationContainerComponent],
49
- imports: [CommonModule],
50
- exports: [NotificationComponent, NotificationContainerComponent],
51
- providers: [NotificationService]
52
- })
53
- ], NotificationModule);
54
- return NotificationModule;
55
- }());
56
- export { NotificationModule };
42
+ export class NotificationModule {
43
+ }
44
+ NotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
45
+ NotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationModule, declarations: [NotificationComponent, NotificationContainerComponent, LocalizedMessagesDirective], imports: [CommonModule], exports: [NotificationComponent, NotificationContainerComponent] });
46
+ NotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationModule, providers: [NotificationService], imports: [[CommonModule]] });
47
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationModule, decorators: [{
48
+ type: NgModule,
49
+ args: [{
50
+ declarations: [NotificationComponent, NotificationContainerComponent, LocalizedMessagesDirective],
51
+ entryComponents: [NotificationComponent, NotificationContainerComponent],
52
+ imports: [CommonModule],
53
+ exports: [NotificationComponent, NotificationContainerComponent],
54
+ providers: [NotificationService]
55
+ }]
56
+ }] });
@@ -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: 1646821059,
12
+ publishDate: 1648024886,
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
  };
@@ -2,9 +2,9 @@
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
- import * as tslib_1 from "tslib";
6
- import { Injectable, ComponentFactoryResolver, ApplicationRef, Injector, InjectionToken, ElementRef, Inject, Optional } from '@angular/core';
5
+ import { Injectable, ApplicationRef, InjectionToken, Inject, Optional } from '@angular/core';
7
6
  import { NotificationContainerComponent } from '../notification.container.component';
7
+ import * as i0 from "@angular/core";
8
8
  /**
9
9
  * Used to inject the Notification container. If not provided, the first root component of
10
10
  * the application is used.
@@ -52,7 +52,7 @@ export const NOTIFICATION_CONTAINER = new InjectionToken('Notification Container
52
52
  * @export
53
53
  * @class NotificationService
54
54
  */
55
- let NotificationService = class NotificationService {
55
+ export class NotificationService {
56
56
  /**
57
57
  * @hidden
58
58
  */
@@ -123,12 +123,14 @@ let NotificationService = class NotificationService {
123
123
  }
124
124
  return container;
125
125
  }
126
- };
127
- NotificationService = tslib_1.__decorate([
128
- Injectable(),
129
- tslib_1.__param(2, Inject(NOTIFICATION_CONTAINER)), tslib_1.__param(2, Optional()),
130
- tslib_1.__metadata("design:paramtypes", [ComponentFactoryResolver,
131
- Injector,
132
- ElementRef])
133
- ], NotificationService);
134
- export { NotificationService };
126
+ }
127
+ NotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationService, deps: [{ token: i0.ComponentFactoryResolver }, { token: i0.Injector }, { token: NOTIFICATION_CONTAINER, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
128
+ NotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationService });
129
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: NotificationService, decorators: [{
130
+ type: Injectable
131
+ }], ctorParameters: function () { return [{ type: i0.ComponentFactoryResolver }, { type: i0.Injector }, { type: i0.ElementRef, decorators: [{
132
+ type: Inject,
133
+ args: [NOTIFICATION_CONTAINER]
134
+ }, {
135
+ type: Optional
136
+ }] }]; } });
File without changes