ngx-toastr 16.0.1 → 16.1.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/README.md +29 -23
- package/esm2020/overlay/overlay-container.mjs +3 -3
- package/esm2020/overlay/overlay.mjs +3 -3
- package/esm2020/toastr/toast-noanimation.component.mjs +7 -7
- package/esm2020/toastr/toast.component.mjs +4 -4
- package/esm2020/toastr/toast.directive.mjs +7 -7
- package/esm2020/toastr/toastr-config.mjs +1 -2
- package/esm2020/toastr/toastr.module.mjs +8 -8
- package/esm2020/toastr/toastr.service.mjs +4 -4
- package/fesm2015/ngx-toastr.mjs +34 -35
- package/fesm2015/ngx-toastr.mjs.map +1 -1
- package/fesm2020/ngx-toastr.mjs +34 -35
- package/fesm2020/ngx-toastr.mjs.map +1 -1
- package/package.json +1 -1
- package/toastr/toast.component.d.ts +4 -4
- package/toastr/toastr-config.d.ts +6 -7
- package/toastr/toastr.service.d.ts +5 -5
@@ -7,7 +7,7 @@ export declare type DisableTimoutType = boolean | 'timeOut' | 'extendedTimeOut';
|
|
7
7
|
/**
|
8
8
|
* Configuration for an individual toast.
|
9
9
|
*/
|
10
|
-
export interface IndividualConfig {
|
10
|
+
export interface IndividualConfig<ConfigPayload = any> {
|
11
11
|
/**
|
12
12
|
* disable both timeOut and extendedTimeOut
|
13
13
|
* default: false
|
@@ -94,10 +94,9 @@ export interface IndividualConfig {
|
|
94
94
|
*/
|
95
95
|
newestOnTop: boolean;
|
96
96
|
/**
|
97
|
-
*
|
98
|
-
* default: null
|
97
|
+
* Payload to pass to the toast component
|
99
98
|
*/
|
100
|
-
payload
|
99
|
+
payload?: ConfigPayload;
|
101
100
|
}
|
102
101
|
export interface ToastrIconClasses {
|
103
102
|
error: string;
|
@@ -147,16 +146,16 @@ export interface GlobalConfig extends IndividualConfig {
|
|
147
146
|
/**
|
148
147
|
* Everything a toast needs to launch
|
149
148
|
*/
|
150
|
-
export declare class ToastPackage {
|
149
|
+
export declare class ToastPackage<ConfigPayload = any> {
|
151
150
|
toastId: number;
|
152
|
-
config: IndividualConfig
|
151
|
+
config: IndividualConfig<ConfigPayload>;
|
153
152
|
message: string | null | undefined;
|
154
153
|
title: string | undefined;
|
155
154
|
toastType: string;
|
156
155
|
toastRef: ToastRef<any>;
|
157
156
|
private _onTap;
|
158
157
|
private _onAction;
|
159
|
-
constructor(toastId: number, config: IndividualConfig
|
158
|
+
constructor(toastId: number, config: IndividualConfig<ConfigPayload>, message: string | null | undefined, title: string | undefined, toastType: string, toastRef: ToastRef<any>);
|
160
159
|
/** Fired on click */
|
161
160
|
triggerTap(): void;
|
162
161
|
onTap(): Observable<void>;
|
@@ -39,15 +39,15 @@ export declare class ToastrService {
|
|
39
39
|
private index;
|
40
40
|
constructor(token: ToastToken, overlay: Overlay, _injector: Injector, sanitizer: DomSanitizer, ngZone: NgZone);
|
41
41
|
/** show toast */
|
42
|
-
show(message?: string, title?: string, override?: Partial<IndividualConfig
|
42
|
+
show<ConfigPayload = any>(message?: string, title?: string, override?: Partial<IndividualConfig<ConfigPayload>>, type?: string): ActiveToast<any>;
|
43
43
|
/** show successful toast */
|
44
|
-
success(message?: string, title?: string, override?: Partial<IndividualConfig
|
44
|
+
success<ConfigPayload = any>(message?: string, title?: string, override?: Partial<IndividualConfig<ConfigPayload>>): ActiveToast<any>;
|
45
45
|
/** show error toast */
|
46
|
-
error(message?: string, title?: string, override?: Partial<IndividualConfig
|
46
|
+
error<ConfigPayload = any>(message?: string, title?: string, override?: Partial<IndividualConfig<ConfigPayload>>): ActiveToast<any>;
|
47
47
|
/** show info toast */
|
48
|
-
info(message?: string, title?: string, override?: Partial<IndividualConfig
|
48
|
+
info<ConfigPayload = any>(message?: string, title?: string, override?: Partial<IndividualConfig<ConfigPayload>>): ActiveToast<any>;
|
49
49
|
/** show warning toast */
|
50
|
-
warning(message?: string, title?: string, override?: Partial<IndividualConfig
|
50
|
+
warning<ConfigPayload = any>(message?: string, title?: string, override?: Partial<IndividualConfig<ConfigPayload>>): ActiveToast<any>;
|
51
51
|
/**
|
52
52
|
* Remove all or a single toast by id
|
53
53
|
*/
|