@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
42 lines (41 loc) • 2.13 kB
TypeScript
import { CalendarStateManager } from "./state-manager";
import { BindingsCoordinator } from "./bindings-coordinator";
import { NavigationCoordinator } from "./navigation-coordinator";
import { CalendarControllerBindings, CalendarControllerEvents } from "../types";
import { ICalendarStateService, IEventManagerService, ICalendarService } from "../interfaces";
/**
* SelectionCoordinator - Handles date selection operations
* Manages single date and range selection logic
*/
export declare class SelectionCoordinator {
private stateManager;
private bindingsCoordinator;
private calendarStateService;
private navigationCoordinator?;
constructor(stateManager: CalendarStateManager, bindingsCoordinator: BindingsCoordinator, calendarStateService: ICalendarStateService);
/**
* Set navigation coordinator (to avoid circular dependency)
*/
setNavigationCoordinator(navigationCoordinator: NavigationCoordinator): void;
/**
* Select a date
*/
selectDate(yearOrDate: number | Date, month: number | undefined, day: number | undefined, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, isDateDisabledFn: (date: Date) => boolean, eventManagerService: IEventManagerService): void;
/**
* Set range selection mode
*/
setRangeSelectionMode(isRange: boolean, bindings: CalendarControllerBindings, getters: any): void;
/**
* Clear current selection
*/
clearSelection(bindings: CalendarControllerBindings, getters: any): void;
/**
* Select month (navigate to month view)
* Delegates to NavigationCoordinator to avoid duplication
*/
selectMonth(month: number, year: number, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, calendarService: ICalendarService, eventManagerService: IEventManagerService): void;
/**
* Select year (navigate to year view)
*/
selectYear(year: number, bindings: CalendarControllerBindings, events: CalendarControllerEvents, getters: any, navigationService: any, eventManagerService: IEventManagerService): void;
}