import { OnyxDateFormatOptions, OnyxNumberFormatOptions } from '../../../i18n/index.js'; import { SelectOption } from '../../../index.js'; import { OnyxIconProps } from '../../OnyxIcon/types.js'; import { DataGridEntry } from '../types.js'; import { DataGridFeatureDescription, TypeRenderer, TypeRenderMap } from './index.js'; export declare const FALLBACK_RENDER_VALUE = "-"; /** * Allows for creating `TypeRenderer` with typed options. * These options are then made available via the column configuration. * * While typeRenderer can be defined without this helper, they cannot define any options. */ export declare const createTypeRenderer: (typeRenderer: TypeRenderer) => Readonly>; export type NumberCellOptions = { format?: OnyxNumberFormatOptions; /** * Fallback value to display when the value is undefined or invalid. * Defaults to "-" if not provided. */ fallback?: string; }; export declare const numberFormatter: (value: TEntry[keyof TEntry] | undefined, opts?: NumberCellOptions) => string; export declare const NUMBER_RENDERER: Readonly>; export type SelectCellOptions = { listLabel?: string; options?: SelectOption[]; /** * Fallback value to display when the value is undefined or invalid. * Defaults to "-" if not provided. */ fallback?: string; }; export declare const SELECT_RENDERER: Readonly>; export type StringCellOptions = { /** * Fallback value to display when the value is undefined. * Defaults to "-" if not provided. */ fallback?: string; }; export declare const stringFormatter: (value: TEntry[keyof TEntry] | undefined, opts?: StringCellOptions) => string; export declare const STRING_RENDERER: Readonly>; export type DateCellOptions = { format?: OnyxDateFormatOptions; /** * Fallback value to display when the value is undefined or invalid. * Defaults to "-" if not provided. */ fallback?: string; }; export declare const dateFormatter: (value: TEntry[keyof TEntry] | undefined, opts?: DateCellOptions) => string; export declare const timeFormatter: (value: TEntry[keyof TEntry] | undefined, opts?: DateCellOptions) => string; export declare const DATE_RENDERER: Readonly>; export declare const DATETIME_RENDERER: Readonly>; export declare const TIME_RENDERER: Readonly>; export declare const TIMESTAMP_RENDERER: Readonly>; export declare const SKELETON_RENDERER: Readonly>; export type BooleanCellOptions = { /** * Icon to display when the value is truthy. */ truthy?: BooleanCellIconOptions; /** * Icon to display when the value is falsy. */ falsy?: BooleanCellIconOptions; }; export type BooleanCellIconOptions = Partial & { /** * Label to display (visually hidden) for e.g. screen readers. * * @default "Yes" / "No" label depending on the current locale */ label?: string; }; export declare const BOOLEAN_RENDERER: Readonly>; export declare const createRenderer: (features: DataGridFeatureDescription, symbol>[]) => { /** * Returns a renderer for any given component and type. * Uses the fallbackRenderer if necessary. */ getFor: [TComponent]>>(component: TComponent, type?: PropertyKey) => TRenderer; };