/** * 资源视图(按月):与日视图同款骨架——冻结左列 + 横向滚动 + sticky 顶部表头。 * * 与日视图的唯一差异: * - 日视图:横轴 = 营业小时槽,cell = 一个小时;booking 通过 overlay 跨 cell 横铺。 * - 资源视图:横轴 = 当月每一天,cell = 一个 (court, date);booking 通过 overlay 在 cell 内 * 垂直 stack 渲染(最多 3 条 + `+N` 溢出 tile)。 * * 性能策略(与日视图对齐): * - cell 是「轻 placeholder」:只渲染背景色 + selected ring + 空 dashed slot/Selected 文本。 * - 所有 booking 卡片 / `+N` tile 由 `BookingOverlay` 单独 absolute 渲染,独立于 grid。 * - 这样 grid 内 DOM 极轻,浏览器每帧 paint/layout 与日视图同档(cell 内含复杂 booking * 卡片时实测每列 ~7ms paint 成本,整月 30 列 → ~150ms;overlay 化后接近零)。 * * 选中:与日视图 `toggleSlot(courtId, hour)` 等价的「`toggleResourceCell(courtId, dateKey)`」。 * 选中态合并到 cell 自身 className(与日视图一致),不插入额外 grid item,避免 CSS Grid 整表 reflow。 */ import React from 'react'; import type { RecordBoardCalendarProps } from '../../../types'; declare type ResourceCellPick = { courtId: string; dateKey: string; }; export declare const BookingCalendarResourceView: React.MemoExoticComponent; declare function BookingCalendarResourceViewInner({ calendarProps, isLight, anchorDate, monthDays, slotColWidth, bookings, visibleCourts, visibleCourtRows, hourSlots, slotStepHours, handleGridDropMove, openBookingDetail, setDraggingItem, setCollapsedGroups, overflowPopover, setOverflowPopover, setOverflowListModal, overflowPanelRef, resourceMonthScrollToTodayToken, resourceDayHeaderRemaining, toggleResourceCell, selectedResourceCells, }: { calendarProps: RecordBoardCalendarProps; isLight: boolean; anchorDate: Date; monthDays: Date[]; slotColWidth: number; bookings: any[]; visibleCourts: any[]; visibleCourtRows: any[]; hourSlots: number[]; slotStepHours: number; handleGridDropMove: (dateKey: string, courtId?: string | null) => void; openBookingDetail: (item: any) => void; setDraggingItem: (item: any) => void; setCollapsedGroups: React.Dispatch>; overflowPopover: any; setOverflowPopover: React.Dispatch>; setOverflowListModal: React.Dispatch>; overflowPanelRef: React.RefObject; /** 切入资源视图时递增,用于将横向滚动对准「今天」列 */ resourceMonthScrollToTodayToken: number; /** 顶部表头当日空闲率(与日视图 freeRatio 同口径) */ resourceDayHeaderRemaining: Record; /** 与日视图 `toggleSlot` 同义:点击 cell 切换 (court, date) 的整天选中态 */ toggleResourceCell: (courtId: string, dateKey: string) => void; /** 当前所有「资源月视图」选中的 cell(同 court 连续多天 → SelectionBar 显示 Block/Create) */ selectedResourceCells: ResourceCellPick[]; }): React.JSX.Element; export {};