From d72f0b67d23975f29cee88a6e8c9a58d1b436da3 Mon Sep 17 00:00:00 2001 From: Paul Valerie GOMA Date: Fri, 25 Jul 2025 11:19:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8F=B7=EF=B8=8F=20=20FileUpload=20compone?= =?UTF-8?q?nt=20interface=20file=20updated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/file/IVFileUpload.type.ts | 27 ++++++++++++++++-------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/components/file/IVFileUpload.type.ts b/src/components/file/IVFileUpload.type.ts index 707f95c..e77f0a9 100644 --- a/src/components/file/IVFileUpload.type.ts +++ b/src/components/file/IVFileUpload.type.ts @@ -181,18 +181,27 @@ export interface FileUploadProps { } /** - * Extended interface for a customizable FileUpload component. + * Extended interface for the customizable VFileUpload component. * - * Combines selected properties from IFile and FileUploadProps, - * while omitting and overriding specific ones for more control. + * This interface merges selected properties from: + * - `IFile`: your internal file-related interface + * - `FileUploadProps`: the native PrimeVue component props + * + * It omits and overrides specific properties to provide better control + * over the component's behavior and to avoid conflicts with internal logic. */ -export default interface IVFileUpload extends - Partial>, - Partial> { +export default interface IVFileUpload + extends Partial>, // Exclude 'accept' and 'error' from IFile + Partial> // Exclude 'auto', 'mode', and 'multiple' from PrimeVue +{ /** - * If true, enables the advanced mode of the file upload component, - * which may include features like drag-and-drop, file previews, etc. + * Defines the display mode of the file upload component. + * - 'advanced': enables a rich interface with manual control over upload actions + * - 'simple': enables a minimal interface with automatic upload behavior + * + * This property is used internally to determine layout, behavior, and slot rendering. */ - advanced?: boolean; + option?: 'advanced' | 'simple'; } +