import { CSSProperties } from 'react'; import { EventModel, SchedulerResource, TimeScaleProps } from '../types/scheduler-types'; import { ProcessedEventsData } from '../types/internal-interface'; /** * PositioningService provides methods for calculating event positions and styles * for rendering in the Scheduler component. * * @private */ export declare class PositioningService { /** * Calculates the position and dimensions for an event * * @param {ProcessedEventsData} eventInfo - The event information * @param {TimeScaleProps} timeScale - The time scale configuration * @param {string} startHour - The start hour of the scheduler * @param {string} endHour - The end hour of the scheduler * @param {number} [cellHeight] - Optional custom cell height. If not provided or 0, falls back to ROW_HEIGHT * @returns {CSSProperties} CSS properties for positioning */ static calculateEventPosition(eventInfo: ProcessedEventsData, timeScale: TimeScaleProps, startHour: string, endHour: string, cellHeight?: number): CSSProperties; /** * Determines if an event overflows the visible area * * @param {ProcessedEventsData} eventInfo - The event information * @param {Date[]} renderDates - The dates being rendered * @param {[number, number]} startHourTuple - The start hour of the scheduler * @param {[number, number]} endHourTuple - The end hour of the scheduler * @returns {Object} Overflow direction indicators */ static getOverflowDirection(eventInfo: ProcessedEventsData, renderDates: Date[], startHourTuple?: [number, number], endHourTuple?: [number, number]): { isOverflowLeft: boolean; isOverflowRight: boolean; isOverflowTop: boolean; isOverflowBottom: boolean; }; /** * Calculates position styles based on event information and type * * @param {ProcessedEventsData} eventInfo - The event information * @param {Date[]} renderDates - The dates being rendered in the current view * @param {boolean} groupByDate - Specifies whether to group events by date. * @returns {CSSProperties} CSS properties for positioning */ static calculatePositionStyles(eventInfo: ProcessedEventsData, renderDates: Date[], groupByDate?: boolean): CSSProperties; /** * Calculates the top position for an event * * @param {Date} startTime - The event start time * @param {TimeScaleProps} timeScale - The time scale configuration * @param {string} startHour - The start hour of the scheduler * @param {number} [cellHeight] - Optional custom cell height. If not provided or 0, falls back to ROW_HEIGHT * @returns {string} The top position as a CSS value * * **Note on Dynamic Cell Heights:** * The cellHeight parameter allows this method to adapt to CSS customizations * of cell dimensions. When cellHeight is provided and non-zero, it is used * instead of the hardcoded ROW_HEIGHT constant. This ensures that event * positioning correctly accounts for custom cell heights applied via CSS. */ static calculateTopPosition(startTime: Date, timeScale: TimeScaleProps, startHour: string, cellHeight?: number): string; /** * Calculates the height of an event * * @param {ProcessedEventsData} eventInfo - The event information * @param {TimeScaleProps} timeScale - The time scale configuration * @param {string} startHour - The start hour of the scheduler * @param {string} endHour - The end hour of the scheduler * @param {number} [cellHeight] - Optional custom cell height. If not provided or 0, falls back to ROW_HEIGHT * @returns {string} The height as a CSS value * * **Note on Dynamic Cell Heights:** * The cellHeight parameter enables this method to correctly calculate event * heights based on actual DOM cell dimensions rather than hardcoded constants. * This is essential for supporting CSS-customized cell heights (e.g., 100px cells). */ static calculateHeight(eventInfo: ProcessedEventsData, timeScale: TimeScaleProps, startHour: string, endHour: string, cellHeight?: number): string; /** * Calculates the width of an event that spans multiple days * * @param {ProcessedEventsData} eventInfo - The event information * @param {Date[]} renderDates - The dates being rendered * @param {boolean} groupByDate - Specifies whether to group events by date. * @returns {string} The width as a CSS value */ private static calculateEventWidth; static setIndexPosition(sharedPositionMap: Map, date: Date, positionIndex: number): Map; /** * Initializes position maps for event rendering. * Creates a shared position map when no resources are configured, * or prepares the per-resource map structure when resources are present. * * @param {Date[]} renderDates - The dates to initialize position maps for * @param {boolean} usePerResourcePositioning - Whether to use per-resource position maps * @returns {Object} The initialized maps with sharedPositionMap and positionMapsPerResource */ static initializePositionMaps(renderDates: Date[], usePerResourcePositioning: boolean): { sharedPositionMap: Map | undefined; positionMapsPerResource: Map>; }; /** * Gets or creates the position map for an event based on its resource key. * When per-resource positioning is enabled, creates a composite key from * all resource field values to identify the correct position map. * * @param {EventModel} event - The event to get position map for * @param {SchedulerResource[]} resources - The scheduler resources * @param {Map>} positionMapsPerResource - Map of position maps per resource key * @param {Date[]} renderDates - The dates being rendered * @param {Map} sharedPositionMap - The shared position map when not using per-resource positioning * @returns {Map} The position map for the event */ static getPositionMapForEvent(event: EventModel, resources: SchedulerResource[], positionMapsPerResource: Map>, renderDates: Date[], sharedPositionMap: Map | undefined): Map; }