@progress/kendo-react-dateinputs
Version:
KendoReact Date Inputs package
107 lines (106 loc) • 3.46 kB
TypeScript
import * as React from 'react';
import * as PropTypes from 'prop-types';
import { Virtualization } from '../../virtualization/Virtualization';
import { BusViewService, DOMService } from '../services';
import { CalendarCellProps } from './CalendarCell';
import { ViewService, CalendarViewEnum } from '../models';
import { CalendarWeekCellProps } from './CalendarWeekCell';
import { CalendarHeaderTitleProps } from './CalendarHeaderTitle';
/**
* @hidden
*/
export interface ViewListEventArguments {
syntheticEvent: React.SyntheticEvent<any>;
nativeEvent?: any;
value: Date;
target: ViewList;
isTodayClick?: boolean;
}
/**
* @hidden
*/
export interface ViewListProps {
activeView: CalendarViewEnum;
bottomOffset?: number;
bus: BusViewService;
cellUID: string;
dom: DOMService;
focusedDate: Date;
max: Date;
min: Date;
cell?: React.ComponentType<CalendarCellProps>;
onChange?: (event: ViewListEventArguments) => void;
service: ViewService;
showWeekNumbers?: boolean;
smoothScroll?: boolean;
take?: number;
value: Date | null;
viewHeight?: number;
viewOffset?: number;
weekCell?: React.ComponentType<CalendarWeekCellProps>;
headerTitle?: React.ComponentType<CalendarHeaderTitleProps>;
}
/**
* @hidden
*/
export interface ViewListState {
skip: number;
index: number;
}
/**
* @hidden
*/
export declare class ViewList extends React.Component<ViewListProps, ViewListState> {
static propTypes: {
activeView: PropTypes.Validator<any>;
bottomOffset: PropTypes.Requireable<any>;
cellUID: PropTypes.Validator<any>;
focusedDate: PropTypes.Validator<any>;
max: PropTypes.Validator<any>;
min: PropTypes.Validator<any>;
onChange: PropTypes.Requireable<any>;
showWeekNumbers: PropTypes.Requireable<any>;
smoothScroll: PropTypes.Requireable<any>;
take: PropTypes.Requireable<any>;
value: PropTypes.Requireable<any>;
viewHeight: PropTypes.Requireable<any>;
viewOffset: PropTypes.Requireable<any>;
};
static defaultProps: {
take: number;
showWeekNumbers: boolean;
smoothScroll: boolean;
};
virtualization: Virtualization | null;
private calendarView;
private table;
private intl;
private bottomOffset;
private viewOffset;
private viewHeight;
private _element;
private lastView;
private isActive;
private animateToIndex;
private shouldScroll;
private indexToScroll?;
readonly element: HTMLDivElement | null;
protected readonly weekNames: string[];
protected readonly weekNumber: boolean;
protected readonly take: number;
protected readonly animate: boolean;
constructor(props: ViewListProps);
componentWillReceiveProps(nextProps: ViewListProps): void;
componentDidUpdate(_prevProps: ViewListProps, _prevState: ViewListState): void;
focusActiveDate: () => void;
blurActiveDate: () => void;
render(): JSX.Element;
protected handleVirtualizationMount: (virtualization: any) => void;
protected buildMonthView: (cols: any, weekNames: any) => JSX.Element;
protected buildDates: (cols: any, dates: Date[]) => JSX.Element;
protected calculateHeights: () => void;
protected getTake: (skip: number, total: number) => number;
private handleScrollAction;
private handleTodayClick;
private handleDateChange;
}