import { type ColorName } from "./colors"; import { type FigureUnit, type ShapeBaseProps, type TextSlot } from "./shape_frame"; import type { TotalsLineItem } from "./totals_line"; import { type GroupFoldKind } from "./group_fold"; /** * THE GROUP REGISTER — rows that are a GROUP BY. A row is a KEY — a member, an * option, a period — and every column beside it is an aggregate over the set that * key holds; the door opens the SET behind the figure rather than a record. * * IT FOLDS THE WHOLE READ, so it takes no `more` and no `expected`. ITS ROWS ARE * NOT RECORDS, so there is nothing to tick and nothing a row's own verb could be * handed. */ export interface GroupRegisterProps extends Omit, "record" | "selection" | "rowActions" | "rowAction" | "more" | "expected"> { /** The `subject` role — what the rows are folded BY, and what each key is called. */ subject: GroupSubject; /** The `amount` role, folded — what the set behind each key is worth. */ amount?: GroupFigure; /** The `measure` role, folded — how much of it there is. */ measure?: GroupFigure; /** WHAT ONE ROW BEHIND A FIGURE IS CALLED. Given, a group opens on the SET it * holds; unbound the rows are inert. */ member?: TextSlot; /** What the register adds up to, over the MEMBER rows behind the groups in view * — never over the groups, which are already aggregates. */ totals?: (members: readonly T[]) => readonly TotalsLineItem[]; } /** WHAT THE ROWS ARE FOLDED BY. `by` and `name` are two values because they are * two: a register folded by month groups on the ISO key and reads "October 2026". */ export interface GroupSubject { /** The column's heading — the field's own label. */ label: string; /** What this row has in common with the rest of its group. */ by: (row: T) => string; /** What one key is CALLED. */ name: (key: string) => string; /** Read the keys in their OWN order — what a register of PERIODS takes. As TEXT, * so a key that has to sort is an ISO date or a zero-padded code. Unstated, the * register is ranked by the figure it is read for, largest first. */ order?: "asc" | "desc"; /** The colour this key already wears elsewhere in the product. Unstated, the * groups take one hue family's ramp: they are ONE dimension, so the shade only * orders them and the label carries the identity. */ color?: (key: string) => ColorName | undefined; } /** ONE FIGURE THE GROUP REGISTER FOLDS. It takes no `render`: a fold has no row to * hand over — and đồng and dollars do not add, so the currency belongs to the * column, exactly once. */ export type GroupFigure = { /** The column's heading — the field's own label. */ label: string; value: (row: T) => number | null | undefined; /** How the rows come to one figure — the SUM by default. */ fold?: GroupFoldKind; } & FigureUnit; export declare function GroupRegister(props: GroupRegisterProps): import("react").JSX.Element;