UNPKG

@mindfiredigital/pivothead

Version:

PivotHead is a powerful and flexible library for creating interactive pivot tables in JavaScript applications. It provides a core engine for data manipulation and, in the future, will be compatible with wrappers for React, Vue, Svelte, and Angular, making

52 lines 2.05 kB
import { PivotEngine } from './pivotEngine'; import type { FileConnectionResult, CSVParseOptions, JSONParseOptions, ConnectionOptions, DataRecord } from '../types/interfaces'; export type { FileConnectionResult, CSVParseOptions, JSONParseOptions, ConnectionOptions, }; /** * Service class for handling local file connections */ export declare class ConnectService { private static workerPool; /** * Opens a file picker for CSV files and imports data into the pivot engine */ static connectToLocalCSV(engine: PivotEngine<DataRecord>, options?: ConnectionOptions): Promise<FileConnectionResult>; /** * Opens a file picker for JSON files and imports data into the pivot engine */ static connectToLocalJSON(engine: PivotEngine<DataRecord>, options?: ConnectionOptions): Promise<FileConnectionResult>; /** * Generic method to connect to any supported file type */ static connectToLocalFile(engine: PivotEngine<DataRecord>, options?: ConnectionOptions): Promise<FileConnectionResult>; /** * Processes a CSV file and updates the pivot engine * Routes to the appropriate tier based on file size. */ private static processCSVFile; /** * Processes a CSV file using WebAssembly for maximum performance */ private static processCSVFileWithWasm; /** * Processes large CSV files using Streaming + WASM chunks * Optimized for files > 8MB */ private static processCSVFileWithStreamingWasm; /** * Processes a CSV file using Web Workers and streaming */ private static processCSVFileWithWorkers; /** * Processes a JSON file and updates the pivot engine */ private static processJSONFile; /** * Creates a summary of the import result */ static createImportSummary(result: FileConnectionResult): string; /** * Shows a browser notification for import results */ static showImportNotification(result: FileConnectionResult): void; } //# sourceMappingURL=connectService.d.ts.map