import last from 'lodash/last'; import first from 'lodash/first'; import * as React from 'react'; import BaseCalendarView, { BaseCalendarViewProps, CalendarWithHeaderViewProps, SingleSelectionCalendarViewProps, } from './BaseCalendarView'; import Calendar from './Calendar'; import Body from './CalendarBody/Body'; import Header from './CalendarHeader/Header'; import { findHTMLElement } from '../lib'; const YEAR_CALENDAR_ROW_WIDTH = 3; type YearViewProps = BaseCalendarViewProps & SingleSelectionCalendarViewProps & CalendarWithHeaderViewProps; class YearView extends BaseCalendarView { public render() { const { values, onNextPageBtnClick, onPrevPageBtnClick, onValueClick, hasNextPage, hasPrevPage, onHeaderClick, disabledItemIndexes, activeItemIndex, hoveredItemIndex, onCellHover, onMount, inline, localization, ...rest } = this.props; const headerTitle = `${first(values)} - ${last(values)}`; return ( this.calendarNode = findHTMLElement(e)} outlineOnFocus={inline} {...rest}>
); } } export default YearView;