@abbl/material-calendar
Version:
Calendar component build with React and Material-UI
44 lines (43 loc) • 1.3 kB
TypeScript
import { EventStorage } from '../../../common/api/EventStorage';
/**
* Class used to prefill days in instance of EventStorage interface
* with empty arrays.
*
* @remarks
* Take a note that preFillStorage method only works for date
* ranges that are defined in EventStoragePresenceHelper class.
*
* @internal
*/
export default class EventStorageFiller {
/**
* Fills closest date range with empty arrays.
*
* @param from
* @param till
* @param eventStorage instance of EventStorage interface.
*/
static preFillStorage(from: Date, till: Date, eventStorage: EventStorage): EventStorage;
/**
* Fills a single day with empty array.
*
* @param dayDate day that will be filled with empty array.
* @param eventStorage instance of EventStorage interface.
*/
private static fillDay;
/**
* Fills days in week with empty array.
*
* @param weekDay any day of target week.
* @param eventStorage instance of EventStorage interface.
*/
private static fillWeek;
/**
* Fills days in month with empty array.
*
* @param monthDay any day of target month
* @param eventStorage instance of EventStorage interface.
*/
private static fillMonth;
private static fillYear;
}