@emailmaker/filemanager 0.10.45 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emailmaker/filemanager",
3
- "version": "0.10.45",
3
+ "version": "0.10.46",
4
4
  "main": "./file-manager.js",
5
5
  "module": "./file-manager.esm.js",
6
6
  "types": "./index.d.ts",
@@ -10,6 +10,7 @@ export interface Config {
10
10
  createFolder?: string;
11
11
  createFile?: string;
12
12
  deleteFile?: string;
13
+ clearCache?: string;
13
14
  };
14
15
  noFilesIconProps?: IconProps;
15
16
  }
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[];
@@ -537,6 +540,7 @@ export interface FileManagerProps {
537
540
  renameFile?: string;
538
541
  moveFile?: string;
539
542
  updateFile?: string;
543
+ clearCache?: string;
540
544
  };
541
545
  customIcons?: CustomIcons;
542
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>;