1 | {"version":3,"sources":["ng://ngx-toastr/toastr/toast.directive.ts","node_modules/tslib/tslib.es6.js","ng://ngx-toastr/toastr/toastr-config.ts","ng://ngx-toastr/portal/portal.ts","ng://ngx-toastr/portal/dom-portal-host.ts","ng://ngx-toastr/overlay/overlay-container.ts","ng://ngx-toastr/overlay/overlay-ref.ts","ng://ngx-toastr/overlay/overlay.ts","ng://ngx-toastr/toastr/toast-injector.ts","ng://ngx-toastr/toastr/toastr.service.ts","ng://ngx-toastr/toastr/toast.component.ts","ng://ngx-toastr/toastr/toastr.module.ts","ng://ngx-toastr/toastr/toast-noanimation.component.ts"],"names":["ToastContainerDirective","el","this","prototype","getContainerElement","nativeElement","Directive","args","selector","exportAs","ElementRef","NgModule","declarations","exports","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__assign","assign","t","s","i","n","arguments","length","call","apply","ToastPackage","toastId","config","message","title","toastType","toastRef","_this","Subject","afterClosed","subscribe","_onAction","complete","_onTap","triggerTap","next","tapToDismiss","onTap","asObservable","triggerAction","action","onAction","DefaultNoComponentGlobalConfig","maxOpened","autoDismiss","newestOnTop","preventDuplicates","resetTimeoutOnDuplicate","iconClasses","error","info","success","warning","closeButton","disableTimeOut","timeOut","extendedTimeOut","enableHtml","progressBar","toastClass","positionClass","titleClass","messageClass","easing","easeTime","onActivateTick","progressAnimation","TOAST_CONFIG","InjectionToken","ComponentPortal","component","injector","attach","host","_attachedHost","detach","undefined","defineProperty","setAttachedHost","BasePortalHost","portal","_attachedPortal","attachComponentPortal","_disposeFn","setDisposeFn","fn","DomPortalHost","_super","_hostDomElement","_componentFactoryResolver","_appRef","__extends","__","constructor","create","tslib_1.__extends","componentRef","componentFactory","resolveComponentFactory","attachView","hostView","detachView","destroy","insertBefore","_getComponentRootNode","firstChild","appendChild","rootNodes","OverlayContainer","_document","ngOnDestroy","_containerElement","parentNode","removeChild","_createContainer","container","createElement","classList","add","body","Injectable","providedIn","Inject","DOCUMENT","OverlayRef","_portalHost","Overlay","_overlayContainer","Map","overlayContainer","_createOverlayRef","getPaneElement","_paneElements","get","set","_createPaneElement","pane","id","_createPortalHost","ComponentFactoryResolver","ApplicationRef","ToastRef","_overlayRef","manualClose","_manualClose","manualClosed","timeoutReset","_resetTimeout","close","_afterClosed","_activate","isInactive","isStopped","activate","afterActivate","resetTimeout","ToastInjector","_toastPackage","_parentInjector","token","notFoundValue","flags","ToastrService","overlay","_injector","sanitizer","ngZone","toastrConfig","default","show","override","type","_preBuildNotification","applyConfig","clear","_b","__values","o","m","Symbol","iterator","value","done","tslib_1.__values","toasts","_c","toast","remove","found","_findToast","activeToast","splice","index","currentlyActive","findDuplicate","resetOnDuplicate","componentInstance","run","_buildNotification","toastComponent","Error","duplicate","previousToastMessage","keepInactive","overlayRef","sanitizedMessage","sanitize","SecurityContext","HTML","toastPackage","toastInjector","_component","ins","onShown","onHidden","setTimeout","push","Injector","DomSanitizer","NgZone","Toast","toastrService","params","options","originalTimeout","toastClasses","sub","activateToast","sub1","sub2","unsubscribe","clearInterval","intervalId","clearTimeout","timeout","state","outsideTimeout","hideTime","Date","getTime","outsideInterval","updateProgress","width","now","remaining","tapToast","stickAround","delayedHideToast","func","runOutsideAngular","runInsideAngular","setInterval","Component","template","animations","trigger","style","display","opacity","transition","animate","preserveWhitespaces","HostBinding","HostListener","DefaultGlobalConfig","ToastrModule","forRoot","ngModule","providers","provide","useValue","imports","CommonModule","entryComponents","ToastrComponentlessModule","ToastNoAnimation","appRef","tick","DefaultNoAnimationsGlobalConfig","ToastNoAnimationModule"],"mappings":"4fAAA,IAAAA,EAAA,WAWE,SAAAA,EAAoBC,GAAAC,KAAAD,GAAAA,SACpBD,EAAAG,UAAAC,oBAAA,WACE,OAAOF,KAAKD,GAAGI,mCAPlBC,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,mBACVC,SAAU,8DANVC,EAAAA,gBAFF,yDAiBCC,EAAAA,SAAQJ,KAAA,CAAC,CACRK,aAAc,CAACZ,GACfa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AAA7R,UAAAiQ,iBADA,WAAA,IAAA5N,EAAAtC,KAGIA,KAAK0O,QAAQzK,gBACoB,IAAjCjE,KAAK0O,QAAQvK,iBACE,YAAfnE,KAAKsP,QAIPtP,KAAKqP,QAAUnB,WACb,WAAM,OAAA5L,EAAKgK,UACXtM,KAAK0O,QAAQvK,iBAEfnE,KAAK0O,QAAQxK,QAAUlE,KAAK0O,QAAQvK,gBACpCnE,KAAKwP,UAAW,IAAIC,MAAOC,WAAa1P,KAAK0O,QAAQxK,SAAW,GAChElE,KAAK6P,OAAS,EACV7P,KAAK0O,QAAQrK,cACfrE,KAAKmP,WAAamB,YAAY,WAAM,OAAAhO,EAAKsN,kBAAkB,2BAvLhEW,EAAAA,UAASlQ,KAAA,CAAC,CACTC,SAAU,oBACVkQ,SAAU,qvBAJH3F,SAHP9I,SAfAwH,EAAAA,wDAiDC0H,EAAAA,YAAW5Q,KAAA,CAAC,+BAEZ4Q,EAAAA,YAAW5Q,KAAA,CAAC,mCAgHZ6Q,EAAAA,aAAY7Q,KAAA,CAAC,8BAUb6Q,EAAAA,aAAY7Q,KAAA,CAAC,wCAab6Q,EAAAA,aAAY7Q,KAAA,CAAC,sBAsBH4R,EAA+B5Q,EAAA,GACvCgC,EAA8B,CACjC6J,eAAgB4E,sCAUTI,EAAAb,QAAP,SAAepP,GACb,YADa,IAAAA,IAAAA,EAAA,IACN,CACLqP,SAAUY,EACVX,UAAW,CACT,CACEC,QAAS1M,EACT2M,SAAU,CACRtG,UAAS8G,EACThQ,OAAMA,2BAfjBxB,EAAAA,SAAQJ,KAAA,CAAC,CACRqR,QAAS,CAACC,EAAAA,cACVjR,aAAc,CAACoR,GACfnR,QAAS,CAACmR,GACVF,gBAAiB,CAACE","sourcesContent":["import {\n Directive,\n ElementRef,\n NgModule,\n} from '@angular/core';\n\n@Directive({\n selector: '[toastContainer]',\n exportAs: 'toastContainer',\n})\nexport class ToastContainerDirective {\n constructor(private el: ElementRef) { }\n getContainerElement(): HTMLElement {\n return this.el.nativeElement;\n }\n}\n\n@NgModule({\n declarations: [ToastContainerDirective],\n exports: [ToastContainerDirective],\n})\nexport class ToastContainerModule {}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n 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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n 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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n 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); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n 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; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n 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);\r\n 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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { InjectionToken } from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { ComponentType } from '../portal/portal';\nimport { ToastRef } from './toast-injector';\n\nexport type ProgressAnimationType = 'increasing' | 'decreasing';\n\n/**\n * Configuration for an individual toast.\n */\nexport interface IndividualConfig {\n /**\n * disable both timeOut and extendedTimeOut\n * default: false\n */\n disableTimeOut: boolean;\n /**\n * toast time to live in milliseconds\n * default: 5000\n */\n timeOut: number;\n /**\n * toast show close button\n * default: false\n */\n closeButton: boolean;\n /**\n * time to close after a user hovers over toast\n * default: 1000\n */\n extendedTimeOut: number;\n /**\n * show toast progress bar\n * default: false\n */\n progressBar: boolean;\n\n /**\n * changes toast progress bar animation\n * default: decreasing\n */\n progressAnimation: ProgressAnimationType;\n\n /**\n * render html in toast message (possibly unsafe)\n * default: false\n */\n enableHtml: boolean;\n /**\n * css class on toast component\n * default: toast\n */\n toastClass: string;\n /**\n * css class on toast container\n * default: toast-top-right\n */\n positionClass: string;\n /**\n * css class on toast title\n * default: toast-title\n */\n titleClass: string;\n /**\n * css class on toast message\n * default: toast-message\n */\n messageClass: string;\n /**\n * animation easing on toast\n * default: ease-in\n */\n easing: string;\n /**\n * animation ease time on toast\n * default: 300\n */\n easeTime: string | number;\n /**\n * clicking on toast dismisses it\n * default: true\n */\n tapToDismiss: boolean;\n /**\n * Angular toast component to be shown\n * default: Toast\n */\n toastComponent?: ComponentType<any>;\n /**\n * Helps show toast from a websocket or from event outside Angular\n * default: false\n */\n onActivateTick: boolean;\n}\n\nexport interface ToastrIconClasses {\n error: string;\n info: string;\n success: string;\n warning: string;\n}\n\n/**\n * Global Toast configuration\n * Includes all IndividualConfig\n */\nexport interface GlobalConfig extends IndividualConfig {\n /**\n * max toasts opened. Toasts will be queued\n * Zero is unlimited\n * default: 0\n */\n maxOpened: number;\n /**\n * dismiss current toast when max is reached\n * default: false\n */\n autoDismiss: boolean;\n iconClasses: Partial<ToastrIconClasses>;\n /**\n * New toast placement\n * default: true\n */\n newestOnTop: boolean;\n /**\n * block duplicate messages\n * default: false\n */\n preventDuplicates: boolean;\n\n /**\n * Reset toast timeout when there's a duplicate (preventDuplicates needs to be set to true)\n * default: false\n */\n resetTimeoutOnDuplicate: boolean;\n}\n\n/**\n * Everything a toast needs to launch\n */\nexport class ToastPackage {\n private _onTap = new Subject<any>();\n private _onAction = new Subject<any>();\n\n constructor(\n public toastId: number,\n public config: IndividualConfig,\n public message: string | SafeHtml | null | undefined,\n public title: string | undefined,\n public toastType: string,\n public toastRef: ToastRef<any>,\n ) {\n this.toastRef.afterClosed().subscribe(() => {\n this._onAction.complete();\n this._onTap.complete();\n });\n }\n\n /** Fired on click */\n triggerTap() {\n this._onTap.next();\n if (this.config.tapToDismiss) {\n this._onTap.complete();\n }\n }\n\n onTap(): Observable<any> {\n return this._onTap.asObservable();\n }\n\n /** available for use in custom toast */\n triggerAction(action?: any) {\n this._onAction.next(action);\n }\n\n onAction(): Observable<any> {\n return this._onAction.asObservable();\n }\n}\n\n/* tslint:disable:no-empty-interface */\n/** @deprecated use GlobalConfig */\nexport interface GlobalToastrConfig extends GlobalConfig {}\n/** @deprecated use IndividualConfig */\nexport interface IndividualToastrConfig extends IndividualConfig {}\n/** @deprecated use IndividualConfig */\nexport interface ToastrConfig extends IndividualConfig {}\n\nexport const DefaultNoComponentGlobalConfig: GlobalConfig = {\n maxOpened: 0,\n autoDismiss: false,\n newestOnTop: true,\n preventDuplicates: false,\n resetTimeoutOnDuplicate: false,\n iconClasses: {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning',\n },\n\n // Individual\n closeButton: false,\n disableTimeOut: false,\n timeOut: 5000,\n extendedTimeOut: 1000,\n enableHtml: false,\n progressBar: false,\n toastClass: 'toast',\n positionClass: 'toast-top-right',\n titleClass: 'toast-title',\n messageClass: 'toast-message',\n easing: 'ease-in',\n easeTime: 300,\n tapToDismiss: true,\n onActivateTick: false,\n progressAnimation: 'decreasing',\n};\n\nexport interface ToastToken {\n default: GlobalConfig;\n config: Partial<GlobalConfig>;\n}\n\nexport const TOAST_CONFIG = new InjectionToken<ToastToken>('ToastConfig');\n","import {\n ComponentRef,\n Injector,\n ViewContainerRef\n} from '@angular/core';\n\nexport interface ComponentType<T> {\n new (...args: any[]): T;\n}\n\n\n/**\n * A `ComponentPortal` is a portal that instantiates some Component upon attachment.\n */\nexport class ComponentPortal<T> {\n private _attachedHost?: BasePortalHost;\n /** The type of the component that will be instantiated for attachment. */\n component: ComponentType<T>;\n\n /**\n * [Optional] Where the attached component should live in Angular's *logical* component tree.\n * This is different from where the component *renders*, which is determined by the PortalHost.\n * The origin necessary when the host is outside of the Angular application context.\n */\n viewContainerRef: ViewContainerRef;\n\n /** Injector used for the instantiation of the component. */\n injector: Injector;\n\n constructor(component: ComponentType<T>, injector: Injector) {\n this.component = component;\n this.injector = injector;\n }\n\n /** Attach this portal to a host. */\n attach(host: BasePortalHost, newestOnTop: boolean) {\n this._attachedHost = host;\n return host.attach(this, newestOnTop);\n }\n\n /** Detach this portal from its host */\n detach() {\n const host = this._attachedHost;\n if (host) {\n this._attachedHost = undefined;\n return host.detach();\n }\n }\n\n /** Whether this portal is attached to a host. */\n get isAttached(): boolean {\n return this._attachedHost != null;\n }\n\n /**\n * Sets the PortalHost reference without performing `attach()`. This is used directly by\n * the PortalHost when it is performing an `attach()` or `detach()`.\n */\n setAttachedHost(host?: BasePortalHost) {\n this._attachedHost = host;\n }\n}\n\n/**\n * Partial implementation of PortalHost that only deals with attaching a\n * ComponentPortal\n */\nexport abstract class BasePortalHost {\n /** The portal currently attached to the host. */\n private _attachedPortal?: ComponentPortal<any>;\n\n /** A function that will permanently dispose this host. */\n private _disposeFn?: () => void;\n\n attach(portal: ComponentPortal<any>, newestOnTop: boolean) {\n this._attachedPortal = portal;\n return this.attachComponentPortal(portal, newestOnTop);\n }\n\n abstract attachComponentPortal<T>(portal: ComponentPortal<T>, newestOnTop: boolean): ComponentRef<T>;\n\n detach() {\n if (this._attachedPortal) {\n this._attachedPortal.setAttachedHost();\n }\n\n this._attachedPortal = undefined;\n if (this._disposeFn) {\n this._disposeFn();\n this._disposeFn = undefined;\n }\n }\n\n setDisposeFn(fn: () => void) {\n this._disposeFn = fn;\n }\n}\n","import {\n ApplicationRef,\n ComponentFactoryResolver,\n ComponentRef,\n EmbeddedViewRef,\n} from '@angular/core';\nimport { BasePortalHost, ComponentPortal } from './portal';\n\n/**\n * A PortalHost for attaching portals to an arbitrary DOM element outside of the Angular\n * application context.\n *\n * This is the only part of the portal core that directly touches the DOM.\n */\nexport class DomPortalHost extends BasePortalHost {\n constructor(\n private _hostDomElement: Element,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n ) {\n super();\n }\n\n /**\n * Attach the given ComponentPortal to DOM element using the ComponentFactoryResolver.\n * @param portal Portal to be attached\n */\n attachComponentPortal<T>(\n portal: ComponentPortal<T>,\n newestOnTop: boolean,\n ): ComponentRef<T> {\n const componentFactory = this._componentFactoryResolver.resolveComponentFactory(\n portal.component,\n );\n let componentRef: ComponentRef<T>;\n\n // If the portal specifies a ViewContainerRef, we will use that as the attachment point\n // for the component (in terms of Angular's component tree, not rendering).\n // When the ViewContainerRef is missing, we use the factory to create the component directly\n // and then manually attach the ChangeDetector for that component to the application (which\n // happens automatically when using a ViewContainer).\n componentRef = componentFactory.create(portal.injector);\n\n // When creating a component outside of a ViewContainer, we need to manually register\n // its ChangeDetector with the application. This API is unfortunately not yet published\n // in Angular core. The change detector must also be deregistered when the component\n // is destroyed to prevent memory leaks.\n this._appRef.attachView(componentRef.hostView);\n\n this.setDisposeFn(() => {\n this._appRef.detachView(componentRef.hostView);\n componentRef.destroy();\n });\n\n // At this point the component has been instantiated, so we move it to the location in the DOM\n // where we want it to be rendered.\n if (newestOnTop) {\n this._hostDomElement.insertBefore(\n this._getComponentRootNode(componentRef),\n this._hostDomElement.firstChild,\n );\n } else {\n this._hostDomElement.appendChild(\n this._getComponentRootNode(componentRef),\n );\n }\n\n return componentRef;\n }\n\n /** Gets the root HTMLElement for an instantiated component. */\n private _getComponentRootNode(componentRef: ComponentRef<any>): HTMLElement {\n return (componentRef.hostView as EmbeddedViewRef<any>).rootNodes[0] as HTMLElement;\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport { Inject, Injectable, OnDestroy } from '@angular/core';\n\n/** Container inside which all toasts will render. */\n@Injectable({ providedIn: 'root' })\nexport class OverlayContainer implements OnDestroy {\n protected _containerElement: HTMLElement;\n\n constructor(@Inject(DOCUMENT) protected _document: any) {}\n\n ngOnDestroy() {\n if (this._containerElement && this._containerElement.parentNode) {\n this._containerElement.parentNode.removeChild(this._containerElement);\n }\n }\n\n /**\n * This method returns the overlay container element. It will lazily\n * create the element the first time it is called to facilitate using\n * the container in non-browser environments.\n * @returns the container element\n */\n getContainerElement(): HTMLElement {\n if (!this._containerElement) {\n this._createContainer();\n }\n return this._containerElement;\n }\n\n /**\n * Create the overlay container element, which is simply a div\n * with the 'cdk-overlay-container' class on the document body.\n */\n protected _createContainer(): void {\n const container = this._document.createElement('div');\n container.classList.add('overlay-container');\n this._document.body.appendChild(container);\n this._containerElement = container;\n }\n}\n","import { ComponentRef } from '@angular/core';\nimport { BasePortalHost, ComponentPortal } from '../portal/portal';\n\n/**\n * Reference to an overlay that has been created with the Overlay service.\n * Used to manipulate or dispose of said overlay.\n */\nexport class OverlayRef {\n constructor(private _portalHost: BasePortalHost) {}\n\n attach(\n portal: ComponentPortal<any>,\n newestOnTop: boolean = true,\n ): ComponentRef<any> {\n return this._portalHost.attach(portal, newestOnTop);\n }\n\n /**\n * Detaches an overlay from a portal.\n * @returns Resolves when the overlay has been detached.\n */\n detach() {\n return this._portalHost.detach();\n }\n}\n","import { DOCUMENT } from '@angular/common';\nimport {\n ApplicationRef,\n ComponentFactoryResolver,\n Inject,\n Injectable,\n} from '@angular/core';\n\nimport { DomPortalHost } from '../portal/dom-portal-host';\nimport { ToastContainerDirective } from '../toastr/toast.directive';\nimport { OverlayContainer } from './overlay-container';\nimport { OverlayRef } from './overlay-ref';\n\n/**\n * Service to create Overlays. Overlays are dynamically added pieces of floating UI, meant to be\n * used as a low-level building building block for other components. Dialogs, tooltips, menus,\n * selects, etc. can all be built using overlays. The service should primarily be used by authors\n * of re-usable components rather than developers building end-user applications.\n *\n * An overlay *is* a PortalHost, so any kind of Portal can be loaded into one.\n */\n@Injectable({ providedIn: 'root' })\nexport class Overlay {\n // Namespace panes by overlay container\n private _paneElements: Map<\n ToastContainerDirective,\n { string?: HTMLElement }\n > = new Map();\n\n constructor(\n private _overlayContainer: OverlayContainer,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef,\n @Inject(DOCUMENT) private _document: any,\n ) {}\n /**\n * Creates an overlay.\n * @returns A reference to the created overlay.\n */\n create(\n positionClass?: string,\n overlayContainer?: ToastContainerDirective,\n ): OverlayRef {\n // get existing pane if possible\n return this._createOverlayRef(\n this.getPaneElement(positionClass, overlayContainer),\n );\n }\n\n getPaneElement(\n positionClass: string = '',\n overlayContainer?: ToastContainerDirective,\n ): HTMLElement {\n if (!this._paneElements.get(overlayContainer)) {\n this._paneElements.set(overlayContainer, {});\n }\n\n if (!this._paneElements.get(overlayContainer)[positionClass]) {\n this._paneElements.get(overlayContainer)[positionClass] = this._createPaneElement(positionClass, overlayContainer);\n }\n\n return this._paneElements.get(overlayContainer)[positionClass];\n }\n\n\n /**\n * Creates the DOM element for an overlay and appends it to the overlay container.\n * @returns Newly-created pane element\n */\n private _createPaneElement(\n positionClass: string,\n overlayContainer?: ToastContainerDirective,\n ): HTMLElement {\n const pane = this._document.createElement('div');\n\n pane.id = 'toast-container';\n pane.classList.add(positionClass);\n pane.classList.add('toast-container');\n\n if (!overlayContainer) {\n this._overlayContainer.getContainerElement().appendChild(pane);\n } else {\n overlayContainer.getContainerElement().appendChild(pane);\n }\n\n return pane;\n }\n\n /**\n * Create a DomPortalHost into which the overlay content can be loaded.\n * @param pane The DOM element to turn into a portal host.\n * @returns A portal host for the given DOM element.\n */\n private _createPortalHost(pane: HTMLElement): DomPortalHost {\n return new DomPortalHost(\n pane,\n this._componentFactoryResolver,\n this._appRef,\n );\n }\n\n /**\n * Creates an OverlayRef for an overlay in the given DOM element.\n * @param pane DOM element for the overlay\n */\n private _createOverlayRef(pane: HTMLElement): OverlayRef {\n return new OverlayRef(this._createPortalHost(pane));\n }\n}\n","import { Injector, InjectFlags } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { OverlayRef } from '../overlay/overlay-ref';\nimport { ToastPackage } from './toastr-config';\n\n/**\n * Reference to a toast opened via the Toastr service.\n */\nexport class ToastRef<T> {\n /** The instance of component opened into the toast. */\n componentInstance: T;\n\n /** Subject for notifying the user that the toast has finished closing. */\n private _afterClosed = new Subject<any>();\n /** triggered when toast is activated */\n private _activate = new Subject<any>();\n /** notifies the toast that it should close before the timeout */\n private _manualClose = new Subject<any>();\n /** notifies the toast that it should reset the timeouts */\n private _resetTimeout = new Subject<any>();\n\n constructor(private _overlayRef: OverlayRef) {}\n\n manualClose() {\n this._manualClose.next();\n this._manualClose.complete();\n }\n\n manualClosed(): Observable<any> {\n return this._manualClose.asObservable();\n }\n\n timeoutReset(): Observable<any> {\n return this._resetTimeout.asObservable();\n }\n\n /**\n * Close the toast.\n */\n close(): void {\n this._overlayRef.detach();\n this._afterClosed.next();\n this._manualClose.next();\n this._afterClosed.complete();\n this._manualClose.complete();\n this._activate.complete();\n this._resetTimeout.complete();\n }\n\n /** Gets an observable that is notified when the toast is finished closing. */\n afterClosed(): Observable<any> {\n return this._afterClosed.asObservable();\n }\n\n isInactive() {\n return this._activate.isStopped;\n }\n\n activate() {\n this._activate.next();\n this._activate.complete();\n }\n\n /** Gets an observable that is notified when the toast has started opening. */\n afterActivate(): Observable<any> {\n return this._activate.asObservable();\n }\n\n /** Reset the toast timouts */\n resetTimeout() {\n this._resetTimeout.next();\n }\n}\n\n/** Custom injector type specifically for instantiating components with a toast. */\nexport class ToastInjector implements Injector {\n constructor(\n private _toastPackage: ToastPackage,\n private _parentInjector: Injector\n ) {}\n\n get<T>(token: any, notFoundValue?: T, flags?: InjectFlags): T | ToastPackage {\n if (token === ToastPackage) {\n return this._toastPackage;\n }\n return this._parentInjector.get<T>(token, notFoundValue, flags);\n }\n}\n","import {\n ComponentRef,\n Inject,\n Injectable,\n Injector,\n NgZone,\n SecurityContext\n} from '@angular/core';\nimport { DomSanitizer, SafeHtml } from '@angular/platform-browser';\n\nimport { Observable } from 'rxjs';\n\nimport { Overlay } from '../overlay/overlay';\nimport { ComponentPortal } from '../portal/portal';\nimport { ToastInjector, ToastRef } from './toast-injector';\nimport { ToastContainerDirective } from './toast.directive';\nimport { GlobalConfig, IndividualConfig, ToastPackage, ToastToken, TOAST_CONFIG } from './toastr-config';\n\nexport interface ActiveToast<C> {\n /** Your Toast ID. Use this to close it individually */\n toastId: number;\n /** the message of your toast. Stored to prevent duplicates */\n message: string;\n /** a reference to the component see portal.ts */\n portal: ComponentRef<C>;\n /** a reference to your toast */\n toastRef: ToastRef<C>;\n /** triggered when toast is active */\n onShown: Observable<any>;\n /** triggered when toast is destroyed */\n onHidden: Observable<any>;\n /** triggered on toast click */\n onTap: Observable<any>;\n /** available for your use in custom toast */\n onAction: Observable<any>;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class ToastrService {\n toastrConfig: GlobalConfig;\n currentlyActive = 0;\n toasts: ActiveToast<any>[] = [];\n overlayContainer: ToastContainerDirective;\n previousToastMessage: string | undefined;\n private index = 0;\n\n constructor(\n @Inject(TOAST_CONFIG) token: ToastToken,\n private overlay: Overlay,\n private _injector: Injector,\n private sanitizer: DomSanitizer,\n private ngZone: NgZone\n ) {\n this.toastrConfig = {\n ...token.default,\n ...token.config,\n };\n if (token.config.iconClasses) {\n this.toastrConfig.iconClasses = {\n ...token.default.iconClasses,\n ...token.config.iconClasses,\n };\n }\n }\n /** show toast */\n show(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {},\n type = ''\n ) {\n return this._preBuildNotification(\n type,\n message,\n title,\n this.applyConfig(override)\n );\n }\n /** show successful toast */\n success(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) {\n const type = this.toastrConfig.iconClasses.success || '';\n return this._preBuildNotification(\n type,\n message,\n title,\n this.applyConfig(override)\n );\n }\n /** show error toast */\n error(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) {\n const type = this.toastrConfig.iconClasses.error || '';\n return this._preBuildNotification(\n type,\n message,\n title,\n this.applyConfig(override)\n );\n }\n /** show info toast */\n info(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) {\n const type = this.toastrConfig.iconClasses.info || '';\n return this._preBuildNotification(\n type,\n message,\n title,\n this.applyConfig(override)\n );\n }\n /** show warning toast */\n warning(\n message?: string,\n title?: string,\n override: Partial<IndividualConfig> = {}\n ) {\n const type = this.toastrConfig.iconClasses.warning || '';\n return this._preBuildNotification(\n type,\n message,\n title,\n this.applyConfig(override)\n );\n }\n /**\n * Remove all or a single toast by id\n */\n clear(toastId?: number) {\n // Call every toastRef manualClose function\n for (const toast of this.toasts) {\n if (toastId !== undefined) {\n if (toast.toastId === toastId) {\n toast.toastRef.manualClose();\n return;\n }\n } else {\n toast.toastRef.manualClose();\n }\n }\n }\n /**\n * Remove and destroy a single toast by id\n */\n remove(toastId: number) {\n const found = this._findToast(toastId);\n if (!found) {\n return false;\n }\n found.activeToast.toastRef.close();\n this.toasts.splice(found.index, 1);\n this.currentlyActive = this.currentlyActive - 1;\n if (!this.toastrConfig.maxOpened || !this.toasts.length) {\n return false;\n }\n if (\n this.currentlyActive < this.toastrConfig.maxOpened &&\n this.toasts[this.currentlyActive]\n ) {\n const p = this.toasts[this.currentlyActive].toastRef;\n if (!p.isInactive()) {\n this.currentlyActive = this.currentlyActive + 1;\n p.activate();\n }\n }\n return true;\n }\n\n /**\n * Finds a duplicate toast if one exists\n */\n private findDuplicate(message: string, resetOnDuplicate: boolean) {\n for (let i = 0; i < this.toasts.length; i++) {\n const toast = this.toasts[i];\n if (toast.message === message) {\n if (resetOnDuplicate && toast.toastRef.componentInstance.resetTimeout) {\n toast.toastRef.resetTimeout();\n }\n return toast;\n }\n }\n return null;\n }\n\n /** create a clone of global config and apply individual settings */\n private applyConfig(override: Partial<IndividualConfig> = {}): GlobalConfig {\n return { ...this.toastrConfig, ...override };\n }\n\n /**\n * Find toast object by id\n */\n private _findToast(\n toastId: number\n ): { index: number; activeToast: ActiveToast<any> } | null {\n for (let i = 0; i < this.toasts.length; i++) {\n if (this.toasts[i].toastId === toastId) {\n return { index: i, activeToast: this.toasts[i] };\n }\n }\n return null;\n }\n\n /**\n * Determines the need to run inside angular's zone then builds the toast\n */\n private _preBuildNotification(\n toastType: string,\n message: string | undefined,\n title: string | undefined,\n config: GlobalConfig\n ): ActiveToast<any> | null {\n if (config.onActivateTick) {\n return this.ngZone.run(() =>\n this._buildNotification(toastType, message, title, config)\n );\n }\n return this._buildNotification(toastType, message, title, config);\n }\n\n /**\n * Creates and attaches toast data to component\n * returns the active toast, or in case preventDuplicates is enabled the original/non-duplicate active toast.\n */\n private _buildNotification(\n toastType: string,\n message: string | undefined,\n title: string | undefined,\n config: GlobalConfig\n ): ActiveToast<any> | null {\n if (!config.toastComponent) {\n throw new Error('toastComponent required');\n }\n // max opened and auto dismiss = true\n if (\n message &&\n this.toastrConfig.preventDuplicates\n ) {\n const duplicate = this.findDuplicate(message, this.toastrConfig.resetTimeoutOnDuplicate);\n if (duplicate !== null) {\n return duplicate;\n }\n }\n this.previousToastMessage = message;\n let keepInactive = false;\n if (\n this.toastrConfig.maxOpened &&\n this.currentlyActive >= this.toastrConfig.maxOpened\n ) {\n keepInactive = true;\n if (this.toastrConfig.autoDismiss) {\n this.clear(this.toasts[0].toastId);\n }\n }\n const overlayRef = this.overlay.create(\n config.positionClass,\n this.overlayContainer\n );\n this.index = this.index + 1;\n let sanitizedMessage: string | SafeHtml | undefined | null = message;\n if (message && config.enableHtml) {\n sanitizedMessage = this.sanitizer.sanitize(SecurityContext.HTML, message);\n }\n const toastRef = new ToastRef(overlayRef);\n const toastPackage = new ToastPackage(\n this.index,\n config,\n sanitizedMessage,\n title,\n toastType,\n toastRef\n );\n const toastInjector = new ToastInjector(toastPackage, this._injector);\n const component = new ComponentPortal(config.toastComponent, toastInjector);\n const portal = overlayRef.attach(component, this.toastrConfig.newestOnTop);\n toastRef.componentInstance = (<any>portal)._component;\n const ins: ActiveToast<any> = {\n toastId: this.index,\n message: message || '',\n toastRef,\n onShown: toastRef.afterActivate(),\n onHidden: toastRef.afterClosed(),\n onTap: toastPackage.onTap(),\n onAction: toastPackage.onAction(),\n portal\n };\n\n if (!keepInactive) {\n setTimeout(() => {\n ins.toastRef.activate();\n this.currentlyActive = this.currentlyActive + 1;\n });\n }\n\n this.toasts.push(ins);\n return ins;\n }\n}\n","import {\n animate,\n state,\n style,\n transition,\n trigger\n} from '@angular/animations';\nimport {\n Component,\n HostBinding,\n HostListener,\n NgZone,\n OnDestroy\n} from '@angular/core';\nimport { SafeHtml } from '@angular/platform-browser';\nimport { Subscription } from 'rxjs';\nimport { IndividualConfig, ToastPackage } from './toastr-config';\nimport { ToastrService } from './toastr.service';\n\n@Component({\n selector: '[toast-component]',\n template: `\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\n <span aria-hidden=\"true\">×</span>\n </button>\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\n {{ title }}\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 `,\n animations: [\n trigger('flyInOut', [\n state(\n 'inactive',\n style({\n display: 'none',\n opacity: 0\n })\n ),\n state('active', style({})),\n state('removed', style({ opacity: 0 })),\n transition(\n 'inactive => active',\n animate('{{ easeTime }}ms {{ easing }}')\n ),\n transition('active => removed', animate('{{ easeTime }}ms {{ easing }}'))\n ])\n ],\n preserveWhitespaces: false\n})\nexport class Toast implements OnDestroy {\n message?: string | SafeHtml | null;\n title?: string;\n options: IndividualConfig;\n originalTimeout: number;\n /** width of progress bar */\n width = -1;\n /** a combination of toast type and options.toastClass */\n @HostBinding('class') toastClasses = '';\n /** controls animation */\n @HostBinding('@flyInOut')\n state = {\n value: 'inactive',\n params: {\n easeTime: this.toastPackage.config.easeTime,\n easing: 'ease-in'\n }\n };\n private timeout: any;\n private intervalId: any;\n private hideTime: number;\n private sub: Subscription;\n private sub1: Subscription;\n private sub2: Subscription;\n\n constructor(\n protected toastrService: ToastrService,\n public toastPackage: ToastPackage,\n protected ngZone?: NgZone\n ) {\n this.message = toastPackage.message;\n this.title = toastPackage.title;\n this.options = toastPackage.config;\n this.originalTimeout = toastPackage.config.timeOut;\n this.toastClasses = `${toastPackage.toastType} ${\n toastPackage.config.toastClass\n }`;\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\n this.activateToast();\n });\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\n this.remove();\n });\n this.sub2 = toastPackage.toastRef.timeoutReset().subscribe(() => {\n this.resetTimeout();\n });\n }\n ngOnDestroy() {\n this.sub.unsubscribe();\n this.sub1.unsubscribe();\n this.sub2.unsubscribe();\n clearInterval(this.intervalId);\n clearTimeout(this.timeout);\n }\n /**\n * activates toast and sets timeout\n */\n activateToast() {\n this.state = { ...this.state, value: 'active' };\n if (!this.options.disableTimeOut && this.options.timeOut) {\n this.outsideTimeout(() => this.remove(), this.options.timeOut);\n this.hideTime = new Date().getTime() + this.options.timeOut;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n }\n /**\n * updates progress bar width\n */\n updateProgress() {\n if (this.width === 0 || this.width === 100 || !this.options.timeOut) {\n return;\n }\n const now = new Date().getTime();\n const remaining = this.hideTime - now;\n this.width = (remaining / this.options.timeOut) * 100;\n if (this.options.progressAnimation === 'increasing') {\n this.width = 100 - this.width;\n }\n if (this.width <= 0) {\n this.width = 0;\n }\n if (this.width >= 100) {\n this.width = 100;\n }\n }\n\n resetTimeout() {\n clearTimeout(this.timeout);\n clearInterval(this.intervalId);\n this.state = { ...this.state, value: 'active' };\n\n this.outsideTimeout(() => this.remove(), this.originalTimeout);\n this.options.timeOut = this.originalTimeout;\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n\n /**\n * tells toastrService to remove this toast after animation time\n */\n remove() {\n if (this.state.value === 'removed') {\n return;\n }\n clearTimeout(this.timeout);\n this.state = { ...this.state, value: 'removed' };\n this.outsideTimeout(\n () => this.toastrService.remove(this.toastPackage.toastId),\n +this.toastPackage.config.easeTime\n );\n }\n @HostListener('click')\n tapToast() {\n if (this.state.value === 'removed') {\n return;\n }\n this.toastPackage.triggerTap();\n if (this.options.tapToDismiss) {\n this.remove();\n }\n }\n @HostListener('mouseenter')\n stickAround() {\n if (this.state.value === 'removed') {\n return;\n }\n clearTimeout(this.timeout);\n this.options.timeOut = 0;\n this.hideTime = 0;\n\n // disable progressBar\n clearInterval(this.intervalId);\n this.width = 0;\n }\n @HostListener('mouseleave')\n delayedHideToast() {\n if (\n this.options.disableTimeOut ||\n this.options.extendedTimeOut === 0 ||\n this.state.value === 'removed'\n ) {\n return;\n }\n this.outsideTimeout(() => this.remove(), this.options.extendedTimeOut);\n this.options.timeOut = this.options.extendedTimeOut;\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\n this.width = -1;\n if (this.options.progressBar) {\n this.outsideInterval(() => this.updateProgress(), 10);\n }\n }\n\n outsideTimeout(func: Function, timeout: number) {\n if (this.ngZone) {\n this.ngZone.runOutsideAngular(\n () =>\n (this.timeout = setTimeout(\n () => this.runInsideAngular(func),\n timeout\n ))\n );\n } else {\n this.timeout = setTimeout(() => func(), timeout);\n }\n }\n\n outsideInterval(func: Function, timeout: number) {\n if (this.ngZone) {\n this.ngZone.runOutsideAngular(\n () =>\n (this.intervalId = setInterval(\n () => this.runInsideAngular(func),\n timeout\n ))\n );\n } else {\n this.intervalId = setInterval(() => func(), timeout);\n }\n }\n\n private runInsideAngular(func: Function) {\n if (this.ngZone) {\n this.ngZone.run(() => func());\n } else {\n func();\n }\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\n\nimport { Toast } from './toast.component';\nimport {\n DefaultNoComponentGlobalConfig,\n GlobalConfig,\n TOAST_CONFIG,\n} from './toastr-config';\n\nexport const DefaultGlobalConfig: GlobalConfig = {\n ...DefaultNoComponentGlobalConfig,\n toastComponent: Toast,\n};\n\n@NgModule({\n imports: [CommonModule],\n declarations: [Toast],\n exports: [Toast],\n entryComponents: [Toast],\n})\nexport class ToastrModule {\n static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders {\n return {\n ngModule: ToastrModule,\n providers: [\n {\n provide: TOAST_CONFIG,\n useValue: {\n default: DefaultGlobalConfig,\n config,\n },\n },\n ],\n };\n }\n}\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class ToastrComponentlessModule {\n static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders {\n return {\n ngModule: ToastrModule,\n providers: [\n {\n provide: TOAST_CONFIG,\n useValue: {\n default: DefaultNoComponentGlobalConfig,\n config,\n },\n },\n ],\n };\n }\n}\n","import { CommonModule } from '@angular/common';\r\nimport { ModuleWithProviders } from '@angular/compiler/src/core';\r\nimport {\r\n ApplicationRef,\r\n Component,\r\n HostBinding,\r\n HostListener,\r\n NgModule,\r\n OnDestroy,\r\n} from '@angular/core';\r\nimport { SafeHtml } from '@angular/platform-browser';\r\n\r\nimport { Subscription } from 'rxjs';\r\n\r\nimport {\r\n DefaultNoComponentGlobalConfig,\r\n GlobalConfig,\r\n IndividualConfig,\r\n ToastPackage,\r\n TOAST_CONFIG,\r\n} from './toastr-config';\r\nimport { ToastrService } from './toastr.service';\r\n\r\n@Component({\r\n selector: '[toast-component]',\r\n template: `\r\n <button *ngIf=\"options.closeButton\" (click)=\"remove()\" class=\"toast-close-button\" aria-label=\"Close\">\r\n <span aria-hidden=\"true\">×</span>\r\n </button>\r\n <div *ngIf=\"title\" [class]=\"options.titleClass\" [attr.aria-label]=\"title\">\r\n {{ title }}\r\n </div>\r\n <div *ngIf=\"message && options.enableHtml\" role=\"alert\" aria-live=\"polite\"\r\n [class]=\"options.messageClass\" [innerHTML]=\"message\">\r\n </div>\r\n <div *ngIf=\"message && !options.enableHtml\" role=\"alert\" aria-live=\"polite\"\r\n [class]=\"options.messageClass\" [attr.aria-label]=\"message\">\r\n {{ message }}\r\n </div>\r\n <div *ngIf=\"options.progressBar\">\r\n <div class=\"toast-progress\" [style.width]=\"width + '%'\"></div>\r\n </div>\r\n `,\r\n})\r\nexport class ToastNoAnimation implements OnDestroy {\r\n message?: string | SafeHtml | null;\r\n title?: string;\r\n options: IndividualConfig;\r\n originalTimeout: number;\r\n /** width of progress bar */\r\n width = -1;\r\n /** a combination of toast type and options.toastClass */\r\n @HostBinding('class') toastClasses = '';\r\n\r\n @HostBinding('style.display')\r\n get displayStyle() {\r\n if (this.state === 'inactive') {\r\n return 'none';\r\n }\r\n return 'inherit';\r\n }\r\n\r\n /** controls animation */\r\n state = 'inactive';\r\n private timeout: any;\r\n private intervalId: any;\r\n private hideTime: number;\r\n private sub: Subscription;\r\n private sub1: Subscription;\r\n private sub2: Subscription;\r\n\r\n constructor(\r\n protected toastrService: ToastrService,\r\n public toastPackage: ToastPackage,\r\n protected appRef: ApplicationRef,\r\n ) {\r\n this.message = toastPackage.message;\r\n this.title = toastPackage.title;\r\n this.options = toastPackage.config;\r\n this.originalTimeout = toastPackage.config.timeOut;\r\n this.toastClasses = `${toastPackage.toastType} ${\r\n toastPackage.config.toastClass\r\n }`;\r\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\r\n this.activateToast();\r\n });\r\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\r\n this.remove();\r\n });\r\n this.sub2 = toastPackage.toastRef.timeoutReset().subscribe(() => {\r\n this.resetTimeout();\r\n });\r\n }\r\n ngOnDestroy() {\r\n this.sub.unsubscribe();\r\n this.sub1.unsubscribe();\r\n this.sub2.unsubscribe();\r\n clearInterval(this.intervalId);\r\n clearTimeout(this.timeout);\r\n }\r\n /**\r\n * activates toast and sets timeout\r\n */\r\n activateToast() {\r\n this.state = 'active';\r\n if (!this.options.disableTimeOut && this.options.timeOut) {\r\n this.timeout = setTimeout(() => {\r\n this.remove();\r\n }, this.options.timeOut);\r\n this.hideTime = new Date().getTime() + this.options.timeOut;\r\n if (this.options.progressBar) {\r\n this.intervalId = setInterval(() => this.updateProgress(), 10);\r\n }\r\n }\r\n if (this.options.onActivateTick) {\r\n this.appRef.tick();\r\n }\r\n }\r\n /**\r\n * updates progress bar width\r\n */\r\n updateProgress() {\r\n if (this.width === 0 || this.width === 100 || !this.options.timeOut) {\r\n return;\r\n }\r\n const now = new Date().getTime();\r\n const remaining = this.hideTime - now;\r\n this.width = (remaining / this.options.timeOut) * 100;\r\n if (this.options.progressAnimation === 'increasing') {\r\n this.width = 100 - this.width;\r\n }\r\n if (this.width <= 0) {\r\n this.width = 0;\r\n }\r\n if (this.width >= 100) {\r\n this.width = 100;\r\n }\r\n }\r\n\r\n resetTimeout() {\r\n clearTimeout(this.timeout);\r\n clearInterval(this.intervalId);\r\n this.state = 'active';\r\n\r\n this.options.timeOut = this.originalTimeout;\r\n this.timeout = setTimeout(() => this.remove(), this.originalTimeout);\r\n this.hideTime = new Date().getTime() + (this.originalTimeout || 0);\r\n this.width = -1;\r\n if (this.options.progressBar) {\r\n this.intervalId = setInterval(() => this.updateProgress(), 10);\r\n }\r\n }\r\n\r\n /**\r\n * tells toastrService to remove this toast after animation time\r\n */\r\n remove() {\r\n if (this.state === 'removed') {\r\n return;\r\n }\r\n clearTimeout(this.timeout);\r\n this.state = 'removed';\r\n this.timeout = setTimeout(() =>\r\n this.toastrService.remove(this.toastPackage.toastId),\r\n );\r\n }\r\n @HostListener('click')\r\n tapToast() {\r\n if (this.state === 'removed') {\r\n return;\r\n }\r\n this.toastPackage.triggerTap();\r\n if (this.options.tapToDismiss) {\r\n this.remove();\r\n }\r\n }\r\n @HostListener('mouseenter')\r\n stickAround() {\r\n if (this.state === 'removed') {\r\n return;\r\n }\r\n clearTimeout(this.timeout);\r\n this.options.timeOut = 0;\r\n this.hideTime = 0;\r\n\r\n // disable progressBar\r\n clearInterval(this.intervalId);\r\n this.width = 0;\r\n }\r\n @HostListener('mouseleave')\r\n delayedHideToast() {\r\n if (\r\n this.options.disableTimeOut ||\r\n this.options.extendedTimeOut === 0 ||\r\n this.state === 'removed'\r\n ) {\r\n return;\r\n }\r\n this.timeout = setTimeout(\r\n () => this.remove(),\r\n this.options.extendedTimeOut,\r\n );\r\n this.options.timeOut = this.options.extendedTimeOut;\r\n this.hideTime = new Date().getTime() + (this.options.timeOut || 0);\r\n this.width = -1;\r\n if (this.options.progressBar) {\r\n this.intervalId = setInterval(() => this.updateProgress(), 10);\r\n }\r\n }\r\n}\r\n\r\nexport const DefaultNoAnimationsGlobalConfig: GlobalConfig = {\r\n ...DefaultNoComponentGlobalConfig,\r\n toastComponent: ToastNoAnimation,\r\n};\r\n\r\n@NgModule({\r\n imports: [CommonModule],\r\n declarations: [ToastNoAnimation],\r\n exports: [ToastNoAnimation],\r\n entryComponents: [ToastNoAnimation],\r\n})\r\nexport class ToastNoAnimationModule {\r\n static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders {\r\n return {\r\n ngModule: ToastNoAnimationModule,\r\n providers: [\r\n {\r\n provide: TOAST_CONFIG,\r\n useValue: {\r\n default: DefaultNoAnimationsGlobalConfig,\r\n config,\r\n },\r\n },\r\n ],\r\n };\r\n }\r\n}\r\n"]} |