mui-toolpad-extended-tuni 2.1.0 → 3.0.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 +158 -20
- package/dist/index.cjs +193 -149
- package/dist/index.d.ts +2 -49
- package/dist/index.es.js +66328 -19259
- package/dist/mockServiceWorker.js +1 -1
- package/dist/mui-toolpad-extended-tuni.css +1 -0
- package/dist/src/App.d.ts +31 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableAutoComplete.d.ts +12 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableColor.d.ts +8 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableImage.d.ts +9 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableNumber.d.ts +12 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableSelect.d.ts +14 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableSwitch.d.ts +8 -0
- package/dist/src/LMSToolpad/Forms/Components/Editables/EditableText.d.ts +32 -0
- package/dist/src/LMSToolpad/Forms/Components/SqueezableTable/SqueezableTable.d.ts +2 -0
- package/dist/src/LMSToolpad/Forms/Components/SqueezableTable/types.d.ts +24 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/PlatformSettings.d.ts +21 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/PlatformSettingsTabs.d.ts +16 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/AITab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/AuthTab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/CoursesTab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/FeaturesTab.d.ts +24 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/GeneralTab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/PrivacyTab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/ThemeTab.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/components/ColorSettings.d.ts +7 -0
- package/dist/src/LMSToolpad/Forms/PlatformSettings/tabs/components/TypographySettings.d.ts +7 -0
- package/dist/src/LMSToolpad/LMSProvider.d.ts +34 -0
- package/dist/src/LMSToolpad/components/AuthenticationManager.d.ts +2 -0
- package/dist/src/LMSToolpad/components/Calendar/Calendar.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarBody.d.ts +16 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarEventAggregator.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarEventItem.d.ts +10 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarHeader.d.ts +12 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarManager.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/CalendarMicroservice.d.ts +32 -0
- package/dist/src/LMSToolpad/components/Calendar/DatePickerPopover.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Calendar/components/EventDetails.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/components/EventMenu.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/components/EventViews.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/components/index.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Calendar/index.d.ts +5 -0
- package/dist/src/LMSToolpad/components/Calendar/store/useCalendarStore.d.ts +44 -0
- package/dist/src/LMSToolpad/components/Calendar/types.d.ts +49 -0
- package/dist/src/LMSToolpad/components/Courses/CourseEventPublisher.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseActions.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseHeader.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseHeaderActions.d.ts +12 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseIcon.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseInfo.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Courses/CourseItem/CourseItem.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Courses/CourseList.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Courses/CourseManager.d.ts +2 -0
- package/dist/src/LMSToolpad/components/Courses/CourseMicroservice.d.ts +42 -0
- package/dist/src/LMSToolpad/components/Courses/CourseRoutesProvider.d.ts +12 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/components/Courses/CourseTools.d.ts +2 -3
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/CourseSettings.d.ts +23 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/CourseSettingsTabs.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/BasicInfoTab.d.ts +7 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/DataProcessingTab.d.ts +24 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/EnrollmentTab.d.ts +28 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/RelationshipsTab.d.ts +25 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/StaffTab.d.ts +26 -0
- package/dist/src/LMSToolpad/components/Courses/Forms/CourseSettings/tabs/VisibilityTab.d.ts +24 -0
- package/dist/src/LMSToolpad/components/Courses/Navigation/CourseNavigationbuilder.d.ts +2 -0
- package/dist/{LMSToolpad/components → src/LMSToolpad/components/Courses/components/ToolDisplayer}/ToolCard.d.ts +1 -1
- package/dist/{LMSToolpad/components → src/LMSToolpad/components/Courses/components/ToolDisplayer}/ToolDisplayer.d.ts +1 -11
- package/dist/src/LMSToolpad/components/Courses/config/subjectConfig.d.ts +10 -0
- package/dist/src/LMSToolpad/components/Courses/context/CourseMicroserviceContext.d.ts +26 -0
- package/dist/src/LMSToolpad/components/Courses/hooks/useCourseRoutes.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Courses/mocks/commented.d.ts +0 -0
- package/dist/src/LMSToolpad/components/Courses/mocks/constants.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Courses/mocks/endpoints.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Courses/mocks/generators.d.ts +13 -0
- package/dist/src/LMSToolpad/components/Courses/mocks/types.d.ts +109 -0
- package/dist/{LMSToolpad → src/LMSToolpad/components/Courses}/network/courses.d.ts +1 -8
- package/dist/src/LMSToolpad/components/Courses/store/useCourseStore.d.ts +146 -0
- package/dist/{LMSToolpad → src/LMSToolpad/components/Courses}/utils/courseFilters.d.ts +8 -1
- package/dist/{LMSToolpad → src/LMSToolpad}/components/Dialogs/DialogOpener.d.ts +0 -1
- package/dist/src/LMSToolpad/components/Dialogs/Dialogs.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Dialogs/ExtendedDialog.d.ts +8 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/components/Dialogs/FormDialog.d.ts +5 -1
- package/dist/src/LMSToolpad/components/Dialogs/dialogRegistry.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Events/EventBus.d.ts +34 -0
- package/dist/src/LMSToolpad/components/Events/UserBus.d.ts +111 -0
- package/dist/src/LMSToolpad/components/Events/hooks/useCurrentUser.d.ts +11 -0
- package/dist/src/LMSToolpad/components/Events/hooks/useUserActions.d.ts +15 -0
- package/dist/src/LMSToolpad/components/Events/hooks/useUserPreferences.d.ts +22 -0
- package/dist/src/LMSToolpad/components/Events/index.d.ts +10 -0
- package/dist/src/LMSToolpad/components/Events/types.d.ts +16 -0
- package/dist/src/LMSToolpad/components/Events/userTypes.d.ts +78 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/components/IconWithBadge.d.ts +0 -1
- package/dist/{LMSToolpad/components → src/LMSToolpad/components/Microservices}/MicroserviceNavigationBuilder.d.ts +3 -3
- package/dist/src/LMSToolpad/components/Microservices/MicroserviceSubsections.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Microservices/Microservices.d.ts +25 -0
- package/dist/src/LMSToolpad/components/Microservices/types.d.ts +12 -0
- package/dist/src/LMSToolpad/components/Navigation/NavigationBuilder.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Navigation/NavigationFilter.d.ts +1 -0
- package/dist/src/LMSToolpad/components/Navigation/NavigationRegistry.d.ts +116 -0
- package/dist/src/LMSToolpad/components/Navigation/hooks/useMicroserviceNavigation.d.ts +4 -0
- package/dist/src/LMSToolpad/components/Navigation/hooks/useMicroserviceRoutes.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Navigation/hooks/useNavigationSectionManager.d.ts +23 -0
- package/dist/src/LMSToolpad/components/Navigation/hooks/useSyncNavigationFilters.d.ts +1 -0
- package/dist/src/LMSToolpad/components/Navigation/store/microserviceUtils.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Navigation/store/navigationCalculator.d.ts +11 -0
- package/dist/src/LMSToolpad/components/Navigation/store/sectionManager.d.ts +9 -0
- package/dist/src/LMSToolpad/components/Navigation/store/types.d.ts +90 -0
- package/dist/src/LMSToolpad/components/Navigation/store/useNavigationFilterStore.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Navigation/store/useNavigationStore.d.ts +50 -0
- package/dist/src/LMSToolpad/components/Notifications/store/useNotificationsStore.d.ts +22 -0
- package/dist/src/LMSToolpad/components/Routes/Home/Home.d.ts +2 -0
- package/dist/src/LMSToolpad/components/Users/Forms/UserSettings/UserSettings.d.ts +22 -0
- package/dist/src/LMSToolpad/components/Users/UserEventPublisher.d.ts +8 -0
- package/dist/src/LMSToolpad/components/Users/UserManager.d.ts +2 -0
- package/dist/src/LMSToolpad/components/Users/UserMicroservice.d.ts +34 -0
- package/dist/src/LMSToolpad/components/Users/index.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Users/mocks/constants.d.ts +59 -0
- package/dist/src/LMSToolpad/components/Users/mocks/endpoints.d.ts +3 -0
- package/dist/src/LMSToolpad/components/Users/mocks/generators.d.ts +6 -0
- package/dist/src/LMSToolpad/components/Users/mocks/types.d.ts +52 -0
- package/dist/src/LMSToolpad/components/Users/network/users.d.ts +7 -0
- package/dist/src/LMSToolpad/components/Users/store/useUserStore.d.ts +63 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/components/tools/addActions.d.ts +2 -2
- package/dist/{LMSToolpad → src/LMSToolpad}/components/tools/addIcons.d.ts +1 -1
- package/dist/{LMSToolpad → src/LMSToolpad}/components/tools/utils/ActionFCWrapper.d.ts +2 -2
- package/dist/{LMSToolpad → src/LMSToolpad}/components/tools/utils/IconFCWrapper.d.ts +0 -1
- package/dist/src/LMSToolpad/constants.d.ts +67 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/hooks/useCustomRouter.d.ts +2 -2
- package/dist/src/LMSToolpad/hooks/useVisitedCourses.d.ts +18 -0
- package/dist/src/LMSToolpad/index.d.ts +1 -0
- package/dist/src/LMSToolpad/layout/Content/PageContent.d.ts +5 -0
- package/dist/{LMSToolpad/components/toolbar → src/LMSToolpad/layout/Toolbars/AppToolbar}/Account.d.ts +1 -0
- package/dist/src/LMSToolpad/layout/Toolbars/AppToolbar/CollapsibleMenu.d.ts +1 -0
- package/dist/src/LMSToolpad/layout/Toolbars/AppToolbar/RegisteredAppTools.d.ts +11 -0
- package/dist/src/LMSToolpad/layout/Toolbars/AppToolbar/SearchBar.d.ts +6 -0
- package/dist/src/LMSToolpad/layout/Toolbars/PageToolbar/RegisteredPageTools.d.ts +37 -0
- package/dist/src/LMSToolpad/layout/Toolbars/toolbarRegistry.d.ts +117 -0
- package/dist/{LMSToolpad/components → src/LMSToolpad/layout}/sidebar/Footer.d.ts +0 -1
- package/dist/src/LMSToolpad/mocks/browser.d.ts +2 -0
- package/dist/src/LMSToolpad/mocks/handlers.d.ts +2 -0
- package/dist/src/LMSToolpad/mocks/store.d.ts +24 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/network/axiosConfig.d.ts +1 -1
- package/dist/src/LMSToolpad/store/useDialogStore.d.ts +9 -0
- package/dist/src/LMSToolpad/store/usePlatformStore.d.ts +165 -0
- package/dist/src/LMSToolpad/store/useThemeStore.d.ts +184 -0
- package/dist/src/LMSToolpad/store/useToolbarStore.d.ts +8 -0
- package/dist/src/LMSToolpad/theme/EduMLTheme.d.ts +2 -0
- package/dist/{LMSToolpad → src/LMSToolpad}/tools/ErrorBoundary.d.ts +1 -2
- package/dist/src/LMSToolpad/utils/__tests__/courseFilters.test.d.ts +2 -0
- package/dist/src/LMSToolpad/utils/apiPrefix.d.ts +2 -0
- package/dist/src/LMSToolpad/utils/cookieUtils.d.ts +27 -0
- package/dist/src/LMSToolpad/utils/parseDate.d.ts +2 -0
- package/dist/src/LMSToolpad/utils/slugify.d.ts +1 -0
- package/dist/src/common/components/index.d.ts +2 -0
- package/dist/src/common/components/layout/GridLayout/GridItem.d.ts +17 -0
- package/dist/src/common/components/layout/GridLayout/GridItemContext.d.ts +26 -0
- package/dist/src/common/components/layout/GridLayout/ResponsiveGridLayout.d.ts +16 -0
- package/dist/src/common/components/layout/GridLayout/Tools/BreakpointIndicator.d.ts +8 -0
- package/dist/src/common/components/layout/GridLayout/Tools/EditModeToggler.d.ts +7 -0
- package/dist/src/common/components/layout/GridLayout/hooks/useGridLayoutManagement.d.ts +27 -0
- package/dist/src/common/components/layout/GridLayout/index.d.ts +12 -0
- package/dist/src/common/components/layout/GridLayout/layoutStorageUtils.d.ts +52 -0
- package/dist/src/common/components/layout/GridLayout/layoutUtils.d.ts +78 -0
- package/dist/src/common/components/layout/GridLayout/store/usePanelStore.d.ts +27 -0
- package/dist/src/common/components/layout/GridLayout/useGridLayout.d.ts +11 -0
- package/dist/src/common/components/layout/index.d.ts +1 -0
- package/dist/src/common/components/ui/CollapsingButtons/CollapsingButtons.d.ts +11 -0
- package/dist/src/common/components/ui/CompoundPanel/CompoundPanel.d.ts +86 -0
- package/dist/src/common/components/ui/Panel/Expandable/Expandable.d.ts +4 -0
- package/dist/src/common/components/ui/Panel/Expandable/context/ExpandableContextProvider.d.ts +10 -0
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useCollapseHandler.d.ts +2 -0
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useExpandable.d.ts +17 -0
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useExpansionAnimation.d.ts +5 -0
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useInitialSetup.d.ts +6 -0
- package/dist/src/common/components/ui/Panel/Expandable/hooks/useResizeHandler.d.ts +1 -0
- package/dist/src/common/components/ui/Panel/Expandable/store/useExpandablePanelStore.d.ts +7 -0
- package/dist/src/common/components/ui/Panel/Main/Context/PanelContextProvider.d.ts +50 -0
- package/dist/src/common/components/ui/Panel/Main/Panel.d.ts +3 -0
- package/dist/src/common/components/ui/Panel/Main/hooks/useDimensionManagement.d.ts +13 -0
- package/dist/src/common/components/ui/Panel/Main/hooks/usePersistentDimensions.d.ts +19 -0
- package/dist/src/common/components/ui/Panel/Main/tools/BlurOverlay.d.ts +6 -0
- package/dist/src/common/components/ui/Panel/Main/tools/ToolsContainer.d.ts +11 -0
- package/dist/src/common/components/ui/Panel/Movable/DraggableItem.d.ts +6 -0
- package/dist/src/common/components/ui/Panel/Movable/MovablePanel.d.ts +9 -0
- package/dist/src/common/components/ui/Panel/Movable/MoveToggler.d.ts +3 -0
- package/dist/src/common/components/ui/Panel/Movable/context/MovableContextProvider.d.ts +10 -0
- package/dist/src/common/components/ui/Panel/Movable/hooks/usePersistentOrder.d.ts +3 -0
- package/dist/src/common/components/ui/Panel/Resizable/Context/ResizableContextProvider.d.ts +27 -0
- package/dist/src/common/components/ui/Panel/Resizable/Hooks/useResizeHandlers.d.ts +26 -0
- package/dist/src/common/components/ui/Panel/Resizable/Hooks/useResponsiveResize.d.ts +14 -0
- package/dist/src/common/components/ui/Panel/Resizable/Resizable.d.ts +3 -0
- package/dist/src/common/components/ui/Panel/Resizable/ResizeHandlers.d.ts +7 -0
- package/dist/src/common/components/ui/Panel/Resizable/ResizeIndicator.d.ts +9 -0
- package/dist/src/common/components/ui/Panel/Scrollable/InternalScrolling.d.ts +11 -0
- package/dist/src/common/components/ui/Panel/Scrollable/PaginationDots.d.ts +13 -0
- package/dist/src/common/components/ui/Panel/Scrollable/Scrollable.d.ts +5 -0
- package/dist/src/common/components/ui/Panel/Scrollable/context/ScrollerContextProvider.d.ts +15 -0
- package/dist/src/common/components/ui/Panel/Scrollable/hooks/useScrollControls.d.ts +28 -0
- package/dist/src/common/components/ui/Panel/TBR/PanelContent.d.ts +24 -0
- package/dist/src/common/components/ui/Panel/TBR/ResizablePanel.d.ts +3 -0
- package/dist/src/common/components/ui/Panel/TBR/ResizeHandlers.d.ts +10 -0
- package/dist/src/common/components/ui/Panel/TBR/ResizeIndicator.d.ts +10 -0
- package/dist/src/common/components/ui/Panel/TBR/useResizablePanel.d.ts +32 -0
- package/dist/src/common/components/ui/Panel/types.d.ts +9 -0
- package/dist/src/common/components/ui/Scroller/PaginationDots.d.ts +13 -0
- package/dist/src/common/components/ui/Scroller/Scroller.d.ts +14 -0
- package/dist/src/common/components/ui/Scroller/context/ScrollerContextProvider.d.ts +15 -0
- package/dist/src/common/components/ui/Scroller/hooks/useScrollControls.d.ts +28 -0
- package/dist/src/common/components/ui/Scroller/types.d.ts +1 -0
- package/dist/src/common/components/ui/SpeedDialButton/SpeedDialButton.d.ts +20 -0
- package/dist/src/common/components/ui/ThemeToggle/ThemeToggle.d.ts +3 -0
- package/dist/src/common/components/ui/index.d.ts +15 -0
- package/dist/src/common/hooks/index.d.ts +1 -0
- package/dist/src/common/hooks/useRetry.d.ts +12 -0
- package/dist/src/common/index.d.ts +2 -0
- package/dist/src/index.d.ts +74 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/src/setupTests.d.ts +0 -0
- package/dist/src/test/Contact.d.ts +8 -0
- package/dist/src/test/EduTest.d.ts +10 -0
- package/dist/src/test/EduTest2.d.ts +10 -0
- package/dist/src/test/Help.d.ts +8 -0
- package/dist/static/images/admin.png +0 -0
- package/dist/static/images/default-course.webp +0 -0
- package/dist/static/images/guest.png +0 -0
- package/dist/static/images/icons/atom.svg +15 -0
- package/dist/static/images/icons/brain.svg +49 -0
- package/dist/static/images/icons/code.svg +6 -0
- package/dist/static/images/icons/dna.svg +38 -0
- package/dist/static/images/icons/lang.svg +4 -0
- package/dist/static/images/icons/line.svg +2 -0
- package/dist/static/images/icons/weight.svg +53 -0
- package/dist/static/images/student.png +0 -0
- package/dist/static/images/teacher.png +0 -0
- package/package.json +51 -36
- package/dist/LMSToolpad/EduMLProvider.d.ts +0 -21
- package/dist/LMSToolpad/LMSProvider.d.ts +0 -26
- package/dist/LMSToolpad/components/Courses/CourseItem.d.ts +0 -25
- package/dist/LMSToolpad/components/Courses/CourseList.d.ts +0 -24
- package/dist/LMSToolpad/components/Courses/CourseSelector.d.ts +0 -23
- package/dist/LMSToolpad/components/Courses/LayoutToggle.d.ts +0 -7
- package/dist/LMSToolpad/components/Courses/NoCoursesMessage.d.ts +0 -3
- package/dist/LMSToolpad/components/EduMLDialog.d.ts +0 -9
- package/dist/LMSToolpad/components/Home.d.ts +0 -13
- package/dist/LMSToolpad/components/MicroserviceRoutes.d.ts +0 -44
- package/dist/LMSToolpad/components/PageToolBar.d.ts +0 -3
- package/dist/LMSToolpad/components/ToolSelector.d.ts +0 -17
- package/dist/LMSToolpad/components/toolbar/Actions.d.ts +0 -1
- package/dist/LMSToolpad/constants.d.ts +0 -3
- package/dist/LMSToolpad/layout/breadcrumbs/SizableContentHeader.d.ts +0 -7
- package/dist/LMSToolpad/network/users.d.ts +0 -5
- package/dist/LMSToolpad/store/useCourseStore.d.ts +0 -31
- package/dist/LMSToolpad/store/useDialogStore.d.ts +0 -3
- package/dist/LMSToolpad/store/useNavigationStore.d.ts +0 -42
- package/dist/LMSToolpad/store/useNotificationsStore.d.ts +0 -15
- package/dist/LMSToolpad/store/useUserStore.d.ts +0 -26
- package/dist/LMSToolpad/theme/EduMLTheme.d.ts +0 -2
- package/dist/LMSToolpad/types/toolpad.d.ts +0 -26
- package/dist/LMSToolpad/types/vite-env.d.ts +0 -3
- package/dist/vite-env.d.ts +0 -1
- /package/dist/{LMSToolpad → src/LMSToolpad}/components/Courses/CourseCodeLoader.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/components/Courses/CourseInstanceLoader.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/components/Courses/CourseInstanceSelector.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/components/Courses/LtiLoginUrlForm.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/LMSToolpad/components/DevTools}/DevelopmentTools.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/LMSToolpad/components/DevTools}/UserSwitcher.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/LMSToolpad/components/Notifications}/Notifications.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/components/tools/iconsByType.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/interfaces.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/LMSToolpad/layout/Toolbars/AppToolbar}/Logo.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/tools/NullStateWarning.d.ts +0 -0
- /package/dist/{LMSToolpad → src/LMSToolpad}/utils/caseConverter.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/common/components/ui/CenteredHeading}/CenteredHeading.d.ts +0 -0
- /package/dist/{LMSToolpad/components → src/common/components/ui/LoadingScreen}/LoadingScreen.d.ts +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { ComponentType, ReactNode, ReactElement } from 'react';
|
|
2
|
+
import { SvgIconComponent } from '@mui/icons-material';
|
|
3
|
+
/**
|
|
4
|
+
* Microservice Registry System
|
|
5
|
+
*
|
|
6
|
+
* @version 1.3.0
|
|
7
|
+
*
|
|
8
|
+
* A flexible system for registering and managing microservices for grid layouts.
|
|
9
|
+
* Supports dynamic registration, unregistration, and automatic re-rendering.
|
|
10
|
+
* Optimized to prevent excessive re-rendering.
|
|
11
|
+
*
|
|
12
|
+
* Now supports route providers for microservice-agnostic route registration.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Route provider function that returns Route elements
|
|
16
|
+
*/
|
|
17
|
+
export type RouteProvider = () => ReactElement[];
|
|
18
|
+
/**
|
|
19
|
+
* Microservice entry containing both the component and optional props
|
|
20
|
+
*/
|
|
21
|
+
export interface MicroserviceEntry {
|
|
22
|
+
Component: ComponentType<any>;
|
|
23
|
+
props?: Record<string, any>;
|
|
24
|
+
name: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
category?: string;
|
|
27
|
+
iconComponent?: SvgIconComponent;
|
|
28
|
+
metadata?: {
|
|
29
|
+
keepVisible?: boolean;
|
|
30
|
+
order?: number;
|
|
31
|
+
tags?: string[];
|
|
32
|
+
showInNavigation?: boolean;
|
|
33
|
+
route?: {
|
|
34
|
+
path: string;
|
|
35
|
+
element?: ReactNode;
|
|
36
|
+
index?: boolean;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare const useMicroserviceRegistryStore: () => {
|
|
41
|
+
microservices: Map<string, MicroserviceEntry>;
|
|
42
|
+
routeProviders: Map<string, RouteProvider>;
|
|
43
|
+
lastUpdate: number;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Register a new microservice.
|
|
47
|
+
*
|
|
48
|
+
* @param id - The unique identifier for this microservice.
|
|
49
|
+
* @param Component - The React component to render.
|
|
50
|
+
* @param options - Optional configuration for the microservice including props and metadata.
|
|
51
|
+
*/
|
|
52
|
+
export declare function registerMicroservice(id: string, Component: ComponentType<any>, options?: {
|
|
53
|
+
props?: Record<string, any>;
|
|
54
|
+
name?: string;
|
|
55
|
+
description?: string;
|
|
56
|
+
category?: string;
|
|
57
|
+
iconComponent?: SvgIconComponent;
|
|
58
|
+
metadata?: {
|
|
59
|
+
keepVisible?: boolean;
|
|
60
|
+
order?: number;
|
|
61
|
+
tags?: string[];
|
|
62
|
+
showInNavigation?: boolean;
|
|
63
|
+
route?: {
|
|
64
|
+
path: string;
|
|
65
|
+
element?: ReactNode;
|
|
66
|
+
index?: boolean;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
}): void;
|
|
70
|
+
/**
|
|
71
|
+
* Unregister a microservice.
|
|
72
|
+
*
|
|
73
|
+
* @param id - The unique identifier for the microservice to remove.
|
|
74
|
+
*/
|
|
75
|
+
export declare function unregisterMicroservice(id: string): void;
|
|
76
|
+
/**
|
|
77
|
+
* Get a specific microservice by ID.
|
|
78
|
+
*
|
|
79
|
+
* @param id - The unique identifier for the microservice.
|
|
80
|
+
* @returns The microservice entry or undefined if not found.
|
|
81
|
+
*/
|
|
82
|
+
export declare function getMicroservice(id: string): MicroserviceEntry | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Get all registered microservices.
|
|
85
|
+
*
|
|
86
|
+
* @returns A Map of all registered microservices.
|
|
87
|
+
*/
|
|
88
|
+
export declare function getAllMicroservices(): Map<string, MicroserviceEntry>;
|
|
89
|
+
/**
|
|
90
|
+
* Get all microservice IDs.
|
|
91
|
+
*
|
|
92
|
+
* @returns An array of all registered microservice IDs.
|
|
93
|
+
*/
|
|
94
|
+
export declare function getMicroserviceIds(): string[];
|
|
95
|
+
/**
|
|
96
|
+
* Check if a microservice is registered.
|
|
97
|
+
*
|
|
98
|
+
* @param id - The unique identifier for the microservice.
|
|
99
|
+
* @returns True if the microservice is registered, false otherwise.
|
|
100
|
+
*/
|
|
101
|
+
export declare function isMicroserviceRegistered(id: string): boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Register a route provider.
|
|
104
|
+
* Route providers are functions that return Route elements, allowing microservices
|
|
105
|
+
* to register complex nested route structures.
|
|
106
|
+
*
|
|
107
|
+
* @param id - The unique identifier for this route provider.
|
|
108
|
+
* @param provider - Function that returns an array of Route elements.
|
|
109
|
+
*/
|
|
110
|
+
export declare function registerRouteProvider(id: string, provider: RouteProvider): void;
|
|
111
|
+
/**
|
|
112
|
+
* Unregister a route provider.
|
|
113
|
+
*
|
|
114
|
+
* @param id - The unique identifier for the route provider to remove.
|
|
115
|
+
*/
|
|
116
|
+
export declare function unregisterRouteProvider(id: string): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Hook that generates routes from registered microservices
|
|
4
|
+
* @returns Array of Route elements based on registered microservice routes
|
|
5
|
+
*/
|
|
6
|
+
export declare const useMicroserviceRoutes: () => ReactElement<unknown, string | import('react').JSXElementConstructor<any>>[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook that provides a simplified interface for managing navigation sections.
|
|
3
|
+
* Abstracts away the complexity of the navigation store and filter store interaction.
|
|
4
|
+
*
|
|
5
|
+
* @returns {Object} Section management functions
|
|
6
|
+
* @property {Function} addDynamicSection - Adds or updates a section in navigation
|
|
7
|
+
*/
|
|
8
|
+
interface DynamicSection {
|
|
9
|
+
header: string;
|
|
10
|
+
keepVisible?: boolean;
|
|
11
|
+
pages?: Array<{
|
|
12
|
+
segment: string;
|
|
13
|
+
title: string;
|
|
14
|
+
Icon?: any;
|
|
15
|
+
description?: string;
|
|
16
|
+
instances?: string[];
|
|
17
|
+
microservices?: string[];
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare const useNavigationSectionManager: () => {
|
|
21
|
+
addDynamicSection: (section: DynamicSection) => void;
|
|
22
|
+
};
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSyncNavigationFilters: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NavigationPageStoreItem, ViewStore } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Aggregates microservices from all available sources (app-level + external).
|
|
4
|
+
* This is microservice-agnostic - it doesn't hard-code specific store types.
|
|
5
|
+
*
|
|
6
|
+
* @param state - The navigation store state
|
|
7
|
+
* @returns Array of all available microservice navigation items
|
|
8
|
+
*/
|
|
9
|
+
export declare const getAllMicroservices: (state: ViewStore) => NavigationPageStoreItem[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { NavigationStoreItem, NavigationSection } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Calculates the navigation structure from sections.
|
|
4
|
+
* Pure function that takes sections, order, and visibility and returns a flat navigation array.
|
|
5
|
+
*
|
|
6
|
+
* @param sections - Record of navigation sections keyed by section key
|
|
7
|
+
* @param sectionOrder - Array of section keys in display order
|
|
8
|
+
* @param visibleSections - Record of section visibility flags
|
|
9
|
+
* @returns Flat array of navigation items for rendering
|
|
10
|
+
*/
|
|
11
|
+
export declare const calculateNavigationFromSections: (sections: Record<string, NavigationSection>, sectionOrder: string[], visibleSections: Record<string, boolean>) => NavigationStoreItem[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ViewStore } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Updates microservice navigation for all sections.
|
|
4
|
+
* Orchestrates the update process across all sections and recalculates navigation.
|
|
5
|
+
*
|
|
6
|
+
* @param state - The current navigation store state
|
|
7
|
+
* @returns Updated state with sections and navigation, or null if no changes
|
|
8
|
+
*/
|
|
9
|
+
export declare const updateMicroserviceNavigationForSections: (state: ViewStore) => Partial<ViewStore> | null;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { SvgIconComponent } from '@mui/icons-material';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface NavigationItemBase {
|
|
4
|
+
kind: "header" | "page" | "divider";
|
|
5
|
+
title?: string;
|
|
6
|
+
actionFC?: React.FC;
|
|
7
|
+
}
|
|
8
|
+
export interface ToolMetadata {
|
|
9
|
+
description?: string;
|
|
10
|
+
forRoles?: string[];
|
|
11
|
+
isRootTool?: boolean;
|
|
12
|
+
underHeader?: string;
|
|
13
|
+
microservices?: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface NavigationHeaderItem extends NavigationItemBase {
|
|
16
|
+
kind: "header";
|
|
17
|
+
title: string;
|
|
18
|
+
}
|
|
19
|
+
export interface NavigationDividerItem extends NavigationItemBase {
|
|
20
|
+
kind: "divider";
|
|
21
|
+
}
|
|
22
|
+
export interface NavigationPageStoreItem extends NavigationItemBase {
|
|
23
|
+
kind: "page";
|
|
24
|
+
segment: string;
|
|
25
|
+
iconFC?: SvgIconComponent;
|
|
26
|
+
icon?: React.ReactElement;
|
|
27
|
+
children?: NavigationPageStoreItem[];
|
|
28
|
+
view?: React.ComponentType;
|
|
29
|
+
action?: React.ReactElement;
|
|
30
|
+
showTitle?: boolean;
|
|
31
|
+
metadata?: ToolMetadata;
|
|
32
|
+
}
|
|
33
|
+
export type NavigationStoreItem = NavigationHeaderItem | NavigationPageStoreItem | NavigationDividerItem;
|
|
34
|
+
/**
|
|
35
|
+
* Updated addSectionProps type.
|
|
36
|
+
* Now you provide a header (underHeader) and an array of page configs.
|
|
37
|
+
*/
|
|
38
|
+
export type addSectionProps = {
|
|
39
|
+
underHeader: string;
|
|
40
|
+
keepVisible?: boolean;
|
|
41
|
+
pages: Array<{
|
|
42
|
+
segment: string;
|
|
43
|
+
title: string;
|
|
44
|
+
Icon?: SvgIconComponent;
|
|
45
|
+
description?: string;
|
|
46
|
+
instances?: string[];
|
|
47
|
+
microservices?: string[];
|
|
48
|
+
actionFC?: React.FC;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* New interface for a navigation section.
|
|
53
|
+
* Each section is keyed by its header (or unique id) and contains:
|
|
54
|
+
* - header: the header item (NavigationHeaderItem)
|
|
55
|
+
* - pages: a dictionary of pages keyed by their segment
|
|
56
|
+
* - pageOrder: an array of page keys (segments) to preserve ordering
|
|
57
|
+
*/
|
|
58
|
+
export interface NavigationSection {
|
|
59
|
+
header: NavigationHeaderItem;
|
|
60
|
+
pages: Record<string, NavigationPageStoreItem>;
|
|
61
|
+
pageOrder: string[];
|
|
62
|
+
}
|
|
63
|
+
export type ViewStore = {
|
|
64
|
+
navigation: NavigationStoreItem[];
|
|
65
|
+
sections: Record<string, NavigationSection>;
|
|
66
|
+
sectionOrder: string[];
|
|
67
|
+
/**
|
|
68
|
+
* App-level microservice navigation items only.
|
|
69
|
+
* These are typically registered via NavigationRegistry for app-level routes.
|
|
70
|
+
*/
|
|
71
|
+
allMicroserviceNavigation: NavigationPageStoreItem[];
|
|
72
|
+
addSection: (props: addSectionProps) => void;
|
|
73
|
+
removeHeader: (header: string) => void;
|
|
74
|
+
addMicroserviceNavigation: (microserviceNavigation: NavigationPageStoreItem) => void;
|
|
75
|
+
addStandaloneNavigation: (navigation: NavigationPageStoreItem) => void;
|
|
76
|
+
updateMicroserviceNavigationForSections: () => void;
|
|
77
|
+
recalculateNavigation: () => void;
|
|
78
|
+
visibleSections: Record<string, boolean>;
|
|
79
|
+
setVisibleSections: (options: Record<string, boolean>) => void;
|
|
80
|
+
collapsedSections: Record<string, boolean>;
|
|
81
|
+
setCollapsedSections: (options: Record<string, boolean>) => void;
|
|
82
|
+
toggleSectionCollapse: (sectionKey: string) => void;
|
|
83
|
+
/**
|
|
84
|
+
* Externally registered microservice navigation items.
|
|
85
|
+
* These are provided by external components (like CourseMicroservice) via setExternalMicroservices.
|
|
86
|
+
* The store is microservice-agnostic - it doesn't know or care about specific microservice types.
|
|
87
|
+
*/
|
|
88
|
+
externalMicroservices: NavigationPageStoreItem[];
|
|
89
|
+
setExternalMicroservices: (microservices: NavigationPageStoreItem[]) => void;
|
|
90
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface NavigationFilterState {
|
|
2
|
+
filterOptions: Record<string, boolean>;
|
|
3
|
+
setFilterOptions: (optionsOrUpdater: Record<string, boolean> | ((prev: Record<string, boolean>) => Record<string, boolean>)) => void;
|
|
4
|
+
initializeFilters: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const useNavigationFilterStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<NavigationFilterState>>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { NavigationStoreItem, ViewStore } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Navigation management store with enhanced section management and filtering capabilities.
|
|
4
|
+
*
|
|
5
|
+
* @version 3.1.0
|
|
6
|
+
* @updates
|
|
7
|
+
* - Complete rewrite of navigation structure using sections
|
|
8
|
+
* - Added section-based visibility filtering
|
|
9
|
+
* - Enhanced microservice integration with automatic updates
|
|
10
|
+
* - Added support for dividers in navigation
|
|
11
|
+
* - Introduced flexible section management with ordered headers
|
|
12
|
+
* - Added action components support in navigation items
|
|
13
|
+
* - Clear separation: app-level navigation only (course microservices handled separately)
|
|
14
|
+
* - Refactored: Extracted types, utilities, and complex logic into separate modules
|
|
15
|
+
*
|
|
16
|
+
* @breaking-changes
|
|
17
|
+
* - Removed updateSection and updateCourseInstanceSection methods
|
|
18
|
+
* - Changed addSection API to use header-based organization
|
|
19
|
+
* - Sections are now managed through a structured record instead of flat array
|
|
20
|
+
* - Navigation items require explicit header assignment
|
|
21
|
+
* - Changed microservice update mechanism to be section-aware
|
|
22
|
+
*
|
|
23
|
+
* @scope
|
|
24
|
+
* This store handles navigation for the application:
|
|
25
|
+
* - Global sections (Help, Contact, etc.)
|
|
26
|
+
* - App-level microservices registered via NavigationRegistry
|
|
27
|
+
* - External microservices provided via setExternalMicroservices (e.g., from CourseMicroservice)
|
|
28
|
+
*
|
|
29
|
+
* @structure
|
|
30
|
+
* Navigation is now organized into sections:
|
|
31
|
+
* - Each section has a header, pages, and maintained order
|
|
32
|
+
* - Pages can have nested children (for instances or microservices)
|
|
33
|
+
* - Sections can be individually shown/hidden through visibleSections
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```typescript
|
|
37
|
+
* useNavigationStore.getState().addSection({
|
|
38
|
+
* underHeader: "Courses",
|
|
39
|
+
* pages: [{
|
|
40
|
+
* segment: "course-1",
|
|
41
|
+
* title: "Course 1",
|
|
42
|
+
* description: "Example course",
|
|
43
|
+
* microservices: ["attendance", "grades"]
|
|
44
|
+
* }]
|
|
45
|
+
* });
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const useNavigationStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<ViewStore>>;
|
|
49
|
+
export declare const filterNavigationByRole: (role: string) => NavigationStoreItem[];
|
|
50
|
+
export type { NavigationItemBase, ToolMetadata, NavigationHeaderItem, NavigationDividerItem, NavigationPageStoreItem, NavigationStoreItem, addSectionProps, NavigationSection, } from './types';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
export type NotificationRaw = {
|
|
3
|
+
type: string;
|
|
4
|
+
message: string;
|
|
5
|
+
singular?: boolean;
|
|
6
|
+
singularId?: string;
|
|
7
|
+
};
|
|
8
|
+
export type Notification = {
|
|
9
|
+
type: string;
|
|
10
|
+
message: string;
|
|
11
|
+
id: string;
|
|
12
|
+
singular?: boolean;
|
|
13
|
+
singularId?: string;
|
|
14
|
+
};
|
|
15
|
+
type NotificationStore = {
|
|
16
|
+
notifications: Notification[] | [];
|
|
17
|
+
addNotificationData: (notificationData: NotificationRaw) => void;
|
|
18
|
+
removeNotificationData: (notificationId: number) => void;
|
|
19
|
+
clearNotificationsByType: (type: string) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const useNotificationStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<NotificationStore>>;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
/**
|
|
3
|
+
* UserSettings Component
|
|
4
|
+
*
|
|
5
|
+
* @version 3.0.0
|
|
6
|
+
* @breaking-changes
|
|
7
|
+
* - Enhanced layout with responsive design patterns
|
|
8
|
+
* - Added platform role management with admin-only access
|
|
9
|
+
* - Improved image handling with multi-size support
|
|
10
|
+
* - Added validation for platform roles
|
|
11
|
+
* - Enhanced styling consistency with theme integration
|
|
12
|
+
* - Removed fixed height constraints for better content flow
|
|
13
|
+
*
|
|
14
|
+
* Provides interface for:
|
|
15
|
+
* - Managing user profile information
|
|
16
|
+
* - Configuring privacy settings
|
|
17
|
+
* - Managing platform roles (admin only)
|
|
18
|
+
* - Setting data retention preferences
|
|
19
|
+
* - Managing notification preferences
|
|
20
|
+
*/
|
|
21
|
+
declare const UserSettings: () => import("react/jsx-runtime").JSX.Element | null;
|
|
22
|
+
export default UserSettings;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
/**
|
|
3
|
+
* UserEventPublisher publishes user state changes to the UserBus.
|
|
4
|
+
* This component converts user store changes to user events and publishes them.
|
|
5
|
+
* It maintains separation by only knowing about users and the UserBus API.
|
|
6
|
+
*/
|
|
7
|
+
declare const UserEventPublisher: React.FC;
|
|
8
|
+
export default UserEventPublisher;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { default as React, ReactNode } from 'react';
|
|
2
|
+
interface UserMicroserviceProps {
|
|
3
|
+
children?: ReactNode;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* UserMicroservice Component
|
|
7
|
+
*
|
|
8
|
+
* @version 1.0.0
|
|
9
|
+
*
|
|
10
|
+
* Self-contained microservice that handles all user-related functionality:
|
|
11
|
+
* - User lifecycle management (via UserManager)
|
|
12
|
+
* - User state change publishing to UserBus (via UserEventPublisher)
|
|
13
|
+
* - User data synchronization with navigation filters
|
|
14
|
+
*
|
|
15
|
+
* Other modules should subscribe to UserBus (via hooks like useCurrentUser, useUserActions)
|
|
16
|
+
* to react to user changes. Direct useUserStore access is only allowed within the Users
|
|
17
|
+
* module itself, in Events/UserBus for delegation, and in DevTools components.
|
|
18
|
+
*
|
|
19
|
+
* This component should be used in App.tsx, not LMSProvider.tsx, to maintain
|
|
20
|
+
* proper separation of concerns and avoid tight coupling.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <Microservices>
|
|
25
|
+
* <UserMicroservice />
|
|
26
|
+
* <CalendarMicroservice />
|
|
27
|
+
* <CourseMicroservice>
|
|
28
|
+
* <EduTest />
|
|
29
|
+
* </CourseMicroservice>
|
|
30
|
+
* </Microservices>
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare const UserMicroservice: React.FC<UserMicroserviceProps>;
|
|
34
|
+
export default UserMicroservice;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** @format */
|
|
2
|
+
export { default as UserMicroservice } from './UserMicroservice';
|
|
3
|
+
export { useUserStore } from './store/useUserStore';
|
|
4
|
+
export type { UserData, UserState } from './store/useUserStore';
|
|
5
|
+
export { default as UserSettings } from './Forms/UserSettings/UserSettings';
|
|
6
|
+
export { UserManager } from './UserManager';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { navigationTypes } from '../store/useUserStore';
|
|
2
|
+
export declare const departmentVariants: string[];
|
|
3
|
+
export declare const preferencesVariants: navigationTypes[];
|
|
4
|
+
export declare const randomPerson: {
|
|
5
|
+
gender: string;
|
|
6
|
+
name: {
|
|
7
|
+
title: string;
|
|
8
|
+
first: string;
|
|
9
|
+
last: string;
|
|
10
|
+
};
|
|
11
|
+
location: {
|
|
12
|
+
street: {
|
|
13
|
+
number: number;
|
|
14
|
+
name: string;
|
|
15
|
+
};
|
|
16
|
+
city: string;
|
|
17
|
+
state: string;
|
|
18
|
+
country: string;
|
|
19
|
+
postcode: number;
|
|
20
|
+
coordinates: {
|
|
21
|
+
latitude: string;
|
|
22
|
+
longitude: string;
|
|
23
|
+
};
|
|
24
|
+
timezone: {
|
|
25
|
+
offset: string;
|
|
26
|
+
description: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
email: string;
|
|
30
|
+
login: {
|
|
31
|
+
uuid: string;
|
|
32
|
+
username: string;
|
|
33
|
+
password: string;
|
|
34
|
+
salt: string;
|
|
35
|
+
md5: string;
|
|
36
|
+
sha1: string;
|
|
37
|
+
sha256: string;
|
|
38
|
+
};
|
|
39
|
+
dob: {
|
|
40
|
+
date: string;
|
|
41
|
+
age: number;
|
|
42
|
+
};
|
|
43
|
+
registered: {
|
|
44
|
+
date: string;
|
|
45
|
+
age: number;
|
|
46
|
+
};
|
|
47
|
+
phone: string;
|
|
48
|
+
cell: string;
|
|
49
|
+
id: {
|
|
50
|
+
name: string;
|
|
51
|
+
value: string;
|
|
52
|
+
};
|
|
53
|
+
picture: {
|
|
54
|
+
large: string;
|
|
55
|
+
medium: string;
|
|
56
|
+
thumbnail: string;
|
|
57
|
+
};
|
|
58
|
+
nat: string;
|
|
59
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { PlatformRole } from '../../../store/usePlatformStore';
|
|
2
|
+
import { navigationTypes } from '../store/useUserStore';
|
|
3
|
+
import { randomPerson } from './constants';
|
|
4
|
+
export interface UserRawBackendData {
|
|
5
|
+
name: string;
|
|
6
|
+
email: string;
|
|
7
|
+
image?: {
|
|
8
|
+
large: string;
|
|
9
|
+
medium: string;
|
|
10
|
+
thumbnail: string;
|
|
11
|
+
};
|
|
12
|
+
department?: string;
|
|
13
|
+
platform_roles: PlatformRole[];
|
|
14
|
+
privacy_settings: {
|
|
15
|
+
allow_analytics: boolean;
|
|
16
|
+
allow_personalization: boolean;
|
|
17
|
+
allow_communications: boolean;
|
|
18
|
+
allow_third_party_sharing: boolean;
|
|
19
|
+
};
|
|
20
|
+
gdpr_consent: {
|
|
21
|
+
accepted: boolean;
|
|
22
|
+
accepted_date?: string;
|
|
23
|
+
last_updated: string;
|
|
24
|
+
};
|
|
25
|
+
data_retention: {
|
|
26
|
+
delete_account_after_inactivity?: number;
|
|
27
|
+
delete_data_after_account_deletion?: number;
|
|
28
|
+
};
|
|
29
|
+
preferences: {
|
|
30
|
+
navigation_type: navigationTypes;
|
|
31
|
+
visible_course_lists: {
|
|
32
|
+
is_student: boolean;
|
|
33
|
+
is_student_old: boolean;
|
|
34
|
+
is_teacher: boolean;
|
|
35
|
+
is_teacher_old: boolean;
|
|
36
|
+
available: boolean;
|
|
37
|
+
};
|
|
38
|
+
visible_navigation: string[];
|
|
39
|
+
last_visited_courses: string[];
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface UserBackendData extends UserRawBackendData {
|
|
43
|
+
id: string;
|
|
44
|
+
created_at: string;
|
|
45
|
+
updated_at: string;
|
|
46
|
+
}
|
|
47
|
+
export type UserCourseConnection = {
|
|
48
|
+
userId: string;
|
|
49
|
+
courseId: string;
|
|
50
|
+
role: "teacher" | "student";
|
|
51
|
+
};
|
|
52
|
+
export type randomPersonFromApi = typeof randomPerson;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { UserData } from '../store/useUserStore';
|
|
2
|
+
export declare const getCurrentUser: () => Promise<UserData>;
|
|
3
|
+
export declare const getUsers: (courseId?: string) => Promise<UserData[]>;
|
|
4
|
+
export declare const createUser: (userData: Partial<UserData>) => Promise<UserData>;
|
|
5
|
+
export declare const updateUser: (userData: UserData) => Promise<UserData>;
|
|
6
|
+
export declare const deleteUser: (userId: string) => Promise<void>;
|
|
7
|
+
export declare const logoutUser: () => Promise<void>;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { fetchState } from '../../../interfaces';
|
|
2
|
+
import { PlatformRole } from '../../../store/usePlatformStore';
|
|
3
|
+
export type userId = string;
|
|
4
|
+
export type navigationTypes = "direct" | "instances";
|
|
5
|
+
export type gender = "male" | "female" | "other";
|
|
6
|
+
export interface UserData {
|
|
7
|
+
id: userId;
|
|
8
|
+
name: string;
|
|
9
|
+
email: string;
|
|
10
|
+
gender?: gender;
|
|
11
|
+
image?: {
|
|
12
|
+
large: string;
|
|
13
|
+
medium: string;
|
|
14
|
+
thumbnail: string;
|
|
15
|
+
};
|
|
16
|
+
department?: string;
|
|
17
|
+
platformRoles: PlatformRole[];
|
|
18
|
+
privacySettings: {
|
|
19
|
+
allowAnalytics: boolean;
|
|
20
|
+
allowPersonalization: boolean;
|
|
21
|
+
allowCommunications: boolean;
|
|
22
|
+
allowThirdPartySharing: boolean;
|
|
23
|
+
};
|
|
24
|
+
gdprConsent: {
|
|
25
|
+
accepted: boolean;
|
|
26
|
+
acceptedDate?: string;
|
|
27
|
+
lastUpdated: string;
|
|
28
|
+
};
|
|
29
|
+
dataRetention: {
|
|
30
|
+
deleteAccountAfterInactivity?: number;
|
|
31
|
+
deleteDataAfterAccountDeletion?: number;
|
|
32
|
+
};
|
|
33
|
+
preferences: {
|
|
34
|
+
navigationType: navigationTypes;
|
|
35
|
+
visibleCourseLists: {
|
|
36
|
+
isStudent: boolean;
|
|
37
|
+
isStudentOld: boolean;
|
|
38
|
+
isTeacher: boolean;
|
|
39
|
+
isTeacherOld: boolean;
|
|
40
|
+
available: boolean;
|
|
41
|
+
};
|
|
42
|
+
lastVisitedCourses: string[];
|
|
43
|
+
visibleNavigation: string[];
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export interface UserState {
|
|
47
|
+
fetchState: fetchState;
|
|
48
|
+
user: UserData | null;
|
|
49
|
+
userToUpdate: UserData | null;
|
|
50
|
+
testUsers: UserData[];
|
|
51
|
+
users: UserData[];
|
|
52
|
+
courseUsers?: UserData[];
|
|
53
|
+
setUserToUpdate: (user: UserData | null) => void;
|
|
54
|
+
setUser: (user: UserData) => void;
|
|
55
|
+
setTestUsers: (users: UserData[]) => void;
|
|
56
|
+
getUser: () => void;
|
|
57
|
+
clearUser: () => void;
|
|
58
|
+
getUsers: () => void;
|
|
59
|
+
fetchCourseUsers: (courseId: string) => Promise<void>;
|
|
60
|
+
logout: () => Promise<void>;
|
|
61
|
+
updateUser: (userData: UserData) => Promise<UserData>;
|
|
62
|
+
}
|
|
63
|
+
export declare const useUserStore: import('zustand/traditional').UseBoundStoreWithEqualityFn<import('zustand').StoreApi<UserState>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NavigationStoreItem } from
|
|
1
|
+
import { NavigationStoreItem } from '../Navigation/store/useNavigationStore';
|
|
2
2
|
/**
|
|
3
3
|
* Adds actions to navigation items based on their actionHandlers
|
|
4
4
|
*/
|
|
5
|
-
export declare const addActions: (navItems: NavigationStoreItem[]
|
|
5
|
+
export declare const addActions: (navItems: NavigationStoreItem[]) => NavigationStoreItem[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NavigationStoreItem } from
|
|
1
|
+
import { NavigationStoreItem } from '../Navigation/store/useNavigationStore';
|
|
2
2
|
export declare const addIcons: (navItems: NavigationStoreItem[]) => NavigationStoreItem[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
declare const ActionFCWrapper: <T extends Record<string, unknown>>({ ActionHandler, props }: {
|
|
2
|
-
ActionHandler:
|
|
1
|
+
declare const ActionFCWrapper: <T extends Record<string, unknown>>({ ActionHandler, props, }: {
|
|
2
|
+
ActionHandler: React.FC<T>;
|
|
3
3
|
props: T;
|
|
4
4
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export default ActionFCWrapper;
|