import { EventEmitter, OnInit, AfterViewInit, OnChanges, OnDestroy, SimpleChanges, NgZone, ElementRef, ChangeDetectorRef } from '@angular/core'; import { Directionality } from '@angular/cdk/bidi'; import { Observable } from 'rxjs'; import { ScrollViewport } from './scroll-viewport'; import { ScrollbarManager } from './utils/scrollbar-manager'; import { ScrollbarDragging, ScrollbarHovered } from './ng-scrollbar-base'; import { ScrollbarAppearance, ScrollbarTrack, ScrollbarPosition, ScrollbarVisibility, NgScrollbarState, ScrollbarPointerEventsMethod } from './ng-scrollbar.model'; import { SmoothScrollElement, SmoothScrollManager, SmoothScrollToElementOptions, SmoothScrollToOptions } from './smooth-scroll'; import * as i0 from "@angular/core"; export declare class NgScrollbar implements OnInit, OnChanges, AfterViewInit, OnDestroy { private el; private zone; private changeDetectorRef; private dir; private smoothScroll; manager: ScrollbarManager; private _disabled; private _sensorDisabled; private _pointerEventsDisabled; private _autoHeightDisabled; private _autoWidthDisabled; private _viewportPropagateMouseMove; /** Disable custom scrollbar and switch back to native scrollbar */ get disabled(): boolean; set disabled(disabled: boolean | string); /** Whether ResizeObserver is disabled */ get sensorDisabled(): boolean; set sensorDisabled(disabled: boolean | string); /** A flag used to enable/disable the scrollbar thumb dragged event */ get pointerEventsDisabled(): boolean; set pointerEventsDisabled(disabled: boolean | string); /** Enable viewport mousemove event propagation (only when pointerEventsMethod="viewport") */ get viewportPropagateMouseMove(): boolean; set viewportPropagateMouseMove(disabled: boolean | string); /** Disable auto-height */ get autoHeightDisabled(): boolean; set autoHeightDisabled(disabled: boolean | string); /** Disable auto-width */ get autoWidthDisabled(): boolean; set autoWidthDisabled(disabled: boolean | string); /** A class forwarded to scrollable viewport element */ viewClass: string; /** A class forwarded to the scrollbar track element */ trackClass: string; /** A class forwarded to the scrollbar thumb element */ thumbClass: string; /** Minimum scrollbar thumb size */ minThumbSize: number; /** The duration which the scrolling takes to reach its target when scrollbar rail is clicked */ trackClickScrollDuration: number; /** * Sets the pointer events method * Use viewport pointer events to handle dragging and track click (This makes scrolling work when mouse is over the scrollbar) * Use scrollbar pointer events to handle dragging and track click */ pointerEventsMethod: ScrollbarPointerEventsMethod; /** * Sets the supported scroll track of the viewport, there are 3 options: * * - `vertical` Use both vertical and horizontal scrollbar * - `horizontal` Use both vertical and horizontal scrollbar * - `all` Use both vertical and horizontal scrollbar */ track: ScrollbarTrack; /** * When to show the scrollbar, and there are 3 options: * * - `native` (default) Scrollbar will be visible when viewport is scrollable like with native scrollbar * - `hover` Scrollbars are hidden by default, only visible on scrolling or hovering * - `always` Scrollbars are always shown even if the viewport is not scrollable */ visibility: ScrollbarVisibility; /** * Sets the appearance of the scrollbar, there are 2 options: * * - `standard` (default) scrollbar space will be reserved just like with native scrollbar. * - `compact` scrollbar doesn't reserve any space, they are placed over the viewport. */ appearance: ScrollbarAppearance; /** * Sets the position of each scrollbar, there are 4 options: * * - `native` (Default) Use the default position like in native scrollbar. * - `invertY` Inverts vertical scrollbar position * - `invertX` Inverts Horizontal scrollbar position * - `invertAll` Inverts both scrollbar positions */ position: ScrollbarPosition; /** Debounce interval for detecting changes via ResizeObserver */ sensorDebounce: number; /** Scroll Audit Time */ scrollAuditTime: number; /** Steam that emits when scrollbar is updated */ updated: EventEmitter; /** Vertical scrollbar ElementRef used for include its thickness in auto-width mode */ private scrollbarY; /** Horizontal scrollbar ElementRef used for include its thickness in auto-height mode */ private scrollbarX; /** Default viewport reference */ private defaultViewPort; /** Custom viewport reference */ private customViewPort; /** Viewport Element */ viewport: ScrollViewport; /** Set of attributes added on the scrollbar wrapper */ state: NgScrollbarState; /** Stream that destroys components' observables */ private readonly destroyed; /** Stream that emits on scroll event */ scrolled: Observable; /** Steam that emits scroll event for vertical scrollbar */ verticalScrolled: Observable; /** Steam that emits scroll event for horizontal scrollbar */ horizontalScrolled: Observable; get nativeElement(): HTMLElement; constructor(el: ElementRef, zone: NgZone, changeDetectorRef: ChangeDetectorRef, dir: Directionality, smoothScroll: SmoothScrollManager, manager: ScrollbarManager); /** * Update local state with each change detection */ private updateState; private setState; private getScrolledByDirection; /** * Set hovered state if a scrollbar is being hovered */ setHovered(hovered: ScrollbarHovered): void; /** * Set dragging state if a scrollbar is being dragged */ setDragging(dragging: ScrollbarDragging): void; /** * Set clicked state if a scrollbar track is being clicked */ setClicked(scrollbarClicked: boolean): void; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; ngOnDestroy(): void; /** * Update local state and the internal scrollbar controls */ update(): void; /** * Smooth scroll functions */ scrollTo(options: SmoothScrollToOptions): Promise; /** * Scroll to element by reference or selector */ scrollToElement(target: SmoothScrollElement, options?: SmoothScrollToElementOptions): Promise; private updateHeight; private updateWidth; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; }