@bravura/ui 8.0.0 → 8.0.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/CHANGELOG.md CHANGED
@@ -1,13 +1,16 @@
1
1
  # Change history
2
2
 
3
- ## 8.0.0 (2025-12-30)
3
+ ## <small>8.0.1 (2025-12-30)</small>
4
+
5
+ * fix: reinstate material components ([8f14b58](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/8f14b58))
4
6
 
5
- * build: upgrade angular ([854ad52](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/854ad52))
7
+ ## 8.0.0 (2025-12-30)
6
8
 
9
+ - build: upgrade angular ([854ad52](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/854ad52))
7
10
 
8
11
  ### BREAKING CHANGE
9
12
 
10
- * upgrade angular to 21
13
+ - upgrade angular to 21
11
14
 
12
15
  ## 7.0.0 (2025-12-30)
13
16
 
@@ -75,7 +75,7 @@ class AlertMessageComponent {
75
75
  this.dismissed.emit(this._id);
76
76
  }
77
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 }); }
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}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])){position:relative;border-radius:5px}: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}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}.bui-alert-frame{border-style:solid}: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}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-area{top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}.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}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-icon-area{color:var(--bui-bg-card)}: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)}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}: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 }); }
79
79
  }
80
80
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: AlertMessageComponent, decorators: [{
81
81
  type: Component,
@@ -83,7 +83,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
83
83
  '[class]': `'bui-alert bui-host bui-alert-' + (type === 'warn' ? 'warning' : type) + (dismissible ? ' bui-alert-dismissible' : '')`,
84
84
  '[attr.role]': `politeness === 'off' ? 'region' : 'alert'`,
85
85
  '[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`
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"] }]
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}:host-context([dir=rtl]) :host(:not([hidden])){padding:12px 19px 12px 14px}:host(:not([hidden])){position:relative;border-radius:5px}: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}:host-context([dir=rtl]) .bui-alert-frame{border-width:1px 5px 1px 1px}.bui-alert-frame{border-style:solid}: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}:host-context([dir=rtl]) .bui-alert-button-area{right:unset;left:-15px}.bui-alert-button-area{top:-15px;width:40px;height:40px;border-radius:20px;display:flex;align-items:center;justify-content:center}.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}:host-context([dir=rtl]) .bui-alert-icon-area{margin-right:unset;margin-left:14px}.bui-alert-icon-area{color:var(--bui-bg-card)}: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)}.bui-alert-content{z-index:1;flex-grow:1;display:flex;flex-direction:column;justify-content:center;gap:1rem}: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"] }]
87
87
  }], ctorParameters: () => [], propDecorators: { type: [{
88
88
  type: Input
89
89
  }], message: [{
@@ -245,7 +245,7 @@ class AlertContainerComponent {
245
245
  });
246
246
  }
247
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: [
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}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame{justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.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: [
249
249
  trigger('floatTransition', [
250
250
  transition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),
251
251
  transition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])
@@ -291,7 +291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
291
291
  ]),
292
292
  transition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])
293
293
  ])
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"] }]
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}.bui-alert-float-panel-frame:not([hidden]){display:flex}.bui-alert-float-panel-frame{justify-content:center;align-items:center;flex-direction:column;transition:background-color .4s cubic-bezier(.25,0,.55,.2)}.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
295
  }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }, { type: i1$1.ScrollDispatcher }], propDecorators: { max: [{
296
296
  type: Input
297
297
  }], outsideViewportBehavior: [{
@@ -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 { 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,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;;sBAIhB;;sBASA;;sBAQA;;sBAmBA;;;ME9FW,WAAW,CAAA;8GAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,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
+ {"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,G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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;;;;"}
@@ -267,13 +267,13 @@ class DiscreteInputComponent {
267
267
  this.onContainerClick();
268
268
  }
269
269
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputComponent, deps: [{ token: i1.FocusMonitor }, { token: i0.ElementRef }, { token: MAT_FORM_FIELD, optional: true }, { token: i2.NgControl, optional: true, self: true }, { token: i2.NgForm, optional: true }, { token: i2.FormGroupDirective, optional: true }, { token: i3.ErrorStateMatcher }], target: i0.ɵɵFactoryTarget.Component }); }
270
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DiscreteInputComponent, isStandalone: false, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], autocomplete: "autocomplete", sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
270
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: DiscreteInputComponent, isStandalone: false, selector: "bui-discrete-input", inputs: { type: "type", separator: "separator", accept: "accept", userAriaDescribedBy: ["aria-describedby", "userAriaDescribedBy"], autocomplete: "autocomplete", sizeSpec: "sizeSpec", placeholder: "placeholder", required: "required", disabled: "disabled", value: "value" }, host: { classAttribute: "bui-discrete-input bui-host" }, providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], viewQueries: [{ propertyName: "inputParts", predicate: ["part"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-element{color:currentColor;caret-color:auto}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"], dependencies: [{ kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }] }); }
271
271
  }
272
272
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: DiscreteInputComponent, decorators: [{
273
273
  type: Component,
274
274
  args: [{ selector: 'bui-discrete-input', providers: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }], host: {
275
275
  class: 'bui-discrete-input bui-host'
276
- }, standalone: false, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit;color:currentColor;caret-color:auto}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
276
+ }, standalone: false, template: "<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n", styles: [".bui-discrete-input-container{display:flex;align-items:center}.bui-discrete-input-element{border:1px solid rgba(128,128,128,.4);border-radius:3px;background:none;padding:0;text-align:center;width:1.5em;height:1.5em;font-size:inherit}.bui-discrete-input-element:not(:last-child){margin-right:.25em}.bui-discrete-input-element:focus-visible{outline-style:solid;outline-width:2px;outline-offset:-1px}.bui-discrete-input-element[type=number]::-webkit-inner-spin-button,.bui-discrete-input-element[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.bui-discrete-input-element[type=number]{-moz-appearance:textfield}.bui-discrete-input-element{color:currentColor;caret-color:auto}.bui-discrete-input-spacer{margin-right:.25em;vertical-align:middle}\n"] }]
277
277
  }], ctorParameters: () => [{ type: i1.FocusMonitor }, { type: i0.ElementRef }, { type: i4.MatFormField, decorators: [{
278
278
  type: Optional
279
279
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t},\n\tstandalone: false\n})\nexport class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges = new Subject<void>();\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\t@Input()\n\tautocomplete?: string = 'off';\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number, event: Event): void {\n\t\tlet v = control.value && control.value[0];\n\t\tconst rawValue = (event.target as HTMLInputElement).value;\n\t\tif (rawValue.length > 1) {\n\t\t\tthis._replaceText(rawValue, event);\n\t\t\treturn;\n\t\t}\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tthis._replaceText(text, event);\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\tprivate _replaceText(text: string | undefined, event: Event) {\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DiscreteInputComponent } from './discrete-input.component';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\n\r\n@NgModule({\r\n\tdeclarations: [DiscreteInputComponent],\r\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\r\n\texports: [DiscreteInputComponent]\r\n})\r\nexport class DiscreteInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BA;;;;;;;;;;;;;;AAcG;MAWU,sBAAsB,CAAA;;aAE3B,IAAM,CAAA,MAAA,GAAG,CAAH,CAAK;;AAyDlB,IAAA,IAAI,gBAAgB,GAAA;AACnB,QAAA,OAAO,IAAI;;;AAIZ,IAAA,IAAI,KAAK,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;;AAGhD;;;AAGG;AACH,IAAA,IACI,QAAQ,GAAA;QACX,OAAO,IAAI,CAAC,SAAS;;IAEtB,IAAI,QAAQ,CAAC,IAAc,EAAA;QAC1B,IAAI,IAAI,GAAG,CAAC;AACZ,QAAA,IAAI,CAAC,aAAa,GAAG,EAAE;QACvB,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAI;YACrB,IAAI,IAAI,CAAC;YACT,IAAI,CAAC,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;AACxB,gBAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC;;AAE/B,SAAC,CAAC;QACF,IAAI,IAAI,KAAK,IAAI,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A,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHrB,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;;2FAG/D,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACT,YAAY,EAAE,CAAC,sBAAsB,CAAC;oBACtC,OAAO,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,UAAU,CAAC;oBAC5E,OAAO,EAAE,CAAC,sBAAsB;AAChC,iBAAA;;;ACXD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-discrete-input.mjs","sources":["../../../projects/ui/discrete-input/discrete-input.component.ts","../../../projects/ui/discrete-input/discrete-input.component.html","../../../projects/ui/discrete-input/discrete-input.module.ts","../../../projects/ui/discrete-input/bravura-ui-discrete-input.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tComponent,\n\tElementRef,\n\tInject,\n\tInput,\n\tOnDestroy,\n\tOptional,\n\tQueryList,\n\tSelf,\n\tViewChildren\n} from '@angular/core';\nimport {\n\tAbstractControl,\n\tControlValueAccessor,\n\tFormGroupDirective,\n\tNgControl,\n\tNgForm,\n\tUntypedFormArray,\n\tUntypedFormControl,\n\tUntypedFormGroup,\n\tValidators\n} from '@angular/forms';\nimport { ErrorStateMatcher } from '@angular/material/core';\nimport { MAT_FORM_FIELD, MatFormField, MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject } from 'rxjs';\n\n/**\n * Custom `MatFormFieldControl` with an individual input box for each character, suitable for fixed-length fields,\n * such as secondary PIN inputs, TFNs, or BSB code etc.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <mat-form-field>\n * <bui-discrete-input></bui-discrete-input>\n * </mat-form-field>\n * ```\n *\n */\n@Component({\n\tselector: 'bui-discrete-input',\n\ttemplateUrl: 'discrete-input.component.html',\n\tstyleUrls: ['discrete-input.component.scss'],\n\tproviders: [{ provide: MatFormFieldControl, useExisting: DiscreteInputComponent }],\n\thost: {\n\t\tclass: 'bui-discrete-input bui-host'\n\t},\n\tstandalone: false\n})\nexport class DiscreteInputComponent implements MatFormFieldControl<string>, ControlValueAccessor, OnDestroy {\n\t/** @ignore */\n\tstatic nextId = 0;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string | null | undefined;\n\t/** @ignore */\n\tstatic ngAcceptInputType_required: boolean | string | null | undefined;\n\n\t/** @ignore */ parts: UntypedFormArray;\n\t/** @ignore */ group: UntypedFormGroup;\n\t/** Emits whenever the component state changes. */\n\tstateChanges = new Subject<void>();\n\t/** Whether the control is focused. */\n\tfocused: boolean;\n\n\t/** The type of input boxes */\n\t@Input()\n\ttype: 'text' | 'number' | 'password' = 'text';\n\n\t/** Input boxes are separated in groups. This specifies the characters displayed between two groups. */\n\t@Input()\n\tseparator = ' ';\n\n\t/**\n\t * A list of characters accepted in the inputs, for example `0-9`, `a-zA-Z0-9`\n\t * @example '0-9'\n\t */\n\t@Input()\n\taccept?: string;\n\n\t/** @ignore */ id = `bui-discrete-input-${DiscreteInputComponent.nextId++}`;\n\n\t/** Value of aria-describedby that should be merged with the described-by ids which are set by the form-field. */\n\t@Input('aria-describedby') userAriaDescribedBy?: string;\n\n\t@ViewChildren('part', { read: ElementRef }) private inputParts!: QueryList<ElementRef<HTMLInputElement>>;\n\n\t/**@ignore */\n\t_formField: MatFormField;\n\n\t/**@ignore */\n\tngControl: NgControl;\n\n\t@Input()\n\tautocomplete?: string = 'off';\n\n\tprivate _sizeSpec: number[] = [];\n\n\tprivate _required = false;\n\n\tprivate _placeholder?: string;\n\tprivate _disabled = false;\n\tprivate _separatorPos: number[] = [];\n\n\t/** @ignore */ onChange = (_: any) => {};\n\t/** @ignore */ onTouched = () => {};\n\n\t/** @ignore */\n\tget shouldLabelFloat() {\n\t\treturn true;\n\t}\n\n\t/** @ignore */\n\tget empty() {\n\t\treturn this.parts.controls.every(c => !c.value);\n\t}\n\n\t/**\n\t * Defines the length and grouping of the input.\n\t * @default [2, 2, 2]\n\t */\n\t@Input()\n\tget sizeSpec(): number[] {\n\t\treturn this._sizeSpec;\n\t}\n\tset sizeSpec(spec: number[]) {\n\t\tlet size = 0;\n\t\tthis._separatorPos = [];\n\t\tspec.forEach((n, i) => {\n\t\t\tsize += n;\n\t\t\tif (i < spec.length - 1) {\n\t\t\t\tthis._separatorPos.push(size);\n\t\t\t}\n\t\t});\n\t\tif (size !== this.parts.length) {\n\t\t\tconst v = this.value;\n\t\t\tthis.parts.clear({ emitEvent: false });\n\t\t\tfor (let i = 0; i < size; i++) {\n\t\t\t\tthis.parts.setControl(\n\t\t\t\t\ti,\n\t\t\t\t\tnew UntypedFormControl(null, [Validators.required, Validators.minLength(1), Validators.maxLength(1)])\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.value = v;\n\t\t\tthis._sizeSpec = spec;\n\t\t}\n\t}\n\n\t/** The placeholder for this control. */\n\t@Input()\n\tget placeholder(): string {\n\t\treturn this._placeholder!;\n\t}\n\tset placeholder(value: string) {\n\t\tthis._placeholder = value;\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is required. */\n\t@Input()\n\tget required(): boolean {\n\t\treturn this._required;\n\t}\n\tset required(value: boolean) {\n\t\tthis._required = coerceBooleanProperty(value);\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** Whether the control is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._disabled = coerceBooleanProperty(value);\n\t\tthis._disabled ? this.parts.disable() : this.parts.enable();\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** The value of the control. */\n\t@Input()\n\tget value(): string {\n\t\treturn this.parts.controls\n\t\t\t.map(c => c.value)\n\t\t\t.filter(c => c)\n\t\t\t.join('');\n\t}\n\tset value(v: string) {\n\t\tv = v || '';\n\t\tfor (let i = 0; i < this.parts.controls.length; i++) {\n\t\t\tthis.parts.controls[i]?.setValue(v[i]);\n\t\t}\n\t\tthis.stateChanges.next();\n\t}\n\n\t/** @ignore */\n\tget _colorSuffix(): string {\n\t\treturn this.errorState ? 'warn' : this._formField?.color || 'primary';\n\t}\n\n\tconstructor(\n\t\tprivate _focusMonitor: FocusMonitor,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Optional() @Inject(MAT_FORM_FIELD) formField: MatFormField,\n\t\t@Optional() @Self() control: NgControl,\n\t\t@Optional() _parentForm: NgForm,\n\t\t@Optional() _parentFormGroup: FormGroupDirective,\n\t\t_defaultErrorStateMatcher: ErrorStateMatcher\n\t) {\n\t\tthis.parts = new UntypedFormArray([]);\n\t\tthis.group = new UntypedFormGroup({ parts: this.parts });\n\t\tthis.sizeSpec = [2, 2, 2];\n\t\tthis._formField = formField;\n\t\tthis.focused = false;\n\t\tthis.stateChanges = new Subject<void>();\n\n\t\tthis.ngControl = control;\n\t\tif (this.ngControl != null) {\n\t\t\tthis.ngControl.valueAccessor = this;\n\t\t}\n\n\t\tthis._focusMonitor.monitor(this._elementRef, true).subscribe(origin => {\n\t\t\tif (this.focused && !origin) {\n\t\t\t\tthis.onTouched();\n\t\t\t}\n\t\t\tthis.focused = !!origin;\n\t\t\tthis.stateChanges.next();\n\t\t});\n\t}\n\n\t/** @ignore */ errorState = false;\n\t/** @ignore */ controlType?: string | undefined;\n\t/** @ignore */ autofilled?: boolean | undefined;\n\n\t/** @ignore */\n\tngOnDestroy() {\n\t\tthis.stateChanges.complete();\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/** @ignore */\n\tsetDescribedByIds(ids: string[]) {\n\t\tconst controlElement = this._elementRef.nativeElement.querySelector('.bui-discrete-input-container');\n\t\tcontrolElement!.setAttribute('aria-describedby', ids.join(' '));\n\t}\n\n\t/** @ignore */\n\tonContainerClick() {\n\t\tconst l = this.parts.controls.length;\n\t\tfor (let i = 0; i < l; i++) {\n\t\t\tif (this.parts.controls[i].invalid || i === l - 1) {\n\t\t\t\tthis._focusMonitor.focusVia(this.inputParts.get(i)!, 'program');\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @ignore */\n\twriteValue(v: string): void {\n\t\tthis.value = v;\n\t}\n\n\t/** @ignore */\n\tregisterOnChange(fn: any): void {\n\t\tthis.onChange = fn;\n\t}\n\n\t/** @ignore */\n\tregisterOnTouched(fn: any): void {\n\t\tthis.onTouched = fn;\n\t}\n\n\t/** @ignore */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabled = isDisabled;\n\t}\n\n\t/** @ignore */\n\t_handleInput(control: AbstractControl, index: number, event: Event): void {\n\t\tlet v = control.value && control.value[0];\n\t\tconst rawValue = (event.target as HTMLInputElement).value;\n\t\tif (rawValue.length > 1) {\n\t\t\tthis._replaceText(rawValue, event);\n\t\t\treturn;\n\t\t}\n\t\tcontrol.setValue(v);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (!control.errors && nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\n\t\tthis.onChange(this.value);\n\t}\n\n\t/** @ignore */\n\t_handleBeforeInput(index: number, event: InputEvent): void {\n\t\tconst v = event.data;\n\t\tif (this.accept && v && !new RegExp(`[${this.accept}]`).test(v)) {\n\t\t\tevent.preventDefault();\n\t\t\tevent.stopPropagation();\n\t\t\treturn;\n\t\t}\n\t\tconst inp = this.inputParts.get(index)!.nativeElement;\n\t\tif (v && inp.value) {\n\t\t\tinp.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_focusPart(elemRef: ElementRef<HTMLInputElement>) {\n\t\tthis._focusMonitor.focusVia(elemRef, 'program');\n\t}\n\n\t/** @ignore */\n\t_consumeKey(event: Event) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t}\n\n\t/** @ignore */\n\t_leftArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst prevElement = this.inputParts.get(index - 1);\n\t\tif (prevElement) {\n\t\t\tthis._focusPart(prevElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_rightArrow(index: number, event: Event) {\n\t\tthis._consumeKey(event);\n\t\tconst nextElement = this.inputParts.get(index + 1);\n\t\tif (nextElement) {\n\t\t\tthis._focusPart(nextElement);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_handleBackspace(control: AbstractControl, index: number): void {\n\t\tconst prevElement = index && this.inputParts.get(index - 1);\n\t\tif (!control.value && prevElement) {\n\t\t\tthis._focusMonitor.focusVia(prevElement, 'program');\n\t\t} else if (control.value) {\n\t\t\tcontrol.setValue('');\n\t\t\tthis.onChange(this.value);\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onPaste(event: ClipboardEvent) {\n\t\tlet text = event.clipboardData?.getData('text');\n\t\tthis._replaceText(text, event);\n\t}\n\n\t/** @ignore */\n\t_separatorRequired(index: number) {\n\t\treturn this._separatorPos.includes(index + 1);\n\t}\n\n\t/** @ignore */\n\t_placeholderAt(index: number) {\n\t\treturn this._placeholder && this._placeholder[index];\n\t}\n\n\tprivate _replaceText(text: string | undefined, event: Event) {\n\t\tif (text) {\n\t\t\tif (this.accept) {\n\t\t\t\ttext = text.replace(new RegExp(`[^${this.accept}]`, 'gi'), '');\n\t\t\t}\n\t\t\tthis.value = text;\n\t\t\tthis.onChange(this.value);\n\t\t}\n\n\t\tevent.preventDefault();\n\t\tthis.onContainerClick();\n\t}\n}\n","<div\n\trole=\"group\"\n\tclass=\"bui-discrete-input-container\"\n\t[formGroup]=\"group\"\n\t[attr.aria-labelledby]=\"_formField?.getLabelId()\"\n>\n\t<ng-container [formArrayName]=\"'parts'\">\n\t\t@for (p of parts.controls; track p; let i = $index) {\n\t\t\t<input\n\t\t\t\tclass=\"bui-discrete-input-element bui-outline-{{ _colorSuffix }}\"\n\t\t\t\t[formControlName]=\"i\"\n\t\t\t\t[attr.aria-label]=\"'character ' + (i + 1)\"\n\t\t\t\t(input)=\"_handleInput(p, i, $event)\"\n\t\t\t\t(beforeinput)=\"_handleBeforeInput(i, $event)\"\n\t\t\t\t(keydown.backspace)=\"_handleBackspace(p, i)\"\n\t\t\t\t(keydown.arrowup)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowdown)=\"_consumeKey($event)\"\n\t\t\t\t(keydown.arrowleft)=\"_leftArrow(i, $event)\"\n\t\t\t\t(keydown.arrowright)=\"_rightArrow(i, $event)\"\n\t\t\t\t[attr.placeholder]=\"_placeholderAt(i)\"\n\t\t\t\t#part\n\t\t\t\t(click)=\"$event.stopPropagation()\"\n\t\t\t\t(paste)=\"_onPaste($event)\"\n\t\t\t\t[type]=\"['text', 'number', 'password'].includes(type) ? type : 'text'\"\n\t\t\t\t[attr.inputmode]=\"type === 'number' ? 'decimal' : undefined\"\n\t\t\t\tautocapitalize=\"none\"\n\t\t\t/>\n\t\t\t@if (_separatorRequired(i)) {\n\t\t\t\t<span class=\"bui-discrete-input-spacer\">{{ separator }}</span>\n\t\t\t}\n\t\t}\n\t</ng-container>\n</div>\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { DiscreteInputComponent } from './discrete-input.component';\r\nimport { MatFormFieldModule } from '@angular/material/form-field';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { A11yModule } from '@angular/cdk/a11y';\r\n\r\n@NgModule({\r\n\tdeclarations: [DiscreteInputComponent],\r\n\timports: [CommonModule, MatFormFieldModule, ReactiveFormsModule, A11yModule],\r\n\texports: [DiscreteInputComponent]\r\n})\r\nexport class DiscreteInputModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;AA4BA;;;;;;;;;;;;;;AAcG;MAWU,sBAAsB,CAAA;;aAE3B,IA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ory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component }); }
382
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FileUploadComponent, isStandalone: false, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i8.PercentPipe, name: "percent" }], animations: [
382
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: FileUploadComponent, isStandalone: false, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i4.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i5.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i7.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: i8.PercentPipe, name: "percent" }], animations: [
383
383
  trigger('slideOut', [
384
384
  transition('* => *', [
385
385
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
@@ -400,7 +400,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
400
400
  query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
401
401
  ])
402
402
  ])
403
- ], standalone: false, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
403
+ ], standalone: false, template: "<div class=\"bui-file-upload-container\">\n\t@if (!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)) {\n\t\t<div class=\"bui-file-upload-hint\">\n\t\t\t@if (_invalidFilesDragged) {\n\t\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t\t} @else {\n\t\t\t\t@if (!_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t\t@if (_overFrame && !_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t\t}\n\t\t\t\t@if (_overDropZone) {\n\t\t\t\t\t<div class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t@if (_uploadingItems.length) {\n\t\t<div\n\t\t\tclass=\"bui-file-upload-list\"\n\t\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t>\n\t\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\t\t\t@for (item of _uploadingItems; track item; let idx = $index) {\n\t\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t\t@if (item.done && !item.downloading) {\n\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t\t@if (!item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t@if (item.downloading) {\n\t\t\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\"></mat-progress-bar>\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t@if (item.done) {\n\t\t\t\t\t\t\t\t\t100%\n\t\t\t\t\t\t\t\t} @else {\n\t\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t@if (idx < _uploadingItems.length - 1) {\n\t\t\t\t\t<mat-divider></mat-divider>\n\t\t\t\t}\n\t\t\t}\n\t\t</div>\n\t}\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t@if (_fileSizeExceedMsg) {\n\t\t<div class=\"bui-color-warn bui-file-size-exceed\">\n\t\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t\t</div>\n\t}\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mat-progress-bar-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
404
404
  }], ctorParameters: () => [{ type: FileUploadService }], propDecorators: { uploadActionText: [{
405
405
  type: Input
406
406
  }], fileUploadedLabel: [{