ngx-toastr 16.1.0 → 16.2.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/esm2020/overlay/overlay-container.mjs +8 -11
- package/esm2020/overlay/overlay.mjs +12 -15
- package/esm2020/public_api.mjs +2 -1
- package/esm2020/toastr/toast-noanimation.component.mjs +19 -19
- package/esm2020/toastr/toast.component.mjs +21 -19
- package/esm2020/toastr/toast.directive.mjs +6 -17
- package/esm2020/toastr/toast.provider.mjs +40 -0
- package/esm2020/toastr/toastr.module.mjs +13 -28
- package/esm2020/toastr/toastr.service.mjs +3 -3
- package/fesm2015/ngx-toastr.mjs +124 -121
- package/fesm2015/ngx-toastr.mjs.map +1 -1
- package/fesm2020/ngx-toastr.mjs +124 -117
- package/fesm2020/ngx-toastr.mjs.map +1 -1
- package/overlay/overlay-container.d.ts +1 -2
- package/overlay/overlay.d.ts +0 -3
- package/package.json +2 -1
- package/public_api.d.ts +1 -0
- package/toastr/toast-noanimation.component.d.ts +2 -3
- package/toastr/toast.component.d.ts +1 -1
- package/toastr/toast.directive.d.ts +1 -6
- package/toastr/toast.provider.d.ts +24 -0
- package/toastr/toastr-config.d.ts +2 -2
- package/toastr/toastr.module.d.ts +2 -4
package/fesm2020/ngx-toastr.mjs
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { Directive,
|
2
|
+
import { Directive, InjectionToken, inject, Injectable, ComponentFactoryResolver, ApplicationRef, SecurityContext, Injector, Inject, Component, HostBinding, HostListener, makeEnvironmentProviders, NgModule } from '@angular/core';
|
3
3
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
4
|
+
import { DOCUMENT, NgIf } from '@angular/common';
|
4
5
|
import { Subject } from 'rxjs';
|
5
|
-
import * as i3 from '@angular/common';
|
6
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
7
6
|
import * as i2 from '@angular/platform-browser';
|
8
7
|
|
9
8
|
class ToastContainerDirective {
|
@@ -14,27 +13,16 @@ class ToastContainerDirective {
|
|
14
13
|
return this.el.nativeElement;
|
15
14
|
}
|
16
15
|
}
|
17
|
-
ToastContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
18
|
-
ToastContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
16
|
+
ToastContainerDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastContainerDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
17
|
+
ToastContainerDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.7", type: ToastContainerDirective, isStandalone: true, selector: "[toastContainer]", exportAs: ["toastContainer"], ngImport: i0 });
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastContainerDirective, decorators: [{
|
20
19
|
type: Directive,
|
21
20
|
args: [{
|
22
21
|
selector: '[toastContainer]',
|
23
22
|
exportAs: 'toastContainer',
|
23
|
+
standalone: true
|
24
24
|
}]
|
25
25
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }]; } });
|
26
|
-
class ToastContainerModule {
|
27
|
-
}
|
28
|
-
ToastContainerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
29
|
-
ToastContainerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerModule, declarations: [ToastContainerDirective], exports: [ToastContainerDirective] });
|
30
|
-
ToastContainerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerModule });
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: ToastContainerModule, decorators: [{
|
32
|
-
type: NgModule,
|
33
|
-
args: [{
|
34
|
-
declarations: [ToastContainerDirective],
|
35
|
-
exports: [ToastContainerDirective],
|
36
|
-
}]
|
37
|
-
}] });
|
38
26
|
|
39
27
|
/**
|
40
28
|
* A `ComponentPortal` is a portal that instantiates some Component upon attachment.
|
@@ -284,30 +272,10 @@ class DomPortalHost extends BasePortalHost {
|
|
284
272
|
}
|
285
273
|
}
|
286
274
|
|
287
|
-
/**
|
288
|
-
* Reference to an overlay that has been created with the Overlay service.
|
289
|
-
* Used to manipulate or dispose of said overlay.
|
290
|
-
*/
|
291
|
-
class OverlayRef {
|
292
|
-
constructor(_portalHost) {
|
293
|
-
this._portalHost = _portalHost;
|
294
|
-
}
|
295
|
-
attach(portal, newestOnTop = true) {
|
296
|
-
return this._portalHost.attach(portal, newestOnTop);
|
297
|
-
}
|
298
|
-
/**
|
299
|
-
* Detaches an overlay from a portal.
|
300
|
-
* @returns Resolves when the overlay has been detached.
|
301
|
-
*/
|
302
|
-
detach() {
|
303
|
-
return this._portalHost.detach();
|
304
|
-
}
|
305
|
-
}
|
306
|
-
|
307
275
|
/** Container inside which all toasts will render. */
|
308
276
|
class OverlayContainer {
|
309
|
-
constructor(
|
310
|
-
this._document =
|
277
|
+
constructor() {
|
278
|
+
this._document = inject(DOCUMENT);
|
311
279
|
}
|
312
280
|
ngOnDestroy() {
|
313
281
|
if (this._containerElement && this._containerElement.parentNode) {
|
@@ -339,15 +307,32 @@ class OverlayContainer {
|
|
339
307
|
this._containerElement = container;
|
340
308
|
}
|
341
309
|
}
|
342
|
-
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
343
|
-
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
344
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
310
|
+
OverlayContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: OverlayContainer, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
311
|
+
OverlayContainer.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: OverlayContainer, providedIn: 'root' });
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: OverlayContainer, decorators: [{
|
345
313
|
type: Injectable,
|
346
314
|
args: [{ providedIn: 'root' }]
|
347
|
-
}]
|
348
|
-
|
349
|
-
|
350
|
-
|
315
|
+
}] });
|
316
|
+
|
317
|
+
/**
|
318
|
+
* Reference to an overlay that has been created with the Overlay service.
|
319
|
+
* Used to manipulate or dispose of said overlay.
|
320
|
+
*/
|
321
|
+
class OverlayRef {
|
322
|
+
constructor(_portalHost) {
|
323
|
+
this._portalHost = _portalHost;
|
324
|
+
}
|
325
|
+
attach(portal, newestOnTop = true) {
|
326
|
+
return this._portalHost.attach(portal, newestOnTop);
|
327
|
+
}
|
328
|
+
/**
|
329
|
+
* Detaches an overlay from a portal.
|
330
|
+
* @returns Resolves when the overlay has been detached.
|
331
|
+
*/
|
332
|
+
detach() {
|
333
|
+
return this._portalHost.detach();
|
334
|
+
}
|
335
|
+
}
|
351
336
|
|
352
337
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
353
338
|
/**
|
@@ -359,11 +344,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
359
344
|
* An overlay *is* a PortalHost, so any kind of Portal can be loaded into one.
|
360
345
|
*/
|
361
346
|
class Overlay {
|
362
|
-
constructor(
|
363
|
-
this._overlayContainer =
|
364
|
-
this._componentFactoryResolver =
|
365
|
-
this._appRef =
|
366
|
-
this._document =
|
347
|
+
constructor() {
|
348
|
+
this._overlayContainer = inject(OverlayContainer);
|
349
|
+
this._componentFactoryResolver = inject(ComponentFactoryResolver);
|
350
|
+
this._appRef = inject(ApplicationRef);
|
351
|
+
this._document = inject(DOCUMENT);
|
367
352
|
// Namespace panes by overlay container
|
368
353
|
this._paneElements = new Map();
|
369
354
|
}
|
@@ -417,15 +402,12 @@ class Overlay {
|
|
417
402
|
return new OverlayRef(this._createPortalHost(pane));
|
418
403
|
}
|
419
404
|
}
|
420
|
-
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
421
|
-
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
405
|
+
Overlay.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Overlay, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
406
|
+
Overlay.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Overlay, providedIn: 'root' });
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Overlay, decorators: [{
|
423
408
|
type: Injectable,
|
424
409
|
args: [{ providedIn: 'root' }]
|
425
|
-
}]
|
426
|
-
type: Inject,
|
427
|
-
args: [DOCUMENT]
|
428
|
-
}] }]; } });
|
410
|
+
}] });
|
429
411
|
|
430
412
|
class ToastrService {
|
431
413
|
constructor(token, overlay, _injector, sanitizer, ngZone) {
|
@@ -609,9 +591,9 @@ class ToastrService {
|
|
609
591
|
return ins;
|
610
592
|
}
|
611
593
|
}
|
612
|
-
ToastrService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
613
|
-
ToastrService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.
|
614
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
594
|
+
ToastrService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrService, deps: [{ token: TOAST_CONFIG }, { token: Overlay }, { token: i0.Injector }, { token: i2.DomSanitizer }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
595
|
+
ToastrService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrService, providedIn: 'root' });
|
596
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrService, decorators: [{
|
615
597
|
type: Injectable,
|
616
598
|
args: [{ providedIn: 'root' }]
|
617
599
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
@@ -620,6 +602,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
620
602
|
}] }, { type: Overlay }, { type: i0.Injector }, { type: i2.DomSanitizer }, { type: i0.NgZone }]; } });
|
621
603
|
|
622
604
|
class Toast {
|
605
|
+
/** hides component when waiting to be displayed */
|
606
|
+
get displayStyle() {
|
607
|
+
if (this.state.value === 'inactive') {
|
608
|
+
return 'none';
|
609
|
+
}
|
610
|
+
return;
|
611
|
+
}
|
623
612
|
constructor(toastrService, toastPackage, ngZone) {
|
624
613
|
this.toastrService = toastrService;
|
625
614
|
this.toastPackage = toastPackage;
|
@@ -654,13 +643,6 @@ class Toast {
|
|
654
643
|
this.duplicatesCount = count;
|
655
644
|
});
|
656
645
|
}
|
657
|
-
/** hides component when waiting to be displayed */
|
658
|
-
get displayStyle() {
|
659
|
-
if (this.state.value === 'inactive') {
|
660
|
-
return 'none';
|
661
|
-
}
|
662
|
-
return;
|
663
|
-
}
|
664
646
|
ngOnDestroy() {
|
665
647
|
this.sub.unsubscribe();
|
666
648
|
this.sub1.unsubscribe();
|
@@ -786,8 +768,8 @@ class Toast {
|
|
786
768
|
}
|
787
769
|
}
|
788
770
|
}
|
789
|
-
Toast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
790
|
-
Toast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
771
|
+
Toast.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Toast, deps: [{ token: ToastrService }, { token: ToastPackage }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
772
|
+
Toast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: Toast, isStandalone: true, selector: "[toast-component]", host: { listeners: { "click": "tapToast()", "mouseenter": "stickAround()", "mouseleave": "delayedHideToast()" }, properties: { "class": "this.toastClasses", "@flyInOut": "this.state", "style.display": "this.displayStyle" } }, ngImport: i0, template: `
|
791
773
|
<button *ngIf="options.closeButton" (click)="remove()" type="button" class="toast-close-button" aria-label="Close">
|
792
774
|
<span aria-hidden="true">×</span>
|
793
775
|
</button>
|
@@ -804,16 +786,16 @@ Toast.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4
|
|
804
786
|
<div *ngIf="options.progressBar">
|
805
787
|
<div class="toast-progress" [style.width]="width + '%'"></div>
|
806
788
|
</div>
|
807
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
789
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
|
808
790
|
trigger('flyInOut', [
|
809
791
|
state('inactive', style({ opacity: 0 })),
|
810
792
|
state('active', style({ opacity: 1 })),
|
811
793
|
state('removed', style({ opacity: 0 })),
|
812
794
|
transition('inactive => active', animate('{{ easeTime }}ms {{ easing }}')),
|
813
|
-
transition('active => removed', animate('{{ easeTime }}ms {{ easing }}'))
|
814
|
-
])
|
795
|
+
transition('active => removed', animate('{{ easeTime }}ms {{ easing }}')),
|
796
|
+
]),
|
815
797
|
] });
|
816
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
798
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: Toast, decorators: [{
|
817
799
|
type: Component,
|
818
800
|
args: [{
|
819
801
|
selector: '[toast-component]',
|
@@ -841,10 +823,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
841
823
|
state('active', style({ opacity: 1 })),
|
842
824
|
state('removed', style({ opacity: 0 })),
|
843
825
|
transition('inactive => active', animate('{{ easeTime }}ms {{ easing }}')),
|
844
|
-
transition('active => removed', animate('{{ easeTime }}ms {{ easing }}'))
|
845
|
-
])
|
826
|
+
transition('active => removed', animate('{{ easeTime }}ms {{ easing }}')),
|
827
|
+
]),
|
846
828
|
],
|
847
|
-
preserveWhitespaces: false
|
829
|
+
preserveWhitespaces: false,
|
830
|
+
standalone: true,
|
831
|
+
imports: [NgIf],
|
848
832
|
}]
|
849
833
|
}], ctorParameters: function () { return [{ type: ToastrService }, { type: ToastPackage }, { type: i0.NgZone }]; }, propDecorators: { toastClasses: [{
|
850
834
|
type: HostBinding,
|
@@ -870,30 +854,54 @@ const DefaultGlobalConfig = {
|
|
870
854
|
...DefaultNoComponentGlobalConfig,
|
871
855
|
toastComponent: Toast,
|
872
856
|
};
|
857
|
+
/**
|
858
|
+
* @description
|
859
|
+
* Provides the `TOAST_CONFIG` token with the given config.
|
860
|
+
*
|
861
|
+
* @param config The config to configure toastr.
|
862
|
+
* @returns The environment providers.
|
863
|
+
*
|
864
|
+
* @example
|
865
|
+
* ```ts
|
866
|
+
* import { provideToastr } from 'ngx-toastr';
|
867
|
+
*
|
868
|
+
* bootstrap(AppComponent, {
|
869
|
+
* providers: [
|
870
|
+
* provideToastr({
|
871
|
+
* timeOut: 2000,
|
872
|
+
* positionClass: 'toast-top-right',
|
873
|
+
* }),
|
874
|
+
* ],
|
875
|
+
* })
|
876
|
+
*/
|
877
|
+
const provideToastr = (config = {}) => {
|
878
|
+
const providers = [
|
879
|
+
{
|
880
|
+
provide: TOAST_CONFIG,
|
881
|
+
useValue: {
|
882
|
+
default: DefaultGlobalConfig,
|
883
|
+
config,
|
884
|
+
}
|
885
|
+
}
|
886
|
+
];
|
887
|
+
return makeEnvironmentProviders(providers);
|
888
|
+
};
|
889
|
+
|
873
890
|
class ToastrModule {
|
874
891
|
static forRoot(config = {}) {
|
875
892
|
return {
|
876
893
|
ngModule: ToastrModule,
|
877
|
-
providers: [
|
878
|
-
{
|
879
|
-
provide: TOAST_CONFIG,
|
880
|
-
useValue: {
|
881
|
-
default: DefaultGlobalConfig,
|
882
|
-
config,
|
883
|
-
},
|
884
|
-
},
|
885
|
-
],
|
894
|
+
providers: [provideToastr(config)],
|
886
895
|
};
|
887
896
|
}
|
888
897
|
}
|
889
|
-
ToastrModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
890
|
-
ToastrModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
891
|
-
ToastrModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
892
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
898
|
+
ToastrModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
899
|
+
ToastrModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: ToastrModule, imports: [Toast], exports: [Toast] });
|
900
|
+
ToastrModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrModule, imports: [Toast] });
|
901
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrModule, decorators: [{
|
893
902
|
type: NgModule,
|
894
903
|
args: [{
|
895
|
-
imports: [
|
896
|
-
declarations: [Toast],
|
904
|
+
imports: [Toast],
|
897
905
|
exports: [Toast],
|
898
906
|
}]
|
899
907
|
}] });
|
@@ -913,17 +921,21 @@ class ToastrComponentlessModule {
|
|
913
921
|
};
|
914
922
|
}
|
915
923
|
}
|
916
|
-
ToastrComponentlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
917
|
-
ToastrComponentlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
918
|
-
ToastrComponentlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
919
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
924
|
+
ToastrComponentlessModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrComponentlessModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
925
|
+
ToastrComponentlessModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: ToastrComponentlessModule });
|
926
|
+
ToastrComponentlessModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrComponentlessModule });
|
927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastrComponentlessModule, decorators: [{
|
920
928
|
type: NgModule,
|
921
|
-
args: [{
|
922
|
-
imports: [CommonModule],
|
923
|
-
}]
|
929
|
+
args: [{}]
|
924
930
|
}] });
|
925
931
|
|
926
932
|
class ToastNoAnimation {
|
933
|
+
/** hides component when waiting to be displayed */
|
934
|
+
get displayStyle() {
|
935
|
+
if (this.state === 'inactive') {
|
936
|
+
return 'none';
|
937
|
+
}
|
938
|
+
}
|
927
939
|
constructor(toastrService, toastPackage, appRef) {
|
928
940
|
this.toastrService = toastrService;
|
929
941
|
this.toastPackage = toastPackage;
|
@@ -952,12 +964,6 @@ class ToastNoAnimation {
|
|
952
964
|
this.duplicatesCount = count;
|
953
965
|
});
|
954
966
|
}
|
955
|
-
/** hides component when waiting to be displayed */
|
956
|
-
get displayStyle() {
|
957
|
-
if (this.state === 'inactive') {
|
958
|
-
return 'none';
|
959
|
-
}
|
960
|
-
}
|
961
967
|
ngOnDestroy() {
|
962
968
|
this.sub.unsubscribe();
|
963
969
|
this.sub1.unsubscribe();
|
@@ -1062,8 +1068,8 @@ class ToastNoAnimation {
|
|
1062
1068
|
}
|
1063
1069
|
}
|
1064
1070
|
}
|
1065
|
-
ToastNoAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
1066
|
-
ToastNoAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.
|
1071
|
+
ToastNoAnimation.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimation, deps: [{ token: ToastrService }, { token: ToastPackage }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Component });
|
1072
|
+
ToastNoAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.7", type: ToastNoAnimation, isStandalone: true, selector: "[toast-component]", host: { listeners: { "click": "tapToast()", "mouseenter": "stickAround()", "mouseleave": "delayedHideToast()" }, properties: { "class": "this.toastClasses", "style.display": "this.displayStyle" } }, ngImport: i0, template: `
|
1067
1073
|
<button *ngIf="options.closeButton" (click)="remove()" type="button" class="toast-close-button" aria-label="Close">
|
1068
1074
|
<span aria-hidden="true">×</span>
|
1069
1075
|
</button>
|
@@ -1080,8 +1086,8 @@ ToastNoAnimation.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versi
|
|
1080
1086
|
<div *ngIf="options.progressBar">
|
1081
1087
|
<div class="toast-progress" [style.width]="width + '%'"></div>
|
1082
1088
|
</div>
|
1083
|
-
`, isInline: true, dependencies: [{ kind: "directive", type:
|
1084
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
1089
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
1090
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimation, decorators: [{
|
1085
1091
|
type: Component,
|
1086
1092
|
args: [{
|
1087
1093
|
selector: '[toast-component]',
|
@@ -1103,6 +1109,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
1103
1109
|
<div class="toast-progress" [style.width]="width + '%'"></div>
|
1104
1110
|
</div>
|
1105
1111
|
`,
|
1112
|
+
standalone: true,
|
1113
|
+
imports: [NgIf]
|
1106
1114
|
}]
|
1107
1115
|
}], ctorParameters: function () { return [{ type: ToastrService }, { type: ToastPackage }, { type: i0.ApplicationRef }]; }, propDecorators: { toastClasses: [{
|
1108
1116
|
type: HostBinding,
|
@@ -1140,14 +1148,13 @@ class ToastNoAnimationModule {
|
|
1140
1148
|
};
|
1141
1149
|
}
|
1142
1150
|
}
|
1143
|
-
ToastNoAnimationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.
|
1144
|
-
ToastNoAnimationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.
|
1145
|
-
ToastNoAnimationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.
|
1146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.
|
1151
|
+
ToastNoAnimationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
1152
|
+
ToastNoAnimationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimationModule, imports: [ToastNoAnimation], exports: [ToastNoAnimation] });
|
1153
|
+
ToastNoAnimationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimationModule, imports: [ToastNoAnimation] });
|
1154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: ToastNoAnimationModule, decorators: [{
|
1147
1155
|
type: NgModule,
|
1148
1156
|
args: [{
|
1149
|
-
imports: [
|
1150
|
-
declarations: [ToastNoAnimation],
|
1157
|
+
imports: [ToastNoAnimation],
|
1151
1158
|
exports: [ToastNoAnimation],
|
1152
1159
|
}]
|
1153
1160
|
}] });
|
@@ -1156,5 +1163,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
1156
1163
|
* Generated bundle index. Do not edit.
|
1157
1164
|
*/
|
1158
1165
|
|
1159
|
-
export { BasePortalHost, ComponentPortal, DefaultGlobalConfig, DefaultNoAnimationsGlobalConfig, DefaultNoComponentGlobalConfig, Overlay, OverlayContainer, OverlayRef, TOAST_CONFIG, Toast, ToastContainerDirective,
|
1166
|
+
export { BasePortalHost, ComponentPortal, DefaultGlobalConfig, DefaultNoAnimationsGlobalConfig, DefaultNoComponentGlobalConfig, Overlay, OverlayContainer, OverlayRef, TOAST_CONFIG, Toast, ToastContainerDirective, ToastNoAnimation, ToastNoAnimationModule, ToastPackage, ToastRef, ToastrComponentlessModule, ToastrModule, ToastrService, provideToastr };
|
1160
1167
|
//# sourceMappingURL=ngx-toastr.mjs.map
|