@smart-webcomponents-angular/toast 9.2.73 → 13.0.10
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 +10 -2
- package/common/i18n.phonenumbers.min.js +501 -0
- package/common/runtime.js +748 -0
- package/esm2020/toast/index.mjs +2 -0
- package/{esm2015/toast/public_api.js → esm2020/toast/public_api.mjs} +1 -1
- package/{esm2015/toast/smart-webcomponents-angular-toast.js → esm2020/toast/smart-webcomponents-angular-toast.mjs} +2 -3
- package/esm2020/toast/smart.element.mjs +96 -0
- package/esm2020/toast/smart.toast.mjs +376 -0
- package/esm2020/toast/smart.toast.module.mjs +18 -0
- package/fesm2015/{smart-webcomponents-angular-toast.js → smart-webcomponents-angular-toast.mjs} +107 -64
- package/fesm2015/smart-webcomponents-angular-toast.mjs.map +1 -0
- package/fesm2020/smart-webcomponents-angular-toast.mjs +498 -0
- package/fesm2020/smart-webcomponents-angular-toast.mjs.map +1 -0
- package/images/flags.png +0 -0
- package/index.d.ts +31835 -28915
- package/package.json +26 -24
- package/source/modules/smart.toast.js +1 -1
- package/source/smart.button.js +2 -2
- package/source/smart.element.js +2 -2
- package/source/smart.toast.js +2 -2
- package/styles/font/smart-icons.eot +0 -0
- package/styles/font/smart-icons.svg +64 -2
- package/styles/font/smart-icons.ttf +0 -0
- package/styles/font/smart-icons.woff +0 -0
- package/styles/font/smart-icons.woff2 +0 -0
- package/styles/smart.base.css +4 -4
- package/styles/smart.common.css +1 -1
- package/styles/smart.toast.css +1 -1
- package/toast/index.d.ts +1 -0
- package/toast/smart-webcomponents-angular-toast.d.ts +2 -2
- package/toast/smart.element.d.ts +4 -1
- package/toast/smart.toast.d.ts +4 -1
- package/toast/smart.toast.module.d.ts +5 -0
- package/bundles/smart-webcomponents-angular-toast.umd.js +0 -907
- package/bundles/smart-webcomponents-angular-toast.umd.min.js +0 -25
- package/esm2015/toast/smart.element.js +0 -83
- package/esm2015/toast/smart.toast.js +0 -352
- package/esm2015/toast/smart.toast.module.js +0 -13
- package/fesm2015/smart-webcomponents-angular-toast.js.map +0 -1
- package/toast/smart-webcomponents-angular-toast.metadata.json +0 -1
|
@@ -1,907 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
if (!window['Smart']) {
|
|
3
|
-
window['Smart'] = { RenderMode: 'manual' };
|
|
4
|
-
}
|
|
5
|
-
else {
|
|
6
|
-
window['Smart'].RenderMode = 'manual';
|
|
7
|
-
}
|
|
8
|
-
import './../source/modules/smart.toast';
|
|
9
|
-
|
|
10
|
-
(function (global, factory) {
|
|
11
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core')) :
|
|
12
|
-
typeof define === 'function' && define.amd ? define('smart-webcomponents-angular/toast', ['exports', '@angular/core'], factory) :
|
|
13
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global['smart-webcomponents-angular'] = global['smart-webcomponents-angular'] || {}, global['smart-webcomponents-angular'].toast = {}), global.ng.core));
|
|
14
|
-
}(this, (function (exports, core) { 'use strict';
|
|
15
|
-
|
|
16
|
-
/*! *****************************************************************************
|
|
17
|
-
Copyright (c) Microsoft Corporation.
|
|
18
|
-
|
|
19
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
20
|
-
purpose with or without fee is hereby granted.
|
|
21
|
-
|
|
22
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
23
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
24
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
25
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
26
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
27
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
28
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
29
|
-
***************************************************************************** */
|
|
30
|
-
/* global Reflect, Promise */
|
|
31
|
-
var extendStatics = function (d, b) {
|
|
32
|
-
extendStatics = Object.setPrototypeOf ||
|
|
33
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
34
|
-
function (d, b) { for (var p in b)
|
|
35
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
36
|
-
d[p] = b[p]; };
|
|
37
|
-
return extendStatics(d, b);
|
|
38
|
-
};
|
|
39
|
-
function __extends(d, b) {
|
|
40
|
-
if (typeof b !== "function" && b !== null)
|
|
41
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
42
|
-
extendStatics(d, b);
|
|
43
|
-
function __() { this.constructor = d; }
|
|
44
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
45
|
-
}
|
|
46
|
-
var __assign = function () {
|
|
47
|
-
__assign = Object.assign || function __assign(t) {
|
|
48
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
49
|
-
s = arguments[i];
|
|
50
|
-
for (var p in s)
|
|
51
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
52
|
-
t[p] = s[p];
|
|
53
|
-
}
|
|
54
|
-
return t;
|
|
55
|
-
};
|
|
56
|
-
return __assign.apply(this, arguments);
|
|
57
|
-
};
|
|
58
|
-
function __rest(s, e) {
|
|
59
|
-
var t = {};
|
|
60
|
-
for (var p in s)
|
|
61
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
62
|
-
t[p] = s[p];
|
|
63
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
64
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
65
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
66
|
-
t[p[i]] = s[p[i]];
|
|
67
|
-
}
|
|
68
|
-
return t;
|
|
69
|
-
}
|
|
70
|
-
function __decorate(decorators, target, key, desc) {
|
|
71
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
72
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
73
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
74
|
-
else
|
|
75
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
76
|
-
if (d = decorators[i])
|
|
77
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
78
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
79
|
-
}
|
|
80
|
-
function __param(paramIndex, decorator) {
|
|
81
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
82
|
-
}
|
|
83
|
-
function __metadata(metadataKey, metadataValue) {
|
|
84
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
85
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
86
|
-
}
|
|
87
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
88
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
89
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
90
|
-
function fulfilled(value) { try {
|
|
91
|
-
step(generator.next(value));
|
|
92
|
-
}
|
|
93
|
-
catch (e) {
|
|
94
|
-
reject(e);
|
|
95
|
-
} }
|
|
96
|
-
function rejected(value) { try {
|
|
97
|
-
step(generator["throw"](value));
|
|
98
|
-
}
|
|
99
|
-
catch (e) {
|
|
100
|
-
reject(e);
|
|
101
|
-
} }
|
|
102
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
103
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
function __generator(thisArg, body) {
|
|
107
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
108
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
109
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
110
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
111
|
-
function step(op) {
|
|
112
|
-
if (f)
|
|
113
|
-
throw new TypeError("Generator is already executing.");
|
|
114
|
-
while (_)
|
|
115
|
-
try {
|
|
116
|
-
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)
|
|
117
|
-
return t;
|
|
118
|
-
if (y = 0, t)
|
|
119
|
-
op = [op[0] & 2, t.value];
|
|
120
|
-
switch (op[0]) {
|
|
121
|
-
case 0:
|
|
122
|
-
case 1:
|
|
123
|
-
t = op;
|
|
124
|
-
break;
|
|
125
|
-
case 4:
|
|
126
|
-
_.label++;
|
|
127
|
-
return { value: op[1], done: false };
|
|
128
|
-
case 5:
|
|
129
|
-
_.label++;
|
|
130
|
-
y = op[1];
|
|
131
|
-
op = [0];
|
|
132
|
-
continue;
|
|
133
|
-
case 7:
|
|
134
|
-
op = _.ops.pop();
|
|
135
|
-
_.trys.pop();
|
|
136
|
-
continue;
|
|
137
|
-
default:
|
|
138
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
139
|
-
_ = 0;
|
|
140
|
-
continue;
|
|
141
|
-
}
|
|
142
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
143
|
-
_.label = op[1];
|
|
144
|
-
break;
|
|
145
|
-
}
|
|
146
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
147
|
-
_.label = t[1];
|
|
148
|
-
t = op;
|
|
149
|
-
break;
|
|
150
|
-
}
|
|
151
|
-
if (t && _.label < t[2]) {
|
|
152
|
-
_.label = t[2];
|
|
153
|
-
_.ops.push(op);
|
|
154
|
-
break;
|
|
155
|
-
}
|
|
156
|
-
if (t[2])
|
|
157
|
-
_.ops.pop();
|
|
158
|
-
_.trys.pop();
|
|
159
|
-
continue;
|
|
160
|
-
}
|
|
161
|
-
op = body.call(thisArg, _);
|
|
162
|
-
}
|
|
163
|
-
catch (e) {
|
|
164
|
-
op = [6, e];
|
|
165
|
-
y = 0;
|
|
166
|
-
}
|
|
167
|
-
finally {
|
|
168
|
-
f = t = 0;
|
|
169
|
-
}
|
|
170
|
-
if (op[0] & 5)
|
|
171
|
-
throw op[1];
|
|
172
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
176
|
-
if (k2 === undefined)
|
|
177
|
-
k2 = k;
|
|
178
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
179
|
-
}) : (function (o, m, k, k2) {
|
|
180
|
-
if (k2 === undefined)
|
|
181
|
-
k2 = k;
|
|
182
|
-
o[k2] = m[k];
|
|
183
|
-
});
|
|
184
|
-
function __exportStar(m, o) {
|
|
185
|
-
for (var p in m)
|
|
186
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
187
|
-
__createBinding(o, m, p);
|
|
188
|
-
}
|
|
189
|
-
function __values(o) {
|
|
190
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
191
|
-
if (m)
|
|
192
|
-
return m.call(o);
|
|
193
|
-
if (o && typeof o.length === "number")
|
|
194
|
-
return {
|
|
195
|
-
next: function () {
|
|
196
|
-
if (o && i >= o.length)
|
|
197
|
-
o = void 0;
|
|
198
|
-
return { value: o && o[i++], done: !o };
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
202
|
-
}
|
|
203
|
-
function __read(o, n) {
|
|
204
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
205
|
-
if (!m)
|
|
206
|
-
return o;
|
|
207
|
-
var i = m.call(o), r, ar = [], e;
|
|
208
|
-
try {
|
|
209
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
210
|
-
ar.push(r.value);
|
|
211
|
-
}
|
|
212
|
-
catch (error) {
|
|
213
|
-
e = { error: error };
|
|
214
|
-
}
|
|
215
|
-
finally {
|
|
216
|
-
try {
|
|
217
|
-
if (r && !r.done && (m = i["return"]))
|
|
218
|
-
m.call(i);
|
|
219
|
-
}
|
|
220
|
-
finally {
|
|
221
|
-
if (e)
|
|
222
|
-
throw e.error;
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
return ar;
|
|
226
|
-
}
|
|
227
|
-
/** @deprecated */
|
|
228
|
-
function __spread() {
|
|
229
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
230
|
-
ar = ar.concat(__read(arguments[i]));
|
|
231
|
-
return ar;
|
|
232
|
-
}
|
|
233
|
-
/** @deprecated */
|
|
234
|
-
function __spreadArrays() {
|
|
235
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
236
|
-
s += arguments[i].length;
|
|
237
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
238
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
239
|
-
r[k] = a[j];
|
|
240
|
-
return r;
|
|
241
|
-
}
|
|
242
|
-
function __spreadArray(to, from) {
|
|
243
|
-
for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
|
|
244
|
-
to[j] = from[i];
|
|
245
|
-
return to;
|
|
246
|
-
}
|
|
247
|
-
function __await(v) {
|
|
248
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
249
|
-
}
|
|
250
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
251
|
-
if (!Symbol.asyncIterator)
|
|
252
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
253
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
254
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
255
|
-
function verb(n) { if (g[n])
|
|
256
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
257
|
-
function resume(n, v) { try {
|
|
258
|
-
step(g[n](v));
|
|
259
|
-
}
|
|
260
|
-
catch (e) {
|
|
261
|
-
settle(q[0][3], e);
|
|
262
|
-
} }
|
|
263
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
264
|
-
function fulfill(value) { resume("next", value); }
|
|
265
|
-
function reject(value) { resume("throw", value); }
|
|
266
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
267
|
-
resume(q[0][0], q[0][1]); }
|
|
268
|
-
}
|
|
269
|
-
function __asyncDelegator(o) {
|
|
270
|
-
var i, p;
|
|
271
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
272
|
-
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; }
|
|
273
|
-
}
|
|
274
|
-
function __asyncValues(o) {
|
|
275
|
-
if (!Symbol.asyncIterator)
|
|
276
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
277
|
-
var m = o[Symbol.asyncIterator], i;
|
|
278
|
-
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);
|
|
279
|
-
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); }); }; }
|
|
280
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
281
|
-
}
|
|
282
|
-
function __makeTemplateObject(cooked, raw) {
|
|
283
|
-
if (Object.defineProperty) {
|
|
284
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
cooked.raw = raw;
|
|
288
|
-
}
|
|
289
|
-
return cooked;
|
|
290
|
-
}
|
|
291
|
-
;
|
|
292
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
293
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
294
|
-
}) : function (o, v) {
|
|
295
|
-
o["default"] = v;
|
|
296
|
-
};
|
|
297
|
-
function __importStar(mod) {
|
|
298
|
-
if (mod && mod.__esModule)
|
|
299
|
-
return mod;
|
|
300
|
-
var result = {};
|
|
301
|
-
if (mod != null)
|
|
302
|
-
for (var k in mod)
|
|
303
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
304
|
-
__createBinding(result, mod, k);
|
|
305
|
-
__setModuleDefault(result, mod);
|
|
306
|
-
return result;
|
|
307
|
-
}
|
|
308
|
-
function __importDefault(mod) {
|
|
309
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
310
|
-
}
|
|
311
|
-
function __classPrivateFieldGet(receiver, privateMap) {
|
|
312
|
-
if (!privateMap.has(receiver)) {
|
|
313
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
314
|
-
}
|
|
315
|
-
return privateMap.get(receiver);
|
|
316
|
-
}
|
|
317
|
-
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
318
|
-
if (!privateMap.has(receiver)) {
|
|
319
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
320
|
-
}
|
|
321
|
-
privateMap.set(receiver, value);
|
|
322
|
-
return value;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
var BaseElement = /** @class */ (function () {
|
|
326
|
-
function BaseElement(ref) {
|
|
327
|
-
this.onCreate = new core.EventEmitter();
|
|
328
|
-
this.onReady = new core.EventEmitter();
|
|
329
|
-
this.onAttach = new core.EventEmitter();
|
|
330
|
-
this.onDetach = new core.EventEmitter();
|
|
331
|
-
var that = this;
|
|
332
|
-
this.nativeElement = ref.nativeElement;
|
|
333
|
-
that.nativeElement.onAttached = function () {
|
|
334
|
-
that.onAttach.emit(that.nativeElement);
|
|
335
|
-
};
|
|
336
|
-
that.nativeElement.onDetached = function () {
|
|
337
|
-
that.onDetach.emit(that.nativeElement);
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
BaseElement.prototype.addEventListener = function (type, listener, options) {
|
|
341
|
-
if (options === void 0) { options = false; }
|
|
342
|
-
this.nativeElement.addEventListener(type, listener, options);
|
|
343
|
-
};
|
|
344
|
-
BaseElement.prototype.removeEventListener = function (type, listener, options) {
|
|
345
|
-
if (options === void 0) { options = false; }
|
|
346
|
-
this.nativeElement.removeEventListener(type, listener, options);
|
|
347
|
-
};
|
|
348
|
-
BaseElement.prototype.dispatchEvent = function (event) {
|
|
349
|
-
return this.nativeElement.dispatchEvent(event);
|
|
350
|
-
};
|
|
351
|
-
BaseElement.prototype.blur = function () {
|
|
352
|
-
this.nativeElement.blur();
|
|
353
|
-
};
|
|
354
|
-
BaseElement.prototype.click = function () {
|
|
355
|
-
this.nativeElement.click();
|
|
356
|
-
};
|
|
357
|
-
BaseElement.prototype.focus = function (options) {
|
|
358
|
-
this.nativeElement.focus(options);
|
|
359
|
-
};
|
|
360
|
-
Object.defineProperty(BaseElement.prototype, "locale", {
|
|
361
|
-
/** @description Sets or gets the language. Used in conjunction with the property messages. */
|
|
362
|
-
get: function () {
|
|
363
|
-
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
364
|
-
},
|
|
365
|
-
set: function (value) {
|
|
366
|
-
this.nativeElement ? this.nativeElement.locale = value : undefined;
|
|
367
|
-
},
|
|
368
|
-
enumerable: false,
|
|
369
|
-
configurable: true
|
|
370
|
-
});
|
|
371
|
-
Object.defineProperty(BaseElement.prototype, "localizeFormatFunction", {
|
|
372
|
-
/** @description Callback used to customize the format of the messages that are returned from the Localization Module. */
|
|
373
|
-
get: function () {
|
|
374
|
-
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
375
|
-
},
|
|
376
|
-
set: function (value) {
|
|
377
|
-
this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined;
|
|
378
|
-
},
|
|
379
|
-
enumerable: false,
|
|
380
|
-
configurable: true
|
|
381
|
-
});
|
|
382
|
-
Object.defineProperty(BaseElement.prototype, "messages", {
|
|
383
|
-
/** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */
|
|
384
|
-
get: function () {
|
|
385
|
-
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
386
|
-
},
|
|
387
|
-
set: function (value) {
|
|
388
|
-
this.nativeElement ? this.nativeElement.messages = value : undefined;
|
|
389
|
-
},
|
|
390
|
-
enumerable: false,
|
|
391
|
-
configurable: true
|
|
392
|
-
});
|
|
393
|
-
Object.defineProperty(BaseElement.prototype, "rightToLeft", {
|
|
394
|
-
/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
|
|
395
|
-
get: function () {
|
|
396
|
-
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
397
|
-
},
|
|
398
|
-
set: function (value) {
|
|
399
|
-
this.nativeElement ? this.nativeElement.rightToLeft = value : undefined;
|
|
400
|
-
},
|
|
401
|
-
enumerable: false,
|
|
402
|
-
configurable: true
|
|
403
|
-
});
|
|
404
|
-
Object.defineProperty(BaseElement.prototype, "theme", {
|
|
405
|
-
/** @description Determines the theme. Theme defines the look of the element */
|
|
406
|
-
get: function () {
|
|
407
|
-
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
408
|
-
},
|
|
409
|
-
set: function (value) {
|
|
410
|
-
this.nativeElement ? this.nativeElement.theme = value : undefined;
|
|
411
|
-
},
|
|
412
|
-
enumerable: false,
|
|
413
|
-
configurable: true
|
|
414
|
-
});
|
|
415
|
-
return BaseElement;
|
|
416
|
-
}());
|
|
417
|
-
BaseElement.propDecorators = {
|
|
418
|
-
onCreate: [{ type: core.Output }],
|
|
419
|
-
onReady: [{ type: core.Output }],
|
|
420
|
-
onAttach: [{ type: core.Output }],
|
|
421
|
-
onDetach: [{ type: core.Output }],
|
|
422
|
-
locale: [{ type: core.Input }],
|
|
423
|
-
localizeFormatFunction: [{ type: core.Input }],
|
|
424
|
-
messages: [{ type: core.Input }],
|
|
425
|
-
rightToLeft: [{ type: core.Input }],
|
|
426
|
-
theme: [{ type: core.Input }]
|
|
427
|
-
};
|
|
428
|
-
var Smart = window.Smart;
|
|
429
|
-
|
|
430
|
-
var ToastComponent = /** @class */ (function (_super) {
|
|
431
|
-
__extends(ToastComponent, _super);
|
|
432
|
-
function ToastComponent(ref) {
|
|
433
|
-
var _this = _super.call(this, ref) || this;
|
|
434
|
-
_this.eventHandlers = [];
|
|
435
|
-
/** @description This event is triggered when the toast item is clicked.
|
|
436
|
-
* @param event. The custom event. */
|
|
437
|
-
_this.onClick = new core.EventEmitter();
|
|
438
|
-
/** @description This event is triggered when the toast item is closed.
|
|
439
|
-
* @param event. The custom event. */
|
|
440
|
-
_this.onClose = new core.EventEmitter();
|
|
441
|
-
/** @description This event is triggered when the toast item is opened.
|
|
442
|
-
* @param event. The custom event. */
|
|
443
|
-
_this.onOpen = new core.EventEmitter();
|
|
444
|
-
/** @description This event is triggered on swipebottom over an toast item.
|
|
445
|
-
* @param event. The custom event. */
|
|
446
|
-
_this.onSwipebottom = new core.EventEmitter();
|
|
447
|
-
/** @description This event is triggered on swipeleft over an toast item.
|
|
448
|
-
* @param event. The custom event. */
|
|
449
|
-
_this.onSwipeleft = new core.EventEmitter();
|
|
450
|
-
/** @description This event is triggered on swiperight over an toast item.
|
|
451
|
-
* @param event. The custom event. */
|
|
452
|
-
_this.onSwiperight = new core.EventEmitter();
|
|
453
|
-
/** @description This event is triggered on swipetop over an toast item.
|
|
454
|
-
* @param event. The custom event. */
|
|
455
|
-
_this.onSwipetop = new core.EventEmitter();
|
|
456
|
-
_this.nativeElement = ref.nativeElement;
|
|
457
|
-
return _this;
|
|
458
|
-
}
|
|
459
|
-
/** @description Creates the component on demand.
|
|
460
|
-
* @param properties An optional object of properties, which will be added to the template binded ones.
|
|
461
|
-
*/
|
|
462
|
-
ToastComponent.prototype.createComponent = function (properties) {
|
|
463
|
-
if (properties === void 0) { properties = {}; }
|
|
464
|
-
this.nativeElement = document.createElement('smart-toast');
|
|
465
|
-
for (var propertyName in properties) {
|
|
466
|
-
this.nativeElement[propertyName] = properties[propertyName];
|
|
467
|
-
}
|
|
468
|
-
return this.nativeElement;
|
|
469
|
-
};
|
|
470
|
-
Object.defineProperty(ToastComponent.prototype, "animation", {
|
|
471
|
-
/** @description Sets or gets the animation mode. Animation is disabled when the property is set to 'none' */
|
|
472
|
-
get: function () {
|
|
473
|
-
return this.nativeElement ? this.nativeElement.animation : undefined;
|
|
474
|
-
},
|
|
475
|
-
set: function (value) {
|
|
476
|
-
this.nativeElement ? this.nativeElement.animation = value : undefined;
|
|
477
|
-
},
|
|
478
|
-
enumerable: false,
|
|
479
|
-
configurable: true
|
|
480
|
-
});
|
|
481
|
-
Object.defineProperty(ToastComponent.prototype, "appendTo", {
|
|
482
|
-
/** @description Specifies the container where new openned toast items will be displayed. The value can be an HTMLElement or element's id. This property is in relation with modal(lower priority than modal) and position(higher priority than position) properties. */
|
|
483
|
-
get: function () {
|
|
484
|
-
return this.nativeElement ? this.nativeElement.appendTo : undefined;
|
|
485
|
-
},
|
|
486
|
-
set: function (value) {
|
|
487
|
-
this.nativeElement ? this.nativeElement.appendTo = value : undefined;
|
|
488
|
-
},
|
|
489
|
-
enumerable: false,
|
|
490
|
-
configurable: true
|
|
491
|
-
});
|
|
492
|
-
Object.defineProperty(ToastComponent.prototype, "autoClose", {
|
|
493
|
-
/** @description Sets or gets whether the toast will automatically close after duration equal to the autoCloseDelay property. */
|
|
494
|
-
get: function () {
|
|
495
|
-
return this.nativeElement ? this.nativeElement.autoClose : undefined;
|
|
496
|
-
},
|
|
497
|
-
set: function (value) {
|
|
498
|
-
this.nativeElement ? this.nativeElement.autoClose = value : undefined;
|
|
499
|
-
},
|
|
500
|
-
enumerable: false,
|
|
501
|
-
configurable: true
|
|
502
|
-
});
|
|
503
|
-
Object.defineProperty(ToastComponent.prototype, "autoCloseDelay", {
|
|
504
|
-
/** @description Sets or gets the duration after which the toast automatically closes (works only if the autoClose property is set to true). */
|
|
505
|
-
get: function () {
|
|
506
|
-
return this.nativeElement ? this.nativeElement.autoCloseDelay : undefined;
|
|
507
|
-
},
|
|
508
|
-
set: function (value) {
|
|
509
|
-
this.nativeElement ? this.nativeElement.autoCloseDelay = value : undefined;
|
|
510
|
-
},
|
|
511
|
-
enumerable: false,
|
|
512
|
-
configurable: true
|
|
513
|
-
});
|
|
514
|
-
Object.defineProperty(ToastComponent.prototype, "autoOpen", {
|
|
515
|
-
/** @description Sets whether the toast will open automatically immediately after widget's initialization. */
|
|
516
|
-
get: function () {
|
|
517
|
-
return this.nativeElement ? this.nativeElement.autoOpen : undefined;
|
|
518
|
-
},
|
|
519
|
-
set: function (value) {
|
|
520
|
-
this.nativeElement ? this.nativeElement.autoOpen = value : undefined;
|
|
521
|
-
},
|
|
522
|
-
enumerable: false,
|
|
523
|
-
configurable: true
|
|
524
|
-
});
|
|
525
|
-
Object.defineProperty(ToastComponent.prototype, "disabled", {
|
|
526
|
-
/** @description The user will not be able to interact with toast items when disabled is set to true. */
|
|
527
|
-
get: function () {
|
|
528
|
-
return this.nativeElement ? this.nativeElement.disabled : undefined;
|
|
529
|
-
},
|
|
530
|
-
set: function (value) {
|
|
531
|
-
this.nativeElement ? this.nativeElement.disabled = value : undefined;
|
|
532
|
-
},
|
|
533
|
-
enumerable: false,
|
|
534
|
-
configurable: true
|
|
535
|
-
});
|
|
536
|
-
Object.defineProperty(ToastComponent.prototype, "iconClass", {
|
|
537
|
-
/** @description Sets custom icon className which overrides the default one. Multiple class names can be applied by separating them with a space. Useful when loading from a third-party icon library (such as Bootstrap). */
|
|
538
|
-
get: function () {
|
|
539
|
-
return this.nativeElement ? this.nativeElement.iconClass : undefined;
|
|
540
|
-
},
|
|
541
|
-
set: function (value) {
|
|
542
|
-
this.nativeElement ? this.nativeElement.iconClass = value : undefined;
|
|
543
|
-
},
|
|
544
|
-
enumerable: false,
|
|
545
|
-
configurable: true
|
|
546
|
-
});
|
|
547
|
-
Object.defineProperty(ToastComponent.prototype, "itemClass", {
|
|
548
|
-
/** @description Adds a custom class to Toast items. Multiple class names can be applied by separating them with a space. Useful when styling by using predefined class names from a third-party CSS library (such as Bootstrap). */
|
|
549
|
-
get: function () {
|
|
550
|
-
return this.nativeElement ? this.nativeElement.itemClass : undefined;
|
|
551
|
-
},
|
|
552
|
-
set: function (value) {
|
|
553
|
-
this.nativeElement ? this.nativeElement.itemClass = value : undefined;
|
|
554
|
-
},
|
|
555
|
-
enumerable: false,
|
|
556
|
-
configurable: true
|
|
557
|
-
});
|
|
558
|
-
Object.defineProperty(ToastComponent.prototype, "itemTemplate", {
|
|
559
|
-
/** @description Sets custom item template. */
|
|
560
|
-
get: function () {
|
|
561
|
-
return this.nativeElement ? this.nativeElement.itemTemplate : undefined;
|
|
562
|
-
},
|
|
563
|
-
set: function (value) {
|
|
564
|
-
this.nativeElement ? this.nativeElement.itemTemplate = value : undefined;
|
|
565
|
-
},
|
|
566
|
-
enumerable: false,
|
|
567
|
-
configurable: true
|
|
568
|
-
});
|
|
569
|
-
Object.defineProperty(ToastComponent.prototype, "locale", {
|
|
570
|
-
/** @description Sets or gets the language. Used in conjunction with the property messages. */
|
|
571
|
-
get: function () {
|
|
572
|
-
return this.nativeElement ? this.nativeElement.locale : undefined;
|
|
573
|
-
},
|
|
574
|
-
set: function (value) {
|
|
575
|
-
this.nativeElement ? this.nativeElement.locale = value : undefined;
|
|
576
|
-
},
|
|
577
|
-
enumerable: false,
|
|
578
|
-
configurable: true
|
|
579
|
-
});
|
|
580
|
-
Object.defineProperty(ToastComponent.prototype, "localizeFormatFunction", {
|
|
581
|
-
/** @description Callback, related to localization module. */
|
|
582
|
-
get: function () {
|
|
583
|
-
return this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;
|
|
584
|
-
},
|
|
585
|
-
set: function (value) {
|
|
586
|
-
this.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined;
|
|
587
|
-
},
|
|
588
|
-
enumerable: false,
|
|
589
|
-
configurable: true
|
|
590
|
-
});
|
|
591
|
-
Object.defineProperty(ToastComponent.prototype, "messages", {
|
|
592
|
-
/** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */
|
|
593
|
-
get: function () {
|
|
594
|
-
return this.nativeElement ? this.nativeElement.messages : undefined;
|
|
595
|
-
},
|
|
596
|
-
set: function (value) {
|
|
597
|
-
this.nativeElement ? this.nativeElement.messages = value : undefined;
|
|
598
|
-
},
|
|
599
|
-
enumerable: false,
|
|
600
|
-
configurable: true
|
|
601
|
-
});
|
|
602
|
-
Object.defineProperty(ToastComponent.prototype, "modal", {
|
|
603
|
-
/** @description In modal mode the toast item is positioned in the center of the screen. This property is with higher priority than position and appendTo. If modal is set to true these properties are disregarded. */
|
|
604
|
-
get: function () {
|
|
605
|
-
return this.nativeElement ? this.nativeElement.modal : undefined;
|
|
606
|
-
},
|
|
607
|
-
set: function (value) {
|
|
608
|
-
this.nativeElement ? this.nativeElement.modal = value : undefined;
|
|
609
|
-
},
|
|
610
|
-
enumerable: false,
|
|
611
|
-
configurable: true
|
|
612
|
-
});
|
|
613
|
-
Object.defineProperty(ToastComponent.prototype, "position", {
|
|
614
|
-
/** @description Sets the part of the browser window where the toast will be positioned. The position property is disregarded if appendTo or modal are set. */
|
|
615
|
-
get: function () {
|
|
616
|
-
return this.nativeElement ? this.nativeElement.position : undefined;
|
|
617
|
-
},
|
|
618
|
-
set: function (value) {
|
|
619
|
-
this.nativeElement ? this.nativeElement.position = value : undefined;
|
|
620
|
-
},
|
|
621
|
-
enumerable: false,
|
|
622
|
-
configurable: true
|
|
623
|
-
});
|
|
624
|
-
Object.defineProperty(ToastComponent.prototype, "readonly", {
|
|
625
|
-
/** @description If the element is readonly, users cannot interact with it. */
|
|
626
|
-
get: function () {
|
|
627
|
-
return this.nativeElement ? this.nativeElement.readonly : undefined;
|
|
628
|
-
},
|
|
629
|
-
set: function (value) {
|
|
630
|
-
this.nativeElement ? this.nativeElement.readonly = value : undefined;
|
|
631
|
-
},
|
|
632
|
-
enumerable: false,
|
|
633
|
-
configurable: true
|
|
634
|
-
});
|
|
635
|
-
Object.defineProperty(ToastComponent.prototype, "rightToLeft", {
|
|
636
|
-
/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */
|
|
637
|
-
get: function () {
|
|
638
|
-
return this.nativeElement ? this.nativeElement.rightToLeft : undefined;
|
|
639
|
-
},
|
|
640
|
-
set: function (value) {
|
|
641
|
-
this.nativeElement ? this.nativeElement.rightToLeft = value : undefined;
|
|
642
|
-
},
|
|
643
|
-
enumerable: false,
|
|
644
|
-
configurable: true
|
|
645
|
-
});
|
|
646
|
-
Object.defineProperty(ToastComponent.prototype, "showCloseButton", {
|
|
647
|
-
/** @description Sets or gets whether to show the toast item's close button. */
|
|
648
|
-
get: function () {
|
|
649
|
-
return this.nativeElement ? this.nativeElement.showCloseButton : undefined;
|
|
650
|
-
},
|
|
651
|
-
set: function (value) {
|
|
652
|
-
this.nativeElement ? this.nativeElement.showCloseButton = value : undefined;
|
|
653
|
-
},
|
|
654
|
-
enumerable: false,
|
|
655
|
-
configurable: true
|
|
656
|
-
});
|
|
657
|
-
Object.defineProperty(ToastComponent.prototype, "theme", {
|
|
658
|
-
/** @description Determines the theme. Theme defines the look of the element */
|
|
659
|
-
get: function () {
|
|
660
|
-
return this.nativeElement ? this.nativeElement.theme : undefined;
|
|
661
|
-
},
|
|
662
|
-
set: function (value) {
|
|
663
|
-
this.nativeElement ? this.nativeElement.theme = value : undefined;
|
|
664
|
-
},
|
|
665
|
-
enumerable: false,
|
|
666
|
-
configurable: true
|
|
667
|
-
});
|
|
668
|
-
Object.defineProperty(ToastComponent.prototype, "type", {
|
|
669
|
-
/** @description Sets speciffic CSS settings and icon to the toast items. */
|
|
670
|
-
get: function () {
|
|
671
|
-
return this.nativeElement ? this.nativeElement.type : undefined;
|
|
672
|
-
},
|
|
673
|
-
set: function (value) {
|
|
674
|
-
this.nativeElement ? this.nativeElement.type = value : undefined;
|
|
675
|
-
},
|
|
676
|
-
enumerable: false,
|
|
677
|
-
configurable: true
|
|
678
|
-
});
|
|
679
|
-
Object.defineProperty(ToastComponent.prototype, "unfocusable", {
|
|
680
|
-
/** @description If is set to true, the element cannot be focused. */
|
|
681
|
-
get: function () {
|
|
682
|
-
return this.nativeElement ? this.nativeElement.unfocusable : undefined;
|
|
683
|
-
},
|
|
684
|
-
set: function (value) {
|
|
685
|
-
this.nativeElement ? this.nativeElement.unfocusable = value : undefined;
|
|
686
|
-
},
|
|
687
|
-
enumerable: false,
|
|
688
|
-
configurable: true
|
|
689
|
-
});
|
|
690
|
-
Object.defineProperty(ToastComponent.prototype, "value", {
|
|
691
|
-
/** @description Sets a text value to an toast item. */
|
|
692
|
-
get: function () {
|
|
693
|
-
return this.nativeElement ? this.nativeElement.value : undefined;
|
|
694
|
-
},
|
|
695
|
-
set: function (value) {
|
|
696
|
-
this.nativeElement ? this.nativeElement.value = value : undefined;
|
|
697
|
-
},
|
|
698
|
-
enumerable: false,
|
|
699
|
-
configurable: true
|
|
700
|
-
});
|
|
701
|
-
/** @description Closes all opened toast items.
|
|
702
|
-
*/
|
|
703
|
-
ToastComponent.prototype.closeAll = function () {
|
|
704
|
-
var _this = this;
|
|
705
|
-
if (this.nativeElement.isRendered) {
|
|
706
|
-
this.nativeElement.closeAll();
|
|
707
|
-
}
|
|
708
|
-
else {
|
|
709
|
-
this.nativeElement.whenRendered(function () {
|
|
710
|
-
_this.nativeElement.closeAll();
|
|
711
|
-
});
|
|
712
|
-
}
|
|
713
|
-
};
|
|
714
|
-
/** @description Closes particular toast item.
|
|
715
|
-
* @param {HTMLElement | string} item. The toast item (or its id) to remove.
|
|
716
|
-
*/
|
|
717
|
-
ToastComponent.prototype.closeItem = function (item) {
|
|
718
|
-
var _this = this;
|
|
719
|
-
if (this.nativeElement.isRendered) {
|
|
720
|
-
this.nativeElement.closeItem(item);
|
|
721
|
-
}
|
|
722
|
-
else {
|
|
723
|
-
this.nativeElement.whenRendered(function () {
|
|
724
|
-
_this.nativeElement.closeItem(item);
|
|
725
|
-
});
|
|
726
|
-
}
|
|
727
|
-
};
|
|
728
|
-
/** @description Closes the last opened toast item.
|
|
729
|
-
*/
|
|
730
|
-
ToastComponent.prototype.closeLast = function () {
|
|
731
|
-
var _this = this;
|
|
732
|
-
if (this.nativeElement.isRendered) {
|
|
733
|
-
this.nativeElement.closeLast();
|
|
734
|
-
}
|
|
735
|
-
else {
|
|
736
|
-
this.nativeElement.whenRendered(function () {
|
|
737
|
-
_this.nativeElement.closeLast();
|
|
738
|
-
});
|
|
739
|
-
}
|
|
740
|
-
};
|
|
741
|
-
/** @description Opens a new toast item and returns the opened smart-toast-item instance.
|
|
742
|
-
* @param {HTMLElement | string} value?. The value for the toast item. If not set, the value property will be used.
|
|
743
|
-
* @param {string} iconType?. The icon name for the toast item. If not set, the type property determines the icon type that will be used.
|
|
744
|
-
* @returns {HTMLElement}
|
|
745
|
-
*/
|
|
746
|
-
ToastComponent.prototype.open = function (value, iconType) {
|
|
747
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
748
|
-
var getResultOnRender, result;
|
|
749
|
-
var _this = this;
|
|
750
|
-
return __generator(this, function (_a) {
|
|
751
|
-
switch (_a.label) {
|
|
752
|
-
case 0:
|
|
753
|
-
getResultOnRender = function () {
|
|
754
|
-
return new Promise(function (resolve) {
|
|
755
|
-
_this.nativeElement.whenRendered(function () {
|
|
756
|
-
var result = _this.nativeElement.open(value, iconType);
|
|
757
|
-
resolve(result);
|
|
758
|
-
});
|
|
759
|
-
});
|
|
760
|
-
};
|
|
761
|
-
return [4 /*yield*/, getResultOnRender()];
|
|
762
|
-
case 1:
|
|
763
|
-
result = _a.sent();
|
|
764
|
-
return [2 /*return*/, result];
|
|
765
|
-
}
|
|
766
|
-
});
|
|
767
|
-
});
|
|
768
|
-
};
|
|
769
|
-
Object.defineProperty(ToastComponent.prototype, "isRendered", {
|
|
770
|
-
get: function () {
|
|
771
|
-
return this.nativeElement ? this.nativeElement.isRendered : false;
|
|
772
|
-
},
|
|
773
|
-
enumerable: false,
|
|
774
|
-
configurable: true
|
|
775
|
-
});
|
|
776
|
-
ToastComponent.prototype.ngOnInit = function () {
|
|
777
|
-
};
|
|
778
|
-
ToastComponent.prototype.ngAfterViewInit = function () {
|
|
779
|
-
var that = this;
|
|
780
|
-
that.onCreate.emit(that.nativeElement);
|
|
781
|
-
Smart.Render();
|
|
782
|
-
this.nativeElement.classList.add('smart-angular');
|
|
783
|
-
this.nativeElement.whenRendered(function () { that.onReady.emit(that.nativeElement); });
|
|
784
|
-
this.listen();
|
|
785
|
-
};
|
|
786
|
-
ToastComponent.prototype.ngOnDestroy = function () {
|
|
787
|
-
this.unlisten();
|
|
788
|
-
};
|
|
789
|
-
ToastComponent.prototype.ngOnChanges = function (changes) {
|
|
790
|
-
if (this.nativeElement && this.nativeElement.isRendered) {
|
|
791
|
-
for (var propName in changes) {
|
|
792
|
-
if (changes.hasOwnProperty(propName)) {
|
|
793
|
-
this.nativeElement[propName] = changes[propName].currentValue;
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
}
|
|
797
|
-
};
|
|
798
|
-
/** @description Add event listeners. */
|
|
799
|
-
ToastComponent.prototype.listen = function () {
|
|
800
|
-
var that = this;
|
|
801
|
-
that.eventHandlers['clickHandler'] = function (event) { that.onClick.emit(event); };
|
|
802
|
-
that.nativeElement.addEventListener('click', that.eventHandlers['clickHandler']);
|
|
803
|
-
that.eventHandlers['closeHandler'] = function (event) { that.onClose.emit(event); };
|
|
804
|
-
that.nativeElement.addEventListener('close', that.eventHandlers['closeHandler']);
|
|
805
|
-
that.eventHandlers['openHandler'] = function (event) { that.onOpen.emit(event); };
|
|
806
|
-
that.nativeElement.addEventListener('open', that.eventHandlers['openHandler']);
|
|
807
|
-
that.eventHandlers['swipebottomHandler'] = function (event) { that.onSwipebottom.emit(event); };
|
|
808
|
-
that.nativeElement.addEventListener('swipebottom', that.eventHandlers['swipebottomHandler']);
|
|
809
|
-
that.eventHandlers['swipeleftHandler'] = function (event) { that.onSwipeleft.emit(event); };
|
|
810
|
-
that.nativeElement.addEventListener('swipeleft', that.eventHandlers['swipeleftHandler']);
|
|
811
|
-
that.eventHandlers['swiperightHandler'] = function (event) { that.onSwiperight.emit(event); };
|
|
812
|
-
that.nativeElement.addEventListener('swiperight', that.eventHandlers['swiperightHandler']);
|
|
813
|
-
that.eventHandlers['swipetopHandler'] = function (event) { that.onSwipetop.emit(event); };
|
|
814
|
-
that.nativeElement.addEventListener('swipetop', that.eventHandlers['swipetopHandler']);
|
|
815
|
-
};
|
|
816
|
-
/** @description Remove event listeners. */
|
|
817
|
-
ToastComponent.prototype.unlisten = function () {
|
|
818
|
-
var that = this;
|
|
819
|
-
if (that.eventHandlers['clickHandler']) {
|
|
820
|
-
that.nativeElement.removeEventListener('click', that.eventHandlers['clickHandler']);
|
|
821
|
-
}
|
|
822
|
-
if (that.eventHandlers['closeHandler']) {
|
|
823
|
-
that.nativeElement.removeEventListener('close', that.eventHandlers['closeHandler']);
|
|
824
|
-
}
|
|
825
|
-
if (that.eventHandlers['openHandler']) {
|
|
826
|
-
that.nativeElement.removeEventListener('open', that.eventHandlers['openHandler']);
|
|
827
|
-
}
|
|
828
|
-
if (that.eventHandlers['swipebottomHandler']) {
|
|
829
|
-
that.nativeElement.removeEventListener('swipebottom', that.eventHandlers['swipebottomHandler']);
|
|
830
|
-
}
|
|
831
|
-
if (that.eventHandlers['swipeleftHandler']) {
|
|
832
|
-
that.nativeElement.removeEventListener('swipeleft', that.eventHandlers['swipeleftHandler']);
|
|
833
|
-
}
|
|
834
|
-
if (that.eventHandlers['swiperightHandler']) {
|
|
835
|
-
that.nativeElement.removeEventListener('swiperight', that.eventHandlers['swiperightHandler']);
|
|
836
|
-
}
|
|
837
|
-
if (that.eventHandlers['swipetopHandler']) {
|
|
838
|
-
that.nativeElement.removeEventListener('swipetop', that.eventHandlers['swipetopHandler']);
|
|
839
|
-
}
|
|
840
|
-
};
|
|
841
|
-
return ToastComponent;
|
|
842
|
-
}(BaseElement));
|
|
843
|
-
ToastComponent.decorators = [
|
|
844
|
-
{ type: core.Directive, args: [{
|
|
845
|
-
selector: 'smart-toast, [smart-toast]'
|
|
846
|
-
},] }
|
|
847
|
-
];
|
|
848
|
-
ToastComponent.ctorParameters = function () { return [
|
|
849
|
-
{ type: core.ElementRef }
|
|
850
|
-
]; };
|
|
851
|
-
ToastComponent.propDecorators = {
|
|
852
|
-
animation: [{ type: core.Input }],
|
|
853
|
-
appendTo: [{ type: core.Input }],
|
|
854
|
-
autoClose: [{ type: core.Input }],
|
|
855
|
-
autoCloseDelay: [{ type: core.Input }],
|
|
856
|
-
autoOpen: [{ type: core.Input }],
|
|
857
|
-
disabled: [{ type: core.Input }],
|
|
858
|
-
iconClass: [{ type: core.Input }],
|
|
859
|
-
itemClass: [{ type: core.Input }],
|
|
860
|
-
itemTemplate: [{ type: core.Input }],
|
|
861
|
-
locale: [{ type: core.Input }],
|
|
862
|
-
localizeFormatFunction: [{ type: core.Input }],
|
|
863
|
-
messages: [{ type: core.Input }],
|
|
864
|
-
modal: [{ type: core.Input }],
|
|
865
|
-
position: [{ type: core.Input }],
|
|
866
|
-
readonly: [{ type: core.Input }],
|
|
867
|
-
rightToLeft: [{ type: core.Input }],
|
|
868
|
-
showCloseButton: [{ type: core.Input }],
|
|
869
|
-
theme: [{ type: core.Input }],
|
|
870
|
-
type: [{ type: core.Input }],
|
|
871
|
-
unfocusable: [{ type: core.Input }],
|
|
872
|
-
value: [{ type: core.Input }],
|
|
873
|
-
onClick: [{ type: core.Output }],
|
|
874
|
-
onClose: [{ type: core.Output }],
|
|
875
|
-
onOpen: [{ type: core.Output }],
|
|
876
|
-
onSwipebottom: [{ type: core.Output }],
|
|
877
|
-
onSwipeleft: [{ type: core.Output }],
|
|
878
|
-
onSwiperight: [{ type: core.Output }],
|
|
879
|
-
onSwipetop: [{ type: core.Output }]
|
|
880
|
-
};
|
|
881
|
-
|
|
882
|
-
var ToastModule = /** @class */ (function () {
|
|
883
|
-
function ToastModule() {
|
|
884
|
-
}
|
|
885
|
-
return ToastModule;
|
|
886
|
-
}());
|
|
887
|
-
ToastModule.decorators = [
|
|
888
|
-
{ type: core.NgModule, args: [{
|
|
889
|
-
declarations: [ToastComponent],
|
|
890
|
-
schemas: [core.CUSTOM_ELEMENTS_SCHEMA],
|
|
891
|
-
exports: [ToastComponent]
|
|
892
|
-
},] }
|
|
893
|
-
];
|
|
894
|
-
|
|
895
|
-
/**
|
|
896
|
-
* Generated bundle index. Do not edit.
|
|
897
|
-
*/
|
|
898
|
-
|
|
899
|
-
exports.Smart = Smart;
|
|
900
|
-
exports.ToastComponent = ToastComponent;
|
|
901
|
-
exports.ToastModule = ToastModule;
|
|
902
|
-
exports.ɵa = BaseElement;
|
|
903
|
-
|
|
904
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
905
|
-
|
|
906
|
-
})));
|
|
907
|
-
//# sourceMappingURL=smart-webcomponents-angular-toast.umd.js.map
|