@uplink-protocol/calendar-controller
Version:
Flexible calendar API supporting both calendar and date-picker integrations for any JavaScript framework or library
32 lines (31 loc) • 1.67 kB
TypeScript
import { ICalendarService, IDateFormattingService, ILocalizationService, CalendarOptions, CalendarMonth, CalendarYear, CalendarDate, IInitializationService, IConfigurationService } from '../interfaces';
import { Binding } from '@uplink-protocol/core';
/**
* Implementation of InitializationService
* Responsible for setting up and initializing calendar components
*/
export declare class InitializationService implements IInitializationService {
/**
* Initialize view state bindings and initial values
*/
initializeBindings(currentDate: Date, selectedDate: Date | null, selectedDateRange: {
startDate: Date | null;
endDate: Date | null;
}, firstDayOfWeek: number, isRangeSelection: boolean, calendarDaysGenerator: () => CalendarDate[], getMonthNameFn: (month: number) => string, getWeekdayNamesFn: (firstDayOfWeek: number) => string[], generateCalendarMonthsFn: () => CalendarMonth[], generateCalendarYearsFn: () => CalendarYear[]): Record<string, Binding<any>>;
/**
* Apply calendar configuration options
*/
applyConfiguration(options: CalendarOptions | undefined, locale: string, calendarService: ICalendarService, dateFormattingService: IDateFormattingService, localizationService: ILocalizationService): {
locale: string;
minDate: Date | null;
maxDate: Date | null;
disabledDates: Date[];
selectedDate: Date | null;
firstDayOfWeek: number;
dateFormat: string | null;
hideOtherMonthDays: boolean;
isRangeSelection: boolean;
localizationService: ILocalizationService;
configurationService: IConfigurationService;
};
}