@ng-matero/extensions 15.0.3 → 15.1.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.
Files changed (44) hide show
  1. package/core/pipes/index.d.ts +1 -0
  2. package/core/pipes/is-template-ref.pipe.d.ts +7 -0
  3. package/core/pipes/pipes.module.d.ts +3 -2
  4. package/esm2020/core/pipes/index.mjs +2 -1
  5. package/esm2020/core/pipes/is-template-ref.pipe.mjs +14 -0
  6. package/esm2020/core/pipes/pipes.module.mjs +5 -4
  7. package/esm2020/grid/cell.mjs +26 -45
  8. package/esm2020/grid/grid-module.mjs +24 -3
  9. package/esm2020/grid/grid-pipes.mjs +108 -0
  10. package/esm2020/grid/grid-utils.mjs +23 -4
  11. package/esm2020/grid/grid.mjs +5 -19
  12. package/esm2020/grid/interfaces.mjs +1 -1
  13. package/esm2020/grid/public-api.mjs +2 -1
  14. package/esm2020/select/select.mjs +19 -22
  15. package/esm2020/tooltip/tooltip-module.mjs +8 -7
  16. package/esm2020/tooltip/tooltip.mjs +4 -6
  17. package/fesm2015/mtxCore.mjs +17 -5
  18. package/fesm2015/mtxCore.mjs.map +1 -1
  19. package/fesm2015/mtxGrid.mjs +177 -67
  20. package/fesm2015/mtxGrid.mjs.map +1 -1
  21. package/fesm2015/mtxSelect.mjs +18 -21
  22. package/fesm2015/mtxSelect.mjs.map +1 -1
  23. package/fesm2015/mtxTooltip.mjs +11 -12
  24. package/fesm2015/mtxTooltip.mjs.map +1 -1
  25. package/fesm2020/mtxCore.mjs +17 -5
  26. package/fesm2020/mtxCore.mjs.map +1 -1
  27. package/fesm2020/mtxGrid.mjs +176 -67
  28. package/fesm2020/mtxGrid.mjs.map +1 -1
  29. package/fesm2020/mtxSelect.mjs +18 -21
  30. package/fesm2020/mtxSelect.mjs.map +1 -1
  31. package/fesm2020/mtxTooltip.mjs +11 -12
  32. package/fesm2020/mtxTooltip.mjs.map +1 -1
  33. package/grid/cell.d.ts +13 -11
  34. package/grid/grid-module.d.ts +20 -19
  35. package/grid/grid-pipes.d.ts +31 -0
  36. package/grid/grid-utils.d.ts +18 -3
  37. package/grid/grid.d.ts +10 -12
  38. package/grid/grid.scss +2 -2
  39. package/grid/interfaces.d.ts +1 -1
  40. package/grid/public-api.d.ts +1 -0
  41. package/package.json +1 -1
  42. package/select/select.d.ts +9 -8
  43. package/tooltip/tooltip-module.d.ts +3 -2
  44. package/tooltip/tooltip.d.ts +0 -1
@@ -1,14 +1,16 @@
1
- import * as i1 from '@angular/cdk/overlay';
2
- import { Overlay, OverlayModule } from '@angular/cdk/overlay';
3
1
  import * as i4 from '@angular/cdk/a11y';
4
2
  import { A11yModule } from '@angular/cdk/a11y';
3
+ import * as i1 from '@angular/cdk/overlay';
4
+ import { Overlay, OverlayModule } from '@angular/cdk/overlay';
5
+ import * as i2 from '@angular/cdk/scrolling';
6
+ import { CdkScrollableModule } from '@angular/cdk/scrolling';
5
7
  import * as i7 from '@angular/common';
6
8
  import { CommonModule } from '@angular/common';
7
9
  import * as i0 from '@angular/core';
8
10
  import { InjectionToken, TemplateRef, Directive, Inject, Optional, Input, Component, ViewEncapsulation, ChangeDetectionStrategy, NgModule } from '@angular/core';
9
11
  import { MatCommonModule } from '@angular/material/core';
10
- import * as i2 from '@angular/cdk/scrolling';
11
- import { CdkScrollableModule } from '@angular/cdk/scrolling';
12
+ import * as i8 from '@ng-matero/extensions/core';
13
+ import { MtxPipesModule } from '@ng-matero/extensions/core';
12
14
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
13
15
  import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
14
16
  import * as i6 from '@angular/cdk/layout';
@@ -599,9 +601,6 @@ class TooltipComponent {
599
601
  /** Stream that emits whether the user has a handset-sized display. */
600
602
  this._isHandset = this._breakpointObserver.observe(Breakpoints.Handset);
601
603
  }
602
- _isTemplateRef(obj) {
603
- return obj instanceof TemplateRef;
604
- }
605
604
  /**
606
605
  * Shows the tooltip with an animation originating from the provided origin
607
606
  * @param delay Amount of milliseconds to the delay showing the tooltip.
@@ -683,7 +682,7 @@ class TooltipComponent {
683
682
  }
684
683
  }
685
684
  /** @nocollapse */ TooltipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i6.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
686
- /** @nocollapse */ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: TooltipComponent, selector: "mtx-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "body:click": "this._handleBodyInteraction()" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" } }, ngImport: i0, template: "<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n", styles: [".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"], dependencies: [{ kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }], animations: [mtxTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
685
+ /** @nocollapse */ TooltipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: TooltipComponent, selector: "mtx-tooltip-component", host: { attributes: { "aria-hidden": "true" }, listeners: { "body:click": "this._handleBodyInteraction()" }, properties: { "style.zoom": "_visibility === \"visible\" ? 1 : null" } }, ngImport: i0, template: "<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"message | isTemplateRef\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n", styles: [".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"], dependencies: [{ kind: "directive", type: i7.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i7.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i7.AsyncPipe, name: "async" }, { kind: "pipe", type: i8.MtxIsTemplateRefPipe, name: "isTemplateRef" }], animations: [mtxTooltipAnimations.tooltipState], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
687
686
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TooltipComponent, decorators: [{
688
687
  type: Component,
689
688
  args: [{ selector: 'mtx-tooltip-component', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, animations: [mtxTooltipAnimations.tooltipState], host: {
@@ -692,18 +691,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
692
691
  '[style.zoom]': '_visibility === "visible" ? 1 : null',
693
692
  '(body:click)': 'this._handleBodyInteraction()',
694
693
  'aria-hidden': 'true',
695
- }, template: "<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n", styles: [".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"] }]
694
+ }, template: "<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"message | isTemplateRef\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n", styles: [".mtx-tooltip-panel{pointer-events:none!important}.mtx-tooltip{color:#fff;border-radius:4px;margin:14px;max-width:250px;padding-left:8px;padding-right:8px;overflow:hidden;text-overflow:ellipsis}.cdk-high-contrast-active .mtx-tooltip{outline:solid 1px}.mtx-tooltip-handset{margin:24px;padding-left:16px;padding-right:16px}\n"] }]
696
695
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i6.BreakpointObserver }]; } });
697
696
 
698
697
  class MtxTooltipModule {
699
698
  }
700
699
  /** @nocollapse */ MtxTooltipModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
701
- /** @nocollapse */ MtxTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, declarations: [MtxTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule], exports: [MtxTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });
702
- /** @nocollapse */ MtxTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, providers: [MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MatCommonModule, CdkScrollableModule] });
700
+ /** @nocollapse */ MtxTooltipModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, declarations: [MtxTooltip, TooltipComponent], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MtxPipesModule], exports: [MtxTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule] });
701
+ /** @nocollapse */ MtxTooltipModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, providers: [MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MtxPipesModule, MatCommonModule, CdkScrollableModule] });
703
702
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: MtxTooltipModule, decorators: [{
704
703
  type: NgModule,
705
704
  args: [{
706
- imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],
705
+ imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MtxPipesModule],
707
706
  exports: [MtxTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],
708
707
  declarations: [MtxTooltip, TooltipComponent],
709
708
  providers: [MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],
@@ -1 +1 @@
1
- {"version":3,"file":"mtxTooltip.mjs","sources":["../../../projects/extensions/tooltip/tooltip-animations.ts","../../../projects/extensions/tooltip/tooltip.ts","../../../projects/extensions/tooltip/tooltip.html","../../../projects/extensions/tooltip/tooltip-module.ts","../../../projects/extensions/tooltip/mtxTooltip.ts"],"sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n keyframes,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * Animations used by MtxTooltip.\n * @docs-private\n */\nexport const mtxTooltipAnimations: {\n readonly tooltipState: AnimationTriggerMetadata;\n} = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),\n state('visible', style({ transform: 'scale(1)' })),\n transition(\n '* => visible',\n animate(\n '200ms cubic-bezier(0, 0, 0.2, 1)',\n keyframes([\n style({ opacity: 0, transform: 'scale(0)', offset: 0 }),\n style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),\n style({ opacity: 1, transform: 'scale(1)', offset: 1 }),\n ])\n )\n ),\n transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput, coerceBooleanProperty, NumberInput } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n OriginConnectionPosition,\n Overlay,\n OverlayConnectionPosition,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n ViewEncapsulation,\n AfterViewInit,\n TemplateRef,\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { mtxTooltipAnimations } from './tooltip-animations';\n\n/** Possible positions for a tooltip. */\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\n\n/**\n * Options for how the tooltip trigger should handle touch gestures.\n * See `MtxTooltip.touchGestures` for more information.\n */\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Possible visibility states of a tooltip. */\nexport type TooltipVisibility = 'initial' | 'visible' | 'hidden';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\n/** CSS class that will be attached to the overlay panel. */\nexport const TOOLTIP_PANEL_CLASS = 'mtx-tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nexport function getMtxTooltipInvalidPositionError(position: string) {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const MTX_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mtx-tooltip-scroll-strategy'\n);\n\n/** @docs-private */\nexport function MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n\n/** @docs-private */\nexport const MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MTX_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n\n/** Default `mtxTooltip` options that can be overridden. */\nexport interface MtxTooltipDefaultOptions {\n showDelay: number;\n hideDelay: number;\n touchendHideDelay: number;\n touchGestures?: TooltipTouchGestures;\n position?: TooltipPosition;\n}\n\n/** Injection token to be used to override the default options for `matTooltip`. */\nexport const MTX_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken<MtxTooltipDefaultOptions>(\n 'mtx-tooltip-default-options',\n {\n providedIn: 'root',\n factory: MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n }\n);\n\n/** @docs-private */\nexport function MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MtxTooltipDefaultOptions {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[mtxTooltip]',\n exportAs: 'mtxTooltip',\n host: {\n class: 'mtx-tooltip-trigger',\n },\n})\nexport class MtxTooltip implements OnDestroy, AfterViewInit {\n _overlayRef!: OverlayRef | null;\n _tooltipInstance!: TooltipComponent | null;\n\n private _portal!: ComponentPortal<TooltipComponent>;\n private _position: TooltipPosition = 'below';\n private _disabled: boolean = false;\n private _tooltipClass!: string | string[] | Set<string> | { [key: string]: any };\n private _scrollStrategy: () => ScrollStrategy;\n private _viewInitialized = false;\n private _pointerExitEventsInitialized = false;\n\n /** Allows the user to define the position of the tooltip relative to the parent element */\n @Input('mtxTooltipPosition')\n get position(): TooltipPosition {\n return this._position;\n }\n set position(value: TooltipPosition) {\n if (value !== this._position) {\n this._position = value;\n\n if (this._overlayRef) {\n this._updatePosition();\n\n if (this._tooltipInstance) {\n this._tooltipInstance!.show(0);\n }\n\n this._overlayRef.updatePosition();\n }\n }\n }\n\n /** Disables the display of the tooltip. */\n @Input('mtxTooltipDisabled')\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n } else {\n this._setupPointerEnterEventsIfNeeded();\n }\n }\n\n /** The default delay in ms before showing the tooltip after show is called */\n @Input('mtxTooltipShowDelay') showDelay: number = this._defaultOptions.showDelay;\n\n /** The default delay in ms before hiding the tooltip after hide is called */\n @Input('mtxTooltipHideDelay') hideDelay: number = this._defaultOptions.hideDelay;\n\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n @Input('mtxTooltipTouchGestures') touchGestures: TooltipTouchGestures = 'auto';\n\n /** The message to be displayed in the tooltip */\n @Input('mtxTooltip')\n get message() {\n return this._message;\n }\n set message(value: string | TemplateRef<any>) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message as string);\n\n // TODO: If the message is a TemplateRef, it's hard to support a11y.\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n this._message = value instanceof TemplateRef ? value : value != null ? `${value}`.trim() : '';\n\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n } else {\n this._setupPointerEnterEventsIfNeeded();\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message as string);\n });\n });\n }\n }\n private _message: string | TemplateRef<any> = '';\n\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n @Input('mtxTooltipClass')\n get tooltipClass() {\n return this._tooltipClass;\n }\n set tooltipClass(value: string | string[] | Set<string> | { [key: string]: any }) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n\n /** Manually-bound passive event listeners. */\n private readonly _passiveListeners: (readonly [string, EventListenerOrEventListenerObject])[] =\n [];\n\n /** Timer started at the last `touchstart` event. */\n private _touchstartTimeout!: number;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n constructor(\n private _overlay: Overlay,\n private _elementRef: ElementRef<HTMLElement>,\n private _scrollDispatcher: ScrollDispatcher,\n private _viewContainerRef: ViewContainerRef,\n private _ngZone: NgZone,\n private _platform: Platform,\n private _ariaDescriber: AriaDescriber,\n private _focusMonitor: FocusMonitor,\n @Inject(MTX_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional()\n @Inject(MTX_TOOLTIP_DEFAULT_OPTIONS)\n private _defaultOptions: MtxTooltipDefaultOptions\n ) {\n this._scrollStrategy = scrollStrategy;\n\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n\n _ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keydown', this._handleKeydown);\n });\n }\n\n ngAfterViewInit() {\n // This needs to happen after view init so the initial values for all inputs have been set.\n this._viewInitialized = true;\n this._setupPointerEnterEventsIfNeeded();\n\n this._focusMonitor\n .monitor(this._elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n this._ngZone.run(() => this.hide(0));\n } else if (origin === 'keyboard') {\n this._ngZone.run(() => this.show());\n }\n });\n }\n\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy() {\n const nativeElement = this._elementRef.nativeElement;\n\n clearTimeout(this._touchstartTimeout);\n\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n\n // Clean up the event listeners set in the constructor\n nativeElement.removeEventListener('keydown', this._handleKeydown);\n this._passiveListeners.forEach(([event, listener]) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.length = 0;\n\n this._destroyed.next();\n this._destroyed.complete();\n\n this._ariaDescriber.removeDescription(nativeElement, this.message as string);\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay: number = this.showDelay): void {\n if (\n this.disabled ||\n !this.message ||\n (this._isTooltipVisible() &&\n !this._tooltipInstance!._showTimeoutId &&\n !this._tooltipInstance!._hideTimeoutId)\n ) {\n return;\n }\n\n const overlayRef = this._createOverlay();\n this._detach();\n this._portal = this._portal || new ComponentPortal(TooltipComponent, this._viewContainerRef);\n this._tooltipInstance = overlayRef.attach(this._portal).instance;\n this._tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n this._tooltipInstance!.show(delay);\n }\n\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay: number = this.hideDelay): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.hide(delay);\n }\n }\n\n /** Shows/hides the tooltip */\n toggle(): void {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible(): boolean {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n\n /**\n * Handles the keydown events on the host element.\n * Needs to be an arrow function so that we can use it in addEventListener.\n */\n private _handleKeydown = (event: KeyboardEvent) => {\n if (this._isTooltipVisible() && event.keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n };\n\n /** Create the overlay config and position strategy */\n private _createOverlay(): OverlayRef {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(\n this._elementRef\n );\n\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn('.mtx-tooltip')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withScrollableContainers(scrollableAncestors);\n\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: TOOLTIP_PANEL_CLASS,\n scrollStrategy: this._scrollStrategy(),\n });\n\n this._updatePosition();\n\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n\n return this._overlayRef;\n }\n\n /** Detaches the currently-attached tooltip. */\n private _detach() {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n\n this._tooltipInstance = null;\n }\n\n /** Updates the position of the current tooltip. */\n private _updatePosition() {\n const position = this._overlayRef!.getConfig()\n .positionStrategy as FlexibleConnectedPositionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n\n position.withPositions([\n { ...origin.main, ...overlay.main },\n { ...origin.fallback, ...overlay.fallback },\n ]);\n }\n\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let originPosition: OriginConnectionPosition;\n\n if (position === 'above' || position === 'below') {\n originPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n } else if (\n position === 'before' ||\n (position === 'left' && isLtr) ||\n (position === 'right' && !isLtr)\n ) {\n originPosition = { originX: 'start', originY: 'center' };\n } else if (\n position === 'after' ||\n (position === 'right' && isLtr) ||\n (position === 'left' && !isLtr)\n ) {\n originPosition = { originX: 'end', originY: 'center' };\n } else {\n throw getMtxTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let overlayPosition: OverlayConnectionPosition;\n\n if (position === 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n } else if (position === 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n } else if (\n position === 'before' ||\n (position === 'left' && isLtr) ||\n (position === 'right' && !isLtr)\n ) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n } else if (\n position === 'after' ||\n (position === 'right' && isLtr) ||\n (position === 'left' && !isLtr)\n ) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n } else {\n throw getMtxTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n private _updateTooltipMessage() {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n\n this._ngZone.onMicrotaskEmpty\n .asObservable()\n .pipe(take(1), takeUntil(this._destroyed))\n .subscribe(() => {\n if (this._tooltipInstance) {\n this._overlayRef!.updatePosition();\n }\n });\n }\n }\n\n /** Updates the tooltip class */\n private _setTooltipClass(tooltipClass: string | string[] | Set<string> | { [key: string]: any }) {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n\n /** Inverts an overlay position. */\n private _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos) {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n } else if (y === 'bottom') {\n y = 'top';\n }\n } else {\n if (x === 'end') {\n x = 'start';\n } else if (x === 'start') {\n x = 'end';\n }\n }\n\n return { x, y };\n }\n\n /** Binds the pointer events to the tooltip trigger. */\n private _setupPointerEnterEventsIfNeeded() {\n // Optimization: Defer hooking up events if there's no message or the tooltip is disabled.\n if (\n this._disabled ||\n !this.message ||\n !this._viewInitialized ||\n this._passiveListeners.length\n ) {\n return;\n }\n\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this._platformSupportsMouseEvents()) {\n this._passiveListeners.push([\n 'mouseenter',\n () => {\n this._setupPointerExitEventsIfNeeded();\n this.show();\n },\n ]);\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n\n this._passiveListeners.push([\n 'touchstart',\n () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n this._setupPointerExitEventsIfNeeded();\n clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = setTimeout(() => this.show(), LONGPRESS_DELAY) as any;\n },\n ]);\n }\n\n this._addListeners(this._passiveListeners);\n }\n\n private _setupPointerExitEventsIfNeeded() {\n if (this._pointerExitEventsInitialized) {\n return;\n }\n this._pointerExitEventsInitialized = true;\n\n const exitListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n if (this._platformSupportsMouseEvents()) {\n exitListeners.push(['mouseleave', () => this.hide()]);\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n\n exitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n }\n\n this._addListeners(exitListeners);\n this._passiveListeners.push(...exitListeners);\n }\n\n private _addListeners(\n listeners: ReadonlyArray<readonly [string, EventListenerOrEventListenerObject]>\n ) {\n listeners.forEach(([event, listener]) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n\n private _platformSupportsMouseEvents() {\n return !this._platform.IOS && !this._platform.ANDROID;\n }\n\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n private _disableNativeGesturesIfNecessary() {\n const gestures = this.touchGestures;\n\n if (gestures !== 'off') {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect =\n (style as any).msUserSelect =\n style.webkitUserSelect =\n (style as any).MozUserSelect =\n 'none';\n }\n\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n (style as any).webkitUserDrag = 'none';\n }\n\n style.touchAction = 'none';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n style.webkitTapHighlightColor = 'transparent';\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_hideDelay: NumberInput;\n static ngAcceptInputType_showDelay: NumberInput;\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [mtxTooltipAnimations.tooltipState],\n host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': '_visibility === \"visible\" ? 1 : null',\n '(body:click)': 'this._handleBodyInteraction()',\n 'aria-hidden': 'true',\n },\n})\nexport class TooltipComponent implements OnDestroy {\n /** Message to display in the tooltip */\n message!: string | TemplateRef<any>;\n\n /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */\n tooltipClass!: string | string[] | Set<string> | { [key: string]: any };\n\n /** The timeout ID of any current timer set to show the tooltip */\n _showTimeoutId!: number | null;\n\n /** The timeout ID of any current timer set to hide the tooltip */\n _hideTimeoutId!: number | null;\n\n /** Property watched by the animation framework to show or hide the tooltip */\n _visibility: TooltipVisibility = 'initial';\n\n /** Whether interactions on the page should close the tooltip */\n private _closeOnInteraction: boolean = false;\n\n /** Subject for notifying that the tooltip has been hidden from the view */\n private readonly _onHide: Subject<void> = new Subject();\n\n /** Stream that emits whether the user has a handset-sized display. */\n _isHandset: Observable<BreakpointState> = this._breakpointObserver.observe(Breakpoints.Handset);\n\n _isTemplateRef(obj: any) {\n return obj instanceof TemplateRef;\n }\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _breakpointObserver: BreakpointObserver\n ) {}\n\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay: number): void {\n // Cancel the delayed hide if it is scheduled\n if (this._hideTimeoutId) {\n clearTimeout(this._hideTimeoutId);\n this._hideTimeoutId = null;\n }\n\n // Body interactions should cancel the tooltip if there is a delay in showing.\n this._closeOnInteraction = true;\n this._showTimeoutId = setTimeout(() => {\n this._visibility = 'visible';\n this._showTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay) as any;\n }\n\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay: number): void {\n // Cancel the delayed show if it is scheduled\n if (this._showTimeoutId) {\n clearTimeout(this._showTimeoutId);\n this._showTimeoutId = null;\n }\n\n this._hideTimeoutId = setTimeout(() => {\n this._visibility = 'hidden';\n this._hideTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay) as any;\n }\n\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden(): Observable<void> {\n return this._onHide.asObservable();\n }\n\n /** Whether the tooltip is being displayed. */\n isVisible(): boolean {\n return this._visibility === 'visible';\n }\n\n ngOnDestroy() {\n this._onHide.complete();\n }\n\n _animationStart() {\n this._closeOnInteraction = false;\n }\n\n _animationDone(event: AnimationEvent): void {\n const toState = event.toState as TooltipVisibility;\n\n if (toState === 'hidden' && !this.isVisible()) {\n this._onHide.next();\n }\n\n if (toState === 'visible' || toState === 'hidden') {\n this._closeOnInteraction = true;\n }\n }\n\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction(): void {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck(): void {\n this._changeDetectorRef.markForCheck();\n }\n}\n","<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"_isTemplateRef(message)\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\n","import { OverlayModule } from '@angular/cdk/overlay';\nimport { A11yModule } from '@angular/cdk/a11y';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatCommonModule } from '@angular/material/core';\nimport { CdkScrollableModule } from '@angular/cdk/scrolling';\nimport {\n MtxTooltip,\n TooltipComponent,\n MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule],\n exports: [MtxTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MtxTooltip, TooltipComponent],\n providers: [MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MtxTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\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;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;oBACnE,OAAO,EAAE,CAAC,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAC;AAC7E,oBAAA,YAAY,EAAE,CAAC,UAAU,EAAE,gBAAgB,CAAC;oBAC5C,SAAS,EAAE,CAAC,4CAA4C,CAAC;AAC1D,iBAAA,CAAA;;;ACjBD;;AAEG;;;;"}
1
+ {"version":3,"file":"mtxTooltip.mjs","sources":["../../../projects/extensions/tooltip/tooltip-animations.ts","../../../projects/extensions/tooltip/tooltip.ts","../../../projects/extensions/tooltip/tooltip.html","../../../projects/extensions/tooltip/tooltip-module.ts","../../../projects/extensions/tooltip/mtxTooltip.ts"],"sourcesContent":["import {\n animate,\n AnimationTriggerMetadata,\n keyframes,\n state,\n style,\n transition,\n trigger,\n} from '@angular/animations';\n\n/**\n * Animations used by MtxTooltip.\n * @docs-private\n */\nexport const mtxTooltipAnimations: {\n readonly tooltipState: AnimationTriggerMetadata;\n} = {\n /** Animation that transitions a tooltip in and out. */\n tooltipState: trigger('state', [\n state('initial, void, hidden', style({ opacity: 0, transform: 'scale(0)' })),\n state('visible', style({ transform: 'scale(1)' })),\n transition(\n '* => visible',\n animate(\n '200ms cubic-bezier(0, 0, 0.2, 1)',\n keyframes([\n style({ opacity: 0, transform: 'scale(0)', offset: 0 }),\n style({ opacity: 0.5, transform: 'scale(0.99)', offset: 0.5 }),\n style({ opacity: 1, transform: 'scale(1)', offset: 1 }),\n ])\n )\n ),\n transition('* => hidden', animate('100ms cubic-bezier(0, 0, 0.2, 1)', style({ opacity: 0 }))),\n ]),\n};\n","import { AnimationEvent } from '@angular/animations';\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput, coerceBooleanProperty, NumberInput } from '@angular/cdk/coercion';\nimport { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { BreakpointObserver, Breakpoints, BreakpointState } from '@angular/cdk/layout';\nimport {\n FlexibleConnectedPositionStrategy,\n HorizontalConnectionPos,\n OriginConnectionPosition,\n Overlay,\n OverlayConnectionPosition,\n OverlayRef,\n ScrollStrategy,\n VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { ScrollDispatcher } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n Inject,\n InjectionToken,\n Input,\n NgZone,\n OnDestroy,\n Optional,\n ViewContainerRef,\n ViewEncapsulation,\n AfterViewInit,\n TemplateRef,\n} from '@angular/core';\nimport { Observable, Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\n\nimport { mtxTooltipAnimations } from './tooltip-animations';\n\n/** Possible positions for a tooltip. */\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\n\n/**\n * Options for how the tooltip trigger should handle touch gestures.\n * See `MtxTooltip.touchGestures` for more information.\n */\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Possible visibility states of a tooltip. */\nexport type TooltipVisibility = 'initial' | 'visible' | 'hidden';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\n/** CSS class that will be attached to the overlay panel. */\nexport const TOOLTIP_PANEL_CLASS = 'mtx-tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n/**\n * Creates an error to be thrown if the user supplied an invalid tooltip position.\n * @docs-private\n */\nexport function getMtxTooltipInvalidPositionError(position: string) {\n return Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const MTX_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>(\n 'mtx-tooltip-scroll-strategy'\n);\n\n/** @docs-private */\nexport function MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy {\n return () => overlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS });\n}\n\n/** @docs-private */\nexport const MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER = {\n provide: MTX_TOOLTIP_SCROLL_STRATEGY,\n deps: [Overlay],\n useFactory: MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY,\n};\n\n/** Default `mtxTooltip` options that can be overridden. */\nexport interface MtxTooltipDefaultOptions {\n showDelay: number;\n hideDelay: number;\n touchendHideDelay: number;\n touchGestures?: TooltipTouchGestures;\n position?: TooltipPosition;\n}\n\n/** Injection token to be used to override the default options for `matTooltip`. */\nexport const MTX_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken<MtxTooltipDefaultOptions>(\n 'mtx-tooltip-default-options',\n {\n providedIn: 'root',\n factory: MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY,\n }\n);\n\n/** @docs-private */\nexport function MTX_TOOLTIP_DEFAULT_OPTIONS_FACTORY(): MtxTooltipDefaultOptions {\n return {\n showDelay: 0,\n hideDelay: 0,\n touchendHideDelay: 1500,\n };\n}\n\n/**\n * Directive that attaches a material design tooltip to the host element. Animates the showing and\n * hiding of a tooltip provided position (defaults to below the element).\n *\n * https://material.io/design/components/tooltips.html\n */\n@Directive({\n selector: '[mtxTooltip]',\n exportAs: 'mtxTooltip',\n host: {\n class: 'mtx-tooltip-trigger',\n },\n})\nexport class MtxTooltip implements OnDestroy, AfterViewInit {\n _overlayRef!: OverlayRef | null;\n _tooltipInstance!: TooltipComponent | null;\n\n private _portal!: ComponentPortal<TooltipComponent>;\n private _position: TooltipPosition = 'below';\n private _disabled: boolean = false;\n private _tooltipClass!: string | string[] | Set<string> | { [key: string]: any };\n private _scrollStrategy: () => ScrollStrategy;\n private _viewInitialized = false;\n private _pointerExitEventsInitialized = false;\n\n /** Allows the user to define the position of the tooltip relative to the parent element */\n @Input('mtxTooltipPosition')\n get position(): TooltipPosition {\n return this._position;\n }\n set position(value: TooltipPosition) {\n if (value !== this._position) {\n this._position = value;\n\n if (this._overlayRef) {\n this._updatePosition();\n\n if (this._tooltipInstance) {\n this._tooltipInstance!.show(0);\n }\n\n this._overlayRef.updatePosition();\n }\n }\n }\n\n /** Disables the display of the tooltip. */\n @Input('mtxTooltipDisabled')\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value) {\n this._disabled = coerceBooleanProperty(value);\n\n // If tooltip is disabled, hide immediately.\n if (this._disabled) {\n this.hide(0);\n } else {\n this._setupPointerEnterEventsIfNeeded();\n }\n }\n\n /** The default delay in ms before showing the tooltip after show is called */\n @Input('mtxTooltipShowDelay') showDelay: number = this._defaultOptions.showDelay;\n\n /** The default delay in ms before hiding the tooltip after hide is called */\n @Input('mtxTooltipHideDelay') hideDelay: number = this._defaultOptions.hideDelay;\n\n /**\n * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n * uses a long press gesture to show and hide, however it can conflict with the native browser\n * gestures. To work around the conflict, Angular Material disables native gestures on the\n * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n * elements). The different values for this option configure the touch event handling as follows:\n * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n * browser gestures on particular elements. In particular, it allows text selection on inputs\n * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n * - `on` - Enables touch gestures for all elements and disables native\n * browser gestures with no exceptions.\n * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n * showing on touch devices.\n */\n @Input('mtxTooltipTouchGestures') touchGestures: TooltipTouchGestures = 'auto';\n\n /** The message to be displayed in the tooltip */\n @Input('mtxTooltip')\n get message() {\n return this._message;\n }\n set message(value: string | TemplateRef<any>) {\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this._message as string);\n\n // TODO: If the message is a TemplateRef, it's hard to support a11y.\n // If the message is not a string (e.g. number), convert it to a string and trim it.\n this._message = value instanceof TemplateRef ? value : value != null ? `${value}`.trim() : '';\n\n if (!this._message && this._isTooltipVisible()) {\n this.hide(0);\n } else {\n this._setupPointerEnterEventsIfNeeded();\n this._updateTooltipMessage();\n this._ngZone.runOutsideAngular(() => {\n // The `AriaDescriber` has some functionality that avoids adding a description if it's the\n // same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n // has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n // issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n Promise.resolve().then(() => {\n this._ariaDescriber.describe(this._elementRef.nativeElement, this.message as string);\n });\n });\n }\n }\n private _message: string | TemplateRef<any> = '';\n\n /** Classes to be passed to the tooltip. Supports the same syntax as `ngClass`. */\n @Input('mtxTooltipClass')\n get tooltipClass() {\n return this._tooltipClass;\n }\n set tooltipClass(value: string | string[] | Set<string> | { [key: string]: any }) {\n this._tooltipClass = value;\n if (this._tooltipInstance) {\n this._setTooltipClass(this._tooltipClass);\n }\n }\n\n /** Manually-bound passive event listeners. */\n private readonly _passiveListeners: (readonly [string, EventListenerOrEventListenerObject])[] =\n [];\n\n /** Timer started at the last `touchstart` event. */\n private _touchstartTimeout!: number;\n\n /** Emits when the component is destroyed. */\n private readonly _destroyed = new Subject<void>();\n\n constructor(\n private _overlay: Overlay,\n private _elementRef: ElementRef<HTMLElement>,\n private _scrollDispatcher: ScrollDispatcher,\n private _viewContainerRef: ViewContainerRef,\n private _ngZone: NgZone,\n private _platform: Platform,\n private _ariaDescriber: AriaDescriber,\n private _focusMonitor: FocusMonitor,\n @Inject(MTX_TOOLTIP_SCROLL_STRATEGY) scrollStrategy: any,\n @Optional() private _dir: Directionality,\n @Optional()\n @Inject(MTX_TOOLTIP_DEFAULT_OPTIONS)\n private _defaultOptions: MtxTooltipDefaultOptions\n ) {\n this._scrollStrategy = scrollStrategy;\n\n if (_defaultOptions) {\n if (_defaultOptions.position) {\n this.position = _defaultOptions.position;\n }\n\n if (_defaultOptions.touchGestures) {\n this.touchGestures = _defaultOptions.touchGestures;\n }\n }\n\n _ngZone.runOutsideAngular(() => {\n _elementRef.nativeElement.addEventListener('keydown', this._handleKeydown);\n });\n }\n\n ngAfterViewInit() {\n // This needs to happen after view init so the initial values for all inputs have been set.\n this._viewInitialized = true;\n this._setupPointerEnterEventsIfNeeded();\n\n this._focusMonitor\n .monitor(this._elementRef)\n .pipe(takeUntil(this._destroyed))\n .subscribe(origin => {\n // Note that the focus monitor runs outside the Angular zone.\n if (!origin) {\n this._ngZone.run(() => this.hide(0));\n } else if (origin === 'keyboard') {\n this._ngZone.run(() => this.show());\n }\n });\n }\n\n /**\n * Dispose the tooltip when destroyed.\n */\n ngOnDestroy() {\n const nativeElement = this._elementRef.nativeElement;\n\n clearTimeout(this._touchstartTimeout);\n\n if (this._overlayRef) {\n this._overlayRef.dispose();\n this._tooltipInstance = null;\n }\n\n // Clean up the event listeners set in the constructor\n nativeElement.removeEventListener('keydown', this._handleKeydown);\n this._passiveListeners.forEach(([event, listener]) => {\n nativeElement.removeEventListener(event, listener, passiveListenerOptions);\n });\n this._passiveListeners.length = 0;\n\n this._destroyed.next();\n this._destroyed.complete();\n\n this._ariaDescriber.removeDescription(nativeElement, this.message as string);\n this._focusMonitor.stopMonitoring(nativeElement);\n }\n\n /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n show(delay: number = this.showDelay): void {\n if (\n this.disabled ||\n !this.message ||\n (this._isTooltipVisible() &&\n !this._tooltipInstance!._showTimeoutId &&\n !this._tooltipInstance!._hideTimeoutId)\n ) {\n return;\n }\n\n const overlayRef = this._createOverlay();\n this._detach();\n this._portal = this._portal || new ComponentPortal(TooltipComponent, this._viewContainerRef);\n this._tooltipInstance = overlayRef.attach(this._portal).instance;\n this._tooltipInstance\n .afterHidden()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n this._setTooltipClass(this._tooltipClass);\n this._updateTooltipMessage();\n this._tooltipInstance!.show(delay);\n }\n\n /** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n hide(delay: number = this.hideDelay): void {\n if (this._tooltipInstance) {\n this._tooltipInstance.hide(delay);\n }\n }\n\n /** Shows/hides the tooltip */\n toggle(): void {\n this._isTooltipVisible() ? this.hide() : this.show();\n }\n\n /** Returns true if the tooltip is currently visible to the user */\n _isTooltipVisible(): boolean {\n return !!this._tooltipInstance && this._tooltipInstance.isVisible();\n }\n\n /**\n * Handles the keydown events on the host element.\n * Needs to be an arrow function so that we can use it in addEventListener.\n */\n private _handleKeydown = (event: KeyboardEvent) => {\n if (this._isTooltipVisible() && event.keyCode === ESCAPE && !hasModifierKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n this._ngZone.run(() => this.hide(0));\n }\n };\n\n /** Create the overlay config and position strategy */\n private _createOverlay(): OverlayRef {\n if (this._overlayRef) {\n return this._overlayRef;\n }\n\n const scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(\n this._elementRef\n );\n\n // Create connected position strategy that listens for scroll events to reposition.\n const strategy = this._overlay\n .position()\n .flexibleConnectedTo(this._elementRef)\n .withTransformOriginOn('.mtx-tooltip')\n .withFlexibleDimensions(false)\n .withViewportMargin(8)\n .withScrollableContainers(scrollableAncestors);\n\n strategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe(change => {\n if (this._tooltipInstance) {\n if (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n // After position changes occur and the overlay is clipped by\n // a parent scrollable then close the tooltip.\n this._ngZone.run(() => this.hide(0));\n }\n }\n });\n\n this._overlayRef = this._overlay.create({\n direction: this._dir,\n positionStrategy: strategy,\n panelClass: TOOLTIP_PANEL_CLASS,\n scrollStrategy: this._scrollStrategy(),\n });\n\n this._updatePosition();\n\n this._overlayRef\n .detachments()\n .pipe(takeUntil(this._destroyed))\n .subscribe(() => this._detach());\n\n return this._overlayRef;\n }\n\n /** Detaches the currently-attached tooltip. */\n private _detach() {\n if (this._overlayRef && this._overlayRef.hasAttached()) {\n this._overlayRef.detach();\n }\n\n this._tooltipInstance = null;\n }\n\n /** Updates the position of the current tooltip. */\n private _updatePosition() {\n const position = this._overlayRef!.getConfig()\n .positionStrategy as FlexibleConnectedPositionStrategy;\n const origin = this._getOrigin();\n const overlay = this._getOverlayPosition();\n\n position.withPositions([\n { ...origin.main, ...overlay.main },\n { ...origin.fallback, ...overlay.fallback },\n ]);\n }\n\n /**\n * Returns the origin position and a fallback position based on the user's position preference.\n * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n */\n _getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let originPosition: OriginConnectionPosition;\n\n if (position === 'above' || position === 'below') {\n originPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n } else if (\n position === 'before' ||\n (position === 'left' && isLtr) ||\n (position === 'right' && !isLtr)\n ) {\n originPosition = { originX: 'start', originY: 'center' };\n } else if (\n position === 'after' ||\n (position === 'right' && isLtr) ||\n (position === 'left' && !isLtr)\n ) {\n originPosition = { originX: 'end', originY: 'center' };\n } else {\n throw getMtxTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(originPosition.originX, originPosition.originY);\n\n return {\n main: originPosition,\n fallback: { originX: x, originY: y },\n };\n }\n\n /** Returns the overlay position and a fallback position based on the user's preference */\n _getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n const isLtr = !this._dir || this._dir.value === 'ltr';\n const position = this.position;\n let overlayPosition: OverlayConnectionPosition;\n\n if (position === 'above') {\n overlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n } else if (position === 'below') {\n overlayPosition = { overlayX: 'center', overlayY: 'top' };\n } else if (\n position === 'before' ||\n (position === 'left' && isLtr) ||\n (position === 'right' && !isLtr)\n ) {\n overlayPosition = { overlayX: 'end', overlayY: 'center' };\n } else if (\n position === 'after' ||\n (position === 'right' && isLtr) ||\n (position === 'left' && !isLtr)\n ) {\n overlayPosition = { overlayX: 'start', overlayY: 'center' };\n } else {\n throw getMtxTooltipInvalidPositionError(position);\n }\n\n const { x, y } = this._invertPosition(overlayPosition.overlayX, overlayPosition.overlayY);\n\n return {\n main: overlayPosition,\n fallback: { overlayX: x, overlayY: y },\n };\n }\n\n /** Updates the tooltip message and repositions the overlay according to the new message length */\n private _updateTooltipMessage() {\n // Must wait for the message to be painted to the tooltip so that the overlay can properly\n // calculate the correct positioning based on the size of the text.\n if (this._tooltipInstance) {\n this._tooltipInstance.message = this.message;\n this._tooltipInstance._markForCheck();\n\n this._ngZone.onMicrotaskEmpty\n .asObservable()\n .pipe(take(1), takeUntil(this._destroyed))\n .subscribe(() => {\n if (this._tooltipInstance) {\n this._overlayRef!.updatePosition();\n }\n });\n }\n }\n\n /** Updates the tooltip class */\n private _setTooltipClass(tooltipClass: string | string[] | Set<string> | { [key: string]: any }) {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipClass = tooltipClass;\n this._tooltipInstance._markForCheck();\n }\n }\n\n /** Inverts an overlay position. */\n private _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos) {\n if (this.position === 'above' || this.position === 'below') {\n if (y === 'top') {\n y = 'bottom';\n } else if (y === 'bottom') {\n y = 'top';\n }\n } else {\n if (x === 'end') {\n x = 'start';\n } else if (x === 'start') {\n x = 'end';\n }\n }\n\n return { x, y };\n }\n\n /** Binds the pointer events to the tooltip trigger. */\n private _setupPointerEnterEventsIfNeeded() {\n // Optimization: Defer hooking up events if there's no message or the tooltip is disabled.\n if (\n this._disabled ||\n !this.message ||\n !this._viewInitialized ||\n this._passiveListeners.length\n ) {\n return;\n }\n\n // The mouse events shouldn't be bound on mobile devices, because they can prevent the\n // first tap from firing its click event or can cause the tooltip to open for clicks.\n if (this._platformSupportsMouseEvents()) {\n this._passiveListeners.push([\n 'mouseenter',\n () => {\n this._setupPointerExitEventsIfNeeded();\n this.show();\n },\n ]);\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n\n this._passiveListeners.push([\n 'touchstart',\n () => {\n // Note that it's important that we don't `preventDefault` here,\n // because it can prevent click events from firing on the element.\n this._setupPointerExitEventsIfNeeded();\n clearTimeout(this._touchstartTimeout);\n this._touchstartTimeout = setTimeout(() => this.show(), LONGPRESS_DELAY) as any;\n },\n ]);\n }\n\n this._addListeners(this._passiveListeners);\n }\n\n private _setupPointerExitEventsIfNeeded() {\n if (this._pointerExitEventsInitialized) {\n return;\n }\n this._pointerExitEventsInitialized = true;\n\n const exitListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n if (this._platformSupportsMouseEvents()) {\n exitListeners.push(['mouseleave', () => this.hide()]);\n } else if (this.touchGestures !== 'off') {\n this._disableNativeGesturesIfNecessary();\n const touchendListener = () => {\n clearTimeout(this._touchstartTimeout);\n this.hide(this._defaultOptions.touchendHideDelay);\n };\n\n exitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n }\n\n this._addListeners(exitListeners);\n this._passiveListeners.push(...exitListeners);\n }\n\n private _addListeners(\n listeners: ReadonlyArray<readonly [string, EventListenerOrEventListenerObject]>\n ) {\n listeners.forEach(([event, listener]) => {\n this._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n });\n }\n\n private _platformSupportsMouseEvents() {\n return !this._platform.IOS && !this._platform.ANDROID;\n }\n\n /** Disables the native browser gestures, based on how the tooltip has been configured. */\n private _disableNativeGesturesIfNecessary() {\n const gestures = this.touchGestures;\n\n if (gestures !== 'off') {\n const element = this._elementRef.nativeElement;\n const style = element.style;\n\n // If gestures are set to `auto`, we don't disable text selection on inputs and\n // textareas, because it prevents the user from typing into them on iOS Safari.\n if (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n style.userSelect =\n (style as any).msUserSelect =\n style.webkitUserSelect =\n (style as any).MozUserSelect =\n 'none';\n }\n\n // If we have `auto` gestures and the element uses native HTML dragging,\n // we don't set `-webkit-user-drag` because it prevents the native behavior.\n if (gestures === 'on' || !element.draggable) {\n (style as any).webkitUserDrag = 'none';\n }\n\n style.touchAction = 'none';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n style.webkitTapHighlightColor = 'transparent';\n }\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_hideDelay: NumberInput;\n static ngAcceptInputType_showDelay: NumberInput;\n}\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n selector: 'mtx-tooltip-component',\n templateUrl: 'tooltip.html',\n styleUrls: ['tooltip.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n animations: [mtxTooltipAnimations.tooltipState],\n host: {\n // Forces the element to have a layout in IE and Edge. This fixes issues where the element\n // won't be rendered if the animations are disabled or there is no web animations polyfill.\n '[style.zoom]': '_visibility === \"visible\" ? 1 : null',\n '(body:click)': 'this._handleBodyInteraction()',\n 'aria-hidden': 'true',\n },\n})\nexport class TooltipComponent implements OnDestroy {\n /** Message to display in the tooltip */\n message!: string | TemplateRef<any>;\n\n /** Classes to be added to the tooltip. Supports the same syntax as `ngClass`. */\n tooltipClass!: string | string[] | Set<string> | { [key: string]: any };\n\n /** The timeout ID of any current timer set to show the tooltip */\n _showTimeoutId!: number | null;\n\n /** The timeout ID of any current timer set to hide the tooltip */\n _hideTimeoutId!: number | null;\n\n /** Property watched by the animation framework to show or hide the tooltip */\n _visibility: TooltipVisibility = 'initial';\n\n /** Whether interactions on the page should close the tooltip */\n private _closeOnInteraction: boolean = false;\n\n /** Subject for notifying that the tooltip has been hidden from the view */\n private readonly _onHide: Subject<void> = new Subject();\n\n /** Stream that emits whether the user has a handset-sized display. */\n _isHandset: Observable<BreakpointState> = this._breakpointObserver.observe(Breakpoints.Handset);\n\n constructor(\n private _changeDetectorRef: ChangeDetectorRef,\n private _breakpointObserver: BreakpointObserver\n ) {}\n\n /**\n * Shows the tooltip with an animation originating from the provided origin\n * @param delay Amount of milliseconds to the delay showing the tooltip.\n */\n show(delay: number): void {\n // Cancel the delayed hide if it is scheduled\n if (this._hideTimeoutId) {\n clearTimeout(this._hideTimeoutId);\n this._hideTimeoutId = null;\n }\n\n // Body interactions should cancel the tooltip if there is a delay in showing.\n this._closeOnInteraction = true;\n this._showTimeoutId = setTimeout(() => {\n this._visibility = 'visible';\n this._showTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay) as any;\n }\n\n /**\n * Begins the animation to hide the tooltip after the provided delay in ms.\n * @param delay Amount of milliseconds to delay showing the tooltip.\n */\n hide(delay: number): void {\n // Cancel the delayed show if it is scheduled\n if (this._showTimeoutId) {\n clearTimeout(this._showTimeoutId);\n this._showTimeoutId = null;\n }\n\n this._hideTimeoutId = setTimeout(() => {\n this._visibility = 'hidden';\n this._hideTimeoutId = null;\n\n // Mark for check so if any parent component has set the\n // ChangeDetectionStrategy to OnPush it will be checked anyways\n this._markForCheck();\n }, delay) as any;\n }\n\n /** Returns an observable that notifies when the tooltip has been hidden from view. */\n afterHidden(): Observable<void> {\n return this._onHide.asObservable();\n }\n\n /** Whether the tooltip is being displayed. */\n isVisible(): boolean {\n return this._visibility === 'visible';\n }\n\n ngOnDestroy() {\n this._onHide.complete();\n }\n\n _animationStart() {\n this._closeOnInteraction = false;\n }\n\n _animationDone(event: AnimationEvent): void {\n const toState = event.toState as TooltipVisibility;\n\n if (toState === 'hidden' && !this.isVisible()) {\n this._onHide.next();\n }\n\n if (toState === 'visible' || toState === 'hidden') {\n this._closeOnInteraction = true;\n }\n }\n\n /**\n * Interactions on the HTML body should close the tooltip immediately as defined in the\n * material design spec.\n * https://material.io/design/components/tooltips.html#behavior\n */\n _handleBodyInteraction(): void {\n if (this._closeOnInteraction) {\n this.hide(0);\n }\n }\n\n /**\n * Marks that the tooltip needs to be checked in the next change detection run.\n * Mainly used for rendering the initial text before positioning a tooltip, which\n * can be problematic in components with OnPush change detection.\n */\n _markForCheck(): void {\n this._changeDetectorRef.markForCheck();\n }\n}\n","<div class=\"mtx-tooltip\"\n [ngClass]=\"tooltipClass\"\n [class.mtx-tooltip-handset]=\"(_isHandset | async)?.matches\"\n [@state]=\"_visibility\"\n (@state.start)=\"_animationStart()\"\n (@state.done)=\"_animationDone($event)\">\n <ng-template [ngIf]=\"message | isTemplateRef\" [ngIfElse]=\"msgStrTpl\">\n <ng-template [ngTemplateOutlet]=\"$any(message)\"></ng-template>\n </ng-template>\n <ng-template #msgStrTpl>{{message}}</ng-template>\n</div>\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 { MtxPipesModule } from '@ng-matero/extensions/core';\nimport {\n MtxTooltip,\n MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER,\n TooltipComponent,\n} from './tooltip';\n\n@NgModule({\n imports: [A11yModule, CommonModule, OverlayModule, MatCommonModule, MtxPipesModule],\n exports: [MtxTooltip, TooltipComponent, MatCommonModule, CdkScrollableModule],\n declarations: [MtxTooltip, TooltipComponent],\n providers: [MTX_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n})\nexport class MtxTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAUA;;;AAGG;AACU,MAAA,oBAAoB,GAE7B;;AAEF,IAAA,YAAY,EAAE,OAAO,CAAC,OAAO,EAAE;AAC7B,QAAA,KAAK,CAAC,uB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AAS,EAAE,CAAC,4CAA4C,CAAC;AAC1D,iBAAA,CAAA;;;AClBD;;AAEG;;;;"}
package/grid/cell.d.ts CHANGED
@@ -1,12 +1,15 @@
1
+ import { ChangeDetectorRef, DoCheck, KeyValueDiffers, OnInit } from '@angular/core';
1
2
  import { MtxDialog } from '@ng-matero/extensions/dialog';
2
- import { MtxGridColumn, MtxGridColumnButton } from './interfaces';
3
3
  import { MtxGridUtils } from './grid-utils';
4
+ import { MtxGridColumn, MtxGridColumnButton } from './interfaces';
4
5
  import * as i0 from "@angular/core";
5
- export declare class MtxGridCell {
6
+ export declare class MtxGridCell implements OnInit, DoCheck {
6
7
  private _dialog;
7
8
  private _utils;
9
+ private _differs;
10
+ private _changeDetectorRef;
8
11
  /** Row data */
9
- rowData: any;
12
+ rowData: Record<string, any>;
10
13
  /** Column definition */
11
14
  colDef: MtxGridColumn;
12
15
  /** Table data */
@@ -15,17 +18,16 @@ export declare class MtxGridCell {
15
18
  summary: boolean;
16
19
  /** Placeholder for the empty value (`null`, `''`, `[]`) */
17
20
  placeholder: string;
18
- get _colValue(): string;
19
- _isEmptyValue(value: any): boolean;
20
- _isContainHTML(value: string): boolean;
21
+ private rowDataDiffer?;
22
+ get _value(): string;
23
+ constructor(_dialog: MtxDialog, _utils: MtxGridUtils, _differs: KeyValueDiffers, _changeDetectorRef: ChangeDetectorRef);
24
+ ngOnInit(): void;
25
+ ngDoCheck(): void;
26
+ private _applyChanges;
21
27
  _getText(value: any): any;
22
28
  _getTooltip(value: any): any;
23
29
  _getFormatterTooltip(value: any): any;
24
- _formatSummary(data: any[], colDef: MtxGridColumn): any;
25
- constructor(_dialog: MtxDialog, _utils: MtxGridUtils);
26
- _onActionClick(event: MouseEvent, btn: MtxGridColumnButton, rowData: any): void;
27
- _getActionTooltip(btn: MtxGridColumnButton): import("./interfaces").MtxGridColumnButtonTooltip | undefined;
28
- _isActionDisabled(btn: MtxGridColumnButton, rowData: any): boolean;
30
+ _onActionClick(event: MouseEvent, btn: MtxGridColumnButton, rowData: Record<string, any>): void;
29
31
  /** Preview enlarged image */
30
32
  _onImagePreview(urlStr: string): void;
31
33
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCell, never>;
@@ -3,26 +3,27 @@ import * as i1 from "./grid";
3
3
  import * as i2 from "./cell";
4
4
  import * as i3 from "./column-menu";
5
5
  import * as i4 from "./expansion-toggle";
6
- import * as i5 from "@angular/common";
7
- import * as i6 from "@angular/forms";
8
- import * as i7 from "@angular/material/table";
9
- import * as i8 from "@angular/material/sort";
10
- import * as i9 from "@angular/material/paginator";
11
- import * as i10 from "@angular/material/checkbox";
12
- import * as i11 from "@angular/material/button";
13
- import * as i12 from "@angular/material/progress-bar";
14
- import * as i13 from "@angular/material/chips";
15
- import * as i14 from "@angular/material/tooltip";
16
- import * as i15 from "@angular/material/icon";
17
- import * as i16 from "@angular/material/select";
18
- import * as i17 from "@angular/material/form-field";
19
- import * as i18 from "@angular/material/menu";
20
- import * as i19 from "@angular/cdk/drag-drop";
21
- import * as i20 from "@ng-matero/extensions/dialog";
22
- import * as i21 from "@ng-matero/extensions/core";
23
- import * as i22 from "./column-resize/column-resize-module";
6
+ import * as i5 from "./grid-pipes";
7
+ import * as i6 from "@angular/common";
8
+ import * as i7 from "@angular/forms";
9
+ import * as i8 from "@angular/material/table";
10
+ import * as i9 from "@angular/material/sort";
11
+ import * as i10 from "@angular/material/paginator";
12
+ import * as i11 from "@angular/material/checkbox";
13
+ import * as i12 from "@angular/material/button";
14
+ import * as i13 from "@angular/material/progress-bar";
15
+ import * as i14 from "@angular/material/chips";
16
+ import * as i15 from "@angular/material/tooltip";
17
+ import * as i16 from "@angular/material/icon";
18
+ import * as i17 from "@angular/material/select";
19
+ import * as i18 from "@angular/material/form-field";
20
+ import * as i19 from "@angular/material/menu";
21
+ import * as i20 from "@angular/cdk/drag-drop";
22
+ import * as i21 from "@ng-matero/extensions/dialog";
23
+ import * as i22 from "@ng-matero/extensions/core";
24
+ import * as i23 from "./column-resize/column-resize-module";
24
25
  export declare class MtxGridModule {
25
26
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridModule, never>;
26
- static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.MatTableModule, typeof i8.MatSortModule, typeof i9.MatPaginatorModule, typeof i10.MatCheckboxModule, typeof i11.MatButtonModule, typeof i12.MatProgressBarModule, typeof i13.MatChipsModule, typeof i14.MatTooltipModule, typeof i15.MatIconModule, typeof i16.MatSelectModule, typeof i17.MatFormFieldModule, typeof i18.MatMenuModule, typeof i19.DragDropModule, typeof i20.MtxDialogModule, typeof i21.MtxPipesModule, typeof i22.MatColumnResizeModule], [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i22.MatColumnResizeModule]>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MtxGridModule, [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe], [typeof i6.CommonModule, typeof i7.FormsModule, typeof i8.MatTableModule, typeof i9.MatSortModule, typeof i10.MatPaginatorModule, typeof i11.MatCheckboxModule, typeof i12.MatButtonModule, typeof i13.MatProgressBarModule, typeof i14.MatChipsModule, typeof i15.MatTooltipModule, typeof i16.MatIconModule, typeof i17.MatSelectModule, typeof i18.MatFormFieldModule, typeof i19.MatMenuModule, typeof i20.DragDropModule, typeof i21.MtxDialogModule, typeof i22.MtxPipesModule, typeof i23.MatColumnResizeModule], [typeof i1.MtxGrid, typeof i2.MtxGridCell, typeof i3.MtxGridColumnMenu, typeof i4.MtxGridExpansionToggle, typeof i1.MtxGridSelectableCell, typeof i23.MatColumnResizeModule, typeof i5.MtxGridRowClassPipe, typeof i5.MtxGridColClassPipe, typeof i5.MtxGridCellActionTooltipPipe, typeof i5.MtxGridCellActionDisablePipe, typeof i5.MtxGridCellSummaryPipe]>;
27
28
  static ɵinj: i0.ɵɵInjectorDeclaration<MtxGridModule>;
28
29
  }
@@ -0,0 +1,31 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { MtxGridUtils } from './grid-utils';
3
+ import { MtxGridColumn, MtxGridColumnButton, MtxGridRowClassFormatter } from './interfaces';
4
+ import * as i0 from "@angular/core";
5
+ export declare class MtxGridColClassPipe implements PipeTransform {
6
+ transform(colDef: MtxGridColumn, rowData?: Record<string, any>): string;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridColClassPipe, never>;
8
+ static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridColClassPipe, "colClass", false>;
9
+ }
10
+ export declare class MtxGridRowClassPipe implements PipeTransform {
11
+ transform(rowData: Record<string, any>, index: number, dataIndex: number, rowClassFormatter?: MtxGridRowClassFormatter): string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridRowClassPipe, never>;
13
+ static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridRowClassPipe, "rowClass", false>;
14
+ }
15
+ export declare class MtxGridCellActionTooltipPipe implements PipeTransform {
16
+ transform(btn: MtxGridColumnButton): import("./interfaces").MtxGridColumnButtonTooltip;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionTooltipPipe, never>;
18
+ static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionTooltipPipe, "cellActionTooltip", false>;
19
+ }
20
+ export declare class MtxGridCellActionDisablePipe implements PipeTransform {
21
+ transform(btn: MtxGridColumnButton, rowData: Record<string, any>): boolean;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionDisablePipe, never>;
23
+ static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionDisablePipe, "cellActionDisable", false>;
24
+ }
25
+ export declare class MtxGridCellSummaryPipe implements PipeTransform {
26
+ private utils;
27
+ constructor(utils: MtxGridUtils);
28
+ transform(data: any[], colDef: MtxGridColumn): any;
29
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellSummaryPipe, never>;
30
+ static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellSummaryPipe, "cellSummary", false>;
31
+ }
@@ -3,22 +3,37 @@ import * as i0 from "@angular/core";
3
3
  export declare class MtxGridUtils {
4
4
  constructor();
5
5
  /**
6
- * Get cell value from column key e.g. `a.b.c`
6
+ * Get cell's value based on the data and column's field (e.g. `a.b.c`)
7
7
  * @param rowData Row data
8
8
  * @param colDef Column definition
9
+ * @returns
9
10
  */
10
- getCellValue(rowData: any, colDef: MtxGridColumn): string;
11
+ getCellValue(rowData: Record<string, any>, colDef: MtxGridColumn): string;
11
12
  /**
12
13
  * Get all data of a col
13
14
  * @param data All data
14
15
  * @param colDef Column definition
16
+ * @returns
15
17
  */
16
18
  getColData(data: any[], colDef: MtxGridColumn): any[];
17
19
  /**
18
20
  * Remove white spaces in a string and convert string to array
19
- * @param str string
21
+ * @param str
22
+ * @returns
20
23
  */
21
24
  str2arr(str: string): string[];
25
+ /**
26
+ * Whether the value is empty (`null`, `undefined`, `''`, `[]`)
27
+ * @param value
28
+ * @returns
29
+ */
30
+ isEmpty(value: any): boolean;
31
+ /**
32
+ * Whether the value contain HTML
33
+ * @param value
34
+ * @returns
35
+ */
36
+ isContainHTML(value: string): boolean;
22
37
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridUtils, never>;
23
38
  static ɵprov: i0.ɵɵInjectableDeclaration<MtxGridUtils>;
24
39
  }
package/grid/grid.d.ts CHANGED
@@ -104,7 +104,7 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
104
104
  /** The formatter to disable the row selection or hide the row's checkbox. */
105
105
  rowSelectionFormatter: MtxGridRowSelectionFormatter;
106
106
  /** The formatter to set the row's class. */
107
- rowClassFormatter: MtxGridRowClassFormatter;
107
+ rowClassFormatter?: MtxGridRowClassFormatter;
108
108
  /** Event emitted when the row is selected. */
109
109
  rowSelectionChange: EventEmitter<any[]>;
110
110
  cellSelection: any[];
@@ -161,11 +161,11 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
161
161
  noResultTemplate: TemplateRef<any>;
162
162
  get _hasNoResult(): boolean;
163
163
  /** The header's cell template for the grid. */
164
- headerTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
164
+ headerTemplate: TemplateRef<any> | MtxGridCellTemplate;
165
165
  /** The header's cell template for the grid exclude sort. */
166
- headerExtraTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
166
+ headerExtraTemplate: TemplateRef<any> | MtxGridCellTemplate;
167
167
  /** The cell template for the grid. */
168
- cellTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
168
+ cellTemplate: TemplateRef<any> | MtxGridCellTemplate;
169
169
  /** Whether to use custom row template. If true, you should define a matRowDef. */
170
170
  useContentRowTemplate: boolean;
171
171
  useContentHeaderRowTemplate: boolean;
@@ -173,7 +173,7 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
173
173
  /** Whether to show the summary. */
174
174
  showSummary: boolean;
175
175
  /** The template for the summary. */
176
- summaryTemplate: TemplateRef<any> | MtxGridCellTemplate | any;
176
+ summaryTemplate: TemplateRef<any> | MtxGridCellTemplate;
177
177
  get _whetherShowSummary(): boolean;
178
178
  /** Whether to show the sidebar. */
179
179
  showSidebar: boolean;
@@ -185,9 +185,7 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
185
185
  statusbarTemplate: TemplateRef<any>;
186
186
  constructor(_utils: MtxGridUtils, _changeDetectorRef: ChangeDetectorRef);
187
187
  detectChanges(): void;
188
- _isTemplateRef(obj: any): boolean;
189
188
  _getColData(data: any[], colDef: MtxGridColumn): any[];
190
- _getRowClassList(rowData: any, index: number): any;
191
189
  ngOnChanges(changes: SimpleChanges): void;
192
190
  ngAfterViewInit(): void;
193
191
  ngOnDestroy(): void;
@@ -195,19 +193,19 @@ export declare class MtxGrid implements OnChanges, AfterViewInit, OnDestroy {
195
193
  _getIndex(index: number, dataIndex: number): number;
196
194
  _onSortChange(sort: Sort): void;
197
195
  /** Expansion change event */
198
- _onExpansionChange(expansionRef: MtxGridExpansionToggle, rowData: any, column: any, index: number): void;
196
+ _onExpansionChange(expansionRef: MtxGridExpansionToggle, rowData: Record<string, any>, column: MtxGridColumn, index: number): void;
199
197
  /** Cell select event */
200
- _selectCell(cellRef: MtxGridSelectableCell, rowData: any, colDef: any): void;
198
+ _selectCell(cellRef: MtxGridSelectableCell, rowData: Record<string, any>, colDef: MtxGridColumn): void;
201
199
  /** Row select event */
202
- _selectRow(event: MouseEvent, rowData: any, index: number): void;
200
+ _selectRow(event: MouseEvent, rowData: Record<string, any>, index: number): void;
203
201
  /** Whether the number of selected elements matches the total number of rows. */
204
202
  _isAllSelected(): boolean;
205
203
  /** Select all rows if they are not all selected; otherwise clear selection. */
206
204
  _toggleMasterCheckbox(): void;
207
205
  /** Select normal row */
208
- _toggleNormalCheckbox(row: any): void;
206
+ _toggleNormalCheckbox(row: Record<string, any>): void;
209
207
  /** Column change event */
210
- _onColumnChange(columns: any[]): void;
208
+ _onColumnChange(columns: MtxGridColumn[]): void;
211
209
  getDisplayedColumnFields(columns: MtxGridColumn[]): string[];
212
210
  /** Customize expansion event */
213
211
  toggleExpansion(index: number): any;
package/grid/grid.scss CHANGED
@@ -192,8 +192,8 @@
192
192
  .mtx-grid-checkbox-cell {
193
193
  flex: none;
194
194
  justify-content: center;
195
- width: 56px;
196
- min-width: 56px;
195
+ width: 60px;
196
+ min-width: 60px;
197
197
 
198
198
  .mat-checkbox {
199
199
  display: flex; // Fix checkbox height
@@ -27,7 +27,7 @@ export interface MtxGridColumn {
27
27
  showExpand?: boolean;
28
28
  description?: string;
29
29
  summary?: ((data: any[], colDef?: MtxGridColumn) => any) | string;
30
- class?: string;
30
+ class?: string | ((rowData?: Record<string, any>, colDef?: MtxGridColumn) => string);
31
31
  }
32
32
  /** Possible column pin values. */
33
33
  export declare type MtxGridColumnPinValue = 'left' | 'right' | null;
@@ -1,5 +1,6 @@
1
1
  export * from './grid-module';
2
2
  export * from './grid-utils';
3
+ export * from './grid-pipes';
3
4
  export * from './grid';
4
5
  export * from './cell';
5
6
  export * from './column-menu';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-matero/extensions",
3
- "version": "15.0.3",
3
+ "version": "15.1.0",
4
4
  "description": "Angular Material Extensions",
5
5
  "publishConfig": {
6
6
  "access": "public"