@bravura/ui 1.25.0 → 1.26.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/alert/testing/bravura-ui-alert-testing.d.ts +5 -0
  3. package/alert/testing/package.json +10 -0
  4. package/alert/testing/test-api.d.ts +24 -0
  5. package/bundles/bravura-ui-alert-testing.umd.js +442 -0
  6. package/bundles/bravura-ui-alert-testing.umd.js.map +1 -0
  7. package/bundles/bravura-ui-alert.umd.js +1 -1
  8. package/bundles/bravura-ui-alert.umd.js.map +1 -1
  9. package/bundles/bravura-ui-radio-panel-testing.umd.js +431 -0
  10. package/bundles/bravura-ui-radio-panel-testing.umd.js.map +1 -0
  11. package/bundles/bravura-ui-tooltip.umd.js +10 -1
  12. package/bundles/bravura-ui-tooltip.umd.js.map +1 -1
  13. package/esm2015/alert/alert-message.component.js +2 -2
  14. package/esm2015/alert/testing/bravura-ui-alert-testing.js +5 -0
  15. package/esm2015/alert/testing/test-api.js +57 -0
  16. package/esm2015/radio-panel/testing/bravura-ui-radio-panel-testing.js +5 -0
  17. package/esm2015/radio-panel/testing/test-api.js +56 -0
  18. package/esm2015/tooltip/tooltip.component.js +12 -3
  19. package/fesm2015/bravura-ui-alert-testing.js +64 -0
  20. package/fesm2015/bravura-ui-alert-testing.js.map +1 -0
  21. package/fesm2015/bravura-ui-alert.js +1 -1
  22. package/fesm2015/bravura-ui-alert.js.map +1 -1
  23. package/fesm2015/bravura-ui-radio-panel-testing.js +63 -0
  24. package/fesm2015/bravura-ui-radio-panel-testing.js.map +1 -0
  25. package/fesm2015/bravura-ui-tooltip.js +11 -2
  26. package/fesm2015/bravura-ui-tooltip.js.map +1 -1
  27. package/package.json +1 -1
  28. package/radio-panel/testing/bravura-ui-radio-panel-testing.d.ts +5 -0
  29. package/radio-panel/testing/package.json +10 -0
  30. package/radio-panel/testing/test-api.d.ts +28 -0
  31. package/tooltip/tooltip.component.d.ts +2 -0
@@ -80,7 +80,7 @@ class AlertMessageComponent {
80
80
  }
81
81
  }
82
82
  AlertMessageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AlertMessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
83
- AlertMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AlertMessageComponent, 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' : '')", "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<div [innerHTML]=\"message\"></div>\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n<div class=\"bui-alert-button-area\" *ngIf=\"dismissible\">\n\t<div class=\"bui-alert-button-backdrop\"></div>\n\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t<mat-icon>cancel</mat-icon>\n\t</button>\n</div>\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;top:0;right:0;bottom:0;left: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}: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)}@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;}\n"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
83
+ AlertMessageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: AlertMessageComponent, 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' : '')", "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<div [innerHTML]=\"message\" *ngIf=\"message\"></div>\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n<div class=\"bui-alert-button-area\" *ngIf=\"dismissible\">\n\t<div class=\"bui-alert-button-backdrop\"></div>\n\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t<mat-icon>cancel</mat-icon>\n\t</button>\n</div>\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;top:0;right:0;bottom:0;left: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;grid-gap:1rem;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)}@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"], components: [{ type: i1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
84
84
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: AlertMessageComponent, decorators: [{
85
85
  type: Component,
86
86
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-alert.js","sources":["../../../projects/ui/alert/alert-message.component.ts","../../../projects/ui/alert/alert-message.component.html","../../../projects/ui/alert/alert-container.component.ts","../../../projects/ui/alert/alert-container.component.html","../../../projects/ui/alert/alert.module.ts","../../../projects/ui/alert/bravura-ui-alert.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\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'[role]': `politeness === 'off' ? 'region' : 'alert'`,\n\t\t'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\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\tprivate _blink = 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<div [innerHTML]=\"message\"></div>\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n<div class=\"bui-alert-button-area\" *ngIf=\"dismissible\">\n\t<div class=\"bui-alert-button-backdrop\"></div>\n\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t<mat-icon>cancel</mat-icon>\n\t</button>\n</div>\n","import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInput,\n\tNgZone,\n\tOnDestroy,\n\tOnInit\n} from '@angular/core';\nimport { generateID, isElementInViewport } from '@bravura/ui/common';\nimport { Subject, Subscription, timer } from 'rxjs';\nimport { delay, take, takeUntil, tap } from 'rxjs/operators';\n\n/**@internal */\nclass InternalAlertOject {\n\tid: string;\n\tdeleted = false;\n\tconstructor(public readonly type: 'success' | 'info' | 'warn' | 'error', public readonly message: string) {\n\t\tthis.id = `bui-alert-cont-alert-${generateID()}`;\n\t}\n}\n\n/**\n * Use this component in a designated area of a page for displaying notification messages\n *\n */\n@Component({\n\tselector: 'bui-alert-container',\n\ttemplateUrl: './alert-container.component.html',\n\tstyleUrls: ['./alert-container.component.scss'],\n\thost: {\n\t\t'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tanimations: [\n\t\ttrigger('floatTransition', [\n\t\t\ttransition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),\n\t\t\ttransition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])\n\t\t]),\n\t\ttrigger('alertTransition', [\n\t\t\tstate('visible', style({})),\n\t\t\tstate(\n\t\t\t\t'hidden',\n\t\t\t\tstyle({\n\t\t\t\t\theight: 0,\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\ttransform: 'scaleY(0)',\n\t\t\t\t\topacity: 0,\n\t\t\t\t\t'margin-top': '-1rem'\n\t\t\t\t})\n\t\t\t),\n\t\t\ttransition('void => visible', [\n\t\t\t\tstyle({ transform: 'translateY(100%)', height: 0, opacity: '0', overflow: 'hidden' }),\n\t\t\t\tanimate('250ms cubic-bezier(0.42, 0.0, 0.58, 1.0)')\n\t\t\t]),\n\t\t\ttransition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])\n\t\t])\n\t]\n})\nexport class AlertContainerComponent implements OnInit, OnDestroy {\n\t/** The maximum number of messages displayed in the container area. */\n\t@Input()\n\tmax = 5;\n\n\t/**\n\t * This property determines the behavior for displaying the notifications when the container is outside the viewport.\n\t *\n\t * `scroll`: The component will try to scroll to reveal the new notifications.\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.\n\t */\n\t@Input()\n\toutsideViewportBehavior: 'scroll' | 'float' = 'float';\n\n\t/**\n\t * The number of milliseconds for which the alert container will be floated when new notification arrives.\n\t *\n\t * This will only take effect when `outsideViewportBehavior` is set to `float` and the container is outside the viewport.\n\t */\n\t@Input()\n\tfloatDuration = 2000;\n\n\t/**@internal */\n\t_alerts: InternalAlertOject[] = [];\n\t/**@internal */\n\t_floated = false;\n\t/**@internal */\n\t_floatPanelHidden = true;\n\n\t/** @ignore Emits whenever the animation is started. */\n\treadonly _animationStarted = new Subject<AnimationEvent>();\n\t/** @ignore Emits whenever the animation is done. */\n\treadonly _animationEnded = new Subject<AnimationEvent>();\n\n\tprivate _destroyed$ = new Subject<void>();\n\tprivate _endFloatingSub?: Subscription;\n\n\tconstructor(\n\t\tprivate zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\tprivate scroll: ScrollDispatcher\n\t) {}\n\n\tngOnInit(): void {\n\t\tconst checkScroll = () => {\n\t\t\tif (isElementInViewport(this._elementRef.nativeElement)) {\n\t\t\t\tthis._endFloating();\n\t\t\t}\n\t\t};\n\t\tthis.scroll\n\t\t\t.ancestorScrolled(this._elementRef.nativeElement)\n\t\t\t.pipe(takeUntil(this._destroyed$))\n\t\t\t.subscribe(checkScroll);\n\t\tcheckScroll();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed$.next();\n\t\tthis._destroyed$.complete();\n\t\tthis._endFloatingSub?.unsubscribe();\n\t}\n\n\t/**@internal */\n\tget _remaining() {\n\t\treturn this._alerts.filter(a => !a.deleted);\n\t}\n\n\t/**@internal */\n\tget _width() {\n\t\treturn this._elementRef.nativeElement.clientWidth;\n\t}\n\n\t/** Add a message to the notification area */\n\tasync notify(type: 'success' | 'info' | 'warn' | 'error', message: string) {\n\t\tthis._endFloatingSub?.unsubscribe();\n\t\tconst duplicate = this._remaining.find(_a => message === _a.message);\n\t\tif (duplicate) {\n\t\t\tthis._dismiss(duplicate);\n\t\t}\n\n\t\tconst remaining = this._remaining;\n\t\tif (remaining.length >= this.max) {\n\t\t\tthis._dismiss(remaining[0]);\n\t\t}\n\n\t\tconst a = new InternalAlertOject(type, message);\n\t\tawait this._checkViewport();\n\t\tthis.zone.run(() => {\n\t\t\tthis._alerts.push(a);\n\t\t\tthis.cdRef.markForCheck();\n\t\t});\n\t}\n\n\t/**@ignore */\n\tasync _checkViewport() {\n\t\tif (!isElementInViewport(this._elementRef.nativeElement)) {\n\t\t\tif (this.outsideViewportBehavior === 'float') {\n\t\t\t\tconst d = this._floated ? 0 : 100;\n\t\t\t\tthis._floated = true;\n\t\t\t\tthis._floatPanelHidden = false;\n\t\t\t\tthis._endFloating(this.floatDuration);\n\t\t\t\tthis.cdRef.markForCheck();\n\t\t\t\tawait timer(d).toPromise();\n\t\t\t} else {\n\t\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'start', behavior: 'smooth' });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@ignore */\n\tasync _dismiss(a: InternalAlertOject) {\n\t\tconst id = a.id;\n\t\ta.deleted = true;\n\t\tthis.cdRef.markForCheck();\n\t\tawait this._animationEnded.pipe(take(1)).toPromise();\n\t\tthis.zone.run(() => {\n\t\t\tthis._alerts = this._alerts.filter(_a => _a.id !== id);\n\t\t\tthis.cdRef.markForCheck();\n\t\t});\n\t}\n\n\t/** Remove all messages currently displayed. */\n\tasync clear() {\n\t\tawait Promise.all(this._remaining.map(a => this._dismiss(a)));\n\t\tthis._endFloating();\n\t}\n\n\tprivate _endFloating(_delay = 0) {\n\t\tif (!this._floated) {\n\t\t\treturn;\n\t\t}\n\t\tthis._endFloatingSub?.unsubscribe();\n\t\tthis._endFloatingSub = timer(_delay)\n\t\t\t.pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis._floated = false;\n\t\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\n\t\t\t\t}),\n\t\t\t\tdelay(400)\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._floatPanelHidden = true;\n\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\n\t\t\t});\n\t}\n}\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<bui-alert\n\t\t*ngFor=\"let a of _alerts\"\n\t\t[id]=\"a.id\"\n\t\t[type]=\"a.type\"\n\t\t[message]=\"a.message\"\n\t\tdismissible\n\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t(dismissed)=\"_dismiss(a)\"\n\t></bui-alert>\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\" *ngIf=\"_floated\">\n\t\t<bui-alert\n\t\t\t*ngFor=\"let a of _alerts\"\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t></bui-alert>\n\t</div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { AlertContainerComponent } from './alert-container.component';\nimport { AlertMessageComponent } from './alert-message.component';\n\n@NgModule({\n\tdeclarations: [AlertMessageComponent, AlertContainerComponent],\n\timports: [CommonModule, IconFontModule, MatButtonModule],\n\texports: [AlertMessageComponent, AlertContainerComponent]\n})\nexport class AlertModule {}\n\nexport { AlertMessageComponent, AlertContainerComponent };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA;AACA,MAAM,KAAK,GAAQ;IAClB,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,QAAQ;CACf,CAAC;AAEF;AACA,MAAM,kBAAkB,GAAG;IAC1B,OAAO,EAAE,QAAQ;IACjB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,WAAW;IACjB,KAAK,EAAE,WAAW;CAClB,CAAC;AAEF;;;;;;;;;;;;;;;MA0Ba,qBAAqB;IA2CjC;;QAnCA,SAAI,GAA0C,OAAO,CAAC;;QAItD,YAAO,GAAG,EAAE,CAAC;;QAiBb,cAAS,GAAG,IAAI,YAAY,EAAU,CAAC;;QAIvC,gBAAW,GAAG,IAAI,YAAY,EAAU,CAAC;;QAKzC,QAAG,GAAG,aAAa,UAAU,EAAE,EAAE,CAAC;QAE1B,iBAAY,GAAG,KAAK,CAAC;QACrB,WAAM,GAAG,KAAK,CAAC;KAEP;;IAxBhB,IACI,WAAW;QACd,OAA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O,CAAC,0CAA0C,CAAC;6BACnD,CAAC;4BACF,UAAU,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC,CAAC;yBACnF,CAAC;qBACF;iBACD;uLAIA,GAAG;sBADF,KAAK;gBAUN,uBAAuB;sBADtB,KAAK;gBASN,aAAa;sBADZ,KAAK;;;MErEM,WAAW;;yGAAX,WAAW;0GAAX,WAAW,iBAJR,qBAAqB,EAAE,uBAAuB,aACnD,YAAY,EAAE,cAAc,EAAE,eAAe,aAC7C,qBAAqB,EAAE,uBAAuB;0GAE5C,WAAW,YAHd,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;4FAG5C,WAAW;kBALvB,QAAQ;mBAAC;oBACT,YAAY,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;oBAC9D,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;oBACxD,OAAO,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;iBACzD;;;ACXD;;;;;;"}
1
+ {"version":3,"file":"bravura-ui-alert.js","sources":["../../../projects/ui/alert/alert-message.component.ts","../../../projects/ui/alert/alert-message.component.html","../../../projects/ui/alert/alert-container.component.ts","../../../projects/ui/alert/alert-container.component.html","../../../projects/ui/alert/alert.module.ts","../../../projects/ui/alert/bravura-ui-alert.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, HostBinding, Input, OnInit, Output } from '@angular/core';\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'[role]': `politeness === 'off' ? 'region' : 'alert'`,\n\t\t'[attr.aria-live]': `politeness === 'assertive' ? undefined : politeness`\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush\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\tprivate _blink = 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<div [innerHTML]=\"message\" *ngIf=\"message\"></div>\n\t\t<ng-content></ng-content>\n\t</div>\n</div>\n\n<div class=\"bui-alert-button-area\" *ngIf=\"dismissible\">\n\t<div class=\"bui-alert-button-backdrop\"></div>\n\t<button mat-icon-button class=\"bui-alert-button\" (click)=\"_dismiss()\" aria-label=\"dismiss alert\">\n\t\t<mat-icon>cancel</mat-icon>\n\t</button>\n</div>\n","import { animate, state, style, transition, trigger, AnimationEvent } from '@angular/animations';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInput,\n\tNgZone,\n\tOnDestroy,\n\tOnInit\n} from '@angular/core';\nimport { generateID, isElementInViewport } from '@bravura/ui/common';\nimport { Subject, Subscription, timer } from 'rxjs';\nimport { delay, take, takeUntil, tap } from 'rxjs/operators';\n\n/**@internal */\nclass InternalAlertOject {\n\tid: string;\n\tdeleted = false;\n\tconstructor(public readonly type: 'success' | 'info' | 'warn' | 'error', public readonly message: string) {\n\t\tthis.id = `bui-alert-cont-alert-${generateID()}`;\n\t}\n}\n\n/**\n * Use this component in a designated area of a page for displaying notification messages\n *\n */\n@Component({\n\tselector: 'bui-alert-container',\n\ttemplateUrl: './alert-container.component.html',\n\tstyleUrls: ['./alert-container.component.scss'],\n\thost: {\n\t\t'[class]': `'bui-alert-container bui-host bui-alert-container-' + (_remaining.length ? 'not-empty': 'empty')`\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tanimations: [\n\t\ttrigger('floatTransition', [\n\t\t\ttransition(':enter', [style({ opacity: '0', transform: 'translateY(-10vh)' }), animate('.3s ease-in')]),\n\t\t\ttransition(':leave', [animate('.4s ease-out', style({ transform: 'translateY(-10vh)', opacity: '0' }))])\n\t\t]),\n\t\ttrigger('alertTransition', [\n\t\t\tstate('visible', style({})),\n\t\t\tstate(\n\t\t\t\t'hidden',\n\t\t\t\tstyle({\n\t\t\t\t\theight: 0,\n\t\t\t\t\toverflow: 'hidden',\n\t\t\t\t\ttransform: 'scaleY(0)',\n\t\t\t\t\topacity: 0,\n\t\t\t\t\t'margin-top': '-1rem'\n\t\t\t\t})\n\t\t\t),\n\t\t\ttransition('void => visible', [\n\t\t\t\tstyle({ transform: 'translateY(100%)', height: 0, opacity: '0', overflow: 'hidden' }),\n\t\t\t\tanimate('250ms cubic-bezier(0.42, 0.0, 0.58, 1.0)')\n\t\t\t]),\n\t\t\ttransition('visible => hidden', [animate('250ms cubic-bezier(0.25, 0, 0.3, 1.0)')])\n\t\t])\n\t]\n})\nexport class AlertContainerComponent implements OnInit, OnDestroy {\n\t/** The maximum number of messages displayed in the container area. */\n\t@Input()\n\tmax = 5;\n\n\t/**\n\t * This property determines the behavior for displaying the notifications when the container is outside the viewport.\n\t *\n\t * `scroll`: The component will try to scroll to reveal the new notifications.\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.\n\t */\n\t@Input()\n\toutsideViewportBehavior: 'scroll' | 'float' = 'float';\n\n\t/**\n\t * The number of milliseconds for which the alert container will be floated when new notification arrives.\n\t *\n\t * This will only take effect when `outsideViewportBehavior` is set to `float` and the container is outside the viewport.\n\t */\n\t@Input()\n\tfloatDuration = 2000;\n\n\t/**@internal */\n\t_alerts: InternalAlertOject[] = [];\n\t/**@internal */\n\t_floated = false;\n\t/**@internal */\n\t_floatPanelHidden = true;\n\n\t/** @ignore Emits whenever the animation is started. */\n\treadonly _animationStarted = new Subject<AnimationEvent>();\n\t/** @ignore Emits whenever the animation is done. */\n\treadonly _animationEnded = new Subject<AnimationEvent>();\n\n\tprivate _destroyed$ = new Subject<void>();\n\tprivate _endFloatingSub?: Subscription;\n\n\tconstructor(\n\t\tprivate zone: NgZone,\n\t\tprivate cdRef: ChangeDetectorRef,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\tprivate scroll: ScrollDispatcher\n\t) {}\n\n\tngOnInit(): void {\n\t\tconst checkScroll = () => {\n\t\t\tif (isElementInViewport(this._elementRef.nativeElement)) {\n\t\t\t\tthis._endFloating();\n\t\t\t}\n\t\t};\n\t\tthis.scroll\n\t\t\t.ancestorScrolled(this._elementRef.nativeElement)\n\t\t\t.pipe(takeUntil(this._destroyed$))\n\t\t\t.subscribe(checkScroll);\n\t\tcheckScroll();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed$.next();\n\t\tthis._destroyed$.complete();\n\t\tthis._endFloatingSub?.unsubscribe();\n\t}\n\n\t/**@internal */\n\tget _remaining() {\n\t\treturn this._alerts.filter(a => !a.deleted);\n\t}\n\n\t/**@internal */\n\tget _width() {\n\t\treturn this._elementRef.nativeElement.clientWidth;\n\t}\n\n\t/** Add a message to the notification area */\n\tasync notify(type: 'success' | 'info' | 'warn' | 'error', message: string) {\n\t\tthis._endFloatingSub?.unsubscribe();\n\t\tconst duplicate = this._remaining.find(_a => message === _a.message);\n\t\tif (duplicate) {\n\t\t\tthis._dismiss(duplicate);\n\t\t}\n\n\t\tconst remaining = this._remaining;\n\t\tif (remaining.length >= this.max) {\n\t\t\tthis._dismiss(remaining[0]);\n\t\t}\n\n\t\tconst a = new InternalAlertOject(type, message);\n\t\tawait this._checkViewport();\n\t\tthis.zone.run(() => {\n\t\t\tthis._alerts.push(a);\n\t\t\tthis.cdRef.markForCheck();\n\t\t});\n\t}\n\n\t/**@ignore */\n\tasync _checkViewport() {\n\t\tif (!isElementInViewport(this._elementRef.nativeElement)) {\n\t\t\tif (this.outsideViewportBehavior === 'float') {\n\t\t\t\tconst d = this._floated ? 0 : 100;\n\t\t\t\tthis._floated = true;\n\t\t\t\tthis._floatPanelHidden = false;\n\t\t\t\tthis._endFloating(this.floatDuration);\n\t\t\t\tthis.cdRef.markForCheck();\n\t\t\t\tawait timer(d).toPromise();\n\t\t\t} else {\n\t\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'start', behavior: 'smooth' });\n\t\t\t}\n\t\t}\n\t}\n\n\t/**@ignore */\n\tasync _dismiss(a: InternalAlertOject) {\n\t\tconst id = a.id;\n\t\ta.deleted = true;\n\t\tthis.cdRef.markForCheck();\n\t\tawait this._animationEnded.pipe(take(1)).toPromise();\n\t\tthis.zone.run(() => {\n\t\t\tthis._alerts = this._alerts.filter(_a => _a.id !== id);\n\t\t\tthis.cdRef.markForCheck();\n\t\t});\n\t}\n\n\t/** Remove all messages currently displayed. */\n\tasync clear() {\n\t\tawait Promise.all(this._remaining.map(a => this._dismiss(a)));\n\t\tthis._endFloating();\n\t}\n\n\tprivate _endFloating(_delay = 0) {\n\t\tif (!this._floated) {\n\t\t\treturn;\n\t\t}\n\t\tthis._endFloatingSub?.unsubscribe();\n\t\tthis._endFloatingSub = timer(_delay)\n\t\t\t.pipe(\n\t\t\t\ttap(() => {\n\t\t\t\t\tthis._floated = false;\n\t\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\n\t\t\t\t}),\n\t\t\t\tdelay(400)\n\t\t\t)\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._floatPanelHidden = true;\n\t\t\t\tthis.zone.run(() => this.cdRef.markForCheck());\n\t\t\t});\n\t}\n}\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<bui-alert\n\t\t*ngFor=\"let a of _alerts\"\n\t\t[id]=\"a.id\"\n\t\t[type]=\"a.type\"\n\t\t[message]=\"a.message\"\n\t\tdismissible\n\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t(@alertTransition.start)=\"_animationStarted.next($event)\"\n\t\t(@alertTransition.done)=\"_animationEnded.next($event)\"\n\t\t(dismissed)=\"_dismiss(a)\"\n\t></bui-alert>\n</div>\n\n<div class=\"bui-alert-float-panel-frame\" [hidden]=\"_floatPanelHidden\" [class.bui-alert-float-panel-shaded]=\"_floated\">\n\t<div class=\"bui-alert-float-panel\" [style.max-width]=\"_width + 'px'\" [@floatTransition]=\"'visible'\" *ngIf=\"_floated\">\n\t\t<bui-alert\n\t\t\t*ngFor=\"let a of _alerts\"\n\t\t\t[id]=\"a.id\"\n\t\t\t[type]=\"a.type\"\n\t\t\t[message]=\"a.message\"\n\t\t\t[@alertTransition]=\"a.deleted ? 'hidden' : 'visible'\"\n\t\t></bui-alert>\n\t</div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { AlertContainerComponent } from './alert-container.component';\nimport { AlertMessageComponent } from './alert-message.component';\n\n@NgModule({\n\tdeclarations: [AlertMessageComponent, AlertContainerComponent],\n\timports: [CommonModule, IconFontModule, MatButtonModule],\n\texports: [AlertMessageComponent, AlertContainerComponent]\n})\nexport class AlertModule {}\n\nexport { AlertMessageComponent, AlertContainerComponent };\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA;AACA,MAAM,KAAK,GAAQ;IAClB,OAAO,EAAE,cAAc;IACvB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,QAAQ;CACf,CAAC;AAEF;AACA,MAAM,kBAAkB,GAAG;IAC1B,OAAO,EAAE,QAAQ;IACj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AAE;4BAC1B,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;4BAC3B,KAAK,CACJ,QAAQ,EACR,KAAK,CAAC;gCACL,MAAM,EAAE,CAAC;gCACT,QAAQ,EAAE,QAAQ;gCAClB,SAAS,EAAE,WAAW;gCACtB,OAAO,EAAE,CAAC;gCACV,YAAY,EAAE,OAAO;6BACrB,CAAC,CACF;4BACD,UAAU,CAAC,iBAAiB,EAAE;gCAC7B,KAAK,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;gCACrF,OAAO,CAAC,0CAA0C,CAAC;6BACnD,CAAC;4BACF,UAAU,CAAC,mBAAmB,EAAE,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC,CAAC;yBACnF,CAAC;qBACF;iBACD;uLAIA,GAAG;sBADF,KAAK;gBAUN,uBAAuB;sBADtB,KAAK;gBASN,aAAa;sBADZ,KAAK;;;MErEM,WAAW;;yGAAX,WAAW;0GAAX,WAAW,iBAJR,qBAAqB,EAAE,uBAAuB,aACnD,YAAY,EAAE,cAAc,EAAE,eAAe,aAC7C,qBAAqB,EAAE,uBAAuB;0GAE5C,WAAW,YAHd,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;4FAG5C,WAAW;kBALvB,QAAQ;mBAAC;oBACT,YAAY,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;oBAC9D,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,eAAe,CAAC;oBACxD,OAAO,EAAE,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;iBACzD;;;ACXD;;;;;;"}
@@ -0,0 +1,63 @@
1
+ import { __awaiter } from 'tslib';
2
+ import { HarnessPredicate } from '@angular/cdk/testing';
3
+ import { MatRadioButtonHarness, _MatRadioGroupHarnessBase } from '@angular/material/radio/testing';
4
+
5
+ class RadioPanelItemHarness extends MatRadioButtonHarness {
6
+ constructor() {
7
+ super(...arguments);
8
+ this.getLabelElement = this.locatorFor('label');
9
+ this._textLabel = this.locatorFor('label .bui-label-title');
10
+ this._clickLabel = this.getLabelElement;
11
+ }
12
+ /**
13
+ * Gets a `HarnessPredicate` that can be used to search for a radio button with specific
14
+ * attributes.
15
+ * @param options Options for filtering which radio button instances are considered a match.
16
+ * @return a `HarnessPredicate` configured with the given options.
17
+ */
18
+ static with(options = {}) {
19
+ return new HarnessPredicate(this, options)
20
+ .addOption('label', options.label, (harness, label) => HarnessPredicate.stringMatches(harness.getLabelText(), label))
21
+ .addOption('value', options.value, (harness, value) => HarnessPredicate.stringMatches(harness.getValue(), value));
22
+ }
23
+ click() {
24
+ return __awaiter(this, void 0, void 0, function* () {
25
+ const element = yield this.getLabelElement();
26
+ element.click();
27
+ });
28
+ }
29
+ getLabelCssValue(prop) {
30
+ return __awaiter(this, void 0, void 0, function* () {
31
+ const element = yield this.getLabelElement();
32
+ return element.getCssValue(prop);
33
+ });
34
+ }
35
+ getBorderColor() {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const label = yield this.getLabelElement();
38
+ return label.getCssValue('border-color');
39
+ });
40
+ }
41
+ }
42
+ RadioPanelItemHarness.hostSelector = 'bui-radio-panel-item';
43
+ class RadioPanelHarness extends _MatRadioGroupHarnessBase {
44
+ constructor() {
45
+ super(...arguments);
46
+ this._buttonClass = RadioPanelItemHarness;
47
+ this.getItem = (filters) => this.locatorFor(RadioPanelItemHarness.with(filters))();
48
+ }
49
+ getFlexDir() {
50
+ return __awaiter(this, void 0, void 0, function* () {
51
+ return (yield this.host()).getCssValue('flex-direction');
52
+ });
53
+ }
54
+ }
55
+ /** The selector for the host element of a `MatRadioGroup` instance. */
56
+ RadioPanelHarness.hostSelector = 'bui-radio-panel';
57
+
58
+ /**
59
+ * Generated bundle index. Do not edit.
60
+ */
61
+
62
+ export { RadioPanelHarness, RadioPanelItemHarness };
63
+ //# sourceMappingURL=bravura-ui-radio-panel-testing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bravura-ui-radio-panel-testing.js","sources":["../../../projects/ui/radio-panel/testing/test-api.ts","../../../projects/ui/radio-panel/testing/bravura-ui-radio-panel-testing.ts"],"sourcesContent":["import { ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';\nimport {\n\tMatRadioButtonHarness,\n\tRadioButtonHarnessFilters,\n\t_MatRadioGroupHarnessBase\n} from '@angular/material/radio/testing';\n\nexport interface RadioPanelItemHarnessFilters extends RadioButtonHarnessFilters {\n\tvalue?: string | RegExp;\n}\n\nexport class RadioPanelItemHarness extends MatRadioButtonHarness {\n\tstatic hostSelector = 'bui-radio-panel-item';\n\tgetLabelElement = this.locatorFor('label');\n\n\tprotected _textLabel = this.locatorFor('label .bui-label-title');\n\tprotected _clickLabel = this.getLabelElement;\n\n\t/**\n\t * Gets a `HarnessPredicate` that can be used to search for a radio button with specific\n\t * attributes.\n\t * @param options Options for filtering which radio button instances are considered a match.\n\t * @return a `HarnessPredicate` configured with the given options.\n\t */\n\tstatic with<T extends MatRadioButtonHarness>(\n\t\tthis: ComponentHarnessConstructor<T>,\n\t\toptions: RadioPanelItemHarnessFilters = {}\n\t): HarnessPredicate<T> {\n\t\treturn new HarnessPredicate(this, options)\n\t\t\t.addOption('label', options.label, (harness, label) =>\n\t\t\t\tHarnessPredicate.stringMatches(harness.getLabelText(), label)\n\t\t\t)\n\t\t\t.addOption('value', options.value, (harness, value) =>\n\t\t\t\tHarnessPredicate.stringMatches(harness.getValue(), value)\n\t\t\t) as HarnessPredicate<T>;\n\t}\n\n\tasync click() {\n\t\tconst element = await this.getLabelElement();\n\t\telement.click();\n\t}\n\n\tasync getLabelCssValue(prop: string): Promise<string> {\n\t\tconst element = await this.getLabelElement();\n\t\treturn element.getCssValue(prop);\n\t}\n\n\tasync getBorderColor(): Promise<string> {\n\t\tconst label = await this.getLabelElement();\n\t\treturn label.getCssValue('border-color');\n\t}\n}\n\nexport class RadioPanelHarness extends _MatRadioGroupHarnessBase<\n\ttypeof RadioPanelItemHarness,\n\tRadioPanelItemHarness,\n\tRadioButtonHarnessFilters\n> {\n\t/** The selector for the host element of a `MatRadioGroup` instance. */\n\tstatic hostSelector = 'bui-radio-panel';\n\n\tprotected _buttonClass = RadioPanelItemHarness;\n\n\tgetItem = (filters?: RadioPanelItemHarnessFilters) => this.locatorFor(RadioPanelItemHarness.with(filters))();\n\n\tasync getFlexDir(): Promise<string> {\n\t\treturn (await this.host()).getCssValue('flex-direction');\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './test-api';\n"],"names":[],"mappings":";;;;MAWa,qBAAsB,SAAQ,qBAAqB;IAAhE;;QAEC,oBAAe,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAEjC,eAAU,GAAG,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;QACvD,gBAAW,GAAG,IAAI,CAAC,eAAe,CAAC;KAmC7C;;;;;;;IA3BA,OAAO,IAAI,CAEV,UAAwC,EAAE;QAE1C,OAAO,IAAI,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC;aACxC,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KACjD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,KAAK,CAAC,CAC7D;aACA,SAAS,CAAC,OAAO,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,KAAK,KACjD,gBAAgB,CAAC,aAAa,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,KAAK,CAAC,CAClC,CAAC;KAC1B;IAEK,KAAK;;YACV,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YAC7C,OAAO,CAAC,KAAK,EAAE,CAAC;SAChB;KAAA;IAEK,gBAAgB,CAAC,IAAY;;YAClC,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YAC7C,OAAO,OAAO,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACjC;KAAA;IAEK,cAAc;;YACnB,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;YAC3C,OAAO,KAAK,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;SACzC;KAAA;;AAtCM,kCAAY,GAAG,sBAAsB,CAAC;MAyCjC,iBAAkB,SAAQ,yBAItC;IAJD;;QAQW,iBAAY,GAAG,qBAAqB,CAAC;QAE/C,YAAO,GAAG,CAAC,OAAsC,KAAK,IAAI,CAAC,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;KAK7G;IAHM,UAAU;;YACf,OAAO,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,gBAAgB,CAAC,CAAC;SACzD;KAAA;;AATD;AACO,8BAAY,GAAG,iBAAiB;;AC3DxC;;;;;;"}
@@ -6,7 +6,7 @@ import { CdkScrollableModule } from '@angular/cdk/scrolling';
6
6
  import * as i2 from '@angular/common';
7
7
  import { DOCUMENT, CommonModule } from '@angular/common';
8
8
  import * as i0 from '@angular/core';
9
- import { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, TemplateRef, forwardRef, Directive, Optional, Input, HostListener, NgModule } from '@angular/core';
9
+ import { InjectionToken, ViewContainerRef, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, TemplateRef, forwardRef, Directive, Optional, Input, HostListener, NgModule } from '@angular/core';
10
10
  import { MatCommonModule } from '@angular/material/core';
11
11
  import { TooltipComponent as TooltipComponent$1, matTooltipAnimations, _MatTooltipBase, MAT_TOOLTIP_SCROLL_STRATEGY, MAT_TOOLTIP_DEFAULT_OPTIONS, MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/tooltip';
12
12
  import { getTextWidth } from '@bravura/ui/common';
@@ -32,6 +32,12 @@ class TooltipComponent extends TooltipComponent$1 {
32
32
  const width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);
33
33
  this._tooltip.nativeElement.style.maxWidth = `${width}px`;
34
34
  }
35
+ else if (this._tooltipInst.template) {
36
+ this.messageCont.clear();
37
+ const ref = this.messageCont.createEmbeddedView(this._tooltipInst.template);
38
+ ref.detectChanges();
39
+ this._tooltipInst.message = this.message = this.tooltipDiv.nativeElement.textContent;
40
+ }
35
41
  super.show(delay);
36
42
  }
37
43
  get _self() {
@@ -39,7 +45,7 @@ class TooltipComponent extends TooltipComponent$1 {
39
45
  }
40
46
  }
41
47
  TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.BreakpointObserver }, { token: BUI_TOOLTIP_TEMPLATE_REF }], target: i0.ɵɵFactoryTarget.Component });
42
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TooltipComponent, selector: "bui-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "body:click": "this._handleBodyInteraction()", "body:auxclick": "this._handleBodyInteraction()" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" }, classAttribute: "bui-tooltip-component bui-host" }, viewQueries: [{ propertyName: "_tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }, { propertyName: "tooltipDiv", first: true, predicate: ["tooltipDiv"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n\t#tooltip\n\tclass=\"mat-tooltip bui-tooltip\"\n\t[ngClass]=\"tooltipClass\"\n\t[class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n\t[@state]=\"_visibility\"\n\t(@state.start)=\"_self._animationStart && _self._animationStart()\"\n\t(@state.done)=\"_self._animationDone && _self._animationDone($event)\"\n\t(animationend)=\"_self._handleAnimationEnd && _self._handleAnimationEnd($event)\"\n>\n\t<ng-template [ngIf]=\"_tooltipInst.template\">\n\t\t<ng-template [ngTemplateOutlet]=\"_tooltipInst.template\"></ng-template>\n\t</ng-template>\n\t<div #tooltipDiv></div>\n</div>\n", styles: [".bui-tooltip.mat-tooltip{font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px!important}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px!important}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px!important}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px!important}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px!important}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px!important}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }], pipes: { "async": i2.AsyncPipe }, animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
48
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TooltipComponent, selector: "bui-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "body:click": "this._handleBodyInteraction()", "body:auxclick": "this._handleBodyInteraction()" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" }, classAttribute: "bui-tooltip-component bui-host" }, viewQueries: [{ propertyName: "_tooltip", first: true, predicate: ["tooltip"], descendants: true, static: true }, { propertyName: "tooltipDiv", first: true, predicate: ["tooltipDiv"], descendants: true, static: true }, { propertyName: "messageCont", first: true, predicate: ["messageCont"], descendants: true, read: ViewContainerRef, static: true }], usesInheritance: true, ngImport: i0, template: "<div\n\t#tooltip\n\tclass=\"mat-tooltip bui-tooltip\"\n\t[ngClass]=\"tooltipClass\"\n\t[class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n\t[@state]=\"_visibility\"\n\t(@state.start)=\"_self._animationStart && _self._animationStart()\"\n\t(@state.done)=\"_self._animationDone && _self._animationDone($event)\"\n\t(animationend)=\"_self._handleAnimationEnd && _self._handleAnimationEnd($event)\"\n>\n\t<div #tooltipDiv>\n\t\t<ng-container #messageCont></ng-container>\n\t</div>\n</div>\n", styles: [".bui-tooltip.mat-tooltip{font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px!important}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px!important}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px!important}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px!important}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px!important}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px!important}\n"], directives: [{ type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], pipes: { "async": i2.AsyncPipe }, animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
43
49
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TooltipComponent, decorators: [{
44
50
  type: Component,
45
51
  args: [{
@@ -68,6 +74,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
68
74
  }], tooltipDiv: [{
69
75
  type: ViewChild,
70
76
  args: ['tooltipDiv', { static: true }]
77
+ }], messageCont: [{
78
+ type: ViewChild,
79
+ args: ['messageCont', { static: true, read: ViewContainerRef }]
71
80
  }] } });
72
81
  TooltipComponent.ɵcmp.styles.push(TooltipComponent$1.ɵcmp.styles);
73
82
 
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-tooltip.js","sources":["../../../projects/ui/tooltip/tooltip.component.ts","../../../projects/ui/tooltip/tooltip.component.html","../../../projects/ui/tooltip/tooltip.directive.ts","../../../projects/ui/tooltip/tooltip.module.ts","../../../projects/ui/tooltip/bravura-ui-tooltip.ts"],"sourcesContent":["import { BreakpointObserver } from '@angular/cdk/layout';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInject,\n\tInjectionToken,\n\tTemplateRef,\n\tViewChild,\n\tViewEncapsulation\n} from '@angular/core';\nimport { matTooltipAnimations, TooltipComponent as MatTooltipComponent } from '@angular/material/tooltip';\nimport { getTextWidth } from '@bravura/ui/common';\n\n/**\n * @ignore\n */\ninterface TooltipTemplateContainer {\n\ttemplate?: TemplateRef<any>;\n}\n\n/**\n * @ignore\n */\nexport const BUI_TOOLTIP_TEMPLATE_REF = new InjectionToken<TooltipTemplateContainer>(\n\t'@bravura/ui/tooltip/templateContainer'\n);\n\n@Component({\n\tselector: 'bui-tooltip-component',\n\ttemplateUrl: './tooltip.component.html',\n\tstyleUrls: ['./tooltip.component.scss'],\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tanimations: [matTooltipAnimations.tooltipState],\n\thost: {\n\t\tclass: 'bui-tooltip-component bui-host',\n\t\t// Forces the element to have a layout in IE and Edge. This fixes issues where the element\n\t\t// won't be rendered if the animations are disabled or there is no web animations polyfill.\n\t\t'[style.zoom]': '_visibility === \"visible\" ? 1 : null',\n\t\t'(body:click)': 'this._handleBodyInteraction()',\n\t\t'(body:auxclick)': 'this._handleBodyInteraction()',\n\t\t'aria-hidden': 'true'\n\t}\n})\nexport class TooltipComponent extends MatTooltipComponent {\n\tprivate _messageCopy = '';\n\n\t@ViewChild('tooltip', { static: true })\n\t_tooltip!: ElementRef<HTMLElement>;\n\n\t@ViewChild('tooltipDiv', { static: true })\n\tprivate tooltipDiv!: ElementRef<HTMLDivElement>;\n\n\tconstructor(\n\t\tchangeDetectorRef: ChangeDetectorRef,\n\t\t_breakpointObserver: BreakpointObserver,\n\t\t@Inject(BUI_TOOLTIP_TEMPLATE_REF) public _tooltipInst: TooltipTemplateContainer\n\t) {\n\t\tsuper(changeDetectorRef, _breakpointObserver);\n\t}\n\n\tshow(delay: number): void {\n\t\tif (this._messageCopy !== this.message && !this._tooltipInst.template) {\n\t\t\tthis.tooltipDiv.nativeElement.innerHTML = this.message;\n\t\t\tthis._messageCopy = this.message;\n\t\t\tconst width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);\n\t\t\tthis._tooltip.nativeElement.style.maxWidth = `${width}px`;\n\t\t}\n\t\tsuper.show(delay);\n\t}\n\n\tget _self(): any {\n\t\treturn this;\n\t}\n}\n\n(TooltipComponent as any).ɵcmp.styles.push((MatTooltipComponent as any).ɵcmp.styles);\n","<div\n\t#tooltip\n\tclass=\"mat-tooltip bui-tooltip\"\n\t[ngClass]=\"tooltipClass\"\n\t[class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n\t[@state]=\"_visibility\"\n\t(@state.start)=\"_self._animationStart && _self._animationStart()\"\n\t(@state.done)=\"_self._animationDone && _self._animationDone($event)\"\n\t(animationend)=\"_self._handleAnimationEnd && _self._handleAnimationEnd($event)\"\n>\n\t<ng-template [ngIf]=\"_tooltipInst.template\">\n\t\t<ng-template [ngTemplateOutlet]=\"_tooltipInst.template\"></ng-template>\n\t</ng-template>\n\t<div #tooltipDiv></div>\n</div>\n","import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, ScrollDispatcher } from '@angular/cdk/overlay';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostListener,\n\tInject,\n\tInput,\n\tNgZone,\n\tOptional,\n\tTemplateRef,\n\tViewContainerRef\n} from '@angular/core';\nimport {\n\tMatTooltipDefaultOptions,\n\tMAT_TOOLTIP_DEFAULT_OPTIONS,\n\tMAT_TOOLTIP_SCROLL_STRATEGY,\n\tTooltipPosition,\n\t_MatTooltipBase\n} from '@angular/material/tooltip';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { BUI_TOOLTIP_TEMPLATE_REF, TooltipComponent } from './tooltip.component';\n\n/**\n * This directive extends [Angular Material tooltip](https://material.angular.io/components/tooltip/overview), with the additional capability of displaying\n * HTML content in the overlay area.\n *\n * All the other features are identical as those in Angular Material tooltip.\n */\n@Directive({\n\tselector: '[buiTooltip]',\n\texportAs: 'buiTooltip',\n\thost: {\n\t\tclass: 'mat-tooltip-trigger bui-tooltip-trigger'\n\t},\n\tproviders: [\n\t\t{\n\t\t\tprovide: BUI_TOOLTIP_TEMPLATE_REF,\n\t\t\tuseExisting: forwardRef(() => TooltipDirective)\n\t\t}\n\t]\n})\nexport class TooltipDirective extends _MatTooltipBase<TooltipComponent> {\n\tprotected readonly _tooltipComponent = TooltipComponent;\n\tprivate _templateRef?: TemplateRef<any>;\n\tprivate _contentSub: Subscription = new Subject<void>().subscribe();\n\tprivate _contentObs?: Observable<string>;\n\n\tconstructor(\n\t\toverlay: Overlay,\n\t\telementRef: ElementRef<HTMLElement>,\n\t\tscrollDispatcher: ScrollDispatcher,\n\t\tviewContainerRef: ViewContainerRef,\n\t\tngZone: NgZone,\n\t\tplatform: Platform,\n\t\tariaDescriber: AriaDescriber,\n\t\tfocusMonitor: FocusMonitor,\n\t\t@Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n\t\t@Optional() dir: Directionality,\n\t\t@Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS) defaultOptions: MatTooltipDefaultOptions,\n\t\t@Inject(DOCUMENT) _document: any\n\t) {\n\t\tsuper(\n\t\t\toverlay,\n\t\t\telementRef,\n\t\t\tscrollDispatcher,\n\t\t\tviewContainerRef,\n\t\t\tngZone,\n\t\t\tplatform,\n\t\t\tariaDescriber,\n\t\t\tfocusMonitor,\n\t\t\tscrollStrategy,\n\t\t\tdir,\n\t\t\tdefaultOptions,\n\t\t\t_document\n\t\t);\n\t\tthis.touchGestures = 'off';\n\t\tconst element = elementRef.nativeElement;\n\t\telement.setAttribute('aria-hidden', 'false');\n\t\tif (element.tabIndex === -1) {\n\t\t\telement.tabIndex = 0;\n\t\t\telement.setAttribute('aria-roledescription', 'tooltip');\n\t\t}\n\t}\n\n\t/** Allows the user to define the position of the tooltip relative to the parent element */\n\t@Input()\n\tget buiTooltipPosition(): TooltipPosition {\n\t\treturn this.position;\n\t}\n\tset buiTooltipPosition(value: TooltipPosition) {\n\t\tthis.position = value;\n\t}\n\n\t/** Disables the display of the tooltip. */\n\t@Input()\n\tget buiTooltipDisabled(): boolean {\n\t\treturn this.disabled;\n\t}\n\tset buiTooltipDisabled(value) {\n\t\tthis.disabled = value;\n\t}\n\n\t/** The message to be displayed in the tooltip. */\n\t@Input()\n\tget buiTooltip(): string | TemplateRef<any> | Observable<string> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tthis._contentSub.unsubscribe();\n\t\tthis._contentObs = undefined;\n\t\tthis._templateRef = undefined;\n\t\tthis.message = '';\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else if (value instanceof TemplateRef) {\n\t\t\tthis._templateRef = value;\n\t\t\tif (value) {\n\t\t\t\tthis.message = '[bui-tooltip-template]';\n\t\t\t} else {\n\t\t\t\tthis._templateRef = undefined;\n\t\t\t}\n\t\t} else if (value instanceof Observable) {\n\t\t\tthis.message = '...';\n\t\t\tthis._contentObs = value;\n\t\t}\n\t}\n\n\t/** @ignore */\n\tget template(): TemplateRef<any> | undefined {\n\t\treturn this._templateRef;\n\t}\n\n\t/** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n\t@Input()\n\tget buiTooltipClass() {\n\t\treturn this.tooltipClass;\n\t}\n\tset buiTooltipClass(value: string | string[] | Set<string> | { [key: string]: any }) {\n\t\tthis.tooltipClass = value;\n\t}\n\n\t/** @ignore */\n\t@HostListener('click')\n\tclicked() {\n\t\tthis.toggle();\n\t}\n\n\t/** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n\tshow(delay: number = this.showDelay): void {\n\t\tif (this._contentObs) {\n\t\t\tthis._contentSub.unsubscribe();\n\t\t\tthis._contentSub = this._contentObs.subscribe(c => {\n\t\t\t\tthis.message = c;\n\t\t\t\tthis._contentSub.unsubscribe();\n\t\t\t\tsuper.show(delay);\n\t\t\t});\n\t\t} else {\n\t\t\tsuper.show(delay);\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis._contentSub.unsubscribe();\n\t}\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/tooltip';\nimport { TooltipComponent } from './tooltip.component';\nimport { TooltipDirective } from './tooltip.directive';\n\n@NgModule({\n\timports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n\texports: [TooltipDirective, MatCommonModule, CdkScrollableModule],\n\tdeclarations: [TooltipDirective, TooltipComponent],\n\tentryComponents: [TooltipComponent],\n\tproviders: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MatTooltipComponent"],"mappings":";;;;;;;;;;;;;;;;;AAsBA;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,EACtC;MAmBW,gBAAiB,SAAQA,kBAAmB;IASxD,YACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC;QAE/E,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAF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ACxD,gBAAgB,EAAE,eAAe,EAAE,mBAAmB;4GAKpD,aAAa,aAFd,CAAC,4CAA4C,CAAC,YAJhD,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,EACvC,eAAe,EAAE,mBAAmB;4FAKpD,aAAa;kBAPzB,QAAQ;mBAAC;oBACT,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;oBACnE,OAAO,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;oBACjE,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAClD,eAAe,EAAE,CAAC,gBAAgB,CAAC;oBACnC,SAAS,EAAE,CAAC,4CAA4C,CAAC;iBACzD;;;AChBD;;;;;;"}
1
+ {"version":3,"file":"bravura-ui-tooltip.js","sources":["../../../projects/ui/tooltip/tooltip.component.ts","../../../projects/ui/tooltip/tooltip.component.html","../../../projects/ui/tooltip/tooltip.directive.ts","../../../projects/ui/tooltip/tooltip.module.ts","../../../projects/ui/tooltip/bravura-ui-tooltip.ts"],"sourcesContent":["import { BreakpointObserver } from '@angular/cdk/layout';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInject,\n\tInjectionToken,\n\tTemplateRef,\n\tViewChild,\n\tViewContainerRef,\n\tViewEncapsulation\n} from '@angular/core';\nimport { matTooltipAnimations, TooltipComponent as MatTooltipComponent } from '@angular/material/tooltip';\nimport { getTextWidth } from '@bravura/ui/common';\n\n/**\n * @ignore\n */\ninterface TooltipTemplateContainer {\n\ttemplate?: TemplateRef<any>;\n\tmessage?: string;\n}\n\n/**\n * @ignore\n */\nexport const BUI_TOOLTIP_TEMPLATE_REF = new InjectionToken<TooltipTemplateContainer>(\n\t'@bravura/ui/tooltip/templateContainer'\n);\n\n@Component({\n\tselector: 'bui-tooltip-component',\n\ttemplateUrl: './tooltip.component.html',\n\tstyleUrls: ['./tooltip.component.scss'],\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\tanimations: [matTooltipAnimations.tooltipState],\n\thost: {\n\t\tclass: 'bui-tooltip-component bui-host',\n\t\t// Forces the element to have a layout in IE and Edge. This fixes issues where the element\n\t\t// won't be rendered if the animations are disabled or there is no web animations polyfill.\n\t\t'[style.zoom]': '_visibility === \"visible\" ? 1 : null',\n\t\t'(body:click)': 'this._handleBodyInteraction()',\n\t\t'(body:auxclick)': 'this._handleBodyInteraction()',\n\t\t'aria-hidden': 'true'\n\t}\n})\nexport class TooltipComponent extends MatTooltipComponent {\n\tprivate _messageCopy = '';\n\n\t@ViewChild('tooltip', { static: true })\n\t_tooltip!: ElementRef<HTMLElement>;\n\n\t@ViewChild('tooltipDiv', { static: true })\n\tprivate tooltipDiv!: ElementRef<HTMLDivElement>;\n\n\t@ViewChild('messageCont', { static: true, read: ViewContainerRef })\n\tprivate messageCont!: ViewContainerRef;\n\n\tconstructor(\n\t\tchangeDetectorRef: ChangeDetectorRef,\n\t\t_breakpointObserver: BreakpointObserver,\n\t\t@Inject(BUI_TOOLTIP_TEMPLATE_REF) public _tooltipInst: TooltipTemplateContainer\n\t) {\n\t\tsuper(changeDetectorRef, _breakpointObserver);\n\t}\n\n\tshow(delay: number): void {\n\t\tif (this._messageCopy !== this.message && !this._tooltipInst.template) {\n\t\t\tthis.tooltipDiv.nativeElement.innerHTML = this.message;\n\t\t\tthis._messageCopy = this.message;\n\t\t\tconst width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);\n\t\t\tthis._tooltip.nativeElement.style.maxWidth = `${width}px`;\n\t\t} else if (this._tooltipInst.template) {\n\t\t\tthis.messageCont.clear();\n\t\t\tconst ref = this.messageCont.createEmbeddedView(this._tooltipInst.template);\n\t\t\tref.detectChanges();\n\t\t\tthis._tooltipInst.message = this.message = this.tooltipDiv.nativeElement.textContent as string;\n\t\t}\n\t\tsuper.show(delay);\n\t}\n\n\tget _self(): any {\n\t\treturn this;\n\t}\n}\n\n(TooltipComponent as any).ɵcmp.styles.push((MatTooltipComponent as any).ɵcmp.styles);\n","<div\n\t#tooltip\n\tclass=\"mat-tooltip bui-tooltip\"\n\t[ngClass]=\"tooltipClass\"\n\t[class.mat-tooltip-handset]=\"(_isHandset | async)?.matches\"\n\t[@state]=\"_visibility\"\n\t(@state.start)=\"_self._animationStart && _self._animationStart()\"\n\t(@state.done)=\"_self._animationDone && _self._animationDone($event)\"\n\t(animationend)=\"_self._handleAnimationEnd && _self._handleAnimationEnd($event)\"\n>\n\t<div #tooltipDiv>\n\t\t<ng-container #messageCont></ng-container>\n\t</div>\n</div>\n","import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { Overlay, ScrollDispatcher } from '@angular/cdk/overlay';\nimport { Platform } from '@angular/cdk/platform';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\tDirective,\n\tElementRef,\n\tforwardRef,\n\tHostListener,\n\tInject,\n\tInput,\n\tNgZone,\n\tOptional,\n\tTemplateRef,\n\tViewContainerRef\n} from '@angular/core';\nimport {\n\tMatTooltipDefaultOptions,\n\tMAT_TOOLTIP_DEFAULT_OPTIONS,\n\tMAT_TOOLTIP_SCROLL_STRATEGY,\n\tTooltipPosition,\n\t_MatTooltipBase\n} from '@angular/material/tooltip';\nimport { Observable, Subject, Subscription } from 'rxjs';\nimport { BUI_TOOLTIP_TEMPLATE_REF, TooltipComponent } from './tooltip.component';\n\n/**\n * This directive extends [Angular Material tooltip](https://material.angular.io/components/tooltip/overview), with the additional capability of displaying\n * HTML content in the overlay area.\n *\n * All the other features are identical as those in Angular Material tooltip.\n */\n@Directive({\n\tselector: '[buiTooltip]',\n\texportAs: 'buiTooltip',\n\thost: {\n\t\tclass: 'mat-tooltip-trigger bui-tooltip-trigger'\n\t},\n\tproviders: [\n\t\t{\n\t\t\tprovide: BUI_TOOLTIP_TEMPLATE_REF,\n\t\t\tuseExisting: forwardRef(() => TooltipDirective)\n\t\t}\n\t]\n})\nexport class TooltipDirective extends _MatTooltipBase<TooltipComponent> {\n\tprotected readonly _tooltipComponent = TooltipComponent;\n\tprivate _templateRef?: TemplateRef<any>;\n\tprivate _contentSub: Subscription = new Subject<void>().subscribe();\n\tprivate _contentObs?: Observable<string>;\n\n\tconstructor(\n\t\toverlay: Overlay,\n\t\telementRef: ElementRef<HTMLElement>,\n\t\tscrollDispatcher: ScrollDispatcher,\n\t\tviewContainerRef: ViewContainerRef,\n\t\tngZone: NgZone,\n\t\tplatform: Platform,\n\t\tariaDescriber: AriaDescriber,\n\t\tfocusMonitor: FocusMonitor,\n\t\t@Inject(MAT_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n\t\t@Optional() dir: Directionality,\n\t\t@Optional() @Inject(MAT_TOOLTIP_DEFAULT_OPTIONS) defaultOptions: MatTooltipDefaultOptions,\n\t\t@Inject(DOCUMENT) _document: any\n\t) {\n\t\tsuper(\n\t\t\toverlay,\n\t\t\telementRef,\n\t\t\tscrollDispatcher,\n\t\t\tviewContainerRef,\n\t\t\tngZone,\n\t\t\tplatform,\n\t\t\tariaDescriber,\n\t\t\tfocusMonitor,\n\t\t\tscrollStrategy,\n\t\t\tdir,\n\t\t\tdefaultOptions,\n\t\t\t_document\n\t\t);\n\t\tthis.touchGestures = 'off';\n\t\tconst element = elementRef.nativeElement;\n\t\telement.setAttribute('aria-hidden', 'false');\n\t\tif (element.tabIndex === -1) {\n\t\t\telement.tabIndex = 0;\n\t\t\telement.setAttribute('aria-roledescription', 'tooltip');\n\t\t}\n\t}\n\n\t/** Allows the user to define the position of the tooltip relative to the parent element */\n\t@Input()\n\tget buiTooltipPosition(): TooltipPosition {\n\t\treturn this.position;\n\t}\n\tset buiTooltipPosition(value: TooltipPosition) {\n\t\tthis.position = value;\n\t}\n\n\t/** Disables the display of the tooltip. */\n\t@Input()\n\tget buiTooltipDisabled(): boolean {\n\t\treturn this.disabled;\n\t}\n\tset buiTooltipDisabled(value) {\n\t\tthis.disabled = value;\n\t}\n\n\t/** The message to be displayed in the tooltip. */\n\t@Input()\n\tget buiTooltip(): string | TemplateRef<any> | Observable<string> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tthis._contentSub.unsubscribe();\n\t\tthis._contentObs = undefined;\n\t\tthis._templateRef = undefined;\n\t\tthis.message = '';\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else if (value instanceof TemplateRef) {\n\t\t\tthis._templateRef = value;\n\t\t\tif (value) {\n\t\t\t\tthis.message = '[bui-tooltip-template]';\n\t\t\t} else {\n\t\t\t\tthis._templateRef = undefined;\n\t\t\t}\n\t\t} else if (value instanceof Observable) {\n\t\t\tthis.message = '...';\n\t\t\tthis._contentObs = value;\n\t\t}\n\t}\n\n\t/** @ignore */\n\tget template(): TemplateRef<any> | undefined {\n\t\treturn this._templateRef;\n\t}\n\n\t/** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n\t@Input()\n\tget buiTooltipClass() {\n\t\treturn this.tooltipClass;\n\t}\n\tset buiTooltipClass(value: string | string[] | Set<string> | { [key: string]: any }) {\n\t\tthis.tooltipClass = value;\n\t}\n\n\t/** @ignore */\n\t@HostListener('click')\n\tclicked() {\n\t\tthis.toggle();\n\t}\n\n\t/** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n\tshow(delay: number = this.showDelay): void {\n\t\tif (this._contentObs) {\n\t\t\tthis._contentSub.unsubscribe();\n\t\t\tthis._contentSub = this._contentObs.subscribe(c => {\n\t\t\t\tthis.message = c;\n\t\t\t\tthis._contentSub.unsubscribe();\n\t\t\t\tsuper.show(delay);\n\t\t\t});\n\t\t} else {\n\t\t\tsuper.show(delay);\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis._contentSub.unsubscribe();\n\t}\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { OverlayModule } from '@angular/cdk/overlay';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER } from '@angular/material/tooltip';\nimport { TooltipComponent } from './tooltip.component';\nimport { TooltipDirective } from './tooltip.directive';\n\n@NgModule({\n\timports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n\texports: [TooltipDirective, MatCommonModule, CdkScrollableModule],\n\tdeclarations: [TooltipDirective, TooltipComponent],\n\tentryComponents: [TooltipComponent],\n\tproviders: [MAT_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER]\n})\nexport class TooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["MatTooltipComponent"],"mappings":";;;;;;;;;;;;;;;;;AAwBA;;;MAGa,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,EACtC;MAmBW,gBAAiB,SAAQA,kBAAmB;IAYxD,YACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC;QAE/E,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAFL,iBAAY,GAAZ,YAAY,CAA0B;QAdxE,iBAAY,GAAG,EAAE,CAAC;KAiBzB;IAED,IAAI,CAAC,KAAa;QACjB,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE;YACtE,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC;YACvD,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC;YACjC,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAE,GAAG,CAAC,CAAC;Y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aACxD,gBAAgB,EAAE,eAAe,EAAE,mBAAmB;4GAKpD,aAAa,aAFd,CAAC,4CAA4C,CAAC,YAJhD,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC,EACvC,eAAe,EAAE,mBAAmB;4FAKpD,aAAa;kBAPzB,QAAQ;mBAAC;oBACT,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;oBACnE,OAAO,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;oBACjE,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAClD,eAAe,EAAE,CAAC,gBAAgB,CAAC;oBACnC,SAAS,EAAE,CAAC,4CAA4C,CAAC;iBACzD;;;AChBD;;;;;;"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bravura/ui",
3
3
  "description": "Bravura UI Components for Angular applications",
4
- "version": "1.25.0",
4
+ "version": "1.26.1",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@bravura/ui/radio-panel/testing" />
5
+ export * from './test-api';
@@ -0,0 +1,10 @@
1
+ {
2
+ "main": "../../bundles/bravura-ui-radio-panel-testing.umd.js",
3
+ "module": "../../fesm2015/bravura-ui-radio-panel-testing.js",
4
+ "es2015": "../../fesm2015/bravura-ui-radio-panel-testing.js",
5
+ "esm2015": "../../esm2015/radio-panel/testing/bravura-ui-radio-panel-testing.js",
6
+ "fesm2015": "../../fesm2015/bravura-ui-radio-panel-testing.js",
7
+ "typings": "bravura-ui-radio-panel-testing.d.ts",
8
+ "sideEffects": false,
9
+ "name": "@bravura/ui/radio-panel/testing"
10
+ }
@@ -0,0 +1,28 @@
1
+ import { ComponentHarnessConstructor, HarnessPredicate } from '@angular/cdk/testing';
2
+ import { MatRadioButtonHarness, RadioButtonHarnessFilters, _MatRadioGroupHarnessBase } from '@angular/material/radio/testing';
3
+ export interface RadioPanelItemHarnessFilters extends RadioButtonHarnessFilters {
4
+ value?: string | RegExp;
5
+ }
6
+ export declare class RadioPanelItemHarness extends MatRadioButtonHarness {
7
+ static hostSelector: string;
8
+ getLabelElement: import("@angular/cdk/testing").AsyncFactoryFn<import("@angular/cdk/testing").TestElement>;
9
+ protected _textLabel: import("@angular/cdk/testing").AsyncFactoryFn<import("@angular/cdk/testing").TestElement>;
10
+ protected _clickLabel: import("@angular/cdk/testing").AsyncFactoryFn<import("@angular/cdk/testing").TestElement>;
11
+ /**
12
+ * Gets a `HarnessPredicate` that can be used to search for a radio button with specific
13
+ * attributes.
14
+ * @param options Options for filtering which radio button instances are considered a match.
15
+ * @return a `HarnessPredicate` configured with the given options.
16
+ */
17
+ static with<T extends MatRadioButtonHarness>(this: ComponentHarnessConstructor<T>, options?: RadioPanelItemHarnessFilters): HarnessPredicate<T>;
18
+ click(): Promise<void>;
19
+ getLabelCssValue(prop: string): Promise<string>;
20
+ getBorderColor(): Promise<string>;
21
+ }
22
+ export declare class RadioPanelHarness extends _MatRadioGroupHarnessBase<typeof RadioPanelItemHarness, RadioPanelItemHarness, RadioButtonHarnessFilters> {
23
+ /** The selector for the host element of a `MatRadioGroup` instance. */
24
+ static hostSelector: string;
25
+ protected _buttonClass: typeof RadioPanelItemHarness;
26
+ getItem: (filters?: RadioPanelItemHarnessFilters | undefined) => Promise<RadioPanelItemHarness>;
27
+ getFlexDir(): Promise<string>;
28
+ }
@@ -7,6 +7,7 @@ import * as i0 from "@angular/core";
7
7
  */
8
8
  interface TooltipTemplateContainer {
9
9
  template?: TemplateRef<any>;
10
+ message?: string;
10
11
  }
11
12
  /**
12
13
  * @ignore
@@ -17,6 +18,7 @@ export declare class TooltipComponent extends MatTooltipComponent {
17
18
  private _messageCopy;
18
19
  _tooltip: ElementRef<HTMLElement>;
19
20
  private tooltipDiv;
21
+ private messageCont;
20
22
  constructor(changeDetectorRef: ChangeDetectorRef, _breakpointObserver: BreakpointObserver, _tooltipInst: TooltipTemplateContainer);
21
23
  show(delay: number): void;
22
24
  get _self(): any;