gantri-components 2.133.0-beta.15 → 2.133.0-beta.16
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.
|
@@ -22,10 +22,7 @@ export type FileUploaderProps = {
|
|
|
22
22
|
onBlur?: FocusEventHandler<HTMLInputElement>;
|
|
23
23
|
onClick?: BoxProps['onClick'];
|
|
24
24
|
onError: OnFileUploaderError;
|
|
25
|
-
onValidationCompleted?:
|
|
26
|
-
invalidFiles: SelectedFileDetails[];
|
|
27
|
-
validFiles: SelectedFileDetails[];
|
|
28
|
-
}) => void | Promise<void>;
|
|
25
|
+
onValidationCompleted?: OnValidationCompleted;
|
|
29
26
|
onValidationStarted?: () => void | Promise<void>;
|
|
30
27
|
onlyUseCustomValidationFn?: boolean;
|
|
31
28
|
/** Used to show loading indicator for `'thumbnail'` variant. For the `'button'` variant, it can be passed here or as part of `buttonProps`. */
|
|
@@ -40,6 +37,10 @@ export type FileUploaderProps = {
|
|
|
40
37
|
/** The 'link' and 'plain' variants will show the 'button' variant if nothing has been uploaded yet. */
|
|
41
38
|
variant: FileUploaderVariant;
|
|
42
39
|
} & Partial<FileUploaderDefaultProps> & (WithDraggableProps | WithoutDraggableProps) & (WithReplaceableProps | WithoutReplaceableProps) & (ImmediatelyUploadProps | DelayUploadProps) & (WithCustomContent | WithoutCustomContent);
|
|
40
|
+
export type OnValidationCompleted = (props: {
|
|
41
|
+
invalidFiles: SelectedFileDetails[];
|
|
42
|
+
validFiles: SelectedFileDetails[];
|
|
43
|
+
}) => void | Promise<void>;
|
|
43
44
|
export type FileUploaderVariant = (typeof fileUploaderVariants)[keyof typeof fileUploaderVariants];
|
|
44
45
|
export type HandleDeleteFile = (props: HandleFileDeleteArgs) => Promise<void>;
|
|
45
46
|
export type HandleFileDeleteArgs = {
|