import type { CalendarEvent } from "../utils/event"; export type Views = 'month' | 'week' | 'day' | 'monthly-repeated-task' | 'weekly-repeated-task' | 'resource'; /** * `CalenderOptiopn` * - `container` This field represents the HTML container element where the calendar will be rendered. It is a required property and should be a valid DOM element that acts as the root container for the calendar. * - `styleUrl` An optional field that allows you to specify a URL for an external CSS stylesheet to style the calendar. If provided, the stylesheet at the URL will be used to apply custom styles to the calendar. * - `events` An optional array of events that the calendar will display. Each event should follow the structure defined by the `CalendarEvent` type. This allows you to provide a list of events that can be displayed on specific dates within the calendar. * - `startOfWeek` An optional field that defines the starting day of the week. It is represented as a number, where `0` typically corresponds to Sunday, `1` to Monday, and so on. If not provided, the default starting day will be used. * - `weekHeaderFormat` This optional field specifies the format in which the names of the days of the week should be displayed. You can choose between: * > - `EEEEE` A single character for the day (e.g., "M" for Monday). * > - `EEEE` The full name of the day (e.g., "Monday"). _`(Default)`_ * > - `EEE` A shortened version of the day name (e.g., "Mon"). */ export interface CalenderOptiopn { container: HTMLElement; styleUrl?: string; events?: Array; startOfWeek?: number; weekDaysFormat?: string; view?: Views; apikey?: string; viewDate?: string | Date; localization?: string; dayView?: { hourSegment?: number; hourSegmentRange?: boolean | { start: string | Date; end: string | Date; }; segmentHeight?: number; dragTolarance?: number; resizeTolarance?: number; }; weekView?: { hourSegment?: number; hourSegmentRange?: boolean | { start: string; end: string; }; segmentHeight?: number; dragTolarance?: number; resizeTolarance?: number; }; hideHeader?: boolean; document?: Document; dayOffOnWeekDays?: Array; exCludeDayOffOnWeekDays?: Array; customHTML?: { setHeader?: () => string | HTMLElement | Element; headerElement?: { ordering?: Array<'prev' | 'next' | 'title'>; nextButton?: string; previousButton?: string; viewButtons?: { dayView?: string; monthView?: string; weekView?: string; monthlyTaskView?: string; weeklyTaskView?: string; }; }; }; extraClass?: { header?: Array | string; title?: Array | string; nextButton?: Array | string; previousButton?: Array | string; viewButtons?: { dayView?: Array | string; monthView?: Array | string; weekView?: Array | string; monthlyTaskView?: Array | string; weeklyTaskView?: Array | string; }; }; } export interface CalenderOptiopnRepeatedTask extends CalenderOptiopn { task: Array; } export interface CalendarDay { date: Date; day: string; isToday?: boolean; isInThisMonth?: boolean; isPast?: boolean; events: Array; selected: boolean; emptyBlocks?: Array; } /** * @param id this is test description * @param uuid this is test description * @param title this is test description * @param description this is test description * @param start this is test description * @param end this is test description * @param extra this is test description * @param removeable this is test description * @param editable this is test description * @param isAllDay this is test description * @param duration this is test description * @param overlapCount this is test description * @param continueToNextWeek this is test description * @param recurring this is test description * @param right this is test description * @param color this is test description */ export interface IEvent { id?: string; uuid?: string; title: string; description?: string; start: Date | string; end?: Date | string; extra?: object; removeable?: boolean; editable?: boolean; isAllDay?: boolean; duration?: number; overlapCount?: number; recurring?: false | eRecurring; continueToNextWeek?: boolean; right?: number; color?: string; isVisible?: boolean; offsetTop?: number; draggable?: boolean; } export interface eRecurring { startTime: string; frequency: 'daily' | 'weekly' | 'monthly' | 'annually'; interval?: number; endTime?: string; isAllDay?: boolean; daysOfWeek?: Array; excludeOfDay?: Array; daysOfMonth?: Array; endDate?: Date | string; date?: Date | string; startDate?: Date | string; } export interface IRepeatedTask { container: HTMLElement; date: Date; methods: { [key: string]: Function[]; }; task: Array; } export interface DayCategoryEvent { start: Date | string; end?: string | Date; reason?: string; sandwichAplyed?: boolean; expectedStart?: Date; } export interface TaskInterface { name: string; title: string; enable: boolean; icon: string; start?: string; end?: string; graceTime?: number; warningIfLate?: number; alertIfLate?: number; color?: string; warningColor?: string; alertColor?: string; notifyOnLate?: string; notifyOnAbsence?: string; forceOverride?: boolean; disablePastDate?: boolean; disableFutureDate?: boolean; data?: Array; currentMonthData?: Array<{ start: Date | string; end?: string | Date; reason?: string; }>; currentDayData?: { start: Date | string; end?: string | Date; reason?: string; }; autoPopulateData?: boolean; stats?: { show: boolean; valueUint: 'day' | 'hours'; values?: Array; }; } export interface IView { container: HTMLElement; _setCalender: Function; events: Array; changeViewMode: Function; date: Date; methods: { [key: string]: Function[]; }; } export type iMethods = 'delete-event' | 'update-event' | 'add-event' | 'day-click' | 'hour-segment-click' | 'event-click' | 'next' | 'previous' | 'viewmode-change';