@mui-toolpad-extended-tuni/main 3.2.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 +131 -0
- package/dist/Forms/Components/Editables/EditableAutoComplete.d.ts +12 -0
- package/dist/Forms/Components/Editables/EditableColor.d.ts +8 -0
- package/dist/Forms/Components/Editables/EditableImage.d.ts +9 -0
- package/dist/Forms/Components/Editables/EditableNumber.d.ts +12 -0
- package/dist/Forms/Components/Editables/EditableSelect.d.ts +14 -0
- package/dist/Forms/Components/Editables/EditableSwitch.d.ts +8 -0
- package/dist/Forms/Components/Editables/EditableText.d.ts +32 -0
- package/dist/Forms/Components/SqueezableTable/SqueezableTable.d.ts +2 -0
- package/dist/Forms/Components/SqueezableTable/types.d.ts +24 -0
- package/dist/Forms/PlatformSettings/PlatformSettings.d.ts +21 -0
- package/dist/Forms/PlatformSettings/PlatformSettingsTabs.d.ts +16 -0
- package/dist/Forms/PlatformSettings/tabs/AITab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/AuthTab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/CoursesTab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/FeaturesTab.d.ts +24 -0
- package/dist/Forms/PlatformSettings/tabs/GeneralTab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/PrivacyTab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/ThemeTab.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/components/ColorSettings.d.ts +7 -0
- package/dist/Forms/PlatformSettings/tabs/components/TypographySettings.d.ts +7 -0
- package/dist/ToolpadProvider.d.ts +44 -0
- package/dist/components/AuthenticationManager.d.ts +2 -0
- package/dist/components/IconWithBadge.d.ts +9 -0
- package/dist/components/Microservices/MicroserviceNavigationBuilder.d.ts +45 -0
- package/dist/components/Microservices/MicroserviceSubsections.d.ts +9 -0
- package/dist/components/Microservices/Microservices.d.ts +25 -0
- package/dist/components/Microservices/types.d.ts +12 -0
- package/dist/components/Routes/Home/Home.d.ts +2 -0
- package/dist/components/ThemeToggle/ThemeToggle.d.ts +3 -0
- package/dist/components/tools/addActions.d.ts +5 -0
- package/dist/components/tools/addIcons.d.ts +2 -0
- package/dist/components/tools/iconsByType.d.ts +6 -0
- package/dist/components/tools/utils/ActionFCWrapper.d.ts +5 -0
- package/dist/components/tools/utils/IconFCWrapper.d.ts +5 -0
- package/dist/constants.d.ts +67 -0
- package/dist/hooks/useCustomRouter.d.ts +7 -0
- package/dist/index.cjs +132 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.es.js +13291 -0
- package/dist/interfaces.d.ts +1 -0
- package/dist/layout/Content/PageContent.d.ts +5 -0
- package/dist/layout/Toolbars/AppToolbar/Account.d.ts +2 -0
- package/dist/layout/Toolbars/AppToolbar/CollapsibleMenu.d.ts +1 -0
- package/dist/layout/Toolbars/AppToolbar/Logo.d.ts +2 -0
- package/dist/layout/Toolbars/AppToolbar/RegisteredAppTools.d.ts +11 -0
- package/dist/layout/Toolbars/AppToolbar/SearchBar.d.ts +6 -0
- package/dist/layout/Toolbars/PageToolbar/RegisteredPageTools.d.ts +37 -0
- package/dist/layout/Toolbars/toolbarRegistry.d.ts +117 -0
- package/dist/layout/sidebar/Footer.d.ts +3 -0
- package/dist/network/axiosConfig.d.ts +4 -0
- package/dist/store/useDialogStore.d.ts +9 -0
- package/dist/store/usePlatformStore.d.ts +165 -0
- package/dist/store/useThemeStore.d.ts +184 -0
- package/dist/store/useToolbarStore.d.ts +8 -0
- package/dist/theme/EduMLTheme.d.ts +2 -0
- package/dist/tools/ErrorBoundary.d.ts +14 -0
- package/dist/tools/NullStateWarning.d.ts +8 -0
- package/package.json +73 -0
package/README.md
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# @mui-toolpad-extended-tuni/main
|
|
2
|
+
|
|
3
|
+
Main package for MUI Toolpad Extended TUNI - provides ToolpadProvider, LMS components, and platform features.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mui-toolpad-extended-tuni/main
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Peer Dependencies
|
|
12
|
+
|
|
13
|
+
This package requires the following peer dependencies:
|
|
14
|
+
|
|
15
|
+
- `@emotion/react`: ^11.0.0
|
|
16
|
+
- `@emotion/styled`: ^11.0.0
|
|
17
|
+
- `@mui/icons-material`: ^7.0.0
|
|
18
|
+
- `@mui/material`: ^7.0.0
|
|
19
|
+
- `@mui/x-date-pickers`: ^7.0.0
|
|
20
|
+
- `@toolpad/core`: ^0.16.0
|
|
21
|
+
- `react`: ^19.0.0
|
|
22
|
+
- `react-dom`: ^19.0.0
|
|
23
|
+
- `react-router-dom`: ^7.0.0
|
|
24
|
+
- `zustand`: ^4.5.0
|
|
25
|
+
|
|
26
|
+
## Dependencies
|
|
27
|
+
|
|
28
|
+
This package depends on:
|
|
29
|
+
- `@mui-toolpad-extended-tuni/core`: ^3.1.0 (required)
|
|
30
|
+
|
|
31
|
+
## Optional Extension Packages
|
|
32
|
+
|
|
33
|
+
Install extension packages only if you need their functionality:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
# Calendar microservice
|
|
37
|
+
npm install @mui-toolpad-extended-tuni/calendar
|
|
38
|
+
|
|
39
|
+
# Courses microservice
|
|
40
|
+
npm install @mui-toolpad-extended-tuni/courses
|
|
41
|
+
|
|
42
|
+
# Users microservice
|
|
43
|
+
npm install @mui-toolpad-extended-tuni/users
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Note**: Extension packages require `@mui-toolpad-extended-tuni/main` as a peer dependency and will automatically register themselves when imported.
|
|
47
|
+
|
|
48
|
+
## Basic Usage
|
|
49
|
+
|
|
50
|
+
1. Setup your application with `ToolpadProvider` and routing:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
54
|
+
import { ToolpadProvider } from '@mui-toolpad-extended-tuni/main';
|
|
55
|
+
|
|
56
|
+
function App() {
|
|
57
|
+
return (
|
|
58
|
+
<BrowserRouter>
|
|
59
|
+
<ToolpadProvider>{/* Your application content */}</ToolpadProvider>
|
|
60
|
+
</BrowserRouter>
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. Use components and hooks from the package:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
import {
|
|
69
|
+
ToolpadProvider,
|
|
70
|
+
Microservices,
|
|
71
|
+
useNavigationStore,
|
|
72
|
+
useCurrentUser,
|
|
73
|
+
Notifications,
|
|
74
|
+
Dialogs,
|
|
75
|
+
} from '@mui-toolpad-extended-tuni/main';
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Features
|
|
79
|
+
|
|
80
|
+
### ToolpadProvider
|
|
81
|
+
Main provider component that sets up authentication, navigation, theme, and other platform features.
|
|
82
|
+
|
|
83
|
+
### Components
|
|
84
|
+
- **Microservices**: Main microservice container component
|
|
85
|
+
- **Home**: Default home page component
|
|
86
|
+
- **Dialogs**: Dialog system (DialogOpener, FormDialog, ExtendedDialog)
|
|
87
|
+
- **Notifications**: Notification system
|
|
88
|
+
- **Editable Components**: Form components (EditableText, EditableSwitch, etc.)
|
|
89
|
+
- **ErrorBoundary**: Error boundary component
|
|
90
|
+
- **ThemeToggle**: Theme switching component
|
|
91
|
+
|
|
92
|
+
### Stores & Hooks
|
|
93
|
+
- Navigation stores and hooks
|
|
94
|
+
- User management hooks (from core)
|
|
95
|
+
- Dialog store
|
|
96
|
+
- Platform store
|
|
97
|
+
- Theme store
|
|
98
|
+
- Toolbar store
|
|
99
|
+
|
|
100
|
+
### Utilities
|
|
101
|
+
- Axios configuration
|
|
102
|
+
- Theme utilities
|
|
103
|
+
- Cookie utilities (from core)
|
|
104
|
+
- Case conversion utilities (from core)
|
|
105
|
+
- Date parsing utilities (from core)
|
|
106
|
+
|
|
107
|
+
## Migration from mui-toolpad-extended-tuni
|
|
108
|
+
|
|
109
|
+
If you're migrating from the deprecated `mui-toolpad-extended-tuni` package:
|
|
110
|
+
|
|
111
|
+
1. Update your `package.json`:
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"dependencies": {
|
|
115
|
+
"@mui-toolpad-extended-tuni/main": "^3.2.0"
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
2. Update all imports:
|
|
121
|
+
```typescript
|
|
122
|
+
// Old (deprecated)
|
|
123
|
+
import { ToolpadProvider } from 'mui-toolpad-extended-tuni';
|
|
124
|
+
|
|
125
|
+
// New
|
|
126
|
+
import { ToolpadProvider } from '@mui-toolpad-extended-tuni/main';
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## License
|
|
130
|
+
|
|
131
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableAutocompleteProps<T> {
|
|
3
|
+
value: T[];
|
|
4
|
+
onChange: (value: T[]) => void;
|
|
5
|
+
label: string;
|
|
6
|
+
getOptionLabel?: (option: T) => string;
|
|
7
|
+
helperText?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const EditableAutocomplete: <T extends string | {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>({ value, onChange, label, getOptionLabel, helperText, }: EditableAutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default EditableAutocomplete;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableColorProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const EditableColor: ({ value, onChange, label }: EditableColorProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default EditableColor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableImageProps {
|
|
3
|
+
value?: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
defaultImage?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const EditableImage: ({ value, onChange, defaultImage, label, }: EditableImageProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default EditableImage;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableNumberProps {
|
|
3
|
+
value: number;
|
|
4
|
+
onChange: (value: number) => void;
|
|
5
|
+
label?: string;
|
|
6
|
+
min?: number;
|
|
7
|
+
max?: number;
|
|
8
|
+
step?: number;
|
|
9
|
+
helperText?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const EditableNumber: ({ value, onChange, label, min, max, step, helperText, }: EditableNumberProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export default EditableNumber;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableSelectProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange: (value: string) => void;
|
|
5
|
+
label: string;
|
|
6
|
+
options: {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}[];
|
|
10
|
+
explanation?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const EditableSelect: ({ value, onChange, label, options, explanation, helperText, }: EditableSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default EditableSelect;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
interface EditableSwitchProps {
|
|
3
|
+
value: boolean;
|
|
4
|
+
onChange: (value: boolean) => void;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
declare const EditableSwitch: ({ value, onChange, label }: EditableSwitchProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default EditableSwitch;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
/**
|
|
3
|
+
* EditableText Component
|
|
4
|
+
*
|
|
5
|
+
* @version 3.0.0
|
|
6
|
+
* @breaking-changes
|
|
7
|
+
* - Added disabled state support
|
|
8
|
+
* - Enhanced layout with flex styling for better alignment
|
|
9
|
+
* - Improved hover state handling
|
|
10
|
+
* - Added justification controls for edit button
|
|
11
|
+
*
|
|
12
|
+
* A text field that can be toggled between read-only and edit modes.
|
|
13
|
+
* In read-only mode, displays text with an edit button that appears on hover.
|
|
14
|
+
* In edit mode, displays a text field for editing.
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} props
|
|
17
|
+
* @param {string} props.label - Label for the text field
|
|
18
|
+
* @param {string} props.value - Current value
|
|
19
|
+
* @param {function} props.onChange - Callback when value changes
|
|
20
|
+
* @param {string} [props.helperText] - Helper text to display below the field
|
|
21
|
+
* @param {boolean} [props.disabled] - Whether the field is disabled
|
|
22
|
+
*/
|
|
23
|
+
interface EditableTextProps {
|
|
24
|
+
value: string;
|
|
25
|
+
onChange: (value: string) => void;
|
|
26
|
+
label: string;
|
|
27
|
+
multiline?: boolean;
|
|
28
|
+
helperText?: string;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
}
|
|
31
|
+
declare const EditableText: ({ value, onChange, label, multiline, helperText, disabled, }: EditableTextProps) => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export default EditableText;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
export interface ColumnConfig<T extends string> {
|
|
3
|
+
key: T;
|
|
4
|
+
minWidth: number;
|
|
5
|
+
width: number;
|
|
6
|
+
squeezable: boolean;
|
|
7
|
+
label: string;
|
|
8
|
+
}
|
|
9
|
+
export interface SqueezableTableProps<T extends string> {
|
|
10
|
+
columns: ColumnConfig<T>[];
|
|
11
|
+
data: readonly any[] | any[];
|
|
12
|
+
renderCell: (columnKey: T, row: any) => React.ReactNode;
|
|
13
|
+
maxHeight?: string;
|
|
14
|
+
stickyHeader?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface TableCellProps<T extends string> {
|
|
17
|
+
columnKey: T;
|
|
18
|
+
config: ColumnConfig<T>;
|
|
19
|
+
isSmallScreen: boolean;
|
|
20
|
+
isExpanded: boolean;
|
|
21
|
+
onHover: (key: T | null) => void;
|
|
22
|
+
onClick: (key: T) => void;
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
/**
|
|
3
|
+
* PlatformSettings Component
|
|
4
|
+
*
|
|
5
|
+
* @version 3.0.0
|
|
6
|
+
* @breaking-changes
|
|
7
|
+
* - Updated notification store path to feature-based structure
|
|
8
|
+
* - Enhanced form state management with isDirty tracking
|
|
9
|
+
* - Improved TypeScript strict mode compliance
|
|
10
|
+
* - Standardized string literals
|
|
11
|
+
* - Enhanced layout structure without fixed heights
|
|
12
|
+
* - Added unsaved changes warning system
|
|
13
|
+
*
|
|
14
|
+
* Provides interface for:
|
|
15
|
+
* - Managing platform-wide settings
|
|
16
|
+
* - Configuring global features
|
|
17
|
+
* - Setting platform defaults
|
|
18
|
+
* - Managing AI configurations
|
|
19
|
+
*/
|
|
20
|
+
declare const PlatformSettings: () => import("react/jsx-runtime").JSX.Element | null;
|
|
21
|
+
export default PlatformSettings;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Platform } from '../../store/usePlatformStore';
|
|
2
|
+
import { AppTheme } from '../../store/useThemeStore';
|
|
3
|
+
interface TabPanelProps {
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
index: number;
|
|
6
|
+
value: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function TabPanel(props: TabPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
interface PlatformSettingsTabsProps {
|
|
10
|
+
platformSettings: Platform;
|
|
11
|
+
themeSettings: AppTheme;
|
|
12
|
+
handleUpdatePlatformSettings: (settings: Partial<Platform>) => void;
|
|
13
|
+
handleUpdateThemeSettings: (settings: AppTheme) => void;
|
|
14
|
+
}
|
|
15
|
+
export default function PlatformSettingsTabs({ platformSettings, themeSettings, handleUpdatePlatformSettings, handleUpdateThemeSettings, }: PlatformSettingsTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface AITabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Platform) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function AITab({ settings, onUpdate }: AITabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface AuthTabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Partial<Platform>) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function AuthTab({ settings, onUpdate }: AuthTabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface CoursesTabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Partial<Platform>) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function CoursesTab({ settings, onUpdate }: CoursesTabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface FeaturesTabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Platform) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* FeaturesTab Component
|
|
8
|
+
*
|
|
9
|
+
* @version 3.0.0
|
|
10
|
+
* @breaking-changes
|
|
11
|
+
* - Replaced Grid system with more flexible Box layout
|
|
12
|
+
* - Enhanced responsive design with flex-based layouts
|
|
13
|
+
* - Improved spacing consistency
|
|
14
|
+
* - Optimized component structure for better performance
|
|
15
|
+
* - Standardized style properties
|
|
16
|
+
*
|
|
17
|
+
* Provides interface for:
|
|
18
|
+
* - Managing platform-wide feature settings
|
|
19
|
+
* - Configuring feature availability
|
|
20
|
+
* - Setting feature-specific parameters
|
|
21
|
+
* - Managing feature dependencies
|
|
22
|
+
*/
|
|
23
|
+
export default function FeaturesTab({ settings, onUpdate }: FeaturesTabProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface GeneralTabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Partial<Platform>) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function GeneralTab({ settings, onUpdate }: GeneralTabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Platform } from '../../../store/usePlatformStore';
|
|
2
|
+
interface PrivacyTabProps {
|
|
3
|
+
settings: Platform;
|
|
4
|
+
onUpdate: (settings: Partial<Platform>) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function PrivacyTab({ settings, onUpdate }: PrivacyTabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppTheme } from '../../../store/useThemeStore';
|
|
2
|
+
interface ThemeTabProps {
|
|
3
|
+
theme: AppTheme;
|
|
4
|
+
onUpdate: (theme: AppTheme) => void;
|
|
5
|
+
}
|
|
6
|
+
export default function ThemeTab({ theme, onUpdate }: ThemeTabProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppTheme } from '../../../../store/useThemeStore';
|
|
2
|
+
interface ColorSettingsProps {
|
|
3
|
+
theme: AppTheme;
|
|
4
|
+
onUpdate: (theme: AppTheme) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const ColorSettings: ({ theme, onUpdate }: ColorSettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AppTheme } from '../../../../store/useThemeStore';
|
|
2
|
+
interface TypographySettingsProps {
|
|
3
|
+
theme: AppTheme;
|
|
4
|
+
onUpdate: (theme: AppTheme) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const TypographySettings: ({ theme, onUpdate, }: TypographySettingsProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface LogoConfig {
|
|
3
|
+
sidebarFooter?: {
|
|
4
|
+
smallLogo?: string;
|
|
5
|
+
fullLogo?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
export interface ToolpadProviderProps {
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
logos?: LogoConfig;
|
|
12
|
+
}
|
|
13
|
+
export declare const useLogoContext: () => LogoConfig;
|
|
14
|
+
/**
|
|
15
|
+
* ToolpadProvider Component
|
|
16
|
+
*
|
|
17
|
+
* @version 3.0.0
|
|
18
|
+
* @breaking-changes
|
|
19
|
+
* - Renamed from LMSProvider to ToolpadProvider in v3.0.0
|
|
20
|
+
* - Complete architectural restructuring for better separation of concerns
|
|
21
|
+
* - Removed direct course management (now handled by CourseManager)
|
|
22
|
+
* - Simplified authentication handling (now handled by AuthenticationManager)
|
|
23
|
+
* - Improved theme management with consistent application
|
|
24
|
+
* - Enhanced layout structure with PageContent and PageToolbar components
|
|
25
|
+
* - Removed direct message handling (now managed by respective components)
|
|
26
|
+
*
|
|
27
|
+
* Main application provider that sets up:
|
|
28
|
+
* - Authentication context
|
|
29
|
+
* - Theme provider
|
|
30
|
+
* - Navigation structure
|
|
31
|
+
* - Basic app layout
|
|
32
|
+
* - Router integration
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <BrowserRouter>
|
|
37
|
+
* <ToolpadProvider>
|
|
38
|
+
* <YourApp />
|
|
39
|
+
* </ToolpadProvider>
|
|
40
|
+
* </BrowserRouter>
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
43
|
+
declare const ToolpadProvider: React.FC<ToolpadProviderProps>;
|
|
44
|
+
export default ToolpadProvider;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SxProps, Theme } from '@mui/material/styles';
|
|
2
|
+
type IconWithBadgeProps = {
|
|
3
|
+
Icon: React.FC;
|
|
4
|
+
size: number;
|
|
5
|
+
title: string;
|
|
6
|
+
sx?: SxProps<Theme>;
|
|
7
|
+
};
|
|
8
|
+
declare const IconWithBadge: ({ Icon, size, title, sx }: IconWithBadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default IconWithBadge;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { NavigationPageStoreItem } from '../../../../core/src';
|
|
2
|
+
export type BuildMicroServiceNavigationProps = {
|
|
3
|
+
segment: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon: any;
|
|
7
|
+
view?: React.ComponentType;
|
|
8
|
+
forRoles: string[];
|
|
9
|
+
children?: NavigationPageStoreItem[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Builds a navigation structure for a microservice that can be integrated into the LMS navigation system.
|
|
13
|
+
*
|
|
14
|
+
* @param {BuildMicroServiceNavigation} options - Configuration options for the microservice navigation
|
|
15
|
+
* @param {string} options.segment - URL segment for the microservice (e.g., 'edutest')
|
|
16
|
+
* @param {string} options.title - Display title of the microservice
|
|
17
|
+
* @param {string} options.description - Description of the microservice's purpose
|
|
18
|
+
* @param {any} options.icon - MUI icon component to be used for the navigation item
|
|
19
|
+
* @param {string[]} options.forRoles - Array of role names that can access this microservice
|
|
20
|
+
* @param {NavigationPageStoreItem[]} [options.children] - Optional sub-navigation items
|
|
21
|
+
*
|
|
22
|
+
* @returns {NavigationPageStoreItem[]} Array containing the navigation structure
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* import ScienceIcon from '@mui/icons-material/Science';
|
|
27
|
+
*
|
|
28
|
+
* const eduTestNavigation = buildMicroServiceNavigation({
|
|
29
|
+
* segment: 'edutest',
|
|
30
|
+
* title: 'EduTest',
|
|
31
|
+
* description: 'Testing system for education',
|
|
32
|
+
* icon: ScienceIcon,
|
|
33
|
+
* forRoles: ['teacher', 'student'],
|
|
34
|
+
* children: [
|
|
35
|
+
* {
|
|
36
|
+
* kind: 'page',
|
|
37
|
+
* segment: 'assignments',
|
|
38
|
+
* title: 'Assignments',
|
|
39
|
+
* // ... other properties
|
|
40
|
+
* }
|
|
41
|
+
* ]
|
|
42
|
+
* });
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare const buildMicroServiceNavigation: ({ segment, title, description, icon, view, forRoles, children, }: BuildMicroServiceNavigationProps) => NavigationPageStoreItem[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NavigationPageStoreItem } from '../../../../core/src';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Sub-sections navigation component for tool pages
|
|
5
|
+
*/
|
|
6
|
+
declare const SubSections: React.FC<{
|
|
7
|
+
children: NavigationPageStoreItem[];
|
|
8
|
+
}>;
|
|
9
|
+
export default SubSections;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Core component for handling top-level app routing and microservices.
|
|
4
|
+
*
|
|
5
|
+
* @version 3.1.0
|
|
6
|
+
* @breaking-changes
|
|
7
|
+
* - Course routing has been moved to CourseMicroservice component
|
|
8
|
+
* - This component is now microservice-agnostic - it doesn't directly import course routes
|
|
9
|
+
* - Course routes register themselves via CourseRoutesProvider using NavigationRegistry
|
|
10
|
+
*
|
|
11
|
+
* Architecture:
|
|
12
|
+
* - Microservices handles: /, /help, /contact, dynamic microservices (via NavigationRegistry)
|
|
13
|
+
* - Course routes register themselves as route providers via CourseRoutesProvider
|
|
14
|
+
* - All routes are retrieved through useMicroserviceRoutes() which includes route providers
|
|
15
|
+
* - CourseMicroservice handles: /:code, /:code/:instance, /:code/:instance/:microservice
|
|
16
|
+
* - Course microservices are managed by CourseMicroservice component via context (not tightly coupled here)
|
|
17
|
+
*
|
|
18
|
+
* @component
|
|
19
|
+
* @param {Object} props
|
|
20
|
+
* @param {React.ReactNode} props.children - Child components (e.g., CourseMicroservice)
|
|
21
|
+
*/
|
|
22
|
+
declare const Microservices: ({ children }: {
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export default Microservices;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
/**
|
|
3
|
+
* Configuration interface for microservices
|
|
4
|
+
*
|
|
5
|
+
* Used to define microservice metadata including routing, component, and navigation building.
|
|
6
|
+
*/
|
|
7
|
+
export interface MicroserviceConfig {
|
|
8
|
+
path: string;
|
|
9
|
+
Component: React.ComponentType;
|
|
10
|
+
fetchHooks?: Array<(courseId: string) => void>;
|
|
11
|
+
buildNavigation: (courseId: string, isTeacher: boolean) => any[];
|
|
12
|
+
}
|