@bravobit/bb-foundation 0.20.2 → 0.21.1
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/auth/{bravobit-bb-foundation-auth.d.ts → index.d.ts} +0 -0
- package/auth/lib/directives/authenticated.directive.d.ts +1 -1
- package/auth/lib/directives/permission.directive.d.ts +1 -1
- package/auth/lib/directives/role.directive.d.ts +1 -1
- package/collections/{bravobit-bb-foundation-collections.d.ts → index.d.ts} +0 -0
- package/collections/lib/collection.d.ts +6 -6
- package/collections/lib/components/collections-pager/collections-pager.component.d.ts +1 -1
- package/collections/lib/components/collections-viewer/collections-viewer.component.d.ts +1 -1
- package/collections/lib/components/collections.directive.d.ts +4 -4
- package/controls/{bravobit-bb-foundation-controls.d.ts → index.d.ts} +0 -0
- package/controls/lib/checkbox/checkbox/checkbox.component.d.ts +10 -10
- package/controls/lib/checkbox/checkbox-group/checkbox-group.component.d.ts +9 -5
- package/dashboard/{bravobit-bb-foundation-dashboard.d.ts → index.d.ts} +0 -0
- package/dashboard/lib/dashboard/dashboard.component.d.ts +1 -1
- package/dashboard/lib/dashboard-header/dashboard-header.component.d.ts +1 -1
- package/dashboard/lib/dashboard-menu/dashboard-menu.component.d.ts +1 -1
- package/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.d.ts +1 -1
- package/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.d.ts +1 -1
- package/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.d.ts +1 -1
- package/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.d.ts +1 -1
- package/dialog/{bravobit-bb-foundation-dialog.d.ts → index.d.ts} +0 -0
- package/dialog/lib/dialog-actions/dialog-actions.component.d.ts +1 -1
- package/dialog/lib/dialog-confirm/dialog-confirm.component.d.ts +1 -1
- package/dialog/lib/dialog-container/dialog-container.component.d.ts +1 -1
- package/dialog/lib/dialog-header/dialog-header.component.d.ts +1 -1
- package/dialog/lib/dialog-link/dialog-link.component.d.ts +1 -1
- package/dialog/lib/dialog-modal/dialog-modal.component.d.ts +1 -1
- package/dialog/lib/dialog-overlay/dialog-overlay.component.d.ts +1 -1
- package/dialog/lib/dialog.insertion.d.ts +1 -1
- package/elements/{bravobit-bb-foundation-elements.d.ts → index.d.ts} +0 -0
- package/elements/lib/avatar/avatar.component.d.ts +1 -1
- package/elements/lib/button/button.component.d.ts +2 -2
- package/elements/lib/checkbox/checkbox.component.d.ts +1 -1
- package/elements/lib/date-picker/date-picker.component.d.ts +2 -2
- package/elements/lib/directives/addon.directive.d.ts +2 -2
- package/elements/lib/directives/autosize.directive.d.ts +1 -1
- package/elements/lib/directives/focus-trap.directive.d.ts +1 -1
- package/elements/lib/directives/focus.directive.d.ts +1 -1
- package/elements/lib/directives/form-submit.directive.d.ts +1 -1
- package/elements/lib/directives/input.directive.d.ts +2 -2
- package/elements/lib/directives/template.directive.d.ts +1 -1
- package/elements/lib/dropdown/dropdown.component.d.ts +2 -2
- package/elements/lib/file-picker/file-picker.component.d.ts +2 -2
- package/elements/lib/form-control/form-control.component.d.ts +1 -1
- package/elements/lib/form-error/form-error.component.d.ts +1 -1
- package/elements/lib/form-group/form-group.component.d.ts +1 -1
- package/elements/lib/icon/icon.component.d.ts +1 -1
- package/elements/lib/image-picker/image-picker.component.d.ts +1 -1
- package/elements/lib/pipes/file-image.pipe.d.ts +1 -1
- package/elements/lib/pipes/file-size.pipe.d.ts +1 -1
- package/elements/lib/pipes/relative-time.pipe.d.ts +1 -1
- package/elements/lib/spinner/spinner.component.d.ts +1 -1
- package/elements/lib/tag/tag.component.d.ts +1 -1
- package/esm2020/auth/lib/auth.interceptor.mjs +3 -3
- package/esm2020/auth/lib/auth.module.mjs +6 -6
- package/esm2020/auth/lib/auth.service.mjs +5 -5
- package/esm2020/auth/lib/directives/authenticated.directive.mjs +3 -3
- package/esm2020/auth/lib/directives/permission.directive.mjs +3 -3
- package/esm2020/auth/lib/directives/role.directive.mjs +3 -3
- package/esm2020/auth/lib/guards/anonymous.guard.mjs +3 -3
- package/esm2020/auth/lib/guards/authenticated.guard.mjs +3 -3
- package/esm2020/auth/lib/helpers/mapper.helper.mjs +3 -3
- package/esm2020/auth/lib/permissions.service.mjs +3 -3
- package/esm2020/collections/lib/collection.mjs +5 -5
- package/esm2020/collections/lib/collections.module.mjs +5 -5
- package/esm2020/collections/lib/components/collections-pager/collections-pager.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections-viewer/collections-viewer.component.mjs +3 -3
- package/esm2020/collections/lib/components/collections.directive.mjs +12 -12
- package/esm2020/controls/lib/checkbox/checkbox/checkbox.component.mjs +6 -6
- package/esm2020/controls/lib/checkbox/checkbox-group/checkbox-group.component.mjs +19 -6
- package/esm2020/controls/lib/checkbox/checkbox.module.mjs +5 -5
- package/esm2020/controls/lib/controls.module.mjs +5 -5
- package/esm2020/dashboard/lib/dashboard/dashboard.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-header/dashboard-header.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu/dashboard-menu.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-menu-item/dashboard-menu-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar/dashboard-sidebar.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard-sidebar-group/dashboard-sidebar-group.component.mjs +5 -5
- package/esm2020/dashboard/lib/dashboard-sidebar-item/dashboard-sidebar-item.component.mjs +3 -3
- package/esm2020/dashboard/lib/dashboard.module.mjs +5 -5
- package/esm2020/dialog/lib/dialog-actions/dialog-actions.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-confirm/dialog-confirm.component.mjs +8 -8
- package/esm2020/dialog/lib/dialog-container/dialog-container.component.mjs +4 -4
- package/esm2020/dialog/lib/dialog-header/dialog-header.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-link/dialog-link.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-modal/dialog-modal.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog-overlay/dialog-overlay.component.mjs +3 -3
- package/esm2020/dialog/lib/dialog.insertion.mjs +3 -3
- package/esm2020/dialog/lib/dialog.module.mjs +7 -9
- package/esm2020/dialog/lib/dialog.service.mjs +3 -3
- package/esm2020/elements/lib/avatar/avatar.component.mjs +3 -3
- package/esm2020/elements/lib/button/button.component.mjs +6 -6
- package/esm2020/elements/lib/checkbox/checkbox.component.mjs +5 -5
- package/esm2020/elements/lib/date-picker/date-picker.component.mjs +12 -12
- package/esm2020/elements/lib/directives/addon.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/autosize.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/focus-trap.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/focus.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/form-submit.directive.mjs +3 -3
- package/esm2020/elements/lib/directives/input.directive.mjs +6 -6
- package/esm2020/elements/lib/directives/template.directive.mjs +3 -3
- package/esm2020/elements/lib/dropdown/dropdown.component.mjs +7 -7
- package/esm2020/elements/lib/elements.module.mjs +5 -5
- package/esm2020/elements/lib/file-picker/file-picker.component.mjs +10 -10
- package/esm2020/elements/lib/form-control/form-control.component.mjs +6 -6
- package/esm2020/elements/lib/form-error/form-error.component.mjs +3 -3
- package/esm2020/elements/lib/form-group/form-group.component.mjs +3 -3
- package/esm2020/elements/lib/icon/icon.component.mjs +3 -3
- package/esm2020/elements/lib/image-picker/image-picker.component.mjs +5 -5
- package/esm2020/elements/lib/pipes/file-image.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/file-size.pipe.mjs +3 -3
- package/esm2020/elements/lib/pipes/relative-time.pipe.mjs +3 -3
- package/esm2020/elements/lib/spinner/spinner.component.mjs +3 -3
- package/esm2020/elements/lib/tag/tag.component.mjs +3 -3
- package/esm2020/http/lib/http.module.mjs +5 -5
- package/esm2020/http/lib/interceptors/base-url.interceptor.mjs +3 -3
- package/esm2020/http/lib/interceptors/error.interceptor.mjs +3 -3
- package/esm2020/lib/core/services/clipboard.service.mjs +3 -3
- package/esm2020/lib/core/services/exif.service.mjs +3 -3
- package/esm2020/lib/core/services/file-loader.service.mjs +3 -3
- package/esm2020/lib/core/services/image-converter.service.mjs +3 -3
- package/esm2020/lib/core/services/languages.service.mjs +3 -3
- package/esm2020/lib/core/services/network.service.mjs +3 -3
- package/esm2020/lib/core/services/patch.service.mjs +3 -3
- package/esm2020/lib/core/services/platform.service.mjs +3 -3
- package/esm2020/localize/lib/localize.module.mjs +5 -5
- package/esm2020/localize/lib/localize.pipe.mjs +3 -3
- package/esm2020/localize/lib/localize.service.mjs +9 -7
- package/esm2020/localize/lib/views/localize-string/localize-string.component.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template-or-string.directive.mjs +3 -3
- package/esm2020/localize/lib/views/localize-template.directive.mjs +3 -3
- package/esm2020/masking/bravobit-bb-foundation-masking.mjs +5 -0
- package/esm2020/masking/lib/input-mask.directive.mjs +110 -0
- package/esm2020/masking/lib/input-mask.interface.mjs +2 -0
- package/esm2020/masking/lib/masking.module.mjs +16 -0
- package/esm2020/masking/lib/masking.service.mjs +94 -0
- package/esm2020/masking/public_api.mjs +5 -0
- package/esm2020/notifications/lib/notifications-item/notifications-item.component.mjs +3 -3
- package/esm2020/notifications/lib/notifications-list/notifications-list.component.mjs +6 -6
- package/esm2020/notifications/lib/notifications.module.mjs +5 -5
- package/esm2020/notifications/lib/notifications.service.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha/recaptcha.component.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha-loader.service.mjs +3 -3
- package/esm2020/recaptcha/lib/recaptcha.module.mjs +4 -4
- package/esm2020/storage/lib/storage.service.mjs +8 -8
- package/esm2020/table/lib/components/table/table.component.mjs +14 -14
- package/esm2020/table/lib/components/table-cell/table-cell.component.mjs +3 -3
- package/esm2020/table/lib/components/table-header-cell/table-header-cell.component.mjs +4 -4
- package/esm2020/table/lib/components/table-pager/table-pager.component.mjs +6 -6
- package/esm2020/table/lib/table.module.mjs +5 -5
- package/esm2020/theming/bravobit-bb-foundation-theming.mjs +5 -0
- package/esm2020/theming/lib/themes/checkbox-group.theme.mjs +2 -0
- package/esm2020/theming/lib/themes/checkbox.theme.mjs +2 -0
- package/esm2020/theming/lib/theming.interface.mjs +3 -0
- package/esm2020/theming/lib/theming.module.mjs +38 -0
- package/esm2020/theming/lib/theming.service.mjs +100 -0
- package/esm2020/theming/public_api.mjs +4 -0
- package/fesm2015/bravobit-bb-foundation-auth.mjs +33 -33
- package/fesm2015/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-collections.mjs +26 -26
- package/fesm2015/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-controls.mjs +31 -18
- package/fesm2015/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs +26 -26
- package/fesm2015/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-dialog.mjs +34 -36
- package/fesm2015/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-elements.mjs +143 -143
- package/fesm2015/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-localize.mjs +26 -24
- package/fesm2015/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-masking.mjs +235 -0
- package/fesm2015/bravobit-bb-foundation-masking.mjs.map +1 -0
- package/fesm2015/bravobit-bb-foundation-notifications.mjs +14 -14
- package/fesm2015/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2015/bravobit-bb-foundation-storage.mjs +7 -7
- package/fesm2015/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-table.mjs +27 -27
- package/fesm2015/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2015/bravobit-bb-foundation-theming.mjs +153 -0
- package/fesm2015/bravobit-bb-foundation-theming.mjs.map +1 -0
- package/fesm2015/bravobit-bb-foundation.mjs +24 -24
- package/fesm2020/bravobit-bb-foundation-auth.mjs +33 -33
- package/fesm2020/bravobit-bb-foundation-auth.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-collections.mjs +26 -26
- package/fesm2020/bravobit-bb-foundation-collections.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-controls.mjs +31 -18
- package/fesm2020/bravobit-bb-foundation-controls.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs +26 -26
- package/fesm2020/bravobit-bb-foundation-dashboard.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-dialog.mjs +34 -36
- package/fesm2020/bravobit-bb-foundation-dialog.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-elements.mjs +143 -143
- package/fesm2020/bravobit-bb-foundation-elements.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-http.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-http.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-localize.mjs +24 -22
- package/fesm2020/bravobit-bb-foundation-localize.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-masking.mjs +223 -0
- package/fesm2020/bravobit-bb-foundation-masking.mjs.map +1 -0
- package/fesm2020/bravobit-bb-foundation-notifications.mjs +14 -14
- package/fesm2020/bravobit-bb-foundation-notifications.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-recaptcha.mjs +10 -10
- package/fesm2020/bravobit-bb-foundation-storage.mjs +7 -7
- package/fesm2020/bravobit-bb-foundation-storage.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-table.mjs +27 -27
- package/fesm2020/bravobit-bb-foundation-table.mjs.map +1 -1
- package/fesm2020/bravobit-bb-foundation-theming.mjs +143 -0
- package/fesm2020/bravobit-bb-foundation-theming.mjs.map +1 -0
- package/fesm2020/bravobit-bb-foundation.mjs +24 -24
- package/http/{bravobit-bb-foundation-http.d.ts → index.d.ts} +0 -0
- package/{bravobit-bb-foundation.d.ts → index.d.ts} +0 -0
- package/localize/{bravobit-bb-foundation-localize.d.ts → index.d.ts} +0 -0
- package/localize/lib/localize.pipe.d.ts +1 -1
- package/localize/lib/views/localize-string/localize-string.component.d.ts +1 -1
- package/localize/lib/views/localize-template-or-string.directive.d.ts +1 -1
- package/localize/lib/views/localize-template.directive.d.ts +1 -1
- package/masking/index.d.ts +5 -0
- package/masking/lib/input-mask.directive.d.ts +36 -0
- package/masking/lib/input-mask.interface.d.ts +20 -0
- package/masking/lib/masking.module.d.ts +7 -0
- package/masking/lib/masking.service.d.ts +12 -0
- package/masking/public_api.d.ts +4 -0
- package/notifications/{bravobit-bb-foundation-notifications.d.ts → index.d.ts} +0 -0
- package/notifications/lib/notifications-item/notifications-item.component.d.ts +1 -1
- package/notifications/lib/notifications-list/notifications-list.component.d.ts +1 -1
- package/package.json +36 -19
- package/recaptcha/{bravobit-bb-foundation-recaptcha.d.ts → index.d.ts} +0 -0
- package/recaptcha/lib/recaptcha/recaptcha.component.d.ts +1 -1
- package/rxjs/{bravobit-bb-foundation-rxjs.d.ts → index.d.ts} +0 -0
- package/storage/{bravobit-bb-foundation-storage.d.ts → index.d.ts} +0 -0
- package/table/{bravobit-bb-foundation-table.d.ts → index.d.ts} +0 -0
- package/table/lib/components/table/table.component.d.ts +7 -7
- package/table/lib/components/table-cell/table-cell.component.d.ts +1 -1
- package/table/lib/components/table-header-cell/table-header-cell.component.d.ts +1 -1
- package/table/lib/components/table-pager/table-pager.component.d.ts +1 -1
- package/theming/index.d.ts +5 -0
- package/theming/lib/themes/checkbox-group.theme.d.ts +5 -0
- package/theming/lib/themes/checkbox.theme.d.ts +19 -0
- package/theming/lib/theming.interface.d.ts +14 -0
- package/theming/lib/theming.module.d.ts +13 -0
- package/theming/lib/theming.service.d.ts +24 -0
- package/theming/public_api.d.ts +3 -0
- package/auth/package.json +0 -10
- package/collections/package.json +0 -10
- package/controls/package.json +0 -10
- package/dashboard/package.json +0 -10
- package/dialog/package.json +0 -10
- package/elements/package.json +0 -10
- package/http/package.json +0 -10
- package/localize/package.json +0 -10
- package/notifications/package.json +0 -10
- package/recaptcha/package.json +0 -10
- package/rxjs/package.json +0 -10
- package/storage/package.json +0 -10
- package/table/package.json +0 -10
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Directive, Optional, Self, Input, HostListener, Injectable, NgModule } from '@angular/core';
|
|
3
|
+
import _Inputmask from 'inputmask';
|
|
4
|
+
import * as i1 from '@angular/cdk/platform';
|
|
5
|
+
import * as i2 from '@angular/forms';
|
|
6
|
+
import { formatDate, getCurrencySymbol, getLocaleNumberSymbol, NumberSymbol, getNumberOfCurrencyDigits } from '@angular/common';
|
|
7
|
+
import * as i1$1 from '@bravobit/bb-foundation/localize';
|
|
8
|
+
|
|
9
|
+
const createMask = (options) => typeof options === 'string' ? { mask: options } : options;
|
|
10
|
+
|
|
11
|
+
const InputmaskConstructor = _Inputmask.default || _Inputmask;
|
|
12
|
+
class BbInputMask {
|
|
13
|
+
constructor(_ngZone, _platform, _renderer, _elementRef, _control) {
|
|
14
|
+
this._ngZone = _ngZone;
|
|
15
|
+
this._platform = _platform;
|
|
16
|
+
this._renderer = _renderer;
|
|
17
|
+
this._elementRef = _elementRef;
|
|
18
|
+
this._control = _control;
|
|
19
|
+
// State.
|
|
20
|
+
this.inputMaskPlugin = null;
|
|
21
|
+
this.nativeInputElement = null;
|
|
22
|
+
this._inputMaskOptions = null;
|
|
23
|
+
this._onChange = () => ({});
|
|
24
|
+
this.onInput = (_) => ({});
|
|
25
|
+
this.onTouched = () => ({});
|
|
26
|
+
this.validate = (control) => !control.value || !this.inputMaskPlugin || this.inputMaskPlugin?.isValid()
|
|
27
|
+
? null
|
|
28
|
+
: { inputMask: true };
|
|
29
|
+
this.nativeInputElement = this._elementRef.nativeElement;
|
|
30
|
+
if (this._control != null) {
|
|
31
|
+
this._control.valueAccessor = this;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
set bbInputMask(mask) {
|
|
35
|
+
if (!mask) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this._inputMaskOptions = mask;
|
|
39
|
+
this.updateMask();
|
|
40
|
+
}
|
|
41
|
+
ngOnInit() {
|
|
42
|
+
const control = this._control.control;
|
|
43
|
+
if (!control) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
control.setValidators(control.validator ? [control.validator, this.validate] : [this.validate]);
|
|
47
|
+
control.updateValueAndValidity();
|
|
48
|
+
}
|
|
49
|
+
ngOnDestroy() {
|
|
50
|
+
this.destroyMask();
|
|
51
|
+
}
|
|
52
|
+
writeValue(value) {
|
|
53
|
+
if (!this.nativeInputElement) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
this._renderer.setProperty(this.nativeInputElement, 'value', value ?? '');
|
|
57
|
+
}
|
|
58
|
+
registerOnChange(fn) {
|
|
59
|
+
this._onChange = fn;
|
|
60
|
+
const parser = this._inputMaskOptions?.parser;
|
|
61
|
+
this.onInput = value => this._onChange(parser && value ? parser(value) : value);
|
|
62
|
+
}
|
|
63
|
+
registerOnTouched(fn) {
|
|
64
|
+
this.onTouched = fn;
|
|
65
|
+
}
|
|
66
|
+
setDisabledState(isDisabled) {
|
|
67
|
+
if (!this.nativeInputElement) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
this._renderer.setProperty(this.nativeInputElement, 'disabled', isDisabled);
|
|
71
|
+
}
|
|
72
|
+
updateMask() {
|
|
73
|
+
this.destroyMask();
|
|
74
|
+
this.createMask();
|
|
75
|
+
this.registerOnChange(this._onChange);
|
|
76
|
+
}
|
|
77
|
+
createMask() {
|
|
78
|
+
const element = this._elementRef.nativeElement;
|
|
79
|
+
if (!this._platform.isBrowser || !element || this._inputMaskOptions === null || Object.keys(this._inputMaskOptions).length === 0) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const { parser, ...options } = this._inputMaskOptions;
|
|
83
|
+
this.inputMaskPlugin = this._ngZone.runOutsideAngular(() => new InputmaskConstructor(options).mask(element));
|
|
84
|
+
const control = this._control.control;
|
|
85
|
+
if (!control) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
setTimeout(() => control.updateValueAndValidity());
|
|
89
|
+
}
|
|
90
|
+
destroyMask() {
|
|
91
|
+
this.inputMaskPlugin?.remove();
|
|
92
|
+
this.inputMaskPlugin = null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
BbInputMask.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", 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 });
|
|
96
|
+
BbInputMask.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.3", type: BbInputMask, selector: "input[bbInputMask]", inputs: { bbInputMask: "bbInputMask" }, host: { listeners: { "input": "onInput($event.target.value)", "blur": "onTouched($event.target.value)" } }, ngImport: i0 });
|
|
97
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: BbInputMask, decorators: [{
|
|
98
|
+
type: Directive,
|
|
99
|
+
args: [{
|
|
100
|
+
selector: 'input[bbInputMask]'
|
|
101
|
+
}]
|
|
102
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i1.Platform }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i2.NgControl, decorators: [{
|
|
103
|
+
type: Optional
|
|
104
|
+
}, {
|
|
105
|
+
type: Self
|
|
106
|
+
}] }]; }, propDecorators: { bbInputMask: [{
|
|
107
|
+
type: Input
|
|
108
|
+
}], onInput: [{
|
|
109
|
+
type: HostListener,
|
|
110
|
+
args: ['input', ['$event.target.value']]
|
|
111
|
+
}], onTouched: [{
|
|
112
|
+
type: HostListener,
|
|
113
|
+
args: ['blur', ['$event.target.value']]
|
|
114
|
+
}] } });
|
|
115
|
+
|
|
116
|
+
class Masking {
|
|
117
|
+
constructor(_localize) {
|
|
118
|
+
this._localize = _localize;
|
|
119
|
+
}
|
|
120
|
+
date(format = 2 /* DateMaskFormat.YearMonthDay */, separator = '-') {
|
|
121
|
+
const dateParts = this.getDateParts(format);
|
|
122
|
+
const inputFormat = dateParts.join(separator);
|
|
123
|
+
const outputFormat = 'yyyy-MM-dd';
|
|
124
|
+
const escape = /[.*+?^${}()\/|[\]\\]/g;
|
|
125
|
+
const escapedSeparator = separator.replace(escape, '\\$&');
|
|
126
|
+
const inputFormatRegexString = dateParts
|
|
127
|
+
.map(item => `(?<${item}>[0-9]{${item?.length}})`)
|
|
128
|
+
.join(escapedSeparator);
|
|
129
|
+
const inputFormatRegex = new RegExp(`^${inputFormatRegexString}$`);
|
|
130
|
+
return createMask({
|
|
131
|
+
alias: 'datetime',
|
|
132
|
+
inputFormat: inputFormat.toLowerCase(),
|
|
133
|
+
outputFormat: outputFormat.toLowerCase(),
|
|
134
|
+
nullable: false,
|
|
135
|
+
inputmode: 'numeric',
|
|
136
|
+
onBeforeMask: (initialValue) => {
|
|
137
|
+
return initialValue ? formatDate(initialValue, inputFormat, 'en-US') : null;
|
|
138
|
+
},
|
|
139
|
+
onBeforePaste: (value) => {
|
|
140
|
+
return value;
|
|
141
|
+
},
|
|
142
|
+
parser: (value) => {
|
|
143
|
+
if (!value || typeof value !== 'string' || !inputFormatRegex.test(value)) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
const matches = value.match(inputFormatRegex);
|
|
147
|
+
const year = +matches?.groups?.['yyyy'];
|
|
148
|
+
const month = +matches?.groups?.['MM'] - 1;
|
|
149
|
+
const day = +matches?.groups?.['dd'];
|
|
150
|
+
const date = new Date(year, month, day);
|
|
151
|
+
return date instanceof Date && !isNaN(date)
|
|
152
|
+
? formatDate(date, outputFormat, 'en-US')
|
|
153
|
+
: null;
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
currency(code, options) {
|
|
158
|
+
const locale = this._localize?.current?.locale ?? 'en';
|
|
159
|
+
const symbol = options?.symbol ?? getCurrencySymbol(code, options?.symbolFormat ?? 'narrow', locale);
|
|
160
|
+
const decimal = options?.decimalCharacter ?? getLocaleNumberSymbol(locale, NumberSymbol.CurrencyDecimal);
|
|
161
|
+
const group = options?.groupCharacter ?? getLocaleNumberSymbol(locale, NumberSymbol.CurrencyGroup);
|
|
162
|
+
const digits = options?.digits ?? getNumberOfCurrencyDigits(code);
|
|
163
|
+
const spacer = options?.spacer ?? ' ';
|
|
164
|
+
return createMask({
|
|
165
|
+
alias: 'numeric',
|
|
166
|
+
digits: digits,
|
|
167
|
+
prefix: `${symbol}${spacer}`,
|
|
168
|
+
radixPoint: decimal ?? '.',
|
|
169
|
+
groupSeparator: group ?? ',',
|
|
170
|
+
digitsOptional: options?.digitsOptional ?? false,
|
|
171
|
+
autoUnmask: true,
|
|
172
|
+
unmaskAsNumber: true,
|
|
173
|
+
nullable: false,
|
|
174
|
+
rightAlign: false,
|
|
175
|
+
showMaskOnHover: false,
|
|
176
|
+
showMaskOnFocus: false,
|
|
177
|
+
inputmode: digits > 0 ? 'decimal' : 'numeric'
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
getDateParts(format) {
|
|
181
|
+
switch (format) {
|
|
182
|
+
case 0 /* DateMaskFormat.DayMonthYear */:
|
|
183
|
+
return ['dd', 'MM', 'yyyy'];
|
|
184
|
+
case 1 /* DateMaskFormat.MonthDayYear */:
|
|
185
|
+
return ['MM', 'dd', 'yyyy'];
|
|
186
|
+
case 3 /* DateMaskFormat.YearDayMonth */:
|
|
187
|
+
return ['yyyy', 'dd', 'MM'];
|
|
188
|
+
case 2 /* DateMaskFormat.YearMonthDay */:
|
|
189
|
+
default:
|
|
190
|
+
return ['yyyy', 'MM', 'dd'];
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
Masking.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Masking, deps: [{ token: i1$1.Localize, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
195
|
+
Masking.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Masking, providedIn: 'root' });
|
|
196
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Masking, decorators: [{
|
|
197
|
+
type: Injectable,
|
|
198
|
+
args: [{
|
|
199
|
+
providedIn: 'root'
|
|
200
|
+
}]
|
|
201
|
+
}], ctorParameters: function () { return [{ type: i1$1.Localize, decorators: [{
|
|
202
|
+
type: Optional
|
|
203
|
+
}] }]; } });
|
|
204
|
+
|
|
205
|
+
class MaskingModule {
|
|
206
|
+
}
|
|
207
|
+
MaskingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: MaskingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
208
|
+
MaskingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: MaskingModule, declarations: [BbInputMask], exports: [BbInputMask] });
|
|
209
|
+
MaskingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: MaskingModule });
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: MaskingModule, decorators: [{
|
|
211
|
+
type: NgModule,
|
|
212
|
+
args: [{
|
|
213
|
+
declarations: [BbInputMask],
|
|
214
|
+
exports: [BbInputMask]
|
|
215
|
+
}]
|
|
216
|
+
}] });
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Generated bundle index. Do not edit.
|
|
220
|
+
*/
|
|
221
|
+
|
|
222
|
+
export { BbInputMask, Masking, MaskingModule, createMask };
|
|
223
|
+
//# sourceMappingURL=bravobit-bb-foundation-masking.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bravobit-bb-foundation-masking.mjs","sources":["../../../projects/bb-foundation/masking/src/lib/input-mask.interface.ts","../../../projects/bb-foundation/masking/src/lib/input-mask.directive.ts","../../../projects/bb-foundation/masking/src/lib/masking.service.ts","../../../projects/bb-foundation/masking/src/lib/masking.module.ts","../../../projects/bb-foundation/masking/src/bravobit-bb-foundation-masking.ts"],"sourcesContent":["import type Inputmask from 'inputmask';\r\n\r\nexport type InputMaskOptions<T> = Inputmask.Options & {\r\n parser?: (value: any) => T;\r\n};\r\n\r\nexport type CurrencyMaskOptions = {\r\n symbol: string;\r\n symbolFormat: 'wide' | 'narrow';\r\n spacer: string;\r\n digits: number;\r\n digitsOptional: boolean;\r\n decimalCharacter: string;\r\n groupCharacter: string;\r\n}\r\n\r\nexport const enum DateMaskFormat {\r\n DayMonthYear,\r\n MonthDayYear,\r\n YearMonthDay,\r\n YearDayMonth\r\n}\r\n\r\nexport const createMask = <T>(options: string | InputMaskOptions<T>) => typeof options === 'string' ? {mask: options} : options;","import {Directive, ElementRef, HostListener, Input, NgZone, OnDestroy, OnInit, Optional, Renderer2, Self} from '@angular/core';\r\nimport {AbstractControl, ControlValueAccessor, NgControl, Validator} from '@angular/forms';\r\nimport {InputMaskOptions} from './input-mask.interface';\r\nimport {Platform} from '@angular/cdk/platform';\r\nimport type Inputmask from 'inputmask';\r\nimport _Inputmask from 'inputmask';\r\n\r\nconst InputmaskConstructor = (_Inputmask as unknown as { default?: Inputmask.Static }).default || _Inputmask;\r\n\r\n@Directive({\r\n selector: 'input[bbInputMask]'\r\n})\r\nexport class BbInputMask<T = any> implements OnInit, OnDestroy, ControlValueAccessor, Validator {\r\n\r\n @Input()\r\n set bbInputMask(mask: InputMaskOptions<T> | null | undefined) {\r\n if (!mask) {\r\n return;\r\n }\r\n\r\n this._inputMaskOptions = mask;\r\n this.updateMask();\r\n }\r\n\r\n // State.\r\n inputMaskPlugin: Inputmask.Instance | null = null;\r\n nativeInputElement: HTMLInputElement | null = null;\r\n\r\n private _inputMaskOptions: InputMaskOptions<T> | null = null;\r\n private _onChange: (value: T | null) => void = () => ({});\r\n\r\n constructor(private _ngZone: NgZone,\r\n private _platform: Platform,\r\n private _renderer: Renderer2,\r\n private _elementRef: ElementRef,\r\n @Optional() @Self() private _control?: NgControl) {\r\n this.nativeInputElement = this._elementRef.nativeElement;\r\n if (this._control != null) {\r\n this._control.valueAccessor = this;\r\n }\r\n }\r\n\r\n @HostListener('input', ['$event.target.value'])\r\n onInput: (value: any) => void = (_: any) => ({});\r\n\r\n @HostListener('blur', ['$event.target.value'])\r\n onTouched: () => void = () => ({});\r\n\r\n ngOnInit() {\r\n const control = this._control.control;\r\n if (!control) {\r\n return;\r\n }\r\n\r\n control.setValidators(control.validator ? [control.validator, this.validate] : [this.validate]);\r\n control.updateValueAndValidity();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyMask();\r\n }\r\n\r\n writeValue(value: string) {\r\n if (!this.nativeInputElement) {\r\n return;\r\n }\r\n this._renderer.setProperty(this.nativeInputElement, 'value', value ?? '');\r\n }\r\n\r\n registerOnChange(fn: (value: T | null) => void) {\r\n this._onChange = fn;\r\n const parser = this._inputMaskOptions?.parser;\r\n this.onInput = value => this._onChange(parser && value ? parser(value) : value);\r\n }\r\n\r\n registerOnTouched(fn: () => void) {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean) {\r\n if (!this.nativeInputElement) {\r\n return;\r\n }\r\n this._renderer.setProperty(this.nativeInputElement, 'disabled', isDisabled);\r\n }\r\n\r\n validate = (control: AbstractControl) => !control.value || !this.inputMaskPlugin || this.inputMaskPlugin?.isValid()\r\n ? null\r\n : {inputMask: true};\r\n\r\n private updateMask() {\r\n this.destroyMask();\r\n this.createMask();\r\n this.registerOnChange(this._onChange);\r\n }\r\n\r\n private createMask() {\r\n const element = this._elementRef.nativeElement;\r\n if (!this._platform.isBrowser || !element || this._inputMaskOptions === null || Object.keys(this._inputMaskOptions).length === 0) {\r\n return;\r\n }\r\n\r\n const {parser, ...options} = this._inputMaskOptions;\r\n this.inputMaskPlugin = this._ngZone.runOutsideAngular(() => new InputmaskConstructor(options).mask(element));\r\n\r\n const control = this._control.control;\r\n if (!control) {\r\n return;\r\n }\r\n setTimeout(() => control.updateValueAndValidity());\r\n }\r\n\r\n private destroyMask() {\r\n this.inputMaskPlugin?.remove();\r\n this.inputMaskPlugin = null;\r\n }\r\n\r\n // Required so that the template type checker can infer the type of the coerced inputs.\r\n static ngAcceptInputType_bbInputMask: InputMaskOptions<any> | null | undefined;\r\n\r\n}","import {formatDate, getCurrencySymbol, getLocaleNumberSymbol, getNumberOfCurrencyDigits, NumberSymbol} from '@angular/common';\r\nimport {createMask, CurrencyMaskOptions, DateMaskFormat} from './input-mask.interface';\r\nimport {Localize} from '@bravobit/bb-foundation/localize';\r\nimport {Injectable, Optional} from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class Masking {\r\n\r\n constructor(@Optional() private _localize?: Localize) {\r\n }\r\n\r\n date(format: DateMaskFormat = DateMaskFormat.YearMonthDay, separator: string = '-') {\r\n const dateParts = this.getDateParts(format);\r\n const inputFormat = dateParts.join(separator);\r\n const outputFormat = 'yyyy-MM-dd';\r\n\r\n const escape = /[.*+?^${}()\\/|[\\]\\\\]/g;\r\n const escapedSeparator = separator.replace(escape, '\\\\$&');\r\n\r\n const inputFormatRegexString = dateParts\r\n .map(item => `(?<${item}>[0-9]{${item?.length}})`)\r\n .join(escapedSeparator);\r\n const inputFormatRegex = new RegExp(`^${inputFormatRegexString}$`);\r\n\r\n return createMask({\r\n alias: 'datetime',\r\n inputFormat: inputFormat.toLowerCase(),\r\n outputFormat: outputFormat.toLowerCase(),\r\n nullable: false,\r\n inputmode: 'numeric',\r\n onBeforeMask: (initialValue: string) => {\r\n return initialValue ? formatDate(initialValue, inputFormat, 'en-US') : null;\r\n },\r\n onBeforePaste: (value: string) => {\r\n return value;\r\n },\r\n parser: (value: string) => {\r\n if (!value || typeof value !== 'string' || !inputFormatRegex.test(value)) {\r\n return null;\r\n }\r\n const matches = value.match(inputFormatRegex);\r\n const year = +matches?.groups?.['yyyy'];\r\n const month = +matches?.groups?.['MM'] - 1;\r\n const day = +matches?.groups?.['dd'];\r\n const date = new Date(year, month, day);\r\n\r\n return date instanceof Date && !isNaN(<any>date)\r\n ? formatDate(date, outputFormat, 'en-US')\r\n : null;\r\n }\r\n });\r\n }\r\n\r\n currency(code: string, options?: Partial<CurrencyMaskOptions>) {\r\n const locale = this._localize?.current?.locale ?? 'en';\r\n const symbol = options?.symbol ?? getCurrencySymbol(code, options?.symbolFormat ?? 'narrow', locale);\r\n\r\n const decimal = options?.decimalCharacter ?? getLocaleNumberSymbol(locale, NumberSymbol.CurrencyDecimal);\r\n const group = options?.groupCharacter ?? getLocaleNumberSymbol(locale, NumberSymbol.CurrencyGroup);\r\n const digits = options?.digits ?? getNumberOfCurrencyDigits(code);\r\n const spacer = options?.spacer ?? ' ';\r\n\r\n return createMask({\r\n alias: 'numeric',\r\n digits: digits,\r\n prefix: `${symbol}${spacer}`,\r\n radixPoint: decimal ?? '.',\r\n groupSeparator: group ?? ',',\r\n digitsOptional: options?.digitsOptional ?? false,\r\n autoUnmask: true,\r\n unmaskAsNumber: true,\r\n nullable: false,\r\n rightAlign: false,\r\n showMaskOnHover: false,\r\n showMaskOnFocus: false,\r\n inputmode: digits > 0 ? 'decimal' : 'numeric'\r\n });\r\n }\r\n\r\n private getDateParts(format: DateMaskFormat) {\r\n switch (format) {\r\n case DateMaskFormat.DayMonthYear:\r\n return ['dd', 'MM', 'yyyy'];\r\n case DateMaskFormat.MonthDayYear:\r\n return ['MM', 'dd', 'yyyy'];\r\n case DateMaskFormat.YearDayMonth:\r\n return ['yyyy', 'dd', 'MM'];\r\n case DateMaskFormat.YearMonthDay:\r\n default:\r\n return ['yyyy', 'MM', 'dd'];\r\n }\r\n }\r\n\r\n}\r\n","import {BbInputMask} from './input-mask.directive';\r\nimport {NgModule} from '@angular/core';\r\n\r\n@NgModule({\r\n declarations: [BbInputMask],\r\n exports: [BbInputMask]\r\n})\r\nexport class MaskingModule {\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1"],"mappings":";;;;;;;;AAuBa,MAAA,UAAU,GAAG,CAAI,OAAqC,KAAK,OAAO,OAAO,KAAK,QAAQ,GAAG,EAAC,IAAI,EAAE,OAAO,EAAC,GAAG;;AChBxH,MAAM,oBAAoB,GAAI,UAAwD,CAAC,OAAO,IAAI,UAAU,CAAC;MAKhG,WAAW,CAAA;IAmBpB,WAAoB,CAAA,OAAe,EACf,SAAmB,EACnB,SAAoB,EACpB,WAAuB,EACH,QAAoB,EAAA;QAJxC,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;QACf,IAAS,CAAA,SAAA,GAAT,SAAS,CAAU;QACnB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAW;QACpB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QACH,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAY;;QAV5D,IAAe,CAAA,eAAA,GAA8B,IAAI,CAAC;QAClD,IAAkB,CAAA,kBAAA,GAA4B,IAAI,CAAC;QAE3C,IAAiB,CAAA,iBAAA,GAA+B,IAAI,CAAC;AACrD,QAAA,IAAA,CAAA,SAAS,GAA8B,OAAO,EAAE,CAAC,CAAC;QAc1D,IAAO,CAAA,OAAA,GAAyB,CAAC,CAAM,MAAM,EAAE,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DetectionStrategy, ViewEncapsulation, Input, ViewChild, HostBinding, Injectable, Optional, NgModule } from '@angular/core';
|
|
3
3
|
import { trigger, transition, query, group, style, stagger, animate } from '@angular/animations';
|
|
4
|
-
import * as i1 from '@bravobit/bb-foundation';
|
|
5
4
|
import * as i2 from '@angular/common';
|
|
6
5
|
import { CommonModule } from '@angular/common';
|
|
6
|
+
import * as i1 from '@bravobit/bb-foundation';
|
|
7
7
|
import * as i2$1 from '@bravobit/bb-foundation/localize';
|
|
8
8
|
import { LocalizeModule } from '@bravobit/bb-foundation/localize';
|
|
9
9
|
import { BehaviorSubject } from 'rxjs';
|
|
@@ -132,9 +132,9 @@ class BbNotificationsItem {
|
|
|
132
132
|
this._zone.runOutsideAngular(() => this._timer = this.setTimeout(this.instance, this._speed));
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
|
-
BbNotificationsItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
136
|
-
BbNotificationsItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
137
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
135
|
+
BbNotificationsItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: BbNotificationsItem, deps: [{ token: i0.NgZone }, { token: i1.Platform }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
136
|
+
BbNotificationsItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: BbNotificationsItem, selector: "bb-notifications-item", inputs: { notification: "notification", dismissButtonText: "dismissButtonText" }, 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\">\r\n <!--\r\n The icon for the notification.\r\n\r\n The icon is reflected by the type of the\r\n notification. Same goes for the color and\r\n background-color.\r\n -->\r\n <div [style.color]=\"notification?.color\"\r\n [style.background-color]=\"notification?.backgroundColor\"\r\n class=\"notification-icon-wrapper\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 16 19.5\"\r\n class=\"notification-icon\">\r\n <path\r\n d=\"M8 19.5c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2zM14 13.5v-5c0-3.1-1.6-5.6-4.5-6.3v-.7C9.5.7 8.8 0 8 0S6.5.7 6.5 1.5v.7C3.6 2.9 2 5.4 2 8.5v5l-2 2v1h16v-1l-2-2z\">\r\n </path>\r\n </svg>\r\n\r\n <!--\r\n The circular progress for the notification.\r\n\r\n The progress is only visible when a timeout is\r\n set. The progress adapts to the time remaining\r\n for the notification.\r\n -->\r\n <svg *ngIf=\"notification?.timeout > 0\"\r\n class=\"notification-progress-ring\"\r\n viewBox=\"0 0 40 40\"\r\n role=\"progressbar\">\r\n <circle #progress\r\n [attr.stroke-dasharray]=\"progressStrokeArray\"\r\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\r\n [style.stroke]=\"notification?.color\"\r\n class=\"notification-progress-circle\"\r\n stroke-width=\"2\"\r\n fill=\"transparent\"\r\n r=\"19\"\r\n cx=\"20\"\r\n cy=\"20\">\r\n </circle>\r\n </svg>\r\n </div>\r\n\r\n <!--\r\n The content for the notification.\r\n\r\n This displays a string or a template based\r\n on the given parameter by the user.\r\n -->\r\n <div class=\"notification-content\">\r\n <ng-container *ngIf=\"isContentString; else templateContent\"\r\n [ngSwitch]=\"notification?.localize\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ $any(notification?.content) | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ notification?.content }}\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<!--\r\n The actions of the notification.\r\n\r\n All actions are displayed here and are\r\n based on the actions array the user provided.\r\n-->\r\n<div *ngIf=\"notification?.actions?.length > 0 || notification?.dismiss\"\r\n class=\"notification-actions\">\r\n <button *ngFor=\"let action of notification?.actions\"\r\n (click)=\"callActionAndDestroy(notification, action)\"\r\n type=\"button\"\r\n [class.destructive]=\"action?.type === 'cancel'\"\r\n class=\"notification-actions-button\">\r\n <span [ngSwitch]=\"notification?.localize\"\r\n class=\"notification-actions-button-highlight\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ action?.title | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ action?.title }}\r\n </ng-container>\r\n </span>\r\n </button>\r\n <button *ngIf=\"notification?.dismiss\"\r\n (click)=\"notification?.destroy()\"\r\n class=\"notification-actions-button destructive\"\r\n type=\"button\">\r\n <span class=\"notification-actions-button-highlight\">\r\n {{ notification?.dismissText || dismissButtonText }}\r\n </span>\r\n </button>\r\n</div>\r\n\r\n<!--\r\n The outlet for the notification content template ref.\r\n-->\r\n<ng-template #templateContent>\r\n <ng-container *ngTemplateOutlet=\"$any(notification?.content)\"></ng-container>\r\n</ng-template>\r\n", styles: [".bb-notifications-item{display:flex;border-radius:4px;flex-direction:column;background-color:#fff;border:1px solid #d6dbe0}.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{padding:20px;display:flex;align-items:center}.notification-icon-wrapper{width:40px;height:40px;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:10px;fill:currentColor}.notification-content{flex:1;font-size:14px;line-height:1.5;font-weight:500;margin-left:20px;color:#000000d9}.notification-content i{font-style:italic}.notification-content,.notification-actions-button{font-family:inherit}.notification-actions{display:flex;margin:0 20px;-webkit-user-select:none;user-select:none;border-top:1px solid #f3f5f6}.notification-actions-button{flex:1;border:none;color:#22a5f7;cursor:pointer;font-size:14px;font-weight:500;padding:12px 2px;text-align:center;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{padding:4px 12px;border-radius:12px;display:inline-flex;transition:background-color .15s cubic-bezier(0,0,.2,1)}.notification-progress-ring{top:0;left:0;right:0;bottom:0;width:100%;height:100%;position:absolute}.notification-progress-circle{transform:rotate(-90deg);transform-origin:50% 50%;stroke:#657385}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i2.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i2.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "pipe", type: i2$1.BbLocalize, name: "bbLocalize" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: BbNotificationsItem, decorators: [{
|
|
138
138
|
type: Component,
|
|
139
139
|
args: [{ selector: 'bb-notifications-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: {
|
|
140
140
|
'role': 'alert'
|
|
@@ -176,9 +176,9 @@ class BbNotificationsList {
|
|
|
176
176
|
return { vertical: y || null, horizontal: x || null };
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
BbNotificationsList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
180
|
-
BbNotificationsList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
179
|
+
BbNotificationsList.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: BbNotificationsList, deps: [{ token: NotificationsData }], target: i0.ɵɵFactoryTarget.Component });
|
|
180
|
+
BbNotificationsList.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.3", type: BbNotificationsList, selector: "bb-notifications-list", host: { attributes: { "role": "list" }, properties: { "style.justify-content": "this.horizontalPosition", "style.align-items": "this.verticalPosition" }, classAttribute: "bb-notifications-list" }, ngImport: i0, template: "<!--\r\n The notifications list.\r\n\r\n The list provides the animation effect for the\r\n incoming notifications.\r\n-->\r\n<div *ngIf=\"data?.data | async as notifications\"\r\n [@notificationListAnimation]=\"{value: notifications?.length, params: animation}\"\r\n class=\"notifications-list-wrapper\">\r\n <!--\r\n The loop for the notifications.\r\n\r\n All notifications will be displayed here. They\r\n are wrapped within a wrapper which separates them.\r\n -->\r\n <div *ngFor=\"let notification of notifications; trackBy: trackByFn\"\r\n class=\"notifications-item-wrapper\">\r\n <bb-notifications-item [notification]=\"notification\"\r\n [dismissButtonText]=\"data?.dismissText\">\r\n </bb-notifications-item>\r\n </div>\r\n</div>\r\n", styles: [".bb-notifications-list{top:0;left:0;right:0;bottom:0;z-index:1100;padding:10px;display:flex;position:fixed;pointer-events:none}.notifications-list-wrapper{width:100%;display:block;max-width:400px;position:relative}.notifications-item-wrapper{padding:0;margin:0 0 10px;pointer-events:all}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BbNotificationsItem, selector: "bb-notifications-item", inputs: ["notification", "dismissButtonText"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [notificationAnimation], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
181
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: BbNotificationsList, decorators: [{
|
|
182
182
|
type: Component,
|
|
183
183
|
args: [{ selector: 'bb-notifications-list', animations: [notificationAnimation], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, host: {
|
|
184
184
|
'class': 'bb-notifications-list',
|
|
@@ -335,9 +335,9 @@ class Notifications {
|
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
Notifications.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
339
|
-
Notifications.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
338
|
+
Notifications.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Notifications, deps: [{ token: i0.Injector }, { token: i1.Platform }, { token: i0.ApplicationRef }, { token: i2$1.Localize, optional: true }, { token: NotificationsConfig, optional: true }, { token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
339
|
+
Notifications.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Notifications });
|
|
340
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: Notifications, decorators: [{
|
|
341
341
|
type: Injectable
|
|
342
342
|
}], ctorParameters: function () { return [{ type: i0.Injector }, { type: i1.Platform }, { type: i0.ApplicationRef }, { type: i2$1.Localize, decorators: [{
|
|
343
343
|
type: Optional
|
|
@@ -356,10 +356,10 @@ class NotificationsModule {
|
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
|
-
NotificationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
360
|
-
NotificationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "
|
|
361
|
-
NotificationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
359
|
+
NotificationsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: NotificationsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
360
|
+
NotificationsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.3", ngImport: i0, type: NotificationsModule, declarations: [BbNotificationsList, BbNotificationsItem], imports: [CommonModule, LocalizeModule] });
|
|
361
|
+
NotificationsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: NotificationsModule, imports: [CommonModule, LocalizeModule] });
|
|
362
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.3", ngImport: i0, type: NotificationsModule, decorators: [{
|
|
363
363
|
type: NgModule,
|
|
364
364
|
args: [{
|
|
365
365
|
imports: [CommonModule, LocalizeModule],
|
|
@@ -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.animations.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.injector.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.service.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.module.ts","../../../projects/bb-foundation/notifications/src/bravobit-bb-foundation-notifications.ts"],"sourcesContent":["import {TemplateRef} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\n\r\nexport interface Notification {\r\n content: string | TemplateRef<any>;\r\n\r\n id?: string;\r\n\r\n timeout?: number;\r\n localize?: boolean;\r\n dismiss?: boolean;\r\n dismissText?: string;\r\n data?: { [key: string]: any };\r\n type?: NotificationType;\r\n actions?: NotificationAction[];\r\n\r\n color?: string;\r\n backgroundColor?: string;\r\n\r\n destroy?: () => void;\r\n}\r\n\r\nexport interface NotificationAction {\r\n title: string;\r\n callback?: () => any;\r\n type?: 'default' | 'cancel';\r\n}\r\n\r\nexport enum NotificationType {\r\n Success = 'success',\r\n Error = 'error',\r\n Warning = 'warning',\r\n Info = 'info',\r\n Custom = 'custom'\r\n}\r\n\r\nexport class NotificationsConfig {\r\n mode?: 'append' | 'prepend';\r\n position?: NotificationsPosition;\r\n timeout?: number;\r\n dismiss?: boolean;\r\n localize?: boolean;\r\n dismissText?: string;\r\n}\r\n\r\nexport enum NotificationsPosition {\r\n TopRight = 'flex-start|flex-end',\r\n BottomRight = 'flex-end|flex-end',\r\n TopLeft = 'flex-start|flex-start',\r\n BottomLeft = 'flex-end|flex-start'\r\n}\r\n\r\nexport class NotificationsData {\r\n data: Observable<Notification[]>;\r\n dismissText: string;\r\n position: NotificationsPosition;\r\n}\r\n","import {animate, group, query, stagger, style, transition, trigger} from '@angular/animations';\r\n\r\nconst s = '250ms cubic-bezier(0, 0, .2, 1)';\r\nconst l = '400ms cubic-bezier(0, 0, .2, 1)';\r\n\r\nexport const notificationAnimation = trigger('notificationListAnimation', [\r\n transition('* => *', [\r\n query(':enter', group([\r\n // 1. Set the initial state.\r\n style({height: 0, opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)'}),\r\n // 2. Start the animation to show the item.\r\n stagger(0, [\r\n animate(s, style({height: '*'})),\r\n animate(l, style({opacity: 1, transform: 'translateX(0) scale(0.95)'})),\r\n animate(s, style({transform: 'translateX(0) scale(1)'}))\r\n ])\r\n ]), {optional: true}),\r\n\r\n query(':leave', group([\r\n // 1. Set the initial state.\r\n style({height: '*', opacity: 1, transform: 'translateX(0) scale(1)'}),\r\n // 2. Start the animation to hide the item.\r\n stagger(0, [\r\n animate(s, style({transform: 'translateX(0) scale(0.95)'})),\r\n animate(l, style({opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)'})),\r\n animate(s, style({height: 0}))\r\n ])\r\n ]), {optional: true})\r\n ])\r\n]);\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n HostBinding,\r\n Input,\r\n NgZone,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport {Notification, NotificationAction} from '../notifications.interfaces';\r\nimport {Platform} from '@bravobit/bb-foundation';\r\n\r\n@Component({\r\n selector: 'bb-notifications-item',\r\n templateUrl: './notifications-item.component.html',\r\n styleUrls: ['./notifications-item.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n host: {\r\n 'role': 'alert'\r\n }\r\n})\r\nexport class BbNotificationsItem implements OnInit, OnDestroy {\r\n\r\n // Inputs.\r\n @Input() notification: Notification;\r\n @Input() dismissButtonText: string | null;\r\n\r\n // Elements.\r\n @ViewChild('progress') progressElementRef: ElementRef;\r\n\r\n // Data.\r\n private _progress = 0;\r\n private _count = 0;\r\n\r\n // Helper variables.\r\n private _steps: number;\r\n private _speed: number;\r\n private _timer: number;\r\n private _startTime: number;\r\n private _difference: number;\r\n\r\n // Data.\r\n private readonly _radius = 19;\r\n private readonly _circumference = this._radius * 2 * Math.PI;\r\n\r\n @HostBinding('class') get getClass() {\r\n return `bb-notifications-item ${this.notification.type}`;\r\n }\r\n\r\n constructor(private _zone: NgZone,\r\n private _platform: Platform,\r\n private _changeDetection: ChangeDetectorRef) {\r\n }\r\n\r\n get progressStrokeArray() {\r\n const value = Math.floor(this._circumference);\r\n return `${value}, ${value}`;\r\n }\r\n\r\n get progressStrokeOffset() {\r\n return Math.floor(this._circumference - this._progress / 100 * this._circumference);\r\n }\r\n\r\n get isContentString() {\r\n return typeof this.notification.content === 'string';\r\n }\r\n\r\n ngOnInit() {\r\n // Check if the notification timeout is not 0 and the platform is a browser.\r\n if (this.notification.timeout <= 0 || !this._platform.isBrowser) {\r\n this.notification.dismiss = true;\r\n return;\r\n }\r\n\r\n // Start the timeout.\r\n this.startTimeout();\r\n }\r\n\r\n ngOnDestroy() {\r\n // Clear the timeout if it was set.\r\n this._timer && window && window.clearTimeout && window.clearTimeout(this._timer);\r\n }\r\n\r\n callActionAndDestroy = (notification: Notification, action: NotificationAction) => {\r\n // Perform the callback (if it exists).\r\n action && action.callback && action.callback();\r\n\r\n // Call the destroy method (if it exists).\r\n notification && notification.destroy && notification.destroy();\r\n };\r\n\r\n private startTimeout() {\r\n // Calculate the steps of the timeout.\r\n this._steps = this.notification.timeout / 10;\r\n\r\n // Calculate the speed of the timeout.\r\n this._speed = this.notification.timeout / this._steps;\r\n\r\n // Get the start time.\r\n this._startTime = Date.now();\r\n\r\n // Set a new timer outside of Angular.\r\n this._zone.runOutsideAngular(() => this._timer = this.setTimeout(this.instance, this._speed));\r\n }\r\n\r\n private instance = () => {\r\n // Calculate the difference.\r\n this._difference = (Date.now() - this._startTime) - (this._count * this._speed);\r\n\r\n // Add up the count.\r\n if (this._count++ === this._steps) {\r\n this.notification.destroy();\r\n }\r\n\r\n // Add the steps to the progress.\r\n this._progress += 100 / this._steps;\r\n\r\n // Set a new timer.\r\n this._timer = this.setTimeout(this.instance, this._speed - this._difference);\r\n\r\n // Run a new change detection cycle.\r\n this._zone.run(() => this._changeDetection.detectChanges());\r\n };\r\n\r\n private setTimeout = (method: () => void, timeout: number) => {\r\n // Check if the window and method exist.\r\n if (!window || !window.setTimeout) {\r\n return null;\r\n }\r\n\r\n return window.setTimeout(method, timeout);\r\n };\r\n\r\n}\r\n","<div class=\"notification-content-wrapper\">\r\n <!--\r\n The icon for the notification.\r\n\r\n The icon is reflected by the type of the\r\n notification. Same goes for the color and\r\n background-color.\r\n -->\r\n <div [style.color]=\"notification?.color\"\r\n [style.background-color]=\"notification?.backgroundColor\"\r\n class=\"notification-icon-wrapper\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 16 19.5\"\r\n class=\"notification-icon\">\r\n <path\r\n d=\"M8 19.5c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2zM14 13.5v-5c0-3.1-1.6-5.6-4.5-6.3v-.7C9.5.7 8.8 0 8 0S6.5.7 6.5 1.5v.7C3.6 2.9 2 5.4 2 8.5v5l-2 2v1h16v-1l-2-2z\">\r\n </path>\r\n </svg>\r\n\r\n <!--\r\n The circular progress for the notification.\r\n\r\n The progress is only visible when a timeout is\r\n set. The progress adapts to the time remaining\r\n for the notification.\r\n -->\r\n <svg *ngIf=\"notification?.timeout > 0\"\r\n class=\"notification-progress-ring\"\r\n viewBox=\"0 0 40 40\"\r\n role=\"progressbar\">\r\n <circle #progress\r\n [attr.stroke-dasharray]=\"progressStrokeArray\"\r\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\r\n [style.stroke]=\"notification?.color\"\r\n class=\"notification-progress-circle\"\r\n stroke-width=\"2\"\r\n fill=\"transparent\"\r\n r=\"19\"\r\n cx=\"20\"\r\n cy=\"20\">\r\n </circle>\r\n </svg>\r\n </div>\r\n\r\n <!--\r\n The content for the notification.\r\n\r\n This displays a string or a template based\r\n on the given parameter by the user.\r\n -->\r\n <div class=\"notification-content\">\r\n <ng-container *ngIf=\"isContentString; else templateContent\"\r\n [ngSwitch]=\"notification?.localize\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ $any(notification?.content) | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ notification?.content }}\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<!--\r\n The actions of the notification.\r\n\r\n All actions are displayed here and are\r\n based on the actions array the user provided.\r\n-->\r\n<div *ngIf=\"notification?.actions?.length > 0 || notification?.dismiss\"\r\n class=\"notification-actions\">\r\n <button *ngFor=\"let action of notification?.actions\"\r\n (click)=\"callActionAndDestroy(notification, action)\"\r\n type=\"button\"\r\n [class.destructive]=\"action?.type === 'cancel'\"\r\n class=\"notification-actions-button\">\r\n <span [ngSwitch]=\"notification?.localize\"\r\n class=\"notification-actions-button-highlight\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ action?.title | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ action?.title }}\r\n </ng-container>\r\n </span>\r\n </button>\r\n <button *ngIf=\"notification?.dismiss\"\r\n (click)=\"notification?.destroy()\"\r\n class=\"notification-actions-button destructive\"\r\n type=\"button\">\r\n <span class=\"notification-actions-button-highlight\">\r\n {{ notification?.dismissText || dismissButtonText }}\r\n </span>\r\n </button>\r\n</div>\r\n\r\n<!--\r\n The outlet for the notification content template ref.\r\n-->\r\n<ng-template #templateContent>\r\n <ng-container *ngTemplateOutlet=\"$any(notification?.content)\"></ng-container>\r\n</ng-template>\r\n","import {Notification, NotificationsData, NotificationsPosition} from '../notifications.interfaces';\r\nimport {ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation} from '@angular/core';\r\nimport {notificationAnimation} from '../notifications.animations';\r\n\r\n@Component({\r\n selector: 'bb-notifications-list',\r\n templateUrl: './notifications-list.component.html',\r\n styleUrls: ['./notifications-list.component.scss'],\r\n animations: [notificationAnimation],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n host: {\r\n 'class': 'bb-notifications-list',\r\n 'role': 'list'\r\n }\r\n})\r\nexport class BbNotificationsList {\r\n\r\n // Data.\r\n position: NotificationsPosition | null = null;\r\n\r\n // Track by function.\r\n trackByFn = (_, item: Notification) => item.id;\r\n\r\n constructor(public data: NotificationsData) {\r\n }\r\n\r\n @HostBinding('style.justify-content')\r\n get horizontalPosition() {\r\n return this.location.horizontal;\r\n }\r\n\r\n @HostBinding('style.align-items')\r\n get verticalPosition() {\r\n return this.location.vertical;\r\n }\r\n\r\n get animation() {\r\n const to = this.horizontalPosition === 'flex-start'\r\n ? -50\r\n : 50;\r\n\r\n return {to};\r\n }\r\n\r\n private get location() {\r\n const [y, x] = (this.data.position || '').split('|');\r\n\r\n return {vertical: y || null, horizontal: x || null};\r\n }\r\n\r\n}\r\n","<!--\r\n The notifications list.\r\n\r\n The list provides the animation effect for the\r\n incoming notifications.\r\n-->\r\n<div *ngIf=\"data?.data | async as notifications\"\r\n [@notificationListAnimation]=\"{value: notifications?.length, params: animation}\"\r\n class=\"notifications-list-wrapper\">\r\n <!--\r\n The loop for the notifications.\r\n\r\n All notifications will be displayed here. They\r\n are wrapped within a wrapper which separates them.\r\n -->\r\n <div *ngFor=\"let notification of notifications; trackBy: trackByFn\"\r\n class=\"notifications-item-wrapper\">\r\n <bb-notifications-item [notification]=\"notification\"\r\n [dismissButtonText]=\"data?.dismissText\">\r\n </bb-notifications-item>\r\n </div>\r\n</div>\r\n","import {InjectionToken, Injector, Type} from '@angular/core';\r\n\r\nexport class NotificationsInjector implements Injector {\r\n\r\n constructor(private _parentInjector: Injector,\r\n private _additionalTokens: WeakMap<any, any>) {\r\n }\r\n\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T;\r\n get(token: any, notFoundValue?: any);\r\n get(token: any, notFoundValue?: any) {\r\n // First check if the additional token\r\n // contains the token.\r\n const value = this._additionalTokens.get(token);\r\n\r\n // If that value exists return it.\r\n if (value) {\r\n return value;\r\n }\r\n\r\n // Else query the parent injector.\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n\r\n}\r\n","import {\r\n ApplicationRef,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n Injectable,\r\n Injector,\r\n Optional,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport {\r\n Notification,\r\n NotificationAction,\r\n NotificationsPosition,\r\n NotificationsConfig,\r\n NotificationType,\r\n NotificationsData\r\n} from './notifications.interfaces';\r\nimport {BbNotificationsList} from './notifications-list/notifications-list.component';\r\nimport {NotificationsInjector} from './notifications.injector';\r\nimport {Localize} from '@bravobit/bb-foundation/localize';\r\nimport {Platform} from '@bravobit/bb-foundation';\r\nimport {BehaviorSubject} from 'rxjs';\r\nimport {share} from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class Notifications {\r\n\r\n // Reference to the list.\r\n private _ref: ComponentRef<BbNotificationsList>;\r\n\r\n // The default settings for the notifications.\r\n private readonly _defaultMode: 'prepend' | 'append';\r\n private readonly _defaultTimeout: number;\r\n private readonly _defaultLocalize: boolean;\r\n private readonly _defaultDismiss: boolean;\r\n private readonly _defaultDismissText: string;\r\n private readonly _defaultPosition: NotificationsPosition;\r\n\r\n // The data containing the notifications.\r\n private _notifications$ = new BehaviorSubject<Notification[]>([]);\r\n\r\n constructor(private _injector: Injector,\r\n private _platform: Platform,\r\n private _applicationRef: ApplicationRef,\r\n @Optional() private _localize: Localize,\r\n @Optional() private _config: NotificationsConfig,\r\n private _componentFactoryResolver: ComponentFactoryResolver) {\r\n // Get the config.\r\n const config = this._config || {};\r\n\r\n // Set the config.\r\n this._defaultMode = this.getProperty(config.mode, 'prepend');\r\n this._defaultTimeout = this.getProperty(config.timeout, 8000);\r\n this._defaultLocalize = this.getProperty(config.localize, false);\r\n this._defaultDismiss = this.getProperty(config.dismiss, true);\r\n this._defaultDismissText = this.getProperty(config.dismissText, 'Dismiss');\r\n this._defaultPosition = this.getProperty(config.position, NotificationsPosition.TopRight);\r\n\r\n // Create the element that holds all notifications.\r\n this.createElement();\r\n }\r\n\r\n success(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Success});\r\n }\r\n\r\n error(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Error});\r\n }\r\n\r\n warn(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Warning});\r\n }\r\n\r\n info(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Info});\r\n }\r\n\r\n create(notification: Notification) {\r\n // Compose a new notification item.\r\n const item = this.compose(notification);\r\n\r\n // Add the destroy function to the notification.\r\n item.destroy = () => this.pull(item);\r\n\r\n // Add the notification to the list\r\n // and return the item.\r\n return this.push(item);\r\n }\r\n\r\n private push(notification: Notification) {\r\n // Get the current list.\r\n const oldList = this._notifications$.getValue();\r\n\r\n // Check which mode is activated.\r\n let newList: Notification[];\r\n switch (this._defaultMode) {\r\n case 'append':\r\n newList = [...oldList, notification];\r\n break;\r\n case 'prepend':\r\n default:\r\n newList = [notification, ...oldList];\r\n }\r\n\r\n // Push the new notifications.\r\n this._notifications$.next(newList);\r\n\r\n // Return the notification for further use.\r\n return notification;\r\n }\r\n\r\n private pull(notification: Notification) {\r\n // Get the current list.\r\n const newList = this._notifications$\r\n .getValue()\r\n .filter(item => item.id !== notification.id);\r\n\r\n // Push a new list.\r\n this._notifications$.next(newList);\r\n }\r\n\r\n private compose(notification: Notification) {\r\n // Attach a random id to the notification.\r\n notification.id = Math.random().toString(36).substr(2, 10);\r\n\r\n // Set all properties.\r\n notification.type = this.getProperty(notification.type, NotificationType.Custom);\r\n notification.content = this.getProperty(notification.content, null);\r\n notification.data = this.getProperty(notification.data, {});\r\n notification.timeout = this.getProperty(notification.timeout, this._defaultTimeout);\r\n notification.localize = this.getProperty(notification.localize, this._defaultLocalize);\r\n notification.dismiss = this.getProperty(notification.dismiss, this._defaultDismiss);\r\n\r\n // Dismiss text localization.\r\n const dismissText = this.getProperty(notification.dismissText, this._defaultDismissText);\r\n notification.dismissText = this._defaultLocalize && this._localize\r\n ? this._localize.translate(dismissText)\r\n : dismissText;\r\n\r\n // Return the composed notification.\r\n return notification;\r\n }\r\n\r\n private createElement() {\r\n // Create a map with the config.\r\n const map = new WeakMap();\r\n map.set(NotificationsData, {\r\n data: this._notifications$.pipe(share()),\r\n dismissText: this._defaultDismissText,\r\n position: this._defaultPosition\r\n });\r\n\r\n // Create a custom injector.\r\n const notificationsInjector = new NotificationsInjector(this._injector, map);\r\n\r\n // Create the notification list and\r\n // get a reference to the component.\r\n this._ref = this._componentFactoryResolver\r\n .resolveComponentFactory(BbNotificationsList)\r\n .create(notificationsInjector);\r\n\r\n // Detect the changes.\r\n this._ref.changeDetectorRef.detectChanges();\r\n\r\n // Attach the component's view to the application\r\n // so that the change detection will run properly.\r\n this._applicationRef.attachView(this._ref.hostView);\r\n\r\n // If the platform is not a browser return.\r\n if (!this._platform.isBrowser) {\r\n return;\r\n }\r\n\r\n try {\r\n // Append the element to the DOM.\r\n document.body.appendChild(this._ref.location.nativeElement);\r\n } catch {\r\n // Don't do anything, because it must've failed.\r\n }\r\n }\r\n\r\n private getProperty = (property: any, defaultValue: any) => {\r\n return typeof property === 'undefined'\r\n ? defaultValue\r\n : property;\r\n };\r\n\r\n}\r\n","import {BbNotificationsList} from './notifications-list/notifications-list.component';\r\nimport {BbNotificationsItem} from './notifications-item/notifications-item.component';\r\nimport {LocalizeModule} from '@bravobit/bb-foundation/localize';\r\nimport {NotificationsConfig} from './notifications.interfaces';\r\nimport {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {Notifications} from './notifications.service';\r\nimport {CommonModule} from '@angular/common';\r\n\r\n@NgModule({\r\n imports: [CommonModule, LocalizeModule],\r\n declarations: [BbNotificationsList, BbNotificationsItem]\r\n})\r\nexport class NotificationsModule {\r\n\r\n static forRoot(config?: NotificationsConfig): ModuleWithProviders<NotificationsModule> {\r\n return {\r\n ngModule: NotificationsModule,\r\n providers: [\r\n {provide: NotificationsConfig, useValue: config},\r\n Notifications\r\n ]\r\n };\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i3","i1.NotificationsData","i2.BbNotificationsItem","i2","i3.NotificationsConfig"],"mappings":";;;;;;;;;;;IA4BY,iBAMX;AAND,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA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,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBAFb,mBAAmB,EAAE,mBAAmB,CAD7C,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAG7B,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,EAHnB,OAAA,EAAA,CAAA,CAAC,YAAY,EAAE,cAAc,CAAC,CAAA,EAAA,CAAA,CAAA;2FAG9B,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;AACvC,oBAAA,YAAY,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;AAC3D,iBAAA,CAAA;;;ACXD;;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.animations.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.injector.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.service.ts","../../../projects/bb-foundation/notifications/src/lib/notifications.module.ts","../../../projects/bb-foundation/notifications/src/bravobit-bb-foundation-notifications.ts"],"sourcesContent":["import {TemplateRef} from '@angular/core';\r\nimport {Observable} from 'rxjs';\r\n\r\nexport interface Notification {\r\n content: string | TemplateRef<any>;\r\n\r\n id?: string;\r\n\r\n timeout?: number;\r\n localize?: boolean;\r\n dismiss?: boolean;\r\n dismissText?: string;\r\n data?: { [key: string]: any };\r\n type?: NotificationType;\r\n actions?: NotificationAction[];\r\n\r\n color?: string;\r\n backgroundColor?: string;\r\n\r\n destroy?: () => void;\r\n}\r\n\r\nexport interface NotificationAction {\r\n title: string;\r\n callback?: () => any;\r\n type?: 'default' | 'cancel';\r\n}\r\n\r\nexport enum NotificationType {\r\n Success = 'success',\r\n Error = 'error',\r\n Warning = 'warning',\r\n Info = 'info',\r\n Custom = 'custom'\r\n}\r\n\r\nexport class NotificationsConfig {\r\n mode?: 'append' | 'prepend';\r\n position?: NotificationsPosition;\r\n timeout?: number;\r\n dismiss?: boolean;\r\n localize?: boolean;\r\n dismissText?: string;\r\n}\r\n\r\nexport enum NotificationsPosition {\r\n TopRight = 'flex-start|flex-end',\r\n BottomRight = 'flex-end|flex-end',\r\n TopLeft = 'flex-start|flex-start',\r\n BottomLeft = 'flex-end|flex-start'\r\n}\r\n\r\nexport class NotificationsData {\r\n data: Observable<Notification[]>;\r\n dismissText: string;\r\n position: NotificationsPosition;\r\n}\r\n","import {animate, group, query, stagger, style, transition, trigger} from '@angular/animations';\r\n\r\nconst s = '250ms cubic-bezier(0, 0, .2, 1)';\r\nconst l = '400ms cubic-bezier(0, 0, .2, 1)';\r\n\r\nexport const notificationAnimation = trigger('notificationListAnimation', [\r\n transition('* => *', [\r\n query(':enter', group([\r\n // 1. Set the initial state.\r\n style({height: 0, opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)'}),\r\n // 2. Start the animation to show the item.\r\n stagger(0, [\r\n animate(s, style({height: '*'})),\r\n animate(l, style({opacity: 1, transform: 'translateX(0) scale(0.95)'})),\r\n animate(s, style({transform: 'translateX(0) scale(1)'}))\r\n ])\r\n ]), {optional: true}),\r\n\r\n query(':leave', group([\r\n // 1. Set the initial state.\r\n style({height: '*', opacity: 1, transform: 'translateX(0) scale(1)'}),\r\n // 2. Start the animation to hide the item.\r\n stagger(0, [\r\n animate(s, style({transform: 'translateX(0) scale(0.95)'})),\r\n animate(l, style({opacity: 0, transform: 'translateX({{ to }}%) scale(0.95)'})),\r\n animate(s, style({height: 0}))\r\n ])\r\n ]), {optional: true})\r\n ])\r\n]);\r\n","import {\r\n ChangeDetectionStrategy,\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n HostBinding,\r\n Input,\r\n NgZone,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from '@angular/core';\r\nimport {Notification, NotificationAction} from '../notifications.interfaces';\r\nimport {Platform} from '@bravobit/bb-foundation';\r\n\r\n@Component({\r\n selector: 'bb-notifications-item',\r\n templateUrl: './notifications-item.component.html',\r\n styleUrls: ['./notifications-item.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n host: {\r\n 'role': 'alert'\r\n }\r\n})\r\nexport class BbNotificationsItem implements OnInit, OnDestroy {\r\n\r\n // Inputs.\r\n @Input() notification: Notification;\r\n @Input() dismissButtonText: string | null;\r\n\r\n // Elements.\r\n @ViewChild('progress') progressElementRef: ElementRef;\r\n\r\n // Data.\r\n private _progress = 0;\r\n private _count = 0;\r\n\r\n // Helper variables.\r\n private _steps: number;\r\n private _speed: number;\r\n private _timer: number;\r\n private _startTime: number;\r\n private _difference: number;\r\n\r\n // Data.\r\n private readonly _radius = 19;\r\n private readonly _circumference = this._radius * 2 * Math.PI;\r\n\r\n @HostBinding('class') get getClass() {\r\n return `bb-notifications-item ${this.notification.type}`;\r\n }\r\n\r\n constructor(private _zone: NgZone,\r\n private _platform: Platform,\r\n private _changeDetection: ChangeDetectorRef) {\r\n }\r\n\r\n get progressStrokeArray() {\r\n const value = Math.floor(this._circumference);\r\n return `${value}, ${value}`;\r\n }\r\n\r\n get progressStrokeOffset() {\r\n return Math.floor(this._circumference - this._progress / 100 * this._circumference);\r\n }\r\n\r\n get isContentString() {\r\n return typeof this.notification.content === 'string';\r\n }\r\n\r\n ngOnInit() {\r\n // Check if the notification timeout is not 0 and the platform is a browser.\r\n if (this.notification.timeout <= 0 || !this._platform.isBrowser) {\r\n this.notification.dismiss = true;\r\n return;\r\n }\r\n\r\n // Start the timeout.\r\n this.startTimeout();\r\n }\r\n\r\n ngOnDestroy() {\r\n // Clear the timeout if it was set.\r\n this._timer && window && window.clearTimeout && window.clearTimeout(this._timer);\r\n }\r\n\r\n callActionAndDestroy = (notification: Notification, action: NotificationAction) => {\r\n // Perform the callback (if it exists).\r\n action && action.callback && action.callback();\r\n\r\n // Call the destroy method (if it exists).\r\n notification && notification.destroy && notification.destroy();\r\n };\r\n\r\n private startTimeout() {\r\n // Calculate the steps of the timeout.\r\n this._steps = this.notification.timeout / 10;\r\n\r\n // Calculate the speed of the timeout.\r\n this._speed = this.notification.timeout / this._steps;\r\n\r\n // Get the start time.\r\n this._startTime = Date.now();\r\n\r\n // Set a new timer outside of Angular.\r\n this._zone.runOutsideAngular(() => this._timer = this.setTimeout(this.instance, this._speed));\r\n }\r\n\r\n private instance = () => {\r\n // Calculate the difference.\r\n this._difference = (Date.now() - this._startTime) - (this._count * this._speed);\r\n\r\n // Add up the count.\r\n if (this._count++ === this._steps) {\r\n this.notification.destroy();\r\n }\r\n\r\n // Add the steps to the progress.\r\n this._progress += 100 / this._steps;\r\n\r\n // Set a new timer.\r\n this._timer = this.setTimeout(this.instance, this._speed - this._difference);\r\n\r\n // Run a new change detection cycle.\r\n this._zone.run(() => this._changeDetection.detectChanges());\r\n };\r\n\r\n private setTimeout = (method: () => void, timeout: number) => {\r\n // Check if the window and method exist.\r\n if (!window || !window.setTimeout) {\r\n return null;\r\n }\r\n\r\n return window.setTimeout(method, timeout);\r\n };\r\n\r\n}\r\n","<div class=\"notification-content-wrapper\">\r\n <!--\r\n The icon for the notification.\r\n\r\n The icon is reflected by the type of the\r\n notification. Same goes for the color and\r\n background-color.\r\n -->\r\n <div [style.color]=\"notification?.color\"\r\n [style.background-color]=\"notification?.backgroundColor\"\r\n class=\"notification-icon-wrapper\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 16 19.5\"\r\n class=\"notification-icon\">\r\n <path\r\n d=\"M8 19.5c1.1 0 2-.9 2-2H6c0 1.1.9 2 2 2zM14 13.5v-5c0-3.1-1.6-5.6-4.5-6.3v-.7C9.5.7 8.8 0 8 0S6.5.7 6.5 1.5v.7C3.6 2.9 2 5.4 2 8.5v5l-2 2v1h16v-1l-2-2z\">\r\n </path>\r\n </svg>\r\n\r\n <!--\r\n The circular progress for the notification.\r\n\r\n The progress is only visible when a timeout is\r\n set. The progress adapts to the time remaining\r\n for the notification.\r\n -->\r\n <svg *ngIf=\"notification?.timeout > 0\"\r\n class=\"notification-progress-ring\"\r\n viewBox=\"0 0 40 40\"\r\n role=\"progressbar\">\r\n <circle #progress\r\n [attr.stroke-dasharray]=\"progressStrokeArray\"\r\n [attr.stroke-dashoffset]=\"progressStrokeOffset\"\r\n [style.stroke]=\"notification?.color\"\r\n class=\"notification-progress-circle\"\r\n stroke-width=\"2\"\r\n fill=\"transparent\"\r\n r=\"19\"\r\n cx=\"20\"\r\n cy=\"20\">\r\n </circle>\r\n </svg>\r\n </div>\r\n\r\n <!--\r\n The content for the notification.\r\n\r\n This displays a string or a template based\r\n on the given parameter by the user.\r\n -->\r\n <div class=\"notification-content\">\r\n <ng-container *ngIf=\"isContentString; else templateContent\"\r\n [ngSwitch]=\"notification?.localize\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ $any(notification?.content) | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ notification?.content }}\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<!--\r\n The actions of the notification.\r\n\r\n All actions are displayed here and are\r\n based on the actions array the user provided.\r\n-->\r\n<div *ngIf=\"notification?.actions?.length > 0 || notification?.dismiss\"\r\n class=\"notification-actions\">\r\n <button *ngFor=\"let action of notification?.actions\"\r\n (click)=\"callActionAndDestroy(notification, action)\"\r\n type=\"button\"\r\n [class.destructive]=\"action?.type === 'cancel'\"\r\n class=\"notification-actions-button\">\r\n <span [ngSwitch]=\"notification?.localize\"\r\n class=\"notification-actions-button-highlight\">\r\n <ng-container *ngSwitchCase=\"true\">\r\n {{ action?.title | bbLocalize:{data: notification?.data} }}\r\n </ng-container>\r\n <ng-container *ngSwitchDefault>\r\n {{ action?.title }}\r\n </ng-container>\r\n </span>\r\n </button>\r\n <button *ngIf=\"notification?.dismiss\"\r\n (click)=\"notification?.destroy()\"\r\n class=\"notification-actions-button destructive\"\r\n type=\"button\">\r\n <span class=\"notification-actions-button-highlight\">\r\n {{ notification?.dismissText || dismissButtonText }}\r\n </span>\r\n </button>\r\n</div>\r\n\r\n<!--\r\n The outlet for the notification content template ref.\r\n-->\r\n<ng-template #templateContent>\r\n <ng-container *ngTemplateOutlet=\"$any(notification?.content)\"></ng-container>\r\n</ng-template>\r\n","import {Notification, NotificationsData, NotificationsPosition} from '../notifications.interfaces';\r\nimport {ChangeDetectionStrategy, Component, HostBinding, ViewEncapsulation} from '@angular/core';\r\nimport {notificationAnimation} from '../notifications.animations';\r\n\r\n@Component({\r\n selector: 'bb-notifications-list',\r\n templateUrl: './notifications-list.component.html',\r\n styleUrls: ['./notifications-list.component.scss'],\r\n animations: [notificationAnimation],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n encapsulation: ViewEncapsulation.None,\r\n preserveWhitespaces: false,\r\n host: {\r\n 'class': 'bb-notifications-list',\r\n 'role': 'list'\r\n }\r\n})\r\nexport class BbNotificationsList {\r\n\r\n // Data.\r\n position: NotificationsPosition | null = null;\r\n\r\n // Track by function.\r\n trackByFn = (_, item: Notification) => item.id;\r\n\r\n constructor(public data: NotificationsData) {\r\n }\r\n\r\n @HostBinding('style.justify-content')\r\n get horizontalPosition() {\r\n return this.location.horizontal;\r\n }\r\n\r\n @HostBinding('style.align-items')\r\n get verticalPosition() {\r\n return this.location.vertical;\r\n }\r\n\r\n get animation() {\r\n const to = this.horizontalPosition === 'flex-start'\r\n ? -50\r\n : 50;\r\n\r\n return {to};\r\n }\r\n\r\n private get location() {\r\n const [y, x] = (this.data.position || '').split('|');\r\n\r\n return {vertical: y || null, horizontal: x || null};\r\n }\r\n\r\n}\r\n","<!--\r\n The notifications list.\r\n\r\n The list provides the animation effect for the\r\n incoming notifications.\r\n-->\r\n<div *ngIf=\"data?.data | async as notifications\"\r\n [@notificationListAnimation]=\"{value: notifications?.length, params: animation}\"\r\n class=\"notifications-list-wrapper\">\r\n <!--\r\n The loop for the notifications.\r\n\r\n All notifications will be displayed here. They\r\n are wrapped within a wrapper which separates them.\r\n -->\r\n <div *ngFor=\"let notification of notifications; trackBy: trackByFn\"\r\n class=\"notifications-item-wrapper\">\r\n <bb-notifications-item [notification]=\"notification\"\r\n [dismissButtonText]=\"data?.dismissText\">\r\n </bb-notifications-item>\r\n </div>\r\n</div>\r\n","import {InjectionToken, Injector, Type} from '@angular/core';\r\n\r\nexport class NotificationsInjector implements Injector {\r\n\r\n constructor(private _parentInjector: Injector,\r\n private _additionalTokens: WeakMap<any, any>) {\r\n }\r\n\r\n get<T>(token: Type<T> | InjectionToken<T>, notFoundValue?: T): T;\r\n get(token: any, notFoundValue?: any);\r\n get(token: any, notFoundValue?: any) {\r\n // First check if the additional token\r\n // contains the token.\r\n const value = this._additionalTokens.get(token);\r\n\r\n // If that value exists return it.\r\n if (value) {\r\n return value;\r\n }\r\n\r\n // Else query the parent injector.\r\n return this._parentInjector.get<any>(token, notFoundValue);\r\n }\r\n\r\n}\r\n","import {\r\n ApplicationRef,\r\n ComponentFactoryResolver,\r\n ComponentRef,\r\n Injectable,\r\n Injector,\r\n Optional,\r\n TemplateRef\r\n} from '@angular/core';\r\nimport {\r\n Notification,\r\n NotificationAction,\r\n NotificationsPosition,\r\n NotificationsConfig,\r\n NotificationType,\r\n NotificationsData\r\n} from './notifications.interfaces';\r\nimport {BbNotificationsList} from './notifications-list/notifications-list.component';\r\nimport {NotificationsInjector} from './notifications.injector';\r\nimport {Localize} from '@bravobit/bb-foundation/localize';\r\nimport {Platform} from '@bravobit/bb-foundation';\r\nimport {BehaviorSubject} from 'rxjs';\r\nimport {share} from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class Notifications {\r\n\r\n // Reference to the list.\r\n private _ref: ComponentRef<BbNotificationsList>;\r\n\r\n // The default settings for the notifications.\r\n private readonly _defaultMode: 'prepend' | 'append';\r\n private readonly _defaultTimeout: number;\r\n private readonly _defaultLocalize: boolean;\r\n private readonly _defaultDismiss: boolean;\r\n private readonly _defaultDismissText: string;\r\n private readonly _defaultPosition: NotificationsPosition;\r\n\r\n // The data containing the notifications.\r\n private _notifications$ = new BehaviorSubject<Notification[]>([]);\r\n\r\n constructor(private _injector: Injector,\r\n private _platform: Platform,\r\n private _applicationRef: ApplicationRef,\r\n @Optional() private _localize: Localize,\r\n @Optional() private _config: NotificationsConfig,\r\n private _componentFactoryResolver: ComponentFactoryResolver) {\r\n // Get the config.\r\n const config = this._config || {};\r\n\r\n // Set the config.\r\n this._defaultMode = this.getProperty(config.mode, 'prepend');\r\n this._defaultTimeout = this.getProperty(config.timeout, 8000);\r\n this._defaultLocalize = this.getProperty(config.localize, false);\r\n this._defaultDismiss = this.getProperty(config.dismiss, true);\r\n this._defaultDismissText = this.getProperty(config.dismissText, 'Dismiss');\r\n this._defaultPosition = this.getProperty(config.position, NotificationsPosition.TopRight);\r\n\r\n // Create the element that holds all notifications.\r\n this.createElement();\r\n }\r\n\r\n success(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Success});\r\n }\r\n\r\n error(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Error});\r\n }\r\n\r\n warn(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Warning});\r\n }\r\n\r\n info(content: string | TemplateRef<any>, actions: NotificationAction[] = [], timeout = this._defaultTimeout) {\r\n return this.create({content, timeout, actions, type: NotificationType.Info});\r\n }\r\n\r\n create(notification: Notification) {\r\n // Compose a new notification item.\r\n const item = this.compose(notification);\r\n\r\n // Add the destroy function to the notification.\r\n item.destroy = () => this.pull(item);\r\n\r\n // Add the notification to the list\r\n // and return the item.\r\n return this.push(item);\r\n }\r\n\r\n private push(notification: Notification) {\r\n // Get the current list.\r\n const oldList = this._notifications$.getValue();\r\n\r\n // Check which mode is activated.\r\n let newList: Notification[];\r\n switch (this._defaultMode) {\r\n case 'append':\r\n newList = [...oldList, notification];\r\n break;\r\n case 'prepend':\r\n default:\r\n newList = [notification, ...oldList];\r\n }\r\n\r\n // Push the new notifications.\r\n this._notifications$.next(newList);\r\n\r\n // Return the notification for further use.\r\n return notification;\r\n }\r\n\r\n private pull(notification: Notification) {\r\n // Get the current list.\r\n const newList = this._notifications$\r\n .getValue()\r\n .filter(item => item.id !== notification.id);\r\n\r\n // Push a new list.\r\n this._notifications$.next(newList);\r\n }\r\n\r\n private compose(notification: Notification) {\r\n // Attach a random id to the notification.\r\n notification.id = Math.random().toString(36).substr(2, 10);\r\n\r\n // Set all properties.\r\n notification.type = this.getProperty(notification.type, NotificationType.Custom);\r\n notification.content = this.getProperty(notification.content, null);\r\n notification.data = this.getProperty(notification.data, {});\r\n notification.timeout = this.getProperty(notification.timeout, this._defaultTimeout);\r\n notification.localize = this.getProperty(notification.localize, this._defaultLocalize);\r\n notification.dismiss = this.getProperty(notification.dismiss, this._defaultDismiss);\r\n\r\n // Dismiss text localization.\r\n const dismissText = this.getProperty(notification.dismissText, this._defaultDismissText);\r\n notification.dismissText = this._defaultLocalize && this._localize\r\n ? this._localize.translate(dismissText)\r\n : dismissText;\r\n\r\n // Return the composed notification.\r\n return notification;\r\n }\r\n\r\n private createElement() {\r\n // Create a map with the config.\r\n const map = new WeakMap();\r\n map.set(NotificationsData, {\r\n data: this._notifications$.pipe(share()),\r\n dismissText: this._defaultDismissText,\r\n position: this._defaultPosition\r\n });\r\n\r\n // Create a custom injector.\r\n const notificationsInjector = new NotificationsInjector(this._injector, map);\r\n\r\n // Create the notification list and\r\n // get a reference to the component.\r\n this._ref = this._componentFactoryResolver\r\n .resolveComponentFactory(BbNotificationsList)\r\n .create(notificationsInjector);\r\n\r\n // Detect the changes.\r\n this._ref.changeDetectorRef.detectChanges();\r\n\r\n // Attach the component's view to the application\r\n // so that the change detection will run properly.\r\n this._applicationRef.attachView(this._ref.hostView);\r\n\r\n // If the platform is not a browser return.\r\n if (!this._platform.isBrowser) {\r\n return;\r\n }\r\n\r\n try {\r\n // Append the element to the DOM.\r\n document.body.appendChild(this._ref.location.nativeElement);\r\n } catch {\r\n // Don't do anything, because it must've failed.\r\n }\r\n }\r\n\r\n private getProperty = (property: any, defaultValue: any) => {\r\n return typeof property === 'undefined'\r\n ? defaultValue\r\n : property;\r\n };\r\n\r\n}\r\n","import {BbNotificationsList} from './notifications-list/notifications-list.component';\r\nimport {BbNotificationsItem} from './notifications-item/notifications-item.component';\r\nimport {LocalizeModule} from '@bravobit/bb-foundation/localize';\r\nimport {NotificationsConfig} from './notifications.interfaces';\r\nimport {ModuleWithProviders, NgModule} from '@angular/core';\r\nimport {Notifications} from './notifications.service';\r\nimport {CommonModule} from '@angular/common';\r\n\r\n@NgModule({\r\n imports: [CommonModule, LocalizeModule],\r\n declarations: [BbNotificationsList, BbNotificationsItem]\r\n})\r\nexport class NotificationsModule {\r\n\r\n static forRoot(config?: NotificationsConfig): ModuleWithProviders<NotificationsModule> {\r\n return {\r\n ngModule: NotificationsModule,\r\n providers: [\r\n {provide: NotificationsConfig, useValue: config},\r\n Notifications\r\n ]\r\n };\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i3","i1.NotificationsData","i3.BbNotificationsItem","i2","i3.NotificationsConfig"],"mappings":";;;;;;;;;;;IA4BY,iBAMX;AAND,CAAA,UAAY,gBAAgB,EAAA;AACxB,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,gBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB,CAAA;AACnB,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,gBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACrB,CAAC,EANW,gBAAgB,KAAhB,gBAAgB,GAM3B,EAAA,CAAA,CAAA,CAAA;MAEY,mBAAmB,CAAA;AAO/B,CAAA;IAEW,sBAKX;AALD,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,qBAAgC,CAAA;AAChC,IAAA,qBAAA,CAAA,aAAA,CAAA,GAAA,mBAAiC,CAAA;AACjC,IAAA,qBAAA,CAAA,SAAA,CAAA,GAAA,uBAAiC,CAAA;AACjC,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,qBAAkC,CAAA;AACtC,CAAC,EALW,qBAAqB,KAArB,qBAAqB,GAKhC,EAAA,CAAA,CAAA,CAAA;MAEY,iBAAiB,CAAA;AAI7B;;ACtDD,MAAM,CAAC,GAAG,iCAAiC,CAAC;AAC5C,MAAM,CAAC,GAAG,iCAAiC,CAAC;AAErC,MAAM,qBAAqB,GAAG,OAAO,CAAC,2BAA2B,EAAE;IACtE,UAAU,CAAC,QAAQ,EAAE;AACjB,QAAA,KAAK,CAA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