ngx-snotifire 18.0.0 → 19.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 (35) hide show
  1. package/fesm2022/ngx-snotifire.mjs +46 -42
  2. package/fesm2022/ngx-snotifire.mjs.map +1 -1
  3. package/lib/models/snotifire.model.d.ts +2 -2
  4. package/lib/services/notification.service.d.ts +4 -4
  5. package/package.json +6 -5
  6. package/esm2022/lib/components/buttons/buttons-config.interface.mjs +0 -2
  7. package/esm2022/lib/components/buttons/buttons.component.mjs +0 -27
  8. package/esm2022/lib/components/index.mjs +0 -6
  9. package/esm2022/lib/components/ngx-notifire/ngx-snotifire.component.mjs +0 -129
  10. package/esm2022/lib/components/prompt/prompt.component.mjs +0 -26
  11. package/esm2022/lib/components/toast/notifire-toast.model.mjs +0 -61
  12. package/esm2022/lib/components/toast/toast.component.mjs +0 -185
  13. package/esm2022/lib/decorators/set-toast-type.decorator.mjs +0 -19
  14. package/esm2022/lib/decorators/transform-argument.decorator.mjs +0 -88
  15. package/esm2022/lib/defaults/defaults.interface.mjs +0 -2
  16. package/esm2022/lib/defaults/global-config.interface.mjs +0 -2
  17. package/esm2022/lib/defaults/index.mjs +0 -4
  18. package/esm2022/lib/defaults/toast-defaults.mjs +0 -68
  19. package/esm2022/lib/models/index.mjs +0 -7
  20. package/esm2022/lib/models/snotifire-animate.interface.mjs +0 -2
  21. package/esm2022/lib/models/snotifire-config.interface.mjs +0 -2
  22. package/esm2022/lib/models/snotifire-event.type.mjs +0 -14
  23. package/esm2022/lib/models/snotifire-notifications.interface.mjs +0 -2
  24. package/esm2022/lib/models/snotifire-position.type.mjs +0 -13
  25. package/esm2022/lib/models/snotifire.model.mjs +0 -26
  26. package/esm2022/lib/models/snotifire.type.mjs +0 -11
  27. package/esm2022/lib/ngx-snotifire.module.mjs +0 -38
  28. package/esm2022/lib/pipes/index.mjs +0 -3
  29. package/esm2022/lib/pipes/keys.pipe.mjs +0 -23
  30. package/esm2022/lib/pipes/truncate.pipe.mjs +0 -27
  31. package/esm2022/lib/services/index.mjs +0 -2
  32. package/esm2022/lib/services/notification.service.mjs +0 -298
  33. package/esm2022/lib/utils.mjs +0 -41
  34. package/esm2022/ngx-snotifire.mjs +0 -5
  35. package/esm2022/public-api.mjs +0 -10
@@ -1,9 +1,9 @@
1
1
  import * as i2 from '@angular/common';
2
2
  import { CommonModule } from '@angular/common';
3
3
  import * as i0 from '@angular/core';
4
- import { Injectable, Inject, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, Pipe, EventEmitter, Output, NgModule } from '@angular/core';
4
+ import { Inject, Injectable, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Pipe, EventEmitter, Output, NgModule } from '@angular/core';
5
5
  import { __decorate } from 'tslib';
6
- import { Subject, from, tap, catchError, throwError, finalize, takeUntil } from 'rxjs';
6
+ import { Subject, from, takeUntil } from 'rxjs';
7
7
 
8
8
  /**
9
9
  * Defines toast style depending on method name
@@ -438,19 +438,21 @@ class SnotifireService {
438
438
  }
439
439
  const toast = this.create(args);
440
440
  let failed = false;
441
- const asyncAtion = async.pipe(tap((next) => {
442
- console.log('called'), this.mergeToast(toast, next);
443
- }), catchError((error) => {
444
- failed = true;
445
- return throwError(() => error);
446
- }), finalize(() => {
441
+ async
442
+ .subscribe({
443
+ next: (next) => this.mergeToast(toast, next),
444
+ error: (error) => {
445
+ failed = true;
446
+ // As long as error is defined, and not an error object assume it is a new toast config
447
+ if (error && typeof error === 'object' && !(error instanceof Error)) {
448
+ this.mergeToast(toast, error);
449
+ }
450
+ },
451
+ })
452
+ .add(() => {
447
453
  this.mergeToast(toast, {}, failed === true ? SnotifireType.ERROR : SnotifireType.SUCCESS);
448
- }));
449
- toast.on(SnotifireEventType.MOUNTED, () => {
450
- console.log('mounted');
451
- return asyncAtion;
452
454
  });
453
- return asyncAtion;
455
+ return toast;
454
456
  // const toast = this.create(args);
455
457
  // toast.on(SnotifireEventType.MOUNTED, () => {
456
458
  // const subscription: Subscription = async.subscribe({
@@ -497,8 +499,8 @@ class SnotifireService {
497
499
  get(id) {
498
500
  return (this.notifications && this.notifications.find((toast) => toast.id === id));
499
501
  }
500
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SnotifireService, deps: [{ token: 'snotifireConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); }
501
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SnotifireService }); }
502
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService, deps: [{ token: 'snotifireConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); }
503
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService }); }
502
504
  }
503
505
  __decorate([
504
506
  TransformArgument
@@ -556,7 +558,7 @@ __decorate([
556
558
  ,
557
559
  SetToastType
558
560
  ], SnotifireService.prototype, "async", null);
559
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: SnotifireService, decorators: [{
561
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService, decorators: [{
560
562
  type: Injectable
561
563
  }], ctorParameters: () => [{ type: undefined, decorators: [{
562
564
  type: Inject,
@@ -576,12 +578,12 @@ class ButtonsComponent {
576
578
  remove() {
577
579
  this.service.remove(this.toast.id);
578
580
  }
579
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ButtonsComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
580
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", 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 }); }
581
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonsComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
582
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ButtonsComponent, isStandalone: false, 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 }); }
581
583
  }
582
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ButtonsComponent, decorators: [{
584
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonsComponent, decorators: [{
583
585
  type: Component,
584
- 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" }]
586
+ args: [{ selector: 'notifire-button', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, 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" }]
585
587
  }], ctorParameters: () => [{ type: SnotifireService }], propDecorators: { toast: [{
586
588
  type: Input
587
589
  }] } });
@@ -601,13 +603,14 @@ class TruncatePipe {
601
603
  (args.length > 1 ? args[1] : this.DEFAULT_TRAIL)
602
604
  : value;
603
605
  }
604
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
605
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: TruncatePipe, name: "truncate" }); }
606
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
607
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, isStandalone: false, name: "truncate" }); }
606
608
  }
607
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: TruncatePipe, decorators: [{
609
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, decorators: [{
608
610
  type: Pipe,
609
611
  args: [{
610
612
  name: 'truncate',
613
+ standalone: false
611
614
  }]
612
615
  }] });
613
616
 
@@ -622,12 +625,12 @@ class PromptComponent {
622
625
  getValue($event) {
623
626
  return $event.target.value;
624
627
  }
625
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
626
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", 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 }); }
628
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
629
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: PromptComponent, isStandalone: false, 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 }); }
627
630
  }
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: PromptComponent, decorators: [{
631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PromptComponent, decorators: [{
629
632
  type: Component,
630
- 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" }]
633
+ args: [{ selector: 'ngx-snotify-prompt', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, standalone: false, 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" }]
631
634
  }], propDecorators: { toast: [{
632
635
  type: Input
633
636
  }] } });
@@ -796,12 +799,12 @@ class ToastComponent {
796
799
  this.unsubscribe$.next();
797
800
  this.unsubscribe$.complete();
798
801
  }
799
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ToastComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
800
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", 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 }); }
802
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
803
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ToastComponent, isStandalone: false, 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 }); }
801
804
  }
802
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: ToastComponent, decorators: [{
805
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastComponent, decorators: [{
803
806
  type: Component,
804
- 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" }]
807
+ args: [{ selector: 'ngx-toast', encapsulation: ViewEncapsulation.None, standalone: false, 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" }]
805
808
  }], ctorParameters: () => [{ type: SnotifireService }], propDecorators: { toast: [{
806
809
  type: Input
807
810
  }], stateChanged: [{
@@ -818,14 +821,15 @@ class KeysPipe {
818
821
  }
819
822
  return Object.keys(value);
820
823
  }
821
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
822
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: KeysPipe, name: "keys", pure: false }); }
824
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
825
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, isStandalone: false, name: "keys", pure: false }); }
823
826
  }
824
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: KeysPipe, decorators: [{
827
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, decorators: [{
825
828
  type: Pipe,
826
829
  args: [{
827
830
  name: 'keys',
828
831
  pure: false,
832
+ standalone: false
829
833
  }]
830
834
  }] });
831
835
 
@@ -942,12 +946,12 @@ class NgxSnotifireComponent {
942
946
  this.unsubscribe$.next();
943
947
  this.unsubscribe$.complete();
944
948
  }
945
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
946
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.0", 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 }); }
949
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
950
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: NgxSnotifireComponent, isStandalone: false, 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 }); }
947
951
  }
948
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireComponent, decorators: [{
952
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireComponent, decorators: [{
949
953
  type: Component,
950
- 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" }]
954
+ args: [{ selector: 'ngx-snotifire', encapsulation: ViewEncapsulation.None, standalone: false, 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" }]
951
955
  }], ctorParameters: () => [{ type: SnotifireService }] });
952
956
 
953
957
  class NgxSnotifireModule {
@@ -957,16 +961,16 @@ class NgxSnotifireModule {
957
961
  providers: [SnotifireService],
958
962
  };
959
963
  }
960
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
961
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireModule, declarations: [PromptComponent,
964
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
965
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, declarations: [PromptComponent,
962
966
  ToastComponent,
963
967
  ButtonsComponent,
964
968
  TruncatePipe,
965
969
  KeysPipe,
966
970
  NgxSnotifireComponent], imports: [CommonModule], exports: [NgxSnotifireComponent] }); }
967
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireModule, imports: [CommonModule] }); }
971
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, imports: [CommonModule] }); }
968
972
  }
969
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.0", ngImport: i0, type: NgxSnotifireModule, decorators: [{
973
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, decorators: [{
970
974
  type: NgModule,
971
975
  args: [{
972
976
  declarations: [