ngx-toastr 8.7.2 → 8.7.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-toastr.umd.js.map","sources":["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-ref.ts","ng://ngx-toastr/overlay/overlay-container.ts","ng://ngx-toastr/overlay/overlay.ts","ng://ngx-toastr/toastr/toast-injector.ts","ng://ngx-toastr/toastr/toast-token.ts","ng://ngx-toastr/toastr/toastr.service.ts","ng://ngx-toastr/toastr/toast.component.ts","ng://ngx-toastr/toastr/default-config.ts","ng://ngx-toastr/toastr/toastr.module.ts"],"sourcesContent":["import { SafeHtml } from '@angular/platform-browser';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { ComponentType } from '../portal/portal';\nimport { ToastRef } from './toast-injector';\n\n/**\n * Configuration for an individual toast.\n */\n export 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?: 'increasing' | 'decreasing';\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 to toast title\n * default: toast-title\n */\n titleClass: string;\n /**\n * css class on to toast title\n * default: toast-title\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/**\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 */\nexport interface GlobalToastrConfig extends GlobalConfig {}\nexport interface IndividualToastrConfig extends IndividualConfig {}\nexport interface ToastrConfig extends IndividualConfig {}\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 { 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","/**\n * The OverlayContainer is the container in which all overlays will load.\n * It should be provided in the root component to ensure it is properly shared.\n */\nexport class OverlayContainer {\n private _containerElement: HTMLElement;\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) { this._createContainer(); }\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 private _createContainer(): void {\n const container = document.createElement('div');\n container.classList.add('overlay-container');\n document.body.appendChild(container);\n this._containerElement = container;\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, Injectable } from '@angular/core';\nimport { DomPortalHost } from '../portal/dom-portal-host';\nimport { OverlayRef } from './overlay-ref';\n\nimport { ToastContainerDirective } from '../toastr/toast.directive';\nimport { OverlayContainer } from './overlay-container';\n\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()\n export class Overlay {\n private _paneElements: {string?: HTMLElement} = {};\n constructor(private _overlayContainer: OverlayContainer,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef) {}\n /**\n * Creates an overlay.\n * @returns A reference to the created overlay.\n */\n create(positionClass?: string, overlayContainer?: ToastContainerDirective): OverlayRef {\n // get existing pane if possible\n return this._createOverlayRef(this.getPaneElement(positionClass, overlayContainer));\n }\n\n getPaneElement(positionClass: string = '', overlayContainer?: ToastContainerDirective): HTMLElement {\n if (!this._paneElements[positionClass]) {\n this._paneElements[positionClass] = this._createPaneElement(positionClass, overlayContainer);\n }\n return this._paneElements[positionClass];\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(positionClass: string, overlayContainer?: ToastContainerDirective): HTMLElement {\n const pane = document.createElement('div');\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 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(pane, this._componentFactoryResolver, this._appRef);\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\n\n/** Providers for Overlay and its related injectables. */\nexport const OVERLAY_PROVIDERS = [\n Overlay,\n OverlayContainer,\n];\n","import { Injector } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\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\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 /**\n * Close the toast.\n */\n close(): void {\n this._overlayRef.detach();\n this._afterClosed.next();\n this._afterClosed.complete();\n this._manualClose.complete();\n this._activate.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\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 get(token: any, notFoundValue?: any): any {\n if (token === ToastPackage && this._toastPackage) {\n return this._toastPackage;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { GlobalConfig } from './toastr-config';\n\nexport interface ToastToken {\n config: GlobalConfig;\n defaults: any;\n}\n\nexport const TOAST_CONFIG = new InjectionToken<ToastToken>('ToastConfig');\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 { ToastToken, TOAST_CONFIG } from './toast-token';\nimport { ToastContainerDirective } from './toast.directive';\nimport {\n GlobalConfig,\n IndividualConfig,\n ToastPackage,\n} from './toastr-config';\n\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()\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 const defaultConfig = new token.defaults;\n this.toastrConfig = { ...defaultConfig, ...token.config };\n this.toastrConfig.iconClasses = {\n ...defaultConfig.iconClasses,\n ...token.config.iconClasses,\n };\n }\n /** show toast */\n show(message?: string, title?: string, override: Partial<IndividualConfig> = {}, type = '') {\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show successful toast */\n success(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.success || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show error toast */\n error(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.error || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show info toast */\n info(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.info || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show warning toast */\n warning(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.warning || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\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 (this.currentlyActive < this.toastrConfig.maxOpened && this.toasts[this.currentlyActive]) {\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 * Determines if toast message is already shown\n */\n isDuplicate(message: string) {\n for (let i = 0; i < this.toasts.length; i++) {\n if (this.toasts[i].message === message) {\n return true;\n }\n }\n return false;\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(toastId: number): { 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(() => this._buildNotification(toastType, message, title, config));\n }\n return this._buildNotification(toastType, message, title, config);\n }\n\n /**\n * Creates and attaches toast data to component\n * returns null if toast is duplicate and preventDuplicates == True\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 (message && this.toastrConfig.preventDuplicates && this.isDuplicate(message)) {\n return null;\n }\n this.previousToastMessage = message;\n let keepInactive = false;\n if (this.toastrConfig.maxOpened && this.currentlyActive >= this.toastrConfig.maxOpened) {\n keepInactive = true;\n if (this.toastrConfig.autoDismiss) {\n this.clear(this.toasts[this.toasts.length - 1].toastId);\n }\n }\n const overlayRef = this.overlay.create(config.positionClass, this.overlayContainer);\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';\n\nimport { Subscription } from 'rxjs';\n\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\">&times;</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('inactive', style({\n display: 'none',\n opacity: 0,\n })),\n state('active', style({})),\n state('removed', style({ opacity: 0 })),\n transition('inactive => active',\n animate('{{ easeTime }}ms {{ easing }}')\n ),\n transition('active => removed',\n animate('{{ easeTime }}ms {{ easing }}'),\n ),\n ]),\n ],\n preserveWhitespaces: false,\n})\nexport class Toast implements OnDestroy {\n message?: string | SafeHtml | null;\n title?: string;\n options: IndividualConfig;\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') 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\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.toastClasses = `${toastPackage.toastType} ${toastPackage.config.toastClass}`;\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\n this.activateToast();\n });\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\n this.remove();\n });\n }\n ngOnDestroy() {\n this.sub.unsubscribe();\n this.sub1.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 /**\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 (this.options.disableTimeOut\n || this.options.extendedTimeOut === 0\n || this.state.value === 'removed') {\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 this.timeout = setTimeout(() => this.runInsideAngular(func), timeout)\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 this.intervalId = setInterval(() => this.runInsideAngular(func), timeout)\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}\n","import { Toast } from './toast.component';\nimport { GlobalConfig } from './toastr-config';\n\nexport class DefaultGlobalConfig implements GlobalConfig {\n // Global\n maxOpened = 0;\n autoDismiss = false;\n newestOnTop = true;\n preventDuplicates = false;\n iconClasses = {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning',\n };\n\n // Individual\n toastComponent = Toast;\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' | 'increasing' = 'decreasing';\n}\n","import { CommonModule } from '@angular/common';\nimport {\n ModuleWithProviders,\n NgModule,\n Optional,\n SkipSelf,\n} from '@angular/core';\n\nimport { Overlay } from '../overlay/overlay';\nimport { OverlayContainer } from '../overlay/overlay-container';\nimport { DefaultGlobalConfig } from './default-config';\nimport { TOAST_CONFIG } from './toast-token';\nimport { Toast } from './toast.component';\nimport { GlobalConfig } from './toastr-config';\nimport { ToastrService } from './toastr.service';\n\n\n@NgModule({\n imports: [CommonModule],\n exports: [Toast],\n declarations: [Toast],\n entryComponents: [Toast],\n})\nexport class ToastrModule {\n constructor(@Optional() @SkipSelf() parentModule: ToastrModule) {\n if (parentModule) {\n throw new Error('ToastrModule is already loaded. It should only be imported in your application\\'s main module.');\n }\n }\n static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders {\n return {\n ngModule: ToastrModule,\n providers: [\n { provide: TOAST_CONFIG, useValue: { config, defaults: DefaultGlobalConfig } },\n OverlayContainer,\n Overlay,\n ToastrService,\n ],\n };\n }\n}\n"],"names":["Subject","tslib_1.__extends","Injectable","ComponentFactoryResolver","ApplicationRef","InjectionToken","tslib_1.__values","SecurityContext","Inject","Injector","DomSanitizer","NgZone","Component","trigger","state","style","transition","animate","HostBinding","HostListener","NgModule","CommonModule","Optional","SkipSelf"],"mappings":";;;;;;;;;;AAEA;;;AAmIA;;QAAA;QAIE,sBACS,SACA,QACA,SACA,OACA,WACA;YANT,iBAYC;YAXQ,YAAO,GAAP,OAAO;YACP,WAAM,GAAN,MAAM;YACN,YAAO,GAAP,OAAO;YACP,UAAK,GAAL,KAAK;YACL,cAAS,GAAT,SAAS;YACT,aAAQ,GAAR,QAAQ;0BATA,IAAIA,YAAO,EAAO;6BACf,IAAIA,YAAO,EAAO;YAUpC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,SAAS,CAAC;gBACpC,KAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;gBAC1B,KAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;aACxB,CAAC,CAAC;SACJ;;;;;;QAGD,iCAAU;;;;YAAV;gBACE,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;gBACnB,IAAI,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE;oBAC5B,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;iBACxB;aACF;;;;QAED,4BAAK;;;YAAL;gBACE,OAAO,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;aACnC;;;;;;;QAGD,oCAAa;;;;;YAAb,UAAc,MAAY;gBACxB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;aAC7B;;;;QAED,+BAAQ;;;YAAR;gBACE,OAAO,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,CAAC;aACtC;2BA1KH;QA2KC;;;;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,eAAe;gBACxB,OAAO,EAAE,eAAe;aACzB;;kCAGgB,KAAK;+BACR,KAAK;2BAET,IAAI;mCACI,IAAI;8BACT,KAAK;+BACJ,KAAK;8BACN,OAAO;iCACJ,iBAAiB;8BACpB,aAAa;gCACX,eAAe;0BACrB,SAAS;4BACP,GAAG;gCACC,IAAI;kCACF,KAAK;qCAC2B,YAAY;;kCAhC/D;QAiCC;;;;;;ACjCD;QAwBE,sBAAoC;YAClC,IAAI,YAAY,EAAE;gBAChB,MAAM,IAAI,KAAK,CAAC,gGAAgG,CAAC,CAAC;aACnH;SACF;;;;;QACM,oBAAO;;;;YAAd,UAAe,MAAkC;gBAAlC,uBAAA;oBAAA,WAAkC;;gBAC/C,OAAO;oBACL,QAAQ,EAAE,YAAY;oBACtB,SAAS,EAAE;wBACT,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,EAAE,MAAM,QAAA,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAAE;wBAC9E,gBAAgB;wBAChB,OAAO;wBACP,aAAa;qBACd;iBACF,CAAC;aACH;;oBAtBFC,aAAQ,SAAC;wBACR,OAAO,EAAE,CAACC,mBAAY,CAAC;wBACvB,OAAO,EAAE,CAAC,KAAK,CAAC;wBAChB,YAAY,EAAE,CAAC,KAAK,CAAC;wBACrB,eAAe,EAAE,CAAC,KAAK,CAAC;qBACzB;;;;;wBACY,YAAY,uBACVC,aAAQ,YAAIC,aAAQ;;;2BAxBnC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ngx-toastr.umd.js.map","sources":["ng://ngx-toastr/toastr/toast.directive.ts","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-ref.ts","ng://ngx-toastr/overlay/overlay-container.ts","ng://ngx-toastr/overlay/overlay.ts","ng://ngx-toastr/toastr/toast-injector.ts","ng://ngx-toastr/toastr/toast-token.ts","ng://ngx-toastr/toastr/toastr.service.ts","ng://ngx-toastr/toastr/toast.component.ts","ng://ngx-toastr/toastr/default-config.ts","ng://ngx-toastr/toastr/toastr.module.ts","ng://ngx-toastr/toastr/toast-noanimation.component.ts"],"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","import { SafeHtml } from '@angular/platform-browser';\n\nimport { Observable, Subject } from 'rxjs';\n\nimport { ComponentType } from '../portal/portal';\nimport { ToastRef } from './toast-injector';\n\n/**\n * Configuration for an individual toast.\n */\n export 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?: 'increasing' | 'decreasing';\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 to toast title\n * default: toast-title\n */\n titleClass: string;\n /**\n * css class on to toast title\n * default: toast-title\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/**\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 */\nexport interface GlobalToastrConfig extends GlobalConfig {}\nexport interface IndividualToastrConfig extends IndividualConfig {}\nexport interface ToastrConfig extends IndividualConfig {}\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 { 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","/**\n * The OverlayContainer is the container in which all overlays will load.\n * It should be provided in the root component to ensure it is properly shared.\n */\nexport class OverlayContainer {\n private _containerElement: HTMLElement;\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) { this._createContainer(); }\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 private _createContainer(): void {\n const container = document.createElement('div');\n container.classList.add('overlay-container');\n document.body.appendChild(container);\n this._containerElement = container;\n }\n}\n","import { ApplicationRef, ComponentFactoryResolver, Injectable } from '@angular/core';\nimport { DomPortalHost } from '../portal/dom-portal-host';\nimport { OverlayRef } from './overlay-ref';\n\nimport { ToastContainerDirective } from '../toastr/toast.directive';\nimport { OverlayContainer } from './overlay-container';\n\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()\n export class Overlay {\n private _paneElements: {string?: HTMLElement} = {};\n constructor(private _overlayContainer: OverlayContainer,\n private _componentFactoryResolver: ComponentFactoryResolver,\n private _appRef: ApplicationRef) {}\n /**\n * Creates an overlay.\n * @returns A reference to the created overlay.\n */\n create(positionClass?: string, overlayContainer?: ToastContainerDirective): OverlayRef {\n // get existing pane if possible\n return this._createOverlayRef(this.getPaneElement(positionClass, overlayContainer));\n }\n\n getPaneElement(positionClass: string = '', overlayContainer?: ToastContainerDirective): HTMLElement {\n if (!this._paneElements[positionClass]) {\n this._paneElements[positionClass] = this._createPaneElement(positionClass, overlayContainer);\n }\n return this._paneElements[positionClass];\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(positionClass: string, overlayContainer?: ToastContainerDirective): HTMLElement {\n const pane = document.createElement('div');\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 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(pane, this._componentFactoryResolver, this._appRef);\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\n\n/** Providers for Overlay and its related injectables. */\nexport const OVERLAY_PROVIDERS = [\n Overlay,\n OverlayContainer,\n];\n","import { Injector } from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\n\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\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 /**\n * Close the toast.\n */\n close(): void {\n this._overlayRef.detach();\n this._afterClosed.next();\n this._afterClosed.complete();\n this._manualClose.complete();\n this._activate.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\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 get(token: any, notFoundValue?: any): any {\n if (token === ToastPackage && this._toastPackage) {\n return this._toastPackage;\n }\n return this._parentInjector.get(token, notFoundValue);\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nimport { GlobalConfig } from './toastr-config';\n\nexport interface ToastToken {\n config: GlobalConfig;\n defaults: any;\n}\n\nexport const TOAST_CONFIG = new InjectionToken<ToastToken>('ToastConfig');\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 { ToastToken, TOAST_CONFIG } from './toast-token';\nimport { ToastContainerDirective } from './toast.directive';\nimport {\n GlobalConfig,\n IndividualConfig,\n ToastPackage,\n} from './toastr-config';\n\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()\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 const defaultConfig = new token.defaults;\n this.toastrConfig = { ...defaultConfig, ...token.config };\n this.toastrConfig.iconClasses = {\n ...defaultConfig.iconClasses,\n ...token.config.iconClasses,\n };\n }\n /** show toast */\n show(message?: string, title?: string, override: Partial<IndividualConfig> = {}, type = '') {\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show successful toast */\n success(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.success || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show error toast */\n error(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.error || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show info toast */\n info(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.info || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\n }\n /** show warning toast */\n warning(message?: string, title?: string, override: Partial<IndividualConfig> = {}) {\n const type = this.toastrConfig.iconClasses.warning || '';\n return this._preBuildNotification(type, message, title, this.applyConfig(override));\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 (this.currentlyActive < this.toastrConfig.maxOpened && this.toasts[this.currentlyActive]) {\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 * Determines if toast message is already shown\n */\n isDuplicate(message: string) {\n for (let i = 0; i < this.toasts.length; i++) {\n if (this.toasts[i].message === message) {\n return true;\n }\n }\n return false;\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(toastId: number): { 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(() => this._buildNotification(toastType, message, title, config));\n }\n return this._buildNotification(toastType, message, title, config);\n }\n\n /**\n * Creates and attaches toast data to component\n * returns null if toast is duplicate and preventDuplicates == True\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 (message && this.toastrConfig.preventDuplicates && this.isDuplicate(message)) {\n return null;\n }\n this.previousToastMessage = message;\n let keepInactive = false;\n if (this.toastrConfig.maxOpened && this.currentlyActive >= this.toastrConfig.maxOpened) {\n keepInactive = true;\n if (this.toastrConfig.autoDismiss) {\n this.clear(this.toasts[this.toasts.length - 1].toastId);\n }\n }\n const overlayRef = this.overlay.create(config.positionClass, this.overlayContainer);\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';\n\nimport { Subscription } from 'rxjs';\n\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\">&times;</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('inactive', style({\n display: 'none',\n opacity: 0,\n })),\n state('active', style({})),\n state('removed', style({ opacity: 0 })),\n transition('inactive => active',\n animate('{{ easeTime }}ms {{ easing }}')\n ),\n transition('active => removed',\n animate('{{ easeTime }}ms {{ easing }}'),\n ),\n ]),\n ],\n preserveWhitespaces: false,\n})\nexport class Toast implements OnDestroy {\n message?: string | SafeHtml | null;\n title?: string;\n options: IndividualConfig;\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') 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\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.toastClasses = `${toastPackage.toastType} ${toastPackage.config.toastClass}`;\n this.sub = toastPackage.toastRef.afterActivate().subscribe(() => {\n this.activateToast();\n });\n this.sub1 = toastPackage.toastRef.manualClosed().subscribe(() => {\n this.remove();\n });\n }\n ngOnDestroy() {\n this.sub.unsubscribe();\n this.sub1.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 /**\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 (this.options.disableTimeOut\n || this.options.extendedTimeOut === 0\n || this.state.value === 'removed') {\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 this.timeout = setTimeout(() => this.runInsideAngular(func), timeout)\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 this.intervalId = setInterval(() => this.runInsideAngular(func), timeout)\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}\n","import { Toast } from './toast.component';\nimport { GlobalConfig } from './toastr-config';\n\nexport class DefaultGlobalConfig implements GlobalConfig {\n // Global\n maxOpened = 0;\n autoDismiss = false;\n newestOnTop = true;\n preventDuplicates = false;\n iconClasses = {\n error: 'toast-error',\n info: 'toast-info',\n success: 'toast-success',\n warning: 'toast-warning',\n };\n\n // Individual\n toastComponent = Toast;\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' | 'increasing' = 'decreasing';\n}\n","import { CommonModule } from '@angular/common';\nimport {\n ModuleWithProviders,\n NgModule,\n Optional,\n SkipSelf,\n} from '@angular/core';\n\nimport { Overlay } from '../overlay/overlay';\nimport { OverlayContainer } from '../overlay/overlay-container';\nimport { DefaultGlobalConfig } from './default-config';\nimport { TOAST_CONFIG } from './toast-token';\nimport { Toast } from './toast.component';\nimport { GlobalConfig } from './toastr-config';\nimport { ToastrService } from './toastr.service';\n\n\n@NgModule({\n imports: [CommonModule],\n exports: [Toast],\n declarations: [Toast],\n entryComponents: [Toast],\n})\nexport class ToastrModule {\n constructor(@Optional() @SkipSelf() parentModule: ToastrModule) {\n if (parentModule) {\n throw new Error('ToastrModule is already loaded. It should only be imported in your application\\'s main module.');\n }\n }\n static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders {\n return {\n ngModule: ToastrModule,\n providers: [\n { provide: TOAST_CONFIG, useValue: { config, defaults: DefaultGlobalConfig } },\n OverlayContainer,\n Overlay,\n ToastrService,\n ],\n };\n }\n}\n","import { CommonModule } from '@angular/common';\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 { IndividualConfig, ToastPackage } 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\">&times;</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 /** 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\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.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 }\r\n ngOnDestroy() {\r\n this.sub.unsubscribe();\r\n this.sub1.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 /**\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 (this.options.disableTimeOut\r\n || this.options.extendedTimeOut === 0\r\n || this.state === 'removed') {\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\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"],"names":["Directive","ElementRef","NgModule","Subject","tslib_1.__extends","Injectable","ComponentFactoryResolver","ApplicationRef","InjectionToken","tslib_1.__values","SecurityContext","Inject","Injector","DomSanitizer","NgZone","Component","trigger","state","style","transition","animate","HostBinding","HostListener","CommonModule","Optional","SkipSelf"],"mappings":";;;;;;;;;;AAAA;QAWE,iCAAoB,EAAc;YAAd,OAAE,GAAF,EAAE,CAAY;SAAK;;;;QACvC,qDAAmB;;;YAAnB;gBACE,OAAO,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC;aAC9B;;oBARFA,cAAS,SAAC;wBACT,QAAQ,EAAE,kBAAkB;wBAC5B,QAAQ,EAAE,gBAAgB;qBAC3B;;;;;wBAPCC,eAAU;;;sCAFZ;;;;;;oBAiBCC,aAAQ,SAAC;wBACR,YAAY,EAAE,CAAC,uBAAuB,CAAC;wBACvC,OAAO,EAAE,CAAC,uBAAuB,CAAC;qBACnC;;mC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AAQ,EAAE,+uBAiBT;qBACF;;;;;wBAtBQ,aAAa;wBADK,YAAY;wBAXrCR,mBAAc;;;;qCA0Cbc,gBAAW,SAAC,OAAO;qCAEnBA,gBAAW,SAAC,eAAe;iCA4F3BC,iBAAY,SAAC,OAAO;oCAUpBA,iBAAY,SAAC,YAAY;yCAazBA,iBAAY,SAAC,YAAY;;+BAjK5B;;;;;;oBAqLCpB,aAAQ,SAAC;wBACR,OAAO,EAAE,CAACqB,mBAAY,CAAC;wBACvB,YAAY,EAAE,CAAC,gBAAgB,CAAC;wBAChC,OAAO,EAAE,CAAC,gBAAgB,CAAC;wBAC3B,eAAe,EAAE,CAAC,gBAAgB,CAAC;qBACpC;;qCA1LD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("rxjs"),require("tslib"),require("@angular/core"),require("@angular/platform-browser"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-toastr",["exports","rxjs","tslib","@angular/core","@angular/platform-browser","@angular/animations","@angular/common"],e):e(t["ngx-toastr"]={},null,t.tslib,t.ng.core,t.ng.platformBrowser,t.ng.animations,t.ng.common)}(this,function(t,r,c,d,e,i,o){"use strict";var m=function(){function t(t,e,i,o,s,n){var a=this;this.toastId=t,this.config=e,this.message=i,this.title=o,this.toastType=s,this.toastRef=n,this._onTap=new r.Subject,this._onAction=new r.Subject,this.toastRef.afterClosed().subscribe(function(){a._onAction.complete(),a._onTap.complete()})}return t.prototype.triggerTap=function(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()},t.prototype.onTap=function(){return this._onTap.asObservable()},t.prototype.triggerAction=function(t){this._onAction.next(t)},t.prototype.onAction=function(){return this._onAction.asObservable()},t}(),v=function(){function t(t,e){this.component=t,this.injector=e}return t.prototype.attach=function(t,e){return(this._attachedHost=t).attach(this,e)},t.prototype.detach=function(){var t=this._attachedHost;if(t)return this._attachedHost=undefined,t.detach()},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),s=function(){function t(){}return t.prototype.attach=function(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)},t.prototype.detach=function(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=undefined,this._disposeFn&&(this._disposeFn(),this._disposeFn=undefined)},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t}(),n=function(s){function t(t,e,i){var o=s.call(this)||this;return o._hostDomElement=t,o._componentFactoryResolver=e,o._appRef=i,o}return c.__extends(t,s),t.prototype.attachComponentPortal=function(t,e){var i,o=this,s=this._componentFactoryResolver.resolveComponentFactory(t.component);return i=s.create(t.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(function(){o._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i},t.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},t}(s),a=function(){function t(t){this._portalHost=t}return t.prototype.attach=function(t,e){return void 0===e&&(e=!0),this._portalHost.attach(t,e)},t.prototype.detach=function(){return this._portalHost.detach()},t}(),u=function(){function t(){}return t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=document.createElement("div");t.classList.add("overlay-container"),document.body.appendChild(t),this._containerElement=t},t}(),h=function(){function t(t,e,i){this._overlayContainer=t,this._componentFactoryResolver=e,this._appRef=i,this._paneElements={}}return t.prototype.create=function(t,e){return this._createOverlayRef(this.getPaneElement(t,e))},t.prototype.getPaneElement=function(t,e){return void 0===t&&(t=""),this._paneElements[t]||(this._paneElements[t]=this._createPaneElement(t,e)),this._paneElements[t]},t.prototype._createPaneElement=function(t,e){var i=document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i},t.prototype._createPortalHost=function(t){return new n(t,this._componentFactoryResolver,this._appRef)},t.prototype._createOverlayRef=function(t){return new a(this._createPortalHost(t))},t.decorators=[{type:d.Injectable}],t.ctorParameters=function(){return[{type:u},{type:d.ComponentFactoryResolver},{type:d.ApplicationRef}]},t}(),p=[h,u],g=function(){function t(t){this._overlayRef=t,this._afterClosed=new r.Subject,this._activate=new r.Subject,this._manualClose=new r.Subject}return t.prototype.manualClose=function(){this._manualClose.next(),this._manualClose.complete()},t.prototype.manualClosed=function(){return this._manualClose.asObservable()},t.prototype.close=function(){this._overlayRef.detach(),this._afterClosed.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete()},t.prototype.afterClosed=function(){return this._afterClosed.asObservable()},t.prototype.isInactive=function(){return this._activate.isStopped},t.prototype.activate=function(){this._activate.next(),this._activate.complete()},t.prototype.afterActivate=function(){return this._activate.asObservable()},t}(),y=function(){function t(t,e){this._toastPackage=t,this._parentInjector=e}return t.prototype.get=function(t,e){return t===m&&this._toastPackage?this._toastPackage:this._parentInjector.get(t,e)},t}(),l=new d.InjectionToken("ToastConfig"),f=function(){function t(t,e,i,o,s){this.overlay=e,this._injector=i,this.sanitizer=o,this.ngZone=s,this.currentlyActive=0,this.toasts=[],this.index=0;var n=new t.defaults;this.toastrConfig=c.__assign({},n,t.config),this.toastrConfig.iconClasses=c.__assign({},n.iconClasses,t.config.iconClasses)}return t.prototype.show=function(t,e,i,o){return void 0===i&&(i={}),void 0===o&&(o=""),this._preBuildNotification(o,t,e,this.applyConfig(i))},t.prototype.success=function(t,e,i){void 0===i&&(i={});var o=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))},t.prototype.error=function(t,e,i){void 0===i&&(i={});var o=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))},t.prototype.info=function(t,e,i){void 0===i&&(i={});var o=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))},t.prototype.warning=function(t,e,i){void 0===i&&(i={});var o=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(o,t,e,this.applyConfig(i))},t.prototype.clear=function(t){try{for(var e=c.__values(this.toasts),i=e.next();!i.done;i=e.next()){var o=i.value;if(t!==undefined){if(o.toastId===t)return void o.toastRef.manualClose()}else o.toastRef.manualClose()}}catch(a){s={error:a}}finally{try{i&&!i.done&&(n=e["return"])&&n.call(e)}finally{if(s)throw s.error}}var s,n},t.prototype.remove=function(t){var e=this._findToast(t);if(!e)return!1;if(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length)return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){var i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0},t.prototype.isDuplicate=function(t){for(var e=0;e<this.toasts.length;e++)if(this.toasts[e].message===t)return!0;return!1},t.prototype.applyConfig=function(t){return void 0===t&&(t={}),c.__assign({},this.toastrConfig,t)},t.prototype._findToast=function(t){for(var e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null},t.prototype._preBuildNotification=function(t,e,i,o){var s=this;return o.onActivateTick?this.ngZone.run(function(){return s._buildNotification(t,e,i,o)}):this._buildNotification(t,e,i,o)},t.prototype._buildNotification=function(t,e,i,o){var s=this;if(!o.toastComponent)throw new Error("toastComponent required");if(e&&this.toastrConfig.preventDuplicates&&this.isDuplicate(e))return null;this.previousToastMessage=e;var n=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(n=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[this.toasts.length-1].toastId));var a=this.overlay.create(o.positionClass,this.overlayContainer);this.index=this.index+1;var r=e;e&&o.enableHtml&&(r=this.sanitizer.sanitize(d.SecurityContext.HTML,e));var c=new g(a),u=new m(this.index,o,r,i,t,c),h=new y(u,this._injector),p=new v(o.toastComponent,h),l=a.attach(p,this.toastrConfig.newestOnTop);c.componentInstance=l._component;var f={toastId:this.index,message:e||"",toastRef:c,onShown:c.afterActivate(),onHidden:c.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:l};return n||setTimeout(function(){f.toastRef.activate(),s.currentlyActive=s.currentlyActive+1}),this.toasts.push(f),f},t.decorators=[{type:d.Injectable}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:d.Inject,args:[l]}]},{type:h},{type:d.Injector},{type:e.DomSanitizer},{type:d.NgZone}]},t}(),_=function(){function t(t,e,i){var o=this;this.toastrService=t,this.toastPackage=e,this.ngZone=i,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=e.message,this.title=e.title,this.options=e.config,this.toastClasses=e.toastType+" "+e.config.toastClass,this.sub=e.toastRef.afterActivate().subscribe(function(){o.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(function(){o.remove()})}return t.prototype.ngOnDestroy=function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)},t.prototype.activateToast=function(){var t=this;this.state=c.__assign({},this.state,{value:"active"}),!this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(function(){return t.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.updateProgress=function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),100<=this.width&&(this.width=100)}},t.prototype.remove=function(){var t=this;"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=c.__assign({},this.state,{value:"removed"}),this.outsideTimeout(function(){return t.toastrService.remove(t.toastPackage.toastId)},+this.toastPackage.config.easeTime))},t.prototype.tapToast=function(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())},t.prototype.stickAround=function(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)},t.prototype.delayedHideToast=function(){var t=this;this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(function(){return t.remove()},this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.outsideTimeout=function(t,e){var i=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return i.timeout=setTimeout(function(){return i.runInsideAngular(t)},e)}):this.timeout=setTimeout(function(){return t()},e)},t.prototype.outsideInterval=function(t,e){var i=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return i.intervalId=setInterval(function(){return i.runInsideAngular(t)},e)}):this.intervalId=setInterval(function(){return t()},e)},t.prototype.runInsideAngular=function(t){this.ngZone?this.ngZone.run(function(){return t()}):t()},t.decorators=[{type:d.Component,args:[{selector:"[toast-component]",template:'\n <button *ngIf="options.closeButton" (click)="remove()" class="toast-close-button" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n <div *ngIf="title" [class]="options.titleClass" [attr.aria-label]="title">\n {{ title }}\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 ',animations:[i.trigger("flyInOut",[i.state("inactive",i.style({display:"none",opacity:0})),i.state("active",i.style({})),i.state("removed",i.style({opacity:0})),i.transition("inactive => active",i.animate("{{ easeTime }}ms {{ easing }}")),i.transition("active => removed",i.animate("{{ easeTime }}ms {{ easing }}"))])],preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:f},{type:m},{type:d.NgZone}]},t.propDecorators={toastClasses:[{type:d.HostBinding,args:["class"]}],state:[{type:d.HostBinding,args:["@flyInOut"]}],tapToast:[{type:d.HostListener,args:["click"]}],stickAround:[{type:d.HostListener,args:["mouseenter"]}],delayedHideToast:[{type:d.HostListener,args:["mouseleave"]}]},t}(),C=function(){this.maxOpened=0,this.autoDismiss=!1,this.newestOnTop=!0,this.preventDuplicates=!1,this.iconClasses={error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},this.toastComponent=_,this.closeButton=!1,this.timeOut=5e3,this.extendedTimeOut=1e3,this.enableHtml=!1,this.progressBar=!1,this.toastClass="toast",this.positionClass="toast-top-right",this.titleClass="toast-title",this.messageClass="toast-message",this.easing="ease-in",this.easeTime=300,this.tapToDismiss=!0,this.onActivateTick=!1,this.progressAnimation="decreasing"},T=function(){function e(t){if(t)throw new Error("ToastrModule is already loaded. It should only be imported in your application's main module.")}return e.forRoot=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[{provide:l,useValue:{config:t,defaults:C}},u,h,f]}},e.decorators=[{type:d.NgModule,args:[{imports:[o.CommonModule],exports:[_],declarations:[_],entryComponents:[_]}]}],e.ctorParameters=function(){return[{type:e,decorators:[{type:d.Optional},{type:d.SkipSelf}]}]},e}();t.Toast=_,t.ToastrService=f,t.ToastPackage=m,t.DefaultGlobalConfig=C,t.ToastrModule=T,t.ToastRef=g,t.ToastInjector=y,t.TOAST_CONFIG=l,t.ComponentPortal=v,t.BasePortalHost=s,t.Overlay=h,t.OVERLAY_PROVIDERS=p,t.OverlayContainer=u,t.OverlayRef=a,Object.defineProperty(t,"__esModule",{value:!0})});
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("rxjs"),require("tslib"),require("@angular/platform-browser"),require("@angular/animations"),require("@angular/common")):"function"==typeof define&&define.amd?define("ngx-toastr",["exports","@angular/core","rxjs","tslib","@angular/platform-browser","@angular/animations","@angular/common"],e):e(t["ngx-toastr"]={},t.ng.core,null,t.tslib,t.ng.platformBrowser,t.ng.animations,t.ng.common)}(this,function(t,f,r,c,e,i,s){"use strict";var o=function(){function t(t){this.el=t}return t.prototype.getContainerElement=function(){return this.el.nativeElement},t.decorators=[{type:f.Directive,args:[{selector:"[toastContainer]",exportAs:"toastContainer"}]}],t.ctorParameters=function(){return[{type:f.ElementRef}]},t}(),n=function(){function t(){}return t.decorators=[{type:f.NgModule,args:[{declarations:[o],exports:[o]}]}],t}(),m=function(){function t(t,e,i,s,o,n){var a=this;this.toastId=t,this.config=e,this.message=i,this.title=s,this.toastType=o,this.toastRef=n,this._onTap=new r.Subject,this._onAction=new r.Subject,this.toastRef.afterClosed().subscribe(function(){a._onAction.complete(),a._onTap.complete()})}return t.prototype.triggerTap=function(){this._onTap.next(),this.config.tapToDismiss&&this._onTap.complete()},t.prototype.onTap=function(){return this._onTap.asObservable()},t.prototype.triggerAction=function(t){this._onAction.next(t)},t.prototype.onAction=function(){return this._onAction.asObservable()},t}(),v=function(){function t(t,e){this.component=t,this.injector=e}return t.prototype.attach=function(t,e){return(this._attachedHost=t).attach(this,e)},t.prototype.detach=function(){var t=this._attachedHost;if(t)return this._attachedHost=undefined,t.detach()},Object.defineProperty(t.prototype,"isAttached",{get:function(){return null!=this._attachedHost},enumerable:!0,configurable:!0}),t.prototype.setAttachedHost=function(t){this._attachedHost=t},t}(),a=function(){function t(){}return t.prototype.attach=function(t,e){return this._attachedPortal=t,this.attachComponentPortal(t,e)},t.prototype.detach=function(){this._attachedPortal&&this._attachedPortal.setAttachedHost(),this._attachedPortal=undefined,this._disposeFn&&(this._disposeFn(),this._disposeFn=undefined)},t.prototype.setDisposeFn=function(t){this._disposeFn=t},t}(),u=function(o){function t(t,e,i){var s=o.call(this)||this;return s._hostDomElement=t,s._componentFactoryResolver=e,s._appRef=i,s}return c.__extends(t,o),t.prototype.attachComponentPortal=function(t,e){var i,s=this,o=this._componentFactoryResolver.resolveComponentFactory(t.component);return i=o.create(t.injector),this._appRef.attachView(i.hostView),this.setDisposeFn(function(){s._appRef.detachView(i.hostView),i.destroy()}),e?this._hostDomElement.insertBefore(this._getComponentRootNode(i),this._hostDomElement.firstChild):this._hostDomElement.appendChild(this._getComponentRootNode(i)),i},t.prototype._getComponentRootNode=function(t){return t.hostView.rootNodes[0]},t}(a),h=function(){function t(t){this._portalHost=t}return t.prototype.attach=function(t,e){return void 0===e&&(e=!0),this._portalHost.attach(t,e)},t.prototype.detach=function(){return this._portalHost.detach()},t}(),p=function(){function t(){}return t.prototype.getContainerElement=function(){return this._containerElement||this._createContainer(),this._containerElement},t.prototype._createContainer=function(){var t=document.createElement("div");t.classList.add("overlay-container"),document.body.appendChild(t),this._containerElement=t},t}(),l=function(){function t(t,e,i){this._overlayContainer=t,this._componentFactoryResolver=e,this._appRef=i,this._paneElements={}}return t.prototype.create=function(t,e){return this._createOverlayRef(this.getPaneElement(t,e))},t.prototype.getPaneElement=function(t,e){return void 0===t&&(t=""),this._paneElements[t]||(this._paneElements[t]=this._createPaneElement(t,e)),this._paneElements[t]},t.prototype._createPaneElement=function(t,e){var i=document.createElement("div");return i.id="toast-container",i.classList.add(t),i.classList.add("toast-container"),e?e.getContainerElement().appendChild(i):this._overlayContainer.getContainerElement().appendChild(i),i},t.prototype._createPortalHost=function(t){return new u(t,this._componentFactoryResolver,this._appRef)},t.prototype._createOverlayRef=function(t){return new h(this._createPortalHost(t))},t.decorators=[{type:f.Injectable}],t.ctorParameters=function(){return[{type:p},{type:f.ComponentFactoryResolver},{type:f.ApplicationRef}]},t}(),d=[l,p],g=function(){function t(t){this._overlayRef=t,this._afterClosed=new r.Subject,this._activate=new r.Subject,this._manualClose=new r.Subject}return t.prototype.manualClose=function(){this._manualClose.next(),this._manualClose.complete()},t.prototype.manualClosed=function(){return this._manualClose.asObservable()},t.prototype.close=function(){this._overlayRef.detach(),this._afterClosed.next(),this._afterClosed.complete(),this._manualClose.complete(),this._activate.complete()},t.prototype.afterClosed=function(){return this._afterClosed.asObservable()},t.prototype.isInactive=function(){return this._activate.isStopped},t.prototype.activate=function(){this._activate.next(),this._activate.complete()},t.prototype.afterActivate=function(){return this._activate.asObservable()},t}(),y=function(){function t(t,e){this._toastPackage=t,this._parentInjector=e}return t.prototype.get=function(t,e){return t===m&&this._toastPackage?this._toastPackage:this._parentInjector.get(t,e)},t}(),_=new f.InjectionToken("ToastConfig"),C=function(){function t(t,e,i,s,o){this.overlay=e,this._injector=i,this.sanitizer=s,this.ngZone=o,this.currentlyActive=0,this.toasts=[],this.index=0;var n=new t.defaults;this.toastrConfig=c.__assign({},n,t.config),this.toastrConfig.iconClasses=c.__assign({},n.iconClasses,t.config.iconClasses)}return t.prototype.show=function(t,e,i,s){return void 0===i&&(i={}),void 0===s&&(s=""),this._preBuildNotification(s,t,e,this.applyConfig(i))},t.prototype.success=function(t,e,i){void 0===i&&(i={});var s=this.toastrConfig.iconClasses.success||"";return this._preBuildNotification(s,t,e,this.applyConfig(i))},t.prototype.error=function(t,e,i){void 0===i&&(i={});var s=this.toastrConfig.iconClasses.error||"";return this._preBuildNotification(s,t,e,this.applyConfig(i))},t.prototype.info=function(t,e,i){void 0===i&&(i={});var s=this.toastrConfig.iconClasses.info||"";return this._preBuildNotification(s,t,e,this.applyConfig(i))},t.prototype.warning=function(t,e,i){void 0===i&&(i={});var s=this.toastrConfig.iconClasses.warning||"";return this._preBuildNotification(s,t,e,this.applyConfig(i))},t.prototype.clear=function(t){try{for(var e=c.__values(this.toasts),i=e.next();!i.done;i=e.next()){var s=i.value;if(t!==undefined){if(s.toastId===t)return void s.toastRef.manualClose()}else s.toastRef.manualClose()}}catch(a){o={error:a}}finally{try{i&&!i.done&&(n=e["return"])&&n.call(e)}finally{if(o)throw o.error}}var o,n},t.prototype.remove=function(t){var e=this._findToast(t);if(!e)return!1;if(e.activeToast.toastRef.close(),this.toasts.splice(e.index,1),this.currentlyActive=this.currentlyActive-1,!this.toastrConfig.maxOpened||!this.toasts.length)return!1;if(this.currentlyActive<this.toastrConfig.maxOpened&&this.toasts[this.currentlyActive]){var i=this.toasts[this.currentlyActive].toastRef;i.isInactive()||(this.currentlyActive=this.currentlyActive+1,i.activate())}return!0},t.prototype.isDuplicate=function(t){for(var e=0;e<this.toasts.length;e++)if(this.toasts[e].message===t)return!0;return!1},t.prototype.applyConfig=function(t){return void 0===t&&(t={}),c.__assign({},this.toastrConfig,t)},t.prototype._findToast=function(t){for(var e=0;e<this.toasts.length;e++)if(this.toasts[e].toastId===t)return{index:e,activeToast:this.toasts[e]};return null},t.prototype._preBuildNotification=function(t,e,i,s){var o=this;return s.onActivateTick?this.ngZone.run(function(){return o._buildNotification(t,e,i,s)}):this._buildNotification(t,e,i,s)},t.prototype._buildNotification=function(t,e,i,s){var o=this;if(!s.toastComponent)throw new Error("toastComponent required");if(e&&this.toastrConfig.preventDuplicates&&this.isDuplicate(e))return null;this.previousToastMessage=e;var n=!1;this.toastrConfig.maxOpened&&this.currentlyActive>=this.toastrConfig.maxOpened&&(n=!0,this.toastrConfig.autoDismiss&&this.clear(this.toasts[this.toasts.length-1].toastId));var a=this.overlay.create(s.positionClass,this.overlayContainer);this.index=this.index+1;var r=e;e&&s.enableHtml&&(r=this.sanitizer.sanitize(f.SecurityContext.HTML,e));var c=new g(a),u=new m(this.index,s,r,i,t,c),h=new y(u,this._injector),p=new v(s.toastComponent,h),l=a.attach(p,this.toastrConfig.newestOnTop);c.componentInstance=l._component;var d={toastId:this.index,message:e||"",toastRef:c,onShown:c.afterActivate(),onHidden:c.afterClosed(),onTap:u.onTap(),onAction:u.onAction(),portal:l};return n||setTimeout(function(){d.toastRef.activate(),o.currentlyActive=o.currentlyActive+1}),this.toasts.push(d),d},t.decorators=[{type:f.Injectable}],t.ctorParameters=function(){return[{type:undefined,decorators:[{type:f.Inject,args:[_]}]},{type:l},{type:f.Injector},{type:e.DomSanitizer},{type:f.NgZone}]},t}(),T=function(){function t(t,e,i){var s=this;this.toastrService=t,this.toastPackage=e,this.ngZone=i,this.width=-1,this.toastClasses="",this.state={value:"inactive",params:{easeTime:this.toastPackage.config.easeTime,easing:"ease-in"}},this.message=e.message,this.title=e.title,this.options=e.config,this.toastClasses=e.toastType+" "+e.config.toastClass,this.sub=e.toastRef.afterActivate().subscribe(function(){s.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(function(){s.remove()})}return t.prototype.ngOnDestroy=function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)},t.prototype.activateToast=function(){var t=this;this.state=c.__assign({},this.state,{value:"active"}),!this.options.disableTimeOut&&this.options.timeOut&&(this.outsideTimeout(function(){return t.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.updateProgress=function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),100<=this.width&&(this.width=100)}},t.prototype.remove=function(){var t=this;"removed"!==this.state.value&&(clearTimeout(this.timeout),this.state=c.__assign({},this.state,{value:"removed"}),this.outsideTimeout(function(){return t.toastrService.remove(t.toastPackage.toastId)},+this.toastPackage.config.easeTime))},t.prototype.tapToast=function(){"removed"!==this.state.value&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())},t.prototype.stickAround=function(){"removed"!==this.state.value&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)},t.prototype.delayedHideToast=function(){var t=this;this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state.value||(this.outsideTimeout(function(){return t.remove()},this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&this.outsideInterval(function(){return t.updateProgress()},10))},t.prototype.outsideTimeout=function(t,e){var i=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return i.timeout=setTimeout(function(){return i.runInsideAngular(t)},e)}):this.timeout=setTimeout(function(){return t()},e)},t.prototype.outsideInterval=function(t,e){var i=this;this.ngZone?this.ngZone.runOutsideAngular(function(){return i.intervalId=setInterval(function(){return i.runInsideAngular(t)},e)}):this.intervalId=setInterval(function(){return t()},e)},t.prototype.runInsideAngular=function(t){this.ngZone?this.ngZone.run(function(){return t()}):t()},t.decorators=[{type:f.Component,args:[{selector:"[toast-component]",template:'\n <button *ngIf="options.closeButton" (click)="remove()" class="toast-close-button" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n <div *ngIf="title" [class]="options.titleClass" [attr.aria-label]="title">\n {{ title }}\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 ',animations:[i.trigger("flyInOut",[i.state("inactive",i.style({display:"none",opacity:0})),i.state("active",i.style({})),i.state("removed",i.style({opacity:0})),i.transition("inactive => active",i.animate("{{ easeTime }}ms {{ easing }}")),i.transition("active => removed",i.animate("{{ easeTime }}ms {{ easing }}"))])],preserveWhitespaces:!1}]}],t.ctorParameters=function(){return[{type:C},{type:m},{type:f.NgZone}]},t.propDecorators={toastClasses:[{type:f.HostBinding,args:["class"]}],state:[{type:f.HostBinding,args:["@flyInOut"]}],tapToast:[{type:f.HostListener,args:["click"]}],stickAround:[{type:f.HostListener,args:["mouseenter"]}],delayedHideToast:[{type:f.HostListener,args:["mouseleave"]}]},t}(),b=function(){this.maxOpened=0,this.autoDismiss=!1,this.newestOnTop=!0,this.preventDuplicates=!1,this.iconClasses={error:"toast-error",info:"toast-info",success:"toast-success",warning:"toast-warning"},this.toastComponent=T,this.closeButton=!1,this.timeOut=5e3,this.extendedTimeOut=1e3,this.enableHtml=!1,this.progressBar=!1,this.toastClass="toast",this.positionClass="toast-top-right",this.titleClass="toast-title",this.messageClass="toast-message",this.easing="ease-in",this.easeTime=300,this.tapToDismiss=!0,this.onActivateTick=!1,this.progressAnimation="decreasing"},w=function(){function e(t){if(t)throw new Error("ToastrModule is already loaded. It should only be imported in your application's main module.")}return e.forRoot=function(t){return void 0===t&&(t={}),{ngModule:e,providers:[{provide:_,useValue:{config:t,defaults:b}},p,l,C]}},e.decorators=[{type:f.NgModule,args:[{imports:[s.CommonModule],exports:[T],declarations:[T],entryComponents:[T]}]}],e.ctorParameters=function(){return[{type:e,decorators:[{type:f.Optional},{type:f.SkipSelf}]}]},e}(),O=function(){function t(t,e,i){var s=this;this.toastrService=t,this.toastPackage=e,this.appRef=i,this.width=-1,this.toastClasses="",this.state="inactive",this.message=e.message,this.title=e.title,this.options=e.config,this.toastClasses=e.toastType+" "+e.config.toastClass,this.sub=e.toastRef.afterActivate().subscribe(function(){s.activateToast()}),this.sub1=e.toastRef.manualClosed().subscribe(function(){s.remove()})}return Object.defineProperty(t.prototype,"displayStyle",{get:function(){return"inactive"===this.state?"none":"inherit"},enumerable:!0,configurable:!0}),t.prototype.ngOnDestroy=function(){this.sub.unsubscribe(),this.sub1.unsubscribe(),clearInterval(this.intervalId),clearTimeout(this.timeout)},t.prototype.activateToast=function(){var t=this;this.state="active",!this.options.disableTimeOut&&this.options.timeOut&&(this.timeout=setTimeout(function(){t.remove()},this.options.timeOut),this.hideTime=(new Date).getTime()+this.options.timeOut,this.options.progressBar&&(this.intervalId=setInterval(function(){return t.updateProgress()},10))),this.options.onActivateTick&&this.appRef.tick()},t.prototype.updateProgress=function(){if(0!==this.width&&100!==this.width&&this.options.timeOut){var t=(new Date).getTime(),e=this.hideTime-t;this.width=e/this.options.timeOut*100,"increasing"===this.options.progressAnimation&&(this.width=100-this.width),this.width<=0&&(this.width=0),100<=this.width&&(this.width=100)}},t.prototype.remove=function(){var t=this;"removed"!==this.state&&(clearTimeout(this.timeout),this.state="removed",this.timeout=setTimeout(function(){return t.toastrService.remove(t.toastPackage.toastId)}))},t.prototype.tapToast=function(){"removed"!==this.state&&(this.toastPackage.triggerTap(),this.options.tapToDismiss&&this.remove())},t.prototype.stickAround=function(){"removed"!==this.state&&(clearTimeout(this.timeout),this.options.timeOut=0,this.hideTime=0,clearInterval(this.intervalId),this.width=0)},t.prototype.delayedHideToast=function(){var t=this;this.options.disableTimeOut||0===this.options.extendedTimeOut||"removed"===this.state||(this.timeout=setTimeout(function(){return t.remove()},this.options.extendedTimeOut),this.options.timeOut=this.options.extendedTimeOut,this.hideTime=(new Date).getTime()+(this.options.timeOut||0),this.width=-1,this.options.progressBar&&(this.intervalId=setInterval(function(){return t.updateProgress()},10)))},t.decorators=[{type:f.Component,args:[{selector:"[toast-component]",template:'\n <button *ngIf="options.closeButton" (click)="remove()" class="toast-close-button" aria-label="Close">\n <span aria-hidden="true">&times;</span>\n </button>\n <div *ngIf="title" [class]="options.titleClass" [attr.aria-label]="title">\n {{ title }}\n </div>\n <div *ngIf="message && options.enableHtml" role="alert" aria-live="polite"\n [class]="options.messageClass" [innerHTML]="message">\n </div>\n <div *ngIf="message && !options.enableHtml" role="alert" aria-live="polite"\n [class]="options.messageClass" [attr.aria-label]="message">\n {{ message }}\n </div>\n <div *ngIf="options.progressBar">\n <div class="toast-progress" [style.width]="width + \'%\'"></div>\n </div>\n '}]}],t.ctorParameters=function(){return[{type:C},{type:m},{type:f.ApplicationRef}]},t.propDecorators={toastClasses:[{type:f.HostBinding,args:["class"]}],displayStyle:[{type:f.HostBinding,args:["style.display"]}],tapToast:[{type:f.HostListener,args:["click"]}],stickAround:[{type:f.HostListener,args:["mouseenter"]}],delayedHideToast:[{type:f.HostListener,args:["mouseleave"]}]},t}(),I=function(){function t(){}return t.decorators=[{type:f.NgModule,args:[{imports:[s.CommonModule],declarations:[O],exports:[O],entryComponents:[O]}]}],t}();t.ToastContainerDirective=o,t.ToastContainerModule=n,t.Toast=T,t.ToastrService=C,t.ToastPackage=m,t.DefaultGlobalConfig=b,t.ToastrModule=w,t.ToastRef=g,t.ToastInjector=y,t.TOAST_CONFIG=_,t.ToastNoAnimation=O,t.ToastNoAnimationModule=I,t.ComponentPortal=v,t.BasePortalHost=a,t.Overlay=l,t.OVERLAY_PROVIDERS=d,t.OverlayContainer=p,t.OverlayRef=h,Object.defineProperty(t,"__esModule",{value:!0})});
2
2
  //# sourceMappingURL=ngx-toastr.umd.min.js.map