@ng-matero/extensions 14.6.4 → 14.8.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 (86) hide show
  1. package/_index.scss +4 -5
  2. package/_theming.scss +4 -5
  3. package/button/_button-theme.import.scss +2 -0
  4. package/button/_button-theme.scss +9 -0
  5. package/checkbox-group/checkbox-group.component.d.ts +6 -6
  6. package/{_all-color.scss → core/color/_all-color.scss} +2 -2
  7. package/core/pipes/index.d.ts +1 -0
  8. package/core/pipes/is-template-ref.pipe.d.ts +7 -0
  9. package/core/pipes/pipes.module.d.ts +3 -2
  10. package/core/theming/_all-theme.scss +53 -0
  11. package/core/theming/prebuilt/deeppurple-amber.scss +20 -0
  12. package/core/theming/prebuilt/indigo-pink.scss +20 -0
  13. package/core/theming/prebuilt/pink-bluegrey.scss +20 -0
  14. package/core/theming/prebuilt/purple-green.scss +20 -0
  15. package/datetimepicker/public-api.d.ts +1 -0
  16. package/esm2020/checkbox-group/checkbox-group.component.mjs +10 -11
  17. package/esm2020/core/pipes/index.mjs +2 -1
  18. package/esm2020/core/pipes/is-template-ref.pipe.mjs +14 -0
  19. package/esm2020/core/pipes/pipes.module.mjs +5 -4
  20. package/esm2020/datetimepicker/datetimepicker-input.mjs +1 -1
  21. package/esm2020/datetimepicker/public-api.mjs +2 -1
  22. package/esm2020/grid/cell.component.mjs +34 -48
  23. package/esm2020/grid/column-menu.component.mjs +3 -3
  24. package/esm2020/grid/grid.component.mjs +78 -69
  25. package/esm2020/grid/grid.interface.mjs +1 -1
  26. package/esm2020/grid/grid.module.mjs +24 -3
  27. package/esm2020/grid/grid.pipe.mjs +108 -0
  28. package/esm2020/grid/grid.service.mjs +22 -3
  29. package/esm2020/grid/public-api.mjs +2 -1
  30. package/esm2020/select/select.component.mjs +44 -33
  31. package/esm2020/split/interface.mjs +1 -1
  32. package/esm2020/split/split.component.mjs +24 -9
  33. package/esm2020/tooltip/tooltip-module.mjs +5 -4
  34. package/esm2020/tooltip/tooltip.mjs +24 -7
  35. package/fesm2015/mtxCheckboxGroup.mjs +7 -8
  36. package/fesm2015/mtxCheckboxGroup.mjs.map +1 -1
  37. package/fesm2015/mtxCore.mjs +17 -5
  38. package/fesm2015/mtxCore.mjs.map +1 -1
  39. package/fesm2015/mtxDatetimepicker.mjs +1 -1
  40. package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
  41. package/fesm2015/mtxGrid.mjs +260 -119
  42. package/fesm2015/mtxGrid.mjs.map +1 -1
  43. package/fesm2015/mtxSelect.mjs +43 -31
  44. package/fesm2015/mtxSelect.mjs.map +1 -1
  45. package/fesm2015/mtxSplit.mjs +26 -8
  46. package/fesm2015/mtxSplit.mjs.map +1 -1
  47. package/fesm2015/mtxTooltip.mjs +27 -9
  48. package/fesm2015/mtxTooltip.mjs.map +1 -1
  49. package/fesm2020/mtxCheckboxGroup.mjs +7 -8
  50. package/fesm2020/mtxCheckboxGroup.mjs.map +1 -1
  51. package/fesm2020/mtxCore.mjs +17 -5
  52. package/fesm2020/mtxCore.mjs.map +1 -1
  53. package/fesm2020/mtxDatetimepicker.mjs +1 -1
  54. package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
  55. package/fesm2020/mtxGrid.mjs +256 -119
  56. package/fesm2020/mtxGrid.mjs.map +1 -1
  57. package/fesm2020/mtxSelect.mjs +42 -31
  58. package/fesm2020/mtxSelect.mjs.map +1 -1
  59. package/fesm2020/mtxSplit.mjs +23 -8
  60. package/fesm2020/mtxSplit.mjs.map +1 -1
  61. package/fesm2020/mtxTooltip.mjs +27 -9
  62. package/fesm2020/mtxTooltip.mjs.map +1 -1
  63. package/form-group/_form-group-theme.scss +2 -2
  64. package/grid/_grid-theme.scss +5 -5
  65. package/grid/cell.component.d.ts +16 -12
  66. package/grid/cell.component.scss +1 -1
  67. package/grid/column-menu.component.d.ts +1 -1
  68. package/grid/grid.component.d.ts +23 -16
  69. package/grid/grid.interface.d.ts +63 -20
  70. package/grid/grid.module.d.ts +20 -19
  71. package/grid/grid.pipe.d.ts +31 -0
  72. package/grid/grid.service.d.ts +18 -3
  73. package/grid/public-api.d.ts +1 -0
  74. package/loader/_loader-theme.scss +1 -1
  75. package/package.json +17 -2
  76. package/prebuilt-themes/deeppurple-amber.css +1 -0
  77. package/prebuilt-themes/indigo-pink.css +1 -0
  78. package/prebuilt-themes/pink-bluegrey.css +1 -0
  79. package/prebuilt-themes/purple-green.css +1 -0
  80. package/select/select.component.d.ts +36 -15
  81. package/split/_split-theme.scss +1 -1
  82. package/split/interface.d.ts +12 -0
  83. package/split/split.component.d.ts +7 -4
  84. package/tooltip/tooltip-module.d.ts +3 -2
  85. package/tooltip/tooltip.d.ts +9 -2
  86. package/_all-theme.scss +0 -47
@@ -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.\n */\n\nexport * from './public-api';\n"],"names":[],"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;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 /** Context to be passed to the tooltip. */\n @Input('mtxTooltipContext')\n get tooltipContext() {\n return this._tooltipContext;\n }\n\n set tooltipContext(value: any) {\n this._tooltipContext = value;\n this._setTooltipContext(this._tooltipContext);\n }\n private _tooltipContext: 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._setTooltipContext(this._tooltipContext);\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 context */\n private _setTooltipContext(tooltipContext: any) {\n if (this._tooltipInstance) {\n this._tooltipInstance.tooltipContext = tooltipContext;\n this._tooltipInstance._markForCheck();\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 /** Context to be added to the tooltip */\n tooltipContext: 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)\"\n [ngTemplateOutletContext]=\"{ $implicit: tooltipContext }\"></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 { MtxPipesModule } from '@ng-matero/extensions/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, 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,uBAAuB,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAC5E,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC,CAAC;QAClD,UAAU,CACR,cAAc,EACd,OAAO,CACL,kCAAkC,EAClC,SAAS,CAAC;AACR,YAAA,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACvD,YAAA,KAAK,CAAC,EAAE,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;AAC9D,YAAA,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACxD,SAAA,CAAC,CACH,CACF;AACD,QAAA,UAAU,CAAC,aAAa,EAAE,OAAO,CAAC,kCAAkC,EAAE,KAAK,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;KAC9F,CAAC;;;ACoBJ;AACO,MAAM,kBAAkB,GAAG,GAAG;AAErC;AACO,MAAM,mBAAmB,GAAG,oBAAoB;AAEvD;AACA,MAAM,sBAAsB,GAAG,+BAA+B,CAAC,EAAE,OAAO,EAAE,IAAI,E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AAgB,CAAA;;gIAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iIAAhB,gBAAgB,EAAA,YAAA,EAAA,CAHZ,UAAU,EAAE,gBAAgB,aAFjC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CACxE,EAAA,OAAA,EAAA,CAAA,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAIjE,mBAAA,gBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,aAFhB,CAAC,4CAA4C,CAAC,EAAA,OAAA,EAAA,CAH/C,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,EAC1C,eAAe,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA;2FAIjE,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,cAAc,CAAC;oBACnF,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;;;AClBD;;AAEG;;;;"}
@@ -20,10 +20,10 @@
20
20
 
21
21
  .mtx-form-field-appearance-fluent {
22
22
  .mat-form-field-flex {
23
- border: 1px solid rgba(theming.get-color-from-palette($foreground, divider), .54);
23
+ border: 1px solid theming.get-color-from-palette($foreground, divider, .54);
24
24
 
25
25
  &:hover {
26
- border: 1px solid rgba(theming.get-color-from-palette($foreground, divider), .78);
26
+ border: 1px solid theming.get-color-from-palette($foreground, divider, .78);
27
27
  }
28
28
  }
29
29
 
@@ -10,7 +10,7 @@
10
10
  $foreground: map.get($config, foreground);
11
11
 
12
12
  .mtx-grid {
13
- border: 1px solid rgba(theming.get-color-from-palette($foreground, secondary-text), .2);
13
+ border: 1px solid theming.get-color-from-palette($foreground, secondary-text, .2);
14
14
 
15
15
  .mat-table-sticky-left,
16
16
  .mat-table-sticky-right {
@@ -53,20 +53,20 @@
53
53
  }
54
54
 
55
55
  .mat-paginator {
56
- border-top: 1px solid rgba(theming.get-color-from-palette($foreground, secondary-text), .2);
56
+ border-top: 1px solid theming.get-color-from-palette($foreground, secondary-text, .2);
57
57
  }
58
58
  }
59
59
 
60
60
  .mtx-grid-toolbar {
61
- border-bottom: 1px solid rgba(theming.get-color-from-palette($foreground, secondary-text), .2);
61
+ border-bottom: 1px solid theming.get-color-from-palette($foreground, secondary-text, .2);
62
62
  }
63
63
 
64
64
  .mtx-grid-sidebar {
65
- border-color: rgba(theming.get-color-from-palette($foreground, secondary-text), .2);
65
+ border-color: theming.get-color-from-palette($foreground, secondary-text, .2);
66
66
  }
67
67
 
68
68
  .mtx-grid-statusbar {
69
- border-top: 1px solid rgba(theming.get-color-from-palette($foreground, secondary-text), .2);
69
+ border-top: 1px solid theming.get-color-from-palette($foreground, secondary-text, .2);
70
70
  }
71
71
 
72
72
  .mtx-grid-column-menu-item {
@@ -1,12 +1,15 @@
1
+ import { ChangeDetectorRef, DoCheck, EventEmitter, KeyValueChangeRecord, KeyValueDiffers, OnInit } from '@angular/core';
1
2
  import { MtxDialog } from '@ng-matero/extensions/dialog';
2
3
  import { MtxGridColumn, MtxGridColumnButton } from './grid.interface';
3
4
  import { MtxGridService } from './grid.service';
4
5
  import * as i0 from "@angular/core";
5
- export declare class MtxGridCellComponent {
6
+ export declare class MtxGridCellComponent implements OnInit, DoCheck {
6
7
  private _dialog;
7
- private _dataGridSrv;
8
+ private _gridSrv;
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,19 +18,20 @@ export declare class MtxGridCellComponent {
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
+ rowDataChange: EventEmitter<KeyValueChangeRecord<string, any>>;
22
+ private rowDataDiffer?;
23
+ rowChangeRecord?: KeyValueChangeRecord<string, any>;
24
+ get _value(): string;
25
+ constructor(_dialog: MtxDialog, _gridSrv: MtxGridService, _differs: KeyValueDiffers, _changeDetectorRef: ChangeDetectorRef);
26
+ ngOnInit(): void;
27
+ ngDoCheck(): void;
28
+ private _applyChanges;
21
29
  _getText(value: any): any;
22
30
  _getTooltip(value: any): any;
23
31
  _getFormatterTooltip(value: any): any;
24
- _formatSummary(data: any[], colDef: MtxGridColumn): any;
25
- constructor(_dialog: MtxDialog, _dataGridSrv: MtxGridService);
26
- _onActionClick(event: MouseEvent, btn: MtxGridColumnButton, rowData: any): void;
27
- _getActionTooltip(btn: MtxGridColumnButton): import("./grid.interface").MtxGridColumnButtonTooltip | undefined;
28
- _isActionDisabled(btn: MtxGridColumnButton, rowData: any): boolean;
32
+ _onActionClick(event: MouseEvent, btn: MtxGridColumnButton, rowData: Record<string, any>): void;
29
33
  /** Preview enlarged image */
30
34
  _onImagePreview(urlStr: string): void;
31
35
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxGridCellComponent, "mtx-grid-cell", ["mtxGridCell"], { "rowData": "rowData"; "colDef": "colDef"; "data": "data"; "summary": "summary"; "placeholder": "placeholder"; }, {}, never, never, false>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxGridCellComponent, "mtx-grid-cell", ["mtxGridCell"], { "rowData": "rowData"; "colDef": "colDef"; "data": "data"; "summary": "summary"; "placeholder": "placeholder"; }, { "rowDataChange": "rowDataChange"; }, never, never, false>;
33
37
  }
@@ -1,6 +1,6 @@
1
1
  .mtx-grid-img {
2
2
  display: block;
3
- width: 30px;
3
+ width: 32px;
4
4
  border-radius: 4px;
5
5
  cursor: pointer;
6
6
  }
@@ -26,7 +26,7 @@ export declare class MtxGridColumnMenuComponent {
26
26
  showFooter: boolean;
27
27
  footerText: string;
28
28
  footerTemplate: TemplateRef<any>;
29
- columnChange: EventEmitter<MtxGridColumn[]>;
29
+ columnChange: EventEmitter<MtxGridColumn<any>[]>;
30
30
  get pinOptions(): MtxGridColumnPinOption[];
31
31
  set pinOptions(value: MtxGridColumnPinOption[]);
32
32
  private _pinOptions;
@@ -1,23 +1,27 @@
1
- import { EventEmitter, OnChanges, TemplateRef, TrackByFunction, OnDestroy, AfterViewInit, ChangeDetectorRef, ElementRef, SimpleChanges, QueryList } from '@angular/core';
2
1
  import { SelectionModel } from '@angular/cdk/collections';
3
- import { MatFooterRowDef, MatHeaderRowDef, MatRowDef, MatTable, MatTableDataSource } from '@angular/material/table';
4
- import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
- import { Sort, MatSort, SortDirection } from '@angular/material/sort';
2
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, KeyValueChangeRecord, OnChanges, OnDestroy, QueryList, SimpleChanges, TemplateRef, TrackByFunction } from '@angular/core';
6
3
  import { ThemePalette } from '@angular/material/core';
7
- import { MtxGridColumn, MtxGridCellTemplate, MtxGridRowSelectionFormatter, MtxGridRowClassFormatter, MtxGridColumnMenu, MtxGridButtonType, MtxGridColumnPinOption } from './grid.interface';
4
+ import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
+ import { MatSort, Sort, SortDirection } from '@angular/material/sort';
6
+ import { MatFooterRowDef, MatHeaderRowDef, MatRowDef, MatTable, MatTableDataSource } from '@angular/material/table';
7
+ import { MtxGridColumnMenuComponent } from './column-menu.component';
8
8
  import { MtxGridExpansionToggleDirective } from './expansion-toggle.directive';
9
+ import { MtxGridButtonType, MtxGridCellTemplate, MtxGridColumn, MtxGridColumnPinOption, MtxGridDefaultOptions, MtxGridRowClassFormatter, MtxGridRowSelectionFormatter } from './grid.interface';
9
10
  import { MtxGridService } from './grid.service';
10
11
  import * as i0 from "@angular/core";
12
+ /** Injection token that can be used to specify default grid options. */
13
+ export declare const MTX_GRID_DEFAULT_OPTIONS: InjectionToken<MtxGridDefaultOptions>;
11
14
  export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDestroy {
12
- private _dataGridSrv;
15
+ private _gridSrv;
13
16
  private _changeDetectorRef;
17
+ private _defaultOptions?;
14
18
  table: MatTable<any>;
15
19
  paginator: MatPaginator;
16
20
  sort: MatSort;
17
21
  rowDefs: QueryList<MatRowDef<any>>;
18
22
  headerRowDefs: QueryList<MatHeaderRowDef>;
19
23
  footerRowDefs: QueryList<MatFooterRowDef>;
20
- columnMenu: MtxGridColumnMenu;
24
+ columnMenu: MtxGridColumnMenuComponent;
21
25
  tableContainer: ElementRef<HTMLDivElement>;
22
26
  dataSource: MatTableDataSource<unknown>;
23
27
  /** The grid's displayed columns. */
@@ -100,10 +104,12 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
100
104
  rowSelectable: boolean;
101
105
  /** Whether to hide the row selection checkbox. */
102
106
  hideRowSelectionCheckbox: boolean;
107
+ /** Whether disable rows to be selected when clicked. */
108
+ disableRowClickSelection: boolean;
103
109
  /** The formatter to disable the row selection or hide the row's checkbox. */
104
110
  rowSelectionFormatter: MtxGridRowSelectionFormatter;
105
111
  /** The formatter to set the row's class. */
106
- rowClassFormatter: MtxGridRowClassFormatter;
112
+ rowClassFormatter?: MtxGridRowClassFormatter;
107
113
  /** Event emitted when the row is selected. */
108
114
  rowSelectionChange: EventEmitter<any[]>;
109
115
  cellSelection: any[];
@@ -127,7 +133,7 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
127
133
  /** Whether the column is pinnable. */
128
134
  columnPinnable: boolean;
129
135
  /** Event emitted when the column is hided or is sorted. */
130
- columnChange: EventEmitter<MtxGridColumn[]>;
136
+ columnChange: EventEmitter<MtxGridColumn<any>[]>;
131
137
  /** The options for the column pin list. */
132
138
  columnPinOptions: MtxGridColumnPinOption[];
133
139
  /** Whether to show the column menu button. */
@@ -182,17 +188,18 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
182
188
  showStatusbar: boolean;
183
189
  /** The template for the status bar. */
184
190
  statusbarTemplate: TemplateRef<any>;
185
- constructor(_dataGridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef);
191
+ /** The changed record of row data. */
192
+ rowChangeRecord?: KeyValueChangeRecord<string, any>;
193
+ constructor(_gridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef, _defaultOptions?: MtxGridDefaultOptions | undefined);
186
194
  detectChanges(): void;
187
- _isTemplateRef(obj: any): boolean;
188
195
  _getColData(data: any[], colDef: MtxGridColumn): any[];
189
- _getRowClassList(rowData: any, index: number): any;
190
196
  ngOnChanges(changes: SimpleChanges): void;
191
197
  ngAfterViewInit(): void;
192
198
  ngOnDestroy(): void;
193
199
  _countPinnedPosition(): void;
194
200
  _getIndex(index: number, dataIndex: number): number;
195
201
  _onSortChange(sort: Sort): void;
202
+ _onRowDataChange(record: KeyValueChangeRecord<string, any>): void;
196
203
  /** Expansion change event */
197
204
  _onExpansionChange(expansionRef: MtxGridExpansionToggleDirective, rowData: Record<string, any>, column: MtxGridColumn, index: number): void;
198
205
  /** Cell select event */
@@ -214,11 +221,11 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
214
221
  _onPage(e: PageEvent): void;
215
222
  scrollTop(value?: number): number | void;
216
223
  scrollLeft(value?: number): number | void;
217
- static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridComponent, never>;
218
- static ɵcmp: i0.ɵɵComponentDeclaration<MtxGridComponent, "mtx-grid", ["mtxGrid"], { "displayedColumns": "displayedColumns"; "columns": "columns"; "data": "data"; "length": "length"; "loading": "loading"; "trackBy": "trackBy"; "columnResizable": "columnResizable"; "emptyValuePlaceholder": "emptyValuePlaceholder"; "pageOnFront": "pageOnFront"; "showPaginator": "showPaginator"; "pageDisabled": "pageDisabled"; "showFirstLastButtons": "showFirstLastButtons"; "pageIndex": "pageIndex"; "pageSize": "pageSize"; "pageSizeOptions": "pageSizeOptions"; "hidePageSize": "hidePageSize"; "paginationTemplate": "paginationTemplate"; "sortOnFront": "sortOnFront"; "sortActive": "sortActive"; "sortDirection": "sortDirection"; "sortDisableClear": "sortDisableClear"; "sortDisabled": "sortDisabled"; "sortStart": "sortStart"; "rowHover": "rowHover"; "rowStriped": "rowStriped"; "expandable": "expandable"; "expansionTemplate": "expansionTemplate"; "multiSelectable": "multiSelectable"; "multiSelectionWithClick": "multiSelectionWithClick"; "rowSelected": "rowSelected"; "rowSelectable": "rowSelectable"; "hideRowSelectionCheckbox": "hideRowSelectionCheckbox"; "rowSelectionFormatter": "rowSelectionFormatter"; "rowClassFormatter": "rowClassFormatter"; "cellSelectable": "cellSelectable"; "showToolbar": "showToolbar"; "toolbarTitle": "toolbarTitle"; "toolbarTemplate": "toolbarTemplate"; "columnHideable": "columnHideable"; "columnHideableChecked": "columnHideableChecked"; "columnSortable": "columnSortable"; "columnPinnable": "columnPinnable"; "columnPinOptions": "columnPinOptions"; "showColumnMenuButton": "showColumnMenuButton"; "columnMenuButtonText": "columnMenuButtonText"; "columnMenuButtonType": "columnMenuButtonType"; "columnMenuButtonColor": "columnMenuButtonColor"; "columnMenuButtonClass": "columnMenuButtonClass"; "columnMenuButtonIcon": "columnMenuButtonIcon"; "showColumnMenuHeader": "showColumnMenuHeader"; "columnMenuHeaderText": "columnMenuHeaderText"; "columnMenuHeaderTemplate": "columnMenuHeaderTemplate"; "showColumnMenuFooter": "showColumnMenuFooter"; "columnMenuFooterText": "columnMenuFooterText"; "columnMenuFooterTemplate": "columnMenuFooterTemplate"; "noResultText": "noResultText"; "noResultTemplate": "noResultTemplate"; "headerTemplate": "headerTemplate"; "headerExtraTemplate": "headerExtraTemplate"; "cellTemplate": "cellTemplate"; "useContentRowTemplate": "useContentRowTemplate"; "useContentHeaderRowTemplate": "useContentHeaderRowTemplate"; "useContentFooterRowTemplate": "useContentFooterRowTemplate"; "showSummary": "showSummary"; "summaryTemplate": "summaryTemplate"; "showSidebar": "showSidebar"; "sidebarTemplate": "sidebarTemplate"; "showStatusbar": "showStatusbar"; "statusbarTemplate": "statusbarTemplate"; }, { "page": "page"; "sortChange": "sortChange"; "rowClick": "rowClick"; "expansionChange": "expansionChange"; "rowSelectionChange": "rowSelectionChange"; "cellSelectionChange": "cellSelectionChange"; "columnChange": "columnChange"; }, ["rowDefs", "headerRowDefs", "footerRowDefs"], never, false>;
224
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridComponent, [null, null, { optional: true; }]>;
225
+ static ɵcmp: i0.ɵɵComponentDeclaration<MtxGridComponent, "mtx-grid", ["mtxGrid"], { "displayedColumns": "displayedColumns"; "columns": "columns"; "data": "data"; "length": "length"; "loading": "loading"; "trackBy": "trackBy"; "columnResizable": "columnResizable"; "emptyValuePlaceholder": "emptyValuePlaceholder"; "pageOnFront": "pageOnFront"; "showPaginator": "showPaginator"; "pageDisabled": "pageDisabled"; "showFirstLastButtons": "showFirstLastButtons"; "pageIndex": "pageIndex"; "pageSize": "pageSize"; "pageSizeOptions": "pageSizeOptions"; "hidePageSize": "hidePageSize"; "paginationTemplate": "paginationTemplate"; "sortOnFront": "sortOnFront"; "sortActive": "sortActive"; "sortDirection": "sortDirection"; "sortDisableClear": "sortDisableClear"; "sortDisabled": "sortDisabled"; "sortStart": "sortStart"; "rowHover": "rowHover"; "rowStriped": "rowStriped"; "expandable": "expandable"; "expansionTemplate": "expansionTemplate"; "multiSelectable": "multiSelectable"; "multiSelectionWithClick": "multiSelectionWithClick"; "rowSelected": "rowSelected"; "rowSelectable": "rowSelectable"; "hideRowSelectionCheckbox": "hideRowSelectionCheckbox"; "disableRowClickSelection": "disableRowClickSelection"; "rowSelectionFormatter": "rowSelectionFormatter"; "rowClassFormatter": "rowClassFormatter"; "cellSelectable": "cellSelectable"; "showToolbar": "showToolbar"; "toolbarTitle": "toolbarTitle"; "toolbarTemplate": "toolbarTemplate"; "columnHideable": "columnHideable"; "columnHideableChecked": "columnHideableChecked"; "columnSortable": "columnSortable"; "columnPinnable": "columnPinnable"; "columnPinOptions": "columnPinOptions"; "showColumnMenuButton": "showColumnMenuButton"; "columnMenuButtonText": "columnMenuButtonText"; "columnMenuButtonType": "columnMenuButtonType"; "columnMenuButtonColor": "columnMenuButtonColor"; "columnMenuButtonClass": "columnMenuButtonClass"; "columnMenuButtonIcon": "columnMenuButtonIcon"; "showColumnMenuHeader": "showColumnMenuHeader"; "columnMenuHeaderText": "columnMenuHeaderText"; "columnMenuHeaderTemplate": "columnMenuHeaderTemplate"; "showColumnMenuFooter": "showColumnMenuFooter"; "columnMenuFooterText": "columnMenuFooterText"; "columnMenuFooterTemplate": "columnMenuFooterTemplate"; "noResultText": "noResultText"; "noResultTemplate": "noResultTemplate"; "headerTemplate": "headerTemplate"; "headerExtraTemplate": "headerExtraTemplate"; "cellTemplate": "cellTemplate"; "useContentRowTemplate": "useContentRowTemplate"; "useContentHeaderRowTemplate": "useContentHeaderRowTemplate"; "useContentFooterRowTemplate": "useContentFooterRowTemplate"; "showSummary": "showSummary"; "summaryTemplate": "summaryTemplate"; "showSidebar": "showSidebar"; "sidebarTemplate": "sidebarTemplate"; "showStatusbar": "showStatusbar"; "statusbarTemplate": "statusbarTemplate"; }, { "page": "page"; "sortChange": "sortChange"; "rowClick": "rowClick"; "expansionChange": "expansionChange"; "rowSelectionChange": "rowSelectionChange"; "cellSelectionChange": "cellSelectionChange"; "columnChange": "columnChange"; }, ["rowDefs", "headerRowDefs", "footerRowDefs"], never, false>;
219
226
  }
220
227
  export declare class MtxGridCellSelectionDirective {
221
- private _dataGrid;
228
+ private _grid;
222
229
  private _selected;
223
230
  private _rowData;
224
231
  ctrlKeyPressed: boolean;
@@ -226,7 +233,7 @@ export declare class MtxGridCellSelectionDirective {
226
233
  get selected(): boolean;
227
234
  set mtxSelectableRowData(value: any);
228
235
  cellSelectionChange: EventEmitter<MtxGridCellSelectionDirective>;
229
- constructor(_dataGrid: MtxGridComponent);
236
+ constructor(_grid: MtxGridComponent);
230
237
  onClick(event: MouseEvent): void;
231
238
  select(): void;
232
239
  deselect(): void;
@@ -1,10 +1,10 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import { ThemePalette } from '@angular/material/core';
3
- import { MatMenu, MatMenuTrigger } from '@angular/material/menu';
3
+ import { SortDirection } from '@angular/material/sort';
4
4
  import { TooltipPosition, TooltipTouchGestures } from '@angular/material/tooltip';
5
5
  import { Observable } from 'rxjs';
6
6
  /** Column definition of grid. */
7
- export interface MtxGridColumn {
7
+ export interface MtxGridColumn<T = any> {
8
8
  field: string;
9
9
  header?: string | Observable<string>;
10
10
  hide?: boolean;
@@ -22,13 +22,13 @@ export interface MtxGridColumn {
22
22
  type?: MtxGridColumnType;
23
23
  typeParameter?: MtxGridColumnTypeParameter;
24
24
  tag?: MtxGridColumnTag;
25
- buttons?: MtxGridColumnButton[];
26
- formatter?: (rowData: any, colDef?: MtxGridColumn) => any;
25
+ buttons?: MtxGridColumnButton<T>[];
26
+ formatter?: (rowData: T, colDef?: MtxGridColumn) => any;
27
27
  cellTemplate?: TemplateRef<any> | null;
28
28
  showExpand?: boolean;
29
29
  description?: string;
30
- summary?: ((data: any[], colDef?: MtxGridColumn) => any) | string;
31
- class?: string;
30
+ summary?: ((data: T[], colDef?: MtxGridColumn) => any) | string;
31
+ class?: string | ((rowData?: T, colDef?: MtxGridColumn) => string);
32
32
  }
33
33
  /** Possible column pin values. */
34
34
  export declare type MtxGridColumnPinValue = 'left' | 'right' | null;
@@ -66,15 +66,15 @@ export interface MtxGridColumnTagValue {
66
66
  color?: string;
67
67
  }
68
68
  /** The properties of column button. */
69
- export interface MtxGridColumnButton {
69
+ export interface MtxGridColumnButton<T = any> {
70
70
  type?: 'basic' | 'icon';
71
71
  text?: string | Observable<string>;
72
72
  icon?: string;
73
73
  color?: ThemePalette;
74
74
  class?: string;
75
- disabled?: boolean | ((rowData: any) => boolean);
76
- click?: (rowData: any) => void;
77
- iif?: (rowData: any) => boolean;
75
+ disabled?: boolean | ((rowData: T) => boolean);
76
+ click?: (rowData: T) => void;
77
+ iif?: (rowData: T) => boolean;
78
78
  pop?: MtxGridColumnButtonPop;
79
79
  tooltip?: string | Observable<string> | MtxGridColumnButtonTooltip;
80
80
  }
@@ -101,18 +101,61 @@ export interface MtxGridCellTemplate {
101
101
  [key: string]: TemplateRef<any>;
102
102
  }
103
103
  /** Row selection formatter. */
104
- export interface MtxGridRowSelectionFormatter {
105
- disabled?: (rowData: any, index?: number) => boolean;
106
- hideCheckbox?: (rowData: any, index?: number) => boolean;
104
+ export interface MtxGridRowSelectionFormatter<T = any> {
105
+ disabled?: (rowData: T, index: number) => boolean;
106
+ hideCheckbox?: (rowData: T, index: number) => boolean;
107
107
  }
108
108
  /** Row class formatter. */
109
- export interface MtxGridRowClassFormatter {
110
- [className: string]: (rowData: any, index?: number) => boolean;
111
- }
112
- /** Column menu component. */
113
- export interface MtxGridColumnMenu {
114
- menuPanel: MatMenu;
115
- menuTrigger: MatMenuTrigger;
109
+ export interface MtxGridRowClassFormatter<T = any> {
110
+ [className: string]: (rowData: T, index: number) => boolean;
116
111
  }
117
112
  /** Possible button type values. */
118
113
  export declare type MtxGridButtonType = 'raised' | 'stroked' | 'flat' | 'icon' | 'fab' | 'mini-fab';
114
+ /**
115
+ * Represents the default options for the grid that can be configured
116
+ * using the `MTX_GRID_DEFAULT_OPTIONS` injection token.
117
+ */
118
+ export interface MtxGridDefaultOptions {
119
+ columnResizable?: boolean;
120
+ emptyValuePlaceholder?: string;
121
+ pageOnFront?: boolean;
122
+ showPaginator?: boolean;
123
+ pageDisabled?: boolean;
124
+ showFirstLastButtons?: boolean;
125
+ pageIndex?: number;
126
+ pageSize?: number;
127
+ pageSizeOptions?: number[];
128
+ hidePageSize?: boolean;
129
+ sortOnFront?: boolean;
130
+ sortActive?: string;
131
+ sortDirection?: SortDirection;
132
+ sortDisableClear?: boolean;
133
+ sortDisabled?: boolean;
134
+ sortStart?: 'asc' | 'desc';
135
+ rowHover?: boolean;
136
+ rowStriped?: boolean;
137
+ multiSelectable?: boolean;
138
+ multiSelectionWithClick?: boolean;
139
+ rowSelectable?: boolean;
140
+ hideRowSelectionCheckbox?: boolean;
141
+ disableRowClickSelection?: boolean;
142
+ cellSelectable?: boolean;
143
+ showToolbar?: boolean;
144
+ toolbarTitle?: string;
145
+ columnHideable?: boolean;
146
+ columnHideableChecked?: 'show' | 'hide';
147
+ columnSortable?: boolean;
148
+ columnPinnable?: boolean;
149
+ columnPinOptions?: MtxGridColumnPinOption[];
150
+ showColumnMenuButton?: boolean;
151
+ columnMenuButtonText?: string;
152
+ columnMenuButtonType?: MtxGridButtonType;
153
+ columnMenuButtonColor?: ThemePalette;
154
+ columnMenuButtonClass?: string;
155
+ columnMenuButtonIcon?: string;
156
+ showColumnMenuHeader?: boolean;
157
+ columnMenuHeaderText?: string;
158
+ showColumnMenuFooter?: boolean;
159
+ columnMenuFooterText?: string;
160
+ noResultText?: string;
161
+ }