/** * Pure rendering utilities for the business process grid. * * Converts business process data with record age distribution into table-ready * row objects for makeTable() rendering. Reuses the record-age-grid columns * and the filled/empty circle metaphor from availability-grid.ts. * * Designed for reuse across commands — any command that needs to display * business processes with year-level record existence can use this component. * * @module utils/formatting/business-process-grid */ import type { RecordAgeDistribution, YearRecordAge } from '../../services/ObjectDescribeService.js'; /** * Business process entry for the grid display. * Decoupled from service types so any command can construct this. */ export type BusinessProcessGridEntry = { /** Process name */ name: string; /** Whether the process is active */ isActive: boolean; /** Number of record types using this process */ recordTypeCount: number; /** Per-process record age distribution (optional — omit for processes without data) */ recordAgeDistribution?: RecordAgeDistribution; }; /** * Builds column definitions for the business process grid table. * * Returns: Process Name, Active, Record Types, then year columns + Oldest * from the record age grid. * * @param years - The year entries (used to generate dynamic year columns) * @returns Column definitions for makeTable() */ export declare function buildBusinessProcessColumns(years: readonly YearRecordAge[]): Array<{ key: string; name: string; }>; /** * Builds table-ready row data from business process entries. * * Each process becomes one row with its metadata columns and merged * record age columns (year symbols + oldest date). * * @param processes - Array of business process entries with optional age data * @param years - The year entries (used to fill em dashes for processes without data) * @returns Array of row objects suitable for makeTable() */ export declare function buildBusinessProcessTableData(processes: readonly BusinessProcessGridEntry[], years?: readonly YearRecordAge[]): Array>;