@progress/kendo-react-dateinputs
Version:
KendoReact Date Inputs package
77 lines (76 loc) • 2.2 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { CalendarNavigationItemProps } from './CalendarNavigationItem';
import { DOMService } from '../services';
import { Virtualization } from '../../virtualization/Virtualization';
import { CalendarViewEnum, ViewService } from '../models';
/**
* @hidden
*/
export interface NavigationEventArguments {
syntheticEvent: React.SyntheticEvent<any>;
nativeEvent?: any;
value: Date;
target: Navigation;
}
/**
* @hidden
*/
export interface NavigationProps {
activeView: CalendarViewEnum;
dom: DOMService;
focusedDate: Date;
max: Date;
min: Date;
onChange?: (event: NavigationEventArguments) => void;
service: ViewService;
take?: number;
navigationItem?: React.ComponentType<CalendarNavigationItemProps>;
}
/**
* @hidden
*/
export interface NavigationState {
skip: number;
}
/**
* @hidden
*/
export declare class Navigation extends React.Component<NavigationProps, NavigationState> {
static propTypes: {
activeView: PropTypes.Validator<any>;
focusedDate: PropTypes.Validator<any>;
max: PropTypes.Validator<any>;
min: PropTypes.Validator<any>;
onChange: PropTypes.Requireable<any>;
take: PropTypes.Requireable<any>;
};
static defaultProps: {
take: number;
};
virtualization: Virtualization | null;
private list;
private itemHeight;
private topOffset;
private maxViewHeight;
private bottomOffset;
private lastView;
private indexToScroll?;
protected readonly take: number;
constructor(props: NavigationProps);
/**
* @hidden
*/
componentWillReceiveProps(nextProps: NavigationProps): any;
/**
* @hidden
*/
componentDidUpdate(_prevProps: NavigationProps, _prevState: NavigationState): void;
render(): JSX.Element;
protected handleVirtualizationMount: (virtualization: any) => void;
protected buildNavigationItem: (date: Date) => React.ReactNode;
protected calculateHeights: () => void;
protected getTake(skip: number, total: number): number;
private handleDateChange;
private handleScrollAction;
}