@mui-toolpad-extended-tuni/main 3.4.1 → 3.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.
- package/README.md +17 -5
- package/dist/index.cjs +22 -22
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +0 -12
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,8 +4,9 @@ Main package for MUI Toolpad Extended TUNI - provides ToolpadProvider, LMS compo
|
|
|
4
4
|
|
|
5
5
|
## Version 3.4.1
|
|
6
6
|
|
|
7
|
-
**Bug
|
|
7
|
+
**Bug Fixes:**
|
|
8
8
|
- Fixed build issue where `useApiConfig` was incorrectly referenced (removed in v3.3.0). The package now correctly uses `useServiceApiConfig` and `useApiConfigContext` from core.
|
|
9
|
+
- **Breaking Change**: Removed re-exports of `react-router-dom` components (`BrowserRouter`, `Routes`, `Route`, `Navigate`, `Outlet`, `Link`, hooks, etc.). Since `react-router-dom` is a peer dependency, import these directly from `react-router-dom` to avoid type mismatches and ensure compatibility with your React version.
|
|
9
10
|
|
|
10
11
|
## Installation
|
|
11
12
|
|
|
@@ -65,12 +66,16 @@ npm install @mui-toolpad-extended-tuni/users
|
|
|
65
66
|
|
|
66
67
|
```tsx
|
|
67
68
|
import { BrowserRouter } from 'react-router-dom';
|
|
68
|
-
import { ToolpadProvider } from '@mui-toolpad-extended-tuni/main';
|
|
69
|
+
import { ToolpadProvider, Microservices } from '@mui-toolpad-extended-tuni/main';
|
|
69
70
|
|
|
70
71
|
function App() {
|
|
71
72
|
return (
|
|
72
73
|
<BrowserRouter>
|
|
73
|
-
<ToolpadProvider>
|
|
74
|
+
<ToolpadProvider>
|
|
75
|
+
<Microservices>
|
|
76
|
+
{/* Your application content */}
|
|
77
|
+
</Microservices>
|
|
78
|
+
</ToolpadProvider>
|
|
74
79
|
</BrowserRouter>
|
|
75
80
|
);
|
|
76
81
|
}
|
|
@@ -87,6 +92,10 @@ import {
|
|
|
87
92
|
Notifications,
|
|
88
93
|
Dialogs,
|
|
89
94
|
} from '@mui-toolpad-extended-tuni/main';
|
|
95
|
+
|
|
96
|
+
// Import router components and hooks directly from react-router-dom
|
|
97
|
+
// (react-router-dom is a peer dependency, so import directly to avoid type mismatches)
|
|
98
|
+
import { Routes, Route, Navigate, Outlet, useNavigate, useParams, Link } from 'react-router-dom';
|
|
90
99
|
```
|
|
91
100
|
|
|
92
101
|
## API Configuration
|
|
@@ -231,7 +240,7 @@ If you're migrating from the deprecated `mui-toolpad-extended-tuni` package:
|
|
|
231
240
|
```json
|
|
232
241
|
{
|
|
233
242
|
"dependencies": {
|
|
234
|
-
"@mui-toolpad-extended-tuni/main": "^3.
|
|
243
|
+
"@mui-toolpad-extended-tuni/main": "^3.5.0"
|
|
235
244
|
}
|
|
236
245
|
}
|
|
237
246
|
```
|
|
@@ -239,12 +248,15 @@ If you're migrating from the deprecated `mui-toolpad-extended-tuni` package:
|
|
|
239
248
|
2. Update all imports:
|
|
240
249
|
```typescript
|
|
241
250
|
// Old (deprecated)
|
|
242
|
-
import { ToolpadProvider } from 'mui-toolpad-extended-tuni';
|
|
251
|
+
import { ToolpadProvider, BrowserRouter } from 'mui-toolpad-extended-tuni';
|
|
243
252
|
|
|
244
253
|
// New
|
|
245
254
|
import { ToolpadProvider } from '@mui-toolpad-extended-tuni/main';
|
|
255
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
246
256
|
```
|
|
247
257
|
|
|
258
|
+
**Note**: Router components (`BrowserRouter`, `Routes`, `Route`, `Navigate`, `Outlet`, etc.) and hooks (`useNavigate`, `useParams`, `useLocation`, etc.) should be imported directly from `react-router-dom`, not from `@mui-toolpad-extended-tuni/main`.
|
|
259
|
+
|
|
248
260
|
## License
|
|
249
261
|
|
|
250
262
|
MIT
|