UNPKG

@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.

61 lines (60 loc) 2.62 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { OnChanges, OnDestroy, OnInit, SimpleChanges, EventEmitter, ChangeDetectorRef } from '@angular/core'; import { SchedulerComponent } from '../../scheduler.component'; import { SlotRange } from '../../types/slot-selection'; import * as i0 from "@angular/core"; /** * Represents a directive that manages the built-in slot selection in the Scheduler. * * Add the `kendoSchedulerSlotSelectable` directive to a `<kendo-scheduler>` instance to allow users to select time slots by clicking or dragging. * * The directive keeps track of the selected slot range and emits changes when the selection is updated by user interaction. * * @example * ```html * <kendo-scheduler kendoSchedulerSlotSelectable [(slotSelection)]="selectedSlot"> * </kendo-scheduler> * ``` * * @remarks * Applied to: {@link SchedulerComponent} */ export declare class SlotSelectableDirective implements OnInit, OnChanges, OnDestroy { private scheduler; private cdr; /** * Represents the currently selected slot range. */ slotSelection: SlotRange; /** * Fires when the user changes the currently selected slot range. */ slotSelectionChange: EventEmitter<SlotRange>; /** * @hidden * The resources of the cell where the selection started. * When dragging over the slots of a different resource in grouped mode, the ongoing selection will not be affected. */ private selectionOriginResources; private selectedRange; private slotSelectionChangeSource; private subscriptions; constructor(scheduler: SchedulerComponent, cdr: ChangeDetectorRef); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private isSlotSelected; private initDragSelect; private onDrag; private onRelease; /** * @hidden * Checks if the selected range contains a local date range. */ private isInRange; static ɵfac: i0.ɵɵFactoryDeclaration<SlotSelectableDirective, never>; static ɵdir: i0.ɵɵDirectiveDeclaration<SlotSelectableDirective, "[kendoSchedulerSlotSelectable]", never, { "slotSelection": { "alias": "slotSelection"; "required": false; }; }, { "slotSelectionChange": "slotSelectionChange"; }, never, never, true, never>; }