/** * Factory function for `ReactiveDataSet`. * * @param {any[]} [data=[]] - Initial source rows. * @returns {ReactiveDataSet} */ export function reactiveDataset(data?: any[]): ReactiveDataSet; export class ReactiveDataSet { /** * @param {any[]} data - Initial source rows. */ constructor(data?: any[]); /** * Reactive computed result of filter + transforms + sort. * Bind to this in templates instead of calling `.select()`. */ get rows(): any; /** * Reactive derived column definitions: name, type, scale (discrete|continuous), * sortable, filterable, fields, formatter — merged with any `withColumns` overrides. * * Re-computes when source data or column enhancements change. * Bind to this in templates for Table / TreeTable column specs. */ get columns(): Object[]; /** * Set the filter predicate. Replaces any previous filter. * @param {Function|null} fn */ where(fn: Function | null): this; /** * Append a row transform. Each call to `apply` adds a new stage. * @param {Function} fn */ apply(fn: Function): this; /** * Set sort fields. Replaces any previous sort. * @param {...string} fields */ sortBy(...fields: string[]): this; /** * Set per-column enhancements / overrides for the reactive `columns` property. * * Each entry is matched by `name` and merged into the auto-derived column def. * Unknown names are appended as synthetic columns (useful for action columns). * * @param {Array} enhancements - e.g. [{ name: 'revenue', label: 'Revenue ($)', scale: 'continuous' }] * @param {Object} [options] - Options forwarded to deriveColumnDefs (language, scanMode). */ withColumns(enhancements: Array, options?: Object): this; /** Clear the current filter. */ clearFilter(): this; /** Clear all transforms. */ clearTransforms(): this; /** * Replace the entire source dataset. * @param {any[]} rows */ setData(rows: any[]): this; /** * Append a single row to the source. * @param {any} row */ push(row: any): this; /** * Remove rows matching the predicate from the source. * @param {Function} predicate */ remove(predicate: Function): this; /** * Update rows matching the predicate with patch (object or function). * @param {Function} predicate * @param {Object|Function} patch */ update(predicate: Function, patch: Object | Function): this; /** Return a plain snapshot of the current reactive result (non-reactive copy). */ snapshot(): any[]; #private; }