@bravura/ui 2.3.4 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Change history
2
2
 
3
+ ## 2.4.0 (2022-09-19)
4
+
5
+ * test: fix test failures ([2ed4fdd](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/2ed4fdd))
6
+ * test(panel): fix test failure ([a623612](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/a623612))
7
+ * docs(panel): add real world sample story ([18bd2d6](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/18bd2d6))
8
+ * docs(storybook): sort story groups ([2acf72f](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/2acf72f))
9
+ * feat(tooltip): automate calculation of default width ([9076924](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/9076924))
10
+ * build(storybook): add more missing packages ([2cb6c86](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/2cb6c86))
11
+ * build(storybook): fix package resolution error ([0e57024](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/0e57024))
12
+ * build(storybook): move storybook build from chromatic to build stage ([50e7ec1](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/50e7ec1))
13
+
3
14
  ## <small>2.3.4 (2022-09-16)</small>
4
15
 
5
16
  * test: enrich test cases and enforce coverage check ([4176208](https://scm.bravurasolutions.net/projects/DIGI/repos/ui-components/commits/4176208))
@@ -1,2 +1,11 @@
1
1
  export declare function generateID(): string;
2
2
  export declare function isElementInViewport(el: HTMLElement): boolean;
3
+ /**
4
+ * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
5
+ *
6
+ * @param {String} text The text to be rendered.
7
+ * @param el the element used to compute the font styles
8
+ *
9
+ * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
10
+ */
11
+ export declare function getTextWidth(text: string, el?: HTMLElement): number;
@@ -1,7 +1,5 @@
1
1
  export function generateID() {
2
- return btoa(`${(Math.round(Math.random() * 1000) + Date.now() * 1000) % 1000000}`)
3
- .replace(/[^\w\d]/g, '')
4
- .toLowerCase();
2
+ return Math.round(Math.random() * Math.pow(2, 50)).toString(36);
5
3
  }
6
4
  export function isElementInViewport(el) {
7
5
  const rect = el.getBoundingClientRect();
@@ -10,4 +8,27 @@ export function isElementInViewport(el) {
10
8
  rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
11
9
  rect.right <= (window.innerWidth || document.documentElement.clientWidth));
12
10
  }
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvY29tbW9uL2NvbW1vbi11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFVBQVUsVUFBVTtJQUN6QixPQUFPLElBQUksQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEtBQUssQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEdBQUcsSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLElBQUksQ0FBQyxHQUFHLE9BQU8sRUFBRSxDQUFDO1NBQ2hGLE9BQU8sQ0FBQyxVQUFVLEVBQUUsRUFBRSxDQUFDO1NBQ3ZCLFdBQVcsRUFBRSxDQUFDO0FBQ2pCLENBQUM7QUFFRCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsRUFBZTtJQUNsRCxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMscUJBQXFCLEVBQUUsQ0FBQztJQUV4QyxPQUFPLENBQ04sSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDO1FBQ2IsSUFBSSxDQUFDLElBQUksSUFBSSxDQUFDO1FBQ2QsSUFBSSxDQUFDLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ0FBQyxXQUFXLElBQUksUUFBUSxDQUFDLGVBQWUsQ0FBQyxZQUFZLENBQUM7UUFDNUUsSUFBSSxDQUFDLEtBQUssSUFBSSxDQUFDLE1BQU0sQ0FBQyxVQUFVLElBQUksUUFBUSxDQUFDLGVBQWUsQ0FBQyxXQUFXLENBQUMsQ0FDekUsQ0FBQztBQUNILENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgZnVuY3Rpb24gZ2VuZXJhdGVJRCgpIHtcblx0cmV0dXJuIGJ0b2EoYCR7KE1hdGgucm91bmQoTWF0aC5yYW5kb20oKSAqIDEwMDApICsgRGF0ZS5ub3coKSAqIDEwMDApICUgMTAwMDAwMH1gKVxuXHRcdC5yZXBsYWNlKC9bXlxcd1xcZF0vZywgJycpXG5cdFx0LnRvTG93ZXJDYXNlKCk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc0VsZW1lbnRJblZpZXdwb3J0KGVsOiBIVE1MRWxlbWVudCkge1xuXHRjb25zdCByZWN0ID0gZWwuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCk7XG5cblx0cmV0dXJuIChcblx0XHRyZWN0LnRvcCA+PSAwICYmXG5cdFx0cmVjdC5sZWZ0ID49IDAgJiZcblx0XHRyZWN0LmJvdHRvbSA8PSAod2luZG93LmlubmVySGVpZ2h0IHx8IGRvY3VtZW50LmRvY3VtZW50RWxlbWVudC5jbGllbnRIZWlnaHQpICYmXG5cdFx0cmVjdC5yaWdodCA8PSAod2luZG93LmlubmVyV2lkdGggfHwgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudFdpZHRoKVxuXHQpO1xufVxuIl19
11
+ /**
12
+ * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
13
+ *
14
+ * @param {String} text The text to be rendered.
15
+ * @param el the element used to compute the font styles
16
+ *
17
+ * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
18
+ */
19
+ export function getTextWidth(text, el = document.body) {
20
+ function getCssStyle(element, prop) {
21
+ return window.getComputedStyle(element, null).getPropertyValue(prop);
22
+ }
23
+ const fontWeight = getCssStyle(el, 'font-weight') || 'normal';
24
+ const fontSize = getCssStyle(el, 'font-size') || '16px';
25
+ const fontFamily = getCssStyle(el, 'font-family') || 'Arial';
26
+ const font = `${fontWeight} ${fontSize} ${fontFamily}`;
27
+ // re-use canvas object for better performance
28
+ const canvas = getTextWidth.canvas || (getTextWidth.canvas = document.createElement('canvas'));
29
+ const context = canvas.getContext('2d');
30
+ context.font = font;
31
+ const metrics = context.measureText(text);
32
+ return Math.round(metrics.width);
33
+ }
34
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLXV0aWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvdWkvY29tbW9uL2NvbW1vbi11dGlscy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLFVBQVUsVUFBVTtJQUN6QixPQUFPLElBQUksQ0FBQyxLQUFLLENBQUMsSUFBSSxDQUFDLE1BQU0sRUFBRSxHQUFHLElBQUksQ0FBQyxHQUFHLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQ2pFLENBQUM7QUFFRCxNQUFNLFVBQVUsbUJBQW1CLENBQUMsRUFBZTtJQUNsRCxNQUFNLElBQUksR0FBRyxFQUFFLENBQUMscUJBQXFCLEVBQUUsQ0FBQztJQUV4QyxPQUFPLENBQ04sSUFBSSxDQUFDLEdBQUcsSUFBSSxDQUFDO1FBQ2IsSUFBSSxDQUFDLElBQUksSUFBSSxDQUFDO1FBQ2QsSUFBSSxDQUFDLE1BQU0sSUFBSSxDQUFDLE1BQU0sQ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YXMnKSk7XG5cdGNvbnN0IGNvbnRleHQgPSBjYW52YXMuZ2V0Q29udGV4dCgnMmQnKTtcblx0Y29udGV4dC5mb250ID0gZm9udDtcblx0Y29uc3QgbWV0cmljcyA9IGNvbnRleHQubWVhc3VyZVRleHQodGV4dCk7XG5cdHJldHVybiBNYXRoLnJvdW5kKG1ldHJpY3Mud2lkdGgpO1xufVxuIl19
@@ -1,5 +1,6 @@
1
1
  import { ChangeDetectionStrategy, Component, Inject, InjectionToken, ViewChild, ViewEncapsulation } from '@angular/core';
2
2
  import { matTooltipAnimations, TooltipComponent as MatTooltipComponent } from '@angular/material/tooltip';
3
+ import { getTextWidth } from '@bravura/ui/common';
3
4
  import * as i0 from "@angular/core";
4
5
  import * as i1 from "@angular/cdk/layout";
5
6
  import * as i2 from "@angular/common";
@@ -17,6 +18,8 @@ export class TooltipComponent extends MatTooltipComponent {
17
18
  if (this._messageCopy !== this.message && !this._tooltipInst.template) {
18
19
  this.tooltipDiv.nativeElement.innerHTML = this.message;
19
20
  this._messageCopy = this.message;
21
+ const width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);
22
+ this._tooltip.nativeElement.style.maxWidth = `${width}px`;
20
23
  }
21
24
  super.show(delay);
22
25
  }
@@ -25,7 +28,7 @@ export class TooltipComponent extends MatTooltipComponent {
25
28
  }
26
29
  }
27
30
  TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.BreakpointObserver }, { token: BUI_TOOLTIP_TEMPLATE_REF }], target: i0.ɵɵFactoryTarget.Component });
28
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
31
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
29
32
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, decorators: [{
30
33
  type: Component,
31
34
  args: [{ selector: 'bui-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [matTooltipAnimations.tooltipState], host: {
@@ -36,7 +39,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
36
39
  '(body:click)': 'this._handleBodyInteraction()',
37
40
  '(body:auxclick)': 'this._handleBodyInteraction()',
38
41
  'aria-hidden': 'true'
39
- }, 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"] }]
42
+ }, 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"] }]
40
43
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.BreakpointObserver }, { type: undefined, decorators: [{
41
44
  type: Inject,
42
45
  args: [BUI_TOOLTIP_TEMPLATE_REF]
@@ -48,4 +51,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
48
51
  args: ['tooltipDiv', { static: true }]
49
52
  }] } });
50
53
  TooltipComponent.ɵcmp.styles.push(MatTooltipComponent.ɵcmp.styles);
51
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9vbHRpcC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy91aS90b29sd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tcC5zdHlsZXMpO1xuIiwiPGRpdlxuXHQjdG9vbHRpcFxuXHRjbGFzcz1cIm1hdC10b29sdGlwIGJ1aS10b29sdGlwXCJcblx0W25nQ2xhc3NdPVwidG9vbHRpcENsYXNzXCJcblx0W2NsYXNzLm1hdC10b29sdGlwLWhhbmRzZXRdPVwiKF9pc0hhbmRzZXQgfCBhc3luYyk/Lm1hdGNoZXNcIlxuXHRbQHN0YXRlXT1cIl92aXNpYmlsaXR5XCJcblx0KEBzdGF0ZS5zdGFydCk9XCJfc2VsZi5fYW5pbWF0aW9uU3RhcnQgJiYgX3NlbGYuX2FuaW1hdGlvblN0YXJ0KClcIlxuXHQoQHN0YXRlLmRvbmUpPVwiX3NlbGYuX2FuaW1hdGlvbkRvbmUgJiYgX3NlbGYuX2FuaW1hdGlvbkRvbmUoJGV2ZW50KVwiXG5cdChhbmltYXRpb25lbmQpPVwiX3NlbGYuX2hhbmRsZUFuaW1hdGlvbkVuZCAmJiBfc2VsZi5faGFuZGxlQW5pbWF0aW9uRW5kKCRldmVudClcIlxuPlxuXHQ8bmctdGVtcGxhdGUgW25nSWZdPVwiX3Rvb2x0aXBJbnN0LnRlbXBsYXRlXCI+XG5cdFx0PG5nLXRlbXBsYXRlIFtuZ1RlbXBsYXRlT3V0bGV0XT1cIl90b29sdGlwSW5zdC50ZW1wbGF0ZVwiPjwvbmctdGVtcGxhdGU+XG5cdDwvbmctdGVtcGxhdGU+XG5cdDxkaXYgI3Rvb2x0aXBEaXY+PC9kaXY+XG48L2Rpdj5cbiJdfQ==
@@ -5,9 +5,7 @@ import * as i0 from '@angular/core';
5
5
  import { NgModule, Optional, SkipSelf, Inject } from '@angular/core';
6
6
 
7
7
  function generateID() {
8
- return btoa(`${(Math.round(Math.random() * 1000) + Date.now() * 1000) % 1000000}`)
9
- .replace(/[^\w\d]/g, '')
10
- .toLowerCase();
8
+ return Math.round(Math.random() * Math.pow(2, 50)).toString(36);
11
9
  }
12
10
  function isElementInViewport(el) {
13
11
  const rect = el.getBoundingClientRect();
@@ -16,6 +14,29 @@ function isElementInViewport(el) {
16
14
  rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
17
15
  rect.right <= (window.innerWidth || document.documentElement.clientWidth));
18
16
  }
17
+ /**
18
+ * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
19
+ *
20
+ * @param {String} text The text to be rendered.
21
+ * @param el the element used to compute the font styles
22
+ *
23
+ * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
24
+ */
25
+ function getTextWidth(text, el = document.body) {
26
+ function getCssStyle(element, prop) {
27
+ return window.getComputedStyle(element, null).getPropertyValue(prop);
28
+ }
29
+ const fontWeight = getCssStyle(el, 'font-weight') || 'normal';
30
+ const fontSize = getCssStyle(el, 'font-size') || '16px';
31
+ const fontFamily = getCssStyle(el, 'font-family') || 'Arial';
32
+ const font = `${fontWeight} ${fontSize} ${fontFamily}`;
33
+ // re-use canvas object for better performance
34
+ const canvas = getTextWidth.canvas || (getTextWidth.canvas = document.createElement('canvas'));
35
+ const context = canvas.getContext('2d');
36
+ context.font = font;
37
+ const metrics = context.measureText(text);
38
+ return Math.round(metrics.width);
39
+ }
19
40
 
20
41
  /** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */
21
42
  const RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
@@ -71,5 +92,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
71
92
  * Generated bundle index. Do not edit.
72
93
  */
73
94
 
74
- export { BuiCommonModule, _resolveDirectionality, generateID, isElementInViewport };
95
+ export { BuiCommonModule, _resolveDirectionality, generateID, getTextWidth, isElementInViewport };
75
96
  //# sourceMappingURL=bravura-ui-common.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-common.mjs","sources":["../../../projects/ui/common/common-utils.ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn btoa(`${(Math.round(Math.random() * 1000) + Date.now() * 1000) % 1000000}`)\n\t\t.replace(/[^\\w\\d]/g, '')\n\t\t.toLowerCase();\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,CAAA,EAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,OAAO,CAAA,CAAE,CAAC;AAChF,SAAA,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACvB,SAAA,WAAW,EAAE,CAAC;AACjB,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAe,EAAA;AAClD,IAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAExC,IAAA,QACC,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,IAAI,IAAI,CAAC;AACd,QAAA,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC;AAC5E,QAAA,IAAI,CAAC,KAAK,KAAK,MAAM,CAAC,UAAU,IAAI,QAAQ,CAAC,eAAe,CAAC,WAAW,CAAC,EACxE;AACH;;ACXA;AACA,MAAM,kBAAkB,GACvB,oHAAoH,CAAC;AAEtH;AACM,SAAU,sBAAsB,CAAC,QAAgB,EAAA;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C,CAAC,CAAC,CAAC,CAAC;AACrC,iBAAA;AACF,aAAC,CAAC,CAAC;AAEH,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,SAAA;KACD;;4GAxBW,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAKd,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EACnB,QAAQ,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GANL,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,CAAA,EAAA,OAAA,EAAA,CACV,UAAU,CAAA,EAAA,CAAA,CAAA;6GAER,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,EACV,UAAU,CAAA,EAAA,CAAA,CAAA;2FAER,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,OAAO,EAAE,CAAC,UAAU,CAAC;iBACrB,CAAA;;qDAMa,eAAe,EAAA,UAAA,EAAA,CAAA;8BAF1B,QAAQ;;8BACR,QAAQ;kCAEmB,QAAQ,EAAA,UAAA,EAAA,CAAA;8BAAnC,MAAM;+BAAC,QAAQ,CAAA;;;;AC9BlB;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-common.mjs","sources":["../../../projects/ui/common/common-utils.ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn Math.round(Math.random() * Math.pow(2, 50)).toString(36);\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n\n/**\n * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.\n *\n * @param {String} text The text to be rendered.\n * @param el the element used to compute the font styles\n *\n * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393\n */\nexport function getTextWidth(text: string, el: HTMLElement = document.body): number {\n\tfunction getCssStyle(element: HTMLElement, prop: string) {\n\t\treturn window.getComputedStyle(element, null).getPropertyValue(prop);\n\t}\n\n\tconst fontWeight = getCssStyle(el, 'font-weight') || 'normal';\n\tconst fontSize = getCssStyle(el, 'font-size') || '16px';\n\tconst fontFamily = getCssStyle(el, 'font-family') || 'Arial';\n\n\tconst font = `${fontWeight} ${fontSize} ${fontFamily}`;\n\n\t// re-use canvas object for better performance\n\tconst canvas = (getTextWidth as any).canvas || ((getTextWidth as any).canvas = document.createElement('canvas'));\n\tconst context = canvas.getContext('2d');\n\tcontext.font = font;\n\tconst metrics = context.measureText(text);\n\treturn Math.round(metrics.width);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAe,EAAA;AAClD,IAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAExC,IAAA,QACC,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,IAAI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ectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, 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
+ import { getTextWidth } from '@bravura/ui/common';
12
13
  import * as i1 from '@angular/cdk/layout';
13
14
  import * as i2$1 from '@angular/cdk/platform';
14
15
  import * as i4 from '@angular/cdk/bidi';
@@ -27,6 +28,8 @@ class TooltipComponent extends TooltipComponent$1 {
27
28
  if (this._messageCopy !== this.message && !this._tooltipInst.template) {
28
29
  this.tooltipDiv.nativeElement.innerHTML = this.message;
29
30
  this._messageCopy = this.message;
31
+ const width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);
32
+ this._tooltip.nativeElement.style.maxWidth = `${width}px`;
30
33
  }
31
34
  super.show(delay);
32
35
  }
@@ -35,7 +38,7 @@ class TooltipComponent extends TooltipComponent$1 {
35
38
  }
36
39
  }
37
40
  TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.BreakpointObserver }, { token: BUI_TOOLTIP_TEMPLATE_REF }], target: i0.ɵɵFactoryTarget.Component });
38
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, decorators: [{
40
43
  type: Component,
41
44
  args: [{ selector: 'bui-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [matTooltipAnimations.tooltipState], host: {
@@ -46,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
46
49
  '(body:click)': 'this._handleBodyInteraction()',
47
50
  '(body:auxclick)': 'this._handleBodyInteraction()',
48
51
  'aria-hidden': 'true'
49
- }, 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"] }]
52
+ }, 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"] }]
50
53
  }], ctorParameters: function () {
51
54
  return [{ type: i0.ChangeDetectorRef }, { type: i1.BreakpointObserver }, { type: undefined, decorators: [{
52
55
  type: Inject,
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-tooltip.mjs","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';\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}\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 { 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\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}\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> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else {\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\tthis.message = '';\n\t\t\t}\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","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\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","i1","i2"],"mappings":";;;;;;;;;;;;;;;AAqBA;;AAEG;AACI,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,CACvC,CAAC;AAmBI,MAAO,gBAAiB,SAAQA,kBAAmB,CAAA;AASxD,IAAA,WAAA,CACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC,EAAA;AAE/E,QAAA,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAA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AAE,eAAe,EAAE,mBAAmB,CAAC;AACjE,oBAAA,YAAY,EAAE,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAClD,SAAS,EAAE,CAAC,4CAA4C,CAAC;iBACzD,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-tooltip.mjs","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 { 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\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}\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> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else {\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\tthis.message = '';\n\t\t\t}\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","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\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","i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAsBA;;AAEG;AACI,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,CACvC,CAAC;AAmBI,MAAO,gBAAiB,SAAQA,kBAAmB,CAAA;AASxD,IAAA,WAAA,CACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC,EAAA;AAE/E,QAAA,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;AAFL,QAAA,IAAY,CAAA,YAAA,GAAZ,YAAY,CAA0B;AAXxE,QAAA,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;KAczB;AAED,IAAA,IAAI,CAAC,KAAa,EAAA;AACjB,QAAA,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;AACvD,YAAA,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,CA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f, Inject } from '@angular/core';
6
6
 
7
7
  function generateID() {
8
- return btoa(`${(Math.round(Math.random() * 1000) + Date.now() * 1000) % 1000000}`)
9
- .replace(/[^\w\d]/g, '')
10
- .toLowerCase();
8
+ return Math.round(Math.random() * Math.pow(2, 50)).toString(36);
11
9
  }
12
10
  function isElementInViewport(el) {
13
11
  const rect = el.getBoundingClientRect();
@@ -16,6 +14,29 @@ function isElementInViewport(el) {
16
14
  rect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&
17
15
  rect.right <= (window.innerWidth || document.documentElement.clientWidth));
18
16
  }
17
+ /**
18
+ * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.
19
+ *
20
+ * @param {String} text The text to be rendered.
21
+ * @param el the element used to compute the font styles
22
+ *
23
+ * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393
24
+ */
25
+ function getTextWidth(text, el = document.body) {
26
+ function getCssStyle(element, prop) {
27
+ return window.getComputedStyle(element, null).getPropertyValue(prop);
28
+ }
29
+ const fontWeight = getCssStyle(el, 'font-weight') || 'normal';
30
+ const fontSize = getCssStyle(el, 'font-size') || '16px';
31
+ const fontFamily = getCssStyle(el, 'font-family') || 'Arial';
32
+ const font = `${fontWeight} ${fontSize} ${fontFamily}`;
33
+ // re-use canvas object for better performance
34
+ const canvas = getTextWidth.canvas || (getTextWidth.canvas = document.createElement('canvas'));
35
+ const context = canvas.getContext('2d');
36
+ context.font = font;
37
+ const metrics = context.measureText(text);
38
+ return Math.round(metrics.width);
39
+ }
19
40
 
20
41
  /** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */
21
42
  const RTL_LOCALE_PATTERN = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
@@ -69,5 +90,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
69
90
  * Generated bundle index. Do not edit.
70
91
  */
71
92
 
72
- export { BuiCommonModule, _resolveDirectionality, generateID, isElementInViewport };
93
+ export { BuiCommonModule, _resolveDirectionality, generateID, getTextWidth, isElementInViewport };
73
94
  //# sourceMappingURL=bravura-ui-common.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-common.mjs","sources":["../../../projects/ui/common/common-utils.ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn btoa(`${(Math.round(Math.random() * 1000) + Date.now() * 1000) % 1000000}`)\n\t\t.replace(/[^\\w\\d]/g, '')\n\t\t.toLowerCase();\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,CAAA,EAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,IAAI,OAAO,CAAA,CAAE,CAAC;AAChF,SAAA,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;AACvB,SAAA,WAAW,EAAE,CAAC;AACjB,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAe,EAAA;AAClD,IAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAExC,IAAA,QACC,IAAI,CAAC,GAAG,IAAI,CAAC;QACb,IAAI,CAAC,IAAI,IAAI,CAAC;AACd,QAAA,IAAI,CAAC,MAAM,KAAK,MAAM,CAAC,WAAW,IAAI,QAAQ,CAAC,eAAe,CAAC,YAAY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ts","../../../projects/ui/common/common.module.ts","../../../projects/ui/common/bravura-ui-common.ts"],"sourcesContent":["export function generateID() {\n\treturn Math.round(Math.random() * Math.pow(2, 50)).toString(36);\n}\n\nexport function isElementInViewport(el: HTMLElement) {\n\tconst rect = el.getBoundingClientRect();\n\n\treturn (\n\t\trect.top >= 0 &&\n\t\trect.left >= 0 &&\n\t\trect.bottom <= (window.innerHeight || document.documentElement.clientHeight) &&\n\t\trect.right <= (window.innerWidth || document.documentElement.clientWidth)\n\t);\n}\n\n/**\n * Uses canvas.measureText to compute and return the width of the given text of given font in pixels.\n *\n * @param {String} text The text to be rendered.\n * @param el the element used to compute the font styles\n *\n * @see https://stackoverflow.com/questions/118241/calculate-text-width-with-javascript/21015393#21015393\n */\nexport function getTextWidth(text: string, el: HTMLElement = document.body): number {\n\tfunction getCssStyle(element: HTMLElement, prop: string) {\n\t\treturn window.getComputedStyle(element, null).getPropertyValue(prop);\n\t}\n\n\tconst fontWeight = getCssStyle(el, 'font-weight') || 'normal';\n\tconst fontSize = getCssStyle(el, 'font-size') || '16px';\n\tconst fontFamily = getCssStyle(el, 'font-family') || 'Arial';\n\n\tconst font = `${fontWeight} ${fontSize} ${fontFamily}`;\n\n\t// re-use canvas object for better performance\n\tconst canvas = (getTextWidth as any).canvas || ((getTextWidth as any).canvas = document.createElement('canvas'));\n\tconst context = canvas.getContext('2d');\n\tcontext.font = font;\n\tconst metrics = context.measureText(text);\n\treturn Math.round(metrics.width);\n}\n","import { BidiModule, Direction, Directionality } from '@angular/cdk/bidi';\nimport { DOCUMENT } from '@angular/common';\nimport { Inject, NgModule, Optional, SkipSelf } from '@angular/core';\n\n/** Regex that matches locales with an RTL script. Taken from `goog.i18n.bidi.isRtlLanguage`. */\nconst RTL_LOCALE_PATTERN =\n\t/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;\n\n/** Resolves a string value to a specific direction. */\nexport function _resolveDirectionality(rawValue: string): Direction {\n\tconst value = rawValue?.toLowerCase() || '';\n\n\tif (value === 'auto' && typeof navigator !== 'undefined' && navigator?.language) {\n\t\treturn RTL_LOCALE_PATTERN.test(navigator.language) ? 'rtl' : 'ltr';\n\t}\n\n\treturn value === 'rtl' ? 'rtl' : 'ltr';\n}\n\n@NgModule({\n\tdeclarations: [],\n\timports: [BidiModule],\n\texports: [BidiModule]\n})\nexport class BuiCommonModule {\n\tconstructor(\n\t\tdir: Directionality,\n\t\t@Optional()\n\t\t@SkipSelf()\n\t\tthisModule: BuiCommonModule,\n\t\t@Inject(DOCUMENT) document: Document\n\t) {\n\t\tif (!thisModule) {\n\t\t\tconst observer = new MutationObserver(() => {\n\t\t\t\tconst attr = document.documentElement.getAttribute('dir') || document.body.getAttribute('dir');\n\t\t\t\tif (attr && dir.value !== attr) {\n\t\t\t\t\tconst d = _resolveDirectionality(attr);\n\t\t\t\t\tdir.change.emit(d);\n\t\t\t\t\tif (Object.getOwnPropertyNames(dir).includes('value')) {\n\t\t\t\t\t\t(dir as any).value = d;\n\t\t\t\t\t}\n\t\t\t\t\tsetTimeout(() => dir.change.emit(d));\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tobserver.observe(document.documentElement, { attributes: true });\n\t\t\tobserver.observe(document.body, { attributes: true });\n\t\t}\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;SAAgB,UAAU,GAAA;IACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACjE,CAAC;AAEK,SAAU,mBAAmB,CAAC,EAAe,EAAA;AAClD,IAAA,MAAM,IAAI,GAAG,EAAE,CAAC,qBAAqB,EAAE,CAAC;AAExC,IA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AC;AACrC,iBAAA;AACF,aAAC,CAAC,CAAC;AAEH,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,eAAe,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACjE,YAAA,QAAQ,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC;AACtD,SAAA;KACD;;4GAxBW,eAAe,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,EAAA,EAAA,KAAA,EAKd,eAAe,EAAA,QAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,EAAA,EAAA,KAAA,EACnB,QAAQ,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;6GANL,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,CAAA,EAAA,OAAA,EAAA,CACV,UAAU,CAAA,EAAA,CAAA,CAAA;6GAER,eAAe,EAAA,OAAA,EAAA,CAHjB,UAAU,EACV,UAAU,CAAA,EAAA,CAAA,CAAA;2FAER,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,EAAE;oBAChB,OAAO,EAAE,CAAC,UAAU,CAAC;oBACrB,OAAO,EAAE,CAAC,UAAU,CAAC;AACrB,iBAAA,CAAA;uFAMa,eAAe,EAAA,UAAA,EAAA,CAAA;0BAF1B,QAAQ;;0BACR,QAAQ;8BAEmB,QAAQ,EAAA,UAAA,EAAA,CAAA;0BAAnC,MAAM;2BAAC,QAAQ,CAAA;;;AC9BlB;;AAEG;;;;"}
@@ -9,6 +9,7 @@ import * as i0 from '@angular/core';
9
9
  import { InjectionToken, Component, ViewEncapsulation, ChangeDetectionStrategy, Inject, ViewChild, 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
+ import { getTextWidth } from '@bravura/ui/common';
12
13
  import * as i1 from '@angular/cdk/layout';
13
14
  import * as i2$1 from '@angular/cdk/platform';
14
15
  import * as i4 from '@angular/cdk/bidi';
@@ -27,6 +28,8 @@ class TooltipComponent extends TooltipComponent$1 {
27
28
  if (this._messageCopy !== this.message && !this._tooltipInst.template) {
28
29
  this.tooltipDiv.nativeElement.innerHTML = this.message;
29
30
  this._messageCopy = this.message;
31
+ const width = Math.max(Math.sqrt(getTextWidth(this.message) * 40), 360);
32
+ this._tooltip.nativeElement.style.maxWidth = `${width}px`;
30
33
  }
31
34
  super.show(delay);
32
35
  }
@@ -35,7 +38,7 @@ class TooltipComponent extends TooltipComponent$1 {
35
38
  }
36
39
  }
37
40
  TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1.BreakpointObserver }, { token: BUI_TOOLTIP_TEMPLATE_REF }], target: i0.ɵɵFactoryTarget.Component });
38
- TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41
+ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", 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"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], animations: [matTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
39
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: TooltipComponent, decorators: [{
40
43
  type: Component,
41
44
  args: [{ selector: 'bui-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [matTooltipAnimations.tooltipState], host: {
@@ -46,7 +49,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImpor
46
49
  '(body:click)': 'this._handleBodyInteraction()',
47
50
  '(body:auxclick)': 'this._handleBodyInteraction()',
48
51
  'aria-hidden': 'true'
49
- }, 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{max-width:768px;font-size:inherit}.bui-tooltip.mat-tooltip.bui-tooltip-400{max-width:400px}.bui-tooltip.mat-tooltip.bui-tooltip-500{max-width:500px}.bui-tooltip.mat-tooltip.bui-tooltip-600{max-width:600px}.bui-tooltip.mat-tooltip.bui-tooltip-700{max-width:700px}.bui-tooltip.mat-tooltip.bui-tooltip-800{max-width:800px}.bui-tooltip.mat-tooltip.bui-tooltip-900{max-width:900px}\n"] }]
52
+ }, 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"] }]
50
53
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1.BreakpointObserver }, { type: undefined, decorators: [{
51
54
  type: Inject,
52
55
  args: [BUI_TOOLTIP_TEMPLATE_REF]
@@ -1 +1 @@
1
- {"version":3,"file":"bravura-ui-tooltip.mjs","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';\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}\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 { 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\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}\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> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else {\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\tthis.message = '';\n\t\t\t}\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","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\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","i1","i2"],"mappings":";;;;;;;;;;;;;;;AAqBA;;AAEG;AACI,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,CACvC,CAAC;AAmBI,MAAO,gBAAiB,SAAQA,kBAAmB,CAAA;AASxD,IAAA,WAAA,CACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC,EAAA;AAE/E,QAAA,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAFL,IAAY,CAAA,YAAA,GAAZ,YAAY,CAA0B;QAXxE,IAA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CAAC,gBAAgB,EAAE,gBAAgB,CAAC;oBAClD,SAAS,EAAE,CAAC,4CAA4C,CAAC;AACzD,iBAAA,CAAA;;;ACfD;;AAEG;;;;"}
1
+ {"version":3,"file":"bravura-ui-tooltip.mjs","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 { 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\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}\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> {\n\t\treturn this._templateRef || this.message;\n\t}\n\tset buiTooltip(value) {\n\t\tif (typeof value === 'string') {\n\t\t\tthis.message = value;\n\t\t} else {\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\tthis.message = '';\n\t\t\t}\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","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\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","i1","i2"],"mappings":";;;;;;;;;;;;;;;;AAsBA;;AAEG;AACI,MAAM,wBAAwB,GAAG,IAAI,cAAc,CACzD,uCAAuC,CACvC,CAAC;AAmBI,MAAO,gBAAiB,SAAQA,kBAAmB,CAAA;AASxD,IAAA,WAAA,CACC,iBAAoC,EACpC,mBAAuC,EACE,YAAsC,EAAA;AAE/E,QAAA,KAAK,CAAC,iBAAiB,EAAE,mBAAmB,CAAC,CAAC;QAFL,IAAY,CAAA,YAAA,GAAZ,YAAY,CAA0B;QAXxE,IAAY,CAAA,YAAA,GAAG,EAAE,CAAC;KAczB;AAED,IAAA,IAAI,CAAC,KAAa,EAAA;AACjB,QAAA,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;AACvD,YAAA,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;AACxE,YAAA,IAAI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4",
4
+ "version": "2.4.0",
5
5
  "keywords": [
6
6
  "Angular",
7
7
  "Angular Material",