import { FilesDropzoneProps } from '../FilesDropzone'; import { FilesProcessorFunction } from './types'; import { ProcessorProps } from './Processor'; type ValueItem = { id: string | number; name: string; }; type FilesProcessorProps = { /** * Function that processes file (uploads, parses, etc.) * * @param file - a file to upload * @param onProgress - a function to be called to indicate progress. Accepts 2 arguments: total progress & current progress * @param registerOnCancel - a function that registers processing cancellation handler */ processFile: FilesProcessorFunction; /** * Called when files are uploaded/reuploaded * * @param results array of results from `processFile` */ onDone: (results: T[]) => void; /** * Files list to display * * `type ValueItem = {id: string | number; name: string;};` */ value?: ValueItem[]; /** * Used in conjunction with `value`. Called when user presses "delete" button. If undefined - no button is shown * @param item */ onDelete?: (item: ValueItem) => void; /** * Fired when file(s) selected for processing */ onStartProcessing?: (files: File[]) => void; /** * Fired when file processing failed or cancelled */ onProcessingFailure?: (file: File, isCancelled?: boolean, error?: Error) => void; /** * Controls if multiple files can be processed */ multiple?: FilesDropzoneProps['multiple']; /** * Array of or comma-separated MIME types/File Extensions to accept * * See `FilesDropzone`'s props */ accept?: FilesDropzoneProps['accept']; /** * Maximum files to accept */ maxFiles?: FilesDropzoneProps['maxFiles']; /** * Maximum file size to accept */ maxSize?: FilesDropzoneProps['maxSize']; /** * Allows custom progress units * @param total total progress value * @param current current progress value */ formatProgress?: ProcessorProps['formatProgress']; className?: string; testId?: string; }; export declare const FilesProcessor: ({ multiple, accept, className, processFile, value, onDone, onDelete, maxFiles, maxSize, formatProgress, onProcessingFailure, onStartProcessing, testId, }: FilesProcessorProps) => JSX.Element; export {}; //# sourceMappingURL=FilesProcessor.d.ts.map