/** * Derives the sorting information for a column based on the type of the input value. * * @param {import('./types').SortableColumn} value - The value that determines the sorting behavior of the column. * @returns {import('./types').ColumnSorter} An object containing the 'name' of the column and a 'sorter' function. * @throws {Error} Throws an error if the value type is not supported or the value format is invalid. */ export function deriveSortableColumn(value: import("./types").SortableColumn): import("./types").ColumnSorter; /** * Creates a deep scan sample object that contains a union of all keys from all * objects in the array, pulling the values from the last item that contains the key. * * @param {Array} data - An array of objects to deep scan and collect sample values. * @returns {Object} A sample object consolidating all unique keys with their latest non-null values. */ export function getSample(data: Array, deepScan?: boolean): Object; /** * Derives a unique list of column names from an array of data objects. * Each data object represents a row and this function compiles a list of all unique property keys * present across these objects. * * @param {Object[]} data - The array of data objects to analyze for column names. * @returns {string[]} - An array of strings representing the unique column names found across all data objects. */ export function deriveColumns(data: Object[], options: any): string[]; /** * Derives the data types of columns based on the data provided in an array of objects. * The function assumes that all values of a single field (column) are of the same type. It uses * the first object in the data array as a reference for the field names. Each field is categorized * as either 'string' or 'number' based on whether any of the field values in the data set are non-numeric. * * @param {Object[]} data - The array of data objects to assess for column data types. * @returns {Object} - An object with keys being the data types ('string' & 'number') and values * being arrays of field names that correspond to that data type. */ export function deriveDataTypes(data: Object[]): Object; /** * Infers the data type of a set of values by examining the values in the array. * Assumes all values in the array should have the same type, unless they are 'null'. * If multiple types are detected (excluding 'null'), the function will return 'mixed'. * If all values are 'null', it returns 'null', and it returns 'undefined' for an empty array. * * @param {Array} values - An array of values for which the data type is to be inferred. * @returns {string} - A string representing the inferred data type. Possible values are * 'undefined', 'null', 'mixed', or any data type returned by the getType function. */ export function inferDataType(values: any[]): string; /** * Adds a formatter function to each column in the array based on the column type. If a formatter * function is already present, it will not be overwritten. The formatter is created based on the * override formatter if present, or the column type and language. * * @param {Array} columns - The array of column metadata to add formatters to. * @param {string} language - The language to use for formatting. * @returns {Array} - The array of column metadata with formatters added. */ export function addFormatters(columns: Array, language: string): Array; /** * Converts an array of action names to an array of action objects. * * @param {Array} input - The input to convert to actions. * @returns {Array} - The converted actions. */ export function convertToActions(input: Array): Array; /** * Adds actions to the column metadata. This function updates the columns array in place. * * @param {Array} columns - The column metadata to update. * @param {Array} input - The actions to add to the column metadata. * @returns {Array} - The updated column metadata. */ export function deriveActions(columns: Array, input: Array): Array; /** * Derives column metadata from the data to be used in a tabular component. * * @param {Array} data - The data to derive column metadata from. * @param {Object} [options] - The options to use when deriving column metadata. * @returns {Array} - The derived column metadata. */ export function deriveMetadata(dataArray: any, options?: Object): Array; export function inferScale(values: any): any; /** * Adds a `scale` property to each column definition. * * @param {Array} columns - Column definitions (from deriveColumns / deriveMetadata). * @param {any[]} data - Source rows. * @returns {Array} Column definitions with `scale` added. */ export function addScales(columns: Array, data: any[]): Array; /** * Merges user-provided enhancements into auto-derived column definitions. * Enhancements are matched by `name` and merged (user values win). * Enhancements for unknown column names are appended as synthetic columns. * * @param {Array} derived - Auto-derived column definitions. * @param {Array} enhancements - User-provided overrides/additions. * @returns {Array} Merged column definitions. */ export function mergeColumnEnhancements(derived: Array, enhancements: Array): Array; /** * Full column definition pipeline: derive → format → scale → merge enhancements. * * Produces column descriptors suitable for use in Table, TreeTable, and chart * components. Each column gets: name, type, scale, sortable, filterable, fields, * formatter — plus any user-supplied properties from `enhancements`. * * @param {any[]} data - Source rows. * @param {Object} [options] - Options forwarded to deriveColumns / addFormatters. * @param {Array} [options.enhancements=[]] - Per-column overrides keyed by name. * Use to override scale, add a label, attach a custom formatter, etc. * @param {string} [options.language='en-US'] - Locale for formatters. * @param {string} [options.scanMode='fast'] - 'fast' (first row) or 'deep' (all rows). * @returns {Array} Column definitions with scale and formatters. */ export function deriveColumnDefs(data: any[], options?: { enhancements?: Object[] | undefined; language?: string | undefined; scanMode?: string | undefined; }): Array;