import React from 'react'; import type { ActionObject, ApiObject, ApiString, Payload } from 'jamis-core'; import type { FileRejection } from 'react-dropzone'; import type { FileState, InputFileProps, InputFileX, SchemaApi } from '../types'; export default class FileControl extends React.Component { static defaultProps: Partial; state: FileState; current: InputFileX | null; resolve?: (value?: any) => void; emitValue: any; fileUploadCancelExecutors: Array<{ file: any; executor: () => void; }>; initAutoFill: boolean; static valueToFile(value: string | InputFileX, props: InputFileProps, files?: Array): InputFileX | undefined; dropzone: React.RefObject; constructor(props: InputFileProps); componentDidMount(): void; componentDidUpdate(prevProps: InputFileProps): void; handleDrop(files: Array): void; handleDropRejected(rejectedFiles: FileRejection[], evt: React.DragEvent): void; handleClickFile(file: InputFileX | InputFileX, e: React.MouseEvent): void; downloadTpl(e: React.MouseEvent): void; handleApi(api: SchemaApi, payload?: object): void; handleSelect(): void; startUpload(retry?: boolean): void; toggleUpload(e: React.MouseEvent): void; stopUpload(): void; retry(): void; tick: () => void; sendFile: (file: InputFileX, onComplete: (error: null | string, file?: InputFileX, obj?: InputFileX) => void, onProgress: (progress: number) => void) => Promise; removeFile: (file: InputFileX | InputFileX, index: number) => Promise; clearError: () => void; onChange(changeImmediately?: boolean): Promise; syncAutoFill(): void; uploadFile: (file: InputFileX, receiver: string, params: object, config: Partial | undefined, onProgress: (progress: number) => void) => Promise; uploadBigFile(file: InputFileX, receiver: string, params: object, config: Partial | undefined, onProgress: (progress: number) => void): Promise; _send(file: InputFileX, api: ApiObject | ApiString, data?: any, options?: object, onProgress?: (progress: number) => void, maxRetryLimit?: number): Promise; removeFileCanelExecutor(file: any, execute?: boolean): void; validate(): any; doAction(action: ActionObject, data: object, throwErrors: boolean): void; render(): JSX.Element; } export declare class FileControlRenderer extends FileControl { }