@emailmaker/filemanager 0.0.7 → 0.0.8
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/FileManagerApp.d.ts +1 -1
- package/components/FileModals/FileModals.d.ts +3 -0
- package/components/PixieEditor/PixieEditor.d.ts +2 -2
- package/file-manager.css +35 -33
- package/file-manager.d.ts +16 -3
- package/file-manager.esm.js +3 -3
- package/file-manager.esm.js.map +1 -1
- package/file-manager.js +1 -1
- package/hooks/core/files/useFilesModals.d.ts +3 -0
- package/hooks/core/types.d.ts +5 -0
- package/hooks/core/useFiles.d.ts +3 -0
- package/hooks/useFileActions.d.ts +2 -1
- package/index.d.ts +10 -2
- package/package.json +1 -1
- package/types.d.ts +0 -2
|
@@ -13,6 +13,9 @@ export interface UseFilesModalsActions {
|
|
|
13
13
|
showCopyModal: () => void;
|
|
14
14
|
handleCopyCancel: () => void;
|
|
15
15
|
handleCopyOk: () => Promise<void>;
|
|
16
|
+
showDeleteConfirm: () => void;
|
|
17
|
+
handleDeleteConfirmCancel: () => void;
|
|
18
|
+
handleDeleteConfirmOk: () => Promise<void>;
|
|
16
19
|
}
|
|
17
20
|
export declare const useFilesModals: (fetchFiles: (params?: FilesQueryParams) => Promise<void>) => {
|
|
18
21
|
state: UseFilesModalsState;
|
package/hooks/core/types.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export interface FileManagerState {
|
|
|
26
26
|
isMoveModalVisible: boolean;
|
|
27
27
|
isRenameFolderModalVisible: boolean;
|
|
28
28
|
isCopyModalVisible: boolean;
|
|
29
|
+
isDeleteConfirmVisible: boolean;
|
|
29
30
|
form: FormInstance;
|
|
30
31
|
urlForm: FormInstance;
|
|
31
32
|
renameForm: FormInstance;
|
|
@@ -54,6 +55,7 @@ export interface FileManagerActions {
|
|
|
54
55
|
setIsMoveModalVisible: (visible: boolean) => void;
|
|
55
56
|
setIsRenameFolderModalVisible: (visible: boolean) => void;
|
|
56
57
|
setIsCopyModalVisible: (visible: boolean) => void;
|
|
58
|
+
setIsDeleteConfirmVisible: (visible: boolean) => void;
|
|
57
59
|
setFileToRename: (fileId: string | null) => void;
|
|
58
60
|
setActiveLibraryItem: (item: LibraryMenuKey) => void;
|
|
59
61
|
setFolderToRename: (folderId: string | null) => void;
|
|
@@ -81,6 +83,9 @@ export interface FileManagerActions {
|
|
|
81
83
|
showCopyModal: () => void;
|
|
82
84
|
handleCopyCancel: () => void;
|
|
83
85
|
handleCopyOk: () => Promise<void>;
|
|
86
|
+
showDeleteConfirm?: () => void;
|
|
87
|
+
handleDeleteConfirmCancel?: () => void;
|
|
88
|
+
handleDeleteConfirmOk?: () => Promise<void>;
|
|
84
89
|
}
|
|
85
90
|
export interface FileManagerContext {
|
|
86
91
|
apiEndpoints: Record<string, string | undefined>;
|
package/hooks/core/useFiles.d.ts
CHANGED
|
@@ -31,6 +31,9 @@ export interface UseFilesActions {
|
|
|
31
31
|
handleCopyCancel: () => void;
|
|
32
32
|
handleCopyOk: () => Promise<void>;
|
|
33
33
|
uploadFileWithProvider: (file: globalThis.File) => Promise<AppFile | void>;
|
|
34
|
+
showDeleteConfirm: () => void;
|
|
35
|
+
handleDeleteConfirmCancel: () => void;
|
|
36
|
+
handleDeleteConfirmOk: () => Promise<void>;
|
|
34
37
|
}
|
|
35
38
|
export declare const useFiles: () => FileManagerHookBase & {
|
|
36
39
|
state: UseFilesState;
|
|
@@ -8,9 +8,10 @@ interface UseFileActionsProps {
|
|
|
8
8
|
showCopyModal: () => void;
|
|
9
9
|
handleDeleteFile: (fileId: string) => void;
|
|
10
10
|
handleDeleteFolder: (folderId: string) => void;
|
|
11
|
+
showDeleteConfirm?: () => void;
|
|
11
12
|
onEdit: (file?: AppFile | ThumbnailFile) => void;
|
|
12
13
|
}
|
|
13
|
-
export declare const useFileActions: ({ files, selectedFiles, toggleFileSelection, showRenameModal, showMoveModal, showCopyModal, handleDeleteFile, handleDeleteFolder, onEdit, }: UseFileActionsProps) => {
|
|
14
|
+
export declare const useFileActions: ({ files, selectedFiles, toggleFileSelection, showRenameModal, showMoveModal, showCopyModal, handleDeleteFile, handleDeleteFolder, showDeleteConfirm, onEdit, }: UseFileActionsProps) => {
|
|
14
15
|
handleClearSelection: () => void;
|
|
15
16
|
handleRename: () => void;
|
|
16
17
|
handleDeleteSelected: () => void;
|
package/index.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { init, unmount, FileManagerAppWithContext } from './file-manager';
|
|
2
|
-
export { init, unmount, FileManagerAppWithContext };
|
|
1
|
+
import { init, unmount, FileManagerAppWithContext, initPixieEditor, unmountPixieEditor, initFileManager, PixieOnlyApp } from './file-manager';
|
|
2
|
+
export { init, unmount, FileManagerAppWithContext, PixieOnlyApp, initPixieEditor, unmountPixieEditor, initFileManager };
|
|
3
3
|
declare const _default: {
|
|
4
4
|
init: (containerOrOptions: HTMLElement | import("./file-manager").Options, config?: import("./types").Config) => void;
|
|
5
5
|
unmount: (container: HTMLElement) => void;
|
|
6
|
+
initPixieEditor: (options: import("./file-manager").InitPixieEditorOptions) => void;
|
|
7
|
+
unmountPixieEditor: (container: HTMLElement) => void;
|
|
8
|
+
initFileManager: (options: import("./file-manager").UniversalInitOptions) => {
|
|
9
|
+
unmount: () => void;
|
|
10
|
+
unmountFileManager?: () => void;
|
|
11
|
+
unmountPixieEditor?: () => void;
|
|
12
|
+
};
|
|
6
13
|
};
|
|
7
14
|
export default _default;
|
|
8
15
|
export { FileManagerApp } from './components/FileManagerApp/FileManagerApp';
|
|
@@ -11,3 +18,4 @@ export { FileModals } from './components/FileModals/FileModals';
|
|
|
11
18
|
export { FolderSidebar } from './components/FolderSidebar/FolderSidebar';
|
|
12
19
|
export { installResizeObserverErrorHandler, uninstallResizeObserverErrorHandler } from './utils/resizeObserverHandler';
|
|
13
20
|
export { type Folder, type File, type PathItem, type MenuItem, type FileManagerOptions, type FileManagerHookReturn, } from './types';
|
|
21
|
+
export { type InitPixieEditorOptions, type Options as FileManagerInitOptions, type UniversalInitOptions, } from './file-manager';
|
package/package.json
CHANGED
package/types.d.ts
CHANGED
|
@@ -119,7 +119,6 @@ export interface FileManagerOptions {
|
|
|
119
119
|
onChangeSelection?: (files: File[]) => void;
|
|
120
120
|
onEditorOk?: (file: File) => void;
|
|
121
121
|
config?: Config;
|
|
122
|
-
publicPath?: string;
|
|
123
122
|
customIcons?: CustomIcons;
|
|
124
123
|
dragDropIcon?: string;
|
|
125
124
|
notification?: Partial<Omit<NotificationInstance, 'destroy'>>;
|
|
@@ -393,7 +392,6 @@ export type MessageType = {
|
|
|
393
392
|
[key: string]: unknown;
|
|
394
393
|
};
|
|
395
394
|
export interface FileManagerProps {
|
|
396
|
-
publicPath?: string;
|
|
397
395
|
config?: Config;
|
|
398
396
|
currentPath?: string;
|
|
399
397
|
onPathChange?: (path: string[]) => void;
|