import { EventModel, EventFields } from '../types/scheduler-types'; import { AlertAction, CrudAction } from '../types/enums'; import { IScheduler } from '../index'; import { AlertDialog } from '../types/internal-interface'; /** * Expands recurring events into individual event instances within a date range * Handles both original parent events (recurrenceRule + no recurrenceID) * and following parent events (recurrenceRule + followingId + no recurrenceID) * * @param {EventModel[]} events - The events to process * @param {Date[]} dateRange - The date range to expand events for * @param {number} firstDayOfWeek - First day of week * @private * @returns {EventModel[]} - Expanded events including recurring instances with correct parent references */ export declare function expandRecurringEvents(events: EventModel[], dateRange: Date[], firstDayOfWeek?: number): EventModel[]; /** * Validates whether a recurring event can be dragged to a new start time * * @param {EventModel} original - The event being dragged * @param {Date} newStartTime - The new start time for the event * @param {Date} newEndTime - The new end time for the event * @param {EventModel[]} eventsProcessed - The processed events array * @param {EventModel[]} eventsData - The original events data * * @private * @returns {Object} - Validation result with isValid, shouldAlert, and optional messageKey */ export declare function editOccurrenceValidation(original: EventModel, newStartTime: Date, newEndTime: Date, eventsProcessed: EventModel[], eventsData: EventModel[]): AlertDialog; /** * Validates whether a recurring event can be dragged to a new start time * * @param {EventModel} original - The event being dragged * @param {EventModel[]} eventsProcessed - The processed events array * @private * @returns {EventModel} - Returns parent event */ export declare function getRecurrenceParent(original: EventModel, eventsProcessed: EventModel[]): EventModel | undefined; /** * Validates whether a recurring event can be dragged to a new start time * * @param {EventModel[]} eventsData - The processed events array * @private * @returns {EventModel} - Returns parent event */ export declare function getRecurrenceMaxId(eventsData: EventModel[]): number; /** * Updates the datasource with a modified event, handling recurrence rules * * @param {EventModel} original - The original event * @param {Date} newStartTime - The new start time * @param {Date} newEndTime - The new end time * @param {IScheduler} schedulerRef - Reference to the scheduler * @param {EventFields} fields - The event field mapping * @param {EventModel[]} eventsData - The events data array * @param {string} timezone - The timezone of the scheduler. * @param {Record} [resourceFields] - Optional resource field values to assign to the event * @private * @returns {EventModel} - The updated event */ export declare function updateDatasource(original: EventModel, newStartTime: Date, newEndTime: Date, schedulerRef: React.RefObject, fields: EventFields, eventsData: EventModel[], timezone?: string, resourceFields?: Record): EventModel; /** * Builds resource fields for a group-edit drag by replacing the source resource id * with the target resource id in the original event's stored resource arrays. * * @param {EventModel} original - The original event being dragged * @param {number | undefined} sourceGroupIndex - Group index the event was dragged from * @param {number | undefined} targetGroupIndex - Group index the event was dropped on * @param {Function} setResourceValues - Function that resolves a group index to its resource ids; signature: (groupIndex?: number) => Record * @returns {Record} Merged resource fields with arrays preserving unaffected resources * @private */ export declare function buildGroupEditResourceFields(original: EventModel, sourceGroupIndex: number | undefined, targetGroupIndex: number | undefined, setResourceValues: (groupIndex?: number) => Record): Record; /** * Updates the datasource with a modified event, handling recurrence rules * Determines parent (original or following) based on event's recurrenceID or followingId * * @param {EventModel} original - The original event * @param {EventFields} fields - The event field mapping * @param {EventModel[]} eventsProcessed - The processed events array * @private * @returns {EventModel} - Returns the updated parent event */ export declare function updateParentRecurrenceEvent(original: EventModel, fields: EventFields, eventsProcessed: EventModel[]): EventModel; /** * Populates event fields with updated time and recurrence information * Handles both original parent occurrences (recurrenceID) and following parent occurrences (followingId) * * @param {EventModel} updatedEvent - The event object to populate * @param {EventModel} original - The original event * @param {Date} newStartTime - The new start time * @param {Date} newEndTime - The new end time * @param {EventFields} fields - The event field mapping * * @private * @returns {void} */ export declare function populateEventFields(updatedEvent: EventModel, original: EventModel, newStartTime: Date, newEndTime: Date, fields: EventFields): void; /** * Handles recurrence deletion based on occurrence or series selection * * @param {string} title - The title of the alert dialog * @param {string} message - The message to display in the alert dialog * @param {string} confirmText - The text for the confirm button in the alert dialog * @param {object} confirmationDialog - An optional confirmation dialog instance with show and hide methods * @param {Function} confirmationDialog.show - Method to display the confirmation dialog * @param {Function} confirmationDialog.hide - Method to hide the confirmation dialog * @private * @returns {void} */ export declare function showAlertDialog(title: string, message: string, confirmText: string, confirmationDialog: { show: (options: { title: string; message: string; confirmText: string; showCancel: boolean; onConfirm: () => void; }) => void; hide: () => void; }): void; /** * Shows a recurrence alert dialog (edit, delete, or series change) based on the action type * * @param {string} action - The action type: 'recurrenceEdit', 'recurrenceDelete', or 'seriesChange' * @param {object} confirmationDialog - The confirmation dialog instance with show and hide methods * @param {Function} confirmationDialog.show - Method to display the confirmation dialog * @param {Function} confirmationDialog.hide - Method to hide the confirmation dialog * @param {Function} getString - Function to get localized strings * @param {Function} onSelect - Callback when user selects an option * @private * @returns {void} */ export declare function showRecurrenceAlert(action: CrudAction | AlertAction, confirmationDialog: { show: (options: any) => void; hide: () => void; }, getString: (key: string) => string, onSelect: (selectOption: CrudAction) => void): void;