/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ import React from 'react'; import { ViewProps } from 'react-native'; import { EvaProp, StyleType } from '../../theme'; import { CalendarPickerCellProps } from './components/picker/calendarPickerCell.component'; import { CalendarDateInfo, CalendarViewMode, CalendarViewModeId } from './type'; import { DateService } from './service/date.service'; import { CalendarDataService, DateBatch } from './service/calendarData.service'; export interface BaseCalendarProps extends ViewProps { min?: D; max?: D; dateService?: DateService; boundingMonth?: boolean; startView?: CalendarViewMode; title?: (date: D, viewMode: CalendarViewMode) => string; filter?: (date: D) => boolean; renderFooter?: () => React.ReactElement; renderDay?: (info: CalendarDateInfo, style: StyleType) => React.ReactElement; renderMonth?: (info: CalendarDateInfo, style: StyleType) => React.ReactElement; renderYear?: (info: CalendarDateInfo, style: StyleType) => React.ReactElement; onVisibleDateChange?: (date: D, viewModeId: CalendarViewModeId) => void; eva?: EvaProp; } export declare type BaseCalendarElement = React.ReactElement>; interface State { viewMode: CalendarViewMode; visibleDate: D; } export declare abstract class BaseCalendarComponent extends React.Component & P, State> { static defaultProps: Partial; state: State; protected dataService: CalendarDataService; protected get dateService(): DateService; private get min(); private get max(); scrollToToday: () => void; getCalendarStyle: (source: Record) => { container: { width: any; paddingVertical: any; borderColor: any; borderWidth: any; borderRadius: any; }; headerContainer: { paddingHorizontal: any; paddingVertical: any; }; title: { fontSize: any; fontWeight: any; color: any; fontFamily: any; }; icon: { width: any; height: any; tintColor: any; }; divider: { marginVertical: any; }; daysHeaderContainer: { marginHorizontal: any; }; row: { minHeight: any; marginHorizontal: any; }; }; isDayDisabled: ({ date }: CalendarDateInfo) => boolean; isDayToday: ({ date }: CalendarDateInfo) => boolean; protected abstract createDates(date: D): DateBatch; protected abstract selectedDate(): D; protected abstract onDateSelect(item: D): void; protected abstract isDateSelected(date: D): boolean; protected abstract shouldUpdateDate(props: CalendarPickerCellProps, nextProps: CalendarPickerCellProps): boolean; private onDaySelect; private onMonthSelect; private onYearSelect; private onPickerNavigationPress; private onHeaderNavigationLeftPress; private onHeaderNavigationRightPress; private getWeekdayStyle; private isDaySelected; private isMonthSelected; private isYearSelected; private isMonthDisabled; private isYearDisabled; private isMonthToday; private isYearToday; private isHeaderNavigationAllowed; private createViewModeVisibleDate; private createViewModeHeaderTitle; private renderDayIfNeeded; private renderWeekdayElement; private renderDayElement; private renderMonthElement; private renderYearElement; private renderDayPickerElement; private renderMonthPickerElement; private renderYearPickerElement; private renderPickerElement; private renderFooterElement; private renderHeaderElement; render(): React.ReactElement; } export {};