UNPKG

analytica-frontend-lib

Version:

Repositório público dos componentes utilizados nas plataformas da Analytica Ensino

40 lines 1.95 kB
import { type ColumnConfig } from '../TableProvider/index'; /** * Props for the PrintableUsersTable component. */ export interface PrintableUsersTableProps<T extends Record<string, unknown>> { /** Row data shared by both printed tables */ readonly data: T[]; /** Full ordered list of columns as displayed on screen */ readonly columns: ColumnConfig<T>[]; /** * Column index at which to split. The first printed table renders columns * [0, splitAfter] inclusive, the second renders the anchor column followed * by columns [splitAfter + 1, end). * * Example: columns.length = 8, splitAfter = 3 → first table shows cols 0..3, * second shows anchor + cols 4..7. */ readonly splitAfter: number; /** Key of the anchor column (usually "name") repeated as first column of the second half */ readonly anchorColumnKey: string; } /** * Renders the same row data as two stacked tables optimized for PDF print. * * On screen the component is hidden (`hidden print:block`); during * `window.print()` it replaces the single scrollable TableProvider, so wide * tables no longer clip columns to the viewport width. An inline `<style>` * tag embeds the `@media print` rules so the component is drop-in with no * extra CSS wiring in the consumer. * * The anchor column (by convention "name") is repeated as the first column * of the second printed table so the reader can match rows across halves. * * NOTE: Set `@page { size: A4 landscape }` (or equivalent) in the host app * global print stylesheet — this component does not define page orientation * to avoid conflicts with other print rules. */ declare function PrintableUsersTable<T extends Record<string, unknown>>({ data, columns, splitAfter, anchorColumnKey, }: PrintableUsersTableProps<T>): import("react/jsx-runtime").JSX.Element | null; export default PrintableUsersTable; //# sourceMappingURL=PrintableUsersTable.d.ts.map