@bravobit/bb-foundation 0.55.6 → 0.57.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.
- package/dialog/index.d.ts +5 -4
- package/elements/index.d.ts +19 -20
- package/fesm2022/bravobit-bb-foundation-auth.mjs +22 -22
- package/fesm2022/bravobit-bb-foundation-collections.mjs +43 -43
- package/fesm2022/bravobit-bb-foundation-dashboard.mjs +25 -25
- package/fesm2022/bravobit-bb-foundation-dialog.mjs +36 -32
- package/fesm2022/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-elements.mjs +117 -127
- package/fesm2022/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-localize.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation-masking.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation-notifications.mjs +16 -29
- package/fesm2022/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-permissions.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-select.mjs +30 -27
- package/fesm2022/bravobit-bb-foundation-select.mjs.map +1 -1
- package/fesm2022/bravobit-bb-foundation-storage.mjs +3 -3
- package/fesm2022/bravobit-bb-foundation-table.mjs +22 -22
- package/fesm2022/bravobit-bb-foundation-tooltip.mjs +10 -10
- package/fesm2022/bravobit-bb-foundation-utils.mjs +16 -16
- package/fesm2022/bravobit-bb-foundation.mjs +21 -21
- package/package.json +9 -13
- package/combobox/index.d.ts +0 -58
- package/fesm2022/bravobit-bb-foundation-combobox.mjs +0 -325
- package/fesm2022/bravobit-bb-foundation-combobox.mjs.map +0 -1
|
@@ -108,10 +108,10 @@ class BaseUrlInterceptor {
|
|
|
108
108
|
}
|
|
109
109
|
return null;
|
|
110
110
|
}
|
|
111
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
112
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
111
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BaseUrlInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
112
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BaseUrlInterceptor });
|
|
113
113
|
}
|
|
114
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BaseUrlInterceptor, decorators: [{
|
|
115
115
|
type: Injectable
|
|
116
116
|
}] });
|
|
117
117
|
|
|
@@ -132,10 +132,10 @@ class ErrorInterceptor {
|
|
|
132
132
|
return throwError(() => error);
|
|
133
133
|
}));
|
|
134
134
|
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
136
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ErrorInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
136
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ErrorInterceptor });
|
|
137
137
|
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: ErrorInterceptor, decorators: [{
|
|
139
139
|
type: Injectable
|
|
140
140
|
}] });
|
|
141
141
|
|
|
@@ -167,11 +167,11 @@ class HttpModule {
|
|
|
167
167
|
]
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
171
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
172
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
170
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HttpModule, deps: [{ token: HttpModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
171
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: HttpModule });
|
|
172
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HttpModule });
|
|
173
173
|
}
|
|
174
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
174
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: HttpModule, decorators: [{
|
|
175
175
|
type: NgModule
|
|
176
176
|
}], ctorParameters: () => [{ type: HttpModule, decorators: [{
|
|
177
177
|
type: Optional
|
|
@@ -683,10 +683,10 @@ class Localize {
|
|
|
683
683
|
// If the parameter is a string fill in the blanks.
|
|
684
684
|
return { token: tokenOrParams, optional: false, dictionary: null, data: {} };
|
|
685
685
|
};
|
|
686
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
687
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
686
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Localize, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
687
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Localize, providedIn: 'root' });
|
|
688
688
|
}
|
|
689
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Localize, decorators: [{
|
|
690
690
|
type: Injectable,
|
|
691
691
|
args: [{
|
|
692
692
|
providedIn: 'root'
|
|
@@ -818,10 +818,10 @@ class BbLocalizeTemplate {
|
|
|
818
818
|
constructor(templateRef) {
|
|
819
819
|
this.templateRef = templateRef;
|
|
820
820
|
}
|
|
821
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
822
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
821
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalizeTemplate, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
822
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: BbLocalizeTemplate, isStandalone: true, selector: "ng-template[bbLocalizeTemplate]", inputs: { name: ["bbLocalizeTemplate", "name"] }, ngImport: i0 });
|
|
823
823
|
}
|
|
824
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
824
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalizeTemplate, decorators: [{
|
|
825
825
|
type: Directive,
|
|
826
826
|
args: [{
|
|
827
827
|
selector: 'ng-template[bbLocalizeTemplate]'
|
|
@@ -898,10 +898,10 @@ class BbLocalizeString {
|
|
|
898
898
|
end.replace(escape, '\\$&')
|
|
899
899
|
];
|
|
900
900
|
}
|
|
901
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
902
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
901
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalizeString, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
902
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: BbLocalizeString, isStandalone: true, selector: "[bb-localize-string]", inputs: { substitutions: "substitutions", value: ["bb-localize-string", "value"] }, host: { classAttribute: "bb-localize-string" }, queries: [{ propertyName: "items", predicate: BbLocalizeTemplate }], ngImport: i0, template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n", styles: [""], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
903
903
|
}
|
|
904
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
904
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalizeString, decorators: [{
|
|
905
905
|
type: Component,
|
|
906
906
|
args: [{ selector: '[bb-localize-string]', changeDetection: ChangeDetectionStrategy.OnPush, host: { 'class': 'bb-localize-string' }, encapsulation: ViewEncapsulation.None, imports: [BbTemplate], template: "@for (component of components; track component) {\n <ng-template [bbTemplate]=\"component\">{{ component }}</ng-template>\n}\n" }]
|
|
907
907
|
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { items: [{
|
|
@@ -946,10 +946,10 @@ class BbLocalize {
|
|
|
946
946
|
// Return the combined params and options.
|
|
947
947
|
return { ...params, ...options };
|
|
948
948
|
}
|
|
949
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
950
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.
|
|
949
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalize, deps: [{ token: Localize, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
950
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: BbLocalize, isStandalone: true, name: "bbLocalize" });
|
|
951
951
|
}
|
|
952
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
952
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbLocalize, decorators: [{
|
|
953
953
|
type: Pipe,
|
|
954
954
|
args: [{
|
|
955
955
|
name: 'bbLocalize'
|
|
@@ -997,15 +997,15 @@ class LocalizeModule {
|
|
|
997
997
|
]
|
|
998
998
|
};
|
|
999
999
|
}
|
|
1000
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
1001
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
1000
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: LocalizeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1001
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: LocalizeModule, imports: [BbLocalize,
|
|
1002
1002
|
BbLocalizeString,
|
|
1003
1003
|
BbLocalizeTemplate], exports: [BbLocalize,
|
|
1004
1004
|
BbLocalizeString,
|
|
1005
1005
|
BbLocalizeTemplate] });
|
|
1006
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
1006
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: LocalizeModule });
|
|
1007
1007
|
}
|
|
1008
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
1008
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: LocalizeModule, decorators: [{
|
|
1009
1009
|
type: NgModule,
|
|
1010
1010
|
args: [{
|
|
1011
1011
|
imports: [
|
|
@@ -105,10 +105,10 @@ class BbInputMask {
|
|
|
105
105
|
}
|
|
106
106
|
// Required so that the template type checker can infer the type of the coerced inputs.
|
|
107
107
|
static ngAcceptInputType_bbInputMask;
|
|
108
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
109
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
108
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbInputMask, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i2.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
109
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: BbInputMask, isStandalone: true, selector: "input[bbInputMask],input[bbCurrencyMask],input[bbDateMask]", inputs: { mask: ["bbInputMask", "mask"] }, host: { listeners: { "input": "onInput($event.target.value)", "blur": "onTouched($event.target.value)" } }, ngImport: i0 });
|
|
110
110
|
}
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbInputMask, decorators: [{
|
|
112
112
|
type: Directive,
|
|
113
113
|
args: [{
|
|
114
114
|
selector: 'input[bbInputMask],input[bbCurrencyMask],input[bbDateMask]'
|
|
@@ -216,10 +216,10 @@ class Masking {
|
|
|
216
216
|
return ['yyyy', 'MM', 'dd'];
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
220
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Masking, deps: [{ token: i1$1.Localize, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
220
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Masking, providedIn: 'root' });
|
|
221
221
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Masking, decorators: [{
|
|
223
223
|
type: Injectable,
|
|
224
224
|
args: [{
|
|
225
225
|
providedIn: 'root'
|
|
@@ -246,10 +246,10 @@ class BbCurrencyMask {
|
|
|
246
246
|
// Required so that the template type checker can infer the type of the coerced inputs.
|
|
247
247
|
static ngAcceptInputType_bbCurrencyMask;
|
|
248
248
|
static ngAcceptInputType_bbCurrencyMaskOptions;
|
|
249
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
250
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbCurrencyMask, deps: [{ token: Masking }, { token: BbInputMask, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
250
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: BbCurrencyMask, isStandalone: true, selector: "input[bbCurrencyMask]", inputs: { currencyCode: ["bbCurrencyMask", "currencyCode"], options: ["bbCurrencyMaskOptions", "options"] }, usesOnChanges: true, ngImport: i0 });
|
|
251
251
|
}
|
|
252
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbCurrencyMask, decorators: [{
|
|
253
253
|
type: Directive,
|
|
254
254
|
args: [{
|
|
255
255
|
selector: 'input[bbCurrencyMask]'
|
|
@@ -282,10 +282,10 @@ class BbDateMask {
|
|
|
282
282
|
// Required so that the template type checker can infer the type of the coerced inputs.
|
|
283
283
|
static ngAcceptInputType_bbDateMask;
|
|
284
284
|
static ngAcceptInputType_bbDateMaskSeparator;
|
|
285
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
286
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
285
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbDateMask, deps: [{ token: Masking }, { token: BbInputMask, self: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
286
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: BbDateMask, isStandalone: true, selector: "input[bbDateMask]", inputs: { format: ["bbDateMask", "format"], separator: ["bbDateMaskSeparator", "separator"] }, usesOnChanges: true, ngImport: i0 });
|
|
287
287
|
}
|
|
288
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
288
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbDateMask, decorators: [{
|
|
289
289
|
type: Directive,
|
|
290
290
|
args: [{
|
|
291
291
|
selector: 'input[bbDateMask]'
|
|
@@ -301,15 +301,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
301
301
|
}] } });
|
|
302
302
|
|
|
303
303
|
class MaskingModule {
|
|
304
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
305
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
304
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MaskingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
305
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MaskingModule, imports: [BbInputMask,
|
|
306
306
|
BbCurrencyMask,
|
|
307
307
|
BbDateMask], exports: [BbInputMask,
|
|
308
308
|
BbCurrencyMask,
|
|
309
309
|
BbDateMask] });
|
|
310
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
310
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MaskingModule });
|
|
311
311
|
}
|
|
312
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
312
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MaskingModule, decorators: [{
|
|
313
313
|
type: NgModule,
|
|
314
314
|
args: [{
|
|
315
315
|
imports: [
|
|
@@ -4,7 +4,6 @@ import { BbLocalize, Localize } from '@bravobit/bb-foundation/localize';
|
|
|
4
4
|
import { BbTemplate } from '@bravobit/bb-foundation/utils';
|
|
5
5
|
import { Platform } from '@angular/cdk/platform';
|
|
6
6
|
import { WINDOW } from '@bravobit/bb-foundation';
|
|
7
|
-
import { trigger, transition, query, style, animate } from '@angular/animations';
|
|
8
7
|
import { AsyncPipe } from '@angular/common';
|
|
9
8
|
import { map } from 'rxjs/operators';
|
|
10
9
|
import { BehaviorSubject } from 'rxjs';
|
|
@@ -100,12 +99,12 @@ class BbNotificationsItem {
|
|
|
100
99
|
}
|
|
101
100
|
return this._window.setTimeout(method, timeout);
|
|
102
101
|
}
|
|
103
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
104
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
102
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbNotificationsItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
103
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: BbNotificationsItem, isStandalone: true, selector: "bb-notifications-item", inputs: { notification: "notification" }, host: { attributes: { "role": "alert" }, properties: { "class": "this.getClass" } }, viewQueries: [{ propertyName: "progressElementRef", first: true, predicate: ["progress"], descendants: true }], ngImport: i0, template: "<div class=\"notification-content-wrapper\">\n <div [style.color]=\"notification?.color\"\n [style.background-color]=\"notification?.backgroundColor\"\n class=\"notification-icon-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 20\"\n class=\"notification-icon\">\n <path\n d=\"M8 20c1.1 0 2-.923 2-2.051H6C6 19.077 6.9 20 8 20Zm6-6.154V8.718c0-3.18-1.6-5.744-4.5-6.462v-.718C9.5.718 8.8 0 8 0S6.5.718 6.5 1.538v.718C3.6 2.974 2 5.538 2 8.718v5.128l-2 2.051v1.026h16v-1.026l-2-2.05Z\">\n </path>\n </svg>\n\n @if (notification?.timeout > 0) {\n <svg class=\"notification-progress-ring\"\n viewBox=\"0 0 40 40\"\n role=\"progressbar\">\n <circle #progress\n [attr.stroke-dasharray]=\"progressStrokeArray\"\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\n [style.stroke]=\"notification?.color\"\n class=\"notification-progress-circle\"\n stroke-width=\"2\"\n fill=\"transparent\"\n r=\"19\"\n cx=\"20\"\n cy=\"20\">\n </circle>\n </svg>\n }\n </div>\n\n <div class=\"notification-content\">\n <ng-template [bbTemplate]=\"notification?.content\">\n @if (notification?.localize) {\n {{ $any(notification?.content) | bbLocalize }}\n } @else {\n {{ notification?.content }}\n }\n </ng-template>\n </div>\n</div>\n\n@if (notification?.actions?.length > 0 || notification?.dismiss) {\n <div class=\"notification-actions\">\n @for (action of notification?.actions; track $index) {\n <button [class.destructive]=\"action?.type === 'cancel'\"\n (click)=\"callActionAndDestroy(notification, action)\"\n type=\"button\"\n class=\"notification-actions-button\">\n <span class=\"notification-actions-button-highlight\">\n @if (notification?.localize) {\n {{ action?.title | bbLocalize }}\n } @else {\n {{ action?.title }}\n }\n </span>\n </button>\n }\n @if (notification?.dismiss) {\n <button (click)=\"notification?.destroy()\"\n class=\"notification-actions-button destructive\"\n type=\"button\">\n <span\n class=\"notification-actions-button-highlight\">{{ notification?.dismissText ?? dismissText }}</span>\n </button>\n }\n </div>\n}\n", styles: [".bb-notifications-item{top:0;left:0;width:100%;display:flex;position:absolute;pointer-events:all;border-radius:.5rem;flex-direction:column;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #00000026;border:1px solid rgb(214.3982142857,218.6677857143,224.1017857143);transition:margin-top .2s cubic-bezier(0,0,.2,1),transform .2s cubic-bezier(0,0,.2,1);animation:bbNotificationItemEnter .2s cubic-bezier(0,0,.2,1) forwards}.bb-notifications-item.leaving{animation:bbNotificationItemLeave .2s cubic-bezier(0,0,.2,1)}.bb-notifications-item.success .notification-icon-wrapper{color:#2dc05d;background-color:#ebfaf0}.bb-notifications-item.success .notification-progress-circle{stroke:#36d068}.bb-notifications-item.error .notification-icon-wrapper{color:#f43e3e;background-color:#feeeee}.bb-notifications-item.error .notification-progress-circle{stroke:#f55656}.bb-notifications-item.warning .notification-icon-wrapper{color:#f1ae00;background-color:#fff8e7}.bb-notifications-item.warning .notification-progress-circle{stroke:#ffbc0b}.bb-notifications-item.info .notification-icon-wrapper{color:#099bf6;background-color:#e9f6fe}.bb-notifications-item.info .notification-progress-circle{stroke:#22a5f7}.bb-notifications-item.custom .notification-icon-wrapper{color:#657385;background-color:#f3f5f6}.bb-notifications-item.custom .notification-progress-circle{stroke:#657385}.notification-content-wrapper{gap:.75rem;display:flex;padding:.75rem;align-items:center}.notification-icon-wrapper{width:2rem;height:2rem;display:flex;-webkit-user-select:none;user-select:none;position:relative;border-radius:50%;align-items:center;justify-content:center;color:#657385;background-color:#f3f5f6}.notification-icon{width:100%;height:100%;padding:.5rem;fill:currentColor}.notification-content{flex:1;font-weight:400;line-height:1.8;font-size:.875rem;color:#121212}.notification-content,.notification-actions-button{font-family:inherit}.notification-actions{display:flex;margin:0 1.5rem;-webkit-user-select:none;user-select:none;border-top:1px solid rgb(243.3589285714,244.5830714286,246.1410714286)}.notification-actions-button{flex:1;border:none;color:#22a5f7;cursor:pointer;font-weight:500;text-align:center;font-size:.875rem;padding:.75rem .125rem;background-color:transparent}.notification-actions-button:hover>.notification-actions-button-highlight,.notification-actions-button:focus>.notification-actions-button-highlight{background-color:#22a5f71a}.notification-actions-button:active>.notification-actions-button-highlight{background-color:#22a5f733}.notification-actions-button.destructive{color:#f55656}.notification-actions-button.destructive:hover>.notification-actions-button-highlight,.notification-actions-button.destructive:focus>.notification-actions-button-highlight{background-color:#f556561a}.notification-actions-button.destructive:active>.notification-actions-button-highlight{background-color:#f5565633}.notification-actions-button-highlight{display:inline-flex;border-radius:.75rem;padding:.25rem .75rem;transition:background-color .2s cubic-bezier(0,0,.2,1)}.notification-progress-ring{inset:0;width:100%;height:100%;position:absolute}.notification-progress-circle{transform:rotate(-90deg);transform-origin:50% 50%;stroke:#657385}@keyframes bbNotificationItemEnter{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}@keyframes bbNotificationItemLeave{to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: BbTemplate, selector: "[bbTemplate]", inputs: ["bbTemplate"] }, { kind: "pipe", type: BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
105
104
|
}
|
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
105
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbNotificationsItem, decorators: [{
|
|
107
106
|
type: Component,
|
|
108
|
-
args: [{ selector: 'bb-notifications-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'role': 'alert' }, imports: [BbLocalize, BbTemplate], template: "<div class=\"notification-content-wrapper\">\n <div [style.color]=\"notification?.color\"\n [style.background-color]=\"notification?.backgroundColor\"\n class=\"notification-icon-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 20\"\n class=\"notification-icon\">\n <path\n d=\"M8 20c1.1 0 2-.923 2-2.051H6C6 19.077 6.9 20 8 20Zm6-6.154V8.718c0-3.18-1.6-5.744-4.5-6.462v-.718C9.5.718 8.8 0 8 0S6.5.718 6.5 1.538v.718C3.6 2.974 2 5.538 2 8.718v5.128l-2 2.051v1.026h16v-1.026l-2-2.05Z\">\n </path>\n </svg>\n\n @if (notification?.timeout > 0) {\n <svg class=\"notification-progress-ring\"\n viewBox=\"0 0 40 40\"\n role=\"progressbar\">\n <circle #progress\n [attr.stroke-dasharray]=\"progressStrokeArray\"\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\n [style.stroke]=\"notification?.color\"\n class=\"notification-progress-circle\"\n stroke-width=\"2\"\n fill=\"transparent\"\n r=\"19\"\n cx=\"20\"\n cy=\"20\">\n </circle>\n </svg>\n }\n </div>\n\n <div class=\"notification-content\">\n <ng-template [bbTemplate]=\"notification?.content\">\n @if (notification?.localize) {\n {{ $any(notification?.content) | bbLocalize }}\n } @else {\n {{ notification?.content }}\n }\n </ng-template>\n </div>\n</div>\n\n@if (notification?.actions?.length > 0 || notification?.dismiss) {\n <div class=\"notification-actions\">\n @for (action of notification?.actions; track $index) {\n <button [class.destructive]=\"action?.type === 'cancel'\"\n (click)=\"callActionAndDestroy(notification, action)\"\n type=\"button\"\n class=\"notification-actions-button\">\n <span class=\"notification-actions-button-highlight\">\n @if (notification?.localize) {\n {{ action?.title | bbLocalize }}\n } @else {\n {{ action?.title }}\n }\n </span>\n </button>\n }\n @if (notification?.dismiss) {\n <button (click)=\"notification?.destroy()\"\n class=\"notification-actions-button destructive\"\n type=\"button\">\n <span\n class=\"notification-actions-button-highlight\">{{ notification?.dismissText ?? dismissText }}</span>\n </button>\n }\n </div>\n}\n", styles: [".bb-notifications-item{top:0;left:0;width:100%;display:flex;position:absolute;pointer-events:all;border-radius:.5rem;flex-direction:column;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #00000026;border:1px solid rgb(214.3982142857,218.6677857143,224.1017857143);transition:margin-top .2s cubic-bezier(0,0,.2,1),transform .2s cubic-bezier(0,0,.2,1)}.bb-notifications-item.success .notification-icon-wrapper{color:#2dc05d;background-color:#ebfaf0}.bb-notifications-item.success .notification-progress-circle{stroke:#36d068}.bb-notifications-item.error .notification-icon-wrapper{color:#f43e3e;background-color:#feeeee}.bb-notifications-item.error .notification-progress-circle{stroke:#f55656}.bb-notifications-item.warning .notification-icon-wrapper{color:#f1ae00;background-color:#fff8e7}.bb-notifications-item.warning .notification-progress-circle{stroke:#ffbc0b}.bb-notifications-item.info .notification-icon-wrapper{color:#099bf6;background-color:#e9f6fe}.bb-notifications-item.info .notification-progress-circle{stroke:#22a5f7}.bb-notifications-item.custom .notification-icon-wrapper{color:#657385;background-color:#f3f5f6}.bb-notifications-item.custom .notification-progress-circle{stroke:#657385}.notification-content-wrapper{gap:.75rem;display:flex;padding:.75rem;align-items:center}.notification-icon-wrapper{width:2rem;height:2rem;display:flex;-webkit-user-select:none;user-select:none;position:relative;border-radius:50%;align-items:center;justify-content:center;color:#657385;background-color:#f3f5f6}.notification-icon{width:100%;height:100%;padding:.5rem;fill:currentColor}.notification-content{flex:1;font-weight:400;line-height:1.8;font-size:.875rem;color:#121212}.notification-content,.notification-actions-button{font-family:inherit}.notification-actions{display:flex;margin:0 1.5rem;-webkit-user-select:none;user-select:none;border-top:1px solid rgb(243.3589285714,244.5830714286,246.1410714286)}.notification-actions-button{flex:1;border:none;color:#22a5f7;cursor:pointer;font-weight:500;text-align:center;font-size:.875rem;padding:.75rem .125rem;background-color:transparent}.notification-actions-button:hover>.notification-actions-button-highlight,.notification-actions-button:focus>.notification-actions-button-highlight{background-color:#22a5f71a}.notification-actions-button:active>.notification-actions-button-highlight{background-color:#22a5f733}.notification-actions-button.destructive{color:#f55656}.notification-actions-button.destructive:hover>.notification-actions-button-highlight,.notification-actions-button.destructive:focus>.notification-actions-button-highlight{background-color:#f556561a}.notification-actions-button.destructive:active>.notification-actions-button-highlight{background-color:#f5565633}.notification-actions-button-highlight{display:inline-flex;border-radius:.75rem;padding:.25rem .75rem;transition:background-color .2s cubic-bezier(0,0,.2,1)}.notification-progress-ring{inset:0;width:100%;height:100%;position:absolute}.notification-progress-circle{transform:rotate(-90deg);transform-origin:50% 50%;stroke:#657385}\n"] }]
|
|
107
|
+
args: [{ selector: 'bb-notifications-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: { 'role': 'alert' }, imports: [BbLocalize, BbTemplate], template: "<div class=\"notification-content-wrapper\">\n <div [style.color]=\"notification?.color\"\n [style.background-color]=\"notification?.backgroundColor\"\n class=\"notification-icon-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 20\"\n class=\"notification-icon\">\n <path\n d=\"M8 20c1.1 0 2-.923 2-2.051H6C6 19.077 6.9 20 8 20Zm6-6.154V8.718c0-3.18-1.6-5.744-4.5-6.462v-.718C9.5.718 8.8 0 8 0S6.5.718 6.5 1.538v.718C3.6 2.974 2 5.538 2 8.718v5.128l-2 2.051v1.026h16v-1.026l-2-2.05Z\">\n </path>\n </svg>\n\n @if (notification?.timeout > 0) {\n <svg class=\"notification-progress-ring\"\n viewBox=\"0 0 40 40\"\n role=\"progressbar\">\n <circle #progress\n [attr.stroke-dasharray]=\"progressStrokeArray\"\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\n [style.stroke]=\"notification?.color\"\n class=\"notification-progress-circle\"\n stroke-width=\"2\"\n fill=\"transparent\"\n r=\"19\"\n cx=\"20\"\n cy=\"20\">\n </circle>\n </svg>\n }\n </div>\n\n <div class=\"notification-content\">\n <ng-template [bbTemplate]=\"notification?.content\">\n @if (notification?.localize) {\n {{ $any(notification?.content) | bbLocalize }}\n } @else {\n {{ notification?.content }}\n }\n </ng-template>\n </div>\n</div>\n\n@if (notification?.actions?.length > 0 || notification?.dismiss) {\n <div class=\"notification-actions\">\n @for (action of notification?.actions; track $index) {\n <button [class.destructive]=\"action?.type === 'cancel'\"\n (click)=\"callActionAndDestroy(notification, action)\"\n type=\"button\"\n class=\"notification-actions-button\">\n <span class=\"notification-actions-button-highlight\">\n @if (notification?.localize) {\n {{ action?.title | bbLocalize }}\n } @else {\n {{ action?.title }}\n }\n </span>\n </button>\n }\n @if (notification?.dismiss) {\n <button (click)=\"notification?.destroy()\"\n class=\"notification-actions-button destructive\"\n type=\"button\">\n <span\n class=\"notification-actions-button-highlight\">{{ notification?.dismissText ?? dismissText }}</span>\n </button>\n }\n </div>\n}\n", styles: [".bb-notifications-item{top:0;left:0;width:100%;display:flex;position:absolute;pointer-events:all;border-radius:.5rem;flex-direction:column;background-color:#fff;box-shadow:0 .375rem .375rem -.375rem #00000026;border:1px solid rgb(214.3982142857,218.6677857143,224.1017857143);transition:margin-top .2s cubic-bezier(0,0,.2,1),transform .2s cubic-bezier(0,0,.2,1);animation:bbNotificationItemEnter .2s cubic-bezier(0,0,.2,1) forwards}.bb-notifications-item.leaving{animation:bbNotificationItemLeave .2s cubic-bezier(0,0,.2,1)}.bb-notifications-item.success .notification-icon-wrapper{color:#2dc05d;background-color:#ebfaf0}.bb-notifications-item.success .notification-progress-circle{stroke:#36d068}.bb-notifications-item.error .notification-icon-wrapper{color:#f43e3e;background-color:#feeeee}.bb-notifications-item.error .notification-progress-circle{stroke:#f55656}.bb-notifications-item.warning .notification-icon-wrapper{color:#f1ae00;background-color:#fff8e7}.bb-notifications-item.warning .notification-progress-circle{stroke:#ffbc0b}.bb-notifications-item.info .notification-icon-wrapper{color:#099bf6;background-color:#e9f6fe}.bb-notifications-item.info .notification-progress-circle{stroke:#22a5f7}.bb-notifications-item.custom .notification-icon-wrapper{color:#657385;background-color:#f3f5f6}.bb-notifications-item.custom .notification-progress-circle{stroke:#657385}.notification-content-wrapper{gap:.75rem;display:flex;padding:.75rem;align-items:center}.notification-icon-wrapper{width:2rem;height:2rem;display:flex;-webkit-user-select:none;user-select:none;position:relative;border-radius:50%;align-items:center;justify-content:center;color:#657385;background-color:#f3f5f6}.notification-icon{width:100%;height:100%;padding:.5rem;fill:currentColor}.notification-content{flex:1;font-weight:400;line-height:1.8;font-size:.875rem;color:#121212}.notification-content,.notification-actions-button{font-family:inherit}.notification-actions{display:flex;margin:0 1.5rem;-webkit-user-select:none;user-select:none;border-top:1px solid rgb(243.3589285714,244.5830714286,246.1410714286)}.notification-actions-button{flex:1;border:none;color:#22a5f7;cursor:pointer;font-weight:500;text-align:center;font-size:.875rem;padding:.75rem .125rem;background-color:transparent}.notification-actions-button:hover>.notification-actions-button-highlight,.notification-actions-button:focus>.notification-actions-button-highlight{background-color:#22a5f71a}.notification-actions-button:active>.notification-actions-button-highlight{background-color:#22a5f733}.notification-actions-button.destructive{color:#f55656}.notification-actions-button.destructive:hover>.notification-actions-button-highlight,.notification-actions-button.destructive:focus>.notification-actions-button-highlight{background-color:#f556561a}.notification-actions-button.destructive:active>.notification-actions-button-highlight{background-color:#f5565633}.notification-actions-button-highlight{display:inline-flex;border-radius:.75rem;padding:.25rem .75rem;transition:background-color .2s cubic-bezier(0,0,.2,1)}.notification-progress-ring{inset:0;width:100%;height:100%;position:absolute}.notification-progress-circle{transform:rotate(-90deg);transform-origin:50% 50%;stroke:#657385}@keyframes bbNotificationItemEnter{0%{opacity:0;transform:translateY(-1rem)}to{opacity:1;transform:none}}@keyframes bbNotificationItemLeave{to{opacity:0}}\n"] }]
|
|
109
108
|
}], propDecorators: { notification: [{
|
|
110
109
|
type: Input
|
|
111
110
|
}], progressElementRef: [{
|
|
@@ -116,18 +115,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
|
|
|
116
115
|
args: ['class']
|
|
117
116
|
}] } });
|
|
118
117
|
|
|
119
|
-
const notificationListAnimation = trigger('notificationListAnimation', [
|
|
120
|
-
transition('* => *', [
|
|
121
|
-
query(':enter', [
|
|
122
|
-
style({ opacity: 0, transform: 'translateY(-1rem)' }),
|
|
123
|
-
animate('250ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 1, transform: 'none' }))
|
|
124
|
-
], { optional: true }),
|
|
125
|
-
query(':leave', [
|
|
126
|
-
animate('250ms cubic-bezier(0, 0, .2, 1)', style({ opacity: 0 }))
|
|
127
|
-
], { optional: true })
|
|
128
|
-
])
|
|
129
|
-
]);
|
|
130
|
-
|
|
131
118
|
class BbNotificationsList {
|
|
132
119
|
// Dependencies.
|
|
133
120
|
_data$ = inject(NOTIFICATIONS_DATA);
|
|
@@ -150,15 +137,15 @@ class BbNotificationsList {
|
|
|
150
137
|
});
|
|
151
138
|
}));
|
|
152
139
|
}
|
|
153
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
154
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.
|
|
140
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbNotificationsList, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
141
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.0", type: BbNotificationsList, isStandalone: true, selector: "bb-notifications-list", host: { attributes: { "role": "list" }, classAttribute: "bb-notifications-list" }, ngImport: i0, template: "@if (data$ | async; as data) {\n <div class=\"notifications-list-wrapper\">\n @for (item of data; track item?.notification?.id) {\n <bb-notifications-item [notification]=\"item?.notification\"\n [style.z-index]=\"item?.notification?.id\"\n [style.margin-top.rem]=\"item?.styles?.offset\"\n [style.transform]=\"item?.styles?.scale\"\n animate.leave=\"leaving\">\n </bb-notifications-item>\n }\n </div>\n}\n", styles: [".bb-notifications-list{inset:0;z-index:1100;display:flex;position:fixed;padding:.75rem;pointer-events:none;align-items:flex-start;justify-content:flex-end}.notifications-list-wrapper{width:100%;gap:.75rem;display:flex;max-width:24rem;position:relative;flex-direction:column}\n"], dependencies: [{ kind: "component", type: BbNotificationsItem, selector: "bb-notifications-item", inputs: ["notification"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
155
142
|
}
|
|
156
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbNotificationsList, decorators: [{
|
|
157
144
|
type: Component,
|
|
158
|
-
args: [{ selector: 'bb-notifications-list',
|
|
145
|
+
args: [{ selector: 'bb-notifications-list', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
159
146
|
'class': 'bb-notifications-list',
|
|
160
147
|
'role': 'list'
|
|
161
|
-
}, imports: [AsyncPipe, BbNotificationsItem], template: "@if (data$ | async; as data) {\n <div
|
|
148
|
+
}, imports: [AsyncPipe, BbNotificationsItem], template: "@if (data$ | async; as data) {\n <div class=\"notifications-list-wrapper\">\n @for (item of data; track item?.notification?.id) {\n <bb-notifications-item [notification]=\"item?.notification\"\n [style.z-index]=\"item?.notification?.id\"\n [style.margin-top.rem]=\"item?.styles?.offset\"\n [style.transform]=\"item?.styles?.scale\"\n animate.leave=\"leaving\">\n </bb-notifications-item>\n }\n </div>\n}\n", styles: [".bb-notifications-list{inset:0;z-index:1100;display:flex;position:fixed;padding:.75rem;pointer-events:none;align-items:flex-start;justify-content:flex-end}.notifications-list-wrapper{width:100%;gap:.75rem;display:flex;max-width:24rem;position:relative;flex-direction:column}\n"] }]
|
|
162
149
|
}] });
|
|
163
150
|
|
|
164
151
|
let nextUniqueId = 0;
|
|
@@ -259,10 +246,10 @@ class Notifications {
|
|
|
259
246
|
// Don't do anything, because it must've failed.
|
|
260
247
|
}
|
|
261
248
|
}
|
|
262
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
263
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
249
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Notifications, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
250
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Notifications, providedIn: 'root' });
|
|
264
251
|
}
|
|
265
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
252
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Notifications, decorators: [{
|
|
266
253
|
type: Injectable,
|
|
267
254
|
args: [{
|
|
268
255
|
providedIn: 'root'
|
|
@@ -284,11 +271,11 @@ class NotificationsModule {
|
|
|
284
271
|
]
|
|
285
272
|
};
|
|
286
273
|
}
|
|
287
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
288
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
289
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
274
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: NotificationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
275
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: NotificationsModule });
|
|
276
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: NotificationsModule });
|
|
290
277
|
}
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
278
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: NotificationsModule, decorators: [{
|
|
292
279
|
type: NgModule
|
|
293
280
|
}] });
|
|
294
281
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravobit-bb-foundation-notifications.mjs","sources":["../../../projects/bb-foundation/notifications/src/lib/notifications.interfaces.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-item/notifications-item.component.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-item/notifications-item.component.html","../../../projects/bb-foundation/notifications/src/lib/notifications.animations.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-list/notifications-list.component.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-list/notifications-list.component.html","../../../projects/bb-foundation/notifications/src/lib/notifications.service.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.config.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.module.ts","../../../projects/bb-foundation/notifications/src/bravobit-bb-foundation-notifications.ts"],"sourcesContent":["import {InjectionToken, TemplateRef} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface Notification {\n content: string | TemplateRef<any>;\n type: NotificationType;\n\n id?: number;\n\n timeout?: number;\n localize?: boolean;\n dismiss?: boolean;\n dismissText?: string;\n actions?: NotificationAction[];\n\n color?: string;\n backgroundColor?: string;\n\n destroy?: () => void;\n}\n\nexport interface NotificationAction {\n title: string;\n callback?: () => any;\n type?: 'default' | 'cancel';\n}\n\nexport enum NotificationType {\n Success = 'success',\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n Custom = 'custom'\n}\n\nexport class NotificationsConfig {\n mode?: 'append' | 'prepend';\n timeout?: number;\n dismiss?: boolean;\n localize?: boolean;\n dismissText?: string;\n}\n\nexport const NOTIFICATIONS_DATA: InjectionToken<Observable<Notification[]>> = new InjectionToken('notifications data');\n\nexport const NOTIFICATIONS_CONFIG: InjectionToken<NotificationsConfig> = new InjectionToken('notifications config');\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, inject, Input, NgZone, OnDestroy, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {Notification, NotificationAction, NotificationsConfig} from '../notifications.interfaces';\nimport {BbLocalize} from '@bravobit/bb-foundation/localize';\nimport {BbTemplate} from '@bravobit/bb-foundation/utils';\nimport {Platform} from '@angular/cdk/platform';\nimport {WINDOW} from '@bravobit/bb-foundation';\n\n@Component({\n selector: 'bb-notifications-item',\n templateUrl: './notifications-item.component.html',\n styleUrls: ['./notifications-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'role': 'alert'},\n imports: [BbLocalize, BbTemplate]\n})\nexport class BbNotificationsItem implements OnInit, OnDestroy {\n\n // Dependencies.\n private readonly _zone: NgZone = inject(NgZone);\n private readonly _platform: Platform = inject(Platform);\n private readonly _changeDetection: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n // Dependencies.\n private readonly _config?: NotificationsConfig = inject(NotificationsConfig, {optional: true});\n private readonly _window?: Window = inject(WINDOW, {optional: true});\n\n // Readonly data.\n readonly dismissText: string = this._config?.dismissText ?? null;\n\n // Inputs.\n @Input() notification: Notification | null = null;\n\n // Elements.\n @ViewChild('progress', {static: false}) progressElementRef: ElementRef<SVGCircleElement>;\n\n // Data.\n private _progress: number = 0;\n private _count: number = 0;\n\n // Helper variables.\n private _steps: number;\n private _speed: number;\n private _timer: number;\n private _startTime: number;\n private _difference: number;\n\n // Data.\n private readonly _radius = 19;\n private readonly _circumference = this._radius * 2 * Math.PI;\n\n @HostBinding('class')\n get getClass() {\n return `bb-notifications-item ${this.notification.type}`;\n }\n\n get progressStrokeArray() {\n const value = Math.floor(this._circumference);\n return `${value}, ${value}`;\n }\n\n get progressStrokeOffset() {\n return Math.floor(this._circumference - this._progress / 100 * this._circumference);\n }\n\n ngOnInit() {\n // Check if the notification timeout is not 0 and the platform is a browser.\n if (this.notification.timeout <= 0 || !this._platform.isBrowser) {\n this.notification.dismiss = true;\n return;\n }\n\n // Start the timeout.\n this.startTimeout();\n }\n\n ngOnDestroy() {\n this._timer && this._window?.clearTimeout?.(this._timer);\n }\n\n callActionAndDestroy(notification: Notification, action: NotificationAction) {\n action?.callback?.();\n notification?.destroy?.();\n }\n\n private startTimeout() {\n this._steps = this.notification.timeout / 10;\n this._speed = this.notification.timeout / this._steps;\n this._startTime = Date.now();\n this._zone.runOutsideAngular(() => this._timer = this.setTimeout(this.instance, this._speed));\n }\n\n private instance = () => {\n this._difference = (Date.now() - this._startTime) - (this._count * this._speed);\n\n if (this._count++ === this._steps) {\n this.notification.destroy();\n }\n\n this._progress += 100 / this._steps;\n this._timer = this.setTimeout(this.instance, this._speed - this._difference);\n this._zone.run(() => this._changeDetection.detectChanges());\n };\n\n private setTimeout(method: () => void, timeout: number) {\n if (!this._window || !this._window.setTimeout) {\n return null;\n }\n\n return this._window.setTimeout(method, timeout);\n }\n\n}\n","<div class=\"notification-content-wrapper\">\n <div [style.color]=\"notification?.color\"\n [style.background-color]=\"notification?.backgroundColor\"\n class=\"notification-icon-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 20\"\n class=\"notification-icon\">\n <path\n d=\"M8 20c1.1 0 2-.923 2-2.051H6C6 19.077 6.9 20 8 20Zm6-6.154V8.718c0-3.18-1.6-5.744-4.5-6.462v-.718C9.5.718 8.8 0 8 0S6.5.718 6.5 1.538v.718C3.6 2.974 2 5.538 2 8.718v5.128l-2 2.051v1.026h16v-1.026l-2-2.05Z\">\n </path>\n </svg>\n\n @if (notification?.timeout > 0) {\n <svg class=\"notification-progress-ring\"\n viewBox=\"0 0 40 40\"\n role=\"progressbar\">\n <circle #progress\n [attr.stroke-dasharray]=\"progressStrokeArray\"\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\n [style.stroke]=\"notification?.color\"\n class=\"notification-progress-circle\"\n stroke-width=\"2\"\n fill=\"transparent\"\n r=\"19\"\n cx=\"20\"\n cy=\"20\">\n </circle>\n </svg>\n }\n </div>\n\n <div class=\"notification-content\">\n <ng-template [bbTemplate]=\"notification?.content\">\n @if (notification?.localize) {\n {{ $any(notification?.content) | bbLocalize }}\n } @else {\n {{ notification?.content }}\n }\n </ng-template>\n </div>\n</div>\n\n@if (notification?.actions?.length > 0 || notification?.dismiss) {\n <div class=\"notification-actions\">\n @for (action of notification?.actions; track $index) {\n <button [class.destructive]=\"action?.type === 'cancel'\"\n (click)=\"callActionAndDestroy(notification, action)\"\n type=\"button\"\n class=\"notification-actions-button\">\n <span class=\"notification-actions-button-highlight\">\n @if (notification?.localize) {\n {{ action?.title | bbLocalize }}\n } @else {\n {{ action?.title }}\n }\n </span>\n </button>\n }\n @if (notification?.dismiss) {\n <button (click)=\"notification?.destroy()\"\n class=\"notification-actions-button destructive\"\n type=\"button\">\n <span\n class=\"notification-actions-button-highlight\">{{ notification?.dismissText ?? dismissText }}</span>\n </button>\n }\n </div>\n}\n","import {animate, query, style, transition, trigger} from '@angular/animations';\n\nexport const notificationListAnimation = trigger('notificationListAnimation', [\n transition('* => *', [\n query(':enter', [\n style({opacity: 0, transform: 'translateY(-1rem)'}),\n animate('250ms cubic-bezier(0, 0, 0.2, 1)', style({opacity: 1, transform: 'none'}))\n ], {optional: true}),\n\n query(':leave', [\n animate('250ms cubic-bezier(0, 0, .2, 1)', style({opacity: 0}))\n ], {optional: true})\n ])\n]);\n","import {ChangeDetectionStrategy, Component, inject, OnInit, ViewEncapsulation} from '@angular/core';\nimport {BbNotificationsItem} from '../notifications-item/notifications-item.component';\nimport {Notification, NOTIFICATIONS_DATA} from '../notifications.interfaces';\nimport {notificationListAnimation} from '../notifications.animations';\nimport {AsyncPipe} from '@angular/common';\nimport {map} from 'rxjs/operators';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'bb-notifications-list',\n templateUrl: './notifications-list.component.html',\n styleUrls: ['./notifications-list.component.scss'],\n animations: [notificationListAnimation],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'bb-notifications-list',\n 'role': 'list'\n },\n imports: [AsyncPipe, BbNotificationsItem]\n})\nexport class BbNotificationsList implements OnInit {\n\n // Dependencies.\n private readonly _data$: Observable<Notification[]> = inject(NOTIFICATIONS_DATA);\n\n // Data.\n data$: Observable<{\n notification?: Notification,\n styles?: { offset?: number, scale?: string }\n }[]>;\n\n ngOnInit() {\n this.setData();\n }\n\n private setData() {\n this.data$ = this._data$.pipe(\n map(notifications => {\n return notifications.map((notification, index) => {\n const scale = Math.max(0.9, 1 - (index * 0.02));\n return {\n notification,\n styles: {\n offset: Math.min(index, 5),\n scale: `scale(${scale})`\n }\n };\n });\n })\n );\n }\n\n}\n","@if (data$ | async; as data) {\n <div [@notificationListAnimation]=\"data?.length\"\n class=\"notifications-list-wrapper\">\n @for (item of data; track item?.notification?.id) {\n <bb-notifications-item [notification]=\"item?.notification\"\n [style.z-index]=\"item?.notification?.id\"\n [style.margin-top.rem]=\"item?.styles?.offset\"\n [style.transform]=\"item?.styles?.scale\">\n </bb-notifications-item>\n }\n </div>\n}\n","import {ApplicationRef, ComponentRef, createComponent, createEnvironmentInjector, EnvironmentInjector, inject, Injectable, TemplateRef, DOCUMENT} from '@angular/core';\nimport {Notification, NotificationAction, NOTIFICATIONS_CONFIG, NOTIFICATIONS_DATA, NotificationsConfig, NotificationType} from './notifications.interfaces';\nimport {BbNotificationsList} from './notifications-list/notifications-list.component';\nimport {Localize} from '@bravobit/bb-foundation/localize';\nimport {Platform} from '@angular/cdk/platform';\nimport {BehaviorSubject} from 'rxjs';\n\nlet nextUniqueId = 0;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Notifications {\n\n // Dependencies.\n private _platform: Platform = inject(Platform);\n private _applicationRef: ApplicationRef = inject(ApplicationRef);\n private _environmentInjector: EnvironmentInjector = inject(EnvironmentInjector);\n private _localize?: Localize = inject(Localize, {optional: true});\n private _config?: NotificationsConfig = inject(NOTIFICATIONS_CONFIG, {optional: true});\n private _document?: Document = inject(DOCUMENT, {optional: true});\n\n // Reference to the list.\n private _componentRef: ComponentRef<BbNotificationsList>;\n\n // The default settings for the notifications.\n private readonly _defaultMode: 'prepend' | 'append' = this._config?.mode ?? 'prepend';\n private readonly _defaultTimeout: number = this._config?.timeout ?? 8_000;\n private readonly _defaultLocalize: boolean = this._config?.localize ?? false;\n private readonly _defaultDismiss: boolean = this._config?.dismiss ?? true;\n private readonly _defaultDismissText: string = this._config?.dismissText ?? 'Dismiss';\n\n // The data containing the notifications.\n private _notifications$ = new BehaviorSubject<Notification[]>([]);\n\n constructor() {\n this.createElement();\n }\n\n success(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Success});\n }\n\n error(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Error});\n }\n\n warn(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Warning});\n }\n\n info(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Info});\n }\n\n create(notification: Notification) {\n const item = this.compose(notification);\n item.destroy = () => this.pull(item);\n return this.push(item);\n }\n\n private push(notification: Notification) {\n // Get the current list.\n const oldList = this._notifications$.getValue();\n\n // Check which mode is activated.\n let newList: Notification[];\n switch (this._defaultMode) {\n case 'append':\n newList = [...oldList, notification];\n break;\n case 'prepend':\n default:\n newList = [notification, ...oldList];\n }\n\n // Push the new notifications.\n this._notifications$.next(newList);\n\n // Return the notification for further use.\n return notification;\n }\n\n private pull(notification: Notification) {\n // Get the current list.\n const newList = this._notifications$\n .getValue()\n .filter(item => item?.id !== notification?.id);\n\n // Push a new list.\n this._notifications$.next(newList);\n }\n\n private compose(notification: Notification) {\n // Attach a random id to the notification.\n notification.id = ++nextUniqueId % 99999;\n\n // Set all properties.\n notification.type = notification?.type ?? NotificationType.Custom;\n notification.content = notification?.content ?? null;\n notification.timeout = notification?.timeout ?? this._defaultTimeout;\n notification.localize = notification?.localize ?? this._defaultLocalize;\n notification.dismiss = notification?.dismiss ?? this._defaultDismiss;\n\n // Dismiss text localization.\n const dismissText = notification.dismissText ?? this._defaultDismissText;\n notification.dismissText = this._defaultLocalize && this._localize\n ? this._localize.translate(dismissText)\n : dismissText;\n\n // Return the composed notification.\n return notification;\n }\n\n private createElement() {\n const environmentInjector = createEnvironmentInjector([\n {provide: NOTIFICATIONS_DATA, useValue: this._notifications$}\n ], this._environmentInjector);\n\n this._componentRef = createComponent(BbNotificationsList, {environmentInjector});\n this._applicationRef.attachView(this._componentRef.hostView);\n\n if (!this._platform.isBrowser) {\n return;\n }\n\n try {\n this._document.body.appendChild(this._componentRef?.location?.nativeElement);\n } catch {\n // Don't do anything, because it must've failed.\n }\n }\n\n}\n","import {NOTIFICATIONS_CONFIG, NotificationsConfig} from './notifications.interfaces';\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nexport function provideNotificationsConfig(config: NotificationsConfig): EnvironmentProviders {\n return makeEnvironmentProviders([\n {provide: NOTIFICATIONS_CONFIG, useValue: config ?? {}}\n ]);\n}\n","import {provideNotificationsConfig} from './notifications.config';\nimport {NotificationsConfig} from './notifications.interfaces';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\n@NgModule()\nexport class NotificationsModule {\n\n static forRoot(config?: NotificationsConfig): ModuleWithProviders<NotificationsModule> {\n return {\n ngModule: NotificationsModule,\n providers: [\n provideNotificationsConfig(config)\n ]\n };\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;IA2BY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;MAQf,mBAAmB,CAAA;AAC5B,IAAA,IAAI;AACJ,IAAA,OAAO;AACP,IAAA,OAAO;AACP,IAAA,QAAQ;AACR,IAAA,WAAW;AACd;MAEY,kBAAkB,GAA+C,IAAI,cAAc,CAAC,oBAAoB;MAExG,oBAAoB,GAAwC,IAAI,cAAc,CAAC,sBAAsB;;MC7BrG,mBAAmB,CAAA;;AAGX,IAAA,KAAK,GAAW,MAAM,CAAC,MAAM,CAAC;AAC9B,IAAA,SAAS,GAAa,MAAM,CAAC,QAAQ,CAAC;AACtC,IAAA,gBAAgB,GAAsB,MAAM,CAAC,iBAAiB,CAAC;;IAG/D,OAAO,GAAyB,MAAM,CAAC,mBAAmB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;IAC7E,OAAO,GAAY,MAAM,CAAC,MAAM,EAAE,EAAC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,mBAAmB,EAAA,CAAA;;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAD/B;;;ACJD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravobit-bb-foundation-notifications.mjs","sources":["../../../projects/bb-foundation/notifications/src/lib/notifications.interfaces.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-item/notifications-item.component.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-item/notifications-item.component.html","../../../projects/bb-foundation/notifications/src/lib/notifications-list/notifications-list.component.ts","../../../projects/bb-foundation/notifications/src/lib/notifications-list/notifications-list.component.html","../../../projects/bb-foundation/notifications/src/lib/notifications.service.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.config.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.module.ts","../../../projects/bb-foundation/notifications/src/bravobit-bb-foundation-notifications.ts"],"sourcesContent":["import {InjectionToken, TemplateRef} from '@angular/core';\nimport {Observable} from 'rxjs';\n\nexport interface Notification {\n content: string | TemplateRef<any>;\n type: NotificationType;\n\n id?: number;\n\n timeout?: number;\n localize?: boolean;\n dismiss?: boolean;\n dismissText?: string;\n actions?: NotificationAction[];\n\n color?: string;\n backgroundColor?: string;\n\n destroy?: () => void;\n}\n\nexport interface NotificationAction {\n title: string;\n callback?: () => any;\n type?: 'default' | 'cancel';\n}\n\nexport enum NotificationType {\n Success = 'success',\n Error = 'error',\n Warning = 'warning',\n Info = 'info',\n Custom = 'custom'\n}\n\nexport class NotificationsConfig {\n mode?: 'append' | 'prepend';\n timeout?: number;\n dismiss?: boolean;\n localize?: boolean;\n dismissText?: string;\n}\n\nexport const NOTIFICATIONS_DATA: InjectionToken<Observable<Notification[]>> = new InjectionToken('notifications data');\n\nexport const NOTIFICATIONS_CONFIG: InjectionToken<NotificationsConfig> = new InjectionToken('notifications config');\n","import {ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, HostBinding, inject, Input, NgZone, OnDestroy, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {Notification, NotificationAction, NotificationsConfig} from '../notifications.interfaces';\nimport {BbLocalize} from '@bravobit/bb-foundation/localize';\nimport {BbTemplate} from '@bravobit/bb-foundation/utils';\nimport {Platform} from '@angular/cdk/platform';\nimport {WINDOW} from '@bravobit/bb-foundation';\n\n@Component({\n selector: 'bb-notifications-item',\n templateUrl: './notifications-item.component.html',\n styleUrls: ['./notifications-item.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {'role': 'alert'},\n imports: [BbLocalize, BbTemplate]\n})\nexport class BbNotificationsItem implements OnInit, OnDestroy {\n\n // Dependencies.\n private readonly _zone: NgZone = inject(NgZone);\n private readonly _platform: Platform = inject(Platform);\n private readonly _changeDetection: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n // Dependencies.\n private readonly _config?: NotificationsConfig = inject(NotificationsConfig, {optional: true});\n private readonly _window?: Window = inject(WINDOW, {optional: true});\n\n // Readonly data.\n readonly dismissText: string = this._config?.dismissText ?? null;\n\n // Inputs.\n @Input() notification: Notification | null = null;\n\n // Elements.\n @ViewChild('progress', {static: false}) progressElementRef: ElementRef<SVGCircleElement>;\n\n // Data.\n private _progress: number = 0;\n private _count: number = 0;\n\n // Helper variables.\n private _steps: number;\n private _speed: number;\n private _timer: number;\n private _startTime: number;\n private _difference: number;\n\n // Data.\n private readonly _radius = 19;\n private readonly _circumference = this._radius * 2 * Math.PI;\n\n @HostBinding('class')\n get getClass() {\n return `bb-notifications-item ${this.notification.type}`;\n }\n\n get progressStrokeArray() {\n const value = Math.floor(this._circumference);\n return `${value}, ${value}`;\n }\n\n get progressStrokeOffset() {\n return Math.floor(this._circumference - this._progress / 100 * this._circumference);\n }\n\n ngOnInit() {\n // Check if the notification timeout is not 0 and the platform is a browser.\n if (this.notification.timeout <= 0 || !this._platform.isBrowser) {\n this.notification.dismiss = true;\n return;\n }\n\n // Start the timeout.\n this.startTimeout();\n }\n\n ngOnDestroy() {\n this._timer && this._window?.clearTimeout?.(this._timer);\n }\n\n callActionAndDestroy(notification: Notification, action: NotificationAction) {\n action?.callback?.();\n notification?.destroy?.();\n }\n\n private startTimeout() {\n this._steps = this.notification.timeout / 10;\n this._speed = this.notification.timeout / this._steps;\n this._startTime = Date.now();\n this._zone.runOutsideAngular(() => this._timer = this.setTimeout(this.instance, this._speed));\n }\n\n private instance = () => {\n this._difference = (Date.now() - this._startTime) - (this._count * this._speed);\n\n if (this._count++ === this._steps) {\n this.notification.destroy();\n }\n\n this._progress += 100 / this._steps;\n this._timer = this.setTimeout(this.instance, this._speed - this._difference);\n this._zone.run(() => this._changeDetection.detectChanges());\n };\n\n private setTimeout(method: () => void, timeout: number) {\n if (!this._window || !this._window.setTimeout) {\n return null;\n }\n\n return this._window.setTimeout(method, timeout);\n }\n\n}\n","<div class=\"notification-content-wrapper\">\n <div [style.color]=\"notification?.color\"\n [style.background-color]=\"notification?.backgroundColor\"\n class=\"notification-icon-wrapper\">\n <svg xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 16 20\"\n class=\"notification-icon\">\n <path\n d=\"M8 20c1.1 0 2-.923 2-2.051H6C6 19.077 6.9 20 8 20Zm6-6.154V8.718c0-3.18-1.6-5.744-4.5-6.462v-.718C9.5.718 8.8 0 8 0S6.5.718 6.5 1.538v.718C3.6 2.974 2 5.538 2 8.718v5.128l-2 2.051v1.026h16v-1.026l-2-2.05Z\">\n </path>\n </svg>\n\n @if (notification?.timeout > 0) {\n <svg class=\"notification-progress-ring\"\n viewBox=\"0 0 40 40\"\n role=\"progressbar\">\n <circle #progress\n [attr.stroke-dasharray]=\"progressStrokeArray\"\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\n [style.stroke]=\"notification?.color\"\n class=\"notification-progress-circle\"\n stroke-width=\"2\"\n fill=\"transparent\"\n r=\"19\"\n cx=\"20\"\n cy=\"20\">\n </circle>\n </svg>\n }\n </div>\n\n <div class=\"notification-content\">\n <ng-template [bbTemplate]=\"notification?.content\">\n @if (notification?.localize) {\n {{ $any(notification?.content) | bbLocalize }}\n } @else {\n {{ notification?.content }}\n }\n </ng-template>\n </div>\n</div>\n\n@if (notification?.actions?.length > 0 || notification?.dismiss) {\n <div class=\"notification-actions\">\n @for (action of notification?.actions; track $index) {\n <button [class.destructive]=\"action?.type === 'cancel'\"\n (click)=\"callActionAndDestroy(notification, action)\"\n type=\"button\"\n class=\"notification-actions-button\">\n <span class=\"notification-actions-button-highlight\">\n @if (notification?.localize) {\n {{ action?.title | bbLocalize }}\n } @else {\n {{ action?.title }}\n }\n </span>\n </button>\n }\n @if (notification?.dismiss) {\n <button (click)=\"notification?.destroy()\"\n class=\"notification-actions-button destructive\"\n type=\"button\">\n <span\n class=\"notification-actions-button-highlight\">{{ notification?.dismissText ?? dismissText }}</span>\n </button>\n }\n </div>\n}\n","import {ChangeDetectionStrategy, Component, inject, OnInit, ViewEncapsulation} from '@angular/core';\nimport {BbNotificationsItem} from '../notifications-item/notifications-item.component';\nimport {Notification, NOTIFICATIONS_DATA} from '../notifications.interfaces';\nimport {AsyncPipe} from '@angular/common';\nimport {map} from 'rxjs/operators';\nimport {Observable} from 'rxjs';\n\n@Component({\n selector: 'bb-notifications-list',\n templateUrl: './notifications-list.component.html',\n styleUrls: ['./notifications-list.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n 'class': 'bb-notifications-list',\n 'role': 'list'\n },\n imports: [AsyncPipe, BbNotificationsItem]\n})\nexport class BbNotificationsList implements OnInit {\n\n // Dependencies.\n private readonly _data$: Observable<Notification[]> = inject(NOTIFICATIONS_DATA);\n\n // Data.\n data$: Observable<{\n notification?: Notification,\n styles?: { offset?: number, scale?: string }\n }[]>;\n\n ngOnInit() {\n this.setData();\n }\n\n private setData() {\n this.data$ = this._data$.pipe(\n map(notifications => {\n return notifications.map((notification, index) => {\n const scale = Math.max(0.9, 1 - (index * 0.02));\n return {\n notification,\n styles: {\n offset: Math.min(index, 5),\n scale: `scale(${scale})`\n }\n };\n });\n })\n );\n }\n\n}\n","@if (data$ | async; as data) {\n <div class=\"notifications-list-wrapper\">\n @for (item of data; track item?.notification?.id) {\n <bb-notifications-item [notification]=\"item?.notification\"\n [style.z-index]=\"item?.notification?.id\"\n [style.margin-top.rem]=\"item?.styles?.offset\"\n [style.transform]=\"item?.styles?.scale\"\n animate.leave=\"leaving\">\n </bb-notifications-item>\n }\n </div>\n}\n","import {ApplicationRef, ComponentRef, createComponent, createEnvironmentInjector, EnvironmentInjector, inject, Injectable, TemplateRef, DOCUMENT} from '@angular/core';\nimport {Notification, NotificationAction, NOTIFICATIONS_CONFIG, NOTIFICATIONS_DATA, NotificationsConfig, NotificationType} from './notifications.interfaces';\nimport {BbNotificationsList} from './notifications-list/notifications-list.component';\nimport {Localize} from '@bravobit/bb-foundation/localize';\nimport {Platform} from '@angular/cdk/platform';\nimport {BehaviorSubject} from 'rxjs';\n\nlet nextUniqueId = 0;\n\n@Injectable({\n providedIn: 'root'\n})\nexport class Notifications {\n\n // Dependencies.\n private _platform: Platform = inject(Platform);\n private _applicationRef: ApplicationRef = inject(ApplicationRef);\n private _environmentInjector: EnvironmentInjector = inject(EnvironmentInjector);\n private _localize?: Localize = inject(Localize, {optional: true});\n private _config?: NotificationsConfig = inject(NOTIFICATIONS_CONFIG, {optional: true});\n private _document?: Document = inject(DOCUMENT, {optional: true});\n\n // Reference to the list.\n private _componentRef: ComponentRef<BbNotificationsList>;\n\n // The default settings for the notifications.\n private readonly _defaultMode: 'prepend' | 'append' = this._config?.mode ?? 'prepend';\n private readonly _defaultTimeout: number = this._config?.timeout ?? 8_000;\n private readonly _defaultLocalize: boolean = this._config?.localize ?? false;\n private readonly _defaultDismiss: boolean = this._config?.dismiss ?? true;\n private readonly _defaultDismissText: string = this._config?.dismissText ?? 'Dismiss';\n\n // The data containing the notifications.\n private _notifications$ = new BehaviorSubject<Notification[]>([]);\n\n constructor() {\n this.createElement();\n }\n\n success(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Success});\n }\n\n error(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Error});\n }\n\n warn(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Warning});\n }\n\n info(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\n return this.create({content, timeout, actions, type: NotificationType.Info});\n }\n\n create(notification: Notification) {\n const item = this.compose(notification);\n item.destroy = () => this.pull(item);\n return this.push(item);\n }\n\n private push(notification: Notification) {\n // Get the current list.\n const oldList = this._notifications$.getValue();\n\n // Check which mode is activated.\n let newList: Notification[];\n switch (this._defaultMode) {\n case 'append':\n newList = [...oldList, notification];\n break;\n case 'prepend':\n default:\n newList = [notification, ...oldList];\n }\n\n // Push the new notifications.\n this._notifications$.next(newList);\n\n // Return the notification for further use.\n return notification;\n }\n\n private pull(notification: Notification) {\n // Get the current list.\n const newList = this._notifications$\n .getValue()\n .filter(item => item?.id !== notification?.id);\n\n // Push a new list.\n this._notifications$.next(newList);\n }\n\n private compose(notification: Notification) {\n // Attach a random id to the notification.\n notification.id = ++nextUniqueId % 99999;\n\n // Set all properties.\n notification.type = notification?.type ?? NotificationType.Custom;\n notification.content = notification?.content ?? null;\n notification.timeout = notification?.timeout ?? this._defaultTimeout;\n notification.localize = notification?.localize ?? this._defaultLocalize;\n notification.dismiss = notification?.dismiss ?? this._defaultDismiss;\n\n // Dismiss text localization.\n const dismissText = notification.dismissText ?? this._defaultDismissText;\n notification.dismissText = this._defaultLocalize && this._localize\n ? this._localize.translate(dismissText)\n : dismissText;\n\n // Return the composed notification.\n return notification;\n }\n\n private createElement() {\n const environmentInjector = createEnvironmentInjector([\n {provide: NOTIFICATIONS_DATA, useValue: this._notifications$}\n ], this._environmentInjector);\n\n this._componentRef = createComponent(BbNotificationsList, {environmentInjector});\n this._applicationRef.attachView(this._componentRef.hostView);\n\n if (!this._platform.isBrowser) {\n return;\n }\n\n try {\n this._document.body.appendChild(this._componentRef?.location?.nativeElement);\n } catch {\n // Don't do anything, because it must've failed.\n }\n }\n\n}\n","import {NOTIFICATIONS_CONFIG, NotificationsConfig} from './notifications.interfaces';\nimport {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nexport function provideNotificationsConfig(config: NotificationsConfig): EnvironmentProviders {\n return makeEnvironmentProviders([\n {provide: NOTIFICATIONS_CONFIG, useValue: config ?? {}}\n ]);\n}\n","import {provideNotificationsConfig} from './notifications.config';\nimport {NotificationsConfig} from './notifications.interfaces';\nimport {ModuleWithProviders, NgModule} from '@angular/core';\n\n@NgModule()\nexport class NotificationsModule {\n\n static forRoot(config?: NotificationsConfig): ModuleWithProviders<NotificationsModule> {\n return {\n ngModule: NotificationsModule,\n providers: [\n provideNotificationsConfig(config)\n ]\n };\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;IA2BY;AAAZ,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACrB,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,GAAA,EAAA,CAAA,CAAA;MAQf,mBAAmB,CAAA;AAC5B,IAAA,IAAI;AACJ,IAAA,OAAO;AACP,IAAA,OAAO;AACP,IAAA,QAAQ;AACR,IAAA,WAAW;AACd;MAEY,kBAAkB,GAA+C,IAAI,cAAc,CAAC,oBAAoB;MAExG,oBAAoB,GAAw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Version: "12.0.0", version: "20.
|
|
124
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.
|
|
123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Permissions, deps: [{ token: PermissionsHandler }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
124
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Permissions, providedIn: 'root' });
|
|
125
125
|
}
|
|
126
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: Permissions, decorators: [{
|
|
127
127
|
type: Injectable,
|
|
128
128
|
args: [{
|
|
129
129
|
providedIn: 'root'
|
|
@@ -199,10 +199,10 @@ class BbPermission {
|
|
|
199
199
|
static ngAcceptInputType_bbPermission;
|
|
200
200
|
static ngAcceptInputType_bbPermissionElse;
|
|
201
201
|
static ngAcceptInputType_bbPermissionMode;
|
|
202
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
203
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.
|
|
202
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbPermission, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
203
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.0", type: BbPermission, isStandalone: true, selector: "ng-template[bbPermission]", inputs: { bbPermission: "bbPermission", bbPermissionElse: "bbPermissionElse", bbPermissionMode: "bbPermissionMode" }, ngImport: i0 });
|
|
204
204
|
}
|
|
205
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: BbPermission, decorators: [{
|
|
206
206
|
type: Directive,
|
|
207
207
|
args: [{
|
|
208
208
|
selector: 'ng-template[bbPermission]'
|
|
@@ -267,11 +267,11 @@ class PermissionsModule {
|
|
|
267
267
|
]
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.
|
|
271
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.
|
|
272
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.
|
|
270
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: PermissionsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
271
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: PermissionsModule, imports: [BbPermission], exports: [BbPermission] });
|
|
272
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: PermissionsModule });
|
|
273
273
|
}
|
|
274
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.
|
|
274
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: PermissionsModule, decorators: [{
|
|
275
275
|
type: NgModule,
|
|
276
276
|
args: [{
|
|
277
277
|
imports: [BbPermission],
|