/** Core */ import { CoreComponent } from "cmf.core/src/core"; /** Angular */ import * as ng from "@angular/core"; import { Location } from "@angular/common"; import * as ngRouter from "@angular/router"; import { DomSanitizer } from "@angular/platform-browser"; /** Nested modules */ import { SelectionMode } from "../dataGrid/dataGrid"; import { CalendarEvent } from "./calendarDef"; import { DateRange } from "../dateTimeRangeFilter/dateTimeRangeFilter"; import { ModalViewInstance } from "../../components/modalView/modalView"; import "node_modules/fullcalendar/dist/fullcalendar.min"; export declare type CalendarSelectionMode = SelectionMode; /** * @whatItDoes * Calendar Component * * @howToUse * This component is used with the inputs and outputs mentioned below. * * ### Inputs * `CalendarEvent[]` : **data** - Calendar event ; * `DateRange` : **range** - Range of dates ; * `CalendarEvent[]` : **selected** - Selected calendar event ; * `CalendarSelectionMode | string)` : **selectionMode** - Selection mode . * * ### Outputs * `CalendarEvent[]` : **selectedChange** - Outputs the selected calendar event . * * ### Example * To use the component, assume this HTML Template as an example: * * ```HTML * * ``` * */ export declare class Calendar extends CoreComponent implements ng.OnInit, ng.OnDestroy, ng.OnChanges { private _modalViewInstance; private _router; private _location; private _sanitizer; private static _DATA_VIEW_MONTH; private static _DATA_VIEW_WEEK; private static _DATA_VIEW_DAY; private _fullCalendar_defaultOptions; private _calendarElementRef; private _fullCalendarEventSource; private _$; private _events; private _selectionMode; private _bodyRef; /** * Context menu for each navigation inside calendar */ private _contextMenu; private _contextMenuElement; /** * Reference to context menu that is open. * This is needed because KendoUI ContextMenu can't save the reference * of the origin element (right click) until we select an option. * For that reason, we save the origin here and use it later. */ private _contextMenuOpenItem; /** * Calendar event */ data: CalendarEvent[]; /** * Range of dates */ range: DateRange; /** * Selected calendar event */ selected: CalendarEvent[]; /** * Selected calendar event change */ selectedChange: ng.EventEmitter; /** * Selection mode */ selectionMode: CalendarSelectionMode | string; /** * @param _modalViewInstance * @param _elementRef * @param _router * @param _location * @param _sanitizer */ constructor(_modalViewInstance: ModalViewInstance, _elementRef: ng.ElementRef, _router: ngRouter.Router, _location: Location, _sanitizer: DomSanitizer); private buildCalendar; private destroyCalendar; private fromCalendarEventsToEventObjects; private fromDateRangeTypeToViewName; private onEventClick; private onEventRender; private onEventDestroy; private onEventAfterAllRender; private addSelected; /** * Determines if the element is equal to the data grid element. */ private calendarElementsAreEqual; /** * Determines if the object exists in the collection. And if true, returns it (@see calendarElementIsEqual). * @return {any} obj of the collection, or undefined if no object found */ private findCalendarElement; /** * Determines if the object exists in the collection. And if true, returns its index (@see calendarElementIsEqual). * @return {any} obj of the collection, or undefined if no object found */ private indexOfCalendarElement; /** * Determines if the object exists in the collection. And if true, returns it (@see calendarElementIsEqual). * @return {any} obj of the collection, or undefined if no object found */ private findCalendarEvent; private toggleEventSelected; private notifySelectedItems; previous(): void; next(): void; ngOnInit(): void; ngOnDestroy(): void; ngOnChanges(changes: { [key: string]: ng.SimpleChange; }): void; } export declare type CalendarEventAdvanced = CalendarEvent; export declare class CalendarModule { }