/// <reference types="jquery" />
import { CalendarComponent, CalendarEventMap, CalendarListComponent, CalendarModel, CalendarModesMenu, DateRange, EnumObject, EventHandler, GroupBox, InitModelOf, JsonDateRange, KeyStrokeContext, Menu, Point, PropertyChangeEvent, RoundingMode, ViewportScroller, Widget, YearPanel, YearPanelDateSelectEvent } from '../index';
export type CalendarDisplayMode = EnumObject<typeof Calendar.DisplayMode>;
export type CalendarMenuTypes = EnumObject<typeof Calendar.MenuTypes>;
export type CalendarDirection = EnumObject<typeof Calendar.Direction>;
export type CalendarMoveData = {
    event?: JQuery.MouseEventBase;
    cancel?: () => void;
    cancelled?: boolean;
    unitX?: number;
    unitY?: number;
    logicalX?: number;
    logicalY?: number;
    mode?: string;
    moving?: boolean;
    component?: CalendarComponent;
    containerOffset?: JQuery.Coordinates;
    containerScrollPosition?: Point;
    distance?: Point;
    startCursorPosition?: Point;
    currentCursorPosition?: Point;
    viewportScroller?: ViewportScroller;
    rafId?: number;
    onMove?: (event: JQuery.MouseMoveEvent) => void;
    onUp?: (event: JQuery.MouseUpEvent) => void;
};
export declare class Calendar extends Widget implements CalendarModel {
    model: CalendarModel;
    eventMap: CalendarEventMap;
    self: Calendar;
    monthViewNumberOfWeeks: number;
    numberOfHourDivisions: number;
    widthPerDivision: number;
    heightPerDivision: number;
    startHour: number;
    heightPerHour: number;
    heightPerDay: number;
    spaceBeforeScrollTop: number;
    workDayIndices: number[];
    displayCondensed: boolean;
    displayMode: CalendarDisplayMode;
    components: CalendarComponent[];
    selectedComponent: CalendarComponent;
    loadInProgress: boolean;
    selectedDate: Date;
    selectorStart: Date;
    selectorEnd: Date;
    showDisplayModeSelection: boolean;
    rangeSelectionAllowed: boolean;
    title: string;
    useOverflowCells: boolean;
    viewRange: DateRange;
    calendarToggleListWidth: number;
    calendarToggleYearWidth: number;
    menuInjectionTarget: GroupBox;
    modesMenu: CalendarModesMenu;
    menus: Menu[];
    yearPanel: YearPanel;
    selectedRange: DateRange;
    needsScrollToStartHour: boolean;
    $header: JQuery;
    $range: JQuery;
    $commands: JQuery;
    $grids: JQuery;
    $grid: JQuery;
    $topGrid: JQuery;
    $list: JQuery;
    $listContainer: JQuery;
    $listTitle: JQuery;
    $progress: JQuery;
    $headerRow1: JQuery;
    $headerRow2: JQuery;
    $title: JQuery;
    $select: JQuery;
    $window: JQuery<Window>;
    /** additional modes; should be stored in model */
    protected _showYearPanel: boolean;
    protected _showListPanel: boolean;
    /**
     * The narrow view range is different from the regular view range.
     * It contains only dates that exactly match the requested dates,
     * the regular view range contains also dates from the first and
     * next month. The exact range is not sent to the server.
     */
    protected _exactRange: DateRange;
    /**
     * When the list panel is shown, this list contains the scout.CalenderListComponent
     * items visible on the list.
     */
    protected _listComponents: CalendarListComponent[];
    protected _menuInjectionTargetMenusChangedHandler: EventHandler<PropertyChangeEvent<Menu[], GroupBox>>;
    /**
     * Temporary data structure to store data while mouse actions are handled
     * @internal
     */
    _moveData: CalendarMoveData;
    /** @internal */
    _rangeSelectionStarted: boolean;
    protected _mouseMoveHandler: (event: JQuery.MouseMoveEvent) => void;
    protected _mouseUpHandler: (event: JQuery.MouseUpEvent) => void;
    protected _mouseMoveRangeSelectionHandler: (event: JQuery.MouseMoveEvent) => void;
    protected _mouseUpRangeSelectionHandler: (event: JQuery.MouseUpEvent) => void;
    constructor();
    init(model: InitModelOf<this>): void;
    /**
     * Enum providing display-modes for calender-like components like calendar and planner.
     * @see ICalendarDisplayMode.java
     */
    static DisplayMode: {
        readonly DAY: 1;
        readonly WEEK: 2;
        readonly MONTH: 3;
        readonly WORK_WEEK: 4;
    };
    /**
     * Used as a multiplier in date calculations back- and forward (in time).
     */
    static Direction: {
        readonly BACKWARD: -1;
        readonly FORWARD: 1;
    };
    static MenuTypes: {
        readonly EmptySpace: "Calendar.EmptySpace";
        readonly CalendarComponent: "Calendar.CalendarComponent";
    };
    isDay(): boolean;
    isWeek(): boolean;
    isMonth(): boolean;
    isWorkWeek(): boolean;
    protected _createKeyStrokeContext(): KeyStrokeContext;
    protected _init(model: InitModelOf<this>): void;
    setSelectedDate(date: Date | string): void;
    protected _setSelectedDate(date: Date | string): void;
    protected _renderSelectedDate(): void;
    setDisplayMode(displayMode: CalendarDisplayMode): void;
    protected _setDisplayMode(displayMode: CalendarDisplayMode): void;
    protected _renderDisplayMode(oldDisplayMode?: CalendarDisplayMode): void;
    protected _setViewRange(viewRange: DateRange | JsonDateRange): void;
    protected _setRangeSelectionAllowed(rangeSelectionAllowed: boolean): void;
    protected _setSelectedRange(range: DateRange | JsonDateRange): void;
    protected _setMenus(menus: Menu[]): void;
    protected _setMenuInjectionTarget(menuInjectionTarget: GroupBox | string): void;
    protected _checkMenuInjectionTarget(menuInjectionTarget: GroupBox): boolean;
    protected _removeInjectedMenus(menuInjectionTarget: GroupBox, injectedMenus: Menu[]): Menu[];
    protected _render(): void;
    protected _renderProperties(): void;
    protected _renderComponents(): void;
    protected _renderSelectedComponent(): void;
    protected _renderLoadInProgress(): void;
    updateScrollPosition(animate: boolean): void;
    protected _updateScrollPosition(scrollToInitialTime: boolean, animate: boolean): void;
    protected _scrollToSelectedComponent(animate: boolean): void;
    protected _scrollToInitialTime(animate: boolean): void;
    /** @internal */
    _onPreviousClick(): void;
    /** @internal */
    _onNextClick(): void;
    protected _dateParts(date: Date, modulo?: boolean): {
        year: number;
        month: number;
        date: number;
        day: number;
    };
    protected _navigateDate(direction: CalendarDirection): void;
    protected _calcSelectedDate(direction: CalendarDirection): Date;
    protected _updateModel(animate: boolean): void;
    /**
     * Calculates exact date range of displayed components based on selected-date.
     */
    protected _calcExactRange(): DateRange;
    /**
     * Calculates the view-range, which is what the user sees in the UI.
     * The view-range is wider than the exact-range in the monthly mode,
     * as it contains also dates from the previous and next month.
     */
    protected _calcViewRange(): DateRange;
    protected _onTodayClick(event: JQuery.ClickEvent): void;
    protected _onDisplayModeClick(event: JQuery.ClickEvent): void;
    protected _onYearClick(event: JQuery.ClickEvent): void;
    protected _onListClick(event: JQuery.ClickEvent): void;
    protected _onDayMouseDown(withTime: boolean, event: JQuery.MouseDownEvent): void;
    protected _getSelectedDate(event: JQuery.MouseEventBase): Date;
    protected _getSelectedSeconds(event: JQuery.MouseEventBase): number;
    protected _getSelectedDateTime(event: JQuery.MouseEventBase): Date;
    /**
     * @param selectedComponent may be null when a day is selected
     */
    protected _setSelection(selectedDate: Date, selectedComponent: CalendarComponent, updateScrollPosition: boolean, timeChanged: boolean): void;
    protected _updateScreen(updateTopGrid: boolean, animate: boolean): void;
    layoutSize(animate?: boolean): void;
    protected _afterLayout($parent: JQuery, animate: boolean): void;
    protected _updateWeekdayNames(): void;
    protected _updateScrollbars($parent: JQuery, animate: boolean): void;
    protected _uninstallComponentScrollbars($parent: JQuery): void;
    protected _updateTopGrid(): void;
    protected _updateFullDayIndices(fullDayComponents?: CalendarComponent[]): void;
    layoutYearPanel(): void;
    layoutLabel(): void;
    layoutAxis(): void;
    protected _onYearPanelDateSelect(event: YearPanelDateSelectEvent): void;
    protected _updateListPanel(): void;
    protected _remove(): void;
    /**
     * Renders the panel on the left, showing all components of the selected date.
     */
    protected _renderListPanel(): void;
    /** @internal */
    _selectedComponentChanged(component: CalendarComponent, partDay: Date, updateScrollPosition: boolean): void;
    protected _onDayContextMenu(event: JQuery.ContextMenuEvent): void;
    /** @internal */
    _showContextMenu(event: JQuery.ContextMenuEvent, allowedType: string): void;
    protected _arrangeComponents(): void;
    protected _getComponents($children: JQuery): CalendarComponent[];
    /** @internal */
    _sort(components: CalendarComponent[]): void;
    /**
     * Arrange components (stack width, stack index) per day
     * @internal
     */
    _arrange(components: CalendarComponent[], day: Date): void;
    protected _allEndBefore(columns: CalendarComponent[], pos: number, day: Date): boolean;
    protected _findReplacableColumn(columns: CalendarComponent[], pos: number, day: Date): number;
    protected _endsBefore(component: CalendarComponent, pos: number, day: Date): boolean;
    protected _arrangeComponentSetPlacement($children: JQuery, day: Date): void;
    get$Scrollable(): JQuery;
    protected _onMouseDown(event: JQuery.MouseDownEvent): void;
    protected _onMouseMove(event: JQuery.MouseMoveEvent): void;
    protected _scrollViewportWhileDragging(event: JQuery.MouseMoveEvent): void;
    protected _onMouseUp(event: JQuery.MouseUpEvent): void;
    protected _onComponentMouseDown(event: JQuery.MouseDownEvent, component: CalendarComponent): void;
    protected _onComponentMouseMove(event: JQuery.MouseMoveEvent): void;
    protected _onComponentMouseUp(event: JQuery.MouseUpEvent): void;
    protected _whileComponentMove(): void;
    protected _endComponentMove(): void;
    protected _setComponentLogicalPosition(component: CalendarComponent, logicalPosition: Point): void;
    protected _getCalendarComponentForMouseEvent(event: JQuery.MouseDownEvent): CalendarComponent;
    protected _newMoveData(event: JQuery.MouseDownEvent): CalendarMoveData;
    toLogicalPosition(point: Point, roundingMode?: RoundingMode): Point;
    toLogicalPosition(x: number, y: number, roundingMode?: RoundingMode): Point;
    protected _hourMinuteByDivision(number: number): {
        hour: number;
        minute: number;
    };
    protected _dayPositionByDivision(number: number): number;
    /** @internal */
    _dayPosition(hour: number, minutes: number): number;
    protected _format(date: Date, pattern: string): string;
    protected _sortFromTo(c1: CalendarComponent, c2: CalendarComponent): number;
    protected _startRangeSelection(event: JQuery.MouseDownEvent): void;
    protected _findDayInCalendar(selectedDate: Date): JQuery;
    protected _setRangeSelection(): void;
    protected _removeRangeSelection(): void;
    protected _appendCalendarRangeSelection(date: Date, fromTime: Date, toTime: Date): void;
    protected _getHours(date: Date): number;
    protected _onMouseMoveRangeSelection(event: JQuery.MouseMoveEvent): void;
    protected _onMouseUpRangeSelection(event: JQuery.MouseUpEvent): void;
    protected _updateSelectedRange(): void;
}
//# sourceMappingURL=Calendar.d.ts.map