" + this.sanitizer.sanitize(SecurityContext.HTML, t) + "
") ); options.enableHtml = true; } if (msg.options != null) { if (msg.options.trustedHtml === true) { options.enableHtml = true; } if (msg.options.timeout != null && msg.options.timeout > 0) { options.timeOut = msg.options.timeout; } } this.toastrService.show(message, msg.title, options, "toast-" + msg.type); } private async showDialog(msg: any) { let iconClasses: string = null; const type = msg.type; if (type != null) { // If you add custom types to this part, the type to SweetAlertIcon cast below needs to be changed. switch (type) { case "success": iconClasses = "bwi-check text-success"; break; case "warning": iconClasses = "bwi-exclamation-triangle text-warning"; break; case "error": iconClasses = "bwi-error text-danger"; break; case "info": iconClasses = "bwi-info-circle text-info"; break; default: break; } } const cancelText = msg.cancelText; const confirmText = msg.confirmText; const confirmed = await Swal.fire({ heightAuto: false, buttonsStyling: false, icon: type as SweetAlertIcon, // required to be any of the SweetAlertIcons to output the iconHtml. iconHtml: iconClasses != null ? `` : undefined, text: msg.text, html: msg.html, titleText: msg.title, showCancelButton: cancelText != null, cancelButtonText: cancelText, showConfirmButton: true, confirmButtonText: confirmText == null ? this.i18nService.t("ok") : confirmText, timer: 300000, }); this.messagingService.send("showDialogResolve", { dialogId: msg.dialogId, confirmed: confirmed.value, }); } }