ngx-toastr 8.9.0 → 8.10.2

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 (52) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +1 -1
  3. package/bundles/ngx-toastr.umd.js +108 -79
  4. package/bundles/ngx-toastr.umd.js.map +1 -1
  5. package/bundles/ngx-toastr.umd.min.js +1 -1
  6. package/bundles/ngx-toastr.umd.min.js.map +1 -1
  7. package/esm2015/ngx-toastr.js +1 -1
  8. package/esm2015/overlay/overlay-container.js +5 -4
  9. package/esm2015/overlay/overlay-ref.js +3 -3
  10. package/esm2015/overlay/overlay.js +15 -11
  11. package/esm2015/portal/dom-portal-host.js +7 -5
  12. package/esm2015/portal/portal.js +6 -10
  13. package/esm2015/public_api.js +1 -1
  14. package/esm2015/toastr/default-config.js +2 -2
  15. package/esm2015/toastr/toast-injector.js +4 -4
  16. package/esm2015/toastr/toast-noanimation.component.js +8 -6
  17. package/esm2015/toastr/toast-token.js +8 -9
  18. package/esm2015/toastr/toast.component.js +8 -6
  19. package/esm2015/toastr/toast.directive.js +3 -3
  20. package/esm2015/toastr/toastr-config.js +140 -152
  21. package/esm2015/toastr/toastr.module.js +2 -2
  22. package/esm2015/toastr/toastr.service.js +78 -65
  23. package/esm5/ngx-toastr.js +1 -1
  24. package/esm5/overlay/overlay-container.js +5 -4
  25. package/esm5/overlay/overlay-ref.js +3 -3
  26. package/esm5/overlay/overlay.js +15 -11
  27. package/esm5/portal/dom-portal-host.js +7 -5
  28. package/esm5/portal/portal.js +6 -10
  29. package/esm5/public_api.js +1 -1
  30. package/esm5/toastr/default-config.js +2 -2
  31. package/esm5/toastr/toast-injector.js +5 -4
  32. package/esm5/toastr/toast-noanimation.component.js +8 -6
  33. package/esm5/toastr/toast-token.js +8 -9
  34. package/esm5/toastr/toast.component.js +8 -6
  35. package/esm5/toastr/toast.directive.js +3 -3
  36. package/esm5/toastr/toastr-config.js +140 -152
  37. package/esm5/toastr/toastr.module.js +2 -2
  38. package/esm5/toastr/toastr.service.js +81 -68
  39. package/fesm2015/ngx-toastr.js +84 -56
  40. package/fesm2015/ngx-toastr.js.map +1 -1
  41. package/fesm5/ngx-toastr.js +88 -59
  42. package/fesm5/ngx-toastr.js.map +1 -1
  43. package/ngx-toastr.metadata.json +1 -1
  44. package/overlay/overlay-container.d.ts +1 -1
  45. package/overlay/overlay.d.ts +3 -3
  46. package/package.json +1 -1
  47. package/portal/dom-portal-host.d.ts +1 -1
  48. package/toastr/toast-noanimation.component.d.ts +1 -1
  49. package/toastr/toast.component.d.ts +2 -2
  50. package/toastr/toastr-config.d.ts +3 -3
  51. package/toastr/toastr.service.d.ts +4 -4
  52. package/toastr-bs4-alert.scss +29 -4
@@ -118,15 +118,40 @@
118
118
  }
119
119
  }
120
120
 
121
+ @function str-split($string, $separator) {
122
+ $split-arr: ();
123
+ // first index of separator in string
124
+ $index: str-index($string, $separator);
125
+ // loop through string
126
+ @while $index != null {
127
+ // get the substring from the first character to the separator
128
+ $item: str-slice($string, 1, $index - 1);
129
+ // push item to array
130
+ $split-arr: append($split-arr, $item);
131
+ // remove item and separator from string
132
+ $string: str-slice($string, $index + 1);
133
+ // find new index of separator
134
+ $index: str-index($string, $separator);
135
+ }
136
+ // add the remaining string to list (the last item)
137
+ $split-arr: append($split-arr, $string);
138
+
139
+ @return $split-arr;
140
+ }
141
+
121
142
  @function svg-factory($fill-color, $viewbox, $path) {
143
+ $split: str-split($viewbox, ' ');
144
+ $width: nth($split, 3);
145
+ $height: nth($split, 4);
146
+
122
147
  // opacity is 0.9999 otherwise it uses a hex equivelent
123
148
  // firefox requires fill rgb
124
- @return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="' + $viewbox +
125
- '"><path fill="' + rgba($fill-color, 0.999999) + '" d="' + $path +
126
- '"/></svg>';
149
+ @return "%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='" + $viewbox +
150
+ "' width='" + $width + "' height='" + $height + "'%3E%3Cpath fill='" +
151
+ rgba($fill-color, 0.999999) + "' d='" + $path + "'/%3E%3C/svg%3E";
127
152
  }
128
153
  @function svg-encode($svg) {
129
- @return 'data:image/svg+xml,' + $svg;
154
+ @return 'data:image/svg+xml;charset=utf8,' + $svg;
130
155
  }
131
156
  .toast-success {
132
157
  /* https://github.com/FortAwesome/Font-Awesome-Pro/blob/master/advanced-options/raw-svg/solid/check.svg */