import { FileRejection } from "@mantine/dropzone"; import { FormControl } from "@mongez/react-form"; import { UploadingFile } from "./UploadingFile"; import { UploadingFilesQueue } from "./UploadingFileQueue"; import { DropzoneInputProps, Fileable } from "./types"; export declare class DropzoneManager { /** * Uploading files list */ uploadingFiles: UploadingFile[]; /** * Set uploading files list state update */ setUploadingFiles: (files: UploadingFile[]) => void; /** * Files List * Already uploaded */ filesList: Fileable[]; /** * Form control */ formControl: FormControl; /** * Dropzone input props */ props: DropzoneInputProps; /** * Uploading files queue */ uploadingFilesQueue: UploadingFilesQueue; /** * Dropzone manager id */ id: string; /** * Event name */ eventName: string; /** * Default props */ defaultProps: Partial; /** * Constructor */ constructor(props: DropzoneInputProps); /** * Add to files list */ addToFilesList(file: Fileable): void; /** * Set files list */ setFilesList(files: Fileable[]): void; /** * Get input wrapper props */ get inputWrapperProps(): { label: any; description: any; hint: any; required: any; error: any; id: any; }; /** * Get accepted files types */ get acceptedFiles(): any; /** * Update form control value */ updateFormControlValue(): void; /** * Called when files are rejected */ onReject(files: FileRejection[]): void; /** * Start uploading files */ uploadFiles(files: File[]): Promise; /** * Remove uploading file from the queue */ removeUploadingFile(file: UploadingFile): void; /** * Start uploading */ upload(): Promise; /** * Validate uploading files */ protected validateUploadingFiles(files: File[]): Promise; /** * Get max files */ get maxFiles(): number; /** * Determine whether the files will be uploaded in chunks */ get shouldChunkFiles(): any; /** * Whether to upload files in parallel or not */ get shouldUploadInParallel(): any; /** * Get max uploaded files in parallel */ get maxParallelUploads(): number; /** * Get max chunk size */ get maxChunkSize(): number; /** * Get max parallel chunks */ get maxParallelChunks(): number; /** * Get currently uploading files from the queue */ getCurrentUploadingFiles(): UploadingFile[]; /** * Listen to uploading files change */ onUploadingFilesChange(callback: (state: "idle" | "processing", dropzoneManager: this) => void): import("@mongez/events").EventSubscription; /** * Called when file state is changed */ protected triggerUploadingFilesChange(file: UploadingFile): void; /** * Listen when any file upload state is changed */ onUploadChange(callback: (file: UploadingFile, dropzoneManager: this) => void): import("@mongez/events").EventSubscription; /** * Trigger the queue state change */ triggerQueueStateChange(state: "idle" | "processing"): void; /** * Listen to queue state change */ onQueueStateChange(callback: (state: "idle" | "processing", dropzoneManager: this) => void): import("@mongez/events").EventSubscription; /** * Trigger files list change */ triggerFilesListChange(): void; /** * Listen to files list change */ onFilesListChange(callback: (files: Fileable[], dropzoneManager: this) => void): import("@mongez/events").EventSubscription; /** * Remove file from files list */ removeFile(file: Fileable): void; } //# sourceMappingURL=DropzoneManager.d.ts.map