ng-angular-popup
Version:
A modern, lightweight, and customizable toast notification library for Angular applications
1 lines • 50.8 kB
Source Map (JSON)
{"version":3,"file":"ng-angular-popup.mjs","sources":["../../../projects/ng-toast/src/lib/toast-message.model.ts","../../../projects/ng-toast/src/lib/toast-type.enum.ts","../../../projects/ng-toast/src/lib/ng-toast.service.ts","../../../projects/ng-toast/src/lib/toaster-position.enum.ts","../../../projects/ng-toast/src/lib/toast-icon.directive.ts","../../../projects/ng-toast/src/lib/ng-toast.component.ts","../../../projects/ng-toast/src/lib/ng-toast.component.html","../../../projects/ng-toast/src/lib/ng-toast.providers.ts","../../../projects/ng-toast/src/lib/demo/ng-toast-demo.component.ts","../../../projects/ng-toast/src/lib/ng-toast.module.ts","../../../projects/ng-toast/src/public-api.ts","../../../projects/ng-toast/src/ng-angular-popup.ts"],"sourcesContent":["import { ToastType } from './toast-type.enum';\n\n/**\n * Represents a toast notification message with various configuration options.\n */\nexport class ToastMessage {\n /** Unique identifier for the toast message */\n public id: number;\n \n /** Whether to show the progress bar for auto-dismiss countdown */\n public showProgress: boolean = true;\n \n /** Timestamp when the toast was created */\n public createdAt: number;\n \n /** Whether the toast can be dismissed by clicking on it */\n public dismissible: boolean = true;\n \n /**\n * Creates a new toast message instance.\n * \n * @param message The content of the toast message\n * @param type The visual type/style of the toast\n * @param title Optional title for the toast message\n * @param duration Time in milliseconds before auto-dismissal (0 for no auto-dismiss)\n * @param showProgress Whether to show the progress countdown bar\n * @param dismissible Whether the toast can be manually dismissed\n */\n constructor(\n public message: string,\n public type: ToastType,\n public title?: string,\n public duration: number = 2000,\n showProgress?: boolean,\n dismissible?: boolean\n ) {\n this.id = new Date().getTime();\n this.createdAt = this.id;\n \n if (showProgress !== undefined) {\n this.showProgress = showProgress;\n }\n \n if (dismissible !== undefined) {\n this.dismissible = dismissible;\n }\n \n // If duration is 0, disable progress bar as it won't auto-dismiss\n if (duration === 0) {\n this.showProgress = false;\n }\n }\n}\n","export enum ToastType {\n PRIMARY = 'toast-primary',\n SECONDARY = 'toast-secondary',\n SUCCESS = 'toast-success',\n INFO = 'toast-info',\n WARNING = 'toast-warning',\n DANGER = 'toast-danger'\n}\n","import { Injectable, signal, effect } from '@angular/core';\nimport { ToastMessage } from './toast-message.model';\nimport { ToastType } from './toast-type.enum';\n\n@Injectable({\n providedIn: 'root'\n})\n\n/**\n * Service for displaying toast messages.\n */\nexport class NgToastService {\n /** Default duration for toast messages in milliseconds */\n #defaultDuration: number;\n \n /** Maximum number of toasts to show at once */\n #maxToasts: number;\n \n /**\n * Signal that holds the current toast messages\n */\n toastMessages = signal<ToastMessage[]>([]);\n\n /**\n * Constructs a new NgToastService instance.\n */\n constructor() {\n this.#defaultDuration = 3000;\n this.#maxToasts = 5;\n }\n\n /**\n * Displays a toast message.\n * @param message The message to display.\n * @param type The type of the toast message.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public toast(message: string, type: ToastType, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n // Create new toast message\n const newToast = new ToastMessage(message, type, title, duration, showProgress, dismissible);\n \n // Add to messages, limiting to max number of toasts\n this.toastMessages.update(messages => {\n const updatedMessages = [...messages, newToast];\n // If we have more than max toasts, remove the oldest ones\n return updatedMessages.length > this.#maxToasts \n ? updatedMessages.slice(updatedMessages.length - this.#maxToasts) \n : updatedMessages;\n });\n \n // Auto-remove the toast after the duration (if duration > 0)\n if (duration > 0) {\n setTimeout(() => {\n this.removeToast(newToast.id);\n }, duration);\n }\n }\n\n /**\n * Displays a success toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public success(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.SUCCESS, title, duration, showProgress, dismissible);\n }\n\n /**\n * Displays an info toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public info(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.INFO, title, duration, showProgress, dismissible);\n }\n\n /**\n * Displays a warning toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public warning(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.WARNING, title, duration, showProgress, dismissible);\n }\n\n /**\n * Displays a danger/error toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public danger(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.DANGER, title, duration, showProgress, dismissible);\n }\n \n /**\n * Displays a primary toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public primary(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.PRIMARY, title, duration, showProgress, dismissible);\n }\n \n /**\n * Displays a secondary toast message.\n * @param message The message to display.\n * @param title The optional title of the toast message.\n * @param duration The duration in milliseconds for which the toast message should be displayed. Defaults to the default duration.\n * @param showProgress Whether to show the progress bar. Defaults to true.\n * @param dismissible Whether the toast can be manually dismissed. Defaults to true.\n */\n public secondary(message: string, title?: string, duration: number = this.#defaultDuration, \n showProgress: boolean = true, dismissible: boolean = true): void {\n this.toast(message, ToastType.SECONDARY, title, duration, showProgress, dismissible);\n }\n\n /**\n * Removes a toast message from the list\n * @param messageId The ID of the message to remove\n */\n public removeToast(messageId: number): void {\n this.toastMessages.update(messages => \n messages.filter(message => message.id !== messageId)\n );\n }\n \n /**\n * Removes all toast messages\n */\n public clearAll(): void {\n this.toastMessages.set([]);\n }\n \n /**\n * Updates the progress bars by triggering a signal update\n * This is used by the component to refresh progress bars\n */\n public updateProgress(): void {\n // Force a signal update by creating a new array with the same messages\n this.toastMessages.update(messages => [...messages]);\n }\n \n /**\n * Sets the maximum number of toasts to display at once\n * @param max The maximum number of toasts\n */\n public setMaxToasts(max: number): void {\n if (max > 0) {\n this.#maxToasts = max;\n \n // If we already have more than max toasts, remove the oldest ones\n const currentToasts = this.toastMessages();\n if (currentToasts.length > max) {\n this.toastMessages.set(currentToasts.slice(currentToasts.length - max));\n }\n }\n }\n}\n","/**\n * Toast position values as string literals\n */\nexport const TOAST_POSITIONS = {\n TOP_LEFT: 'toaster-top-left',\n TOP_CENTER: 'toaster-top-center',\n TOP_RIGHT: 'toaster-top-right',\n BOTTOM_LEFT: 'toaster-bottom-left',\n BOTTOM_CENTER: 'toaster-bottom-center',\n BOTTOM_RIGHT: 'toaster-bottom-right'\n} as const;\n\n/**\n * Type for toast positions\n */\nexport type ToastPosition = typeof TOAST_POSITIONS[keyof typeof TOAST_POSITIONS];\n\n/**\n * @deprecated Use TOAST_POSITIONS and ToastPosition instead\n */\nexport const ToasterPosition = TOAST_POSITIONS;","import { Directive, ElementRef, OnInit, inject, input } from '@angular/core';\n\n/**\n * Directive that renders appropriate SVG icons for different toast types\n */\n@Directive({\n selector: '[toastIcon]',\n standalone: true\n})\nexport class ToastIconDirective implements OnInit {\n /** Input signal for the toast type */\n type = input.required<string>({alias: 'toastIcon'});\n \n /** Element reference for DOM manipulation */\n #el = inject(ElementRef);\n\n ngOnInit() {\n this.setIcon();\n }\n\n /**\n * Sets the appropriate SVG icon based on toast type\n */\n setIcon() {\n let svgContent: string;\n\n switch (this.type()) {\n case 'toast-success':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M22 11.08V12a10 10 0 1 1-5.93-9.14\"></path>\n <polyline points=\"22 4 12 14.01 9 11.01\"></polyline>\n </svg>`;\n break;\n case 'toast-danger':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"15\" y1=\"9\" x2=\"9\" y2=\"15\"></line>\n <line x1=\"9\" y1=\"9\" x2=\"15\" y2=\"15\"></line>\n </svg>`;\n break;\n case 'toast-info':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"12\"></line>\n <line x1=\"12\" y1=\"8\" x2=\"12.01\" y2=\"8\"></line>\n </svg>`;\n break;\n case 'toast-warning':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z\"></path>\n <line x1=\"12\" y1=\"9\" x2=\"12\" y2=\"13\"></line>\n <line x1=\"12\" y1=\"17\" x2=\"12.01\" y2=\"17\"></line>\n </svg>`;\n break;\n case 'toast-primary':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9\"></path>\n <path d=\"M13.73 21a2 2 0 0 1-3.46 0\"></path>\n </svg>`;\n break;\n case 'toast-secondary':\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <path d=\"M8 14s1.5 2 4 2 4-2 4-2\"></path>\n <line x1=\"9\" y1=\"9\" x2=\"9.01\" y2=\"9\"></line>\n <line x1=\"15\" y1=\"9\" x2=\"15.01\" y2=\"9\"></line>\n </svg>`;\n break;\n default:\n svgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"10\"></circle>\n <line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"></line>\n <line x1=\"12\" y1=\"16\" x2=\"12.01\" y2=\"16\"></line>\n </svg>`;\n }\n\n this.#el.nativeElement.innerHTML = svgContent;\n }\n}\n","import { Component, OnInit, OnDestroy, input, computed, effect, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ToastMessage } from './toast-message.model';\nimport { trigger, style, animate, transition } from '@angular/animations';\nimport { TOAST_POSITIONS, ToastPosition } from './toaster-position.enum';\nimport { NgToastService } from './ng-toast.service';\nimport { ToastIconDirective } from './toast-icon.directive';\nimport { ToastType } from './toast-type.enum';\n\n@Component({\n selector: 'ng-toast',\n templateUrl: './ng-toast.component.html',\n styleUrls: ['./ng-toast.component.scss'],\n animations: [trigger('showHide', [\n transition(':enter', [\n style({\n opacity: 0,\n transform: 'scaleX(0.98) scaleY(0)',\n position: 'relative'\n }),\n animate('300ms cubic-bezier(0.4, 0, 0.2, 1)', style({\n opacity: 1,\n transform: 'scale(1)'\n }))\n ]),\n transition(':leave', [\n style({\n opacity: 1,\n transform: 'scale(1)'\n }),\n animate('250ms cubic-bezier(0.4, 0, 0.2, 1)', style({\n opacity: 0,\n transform: 'scaleX(0.98) scaleY(0)'\n }))\n ])\n ])],\n standalone: true,\n imports: [CommonModule, ToastIconDirective]\n})\nexport class NgToastComponent implements OnInit, OnDestroy {\n\n /**\n * Input signal for the position of the toast container\n */\n position = input<ToastPosition>(TOAST_POSITIONS.BOTTOM_RIGHT);\n\n /**\n * Input signal for the width of the toast container in pixels\n */\n width = input<number>(350);\n\n /**\n * Signal to track progress update intervals\n */\n private progressInterval = signal<number | null>(null);\n\n /**\n * Computed signal that gets the messages from the service\n */\n public messages = computed(() => this.toastService.toastMessages());\n\n constructor(private toastService: NgToastService) {\n // Create an effect to handle message positioning\n effect(() => {\n // This effect will run whenever the position signal changes\n // We don't need to do anything here as the position is handled in the template\n this.position();\n });\n\n // Create an effect to handle progress bar updates\n effect(() => {\n const messages = this.messages();\n\n // Clear existing interval if no messages with progress bars\n if (messages.length === 0 || !messages.some(m => m.showProgress)) {\n this.clearProgressInterval();\n return;\n }\n\n // Start progress interval if not already running\n if (this.progressInterval() === null) {\n const intervalId = window.setInterval(() => {\n // Force update to trigger change detection for progress bars\n this.toastService.updateProgress();\n }, 100) as unknown as number;\n\n this.progressInterval.set(intervalId);\n }\n });\n }\n\n ngOnInit(): void {\n // Initialize any required state\n }\n\n /**\n * Calculates the progress width percentage for a toast message\n * @param message The toast message\n * @returns The progress width as a percentage (0-100)\n */\n getProgressWidth(message: ToastMessage): number {\n if (message.duration <= 0) return 0;\n\n const elapsed = Date.now() - message.createdAt;\n const remaining = Math.max(0, message.duration - elapsed);\n return (remaining / message.duration) * 100;\n }\n\n /**\n * Gets the appropriate color for the progress bar based on toast type\n * @param message The toast message\n * @returns CSS color value for the progress bar\n */\n getProgressColor(message: ToastMessage): string {\n const colorMap: Record<ToastType, string> = {\n 'toast-primary': '#4f46e5',\n 'toast-secondary': '#475569',\n 'toast-success': '#10b981',\n 'toast-info': '#06b6d4',\n 'toast-warning': '#f59e0b',\n 'toast-danger': '#ef4444'\n };\n\n return colorMap[message.type] || 'rgba(0, 0, 0, 0.2)';\n }\n\n /**\n * Clears the progress update interval\n */\n private clearProgressInterval(): void {\n const intervalId = this.progressInterval();\n if (intervalId !== null) {\n window.clearInterval(intervalId);\n this.progressInterval.set(null);\n }\n }\n\n\n\n /**\n * Removes a toast message\n * @param message The message to remove\n */\n remove(message: ToastMessage): void {\n if (message.dismissible) {\n this.toastService.removeToast(message.id);\n }\n }\n\n ngOnDestroy(): void {\n // Clean up any resources\n this.clearProgressInterval();\n }\n\n}\n","<div style.min-width=\"{{width()}}px\" style.max-width=\"{{width()}}px\" class=\"toaster\" [ngClass]=\"position()\">\n\n <div class=\"toast-message\" *ngFor=\"let message of messages()\" [ngClass]=\"message.type\" [@showHide]>\n <div class=\"flex-start-center gap-3\">\n <div class=\"toast-icon-wrapper\">\n <span toastIcon=\"{{message.type}}\" class=\"toast-icon\"></span>\n </div>\n <div class=\"flex-col\">\n @if (message.title && message.title !== '') {\n <span class=\"msg-title\">{{message.title}}</span>\n }\n <span class=\"msg-summary\">{{message.message}}</span>\n </div>\n </div>\n\n <button (click)=\"remove(message)\" class=\"cross-icon\" aria-label=\"Close toast\">\n <svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" fill=\"none\" aria-hidden=\"true\">\n <path d=\"M8.01186 7.00933L12.27 2.75116C12.341 2.68501 12.398 2.60524 12.4375 2.51661C12.4769 2.42798 12.4982 2.3323 12.4999 2.23529C12.5016 2.13827 12.4838 2.0419 12.4474 1.95194C12.4111 1.86197 12.357 1.78024 12.2884 1.71163C12.2198 1.64302 12.138 1.58893 12.0481 1.55259C11.9581 1.51625 11.8617 1.4984 11.7647 1.50011C11.6677 1.50182 11.572 1.52306 11.4834 1.56255C11.3948 1.60204 11.315 1.65898 11.2488 1.72997L6.99067 5.98814L2.7325 1.72997C2.59553 1.60234 2.41437 1.53286 2.22718 1.53616C2.03999 1.53946 1.8614 1.61529 1.72901 1.74767C1.59663 1.88006 1.5208 2.05865 1.5175 2.24584C1.5142 2.43303 1.58368 2.61419 1.71131 2.75116L5.96948 7.00933L1.71131 11.2675C1.576 11.403 1.5 11.5866 1.5 11.7781C1.5 11.9696 1.576 12.1532 1.71131 12.2887C1.84679 12.424 2.03043 12.5 2.2219 12.5C2.41338 12.5 2.59702 12.424 2.7325 12.2887L6.99067 8.03052L11.2488 12.2887C11.3843 12.424 11.568 12.5 11.7594 12.5C11.9509 12.5 12.1346 12.424 12.27 12.2887C12.4053 12.1532 12.4813 11.9696 12.4813 11.7781C12.4813 11.5866 12.4053 11.403 12.27 11.2675L8.01186 7.00933Z\" fill=\"currentColor\"></path>\n </svg>\n </button>\n\n <!-- Progress bar for auto-dismiss countdown -->\n @if (message.showProgress) {\n <div class=\"toast-progress\" [style]=\"{'width': getProgressWidth(message) + '%', 'background-color': getProgressColor(message)}\"></div>\n }\n </div>\n</div>\n","import { Provider } from '@angular/core';\nimport { NgToastService } from './ng-toast.service';\n\n/**\n * Provides the NgToast service for standalone applications\n * @returns An array of providers for the NgToast service\n */\nexport function provideNgToast(): Provider[] {\n return [\n NgToastService\n ];\n}\n","import { Component, signal } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { NgToastComponent } from '../ng-toast.component';\nimport { NgToastService } from '../ng-toast.service';\nimport { TOAST_POSITIONS, ToastPosition } from '../toaster-position.enum';\nimport { ToastType } from '../toast-type.enum';\n\n/**\n * Demo component showcasing the ng-toast library with Angular v20 and signals\n */\n@Component({\n selector: 'ng-toast-demo',\n standalone: true,\n imports: [CommonModule, FormsModule, NgToastComponent],\n template: `\n <div class=\"demo-container\">\n <h1>NgToast Demo</h1>\n <p>A modern, lightweight toast notification library for Angular v20 with signals</p>\n \n <div class=\"demo-card\">\n <h2>Toast Types</h2>\n <div class=\"button-group\">\n <button class=\"success-btn\" (click)=\"showSuccess()\">Success</button>\n <button class=\"info-btn\" (click)=\"showInfo()\">Info</button>\n <button class=\"warning-btn\" (click)=\"showWarning()\">Warning</button>\n <button class=\"danger-btn\" (click)=\"showDanger()\">Danger</button>\n <button class=\"primary-btn\" (click)=\"showPrimary()\">Primary</button>\n <button class=\"secondary-btn\" (click)=\"showSecondary()\">Secondary</button>\n </div>\n </div>\n \n <div class=\"demo-card\">\n <h2>Toast Options</h2>\n <div class=\"options-grid\">\n <div class=\"option-group\">\n <label>Duration (ms):</label>\n <input type=\"number\" [(ngModel)]=\"duration\" min=\"0\" max=\"10000\" step=\"500\">\n <span class=\"hint\">Set to 0 for persistent toast</span>\n </div>\n \n <div class=\"option-group\">\n <label>Show Progress Bar:</label>\n <div class=\"toggle-switch\">\n <input type=\"checkbox\" id=\"progress-toggle\" [(ngModel)]=\"showProgress\">\n <label for=\"progress-toggle\"></label>\n </div>\n </div>\n \n <div class=\"option-group\">\n <label>Dismissible:</label>\n <div class=\"toggle-switch\">\n <input type=\"checkbox\" id=\"dismiss-toggle\" [(ngModel)]=\"dismissible\">\n <label for=\"dismiss-toggle\"></label>\n </div>\n </div>\n \n <div class=\"option-group\">\n <label>Custom Title:</label>\n <input type=\"text\" [(ngModel)]=\"customTitle\" placeholder=\"Optional title\">\n </div>\n </div>\n </div>\n \n <div class=\"demo-card\">\n <h2>Toast Position</h2>\n <div class=\"position-grid\">\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.TOP_LEFT\" \n (click)=\"setPosition(TOAST_POSITIONS.TOP_LEFT)\">Top Left</button>\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.TOP_CENTER\" \n (click)=\"setPosition(TOAST_POSITIONS.TOP_CENTER)\">Top Center</button>\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.TOP_RIGHT\" \n (click)=\"setPosition(TOAST_POSITIONS.TOP_RIGHT)\">Top Right</button>\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.BOTTOM_LEFT\" \n (click)=\"setPosition(TOAST_POSITIONS.BOTTOM_LEFT)\">Bottom Left</button>\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.BOTTOM_CENTER\" \n (click)=\"setPosition(TOAST_POSITIONS.BOTTOM_CENTER)\">Bottom Center</button>\n <button [class.active]=\"currentPosition === TOAST_POSITIONS.BOTTOM_RIGHT\" \n (click)=\"setPosition(TOAST_POSITIONS.BOTTOM_RIGHT)\">Bottom Right</button>\n </div>\n </div>\n \n <div class=\"demo-card\">\n <h2>Custom Message</h2>\n <div class=\"custom-message-container\">\n <textarea [(ngModel)]=\"customMessage\" placeholder=\"Enter your custom message here\"></textarea>\n <div class=\"button-group\">\n <button *ngFor=\"let type of toastTypes\" \n [class]=\"type.toLowerCase() + '-btn'\" \n (click)=\"showCustomToast(type)\">\n {{ type }}\n </button>\n </div>\n </div>\n </div>\n \n <div class=\"demo-card\">\n <h2>Actions</h2>\n <div class=\"button-group\">\n <button class=\"clear-btn\" (click)=\"clearAllToasts()\">Clear All Toasts</button>\n <button class=\"max-btn\" (click)=\"showMultipleToasts()\">Show Multiple Toasts</button>\n </div>\n </div>\n \n <!-- The toast component -->\n <ng-toast [position]=\"currentPosition\" [width]=\"350\"></ng-toast>\n </div>\n `,\n styles: [`\n .demo-container {\n font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n max-width: 800px;\n margin: 0 auto;\n padding: 20px;\n background-color: #f9fafb;\n color: #111827;\n }\n \n h1 {\n color: #111827;\n margin-bottom: 10px;\n font-weight: 600;\n text-align: center;\n }\n \n h2 {\n color: #374151;\n font-size: 1.2rem;\n margin-bottom: 15px;\n font-weight: 600;\n }\n \n p {\n color: #6b7280;\n margin-bottom: 20px;\n text-align: center;\n }\n \n .demo-card {\n background-color: white;\n border-radius: 8px;\n padding: 20px;\n margin-bottom: 20px;\n box-shadow: 0 1px 3px rgba(0,0,0,0.1);\n }\n \n .button-group {\n display: flex;\n gap: 10px;\n flex-wrap: wrap;\n }\n \n button {\n padding: 10px 15px;\n border: none;\n border-radius: 6px;\n cursor: pointer;\n font-weight: 500;\n transition: all 0.2s ease;\n box-shadow: 0 1px 2px rgba(0,0,0,0.05);\n }\n \n button:hover {\n opacity: 0.9;\n transform: translateY(-2px);\n box-shadow: 0 4px 6px rgba(0,0,0,0.1);\n }\n \n .success-btn {\n background-color: #22c55e;\n color: white;\n }\n \n .info-btn {\n background-color: #3b82f6;\n color: white;\n }\n \n .warning-btn {\n background-color: #f59e0b;\n color: white;\n }\n \n .danger-btn {\n background-color: #ef4444;\n color: white;\n }\n \n .primary-btn {\n background-color: #6366f1;\n color: white;\n }\n \n .secondary-btn {\n background-color: #9ca3af;\n color: white;\n }\n \n .clear-btn {\n background-color: #e5e7eb;\n color: #374151;\n }\n \n .max-btn {\n background-color: #8b5cf6;\n color: white;\n }\n \n .position-grid {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 10px;\n }\n \n .position-grid button {\n background-color: #f3f4f6;\n color: #374151;\n font-size: 0.9rem;\n }\n \n .position-grid button.active {\n background-color: #6366f1;\n color: white;\n }\n \n .options-grid {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));\n gap: 15px;\n }\n \n .option-group {\n display: flex;\n flex-direction: column;\n gap: 5px;\n }\n \n .option-group label {\n font-size: 0.9rem;\n font-weight: 500;\n color: #4b5563;\n }\n \n .option-group input[type=\"number\"],\n .option-group input[type=\"text\"] {\n padding: 8px 12px;\n border: 1px solid #d1d5db;\n border-radius: 4px;\n font-size: 0.9rem;\n }\n \n .hint {\n font-size: 0.8rem;\n color: #9ca3af;\n }\n \n .toggle-switch {\n position: relative;\n display: inline-block;\n width: 50px;\n height: 24px;\n }\n \n .toggle-switch input {\n opacity: 0;\n width: 0;\n height: 0;\n }\n \n .toggle-switch label {\n position: absolute;\n cursor: pointer;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: #e5e7eb;\n transition: .4s;\n border-radius: 24px;\n }\n \n .toggle-switch label:before {\n position: absolute;\n content: \"\";\n height: 16px;\n width: 16px;\n left: 4px;\n bottom: 4px;\n background-color: white;\n transition: .4s;\n border-radius: 50%;\n }\n \n .toggle-switch input:checked + label {\n background-color: #6366f1;\n }\n \n .toggle-switch input:checked + label:before {\n transform: translateX(26px);\n }\n \n .custom-message-container {\n display: flex;\n flex-direction: column;\n gap: 15px;\n }\n \n textarea {\n padding: 10px;\n border: 1px solid #d1d5db;\n border-radius: 6px;\n min-height: 80px;\n font-family: inherit;\n resize: vertical;\n }\n `]\n})\nexport class NgToastDemoComponent {\n // Make positions available in template\n TOAST_POSITIONS = TOAST_POSITIONS;\n currentPosition: ToastPosition = TOAST_POSITIONS.TOP_RIGHT;\n \n // Toast options\n duration = 3000;\n showProgress = true;\n dismissible = true;\n customTitle = '';\n customMessage = 'This is a custom toast message that showcases our revamped UI with progress bars.';\n \n // Available toast types for custom message\n toastTypes = Object.values(ToastType);\n \n constructor(private toastService: NgToastService) {}\n \n showSuccess() {\n this.toastService.success(\n 'Operation completed successfully!', \n this.customTitle || 'Success', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showInfo() {\n this.toastService.info(\n 'Here is some important information.', \n this.customTitle || 'Information', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showWarning() {\n this.toastService.warning(\n 'Please proceed with caution.', \n this.customTitle || 'Warning', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showDanger() {\n this.toastService.danger(\n 'An error has occurred!', \n this.customTitle || 'Error', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showPrimary() {\n this.toastService.primary(\n 'This is a primary notification.', \n this.customTitle || 'Primary', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showSecondary() {\n this.toastService.secondary(\n 'This is a secondary notification.', \n this.customTitle || 'Secondary', \n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n showCustomToast(type: string) {\n if (!this.customMessage) {\n this.customMessage = 'This is a custom toast message';\n }\n \n this.toastService.toast(\n this.customMessage,\n type as ToastType,\n this.customTitle || type,\n this.duration,\n this.showProgress,\n this.dismissible\n );\n }\n \n clearAllToasts() {\n this.toastService.clearAll();\n }\n \n showMultipleToasts() {\n // Show multiple toasts to demonstrate max toasts limit\n const types = [ToastType.SUCCESS, ToastType.INFO, ToastType.WARNING, \n ToastType.DANGER, ToastType.PRIMARY, ToastType.SECONDARY];\n \n types.forEach((type, index) => {\n setTimeout(() => {\n this.toastService.toast(\n `This is toast #${index + 1} of ${types.length}`,\n type,\n `Multiple Toast ${index + 1}`,\n this.duration,\n this.showProgress,\n this.dismissible\n );\n }, index * 300); // Stagger the toasts\n });\n }\n \n setPosition(position: ToastPosition) {\n this.currentPosition = position;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { NgToastComponent } from './ng-toast.component';\nimport { ToastIconDirective } from './toast-icon.directive';\n\n/**\n * @deprecated Use standalone components and provideNgToast() instead\n * This module is kept for backward compatibility with Angular versions < 14\n * \n * Example usage with standalone components:\n * ```typescript\n * // In your app.config.ts\n * export const appConfig: ApplicationConfig = {\n * providers: [\n * provideNgToast(),\n * // other providers...\n * ]\n * };\n * \n * // In your component\n * @Component({\n * // ...\n * imports: [NgToastComponent],\n * // ...\n * })\n * export class YourComponent {}\n * ```\n */\n@NgModule({\n imports: [NgToastComponent, ToastIconDirective],\n exports: [NgToastComponent, ToastIconDirective],\n})\nexport class NgToastModule {}\n","/*\n * Public API Surface of ng-toast\n */\n\nexport * from './lib/ng-toast.service';\nexport * from './lib/ng-toast.component';\nexport * from './lib/toast-type.enum';\nexport * from './lib/toast-message.model';\nexport * from './lib/toaster-position.enum';\nexport * from './lib/toast-icon.directive';\nexport * from './lib/ng-toast.providers';\nexport * from './lib/demo/ng-toast-demo.component';\n\n// For backward compatibility\nexport * from './lib/ng-toast.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.NgToastService"],"mappings":";;;;;;;;AAEA;;AAEG;MACU,YAAY,CAAA;AAavB;;;;;;;;;AASG;IACH,WACS,CAAA,OAAe,EACf,IAAe,EACf,KAAc,EACd,QAAA,GAAmB,IAAI,EAC9B,YAAsB,EACtB,WAAqB,EAAA;QALd,IAAO,CAAA,OAAA,GAAP,OAAO;QACP,IAAI,CAAA,IAAA,GAAJ,IAAI;QACJ,IAAK,CAAA,KAAA,GAAL,KAAK;QACL,IAAQ,CAAA,QAAA,GAAR,QAAQ;;QAtBV,IAAY,CAAA,YAAA,GAAY,IAAI;;QAM5B,IAAW,CAAA,WAAA,GAAY,IAAI;QAoBhC,IAAI,CAAC,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE;AAC9B,QAAA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE;AAExB,QAAA,IAAI,YAAY,KAAK,SAAS,EAAE;AAC9B,YAAA,IAAI,CAAC,YAAY,GAAG,YAAY;;AAGlC,QAAA,IAAI,WAAW,KAAK,SAAS,EAAE;AAC7B,YAAA,IAAI,CAAC,WAAW,GAAG,WAAW;;;AAIhC,QAAA,IAAI,QAAQ,KAAK,CAAC,EAAE;AAClB,YAAA,IAAI,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