UNPKG

nativescript-ui-calendar

Version:

Month, year, week and day views. Single, multiple and range date Selection. Special and disabled dates.

244 lines (243 loc) 15 kB
import { Color } from '@nativescript/core'; import * as commonModule from './common'; export * from './common'; export declare class CalendarEvent extends commonModule.CalendarEvent { private _ios; get ios(): TKCalendarEvent; protected _setIsAllDay(value: boolean): void; protected _getIsAllDay(): boolean; protected _setEndDate(date: Date): void; protected _getEndDate(): Date; protected _setStartDate(date: Date): void; protected _getStartDate(): Date; protected _setTitle(value: string): void; protected _getTitle(): string; protected _setEventColor(value: Color): void; protected _getEventColor(): Color; } export declare class CellStyleInitializer { onCellBorderWidthChanged(oldValue: number, newValue: number, style: CellStyle | commonModule.CellStyle): void; onCellBorderColorChanged(oldValue: Color, newValue: Color, style: CellStyle | commonModule.CellStyle): void; onCellBackgroundColorChanged(oldValue: Color, newValue: Color, style: CellStyle | commonModule.CellStyle): void; onCellAlignmentChanged(oldValue: commonModule.CalendarCellAlignment, newValue: commonModule.CalendarCellAlignment, style: any): void; onCellPaddingHorizontalChanged(oldValue: number, newValue: number, style: any): void; onCellPaddingVerticalChanged(oldValue: number, newValue: number, style: any): void; onCellTextColorChanged(oldValue: Color, newValue: Color, style: CellStyle | commonModule.CellStyle): void; onCellTextFontNameChanged(oldValue: string, newValue: string, style: CellStyle | commonModule.CellStyle): void; onCellTextFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle, style: CellStyle | commonModule.CellStyle): void; onCellTextSizeChanged(oldValue: number, newValue: number, style: CellStyle | commonModule.CellStyle): void; } export declare class CellStyle extends commonModule.CellStyle { private _initializer; get initializer(): CellStyleInitializer; private _ios; get ios(): TKCalendarCellStyle; constructor(); protected onCellBorderWidthChanged(oldValue: number, newValue: number): void; protected onCellBorderColorChanged(oldValue: Color, newValue: Color): void; protected onCellBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onCellTextColorChanged(oldValue: Color, newValue: Color): void; protected onCellTextFontNameChanged(oldValue: string, newValue: string): void; protected onCellTextFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onCellTextSizeChanged(oldValue: number, newValue: number): void; protected onCellPaddingHorizontalChanged(oldValue: number, newValue: number): void; protected onCellPaddingVerticalChanged(oldValue: number, newValue: number): void; protected onCellAlignmentChanged(oldValue: commonModule.CalendarCellAlignment, newValue: commonModule.CalendarCellAlignment): void; } export declare class DayEventsViewStyle extends commonModule.DayEventsViewStyle { private _owner; set owner(value: RadCalendar); updateNativePresenter(): void; protected onBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onTimeLabelTextColorChanged(oldValue: Color, newValue: Color): void; protected onTimeLabelTextSizeChanged(oldValue: number, newValue: number): void; protected onTimeLabelFormatChanged(oldValue: string, newValue: string): void; } export declare class AllDayEventsViewStyle extends commonModule.AllDayEventsViewStyle { private _owner; set owner(value: RadCalendar); updateNativePresenter(): void; protected onBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onAllDayTextChanged(oldValue: string, newValue: string): void; protected onAllDayTextIsVisibleChanged(oldValue: boolean, newValue: boolean): void; } export declare class DayCellStyle extends commonModule.DayCellStyle { private _initializer; get initializer(): CellStyleInitializer; private _ios; get ios(): TKCalendarDayCellStyle; constructor(); protected onCellBorderWidthChanged(oldValue: number, newValue: number): void; protected onCellBorderColorChanged(oldValue: Color, newValue: Color): void; protected onCellBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onCellTextColorChanged(oldValue: Color, newValue: Color): void; protected onCellTextFontNameChanged(oldValue: string, newValue: string): void; protected onCellTextFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onCellTextSizeChanged(oldValue: number, newValue: number): void; protected onCellPaddingHorizontalChanged(oldValue: number, newValue: number): void; protected onCellPaddingVerticalChanged(oldValue: number, newValue: number): void; protected onCellAlignmentChanged(oldValue: commonModule.CalendarCellAlignment, newValue: commonModule.CalendarCellAlignment): void; protected onShowEventsTextChanged(oldValue: boolean, newValue: boolean): void; protected onEventTextColorChanged(oldValue: Color, newValue: Color): void; protected onEventFontNameChanged(oldValue: string, newValue: string): void; protected onEventFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onEventTextSizeChanged(oldValue: number, newValue: number): void; } /** * Cell style class for months in year view mode */ export declare class MonthCellStyle extends commonModule.MonthCellStyle { protected _owner: RadCalendar; set owner(value: RadCalendar); updateNativePresenter(): void; protected onWeekendTextColorChanged(oldValue: Color, newValue: Color): void; protected onTodayTextColorChanged(oldValue: Color, newValue: Color): void; protected onDayTextColorChanged(oldValue: Color, newValue: Color): void; protected onDayFontNameChanged(oldValue: string, newValue: string): void; protected onDayFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onDayTextSizeChanged(oldValue: number, newValue: number): void; protected onDayNameTextColorChanged(oldValue: Color, newValue: Color): void; protected onDayNameFontNameChanged(oldValue: string, newValue: string): void; protected onDayNameFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onDayNameTextSizeChanged(oldValue: number, newValue: number): void; protected onMonthNameTextColorChanged(oldValue: Color, newValue: Color): void; protected onMonthNameFontNameChanged(oldValue: string, newValue: string): void; protected onMonthNameFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onMonthNameTextSizeChanged(oldValue: number, newValue: number): void; } /** * Cell style class for inline events cells in month view * property values are used by TKCalendarMonthPresenterDelegateImplementation delegate that's why we don't need extra actions for update */ export declare class InlineEventCellStyle extends commonModule.InlineEventCellStyle { protected onCellBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onEventTextColorChanged(oldValue: Color, newValue: Color): void; protected onEventFontNameChanged(oldValue: string, newValue: string): void; protected onEventFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onEventTextSizeChanged(oldValue: number, newValue: number): void; protected onTimeTextColorChanged(oldValue: Color, newValue: Color): void; protected onTimeFontNameChanged(oldValue: string, newValue: string): void; protected onTimeFontStyleChanged(oldValue: commonModule.CalendarFontStyle, newValue: commonModule.CalendarFontStyle): void; protected onTimeTextSizeChanged(oldValue: number, newValue: number): void; } /** * Class for month view style */ export declare class CalendarMonthViewStyle extends commonModule.CalendarMonthViewStyle { protected _owner: RadCalendar; set owner(value: RadCalendar); updateViewStyles(forceUpdate?: boolean): void; protected updateNativeOwner(): void; protected updateOwner(): void; protected onSelectionShapeChanged(oldValue: commonModule.CalendarSelectionShape, newValue: commonModule.CalendarSelectionShape): void; protected onSelectionShapeSizeChanged(oldValue: number, newValue: number): void; protected onSelectionShapeColorChanged(oldValue: Color, newValue: Color): void; protected onShowWeekNumbersChanged(oldValue: boolean, newValue: boolean): void; protected onShowTitleChanged(oldValue: boolean, newValue: boolean): void; protected onShowDayNamesChanged(oldValue: boolean, newValue: boolean): void; protected onBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onDayCellStyleChanged(oldValue: DayCellStyle, newValue: DayCellStyle): void; protected onSelectedDayCellStyleChanged(oldValue: DayCellStyle, newValue: DayCellStyle): void; protected onTodayCellStyleChanged(oldValue: DayCellStyle, newValue: DayCellStyle): void; protected onWeekNumberCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onWeekendCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onDayNameCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onTitleCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onInlineEventCellStyleChanged(oldValue: InlineEventCellStyle, newValue: InlineEventCellStyle): void; } /** * The style class for week mode. * NOTE: we should consider if we need an explicit class that is the same as the base one */ export declare class CalendarWeekViewStyle extends CalendarMonthViewStyle { protected updateNativeOwner(): void; } /** * The style class for day mode. */ export declare class CalendarDayViewStyle extends commonModule.CalendarDayViewStyle { protected _owner: RadCalendar; set owner(value: RadCalendar); protected updateNativeOwner(): void; updateViewStyles(forceUpdate?: boolean): void; protected updateOwner(): void; protected onShowWeekNumbersChanged(oldValue: boolean, newValue: boolean): void; protected onShowTitleChanged(oldValue: boolean, newValue: boolean): void; protected onShowDayNamesChanged(oldValue: boolean, newValue: boolean): void; protected onBackgroundColorChanged(oldValue: Color, newValue: Color): void; protected onTitleCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onDayEventsViewStyleChanged(oldValue: DayEventsViewStyle, newValue: DayEventsViewStyle): void; protected onAllDayEventsViewStyleChanged(oldValue: AllDayEventsViewStyle, newValue: AllDayEventsViewStyle): void; protected onShowWeekChanged(oldValue: boolean, newValue: boolean): void; private changeShowWeek; } /** * The style class for month name view mode. * NOTE: we should consider if we need an explicit class that is the same as the base one */ export declare class CalendarMonthNamesViewStyle extends commonModule.CalendarMonthNamesViewStyle { constructor(); protected _owner: RadCalendar; set owner(value: RadCalendar); updateViewStyles(forceUpdate?: boolean): void; protected updateOwner(): void; protected onTitleCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onMonthNameCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; } /** * The year mode style class */ export declare class CalendarYearViewStyle extends commonModule.CalendarYearViewStyle { constructor(); protected _owner: RadCalendar; set owner(value: RadCalendar); updateViewStyles(forceUpdate?: boolean): void; protected updateOwner(): void; protected onTitleCellStyleChanged(oldValue: CellStyle, newValue: CellStyle): void; protected onMonthCellStyleChanged(oldValue: MonthCellStyle, newValue: MonthCellStyle): void; } export declare class RadCalendar extends commonModule.RadCalendar { private _ios; private _dayViewDelegate; private _nativeDelegate; private _nativePresenterDelegate; private _dataSource; _forbidDateSelection: boolean; private _calendarLoaded; private _currentCalendar; private _dateComponents; get _nativeView(): TKCalendar; constructor(); createNativeView(): TKCalendar; onLoaded(): void; onUnloaded(): void; updateCalendar(): void; protected onLocalePropertyChanged(oldValue: string, newValue: string): void; private setNativeLocale; protected onDisplayedDateChanged(oldValue: Date, newValue: Date): void; protected getDisplayedDate(): Date; protected onSelectionModeChanged(oldValue: commonModule.CalendarSelectionMode, newValue: commonModule.CalendarSelectionMode): void; protected onTransitionModeChanged(oldValue: commonModule.CalendarTransitionMode, newValue: commonModule.CalendarTransitionMode): void; protected onViewModeChanged(oldValue: commonModule.CalendarViewMode, newValue: commonModule.CalendarViewMode): void; protected onEventsViewModeChanged(oldValue: commonModule.CalendarEventsViewMode, newValue: commonModule.CalendarEventsViewMode): void; protected onSelectedDateRangeChanged(oldValue: commonModule.DateRange, newValue: commonModule.DateRange): void; protected onSelectedDatesChanged(oldValue: any, newValue: any): void; protected onSelectedDateChanged(oldValue: Date, newValue: Date): void; protected onMaxDateChanged(oldValue: Date, newValue: Date): void; protected onMinDateChanged(oldValue: Date, newValue: Date): void; updateEventSource(): void; protected onHorizontalTransitionChanged(oldValue: boolean, newValue: boolean): void; protected onMonthViewStyleChanged(oldValue: commonModule.CalendarMonthViewStyle, newValue: commonModule.CalendarMonthViewStyle): void; protected onMonthNamesViewStyleChanged(oldValue: commonModule.CalendarMonthNamesViewStyle, newValue: commonModule.CalendarMonthNamesViewStyle): void; protected onWeekViewStyleChanged(oldValue: commonModule.CalendarWeekViewStyle, newValue: commonModule.CalendarWeekViewStyle): void; protected onDayViewStyleChanged(oldValue: commonModule.CalendarDayViewStyle, newValue: commonModule.CalendarDayViewStyle): void; protected onYearViewStyleChanged(oldValue: CalendarYearViewStyle, newValue: CalendarYearViewStyle): void; private loadNativeDisplayedDate; dateWithoutHours(originalDate: Date): Date; reload(): void; clearSelection(): void; navigateForward(): void; navigateBack(): void; goToDate(date: Date): void; getEventsForDate(date: Date): Array<CalendarEvent>; }