@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
73 lines (72 loc) • 2.24 kB
TypeScript
import { IConfigurationService } from "../interfaces/configuration.service.interfaces";
import { CalendarOptions } from "../interfaces/calendar.interfaces";
import { IConstraintsService } from "../interfaces/constraints.service.interfaces";
import { IDateFormattingService } from "../interfaces/date-formatting.service.interfaces";
/**
* Implementation of ConfigurationService
* Responsible for managing calendar configuration
*/
export declare class ConfigurationService implements IConfigurationService {
private _constraintsService;
private _dateFormattingService;
private _firstDayOfWeek;
private _dateFormat;
private _hideOtherMonthDays;
private _showWeekNumbers;
private _isRangeSelection;
constructor(_constraintsService: IConstraintsService, _dateFormattingService: IDateFormattingService);
/**
* Apply configuration options
*/ applyConfiguration(options: CalendarOptions): {
minDate: Date | null;
maxDate: Date | null;
disabledDates: Date[];
selectedDate: Date | null;
firstDayOfWeek: number;
dateFormat: string | null;
hideOtherMonthDays: boolean;
showWeekNumbers: boolean;
isRangeSelection: boolean;
locale?: string;
dateFormatOptions?: Intl.DateTimeFormatOptions;
};
/**
* Get first day of week
*/
getFirstDayOfWeek(): number;
/**
* Set first day of week
*/
setFirstDayOfWeek(day: number): number;
/**
* Get date format
*/
getDateFormat(): string | null;
/**
* Set date format
*/
setDateFormat(format: string | null): string | null;
/**
* Get hide other month days setting
*/
getHideOtherMonthDays(): boolean;
/**
* Set hide other month days setting
*/
setHideOtherMonthDays(hide: boolean): boolean; /**
* Get show week numbers setting
*/
getShowWeekNumbers(): boolean;
/**
* Set show week numbers setting
*/
setShowWeekNumbers(show: boolean): boolean;
/**
* Get range selection mode setting
*/
getIsRangeSelection(): boolean;
/**
* Set range selection mode setting
*/
setIsRangeSelection(isRange: boolean): boolean;
}