@acontplus/ng-notifications 1.1.2 → 2.0.0
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.
|
@@ -35,10 +35,10 @@ const SNACKBAR_CONFIG = new InjectionToken('acontplus-snackbar-config', {
|
|
|
35
35
|
|
|
36
36
|
const NOTIFICATION_CONFIG = new InjectionToken('NOTIFICATION_CONFIG');
|
|
37
37
|
class NotificationProviderBase {
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
39
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationProviderBase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
39
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationProviderBase });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationProviderBase, decorators: [{
|
|
42
42
|
type: Injectable
|
|
43
43
|
}] });
|
|
44
44
|
|
|
@@ -89,10 +89,10 @@ class ToastrProvider extends NotificationProviderBase {
|
|
|
89
89
|
const result = confirm(`${config.title || ''}\n${config.message}`);
|
|
90
90
|
return of({ isConfirmed: result });
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
93
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ToastrProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ToastrProvider, providedIn: 'root' });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ToastrProvider, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{
|
|
98
98
|
providedIn: 'root',
|
|
@@ -167,10 +167,10 @@ class SnackbarProvider extends NotificationProviderBase {
|
|
|
167
167
|
}
|
|
168
168
|
return `${title}: ${message}`;
|
|
169
169
|
}
|
|
170
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
171
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
171
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarProvider, providedIn: 'root' });
|
|
172
172
|
}
|
|
173
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
173
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarProvider, decorators: [{
|
|
174
174
|
type: Injectable,
|
|
175
175
|
args: [{
|
|
176
176
|
providedIn: 'root',
|
|
@@ -204,10 +204,10 @@ class ThemeDetector {
|
|
|
204
204
|
getCurrentTheme() {
|
|
205
205
|
return this.themeSubject.value;
|
|
206
206
|
}
|
|
207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
208
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ThemeDetector, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
208
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ThemeDetector, providedIn: 'root' });
|
|
209
209
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ThemeDetector, decorators: [{
|
|
211
211
|
type: Injectable,
|
|
212
212
|
args: [{
|
|
213
213
|
providedIn: 'root',
|
|
@@ -278,10 +278,10 @@ class SweetalertProvider extends NotificationProviderBase {
|
|
|
278
278
|
value: result.value,
|
|
279
279
|
})));
|
|
280
280
|
}
|
|
281
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
282
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
281
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SweetalertProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
282
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SweetalertProvider, providedIn: 'root' });
|
|
283
283
|
}
|
|
284
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SweetalertProvider, decorators: [{
|
|
285
285
|
type: Injectable,
|
|
286
286
|
args: [{
|
|
287
287
|
providedIn: 'root',
|
|
@@ -367,10 +367,10 @@ class NotificationService {
|
|
|
367
367
|
title: 'Session Alert',
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
371
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
370
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
371
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
372
372
|
}
|
|
373
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NotificationService, decorators: [{
|
|
374
374
|
type: Injectable,
|
|
375
375
|
args: [{
|
|
376
376
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acontplus-ng-notifications.mjs","sources":["../../../../packages/ng-notifications/src/lib/config/toastr-config.ts","../../../../packages/ng-notifications/src/lib/config/snackbar-config.ts","../../../../packages/ng-notifications/src/lib/providers/notification-provider.ts","../../../../packages/ng-notifications/src/lib/providers/toastr-provider.ts","../../../../packages/ng-notifications/src/lib/providers/snackbar-provider.ts","../../../../packages/ng-notifications/src/lib/services/theme-detector.ts","../../../../packages/ng-notifications/src/lib/providers/sweetalert-provider.ts","../../../../packages/ng-notifications/src/lib/services/notification-service.ts","../../../../packages/ng-notifications/src/lib/providers.ts","../../../../packages/ng-notifications/src/acontplus-ng-notifications.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IndividualConfig } from 'ngx-toastr';\n\nexport type ToastrNotificationConfig = Partial<IndividualConfig>;\n\nexport const TOASTR_NOTIFICATION_CONFIG = new InjectionToken<ToastrNotificationConfig>(\n 'toastr-notification-config',\n {\n providedIn: 'root',\n factory: () => ({\n positionClass: 'toast-bottom-center',\n timeOut: 5000,\n extendedTimeOut: 1500,\n closeButton: true,\n newestOnTop: true,\n }),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { MatSnackBarConfig } from '@angular/material/snack-bar';\n\nexport interface SnackbarConfig extends MatSnackBarConfig {\n readonly defaultAction?: string;\n readonly iconEnabled?: boolean;\n readonly titleEnabled?: boolean;\n}\n\nexport const DEFAULT_SNACKBAR_CONFIG: SnackbarConfig = {\n duration: 5000,\n horizontalPosition: 'center',\n verticalPosition: 'bottom',\n panelClass: [],\n defaultAction: 'Close',\n iconEnabled: true,\n titleEnabled: true,\n};\n\nexport const SNACKBAR_CONFIG = new InjectionToken<SnackbarConfig>('acontplus-snackbar-config', {\n providedIn: 'root',\n factory: () => DEFAULT_SNACKBAR_CONFIG,\n});\n","import { Injectable, InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport type { NotificationProvider, NotificationResult } from '@acontplus/ui-kit';\nimport {\n NotificationCallProps,\n SweetAlertConfig,\n} from '../types/notification.types';\n\nexport const NOTIFICATION_CONFIG = new InjectionToken<NotificationProviderConfig>(\n 'NOTIFICATION_CONFIG',\n);\n\nexport interface NotificationProviderConfig {\n defaultProvider: NotificationProvider;\n toastr?: unknown;\n snackbar?: unknown;\n sweetalert?: {\n defaultTheme?: 'auto' | 'material-ui' | 'material-ui-light' | 'material-ui-dark' | string;\n [key: string]: unknown;\n };\n}\n\n@Injectable()\nexport abstract class NotificationProviderBase {\n abstract success(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract error(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract warning(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract info(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract confirm(config: SweetAlertConfig): Observable<NotificationResult>;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { IndividualConfig, ToastrService } from 'ngx-toastr';\nimport { Observable, of } from 'rxjs';\nimport { NotificationProviderBase } from './notification-provider';\nimport { TOASTR_NOTIFICATION_CONFIG } from '../config/toastr-config';\nimport type { NotificationResult } from '@acontplus/ui-kit';\nimport {\n NotificationCallProps,\n SweetAlertConfig,\n} from '../types/notification.types';\n\nexport type ToastrType = 'success' | 'error' | 'warning' | 'info';\n\nexport interface ToastrShowProps {\n readonly type: ToastrType;\n readonly message: string;\n readonly title?: string;\n readonly options?: Partial<IndividualConfig>;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastrProvider extends NotificationProviderBase {\n private readonly toastrService = inject(ToastrService);\n private readonly config = inject(TOASTR_NOTIFICATION_CONFIG);\n\n /**\n * Generic show method for dynamic toast types\n */\n show(props: ToastrShowProps): void {\n const { type, message, title, options: overrideOptions } = props;\n const finalOptions = { ...this.config, ...overrideOptions };\n\n this.toastrService[type](message, title, finalOptions);\n }\n\n success(props: NotificationCallProps): void {\n this.show({\n type: 'success',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n error(props: NotificationCallProps): void {\n this.show({\n type: 'error',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n warning(props: NotificationCallProps): void {\n this.show({\n type: 'warning',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n info(props: NotificationCallProps): void {\n this.show({\n type: 'info',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const result = confirm(`${config.title || ''}\\n${config.message}`);\n return of({ isConfirmed: result });\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { Observable, of } from 'rxjs';\nimport { NotificationProviderBase } from './notification-provider';\nimport { SNACKBAR_CONFIG, SnackbarConfig } from '../config/snackbar-config';\nimport type { NotificationResult } from '@acontplus/ui-kit';\nimport {\n NotificationCallProps,\n SweetAlertConfig,\n} from '../types/notification.types';\nimport { SnackbarProps } from '../models/notification';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackbarProvider extends NotificationProviderBase {\n private readonly snackBar = inject(MatSnackBar);\n private readonly config = inject(SNACKBAR_CONFIG);\n\n /**\n * Display a snackbar with specific type and configuration\n */\n show(props: SnackbarProps): void {\n const {\n type,\n message,\n title,\n action = this.config.defaultAction,\n config: userConfig = {},\n } = props;\n\n const typeClass = `acontplus-snackbar-${type}`;\n const panelClasses = this.buildPanelClasses(typeClass, userConfig.panelClass);\n\n const finalConfig = {\n ...this.config,\n ...userConfig,\n panelClass: panelClasses,\n };\n\n const displayMessage = this.buildMessage(message, title);\n this.snackBar.open(displayMessage, action, finalConfig);\n }\n\n success(props: NotificationCallProps): void {\n this.show({\n type: 'success',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n error(props: NotificationCallProps): void {\n this.show({\n type: 'error',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n warning(props: NotificationCallProps): void {\n this.show({\n type: 'warning',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n info(props: NotificationCallProps): void {\n this.show({\n type: 'info',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const result = confirm(`${config.title || ''}\\n${config.message}`);\n return of({ isConfirmed: result });\n }\n\n private buildPanelClasses(typeClass: string, userClasses?: string | string[]): string[] {\n const classes = ['acontplus-snackbar', typeClass];\n\n if (userClasses) {\n const normalizedClasses = Array.isArray(userClasses) ? userClasses : [userClasses];\n classes.push(...normalizedClasses);\n }\n\n return classes;\n }\n\n private buildMessage(message: string, title?: string): string {\n if (!this.config.titleEnabled || !title) {\n return message;\n }\n return `${title}: ${message}`;\n }\n}\n","import { Injectable, PLATFORM_ID, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ThemeDetector {\n private themeSubject = new BehaviorSubject<string>('material-ui-light');\n private readonly platformId = inject(PLATFORM_ID);\n public theme$ = this.themeSubject.asObservable();\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.detectTheme();\n this.watchThemeChanges();\n }\n }\n\n private detectTheme(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const isDark =\n document.body.classList.contains('dark-theme') ||\n document.documentElement.classList.contains('dark-theme');\n this.themeSubject.next(isDark ? 'material-ui-dark' : 'material-ui-light');\n }\n\n private watchThemeChanges(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const observer = new MutationObserver(() => this.detectTheme());\n observer.observe(document.body, { attributes: true, attributeFilter: ['class'] });\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });\n }\n\n getCurrentTheme(): string {\n return this.themeSubject.value;\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable, from } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport Swal from 'sweetalert2';\nimport {\n NotificationProviderBase,\n NotificationProviderConfig,\n NOTIFICATION_CONFIG,\n} from './notification-provider';\nimport type { NotificationResult, NotificationType } from '@acontplus/ui-kit';\nimport {\n NotificationCallProps,\n SweetAlertConfig,\n} from '../types/notification.types';\nimport { ThemeDetector } from '../services/theme-detector';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SweetalertProvider extends NotificationProviderBase {\n private config = inject<NotificationProviderConfig>(NOTIFICATION_CONFIG);\n private themeDetector = inject(ThemeDetector);\n\n private getTheme(): string {\n const configTheme = (this.config.sweetalert as any)?.defaultTheme;\n\n // Default to 'auto' if no theme specified\n if (!configTheme || configTheme === 'auto') {\n // Auto-detect theme based on CSS classes\n const isDark =\n document?.body?.classList?.contains('dark-theme') ||\n document?.documentElement?.classList?.contains('dark-theme');\n return isDark ? 'material-ui-dark' : 'material-ui-light';\n }\n\n return configTheme;\n }\n success(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'success' });\n }\n\n error(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'error' });\n }\n\n warning(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'warning' });\n }\n\n info(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'info' });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const swalConfig = {\n title: config.title,\n text: config.message,\n html: config.html,\n icon: 'question' as const,\n showCancelButton: config.showCancelButton !== false,\n confirmButtonText: config.confirmButtonText || 'Confirm',\n cancelButtonText: config.cancelButtonText || 'Cancel',\n allowOutsideClick: config.allowOutsideClick !== false,\n customClass: config.customClass ? { container: config.customClass } : undefined,\n theme: this.getTheme(),\n };\n\n return from(Swal.fire(swalConfig as any)).pipe(\n map((result) => ({\n isConfirmed: result.isConfirmed,\n isDenied: result.isDenied,\n isDismissed: result.isDismissed,\n value: result.value,\n })),\n );\n }\n\n private showAlert(\n props: NotificationCallProps & { type: NotificationType },\n ): Observable<NotificationResult> {\n const configOptions = props.config as Record<string, unknown> | undefined;\n const { duration, ...otherConfig } = configOptions || {};\n const swalConfig = {\n title: props.title,\n text: props.message,\n icon: props.type as 'success' | 'error' | 'warning' | 'info',\n theme: this.getTheme(),\n ...(duration ? { timer: duration as number, timerProgressBar: true } : {}),\n ...otherConfig,\n };\n\n return from(Swal.fire(swalConfig as any)).pipe(\n map((result) => ({\n isConfirmed: result.isConfirmed,\n isDenied: result.isDenied,\n isDismissed: result.isDismissed,\n value: result.value,\n })),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n NotificationProviderBase,\n NOTIFICATION_CONFIG,\n NotificationProviderConfig,\n} from '../providers/notification-provider';\nimport { ToastrProvider } from '../providers/toastr-provider';\nimport { SnackbarProvider } from '../providers/snackbar-provider';\nimport { SweetalertProvider } from '../providers/sweetalert-provider';\nimport {\n NOTIFICATION_MESSAGES,\n type NotificationProvider,\n type NotificationResult,\n type NotificationType,\n} from '@acontplus/ui-kit';\nimport {\n NotificationCallProps,\n SweetAlertConfig,\n} from '../types/notification.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n private config = inject<NotificationProviderConfig>(NOTIFICATION_CONFIG);\n private toastrProvider = inject(ToastrProvider);\n private snackbarProvider = inject(SnackbarProvider);\n private sweetAlertProvider = inject(SweetalertProvider);\n\n private providers = new Map<NotificationProvider, NotificationProviderBase>();\n private currentProvider: NotificationProviderBase;\n\n // Expose predefined messages\n readonly messages = NOTIFICATION_MESSAGES;\n\n constructor() {\n this.providers.set('toastr', this.toastrProvider);\n this.providers.set('snackbar', this.snackbarProvider);\n this.providers.set('sweetalert', this.sweetAlertProvider);\n\n this.currentProvider =\n this.providers.get(this.config.defaultProvider) || this.sweetAlertProvider;\n }\n\n setProvider(provider: NotificationProvider): void {\n const providerInstance = this.providers.get(provider);\n if (providerInstance) {\n this.currentProvider = providerInstance;\n }\n }\n\n success(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.success(props);\n }\n\n error(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.error(props);\n }\n\n warning(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.warning(props);\n }\n\n info(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.info(props);\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n return this.currentProvider.confirm(config);\n }\n\n show(\n props: { type: NotificationType } & NotificationCallProps,\n ): void | Observable<NotificationResult> {\n return this.currentProvider[props.type]({\n message: props.message,\n title: props.title,\n config: props.config,\n });\n }\n\n // Provider-specific methods maintaining your current API\n get toastr(): ToastrProvider {\n return this.providers.get('toastr') as ToastrProvider;\n }\n\n get snackbar(): SnackbarProvider {\n return this.providers.get('snackbar') as SnackbarProvider;\n }\n\n get sweetAlert(): SweetalertProvider {\n return this.providers.get('sweetalert') as SweetalertProvider;\n }\n\n // Quick methods using predefined messages\n quickSave(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.SAVE : this.messages.ERROR.SAVE;\n this.currentProvider[type]({ message });\n }\n\n quickDelete(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.DELETE : this.messages.ERROR.DELETE;\n this.currentProvider[type]({ message });\n }\n\n quickUpdate(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.UPDATE : this.messages.ERROR.UPDATE;\n this.currentProvider[type]({ message });\n }\n\n networkError(): void {\n this.currentProvider.error({\n message: this.messages.ERROR.NETWORK,\n title: 'Connection Error',\n });\n }\n\n sessionWarning(): void {\n this.currentProvider.warning({\n message: this.messages.WARNING.SESSION_EXPIRING,\n title: 'Session Alert',\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideToastr, GlobalConfig, ToastNoAnimation } from 'ngx-toastr';\nimport { NotificationService } from './services/notification-service';\nimport { NOTIFICATION_CONFIG, NotificationProviderConfig } from './providers/notification-provider';\nimport { ToastrProvider } from './providers/toastr-provider';\nimport { SnackbarProvider } from './providers/snackbar-provider';\nimport { SweetalertProvider } from './providers/sweetalert-provider';\n\n// Default toastr config (can be overridden)\nconst DEFAULT_TOASTR_CONFIG: Partial<GlobalConfig> = {\n positionClass: 'toast-bottom-center',\n timeOut: 5000,\n extendedTimeOut: 1500,\n closeButton: true,\n newestOnTop: true,\n preventDuplicates: true,\n progressBar: true,\n toastComponent: ToastNoAnimation,\n};\n\nexport function provideNotifications(\n config?: Partial<NotificationProviderConfig>,\n toastrConfig?: Partial<GlobalConfig>, // New optional param for dynamic toastr options\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideToastr({\n ...DEFAULT_TOASTR_CONFIG,\n ...toastrConfig, // Merge with user-provided config for flexibility\n }),\n\n // Notification providers\n ToastrProvider,\n SnackbarProvider,\n SweetalertProvider,\n\n // Configuration\n {\n provide: NOTIFICATION_CONFIG,\n useValue: {\n defaultProvider: 'toastr',\n ...config,\n },\n },\n\n // Main service\n NotificationService,\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAKa,0BAA0B,GAAG,IAAI,cAAc,CAC1D,4BAA4B,EAC5B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO;AACd,QAAA,aAAa,EAAE,qBAAqB;AACpC,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,eAAe,EAAE,IAAI;AACrB,QAAA,WAAW,EAAE,IAAI;AACjB,QAAA,WAAW,EAAE,IAAI;KAClB,CAAC;AACH,CAAA;;ACPI,MAAM,uBAAuB,GAAmB;AACrD,IAAA,QAAQ,EAAE,IAAI;AACd,IAAA,kBAAkB,EAAE,QAAQ;AAC5B,IAAA,gBAAgB,EAAE,QAAQ;AAC1B,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,aAAa,EAAE,OAAO;AACtB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,YAAY,EAAE,IAAI;;MAGP,eAAe,GAAG,IAAI,cAAc,CAAiB,2BAA2B,EAAE;AAC7F,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACvC,CAAA;;MCdY,mBAAmB,GAAG,IAAI,cAAc,CACnD,qBAAqB;MAcD,wBAAwB,CAAA;uGAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;2GAAxB,wBAAwB,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAD7C;;;ACCK,MAAO,cAAe,SAAQ,wBAAwB,CAAA;AACzC,IAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AACrC,IAAA,MAAM,GAAG,MAAM,CAAC,0BAA0B,CAAC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B,GAAG,YAAY;SAChB,CAAC;;QAGF,cAAc;QACd,gBAAgB;QAChB,kBAAkB;;AAGlB,QAAA;AACE,YAAA,OAAO,EAAE,mBAAmB;AAC5B,YAAA,QAAQ,EAAE;AACR,gBAAA,eAAe,EAAE,QAAQ;AACzB,gBAAA,GAAG,MAAM;AACV,aAAA;AACF,SAAA;;QAGD,mBAAmB;AACpB,KAAA,CAAC;AACJ;;AC/CA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"acontplus-ng-notifications.mjs","sources":["../../../../packages/ng-notifications/src/lib/config/toastr-config.ts","../../../../packages/ng-notifications/src/lib/config/snackbar-config.ts","../../../../packages/ng-notifications/src/lib/providers/notification-provider.ts","../../../../packages/ng-notifications/src/lib/providers/toastr-provider.ts","../../../../packages/ng-notifications/src/lib/providers/snackbar-provider.ts","../../../../packages/ng-notifications/src/lib/services/theme-detector.ts","../../../../packages/ng-notifications/src/lib/providers/sweetalert-provider.ts","../../../../packages/ng-notifications/src/lib/services/notification-service.ts","../../../../packages/ng-notifications/src/lib/providers.ts","../../../../packages/ng-notifications/src/acontplus-ng-notifications.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { IndividualConfig } from 'ngx-toastr';\n\nexport type ToastrNotificationConfig = Partial<IndividualConfig>;\n\nexport const TOASTR_NOTIFICATION_CONFIG = new InjectionToken<ToastrNotificationConfig>(\n 'toastr-notification-config',\n {\n providedIn: 'root',\n factory: () => ({\n positionClass: 'toast-bottom-center',\n timeOut: 5000,\n extendedTimeOut: 1500,\n closeButton: true,\n newestOnTop: true,\n }),\n },\n);\n","import { InjectionToken } from '@angular/core';\nimport { MatSnackBarConfig } from '@angular/material/snack-bar';\n\nexport interface SnackbarConfig extends MatSnackBarConfig {\n readonly defaultAction?: string;\n readonly iconEnabled?: boolean;\n readonly titleEnabled?: boolean;\n}\n\nexport const DEFAULT_SNACKBAR_CONFIG: SnackbarConfig = {\n duration: 5000,\n horizontalPosition: 'center',\n verticalPosition: 'bottom',\n panelClass: [],\n defaultAction: 'Close',\n iconEnabled: true,\n titleEnabled: true,\n};\n\nexport const SNACKBAR_CONFIG = new InjectionToken<SnackbarConfig>('acontplus-snackbar-config', {\n providedIn: 'root',\n factory: () => DEFAULT_SNACKBAR_CONFIG,\n});\n","import { Injectable, InjectionToken } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport type { NotificationProvider, NotificationResult } from '@acontplus/ui-kit';\nimport { NotificationCallProps, SweetAlertConfig } from '../types/notification.types';\n\nexport const NOTIFICATION_CONFIG = new InjectionToken<NotificationProviderConfig>(\n 'NOTIFICATION_CONFIG',\n);\n\nexport interface NotificationProviderConfig {\n defaultProvider: NotificationProvider;\n toastr?: unknown;\n snackbar?: unknown;\n sweetalert?: {\n defaultTheme?: 'auto' | 'material-ui' | 'material-ui-light' | 'material-ui-dark' | string;\n [key: string]: unknown;\n };\n}\n\n@Injectable()\nexport abstract class NotificationProviderBase {\n abstract success(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract error(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract warning(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract info(props: NotificationCallProps): void | Observable<NotificationResult>;\n abstract confirm(config: SweetAlertConfig): Observable<NotificationResult>;\n}\n","import { Injectable, inject } from '@angular/core';\nimport { IndividualConfig, ToastrService } from 'ngx-toastr';\nimport { Observable, of } from 'rxjs';\nimport { NotificationProviderBase } from './notification-provider';\nimport { TOASTR_NOTIFICATION_CONFIG } from '../config/toastr-config';\nimport type { NotificationResult } from '@acontplus/ui-kit';\nimport { NotificationCallProps, SweetAlertConfig } from '../types/notification.types';\n\nexport type ToastrType = 'success' | 'error' | 'warning' | 'info';\n\nexport interface ToastrShowProps {\n readonly type: ToastrType;\n readonly message: string;\n readonly title?: string;\n readonly options?: Partial<IndividualConfig>;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ToastrProvider extends NotificationProviderBase {\n private readonly toastrService = inject(ToastrService);\n private readonly config = inject(TOASTR_NOTIFICATION_CONFIG);\n\n /**\n * Generic show method for dynamic toast types\n */\n show(props: ToastrShowProps): void {\n const { type, message, title, options: overrideOptions } = props;\n const finalOptions = { ...this.config, ...overrideOptions };\n\n this.toastrService[type](message, title, finalOptions);\n }\n\n success(props: NotificationCallProps): void {\n this.show({\n type: 'success',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n error(props: NotificationCallProps): void {\n this.show({\n type: 'error',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n warning(props: NotificationCallProps): void {\n this.show({\n type: 'warning',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n info(props: NotificationCallProps): void {\n this.show({\n type: 'info',\n message: props.message,\n title: props.title,\n options: props.config as Partial<IndividualConfig>,\n });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const result = confirm(`${config.title || ''}\\n${config.message}`);\n return of({ isConfirmed: result });\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { Observable, of } from 'rxjs';\nimport { NotificationProviderBase } from './notification-provider';\nimport { SNACKBAR_CONFIG, SnackbarConfig } from '../config/snackbar-config';\nimport type { NotificationResult } from '@acontplus/ui-kit';\nimport { NotificationCallProps, SweetAlertConfig } from '../types/notification.types';\nimport { SnackbarProps } from '../models/notification';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SnackbarProvider extends NotificationProviderBase {\n private readonly snackBar = inject(MatSnackBar);\n private readonly config = inject(SNACKBAR_CONFIG);\n\n /**\n * Display a snackbar with specific type and configuration\n */\n show(props: SnackbarProps): void {\n const {\n type,\n message,\n title,\n action = this.config.defaultAction,\n config: userConfig = {},\n } = props;\n\n const typeClass = `acontplus-snackbar-${type}`;\n const panelClasses = this.buildPanelClasses(typeClass, userConfig.panelClass);\n\n const finalConfig = {\n ...this.config,\n ...userConfig,\n panelClass: panelClasses,\n };\n\n const displayMessage = this.buildMessage(message, title);\n this.snackBar.open(displayMessage, action, finalConfig);\n }\n\n success(props: NotificationCallProps): void {\n this.show({\n type: 'success',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n error(props: NotificationCallProps): void {\n this.show({\n type: 'error',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n warning(props: NotificationCallProps): void {\n this.show({\n type: 'warning',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n info(props: NotificationCallProps): void {\n this.show({\n type: 'info',\n message: props.message,\n title: props.title,\n config: props.config as Partial<SnackbarConfig>,\n });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const result = confirm(`${config.title || ''}\\n${config.message}`);\n return of({ isConfirmed: result });\n }\n\n private buildPanelClasses(typeClass: string, userClasses?: string | string[]): string[] {\n const classes = ['acontplus-snackbar', typeClass];\n\n if (userClasses) {\n const normalizedClasses = Array.isArray(userClasses) ? userClasses : [userClasses];\n classes.push(...normalizedClasses);\n }\n\n return classes;\n }\n\n private buildMessage(message: string, title?: string): string {\n if (!this.config.titleEnabled || !title) {\n return message;\n }\n return `${title}: ${message}`;\n }\n}\n","import { Injectable, PLATFORM_ID, inject } from '@angular/core';\nimport { isPlatformBrowser } from '@angular/common';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class ThemeDetector {\n private themeSubject = new BehaviorSubject<string>('material-ui-light');\n private readonly platformId = inject(PLATFORM_ID);\n public theme$ = this.themeSubject.asObservable();\n\n constructor() {\n if (isPlatformBrowser(this.platformId)) {\n this.detectTheme();\n this.watchThemeChanges();\n }\n }\n\n private detectTheme(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const isDark =\n document.body.classList.contains('dark-theme') ||\n document.documentElement.classList.contains('dark-theme');\n this.themeSubject.next(isDark ? 'material-ui-dark' : 'material-ui-light');\n }\n\n private watchThemeChanges(): void {\n if (!isPlatformBrowser(this.platformId)) return;\n\n const observer = new MutationObserver(() => this.detectTheme());\n observer.observe(document.body, { attributes: true, attributeFilter: ['class'] });\n observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });\n }\n\n getCurrentTheme(): string {\n return this.themeSubject.value;\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable, from } from 'rxjs';\nimport { map } from 'rxjs/operators';\nimport Swal from 'sweetalert2';\nimport {\n NotificationProviderBase,\n NotificationProviderConfig,\n NOTIFICATION_CONFIG,\n} from './notification-provider';\nimport type { NotificationResult, NotificationType } from '@acontplus/ui-kit';\nimport { NotificationCallProps, SweetAlertConfig } from '../types/notification.types';\nimport { ThemeDetector } from '../services/theme-detector';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SweetalertProvider extends NotificationProviderBase {\n private config = inject<NotificationProviderConfig>(NOTIFICATION_CONFIG);\n private themeDetector = inject(ThemeDetector);\n\n private getTheme(): string {\n const configTheme = (this.config.sweetalert as any)?.defaultTheme;\n\n // Default to 'auto' if no theme specified\n if (!configTheme || configTheme === 'auto') {\n // Auto-detect theme based on CSS classes\n const isDark =\n document?.body?.classList?.contains('dark-theme') ||\n document?.documentElement?.classList?.contains('dark-theme');\n return isDark ? 'material-ui-dark' : 'material-ui-light';\n }\n\n return configTheme;\n }\n success(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'success' });\n }\n\n error(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'error' });\n }\n\n warning(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'warning' });\n }\n\n info(props: NotificationCallProps): Observable<NotificationResult> {\n return this.showAlert({ ...props, type: 'info' });\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n const swalConfig = {\n title: config.title,\n text: config.message,\n html: config.html,\n icon: 'question' as const,\n showCancelButton: config.showCancelButton !== false,\n confirmButtonText: config.confirmButtonText || 'Confirm',\n cancelButtonText: config.cancelButtonText || 'Cancel',\n allowOutsideClick: config.allowOutsideClick !== false,\n customClass: config.customClass ? { container: config.customClass } : undefined,\n theme: this.getTheme(),\n };\n\n return from(Swal.fire(swalConfig as any)).pipe(\n map((result) => ({\n isConfirmed: result.isConfirmed,\n isDenied: result.isDenied,\n isDismissed: result.isDismissed,\n value: result.value,\n })),\n );\n }\n\n private showAlert(\n props: NotificationCallProps & { type: NotificationType },\n ): Observable<NotificationResult> {\n const configOptions = props.config as Record<string, unknown> | undefined;\n const { duration, ...otherConfig } = configOptions || {};\n const swalConfig = {\n title: props.title,\n text: props.message,\n icon: props.type as 'success' | 'error' | 'warning' | 'info',\n theme: this.getTheme(),\n ...(duration ? { timer: duration as number, timerProgressBar: true } : {}),\n ...otherConfig,\n };\n\n return from(Swal.fire(swalConfig as any)).pipe(\n map((result) => ({\n isConfirmed: result.isConfirmed,\n isDenied: result.isDenied,\n isDismissed: result.isDismissed,\n value: result.value,\n })),\n );\n }\n}\n","import { Injectable, inject } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport {\n NotificationProviderBase,\n NOTIFICATION_CONFIG,\n NotificationProviderConfig,\n} from '../providers/notification-provider';\nimport { ToastrProvider } from '../providers/toastr-provider';\nimport { SnackbarProvider } from '../providers/snackbar-provider';\nimport { SweetalertProvider } from '../providers/sweetalert-provider';\nimport {\n NOTIFICATION_MESSAGES,\n type NotificationProvider,\n type NotificationResult,\n type NotificationType,\n} from '@acontplus/ui-kit';\nimport { NotificationCallProps, SweetAlertConfig } from '../types/notification.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n private config = inject<NotificationProviderConfig>(NOTIFICATION_CONFIG);\n private toastrProvider = inject(ToastrProvider);\n private snackbarProvider = inject(SnackbarProvider);\n private sweetAlertProvider = inject(SweetalertProvider);\n\n private providers = new Map<NotificationProvider, NotificationProviderBase>();\n private currentProvider: NotificationProviderBase;\n\n // Expose predefined messages\n readonly messages = NOTIFICATION_MESSAGES;\n\n constructor() {\n this.providers.set('toastr', this.toastrProvider);\n this.providers.set('snackbar', this.snackbarProvider);\n this.providers.set('sweetalert', this.sweetAlertProvider);\n\n this.currentProvider =\n this.providers.get(this.config.defaultProvider) || this.sweetAlertProvider;\n }\n\n setProvider(provider: NotificationProvider): void {\n const providerInstance = this.providers.get(provider);\n if (providerInstance) {\n this.currentProvider = providerInstance;\n }\n }\n\n success(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.success(props);\n }\n\n error(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.error(props);\n }\n\n warning(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.warning(props);\n }\n\n info(props: NotificationCallProps): void | Observable<NotificationResult> {\n return this.currentProvider.info(props);\n }\n\n confirm(config: SweetAlertConfig): Observable<NotificationResult> {\n return this.currentProvider.confirm(config);\n }\n\n show(\n props: { type: NotificationType } & NotificationCallProps,\n ): void | Observable<NotificationResult> {\n return this.currentProvider[props.type]({\n message: props.message,\n title: props.title,\n config: props.config,\n });\n }\n\n // Provider-specific methods maintaining your current API\n get toastr(): ToastrProvider {\n return this.providers.get('toastr') as ToastrProvider;\n }\n\n get snackbar(): SnackbarProvider {\n return this.providers.get('snackbar') as SnackbarProvider;\n }\n\n get sweetAlert(): SweetalertProvider {\n return this.providers.get('sweetalert') as SweetalertProvider;\n }\n\n // Quick methods using predefined messages\n quickSave(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.SAVE : this.messages.ERROR.SAVE;\n this.currentProvider[type]({ message });\n }\n\n quickDelete(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.DELETE : this.messages.ERROR.DELETE;\n this.currentProvider[type]({ message });\n }\n\n quickUpdate(type: 'success' | 'error' = 'success'): void {\n const message = type === 'success' ? this.messages.SUCCESS.UPDATE : this.messages.ERROR.UPDATE;\n this.currentProvider[type]({ message });\n }\n\n networkError(): void {\n this.currentProvider.error({\n message: this.messages.ERROR.NETWORK,\n title: 'Connection Error',\n });\n }\n\n sessionWarning(): void {\n this.currentProvider.warning({\n message: this.messages.WARNING.SESSION_EXPIRING,\n title: 'Session Alert',\n });\n }\n}\n","import { EnvironmentProviders, makeEnvironmentProviders } from '@angular/core';\nimport { provideToastr, GlobalConfig, ToastNoAnimation } from 'ngx-toastr';\nimport { NotificationService } from './services/notification-service';\nimport { NOTIFICATION_CONFIG, NotificationProviderConfig } from './providers/notification-provider';\nimport { ToastrProvider } from './providers/toastr-provider';\nimport { SnackbarProvider } from './providers/snackbar-provider';\nimport { SweetalertProvider } from './providers/sweetalert-provider';\n\n// Default toastr config (can be overridden)\nconst DEFAULT_TOASTR_CONFIG: Partial<GlobalConfig> = {\n positionClass: 'toast-bottom-center',\n timeOut: 5000,\n extendedTimeOut: 1500,\n closeButton: true,\n newestOnTop: true,\n preventDuplicates: true,\n progressBar: true,\n toastComponent: ToastNoAnimation,\n};\n\nexport function provideNotifications(\n config?: Partial<NotificationProviderConfig>,\n toastrConfig?: Partial<GlobalConfig>, // New optional param for dynamic toastr options\n): EnvironmentProviders {\n return makeEnvironmentProviders([\n provideToastr({\n ...DEFAULT_TOASTR_CONFIG,\n ...toastrConfig, // Merge with user-provided config for flexibility\n }),\n\n // Notification providers\n ToastrProvider,\n SnackbarProvider,\n SweetalertProvider,\n\n // Configuration\n {\n provide: NOTIFICATION_CONFIG,\n useValue: {\n defaultProvider: 'toastr',\n ...config,\n },\n },\n\n // Main service\n NotificationService,\n ]);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MAKa,0BAA0B,GAAG,IAAI,cAAc,CAC1D,4BAA4B,EAC5B;AACE,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE,OAAO;AACd,QAAA,aAAa,EAAE,qBAAqB;AACpC,QAAA,OAAO,EAAE,IAAI;AACb,QAAA,eAAe,EAA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
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Comprehensive Angular notification system with toast notifications (ngx-toastr), alerts (SweetAlert2), snackbars, theme detection, notification providers, and configurable styling. Supports multiple notification types with Angular Material integration.",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@acontplus/ui-kit": "^
|
|
7
|
-
"@angular/common": "^
|
|
8
|
-
"@angular/core": "^
|
|
9
|
-
"@angular/material": "^
|
|
6
|
+
"@acontplus/ui-kit": "^2.0.0",
|
|
7
|
+
"@angular/common": "^21.0.6",
|
|
8
|
+
"@angular/core": "^21.0.6",
|
|
9
|
+
"@angular/material": "^21.0.5",
|
|
10
10
|
"ngx-toastr": "^19.1.0",
|
|
11
|
-
"sweetalert2": "^11.26.
|
|
11
|
+
"sweetalert2": "^11.26.3",
|
|
12
12
|
"rxjs": "^7.8.2"
|
|
13
13
|
},
|
|
14
14
|
"sideEffects": true,
|
|
15
15
|
"main": "fesm2022/acontplus-ng-notifications.mjs",
|
|
16
16
|
"module": "fesm2022/acontplus-ng-notifications.mjs",
|
|
17
|
-
"typings": "
|
|
17
|
+
"typings": "types/acontplus-ng-notifications.d.ts",
|
|
18
18
|
"files": [
|
|
19
19
|
"index.d.ts",
|
|
20
20
|
"*.d.ts",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"default": "./package.json"
|
|
73
73
|
},
|
|
74
74
|
".": {
|
|
75
|
-
"types": "./
|
|
75
|
+
"types": "./types/acontplus-ng-notifications.d.ts",
|
|
76
76
|
"default": "./fesm2022/acontplus-ng-notifications.mjs"
|
|
77
77
|
}
|
|
78
78
|
},
|
|
File without changes
|