@ng-matero/extensions 14.7.0 → 14.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/_index.scss +1 -1
  2. package/_theming.scss +1 -1
  3. package/checkbox-group/checkbox-group.component.d.ts +6 -6
  4. package/datetimepicker/public-api.d.ts +1 -0
  5. package/esm2020/checkbox-group/checkbox-group.component.mjs +11 -11
  6. package/esm2020/datetimepicker/datetimepicker-input.mjs +1 -1
  7. package/esm2020/datetimepicker/public-api.mjs +2 -1
  8. package/esm2020/grid/cell.component.mjs +5 -4
  9. package/esm2020/grid/column-menu.component.mjs +3 -3
  10. package/esm2020/grid/grid.component.mjs +65 -46
  11. package/esm2020/grid/grid.interface.mjs +1 -1
  12. package/esm2020/grid/grid.pipe.mjs +2 -2
  13. package/esm2020/select/select.component.mjs +28 -15
  14. package/esm2020/split/interface.mjs +1 -1
  15. package/esm2020/split/split.component.mjs +24 -9
  16. package/esm2020/tooltip/tooltip.mjs +23 -4
  17. package/fesm2015/mtxCheckboxGroup.mjs +8 -8
  18. package/fesm2015/mtxCheckboxGroup.mjs.map +1 -1
  19. package/fesm2015/mtxDatetimepicker.mjs +1 -1
  20. package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
  21. package/fesm2015/mtxGrid.mjs +75 -52
  22. package/fesm2015/mtxGrid.mjs.map +1 -1
  23. package/fesm2015/mtxSelect.mjs +26 -12
  24. package/fesm2015/mtxSelect.mjs.map +1 -1
  25. package/fesm2015/mtxSplit.mjs +26 -8
  26. package/fesm2015/mtxSplit.mjs.map +1 -1
  27. package/fesm2015/mtxTooltip.mjs +22 -3
  28. package/fesm2015/mtxTooltip.mjs.map +1 -1
  29. package/fesm2020/mtxCheckboxGroup.mjs +8 -8
  30. package/fesm2020/mtxCheckboxGroup.mjs.map +1 -1
  31. package/fesm2020/mtxDatetimepicker.mjs +1 -1
  32. package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
  33. package/fesm2020/mtxGrid.mjs +72 -52
  34. package/fesm2020/mtxGrid.mjs.map +1 -1
  35. package/fesm2020/mtxSelect.mjs +25 -12
  36. package/fesm2020/mtxSelect.mjs.map +1 -1
  37. package/fesm2020/mtxSplit.mjs +23 -8
  38. package/fesm2020/mtxSplit.mjs.map +1 -1
  39. package/fesm2020/mtxTooltip.mjs +22 -3
  40. package/fesm2020/mtxTooltip.mjs.map +1 -1
  41. package/grid/cell.component.d.ts +1 -0
  42. package/grid/cell.component.scss +1 -1
  43. package/grid/column-menu.component.d.ts +1 -1
  44. package/grid/grid.component.d.ts +11 -6
  45. package/grid/grid.interface.d.ts +63 -14
  46. package/grid/grid.pipe.d.ts +1 -1
  47. package/package.json +2 -2
  48. package/select/select.component.d.ts +28 -8
  49. package/split/interface.d.ts +12 -0
  50. package/split/split.component.d.ts +7 -4
  51. package/tooltip/tooltip.d.ts +9 -1
@@ -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 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 { 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,EAAE,CAAC,CAAC;AAElF;;;AAGG;AACH,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;;AAGG;AACG,SAAU,iCAAiC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,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;;;;"}
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,CA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AA,EAAA,CAAA;;;ME5rBU,gBAAgB,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,6 +20,7 @@ export declare class MtxGridCellComponent implements OnInit, DoCheck {
20
20
  placeholder: string;
21
21
  rowDataChange: EventEmitter<KeyValueChangeRecord<string, any>>;
22
22
  private rowDataDiffer?;
23
+ rowChangeRecord?: KeyValueChangeRecord<string, any>;
23
24
  get _value(): string;
24
25
  constructor(_dialog: MtxDialog, _gridSrv: MtxGridService, _differs: KeyValueDiffers, _changeDetectorRef: ChangeDetectorRef);
25
26
  ngOnInit(): void;
@@ -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,17 +1,20 @@
1
1
  import { SelectionModel } from '@angular/cdk/collections';
2
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, KeyValueChangeRecord, OnChanges, OnDestroy, QueryList, SimpleChanges, TemplateRef, TrackByFunction } from '@angular/core';
2
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, InjectionToken, KeyValueChangeRecord, OnChanges, OnDestroy, QueryList, SimpleChanges, TemplateRef, TrackByFunction } from '@angular/core';
3
3
  import { ThemePalette } from '@angular/material/core';
4
4
  import { MatPaginator, PageEvent } from '@angular/material/paginator';
5
5
  import { MatSort, Sort, SortDirection } from '@angular/material/sort';
6
6
  import { MatFooterRowDef, MatHeaderRowDef, MatRowDef, MatTable, MatTableDataSource } from '@angular/material/table';
7
7
  import { MtxGridColumnMenuComponent } from './column-menu.component';
8
8
  import { MtxGridExpansionToggleDirective } from './expansion-toggle.directive';
9
- import { MtxGridButtonType, MtxGridCellTemplate, MtxGridColumn, MtxGridColumnPinOption, MtxGridRowClassFormatter, MtxGridRowSelectionFormatter } from './grid.interface';
9
+ import { MtxGridButtonType, MtxGridCellTemplate, MtxGridColumn, MtxGridColumnPinOption, MtxGridDefaultOptions, MtxGridRowClassFormatter, MtxGridRowSelectionFormatter } from './grid.interface';
10
10
  import { MtxGridService } from './grid.service';
11
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>;
12
14
  export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDestroy {
13
15
  private _gridSrv;
14
16
  private _changeDetectorRef;
17
+ private _defaultOptions?;
15
18
  table: MatTable<any>;
16
19
  paginator: MatPaginator;
17
20
  sort: MatSort;
@@ -101,6 +104,8 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
101
104
  rowSelectable: boolean;
102
105
  /** Whether to hide the row selection checkbox. */
103
106
  hideRowSelectionCheckbox: boolean;
107
+ /** Whether disable rows to be selected when clicked. */
108
+ disableRowClickSelection: boolean;
104
109
  /** The formatter to disable the row selection or hide the row's checkbox. */
105
110
  rowSelectionFormatter: MtxGridRowSelectionFormatter;
106
111
  /** The formatter to set the row's class. */
@@ -128,7 +133,7 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
128
133
  /** Whether the column is pinnable. */
129
134
  columnPinnable: boolean;
130
135
  /** Event emitted when the column is hided or is sorted. */
131
- columnChange: EventEmitter<MtxGridColumn[]>;
136
+ columnChange: EventEmitter<MtxGridColumn<any>[]>;
132
137
  /** The options for the column pin list. */
133
138
  columnPinOptions: MtxGridColumnPinOption[];
134
139
  /** Whether to show the column menu button. */
@@ -185,7 +190,7 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
185
190
  statusbarTemplate: TemplateRef<any>;
186
191
  /** The changed record of row data. */
187
192
  rowChangeRecord?: KeyValueChangeRecord<string, any>;
188
- constructor(_gridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef);
193
+ constructor(_gridSrv: MtxGridService, _changeDetectorRef: ChangeDetectorRef, _defaultOptions?: MtxGridDefaultOptions | undefined);
189
194
  detectChanges(): void;
190
195
  _getColData(data: any[], colDef: MtxGridColumn): any[];
191
196
  ngOnChanges(changes: SimpleChanges): void;
@@ -216,8 +221,8 @@ export declare class MtxGridComponent implements OnChanges, AfterViewInit, OnDes
216
221
  _onPage(e: PageEvent): void;
217
222
  scrollTop(value?: number): number | void;
218
223
  scrollLeft(value?: number): number | void;
219
- static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridComponent, never>;
220
- 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>;
221
226
  }
222
227
  export declare class MtxGridCellSelectionDirective {
223
228
  private _grid;
@@ -1,9 +1,10 @@
1
1
  import { TemplateRef } from '@angular/core';
2
2
  import { ThemePalette } from '@angular/material/core';
3
+ import { SortDirection } from '@angular/material/sort';
3
4
  import { TooltipPosition, TooltipTouchGestures } from '@angular/material/tooltip';
4
5
  import { Observable } from 'rxjs';
5
6
  /** Column definition of grid. */
6
- export interface MtxGridColumn {
7
+ export interface MtxGridColumn<T = any> {
7
8
  field: string;
8
9
  header?: string | Observable<string>;
9
10
  hide?: boolean;
@@ -21,13 +22,13 @@ export interface MtxGridColumn {
21
22
  type?: MtxGridColumnType;
22
23
  typeParameter?: MtxGridColumnTypeParameter;
23
24
  tag?: MtxGridColumnTag;
24
- buttons?: MtxGridColumnButton[];
25
- formatter?: (rowData: any, colDef?: MtxGridColumn) => any;
25
+ buttons?: MtxGridColumnButton<T>[];
26
+ formatter?: (rowData: T, colDef?: MtxGridColumn) => any;
26
27
  cellTemplate?: TemplateRef<any> | null;
27
28
  showExpand?: boolean;
28
29
  description?: string;
29
- summary?: ((data: any[], colDef?: MtxGridColumn) => any) | string;
30
- class?: string | ((rowData?: Record<string, any>, colDef?: MtxGridColumn) => string);
30
+ summary?: ((data: T[], colDef?: MtxGridColumn) => any) | string;
31
+ class?: string | ((rowData?: T, colDef?: MtxGridColumn) => string);
31
32
  }
32
33
  /** Possible column pin values. */
33
34
  export declare type MtxGridColumnPinValue = 'left' | 'right' | null;
@@ -65,15 +66,15 @@ export interface MtxGridColumnTagValue {
65
66
  color?: string;
66
67
  }
67
68
  /** The properties of column button. */
68
- export interface MtxGridColumnButton {
69
+ export interface MtxGridColumnButton<T = any> {
69
70
  type?: 'basic' | 'icon';
70
71
  text?: string | Observable<string>;
71
72
  icon?: string;
72
73
  color?: ThemePalette;
73
74
  class?: string;
74
- disabled?: boolean | ((rowData: any) => boolean);
75
- click?: (rowData: any) => void;
76
- iif?: (rowData: any) => boolean;
75
+ disabled?: boolean | ((rowData: T) => boolean);
76
+ click?: (rowData: T) => void;
77
+ iif?: (rowData: T) => boolean;
77
78
  pop?: MtxGridColumnButtonPop;
78
79
  tooltip?: string | Observable<string> | MtxGridColumnButtonTooltip;
79
80
  }
@@ -100,13 +101,61 @@ export interface MtxGridCellTemplate {
100
101
  [key: string]: TemplateRef<any>;
101
102
  }
102
103
  /** Row selection formatter. */
103
- export interface MtxGridRowSelectionFormatter {
104
- disabled?: (rowData: any, index?: number) => boolean;
105
- 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;
106
107
  }
107
108
  /** Row class formatter. */
108
- export interface MtxGridRowClassFormatter {
109
- [className: string]: (rowData: any, index?: number) => boolean;
109
+ export interface MtxGridRowClassFormatter<T = any> {
110
+ [className: string]: (rowData: T, index: number) => boolean;
110
111
  }
111
112
  /** Possible button type values. */
112
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
+ }
@@ -18,7 +18,7 @@ export declare class MtxGridCellActionTooltipPipe implements PipeTransform {
18
18
  static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionTooltipPipe, "cellActionTooltip", false>;
19
19
  }
20
20
  export declare class MtxGridCellActionDisablePipe implements PipeTransform {
21
- transform(btn: MtxGridColumnButton, rowData: Record<string, any>): boolean;
21
+ transform(btn: MtxGridColumnButton, rowData: Record<string, any>, rowChangeRecord?: KeyValueChangeRecord<string, any>, currentValue?: any): boolean;
22
22
  static ɵfac: i0.ɵɵFactoryDeclaration<MtxGridCellActionDisablePipe, never>;
23
23
  static ɵpipe: i0.ɵɵPipeDeclaration<MtxGridCellActionDisablePipe, "cellActionDisable", false>;
24
24
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-matero/extensions",
3
- "version": "14.7.0",
3
+ "version": "14.8.1",
4
4
  "description": "Angular Material Extensions",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -224,7 +224,7 @@
224
224
  "dependencies": {
225
225
  "@ng-select/ng-select": "^9.0.0",
226
226
  "ngx-color": "^8.0.0",
227
- "photoviewer": "^3.6.0",
227
+ "photoviewer": "^3.7.0",
228
228
  "tslib": "^2.3.0"
229
229
  },
230
230
  "peerDependencies": {
@@ -1,11 +1,11 @@
1
1
  import { FocusMonitor } from '@angular/cdk/a11y';
2
2
  import { BooleanInput } from '@angular/cdk/coercion';
3
- import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
4
- import { CanDisable, ErrorStateMatcher } from '@angular/material/core';
3
+ import { AfterViewInit, ChangeDetectorRef, DoCheck, ElementRef, EventEmitter, InjectionToken, OnDestroy, OnInit, QueryList, TemplateRef } from '@angular/core';
5
4
  import { ControlValueAccessor, FormGroupDirective, NgControl, NgForm } from '@angular/forms';
5
+ import { CanDisable, ErrorStateMatcher } from '@angular/material/core';
6
6
  import { MatFormField, MatFormFieldControl } from '@angular/material/form-field';
7
- import { Subject } from 'rxjs';
8
7
  import { NgSelectComponent } from '@ng-select/ng-select';
8
+ import { Subject } from 'rxjs';
9
9
  import { MtxOptionComponent } from './option.component';
10
10
  import * as i0 from "@angular/core";
11
11
  export declare type DropdownPosition = 'bottom' | 'top' | 'auto';
@@ -14,6 +14,25 @@ export declare type CompareWithFn = (a: any, b: any) => boolean;
14
14
  export declare type GroupValueFn = (key: string | Record<string, any>, children: any[]) => string | Record<string, any>;
15
15
  export declare type SearchFn = (term: string, item: any) => boolean;
16
16
  export declare type TrackByFn = (item: any) => any;
17
+ /**
18
+ * Represents the default options for the select that can be configured
19
+ * using the `MTX_SELECT_DEFAULT_OPTIONS` injection token.
20
+ */
21
+ export interface MtxSelectDefaultOptions {
22
+ placeholder?: string;
23
+ notFoundText?: string;
24
+ typeToSearchText?: string;
25
+ addTagText?: string;
26
+ loadingText?: string;
27
+ clearAllText?: string;
28
+ appendTo?: string;
29
+ bindValue?: string;
30
+ bindLabel?: string;
31
+ openOnEnter?: boolean;
32
+ clearSearchOnAdd?: boolean;
33
+ }
34
+ /** Injection token that can be used to specify default select options. */
35
+ export declare const MTX_SELECT_DEFAULT_OPTIONS: InjectionToken<MtxSelectDefaultOptions>;
17
36
  /** @docs-private */
18
37
  declare const _MtxSelectMixinBase: import("@angular/material/core")._Constructor<CanDisable> & import("@angular/material/core")._AbstractConstructor<CanDisable> & import("@angular/material/core")._Constructor<import("@angular/material/core").CanUpdateErrorState> & import("@angular/material/core")._AbstractConstructor<import("@angular/material/core").CanUpdateErrorState> & {
19
38
  new (_defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl): {
@@ -39,6 +58,7 @@ export declare class MtxSelectComponent extends _MtxSelectMixinBase implements O
39
58
  protected _elementRef: ElementRef;
40
59
  protected _focusMonitor: FocusMonitor;
41
60
  protected _parentFormField?: MatFormField | undefined;
61
+ protected _defaultOptions?: MtxSelectDefaultOptions | undefined;
42
62
  ngSelect: NgSelectComponent;
43
63
  optionTemplate: TemplateRef<any>;
44
64
  optgroupTemplate: TemplateRef<any>;
@@ -56,8 +76,8 @@ export declare class MtxSelectComponent extends _MtxSelectMixinBase implements O
56
76
  addTagText: string;
57
77
  appearance: string;
58
78
  appendTo: string;
59
- bindLabel: string;
60
- bindValue: string;
79
+ bindLabel: string | undefined;
80
+ bindValue: string | undefined;
61
81
  closeOnSelect: boolean;
62
82
  clearAllText: string;
63
83
  clearable: boolean;
@@ -113,7 +133,7 @@ export declare class MtxSelectComponent extends _MtxSelectMixinBase implements O
113
133
  scrollToEnd: EventEmitter<any>;
114
134
  get clearSearchOnAdd(): boolean;
115
135
  set clearSearchOnAdd(value: boolean);
116
- private _clearSearchOnAdd?;
136
+ private _clearSearchOnAdd;
117
137
  get items(): any[];
118
138
  set items(value: any[]);
119
139
  private _items;
@@ -173,7 +193,7 @@ export declare class MtxSelectComponent extends _MtxSelectMixinBase implements O
173
193
  * Used to detect if it has changed.
174
194
  */
175
195
  private _previousControl;
176
- constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _focusMonitor: FocusMonitor, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl, _parentFormField?: MatFormField | undefined);
196
+ constructor(_changeDetectorRef: ChangeDetectorRef, _elementRef: ElementRef, _focusMonitor: FocusMonitor, _defaultErrorStateMatcher: ErrorStateMatcher, _parentForm: NgForm, _parentFormGroup: FormGroupDirective, ngControl: NgControl, _parentFormField?: MatFormField | undefined, _defaultOptions?: MtxSelectDefaultOptions | undefined);
177
197
  ngOnInit(): void;
178
198
  ngAfterViewInit(): void;
179
199
  ngDoCheck(): void;
@@ -222,7 +242,7 @@ export declare class MtxSelectComponent extends _MtxSelectMixinBase implements O
222
242
  blur(): void;
223
243
  static ngAcceptInputType_required: BooleanInput;
224
244
  static ngAcceptInputType_disabled: BooleanInput;
225
- static ɵfac: i0.ɵɵFactoryDeclaration<MtxSelectComponent, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }, { optional: true; }]>;
245
+ static ɵfac: i0.ɵɵFactoryDeclaration<MtxSelectComponent, [null, null, null, null, { optional: true; }, { optional: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
226
246
  static ɵcmp: i0.ɵɵComponentDeclaration<MtxSelectComponent, "mtx-select", ["mtxSelect"], { "disabled": "disabled"; "addTag": "addTag"; "addTagText": "addTagText"; "appearance": "appearance"; "appendTo": "appendTo"; "bindLabel": "bindLabel"; "bindValue": "bindValue"; "closeOnSelect": "closeOnSelect"; "clearAllText": "clearAllText"; "clearable": "clearable"; "clearOnBackspace": "clearOnBackspace"; "compareWith": "compareWith"; "dropdownPosition": "dropdownPosition"; "groupBy": "groupBy"; "groupValue": "groupValue"; "selectableGroup": "selectableGroup"; "selectableGroupAsModel": "selectableGroupAsModel"; "hideSelected": "hideSelected"; "isOpen": "isOpen"; "loading": "loading"; "loadingText": "loadingText"; "labelForId": "labelForId"; "markFirst": "markFirst"; "maxSelectedItems": "maxSelectedItems"; "multiple": "multiple"; "notFoundText": "notFoundText"; "searchable": "searchable"; "readonly": "readonly"; "searchFn": "searchFn"; "searchWhileComposing": "searchWhileComposing"; "selectOnTab": "selectOnTab"; "trackByFn": "trackByFn"; "inputAttrs": "inputAttrs"; "tabIndex": "tabIndex"; "openOnEnter": "openOnEnter"; "minTermLength": "minTermLength"; "editableSearchTerm": "editableSearchTerm"; "keyDownFn": "keyDownFn"; "virtualScroll": "virtualScroll"; "typeToSearchText": "typeToSearchText"; "typeahead": "typeahead"; "clearSearchOnAdd": "clearSearchOnAdd"; "items": "items"; "value": "value"; "id": "id"; "placeholder": "placeholder"; "required": "required"; "errorStateMatcher": "errorStateMatcher"; "ariaLabel": "aria-label"; "ariaLabelledby": "aria-labelledby"; }, { "blurEvent": "blur"; "focusEvent": "focus"; "changeEvent": "change"; "openEvent": "open"; "closeEvent": "close"; "searchEvent": "search"; "clearEvent": "clear"; "addEvent": "add"; "removeEvent": "remove"; "scroll": "scroll"; "scrollToEnd": "scrollToEnd"; }, ["optionTemplate", "optgroupTemplate", "labelTemplate", "multiLabelTemplate", "headerTemplate", "footerTemplate", "notFoundTemplate", "typeToSearchTemplate", "loadingTextTemplate", "tagTemplate", "loadingSpinnerTemplate", "mtxOptions"], never, false>;
227
247
  }
228
248
  export {};