import { type DateSlot, type MeasureSlot, type MoneySlot, type SelectSlot, type ShapeBaseProps, type ShapeFrameProps } from "./shape_frame"; /** * ONE DAY OF THE RUN — the day, and the sheet filed on it where there is one. * * It is what the frame's rows ARE here, because the register is COMPLETE: the * days nobody filed against have no row in the data and are exactly what the * reader is looking for. A day carrying two sheets is two of these under one * date rather than one of them dropped — a register that swallowed the second * would be a book that quietly disagrees with its own source. */ export interface DaySheetDay { /** The day, as an ISO date — the run's key and, for a day with no sheet, the row's. */ day: string; /** The sheet filed for that day, or `null` where none was. */ row: T | null; } /** The window the run covers; either end unstated is derived from the rows. */ export interface DayWindow { from: string | null; to: string | null; } /** * THE DAY SHEET — the DAY is the record: a yard report, a shift log, a day's * despatch. *"What happened on the twelfth, and what is still open today?"* * * The register is a run of DAYS and it is CALENDAR-COMPLETE: every day of the * window is a line, including the ones nothing was filed on, and an empty day * says so on its own line. Drawn from the filed rows alone, the one day the * reader is hunting — the day nobody wrote up — is the day that is not there, * and a gap in a list of dates reads as a weekend rather than as an omission. * * TODAY LEADS. A log is read backward like every other book, so the run is * newest first and ends at today — unless the book itself holds a later day, * which is data and is never dropped to keep a default true. * * The record is a PAGE: a day composes the heterogeneous logs filed under it — * the loads, the takings, the incidents — which is a page's worth of reading and * not a drawer's. Only a day that HAS a sheet is a door, and only such a day can * be ticked, so the selection bar's count and the rows a bulk verb is handed are * one set. */ export interface DaySheetProps extends ShapeBaseProps, Pick, "above" | "totals"> { /** The `when` role — the day this sheet is FOR, and the subject of its row. */ day: DateSlot; /** * THE WINDOW THE RUN COVERS — the period control's own, where the screen * carries one. * * Unstated, or stated with an open end, the run is derived from the rows and * the clock: back to the earliest sheet, forward to today. Either way it is * WIDENED to cover every row in hand, because a sheet outside the window is * still a sheet and a register that hid it would be short with nothing on the * surface saying so. */ period?: DayWindow; /** The `lifecycle` role — where the day stands: open, counted, closed. */ state?: SelectSlot; /** The `measure` role and the limit it is read against — the day's load * against what the operation can take. */ level?: MeasureSlot; /** The `amount` role — what the day came to. */ amount?: MoneySlot; /** The `category` role — what KIND of day this was: the shift, the closure, * the weather call. */ note?: SelectSlot; /** The clock the run ends at; the real one by default. */ now?: Date; } /** * THE RUN, RESOLVED — every day of the window newest first, each carrying the * sheet filed on it. * * Its own function because it is the shape's whole claim and it is arithmetic: * which days are drawn, in what order, and that no row is lost. A day is keyed * by its ISO date, so the descending sort is a text sort. */ export declare function daySheetRun(rows: readonly T[], dayOf: (row: T) => string, window: DayWindow | undefined, now: Date): DaySheetDay[]; export declare function DaySheet(props: DaySheetProps): import("react").JSX.Element;