@acontplus/ng-notifications 2.0.4 → 2.0.5
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.
|
@@ -44,10 +44,10 @@ const SNACKBAR_CONFIG = new InjectionToken('acontplus-snackbar-config', {
|
|
|
44
44
|
|
|
45
45
|
const NOTIFICATION_CONFIG = new InjectionToken('NOTIFICATION_CONFIG');
|
|
46
46
|
class NotificationProviderBase {
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
48
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
47
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationProviderBase, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
48
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationProviderBase });
|
|
49
49
|
}
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationProviderBase, decorators: [{
|
|
51
51
|
type: Injectable
|
|
52
52
|
}] });
|
|
53
53
|
|
|
@@ -98,10 +98,10 @@ class ToastrProvider extends NotificationProviderBase {
|
|
|
98
98
|
const result = confirm(`${config.title || ''}\n${config.message}`);
|
|
99
99
|
return of({ isConfirmed: result });
|
|
100
100
|
}
|
|
101
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
102
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
101
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ToastrProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
102
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ToastrProvider, providedIn: 'root' });
|
|
103
103
|
}
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
104
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ToastrProvider, decorators: [{
|
|
105
105
|
type: Injectable,
|
|
106
106
|
args: [{
|
|
107
107
|
providedIn: 'root',
|
|
@@ -142,8 +142,8 @@ class SnackbarTemplateComponent {
|
|
|
142
142
|
dismiss() {
|
|
143
143
|
this.snackBarRef.dismissWithAction();
|
|
144
144
|
}
|
|
145
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
146
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.
|
|
145
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackbarTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
146
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: SnackbarTemplateComponent, isStandalone: true, selector: "acp-snackbar-template", ngImport: i0, template: `
|
|
147
147
|
<div class="snackbar-content">
|
|
148
148
|
<!-- Icon (configurable) -->
|
|
149
149
|
@if (data.showIcon === true) {
|
|
@@ -184,7 +184,7 @@ class SnackbarTemplateComponent {
|
|
|
184
184
|
}
|
|
185
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
186
|
}
|
|
187
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackbarTemplateComponent, decorators: [{
|
|
188
188
|
type: Component,
|
|
189
189
|
args: [{ selector: 'acp-snackbar-template', standalone: true, imports: [CommonModule, MatIconModule, MatButtonModule], template: `
|
|
190
190
|
<div class="snackbar-content">
|
|
@@ -375,10 +375,10 @@ class SnackbarProvider extends NotificationProviderBase {
|
|
|
375
375
|
return 'Notification';
|
|
376
376
|
}
|
|
377
377
|
}
|
|
378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
379
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
378
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackbarProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
379
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackbarProvider, providedIn: 'root' });
|
|
380
380
|
}
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
381
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SnackbarProvider, decorators: [{
|
|
382
382
|
type: Injectable,
|
|
383
383
|
args: [{
|
|
384
384
|
providedIn: 'root',
|
|
@@ -412,10 +412,10 @@ class ThemeDetector {
|
|
|
412
412
|
getCurrentTheme() {
|
|
413
413
|
return this.themeSubject.value;
|
|
414
414
|
}
|
|
415
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
416
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
415
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeDetector, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
416
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeDetector, providedIn: 'root' });
|
|
417
417
|
}
|
|
418
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
418
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ThemeDetector, decorators: [{
|
|
419
419
|
type: Injectable,
|
|
420
420
|
args: [{
|
|
421
421
|
providedIn: 'root',
|
|
@@ -486,10 +486,10 @@ class SweetalertProvider extends NotificationProviderBase {
|
|
|
486
486
|
value: result.value,
|
|
487
487
|
})));
|
|
488
488
|
}
|
|
489
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
490
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
489
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SweetalertProvider, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
490
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SweetalertProvider, providedIn: 'root' });
|
|
491
491
|
}
|
|
492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
492
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: SweetalertProvider, decorators: [{
|
|
493
493
|
type: Injectable,
|
|
494
494
|
args: [{
|
|
495
495
|
providedIn: 'root',
|
|
@@ -575,10 +575,10 @@ class NotificationService {
|
|
|
575
575
|
title: 'Session Alert',
|
|
576
576
|
});
|
|
577
577
|
}
|
|
578
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.
|
|
579
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.
|
|
578
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
579
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, providedIn: 'root' });
|
|
580
580
|
}
|
|
581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.
|
|
581
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotificationService, decorators: [{
|
|
582
582
|
type: Injectable,
|
|
583
583
|
args: [{
|
|
584
584
|
providedIn: 'root',
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acontplus/ng-notifications",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
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",
|
|
7
7
|
"@angular/common": "^21.0.0",
|
|
8
8
|
"@angular/core": "^21.0.0",
|
|
9
9
|
"@angular/material": "^21.0.0",
|
|
10
|
-
"ngx-toastr": "^
|
|
10
|
+
"ngx-toastr": "^20.0.0",
|
|
11
11
|
"sweetalert2": "^11.26.2",
|
|
12
12
|
"rxjs": "^7.8.2"
|
|
13
13
|
},
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"author": "Ivan Paz <ifer343@gmail.com>",
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"bugs": {
|
|
58
|
-
"url": "https://github.com/
|
|
58
|
+
"url": "https://github.com/acontplus/acontplus-libs/issues"
|
|
59
59
|
},
|
|
60
|
-
"homepage": "https://github.com/
|
|
60
|
+
"homepage": "https://github.com/acontplus/acontplus-libs#readme",
|
|
61
61
|
"repository": {
|
|
62
62
|
"type": "git",
|
|
63
|
-
"url": "git+https://github.com/
|
|
63
|
+
"url": "git+https://github.com/acontplus/acontplus-libs.git"
|
|
64
64
|
},
|
|
65
65
|
"release": {
|
|
66
66
|
"branches": [
|
|
@@ -18,7 +18,7 @@ interface SweetAlertConfig extends BaseNotificationConfig {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
type ToastrNotificationConfig = Partial<IndividualConfig>;
|
|
21
|
-
declare const TOASTR_NOTIFICATION_CONFIG: InjectionToken<Partial<IndividualConfig<
|
|
21
|
+
declare const TOASTR_NOTIFICATION_CONFIG: InjectionToken<Partial<IndividualConfig<unknown>>>;
|
|
22
22
|
|
|
23
23
|
interface SnackbarConfig extends MatSnackBarConfig {
|
|
24
24
|
readonly defaultAction?: string;
|