import { type ReactNode } from "react"; import { type EntryGridPosition } from "./entry_grid"; import { type MeasureFigure, type SelectSlot, type ShapeBaseProps, type ShapeFigures, type ShapeRecord, type TextSlot } from "./shape_frame"; /** * THE AXIS ACROSS THE TOP — the positions the grid runs, and which one each row * falls in. The positions are STATED rather than folded out of the rows: what a * position is called is the FIELD's answer, and a complete axis includes the * positions no row reached, which is the whole reason a matrix is read. */ export interface EntryAxis { /** The field's own label — what the axis IS, for anyone listening. */ label: string; /** The columns, in the order they are read. */ positions: readonly EntryGridPosition[]; /** Which position this row's entry falls in, as a position key. */ value: (row: T) => string | null | undefined; } /** * THE ENTRY MATRIX — one value per (subject, period): a timesheet, a production * plan, a month of readings taken per unit. *"What is still to fill in, and what * does it come to?"* * * THE ROW IS A SUBJECT AND THE CELL IS THE RECORD. The entity's rows are pivoted * here and the grid's own rows derived, and nothing is created from this screen: * a new entry would be filed under whichever cell the reader was not looking at. * * BLANK MEANS NOTHING WAS DUE, NEVER ZERO. A pair with no entry draws the kit's * absence mark, is not summed and is not a door — a driver with no shift on * Sunday did not drive zero kilometres. * * Where the screen offers {@link EntryMatrixProps.fill} the cell IS the editor, * exactly as a register's quick column is. Where it does not, the cell is a * reading and the press is the door onto the entry behind it. */ export interface EntryMatrixProps extends Omit, "selection" | "search" | "query" | "tab" | "filters" | "action" | "rowActions" | "rowAction" | "more" | "expected"> { /** The `identity` role — the subject each row of the grid is. */ subject: TextSlot; /** The `when` or `category` role — the positions across the top. */ across: EntryAxis; /** * The `measure` role — the figure the pair holds, and the one thing on this * screen that ADDS UP: bind it and the grid closes both of its edges. */ value?: MeasureFigure; /** The `lifecycle` role — the state the pair is in, worn as the option's own chip. */ state?: SelectSlot; /** The `category` role — what qualifies the cell, under its value. */ note?: SelectSlot; /** * THE CONTROL THAT FILLS ONE CELL, drawn in place of its reading. * * Which control a datum takes is the datum's own answer, and the screen that * offers one is the screen that says what a write means. Handed none, the grid * is read and its cells are doors; a row the caller answers with nothing keeps * its reading. */ fill?: (row: T) => ReactNode; /** The band over the grid — what the entries in view count and add up to. */ above?: ShapeFigures; /** The record one entry opens — a drawer that steps ◀ ▶ over the cells in view. */ record?: ShapeRecord; } export declare function EntryMatrix(props: EntryMatrixProps): import("react").JSX.Element;