@hydralms/components 0.1.3 → 0.3.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/dist/StudentProfile-BVfZMbnV.cjs +1 -0
- package/dist/StudentProfile-DeMxdrL3.js +3275 -0
- package/dist/assessment-toolbar/assessment-toolbar.d.ts +1 -1
- package/dist/assessment-toolbar/index.d.ts +5 -1
- package/dist/assessment-toolbar/question-header-bar.d.ts +2 -0
- package/dist/assessment-toolbar/question-materials-drawer.d.ts +2 -0
- package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
- package/dist/assessment-toolbar/timer-display.d.ts +1 -1
- package/dist/assessment-toolbar/types.d.ts +52 -4
- package/dist/assessment-toolbar/use-countdown.d.ts +43 -0
- package/dist/common/index.d.ts +3 -1
- package/dist/common/pagination.d.ts +26 -0
- package/dist/common/stepper.d.ts +6 -0
- package/dist/common/types.d.ts +38 -0
- package/dist/components.css +1 -1
- package/dist/content/attachment-list.d.ts +6 -0
- package/dist/content/audio-player.d.ts +22 -0
- package/dist/content/code-block.d.ts +30 -0
- package/dist/content/content-block.d.ts +1 -1
- package/dist/content/embed-block.d.ts +28 -0
- package/dist/content/index.d.ts +8 -1
- package/dist/content/types.d.ts +63 -0
- package/dist/curriculum/course-card.d.ts +51 -0
- package/dist/curriculum/curriculum-item.d.ts +1 -1
- package/dist/curriculum/index.d.ts +2 -0
- package/dist/curriculum/types.d.ts +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +597 -308
- package/dist/license/HydraContext.d.ts +16 -0
- package/dist/license/ProBadge.d.ts +6 -0
- package/dist/license/index.d.ts +7 -0
- package/dist/license/tiers.d.ts +3 -0
- package/dist/license/useHydraLicense.d.ts +6 -0
- package/dist/license/validate.d.ts +13 -0
- package/dist/license/withProGate.d.ts +6 -0
- package/dist/modules/AssignmentModule/AssignmentModule.d.ts +5 -0
- package/dist/modules/AssignmentModule/types.d.ts +69 -0
- package/dist/modules/CertificateModule/CertificateModule.d.ts +5 -0
- package/dist/modules/CertificateModule/types.d.ts +51 -0
- package/dist/modules/CourseCatalogModule/CourseCatalogModule.d.ts +5 -0
- package/dist/modules/CourseCatalogModule/types.d.ts +43 -0
- package/dist/modules/CoursePlayer/CoursePlayer.d.ts +4 -1
- package/dist/modules/DiscussionModule/DiscussionModule.d.ts +5 -0
- package/dist/modules/DiscussionModule/types.d.ts +47 -0
- package/dist/modules/ExamModule/ExamModule.d.ts +5 -0
- package/dist/modules/ExamModule/types.d.ts +55 -0
- package/dist/modules/FlashcardLab/FlashcardLab.d.ts +4 -1
- package/dist/modules/FlashcardLab/types.d.ts +2 -0
- package/dist/modules/GradeCenterModule/GradeCenterModule.d.ts +5 -0
- package/dist/modules/GradeCenterModule/types.d.ts +56 -0
- package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
- package/dist/modules/QuizModule/types.d.ts +10 -14
- package/dist/modules/StudentDashboardModule/StudentDashboardModule.d.ts +5 -0
- package/dist/modules/StudentDashboardModule/types.d.ts +54 -0
- package/dist/modules/StudentProfileModule/StudentProfileModule.d.ts +5 -0
- package/dist/modules/StudentProfileModule/types.d.ts +43 -0
- package/dist/modules/SurveyModule/SurveyModule.d.ts +5 -0
- package/dist/modules/SurveyModule/types.d.ts +51 -0
- package/dist/modules/_shared/assessment-intro.d.ts +16 -0
- package/dist/modules/_shared/assessment-results.d.ts +23 -0
- package/dist/modules/_shared/types.d.ts +10 -0
- package/dist/modules/_shared/use-timer.d.ts +9 -0
- package/dist/modules/index.d.ts +18 -0
- package/dist/modules.cjs +1 -0
- package/dist/modules.js +1834 -0
- package/dist/progress/achievement-badge.d.ts +6 -0
- package/dist/progress/activity-timeline.d.ts +6 -0
- package/dist/progress/index.d.ts +4 -1
- package/dist/progress/stat-card.d.ts +1 -1
- package/dist/progress/streak-badge.d.ts +6 -0
- package/dist/progress/types.d.ts +99 -0
- package/dist/provider/HydraProvider.d.ts +5 -1
- package/dist/questions/choice.d.ts +1 -1
- package/dist/questions/confidence-indicator.d.ts +37 -0
- package/dist/questions/essay.d.ts +2 -2
- package/dist/questions/fill-in-the-blank.d.ts +1 -1
- package/dist/questions/hotspot.d.ts +21 -0
- package/dist/questions/index.d.ts +11 -1
- package/dist/questions/inline-choice.d.ts +21 -0
- package/dist/questions/matching.d.ts +22 -0
- package/dist/questions/multiple-choice.d.ts +1 -1
- package/dist/questions/numeric.d.ts +11 -0
- package/dist/questions/ordering.d.ts +12 -0
- package/dist/questions/question-renderer.d.ts +1 -1
- package/dist/questions/scenario.d.ts +23 -0
- package/dist/questions/scoring.d.ts +22 -0
- package/dist/questions/spreadsheet.d.ts +29 -0
- package/dist/questions/true-false.d.ts +1 -1
- package/dist/questions/types.d.ts +106 -1
- package/dist/questions/use-drag-reorder.d.ts +17 -0
- package/dist/sections/AnnouncementFeed/AnnouncementFeed.d.ts +1 -1
- package/dist/sections/AnnouncementFeed/types.d.ts +15 -1
- package/dist/sections/AssessmentReview/AssessmentReview.d.ts +1 -1
- package/dist/sections/AssessmentReview/types.d.ts +6 -0
- package/dist/sections/AssignmentSubmission/AssignmentSubmission.d.ts +1 -1
- package/dist/sections/AssignmentSubmission/types.d.ts +6 -0
- package/dist/sections/CertificateViewer/CertificateViewer.d.ts +1 -1
- package/dist/sections/CertificateViewer/certificate-variants.d.ts +42 -0
- package/dist/sections/CertificateViewer/types.d.ts +13 -5
- package/dist/sections/CourseCatalog/CourseCatalog.d.ts +2 -0
- package/dist/sections/CourseCatalog/types.d.ts +80 -0
- package/dist/sections/CourseOutline/CourseOutline.d.ts +1 -1
- package/dist/sections/CourseOutline/types.d.ts +6 -0
- package/dist/sections/DiscussionThread/DiscussionThread.d.ts +1 -1
- package/dist/sections/DiscussionThread/types.d.ts +6 -0
- package/dist/sections/EnrollmentWizard/EnrollmentWizard.d.ts +2 -0
- package/dist/sections/EnrollmentWizard/types.d.ts +66 -0
- package/dist/sections/ExamSession/ExamSession.d.ts +1 -1
- package/dist/sections/ExamSession/types.d.ts +12 -1
- package/dist/sections/FlashcardStudySession/FlashcardStudySession.d.ts +1 -1
- package/dist/sections/FlashcardStudySession/types.d.ts +6 -0
- package/dist/sections/ForumBoard/ForumBoard.d.ts +8 -0
- package/dist/sections/ForumBoard/types.d.ts +78 -0
- package/dist/sections/GradebookTable/GradebookTable.d.ts +1 -1
- package/dist/sections/GradebookTable/types.d.ts +14 -0
- package/dist/sections/LecturePlayer/LecturePlayer.d.ts +1 -1
- package/dist/sections/LecturePlayer/types.d.ts +8 -0
- package/dist/sections/LessonPage/LessonPage.d.ts +1 -1
- package/dist/sections/LessonPage/types.d.ts +6 -0
- package/dist/sections/PracticeQuiz/PracticeQuiz.d.ts +1 -1
- package/dist/sections/PracticeQuiz/types.d.ts +6 -0
- package/dist/sections/ProgressDashboard/ProgressDashboard.d.ts +1 -1
- package/dist/sections/ProgressDashboard/types.d.ts +6 -0
- package/dist/sections/QuizSession/QuizSession.d.ts +1 -1
- package/dist/sections/QuizSession/types.d.ts +12 -1
- package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +8 -0
- package/dist/sections/RequirementsChecklist/types.d.ts +43 -0
- package/dist/sections/ResourceLibrary/ResourceLibrary.d.ts +1 -1
- package/dist/sections/ResourceLibrary/types.d.ts +15 -1
- package/dist/sections/RubricView/RubricView.d.ts +9 -0
- package/dist/sections/RubricView/types.d.ts +56 -0
- package/dist/sections/ScrollableQuiz/ScrollableQuiz.d.ts +1 -1
- package/dist/sections/ScrollableQuiz/types.d.ts +6 -0
- package/dist/sections/StudentProfile/StudentProfile.d.ts +2 -0
- package/dist/sections/StudentProfile/types.d.ts +98 -0
- package/dist/sections/SurveyForm/SurveyForm.d.ts +1 -1
- package/dist/sections/SurveyForm/types.d.ts +6 -0
- package/dist/sections/_shared/merge-answers.d.ts +9 -0
- package/dist/sections/_shared/section-shell.d.ts +20 -0
- package/dist/sections/_shared/use-assessment-session.d.ts +30 -0
- package/dist/sections/index.d.ts +13 -1
- package/dist/sections.cjs +1 -1
- package/dist/sections.js +282 -1786
- package/dist/social/post-card.d.ts +1 -1
- package/dist/tabs-BsfVo2Bl.cjs +173 -0
- package/dist/tabs-BuY1iNJE.js +22305 -0
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/drawer.d.ts +84 -0
- package/dist/ui/index.d.ts +5 -0
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/rich-text-editor.d.ts +32 -0
- package/dist/ui/rich-text-toolbar.d.ts +8 -0
- package/dist/ui/toast.d.ts +43 -0
- package/dist/utils/array-utils.d.ts +4 -0
- package/dist/utils/debounce.d.ts +5 -1
- package/dist/utils/flatten-leaves.d.ts +6 -0
- package/dist/utils/format-file-size.d.ts +1 -0
- package/dist/utils/format-timestamp.d.ts +1 -0
- package/dist/utils/is-empty-html.d.ts +5 -0
- package/dist/utils/pick-palette-color.d.ts +19 -0
- package/dist/utils/shuffle.d.ts +1 -0
- package/dist/utils/string-utils.d.ts +12 -0
- package/dist/video/types.d.ts +15 -0
- package/dist/video/video-bookmark.d.ts +1 -1
- package/dist/video/video-player.d.ts +1 -1
- package/dist/video/video-playlist-item.d.ts +1 -1
- package/dist/withProGate-BWqcKdPM.js +137 -0
- package/dist/withProGate-DX6XqKLp.cjs +1 -0
- package/package.json +40 -137
- package/src/assessment-toolbar/assessment-toolbar.tsx +54 -49
- package/src/assessment-toolbar/index.ts +6 -0
- package/src/assessment-toolbar/question-header-bar.tsx +61 -0
- package/src/assessment-toolbar/question-materials-drawer.tsx +55 -0
- package/src/assessment-toolbar/question-navigator.tsx +13 -36
- package/src/assessment-toolbar/timer-display.tsx +6 -5
- package/src/assessment-toolbar/types.ts +54 -4
- package/src/assessment-toolbar/use-countdown.ts +153 -0
- package/src/common/empty-state.tsx +1 -0
- package/src/common/index.ts +5 -0
- package/src/common/pagination.tsx +135 -0
- package/src/common/search-input.tsx +8 -6
- package/src/common/stepper.tsx +100 -0
- package/src/common/types.ts +41 -0
- package/src/content/attachment-list.tsx +92 -0
- package/src/content/audio-player.tsx +196 -0
- package/src/content/code-block.tsx +113 -0
- package/src/content/content-block.tsx +68 -2
- package/src/content/embed-block.tsx +78 -0
- package/src/content/file-upload-zone.tsx +11 -6
- package/src/content/index.ts +9 -0
- package/src/content/types.ts +46 -0
- package/src/curriculum/course-card.tsx +199 -0
- package/src/curriculum/curriculum-item.tsx +9 -5
- package/src/curriculum/curriculum-tree.tsx +20 -13
- package/src/curriculum/index.ts +2 -0
- package/src/curriculum/types.ts +2 -2
- package/src/feedback/feedback-banner.tsx +12 -14
- package/src/flashcards/flashcard-deck.tsx +1 -9
- package/src/flashcards/flashcard.tsx +29 -9
- package/src/index.ts +3 -0
- package/src/license/HydraContext.tsx +62 -0
- package/src/license/ProBadge.tsx +43 -0
- package/src/license/index.ts +7 -0
- package/src/license/tiers.ts +24 -0
- package/src/license/useHydraLicense.ts +10 -0
- package/src/license/validate.ts +90 -0
- package/src/license/withProGate.tsx +21 -0
- package/src/modules/AssignmentModule/AssignmentModule.tsx +314 -0
- package/src/modules/AssignmentModule/types.ts +77 -0
- package/src/modules/CertificateModule/CertificateModule.tsx +173 -0
- package/src/modules/CertificateModule/types.ts +49 -0
- package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
- package/src/modules/CourseCatalogModule/types.ts +47 -0
- package/src/modules/CoursePlayer/CoursePlayer.tsx +80 -69
- package/src/modules/DiscussionModule/DiscussionModule.tsx +145 -0
- package/src/modules/DiscussionModule/types.ts +54 -0
- package/src/modules/ExamModule/ExamModule.tsx +151 -0
- package/src/modules/ExamModule/types.ts +57 -0
- package/src/modules/FlashcardLab/FlashcardLab.tsx +39 -21
- package/src/modules/FlashcardLab/types.ts +2 -0
- package/src/modules/GradeCenterModule/GradeCenterModule.tsx +174 -0
- package/src/modules/GradeCenterModule/types.ts +65 -0
- package/src/modules/QuizModule/QuizModule.tsx +58 -178
- package/src/modules/QuizModule/types.ts +10 -15
- package/src/modules/StudentDashboardModule/StudentDashboardModule.tsx +117 -0
- package/src/modules/StudentDashboardModule/types.ts +56 -0
- package/src/modules/StudentProfileModule/StudentProfileModule.tsx +289 -0
- package/src/modules/StudentProfileModule/types.ts +45 -0
- package/src/modules/SurveyModule/SurveyModule.tsx +185 -0
- package/src/modules/SurveyModule/types.ts +53 -0
- package/src/modules/_shared/assessment-intro.tsx +75 -0
- package/src/modules/_shared/assessment-results.tsx +133 -0
- package/src/modules/_shared/types.ts +11 -0
- package/src/modules/_shared/use-timer.ts +49 -0
- package/src/modules/index.ts +33 -0
- package/src/progress/achievement-badge.tsx +52 -0
- package/src/progress/activity-timeline.tsx +84 -0
- package/src/progress/grade-indicator.tsx +9 -1
- package/src/progress/index.ts +7 -0
- package/src/progress/progress-ring.tsx +2 -1
- package/src/progress/stat-card.tsx +37 -18
- package/src/progress/streak-badge.tsx +35 -0
- package/src/progress/types.ts +103 -0
- package/src/provider/HydraProvider.tsx +15 -6
- package/src/questions/choice.tsx +19 -14
- package/src/questions/confidence-indicator.tsx +107 -0
- package/src/questions/essay.tsx +28 -28
- package/src/questions/fill-in-the-blank.tsx +20 -19
- package/src/questions/hotspot.tsx +154 -0
- package/src/questions/index.ts +18 -0
- package/src/questions/inline-choice.tsx +152 -0
- package/src/questions/matching.tsx +229 -0
- package/src/questions/multiple-choice.tsx +19 -14
- package/src/questions/numeric.tsx +106 -0
- package/src/questions/ordering.tsx +167 -0
- package/src/questions/question-renderer.tsx +24 -2
- package/src/questions/scenario.tsx +140 -0
- package/src/questions/scoring.ts +201 -0
- package/src/questions/spreadsheet.tsx +260 -0
- package/src/questions/true-false.tsx +19 -14
- package/src/questions/types.ts +123 -1
- package/src/questions/use-drag-reorder.ts +80 -0
- package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +66 -23
- package/src/sections/AnnouncementFeed/types.ts +15 -1
- package/src/sections/AssessmentReview/AssessmentReview.tsx +50 -2
- package/src/sections/AssessmentReview/types.ts +6 -0
- package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +44 -6
- package/src/sections/AssignmentSubmission/types.ts +6 -0
- package/src/sections/CertificateViewer/CertificateViewer.tsx +215 -60
- package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
- package/src/sections/CertificateViewer/types.ts +19 -5
- package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
- package/src/sections/CourseCatalog/types.ts +76 -0
- package/src/sections/CourseOutline/CourseOutline.tsx +45 -14
- package/src/sections/CourseOutline/types.ts +6 -0
- package/src/sections/DiscussionThread/DiscussionThread.tsx +55 -11
- package/src/sections/DiscussionThread/types.ts +6 -0
- package/src/sections/EnrollmentWizard/EnrollmentWizard.tsx +343 -0
- package/src/sections/EnrollmentWizard/types.ts +65 -0
- package/src/sections/ExamSession/ExamSession.tsx +125 -82
- package/src/sections/ExamSession/types.ts +12 -1
- package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
- package/src/sections/FlashcardStudySession/types.ts +6 -0
- package/src/sections/ForumBoard/ForumBoard.tsx +342 -0
- package/src/sections/ForumBoard/types.ts +81 -0
- package/src/sections/GradebookTable/GradebookTable.tsx +55 -2
- package/src/sections/GradebookTable/types.ts +14 -0
- package/src/sections/LecturePlayer/LecturePlayer.tsx +63 -37
- package/src/sections/LecturePlayer/types.ts +8 -0
- package/src/sections/LessonPage/LessonPage.tsx +40 -13
- package/src/sections/LessonPage/types.ts +6 -0
- package/src/sections/PracticeQuiz/PracticeQuiz.tsx +119 -98
- package/src/sections/PracticeQuiz/types.ts +6 -0
- package/src/sections/ProgressDashboard/ProgressDashboard.tsx +121 -67
- package/src/sections/ProgressDashboard/types.ts +6 -0
- package/src/sections/QuizSession/QuizSession.tsx +115 -67
- package/src/sections/QuizSession/types.ts +12 -1
- package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +147 -0
- package/src/sections/RequirementsChecklist/types.ts +44 -0
- package/src/sections/ResourceLibrary/ResourceLibrary.tsx +68 -17
- package/src/sections/ResourceLibrary/types.ts +15 -1
- package/src/sections/RubricView/RubricView.tsx +174 -0
- package/src/sections/RubricView/types.ts +58 -0
- package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +58 -23
- package/src/sections/ScrollableQuiz/types.ts +6 -0
- package/src/sections/StudentProfile/StudentProfile.tsx +279 -0
- package/src/sections/StudentProfile/types.ts +99 -0
- package/src/sections/SurveyForm/SurveyForm.tsx +40 -10
- package/src/sections/SurveyForm/types.ts +6 -0
- package/src/sections/_shared/merge-answers.ts +22 -0
- package/src/sections/_shared/section-shell.tsx +64 -0
- package/src/sections/_shared/use-assessment-session.ts +125 -0
- package/src/sections/index.ts +42 -1
- package/src/social/post-card.tsx +8 -19
- package/src/social/user-avatar.tsx +10 -5
- package/src/styles/globals.css +52 -41
- package/src/ui/badge.tsx +8 -0
- package/src/ui/drawer.tsx +600 -0
- package/src/ui/index.ts +21 -0
- package/src/ui/progress.tsx +4 -0
- package/src/ui/rich-text-editor.tsx +119 -0
- package/src/ui/rich-text-toolbar.tsx +157 -0
- package/src/ui/toast.tsx +170 -0
- package/src/utils/array-utils.ts +17 -0
- package/src/utils/debounce.ts +8 -2
- package/src/utils/flatten-leaves.ts +17 -0
- package/src/utils/format-file-size.ts +5 -0
- package/src/utils/format-timestamp.ts +13 -0
- package/src/utils/is-empty-html.ts +7 -0
- package/src/utils/pick-palette-color.ts +33 -0
- package/src/utils/shuffle.ts +8 -0
- package/src/utils/string-utils.ts +30 -0
- package/src/video/types.ts +16 -0
- package/src/video/video-bookmark.tsx +4 -3
- package/src/video/video-chapter-list.tsx +9 -4
- package/src/video/video-player.tsx +24 -5
- package/src/video/video-playlist-item.tsx +8 -3
- package/src/video/video-thumbnail-card.tsx +4 -0
- package/src/video/video-transcript.tsx +8 -5
- package/dist/table-BrS5cDQu.js +0 -2510
- package/dist/table-D6AkBBEo.cjs +0 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type HydraPlan = 'pro' | 'free' | 'validating' | 'invalid';
|
|
3
|
+
export interface HydraLicenseContextValue {
|
|
4
|
+
plan: HydraPlan;
|
|
5
|
+
isPro: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const HydraLicenseContext: import('react').Context<HydraLicenseContextValue>;
|
|
8
|
+
export interface HydraLicenseProviderProps {
|
|
9
|
+
licenseKey?: string;
|
|
10
|
+
validateUrl?: string;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
/** Provides license state to all HydraLMS components.
|
|
14
|
+
* When `validateUrl` is omitted or empty, all features are unlocked (dev mode).
|
|
15
|
+
*/
|
|
16
|
+
export declare function HydraLicenseProvider({ licenseKey, validateUrl, children }: HydraLicenseProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/** Wraps children with a subtle "HydraLMS Pro" upgrade badge when the module requires a pro license. */
|
|
3
|
+
export declare function ProBadge({ children, feature }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
feature?: string;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { HydraLicenseProvider, HydraLicenseContext } from './HydraContext';
|
|
2
|
+
export type { HydraPlan, HydraLicenseContextValue, HydraLicenseProviderProps } from './HydraContext';
|
|
3
|
+
export { useHydraLicense } from './useHydraLicense';
|
|
4
|
+
export { isProModule, PRO_MODULES } from './tiers';
|
|
5
|
+
export type { ProModuleName } from './tiers';
|
|
6
|
+
export { ProBadge } from './ProBadge';
|
|
7
|
+
export { withProGate } from './withProGate';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const PRO_MODULES: Set<"QuizModule" | "FlashcardLab" | "CoursePlayer" | "ExamModule" | "SurveyModule" | "GradeCenterModule" | "AssignmentModule" | "CertificateModule" | "DiscussionModule" | "StudentDashboardModule" | "CourseCatalogModule" | "StudentProfileModule">;
|
|
2
|
+
export type ProModuleName = typeof PRO_MODULES extends Set<infer T> ? T : never;
|
|
3
|
+
export declare function isProModule(name: string): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { HydraLicenseContextValue } from './HydraContext';
|
|
2
|
+
/** Returns the current HydraLMS license status. Pro modules render with a
|
|
3
|
+
* watermark badge when `isPro` is false. Wrap your app in `<HydraProvider>`
|
|
4
|
+
* with a valid license key to unlock all features.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useHydraLicense(): HydraLicenseContextValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type KeyResult = 'valid-pro' | 'valid-free' | 'invalid' | 'no-key' | 'skip';
|
|
2
|
+
export interface ValidationResponse {
|
|
3
|
+
valid: boolean;
|
|
4
|
+
plan: 'pro' | 'enterprise' | null;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Validate a license key against the validation endpoint.
|
|
8
|
+
* @param rawKey - The license key string, or null if not provided.
|
|
9
|
+
* @param validateUrl - The validation endpoint URL. Empty string skips validation (dev mode).
|
|
10
|
+
*/
|
|
11
|
+
export declare function validateKey(rawKey: string | null, validateUrl: string): Promise<KeyResult>;
|
|
12
|
+
/** Whether a watermark should be shown for the given key result. */
|
|
13
|
+
export declare function shouldShowWatermark(result: KeyResult): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/** Higher-order component that wraps a pro-tier module with ProBadge when unlicensed. */
|
|
3
|
+
export declare function withProGate<P extends object>(Component: React.ComponentType<P>, moduleName: string): {
|
|
4
|
+
(props: P): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SubmissionData } from '../../sections/AssignmentSubmission/types';
|
|
3
|
+
import { RubricCriterion } from '../../sections/RubricView/types';
|
|
4
|
+
/**
|
|
5
|
+
* AssignmentModule — a complete assignment experience with instructions,
|
|
6
|
+
* submission, and confirmation/grade review.
|
|
7
|
+
*
|
|
8
|
+
* Steps: Instructions → Work (AssignmentSubmission) → Confirmation.
|
|
9
|
+
* Optionally shows a grading rubric in both the instructions and
|
|
10
|
+
* graded confirmation views.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <AssignmentModule
|
|
14
|
+
* title="Week 3 Essay"
|
|
15
|
+
* instructions={<p>Write a 500-word essay on React hooks.</p>}
|
|
16
|
+
* submissionTypes={["text", "file"]}
|
|
17
|
+
* rubric={rubricCriteria}
|
|
18
|
+
* onSubmit={(submission) => submitAssignment(submission)}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
export interface AssignmentModuleProps {
|
|
22
|
+
/** Assignment title */
|
|
23
|
+
title: string;
|
|
24
|
+
/** Assignment instructions (rich content) */
|
|
25
|
+
instructions: ReactNode;
|
|
26
|
+
/** Due date as ISO string */
|
|
27
|
+
dueDate?: string;
|
|
28
|
+
/** Maximum score points */
|
|
29
|
+
maxScore?: number;
|
|
30
|
+
/** Allowed submission types */
|
|
31
|
+
submissionTypes: ("text" | "file" | "url")[];
|
|
32
|
+
/** File upload constraints */
|
|
33
|
+
fileConstraints?: {
|
|
34
|
+
maxFiles?: number;
|
|
35
|
+
maxSizeMB?: number;
|
|
36
|
+
acceptedTypes?: string;
|
|
37
|
+
};
|
|
38
|
+
/** Rubric criteria for grading (shown in instructions and graded confirmation) */
|
|
39
|
+
rubric?: RubricCriterion[];
|
|
40
|
+
/** Existing submission for editing/viewing */
|
|
41
|
+
existingSubmission?: SubmissionData;
|
|
42
|
+
/** Current submission status. @default "not_started" */
|
|
43
|
+
status?: "not_started" | "draft" | "submitted" | "late" | "graded" | "resubmit";
|
|
44
|
+
/** Grade data when graded */
|
|
45
|
+
grade?: {
|
|
46
|
+
score: number;
|
|
47
|
+
feedback?: ReactNode;
|
|
48
|
+
/** Selected rubric level UIDs per criterion UID */
|
|
49
|
+
rubricLevels?: Record<string, string>;
|
|
50
|
+
};
|
|
51
|
+
/** Called on final submission */
|
|
52
|
+
onSubmit?: (submission: SubmissionData) => void;
|
|
53
|
+
/** Called when the assignment is submitted or draft-saved, with the full result */
|
|
54
|
+
onComplete?: (result: AssignmentModuleResult) => void;
|
|
55
|
+
/** Called on draft save */
|
|
56
|
+
onSaveDraft?: (submission: SubmissionData) => void;
|
|
57
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
58
|
+
readOnly?: boolean;
|
|
59
|
+
/** CSS class name for the root element */
|
|
60
|
+
className?: string;
|
|
61
|
+
/** Inline styles for the root element */
|
|
62
|
+
style?: React.CSSProperties;
|
|
63
|
+
}
|
|
64
|
+
export interface AssignmentModuleResult {
|
|
65
|
+
/** The submitted data */
|
|
66
|
+
submission: SubmissionData;
|
|
67
|
+
/** Status after submission */
|
|
68
|
+
status: "not_started" | "draft" | "submitted" | "late" | "graded" | "resubmit";
|
|
69
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Requirement } from '../../sections/RequirementsChecklist/types';
|
|
2
|
+
import { CertificateVariant } from '../../sections/CertificateViewer/types';
|
|
3
|
+
/**
|
|
4
|
+
* CertificateModule — a certificate-earning flow with requirements tracking
|
|
5
|
+
* and certificate display.
|
|
6
|
+
*
|
|
7
|
+
* Steps: Requirements (checklist + progress) → Certificate (CertificateViewer).
|
|
8
|
+
* The certificate step is only accessible when all requirements are met.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <CertificateModule
|
|
12
|
+
* courseTitle="React Fundamentals"
|
|
13
|
+
* recipientName="Jane Smith"
|
|
14
|
+
* organizationName="HydraLMS Academy"
|
|
15
|
+
* requirements={requirements}
|
|
16
|
+
* overallProgress={100}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
export interface CertificateModuleProps {
|
|
20
|
+
/** Course or program title */
|
|
21
|
+
courseTitle: string;
|
|
22
|
+
/** Recipient's full name */
|
|
23
|
+
recipientName: string;
|
|
24
|
+
/** Issuing organization name */
|
|
25
|
+
organizationName: string;
|
|
26
|
+
/** Organization logo URL */
|
|
27
|
+
organizationLogo?: string;
|
|
28
|
+
/** Signatory information */
|
|
29
|
+
signatory?: {
|
|
30
|
+
name: string;
|
|
31
|
+
title: string;
|
|
32
|
+
};
|
|
33
|
+
/** Completion date (used on the certificate) */
|
|
34
|
+
completionDate?: string;
|
|
35
|
+
/** Certificate visual variant. @default "modern" */
|
|
36
|
+
certificateVariant?: CertificateVariant;
|
|
37
|
+
/** Completion requirements */
|
|
38
|
+
requirements: Requirement[];
|
|
39
|
+
/** Overall course progress (0-100). When omitted, derived from requirements completion. */
|
|
40
|
+
overallProgress?: number;
|
|
41
|
+
/** Called when a requirement item is clicked */
|
|
42
|
+
onRequirementClick?: (uid: string) => void;
|
|
43
|
+
/** Called when the certificate is first displayed. @default undefined */
|
|
44
|
+
onComplete?: () => void;
|
|
45
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** CSS class name for the root element */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Inline styles for the root element */
|
|
50
|
+
style?: React.CSSProperties;
|
|
51
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CourseInfo } from '../../sections/CourseCatalog/types';
|
|
2
|
+
import { EnrollmentCourse, Prerequisite } from '../../sections/EnrollmentWizard/types';
|
|
3
|
+
/**
|
|
4
|
+
* CourseCatalogModule — a browse-and-enroll course catalog module.
|
|
5
|
+
*
|
|
6
|
+
* Master-detail layout: CourseCatalog (browse) ↔ EnrollmentWizard (enroll).
|
|
7
|
+
* Clicking a course drills into the enrollment flow; a back button returns to browsing.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <CourseCatalogModule
|
|
11
|
+
* title="Course Catalog"
|
|
12
|
+
* courses={courses}
|
|
13
|
+
* categories={categories}
|
|
14
|
+
* enrollmentData={enrollmentData}
|
|
15
|
+
* onEnroll={(courseUid) => handleEnroll(courseUid)}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
export interface CourseCatalogModuleProps {
|
|
19
|
+
/** Catalog title */
|
|
20
|
+
title?: string;
|
|
21
|
+
/** Courses to display */
|
|
22
|
+
courses: CourseInfo[];
|
|
23
|
+
/** Optional categories for filtering */
|
|
24
|
+
categories?: {
|
|
25
|
+
uid: string;
|
|
26
|
+
label: string;
|
|
27
|
+
}[];
|
|
28
|
+
/** Enrollment data keyed by course UID — provides course details and prerequisites for the enrollment wizard */
|
|
29
|
+
enrollmentData?: Record<string, {
|
|
30
|
+
course: EnrollmentCourse;
|
|
31
|
+
prerequisites?: Prerequisite[];
|
|
32
|
+
}>;
|
|
33
|
+
/** Called when a user confirms enrollment */
|
|
34
|
+
onEnroll: (courseUid: string) => void;
|
|
35
|
+
/** Called when a course is opened (for lazy-loading enrollment data) */
|
|
36
|
+
onCourseOpen?: (courseUid: string) => void;
|
|
37
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** CSS class name for the root element */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Inline styles for the root element */
|
|
42
|
+
style?: React.CSSProperties;
|
|
43
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { CoursePlayerProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const CoursePlayer: {
|
|
3
|
+
(props: CoursePlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { DiscussionUser, DiscussionPost } from '../../sections/DiscussionThread/types';
|
|
2
|
+
import { ForumTopic } from '../../sections/ForumBoard/types';
|
|
3
|
+
/**
|
|
4
|
+
* DiscussionModule — a master-detail discussion forum with topic list and thread view.
|
|
5
|
+
*
|
|
6
|
+
* Panel-based layout: ForumBoard (topic list) ↔ DiscussionThread (thread detail).
|
|
7
|
+
* Clicking a topic drills into the thread; a back button returns to the board.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <DiscussionModule
|
|
11
|
+
* forumTitle="Class Discussion"
|
|
12
|
+
* topics={topics}
|
|
13
|
+
* threads={threadData}
|
|
14
|
+
* currentUser={user}
|
|
15
|
+
* onCreateTopic={(title, content) => createTopic(title, content)}
|
|
16
|
+
* onReply={(topicUid, parentUid, content) => postReply(topicUid, parentUid, content)}
|
|
17
|
+
* />
|
|
18
|
+
*/
|
|
19
|
+
export interface DiscussionModuleProps {
|
|
20
|
+
/** Forum title */
|
|
21
|
+
forumTitle?: string;
|
|
22
|
+
/** List of discussion topics */
|
|
23
|
+
topics: ForumTopic[];
|
|
24
|
+
/** The currently authenticated user */
|
|
25
|
+
currentUser: DiscussionUser;
|
|
26
|
+
/** Thread data keyed by topic UID */
|
|
27
|
+
threads: Record<string, {
|
|
28
|
+
rootPost: DiscussionPost;
|
|
29
|
+
replies: DiscussionPost[];
|
|
30
|
+
}>;
|
|
31
|
+
/** Called when a new topic is created */
|
|
32
|
+
onCreateTopic?: (title: string, content: string) => void;
|
|
33
|
+
/** Called when a reply is posted */
|
|
34
|
+
onReply?: (topicUid: string, parentUid: string, content: string) => void;
|
|
35
|
+
/** Called when a like is toggled */
|
|
36
|
+
onToggleLike?: (topicUid: string, postUid: string) => void;
|
|
37
|
+
/** Called when a post is marked as the answer */
|
|
38
|
+
onMarkAnswer?: (topicUid: string, postUid: string) => void;
|
|
39
|
+
/** Called when a topic is opened (for lazy loading thread data) */
|
|
40
|
+
onTopicOpen?: (topicUid: string) => void;
|
|
41
|
+
/** When true, disables all interactions */
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
/** CSS class name for the root element */
|
|
44
|
+
className?: string;
|
|
45
|
+
/** Inline styles for the root element */
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { QuestionData } from '../../questions/types';
|
|
3
|
+
import { AssessmentResult } from '../_shared/types';
|
|
4
|
+
/**
|
|
5
|
+
* ExamModule — a formal timed exam experience with intro, exam, and results steps.
|
|
6
|
+
*
|
|
7
|
+
* Wraps ExamSession with an intro screen showing rules/instructions and a
|
|
8
|
+
* results screen with scoring, stats, and optional answer review.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <ExamModule
|
|
12
|
+
* title="Midterm Exam"
|
|
13
|
+
* instructions={<p>You have 60 minutes. No notes allowed.</p>}
|
|
14
|
+
* questions={questions}
|
|
15
|
+
* timeLimitSeconds={3600}
|
|
16
|
+
* passingScore={70}
|
|
17
|
+
* onComplete={(result) => saveResult(result)}
|
|
18
|
+
* />
|
|
19
|
+
*/
|
|
20
|
+
export interface ExamModuleProps {
|
|
21
|
+
/** Exam title displayed on the intro screen */
|
|
22
|
+
title: string;
|
|
23
|
+
/** Exam description displayed on the intro screen */
|
|
24
|
+
description?: string;
|
|
25
|
+
/** Exam rules/instructions rendered on the intro screen */
|
|
26
|
+
instructions?: ReactNode;
|
|
27
|
+
/** Ordered list of questions */
|
|
28
|
+
questions: QuestionData[];
|
|
29
|
+
/** Time limit in seconds (required for exams) */
|
|
30
|
+
timeLimitSeconds: number;
|
|
31
|
+
/** Passing threshold as a percentage (e.g. 70 means 70%) */
|
|
32
|
+
passingScore?: number;
|
|
33
|
+
/** Whether the user can go back to previous questions. @default true */
|
|
34
|
+
allowBackNavigation?: boolean;
|
|
35
|
+
/** Auto-submit when time runs out. @default true */
|
|
36
|
+
autoSubmitOnTimeout?: boolean;
|
|
37
|
+
/** Seconds remaining at which to show a time warning */
|
|
38
|
+
timeWarningThreshold?: number;
|
|
39
|
+
/** Whether to allow retaking the exam from the results screen. @default false */
|
|
40
|
+
allowRetake?: boolean;
|
|
41
|
+
/** Whether to show correct/incorrect answer highlighting in the review. @default true */
|
|
42
|
+
showReview?: boolean;
|
|
43
|
+
/** Called when the exam is completed (submitted) */
|
|
44
|
+
onComplete?: (result: ExamModuleResult) => void;
|
|
45
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
46
|
+
readOnly?: boolean;
|
|
47
|
+
/** CSS class name for the root element */
|
|
48
|
+
className?: string;
|
|
49
|
+
/** Inline styles for the root element */
|
|
50
|
+
style?: React.CSSProperties;
|
|
51
|
+
}
|
|
52
|
+
export interface ExamModuleResult extends AssessmentResult {
|
|
53
|
+
/** Whether the submission was triggered by timeout */
|
|
54
|
+
wasAutoSubmitted: boolean;
|
|
55
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { FlashcardLabProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const FlashcardLab: {
|
|
3
|
+
(props: FlashcardLabProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
@@ -26,6 +26,8 @@ export interface FlashcardLabProps {
|
|
|
26
26
|
allowMultiSelect?: boolean;
|
|
27
27
|
/** Called when the user completes a study session */
|
|
28
28
|
onComplete?: (result: FlashcardLabResult) => void;
|
|
29
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
30
|
+
readOnly?: boolean;
|
|
29
31
|
/** CSS class name for the root element */
|
|
30
32
|
className?: string;
|
|
31
33
|
/** Inline styles for the root element */
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { GradeItem, GradeCategory, OverallGrade } from '../../sections/GradebookTable/types';
|
|
2
|
+
import { ModuleProgress, ActivityItem, Achievement } from '../../sections/ProgressDashboard/types';
|
|
3
|
+
import { AssessmentScore } from '../../sections/AssessmentReview/types';
|
|
4
|
+
import { QuestionData, SessionAnswer } from '../../questions/types';
|
|
5
|
+
/**
|
|
6
|
+
* GradeCenterModule — a tabbed grade center with gradebook, progress dashboard,
|
|
7
|
+
* and drill-down into individual assessment reviews.
|
|
8
|
+
*
|
|
9
|
+
* Combines GradebookTable, ProgressDashboard, and AssessmentReview sections
|
|
10
|
+
* in a master-detail layout with tab navigation.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <GradeCenterModule
|
|
14
|
+
* courseTitle="React Fundamentals"
|
|
15
|
+
* gradeItems={items}
|
|
16
|
+
* overallGrade={overallGrade}
|
|
17
|
+
* progressData={{ overallProgress: 75, totalTimeSpent: 45000, modules: [] }}
|
|
18
|
+
* reviewData={{ quiz1: { questions, sessionAnswers, score } }}
|
|
19
|
+
* />
|
|
20
|
+
*/
|
|
21
|
+
export interface GradeCenterModuleProps {
|
|
22
|
+
/** Course title shown in the header */
|
|
23
|
+
courseTitle?: string;
|
|
24
|
+
/** Grade items (assignments, quizzes, etc.) */
|
|
25
|
+
gradeItems: GradeItem[];
|
|
26
|
+
/** Optional category grouping */
|
|
27
|
+
categories?: GradeCategory[];
|
|
28
|
+
/** Overall course grade summary */
|
|
29
|
+
overallGrade?: OverallGrade;
|
|
30
|
+
/** Whether to show the weight column in the gradebook */
|
|
31
|
+
showWeights?: boolean;
|
|
32
|
+
/** Data for the progress tab — tab is hidden if not provided */
|
|
33
|
+
progressData?: {
|
|
34
|
+
overallProgress: number;
|
|
35
|
+
totalTimeSpent: number;
|
|
36
|
+
modules: ModuleProgress[];
|
|
37
|
+
recentActivity?: ActivityItem[];
|
|
38
|
+
streak?: {
|
|
39
|
+
currentDays: number;
|
|
40
|
+
longestDays: number;
|
|
41
|
+
};
|
|
42
|
+
achievements?: Achievement[];
|
|
43
|
+
};
|
|
44
|
+
/** Review data keyed by grade item UID — enables drill-down on click */
|
|
45
|
+
reviewData?: Record<string, {
|
|
46
|
+
questions: QuestionData[];
|
|
47
|
+
sessionAnswers: SessionAnswer[];
|
|
48
|
+
score?: AssessmentScore;
|
|
49
|
+
}>;
|
|
50
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
51
|
+
readOnly?: boolean;
|
|
52
|
+
/** CSS class name for the root element */
|
|
53
|
+
className?: string;
|
|
54
|
+
/** Inline styles for the root element */
|
|
55
|
+
style?: React.CSSProperties;
|
|
56
|
+
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
1
|
import { QuizModuleProps } from './types';
|
|
2
|
-
export declare
|
|
2
|
+
export declare const QuizModule: {
|
|
3
|
+
(props: QuizModuleProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
displayName: string;
|
|
5
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { QuestionData,
|
|
1
|
+
import { QuestionData, QuestionMaterial } from '../../questions/types';
|
|
2
|
+
import { AssessmentResult } from '../_shared/types';
|
|
2
3
|
/**
|
|
3
4
|
* QuizModule — a complete multi-step assessment experience.
|
|
4
5
|
*
|
|
@@ -33,22 +34,17 @@ export interface QuizModuleProps {
|
|
|
33
34
|
onComplete?: (result: QuizModuleResult) => void;
|
|
34
35
|
/** Whether to show correct/incorrect answer highlighting in the review. @default true */
|
|
35
36
|
showReview?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Related materials keyed by question UID. When provided, a "Materials"
|
|
39
|
+
* button appears in the question header, opening a drawer with content blocks.
|
|
40
|
+
*/
|
|
41
|
+
questionMaterials?: QuestionMaterial[];
|
|
42
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
43
|
+
readOnly?: boolean;
|
|
36
44
|
/** CSS class name for the root element */
|
|
37
45
|
className?: string;
|
|
38
46
|
/** Inline styles for the root element */
|
|
39
47
|
style?: React.CSSProperties;
|
|
40
48
|
}
|
|
41
|
-
export interface QuizModuleResult {
|
|
42
|
-
/** The user's submitted answers */
|
|
43
|
-
answers: SessionAnswer[];
|
|
44
|
-
/** Number of correct answers */
|
|
45
|
-
correct: number;
|
|
46
|
-
/** Total number of questions */
|
|
47
|
-
total: number;
|
|
48
|
-
/** Score as a percentage (0-100) */
|
|
49
|
-
percentage: number;
|
|
50
|
-
/** Whether the user passed (only meaningful when passingScore is set) */
|
|
51
|
-
passed: boolean;
|
|
52
|
-
/** Total time taken in seconds */
|
|
53
|
-
timeElapsedSeconds: number;
|
|
49
|
+
export interface QuizModuleResult extends AssessmentResult {
|
|
54
50
|
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CourseInfo } from '../../sections/CourseCatalog/types';
|
|
2
|
+
import { Announcement } from '../../sections/AnnouncementFeed/types';
|
|
3
|
+
import { ModuleProgress, ActivityItem, Achievement } from '../../sections/ProgressDashboard/types';
|
|
4
|
+
/**
|
|
5
|
+
* StudentDashboardModule — a multi-tab student home page.
|
|
6
|
+
*
|
|
7
|
+
* Combines ProgressDashboard, CourseCatalog, and AnnouncementFeed in a tabbed layout
|
|
8
|
+
* to provide a complete student landing page experience.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <StudentDashboardModule
|
|
12
|
+
* studentName="Jane"
|
|
13
|
+
* overallProgress={72}
|
|
14
|
+
* totalTimeSpent={14400}
|
|
15
|
+
* modules={[]}
|
|
16
|
+
* enrolledCourses={courses}
|
|
17
|
+
* onCourseClick={(uid) => navigate(`/courses/${uid}`)}
|
|
18
|
+
* />
|
|
19
|
+
*/
|
|
20
|
+
export interface StudentDashboardModuleProps {
|
|
21
|
+
/** Student's display name */
|
|
22
|
+
studentName: string;
|
|
23
|
+
/** Overall progress percentage (0-100) */
|
|
24
|
+
overallProgress: number;
|
|
25
|
+
/** Total time spent in seconds */
|
|
26
|
+
totalTimeSpent: number;
|
|
27
|
+
/** Per-module progress data */
|
|
28
|
+
modules: ModuleProgress[];
|
|
29
|
+
/** Recent activity items */
|
|
30
|
+
recentActivity?: ActivityItem[];
|
|
31
|
+
/** Streak data */
|
|
32
|
+
streak?: {
|
|
33
|
+
currentDays: number;
|
|
34
|
+
longestDays: number;
|
|
35
|
+
};
|
|
36
|
+
/** Achievements */
|
|
37
|
+
achievements?: Achievement[];
|
|
38
|
+
/** Enrolled courses for the courses tab */
|
|
39
|
+
enrolledCourses: CourseInfo[];
|
|
40
|
+
/** Called when a course is clicked */
|
|
41
|
+
onCourseClick: (courseUid: string) => void;
|
|
42
|
+
/** Announcements for the announcements tab */
|
|
43
|
+
announcements?: Announcement[];
|
|
44
|
+
/** Called when an announcement is selected */
|
|
45
|
+
onAnnouncementSelect?: (announcement: Announcement) => void;
|
|
46
|
+
/** Called when an announcement is marked as read */
|
|
47
|
+
onMarkRead?: (uid: string) => void;
|
|
48
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
49
|
+
readOnly?: boolean;
|
|
50
|
+
/** CSS class name for the root element */
|
|
51
|
+
className?: string;
|
|
52
|
+
/** Inline styles for the root element */
|
|
53
|
+
style?: React.CSSProperties;
|
|
54
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { StudentInfo, EnrolledCourse, ProfileAchievement, ProfileCertificate } from '../../sections/StudentProfile/types';
|
|
2
|
+
import { CertificateViewerProps } from '../../sections/CertificateViewer/types';
|
|
3
|
+
/**
|
|
4
|
+
* StudentProfileModule — a tabbed student profile page with certificate drill-down.
|
|
5
|
+
*
|
|
6
|
+
* Combines StudentProfile, course list, achievements, and CertificateViewer
|
|
7
|
+
* in a tabbed layout with drill-down into individual certificates.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* <StudentProfileModule
|
|
11
|
+
* student={{ uid: "s1", displayName: "Jane Doe" }}
|
|
12
|
+
* enrolledCourses={courses}
|
|
13
|
+
* achievements={badges}
|
|
14
|
+
* certificates={certs}
|
|
15
|
+
* certificateData={{ cert1: { recipientName: "Jane", courseTitle: "React 101", completionDate: "2025-01-01", organizationName: "Hydra Academy" } }}
|
|
16
|
+
* />
|
|
17
|
+
*/
|
|
18
|
+
export interface StudentProfileModuleProps {
|
|
19
|
+
/** Student information */
|
|
20
|
+
student: StudentInfo;
|
|
21
|
+
/** Enrolled courses */
|
|
22
|
+
enrolledCourses?: EnrolledCourse[];
|
|
23
|
+
/** Earned achievements */
|
|
24
|
+
achievements?: ProfileAchievement[];
|
|
25
|
+
/** Earned certificates */
|
|
26
|
+
certificates?: ProfileCertificate[];
|
|
27
|
+
/** Custom stat cards */
|
|
28
|
+
stats?: {
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
icon?: React.ReactNode;
|
|
32
|
+
}[];
|
|
33
|
+
/** Called when a course is clicked */
|
|
34
|
+
onCourseClick?: (courseUid: string) => void;
|
|
35
|
+
/** Certificate data keyed by certificate UID — enables drill-down on click */
|
|
36
|
+
certificateData?: Record<string, CertificateViewerProps>;
|
|
37
|
+
/** When true, disables interactions for preview/demo mode. @default false */
|
|
38
|
+
readOnly?: boolean;
|
|
39
|
+
/** CSS class name for the root element */
|
|
40
|
+
className?: string;
|
|
41
|
+
/** Inline styles for the root element */
|
|
42
|
+
style?: React.CSSProperties;
|
|
43
|
+
}
|