@emailmaker/filemanager 0.10.43 → 0.10.44

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.
@@ -16,6 +16,11 @@ export interface UseFilesAPIActions {
16
16
  fileName: string;
17
17
  error: string;
18
18
  }[];
19
+ uploadedFiles?: Map<string, {
20
+ id?: string;
21
+ name?: string;
22
+ folderId?: string | null;
23
+ }>;
19
24
  }) => void;
20
25
  }) => Promise<void>;
21
26
  handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
@@ -25,6 +25,11 @@ export interface UseFilesActions {
25
25
  fileName: string;
26
26
  error: string;
27
27
  }[];
28
+ uploadedFiles?: Map<string, {
29
+ id?: string;
30
+ name?: string;
31
+ folderId?: string | null;
32
+ }>;
28
33
  }) => void;
29
34
  }) => Promise<void>;
30
35
  handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
@@ -6,10 +6,11 @@ export interface UseFileUploadReturn {
6
6
  isUploadMinimized: boolean;
7
7
  totalFiles: number;
8
8
  completedFiles: number;
9
- startUpload: (files: globalThis.File[]) => string[];
9
+ startUpload: (folderId: string | undefined, files: globalThis.File[]) => string[];
10
10
  updateProgress: (fileId: string, progress: number) => void;
11
11
  markAsSuccess: (fileId: string, uploadedFile?: File) => void;
12
12
  markAsError: (fileId: string, error: string) => void;
13
+ getUploadedFile: (fileId: string) => File | undefined;
13
14
  closeUpload: () => void;
14
15
  minimizeUpload: () => void;
15
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.43",
3
+ "version": "0.10.44",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
package/types.d.ts CHANGED
@@ -131,7 +131,11 @@ export interface FileManagerOptions {
131
131
  sortBySize?: string;
132
132
  onPathChange?: (path: string[]) => void;
133
133
  onChangeSelection?: (files: File[]) => void;
134
- onEditorOk?: (file: File) => void;
134
+ onEditorOk?: (file: {
135
+ id: string;
136
+ folderId: string | undefined;
137
+ name: string;
138
+ }) => void;
135
139
  config?: Config;
136
140
  customIcons?: CustomIcons;
137
141
  dragDropIcon?: string;
@@ -514,7 +518,11 @@ export interface FileManagerProps {
514
518
  currentPath?: string;
515
519
  onPathChange?: (path: string[]) => void;
516
520
  onChangeSelection?: (files: File[]) => void;
517
- onEditorOk?: (files: File) => void;
521
+ onEditorOk?: (file: {
522
+ id: string;
523
+ folderId: string | undefined;
524
+ name: string;
525
+ }) => void;
518
526
  searchQuery?: string;
519
527
  sortBySize?: string;
520
528
  dataProviders?: FileManagerDataProviders;