@emailmaker/filemanager 0.10.44 → 0.10.45

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.
@@ -23,7 +23,7 @@ export interface UseFilesAPIActions {
23
23
  }>;
24
24
  }) => void;
25
25
  }) => Promise<void>;
26
- handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
26
+ handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean) => Promise<AppFile | void>;
27
27
  handleDroppedFiles: (droppedFiles: globalThis.File[]) => Promise<void>;
28
28
  getFileData: (fileId: string, silent?: boolean) => Promise<Blob | undefined>;
29
29
  uploadFileWithProvider: (file: globalThis.File, targetFolderId?: string, suppressNotifications?: boolean) => Promise<AppFile | undefined>;
@@ -32,7 +32,7 @@ export interface UseFilesActions {
32
32
  }>;
33
33
  }) => void;
34
34
  }) => Promise<void>;
35
- handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
35
+ handleAddFileByUrl: (url?: string | null, noFolder?: boolean, suppressNotifications?: boolean) => Promise<AppFile | void>;
36
36
  toggleFileSelection: (fileId: string, opts?: {
37
37
  metaKey?: boolean;
38
38
  ctrlKey?: boolean;
@@ -48,7 +48,7 @@ export interface UseFilesActions {
48
48
  showCopyModal: () => void;
49
49
  handleCopyCancel: () => void;
50
50
  handleCopyOk: (targetFolder?: string) => Promise<void>;
51
- uploadFileWithProvider: (file: globalThis.File) => Promise<AppFile | void>;
51
+ uploadFileWithProvider: (file: globalThis.File, targetFolderId?: string, suppressNotifications?: boolean) => Promise<AppFile | void>;
52
52
  showDeleteConfirm: () => void;
53
53
  handleDeleteConfirmCancel: () => void;
54
54
  handleDeleteConfirmOk: () => Promise<void>;
@@ -7,6 +7,7 @@ export interface UseFileUploadReturn {
7
7
  totalFiles: number;
8
8
  completedFiles: number;
9
9
  startUpload: (folderId: string | undefined, files: globalThis.File[]) => string[];
10
+ startUploadByUrl: (folderId: string | undefined, fileName: string) => string;
10
11
  updateProgress: (fileId: string, progress: number) => void;
11
12
  markAsSuccess: (fileId: string, uploadedFile?: File) => void;
12
13
  markAsError: (fileId: string, error: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.44",
3
+ "version": "0.10.45",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
package/types.d.ts CHANGED
@@ -366,6 +366,7 @@ export interface Config {
366
366
  customTheme?: CustomTheme;
367
367
  UNSPLASH_KEY?: string;
368
368
  APP_NAME_UNSPLASH?: string;
369
+ UNSLASH_PROXY_URL?: string;
369
370
  pushToGTM?: boolean;
370
371
  projectId?: string;
371
372
  elementId?: string;
@@ -419,7 +420,7 @@ export interface ImageGifProps {
419
420
  currentReqGif: CurrentReqGif;
420
421
  setCurrentReqGif: React.Dispatch<React.SetStateAction<CurrentReqGif>>;
421
422
  inputRef: React.RefObject<InputRef>;
422
- customRequest: (data: string) => Promise<File | void> | void;
423
+ customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
423
424
  }
424
425
  export interface UnsplashImage {
425
426
  id: string;
@@ -448,7 +449,7 @@ export interface ImageStockProps {
448
449
  currentReq: CurrentReqStock;
449
450
  setCurrentReq: React.Dispatch<React.SetStateAction<CurrentReqStock>>;
450
451
  inputRef: React.RefObject<InputRef>;
451
- customRequest: (data: string) => Promise<File | void> | void;
452
+ customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
452
453
  }
453
454
  export interface ImageAIProps {
454
455
  customRequest: (file: {