import { CellData, HeaderRowGroup } from '../types/internal-interface'; import { HeaderRowConfig, HeaderRowOption, TimeScaleProps } from '../types/scheduler-types'; import { WeekRule } from '../types/enums'; /** @private */ export declare class HeaderService { /** * Resolves whether timeline body/header column units are hour-slots or dates. * Mirrors last-level grain of SchedulerHeaderRowsProvider without coupling * to that context (avoids circular dependency with isMonthView). * * @param {HeaderRowConfig[] | undefined} headerRows - Custom header rows. * @param {string} [view] - Active view type string. * @param {boolean} [isTimeScaleEnabled] - Indicates timescale enable or disable. * @returns {boolean} True when column count uses time-scale minor slots. */ static isTimeHeaderVisible(headerRows: HeaderRowConfig[] | undefined, view?: string, isTimeScaleEnabled?: boolean): boolean; /** * Computes the display label for a single date in the header last row. * * @param {Date} date - The date to label. * @param {string} view - Active timeline view type. * @param {string} locale - Locale string for formatting. * @returns {string} Formatted label. */ static computeHeaderCellLabel(date: Date, view: string, locale: string): string; /** * Builds the lightweight per-date rows consumed by the timeline header * (date + isWeekend + display label) from a render-date range. * * Falls back to `[selectedDate]` (or `new Date()`) when `renderDates` is empty, * matching the `useHeaderRows` fallback contract. * * @param {Date[]} renderDates - Active render dates. * @param {Date} selectedDate - Selected date fallback when no render dates exist. * @param {string} view - Active timeline view type. * @param {string} locale - Locale string for formatting. * @param {number[]} workDays - Holds workDays numbers. * @param {string} [timezone] - timezone used to determine the current date. * @returns {Object} Per-date header rows. */ static buildDateRows(renderDates: Date[], selectedDate: Date | undefined, view: string, locale: string, workDays: number[], timezone?: string): { date: Date; isWeekend: boolean; isToday: boolean; label: string; }[]; /** * Weekend / base class metadata for a date-header CellData entry. * * @param {Date} date - Calendar date of the cell. * @param {number[]} workDays - Holds workDays numbers. * @returns {Object} Class metadata. */ static getDateHeaderClassMeta(date: Date, workDays: number[]): { className: string[]; cssClass: string | undefined; }; /** * Resolves last header-row option and builds true last-level `CellData[]`. * * Defaults (no custom `headerRows`): TimelineMonth / month layout → Date; * otherwise Hour (finest work axis). Custom last option follows that option's * grain (Hour expands slots; Date per day; Year/Month/Week from groups). * * @param {Date[]} renderDates - Active render dates. * @param {HeaderRowConfig[]} headerRows - User header row configs. * @param {string} view - Active view type. * @param {string} locale - Locale string. * @param {string} startHour - Day start. * @param {string} endHour - Day end. * @param {TimeScaleProps | undefined} timeScale - Time scale props. * @param {Object} allHeaderGroups - Holds the custom group values. * @param {number[]} workDays - Holds workDays numbers. * @returns {CellData[]} Last-level track cells. */ static buildHeaderLastLevelCells(renderDates: Date[], headerRows: HeaderRowConfig[], view: string, locale: string, startHour: string, endHour: string, timeScale: TimeScaleProps | undefined, allHeaderGroups?: { Year?: HeaderRowGroup[]; Month?: HeaderRowGroup[]; Week?: HeaderRowGroup[]; }, workDays?: number[]): CellData[]; /** * One `dateHeader` CellData per render date (Date-row / TimelineMonth last track). * * @param {Date[]} renderDates - Active render dates. * @param {string} view - Active timeline view type. * @param {string} locale - Locale for labels. * @param {number[]} workDays - Holds workDays numbers. * @returns {CellData[]} Date-grained last-level cells. */ private static buildDateLevelCells; /** * Finest hour/slot last track: one cell per date × `getSlotMetadata` minor slot. * * @param {Date[]} renderDates - Active render dates. * @param {string} startHour - Day start (HH:mm). * @param {string} endHour - Day end (HH:mm). * @param {TimeScaleProps | undefined} timeScale - Active time scale (interval / slotCount). * @param {number[]} workDays - Holds workDays numbers. * @returns {CellData[]} Slot-expanded last-level cells. */ private static buildHourLevelCells; /** * Year / Month / Week last-row groups as col-spanned `dateHeader` cells. * * @param {HeaderRowGroup[]} groups - Precomputed groups for the last option. * @param {number[]} workDays - Holds workDays numbers. * @returns {CellData[]} Group-grained last-level cells. */ private static buildGroupLevelCells; /** * Builds the Year/Month/Week group map for the active header-row options. * Only options present in `headerRows` are populated; absent options are omitted. * * @param {HeaderRowConfig[]} headerRows - User header row configs. * @param {Date[]} renderDates - Active render dates. * @param {string} locale - Locale string. * @param {WeekRule} weekRule - Week numbering rule. * @param {number} firstDayOfWeek - First day of the week (0-6). * @returns {Object} Map keyed by option name. */ static buildAllHeaderGroups(headerRows: HeaderRowConfig[], renderDates: Date[], locale: string, weekRule: WeekRule, firstDayOfWeek: number): { Year?: HeaderRowGroup[]; Month?: HeaderRowGroup[]; Week?: HeaderRowGroup[]; }; static generateHeaderRowGroups(renderDates: Date[], option: HeaderRowOption, locale?: string, weekRule?: WeekRule, firstDayOfWeek?: number): HeaderRowGroup[]; } export default HeaderService;