@acontplus/ng-notifications 2.0.2 → 2.0.4

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,11 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Injectable, inject, PLATFORM_ID, makeEnvironmentProviders } from '@angular/core';
2
+ import { InjectionToken, Injectable, inject, Component, PLATFORM_ID, makeEnvironmentProviders } from '@angular/core';
3
3
  import { ToastrService, ToastNoAnimation, provideToastr } from 'ngx-toastr';
4
4
  import { of, BehaviorSubject, from } from 'rxjs';
5
- import { MatSnackBar } from '@angular/material/snack-bar';
5
+ import { MAT_SNACK_BAR_DATA, MatSnackBarRef, MatSnackBar } from '@angular/material/snack-bar';
6
+ import { CommonModule, isPlatformBrowser } from '@angular/common';
7
+ import * as i1 from '@angular/material/icon';
8
+ import { MatIconModule } from '@angular/material/icon';
9
+ import * as i2 from '@angular/material/button';
10
+ import { MatButtonModule } from '@angular/material/button';
6
11
  import { map } from 'rxjs/operators';
7
12
  import Swal from 'sweetalert2';
8
- import { isPlatformBrowser } from '@angular/common';
9
13
  import { NOTIFICATION_MESSAGES } from '@acontplus/ui-kit';
10
14
 
11
15
  const TOASTR_NOTIFICATION_CONFIG = new InjectionToken('toastr-notification-config', {
@@ -20,13 +24,18 @@ const TOASTR_NOTIFICATION_CONFIG = new InjectionToken('toastr-notification-confi
20
24
  });
21
25
 
22
26
  const DEFAULT_SNACKBAR_CONFIG = {
23
- duration: 5000,
27
+ duration: 5000, // Restauro el valor original
24
28
  horizontalPosition: 'center',
25
29
  verticalPosition: 'bottom',
26
30
  panelClass: [],
27
31
  defaultAction: 'Close',
28
32
  iconEnabled: true,
29
33
  titleEnabled: true,
34
+ accessibilityEnabled: true,
35
+ showCloseIcon: true,
36
+ progressBarEnabled: true,
37
+ // Default politeness will be set dynamically based on type
38
+ politeness: 'polite',
30
39
  };
31
40
  const SNACKBAR_CONFIG = new InjectionToken('acontplus-snackbar-config', {
32
41
  providedIn: 'root',
@@ -99,6 +108,126 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
99
108
  }]
100
109
  }] });
101
110
 
111
+ class SnackbarTemplateComponent {
112
+ data = inject(MAT_SNACK_BAR_DATA);
113
+ snackBarRef = inject((MatSnackBarRef));
114
+ getIcon() {
115
+ switch (this.data.type) {
116
+ case 'success':
117
+ return 'check_circle';
118
+ case 'error':
119
+ return 'error';
120
+ case 'warning':
121
+ return 'warning';
122
+ case 'info':
123
+ return 'info';
124
+ default:
125
+ return 'notifications';
126
+ }
127
+ }
128
+ getIconAriaLabel() {
129
+ switch (this.data.type) {
130
+ case 'success':
131
+ return 'Success';
132
+ case 'error':
133
+ return 'Error';
134
+ case 'warning':
135
+ return 'Warning';
136
+ case 'info':
137
+ return 'Information';
138
+ default:
139
+ return 'Notification';
140
+ }
141
+ }
142
+ dismiss() {
143
+ this.snackBarRef.dismissWithAction();
144
+ }
145
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
146
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: SnackbarTemplateComponent, isStandalone: true, selector: "acp-snackbar-template", ngImport: i0, template: `
147
+ <div class="snackbar-content">
148
+ <!-- Icon (configurable) -->
149
+ @if (data.showIcon === true) {
150
+ <div class="snackbar-icon">
151
+ <mat-icon [attr.aria-label]="getIconAriaLabel()">{{ getIcon() }}</mat-icon>
152
+ </div>
153
+ }
154
+
155
+ <!-- Using official Angular Material directive for label -->
156
+ <div matSnackBarLabel class="snackbar-message">
157
+ @if (data.title) {
158
+ <div class="snackbar-title">{{ data.title }}</div>
159
+ }
160
+ <div class="snackbar-text">{{ data.message }}</div>
161
+ </div>
162
+
163
+ <!-- Using official Angular Material directives for actions -->
164
+ <div matSnackBarActions class="snackbar-actions">
165
+ @if (data.showCloseIcon) {
166
+ <button
167
+ mat-icon-button
168
+ matSnackBarAction
169
+ (click)="dismiss()"
170
+ class="snackbar-close-button"
171
+ [attr.aria-label]="'Close notification'"
172
+ >
173
+ <mat-icon>close</mat-icon>
174
+ </button>
175
+ }
176
+ </div>
177
+ </div>
178
+
179
+ <!-- Progress bar (configurable) -->
180
+ @if (data.showProgressBar === true && data.duration && data.duration > 0) {
181
+ <div class="snackbar-progress-container">
182
+ <div class="snackbar-progress-bar" [style.animation-duration.ms]="data.duration"></div>
183
+ </div>
184
+ }
185
+ `, isInline: true, styles: [":host{display:block;width:100%}.snackbar-content{display:flex;align-items:center;gap:12px;min-width:300px;color:inherit;padding:0}.snackbar-icon{display:flex;align-items:center;flex-shrink:0}.snackbar-icon mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.snackbar-message{flex:1;min-width:0;color:inherit}.snackbar-title{font-weight:600;font-size:14px;line-height:1.2;margin-bottom:2px;color:inherit}.snackbar-text{font-size:14px;line-height:1.4;word-wrap:break-word;color:inherit}.snackbar-actions{flex-shrink:0;display:flex;align-items:center;gap:4px}.snackbar-actions button{min-width:auto;font-weight:500;color:inherit}.snackbar-actions .mat-mdc-button{padding:0 8px}.snackbar-close-button{width:32px;height:32px;padding:0;min-width:32px}.snackbar-close-button mat-icon{font-size:18px;width:18px;height:18px}.snackbar-progress-container{position:absolute;bottom:0;left:0;right:0;height:4px;background-color:#fff3;overflow:hidden}.snackbar-progress-bar{height:100%;background-color:#fffc;width:100%;transform-origin:left center;animation:snackbar-progress linear forwards}@keyframes snackbar-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}:host-context(.acontplus-snackbar-success) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-error) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-warning) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-info) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar) .snackbar-actions button{color:#ffffffe6!important}:host-context(.acontplus-snackbar) .snackbar-actions button:hover{background-color:#ffffff1a!important}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }] });
186
+ }
187
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarTemplateComponent, decorators: [{
188
+ type: Component,
189
+ args: [{ selector: 'acp-snackbar-template', standalone: true, imports: [CommonModule, MatIconModule, MatButtonModule], template: `
190
+ <div class="snackbar-content">
191
+ <!-- Icon (configurable) -->
192
+ @if (data.showIcon === true) {
193
+ <div class="snackbar-icon">
194
+ <mat-icon [attr.aria-label]="getIconAriaLabel()">{{ getIcon() }}</mat-icon>
195
+ </div>
196
+ }
197
+
198
+ <!-- Using official Angular Material directive for label -->
199
+ <div matSnackBarLabel class="snackbar-message">
200
+ @if (data.title) {
201
+ <div class="snackbar-title">{{ data.title }}</div>
202
+ }
203
+ <div class="snackbar-text">{{ data.message }}</div>
204
+ </div>
205
+
206
+ <!-- Using official Angular Material directives for actions -->
207
+ <div matSnackBarActions class="snackbar-actions">
208
+ @if (data.showCloseIcon) {
209
+ <button
210
+ mat-icon-button
211
+ matSnackBarAction
212
+ (click)="dismiss()"
213
+ class="snackbar-close-button"
214
+ [attr.aria-label]="'Close notification'"
215
+ >
216
+ <mat-icon>close</mat-icon>
217
+ </button>
218
+ }
219
+ </div>
220
+ </div>
221
+
222
+ <!-- Progress bar (configurable) -->
223
+ @if (data.showProgressBar === true && data.duration && data.duration > 0) {
224
+ <div class="snackbar-progress-container">
225
+ <div class="snackbar-progress-bar" [style.animation-duration.ms]="data.duration"></div>
226
+ </div>
227
+ }
228
+ `, styles: [":host{display:block;width:100%}.snackbar-content{display:flex;align-items:center;gap:12px;min-width:300px;color:inherit;padding:0}.snackbar-icon{display:flex;align-items:center;flex-shrink:0}.snackbar-icon mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.snackbar-message{flex:1;min-width:0;color:inherit}.snackbar-title{font-weight:600;font-size:14px;line-height:1.2;margin-bottom:2px;color:inherit}.snackbar-text{font-size:14px;line-height:1.4;word-wrap:break-word;color:inherit}.snackbar-actions{flex-shrink:0;display:flex;align-items:center;gap:4px}.snackbar-actions button{min-width:auto;font-weight:500;color:inherit}.snackbar-actions .mat-mdc-button{padding:0 8px}.snackbar-close-button{width:32px;height:32px;padding:0;min-width:32px}.snackbar-close-button mat-icon{font-size:18px;width:18px;height:18px}.snackbar-progress-container{position:absolute;bottom:0;left:0;right:0;height:4px;background-color:#fff3;overflow:hidden}.snackbar-progress-bar{height:100%;background-color:#fffc;width:100%;transform-origin:left center;animation:snackbar-progress linear forwards}@keyframes snackbar-progress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}:host-context(.acontplus-snackbar-success) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-error) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-warning) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar-info) .snackbar-icon mat-icon{color:#ffffffe6}:host-context(.acontplus-snackbar) .snackbar-actions button{color:#ffffffe6!important}:host-context(.acontplus-snackbar) .snackbar-actions button:hover{background-color:#ffffff1a!important}\n"] }]
229
+ }] });
230
+
102
231
  class SnackbarProvider extends NotificationProviderBase {
103
232
  snackBar = inject(MatSnackBar);
104
233
  config = inject(SNACKBAR_CONFIG);
@@ -109,13 +238,52 @@ class SnackbarProvider extends NotificationProviderBase {
109
238
  const { type, message, title, action = this.config.defaultAction, config: userConfig = {}, } = props;
110
239
  const typeClass = `acontplus-snackbar-${type}`;
111
240
  const panelClasses = this.buildPanelClasses(typeClass, userConfig.panelClass);
241
+ // Build accessibility announcement message
242
+ const announcementMessage = this.buildAnnouncementMessage(type, message, title);
112
243
  const finalConfig = {
113
244
  ...this.config,
114
245
  ...userConfig,
115
246
  panelClass: panelClasses,
247
+ announcementMessage,
248
+ // Set appropriate politeness based on type
249
+ politeness: this.getPolitenessLevel(type),
116
250
  };
117
- const displayMessage = this.buildMessage(message, title);
118
- this.snackBar.open(displayMessage, action, finalConfig);
251
+ let snackBarRef;
252
+ // Determine if we should use the custom component
253
+ // Always use custom component to maintain title/message structure and other features
254
+ const useCustomComponent = title || // Always use custom component if there's a title
255
+ userConfig.showCloseIcon === true ||
256
+ this.config.showCloseIcon !== false ||
257
+ userConfig.progressBarEnabled === true ||
258
+ this.config.progressBarEnabled !== false;
259
+ if (useCustomComponent) {
260
+ const snackbarData = {
261
+ message,
262
+ title,
263
+ type,
264
+ action,
265
+ showIcon: userConfig.iconEnabled ?? this.config.iconEnabled,
266
+ showCloseIcon: userConfig.showCloseIcon ?? this.config.showCloseIcon,
267
+ showProgressBar: userConfig.progressBarEnabled ?? this.config.progressBarEnabled,
268
+ duration: finalConfig.duration || 0,
269
+ };
270
+ snackBarRef = this.snackBar.openFromComponent(SnackbarTemplateComponent, {
271
+ ...finalConfig,
272
+ data: snackbarData,
273
+ });
274
+ }
275
+ else {
276
+ // Fallback to simple text snackbar
277
+ const displayMessage = this.buildMessage(message, title);
278
+ snackBarRef = this.snackBar.open(displayMessage, action, finalConfig);
279
+ }
280
+ // Handle action clicks if needed
281
+ if (action && snackBarRef) {
282
+ snackBarRef.onAction().subscribe(() => {
283
+ // Action was clicked - can be extended for custom behavior
284
+ snackBarRef.dismiss();
285
+ });
286
+ }
119
287
  }
120
288
  success(props) {
121
289
  this.show({
@@ -167,6 +335,46 @@ class SnackbarProvider extends NotificationProviderBase {
167
335
  }
168
336
  return `${title}: ${message}`;
169
337
  }
338
+ /**
339
+ * Build accessibility announcement message based on type and content
340
+ */
341
+ buildAnnouncementMessage(type, message, title) {
342
+ const typeLabel = this.getTypeLabel(type);
343
+ const fullMessage = title ? `${title}: ${message}` : message;
344
+ return `${typeLabel}. ${fullMessage}`;
345
+ }
346
+ /**
347
+ * Get appropriate ARIA politeness level based on notification type
348
+ */
349
+ getPolitenessLevel(type) {
350
+ switch (type) {
351
+ case 'error':
352
+ return 'assertive'; // Errors should interrupt
353
+ case 'warning':
354
+ return 'assertive'; // Warnings should interrupt
355
+ case 'success':
356
+ case 'info':
357
+ default:
358
+ return 'polite'; // Success and info can wait
359
+ }
360
+ }
361
+ /**
362
+ * Get human-readable type label for accessibility
363
+ */
364
+ getTypeLabel(type) {
365
+ switch (type) {
366
+ case 'success':
367
+ return 'Success';
368
+ case 'error':
369
+ return 'Error';
370
+ case 'warning':
371
+ return 'Warning';
372
+ case 'info':
373
+ return 'Information';
374
+ default:
375
+ return 'Notification';
376
+ }
377
+ }
170
378
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
171
379
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SnackbarProvider, providedIn: 'root' });
172
380
  }
@@ -415,5 +623,5 @@ function provideNotifications(config, toastrConfig) {
415
623
  * Generated bundle index. Do not edit.
416
624
  */
417
625
 
418
- export { DEFAULT_SNACKBAR_CONFIG, NOTIFICATION_CONFIG, NotificationProviderBase, NotificationService, SNACKBAR_CONFIG, SnackbarProvider, SweetalertProvider, TOASTR_NOTIFICATION_CONFIG, ToastrProvider, provideNotifications };
626
+ export { DEFAULT_SNACKBAR_CONFIG, NOTIFICATION_CONFIG, NotificationProviderBase, NotificationService, SNACKBAR_CONFIG, SnackbarProvider, SnackbarTemplateComponent, SweetalertProvider, TOASTR_NOTIFICATION_CONFIG, ToastrProvider, provideNotifications };
419
627
  //# sourceMappingURL=acontplus-ng-notifications.mjs.map
@@ -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 { 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,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,EA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EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;2FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACZD;AACA,MAAM,qBAAqB,GAA0B;AACnD,IAAA,aAAa,EAAE,qBAAqB;AACpC,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,cAAc,EAAE,gBAAgB;CACjC;AAEK,SAAU,oBAAoB,CAClC,MAA4C,EAC5C,YAAoC,EAAA;AAEpC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,aAAa,CAAC;AACZ,YAAA,GAAG,qBAAqB;YACxB,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/components/snackbar-template/snackbar-template.component.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 readonly accessibilityEnabled?: boolean;\n readonly showCloseIcon?: boolean;\n readonly progressBarEnabled?: boolean;\n}\n\nexport const DEFAULT_SNACKBAR_CONFIG: SnackbarConfig = {\n duration: 5000, // Restauro el valor original\n horizontalPosition: 'center',\n verticalPosition: 'bottom',\n panelClass: [],\n defaultAction: 'Close',\n iconEnabled: true,\n titleEnabled: true,\n accessibilityEnabled: true,\n showCloseIcon: true,\n progressBarEnabled: true,\n // Default politeness will be set dynamically based on type\n politeness: 'polite',\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 { Component, inject } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MAT_SNACK_BAR_DATA, MatSnackBarRef } from '@angular/material/snack-bar';\n\nexport interface SnackbarTemplateData {\n message: string;\n title?: string;\n type: 'success' | 'error' | 'warning' | 'info';\n action?: string;\n showIcon?: boolean;\n showCloseIcon?: boolean;\n showProgressBar?: boolean;\n duration?: number;\n}\n\n@Component({\n selector: 'acp-snackbar-template',\n standalone: true,\n imports: [CommonModule, MatIconModule, MatButtonModule],\n template: `\n <div class=\"snackbar-content\">\n <!-- Icon (configurable) -->\n @if (data.showIcon === true) {\n <div class=\"snackbar-icon\">\n <mat-icon [attr.aria-label]=\"getIconAriaLabel()\">{{ getIcon() }}</mat-icon>\n </div>\n }\n\n <!-- Using official Angular Material directive for label -->\n <div matSnackBarLabel class=\"snackbar-message\">\n @if (data.title) {\n <div class=\"snackbar-title\">{{ data.title }}</div>\n }\n <div class=\"snackbar-text\">{{ data.message }}</div>\n </div>\n\n <!-- Using official Angular Material directives for actions -->\n <div matSnackBarActions class=\"snackbar-actions\">\n @if (data.showCloseIcon) {\n <button\n mat-icon-button\n matSnackBarAction\n (click)=\"dismiss()\"\n class=\"snackbar-close-button\"\n [attr.aria-label]=\"'Close notification'\"\n >\n <mat-icon>close</mat-icon>\n </button>\n }\n </div>\n </div>\n\n <!-- Progress bar (configurable) -->\n @if (data.showProgressBar === true && data.duration && data.duration > 0) {\n <div class=\"snackbar-progress-container\">\n <div class=\"snackbar-progress-bar\" [style.animation-duration.ms]=\"data.duration\"></div>\n </div>\n }\n `,\n styles: [\n `\n :host {\n display: block;\n width: 100%;\n }\n\n .snackbar-content {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 300px;\n color: inherit;\n padding: 0;\n }\n\n .snackbar-icon {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n }\n\n .snackbar-icon mat-icon {\n font-size: 20px;\n width: 20px;\n height: 20px;\n color: inherit;\n }\n\n .snackbar-message {\n flex: 1;\n min-width: 0;\n color: inherit;\n }\n\n .snackbar-title {\n font-weight: 600;\n font-size: 14px;\n line-height: 1.2;\n margin-bottom: 2px;\n color: inherit;\n }\n\n .snackbar-text {\n font-size: 14px;\n line-height: 1.4;\n word-wrap: break-word;\n color: inherit;\n }\n\n .snackbar-actions {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n gap: 4px;\n }\n\n .snackbar-actions button {\n min-width: auto;\n font-weight: 500;\n color: inherit;\n }\n\n .snackbar-actions .mat-mdc-button {\n padding: 0 8px;\n }\n\n .snackbar-close-button {\n width: 32px;\n height: 32px;\n padding: 0;\n min-width: 32px;\n }\n\n .snackbar-close-button mat-icon {\n font-size: 18px;\n width: 18px;\n height: 18px;\n }\n\n /* Progress bar container */\n .snackbar-progress-container {\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 4px;\n background-color: rgba(255, 255, 255, 0.2);\n overflow: hidden;\n }\n\n .snackbar-progress-bar {\n height: 100%;\n background-color: rgba(255, 255, 255, 0.8);\n width: 100%;\n transform-origin: left center;\n animation: snackbar-progress linear forwards;\n }\n\n @keyframes snackbar-progress {\n 0% {\n transform: scaleX(1);\n }\n 100% {\n transform: scaleX(0);\n }\n }\n\n /* Type-specific icon colors - inherit from container */\n :host-context(.acontplus-snackbar-success) .snackbar-icon mat-icon {\n color: rgba(255, 255, 255, 0.9);\n }\n\n :host-context(.acontplus-snackbar-error) .snackbar-icon mat-icon {\n color: rgba(255, 255, 255, 0.9);\n }\n\n :host-context(.acontplus-snackbar-warning) .snackbar-icon mat-icon {\n color: rgba(255, 255, 255, 0.9);\n }\n\n :host-context(.acontplus-snackbar-info) .snackbar-icon mat-icon {\n color: rgba(255, 255, 255, 0.9);\n }\n\n /* Ensure buttons are properly styled */\n :host-context(.acontplus-snackbar) .snackbar-actions button {\n color: rgba(255, 255, 255, 0.9) !important;\n }\n\n :host-context(.acontplus-snackbar) .snackbar-actions button:hover {\n background-color: rgba(255, 255, 255, 0.1) !important;\n }\n `,\n ],\n})\nexport class SnackbarTemplateComponent {\n public data = inject<SnackbarTemplateData>(MAT_SNACK_BAR_DATA);\n private snackBarRef = inject(MatSnackBarRef<SnackbarTemplateComponent>);\n\n getIcon(): string {\n switch (this.data.type) {\n case 'success':\n return 'check_circle';\n case 'error':\n return 'error';\n case 'warning':\n return 'warning';\n case 'info':\n return 'info';\n default:\n return 'notifications';\n }\n }\n\n getIconAriaLabel(): string {\n switch (this.data.type) {\n case 'success':\n return 'Success';\n case 'error':\n return 'Error';\n case 'warning':\n return 'Warning';\n case 'info':\n return 'Information';\n default:\n return 'Notification';\n }\n }\n\n dismiss(): void {\n this.snackBarRef.dismissWithAction();\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { MatSnackBar, MatSnackBarRef } 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';\nimport {\n SnackbarTemplateComponent,\n SnackbarTemplateData,\n} from '../components/snackbar-template/snackbar-template.component';\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 // Build accessibility announcement message\n const announcementMessage = this.buildAnnouncementMessage(type, message, title);\n\n const finalConfig = {\n ...this.config,\n ...userConfig,\n panelClass: panelClasses,\n announcementMessage,\n // Set appropriate politeness based on type\n politeness: this.getPolitenessLevel(type),\n };\n\n let snackBarRef: MatSnackBarRef<any>;\n\n // Determine if we should use the custom component\n // Always use custom component to maintain title/message structure and other features\n const useCustomComponent =\n title || // Always use custom component if there's a title\n userConfig.showCloseIcon === true ||\n this.config.showCloseIcon !== false ||\n userConfig.progressBarEnabled === true ||\n this.config.progressBarEnabled !== false;\n\n if (useCustomComponent) {\n const snackbarData: SnackbarTemplateData = {\n message,\n title,\n type,\n action,\n showIcon: userConfig.iconEnabled ?? this.config.iconEnabled,\n showCloseIcon: userConfig.showCloseIcon ?? this.config.showCloseIcon,\n showProgressBar: userConfig.progressBarEnabled ?? this.config.progressBarEnabled,\n duration: finalConfig.duration || 0,\n };\n\n snackBarRef = this.snackBar.openFromComponent(SnackbarTemplateComponent, {\n ...finalConfig,\n data: snackbarData,\n });\n } else {\n // Fallback to simple text snackbar\n const displayMessage = this.buildMessage(message, title);\n snackBarRef = this.snackBar.open(displayMessage, action, finalConfig);\n }\n\n // Handle action clicks if needed\n if (action && snackBarRef) {\n snackBarRef.onAction().subscribe(() => {\n // Action was clicked - can be extended for custom behavior\n snackBarRef.dismiss();\n });\n }\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 /**\n * Build accessibility announcement message based on type and content\n */\n private buildAnnouncementMessage(type: string, message: string, title?: string): string {\n const typeLabel = this.getTypeLabel(type);\n const fullMessage = title ? `${title}: ${message}` : message;\n return `${typeLabel}. ${fullMessage}`;\n }\n\n /**\n * Get appropriate ARIA politeness level based on notification type\n */\n private getPolitenessLevel(type: string): 'off' | 'polite' | 'assertive' {\n switch (type) {\n case 'error':\n return 'assertive'; // Errors should interrupt\n case 'warning':\n return 'assertive'; // Warnings should interrupt\n case 'success':\n case 'info':\n default:\n return 'polite'; // Success and info can wait\n }\n }\n\n /**\n * Get human-readable type label for accessibility\n */\n private getTypeLabel(type: string): string {\n switch (type) {\n case 'success':\n return 'Success';\n case 'error':\n return 'Error';\n case 'warning':\n return 'Warning';\n case 'info':\n return 'Information';\n default:\n return 'Notification';\n }\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,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AAM,qBAAqB,GAA0B;AACnD,IAAA,aAAa,EAAE,qBAAqB;AACpC,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,iBAAiB,EAAE,IAAI;AACvB,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,cAAc,EAAE,gBAAgB;CACjC;AAEK,SAAU,oBAAoB,CAClC,MAA4C,EAC5C,YAAoC,EAAA;AAEpC,IAAA,OAAO,wBAAwB,CAAC;AAC9B,QAAA,aAAa,CAAC;AACZ,YAAA,GAAG,qBAAqB;YACxB,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acontplus/ng-notifications",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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
6
  "@acontplus/ui-kit": "^1.0.2",
@@ -0,0 +1,2 @@
1
+ // Export all notification styles
2
+ @import './snackbar-themes.scss';
@@ -0,0 +1,299 @@
1
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
2
+ border-radius: 8px !important;
3
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
4
+ font-family: inherit !important;
5
+ min-width: 300px !important;
6
+ position: relative !important;
7
+ overflow: hidden !important;
8
+
9
+ .mdc-snackbar__surface {
10
+ border-radius: 8px !important;
11
+ min-width: 300px !important;
12
+ position: relative !important;
13
+ overflow: hidden !important;
14
+ }
15
+ }
16
+
17
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar {
18
+ border-radius: 8px !important;
19
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
20
+ font-family: inherit !important;
21
+ min-width: 300px !important;
22
+ position: relative !important;
23
+ overflow: hidden !important;
24
+ }
25
+
26
+ .cdk-overlay-container .acontplus-snackbar .mat-mdc-snack-bar-container {
27
+ border-radius: 8px !important;
28
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
29
+ font-family: inherit !important;
30
+ min-width: 300px !important;
31
+ position: relative !important;
32
+ overflow: hidden !important;
33
+ }
34
+
35
+ /* Success Snackbar - Maximum specificity */
36
+ .cdk-overlay-container
37
+ .cdk-overlay-pane
38
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-success {
39
+ background-color: #4caf50 !important;
40
+ color: white !important;
41
+
42
+ .mdc-snackbar__surface {
43
+ background-color: #4caf50 !important;
44
+ color: white !important;
45
+ }
46
+
47
+ .mdc-snackbar__label,
48
+ .mat-mdc-snack-bar-label {
49
+ color: white !important;
50
+ }
51
+
52
+ .snackbar-action,
53
+ .mat-mdc-snack-bar-action,
54
+ .mat-mdc-button {
55
+ color: rgba(255, 255, 255, 0.9) !important;
56
+
57
+ &:hover {
58
+ background-color: rgba(255, 255, 255, 0.1) !important;
59
+ }
60
+ }
61
+ }
62
+
63
+ /* Error Snackbar - Maximum specificity */
64
+ .cdk-overlay-container
65
+ .cdk-overlay-pane
66
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-error {
67
+ background-color: #f44336 !important;
68
+ color: white !important;
69
+
70
+ .mdc-snackbar__surface {
71
+ background-color: #f44336 !important;
72
+ color: white !important;
73
+ }
74
+
75
+ .mdc-snackbar__label,
76
+ .mat-mdc-snack-bar-label {
77
+ color: white !important;
78
+ }
79
+
80
+ .snackbar-action,
81
+ .mat-mdc-snack-bar-action,
82
+ .mat-mdc-button {
83
+ color: rgba(255, 255, 255, 0.9) !important;
84
+
85
+ &:hover {
86
+ background-color: rgba(255, 255, 255, 0.1) !important;
87
+ }
88
+ }
89
+ }
90
+
91
+ /* Warning Snackbar - Maximum specificity */
92
+ .cdk-overlay-container
93
+ .cdk-overlay-pane
94
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-warning {
95
+ background-color: #ff9800 !important;
96
+ color: white !important;
97
+
98
+ .mdc-snackbar__surface {
99
+ background-color: #ff9800 !important;
100
+ color: white !important;
101
+ }
102
+
103
+ .mdc-snackbar__label,
104
+ .mat-mdc-snack-bar-label {
105
+ color: white !important;
106
+ }
107
+
108
+ .snackbar-action,
109
+ .mat-mdc-snack-bar-action,
110
+ .mat-mdc-button {
111
+ color: rgba(255, 255, 255, 0.9) !important;
112
+
113
+ &:hover {
114
+ background-color: rgba(255, 255, 255, 0.1) !important;
115
+ }
116
+ }
117
+ }
118
+
119
+ /* Info Snackbar - Maximum specificity */
120
+ .cdk-overlay-container
121
+ .cdk-overlay-pane
122
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-info {
123
+ background-color: #2196f3 !important;
124
+ color: white !important;
125
+
126
+ .mdc-snackbar__surface {
127
+ background-color: #2196f3 !important;
128
+ color: white !important;
129
+ }
130
+
131
+ .mdc-snackbar__label,
132
+ .mat-mdc-snack-bar-label {
133
+ color: white !important;
134
+ }
135
+
136
+ .snackbar-action,
137
+ .mat-mdc-snack-bar-action,
138
+ .mat-mdc-button {
139
+ color: rgba(255, 255, 255, 0.9) !important;
140
+
141
+ &:hover {
142
+ background-color: rgba(255, 255, 255, 0.1) !important;
143
+ }
144
+ }
145
+ }
146
+
147
+ /* Ensure icon colors are visible with maximum specificity */
148
+ .cdk-overlay-container
149
+ .cdk-overlay-pane
150
+ .mat-mdc-snack-bar-container.acontplus-snackbar-success
151
+ .snackbar-icon
152
+ mat-icon {
153
+ color: rgba(255, 255, 255, 0.9) !important;
154
+ }
155
+
156
+ .cdk-overlay-container
157
+ .cdk-overlay-pane
158
+ .mat-mdc-snack-bar-container.acontplus-snackbar-error
159
+ .snackbar-icon
160
+ mat-icon {
161
+ color: rgba(255, 255, 255, 0.9) !important;
162
+ }
163
+
164
+ .cdk-overlay-container
165
+ .cdk-overlay-pane
166
+ .mat-mdc-snack-bar-container.acontplus-snackbar-warning
167
+ .snackbar-icon
168
+ mat-icon {
169
+ color: rgba(255, 255, 255, 0.9) !important;
170
+ }
171
+
172
+ .cdk-overlay-container
173
+ .cdk-overlay-pane
174
+ .mat-mdc-snack-bar-container.acontplus-snackbar-info
175
+ .snackbar-icon
176
+ mat-icon {
177
+ color: rgba(255, 255, 255, 0.9) !important;
178
+ }
179
+
180
+ /* Dark theme support with maximum specificity */
181
+ @media (prefers-color-scheme: dark) {
182
+ .cdk-overlay-container
183
+ .cdk-overlay-pane
184
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-success {
185
+ background-color: #388e3c !important;
186
+
187
+ .mdc-snackbar__surface {
188
+ background-color: #388e3c !important;
189
+ }
190
+ }
191
+
192
+ .cdk-overlay-container
193
+ .cdk-overlay-pane
194
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-error {
195
+ background-color: #d32f2f !important;
196
+
197
+ .mdc-snackbar__surface {
198
+ background-color: #d32f2f !important;
199
+ }
200
+ }
201
+
202
+ .cdk-overlay-container
203
+ .cdk-overlay-pane
204
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-warning {
205
+ background-color: #f57c00 !important;
206
+
207
+ .mdc-snackbar__surface {
208
+ background-color: #f57c00 !important;
209
+ }
210
+ }
211
+
212
+ .cdk-overlay-container
213
+ .cdk-overlay-pane
214
+ .mat-mdc-snack-bar-container.acontplus-snackbar.acontplus-snackbar-info {
215
+ background-color: #1976d2 !important;
216
+
217
+ .mdc-snackbar__surface {
218
+ background-color: #1976d2 !important;
219
+ }
220
+ }
221
+ }
222
+
223
+ /* High contrast mode support */
224
+ @media (prefers-contrast: high) {
225
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
226
+ border: 2px solid currentColor !important;
227
+ }
228
+ }
229
+
230
+ /* Reduced motion support */
231
+ @media (prefers-reduced-motion: reduce) {
232
+ .cdk-overlay-container .cdk-overlay-pane .mat-mdc-snack-bar-container.acontplus-snackbar {
233
+ transition: none !important;
234
+ }
235
+ }
236
+
237
+ /* Additional fallback rules for broader compatibility */
238
+
239
+ /* Success - Additional selectors */
240
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-success {
241
+ background-color: #4caf50 !important;
242
+ color: white !important;
243
+ }
244
+
245
+ .cdk-overlay-container .acontplus-snackbar-success .mat-mdc-snack-bar-container {
246
+ background-color: #4caf50 !important;
247
+ color: white !important;
248
+ }
249
+
250
+ /* Error - Additional selectors */
251
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-error {
252
+ background-color: #f44336 !important;
253
+ color: white !important;
254
+ }
255
+
256
+ .cdk-overlay-container .acontplus-snackbar-error .mat-mdc-snack-bar-container {
257
+ background-color: #f44336 !important;
258
+ color: white !important;
259
+ }
260
+
261
+ /* Warning - Additional selectors */
262
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-warning {
263
+ background-color: #ff9800 !important;
264
+ color: white !important;
265
+ }
266
+
267
+ .cdk-overlay-container .acontplus-snackbar-warning .mat-mdc-snack-bar-container {
268
+ background-color: #ff9800 !important;
269
+ color: white !important;
270
+ }
271
+
272
+ /* Info - Additional selectors */
273
+ .cdk-overlay-container .mat-mdc-snack-bar-container.acontplus-snackbar-info {
274
+ background-color: #2196f3 !important;
275
+ color: white !important;
276
+ }
277
+
278
+ .cdk-overlay-container .acontplus-snackbar-info .mat-mdc-snack-bar-container {
279
+ background-color: #2196f3 !important;
280
+ color: white !important;
281
+ }
282
+
283
+ /* Force override any Material theme colors */
284
+ .cdk-overlay-container [class*='acontplus-snackbar-'] {
285
+ .mat-mdc-snack-bar-container {
286
+ background: inherit !important;
287
+ color: inherit !important;
288
+ }
289
+
290
+ .mdc-snackbar__surface {
291
+ background: inherit !important;
292
+ color: inherit !important;
293
+ }
294
+
295
+ .mdc-snackbar__label,
296
+ .mat-mdc-snack-bar-label {
297
+ color: inherit !important;
298
+ }
299
+ }
@@ -24,6 +24,9 @@ interface SnackbarConfig extends MatSnackBarConfig {
24
24
  readonly defaultAction?: string;
25
25
  readonly iconEnabled?: boolean;
26
26
  readonly titleEnabled?: boolean;
27
+ readonly accessibilityEnabled?: boolean;
28
+ readonly showCloseIcon?: boolean;
29
+ readonly progressBarEnabled?: boolean;
27
30
  }
28
31
  declare const DEFAULT_SNACKBAR_CONFIG: SnackbarConfig;
29
32
  declare const SNACKBAR_CONFIG: InjectionToken<SnackbarConfig>;
@@ -104,6 +107,18 @@ declare class SnackbarProvider extends NotificationProviderBase {
104
107
  confirm(config: SweetAlertConfig): Observable<NotificationResult>;
105
108
  private buildPanelClasses;
106
109
  private buildMessage;
110
+ /**
111
+ * Build accessibility announcement message based on type and content
112
+ */
113
+ private buildAnnouncementMessage;
114
+ /**
115
+ * Get appropriate ARIA politeness level based on notification type
116
+ */
117
+ private getPolitenessLevel;
118
+ /**
119
+ * Get human-readable type label for accessibility
120
+ */
121
+ private getTypeLabel;
107
122
  static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarProvider, never>;
108
123
  static ɵprov: i0.ɵɵInjectableDeclaration<SnackbarProvider>;
109
124
  }
@@ -186,7 +201,27 @@ declare class NotificationService {
186
201
  static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
187
202
  }
188
203
 
204
+ interface SnackbarTemplateData {
205
+ message: string;
206
+ title?: string;
207
+ type: 'success' | 'error' | 'warning' | 'info';
208
+ action?: string;
209
+ showIcon?: boolean;
210
+ showCloseIcon?: boolean;
211
+ showProgressBar?: boolean;
212
+ duration?: number;
213
+ }
214
+ declare class SnackbarTemplateComponent {
215
+ data: SnackbarTemplateData;
216
+ private snackBarRef;
217
+ getIcon(): string;
218
+ getIconAriaLabel(): string;
219
+ dismiss(): void;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<SnackbarTemplateComponent, never>;
221
+ static ɵcmp: i0.ɵɵComponentDeclaration<SnackbarTemplateComponent, "acp-snackbar-template", never, {}, {}, never, never, true, never>;
222
+ }
223
+
189
224
  declare function provideNotifications(config?: Partial<NotificationProviderConfig>, toastrConfig?: Partial<GlobalConfig>): EnvironmentProviders;
190
225
 
191
- export { DEFAULT_SNACKBAR_CONFIG, NOTIFICATION_CONFIG, NotificationProviderBase, NotificationService, SNACKBAR_CONFIG, SnackbarProvider, SweetalertProvider, TOASTR_NOTIFICATION_CONFIG, ToastrProvider, provideNotifications };
192
- export type { NotificationCallProps, NotificationProviderConfig, SnackbarCallProps, SnackbarConfig, SnackbarProps, SweetAlertConfig, ToastrCallProps, ToastrNotificationConfig, ToastrShowProps, ToastrType };
226
+ export { DEFAULT_SNACKBAR_CONFIG, NOTIFICATION_CONFIG, NotificationProviderBase, NotificationService, SNACKBAR_CONFIG, SnackbarProvider, SnackbarTemplateComponent, SweetalertProvider, TOASTR_NOTIFICATION_CONFIG, ToastrProvider, provideNotifications };
227
+ export type { NotificationCallProps, NotificationProviderConfig, SnackbarCallProps, SnackbarConfig, SnackbarProps, SnackbarTemplateData, SweetAlertConfig, ToastrCallProps, ToastrNotificationConfig, ToastrShowProps, ToastrType };