@emailmaker/filemanager 0.0.1 → 0.0.2
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,4 +1,4 @@
|
|
|
1
|
-
import { FilesQueryParams } from '../../../types';
|
|
1
|
+
import { File as AppFile, FilesQueryParams } from '../../../types';
|
|
2
2
|
export interface UseFilesAPIActions {
|
|
3
3
|
fetchFiles: (params?: FilesQueryParams) => Promise<void>;
|
|
4
4
|
handleDeleteFile: (fileId: string) => Promise<void>;
|
|
@@ -9,7 +9,7 @@ export interface UseFilesAPIActions {
|
|
|
9
9
|
onComplete: (fileName: string) => void;
|
|
10
10
|
onError: (fileName: string, error: string) => void;
|
|
11
11
|
}) => Promise<void>;
|
|
12
|
-
handleAddFileByUrl: (url?: string | null) => Promise<void>;
|
|
12
|
+
handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
|
|
13
13
|
handleDroppedFiles: (droppedFiles: globalThis.File[]) => Promise<void>;
|
|
14
14
|
getFileData: (fileId: string) => Promise<Blob | undefined>;
|
|
15
15
|
}
|
package/hooks/core/types.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export interface FileManagerActions {
|
|
|
74
74
|
showRenameModal: (fileId: string) => void;
|
|
75
75
|
handleRenameCancel: () => void;
|
|
76
76
|
handleRenameOk: () => Promise<void>;
|
|
77
|
-
handleAddFileByUrl: () => Promise<
|
|
77
|
+
handleAddFileByUrl: () => Promise<any>;
|
|
78
78
|
showMoveModal: () => void;
|
|
79
79
|
handleMoveCancel: () => void;
|
|
80
80
|
handleMoveOk: () => Promise<void>;
|
package/hooks/core/useFiles.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface UseFilesActions {
|
|
|
18
18
|
onComplete: (fileName: string) => void;
|
|
19
19
|
onError: (fileName: string, error: string) => void;
|
|
20
20
|
}) => Promise<void>;
|
|
21
|
-
handleAddFileByUrl: (url?: string | null) => Promise<void>;
|
|
21
|
+
handleAddFileByUrl: (url?: string | null, noFolder?: boolean) => Promise<AppFile | void>;
|
|
22
22
|
toggleFileSelection: (fileId: string) => void;
|
|
23
23
|
showRenameModal: (fileId: string) => void;
|
|
24
24
|
handleRenameCancel: () => void;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emailmaker/filemanager",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"main": "./
|
|
5
|
-
"module": "./
|
|
6
|
-
"types": "./
|
|
7
|
-
"style": "./
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"main": "./file-manager.js",
|
|
5
|
+
"module": "./file-manager.esm.js",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"style": "./file-manager.css",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"react": "^18.2.0 || ^19.0.0",
|
package/types.d.ts
CHANGED
|
@@ -145,6 +145,7 @@ export interface FileManagerDataProviders {
|
|
|
145
145
|
uploadFileByUrl?: (data: {
|
|
146
146
|
url: string;
|
|
147
147
|
folderId?: string | null;
|
|
148
|
+
noFolder?: boolean;
|
|
148
149
|
}) => Promise<File>;
|
|
149
150
|
deleteFile: (fileId: string) => Promise<boolean>;
|
|
150
151
|
renameFile?: (fileId: string, newName: string) => Promise<File>;
|