@fullcalendar/core
Version:
Provides core functionality, including the Calendar class
1,101 lines (1,072 loc) • 120 kB
TypeScript
// Generated by dts-bundle v0.7.3-fork.1
// Dependencies for this module:
// ../../../../../@fullcalendar/core
declare module '@fullcalendar/core' {
export const version = "<%= version %>";
export { OptionsInput } from '@fullcalendar/core/types/input-types';
export { EventInput, EventDef, EventDefHash, EventInstance, EventInstanceHash, parseEventDef, createEventInstance, EventTuple } from '@fullcalendar/core/structs/event';
export { BusinessHoursInput, parseBusinessHours } from '@fullcalendar/core/structs/business-hours';
export { applyAll, debounce, padStart, isInt, capitaliseFirstLetter, parseFieldSpecs, compareByFieldSpecs, compareByFieldSpec, flexibleCompare, computeVisibleDayRange, refineProps, matchCellWidths, uncompensateScroll, compensateScroll, subtractInnerElHeight, isMultiDayRange, distributeHeight, undistributeHeight, preventSelection, allowSelection, preventContextMenu, allowContextMenu, compareNumbers, enableCursor, disableCursor, diffDates } from '@fullcalendar/core/util/misc';
export { htmlEscape, cssToStr } from '@fullcalendar/core/util/html';
export { removeExact, isArraysEqual } from '@fullcalendar/core/util/array';
export { memoize, memoizeOutput } from '@fullcalendar/core/util/memoize';
export { memoizeRendering, MemoizedRendering } from '@fullcalendar/core/component/memoized-rendering';
export { intersectRects, Rect, pointInsideRect, constrainPoint, getRectCenter, diffPoints, Point, translateRect } from '@fullcalendar/core/util/geom';
export { mapHash, filterHash, isPropsEqual } from '@fullcalendar/core/util/object';
export { findElements, findChildren, htmlToElement, createElement, insertAfterElement, prependToElement, removeElement, appendToElement, applyStyle, applyStyleProp, elementMatches, elementClosest, forceClassName } from '@fullcalendar/core/util/dom-manip';
export { EventStore, filterEventStoreDefs, createEmptyEventStore, mergeEventStores, getRelevantEvents, eventTupleToStore } from '@fullcalendar/core/structs/event-store';
export { EventUiHash, EventUi, processScopedUiProps, combineEventUis } from '@fullcalendar/core/component/event-ui';
export { default as Splitter, SplittableProps } from '@fullcalendar/core/component/event-splitting';
export { buildGotoAnchorHtml, getAllDayHtml, getDayClasses } from '@fullcalendar/core/component/date-rendering';
export { preventDefault, listenBySelector, whenTransitionDone } from '@fullcalendar/core/util/dom-event';
export { computeInnerRect, computeEdges, computeHeightAndMargins, getClippingParents, computeClippingRect, computeRect } from '@fullcalendar/core/util/dom-geom';
export { unpromisify } from '@fullcalendar/core/util/promise';
export { default as EmitterMixin, EmitterInterface } from '@fullcalendar/core/common/EmitterMixin';
export { DateRange, rangeContainsMarker, intersectRanges, rangesEqual, rangesIntersect, rangeContainsRange } from '@fullcalendar/core/datelib/date-range';
export { default as Mixin } from '@fullcalendar/core/common/Mixin';
export { default as PositionCache } from '@fullcalendar/core/common/PositionCache';
export { default as ScrollComponent, ScrollbarWidths } from '@fullcalendar/core/common/ScrollComponent';
export { ScrollController, ElementScrollController, WindowScrollController } from '@fullcalendar/core/common/scroll-controller';
export { default as Theme } from '@fullcalendar/core/theme/Theme';
export { default as Component, ComponentContext } from '@fullcalendar/core/component/Component';
export { default as DateComponent, Seg, EventSegUiInteractionState } from '@fullcalendar/core/component/DateComponent';
export { default as Calendar, DatePointTransform, DateSpanTransform, DateSelectionApi } from '@fullcalendar/core/Calendar';
export { default as View, ViewProps } from '@fullcalendar/core/View';
export { default as FgEventRenderer, buildSegCompareObj } from '@fullcalendar/core/component/renderers/FgEventRenderer';
export { default as FillRenderer } from '@fullcalendar/core/component/renderers/FillRenderer';
export { default as DateProfileGenerator, DateProfile } from '@fullcalendar/core/DateProfileGenerator';
export { ViewDef } from '@fullcalendar/core/structs/view-def';
export { ViewSpec } from '@fullcalendar/core/structs/view-spec';
export { DateSpan, DateSpanApi, DatePointApi, isDateSpansEqual } from '@fullcalendar/core/structs/date-span';
export { DateMarker, addDays, startOfDay, addMs, addWeeks, diffWeeks, diffWholeWeeks, diffWholeDays, diffDayAndTime, diffDays, isValidDate } from '@fullcalendar/core/datelib/marker';
export { Duration, createDuration, isSingleDay, multiplyDuration, addDurations, asRoughMinutes, asRoughSeconds, asRoughMs, wholeDivideDurations, greatestDurationDenominator } from '@fullcalendar/core/datelib/duration';
export { DateEnv, DateMarkerMeta } from '@fullcalendar/core/datelib/env';
export { DateFormatter, createFormatter, VerboseFormattingArg, formatIsoTimeString } from '@fullcalendar/core/datelib/formatting';
export { NamedTimeZoneImpl } from '@fullcalendar/core/datelib/timezone';
export { parse as parseMarker } from '@fullcalendar/core/datelib/parsing';
export { EventSourceDef, EventSource, EventSourceHash } from '@fullcalendar/core/structs/event-source';
export { Interaction, InteractionSettings, interactionSettingsToStore, interactionSettingsStore, InteractionSettingsStore } from '@fullcalendar/core/interactions/interaction';
export { PointerDragEvent } from '@fullcalendar/core/interactions/pointer';
export { Hit } from '@fullcalendar/core/interactions/hit';
export { dateSelectionJoinTransformer } from '@fullcalendar/core/interactions/date-selecting';
export { eventDragMutationMassager, EventDropTransformers } from '@fullcalendar/core/interactions/event-dragging';
export { EventResizeJoinTransforms } from '@fullcalendar/core/interactions/event-resizing';
export { default as ElementDragging } from '@fullcalendar/core/interactions/ElementDragging';
export { formatDate, formatRange } from '@fullcalendar/core/formatting-api';
export { globalDefaults, config } from '@fullcalendar/core/options';
export { RecurringType, ParsedRecurring } from '@fullcalendar/core/structs/recurring-event';
export { DragMetaInput, DragMeta, parseDragMeta } from '@fullcalendar/core/structs/drag-meta';
export { createPlugin, PluginDef, PluginDefInput, ViewPropsTransformer, ViewContainerModifier } from '@fullcalendar/core/plugin-system';
export { reducerFunc, Action, CalendarState } from '@fullcalendar/core/reducers/types';
export { CalendarComponentProps } from '@fullcalendar/core/CalendarComponent';
export { default as DayHeader } from '@fullcalendar/core/common/DayHeader';
export { computeFallbackHeaderFormat, renderDateCell } from '@fullcalendar/core/common/table-utils';
export { default as DaySeries } from '@fullcalendar/core/common/DaySeries';
export { EventInteractionState } from '@fullcalendar/core/interactions/event-interaction-state';
export { EventRenderRange, sliceEventStore, hasBgRendering, getElSeg, computeEventDraggable, computeEventStartResizable, computeEventEndResizable } from '@fullcalendar/core/component/event-rendering';
export { default as DayTable, DayTableSeg, DayTableCell } from '@fullcalendar/core/common/DayTable';
export { default as Slicer, SlicedProps } from '@fullcalendar/core/common/slicing-utils';
export { EventMutation, applyMutationToEventStore } from '@fullcalendar/core/structs/event-mutation';
export { Constraint, ConstraintInput, AllowFunc, isPropsValid, isInteractionValid } from '@fullcalendar/core/validation';
export { default as EventApi } from '@fullcalendar/core/api/EventApi';
export { default as requestJson } from '@fullcalendar/core/util/requestJson';
}
declare module '@fullcalendar/core/types/input-types' {
import View from '@fullcalendar/core/View';
import { EventSourceInput, EventInputTransformer } from '@fullcalendar/core/structs/event-source';
import { Duration, DurationInput } from '@fullcalendar/core/datelib/duration';
import { DateInput } from '@fullcalendar/core/datelib/env';
import { FormatterInput } from '@fullcalendar/core/datelib/formatting';
import { DateRangeInput } from '@fullcalendar/core/datelib/date-range';
import { BusinessHoursInput } from '@fullcalendar/core/structs/business-hours';
import EventApi from '@fullcalendar/core/api/EventApi';
import { AllowFunc, ConstraintInput, OverlapFunc } from '@fullcalendar/core/validation';
import { PluginDef } from '@fullcalendar/core/plugin-system';
import { LocaleSingularArg, RawLocale } from '@fullcalendar/core/datelib/locale';
export interface ToolbarInput {
left?: string;
center?: string;
right?: string;
}
export interface CustomButtonInput {
text: string;
icon?: string;
themeIcon?: string;
bootstrapFontAwesome?: string;
click(element: HTMLElement): void;
}
export interface ButtonIconsInput {
prev?: string;
next?: string;
prevYear?: string;
nextYear?: string;
}
export interface ButtonTextCompoundInput {
prev?: string;
next?: string;
prevYear?: string;
nextYear?: string;
today?: string;
month?: string;
week?: string;
day?: string;
[viewId: string]: string | undefined;
}
export interface EventSegment {
event: EventApi;
start: Date;
end: Date;
isStart: boolean;
isEnd: boolean;
}
export interface CellInfo {
date: Date;
dayEl: HTMLElement;
moreEl: HTMLElement;
segs: EventSegment[];
hiddenSegs: EventSegment[];
}
export interface DropInfo {
start: Date;
end: Date;
}
export type EventHandlerName = '_init' | 'selectAllow' | 'eventAllow' | 'eventDataTransform' | 'datesRender' | 'datesDestroy' | 'dayRender' | 'windowResize' | 'dateClick' | 'eventClick' | 'eventMouseEnter' | 'eventMouseLeave' | 'select' | 'unselect' | 'loading' | 'eventRender' | 'eventPositioned' | '_eventsPositioned' | 'eventDestroy' | 'eventDragStart' | 'eventDragStop' | 'eventDrop' | '_destroyed' | 'drop' | 'eventResizeStart' | 'eventResizeStop' | 'eventResize' | 'eventReceive' | 'eventLeave' | 'viewSkeletonRender' | 'viewSkeletonDestroy' | '_noEventDrop' | '_noEventResize' | 'eventLimitClick' | 'resourceRender';
export type EventHandlerArgs<T extends EventHandlerName> = Parameters<Extract<OptionsInput[T], (...args: any[]) => any>>;
export type EventHandlerArg<T extends EventHandlerName> = EventHandlerArgs<T>[0];
export interface OptionsInputBase {
header?: boolean | ToolbarInput;
footer?: boolean | ToolbarInput;
customButtons?: {
[name: string]: CustomButtonInput;
};
buttonIcons?: boolean | ButtonIconsInput;
themeSystem?: 'standard' | string;
bootstrapFontAwesome?: boolean | ButtonIconsInput;
firstDay?: number;
dir?: 'ltr' | 'rtl' | 'auto';
weekends?: boolean;
hiddenDays?: number[];
fixedWeekCount?: boolean;
weekNumbers?: boolean;
weekNumbersWithinDays?: boolean;
weekNumberCalculation?: 'local' | 'ISO' | ((m: Date) => number);
businessHours?: BusinessHoursInput;
showNonCurrentDates?: boolean;
height?: number | 'auto' | 'parent' | (() => number);
contentHeight?: number | 'auto' | (() => number);
aspectRatio?: number;
handleWindowResize?: boolean;
windowResizeDelay?: number;
eventLimit?: boolean | number;
eventLimitClick?: 'popover' | 'week' | 'day' | 'timeGridWeek' | 'timeGridDay' | string | ((arg: {
date: Date;
allDay: boolean;
dayEl: HTMLElement;
moreEl: HTMLElement;
segs: any[];
hiddenSegs: any[];
jsEvent: MouseEvent;
view: View;
}) => void);
timeZone?: string | boolean;
now?: DateInput | (() => DateInput);
defaultView?: string;
allDaySlot?: boolean;
allDayText?: string;
slotDuration?: DurationInput;
slotLabelFormat?: FormatterInput;
slotLabelInterval?: DurationInput;
snapDuration?: DurationInput;
scrollTime?: DurationInput;
minTime?: DurationInput;
maxTime?: DurationInput;
slotEventOverlap?: boolean;
listDayFormat?: FormatterInput | boolean;
listDayAltFormat?: FormatterInput | boolean;
noEventsMessage?: string;
defaultDate?: DateInput;
nowIndicator?: boolean;
visibleRange?: ((currentDate: Date) => DateRangeInput) | DateRangeInput;
validRange?: DateRangeInput;
dateIncrement?: DurationInput;
dateAlignment?: string;
duration?: DurationInput;
dayCount?: number;
locales?: RawLocale[];
locale?: LocaleSingularArg;
eventTimeFormat?: FormatterInput;
columnHeader?: boolean;
columnHeaderFormat?: FormatterInput;
columnHeaderText?: string | ((date: DateInput) => string);
columnHeaderHtml?: string | ((date: DateInput) => string);
titleFormat?: FormatterInput;
weekLabel?: string;
displayEventTime?: boolean;
displayEventEnd?: boolean;
eventLimitText?: string | ((eventCnt: number) => string);
dayPopoverFormat?: FormatterInput;
navLinks?: boolean;
navLinkDayClick?: string | ((date: Date, jsEvent: Event) => void);
navLinkWeekClick?: string | ((weekStart: any, jsEvent: Event) => void);
selectable?: boolean;
selectMirror?: boolean;
unselectAuto?: boolean;
unselectCancel?: string;
defaultAllDayEventDuration?: DurationInput;
defaultTimedEventDuration?: DurationInput;
cmdFormatter?: string;
defaultRangeSeparator?: string;
selectConstraint?: ConstraintInput;
selectOverlap?: boolean | OverlapFunc;
selectAllow?: AllowFunc;
editable?: boolean;
eventStartEditable?: boolean;
eventDurationEditable?: boolean;
eventConstraint?: ConstraintInput;
eventOverlap?: boolean | OverlapFunc;
eventAllow?: AllowFunc;
eventClassName?: string[] | string;
eventClassNames?: string[] | string;
eventBackgroundColor?: string;
eventBorderColor?: string;
eventTextColor?: string;
eventColor?: string;
events?: EventSourceInput;
eventSources?: EventSourceInput[];
allDayDefault?: boolean;
startParam?: string;
endParam?: string;
lazyFetching?: boolean;
nextDayThreshold?: DurationInput;
eventOrder?: string | Array<((a: EventApi, b: EventApi) => number) | (string | ((a: EventApi, b: EventApi) => number))>;
rerenderDelay?: number | null;
dragRevertDuration?: number;
dragScroll?: boolean;
longPressDelay?: number;
eventLongPressDelay?: number;
droppable?: boolean;
dropAccept?: string | ((draggable: any) => boolean);
eventDataTransform?: EventInputTransformer;
allDayMaintainDuration?: boolean;
eventResizableFromStart?: boolean;
timeGridEventMinHeight?: number;
allDayHtml?: string;
eventDragMinDistance?: number;
eventSourceFailure?: any;
eventSourceSuccess?: any;
forceEventDuration?: boolean;
progressiveEventRendering?: boolean;
selectLongPressDelay?: number;
selectMinDistance?: number;
timeZoneParam?: string;
titleRangeSeparator?: string;
datesRender?(arg: {
view: View;
el: HTMLElement;
}): void;
datesDestroy?(arg: {
view: View;
el: HTMLElement;
}): void;
dayRender?(arg: {
view: View;
date: Date;
allDay?: boolean;
el: HTMLElement;
}): void;
windowResize?(view: View): void;
dateClick?(arg: {
date: Date;
dateStr: string;
allDay: boolean;
resource?: any;
dayEl: HTMLElement;
jsEvent: MouseEvent;
view: View;
}): void;
eventClick?(arg: {
el: HTMLElement;
event: EventApi;
jsEvent: MouseEvent;
view: View;
}): boolean | void;
eventMouseEnter?(arg: {
el: HTMLElement;
event: EventApi;
jsEvent: MouseEvent;
view: View;
}): void;
eventMouseLeave?(arg: {
el: HTMLElement;
event: EventApi;
jsEvent: MouseEvent;
view: View;
}): void;
select?(arg: {
start: Date;
end: Date;
startStr: string;
endStr: string;
allDay: boolean;
resource?: any;
jsEvent: MouseEvent;
view: View;
}): void;
unselect?(arg: {
view: View;
jsEvent: Event;
}): void;
loading?(isLoading: boolean): void;
eventRender?(arg: {
isMirror: boolean;
isStart: boolean;
isEnd: boolean;
event: EventApi;
el: HTMLElement;
view: View;
}): void;
eventPositioned?(arg: {
isMirror: boolean;
isStart: boolean;
isEnd: boolean;
event: EventApi;
el: HTMLElement;
view: View;
}): void;
_eventsPositioned?(arg: {
view: View;
}): void;
eventDestroy?(arg: {
isMirror: boolean;
event: EventApi;
el: HTMLElement;
view: View;
}): void;
eventDragStart?(arg: {
event: EventApi;
el: HTMLElement;
jsEvent: MouseEvent;
view: View;
}): void;
eventDragStop?(arg: {
event: EventApi;
el: HTMLElement;
jsEvent: MouseEvent;
view: View;
}): void;
eventDrop?(arg: {
el: HTMLElement;
event: EventApi;
oldEvent: EventApi;
delta: Duration;
revert: () => void;
jsEvent: Event;
view: View;
}): void;
eventResizeStart?(arg: {
el: HTMLElement;
event: EventApi;
jsEvent: MouseEvent;
view: View;
}): void;
eventResizeStop?(arg: {
el: HTMLElement;
event: EventApi;
jsEvent: MouseEvent;
view: View;
}): void;
eventResize?(arg: {
el: HTMLElement;
startDelta: Duration;
endDelta: Duration;
prevEvent: EventApi;
event: EventApi;
revert: () => void;
jsEvent: Event;
view: View;
}): void;
drop?(arg: {
date: Date;
dateStr: string;
allDay: boolean;
draggedEl: HTMLElement;
jsEvent: MouseEvent;
view: View;
}): void;
eventReceive?(arg: {
event: EventApi;
draggedEl: HTMLElement;
view: View;
}): void;
eventLeave?(arg: {
draggedEl: HTMLElement;
event: EventApi;
view: View;
}): void;
viewSkeletonRender?(arg: {
el: HTMLElement;
view: View;
}): void;
viewSkeletonDestroy?(arg: {
el: HTMLElement;
view: View;
}): void;
_destroyed?(): void;
_init?(): void;
_noEventDrop?(): void;
_noEventResize?(): void;
resourceRender?(arg: {
resource: any;
el: HTMLElement;
view: View;
}): void;
}
export interface ViewOptionsInput extends OptionsInputBase {
type?: string;
buttonText?: string;
}
export interface OptionsInput extends OptionsInputBase {
buttonText?: ButtonTextCompoundInput;
views?: {
[viewId: string]: ViewOptionsInput;
};
plugins?: (PluginDef | string)[];
}
}
declare module '@fullcalendar/core/structs/event' {
import { DateInput } from '@fullcalendar/core/datelib/env';
import Calendar from '@fullcalendar/core/Calendar';
import { DateRange } from '@fullcalendar/core/datelib/date-range';
import { Duration } from '@fullcalendar/core/datelib/duration';
import { UnscopedEventUiInput, EventUi } from '@fullcalendar/core/component/event-ui';
export type EventRenderingChoice = '' | 'background' | 'inverse-background' | 'none';
export interface EventNonDateInput extends UnscopedEventUiInput {
id?: string | number;
groupId?: string | number;
title?: string;
url?: string;
rendering?: EventRenderingChoice;
extendedProps?: object;
[extendedProp: string]: any;
}
export interface EventDateInput {
start?: DateInput;
end?: DateInput;
date?: DateInput;
allDay?: boolean;
}
export type EventInput = EventNonDateInput & EventDateInput;
export interface EventDef {
defId: string;
sourceId: string;
publicId: string;
groupId: string;
allDay: boolean;
hasEnd: boolean;
recurringDef: {
typeId: number;
typeData: any;
duration: Duration | null;
} | null;
title: string;
url: string;
rendering: EventRenderingChoice;
ui: EventUi;
extendedProps: any;
}
export interface EventInstance {
instanceId: string;
defId: string;
range: DateRange;
forcedStartTzo: number | null;
forcedEndTzo: number | null;
}
export interface EventTuple {
def: EventDef;
instance: EventInstance | null;
}
export type EventInstanceHash = {
[instanceId: string]: EventInstance;
};
export type EventDefHash = {
[defId: string]: EventDef;
};
export const NON_DATE_PROPS: {
id: StringConstructor;
groupId: StringConstructor;
title: StringConstructor;
url: StringConstructor;
rendering: StringConstructor;
extendedProps: any;
};
export const DATE_PROPS: {
start: any;
date: any;
end: any;
allDay: any;
};
export function parseEvent(raw: EventInput, sourceId: string, calendar: Calendar, allowOpenRange?: boolean): EventTuple | null;
export function parseEventDef(raw: EventNonDateInput, sourceId: string, allDay: boolean, hasEnd: boolean, calendar: Calendar): EventDef;
export type eventDefParserFunc = (def: EventDef, props: any, leftovers: any) => void;
export function createEventInstance(defId: string, range: DateRange, forcedStartTzo?: number, forcedEndTzo?: number): EventInstance;
}
declare module '@fullcalendar/core/structs/business-hours' {
import Calendar from '@fullcalendar/core/Calendar';
import { EventInput } from '@fullcalendar/core/structs/event';
import { EventStore } from '@fullcalendar/core/structs/event-store';
export type BusinessHoursInput = boolean | EventInput | EventInput[];
export function parseBusinessHours(input: BusinessHoursInput, calendar: Calendar): EventStore;
}
declare module '@fullcalendar/core/util/misc' {
import { DateMarker } from '@fullcalendar/core/datelib/marker';
import { Duration } from '@fullcalendar/core/datelib/duration';
import { DateEnv } from '@fullcalendar/core/datelib/env';
import { DateRange, OpenDateRange } from '@fullcalendar/core/datelib/date-range';
export function compensateScroll(rowEl: HTMLElement, scrollbarWidths: any): void;
export function uncompensateScroll(rowEl: HTMLElement): void;
export function disableCursor(): void;
export function enableCursor(): void;
export function distributeHeight(els: HTMLElement[], availableHeight: any, shouldRedistribute: any): void;
export function undistributeHeight(els: HTMLElement[]): void;
export function matchCellWidths(els: HTMLElement[]): number;
export function subtractInnerElHeight(outerEl: HTMLElement, innerEl: HTMLElement): number;
export function preventSelection(el: HTMLElement): void;
export function allowSelection(el: HTMLElement): void;
export function preventContextMenu(el: HTMLElement): void;
export function allowContextMenu(el: HTMLElement): void;
export function parseFieldSpecs(input: any): any[];
export function compareByFieldSpecs(obj0: any, obj1: any, fieldSpecs: any): any;
export function compareByFieldSpec(obj0: any, obj1: any, fieldSpec: any): any;
export function flexibleCompare(a: any, b: any): number;
export function capitaliseFirstLetter(str: any): any;
export function padStart(val: any, len: any): string;
export function compareNumbers(a: any, b: any): number;
export function isInt(n: any): boolean;
export function applyAll(functions: any, thisObj: any, args: any): any;
export function firstDefined(...args: any[]): any;
export function debounce(func: any, wait: any): () => any;
export type GenericHash = {
[key: string]: any;
};
export function refineProps(rawProps: GenericHash, processors: GenericHash, defaults?: GenericHash, leftoverProps?: GenericHash): GenericHash;
export function computeAlignedDayRange(timedRange: DateRange): DateRange;
export function computeVisibleDayRange(timedRange: OpenDateRange, nextDayThreshold?: Duration): OpenDateRange;
export function isMultiDayRange(range: DateRange): boolean;
export function diffDates(date0: DateMarker, date1: DateMarker, dateEnv: DateEnv, largeUnit?: string): Duration;
}
declare module '@fullcalendar/core/util/html' {
export function htmlEscape(s: any): string;
export function cssToStr(cssProps: any): string;
export function attrsToStr(attrs: any): string;
export type ClassNameInput = string | string[];
export function parseClassName(raw: ClassNameInput): string[];
}
declare module '@fullcalendar/core/util/array' {
export function removeMatching(array: any, testFunc: any): number;
export function removeExact(array: any, exactVal: any): number;
export function isArraysEqual(a0: any, a1: any): boolean;
}
declare module '@fullcalendar/core/util/memoize' {
export function memoize<T>(workerFunc: T): T;
export function memoizeOutput<T>(workerFunc: T, equalityFunc: (output0: any, output1: any) => boolean): T;
}
declare module '@fullcalendar/core/component/memoized-rendering' {
export interface MemoizedRendering<ArgsType extends any[]> {
(...args: ArgsType): void;
unrender: () => void;
dependents: MemoizedRendering<any>[];
}
export function memoizeRendering<ArgsType extends any[]>(renderFunc: (...args: ArgsType) => void, unrenderFunc?: (...args: ArgsType) => void, dependencies?: MemoizedRendering<any>[]): MemoizedRendering<ArgsType>;
}
declare module '@fullcalendar/core/util/geom' {
export interface Point {
left: number;
top: number;
}
export interface Rect {
left: number;
right: number;
top: number;
bottom: number;
}
export function pointInsideRect(point: Point, rect: Rect): boolean;
export function intersectRects(rect1: Rect, rect2: Rect): Rect | false;
export function translateRect(rect: Rect, deltaX: number, deltaY: number): Rect;
export function constrainPoint(point: Point, rect: Rect): Point;
export function getRectCenter(rect: Rect): Point;
export function diffPoints(point1: Point, point2: Point): Point;
}
declare module '@fullcalendar/core/util/object' {
export function mergeProps(propObjs: any, complexProps?: any): any;
export function filterHash(hash: any, func: any): {};
export function mapHash<InputItem, OutputItem>(hash: {
[key: string]: InputItem;
}, func: (input: InputItem, key: string) => OutputItem): {
[key: string]: OutputItem;
};
export function arrayToHash(a: any): {
[key: string]: true;
};
export function hashValuesToArray(obj: any): any[];
export function isPropsEqual(obj0: any, obj1: any): boolean;
}
declare module '@fullcalendar/core/util/dom-manip' {
export function createElement(tagName: string, attrs: object | null, content?: ElementContent): HTMLElement;
export function htmlToElement(html: string): HTMLElement;
export function htmlToElements(html: string): HTMLElement[];
export type ElementContent = string | Node | Node[] | NodeList;
export function appendToElement(el: HTMLElement, content: ElementContent): void;
export function prependToElement(parent: HTMLElement, content: ElementContent): void;
export function insertAfterElement(refEl: HTMLElement, content: ElementContent): void;
export function removeElement(el: HTMLElement): void;
export function elementClosest(el: HTMLElement, selector: string): HTMLElement;
export function elementMatches(el: HTMLElement, selector: string): HTMLElement;
export function findElements(container: HTMLElement[] | HTMLElement | NodeListOf<HTMLElement>, selector: string): HTMLElement[];
export function findChildren(parent: HTMLElement[] | HTMLElement, selector?: string): HTMLElement[];
export function forceClassName(el: HTMLElement, className: string, bool: any): void;
export function applyStyle(el: HTMLElement, props: object): void;
export function applyStyleProp(el: HTMLElement, name: string, val: any): void;
}
declare module '@fullcalendar/core/structs/event-store' {
import { EventInput, EventDef, EventDefHash, EventInstanceHash, EventTuple } from '@fullcalendar/core/structs/event';
import { EventSource } from '@fullcalendar/core/structs/event-source';
import Calendar from '@fullcalendar/core/Calendar';
import { DateRange } from '@fullcalendar/core/datelib/date-range';
export interface EventStore {
defs: EventDefHash;
instances: EventInstanceHash;
}
export function parseEvents(rawEvents: EventInput[], sourceId: string, calendar: Calendar, allowOpenRange?: boolean): EventStore;
export function eventTupleToStore(tuple: EventTuple, eventStore?: EventStore): EventStore;
export function expandRecurring(eventStore: EventStore, framingRange: DateRange, calendar: Calendar): EventStore;
export function getRelevantEvents(eventStore: EventStore, instanceId: string): EventStore;
export function transformRawEvents(rawEvents: any, eventSource: EventSource, calendar: Calendar): any;
export function createEmptyEventStore(): EventStore;
export function mergeEventStores(store0: EventStore, store1: EventStore): EventStore;
export function filterEventStoreDefs(eventStore: EventStore, filterFunc: (eventDef: EventDef) => boolean): EventStore;
}
declare module '@fullcalendar/core/component/event-ui' {
import { Constraint, AllowFunc, ConstraintInput } from '@fullcalendar/core/validation';
import { parseClassName } from '@fullcalendar/core/util/html';
import Calendar from '@fullcalendar/core/Calendar';
export interface UnscopedEventUiInput {
editable?: boolean;
startEditable?: boolean;
durationEditable?: boolean;
constraint?: ConstraintInput;
overlap?: boolean;
allow?: AllowFunc;
className?: string[] | string;
classNames?: string[] | string;
backgroundColor?: string;
borderColor?: string;
textColor?: string;
color?: string;
}
export interface EventUi {
startEditable: boolean | null;
durationEditable: boolean | null;
constraints: Constraint[];
overlap: boolean | null;
allows: AllowFunc[];
backgroundColor: string;
borderColor: string;
textColor: string;
classNames: string[];
}
export type EventUiHash = {
[defId: string]: EventUi;
};
export const UNSCOPED_EVENT_UI_PROPS: {
editable: BooleanConstructor;
startEditable: BooleanConstructor;
durationEditable: BooleanConstructor;
constraint: any;
overlap: any;
allow: any;
className: typeof parseClassName;
classNames: typeof parseClassName;
color: StringConstructor;
backgroundColor: StringConstructor;
borderColor: StringConstructor;
textColor: StringConstructor;
};
export function processUnscopedUiProps(rawProps: UnscopedEventUiInput, calendar: Calendar, leftovers?: any): EventUi;
export function processScopedUiProps(prefix: string, rawScoped: any, calendar: Calendar, leftovers?: any): EventUi;
export function combineEventUis(uis: EventUi[]): EventUi;
}
declare module '@fullcalendar/core/component/event-splitting' {
import { EventStore } from '@fullcalendar/core/structs/event-store';
import { EventDef } from '@fullcalendar/core/structs/event';
import { EventInteractionState } from '@fullcalendar/core/interactions/event-interaction-state';
import { EventUiHash, EventUi } from '@fullcalendar/core/component/event-ui';
import { DateSpan } from '@fullcalendar/core/structs/date-span';
export interface SplittableProps {
businessHours: EventStore | null;
dateSelection: DateSpan | null;
eventStore: EventStore;
eventUiBases: EventUiHash;
eventSelection: string;
eventDrag: EventInteractionState | null;
eventResize: EventInteractionState | null;
}
export { Splitter as default, Splitter };
abstract class Splitter<PropsType extends SplittableProps = SplittableProps> {
abstract getKeyInfo(props: PropsType): {
[key: string]: {
ui?: EventUi;
businessHours?: EventStore;
};
};
abstract getKeysForDateSpan(dateSpan: DateSpan): string[];
abstract getKeysForEventDef(eventDef: EventDef): string[];
splitProps(props: PropsType): {
[key: string]: SplittableProps;
};
}
}
declare module '@fullcalendar/core/component/date-rendering' {
import { DateMarker } from '@fullcalendar/core/datelib/marker';
import { ComponentContext } from '@fullcalendar/core/component/Component';
import { DateProfile } from '@fullcalendar/core/DateProfileGenerator';
import { DateEnv } from '@fullcalendar/core/datelib/env';
export function buildGotoAnchorHtml(allOptions: any, dateEnv: DateEnv, gotoOptions: any, attrs: any, innerHtml?: any): string;
export function getAllDayHtml(allOptions: any): any;
export function getDayClasses(date: DateMarker, dateProfile: DateProfile, context: ComponentContext, noThemeHighlight?: any): any[];
}
declare module '@fullcalendar/core/util/dom-event' {
export function preventDefault(ev: any): void;
export function listenBySelector(container: HTMLElement, eventType: string, selector: string, handler: (ev: Event, matchedTarget: HTMLElement) => void): () => void;
export function listenToHoverBySelector(container: HTMLElement, selector: string, onMouseEnter: (ev: Event, matchedTarget: HTMLElement) => void, onMouseLeave: (ev: Event, matchedTarget: HTMLElement) => void): () => void;
export function whenTransitionDone(el: HTMLElement, callback: (ev: Event) => void): void;
}
declare module '@fullcalendar/core/util/dom-geom' {
import { Rect } from '@fullcalendar/core/util/geom';
export interface EdgeInfo {
borderLeft: number;
borderRight: number;
borderTop: number;
borderBottom: number;
scrollbarLeft: number;
scrollbarRight: number;
scrollbarBottom: number;
paddingLeft?: number;
paddingRight?: number;
paddingTop?: number;
paddingBottom?: number;
}
export function computeEdges(el: any, getPadding?: boolean): EdgeInfo;
export function computeInnerRect(el: any, goWithinPadding?: boolean): {
left: number;
right: number;
top: number;
bottom: number;
};
export function computeRect(el: any): Rect;
export function computeHeightAndMargins(el: HTMLElement): number;
export function computeVMargins(el: HTMLElement): number;
export function getClippingParents(el: HTMLElement): HTMLElement[];
export function computeClippingRect(el: HTMLElement): Rect;
}
declare module '@fullcalendar/core/util/promise' {
export function unpromisify(func: any, success: any, failure?: any): void;
}
declare module '@fullcalendar/core/common/EmitterMixin' {
import Mixin from '@fullcalendar/core/common/Mixin';
export interface EmitterInterface {
on(types: any, handler: any): any;
one(types: any, handler: any): any;
off(types: any, handler: any): any;
trigger(type: any, ...args: any[]): any;
triggerWith(type: any, context: any, args: any): any;
hasHandlers(type: any): any;
}
export { EmitterMixin as default, EmitterMixin };
class EmitterMixin extends Mixin implements EmitterInterface {
_handlers: any;
_oneHandlers: any;
on(type: any, handler: any): this;
one(type: any, handler: any): this;
off(type: any, handler?: any): this;
trigger(type: any, ...args: any[]): this;
triggerWith(type: any, context: any, args: any): this;
hasHandlers(type: any): any;
}
}
declare module '@fullcalendar/core/datelib/date-range' {
import { DateMarker } from '@fullcalendar/core/datelib/marker';
import { DateEnv, DateInput } from '@fullcalendar/core/datelib/env';
export interface DateRangeInput {
start?: DateInput;
end?: DateInput;
}
export interface OpenDateRange {
start: DateMarker | null;
end: DateMarker | null;
}
export interface DateRange {
start: DateMarker;
end: DateMarker;
}
export function parseRange(input: DateRangeInput, dateEnv: DateEnv): OpenDateRange;
export function invertRanges(ranges: DateRange[], constraintRange: DateRange): DateRange[];
export function intersectRanges(range0: OpenDateRange, range1: OpenDateRange): OpenDateRange;
export function rangesEqual(range0: OpenDateRange, range1: OpenDateRange): boolean;
export function rangesIntersect(range0: OpenDateRange, range1: OpenDateRange): boolean;
export function rangeContainsRange(outerRange: OpenDateRange, innerRange: OpenDateRange): boolean;
export function rangeContainsMarker(range: OpenDateRange, date: DateMarker | number): boolean;
export function constrainMarkerToRange(date: DateMarker, range: DateRange): DateMarker;
}
declare module '@fullcalendar/core/common/Mixin' {
export { Mixin as default, Mixin };
class Mixin {
static mixInto(destClass: any): void;
static mixIntoObj(destObj: any): void;
static mixOver(destClass: any): void;
}
}
declare module '@fullcalendar/core/common/PositionCache' {
export { PositionCache as default, PositionCache };
class PositionCache {
originClientRect: ClientRect;
els: HTMLElement[];
originEl: HTMLElement;
isHorizontal: boolean;
isVertical: boolean;
lefts: any;
rights: any;
tops: any;
bottoms: any;
constructor(originEl: HTMLElement, els: HTMLElement[], isHorizontal: boolean, isVertical: boolean);
build(): void;
buildElHorizontals(originClientLeft: number): void;
buildElVerticals(originClientTop: number): void;
leftToIndex(leftPosition: number): any;
topToIndex(topPosition: number): any;
getWidth(leftIndex: number): number;
getHeight(topIndex: number): number;
}
}
declare module '@fullcalendar/core/common/ScrollComponent' {
import { ElementScrollController } from '@fullcalendar/core/common/scroll-controller';
export interface ScrollbarWidths {
left: number;
right: number;
bottom: number;
}
export { ScrollComponent as default, ScrollComponent };
class ScrollComponent extends ElementScrollController {
overflowX: string;
overflowY: string;
constructor(overflowX: string, overflowY: string);
clear(): void;
destroy(): void;
applyOverflow(): void;
lockOverflow(scrollbarWidths: ScrollbarWidths): void;
setHeight(height: number | string): void;
getScrollbarWidths(): ScrollbarWidths;
}
}
declare module '@fullcalendar/core/common/scroll-controller' {
export abstract class ScrollController {
abstract getScrollTop(): number;
abstract getScrollLeft(): number;
abstract setScrollTop(top: number): void;
abstract setScrollLeft(left: number): void;
abstract getClientWidth(): number;
abstract getClientHeight(): number;
abstract getScrollWidth(): number;
abstract getScrollHeight(): number;
getMaxScrollTop(): number;
getMaxScrollLeft(): number;
canScrollVertically(): boolean;
canScrollHorizontally(): boolean;
canScrollUp(): boolean;
canScrollDown(): boolean;
canScrollLeft(): boolean;
canScrollRight(): boolean;
}
export class ElementScrollController extends ScrollController {
el: HTMLElement;
constructor(el: HTMLElement);
getScrollTop(): number;
getScrollLeft(): number;
setScrollTop(top: number): void;
setScrollLeft(left: number): void;
getScrollWidth(): number;
getScrollHeight(): number;
getClientHeight(): number;
getClientWidth(): number;
}
export class WindowScrollController extends ScrollController {
getScrollTop(): number;
getScrollLeft(): number;
setScrollTop(n: number): void;
setScrollLeft(n: number): void;
getScrollWidth(): number;
getScrollHeight(): number;
getClientHeight(): number;
getClientWidth(): number;
}
}
declare module '@fullcalendar/core/theme/Theme' {
export { Theme as default, Theme };
class Theme {
calendarOptions: any;
classes: any;
iconClasses: any;
baseIconClass: string;
iconOverrideOption: any;
iconOverrideCustomButtonOption: any;
iconOverridePrefix: string;
constructor(calendarOptions: any);
processIconOverride(): void;
setIconOverride(iconOverrideHash: any): void;
applyIconOverridePrefix(className: any): any;
getClass(key: any): any;
getIconClass(buttonName: any): string;
getCustomButtonIconClass(customButtonProps: any): string;
}
export type ThemeClass = {
new (calendarOptions: any): Theme;
};
}
declare module '@fullcalendar/core/component/Component' {
import Calendar from '@fullcalendar/core/Calendar';
import View from '@fullcalendar/core/View';
import Theme from '@fullcalendar/core/theme/Theme';
import { DateEnv } from '@fullcalendar/core/datelib/env';
import { Duration } from '@fullcalendar/core/datelib/duration';
export class ComponentContext {
calendar: Calendar;
theme: Theme;
dateEnv: DateEnv;
options: any;
view?: View;
isRtl: boolean;
eventOrderSpecs: any;
nextDayThreshold: Duration;
constructor(calendar: Calendar, theme: Theme, dateEnv: DateEnv, options: any, view?: View);
extend(options?: any, view?: View): ComponentContext;
}
export type EqualityFuncHash = {
[propName: string]: (obj0: any, obj1: any) => boolean;
};
export { Component as default, Component };
class Component<PropsType> {
equalityFuncs: EqualityFuncHash;
uid: string;
props: PropsType | null;
context: ComponentContext;
constructor();
static addEqualityFuncs(newFuncs: EqualityFuncHash): void;
receiveProps(props: PropsType, context: ComponentContext): void;
protected render(props: PropsType, context: ComponentContext): void;
firstContext(context: ComponentContext): void;
beforeUpdate(): void;
afterUpdate(): void;
destroy(): void;
}
}
declare module '@fullcalendar/core/component/DateComponent' {
import Component from '@fullcalendar/core/component/Component';
import { EventRenderRange } from '@fullcalendar/core/component/event-rendering';
import { DateSpan } from '@fullcalendar/core/structs/date-span';
import { EventInstanceHash } from '@fullcalendar/core/structs/event';
import { Hit } from '@fullcalendar/core/interactions/hit';
import FgEventRenderer from '@fullcalendar/core/component/renderers/FgEventRenderer';
import FillRenderer from '@fullcalendar/core/component/renderers/FillRenderer';
import { EventInteractionState } from '@fullcalendar/core/interactions/event-interaction-state';
export type DateComponentHash = {
[uid: string]: DateComponent<any>;
};
export interface Seg {
component?: DateComponent<any>;
isStart: boolean;
isEnd: boolean;
eventRange?: EventRenderRange;
el?: HTMLElement;
[otherProp: string]: any;
}
export interface EventSegUiInteractionState {
affectedInstances: EventInstanceHash;
segs: Seg[];
isEvent: boolean;
sourceSeg: any;
}
export { DateComponent as default, DateComponent };
class DateComponent<PropsType> extends Component<PropsType> {
fgSegSelector: string;
bgSegSelector: string;
largeUnit: any;
eventRenderer: FgEventRenderer;
mirrorRenderer: FgEventRenderer;
fillRenderer: FillRenderer;
el: HTMLElement;
constructor(el: HTMLElement);
destroy(): void;
buildPositionCaches(): void;
queryHit(positionLeft: number, positionTop: number, elWidth: number, elHeight: number): Hit | null;
isInteractionValid(interaction: EventInteractionState): boolean;
isDateSelectionValid(selection: DateSpan): boolean;
isValidSegDownEl(el: HTMLElement): boolean;
isValidDateDownEl(el: HTMLElement): boolean;
isPopover(): boolean;
isInPopover(el: HTMLElement): boolean;
}
}
declare module '@fullcalendar/core/Calendar' {
import { EmitterInterface } from '@fullcalendar/core/common/EmitterMixin';
import OptionsManager from '@fullcalendar/core/OptionsManager';
import View from '@fullcalendar/core/View';
import Theme from '@fullcalendar/core/theme/Theme';
import { OptionsInput, EventHandlerName, EventHandlerArgs } from '@fullcalendar/core/types/input-types';
import { RawLocaleMap } from '@fullcalendar/core/datelib/locale';
import { DateEnv, DateInput } from '@fullcalendar/core/datelib/env';
import { DateMarker } from '@fullcalendar/core/datelib/marker';
import { Duration, DurationInput } from '@fullcalendar/core/datelib/duration';
import { DateSpan, DateSpanApi, DatePointApi } from '@fullcalendar/core/structs/date-span';
import { DateRangeInput } from '@fullcalendar/core/datelib/date-range';
import DateProfileGenerator from '@fullcalendar/core/DateProfileGenerator';
import { EventSourceInput } from '@fullcalendar/core/structs/event-source';
import { EventInput } from '@fullcalendar/core/structs/event';
import { CalendarState, Action } from '@fullcalendar/core/reducers/types';
import EventSourceApi from '@fullcalendar/core/api/EventSourceApi';
import EventApi from '@fullcalendar/core/api/EventApi';
import { EventStore } from '@fullcalendar/core/structs/event-store';
import { EventUiHash, EventUi } from '@fullcalendar/core/component/event-ui';
import { ViewSpecHash, ViewSpec } from '@fullcalendar/core/structs/view-spec';
import { PluginSystem } from '@fullcalendar/core/plugin-system';
import CalendarComponent from '@fullcalendar/core/CalendarComponent';
import DateComponent from '@fullcalendar/core/component/DateComponent';
import { PointerDragEvent } from '@fullcalendar/core/interactions/pointer';
import { InteractionSettingsInput, Interaction } from '@fullcalendar/core/interactions/interaction';
export interface DateClickApi extends DatePointApi {
dayEl: HTMLElement;
jsEvent: UIEvent;
view: View;
}
export interface DateSelectionApi extends DateSpanApi {
jsEvent: UIEvent;
view: View;
}
export type DatePointTransform = (dateSpan: DateSpan, calendar: Calendar) => any;
export type DateSpanTransform = (dateSpan: DateSpan, calendar: Calendar) => any;
export type CalendarInteraction = {
destroy(): any;
};
export type CalendarInteractionClass = {
new (calendar: Calendar): CalendarInteraction;
};
export type OptionChangeHandler = (propValue: any, calendar: Calendar, deepEqual: any) => void;
export type OptionChangeHandlerMap = {
[propName: string]: OptionChangeHandler;
};
export { Calendar as default, Calendar };
class Calendar {
static on: EmitterInterface['on'];
static off: EmitterInterface['off'];
static trigger: EmitterInterface['trigger'];
on: EmitterInterface['on'];
one: EmitterInterface['one'];
off: EmitterInterfa