ngx-snotifire 1.0.3-beta → 15.0.1

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 (29) hide show
  1. package/README.md +1 -0
  2. package/esm2020/lib/components/buttons/buttons-config.interface.mjs +1 -1
  3. package/esm2020/lib/components/buttons/buttons.component.mjs +5 -5
  4. package/esm2020/lib/components/ngx-notifire/ngx-snotifire.component.mjs +5 -5
  5. package/esm2020/lib/components/prompt/prompt.component.mjs +4 -4
  6. package/esm2020/lib/components/toast/notifire-toast.model.mjs +2 -2
  7. package/esm2020/lib/components/toast/toast.component.mjs +6 -6
  8. package/esm2020/lib/defaults/defaults.interface.mjs +1 -1
  9. package/esm2020/lib/defaults/global-config.interface.mjs +1 -1
  10. package/esm2020/lib/models/snotifire-notifications.interface.mjs +1 -1
  11. package/esm2020/lib/ngx-snotifire.module.mjs +7 -7
  12. package/esm2020/lib/pipes/keys.pipe.mjs +4 -4
  13. package/esm2020/lib/pipes/truncate.pipe.mjs +4 -4
  14. package/esm2020/lib/services/notification.service.mjs +24 -16
  15. package/fesm2015/ngx-snotifire.mjs +51 -43
  16. package/fesm2015/ngx-snotifire.mjs.map +1 -1
  17. package/fesm2020/ngx-snotifire.mjs +51 -43
  18. package/fesm2020/ngx-snotifire.mjs.map +1 -1
  19. package/lib/components/buttons/buttons-config.interface.d.ts +2 -2
  20. package/lib/components/buttons/buttons.component.d.ts +5 -5
  21. package/lib/components/ngx-notifire/ngx-snotifire.component.d.ts +8 -8
  22. package/lib/components/prompt/prompt.component.d.ts +3 -3
  23. package/lib/components/toast/notifire-toast.model.d.ts +2 -2
  24. package/lib/components/toast/toast.component.d.ts +5 -5
  25. package/lib/defaults/defaults.interface.d.ts +3 -3
  26. package/lib/defaults/global-config.interface.d.ts +1 -1
  27. package/lib/models/snotifire-notifications.interface.d.ts +10 -10
  28. package/lib/services/notification.service.d.ts +47 -41
  29. package/package.json +3 -3
@@ -178,7 +178,7 @@ function TransformArgument(target, propertyKey, descriptor) {
178
178
  /**
179
179
  * Toast main model
180
180
  */
181
- class NotifireModel {
181
+ class SnotifireToastModel {
182
182
  constructor(id, title, body, config) {
183
183
  this.id = id;
184
184
  this.title = title;
@@ -274,7 +274,7 @@ function isObject(item) {
274
274
  return item && typeof item === 'object' && !Array.isArray(item);
275
275
  }
276
276
 
277
- class SnotificationService {
277
+ class SnotifireService {
278
278
  constructor(defaultConfig) {
279
279
  this.defaultConfig = defaultConfig;
280
280
  /**
@@ -297,12 +297,12 @@ class SnotificationService {
297
297
  create(notif) {
298
298
  if (this.defaultConfig.type && notif.config && notif.config.type) {
299
299
  const config = mergeDeep(this.defaultConfig.snotifireConfig, this.defaultConfig.type[notif.config.type], notif.config);
300
- const toast = new NotifireModel(uuid(), notif.title ? notif.title : '', notif.body ? notif.body : '', config);
300
+ const toast = new SnotifireToastModel(uuid(), notif.title ? notif.title : '', notif.body ? notif.body : '', config);
301
301
  this.add(toast);
302
302
  return toast;
303
303
  }
304
304
  const config = mergeDeep(this.defaultConfig.snotifireConfig, notif.config);
305
- const defaulToast = new NotifireModel(uuid(), notif.title ? notif.title : '', notif.body ? notif.body : '', config);
305
+ const defaulToast = new SnotifireToastModel(uuid(), notif.title ? notif.title : '', notif.body ? notif.body : '', config);
306
306
  this.add(defaulToast);
307
307
  return defaulToast;
308
308
  }
@@ -473,9 +473,17 @@ class SnotificationService {
473
473
  this.emit();
474
474
  this.toastChanged.next(toast);
475
475
  }
476
+ /**
477
+ * returns SnotifyToast object
478
+ * @param id Number
479
+ * @return SnotifyToast|undefined
480
+ */
481
+ get(id) {
482
+ return (this.notifications && this.notifications.find((toast) => toast.id === id));
483
+ }
476
484
  }
477
- SnotificationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SnotificationService, deps: [{ token: 'NotifireConfig' }], target: i0.ɵɵFactoryTarget.Injectable });
478
- SnotificationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SnotificationService });
485
+ SnotifireService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SnotifireService, deps: [{ token: 'snotifireConfig' }], target: i0.ɵɵFactoryTarget.Injectable });
486
+ SnotifireService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SnotifireService });
479
487
  __decorate([
480
488
  TransformArgument
481
489
  /**
@@ -483,7 +491,7 @@ __decorate([
483
491
  */
484
492
  ,
485
493
  SetToastType
486
- ], SnotificationService.prototype, "success", null);
494
+ ], SnotifireService.prototype, "success", null);
487
495
  __decorate([
488
496
  TransformArgument
489
497
  /**
@@ -491,7 +499,7 @@ __decorate([
491
499
  */
492
500
  ,
493
501
  SetToastType
494
- ], SnotificationService.prototype, "error", null);
502
+ ], SnotifireService.prototype, "error", null);
495
503
  __decorate([
496
504
  TransformArgument
497
505
  /**
@@ -499,7 +507,7 @@ __decorate([
499
507
  */
500
508
  ,
501
509
  SetToastType
502
- ], SnotificationService.prototype, "info", null);
510
+ ], SnotifireService.prototype, "info", null);
503
511
  __decorate([
504
512
  TransformArgument
505
513
  /**
@@ -507,7 +515,7 @@ __decorate([
507
515
  */
508
516
  ,
509
517
  SetToastType
510
- ], SnotificationService.prototype, "warning", null);
518
+ ], SnotifireService.prototype, "warning", null);
511
519
  __decorate([
512
520
  TransformArgument
513
521
  /**
@@ -515,7 +523,7 @@ __decorate([
515
523
  */
516
524
  ,
517
525
  SetToastType
518
- ], SnotificationService.prototype, "confirm", null);
526
+ ], SnotifireService.prototype, "confirm", null);
519
527
  __decorate([
520
528
  TransformArgument
521
529
  /**
@@ -523,7 +531,7 @@ __decorate([
523
531
  */
524
532
  ,
525
533
  SetToastType
526
- ], SnotificationService.prototype, "prompt", null);
534
+ ], SnotifireService.prototype, "prompt", null);
527
535
  __decorate([
528
536
  TransformArgument
529
537
  /**
@@ -531,12 +539,12 @@ __decorate([
531
539
  */
532
540
  ,
533
541
  SetToastType
534
- ], SnotificationService.prototype, "async", null);
535
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: SnotificationService, decorators: [{
542
+ ], SnotifireService.prototype, "async", null);
543
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SnotifireService, decorators: [{
536
544
  type: Injectable
537
545
  }], ctorParameters: function () { return [{ type: undefined, decorators: [{
538
546
  type: Inject,
539
- args: ['NotifireConfig']
547
+ args: ['snotifireConfig']
540
548
  }] }]; }, propDecorators: { success: [], error: [], info: [], warning: [], confirm: [], prompt: [], async: [] } });
541
549
 
542
550
  /**
@@ -553,12 +561,12 @@ class ButtonsComponent {
553
561
  this.service.remove(this.toast.id);
554
562
  }
555
563
  }
556
- ButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: ButtonsComponent, deps: [{ token: SnotificationService }], target: i0.ɵɵFactoryTarget.Component });
557
- ButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: ButtonsComponent, selector: "notifire-button", inputs: { toast: "toast" }, ngImport: i0, template: "<div class=\"notifire-toast__buttons\">\n <ng-container *ngIf=\"toast.config\">\n <button\n type=\"button\"\n *ngFor=\"let button of toast.config.buttons\"\n [ngClass]=\"{ 'notifire-toast__buttons--bold': button.bold }\"\n (click)=\"button.action ? button.action(toast) : remove()\"\n >\n {{ button.text }}\n </button>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
558
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: ButtonsComponent, decorators: [{
564
+ ButtonsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonsComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component });
565
+ ButtonsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ButtonsComponent, selector: "notifire-button", inputs: { toast: "toast" }, ngImport: i0, template: "<div class=\"notifire-toast__buttons\">\n <ng-container *ngIf=\"toast.config\">\n <button\n type=\"button\"\n *ngFor=\"let button of toast.config.buttons\"\n [ngClass]=\"{ 'notifire-toast__buttons--bold': button.bold }\"\n (click)=\"button.action ? button.action(toast) : remove()\"\n >\n {{ button.text }}\n </button>\n </ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
566
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonsComponent, decorators: [{
559
567
  type: Component,
560
568
  args: [{ selector: 'notifire-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<div class=\"notifire-toast__buttons\">\n <ng-container *ngIf=\"toast.config\">\n <button\n type=\"button\"\n *ngFor=\"let button of toast.config.buttons\"\n [ngClass]=\"{ 'notifire-toast__buttons--bold': button.bold }\"\n (click)=\"button.action ? button.action(toast) : remove()\"\n >\n {{ button.text }}\n </button>\n </ng-container>\n</div>\n" }]
561
- }], ctorParameters: function () { return [{ type: SnotificationService }]; }, propDecorators: { toast: [{
569
+ }], ctorParameters: function () { return [{ type: SnotifireService }]; }, propDecorators: { toast: [{
562
570
  type: Input
563
571
  }] } });
564
572
 
@@ -578,9 +586,9 @@ class TruncatePipe {
578
586
  : value;
579
587
  }
580
588
  }
581
- TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
582
- TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: TruncatePipe, name: "truncate" });
583
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: TruncatePipe, decorators: [{
589
+ TruncatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
590
+ TruncatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: TruncatePipe, name: "truncate" });
591
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TruncatePipe, decorators: [{
584
592
  type: Pipe,
585
593
  args: [{
586
594
  name: 'truncate',
@@ -599,9 +607,9 @@ class PromptComponent {
599
607
  return $event.target.value;
600
608
  }
601
609
  }
602
- PromptComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
603
- PromptComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: PromptComponent, selector: "ngx-snotify-prompt", inputs: { toast: "toast" }, ngImport: i0, template: "<span\n class=\"notifire-toast__input\"\n [ngClass]=\"{ 'notifire-toast__input--filled': isPromptFocused }\"\n>\n <input\n (input)=\"toast.value = getValue($event); toast.eventEmitter.next(inputType)\"\n autofocus\n class=\"notifire-toast__input__field\"\n type=\"text\"\n [id]=\"toast.id\"\n (focus)=\"isPromptFocused = true\"\n (blur)=\"isPromptFocused = !!toast.value && !!toast.value.length\"\n >\n <label\n class=\"notifire-toast__input__label\"\n [for]=\"toast.id\"\n >\n <span\n class=\"notifire-toast__input__labelContent\"\n *ngIf=\"toast.config && toast.config.placeholder \"\n >\n {{ toast.config.placeholder | truncate }}\n </span>\n </label>\n</span>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
604
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: PromptComponent, decorators: [{
610
+ PromptComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
611
+ PromptComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: PromptComponent, selector: "ngx-snotify-prompt", inputs: { toast: "toast" }, ngImport: i0, template: "<span\n class=\"notifire-toast__input\"\n [ngClass]=\"{ 'notifire-toast__input--filled': isPromptFocused }\"\n>\n <input\n (input)=\"toast.value = getValue($event); toast.eventEmitter.next(inputType)\"\n autofocus\n class=\"notifire-toast__input__field\"\n type=\"text\"\n [id]=\"toast.id\"\n (focus)=\"isPromptFocused = true\"\n (blur)=\"isPromptFocused = !!toast.value && !!toast.value.length\"\n >\n <label\n class=\"notifire-toast__input__label\"\n [for]=\"toast.id\"\n >\n <span\n class=\"notifire-toast__input__labelContent\"\n *ngIf=\"toast.config && toast.config.placeholder \"\n >\n {{ toast.config.placeholder | truncate }}\n </span>\n </label>\n</span>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
612
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PromptComponent, decorators: [{
605
613
  type: Component,
606
614
  args: [{ selector: 'ngx-snotify-prompt', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, template: "<span\n class=\"notifire-toast__input\"\n [ngClass]=\"{ 'notifire-toast__input--filled': isPromptFocused }\"\n>\n <input\n (input)=\"toast.value = getValue($event); toast.eventEmitter.next(inputType)\"\n autofocus\n class=\"notifire-toast__input__field\"\n type=\"text\"\n [id]=\"toast.id\"\n (focus)=\"isPromptFocused = true\"\n (blur)=\"isPromptFocused = !!toast.value && !!toast.value.length\"\n >\n <label\n class=\"notifire-toast__input__label\"\n [for]=\"toast.id\"\n >\n <span\n class=\"notifire-toast__input__labelContent\"\n *ngIf=\"toast.config && toast.config.placeholder \"\n >\n {{ toast.config.placeholder | truncate }}\n </span>\n </label>\n</span>\n" }]
607
615
  }], propDecorators: { toast: [{
@@ -774,12 +782,12 @@ class ToastComponent {
774
782
  this.unsubscribe$.complete();
775
783
  }
776
784
  }
777
- ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: ToastComponent, deps: [{ token: SnotificationService }], target: i0.ɵɵFactoryTarget.Component });
778
- ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: ToastComponent, selector: "ngx-toast", inputs: { toast: "toast" }, outputs: { stateChanged: "stateChanged" }, ngImport: i0, template: "<ng-container *ngIf=\"toast && toast.config\">\n <div\n [attr.role]=\"toast.config.type === state.promptType ? 'dialog' : 'alert'\"\n [attr.aria-labelledby]=\"'snotify_' + toast.id\"\n [attr.aria-modal]=\"toast.config.type === state.promptType\"\n [ngClass]=\"[\n 'notifire-toast animated',\n 'snotify-' + toast.config.type,\n state.animation, toast.valid === undefined ? '' : toast.valid ? 'snotifyToast--valid' : 'snotifyToast--invalid'\n]\"\n [ngStyle]=\"{\n '-webkit-transition': toast.config.animation && toast.config.animation.time + 'ms',\n transition: toast.config.animation && toast.config.animation.time + 'ms',\n '-webkit-animation-duration': toast.config.animation && toast.config.animation.time + 'ms',\n 'animation-duration': toast.config.animation && toast.config.animation.time + 'ms'\n}\"\n (animationend)=\"onExitTransitionEnd()\"\n (click)=\"onClick()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n >\n <div\n class=\"notifire-toast__progressBar\"\n *ngIf=\"toast.config.showProgressBar\"\n >\n <span\n class=\"notifire-toast__progressBar__percentage\"\n [ngStyle]=\"{ width: state.progress * 100 + '%' }\"\n ></span>\n </div>\n <div\n class=\"notifire-toast__inner\"\n *ngIf=\"!toast.config.html; else toastHTML\"\n >\n <div\n class=\"notifire-toast__title\"\n [attr.id]=\"'snotify_' + toast.id\"\n *ngIf=\"toast.title\"\n >\n {{ toast.title | truncate: toast.config.titleMaxLength }}\n </div>\n <div\n class=\"notifire-toast__body\"\n *ngIf=\"toast.body\"\n >\n {{ toast.body | truncate: toast.config.bodyMaxLength }}\n </div>\n <ngx-snotify-prompt\n *ngIf=\"toast.config.type === state.promptType\"\n [toast]=\"toast\"\n >\n </ngx-snotify-prompt>\n <div\n *ngIf=\"!toast.config.icon; else elseBlock\"\n [ngClass]=\"['snotify-icon', toast.config.iconClass || 'snotify-icon--' + toast.config.type]\"\n ></div>\n <ng-template #elseBlock>\n <img\n class=\"snotify-icon\"\n [src]=\"toast.config.icon\"\n >\n </ng-template>\n </div>\n <ng-template #toastHTML>\n <div\n class=\"notifire-toast__inner\"\n [innerHTML]=\"toast.config.html\"\n ></div>\n </ng-template>\n <notifire-button\n *ngIf=\"toast.config.buttons\"\n [toast]=\"toast\"\n ></notifire-button>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PromptComponent, selector: "ngx-snotify-prompt", inputs: ["toast"] }, { kind: "component", type: ButtonsComponent, selector: "notifire-button", inputs: ["toast"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], encapsulation: i0.ViewEncapsulation.None });
779
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: ToastComponent, decorators: [{
785
+ ToastComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ToastComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component });
786
+ ToastComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ToastComponent, selector: "ngx-toast", inputs: { toast: "toast" }, outputs: { stateChanged: "stateChanged" }, ngImport: i0, template: "<ng-container *ngIf=\"toast && toast.config\">\n <div\n [attr.role]=\"toast.config.type === state.promptType ? 'dialog' : 'alert'\"\n [attr.aria-labelledby]=\"'snotify_' + toast.id\"\n [attr.aria-modal]=\"toast.config.type === state.promptType\"\n [ngClass]=\"[\n 'notifire-toast animated',\n 'snotify-' + toast.config.type,\n state.animation, toast.valid === undefined ? '' : toast.valid ? 'snotifyToast--valid' : 'snotifyToast--invalid'\n]\"\n [ngStyle]=\"{\n '-webkit-transition': toast.config.animation && toast.config.animation.time + 'ms',\n transition: toast.config.animation && toast.config.animation.time + 'ms',\n '-webkit-animation-duration': toast.config.animation && toast.config.animation.time + 'ms',\n 'animation-duration': toast.config.animation && toast.config.animation.time + 'ms'\n}\"\n (animationend)=\"onExitTransitionEnd()\"\n (click)=\"onClick()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n >\n <div\n class=\"notifire-toast__progressBar\"\n *ngIf=\"toast.config.showProgressBar\"\n >\n <span\n class=\"notifire-toast__progressBar__percentage\"\n [ngStyle]=\"{ width: state.progress * 100 + '%' }\"\n ></span>\n </div>\n <div\n class=\"notifire-toast__inner\"\n *ngIf=\"!toast.config.html; else toastHTML\"\n >\n <div\n class=\"notifire-toast__title\"\n [attr.id]=\"'snotify_' + toast.id\"\n *ngIf=\"toast.title\"\n >\n {{ toast.title | truncate: toast.config.titleMaxLength }}\n </div>\n <div\n class=\"notifire-toast__body\"\n *ngIf=\"toast.body\"\n >\n {{ toast.body | truncate: toast.config.bodyMaxLength }}\n </div>\n <ngx-snotify-prompt\n *ngIf=\"toast.config.type === state.promptType\"\n [toast]=\"toast\"\n >\n </ngx-snotify-prompt>\n <div\n *ngIf=\"!toast.config.icon; else elseBlock\"\n [ngClass]=\"['snotifire-icon', toast.config.iconClass || 'snotifire-icon--' + toast.config.type]\"\n ></div>\n <ng-template #elseBlock>\n <img\n class=\"snotifire-icon\"\n [src]=\"toast.config.icon\"\n >\n </ng-template>\n </div>\n <ng-template #toastHTML>\n <div\n class=\"notifire-toast__inner\"\n [innerHTML]=\"toast.config.html\"\n ></div>\n </ng-template>\n <notifire-button\n *ngIf=\"toast.config.buttons\"\n [toast]=\"toast\"\n ></notifire-button>\n </div>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: PromptComponent, selector: "ngx-snotify-prompt", inputs: ["toast"] }, { kind: "component", type: ButtonsComponent, selector: "notifire-button", inputs: ["toast"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], encapsulation: i0.ViewEncapsulation.None });
787
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ToastComponent, decorators: [{
780
788
  type: Component,
781
- args: [{ selector: 'ngx-toast', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"toast && toast.config\">\n <div\n [attr.role]=\"toast.config.type === state.promptType ? 'dialog' : 'alert'\"\n [attr.aria-labelledby]=\"'snotify_' + toast.id\"\n [attr.aria-modal]=\"toast.config.type === state.promptType\"\n [ngClass]=\"[\n 'notifire-toast animated',\n 'snotify-' + toast.config.type,\n state.animation, toast.valid === undefined ? '' : toast.valid ? 'snotifyToast--valid' : 'snotifyToast--invalid'\n]\"\n [ngStyle]=\"{\n '-webkit-transition': toast.config.animation && toast.config.animation.time + 'ms',\n transition: toast.config.animation && toast.config.animation.time + 'ms',\n '-webkit-animation-duration': toast.config.animation && toast.config.animation.time + 'ms',\n 'animation-duration': toast.config.animation && toast.config.animation.time + 'ms'\n}\"\n (animationend)=\"onExitTransitionEnd()\"\n (click)=\"onClick()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n >\n <div\n class=\"notifire-toast__progressBar\"\n *ngIf=\"toast.config.showProgressBar\"\n >\n <span\n class=\"notifire-toast__progressBar__percentage\"\n [ngStyle]=\"{ width: state.progress * 100 + '%' }\"\n ></span>\n </div>\n <div\n class=\"notifire-toast__inner\"\n *ngIf=\"!toast.config.html; else toastHTML\"\n >\n <div\n class=\"notifire-toast__title\"\n [attr.id]=\"'snotify_' + toast.id\"\n *ngIf=\"toast.title\"\n >\n {{ toast.title | truncate: toast.config.titleMaxLength }}\n </div>\n <div\n class=\"notifire-toast__body\"\n *ngIf=\"toast.body\"\n >\n {{ toast.body | truncate: toast.config.bodyMaxLength }}\n </div>\n <ngx-snotify-prompt\n *ngIf=\"toast.config.type === state.promptType\"\n [toast]=\"toast\"\n >\n </ngx-snotify-prompt>\n <div\n *ngIf=\"!toast.config.icon; else elseBlock\"\n [ngClass]=\"['snotify-icon', toast.config.iconClass || 'snotify-icon--' + toast.config.type]\"\n ></div>\n <ng-template #elseBlock>\n <img\n class=\"snotify-icon\"\n [src]=\"toast.config.icon\"\n >\n </ng-template>\n </div>\n <ng-template #toastHTML>\n <div\n class=\"notifire-toast__inner\"\n [innerHTML]=\"toast.config.html\"\n ></div>\n </ng-template>\n <notifire-button\n *ngIf=\"toast.config.buttons\"\n [toast]=\"toast\"\n ></notifire-button>\n </div>\n</ng-container>\n" }]
782
- }], ctorParameters: function () { return [{ type: SnotificationService }]; }, propDecorators: { toast: [{
789
+ args: [{ selector: 'ngx-toast', encapsulation: ViewEncapsulation.None, template: "<ng-container *ngIf=\"toast && toast.config\">\n <div\n [attr.role]=\"toast.config.type === state.promptType ? 'dialog' : 'alert'\"\n [attr.aria-labelledby]=\"'snotify_' + toast.id\"\n [attr.aria-modal]=\"toast.config.type === state.promptType\"\n [ngClass]=\"[\n 'notifire-toast animated',\n 'snotify-' + toast.config.type,\n state.animation, toast.valid === undefined ? '' : toast.valid ? 'snotifyToast--valid' : 'snotifyToast--invalid'\n]\"\n [ngStyle]=\"{\n '-webkit-transition': toast.config.animation && toast.config.animation.time + 'ms',\n transition: toast.config.animation && toast.config.animation.time + 'ms',\n '-webkit-animation-duration': toast.config.animation && toast.config.animation.time + 'ms',\n 'animation-duration': toast.config.animation && toast.config.animation.time + 'ms'\n}\"\n (animationend)=\"onExitTransitionEnd()\"\n (click)=\"onClick()\"\n (mouseenter)=\"onMouseEnter()\"\n (mouseleave)=\"onMouseLeave()\"\n >\n <div\n class=\"notifire-toast__progressBar\"\n *ngIf=\"toast.config.showProgressBar\"\n >\n <span\n class=\"notifire-toast__progressBar__percentage\"\n [ngStyle]=\"{ width: state.progress * 100 + '%' }\"\n ></span>\n </div>\n <div\n class=\"notifire-toast__inner\"\n *ngIf=\"!toast.config.html; else toastHTML\"\n >\n <div\n class=\"notifire-toast__title\"\n [attr.id]=\"'snotify_' + toast.id\"\n *ngIf=\"toast.title\"\n >\n {{ toast.title | truncate: toast.config.titleMaxLength }}\n </div>\n <div\n class=\"notifire-toast__body\"\n *ngIf=\"toast.body\"\n >\n {{ toast.body | truncate: toast.config.bodyMaxLength }}\n </div>\n <ngx-snotify-prompt\n *ngIf=\"toast.config.type === state.promptType\"\n [toast]=\"toast\"\n >\n </ngx-snotify-prompt>\n <div\n *ngIf=\"!toast.config.icon; else elseBlock\"\n [ngClass]=\"['snotifire-icon', toast.config.iconClass || 'snotifire-icon--' + toast.config.type]\"\n ></div>\n <ng-template #elseBlock>\n <img\n class=\"snotifire-icon\"\n [src]=\"toast.config.icon\"\n >\n </ng-template>\n </div>\n <ng-template #toastHTML>\n <div\n class=\"notifire-toast__inner\"\n [innerHTML]=\"toast.config.html\"\n ></div>\n </ng-template>\n <notifire-button\n *ngIf=\"toast.config.buttons\"\n [toast]=\"toast\"\n ></notifire-button>\n </div>\n</ng-container>\n" }]
790
+ }], ctorParameters: function () { return [{ type: SnotifireService }]; }, propDecorators: { toast: [{
783
791
  type: Input
784
792
  }], stateChanged: [{
785
793
  type: Output
@@ -796,9 +804,9 @@ class KeysPipe {
796
804
  return Object.keys(value);
797
805
  }
798
806
  }
799
- KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
800
- KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: KeysPipe, name: "keys", pure: false });
801
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: KeysPipe, decorators: [{
807
+ KeysPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
808
+ KeysPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: KeysPipe, name: "keys", pure: false });
809
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: KeysPipe, decorators: [{
802
810
  type: Pipe,
803
811
  args: [{
804
812
  name: 'keys',
@@ -921,30 +929,30 @@ class NgxSnotifireComponent {
921
929
  this.unsubscribe$.complete();
922
930
  }
923
931
  }
924
- NgxSnotifireComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireComponent, deps: [{ token: SnotificationService }], target: i0.ɵɵFactoryTarget.Component });
925
- NgxSnotifireComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.10", type: NgxSnotifireComponent, selector: "ngx-snotifire", ngImport: i0, template: "<div\n class=\"snotifire-backdrop\"\n *ngIf=\"backdrop && backdrop >= 0\"\n [style.opacity]=\"backdrop\"\n></div>\n\n<div\n *ngFor=\"let position of notifications | keys\"\n class=\"snotify snotify-{{ position }}\"\n>\n <ngx-toast\n *ngFor=\"let notification of getNotificationArray(notifications, position) | slice: blockSizeA:blockSizeB\"\n [toast]=\"notification\"\n (stateChanged)=\"stateChanged($event)\"\n >\n </ngx-toast>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToastComponent, selector: "ngx-toast", inputs: ["toast"], outputs: ["stateChanged"] }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }, { kind: "pipe", type: KeysPipe, name: "keys" }], encapsulation: i0.ViewEncapsulation.None });
926
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireComponent, decorators: [{
932
+ NgxSnotifireComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component });
933
+ NgxSnotifireComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: NgxSnotifireComponent, selector: "ngx-snotifire", ngImport: i0, template: "<div\n class=\"snotifire-backdrop\"\n *ngIf=\"backdrop && backdrop >= 0\"\n [style.opacity]=\"backdrop\"\n></div>\n\n<div\n *ngFor=\"let position of notifications | keys\"\n class=\"snotify snotify-{{ position }}\"\n>\n <ngx-toast\n *ngFor=\"let notification of getNotificationArray(notifications, position) | slice: blockSizeA:blockSizeB\"\n [toast]=\"notification\"\n (stateChanged)=\"stateChanged($event)\"\n >\n </ngx-toast>\n\n</div>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ToastComponent, selector: "ngx-toast", inputs: ["toast"], outputs: ["stateChanged"] }, { kind: "pipe", type: i2.SlicePipe, name: "slice" }, { kind: "pipe", type: KeysPipe, name: "keys" }], encapsulation: i0.ViewEncapsulation.None });
934
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireComponent, decorators: [{
927
935
  type: Component,
928
936
  args: [{ selector: 'ngx-snotifire', encapsulation: ViewEncapsulation.None, template: "<div\n class=\"snotifire-backdrop\"\n *ngIf=\"backdrop && backdrop >= 0\"\n [style.opacity]=\"backdrop\"\n></div>\n\n<div\n *ngFor=\"let position of notifications | keys\"\n class=\"snotify snotify-{{ position }}\"\n>\n <ngx-toast\n *ngFor=\"let notification of getNotificationArray(notifications, position) | slice: blockSizeA:blockSizeB\"\n [toast]=\"notification\"\n (stateChanged)=\"stateChanged($event)\"\n >\n </ngx-toast>\n\n</div>\n" }]
929
- }], ctorParameters: function () { return [{ type: SnotificationService }]; } });
937
+ }], ctorParameters: function () { return [{ type: SnotifireService }]; } });
930
938
 
931
939
  class NgxSnotifireModule {
932
940
  static forRoot() {
933
941
  return {
934
942
  ngModule: NgxSnotifireModule,
935
- providers: [SnotificationService],
943
+ providers: [SnotifireService],
936
944
  };
937
945
  }
938
946
  }
939
- NgxSnotifireModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
940
- NgxSnotifireModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireModule, declarations: [PromptComponent,
947
+ NgxSnotifireModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
948
+ NgxSnotifireModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireModule, declarations: [PromptComponent,
941
949
  ToastComponent,
942
950
  ButtonsComponent,
943
951
  TruncatePipe,
944
952
  KeysPipe,
945
953
  NgxSnotifireComponent], imports: [CommonModule], exports: [NgxSnotifireComponent] });
946
- NgxSnotifireModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireModule, imports: [CommonModule] });
947
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NgxSnotifireModule, decorators: [{
954
+ NgxSnotifireModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireModule, imports: [CommonModule] });
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: NgxSnotifireModule, decorators: [{
948
956
  type: NgModule,
949
957
  args: [{
950
958
  declarations: [
@@ -1035,5 +1043,5 @@ const ToastDefaults = {
1035
1043
  * Generated bundle index. Do not edit.
1036
1044
  */
1037
1045
 
1038
- export { ButtonsComponent, KeysPipe, NgxSnotifireComponent, NgxSnotifireModule, NotifireModel, PromptComponent, SnotificationPositionType, SnotificationService, SnotifireEventType, SnotifireModel, SnotifireType, ToastComponent, ToastDefaults, TruncatePipe };
1046
+ export { ButtonsComponent, KeysPipe, NgxSnotifireComponent, NgxSnotifireModule, PromptComponent, SnotificationPositionType, SnotifireEventType, SnotifireModel, SnotifireService, SnotifireToastModel, SnotifireType, ToastComponent, ToastDefaults, TruncatePipe };
1039
1047
  //# sourceMappingURL=ngx-snotifire.mjs.map