/** * Nesting helpers * * Convert flat tabular shapes into the nested children-array shape consumed * by hierarchical components (TreeTable, Tree). * * nestByPath — rows with a separator-delimited path field * nestByColumns — rows with one or more group-by columns */ /** * Convert flat rows that carry a separator-delimited path string into * nested rows with a `children` array. * * Synthesizes intermediate parent rows when a path segment has no own row * — the synthetic row carries only the path-field set to the partial path. * * @param {Array>} rows * @param {{ column: string, separator?: string, keepPath?: boolean }} options * @returns {Array>} */ export function nestByPath(rows: Array>, { column, separator, keepPath }: { column: string; separator?: string; keepPath?: boolean; }): Array>; /** * Convert flat rows into nested rows by grouping on one or more columns. * * Each entry in `columns` produces a level of grouping. Synthesized group * rows carry `__group: true`, the grouped column name on a `__column` key, * and the column value under the column's own field name so cell snippets * can read it normally. * * @param {Array>} rows * @param {string[]} columns * @param {{ groupRowFactory?: (col: string, value: unknown, children: Array) => Record }} [options] * @returns {Array>} */ export function nestByColumns(rows: Array>, columns: string[], options?: { groupRowFactory?: (col: string, value: unknown, children: any[]) => Record; }): Array>;