ngx-snotifire 18.0.0 → 19.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/ngx-snotifire.mjs +32 -30
- package/fesm2022/ngx-snotifire.mjs.map +1 -1
- package/lib/models/snotifire.model.d.ts +2 -2
- package/package.json +6 -5
- package/esm2022/lib/components/buttons/buttons-config.interface.mjs +0 -2
- package/esm2022/lib/components/buttons/buttons.component.mjs +0 -27
- package/esm2022/lib/components/index.mjs +0 -6
- package/esm2022/lib/components/ngx-notifire/ngx-snotifire.component.mjs +0 -129
- package/esm2022/lib/components/prompt/prompt.component.mjs +0 -26
- package/esm2022/lib/components/toast/notifire-toast.model.mjs +0 -61
- package/esm2022/lib/components/toast/toast.component.mjs +0 -185
- package/esm2022/lib/decorators/set-toast-type.decorator.mjs +0 -19
- package/esm2022/lib/decorators/transform-argument.decorator.mjs +0 -88
- package/esm2022/lib/defaults/defaults.interface.mjs +0 -2
- package/esm2022/lib/defaults/global-config.interface.mjs +0 -2
- package/esm2022/lib/defaults/index.mjs +0 -4
- package/esm2022/lib/defaults/toast-defaults.mjs +0 -68
- package/esm2022/lib/models/index.mjs +0 -7
- package/esm2022/lib/models/snotifire-animate.interface.mjs +0 -2
- package/esm2022/lib/models/snotifire-config.interface.mjs +0 -2
- package/esm2022/lib/models/snotifire-event.type.mjs +0 -14
- package/esm2022/lib/models/snotifire-notifications.interface.mjs +0 -2
- package/esm2022/lib/models/snotifire-position.type.mjs +0 -13
- package/esm2022/lib/models/snotifire.model.mjs +0 -26
- package/esm2022/lib/models/snotifire.type.mjs +0 -11
- package/esm2022/lib/ngx-snotifire.module.mjs +0 -38
- package/esm2022/lib/pipes/index.mjs +0 -3
- package/esm2022/lib/pipes/keys.pipe.mjs +0 -23
- package/esm2022/lib/pipes/truncate.pipe.mjs +0 -27
- package/esm2022/lib/services/index.mjs +0 -2
- package/esm2022/lib/services/notification.service.mjs +0 -298
- package/esm2022/lib/utils.mjs +0 -41
- package/esm2022/ngx-snotifire.mjs +0 -5
- package/esm2022/public-api.mjs +0 -10
|
@@ -1,7 +1,7 @@
|
|
|
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,
|
|
4
|
+
import { Inject, Injectable, Input, ViewEncapsulation, ChangeDetectionStrategy, Component, Pipe, EventEmitter, Output, NgModule } from '@angular/core';
|
|
5
5
|
import { __decorate } from 'tslib';
|
|
6
6
|
import { Subject, from, tap, catchError, throwError, finalize, takeUntil } from 'rxjs';
|
|
7
7
|
|
|
@@ -497,8 +497,8 @@ class SnotifireService {
|
|
|
497
497
|
get(id) {
|
|
498
498
|
return (this.notifications && this.notifications.find((toast) => toast.id === id));
|
|
499
499
|
}
|
|
500
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
501
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
500
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService, deps: [{ token: 'snotifireConfig' }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
501
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService }); }
|
|
502
502
|
}
|
|
503
503
|
__decorate([
|
|
504
504
|
TransformArgument
|
|
@@ -556,7 +556,7 @@ __decorate([
|
|
|
556
556
|
,
|
|
557
557
|
SetToastType
|
|
558
558
|
], SnotifireService.prototype, "async", null);
|
|
559
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: SnotifireService, decorators: [{
|
|
560
560
|
type: Injectable
|
|
561
561
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
562
562
|
type: Inject,
|
|
@@ -576,12 +576,12 @@ class ButtonsComponent {
|
|
|
576
576
|
remove() {
|
|
577
577
|
this.service.remove(this.toast.id);
|
|
578
578
|
}
|
|
579
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
580
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
579
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonsComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
580
|
+
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
581
|
}
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
582
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ButtonsComponent, decorators: [{
|
|
583
583
|
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" }]
|
|
584
|
+
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
585
|
}], ctorParameters: () => [{ type: SnotifireService }], propDecorators: { toast: [{
|
|
586
586
|
type: Input
|
|
587
587
|
}] } });
|
|
@@ -601,13 +601,14 @@ class TruncatePipe {
|
|
|
601
601
|
(args.length > 1 ? args[1] : this.DEFAULT_TRAIL)
|
|
602
602
|
: value;
|
|
603
603
|
}
|
|
604
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
605
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
604
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
605
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, isStandalone: false, name: "truncate" }); }
|
|
606
606
|
}
|
|
607
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
607
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TruncatePipe, decorators: [{
|
|
608
608
|
type: Pipe,
|
|
609
609
|
args: [{
|
|
610
610
|
name: 'truncate',
|
|
611
|
+
standalone: false
|
|
611
612
|
}]
|
|
612
613
|
}] });
|
|
613
614
|
|
|
@@ -622,12 +623,12 @@ class PromptComponent {
|
|
|
622
623
|
getValue($event) {
|
|
623
624
|
return $event.target.value;
|
|
624
625
|
}
|
|
625
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
626
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
626
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PromptComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
627
|
+
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
628
|
}
|
|
628
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
629
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: PromptComponent, decorators: [{
|
|
629
630
|
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" }]
|
|
631
|
+
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
632
|
}], propDecorators: { toast: [{
|
|
632
633
|
type: Input
|
|
633
634
|
}] } });
|
|
@@ -796,12 +797,12 @@ class ToastComponent {
|
|
|
796
797
|
this.unsubscribe$.next();
|
|
797
798
|
this.unsubscribe$.complete();
|
|
798
799
|
}
|
|
799
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
800
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
800
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
801
|
+
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
802
|
}
|
|
802
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
803
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ToastComponent, decorators: [{
|
|
803
804
|
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" }]
|
|
805
|
+
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
806
|
}], ctorParameters: () => [{ type: SnotifireService }], propDecorators: { toast: [{
|
|
806
807
|
type: Input
|
|
807
808
|
}], stateChanged: [{
|
|
@@ -818,14 +819,15 @@ class KeysPipe {
|
|
|
818
819
|
}
|
|
819
820
|
return Object.keys(value);
|
|
820
821
|
}
|
|
821
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
822
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "
|
|
822
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
823
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, isStandalone: false, name: "keys", pure: false }); }
|
|
823
824
|
}
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
825
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: KeysPipe, decorators: [{
|
|
825
826
|
type: Pipe,
|
|
826
827
|
args: [{
|
|
827
828
|
name: 'keys',
|
|
828
829
|
pure: false,
|
|
830
|
+
standalone: false
|
|
829
831
|
}]
|
|
830
832
|
}] });
|
|
831
833
|
|
|
@@ -942,12 +944,12 @@ class NgxSnotifireComponent {
|
|
|
942
944
|
this.unsubscribe$.next();
|
|
943
945
|
this.unsubscribe$.complete();
|
|
944
946
|
}
|
|
945
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
946
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
947
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireComponent, deps: [{ token: SnotifireService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
948
|
+
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
949
|
}
|
|
948
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
950
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireComponent, decorators: [{
|
|
949
951
|
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" }]
|
|
952
|
+
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
953
|
}], ctorParameters: () => [{ type: SnotifireService }] });
|
|
952
954
|
|
|
953
955
|
class NgxSnotifireModule {
|
|
@@ -957,16 +959,16 @@ class NgxSnotifireModule {
|
|
|
957
959
|
providers: [SnotifireService],
|
|
958
960
|
};
|
|
959
961
|
}
|
|
960
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
961
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
962
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
963
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, declarations: [PromptComponent,
|
|
962
964
|
ToastComponent,
|
|
963
965
|
ButtonsComponent,
|
|
964
966
|
TruncatePipe,
|
|
965
967
|
KeysPipe,
|
|
966
968
|
NgxSnotifireComponent], imports: [CommonModule], exports: [NgxSnotifireComponent] }); }
|
|
967
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
969
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, imports: [CommonModule] }); }
|
|
968
970
|
}
|
|
969
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
971
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: NgxSnotifireModule, decorators: [{
|
|
970
972
|
type: NgModule,
|
|
971
973
|
args: [{
|
|
972
974
|
declarations: [
|