gantri-components 2.133.0-beta.6 → 2.133.0-beta.8

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.
@@ -2,6 +2,6 @@
2
2
  import { OptionalValues } from '../../types/common';
3
3
  export declare const StyledFileInput: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, OptionalValues<{
4
4
  $fileUrl: string;
5
- $isDisabled: boolean;
6
5
  $isDropZone: boolean;
6
+ disabled: boolean;
7
7
  }, undefined>>> & string;
@@ -12,8 +12,6 @@ export type FileUploaderProps = {
12
12
  fileUrl: string;
13
13
  /** This function should delete the record from the database, ***then*** delete the file. */
14
14
  handleDeleteFile: HandleDeleteFile;
15
- /** Provide this if supporting multiple uploads to prevent multiple calls to update the database. */
16
- handleUploadsComplete: HandleUploadsComplete;
17
15
  inputName?: string;
18
16
  isActive?: boolean;
19
17
  isDisabled?: boolean;
@@ -24,6 +22,8 @@ export type FileUploaderProps = {
24
22
  onBlur?: FocusEventHandler<HTMLInputElement>;
25
23
  onClick?: BoxProps['onClick'];
26
24
  onError: OnFileUploaderError;
25
+ onValidationCompleted?: () => void;
26
+ onValidationStarted?: () => void;
27
27
  onlyUseCustomValidationFn?: boolean;
28
28
  /** Used to show loading indicator for `'thumbnail'` variant. For the `'button'` variant, it can be passed here or as part of `buttonProps`. */
29
29
  processing: boolean;
@@ -92,10 +92,14 @@ export type TransformThumbnailSrc = (props: {
92
92
  type ImmediatelyUploadProps = {
93
93
  handleFileSelected?: never;
94
94
  handleUploadFile: HandleUploadFile;
95
+ /** Use this if supporting multiple uploads to prevent multiple calls to update the database. */
96
+ handleUploadsComplete: HandleUploadsComplete;
95
97
  };
96
98
  type DelayUploadProps = {
97
99
  handleFileSelected: HandleFileSelected;
98
100
  handleUploadFile?: never;
101
+ /** Use this if supporting multiple uploads to prevent multiple calls to update the database. */
102
+ handleUploadsComplete?: never;
99
103
  };
100
104
  type WithDraggableProps = {
101
105
  SortableDragHandleWrapper: (props: PropsWithChildren<HTMLAttributes<HTMLElement>>) => JSX.Element;
@@ -1,7 +1,7 @@
1
1
  import { Dispatch, SetStateAction } from 'react';
2
2
  import { SelectedFileDetails, FileUploaderProps } from '../../../../file-uploader.types';
3
3
  import { OptionalValues } from '../../../../../../types/common';
4
- export type UseHandleSelectedFilesProps = OptionalValues<Required<Pick<FileUploaderProps, 'expectedExtensions' | 'fileUrl' | 'handleFileSelected' | 'handleUploadsComplete' | 'isUploaderOnly' | 'maxFileSizeMB' | 'maxUploadsAllowed' | 'minImageHeight' | 'minImageWidth' | 'onError' | 'onlyUseCustomValidationFn' | 'transformFileName' | 'validateFile'>>> & {
4
+ export type UseHandleSelectedFilesProps = OptionalValues<Required<Pick<FileUploaderProps, 'expectedExtensions' | 'fileUrl' | 'handleFileSelected' | 'handleUploadsComplete' | 'isUploaderOnly' | 'maxFileSizeMB' | 'maxUploadsAllowed' | 'minImageHeight' | 'minImageWidth' | 'onError' | 'onValidationCompleted' | 'onValidationStarted' | 'onlyUseCustomValidationFn' | 'transformFileName' | 'validateFile'>>> & {
5
5
  purgeInput: () => void;
6
6
  setFileName: Dispatch<SetStateAction<string>>;
7
7
  setFileUrl: Dispatch<SetStateAction<string>>;
@@ -1,5 +1,5 @@
1
1
  import { FileUploaderProps } from '../../file-uploader.types';
2
2
  import { OptionalValues } from '../../../../types/common';
3
- export type UseUploadActionsProps = OptionalValues<Required<Pick<FileUploaderProps, 'expectedExtensions' | 'fileName' | 'fileUrl' | 'handleDeleteFile' | 'handleFileSelected' | 'handleUploadsComplete' | 'handleUploadFile' | 'isUploaderOnly' | 'maxUploadsAllowed' | 'onError' | 'onlyUseCustomValidationFn' | 'purifyFileName' | 'transformFileName' | 'validateFile'>>> & Partial<Pick<FileUploaderProps, 'maxFileSizeMB' | 'minImageHeight' | 'minImageWidth'>> & {
3
+ export type UseUploadActionsProps = OptionalValues<Required<Pick<FileUploaderProps, 'expectedExtensions' | 'fileName' | 'fileUrl' | 'handleDeleteFile' | 'handleFileSelected' | 'handleUploadsComplete' | 'handleUploadFile' | 'isUploaderOnly' | 'maxUploadsAllowed' | 'onError' | 'onValidationCompleted' | 'onValidationStarted' | 'onlyUseCustomValidationFn' | 'purifyFileName' | 'transformFileName' | 'validateFile'>>> & Partial<Pick<FileUploaderProps, 'maxFileSizeMB' | 'minImageHeight' | 'minImageWidth'>> & {
4
4
  purgeInput: () => void;
5
5
  };