@bravura/ui 6.1.0 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -1
- package/README.md +58 -57
- package/fesm2022/bravura-ui-alert.mjs +19 -22
- package/fesm2022/bravura-ui-alert.mjs.map +1 -1
- package/fesm2022/bravura-ui-behavior.mjs +18 -18
- package/fesm2022/bravura-ui-behavior.mjs.map +1 -1
- package/fesm2022/bravura-ui-clip-note.mjs +10 -10
- package/fesm2022/bravura-ui-clip-note.mjs.map +1 -1
- package/fesm2022/bravura-ui-common.mjs +5 -6
- package/fesm2022/bravura-ui-common.mjs.map +1 -1
- package/fesm2022/bravura-ui-currency-input.mjs +7 -7
- package/fesm2022/bravura-ui-currency-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-decimal-input.mjs +7 -7
- package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-discrete-input.mjs +10 -11
- package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -1
- package/fesm2022/bravura-ui-file-upload.mjs +18 -18
- package/fesm2022/bravura-ui-file-upload.mjs.map +1 -1
- package/fesm2022/bravura-ui-form-field.mjs +10 -10
- package/fesm2022/bravura-ui-form-field.mjs.map +1 -1
- package/fesm2022/bravura-ui-icon-font.mjs +7 -7
- package/fesm2022/bravura-ui-icon-font.mjs.map +1 -1
- package/fesm2022/bravura-ui-panel.mjs +16 -16
- package/fesm2022/bravura-ui-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-phone-number.mjs +13 -13
- package/fesm2022/bravura-ui-phone-number.mjs.map +1 -1
- package/fesm2022/bravura-ui-radio-panel.mjs +12 -14
- package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-selection-panel.mjs +11 -11
- package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -1
- package/fesm2022/bravura-ui-skeletons.mjs +10 -10
- package/fesm2022/bravura-ui-skeletons.mjs.map +1 -1
- package/fesm2022/bravura-ui-stepper.mjs +18 -18
- package/fesm2022/bravura-ui-stepper.mjs.map +1 -1
- package/fesm2022/bravura-ui-tooltip.mjs +13 -31
- package/fesm2022/bravura-ui-tooltip.mjs.map +1 -1
- package/package.json +39 -39
- package/{alert/testing/test-api.d.ts → types/bravura-ui-alert-testing.d.ts} +8 -4
- package/{alert/alert-container.component.d.ts → types/bravura-ui-alert.d.ts} +61 -4
- package/types/bravura-ui-behavior.d.ts +233 -0
- package/{clip-note/clip-note.directive.d.ts → types/bravura-ui-clip-note.d.ts} +64 -6
- package/types/bravura-ui-common.d.ts +26 -0
- package/{currency-input/currency-input.directive.d.ts → types/bravura-ui-currency-input.d.ts} +17 -8
- package/{decimal-input/decimal-input.directive.d.ts → types/bravura-ui-decimal-input.d.ts} +17 -8
- package/{discrete-input/discrete-input.component.d.ts → types/bravura-ui-discrete-input.d.ts} +18 -5
- package/{file-upload/file-upload.component.d.ts → types/bravura-ui-file-upload.d.ts} +61 -7
- package/{form-field/form-field.component.d.ts → types/bravura-ui-form-field.d.ts} +18 -6
- package/{icon-font/icon.directive.d.ts → types/bravura-ui-icon-font.d.ts} +38 -3
- package/{panel/panel.component.d.ts → types/bravura-ui-panel.d.ts} +53 -4
- package/{phone-number/phone-number.directive.d.ts → types/bravura-ui-phone-number.d.ts} +49 -5
- package/{radio-panel/testing/test-api.d.ts → types/bravura-ui-radio-panel-testing.d.ts} +12 -7
- package/types/bravura-ui-radio-panel.d.ts +73 -0
- package/types/bravura-ui-selection-panel.d.ts +151 -0
- package/types/bravura-ui-skeletons.d.ts +81 -0
- package/{stepper/stepper.component.d.ts → types/bravura-ui-stepper.d.ts} +37 -4
- package/{tooltip/tooltip.directive.d.ts → types/bravura-ui-tooltip.d.ts} +19 -4
- package/types/bravura-ui.d.ts +3 -0
- package/alert/alert-message.component.d.ts +0 -47
- package/alert/alert.module.d.ts +0 -14
- package/alert/index.d.ts +0 -5
- package/alert/public-api.d.ts +0 -1
- package/alert/testing/index.d.ts +0 -5
- package/behavior/await.directive.d.ts +0 -71
- package/behavior/behavior.module.d.ts +0 -17
- package/behavior/index.d.ts +0 -5
- package/behavior/observe-content-class.directive.d.ts +0 -29
- package/behavior/public-api.d.ts +0 -5
- package/behavior/sizing-monitor.directive.d.ts +0 -23
- package/behavior/sizing.directive.d.ts +0 -98
- package/clip-note/clip-note.component.d.ts +0 -45
- package/clip-note/clip-note.module.d.ts +0 -19
- package/clip-note/index.d.ts +0 -5
- package/clip-note/public-api.d.ts +0 -1
- package/common/common-utils.d.ts +0 -11
- package/common/common.module.d.ts +0 -11
- package/common/index.d.ts +0 -5
- package/common/public-api.d.ts +0 -2
- package/currency-input/currency-input.module.d.ts +0 -10
- package/currency-input/index.d.ts +0 -5
- package/currency-input/public-api.d.ts +0 -1
- package/decimal-input/decimal-input.module.d.ts +0 -10
- package/decimal-input/index.d.ts +0 -5
- package/decimal-input/public-api.d.ts +0 -1
- package/discrete-input/discrete-input.module.d.ts +0 -11
- package/discrete-input/index.d.ts +0 -5
- package/discrete-input/public-api.d.ts +0 -2
- package/file-upload/file-upload.module.d.ts +0 -14
- package/file-upload/file-upload.service.d.ts +0 -42
- package/file-upload/index.d.ts +0 -5
- package/file-upload/public-api.d.ts +0 -6
- package/form-field/form-field.module.d.ts +0 -13
- package/form-field/index.d.ts +0 -5
- package/form-field/public-api.d.ts +0 -2
- package/icon-font/icon-font.module.d.ts +0 -12
- package/icon-font/index.d.ts +0 -5
- package/icon-font/public-api.d.ts +0 -3
- package/icon-font/utilities.d.ts +0 -20
- package/index.d.ts +0 -5
- package/panel/index.d.ts +0 -5
- package/panel/panel-section.component.d.ts +0 -15
- package/panel/panel.module.d.ts +0 -16
- package/panel/public-api.d.ts +0 -1
- package/panel/tinted.directive.d.ts +0 -26
- package/phone-number/index.d.ts +0 -5
- package/phone-number/phone-number.module.d.ts +0 -17
- package/phone-number/phone-number.pipe.d.ts +0 -13
- package/phone-number/phone-number.validator.d.ts +0 -31
- package/phone-number/public-api.d.ts +0 -1
- package/public-api.d.ts +0 -1
- package/radio-panel/index.d.ts +0 -5
- package/radio-panel/public-api.d.ts +0 -3
- package/radio-panel/radio-panel-item.component.d.ts +0 -22
- package/radio-panel/radio-panel.component.d.ts +0 -38
- package/radio-panel/radio-panel.module.d.ts +0 -15
- package/radio-panel/testing/index.d.ts +0 -5
- package/selection-panel/index.d.ts +0 -5
- package/selection-panel/public-api.d.ts +0 -3
- package/selection-panel/selection-panel-item.component.d.ts +0 -77
- package/selection-panel/selection-panel.directive.d.ts +0 -67
- package/selection-panel/selection-panel.module.d.ts +0 -13
- package/skeletons/index.d.ts +0 -5
- package/skeletons/public-api.d.ts +0 -3
- package/skeletons/skeleton-loader-presets.directive.d.ts +0 -23
- package/skeletons/skeleton-loader.component.d.ts +0 -44
- package/skeletons/skeletons.module.d.ts +0 -16
- package/stepper/index.d.ts +0 -5
- package/stepper/public-api.d.ts +0 -3
- package/stepper/step-label-top.directive.d.ts +0 -17
- package/stepper/stepper-animation.d.ts +0 -6
- package/stepper/stepper.module.d.ts +0 -17
- package/tooltip/index.d.ts +0 -5
- package/tooltip/public-api.d.ts +0 -3
- package/tooltip/tooltip.component.d.ts +0 -26
- package/tooltip/tooltip.module.d.ts +0 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,8 +1,26 @@
|
|
|
1
1
|
# Change history
|
|
2
2
|
|
|
3
|
+
## 8.0.0 (2025-12-30)
|
|
4
|
+
|
|
5
|
+
* build: upgrade angular ([854ad52](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/854ad52))
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### BREAKING CHANGE
|
|
9
|
+
|
|
10
|
+
* upgrade angular to 21
|
|
11
|
+
|
|
12
|
+
## 7.0.0 (2025-12-30)
|
|
13
|
+
|
|
14
|
+
- fix: published version to angular version ([70668b7](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/70668b7))
|
|
15
|
+
- build: angular upgrade ([475b99e](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/475b99e))
|
|
16
|
+
|
|
17
|
+
### BREAKING CHANGE
|
|
18
|
+
|
|
19
|
+
- upgrade angular to 20
|
|
20
|
+
|
|
3
21
|
## 6.1.0 (2025-12-30)
|
|
4
22
|
|
|
5
|
-
|
|
23
|
+
- feat: upgrade angular material to 19 ([b115af0](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/b115af0))
|
|
6
24
|
|
|
7
25
|
## <small>6.0.1 (2025-12-30)</small>
|
|
8
26
|
|
package/README.md
CHANGED
|
@@ -1,57 +1,58 @@
|
|
|
1
|
-
# Bravura UI Components for Angular applications
|
|
2
|
-
|
|
3
|
-
This package contains a set of UI components built on top of [Angular Material library and Component Development Kit](https://material.angular.io/). It supplements Angular Material in implementing Bravura UX Design System, which is an extension of the latest [Material Design Specification](https://material.io/design).
|
|
4
|
-
|
|
5
|
-
[Storybook on Chromatic](https://master--66d58f6d169fef41a850c874.chromatic.com)
|
|
6
|
-
|
|
7
|
-
## Angular version compatibility
|
|
8
|
-
|
|
9
|
-
| BUI versions | Compatible Angular versions |
|
|
10
|
-
| ------------ | --------------------------- |
|
|
11
|
-
| ^
|
|
12
|
-
| ^
|
|
13
|
-
| ^
|
|
14
|
-
| ^
|
|
15
|
-
| ^
|
|
16
|
-
| ^
|
|
17
|
-
| 1
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
# Bravura UI Components for Angular applications
|
|
2
|
+
|
|
3
|
+
This package contains a set of UI components built on top of [Angular Material library and Component Development Kit](https://material.angular.io/). It supplements Angular Material in implementing Bravura UX Design System, which is an extension of the latest [Material Design Specification](https://material.io/design).
|
|
4
|
+
|
|
5
|
+
[Storybook on Chromatic](https://master--66d58f6d169fef41a850c874.chromatic.com)
|
|
6
|
+
|
|
7
|
+
## Angular version compatibility
|
|
8
|
+
|
|
9
|
+
| BUI versions | Compatible Angular versions |
|
|
10
|
+
| ------------ | --------------------------- |
|
|
11
|
+
| ^7.0.0 | 20 |
|
|
12
|
+
| ^6.0.0 | 19 |
|
|
13
|
+
| ^5.0.0 | 18 |
|
|
14
|
+
| ^4.0.0 | 17 |
|
|
15
|
+
| ^3.0.0 | 15, 16 |
|
|
16
|
+
| ^2.0.0 | 14 |
|
|
17
|
+
| ^1.15.x | 12, 13 |
|
|
18
|
+
| 1 .. 1.14.x | 12 |
|
|
19
|
+
|
|
20
|
+
### MDC-based releases
|
|
21
|
+
|
|
22
|
+
From version 3.0 onward, the package `@bravura/ui` is only compatible with `@angular/components` 15.1 and up, which is based on the Offical Material Design Components for web. Please refer to [this document](https://material.angular.io/guide/mdc-migration) for more information.
|
|
23
|
+
|
|
24
|
+
To continue to use `@bravura/ui` at the latest version in your Angular projects, you must upgrade both Angular and Angular Material packages to version 15 or later. You must also you run the migration tool to switch from the legacy component implementations to the new MDC-based ones. The legacy components from `@angular/components` are no longer supported.
|
|
25
|
+
|
|
26
|
+
## Setup
|
|
27
|
+
|
|
28
|
+
Install the package in your Angular project by using one of the commands below, according to the package manager chosen.
|
|
29
|
+
|
|
30
|
+
NPM:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
npm install --save @bravura/ui
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Yarn:
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
yarn add @bravura/ui
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Import the `NgModule` from one of the sub-packages where the component is provided. For example:
|
|
43
|
+
|
|
44
|
+
```typescript
|
|
45
|
+
@import {RadioPanelModule} from '@bravura/ui/radio-panel'
|
|
46
|
+
@NgModule({
|
|
47
|
+
declarations: [MyComponent],
|
|
48
|
+
imports: [RadioPanelModule]
|
|
49
|
+
})
|
|
50
|
+
export class MyModule {}
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Theming
|
|
55
|
+
|
|
56
|
+
To incorporate components' theming with Angular Material, you need to configure a custom theme, following the [theming guide on the Angular Material document site](https://material.angular.io/guide/theming#custom-themes-with-sass). In the global style SASS partial where the Material theme is configured, add the BUI theme mixin reference to activate theming.
|
|
57
|
+
|
|
58
|
+
You may also need to include the CSS of custom font definitions for [Material Icon Font](https://fonts.google.com/icons) into the global stylesheets.
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import * as i2 from '@angular/common';
|
|
2
1
|
import { CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
3
|
import { EventEmitter, Input, HostBinding, Output, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
5
|
-
import * as
|
|
4
|
+
import * as i3 from '@angular/material/button';
|
|
6
5
|
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
-
import * as
|
|
6
|
+
import * as i2 from '@bravura/ui/icon-font';
|
|
8
7
|
import { IconFontModule } from '@bravura/ui/icon-font';
|
|
9
8
|
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
10
9
|
import { generateID, isElementInViewport } from '@bravura/ui/common';
|
|
11
10
|
import { Subject, timer } from 'rxjs';
|
|
12
11
|
import { takeUntil, take, tap, delay } from 'rxjs/operators';
|
|
13
|
-
import * as i1 from '@angular/cdk/scrolling';
|
|
12
|
+
import * as i1$1 from '@angular/cdk/scrolling';
|
|
14
13
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
15
|
-
import * as
|
|
14
|
+
import * as i1 from '@angular/material/icon';
|
|
16
15
|
|
|
17
16
|
/** @ignore */
|
|
18
17
|
const ICONS = {
|
|
@@ -75,16 +74,16 @@ class AlertMessageComponent {
|
|
|
75
74
|
_dismiss() {
|
|
76
75
|
this.dismissed.emit(this._id);
|
|
77
76
|
}
|
|
78
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
79
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
77
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
78
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AlertMessageComponent, isStandalone: false, selector: "bui-alert", inputs: { type: "type", message: "message", politeness: "politeness", dismissible: "dismissible", _id: ["id", "_id"] }, outputs: { dismissed: "dismissed", initialised: "initialised" }, host: { properties: { "class": "'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')", "attr.role": "politeness === 'off' ? 'region' : 'alert'", "attr.aria-live": "politeness === 'assertive' ? undefined : politeness", "id": "this._id" } }, ngImport: i0, template: "<div class=\"bui-alert-backdrop\"></div>\n<div class=\"bui-alert-frame\"></div>\n\n<div class=\"bui-alert-wrapper\">\n\t<div class=\"bui-alert-icon-area\">\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\n\t</div>\n\t<div class=\"bui-alert-content\">\n\t\t@if (message) {\n\t\t\t<div [innerHTML]=\"message\"></div>\n\t\t}\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n@if (dismissible) {\n\t<div class=\"bui-alert-button-area\">\n\t\t<div class=\"bui-alert-button-backdrop\"></div>\n\t\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t\t<mat-icon>cancel</mat-icon>\n\t\t</button>\n\t</div>\n}\n", styles: [":host(:not([hidden])){display:block;padding:12px 14px 12px 19px;position:relative;border-radius:5px}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])),:host(:not([hidden])) *{box-sizing:border-box}.bui-alert-backdrop,.bui-alert-frame{position:absolute;inset:0}.bui-alert-backdrop{opacity:.1}:host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 18.75px) 18.75px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0,18.75px 18.75px)}.bui-alert-frame{border-radius:5px;border-width:1px 1px 1px 5px;border-style:solid}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}:host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 25px) 25px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0)}.bui-alert-button-area{position:absolute;right:-15px;top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-backdrop{position:absolute;border-radius:20px;width:100%;height:100%;clip-path:polygon(0 15px,25px 15px,25px 100%,0% 100%)}:host-context([dir=rtl]) .bui-alert-button-backdrop{clip-path:polygon(15px 15px,15px 100%,100% 100%,100% 15px)}.bui-alert-wrapper{display:flex;align-items:stretch}.bui-alert-icon-area{flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:5px;width:30px;height:30px;margin-right:14px;color:var(--bui-bg-card)}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}:host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 0,calc(100% - 11px) 0,100% 13px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 13px,0 100%,100% 100%,100% 0,11px 0)}:host(.bui-alert-success) .bui-alert-frame{border-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-backdrop,:host(.bui-alert-success) .bui-alert-icon-area{background-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-button-backdrop{border:1px var(--bui-color-success) solid}:host(.bui-alert-success) .bui-alert-button{color:var(--bui-color-success)}:host(.bui-alert-info) .bui-alert-frame{border-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-backdrop,:host(.bui-alert-info) .bui-alert-icon-area{background-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-button-backdrop{border:1px var(--bui-color-info) solid}:host(.bui-alert-info) .bui-alert-button{color:var(--bui-color-info)}:host(.bui-alert-warning) .bui-alert-frame{border-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-backdrop,:host(.bui-alert-warning) .bui-alert-icon-area{background-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-button-backdrop{border:1px var(--bui-color-warning) solid}:host(.bui-alert-warning) .bui-alert-button{color:var(--bui-color-warning)}:host(.bui-alert-error) .bui-alert-frame{border-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-backdrop,:host(.bui-alert-error) .bui-alert-icon-area{background-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-button-backdrop{border:1px var(--bui-color-error) solid}:host(.bui-alert-error) .bui-alert-button{color:var(--bui-color-error)}.bui-alert-button{width:40px;height:40px;padding:8px;overflow:hidden}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:last-child\"; margin-bottom: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:last-child\"; margin-bottom: 0;}\n"], dependencies: [{ kind: "component", type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
80
79
|
}
|
|
81
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
80
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertMessageComponent, decorators: [{
|
|
82
81
|
type: Component,
|
|
83
82
|
args: [{ selector: 'bui-alert', host: {
|
|
84
83
|
'[class]': `'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')`,
|
|
85
|
-
'[role]': `politeness === 'off' ? 'region' : 'alert'`,
|
|
84
|
+
'[attr.role]': `politeness === 'off' ? 'region' : 'alert'`,
|
|
86
85
|
'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`
|
|
87
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"bui-alert-backdrop\"></div>\
|
|
86
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"bui-alert-backdrop\"></div>\n<div class=\"bui-alert-frame\"></div>\n\n<div class=\"bui-alert-wrapper\">\n\t<div class=\"bui-alert-icon-area\">\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\n\t</div>\n\t<div class=\"bui-alert-content\">\n\t\t@if (message) {\n\t\t\t<div [innerHTML]=\"message\"></div>\n\t\t}\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n@if (dismissible) {\n\t<div class=\"bui-alert-button-area\">\n\t\t<div class=\"bui-alert-button-backdrop\"></div>\n\t\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t\t<mat-icon>cancel</mat-icon>\n\t\t</button>\n\t</div>\n}\n", styles: [":host(:not([hidden])){display:block;padding:12px 14px 12px 19px;position:relative;border-radius:5px}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])),:host(:not([hidden])) *{box-sizing:border-box}.bui-alert-backdrop,.bui-alert-frame{position:absolute;inset:0}.bui-alert-backdrop{opacity:.1}:host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 18.75px) 18.75px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-backdrop{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0,18.75px 18.75px)}.bui-alert-frame{border-radius:5px;border-width:1px 1px 1px 5px;border-style:solid}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}:host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 0,calc(100% - 25px) 0,calc(100% - 25px) 25px,100% 25px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-frame{clip-path:polygon(0 25px,0 100%,100% 100%,100% 0,25px 0)}.bui-alert-button-area{position:absolute;right:-15px;top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-backdrop{position:absolute;border-radius:20px;width:100%;height:100%;clip-path:polygon(0 15px,25px 15px,25px 100%,0% 100%)}:host-context([dir=rtl]) .bui-alert-button-backdrop{clip-path:polygon(15px 15px,15px 100%,100% 100%,100% 15px)}.bui-alert-wrapper{display:flex;align-items:stretch}.bui-alert-icon-area{flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:5px;width:30px;height:30px;margin-right:14px;color:var(--bui-bg-card)}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}:host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 0,calc(100% - 11px) 0,100% 13px,100% 100%,0 100%)}:host-context([dir=rtl]) :host(.bui-alert-dismissible) .bui-alert-content{clip-path:polygon(0 13px,0 100%,100% 100%,100% 0,11px 0)}:host(.bui-alert-success) .bui-alert-frame{border-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-backdrop,:host(.bui-alert-success) .bui-alert-icon-area{background-color:var(--bui-color-success)}:host(.bui-alert-success) .bui-alert-button-backdrop{border:1px var(--bui-color-success) solid}:host(.bui-alert-success) .bui-alert-button{color:var(--bui-color-success)}:host(.bui-alert-info) .bui-alert-frame{border-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-backdrop,:host(.bui-alert-info) .bui-alert-icon-area{background-color:var(--bui-color-info)}:host(.bui-alert-info) .bui-alert-button-backdrop{border:1px var(--bui-color-info) solid}:host(.bui-alert-info) .bui-alert-button{color:var(--bui-color-info)}:host(.bui-alert-warning) .bui-alert-frame{border-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-backdrop,:host(.bui-alert-warning) .bui-alert-icon-area{background-color:var(--bui-color-warning)}:host(.bui-alert-warning) .bui-alert-button-backdrop{border:1px var(--bui-color-warning) solid}:host(.bui-alert-warning) .bui-alert-button{color:var(--bui-color-warning)}:host(.bui-alert-error) .bui-alert-frame{border-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-backdrop,:host(.bui-alert-error) .bui-alert-icon-area{background-color:var(--bui-color-error)}:host(.bui-alert-error) .bui-alert-button-backdrop{border:1px var(--bui-color-error) solid}:host(.bui-alert-error) .bui-alert-button{color:var(--bui-color-error)}.bui-alert-button{width:40px;height:40px;padding:8px;overflow:hidden}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > div > *:last-child\"; margin-bottom: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:first-child\"; margin-top: 0;}@polyfill-unscoped-rule{content: \".bui-alert .bui-alert-content > *:last-child\"; margin-bottom: 0;}\n"] }]
|
|
88
87
|
}], ctorParameters: () => [], propDecorators: { type: [{
|
|
89
88
|
type: Input
|
|
90
89
|
}], message: [{
|
|
@@ -97,9 +96,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
97
96
|
type: Output
|
|
98
97
|
}], initialised: [{
|
|
99
98
|
type: Output
|
|
100
|
-
}],
|
|
101
|
-
/** @ignore */
|
|
102
|
-
_id: [{
|
|
99
|
+
}], _id: [{
|
|
103
100
|
type: Input,
|
|
104
101
|
args: ['id']
|
|
105
102
|
}, {
|
|
@@ -247,8 +244,8 @@ class AlertContainerComponent {
|
|
|
247
244
|
this.zone.run(() => this.cdRef.markForCheck());
|
|
248
245
|
});
|
|
249
246
|
}
|
|
250
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
247
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertContainerComponent, deps: [{ token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }, { token: i1$1.ScrollDispatcher }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
248
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: AlertContainerComponent, isStandalone: false, selector: "bui-alert-container", inputs: { max: "max", outsideViewportBehavior: "outsideViewportBehavior", floatDuration: "floatDuration" }, outputs: { init: "init" }, host: { properties: { "class": "'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')" } }, ngImport: i0, template: "<div\n\tclass=\"bui-alert-fixed-panel\"\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\n>\n\t@for (a of _alerts; track a) {\n\t\t<bui-alert\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\tdismissible\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t\t(dismissed)=\"_dismiss(a)\"\n\t\t></bui-alert>\n\t}\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t@if (_floated) {\n\t\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\">\n\t\t\t@for (a of _alerts; track a) {\n\t\t\t\t<bui-alert\n\t\t\t\t\t[id]=\"a.id\"\n\t\t\t\t\t[type]=\"a.type\"\n\t\t\t\t\t[message]=\"a.message\"\n\t\t\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t\t></bui-alert>\n\t\t\t}\n\t\t</div>\n\t}\n</div>\n", styles: [".bui-alert:not(:first-of-type){margin-top:.5rem}:host(:not([hidden])){display:block}.bui-alert-fixed-panel{transition:opacity .2s ease-in}.bui-alert-fixed-panel.bui-alert-fixed-panel-blink .bui-alert:last-of-type{animation:blink 1s ease-in forwards}.bui-alert-float-panel-frame{position:fixed;z-index:1000;inset:0;justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame.bui-alert-float-panel-shaded{background-color:#00000080}.bui-alert-float-panel-frame .bui-alert{background-color:var(--bui-bg-card)}@keyframes blink{60%{opacity:1}70%{opacity:0}80%{opacity:1}90%{opacity:0}}\n"], dependencies: [{ kind: "component", type: AlertMessageComponent, selector: "bui-alert", inputs: ["type", "message", "politeness", "dismissible", "id"], outputs: ["dismissed", "initialised"] }], animations: [
|
|
252
249
|
trigger('floatTransition', [
|
|
253
250
|
transition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),
|
|
254
251
|
transition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])
|
|
@@ -270,7 +267,7 @@ class AlertContainerComponent {
|
|
|
270
267
|
])
|
|
271
268
|
], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
272
269
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertContainerComponent, decorators: [{
|
|
274
271
|
type: Component,
|
|
275
272
|
args: [{ selector: 'bui-alert-container', host: {
|
|
276
273
|
'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`
|
|
@@ -294,8 +291,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
294
291
|
]),
|
|
295
292
|
transition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])
|
|
296
293
|
])
|
|
297
|
-
], standalone: false, template: "<div\
|
|
298
|
-
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1.ScrollDispatcher }], propDecorators: { max: [{
|
|
294
|
+
], standalone: false, template: "<div\n\tclass=\"bui-alert-fixed-panel\"\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\n>\n\t@for (a of _alerts; track a) {\n\t\t<bui-alert\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\tdismissible\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t\t(dismissed)=\"_dismiss(a)\"\n\t\t></bui-alert>\n\t}\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t@if (_floated) {\n\t\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\">\n\t\t\t@for (a of _alerts; track a) {\n\t\t\t\t<bui-alert\n\t\t\t\t\t[id]=\"a.id\"\n\t\t\t\t\t[type]=\"a.type\"\n\t\t\t\t\t[message]=\"a.message\"\n\t\t\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t\t></bui-alert>\n\t\t\t}\n\t\t</div>\n\t}\n</div>\n", styles: [".bui-alert:not(:first-of-type){margin-top:.5rem}:host(:not([hidden])){display:block}.bui-alert-fixed-panel{transition:opacity .2s ease-in}.bui-alert-fixed-panel.bui-alert-fixed-panel-blink .bui-alert:last-of-type{animation:blink 1s ease-in forwards}.bui-alert-float-panel-frame{position:fixed;z-index:1000;inset:0;justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame.bui-alert-float-panel-shaded{background-color:#00000080}.bui-alert-float-panel-frame .bui-alert{background-color:var(--bui-bg-card)}@keyframes blink{60%{opacity:1}70%{opacity:0}80%{opacity:1}90%{opacity:0}}\n"] }]
|
|
295
|
+
}], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.ScrollDispatcher }], propDecorators: { max: [{
|
|
299
296
|
type: Input
|
|
300
297
|
}], outsideViewportBehavior: [{
|
|
301
298
|
type: Input
|
|
@@ -306,11 +303,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
306
303
|
}] } });
|
|
307
304
|
|
|
308
305
|
class AlertModule {
|
|
309
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
310
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
311
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
306
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
307
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: AlertModule, declarations: [AlertMessageComponent, AlertContainerComponent], imports: [CommonModule, IconFontModule, MatButtonModule], exports: [AlertMessageComponent, AlertContainerComponent] }); }
|
|
308
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertModule, imports: [CommonModule, IconFontModule, MatButtonModule] }); }
|
|
312
309
|
}
|
|
313
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertModule, decorators: [{
|
|
314
311
|
type: NgModule,
|
|
315
312
|
args: [{
|
|
316
313
|
declarations: [AlertMessageComponent, AlertContainerComponent],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bravura-ui-alert.mjs","sources":["../../../projects/ui/alert/alert-message.component.ts","../../../projects/ui/alert/alert-message.component.html","../../../projects/ui/alert/alert-container.component.ts","../../../projects/ui/alert/alert-container.component.html","../../../projects/ui/alert/alert.module.ts","../../../projects/ui/alert/bravura-ui-alert.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\r\nimport { generateID } from '@bravura/ui/common';\r\n\r\n/** @ignore */\r\nconst ICONS: any = {\r\n\tsuccess: 'check_circle',\r\n\tinfo: 'info',\r\n\twarn: 'report_problem',\r\n\terror: 'cancel'\r\n};\r\n\r\n/** @ignore */\r\nconst DEFAULT_POLITENESS = {\r\n\tsuccess: 'polite',\r\n\tinfo: 'polite',\r\n\twarn: 'assertive',\r\n\terror: 'assertive'\r\n};\r\n\r\n/**\r\n * An alert style message usually appears in a global notification area.\r\n *\r\n * The base color of the message is determined by the `type` of the message and a list of predefined\r\n * CSS custom properties.\r\n *\r\n * ```scss\r\n * --bui-color-success: #519602;\r\n * --bui-color-info: #0dcaf0;\r\n * --bui-color-warning: #ffc107;\r\n * --bui-color-error: #dc3545;\r\n * ```\r\n *\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-alert',\r\n\ttemplateUrl: './alert-message.component.html',\r\n\tstyleUrls: ['./alert-message.component.scss'],\r\n\thost: {\r\n\t\t'[class]': `'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')`,\r\n\t\t'[role]': `politeness === 'off' ? 'region' : 'alert'`,\r\n\t\t'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tstandalone: false\r\n})\r\nexport class AlertMessageComponent implements OnInit {\r\n\t/** @ignore */\r\n\tstatic ngAcceptInputType_dismissible: boolean | string | null | undefined;\r\n\t/** @ignore */\r\n\tstatic ngAcceptInputType_blink: boolean | string | null | undefined;\r\n\r\n\t/** The type of the message, used to derive the icon and base color. */\r\n\t@Input()\r\n\ttype: 'success' | 'info' | 'warn' | 'error' = 'error';\r\n\r\n\t/** The message to be displayed, HTML supported. */\r\n\t@Input()\r\n\tmessage = '';\r\n\r\n\t/** Specifies the ARIA live region politeness. */\r\n\t@Input()\r\n\tpoliteness!: 'off' | 'polite' | 'assertive';\r\n\r\n\t/** Whether to display the button to fire the `dismissed` event. */\r\n\t@Input()\r\n\tget dismissible() {\r\n\t\treturn this._dismissible;\r\n\t}\r\n\tset dismissible(value: any) {\r\n\t\tthis._dismissible = coerceBooleanProperty(value);\r\n\t}\r\n\r\n\t/** To be emitted when the user choose to dismiss the message. The event object is the ID of the element. */\r\n\t@Output()\r\n\tdismissed = new EventEmitter<string>();\r\n\r\n\t/** To be emitted when the component finishes initialisation. The event object is the ID of the element. */\r\n\t@Output()\r\n\tinitialised = new EventEmitter<string>();\r\n\r\n\t@Input('id')\r\n\t@HostBinding('id')\r\n\t/** @ignore */\r\n\t_id = `bui-alert-${generateID()}`;\r\n\r\n\tprivate _dismissible = false;\r\n\r\n\tconstructor() {}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis.politeness = this.politeness || DEFAULT_POLITENESS[this.type];\r\n\t\tthis.initialised.emit(this._id);\r\n\t}\r\n\r\n\t/** @ignore */\r\n\tget iconName(): string {\r\n\t\treturn ICONS[this.type];\r\n\t}\r\n\r\n\t/** @ignore */\r\n\t_dismiss() {\r\n\t\tthis.dismissed.emit(this._id);\r\n\t}\r\n}\r\n","<div class=\"bui-alert-backdrop\"></div>\r\n<div class=\"bui-alert-frame\"></div>\r\n\r\n<div class=\"bui-alert-wrapper\">\r\n\t<div class=\"bui-alert-icon-area\">\r\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\r\n\t</div>\r\n\t<div class=\"bui-alert-content\">\r\n\t\t<div [innerHTML]=\"message\" *ngIf=\"message\"></div>\r\n\t\t<ng-content></ng-content>\r\n\t</div>\r\n</div>\r\n\r\n<div class=\"bui-alert-button-area\" *ngIf=\"dismissible\">\r\n\t<div class=\"bui-alert-button-backdrop\"></div>\r\n\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\r\n\t\t<mat-icon>cancel</mat-icon>\r\n\t</button>\r\n</div>\r\n","import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';\r\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\r\nimport {\r\n\tChangeDetectionStrategy,\r\n\tChangeDetectorRef,\r\n\tComponent,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tInput,\r\n\tNgZone,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tOutput\r\n} from '@angular/core';\r\nimport { generateID, isElementInViewport } from '@bravura/ui/common';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, take, takeUntil, tap } from 'rxjs/operators';\r\n\r\n/**@internal */\r\nclass InternalAlertOject {\r\n\tid: string;\r\n\tdeleted = false;\r\n\tconstructor(\r\n\t\tpublic readonly type: 'success' | 'info' | 'warn' | 'error',\r\n\t\tpublic readonly message: string\r\n\t) {\r\n\t\tthis.id = `bui-alert-cont-alert-${generateID()}`;\r\n\t}\r\n}\r\n\r\n/**\r\n * Use this component in a designated area of a page for displaying notification messages\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-alert-container',\r\n\ttemplateUrl: './alert-container.component.html',\r\n\tstyleUrls: ['./alert-container.component.scss'],\r\n\thost: {\r\n\t\t'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tanimations: [\r\n\t\ttrigger('floatTransition', [\r\n\t\t\ttransition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),\r\n\t\t\ttransition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])\r\n\t\t]),\r\n\t\ttrigger('alertTransition', [\r\n\t\t\tstate('visible', style({})),\r\n\t\t\tstate(\r\n\t\t\t\t'hidden',\r\n\t\t\t\tstyle({\r\n\t\t\t\t\theight: 0,\r\n\t\t\t\t\toverflow: 'hidden',\r\n\t\t\t\t\ttransform: 'scaleY(0)',\r\n\t\t\t\t\topacity: 0,\r\n\t\t\t\t\t'margin-top': '-1rem'\r\n\t\t\t\t})\r\n\t\t\t),\r\n\t\t\ttransition('void => visible', [\r\n\t\t\t\tstyle({ transform: 'translateY(100%)', height: 0, opacity: '0', overflow: 'hidden' }),\r\n\t\t\t\tanimate('250ms cubic-bezier(0.42, 0.0, 0.58, 1.0)')\r\n\t\t\t]),\r\n\t\t\ttransition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])\r\n\t\t])\r\n\t],\r\n\tstandalone: false\r\n})\r\nexport class AlertContainerComponent implements OnInit, OnDestroy {\r\n\t/** The maximum number of messages displayed in the container area. */\r\n\t@Input()\r\n\tmax = 5;\r\n\r\n\t/**\r\n\t * This property determines the behavior for displaying the notifications when the container is outside the viewport.\r\n\t *\r\n\t * `scroll`: The component will try to scroll to reveal the new notifications.\r\n\t * `float`: The component will float the alert panel to the center of the screen for a couple of seconds and move it back to the original position.\r\n\t */\r\n\t@Input()\r\n\toutsideViewportBehavior: 'scroll' | 'float' = 'float';\r\n\r\n\t/**\r\n\t * The number of milliseconds for which the alert container will be floated when new notification arrives.\r\n\t *\r\n\t * This will only take effect when `outsideViewportBehavior` is set to `float` and the container is outside the viewport.\r\n\t */\r\n\t@Input()\r\n\tfloatDuration = 2000;\r\n\r\n\t/**@internal */\r\n\t_alerts: InternalAlertOject[] = [];\r\n\t/**@internal */\r\n\t_floated = false;\r\n\t/**@internal */\r\n\t_floatPanelHidden = true;\r\n\r\n\t/** @ignore Emits whenever the animation is started. */\r\n\treadonly _animationStarted = new Subject<AnimationEvent>();\r\n\t/** @ignore Emits whenever the animation is done. */\r\n\treadonly _animationEnded = new Subject<AnimationEvent>();\r\n\r\n\tprivate _destroyed$ = new Subject<void>();\r\n\tprivate _endFloatingSub?: Subscription;\r\n\r\n\t/** Emits the component instance after initialisation. */\r\n\t@Output()\r\n\tprivate init = new EventEmitter<AlertContainerComponent>();\r\n\r\n\tconstructor(\r\n\t\tprivate zone: NgZone,\r\n\t\tprivate cdRef: ChangeDetectorRef,\r\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\r\n\t\tprivate scroll: ScrollDispatcher\r\n\t) {}\r\n\r\n\tngOnInit(): void {\r\n\t\tconst checkScroll = () => {\r\n\t\t\tif (isElementInViewport(this._elementRef.nativeElement)) {\r\n\t\t\t\tthis._endFloating();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.scroll\r\n\t\t\t.ancestorScrolled(this._elementRef.nativeElement)\r\n\t\t\t.pipe(takeUntil(this._destroyed$))\r\n\t\t\t.subscribe(checkScroll);\r\n\t\tcheckScroll();\r\n\t\tthis.init.emit(this);\r\n\t\tthis.init.complete();\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._destroyed$.next();\r\n\t\tthis._destroyed$.complete();\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t}\r\n\r\n\t/**@internal */\r\n\tget _remaining() {\r\n\t\treturn this._alerts.filter(a => !a.deleted);\r\n\t}\r\n\r\n\t/**@internal */\r\n\tget _width() {\r\n\t\treturn this._elementRef.nativeElement.clientWidth;\r\n\t}\r\n\r\n\t/** Add a message to the notification area */\r\n\tasync notify(type: 'success' | 'info' | 'warn' | 'error', message: string) {\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t\tconst duplicate = this._remaining.find(_a => message === _a.message);\r\n\t\tif (duplicate) {\r\n\t\t\tthis._dismiss(duplicate);\r\n\t\t}\r\n\r\n\t\tconst remaining = this._remaining;\r\n\t\tif (remaining.length >= this.max) {\r\n\t\t\tthis._dismiss(remaining[0]);\r\n\t\t}\r\n\r\n\t\tconst a = new InternalAlertOject(type, message);\r\n\t\tawait this._checkViewport();\r\n\t\tthis.zone.run(() => {\r\n\t\t\tthis._alerts.push(a);\r\n\t\t\tthis.cdRef.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/**@ignore */\r\n\tasync _checkViewport() {\r\n\t\tif (!isElementInViewport(this._elementRef.nativeElement)) {\r\n\t\t\tif (this.outsideViewportBehavior === 'float') {\r\n\t\t\t\tconst d = this._floated ? 0 : 100;\r\n\t\t\t\tthis._floated = true;\r\n\t\t\t\tthis._floatPanelHidden = false;\r\n\t\t\t\tthis._endFloating(this.floatDuration);\r\n\t\t\t\tthis.cdRef.markForCheck();\r\n\t\t\t\tawait timer(d).toPromise();\r\n\t\t\t} else {\r\n\t\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'start', behavior: 'smooth' });\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**@ignore */\r\n\tasync _dismiss(a: InternalAlertOject) {\r\n\t\tconst id = a.id;\r\n\t\ta.deleted = true;\r\n\t\tthis.cdRef.markForCheck();\r\n\t\tawait this._animationEnded.pipe(take(1)).toPromise();\r\n\t\tthis.zone.run(() => {\r\n\t\t\tthis._alerts = this._alerts.filter(_a => _a.id !== id);\r\n\t\t\tthis.cdRef.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/** Remove all messages currently displayed. */\r\n\tasync clear() {\r\n\t\tawait Promise.all(this._remaining.map(a => this._dismiss(a)));\r\n\t\tthis._endFloating();\r\n\t}\r\n\r\n\tprivate _endFloating(_delay = 0) {\r\n\t\tif (!this._floated) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t\tthis._endFloatingSub = timer(_delay)\r\n\t\t\t.pipe(\r\n\t\t\t\ttap(() => {\r\n\t\t\t\t\tthis._floated = false;\r\n\t\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\r\n\t\t\t\t}),\r\n\t\t\t\tdelay(400)\r\n\t\t\t)\r\n\t\t\t.subscribe(() => {\r\n\t\t\t\tthis._floatPanelHidden = true;\r\n\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\r\n\t\t\t});\r\n\t}\r\n}\r\n","<div\r\n\tclass=\"bui-alert-fixed-panel\"\r\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\r\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\r\n>\r\n\t<bui-alert\r\n\t\t*ngFor=\"let a of _alerts\"\r\n\t\t[id]=\"a.id\"\r\n\t\t[type]=\"a.type\"\r\n\t\t[message]=\"a.message\"\r\n\t\tdismissible\r\n\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\r\n\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\r\n\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\r\n\t\t(dismissed)=\"_dismiss(a)\"\r\n\t></bui-alert>\r\n</div>\r\n\r\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\r\n\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\" *ngIf=\"_floated\">\r\n\t\t<bui-alert\r\n\t\t\t*ngFor=\"let a of _alerts\"\r\n\t\t\t[id]=\"a.id\"\r\n\t\t\t[type]=\"a.type\"\r\n\t\t\t[message]=\"a.message\"\r\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\r\n\t\t></bui-alert>\r\n\t</div>\r\n</div>\r\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { IconFontModule } from '@bravura/ui/icon-font';\r\nimport { AlertContainerComponent } from './alert-container.component';\r\nimport { AlertMessageComponent } from './alert-message.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [AlertMessageComponent, AlertContainerComponent],\r\n\timports: [CommonModule, IconFontModule, MatButtonModule],\r\n\texports: [AlertMessageComponent, AlertContainerComponent]\r\n})\r\nexport class AlertModule {}\r\n\r\nexport { AlertMessageComponent, AlertContainerComponent };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2","i3.AlertMessageComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;AACA,MAAM,KAAK,GAAQ;AAClB,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,KAAK,EAAE;CACP;AAED;AACA,MAAM,kBAAkB,GAAG;AAC1B,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,KAAK,EAAE;CACP;AAED;;;;;;;;;;;;;;AAcG;MAaU,qBAAqB,CAAA;;AAmBjC,IAAA,IACI,WAAW,GAAA;QACd,OAAO,IAAI,CAAC,YAAY;;IAEzB,IAAI,WAAW,CAAC,KAAU,EAAA;AACzB,QAAA,IAAI,CAAC,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC;;AAkBjD,IAAA,WAAA,GAAA;;QAlCA,IAAI,CAAA,IAAA,GAA0C,OAAO;;QAIrD,IAAO,CAAA,OAAA,GAAG,EAAE;;AAiBZ,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAU;;AAItC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU;AAKxC,QAAA,IAAA,CAAA,GAAG,GAAG,CAAA,UAAA,E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,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;;4FAG3C,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;AACxD,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,uBAAuB;AACxD,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"bravura-ui-alert.mjs","sources":["../../../projects/ui/alert/alert-message.component.ts","../../../projects/ui/alert/alert-message.component.html","../../../projects/ui/alert/alert-container.component.ts","../../../projects/ui/alert/alert-container.component.html","../../../projects/ui/alert/alert.module.ts","../../../projects/ui/alert/bravura-ui-alert.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\n\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { generateID } from '@bravura/ui/common';\n\n/** @ignore */\nconst ICONS: any = {\n\tsuccess: 'check_circle',\n\tinfo: 'info',\n\twarn: 'report_problem',\n\terror: 'cancel'\n};\n\n/** @ignore */\nconst DEFAULT_POLITENESS = {\n\tsuccess: 'polite',\n\tinfo: 'polite',\n\twarn: 'assertive',\n\terror: 'assertive'\n};\n\n/**\n * An alert style message usually appears in a global notification area.\n *\n * The base color of the message is determined by the `type` of the message and a list of predefined\n * CSS custom properties.\n *\n * ```scss\n * --bui-color-success: #519602;\n * --bui-color-info: #0dcaf0;\n * --bui-color-warning: #ffc107;\n * --bui-color-error: #dc3545;\n * ```\n *\n *\n */\n@Component({\n\tselector: 'bui-alert',\n\ttemplateUrl: './alert-message.component.html',\n\tstyleUrls: ['./alert-message.component.scss'],\n\thost: {\n\t\t'[class]': `'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')`,\n\t\t'[attr.role]': `politeness === 'off' ? 'region' : 'alert'`,\n\t\t'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tstandalone: false\n})\nexport class AlertMessageComponent implements OnInit {\n\t/** @ignore */\n\tstatic ngAcceptInputType_dismissible: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_blink: boolean | string | null | undefined;\n\n\t/** The type of the message, used to derive the icon and base color. */\n\t@Input()\n\ttype: 'success' | 'info' | 'warn' | 'error' = 'error';\n\n\t/** The message to be displayed, HTML supported. */\n\t@Input()\n\tmessage = '';\n\n\t/** Specifies the ARIA live region politeness. */\n\t@Input()\n\tpoliteness!: 'off' | 'polite' | 'assertive';\n\n\t/** Whether to display the button to fire the `dismissed` event. */\n\t@Input()\n\tget dismissible() {\n\t\treturn this._dismissible;\n\t}\n\tset dismissible(value: any) {\n\t\tthis._dismissible = coerceBooleanProperty(value);\n\t}\n\n\t/** To be emitted when the user choose to dismiss the message. The event object is the ID of the element. */\n\t@Output()\n\tdismissed = new EventEmitter<string>();\n\n\t/** To be emitted when the component finishes initialisation. The event object is the ID of the element. */\n\t@Output()\n\tinitialised = new EventEmitter<string>();\n\n\t@Input('id')\n\t@HostBinding('id')\n\t/** @ignore */\n\t_id = `bui-alert-${generateID()}`;\n\n\tprivate _dismissible = false;\n\n\tconstructor() {}\n\n\tngOnInit(): void {\n\t\tthis.politeness = this.politeness || DEFAULT_POLITENESS[this.type];\n\t\tthis.initialised.emit(this._id);\n\t}\n\n\t/** @ignore */\n\tget iconName(): string {\n\t\treturn ICONS[this.type];\n\t}\n\n\t/** @ignore */\n\t_dismiss() {\n\t\tthis.dismissed.emit(this._id);\n\t}\n}\n","<div class=\"bui-alert-backdrop\"></div>\n<div class=\"bui-alert-frame\"></div>\n\n<div class=\"bui-alert-wrapper\">\n\t<div class=\"bui-alert-icon-area\">\n\t\t<mat-icon [buiIcon]=\"iconName\" variant=\"outlined\"></mat-icon>\n\t</div>\n\t<div class=\"bui-alert-content\">\n\t\t@if (message) {\n\t\t\t<div [innerHTML]=\"message\"></div>\n\t\t}\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n@if (dismissible) {\n\t<div class=\"bui-alert-button-area\">\n\t\t<div class=\"bui-alert-button-backdrop\"></div>\n\t\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t\t<mat-icon>cancel</mat-icon>\n\t\t</button>\n\t</div>\n}\n","import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';\r\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\r\nimport {\r\n\tChangeDetectionStrategy,\r\n\tChangeDetectorRef,\r\n\tComponent,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tInput,\r\n\tNgZone,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tOutput\r\n} from '@angular/core';\r\nimport { generateID, isElementInViewport } from '@bravura/ui/common';\r\nimport { Subject, Subscription, timer } from 'rxjs';\r\nimport { delay, take, takeUntil, tap } from 'rxjs/operators';\r\n\r\n/**@internal */\r\nclass InternalAlertOject {\r\n\tid: string;\r\n\tdeleted = false;\r\n\tconstructor(\r\n\t\tpublic readonly type: 'success' | 'info' | 'warn' | 'error',\r\n\t\tpublic readonly message: string\r\n\t) {\r\n\t\tthis.id = `bui-alert-cont-alert-${generateID()}`;\r\n\t}\r\n}\r\n\r\n/**\r\n * Use this component in a designated area of a page for displaying notification messages\r\n *\r\n */\r\n@Component({\r\n\tselector: 'bui-alert-container',\r\n\ttemplateUrl: './alert-container.component.html',\r\n\tstyleUrls: ['./alert-container.component.scss'],\r\n\thost: {\r\n\t\t'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`\r\n\t},\r\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\r\n\tanimations: [\r\n\t\ttrigger('floatTransition', [\r\n\t\t\ttransition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),\r\n\t\t\ttransition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])\r\n\t\t]),\r\n\t\ttrigger('alertTransition', [\r\n\t\t\tstate('visible', style({})),\r\n\t\t\tstate(\r\n\t\t\t\t'hidden',\r\n\t\t\t\tstyle({\r\n\t\t\t\t\theight: 0,\r\n\t\t\t\t\toverflow: 'hidden',\r\n\t\t\t\t\ttransform: 'scaleY(0)',\r\n\t\t\t\t\topacity: 0,\r\n\t\t\t\t\t'margin-top': '-1rem'\r\n\t\t\t\t})\r\n\t\t\t),\r\n\t\t\ttransition('void => visible', [\r\n\t\t\t\tstyle({ transform: 'translateY(100%)', height: 0, opacity: '0', overflow: 'hidden' }),\r\n\t\t\t\tanimate('250ms cubic-bezier(0.42, 0.0, 0.58, 1.0)')\r\n\t\t\t]),\r\n\t\t\ttransition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])\r\n\t\t])\r\n\t],\r\n\tstandalone: false\r\n})\r\nexport class AlertContainerComponent implements OnInit, OnDestroy {\r\n\t/** The maximum number of messages displayed in the container area. */\r\n\t@Input()\r\n\tmax = 5;\r\n\r\n\t/**\r\n\t * This property determines the behavior for displaying the notifications when the container is outside the viewport.\r\n\t *\r\n\t * `scroll`: The component will try to scroll to reveal the new notifications.\r\n\t * `float`: The component will float the alert panel to the center of the screen for a couple of seconds and move it back to the original position.\r\n\t */\r\n\t@Input()\r\n\toutsideViewportBehavior: 'scroll' | 'float' = 'float';\r\n\r\n\t/**\r\n\t * The number of milliseconds for which the alert container will be floated when new notification arrives.\r\n\t *\r\n\t * This will only take effect when `outsideViewportBehavior` is set to `float` and the container is outside the viewport.\r\n\t */\r\n\t@Input()\r\n\tfloatDuration = 2000;\r\n\r\n\t/**@internal */\r\n\t_alerts: InternalAlertOject[] = [];\r\n\t/**@internal */\r\n\t_floated = false;\r\n\t/**@internal */\r\n\t_floatPanelHidden = true;\r\n\r\n\t/** @ignore Emits whenever the animation is started. */\r\n\treadonly _animationStarted = new Subject<AnimationEvent>();\r\n\t/** @ignore Emits whenever the animation is done. */\r\n\treadonly _animationEnded = new Subject<AnimationEvent>();\r\n\r\n\tprivate _destroyed$ = new Subject<void>();\r\n\tprivate _endFloatingSub?: Subscription;\r\n\r\n\t/** Emits the component instance after initialisation. */\r\n\t@Output()\r\n\tprivate init = new EventEmitter<AlertContainerComponent>();\r\n\r\n\tconstructor(\r\n\t\tprivate zone: NgZone,\r\n\t\tprivate cdRef: ChangeDetectorRef,\r\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\r\n\t\tprivate scroll: ScrollDispatcher\r\n\t) {}\r\n\r\n\tngOnInit(): void {\r\n\t\tconst checkScroll = () => {\r\n\t\t\tif (isElementInViewport(this._elementRef.nativeElement)) {\r\n\t\t\t\tthis._endFloating();\r\n\t\t\t}\r\n\t\t};\r\n\t\tthis.scroll\r\n\t\t\t.ancestorScrolled(this._elementRef.nativeElement)\r\n\t\t\t.pipe(takeUntil(this._destroyed$))\r\n\t\t\t.subscribe(checkScroll);\r\n\t\tcheckScroll();\r\n\t\tthis.init.emit(this);\r\n\t\tthis.init.complete();\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._destroyed$.next();\r\n\t\tthis._destroyed$.complete();\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t}\r\n\r\n\t/**@internal */\r\n\tget _remaining() {\r\n\t\treturn this._alerts.filter(a => !a.deleted);\r\n\t}\r\n\r\n\t/**@internal */\r\n\tget _width() {\r\n\t\treturn this._elementRef.nativeElement.clientWidth;\r\n\t}\r\n\r\n\t/** Add a message to the notification area */\r\n\tasync notify(type: 'success' | 'info' | 'warn' | 'error', message: string) {\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t\tconst duplicate = this._remaining.find(_a => message === _a.message);\r\n\t\tif (duplicate) {\r\n\t\t\tthis._dismiss(duplicate);\r\n\t\t}\r\n\r\n\t\tconst remaining = this._remaining;\r\n\t\tif (remaining.length >= this.max) {\r\n\t\t\tthis._dismiss(remaining[0]);\r\n\t\t}\r\n\r\n\t\tconst a = new InternalAlertOject(type, message);\r\n\t\tawait this._checkViewport();\r\n\t\tthis.zone.run(() => {\r\n\t\t\tthis._alerts.push(a);\r\n\t\t\tthis.cdRef.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/**@ignore */\r\n\tasync _checkViewport() {\r\n\t\tif (!isElementInViewport(this._elementRef.nativeElement)) {\r\n\t\t\tif (this.outsideViewportBehavior === 'float') {\r\n\t\t\t\tconst d = this._floated ? 0 : 100;\r\n\t\t\t\tthis._floated = true;\r\n\t\t\t\tthis._floatPanelHidden = false;\r\n\t\t\t\tthis._endFloating(this.floatDuration);\r\n\t\t\t\tthis.cdRef.markForCheck();\r\n\t\t\t\tawait timer(d).toPromise();\r\n\t\t\t} else {\r\n\t\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'start', behavior: 'smooth' });\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**@ignore */\r\n\tasync _dismiss(a: InternalAlertOject) {\r\n\t\tconst id = a.id;\r\n\t\ta.deleted = true;\r\n\t\tthis.cdRef.markForCheck();\r\n\t\tawait this._animationEnded.pipe(take(1)).toPromise();\r\n\t\tthis.zone.run(() => {\r\n\t\t\tthis._alerts = this._alerts.filter(_a => _a.id !== id);\r\n\t\t\tthis.cdRef.markForCheck();\r\n\t\t});\r\n\t}\r\n\r\n\t/** Remove all messages currently displayed. */\r\n\tasync clear() {\r\n\t\tawait Promise.all(this._remaining.map(a => this._dismiss(a)));\r\n\t\tthis._endFloating();\r\n\t}\r\n\r\n\tprivate _endFloating(_delay = 0) {\r\n\t\tif (!this._floated) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tthis._endFloatingSub?.unsubscribe();\r\n\t\tthis._endFloatingSub = timer(_delay)\r\n\t\t\t.pipe(\r\n\t\t\t\ttap(() => {\r\n\t\t\t\t\tthis._floated = false;\r\n\t\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\r\n\t\t\t\t}),\r\n\t\t\t\tdelay(400)\r\n\t\t\t)\r\n\t\t\t.subscribe(() => {\r\n\t\t\t\tthis._floatPanelHidden = true;\r\n\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\r\n\t\t\t});\r\n\t}\r\n}\r\n","<div\n\tclass=\"bui-alert-fixed-panel\"\n\t[style.opacity]=\"_floatPanelHidden ? 1 : 0\"\n\t[class.bui-alert-fixed-panel-blink]=\"outsideViewportBehavior === 'scroll'\"\n>\n\t@for (a of _alerts; track a) {\n\t\t<bui-alert\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\tdismissible\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t\t(dismissed)=\"_dismiss(a)\"\n\t\t></bui-alert>\n\t}\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t@if (_floated) {\n\t\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\">\n\t\t\t@for (a of _alerts; track a) {\n\t\t\t\t<bui-alert\n\t\t\t\t\t[id]=\"a.id\"\n\t\t\t\t\t[type]=\"a.type\"\n\t\t\t\t\t[message]=\"a.message\"\n\t\t\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t\t\t></bui-alert>\n\t\t\t}\n\t\t</div>\n\t}\n</div>\n","import { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { IconFontModule } from '@bravura/ui/icon-font';\r\nimport { AlertContainerComponent } from './alert-container.component';\r\nimport { AlertMessageComponent } from './alert-message.component';\r\n\r\n@NgModule({\r\n\tdeclarations: [AlertMessageComponent, AlertContainerComponent],\r\n\timports: [CommonModule, IconFontModule, MatButtonModule],\r\n\texports: [AlertMessageComponent, AlertContainerComponent]\r\n})\r\nexport class AlertModule {}\r\n\r\nexport { AlertMessageComponent, AlertContainerComponent };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.AlertMessageComponent"],"mappings":";;;;;;;;;;;;;;;AAKA;AACA,MAAM,KAAK,GAAQ;AAClB,IAAA,OAAO,EAAE,cAAc;AACvB,IAAA,IAAI,EAAE,MAAM;AACZ,IAAA,IAAI,EAAE,gBAAgB;AACtB,IAAA,KAAK,EAAE;CACP;AAED;AACA,MAAM,kBAAkB,GAAG;AAC1B,IAAA,OAAO,EAAE,QAAQ;AACjB,IAAA,IAAI,EAAE,QAAQ;AACd,IAAA,IAAI,EAAE,WAAW;AACjB,IAAA,KAAK,EAAE;CACP;AAED;;;;;;;;;;;;;;AAcG;MAaU,qBAAqB,CAAA;;AAmBjC,IAAA,IACI,WAAW,GAAA;QACd,OAAO,IAAI,CAAC,YAAY;;IAEzB,IAAI,WAAW,CAAC,KAAU,EAAA;AACzB,QAAA,IAAI,CAAC,YAAY,GAAG,qBAAqB,CAAC,KAAK,CAAC;;AAkBjD,IAAA,WAAA,GAAA;;QAlCA,IAAI,CAAA,IAAA,GAA0C,OAAO;;QAIrD,IAAO,CAAA,OAAA,GAAG,EAAE;;AAiBZ,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,YAAY,EAAU;;AAItC,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,YAAY,EAAU;AAKxC,QAAA,IAAA,CAAA,GAAG,GAAG,CAAA,UAAA,EAAa,UA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CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAJR,YAAA,EAAA,CAAA,qBAAqB,EAAE,uBAAuB,CACnD,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,eAAe,CAC7C,EAAA,OAAA,EAAA,CAAA,qBAAqB,EAAE,uBAAuB,CAAA,EAAA,CAAA,CAAA;AAE5C,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHb,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;;2FAG3C,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;AAC9D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;AACxD,oBAAA,OAAO,EAAE,CAAC,qBAAqB,EAAE,uBAAuB;AACxD,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
2
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { Directive, EventEmitter, Input, Output, Inject, Optional, NgModule } from '@angular/core';
|
|
3
|
+
import { Directive, EventEmitter, DOCUMENT, Input, Output, Inject, Optional, NgModule } from '@angular/core';
|
|
5
4
|
import { debounceTime, take } from 'rxjs/operators';
|
|
5
|
+
import { CommonModule } from '@angular/common';
|
|
6
6
|
import { MatProgressSpinner, MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
7
7
|
import * as i1 from '@angular/material/button';
|
|
8
8
|
import { MatButtonModule } from '@angular/material/button';
|
|
@@ -28,10 +28,10 @@ class SizingMonitorDirective {
|
|
|
28
28
|
constructor(element) {
|
|
29
29
|
this.element = element;
|
|
30
30
|
}
|
|
31
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
32
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
31
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SizingMonitorDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
32
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: SizingMonitorDirective, isStandalone: false, selector: "[buiSizingMonitor]", ngImport: i0 }); }
|
|
33
33
|
}
|
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SizingMonitorDirective, decorators: [{
|
|
35
35
|
type: Directive,
|
|
36
36
|
args: [{
|
|
37
37
|
selector: '[buiSizingMonitor]',
|
|
@@ -264,10 +264,10 @@ class SizingDirective {
|
|
|
264
264
|
_toNumber(s) {
|
|
265
265
|
return (s === '~' ? Infinity : Number(s)) || -Infinity;
|
|
266
266
|
}
|
|
267
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
268
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
267
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SizingDirective, deps: [{ token: DOCUMENT }, { token: SizingMonitorDirective, optional: true }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
268
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: SizingDirective, isStandalone: false, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: { buiSizing: "buiSizing", sizingBy: "sizingBy", buiSizingBy: "buiSizingBy", buiFixedHeight: "buiFixedHeight" }, outputs: { buiResized: "buiResized" }, usesOnChanges: true, ngImport: i0 }); }
|
|
269
269
|
}
|
|
270
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
270
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SizingDirective, decorators: [{
|
|
271
271
|
type: Directive,
|
|
272
272
|
args: [{
|
|
273
273
|
selector: '[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]',
|
|
@@ -385,10 +385,10 @@ class AwaitDirective {
|
|
|
385
385
|
}
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
389
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
388
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AwaitDirective, deps: [{ token: i0.ElementRef }, { token: i1.MatButton, optional: true }, { token: i1.MatIconButton, optional: true }, { token: i1.MatIconAnchor, optional: true }, { token: i1.MatFabButton, optional: true }, { token: i1.MatFabAnchor, optional: true }, { token: i1.MatMiniFabButton, optional: true }, { token: i1.MatMiniFabAnchor, optional: true }, { token: DOCUMENT }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
389
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: AwaitDirective, isStandalone: false, selector: "[buiAwait]", inputs: { buiAwait: "buiAwait", buiAwaitAriaLabel: "buiAwaitAriaLabel", buiAwaitDiameter: "buiAwaitDiameter" }, ngImport: i0 }); }
|
|
390
390
|
}
|
|
391
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
391
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AwaitDirective, decorators: [{
|
|
392
392
|
type: Directive,
|
|
393
393
|
args: [{
|
|
394
394
|
selector: '[buiAwait]',
|
|
@@ -457,10 +457,10 @@ class ObserveContentClassDirective {
|
|
|
457
457
|
this.classToRemove.push(...classes);
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
461
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
460
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ObserveContentClassDirective, deps: [{ token: i1$1.ContentObserver }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
461
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.0.6", type: ObserveContentClassDirective, isStandalone: false, selector: "[bui-class.empty],[bui-class.not-empty],[bui-class.no-text],[bui-class.has-text]", inputs: { classEmpty: ["bui-class.empty", "classEmpty"], classNotEmpty: ["bui-class.not-empty", "classNotEmpty"], classNoText: ["bui-class.no-text", "classNoText"], classHasText: ["bui-class.has-text", "classHasText"] }, ngImport: i0 }); }
|
|
462
462
|
}
|
|
463
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
463
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ObserveContentClassDirective, decorators: [{
|
|
464
464
|
type: Directive,
|
|
465
465
|
args: [{
|
|
466
466
|
selector: '[bui-class.empty],[bui-class.not-empty],[bui-class.no-text],[bui-class.has-text]',
|
|
@@ -484,15 +484,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
|
|
|
484
484
|
* For functionality that cannot be easily achieved via CSS.
|
|
485
485
|
*/
|
|
486
486
|
class BehaviorModule {
|
|
487
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
488
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
487
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BehaviorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
488
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.0.6", ngImport: i0, type: BehaviorModule, declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective, ObserveContentClassDirective], imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, ObserversModule], exports: [SizingDirective,
|
|
489
489
|
SizingMonitorDirective,
|
|
490
490
|
AwaitDirective,
|
|
491
491
|
MatProgressSpinnerModule,
|
|
492
492
|
ObserveContentClassDirective] }); }
|
|
493
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
493
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BehaviorModule, imports: [CommonModule, MatButtonModule, MatProgressSpinnerModule, ObserversModule, MatProgressSpinnerModule] }); }
|
|
494
494
|
}
|
|
495
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: BehaviorModule, decorators: [{
|
|
496
496
|
type: NgModule,
|
|
497
497
|
args: [{
|
|
498
498
|
declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective, ObserveContentClassDirective],
|