@progress/kendo-react-dateinputs
Version:
KendoReact Date Inputs package
114 lines (113 loc) • 3.66 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { ScrollAction, PageAction } from './services';
/**
* @hidden
*/
export interface ScrollActionArguments {
index: number;
target: HTMLDivElement | null;
scrollAction?: ScrollAction;
pageAction?: PageAction;
animationInProgress: boolean;
}
/**
* @hidden
*/
export declare enum ScrollDirection {
Backward = 0,
Forward = 1
}
/**
* @hidden
*/
export declare type Direction = 'horizontal' | 'vertical';
/**
* @hidden
*/
export interface VirtualizationProps {
bottomOffset: number;
className?: string;
direction?: Direction;
itemHeight?: number;
itemWidth?: number;
maxScrollDifference?: number;
onMount?: any;
onScrollAction?: (args: ScrollActionArguments) => void;
scrollOffsetSize?: number;
scrollDuration?: number;
skip: number;
tabIndex?: number;
take: number;
topOffset: number;
total: number;
role?: string;
}
/**
* @hidden
*/
export declare class Virtualization extends React.Component<VirtualizationProps, {}> {
static propTypes: {
bottomOffset: PropTypes.Validator<any>;
className: PropTypes.Requireable<any>;
direction: PropTypes.Requireable<any>;
forceScroll: PropTypes.Requireable<any>;
itemHeight: PropTypes.Requireable<any>;
itemWidth: PropTypes.Requireable<any>;
maxScrollDifference: PropTypes.Requireable<any>;
onScroll: PropTypes.Requireable<any>;
onScrollAction: PropTypes.Requireable<any>;
scrollDuration: PropTypes.Requireable<any>;
scrollOffsetSize: PropTypes.Requireable<any>;
skip: PropTypes.Validator<any>;
tabIndex: PropTypes.Requireable<any>;
take: PropTypes.Validator<any>;
topOffset: PropTypes.Validator<any>;
total: PropTypes.Validator<any>;
role: PropTypes.Requireable<any>;
};
static defaultProps: {
direction: "horizontal" | "vertical";
forceScroll: boolean;
scrollOffsetSize: number;
maxScrollDifference: number;
scrollDuration: number;
};
private cancelAnimation;
private rowHeightService;
private scrollerService;
private scrollContainer;
private scrollAction?;
private pageAction?;
private lastDirection;
private lastTotal;
private lastTake;
private animationInProgress;
readonly element: HTMLDivElement | null;
protected readonly containerOffsetSize: number;
readonly containerScrollSize: number;
readonly containerScrollPosition: number;
protected readonly direction: Direction;
protected readonly scrollOffsetSize: number;
constructor(props: VirtualizationProps);
activeIndex(): number;
itemIndex(offset: number): number;
itemOffset(index: number): number;
isIndexVisible(index: number): boolean;
isListScrolled(index: number): boolean;
scrollTo: (value: number) => void;
scrollToIndex: (index: number) => void;
animateToIndex: (index: number) => void;
scrollToBottom: () => void;
componentDidMount(): void;
render(): JSX.Element;
protected scrollStep: (start: number, end: number) => number;
protected scrollRange: (indexOffset: number, direction: ScrollDirection) => any;
protected containerMaxScroll: () => number;
protected getContainerScrollDirection: (indexOffset: number) => ScrollDirection;
protected initServices: (props?: VirtualizationProps) => void;
protected getContainerProperty: (propertyName: string) => number;
private handleScroll;
private handleScrollAction;
private handlePageAction;
}