@mui-toolpad-extended-tuni/users 3.0.2 → 3.0.4
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 +23 -7
- package/dist/UserMicroservice.d.ts +1 -1
- package/dist/UserSwitcher.d.ts +3 -0
- package/dist/index.cjs +8 -241
- package/dist/index.d.ts +3 -2
- package/dist/index.es.js +746 -12998
- package/dist/network/users.d.ts +1 -1
- package/dist/store/useUserStore.d.ts +2 -2
- package/package.json +12 -4
- package/dist/mocks/constants.d.ts +0 -59
- package/dist/mocks/endpoints.d.ts +0 -3
- package/dist/mocks/generators.d.ts +0 -6
- package/dist/mocks/types.d.ts +0 -52
package/README.md
CHANGED
|
@@ -5,14 +5,20 @@ Users microservice extension for MUI Toolpad Extended TUNI. This package provide
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @mui-toolpad-extended-tuni/users
|
|
8
|
+
npm install @mui-toolpad-extended-tuni/users @mui-toolpad-extended-tuni/main @mui-toolpad-extended-tuni/core
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
**
|
|
11
|
+
**Important**: You must also install `@mui-toolpad-extended-tuni/main` and `@mui-toolpad-extended-tuni/core` as they are required peer dependencies.
|
|
12
12
|
|
|
13
|
-
## Peer Dependencies
|
|
13
|
+
## Required Peer Dependencies
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
This package requires the following peer dependencies to be installed:
|
|
16
|
+
|
|
17
|
+
### Required Packages
|
|
18
|
+
- **`@mui-toolpad-extended-tuni/main`**: ^3.3.0 - **MUST be installed separately**
|
|
19
|
+
- **`@mui-toolpad-extended-tuni/core`**: ^3.1.0 - **MUST be installed separately** (also required by main)
|
|
20
|
+
|
|
21
|
+
### React & UI Framework
|
|
16
22
|
- `react@^19.0.0`
|
|
17
23
|
- `react-dom@^19.0.0`
|
|
18
24
|
- `react-router-dom@^7.0.0`
|
|
@@ -23,6 +29,16 @@ npm install @mui-toolpad-extended-tuni/users
|
|
|
23
29
|
- `axios@^1.7.0`
|
|
24
30
|
- `zustand@^4.5.0`
|
|
25
31
|
|
|
32
|
+
### Installation Example
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install @mui-toolpad-extended-tuni/users @mui-toolpad-extended-tuni/main @mui-toolpad-extended-tuni/core \
|
|
36
|
+
react react-dom react-router-dom \
|
|
37
|
+
@mui/material @mui/icons-material \
|
|
38
|
+
@emotion/react @emotion/styled \
|
|
39
|
+
axios zustand
|
|
40
|
+
```
|
|
41
|
+
|
|
26
42
|
## Usage
|
|
27
43
|
|
|
28
44
|
### Basic Setup
|
|
@@ -31,18 +47,18 @@ The users microservice automatically configures the UserBus when imported:
|
|
|
31
47
|
|
|
32
48
|
```tsx
|
|
33
49
|
import { BrowserRouter } from 'react-router-dom';
|
|
34
|
-
import {
|
|
50
|
+
import { ToolpadProvider, Microservices } from 'mui-toolpad-extended-tuni';
|
|
35
51
|
import { UserMicroservice } from '@mui-toolpad-extended-tuni/users';
|
|
36
52
|
|
|
37
53
|
function App() {
|
|
38
54
|
return (
|
|
39
55
|
<BrowserRouter>
|
|
40
|
-
<
|
|
56
|
+
<ToolpadProvider>
|
|
41
57
|
<Microservices>
|
|
42
58
|
<UserMicroservice />
|
|
43
59
|
{/* Other microservices */}
|
|
44
60
|
</Microservices>
|
|
45
|
-
</
|
|
61
|
+
</ToolpadProvider>
|
|
46
62
|
</BrowserRouter>
|
|
47
63
|
);
|
|
48
64
|
}
|
|
@@ -16,7 +16,7 @@ interface UserMicroserviceProps {
|
|
|
16
16
|
* to react to user changes. Direct useUserStore access is only allowed within the Users
|
|
17
17
|
* module itself, in Events/UserBus for delegation, and in DevTools components.
|
|
18
18
|
*
|
|
19
|
-
* This component should be used in App.tsx, not
|
|
19
|
+
* This component should be used in App.tsx, not ToolpadProvider.tsx, to maintain
|
|
20
20
|
* proper separation of concerns and avoid tight coupling.
|
|
21
21
|
*
|
|
22
22
|
* @example
|