ngx-toastr 12.1.0 → 13.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 (43) hide show
  1. package/README.md +46 -41
  2. package/bundles/ngx-toastr.umd.js +454 -388
  3. package/bundles/ngx-toastr.umd.js.map +1 -1
  4. package/bundles/ngx-toastr.umd.min.js +1 -15
  5. package/bundles/ngx-toastr.umd.min.js.map +1 -1
  6. package/esm2015/ngx-toastr.js +1 -1
  7. package/esm2015/overlay/overlay-container.js +7 -10
  8. package/esm2015/overlay/overlay-ref.js +1 -1
  9. package/esm2015/overlay/overlay.js +9 -11
  10. package/esm2015/portal/dom-portal-host.js +1 -1
  11. package/esm2015/portal/portal.js +1 -1
  12. package/esm2015/public_api.js +1 -1
  13. package/esm2015/toastr/toast-injector.js +1 -1
  14. package/esm2015/toastr/toast-noanimation.component.js +34 -46
  15. package/esm2015/toastr/toast.component.js +35 -46
  16. package/esm2015/toastr/toast.directive.js +17 -20
  17. package/esm2015/toastr/toastr-config.js +2 -1
  18. package/esm2015/toastr/toastr.module.js +19 -23
  19. package/esm2015/toastr/toastr.service.js +21 -21
  20. package/fesm2015/ngx-toastr.js +130 -148
  21. package/fesm2015/ngx-toastr.js.map +1 -1
  22. package/ngx-toastr.metadata.json +1 -1
  23. package/package.json +7 -10
  24. package/portal/portal.d.ts +1 -1
  25. package/toastr/toast.component.d.ts +1 -1
  26. package/toastr/toastr-config.d.ts +8 -2
  27. package/toastr/toastr.service.d.ts +7 -5
  28. package/esm5/ngx-toastr.js +0 -5
  29. package/esm5/overlay/overlay-container.js +0 -49
  30. package/esm5/overlay/overlay-ref.js +0 -23
  31. package/esm5/overlay/overlay.js +0 -91
  32. package/esm5/portal/dom-portal-host.js +0 -58
  33. package/esm5/portal/portal.js +0 -67
  34. package/esm5/public_api.js +0 -12
  35. package/esm5/toastr/toast-injector.js +0 -90
  36. package/esm5/toastr/toast-noanimation.component.js +0 -216
  37. package/esm5/toastr/toast.component.js +0 -226
  38. package/esm5/toastr/toast.directive.js +0 -34
  39. package/esm5/toastr/toastr-config.js +0 -73
  40. package/esm5/toastr/toastr.module.js +0 -64
  41. package/esm5/toastr/toastr.service.js +0 -229
  42. package/fesm5/ngx-toastr.js +0 -1168
  43. package/fesm5/ngx-toastr.js.map +0 -1
@@ -1,222 +1,8 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/animations'), require('rxjs'), require('@angular/platform-browser'), require('@angular/common')) :
3
3
  typeof define === 'function' && define.amd ? define('ngx-toastr', ['exports', '@angular/core', '@angular/animations', 'rxjs', '@angular/platform-browser', '@angular/common'], factory) :
4
- (global = global || self, factory(global['ngx-toastr'] = {}, global.ng.core, global.ng.animations, global.rxjs, global.ng.platformBrowser, global.ng.common));
5
- }(this, (function (exports, core, animations, rxjs, platformBrowser, common) { 'use strict';
6
-
7
- /*! *****************************************************************************
8
- Copyright (c) Microsoft Corporation. All rights reserved.
9
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
10
- this file except in compliance with the License. You may obtain a copy of the
11
- License at http://www.apache.org/licenses/LICENSE-2.0
12
-
13
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16
- MERCHANTABLITY OR NON-INFRINGEMENT.
17
-
18
- See the Apache Version 2.0 License for specific language governing permissions
19
- and limitations under the License.
20
- ***************************************************************************** */
21
- /* global Reflect, Promise */
22
-
23
- var extendStatics = function(d, b) {
24
- extendStatics = Object.setPrototypeOf ||
25
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27
- return extendStatics(d, b);
28
- };
29
-
30
- function __extends(d, b) {
31
- extendStatics(d, b);
32
- function __() { this.constructor = d; }
33
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34
- }
35
-
36
- var __assign = function() {
37
- __assign = Object.assign || function __assign(t) {
38
- for (var s, i = 1, n = arguments.length; i < n; i++) {
39
- s = arguments[i];
40
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41
- }
42
- return t;
43
- };
44
- return __assign.apply(this, arguments);
45
- };
46
-
47
- function __rest(s, e) {
48
- var t = {};
49
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50
- t[p] = s[p];
51
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
52
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54
- t[p[i]] = s[p[i]];
55
- }
56
- return t;
57
- }
58
-
59
- function __decorate(decorators, target, key, desc) {
60
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
63
- return c > 3 && r && Object.defineProperty(target, key, r), r;
64
- }
65
-
66
- function __param(paramIndex, decorator) {
67
- return function (target, key) { decorator(target, key, paramIndex); }
68
- }
69
-
70
- function __metadata(metadataKey, metadataValue) {
71
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72
- }
73
-
74
- function __awaiter(thisArg, _arguments, P, generator) {
75
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
76
- return new (P || (P = Promise))(function (resolve, reject) {
77
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
78
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
79
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
80
- step((generator = generator.apply(thisArg, _arguments || [])).next());
81
- });
82
- }
83
-
84
- function __generator(thisArg, body) {
85
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
86
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
87
- function verb(n) { return function (v) { return step([n, v]); }; }
88
- function step(op) {
89
- if (f) throw new TypeError("Generator is already executing.");
90
- while (_) try {
91
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
92
- if (y = 0, t) op = [op[0] & 2, t.value];
93
- switch (op[0]) {
94
- case 0: case 1: t = op; break;
95
- case 4: _.label++; return { value: op[1], done: false };
96
- case 5: _.label++; y = op[1]; op = [0]; continue;
97
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
98
- default:
99
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
100
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
101
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
102
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
103
- if (t[2]) _.ops.pop();
104
- _.trys.pop(); continue;
105
- }
106
- op = body.call(thisArg, _);
107
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
108
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
109
- }
110
- }
111
-
112
- function __exportStar(m, exports) {
113
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
114
- }
115
-
116
- function __values(o) {
117
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
118
- if (m) return m.call(o);
119
- if (o && typeof o.length === "number") return {
120
- next: function () {
121
- if (o && i >= o.length) o = void 0;
122
- return { value: o && o[i++], done: !o };
123
- }
124
- };
125
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
126
- }
127
-
128
- function __read(o, n) {
129
- var m = typeof Symbol === "function" && o[Symbol.iterator];
130
- if (!m) return o;
131
- var i = m.call(o), r, ar = [], e;
132
- try {
133
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
134
- }
135
- catch (error) { e = { error: error }; }
136
- finally {
137
- try {
138
- if (r && !r.done && (m = i["return"])) m.call(i);
139
- }
140
- finally { if (e) throw e.error; }
141
- }
142
- return ar;
143
- }
144
-
145
- function __spread() {
146
- for (var ar = [], i = 0; i < arguments.length; i++)
147
- ar = ar.concat(__read(arguments[i]));
148
- return ar;
149
- }
150
-
151
- function __spreadArrays() {
152
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
153
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
154
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
155
- r[k] = a[j];
156
- return r;
157
- };
158
-
159
- function __await(v) {
160
- return this instanceof __await ? (this.v = v, this) : new __await(v);
161
- }
162
-
163
- function __asyncGenerator(thisArg, _arguments, generator) {
164
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
165
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
166
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
167
- function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
168
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
169
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
170
- function fulfill(value) { resume("next", value); }
171
- function reject(value) { resume("throw", value); }
172
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
173
- }
174
-
175
- function __asyncDelegator(o) {
176
- var i, p;
177
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
178
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
179
- }
180
-
181
- function __asyncValues(o) {
182
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
183
- var m = o[Symbol.asyncIterator], i;
184
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
185
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
186
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
187
- }
188
-
189
- function __makeTemplateObject(cooked, raw) {
190
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
191
- return cooked;
192
- };
193
-
194
- function __importStar(mod) {
195
- if (mod && mod.__esModule) return mod;
196
- var result = {};
197
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
198
- result.default = mod;
199
- return result;
200
- }
201
-
202
- function __importDefault(mod) {
203
- return (mod && mod.__esModule) ? mod : { default: mod };
204
- }
205
-
206
- function __classPrivateFieldGet(receiver, privateMap) {
207
- if (!privateMap.has(receiver)) {
208
- throw new TypeError("attempted to get private field on non-instance");
209
- }
210
- return privateMap.get(receiver);
211
- }
212
-
213
- function __classPrivateFieldSet(receiver, privateMap, value) {
214
- if (!privateMap.has(receiver)) {
215
- throw new TypeError("attempted to set private field on non-instance");
216
- }
217
- privateMap.set(receiver, value);
218
- return value;
219
- }
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-toastr'] = {}, global.ng.core, global.ng.animations, global.rxjs, global.ng.platformBrowser, global.ng.common));
5
+ }(this, (function (exports, i0, animations, rxjs, i3, i1) { 'use strict';
220
6
 
221
7
  var ToastContainerDirective = /** @class */ (function () {
222
8
  function ToastContainerDirective(el) {
@@ -225,28 +11,28 @@
225
11
  ToastContainerDirective.prototype.getContainerElement = function () {
226
12
  return this.el.nativeElement;
227
13
  };
228
- ToastContainerDirective.ctorParameters = function () { return [
229
- { type: core.ElementRef }
230
- ]; };
231
- ToastContainerDirective = __decorate([
232
- core.Directive({
233
- selector: '[toastContainer]',
234
- exportAs: 'toastContainer',
235
- })
236
- ], ToastContainerDirective);
237
14
  return ToastContainerDirective;
238
15
  }());
16
+ ToastContainerDirective.decorators = [
17
+ { type: i0.Directive, args: [{
18
+ selector: '[toastContainer]',
19
+ exportAs: 'toastContainer',
20
+ },] }
21
+ ];
22
+ ToastContainerDirective.ctorParameters = function () { return [
23
+ { type: i0.ElementRef }
24
+ ]; };
239
25
  var ToastContainerModule = /** @class */ (function () {
240
26
  function ToastContainerModule() {
241
27
  }
242
- ToastContainerModule = __decorate([
243
- core.NgModule({
244
- declarations: [ToastContainerDirective],
245
- exports: [ToastContainerDirective],
246
- })
247
- ], ToastContainerModule);
248
28
  return ToastContainerModule;
249
29
  }());
30
+ ToastContainerModule.decorators = [
31
+ { type: i0.NgModule, args: [{
32
+ declarations: [ToastContainerDirective],
33
+ exports: [ToastContainerDirective],
34
+ },] }
35
+ ];
250
36
 
251
37
  /**
252
38
  * Everything a toast needs to launch
@@ -293,6 +79,7 @@
293
79
  preventDuplicates: false,
294
80
  countDuplicates: false,
295
81
  resetTimeoutOnDuplicate: false,
82
+ includeTitleDuplicates: false,
296
83
  iconClasses: {
297
84
  error: 'toast-error',
298
85
  info: 'toast-info',
@@ -316,7 +103,308 @@
316
103
  onActivateTick: false,
317
104
  progressAnimation: 'decreasing',
318
105
  };
319
- var TOAST_CONFIG = new core.InjectionToken('ToastConfig');
106
+ var TOAST_CONFIG = new i0.InjectionToken('ToastConfig');
107
+
108
+ /*! *****************************************************************************
109
+ Copyright (c) Microsoft Corporation.
110
+
111
+ Permission to use, copy, modify, and/or distribute this software for any
112
+ purpose with or without fee is hereby granted.
113
+
114
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
115
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
116
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
117
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
118
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
119
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
120
+ PERFORMANCE OF THIS SOFTWARE.
121
+ ***************************************************************************** */
122
+ /* global Reflect, Promise */
123
+ var extendStatics = function (d, b) {
124
+ extendStatics = Object.setPrototypeOf ||
125
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
126
+ function (d, b) { for (var p in b)
127
+ if (Object.prototype.hasOwnProperty.call(b, p))
128
+ d[p] = b[p]; };
129
+ return extendStatics(d, b);
130
+ };
131
+ function __extends(d, b) {
132
+ extendStatics(d, b);
133
+ function __() { this.constructor = d; }
134
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
135
+ }
136
+ var __assign = function () {
137
+ __assign = Object.assign || function __assign(t) {
138
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
139
+ s = arguments[i];
140
+ for (var p in s)
141
+ if (Object.prototype.hasOwnProperty.call(s, p))
142
+ t[p] = s[p];
143
+ }
144
+ return t;
145
+ };
146
+ return __assign.apply(this, arguments);
147
+ };
148
+ function __rest(s, e) {
149
+ var t = {};
150
+ for (var p in s)
151
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
152
+ t[p] = s[p];
153
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
154
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
155
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
156
+ t[p[i]] = s[p[i]];
157
+ }
158
+ return t;
159
+ }
160
+ function __decorate(decorators, target, key, desc) {
161
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
162
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
163
+ r = Reflect.decorate(decorators, target, key, desc);
164
+ else
165
+ for (var i = decorators.length - 1; i >= 0; i--)
166
+ if (d = decorators[i])
167
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
168
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
169
+ }
170
+ function __param(paramIndex, decorator) {
171
+ return function (target, key) { decorator(target, key, paramIndex); };
172
+ }
173
+ function __metadata(metadataKey, metadataValue) {
174
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
175
+ return Reflect.metadata(metadataKey, metadataValue);
176
+ }
177
+ function __awaiter(thisArg, _arguments, P, generator) {
178
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
179
+ return new (P || (P = Promise))(function (resolve, reject) {
180
+ function fulfilled(value) { try {
181
+ step(generator.next(value));
182
+ }
183
+ catch (e) {
184
+ reject(e);
185
+ } }
186
+ function rejected(value) { try {
187
+ step(generator["throw"](value));
188
+ }
189
+ catch (e) {
190
+ reject(e);
191
+ } }
192
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
193
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
194
+ });
195
+ }
196
+ function __generator(thisArg, body) {
197
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
198
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
199
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
200
+ function verb(n) { return function (v) { return step([n, v]); }; }
201
+ function step(op) {
202
+ if (f)
203
+ throw new TypeError("Generator is already executing.");
204
+ while (_)
205
+ try {
206
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
207
+ return t;
208
+ if (y = 0, t)
209
+ op = [op[0] & 2, t.value];
210
+ switch (op[0]) {
211
+ case 0:
212
+ case 1:
213
+ t = op;
214
+ break;
215
+ case 4:
216
+ _.label++;
217
+ return { value: op[1], done: false };
218
+ case 5:
219
+ _.label++;
220
+ y = op[1];
221
+ op = [0];
222
+ continue;
223
+ case 7:
224
+ op = _.ops.pop();
225
+ _.trys.pop();
226
+ continue;
227
+ default:
228
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
229
+ _ = 0;
230
+ continue;
231
+ }
232
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
233
+ _.label = op[1];
234
+ break;
235
+ }
236
+ if (op[0] === 6 && _.label < t[1]) {
237
+ _.label = t[1];
238
+ t = op;
239
+ break;
240
+ }
241
+ if (t && _.label < t[2]) {
242
+ _.label = t[2];
243
+ _.ops.push(op);
244
+ break;
245
+ }
246
+ if (t[2])
247
+ _.ops.pop();
248
+ _.trys.pop();
249
+ continue;
250
+ }
251
+ op = body.call(thisArg, _);
252
+ }
253
+ catch (e) {
254
+ op = [6, e];
255
+ y = 0;
256
+ }
257
+ finally {
258
+ f = t = 0;
259
+ }
260
+ if (op[0] & 5)
261
+ throw op[1];
262
+ return { value: op[0] ? op[1] : void 0, done: true };
263
+ }
264
+ }
265
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
266
+ if (k2 === undefined)
267
+ k2 = k;
268
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
269
+ }) : (function (o, m, k, k2) {
270
+ if (k2 === undefined)
271
+ k2 = k;
272
+ o[k2] = m[k];
273
+ });
274
+ function __exportStar(m, o) {
275
+ for (var p in m)
276
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
277
+ __createBinding(o, m, p);
278
+ }
279
+ function __values(o) {
280
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
281
+ if (m)
282
+ return m.call(o);
283
+ if (o && typeof o.length === "number")
284
+ return {
285
+ next: function () {
286
+ if (o && i >= o.length)
287
+ o = void 0;
288
+ return { value: o && o[i++], done: !o };
289
+ }
290
+ };
291
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
292
+ }
293
+ function __read(o, n) {
294
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
295
+ if (!m)
296
+ return o;
297
+ var i = m.call(o), r, ar = [], e;
298
+ try {
299
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
300
+ ar.push(r.value);
301
+ }
302
+ catch (error) {
303
+ e = { error: error };
304
+ }
305
+ finally {
306
+ try {
307
+ if (r && !r.done && (m = i["return"]))
308
+ m.call(i);
309
+ }
310
+ finally {
311
+ if (e)
312
+ throw e.error;
313
+ }
314
+ }
315
+ return ar;
316
+ }
317
+ function __spread() {
318
+ for (var ar = [], i = 0; i < arguments.length; i++)
319
+ ar = ar.concat(__read(arguments[i]));
320
+ return ar;
321
+ }
322
+ function __spreadArrays() {
323
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
324
+ s += arguments[i].length;
325
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
326
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
327
+ r[k] = a[j];
328
+ return r;
329
+ }
330
+ ;
331
+ function __await(v) {
332
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
333
+ }
334
+ function __asyncGenerator(thisArg, _arguments, generator) {
335
+ if (!Symbol.asyncIterator)
336
+ throw new TypeError("Symbol.asyncIterator is not defined.");
337
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
338
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
339
+ function verb(n) { if (g[n])
340
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
341
+ function resume(n, v) { try {
342
+ step(g[n](v));
343
+ }
344
+ catch (e) {
345
+ settle(q[0][3], e);
346
+ } }
347
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
348
+ function fulfill(value) { resume("next", value); }
349
+ function reject(value) { resume("throw", value); }
350
+ function settle(f, v) { if (f(v), q.shift(), q.length)
351
+ resume(q[0][0], q[0][1]); }
352
+ }
353
+ function __asyncDelegator(o) {
354
+ var i, p;
355
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
356
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
357
+ }
358
+ function __asyncValues(o) {
359
+ if (!Symbol.asyncIterator)
360
+ throw new TypeError("Symbol.asyncIterator is not defined.");
361
+ var m = o[Symbol.asyncIterator], i;
362
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
363
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
364
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
365
+ }
366
+ function __makeTemplateObject(cooked, raw) {
367
+ if (Object.defineProperty) {
368
+ Object.defineProperty(cooked, "raw", { value: raw });
369
+ }
370
+ else {
371
+ cooked.raw = raw;
372
+ }
373
+ return cooked;
374
+ }
375
+ ;
376
+ var __setModuleDefault = Object.create ? (function (o, v) {
377
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
378
+ }) : function (o, v) {
379
+ o["default"] = v;
380
+ };
381
+ function __importStar(mod) {
382
+ if (mod && mod.__esModule)
383
+ return mod;
384
+ var result = {};
385
+ if (mod != null)
386
+ for (var k in mod)
387
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
388
+ __createBinding(result, mod, k);
389
+ __setModuleDefault(result, mod);
390
+ return result;
391
+ }
392
+ function __importDefault(mod) {
393
+ return (mod && mod.__esModule) ? mod : { default: mod };
394
+ }
395
+ function __classPrivateFieldGet(receiver, privateMap) {
396
+ if (!privateMap.has(receiver)) {
397
+ throw new TypeError("attempted to get private field on non-instance");
398
+ }
399
+ return privateMap.get(receiver);
400
+ }
401
+ function __classPrivateFieldSet(receiver, privateMap, value) {
402
+ if (!privateMap.has(receiver)) {
403
+ throw new TypeError("attempted to set private field on non-instance");
404
+ }
405
+ privateMap.set(receiver, value);
406
+ return value;
407
+ }
320
408
 
321
409
  /**
322
410
  * A `ComponentPortal` is a portal that instantiates some Component upon attachment.
@@ -344,7 +432,7 @@
344
432
  get: function () {
345
433
  return this._attachedHost != null;
346
434
  },
347
- enumerable: true,
435
+ enumerable: false,
348
436
  configurable: true
349
437
  });
350
438
  /**
@@ -470,16 +558,15 @@
470
558
  this._document.body.appendChild(container);
471
559
  this._containerElement = container;
472
560
  };
473
- OverlayContainer.ctorParameters = function () { return [
474
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
475
- ]; };
476
- OverlayContainer.ɵprov = core.ɵɵdefineInjectable({ factory: function OverlayContainer_Factory() { return new OverlayContainer(core.ɵɵinject(common.DOCUMENT)); }, token: OverlayContainer, providedIn: "root" });
477
- OverlayContainer = __decorate([
478
- core.Injectable({ providedIn: 'root' }),
479
- __param(0, core.Inject(common.DOCUMENT))
480
- ], OverlayContainer);
481
561
  return OverlayContainer;
482
562
  }());
563
+ OverlayContainer.ɵprov = i0.ɵɵdefineInjectable({ factory: function OverlayContainer_Factory() { return new OverlayContainer(i0.ɵɵinject(i1.DOCUMENT)); }, token: OverlayContainer, providedIn: "root" });
564
+ OverlayContainer.decorators = [
565
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
566
+ ];
567
+ OverlayContainer.ctorParameters = function () { return [
568
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }
569
+ ]; };
483
570
 
484
571
  /**
485
572
  * Reference to an overlay that has been created with the Overlay service.
@@ -503,6 +590,7 @@
503
590
  return OverlayRef;
504
591
  }());
505
592
 
593
+ /* tslint:disable:no-non-null-assertion */
506
594
  /**
507
595
  * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be
508
596
  * used as a low-level building building block for other components. Dialogs, tooltips, menus,
@@ -570,19 +658,18 @@
570
658
  Overlay.prototype._createOverlayRef = function (pane) {
571
659
  return new OverlayRef(this._createPortalHost(pane));
572
660
  };
573
- Overlay.ctorParameters = function () { return [
574
- { type: OverlayContainer },
575
- { type: core.ComponentFactoryResolver },
576
- { type: core.ApplicationRef },
577
- { type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] }
578
- ]; };
579
- Overlay.ɵprov = core.ɵɵdefineInjectable({ factory: function Overlay_Factory() { return new Overlay(core.ɵɵinject(OverlayContainer), core.ɵɵinject(core.ComponentFactoryResolver), core.ɵɵinject(core.ApplicationRef), core.ɵɵinject(common.DOCUMENT)); }, token: Overlay, providedIn: "root" });
580
- Overlay = __decorate([
581
- core.Injectable({ providedIn: 'root' }),
582
- __param(3, core.Inject(common.DOCUMENT))
583
- ], Overlay);
584
661
  return Overlay;
585
662
  }());
663
+ Overlay.ɵprov = i0.ɵɵdefineInjectable({ factory: function Overlay_Factory() { return new Overlay(i0.ɵɵinject(OverlayContainer), i0.ɵɵinject(i0.ComponentFactoryResolver), i0.ɵɵinject(i0.ApplicationRef), i0.ɵɵinject(i1.DOCUMENT)); }, token: Overlay, providedIn: "root" });
664
+ Overlay.decorators = [
665
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
666
+ ];
667
+ Overlay.ctorParameters = function () { return [
668
+ { type: OverlayContainer },
669
+ { type: i0.ComponentFactoryResolver },
670
+ { type: i0.ApplicationRef },
671
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i1.DOCUMENT,] }] }
672
+ ]; };
586
673
 
587
674
  /**
588
675
  * Reference to a toast opened via the Toastr service.
@@ -679,9 +766,9 @@
679
766
  this.currentlyActive = 0;
680
767
  this.toasts = [];
681
768
  this.index = 0;
682
- this.toastrConfig = __assign(__assign({}, token.default), token.config);
769
+ this.toastrConfig = Object.assign(Object.assign({}, token.default), token.config);
683
770
  if (token.config.iconClasses) {
684
- this.toastrConfig.iconClasses = __assign(__assign({}, token.default.iconClasses), token.config.iconClasses);
771
+ this.toastrConfig.iconClasses = Object.assign(Object.assign({}, token.default.iconClasses), token.config.iconClasses);
685
772
  }
686
773
  }
687
774
  /** show toast */
@@ -756,8 +843,7 @@
756
843
  if (!this.toastrConfig.maxOpened || !this.toasts.length) {
757
844
  return false;
758
845
  }
759
- if (this.currentlyActive < this.toastrConfig.maxOpened &&
760
- this.toasts[this.currentlyActive]) {
846
+ if (this.currentlyActive < this.toastrConfig.maxOpened && this.toasts[this.currentlyActive]) {
761
847
  var p = this.toasts[this.currentlyActive].toastRef;
762
848
  if (!p.isInactive()) {
763
849
  this.currentlyActive = this.currentlyActive + 1;
@@ -769,12 +855,16 @@
769
855
  /**
770
856
  * Determines if toast message is already shown
771
857
  */
772
- ToastrService.prototype.findDuplicate = function (message, resetOnDuplicate, countDuplicates) {
858
+ ToastrService.prototype.findDuplicate = function (title, message, resetOnDuplicate, countDuplicates) {
773
859
  var e_2, _a;
860
+ if (title === void 0) { title = ''; }
861
+ if (message === void 0) { message = ''; }
862
+ var includeTitleDuplicates = this.toastrConfig.includeTitleDuplicates;
774
863
  try {
775
864
  for (var _b = __values(this.toasts), _c = _b.next(); !_c.done; _c = _b.next()) {
776
865
  var toast = _c.value;
777
- if (toast.message === message) {
866
+ var hasDuplicateTitle = includeTitleDuplicates && toast.title === title;
867
+ if ((!includeTitleDuplicates || hasDuplicateTitle) && toast.message === message) {
778
868
  toast.toastRef.onDuplicate(resetOnDuplicate, countDuplicates);
779
869
  return toast;
780
870
  }
@@ -792,7 +882,7 @@
792
882
  /** create a clone of global config and apply individual settings */
793
883
  ToastrService.prototype.applyConfig = function (override) {
794
884
  if (override === void 0) { override = {}; }
795
- return __assign(__assign({}, this.toastrConfig), override);
885
+ return Object.assign(Object.assign({}, this.toastrConfig), override);
796
886
  };
797
887
  /**
798
888
  * Find toast object by id
@@ -811,9 +901,7 @@
811
901
  ToastrService.prototype._preBuildNotification = function (toastType, message, title, config) {
812
902
  var _this = this;
813
903
  if (config.onActivateTick) {
814
- return this.ngZone.run(function () {
815
- return _this._buildNotification(toastType, message, title, config);
816
- });
904
+ return this.ngZone.run(function () { return _this._buildNotification(toastType, message, title, config); });
817
905
  }
818
906
  return this._buildNotification(toastType, message, title, config);
819
907
  };
@@ -828,14 +916,15 @@
828
916
  // max opened and auto dismiss = true
829
917
  // if timeout = 0 resetting it would result in setting this.hideTime = Date.now(). Hence, we only want to reset timeout if there is
830
918
  // a timeout at all
831
- var duplicate = this.findDuplicate(message, this.toastrConfig.resetTimeoutOnDuplicate && config.timeOut > 0, this.toastrConfig.countDuplicates);
832
- if (message && this.toastrConfig.preventDuplicates && duplicate !== null) {
919
+ var duplicate = this.findDuplicate(title, message, this.toastrConfig.resetTimeoutOnDuplicate && config.timeOut > 0, this.toastrConfig.countDuplicates);
920
+ if (((this.toastrConfig.includeTitleDuplicates && title) || message) &&
921
+ this.toastrConfig.preventDuplicates &&
922
+ duplicate !== null) {
833
923
  return duplicate;
834
924
  }
835
925
  this.previousToastMessage = message;
836
926
  var keepInactive = false;
837
- if (this.toastrConfig.maxOpened &&
838
- this.currentlyActive >= this.toastrConfig.maxOpened) {
927
+ if (this.toastrConfig.maxOpened && this.currentlyActive >= this.toastrConfig.maxOpened) {
839
928
  keepInactive = true;
840
929
  if (this.toastrConfig.autoDismiss) {
841
930
  this.clear(this.toasts[0].toastId);
@@ -845,7 +934,7 @@
845
934
  this.index = this.index + 1;
846
935
  var sanitizedMessage = message;
847
936
  if (message && config.enableHtml) {
848
- sanitizedMessage = this.sanitizer.sanitize(core.SecurityContext.HTML, message);
937
+ sanitizedMessage = this.sanitizer.sanitize(i0.SecurityContext.HTML, message);
849
938
  }
850
939
  var toastRef = new ToastRef(overlayRef);
851
940
  var toastPackage = new ToastPackage(this.index, config, sanitizedMessage, title, toastType, toastRef);
@@ -855,13 +944,14 @@
855
944
  toastRef.componentInstance = portal.instance;
856
945
  var ins = {
857
946
  toastId: this.index,
947
+ title: title || '',
858
948
  message: message || '',
859
949
  toastRef: toastRef,
860
950
  onShown: toastRef.afterActivate(),
861
951
  onHidden: toastRef.afterClosed(),
862
952
  onTap: toastPackage.onTap(),
863
953
  onAction: toastPackage.onAction(),
864
- portal: portal
954
+ portal: portal,
865
955
  };
866
956
  if (!keepInactive) {
867
957
  this.currentlyActive = this.currentlyActive + 1;
@@ -872,20 +962,19 @@
872
962
  this.toasts.push(ins);
873
963
  return ins;
874
964
  };
875
- ToastrService.ctorParameters = function () { return [
876
- { type: undefined, decorators: [{ type: core.Inject, args: [TOAST_CONFIG,] }] },
877
- { type: Overlay },
878
- { type: core.Injector },
879
- { type: platformBrowser.DomSanitizer },
880
- { type: core.NgZone }
881
- ]; };
882
- ToastrService.ɵprov = core.ɵɵdefineInjectable({ factory: function ToastrService_Factory() { return new ToastrService(core.ɵɵinject(TOAST_CONFIG), core.ɵɵinject(Overlay), core.ɵɵinject(core.INJECTOR), core.ɵɵinject(platformBrowser.DomSanitizer), core.ɵɵinject(core.NgZone)); }, token: ToastrService, providedIn: "root" });
883
- ToastrService = __decorate([
884
- core.Injectable({ providedIn: 'root' }),
885
- __param(0, core.Inject(TOAST_CONFIG))
886
- ], ToastrService);
887
965
  return ToastrService;
888
966
  }());
967
+ ToastrService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ToastrService_Factory() { return new ToastrService(i0.ɵɵinject(TOAST_CONFIG), i0.ɵɵinject(Overlay), i0.ɵɵinject(i0.INJECTOR), i0.ɵɵinject(i3.DomSanitizer), i0.ɵɵinject(i0.NgZone)); }, token: ToastrService, providedIn: "root" });
968
+ ToastrService.decorators = [
969
+ { type: i0.Injectable, args: [{ providedIn: 'root' },] }
970
+ ];
971
+ ToastrService.ctorParameters = function () { return [
972
+ { type: undefined, decorators: [{ type: i0.Inject, args: [TOAST_CONFIG,] }] },
973
+ { type: Overlay },
974
+ { type: i0.Injector },
975
+ { type: i3.DomSanitizer },
976
+ { type: i0.NgZone }
977
+ ]; };
889
978
 
890
979
  var Toast = /** @class */ (function () {
891
980
  function Toast(toastrService, toastPackage, ngZone) {
@@ -929,8 +1018,9 @@
929
1018
  if (this.state.value === 'inactive') {
930
1019
  return 'none';
931
1020
  }
1021
+ return;
932
1022
  },
933
- enumerable: true,
1023
+ enumerable: false,
934
1024
  configurable: true
935
1025
  });
936
1026
  Toast.prototype.ngOnDestroy = function () {
@@ -946,7 +1036,7 @@
946
1036
  */
947
1037
  Toast.prototype.activateToast = function () {
948
1038
  var _this = this;
949
- this.state = __assign(__assign({}, this.state), { value: 'active' });
1039
+ this.state = Object.assign(Object.assign({}, this.state), { value: 'active' });
950
1040
  if (!(this.options.disableTimeOut === true || this.options.disableTimeOut === 'timeOut') && this.options.timeOut) {
951
1041
  this.outsideTimeout(function () { return _this.remove(); }, this.options.timeOut);
952
1042
  this.hideTime = new Date().getTime() + this.options.timeOut;
@@ -979,7 +1069,7 @@
979
1069
  var _this = this;
980
1070
  clearTimeout(this.timeout);
981
1071
  clearInterval(this.intervalId);
982
- this.state = __assign(__assign({}, this.state), { value: 'active' });
1072
+ this.state = Object.assign(Object.assign({}, this.state), { value: 'active' });
983
1073
  this.outsideTimeout(function () { return _this.remove(); }, this.originalTimeout);
984
1074
  this.options.timeOut = this.originalTimeout;
985
1075
  this.hideTime = new Date().getTime() + (this.options.timeOut || 0);
@@ -997,7 +1087,7 @@
997
1087
  return;
998
1088
  }
999
1089
  clearTimeout(this.timeout);
1000
- this.state = __assign(__assign({}, this.state), { value: 'removed' });
1090
+ this.state = Object.assign(Object.assign({}, this.state), { value: 'removed' });
1001
1091
  this.outsideTimeout(function () { return _this.toastrService.remove(_this.toastPackage.toastId); }, +this.toastPackage.config.easeTime);
1002
1092
  };
1003
1093
  Toast.prototype.tapToast = function () {
@@ -1038,9 +1128,7 @@
1038
1128
  Toast.prototype.outsideTimeout = function (func, timeout) {
1039
1129
  var _this = this;
1040
1130
  if (this.ngZone) {
1041
- this.ngZone.runOutsideAngular(function () {
1042
- return (_this.timeout = setTimeout(function () { return _this.runInsideAngular(func); }, timeout));
1043
- });
1131
+ this.ngZone.runOutsideAngular(function () { return (_this.timeout = setTimeout(function () { return _this.runInsideAngular(func); }, timeout)); });
1044
1132
  }
1045
1133
  else {
1046
1134
  this.timeout = setTimeout(function () { return func(); }, timeout);
@@ -1049,9 +1137,7 @@
1049
1137
  Toast.prototype.outsideInterval = function (func, timeout) {
1050
1138
  var _this = this;
1051
1139
  if (this.ngZone) {
1052
- this.ngZone.runOutsideAngular(function () {
1053
- return (_this.intervalId = setInterval(function () { return _this.runInsideAngular(func); }, timeout));
1054
- });
1140
+ this.ngZone.runOutsideAngular(function () { return (_this.intervalId = setInterval(function () { return _this.runInsideAngular(func); }, timeout)); });
1055
1141
  }
1056
1142
  else {
1057
1143
  this.intervalId = setInterval(function () { return func(); }, timeout);
@@ -1065,57 +1151,46 @@
1065
1151
  func();
1066
1152
  }
1067
1153
  };
1068
- Toast.ctorParameters = function () { return [
1069
- { type: ToastrService },
1070
- { type: ToastPackage },
1071
- { type: core.NgZone }
1072
- ]; };
1073
- __decorate([
1074
- core.HostBinding('class')
1075
- ], Toast.prototype, "toastClasses", void 0);
1076
- __decorate([
1077
- core.HostBinding('@flyInOut')
1078
- ], Toast.prototype, "state", void 0);
1079
- __decorate([
1080
- core.HostBinding('style.display')
1081
- ], Toast.prototype, "displayStyle", null);
1082
- __decorate([
1083
- core.HostListener('click')
1084
- ], Toast.prototype, "tapToast", null);
1085
- __decorate([
1086
- core.HostListener('mouseenter')
1087
- ], Toast.prototype, "stickAround", null);
1088
- __decorate([
1089
- core.HostListener('mouseleave')
1090
- ], Toast.prototype, "delayedHideToast", null);
1091
- Toast = __decorate([
1092
- core.Component({
1093
- selector: '[toast-component]',
1094
- template: "\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\n {{ title }} <ng-container *ngIf=\"duplicatesCount\">[{{ duplicatesCount + 1 }}]</ng-container>\n </div>\n <div *ngIf=\"message && options.enableHtml\" role=\"alertdialog\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [innerHTML]=\"message\">\n </div>\n <div *ngIf=\"message && !options.enableHtml\" role=\"alertdialog\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [attr.aria-label]=\"message\">\n {{ message }}\n </div>\n <div *ngIf=\"options.progressBar\">\n <div class=\"toast-progress\" [style.width]=\"width + '%'\"></div>\n </div>\n ",
1095
- animations: [
1096
- animations.trigger('flyInOut', [
1097
- animations.state('inactive', animations.style({ opacity: 0 })),
1098
- animations.state('active', animations.style({ opacity: 1 })),
1099
- animations.state('removed', animations.style({ opacity: 0 })),
1100
- animations.transition('inactive => active', animations.animate('{{ easeTime }}ms {{ easing }}')),
1101
- animations.transition('active => removed', animations.animate('{{ easeTime }}ms {{ easing }}'))
1102
- ])
1103
- ],
1104
- preserveWhitespaces: false
1105
- })
1106
- ], Toast);
1107
1154
  return Toast;
1108
1155
  }());
1156
+ Toast.decorators = [
1157
+ { type: i0.Component, args: [{
1158
+ selector: '[toast-component]',
1159
+ template: "\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\n {{ title }} <ng-container *ngIf=\"duplicatesCount\">[{{ duplicatesCount + 1 }}]</ng-container>\n </div>\n <div *ngIf=\"message && options.enableHtml\" role=\"alertdialog\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [innerHTML]=\"message\">\n </div>\n <div *ngIf=\"message && !options.enableHtml\" role=\"alertdialog\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [attr.aria-label]=\"message\">\n {{ message }}\n </div>\n <div *ngIf=\"options.progressBar\">\n <div class=\"toast-progress\" [style.width]=\"width + '%'\"></div>\n </div>\n ",
1160
+ animations: [
1161
+ animations.trigger('flyInOut', [
1162
+ animations.state('inactive', animations.style({ opacity: 0 })),
1163
+ animations.state('active', animations.style({ opacity: 1 })),
1164
+ animations.state('removed', animations.style({ opacity: 0 })),
1165
+ animations.transition('inactive => active', animations.animate('{{ easeTime }}ms {{ easing }}')),
1166
+ animations.transition('active => removed', animations.animate('{{ easeTime }}ms {{ easing }}'))
1167
+ ])
1168
+ ],
1169
+ preserveWhitespaces: false
1170
+ },] }
1171
+ ];
1172
+ Toast.ctorParameters = function () { return [
1173
+ { type: ToastrService },
1174
+ { type: ToastPackage },
1175
+ { type: i0.NgZone }
1176
+ ]; };
1177
+ Toast.propDecorators = {
1178
+ toastClasses: [{ type: i0.HostBinding, args: ['class',] }],
1179
+ state: [{ type: i0.HostBinding, args: ['@flyInOut',] }],
1180
+ displayStyle: [{ type: i0.HostBinding, args: ['style.display',] }],
1181
+ tapToast: [{ type: i0.HostListener, args: ['click',] }],
1182
+ stickAround: [{ type: i0.HostListener, args: ['mouseenter',] }],
1183
+ delayedHideToast: [{ type: i0.HostListener, args: ['mouseleave',] }]
1184
+ };
1109
1185
 
1110
- var DefaultGlobalConfig = __assign(__assign({}, DefaultNoComponentGlobalConfig), { toastComponent: Toast });
1186
+ var DefaultGlobalConfig = Object.assign(Object.assign({}, DefaultNoComponentGlobalConfig), { toastComponent: Toast });
1111
1187
  var ToastrModule = /** @class */ (function () {
1112
1188
  function ToastrModule() {
1113
1189
  }
1114
- ToastrModule_1 = ToastrModule;
1115
1190
  ToastrModule.forRoot = function (config) {
1116
1191
  if (config === void 0) { config = {}; }
1117
1192
  return {
1118
- ngModule: ToastrModule_1,
1193
+ ngModule: ToastrModule,
1119
1194
  providers: [
1120
1195
  {
1121
1196
  provide: TOAST_CONFIG,
@@ -1127,17 +1202,16 @@
1127
1202
  ],
1128
1203
  };
1129
1204
  };
1130
- var ToastrModule_1;
1131
- ToastrModule = ToastrModule_1 = __decorate([
1132
- core.NgModule({
1133
- imports: [common.CommonModule],
1134
- declarations: [Toast],
1135
- exports: [Toast],
1136
- entryComponents: [Toast],
1137
- })
1138
- ], ToastrModule);
1139
1205
  return ToastrModule;
1140
1206
  }());
1207
+ ToastrModule.decorators = [
1208
+ { type: i0.NgModule, args: [{
1209
+ imports: [i1.CommonModule],
1210
+ declarations: [Toast],
1211
+ exports: [Toast],
1212
+ entryComponents: [Toast],
1213
+ },] }
1214
+ ];
1141
1215
  var ToastrComponentlessModule = /** @class */ (function () {
1142
1216
  function ToastrComponentlessModule() {
1143
1217
  }
@@ -1156,13 +1230,13 @@
1156
1230
  ],
1157
1231
  };
1158
1232
  };
1159
- ToastrComponentlessModule = __decorate([
1160
- core.NgModule({
1161
- imports: [common.CommonModule],
1162
- })
1163
- ], ToastrComponentlessModule);
1164
1233
  return ToastrComponentlessModule;
1165
1234
  }());
1235
+ ToastrComponentlessModule.decorators = [
1236
+ { type: i0.NgModule, args: [{
1237
+ imports: [i1.CommonModule],
1238
+ },] }
1239
+ ];
1166
1240
 
1167
1241
  var ToastNoAnimation = /** @class */ (function () {
1168
1242
  function ToastNoAnimation(toastrService, toastPackage, appRef) {
@@ -1201,7 +1275,7 @@
1201
1275
  return 'none';
1202
1276
  }
1203
1277
  },
1204
- enumerable: true,
1278
+ enumerable: false,
1205
1279
  configurable: true
1206
1280
  });
1207
1281
  ToastNoAnimation.prototype.ngOnDestroy = function () {
@@ -1274,9 +1348,7 @@
1274
1348
  }
1275
1349
  clearTimeout(this.timeout);
1276
1350
  this.state = 'removed';
1277
- this.timeout = setTimeout(function () {
1278
- return _this.toastrService.remove(_this.toastPackage.toastId);
1279
- });
1351
+ this.timeout = setTimeout(function () { return _this.toastrService.remove(_this.toastPackage.toastId); });
1280
1352
  };
1281
1353
  ToastNoAnimation.prototype.tapToast = function () {
1282
1354
  if (this.state === 'removed') {
@@ -1313,43 +1385,34 @@
1313
1385
  this.intervalId = setInterval(function () { return _this.updateProgress(); }, 10);
1314
1386
  }
1315
1387
  };
1316
- ToastNoAnimation.ctorParameters = function () { return [
1317
- { type: ToastrService },
1318
- { type: ToastPackage },
1319
- { type: core.ApplicationRef }
1320
- ]; };
1321
- __decorate([
1322
- core.HostBinding('class')
1323
- ], ToastNoAnimation.prototype, "toastClasses", void 0);
1324
- __decorate([
1325
- core.HostBinding('style.display')
1326
- ], ToastNoAnimation.prototype, "displayStyle", null);
1327
- __decorate([
1328
- core.HostListener('click')
1329
- ], ToastNoAnimation.prototype, "tapToast", null);
1330
- __decorate([
1331
- core.HostListener('mouseenter')
1332
- ], ToastNoAnimation.prototype, "stickAround", null);
1333
- __decorate([
1334
- core.HostListener('mouseleave')
1335
- ], ToastNoAnimation.prototype, "delayedHideToast", null);
1336
- ToastNoAnimation = __decorate([
1337
- core.Component({
1338
- selector: '[toast-component]',
1339
- template: "\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\n {{ title }} <ng-container *ngIf=\"duplicatesCount\">[{{ duplicatesCount + 1 }}]</ng-container>\n </div>\n <div *ngIf=\"message && options.enableHtml\" role=\"alert\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [innerHTML]=\"message\">\n </div>\n <div *ngIf=\"message && !options.enableHtml\" role=\"alert\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [attr.aria-label]=\"message\">\n {{ message }}\n </div>\n <div *ngIf=\"options.progressBar\">\n <div class=\"toast-progress\" [style.width]=\"width + '%'\"></div>\n </div>\n "
1340
- })
1341
- ], ToastNoAnimation);
1342
1388
  return ToastNoAnimation;
1343
1389
  }());
1344
- var DefaultNoAnimationsGlobalConfig = __assign(__assign({}, DefaultNoComponentGlobalConfig), { toastComponent: ToastNoAnimation });
1390
+ ToastNoAnimation.decorators = [
1391
+ { type: i0.Component, args: [{
1392
+ selector: '[toast-component]',
1393
+ template: "\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\n {{ title }} <ng-container *ngIf=\"duplicatesCount\">[{{ duplicatesCount + 1 }}]</ng-container>\n </div>\n <div *ngIf=\"message && options.enableHtml\" role=\"alert\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [innerHTML]=\"message\">\n </div>\n <div *ngIf=\"message && !options.enableHtml\" role=\"alert\" aria-live=\"polite\"\n [class]=\"options.messageClass\" [attr.aria-label]=\"message\">\n {{ message }}\n </div>\n <div *ngIf=\"options.progressBar\">\n <div class=\"toast-progress\" [style.width]=\"width + '%'\"></div>\n </div>\n "
1394
+ },] }
1395
+ ];
1396
+ ToastNoAnimation.ctorParameters = function () { return [
1397
+ { type: ToastrService },
1398
+ { type: ToastPackage },
1399
+ { type: i0.ApplicationRef }
1400
+ ]; };
1401
+ ToastNoAnimation.propDecorators = {
1402
+ toastClasses: [{ type: i0.HostBinding, args: ['class',] }],
1403
+ displayStyle: [{ type: i0.HostBinding, args: ['style.display',] }],
1404
+ tapToast: [{ type: i0.HostListener, args: ['click',] }],
1405
+ stickAround: [{ type: i0.HostListener, args: ['mouseenter',] }],
1406
+ delayedHideToast: [{ type: i0.HostListener, args: ['mouseleave',] }]
1407
+ };
1408
+ var DefaultNoAnimationsGlobalConfig = Object.assign(Object.assign({}, DefaultNoComponentGlobalConfig), { toastComponent: ToastNoAnimation });
1345
1409
  var ToastNoAnimationModule = /** @class */ (function () {
1346
1410
  function ToastNoAnimationModule() {
1347
1411
  }
1348
- ToastNoAnimationModule_1 = ToastNoAnimationModule;
1349
1412
  ToastNoAnimationModule.forRoot = function (config) {
1350
1413
  if (config === void 0) { config = {}; }
1351
1414
  return {
1352
- ngModule: ToastNoAnimationModule_1,
1415
+ ngModule: ToastNoAnimationModule,
1353
1416
  providers: [
1354
1417
  {
1355
1418
  provide: TOAST_CONFIG,
@@ -1361,17 +1424,20 @@
1361
1424
  ],
1362
1425
  };
1363
1426
  };
1364
- var ToastNoAnimationModule_1;
1365
- ToastNoAnimationModule = ToastNoAnimationModule_1 = __decorate([
1366
- core.NgModule({
1367
- imports: [common.CommonModule],
1368
- declarations: [ToastNoAnimation],
1369
- exports: [ToastNoAnimation],
1370
- entryComponents: [ToastNoAnimation],
1371
- })
1372
- ], ToastNoAnimationModule);
1373
1427
  return ToastNoAnimationModule;
1374
1428
  }());
1429
+ ToastNoAnimationModule.decorators = [
1430
+ { type: i0.NgModule, args: [{
1431
+ imports: [i1.CommonModule],
1432
+ declarations: [ToastNoAnimation],
1433
+ exports: [ToastNoAnimation],
1434
+ entryComponents: [ToastNoAnimation],
1435
+ },] }
1436
+ ];
1437
+
1438
+ /**
1439
+ * Generated bundle index. Do not edit.
1440
+ */
1375
1441
 
1376
1442
  exports.BasePortalHost = BasePortalHost;
1377
1443
  exports.ComponentPortal = ComponentPortal;