@mui-toolpad-extended-tuni/main 3.4.1 → 3.5.1

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 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 Fix:**
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>{/* Your application content */}</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.4.1"
243
+ "@mui-toolpad-extended-tuni/main": "^3.5.0"
235
244
  }
236
245
  }
237
246
  ```
@@ -239,12 +248,16 @@ 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
263
+
@@ -0,0 +1,8 @@
1
+ import { ToolSelectorItem } from './types';
2
+ interface ToolSelectorProps {
3
+ show: boolean;
4
+ title: string;
5
+ navigationItems: ToolSelectorItem[];
6
+ }
7
+ declare const ToolSelector: ({ show, title, navigationItems }: ToolSelectorProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default ToolSelector;
@@ -0,0 +1,3 @@
1
+ /** @format */
2
+ export { default as ToolSelector } from './ToolSelector';
3
+ export type { ToolSelectorItem } from './types';
@@ -0,0 +1,7 @@
1
+ /** @format */
2
+ export type ToolSelectorItem = {
3
+ path: string;
4
+ icon: React.ReactNode;
5
+ label: string;
6
+ description: string;
7
+ };