/** * This Source Code is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * Copyright (c) Infonomic Company Limited */ import type { CollectionDefinition, ColumnDefinition, ColumnFormatter, RelationField } from '@byline/core'; /** * Pure text projection of a relation cell: the target's title for a single * relation, or "A, B, +N more" for `hasMany`. Unresolved targets are skipped; * an all-empty cell yields `null` (the formatter renders a muted dash). * * `displayField` is the resolved chain * (`field.displayField` → target `useAsTitle` → first text field). */ export declare function formatRelationCellText(field: Pick, value: unknown, displayField: string | null): string | null; /** * The built-in `{ component }` column formatter for a `relation` field. Resolves * the target collection's `useAsTitle` at render time and renders the cell text. */ export declare function relationColumnFormatter(field: RelationField): ColumnFormatter; /** * Return a copy of `columns` with {@link relationColumnFormatter} applied to any * `relation`-typed column that doesn't already declare its own formatter, so * relation cells render target titles by default. Other columns are untouched. */ export declare function applyRelationColumnFormatters(columns: ColumnDefinition[], definition: CollectionDefinition): ColumnDefinition[];