@uplink-protocol/calendar-controller
Version:
Flexible calendar and time picker API supporting both calendar, date-picker, and time-picker integrations for any JavaScript framework or library
77 lines (76 loc) • 3.92 kB
TypeScript
import { INavigationService, YearRange } from "../interfaces";
import { CalendarStateManager } from "./state-manager";
import { BindingsCoordinator } from "./bindings-coordinator";
import { CalendarControllerBindings, CalendarControllerEvents } from "../types";
import { ICalendarService } from "../interfaces";
import { IEventManagerService } from "../interfaces";
/**
* NavigationCoordinator - Handles all navigation-related operations
* Manages navigation between months, years, and dates
*/
export declare class NavigationCoordinator {
private navigationService;
private stateManager;
private bindingsCoordinator;
constructor(navigationService: INavigationService, stateManager: CalendarStateManager, bindingsCoordinator: BindingsCoordinator);
/**
* Navigate to a specific month
*/
goToMonth(month: number, year: number, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to a specific year
*/
goToYear(year: number, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to a specific date
*/
goToDate(date: Date, minDate: Date | null, maxDate: Date | null, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to next month
*/
goToNextMonth(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to previous month
*/
goToPreviousMonth(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to next year
*/
goToNextYear(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to previous year
*/
goToPreviousYear(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to today's date
*/
goToToday(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Navigate to next year range
*/
goToNextYearRange(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, eventManagerService: IEventManagerService): void;
/**
* Navigate to previous year range
*/
goToPreviousYearRange(bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, eventManagerService: IEventManagerService): void;
/**
* Get current year range
*/
getCurrentYearRange(): YearRange;
/**
* Set current year range based on date
*/
setCurrentYearRange(date: Date, bindings: CalendarControllerBindings, getters: any): void;
/**
* Set year range size
*/
setYearRangeSize(size: number, bindings: CalendarControllerBindings, getters: any): void;
/**
* Get year range base for a given date
*/
private getYearRangeBase;
/**
* Update current date and related bindings
*/
updateCurrentDate(date: Date, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
}