@syncfusion/ej2-schedule
Version:
Flexible scheduling library with more built-in features and enhanced customization options similar to outlook and google calendar, allowing the users to plan and manage their appointments with efficient data-binding support.
102 lines (101 loc) • 6.08 kB
TypeScript
import { Predicate } from '@syncfusion/ej2-data';
import { EventClickArgs, TdData } from '../base/interface';
import { Schedule } from '../base/schedule';
/**
* EventBase for appointment rendering
*/
export declare class EventBase {
parent: Schedule;
slots: number[];
cssClass: string;
groupOrder: string[];
processedData: Record<string, any>[];
private isDoubleTapped;
/**
* Constructor for EventBase
*
* @param {Schedule} parent Accepts the schedule instance
*/
constructor(parent: Schedule);
processData(events: Record<string, any>[], timeZonePropChanged?: boolean, oldTimezone?: string): Record<string, any>[];
private findOverlappingData;
private isOverlapRange;
private compareResourceValues;
checkOverlap(eventData: Record<string, any> | Record<string, any>[]): boolean;
updateEventDateTime(eventData: Record<string, any>): Record<string, any>;
getProcessedEvents(eventCollection?: Record<string, any>[]): Record<string, any>[];
timezonePropertyChange(oldTimezone: string): void;
timezoneConvert(eventData: Record<string, any>): void;
private processTimezoneChange;
processTimezone(event: Record<string, any>, isReverse?: boolean): Record<string, any>;
filterBlockEvents(eventObj: Record<string, any>): Record<string, any>[];
filterEvents(startDate: Date, endDate: Date, appointments?: Record<string, any>[], resourceTdData?: TdData): Record<string, any>[];
filterEventsByRange(eventCollection: Record<string, any>[], startDate?: Date, endDate?: Date): Record<string, any>[];
filterEventsByResource(resourceTdData: TdData, appointments?: Record<string, any>[]): Record<string, any>[];
sortByTime(appointmentsCollection: Record<string, any>[]): Record<string, any>[];
sortByDateTime(appointments: Record<string, any>[]): Record<string, any>[];
private customSorting;
getSmallestMissingNumber(array: number[]): number;
splitEventByDay(event: Record<string, any>): Record<string, any>[];
splitEvent(event: Record<string, any>, dateRender: Date[]): Record<string, any>[];
cloneEventObject(event: Record<string, any>, start: number, end: number, count: number, isLeft: boolean, isRight: boolean): Record<string, any>;
private dateInRange;
getSelectedEventElements(target: Element): Element[];
getSelectedEvents(): EventClickArgs;
removeSelectedAppointmentClass(): void;
addSelectedAppointments(cells: Element[], preventFocus?: boolean): void;
getSelectedAppointments(): Element[];
focusElement(isFocused?: boolean): void;
selectWorkCellByTime(eventsData: Record<string, any>[]): Element;
private findNearestSlot;
getGroupIndexFromEvent(eventData: Record<string, any>): number;
isAllDayAppointment(event: Record<string, any>): boolean;
addEventListener(): void;
removeEventListener(): void;
private appointmentBorderRemove;
wireAppointmentEvents(element: HTMLElement, event?: Record<string, any>, isPreventCrud?: boolean): void;
private eventTouchClick;
renderResizeHandler(element: HTMLElement, spanEvent: Record<string, any>, isReadOnly: boolean): void;
private eventClick;
private eventDoubleClick;
getEventByGuid(guid: string): Record<string, any>;
getEventById(id: number | string): Record<string, any>;
generateGuid(): string;
getEventIDType(): string;
getEventMaxID(resourceId?: number): number | string;
private activeEventData;
generateOccurrence(event: Record<string, any>, viewDate?: Date, isMaxCount?: boolean): Record<string, any>[];
private isDayBasedRecurrence;
private getDSTAdjustedTime;
private getDSTDiff;
getParentEvent(eventObj: Record<string, any>, isParent?: boolean): Record<string, any>;
getEventCollections(parentObj: Record<string, any>, childObj?: Record<string, any>): {
[key: string]: Record<string, any>[];
};
getFollowingEvent(parentObj: Record<string, any>, isReverse?: boolean): Record<string, any>;
isFollowingEvent(parentObj: Record<string, any>, childObj: Record<string, any>): boolean;
getOccurrenceEvent(eventObj: Record<string, any>, isGuid?: boolean, isFollowing?: boolean): Record<string, any>[];
getOccurrencesByID(id: number | string): Record<string, any>[];
getOccurrencesByRange(startTime: Date, endTime: Date): Record<string, any>[];
getDeletedOccurrences(recurrenceData: string | number | Record<string, any>): Record<string, any>[];
applyResourceColor(element: HTMLElement, data: Record<string, any>, type: string, index?: string[], alpha?: string): void;
createBlockAppointmentElement(record: Record<string, any>, resIndex: number, isResourceEventTemplate: boolean): HTMLElement;
setWrapperAttributes(appointmentWrapper: HTMLElement, resIndex: number): void;
getReadonlyAttribute(event: Record<string, any>): string;
isBlockRange(eventData: Record<string, any> | Record<string, any>[]): boolean;
getFilterEventsList(dataSource: Record<string, any>[], query: Predicate): Record<string, any>[];
getSeriesEvents(parentEvent: Record<string, any>, startTime?: string): Record<string, any>[];
getEditedOccurrences(deleteFutureEditEventList: Record<string, any>[], startTime?: string): Record<string, any>[];
getRenderedDates(dateRender: Date[]): Date[];
isValidEvent(eventObj: Record<string, any>, start: Date, end: Date, schedule: {
[key: string]: Date;
}): boolean;
allDayExpandScroll(dateHeader: HTMLElement): void;
updateEventMinimumDuration(startEndHours: Record<string, Date>, startTime: Date, endTime: Date): Record<string, Date>;
createEventWrapper(type?: string, index?: number): HTMLElement;
getPageCoordinates(e: MouseEvent & TouchEvent): (MouseEvent & TouchEvent) | Touch;
renderSpannedIcon(element: HTMLElement, spanEvent: Record<string, any>): void;
addCellHeight(selector: string, eventHeight: number, eventGap: number, headerHeight: number, indHeight: number, isScrollUpdate?: boolean): void;
private unWireEvents;
destroy(): void;
}