index.d.ts 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. export { b as CdkFixedSizeVirtualScroll, C as CdkScrollable, a as CdkScrollableModule, c as CdkVirtualForOf, r as CdkVirtualForOfContext, t as CdkVirtualScrollRepeater, d as CdkVirtualScrollViewport, v as CdkVirtualScrollable, f as CdkVirtualScrollableElement, e as CdkVirtualScrollableWindow, D as DEFAULT_SCROLL_TIME, E as ExtendedScrollToOptions, F as FixedSizeVirtualScrollStrategy, S as ScrollDispatcher, g as ScrollingModule, u as VIRTUAL_SCROLLABLE, V as VIRTUAL_SCROLL_STRATEGY, s as VirtualScrollStrategy, k as _Bottom, o as _End, l as _Left, m as _Right, n as _Start, j as _Top, h as _Without, p as _XAxis, i as _XOR, q as _YAxis, _ as _fixedSizeVirtualScrollStrategyFactory } from '../scrolling-module.d-ud2XrbF8.js';
  2. import * as i0 from '@angular/core';
  3. import { OnDestroy } from '@angular/core';
  4. import { Observable } from 'rxjs';
  5. export { b as ɵɵDir } from '../bidi-module.d-D-fEBKdS.js';
  6. import '../data-source.d-Bblv7Zvh.js';
  7. import '../number-property.d-CJVxXUcb.js';
  8. /** Time in ms to throttle the resize events by default. */
  9. declare const DEFAULT_RESIZE_TIME = 20;
  10. /** Object that holds the scroll position of the viewport in each direction. */
  11. interface ViewportScrollPosition {
  12. top: number;
  13. left: number;
  14. }
  15. /**
  16. * Simple utility for getting the bounds of the browser viewport.
  17. * @docs-private
  18. */
  19. declare class ViewportRuler implements OnDestroy {
  20. private _platform;
  21. private _listeners;
  22. /** Cached viewport dimensions. */
  23. private _viewportSize;
  24. /** Stream of viewport change events. */
  25. private readonly _change;
  26. /** Used to reference correct document/window */
  27. protected _document: Document;
  28. constructor(...args: unknown[]);
  29. ngOnDestroy(): void;
  30. /** Returns the viewport's width and height. */
  31. getViewportSize(): Readonly<{
  32. width: number;
  33. height: number;
  34. }>;
  35. /** Gets a DOMRect for the viewport's bounds. */
  36. getViewportRect(): {
  37. top: number;
  38. left: number;
  39. bottom: number;
  40. right: number;
  41. height: number;
  42. width: number;
  43. };
  44. /** Gets the (top, left) scroll position of the viewport. */
  45. getViewportScrollPosition(): ViewportScrollPosition;
  46. /**
  47. * Returns a stream that emits whenever the size of the viewport changes.
  48. * This stream emits outside of the Angular zone.
  49. * @param throttleTime Time in milliseconds to throttle the stream.
  50. */
  51. change(throttleTime?: number): Observable<Event>;
  52. /** Use defaultView of injected document if available or fallback to global window reference */
  53. private _getWindow;
  54. /** Updates the cached viewport size. */
  55. private _updateViewportSize;
  56. static ɵfac: i0.ɵɵFactoryDeclaration<ViewportRuler, never>;
  57. static ɵprov: i0.ɵɵInjectableDeclaration<ViewportRuler>;
  58. }
  59. export { DEFAULT_RESIZE_TIME, ViewportRuler };
  60. export type { ViewportScrollPosition };