@cubone/react-file-manager 1.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Saifullah Zubair
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # File Manager Component
2
+
3
+ ## Overview
4
+
5
+ The File Manager Component is an open-source React.js package designed to help developers easily integrate a file manager into their applications. This component provides a user-friendly interface along with essential functionalities for managing files and folders, such as viewing, uploading and deleting within a specified directory structure. Ideal for anyone looking to build or enhance a file management system, this package offers both UI and backend integration capabilities.
6
+
7
+ ## Features
8
+
9
+ - **View Files and Folders**: Display the directory structure with folders and files.
10
+ - **Upload Files**: Upload new files to a selected directory.
11
+ - **Delete Files and Folders**: Remove unwanted files or folders.
12
+ - **Breadcrumb Navigation**: Easily navigate through the directory structure.
13
+ - **Responsive Design**: Works seamlessly on both desktop and mobile devices.
14
+
15
+ ## Installation
16
+
17
+ To get started with the File Manager Component, follow these steps:
18
+
19
+ ### Prerequisites
20
+
21
+ Ensure you have the following installed on your system:
22
+
23
+ - Node.js (v14 or later)
24
+ - npm (v6 or later)
25
+
26
+ ### Clone the Repository
27
+
28
+ ```bash
29
+ git clone https://github.com/Saifullah-dev/react-file-manager.git
30
+ cd react-file-manager
31
+ ```
32
+
33
+ ### Install Dependencies
34
+
35
+ Using npm:
36
+
37
+ ```bash
38
+ npm i
39
+ ```
40
+
41
+ ### Start the Development Server
42
+
43
+ To start the development server and see the File Manager in action:
44
+
45
+ ```bash
46
+ npm run dev
47
+ ```
48
+
49
+ The application should now be running on `http://localhost:5173`.
50
+
51
+ ## Usage
52
+
53
+ ### File Structure
54
+
55
+ - **src/**: Contains all the source code.
56
+ - **components/**: Reusable components like `Button`, `Context Menu`, `Modal`, etc.
57
+ - **File Manager/**: The main directory for the File Manager component.
58
+ - **hooks/**: Custom hooks for handling various interactions and UI state.
59
+ - **Mock APIs/**: Simulated API functions for demonstration purposes.
60
+ - **utils/**: Utility functions and helpers.
61
+ - **App.js**: Main entry point of the application.
62
+ - **index.js**: Application bootstrap and rendering.
63
+
64
+ ## Available Scripts
65
+
66
+ In the project directory, you can run:
67
+
68
+ - `npm run dev`: Runs the app in development mode.
69
+ - `npm run build`: Builds the app for production.
70
+ - `npm test`: Launches the test runner.
71
+
72
+ ## Deployment
73
+
74
+ To deploy the app, first build the project:
75
+
76
+ ```bash
77
+ npm run build
78
+ ```
79
+
80
+ This will create a `build/` directory containing the production-ready code. You can then deploy the contents of this directory to your preferred hosting service.
81
+
82
+ ## Contributing
83
+
84
+ Contributions are welcome! To contribute:
85
+
86
+ 1. Fork the repository.
87
+ 2. Create a new branch (`git checkout -b feature/branch-name`).
88
+ 3. Make your changes.
89
+ 4. Commit your changes (`git commit -m 'Add some feature'`).
90
+ 5. Push to the branch (`git push origin feature/branch-name`).
91
+ 6. Open a Pull Request.
92
+
93
+ ## License
94
+
95
+ This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
96
+
97
+ ## Contact
98
+
99
+ For any questions, feel free to reach out:
100
+
101
+ - **Email**: saifullah.contact@gmail.com
102
+ - **GitHub**: [Saifullah-dev](https://github.com/Saifullah-dev)