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.

72 lines (71 loc) 2.91 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ /** * Defines the interface for a service that the reactive and template editing directives of the Scheduler use to persist changes made during editing. * * * [Custom Service](slug:editing_scheduler#connecting-custom-data-services) * * [`BaseEditService`](slug:api_scheduler_baseeditservice) */ export interface EditService<TEvent> { /** * Creates a new event. * * @param event The event to create. */ create(event: TEvent): void; /** * Creates an exception for an existing recurring event. The `recurrenceId` field of the exception or the custom field set by the model map points to the master event. * * @param event The occurrence to remove from the series. * @param value An object with the updated field values, for example, a form group value. */ createException(event: TEvent, value: any): void; /** * Updates the event by copying changed fields from the `value` object. * * @param event The event to update. * @param value An object with the new field values, for example, a form group value. */ update(event: TEvent, value: any): void; /** * Removes a non-recurring event. * * @param event The event to remove. */ remove(event: TEvent): void; /** * Removes the recurrence series and any exceptions. * * @param event Any event from the recurrence series. */ removeSeries(event: TEvent): void; /** * Removes a single occurrence from a recurring series. The `recurrenceId` field of the occurrence or the custom field set by a model map points to the master event. * * @param event The occurrence to remove. */ removeOccurrence(event: TEvent): void; /** * Returns the master recurring event for a specified recurring event. * * @param event An event from the recurrence series. * @returns The master recurring event for the series. */ findRecurrenceMaster(event: TEvent): TEvent; /** * Checks if the event is part of a recurrence series. * * @param event The event to check. * @returns `true` if the event is an occurrence, exception, or master event. Otherwise, returns `false`. */ isRecurring(event: TEvent): boolean; /** * Checks if the event is a recurrence exception. * * @param event The event to check. * @returns `true` if the event is a unique event that belongs to a recurrence series. Otherwise, returns `false`. */ isException(event: TEvent): boolean; }