claritykit-svelte
Version:
A comprehensive Svelte component library focused on accessibility, ADHD-optimized design, developer experience, and full SSR compatibility
59 lines • 1.8 kB
TypeScript
import type { FilterConfig, SortConfig, CustomFunction } from '../types';
/**
* Apply filters to data
*/
export declare function applyFilters(data: any[], filters: FilterConfig[], customFilter?: CustomFunction): any[];
/**
* Apply sorting to data
*/
export declare function applySorting(data: any[], sort: SortConfig): any[];
/**
* Apply multiple sort configurations
*/
export declare function applyMultiSort(data: any[], sorts: SortConfig[]): any[];
/**
* Get nested value from object using dot notation
*/
export declare function getNestedValue(obj: any, path: string): any;
/**
* Set nested value in object using dot notation
*/
export declare function setNestedValue(obj: any, path: string, value: any): void;
/**
* Group data by a field
*/
export declare function groupBy<T>(data: T[], field: string): Record<string, T[]>;
/**
* Calculate aggregate values
*/
export declare function aggregate(data: any[], field: string, operation: 'sum' | 'avg' | 'min' | 'max' | 'count'): number;
/**
* Search data across multiple fields
*/
export declare function searchData(data: any[], query: string, fields: string[]): any[];
/**
* Paginate data
*/
export declare function paginate<T>(data: T[], page: number, pageSize: number): {
items: T[];
totalItems: number;
totalPages: number;
currentPage: number;
};
/**
* Export data to CSV
*/
export declare function exportToCSV(data: any[], columns: string[], filename?: string): void;
/**
* Export data to JSON
*/
export declare function exportToJSON(data: any[], filename?: string): void;
/**
* Calculate ADHD-specific metrics
*/
export declare function calculateADHDMetrics(task: any): {
urgency_score: number;
cognitive_load: number;
task_complexity: number;
};
//# sourceMappingURL=data-processing.d.ts.map