ngx-toastr 9.0.2 → 9.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.
Files changed (42) hide show
  1. package/README.md +22 -2
  2. package/bundles/ngx-toastr.umd.js +214 -86
  3. package/bundles/ngx-toastr.umd.js.map +1 -1
  4. package/bundles/ngx-toastr.umd.min.js +1 -1
  5. package/bundles/ngx-toastr.umd.min.js.map +1 -1
  6. package/esm2015/ngx-toastr.js +1 -2
  7. package/esm2015/overlay/overlay-container.js +11 -5
  8. package/esm2015/overlay/overlay-ref.js +6 -4
  9. package/esm2015/overlay/overlay.js +26 -8
  10. package/esm2015/portal/dom-portal-host.js +21 -9
  11. package/esm2015/portal/portal.js +8 -4
  12. package/esm2015/public_api.js +1 -2
  13. package/esm2015/toastr/toast-injector.js +18 -6
  14. package/esm2015/toastr/toast-noanimation.component.js +79 -25
  15. package/esm2015/toastr/toast.component.js +117 -34
  16. package/esm2015/toastr/toast.directive.js +6 -4
  17. package/esm2015/toastr/toastr-config.js +164 -151
  18. package/esm2015/toastr/toastr.module.js +2 -3
  19. package/esm2015/toastr/toastr.service.js +95 -64
  20. package/esm5/ngx-toastr.js +1 -2
  21. package/esm5/overlay/overlay-container.js +12 -5
  22. package/esm5/overlay/overlay-ref.js +6 -4
  23. package/esm5/overlay/overlay.js +42 -8
  24. package/esm5/portal/dom-portal-host.js +23 -9
  25. package/esm5/portal/portal.js +8 -4
  26. package/esm5/public_api.js +1 -2
  27. package/esm5/toastr/toast-injector.js +18 -6
  28. package/esm5/toastr/toast-noanimation.component.js +81 -26
  29. package/esm5/toastr/toast.component.js +127 -38
  30. package/esm5/toastr/toast.directive.js +6 -4
  31. package/esm5/toastr/toastr-config.js +164 -151
  32. package/esm5/toastr/toastr.module.js +2 -3
  33. package/esm5/toastr/toastr.service.js +115 -68
  34. package/fesm2015/ngx-toastr.js +194 -76
  35. package/fesm2015/ngx-toastr.js.map +1 -1
  36. package/fesm5/ngx-toastr.js +245 -85
  37. package/fesm5/ngx-toastr.js.map +1 -1
  38. package/ngx-toastr.metadata.json +1 -1
  39. package/package.json +4 -4
  40. package/toastr/toast-noanimation.component.d.ts +1 -0
  41. package/toastr/toast.component.d.ts +2 -0
  42. package/toastr/toastr.service.d.ts +3 -3
package/README.md CHANGED
@@ -29,6 +29,14 @@ DEMO: https://scttcper.github.io/ngx-toastr/
29
29
  [Web Animations API](https://angular.io/docs/ts/latest/guide/animations.html)
30
30
  - Output toasts to an optional target directive
31
31
 
32
+ ## Dependencies
33
+ Latest version available for each version of Angular
34
+
35
+ | ngx-toastr | Angular |
36
+ | ------------ | ------- |
37
+ | 6.4.1-beta.0 | 4.x |
38
+ | 8.10.2 | 5.x |
39
+
32
40
  ## Install
33
41
 
34
42
  ```bash
@@ -194,8 +202,6 @@ imports: [
194
202
 
195
203
  ### Toastr Service methods return:
196
204
 
197
- Toastr Service will return undefined if prevent duplicates is enabled
198
-
199
205
  ```typescript
200
206
  export interface ActiveToast {
201
207
  /** Your Toast ID. Use this to close it individually */
@@ -356,6 +362,20 @@ ngOnInit() {
356
362
  https://github.com/scttcper/ngx-toastr/issues/179
357
363
  4. How can I translate messages See:
358
364
  https://github.com/scttcper/ngx-toastr/issues/201
365
+ 5. How to handle toastr click/tap action?
366
+
367
+ ```ts
368
+ showToaster() {
369
+ this.toastr.success('Hello world!', 'Toastr fun!')
370
+ .onTap
371
+ .pipe(take(1))
372
+ .subscribe(() => this.toasterClickedHandler());
373
+ }
374
+
375
+ toasterClickedHandler() {
376
+ console.log('Toastr clicked');
377
+ }
378
+ ```
359
379
 
360
380
  ## Previous Works
361
381