gantri-components 2.127.0-beta.7 → 2.127.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.
@@ -12,8 +12,8 @@ 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. Should be paired with checking against `isMultipleFiles` in `handleUploadFile` args. */
16
- handleMultiUploadComplete?: HandleMultiUploadComplete;
15
+ /** Provide this if supporting multiple uploads to prevent multiple calls to update the database. */
16
+ handleUploadsComplete?: HandleUploadsComplete;
17
17
  inputName?: string;
18
18
  isActive?: boolean;
19
19
  isDisabled?: boolean;
@@ -45,7 +45,7 @@ export type DeleteFile = (options?: {
45
45
  isReplacing?: boolean;
46
46
  }) => Promise<void>;
47
47
  export type HandleUploadFile = (props: SelectedFileDetails) => Promise<UploadedFileDetails>;
48
- export type HandleMultiUploadComplete = (...uploadedFiles: UploadedFileDetails[]) => Promise<void>;
48
+ export type HandleUploadsComplete = (...uploadedFiles: UploadedFileDetails[]) => Promise<void>;
49
49
  export type UploadedFileDetails = {
50
50
  [key: string]: any;
51
51
  fileName: string;
@@ -60,7 +60,6 @@ export interface SelectedFileDetails {
60
60
  fileBlob: Blob;
61
61
  fileName: string;
62
62
  fileSize: number;
63
- isMultipleFiles: boolean;
64
63
  metadata: FileMetaData;
65
64
  }
66
65
  /** If invalid, return the error message to display. */
@@ -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' | 'handleMultiUploadComplete' | 'isUploaderOnly' | 'maxFileSizeMB' | 'maxUploadsAllowed' | 'minImageHeight' | 'minImageWidth' | 'onError' | 'transformFileName' | 'validateFile'>>> & {
4
+ export type UseHandleSelectedFilesProps = OptionalValues<Required<Pick<FileUploaderProps, 'expectedExtensions' | 'fileUrl' | 'handleFileSelected' | 'handleUploadsComplete' | 'isUploaderOnly' | 'maxFileSizeMB' | 'maxUploadsAllowed' | 'minImageHeight' | 'minImageWidth' | 'onError' | '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' | 'handleMultiUploadComplete' | 'handleUploadFile' | 'isUploaderOnly' | 'maxUploadsAllowed' | 'onError' | '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' | 'purifyFileName' | 'transformFileName' | 'validateFile'>>> & Partial<Pick<FileUploaderProps, 'maxFileSizeMB' | 'minImageHeight' | 'minImageWidth'>> & {
4
4
  purgeInput: () => void;
5
5
  };