master-components-react-ts 2.9.5 → 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FileUploaderProps } from './FileUploader.types';
|
|
2
2
|
declare const FileUploader: {
|
|
3
|
-
({ title, description, files, errorState, withFilesBlock, onChange, onLoadingChange, ...rest }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
({ title, description, files, errorState, withFilesBlock, maxSize, acceptedFileFormats, multiple, onFormatError, onMaxSizeError, onMaxFilesError, onChange, onLoadingChange, ...rest }: FileUploaderProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
propKeys: readonly ["title", "description", "files", "errorState", "withFilesBlock", "onChange", "onLoadingChange", "onRemove", "onDownload", "onReload", "withDate", "withSize", "withDownload", "withReload", "withRemove", "multiple", "accept"];
|
|
5
5
|
displayName: string;
|
|
6
6
|
description: string;
|
|
@@ -13,12 +13,25 @@ export type FileType = {
|
|
|
13
13
|
fileID?: string;
|
|
14
14
|
};
|
|
15
15
|
/**FileUploader Component Props */
|
|
16
|
-
export interface FileUploaderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'title' | 'description' | 'onChange'>, Omit<FilesBlockProps, 'files'> {
|
|
16
|
+
export interface FileUploaderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'title' | 'multiple' | 'description' | 'onChange'>, Omit<FilesBlockProps, 'files'> {
|
|
17
17
|
title?: string | React.ReactNode;
|
|
18
18
|
description?: string | React.ReactNode;
|
|
19
19
|
files?: FileType[];
|
|
20
20
|
errorState?: boolean;
|
|
21
21
|
withFilesBlock?: boolean;
|
|
22
|
+
maxSize?: number;
|
|
23
|
+
multiple?: boolean;
|
|
24
|
+
maxFiles?: number;
|
|
25
|
+
acceptedFileFormats?: string[];
|
|
26
|
+
onMaxFilesError?: (error: {
|
|
27
|
+
Error: string;
|
|
28
|
+
MaxFiles: number;
|
|
29
|
+
}) => void;
|
|
30
|
+
onFormatError?: (format: string) => void;
|
|
31
|
+
onMaxSizeError?: (error: {
|
|
32
|
+
Error: string;
|
|
33
|
+
MaxSize: number;
|
|
34
|
+
}) => void;
|
|
22
35
|
onChange?: (files: FileType[]) => void;
|
|
23
36
|
onLoadingChange?: (isLoading: boolean) => void;
|
|
24
37
|
}
|