@cubone/react-file-manager 1.35.0 → 1.36.0
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 +59 -21
- package/dist/index.d.ts +137 -0
- package/dist/react-file-manager.es.js +3295 -4027
- package/dist/style.css +1 -1
- package/package.json +25 -9
- package/src/index.js +0 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</div>
|
|
10
10
|
|
|
11
11
|
<p>
|
|
12
|
-
An open-source React.js package for easy integration of a file manager into applications. It provides a user-friendly interface for managing files and folders, including viewing, uploading, and deleting, with full UI and backend integration.
|
|
12
|
+
An open-source React.js package with TypeScript support for easy integration of a file manager into applications. It provides a user-friendly interface for managing files and folders, including viewing, uploading, and deleting, with full UI and backend integration.
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
## ✨ Features
|
|
@@ -27,6 +27,9 @@ An open-source React.js package for easy integration of a file manager into appl
|
|
|
27
27
|
intuitive keyboard shortcuts.
|
|
28
28
|
- **Drag-and-Drop**: Move selected files and folders by dragging them to the desired directory,
|
|
29
29
|
making file organization effortless.
|
|
30
|
+
- **Column Sorting**: Click on column headers in list view to sort files by name, modified date, or
|
|
31
|
+
size. Click again to toggle between ascending (▲) and descending (▼) order. Folders are always
|
|
32
|
+
displayed before files regardless of the sort criteria.
|
|
30
33
|
|
|
31
34
|

|
|
32
35
|
|
|
@@ -80,20 +83,54 @@ function App() {
|
|
|
80
83
|
export default App;
|
|
81
84
|
```
|
|
82
85
|
|
|
86
|
+
> **Using TypeScript?** Import the `FileItem` type and pass it to `useState`:
|
|
87
|
+
> `const [files, setFiles] = useState<FileItem[]>([...]);`
|
|
88
|
+
> See the [TypeScript](#-typescript) section for all available types.
|
|
89
|
+
|
|
90
|
+
More detailed samples can be found in the [samples folder](https://github.com/Saifullah-dev/react-file-manager/tree/main/samples).
|
|
91
|
+
|
|
92
|
+
## 🔷 TypeScript
|
|
93
|
+
|
|
94
|
+
Type definitions are included in the package, so there is nothing extra to install. Props are
|
|
95
|
+
type-checked and autocompleted automatically, and you can import any of the types alongside the
|
|
96
|
+
component:
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
import { FileManager, type Permissions, type OnRename } from "@cubone/react-file-manager";
|
|
100
|
+
|
|
101
|
+
const permissions: Permissions = { create: false, delete: false };
|
|
102
|
+
|
|
103
|
+
const handleRename: OnRename = (file, newName) => {
|
|
104
|
+
// file: FileItem, newName: string
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
<FileManager files={files} permissions={permissions} onRename={handleRename} />;
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Available types:**
|
|
111
|
+
|
|
112
|
+
- **Props & data:** `FileManagerProps`, `FileItem`, `Permissions`, `Layout`, `Language`,
|
|
113
|
+
`SortConfiguration`, `FileUploadConfiguration`
|
|
114
|
+
- **Callbacks:** `OnCreateFolder`, `OnFileUploading`, `OnFileUploaded`, `OnCut`, `OnCopy`,
|
|
115
|
+
`OnPaste`, `OnRename`, `OnDownload`, `OnDelete`, `OnRefresh`, `OnFileOpen`, `OnFolderChange`,
|
|
116
|
+
`OnSelect`, `OnSelectionChange`, `OnSortChange`, `OnLayoutChange`, `OnError`,
|
|
117
|
+
`FilePreviewComponent`
|
|
118
|
+
|
|
83
119
|
## 📂 File Structure
|
|
84
120
|
|
|
85
121
|
The `files` prop accepts an array of objects, where each object represents a file or folder. You can
|
|
86
122
|
customize the structure to meet your application needs. Each file or folder object follows the
|
|
87
|
-
structure detailed below:
|
|
123
|
+
structure detailed below (exported as `FileItem` for TypeScript):
|
|
88
124
|
|
|
89
125
|
```typescript
|
|
90
|
-
|
|
126
|
+
interface FileItem {
|
|
91
127
|
name: string;
|
|
92
128
|
isDirectory: boolean;
|
|
93
129
|
path: string;
|
|
94
130
|
updatedAt?: string; // Optional: Last update timestamp in ISO 8601 format
|
|
95
131
|
size?: number; // Optional: File size in bytes (only applicable for files)
|
|
96
|
-
|
|
132
|
+
[key: string]: any; // Optional: Any custom fields your application needs
|
|
133
|
+
}
|
|
97
134
|
```
|
|
98
135
|
|
|
99
136
|
## ⚙️ Props
|
|
@@ -106,33 +143,34 @@ type File = {
|
|
|
106
143
|
| `defaultNavExpanded` | boolean | Sets the default expanded (`true`) or collapsed (`false`) state of the navigation pane when `collapsibleNav` is enabled. This only affects the initial render. `default: true`. |
|
|
107
144
|
| `enableFilePreview` | boolean | A boolean flag indicating whether to use the default file previewer in the file manager `default: true`. |
|
|
108
145
|
| `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`. |
|
|
109
|
-
| `filePreviewComponent` | (file: [
|
|
110
|
-
| `fileUploadConfig` | { url: string; method?: "POST" \| "PUT"; headers?: { [key: string]: string } }
|
|
111
|
-
| `files` | Array<[
|
|
146
|
+
| `filePreviewComponent` | (file: [FileItem](#-file-structure)) => React.ReactNode | (Optional) A callback function that provides a custom file preview. It receives the selected file as its argument and must return a valid React node, JSX element, or HTML. Use this prop to override the default file preview behavior. Example: [Custom Preview Usage](#custom-file-preview). |
|
|
147
|
+
| `fileUploadConfig` | { url: string; method?: "POST" \| "PUT"; headers?: { [key: string]: string }; withCredentials?: boolean } | Configuration object for file uploads. It includes the upload URL (`url`), an optional HTTP method (`method`, default is `"POST"`), and an optional `headers` object for setting custom HTTP headers in the upload request. The `method` property allows only `"POST"` or `"PUT"` values. The `headers` object can accept any standard or custom headers required by the server. The `withCredentials` property allows sending HTTP cookies in the request. Example: `{ url: "https://example.com/fileupload", method: "PUT", headers: { Authorization: "Bearer " + TOKEN, "X-Custom-Header": "value" }, withCredentials: true }` |
|
|
148
|
+
| `files` | Array<[FileItem](#-file-structure)> | An array of file and folder objects representing the current directory structure. Each object includes `name`, `isDirectory`, and `path` properties. |
|
|
112
149
|
| `fontFamily` | string | The font family to be used throughout the component. Accepts any valid CSS font family (e.g., `'Arial, sans-serif'`, `'Roboto'`). You can customize the font styling to match your application's theme. `default: 'Nunito Sans, sans-serif'`. |
|
|
113
|
-
| `formatDate` | (date: string
|
|
150
|
+
| `formatDate` | (date: string) => string | (Optional) A custom function used to format file and folder modification dates. If omitted, the component falls back to its built-in formatter. Useful for adapting the date display to different locales or formats. |
|
|
114
151
|
| `height` | string \| number | The height of the component `default: 600px`. Can be a string (e.g., `'100%'`, `'10rem'`) or a number (in pixels). |
|
|
115
152
|
| `initialPath` | string | The path of the directory to be loaded initially e.g. `/Documents`. This should be the path of a folder which is included in `files` array. Default value is `""` |
|
|
116
153
|
| `isLoading` | boolean | A boolean state indicating whether the application is currently performing an operation, such as creating, renaming, or deleting a file/folder. Displays a loading state if set `true`. |
|
|
117
|
-
| `language` | string | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇰 `da-DK` (Danish, Denmark) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇮 `fi-FI` (Finnish, Finland) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇳🇴 `nb-NO` (Norwegian, Norway) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇸🇪 `sv-SE` (Swedish, Sweden) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
|
|
154
|
+
| `language` | string (`Language` type in TypeScript) | A language code used for translations (e.g., `"en-US"`, `"fr-FR"`, `"tr-TR"`). Defaults to `"en-US"` for English. Allows the user to set the desired translation language manually. In TypeScript, only the codes listed below are accepted. <br><br>**Available languages:** <br> 🇸🇦 `ar-SA` (Arabic, Saudi Arabia) <br> 🇩🇰 `da-DK` (Danish, Denmark) <br> 🇩🇪 `de-DE` (German, Germany) <br> 🇺🇸 `en-US` (English, United States) <br> 🇪🇸 `es-ES` (Spanish, Spain) <br> 🇮🇷 `fa-IR` (Persian, Iran) <br> 🇫🇮 `fi-FI` (Finnish, Finland) <br> 🇫🇷 `fr-FR` (French, France) <br> 🇮🇱 `he-IL` (Hebrew, Israel) <br> 🇮🇳 `hi-IN` (Hindi, India) <br> 🇮🇹 `it-IT` (Italian, Italy) <br> 🇯🇵 `ja-JP` (Japanese, Japan) <br> 🇰🇷 `ko-KR` (Korean, South Korea) <br> 🇳🇴 `nb-NO` (Norwegian, Norway) <br> 🇧🇷 `pt-BR` (Portuguese, Brazil) <br> 🇵🇹 `pt-PT` (Portuguese, Portugal) <br> 🇷🇺 `ru-RU` (Russian, Russia) <br> 🇸🇪 `sv-SE` (Swedish, Sweden) <br> 🇹🇷 `tr-TR` (Turkish, Turkey) <br> 🇺🇦 `uk-UA` (Ukrainian, Ukraine) <br> 🇵🇰 `ur-UR` (Urdu, Pakistan) <br> 🇻🇳 `vi-VN` (Vietnamese, Vietnam) <br> 🇨🇳 `zh-CN` (Chinese, Simplified) <br> 🇵🇱 `pl-PL` (Polish, Poland) |
|
|
118
155
|
| `layout` | "list" \| "grid" | Specifies the default layout style for the file manager. Can be either "list" or "grid". Default value is "grid". |
|
|
119
156
|
| `maxFileSize` | number | For limiting the maximum upload file size in bytes. |
|
|
120
|
-
| `onCopy` | (files: Array<[
|
|
121
|
-
| `onCut` | (files: Array<[
|
|
122
|
-
| `onCreateFolder` | (name: string, parentFolder: [
|
|
123
|
-
| `onDelete` | (files: Array<[
|
|
124
|
-
| `onDownload` | (files: Array<[
|
|
125
|
-
| `onError` | (error: { type: string, message: string }, file: [
|
|
126
|
-
| `onFileOpen` | (file: [
|
|
157
|
+
| `onCopy` | (files: Array<[FileItem](#-file-structure)>) => void | (Optional) A callback function triggered when one or more files or folders are copied providing copied files as an argument. Use this function to perform custom actions on copy event. |
|
|
158
|
+
| `onCut` | (files: Array<[FileItem](#-file-structure)>) => void | (Optional) A callback function triggered when one or more files or folders are cut, providing the cut files as an argument. Use this function to perform custom actions on the cut event. |
|
|
159
|
+
| `onCreateFolder` | (name: string, parentFolder: [FileItem](#-file-structure)) => void | A callback function triggered when a new folder is created. Use this function to update the files state to include the new folder under the specified parent folder using create folder API call to your server. |
|
|
160
|
+
| `onDelete` | (files: Array<[FileItem](#-file-structure)>) => void | A callback function is triggered when one or more files or folders are deleted. |
|
|
161
|
+
| `onDownload` | (files: Array<[FileItem](#-file-structure)>) => void | A callback function triggered when one or more files or folders are downloaded. |
|
|
162
|
+
| `onError` | (error: { type: string, message: string }, file: [FileItem](#-file-structure) \| File) => void | A callback function triggered whenever there is an error in the file manager. Where error is an object containing `type` ("upload", etc.) and a descriptive error `message`. |
|
|
163
|
+
| `onFileOpen` | (file: [FileItem](#-file-structure)) => void | A callback function triggered when a file or folder is opened. |
|
|
127
164
|
| `onFolderChange` | (path: string) => void | A callback function triggered when the active folder changes. Receives the full path of the current folder as a string parameter. Useful for tracking the active folder path. |
|
|
128
165
|
| `onFileUploaded` | (response: { [key: string]: any }) => void | A callback function triggered after a file is successfully uploaded. Provides JSON `response` holding uploaded file details, use it to extract the uploaded file details and add it to the `files` state e.g. `setFiles((prev) => [...prev, JSON.parse(response)]);` |
|
|
129
|
-
| `onFileUploading` | (file:
|
|
166
|
+
| `onFileUploading` | (file: File, parentFolder: [FileItem](#-file-structure)) => { [key: string]: any } | A callback function triggered during the file upload process, receiving the browser `File` being uploaded. You can also return an object with key-value pairs that will be appended to the `FormData` along with the file being uploaded. The object can contain any number of valid properties. |
|
|
130
167
|
| `onLayoutChange` | (layout: "list" \| "grid") => void | A callback function triggered when the layout of the file manager is changed. |
|
|
131
|
-
| `onPaste` | (files: Array<[
|
|
168
|
+
| `onPaste` | (files: Array<[FileItem](#-file-structure)>, destinationFolder: [FileItem](#-file-structure), operationType: "copy" \| "move") => void | A callback function triggered when when one or more files or folders are pasted into a new location. Depending on `operationType`, use this to either copy or move the `sourceItem` to the `destinationFolder`, updating the files state accordingly. |
|
|
132
169
|
| `onRefresh` | () => void | A callback function triggered when the file manager is refreshed. Use this to refresh the `files` state to reflect any changes or updates. |
|
|
133
|
-
| `onRename` | (file: [
|
|
134
|
-
| `onSelectionChange` | (files: Array<[
|
|
135
|
-
| `onSelect`⚠️(deprecated) | (files: Array<[
|
|
170
|
+
| `onRename` | (file: [FileItem](#-file-structure), newName: string) => void | A callback function triggered when a file or folder is renamed. |
|
|
171
|
+
| `onSelectionChange` | (files: Array<[FileItem](#-file-structure)>) => void | (Optional) A callback triggered whenever a file or folder is **selected or deselected**. The function receives the updated array of selected files or folders, allowing you to handle selection-related actions such as displaying file details, enabling toolbar actions, or updating the UI. |
|
|
172
|
+
| `onSelect`⚠️(deprecated) | (files: Array<[FileItem](#-file-structure)>) => void | (Optional) Legacy callback triggered only when a file or folder is **selected**. This prop is deprecated and will be removed in the next major release. Please migrate to `onSelectionChange`. |
|
|
173
|
+
| `onSortChange` | (sortConfig: { key: "name" \| "modified" \| "size", direction: "asc" \| "desc" }) => void | (Optional) A callback function triggered when the sorting order changes. Receives the new sort configuration with the column key and direction. Useful for persisting sort preferences or updating external state. |
|
|
136
174
|
| `permissions` | { create?: boolean; upload?: boolean; move?: boolean; copy?: boolean; rename?: boolean; download?: boolean; delete?: boolean; } | An object that controls the availability of specific file management actions. Setting an action to `false` hides it from the toolbar, context menu, and any relevant UI. All actions default to `true` if not specified. This is useful for implementing role-based access control or restricting certain operations. Example: `{ create: false, delete: false }` disables folder creation and file deletion. |
|
|
137
175
|
| `primaryColor` | string | The primary color for the component's theme. Accepts any valid CSS color format (e.g., `'blue'`, `'#E97451'`, `'rgb(52, 152, 219)'`). This color will be applied to buttons, highlights, and other key elements. `default: #6155b4`. |
|
|
138
176
|
| `style` | object | Inline styles applied to the FileManager root element. |
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { JSX } from 'react';
|
|
2
|
+
|
|
3
|
+
export declare interface FileItem {
|
|
4
|
+
name: string;
|
|
5
|
+
isDirectory: boolean;
|
|
6
|
+
path: string;
|
|
7
|
+
updatedAt?: string;
|
|
8
|
+
size?: number;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare const FileManager: {
|
|
13
|
+
({ files, fileUploadConfig, isLoading, onCreateFolder, onFileUploading, onFileUploaded, onCut, onCopy, onPaste, onRename, onDownload, onDelete, onLayoutChange, onRefresh, onFileOpen, onFolderChange, onSelect, onSelectionChange, onError, onSortChange, layout, enableFilePreview, maxFileSize, filePreviewPath, acceptedFileTypes, height, width, initialPath, filePreviewComponent, primaryColor, fontFamily, language, permissions: userPermissions, collapsibleNav, defaultNavExpanded, className, style, formatDate, }: FileManagerProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
export { FileManager }
|
|
17
|
+
export default FileManager;
|
|
18
|
+
|
|
19
|
+
export declare interface FileManagerProps {
|
|
20
|
+
files?: FileItem[];
|
|
21
|
+
fileUploadConfig?: FileUploadConfiguration;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
onCreateFolder?: OnCreateFolder;
|
|
24
|
+
onFileUploading?: OnFileUploading;
|
|
25
|
+
onFileUploaded?: OnFileUploaded;
|
|
26
|
+
onCut?: OnCut;
|
|
27
|
+
onCopy?: OnCopy;
|
|
28
|
+
onPaste?: OnPaste;
|
|
29
|
+
onRename?: OnRename;
|
|
30
|
+
onDownload?: OnDownload;
|
|
31
|
+
onDelete?: OnDelete;
|
|
32
|
+
onLayoutChange?: OnLayoutChange;
|
|
33
|
+
onRefresh?: OnRefresh;
|
|
34
|
+
onFileOpen?: OnFileOpen;
|
|
35
|
+
onFolderChange?: OnFolderChange;
|
|
36
|
+
/** @deprecated Use `onSelectionChange` instead. */
|
|
37
|
+
onSelect?: OnSelect;
|
|
38
|
+
onSelectionChange?: OnSelectionChange;
|
|
39
|
+
onError?: OnError;
|
|
40
|
+
onSortChange?: OnSortChange;
|
|
41
|
+
layout?: Layout;
|
|
42
|
+
enableFilePreview?: boolean;
|
|
43
|
+
maxFileSize?: number;
|
|
44
|
+
filePreviewPath?: string;
|
|
45
|
+
acceptedFileTypes?: string;
|
|
46
|
+
height?: string | number;
|
|
47
|
+
width?: string | number;
|
|
48
|
+
initialPath?: string;
|
|
49
|
+
filePreviewComponent?: FilePreviewComponent;
|
|
50
|
+
primaryColor?: string;
|
|
51
|
+
fontFamily?: string;
|
|
52
|
+
language?: Language;
|
|
53
|
+
permissions?: Permissions_2;
|
|
54
|
+
collapsibleNav?: boolean;
|
|
55
|
+
defaultNavExpanded?: boolean;
|
|
56
|
+
className?: string;
|
|
57
|
+
style?: React.CSSProperties;
|
|
58
|
+
formatDate?: (date: string) => string;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export declare type FilePreviewComponent = (file: FileItem) => React.ReactNode;
|
|
62
|
+
|
|
63
|
+
export declare interface FileUploadConfiguration {
|
|
64
|
+
url: string;
|
|
65
|
+
method?: "POST" | "PUT";
|
|
66
|
+
headers?: {
|
|
67
|
+
[key: string]: string;
|
|
68
|
+
};
|
|
69
|
+
withCredentials?: boolean;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare type Language = "ar-SA" | "da-DK" | "de-DE" | "en-US" | "es-ES" | "fa-IR" | "fi-FI" | "fr-FR" | "he-IL" | "hi-IN" | "it-IT" | "ja-JP" | "ko-KR" | "nb-NO" | "pt-BR" | "pt-PT" | "ru-RU" | "sv-SE" | "tr-TR" | "uk-UA" | "ur-UR" | "vi-VN" | "zh-CN" | "pl-PL";
|
|
73
|
+
|
|
74
|
+
export declare type Layout = "grid" | "list";
|
|
75
|
+
|
|
76
|
+
export declare type OnCopy = (files: FileItem[]) => void;
|
|
77
|
+
|
|
78
|
+
export declare type OnCreateFolder = (name: string, parentFolder: FileItem) => void;
|
|
79
|
+
|
|
80
|
+
export declare type OnCut = (files: FileItem[]) => void;
|
|
81
|
+
|
|
82
|
+
export declare type OnDelete = (files: FileItem[]) => void;
|
|
83
|
+
|
|
84
|
+
export declare type OnDownload = (files: FileItem[]) => void;
|
|
85
|
+
|
|
86
|
+
export declare type OnError = (error: {
|
|
87
|
+
type: string;
|
|
88
|
+
message: string;
|
|
89
|
+
}, file: FileItem | File) => void;
|
|
90
|
+
|
|
91
|
+
export declare type OnFileOpen = (file: FileItem) => void;
|
|
92
|
+
|
|
93
|
+
export declare type OnFileUploaded = (response: {
|
|
94
|
+
[key: string]: any;
|
|
95
|
+
} | any) => void;
|
|
96
|
+
|
|
97
|
+
export declare type OnFileUploading = (file: File, parentFolder: FileItem) => {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
export declare type OnFolderChange = (path: string) => void;
|
|
102
|
+
|
|
103
|
+
export declare type OnLayoutChange = (layout: Layout) => void;
|
|
104
|
+
|
|
105
|
+
export declare type OnPaste = (files: FileItem[], destinationFolder: FileItem, operationType: "copy" | "move") => void;
|
|
106
|
+
|
|
107
|
+
export declare type OnRefresh = () => void;
|
|
108
|
+
|
|
109
|
+
export declare type OnRename = (file: FileItem, newName: string) => void;
|
|
110
|
+
|
|
111
|
+
export declare type OnSelect = (files: FileItem[]) => void;
|
|
112
|
+
|
|
113
|
+
export declare type OnSelectionChange = (files: FileItem[]) => void;
|
|
114
|
+
|
|
115
|
+
export declare type OnSortChange = (sortConfig: SortConfiguration) => void;
|
|
116
|
+
|
|
117
|
+
declare interface Permissions_2 {
|
|
118
|
+
create?: boolean;
|
|
119
|
+
upload?: boolean;
|
|
120
|
+
move?: boolean;
|
|
121
|
+
copy?: boolean;
|
|
122
|
+
rename?: boolean;
|
|
123
|
+
download?: boolean;
|
|
124
|
+
delete?: boolean;
|
|
125
|
+
}
|
|
126
|
+
export { Permissions_2 as Permissions }
|
|
127
|
+
|
|
128
|
+
export declare interface SortConfiguration {
|
|
129
|
+
key: SortKey;
|
|
130
|
+
direction: SortDirection;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
declare type SortDirection = "asc" | "desc";
|
|
134
|
+
|
|
135
|
+
declare type SortKey = "name" | "modified" | "size";
|
|
136
|
+
|
|
137
|
+
export { }
|