1 | import { ElementRef } from '@angular/core';
|
2 | export type ContainerRef = Window | ElementRef | any;
|
3 | export interface IInfiniteScrollEvent {
|
4 | currentScrollPosition: number;
|
5 | }
|
6 | export interface IPositionElements {
|
7 | windowElement: ContainerRef;
|
8 | axis: any;
|
9 | }
|
10 | export interface IPositionStats {
|
11 | height: number;
|
12 | scrolled: number;
|
13 | totalToScroll: number;
|
14 | isWindow?: boolean;
|
15 | }
|
16 | export interface IScrollerDistance {
|
17 | down?: number;
|
18 | up?: number;
|
19 | }
|
20 | export interface IScrollState {
|
21 | lastTotalToScroll: number;
|
22 | totalToScroll: number;
|
23 | triggered: IScrollerDistance;
|
24 | lastScrollPosition: number;
|
25 | }
|
26 | export interface IResolver {
|
27 | container: ContainerRef;
|
28 | isWindow: boolean;
|
29 | axis: any;
|
30 | }
|
31 | export interface IScrollRegisterConfig {
|
32 | container: ContainerRef;
|
33 | throttle: number;
|
34 | }
|
35 | export interface IScroller {
|
36 | fromRoot: boolean;
|
37 | horizontal: boolean;
|
38 | disable: boolean;
|
39 | throttle: number;
|
40 | scrollWindow: boolean;
|
41 | element: ElementRef;
|
42 | scrollContainer: string | ElementRef;
|
43 | alwaysCallback: boolean;
|
44 | downDistance: number;
|
45 | upDistance: number;
|
46 | }
|
47 | export interface IScrollParams {
|
48 | scrollDown: boolean;
|
49 | fire: boolean;
|
50 | stats: IPositionStats;
|
51 | }
|
52 | export interface IInfiniteScrollAction {
|
53 | type: string;
|
54 | payload: IInfiniteScrollEvent;
|
55 | }
|