admin_lsac 1.4.9 → 1.5.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.
Files changed (2) hide show
  1. package/README.md +16 -14
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,14 +2,12 @@
2
2
 
3
3
  For configuring your own admin panel, follow the next instructions.
4
4
 
5
+ ## How to install it?
6
+
5
7
  ### `npm install admin_lsac`
6
8
 
7
9
  This command will download and install the specified package and its dependencies into your project's node_modules directory, making it available for use in your project.
8
10
 
9
- ### `npm install export-to-csv@1.2.1`
10
-
11
- Export-to-csv package latest version is not working properly, so make sure you have the last functional version of this package install.
12
-
13
11
  ## What do you need to import?
14
12
 
15
13
  ### `import { ChakraProvider } from '@chakra-ui/react'`
@@ -18,13 +16,15 @@ Export-to-csv package latest version is not working properly, so make sure you h
18
16
 
19
17
  ### `import { AdminPage } from 'admin_lsac'`
20
18
 
21
- You can import these in App.js / App.ts. If your project is TypeScript-based, you need to write the following line as well:
19
+ You can import these in App.js / App.ts or wherever your routes to the pages are located.
22
20
 
23
21
  ### `import { PageSchema } from 'admin_lsac'`
24
22
 
25
- * Import the component from above where you want to write your schemas. (See below for details about schemas)
23
+ If your project is TypeScript-based, you need to use the line above as well.
26
24
 
27
- You need to create an array of schemas for your own admin panel. You can write the following inside your Routes component from App.js / App.ts:
25
+ - Import the component from above where you want to write your schemas. (See below for details about schemas)
26
+
27
+ ## How to add routes to the admin panel's pages?
28
28
 
29
29
  ```
30
30
  {your_array.map((page) => (
@@ -39,7 +39,7 @@ You need to create an array of schemas for your own admin panel. You can write t
39
39
  }
40
40
  />
41
41
  ))}
42
- {your_array[0] ? (
42
+ {your_array[0] ? ( // recommended default route when accessing admin panel
43
43
  <Route
44
44
  path={`${your_url_to_admin_panel}/*`}
45
45
  element={
@@ -53,7 +53,9 @@ You need to create an array of schemas for your own admin panel. You can write t
53
53
  ) : null}
54
54
  ```
55
55
 
56
- #### ⚠️ Don't forget to wrap the Router component into a ChakraProvider component.
56
+ You will need to create an array of schemas for your own admin panel.
57
+
58
+ #### ⚠️ Don't forget to wrap the Router component into a ChakraProvider component. Otherwise, you will not like the way it looks. :)
57
59
 
58
60
  ## What is a schema?
59
61
 
@@ -121,9 +123,9 @@ export interface RowAction {
121
123
  }
122
124
  ```
123
125
 
124
- A page schema is based on these interfaces, which can be imported into your files. A page schema describes how one table of your admin panel would need to be structured to accomplish what the user needs regarding an entity. (i.e. users, teams, companies, quizzes)
126
+ A page schema is based on these interfaces, and it describes how one table of your admin panel would need to be structured to accomplish what the user needs to do regarding an entity. (i.e. users, teams, companies, quizzes)
125
127
 
126
- #### An array of schemas would be defined as follows:
128
+ #### An array of schemas must be defined as below:
127
129
 
128
130
  ```
129
131
  const your_array = [
@@ -137,7 +139,7 @@ const your_array = [
137
139
  ];
138
140
  ```
139
141
 
140
- * In TypeScript, it would slightly change:
142
+ - In TypeScript, it would slightly change:
141
143
 
142
144
  ```
143
145
  const your_array: PageSchema[] = [
@@ -153,9 +155,9 @@ const your_array: PageSchema[] = [
153
155
 
154
156
  ## Other Specifications
155
157
 
156
- Due to some corrupt dependencies, you need a Node version >= 20.5.0 to use this package in a Vite app.
158
+ Due to some corrupt dependencies, you will need a Node version >= 20.5.0 to use this NPM package (it may work in some cases, but we still recommend updating Node to a newer version).
157
159
 
158
- For every entity you describe through a page schema, getRequest and onSubmit functions will use routes created for the entity. `getRequest` function will make a GET request, while `onSumbit` will probably make a POST, PATCH or DELETE request.
160
+ For every entity you describe through a page schema, getRequest and onSubmit functions use routes created for the entity. `getRequest` function makes a GET request, while `onSumbit` function generally makes a POST, PATCH or DELETE request.
159
161
 
160
162
  ## Learn More
161
163
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "admin_lsac",
3
3
  "private": false,
4
- "version": "1.4.9",
4
+ "version": "1.5.0",
5
5
  "description": "Generic Admin Panel created for storing events' data",
6
6
  "scripts": {
7
7
  "dev": "vite",