@progress/kendo-angular-scheduler
Version:
Kendo UI Scheduler Angular - Outlook or Google-style angular scheduler calendar. Full-featured and customizable embedded scheduling from the creator developers trust for professional UI components.
192 lines (191 loc) • 9.41 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { OnInit, AfterViewInit, OnDestroy, OnChanges, NgZone, ElementRef, Renderer2, TemplateRef, ChangeDetectorRef } from '@angular/core';
import { ScrollbarWidthService } from '@progress/kendo-angular-common';
import { IntlService } from '@progress/kendo-angular-intl';
import { Day } from '@progress/kendo-date-math';
import { Subscription, Subject, BehaviorSubject } from 'rxjs';
import { DateRange, NavigationAction, ViewItem } from '../../types';
import { BaseSlotService } from '../view-items/base-slot.service';
import { ViewContextService } from '../view-context.service';
import { ViewStateService } from '../view-state.service';
import { Draggable } from '@progress/kendo-draggable';
import { HintContainerComponent } from '../common/hint-container.component';
import { PDFService } from '../../pdf/pdf.service';
import { LocalizationService } from '@progress/kendo-angular-l10n';
import { TimeSlotDirective } from '../day-time/event-slot.directive';
import { SlotSelectionCallback } from '../../types/slot-selection';
import * as i0 from "@angular/core";
/** @hidden */
export declare abstract class BaseView implements OnInit, OnChanges, AfterViewInit, OnDestroy {
protected viewContext: ViewContextService;
protected viewState: ViewStateService;
protected intl: IntlService;
protected slotService: BaseSlotService;
protected zone: NgZone;
protected renderer: Renderer2;
protected element: ElementRef;
protected pdfService: PDFService;
protected localization: LocalizationService;
protected cdr: ChangeDetectorRef;
protected scrollBarWidthService: ScrollbarWidthService;
eventTemplate: TemplateRef<any>;
groupHeaderTemplate: TemplateRef<any>;
selectedDateFormat: string;
selectedShortDateFormat: string;
eventHeight: number | 'auto';
showToolbar: boolean;
showFooter: boolean;
slotClass: (args: any) => any;
eventClass: (args: any) => any;
eventStyles: (args: any) => any;
weekStart: Day;
content: ElementRef;
header: ElementRef;
contentTable: ElementRef;
times: ElementRef;
timesHeader: ElementRef;
timesTable: ElementRef;
headerWrap: ElementRef;
hintContainer: HintContainerComponent;
get eventTemplateRef(): TemplateRef<any>;
get groupHeaderTemplateRef(): TemplateRef<any>;
/**
* The non-all-day events.
*/
items: Subject<any[]>;
horizontalResources: any[];
verticalResources: any[];
dragHints: any[];
resizeHints: any[];
editable: any;
selectable: boolean;
getField: any;
protected changes: BehaviorSubject<any>;
protected viewRangeChange: BehaviorSubject<any>;
protected subs: Subscription;
protected groupedResources: any[];
protected spans: any[];
protected contentHeight: any;
/**
* All events that the user provided.
*/
protected tasks: any[];
protected group: any;
protected resources: any[];
protected domEvents: any[];
protected schedulerEventTemplate: any;
protected schedulerGroupHeaderTemplate: any;
protected min: any;
protected max: any;
protected selectedDate: Date;
protected resourcesCache: any;
protected timezone: string;
protected draggable: Draggable;
/**
* The event which is currently being resized.
*/
protected resizing: any;
protected dragging: any;
protected dragArgs: any;
/**
* The slot which is currently being dragged over while selecting a range of slots.
*/
protected dragSelecting: TimeSlotDirective;
/**
* The slot where the drag-selecting originated. Used for flipping the start and end of the emitted range.
*/
protected dragSelectOrigin: TimeSlotDirective;
protected container: any;
protected containerOffset: any;
protected pressLocation: any;
protected pressTarget: any;
protected scrollInterval: any;
protected autoHeight: boolean;
protected rtl: boolean;
isSlotSelected: SlotSelectionCallback;
constructor(viewContext: ViewContextService, viewState: ViewStateService, intl: IntlService, slotService: BaseSlotService, zone: NgZone, renderer: Renderer2, element: ElementRef, pdfService: PDFService, localization: LocalizationService, cdr: ChangeDetectorRef, scrollBarWidthService: ScrollbarWidthService);
/**
* Generates a list of space-separated IDs based on a collection of items to associate scrollable containers
* with the respective tasks through the aria-owns attribute for a11y compliance.
*/
matchOwned(items: any[]): string;
protected abstract onSelectDate(date: Date): void;
protected abstract onAction(action: NavigationAction): void;
protected abstract onTasksChange(): void;
protected abstract createTasks(items: ViewItem[], dateRange: DateRange): any[];
protected abstract reflow(): void;
protected abstract slotByIndex(slotIndex: string, args: any): any;
protected abstract dateRange(date: Date): DateRange;
protected abstract dragHintSize(startSlot: any, endSlot: any): any;
protected abstract dragRanges(slot: any): any;
protected abstract slotByPosition(x: number, y: number, container?: any): TimeSlotDirective;
ngOnInit(): void;
ngOnChanges(changes: any): void;
ngAfterViewInit(): void;
ngOnDestroy(): void;
itemIndex(index: number, _: any): any;
resourcesByIndex(index: number): any[];
dragResourcesByIndex(index: number): any[];
getEventClasses(item: any, resources: any, isAllDay?: boolean): any;
getEventStyles(item: any, itemResource: any, isAllDay?: boolean): any;
toPlainDate(date: Date): Date;
toPlainDateTime(date: Date, time: Date): Date;
protected optionsChange(options: any): void;
protected toggleElement(visible: boolean): void;
protected onStable(): any;
protected updateView(): void;
protected assignResources(): void;
protected bindEvents(): void;
protected onPress(args: any): void;
protected onDrag(args: any): void;
protected onRelease(args: any): void;
protected setHintClass(className: string): void;
protected updateHintClass(): void;
protected removeHintClass(): void;
protected setSlotClass(className: string): void;
protected removeSlotClass(): void;
protected get hints(): any;
protected initDrag(args: any): void;
protected updateDragContainer(_args: any): void;
protected drag(args: any): void;
protected initDragSelect(args: any): void;
protected dragSelect(args: any): void;
protected dragHintClasses(): any;
protected dragHintEventStyleArgs(): any;
protected draggedIsAllDay(task: any, _slot: any): boolean;
protected dragResourceColor(task: any, slotResources: any[]): string;
protected resourceValues(task: any, currentResources: any[]): any;
protected initResize(args: any): void;
protected resize(args: any): void;
protected updateResizeHints(ranges: any[], _start: Date, _end: Date): void;
protected coordinatesOffset(x: number, y: number, container?: any, offset?: any): any;
protected scrollContainer(callback: any, args: any): void;
protected emitEvent(name: string, args: any): boolean;
protected targetTask(target: any): any;
protected updateHintContainer(): void;
/**
* Converts a "view date" (date stored in the UTC parts of a Date object) to a local date.
*/
protected convertDate(date: Date): Date;
protected onClick(e: any, eventType?: string): void;
protected emitSlotEvent(e: any, eventType: string): void;
protected emitTaskEvent(e: any, eventType: string): void;
protected onKeydown(e: any): void;
protected syncTables(): void;
protected updateContentHeight(): void;
protected groupResources(): void;
protected get taskResources(): any[];
protected resourceSpans(): number[];
protected isInRange(date: Date): boolean;
protected createPDFElement(): void;
protected pdfWidth(): number;
protected containerByPosition({ x, y }: any): any;
protected execute(e: any): void;
protected slotFields(slot: any): any;
private onStateOptionsChange;
static ɵfac: i0.ɵɵFactoryDeclaration<BaseView, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseView, never, never, { "eventTemplate": { "alias": "eventTemplate"; "required": false; }; "groupHeaderTemplate": { "alias": "groupHeaderTemplate"; "required": false; }; "selectedDateFormat": { "alias": "selectedDateFormat"; "required": false; }; "selectedShortDateFormat": { "alias": "selectedShortDateFormat"; "required": false; }; "eventHeight": { "alias": "eventHeight"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "slotClass": { "alias": "slotClass"; "required": false; }; "eventClass": { "alias": "eventClass"; "required": false; }; "eventStyles": { "alias": "eventStyles"; "required": false; }; "weekStart": { "alias": "weekStart"; "required": false; }; }, {}, never, never, false, never>;
}