admin_lsac 2.0.1 → 2.0.2

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 +9 -1
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -33,8 +33,9 @@ Import the component from above where you want to write your schemas! (See below
33
33
  element={
34
34
  <AdminPage
35
35
  pages={your_array}
36
- selectedPage={page}
36
+ selectedPage={page} // 'page' param from above
37
37
  basePath={your_url_to_admin_panel}
38
+ apiURL={your_url_to_backend} // optional, for websockets
38
39
  />
39
40
  }
40
41
  />
@@ -47,6 +48,7 @@ Import the component from above where you want to write your schemas! (See below
47
48
  pages={your_array}
48
49
  selectedPage={your_array[0]}
49
50
  basePath={your_url_to_admin_panel}
51
+ apiURL={your_url_to_backend} // optional, for websockets
50
52
  />
51
53
  }
52
54
  />
@@ -309,6 +311,12 @@ const your_array: PageSchema[] = [
309
311
  ];
310
312
  ```
311
313
 
314
+ ## Websockets Support
315
+
316
+ For real-time changes, this NPM module uses socket.io-client library to implement WebSockets. So, on the server-side, you will have to use socket.io library, and provide an `apiURL` as shown above.
317
+
318
+ In order for it to work, emit an event 'updateData' from the server for every route associated with an action/rowAction. You can also send a message that the client will receive (the message will be shown in the web console).
319
+
312
320
  ## Other Specifications
313
321
 
314
322
  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).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "admin_lsac",
3
3
  "private": false,
4
- "version": "2.0.1",
4
+ "version": "2.0.2",
5
5
  "description": "Generic Admin Panel created for storing events' data",
6
6
  "scripts": {
7
7
  "dev": "vite",