@emailmaker/filemanager 0.10.44 → 0.10.46
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.
- package/components/FileManagerApp/ActionsHeader.d.ts +2 -0
- package/components/UploadProgress/UploadProgress.d.ts +1 -1
- package/file-manager.css +9 -1
- package/file-manager.d.ts +2 -0
- package/file-manager.esm.js +9 -9
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/hooks/core/files/useFilesAPI.d.ts +1 -1
- package/hooks/core/useFiles.d.ts +2 -2
- package/hooks/useFileUpload.d.ts +1 -0
- package/package.json +1 -1
- package/shared/config.d.ts +1 -0
- package/types.d.ts +7 -2
- package/utils/cacheClear.d.ts +8 -0
|
@@ -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>;
|
package/hooks/core/useFiles.d.ts
CHANGED
|
@@ -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>;
|
package/hooks/useFileUpload.d.ts
CHANGED
|
@@ -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
package/shared/config.d.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export interface ApiEndpoints {
|
|
|
83
83
|
renameFile?: string;
|
|
84
84
|
moveFile?: string;
|
|
85
85
|
updateFile?: string;
|
|
86
|
+
clearCache?: string;
|
|
86
87
|
}
|
|
87
88
|
export interface IconProps {
|
|
88
89
|
style?: React.CSSProperties;
|
|
@@ -125,6 +126,7 @@ export interface FileManagerOptions {
|
|
|
125
126
|
renameFile?: string;
|
|
126
127
|
moveFile?: string;
|
|
127
128
|
updateFile?: string;
|
|
129
|
+
clearCache?: string;
|
|
128
130
|
};
|
|
129
131
|
dataProviders?: FileManagerDataProviders;
|
|
130
132
|
searchQuery?: string;
|
|
@@ -263,6 +265,7 @@ export interface FileManagerDataProviders {
|
|
|
263
265
|
aspectRatio?: string;
|
|
264
266
|
extension?: string;
|
|
265
267
|
}) => Promise<File>;
|
|
268
|
+
clearCache?: (pathFolder?: string | null) => Promise<void>;
|
|
266
269
|
}
|
|
267
270
|
export interface FileManagerHookReturn {
|
|
268
271
|
folders: Folder[];
|
|
@@ -366,6 +369,7 @@ export interface Config {
|
|
|
366
369
|
customTheme?: CustomTheme;
|
|
367
370
|
UNSPLASH_KEY?: string;
|
|
368
371
|
APP_NAME_UNSPLASH?: string;
|
|
372
|
+
UNSLASH_PROXY_URL?: string;
|
|
369
373
|
pushToGTM?: boolean;
|
|
370
374
|
projectId?: string;
|
|
371
375
|
elementId?: string;
|
|
@@ -419,7 +423,7 @@ export interface ImageGifProps {
|
|
|
419
423
|
currentReqGif: CurrentReqGif;
|
|
420
424
|
setCurrentReqGif: React.Dispatch<React.SetStateAction<CurrentReqGif>>;
|
|
421
425
|
inputRef: React.RefObject<InputRef>;
|
|
422
|
-
customRequest: (data: string) => Promise<File | void> | void;
|
|
426
|
+
customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
|
|
423
427
|
}
|
|
424
428
|
export interface UnsplashImage {
|
|
425
429
|
id: string;
|
|
@@ -448,7 +452,7 @@ export interface ImageStockProps {
|
|
|
448
452
|
currentReq: CurrentReqStock;
|
|
449
453
|
setCurrentReq: React.Dispatch<React.SetStateAction<CurrentReqStock>>;
|
|
450
454
|
inputRef: React.RefObject<InputRef>;
|
|
451
|
-
customRequest: (data: string) => Promise<File | void> | void;
|
|
455
|
+
customRequest: (data: string, fileName?: string) => Promise<File | void> | void;
|
|
452
456
|
}
|
|
453
457
|
export interface ImageAIProps {
|
|
454
458
|
customRequest: (file: {
|
|
@@ -536,6 +540,7 @@ export interface FileManagerProps {
|
|
|
536
540
|
renameFile?: string;
|
|
537
541
|
moveFile?: string;
|
|
538
542
|
updateFile?: string;
|
|
543
|
+
clearCache?: string;
|
|
539
544
|
};
|
|
540
545
|
customIcons?: CustomIcons;
|
|
541
546
|
dragDropIcon?: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FileManagerDataProviders, FileManagerOptions, PathItem } from '../types';
|
|
2
|
+
export declare const resolveCachePathForError: (error: unknown, pathHistory: PathItem[]) => string;
|
|
3
|
+
export declare const getPathFromHistory: (pathHistory: PathItem[]) => string;
|
|
4
|
+
export declare const clearFolderCache: (params: {
|
|
5
|
+
options: FileManagerOptions;
|
|
6
|
+
pathFolder: string;
|
|
7
|
+
dataProviders?: FileManagerDataProviders;
|
|
8
|
+
}) => Promise<void>;
|