@cubone/react-file-manager 1.8.0 → 1.9.1
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/README.md +24 -1
- package/dist/react-file-manager.es.js +2548 -2467
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,7 @@ An open-source React.js package for easy integration of a file manager into appl
|
|
|
17
17
|
- **Navigation**: Use the breadcrumb trail and sidebar navigation pane for quick directory traversal.
|
|
18
18
|
- **Toolbar & Context Menu**: Access all common actions (upload, download, delete, copy, move, rename, etc.) via the toolbar or right-click for the same options in the context menu.
|
|
19
19
|
- **Multi-Selection**: Select multiple files and folders at once to perform bulk actions like delete, copy, move, or download.
|
|
20
|
+
- **Keyboard Shortcuts**: Quickly perform file operations like copy, paste, delete, and more using intuitive keyboard shortcuts.
|
|
20
21
|
|
|
21
22
|

|
|
22
23
|
|
|
@@ -89,7 +90,7 @@ type File = {
|
|
|
89
90
|
| Name | Type | Description |
|
|
90
91
|
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
91
92
|
| `acceptedFileTypes` | string | A comma-separated list of allowed file extensions for uploading files. (e.g.,`.txt, .png, .pdf`). |
|
|
92
|
-
| `enableFilePreview` | boolean | A boolean flag indicating whether to use the default file previewer in the file manager
|
|
93
|
+
| `enableFilePreview` | boolean | A boolean flag indicating whether to use the default file previewer in the file manager `default: true`. |
|
|
93
94
|
| `filePreviewPath` | string | The base URL for file previews e.g.`https://example.com`, file path will be appended automatically to it i.e. `https://example.com/yourFilePath`. |
|
|
94
95
|
| `fileUploadConfig` | { url: string; headers?: { [key: string]: string } } | Configuration object for file uploads. It includes the upload URL (`url`) and an optional `headers` object for setting custom HTTP headers in the upload request. The `headers` object can accept any standard or custom headers required by the server. Example: `{ url: "https://example.com/fileupload", headers: { Authorization: "Bearer" + TOKEN, "X-Custom-Header": "value" } }` |
|
|
95
96
|
| `files` | Array<[File](#-file-structure)> | An array of file and folder objects representing the current directory structure. Each object includes `name`, `isDirectory`, and `path` properties. |
|
|
@@ -110,6 +111,28 @@ type File = {
|
|
|
110
111
|
| `onRename` | (file: [File](#-file-structure), newName: string) => void | A callback function triggered when a file or folder is renamed. |
|
|
111
112
|
| `width` | string \| number | The width of the component `default: 100%`. Can be a string (e.g., `'100%'`, `'10rem'`) or a number (in pixels). |
|
|
112
113
|
|
|
114
|
+
## ⌨️ Keyboard Shortcuts
|
|
115
|
+
|
|
116
|
+
| **Action** | **Shortcut** |
|
|
117
|
+
| ------------------------------ | ------------------ |
|
|
118
|
+
| New Folder | `Alt + Shift + N` |
|
|
119
|
+
| Upload Files | `CTRL + U` |
|
|
120
|
+
| Cut | `CTRL + X` |
|
|
121
|
+
| Copy | `CTRL + C` |
|
|
122
|
+
| Paste | `CTRL + V` |
|
|
123
|
+
| Rename | `F2` |
|
|
124
|
+
| Download | `CTRL + D` |
|
|
125
|
+
| Delete | `DEL` |
|
|
126
|
+
| Select All Files | `CTRL + A` |
|
|
127
|
+
| Select Multiple Files | `CTRL + Click` |
|
|
128
|
+
| Select Range of Files | `Shift + Click` |
|
|
129
|
+
| Switch to List Layout | `CTRL + Shift + 1` |
|
|
130
|
+
| Switch to Grid Layout | `CTRL + Shift + 2` |
|
|
131
|
+
| Jump to First File in the List | `Home` |
|
|
132
|
+
| Jump to Last File in the List | `End` |
|
|
133
|
+
| Refresh File List | `F5` |
|
|
134
|
+
| Clear Selection | `Esc` |
|
|
135
|
+
|
|
113
136
|
## 🤝 Contributing
|
|
114
137
|
|
|
115
138
|
Contributions are welcome! To contribute:
|