@emailmaker/filemanager 0.10.38 → 0.10.39

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,2 +1,4 @@
1
- import { File as AppFile } from '../../types';
2
- export declare const isImageFile: (file: AppFile) => boolean;
1
+ export declare const isImageFile: (file: {
2
+ name?: string;
3
+ type?: string;
4
+ }) => boolean;
@@ -20,7 +20,7 @@ export interface UseFilesAPIActions {
20
20
  }) => Promise<void>;
21
21
  handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
22
22
  handleDroppedFiles: (droppedFiles: globalThis.File[]) => Promise<void>;
23
- getFileData: (file: AppFile) => Promise<Blob | undefined>;
23
+ getFileData: (fileId: string, silent?: boolean) => Promise<Blob | undefined>;
24
24
  uploadFileWithProvider: (file: globalThis.File, targetFolderId?: string, suppressNotifications?: boolean) => Promise<AppFile | undefined>;
25
25
  }
26
26
  export declare const useFilesAPI: () => UseFilesAPIActions;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.38",
3
+ "version": "0.10.39",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
package/types.d.ts CHANGED
@@ -192,7 +192,7 @@ export interface UploadFilesRequest {
192
192
  folderId?: string | null;
193
193
  }
194
194
  export interface FileManagerDataProviders {
195
- getFileData: (file: File) => Promise<Blob>;
195
+ getFileData: (fileId: string) => Promise<Blob>;
196
196
  getFolders?: (options?: {
197
197
  parentId?: string | null;
198
198
  deep?: boolean;
@@ -536,7 +536,8 @@ export interface FileManagerProps {
536
536
  handleSuccess?: NotifyListener<Notify.SuccessEvent>;
537
537
  }
538
538
  export interface SafeImageProps {
539
- src?: string | (string | undefined)[];
539
+ thumbnailSrc?: string;
540
+ previewSrc?: string;
540
541
  alt: string;
541
542
  className?: string;
542
543
  width?: number;
@@ -10,7 +10,7 @@ export declare class JSONDataProvider implements FileManagerDataProviders {
10
10
  loadFromURL: (url: string) => Promise<void>;
11
11
  addFiles: (newFiles: File[]) => void;
12
12
  addFolders: (newFolders: Folder[]) => void;
13
- getFileData: (file: File) => Promise<Blob>;
13
+ getFileData: (fileId: string) => Promise<Blob>;
14
14
  getFolders: (options?: {
15
15
  parentId?: string | null;
16
16
  deep?: boolean;