@hydralms/components 0.2.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/StudentProfile-BPsZBaJj.cjs +1 -0
- package/dist/StudentProfile-Cw2p-RZn.js +3273 -0
- package/dist/assessment-toolbar/question-navigator.d.ts +1 -1
- package/dist/assessment-toolbar/timer-display.d.ts +1 -1
- package/dist/common/index.d.ts +2 -1
- package/dist/common/pagination.d.ts +26 -0
- package/dist/common/types.d.ts +1 -0
- package/dist/components.css +1 -1
- package/dist/content/audio-player.d.ts +22 -0
- package/dist/content/code-block.d.ts +30 -0
- package/dist/content/embed-block.d.ts +28 -0
- package/dist/content/index.d.ts +6 -0
- package/dist/content/types.d.ts +24 -0
- package/dist/curriculum/course-card.d.ts +51 -0
- 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 +495 -439
- 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 +6 -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 +4 -7
- package/dist/modules/AssignmentModule/types.d.ts +5 -1
- package/dist/modules/CertificateModule/CertificateModule.d.ts +4 -8
- package/dist/modules/CertificateModule/types.d.ts +6 -4
- 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 +4 -7
- package/dist/modules/ExamModule/ExamModule.d.ts +4 -7
- package/dist/modules/ExamModule/types.d.ts +5 -14
- 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 +4 -8
- package/dist/modules/GradeCenterModule/types.d.ts +2 -0
- package/dist/modules/QuizModule/QuizModule.d.ts +4 -1
- package/dist/modules/QuizModule/types.d.ts +5 -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 +4 -6
- package/dist/modules/SurveyModule/types.d.ts +2 -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 +6 -0
- package/dist/modules.cjs +1 -1
- package/dist/modules.js +1267 -854
- package/dist/progress/types.d.ts +2 -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 +1 -1
- package/dist/questions/fill-in-the-blank.d.ts +1 -1
- package/dist/questions/hotspot.d.ts +1 -1
- package/dist/questions/index.d.ts +2 -0
- package/dist/questions/inline-choice.d.ts +1 -1
- package/dist/questions/matching.d.ts +1 -1
- package/dist/questions/multiple-choice.d.ts +1 -1
- package/dist/questions/numeric.d.ts +1 -1
- package/dist/questions/ordering.d.ts +1 -1
- package/dist/questions/question-renderer.d.ts +1 -1
- package/dist/questions/scenario.d.ts +1 -1
- package/dist/questions/spreadsheet.d.ts +1 -1
- package/dist/questions/true-false.d.ts +1 -1
- package/dist/sections/AdaptiveLearningPath/AdaptiveLearningPath.d.ts +5 -0
- package/dist/sections/AdaptiveLearningPath/path-connector.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/path-milestone-marker.d.ts +7 -0
- package/dist/sections/AdaptiveLearningPath/path-node-card.d.ts +10 -0
- package/dist/sections/AdaptiveLearningPath/path-skill-bar.d.ts +8 -0
- package/dist/sections/AdaptiveLearningPath/types.d.ts +136 -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 +6 -0
- package/dist/sections/ContentAuthoringStudio/ContentAuthoringStudio.d.ts +5 -0
- package/dist/sections/ContentAuthoringStudio/block-editor-item.d.ts +14 -0
- package/dist/sections/ContentAuthoringStudio/block-type-picker.d.ts +12 -0
- package/dist/sections/ContentAuthoringStudio/types.d.ts +67 -0
- 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 +6 -0
- 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 +1 -1
- package/dist/sections/ForumBoard/types.d.ts +14 -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 +6 -0
- package/dist/sections/RequirementsChecklist/RequirementsChecklist.d.ts +1 -1
- package/dist/sections/RequirementsChecklist/types.d.ts +6 -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 +1 -1
- package/dist/sections/RubricView/types.d.ts +6 -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 +10 -0
- package/dist/sections.cjs +1 -1
- package/dist/sections.js +1361 -307
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/index.d.ts +2 -0
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/rich-text-editor.d.ts +3 -1
- package/dist/ui/toast.d.ts +43 -0
- package/dist/utils/debounce.d.ts +5 -1
- package/dist/utils/pick-palette-color.d.ts +19 -0
- package/dist/video/types.d.ts +15 -0
- package/dist/video/video-player.d.ts +1 -1
- package/dist/withProGate-BJdu1T9Y.cjs +2 -0
- package/dist/withProGate-BvFc7Jwy.js +4975 -0
- package/package.json +57 -226
- package/src/assessment-toolbar/question-navigator.tsx +10 -5
- package/src/assessment-toolbar/timer-display.tsx +4 -3
- package/src/assessment-toolbar/use-countdown.ts +1 -1
- package/src/common/empty-state.tsx +1 -0
- package/src/common/index.ts +2 -0
- package/src/common/pagination.tsx +135 -0
- package/src/common/search-input.tsx +2 -1
- package/src/common/types.ts +2 -0
- package/src/content/attachment-list.tsx +2 -0
- package/src/content/audio-player.tsx +196 -0
- package/src/content/code-block.tsx +113 -0
- package/src/content/content-block.tsx +64 -0
- package/src/content/embed-block.tsx +78 -0
- package/src/content/file-upload-zone.tsx +10 -0
- package/src/content/index.ts +6 -0
- package/src/content/types.ts +5 -0
- package/src/curriculum/course-card.tsx +199 -0
- package/src/curriculum/curriculum-item.tsx +3 -3
- package/src/curriculum/curriculum-tree.tsx +20 -13
- package/src/curriculum/index.ts +2 -0
- package/src/curriculum/types.ts +2 -2
- package/src/flashcards/flashcard.tsx +28 -8
- 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 +34 -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 +17 -8
- package/src/modules/AssignmentModule/types.ts +5 -1
- package/src/modules/CertificateModule/CertificateModule.tsx +21 -9
- package/src/modules/CertificateModule/types.ts +6 -4
- package/src/modules/CourseCatalogModule/CourseCatalogModule.tsx +126 -0
- package/src/modules/CourseCatalogModule/types.ts +47 -0
- package/src/modules/CoursePlayer/CoursePlayer.tsx +39 -22
- package/src/modules/DiscussionModule/DiscussionModule.tsx +57 -22
- package/src/modules/ExamModule/ExamModule.tsx +64 -198
- package/src/modules/ExamModule/types.ts +5 -14
- package/src/modules/FlashcardLab/FlashcardLab.tsx +10 -5
- package/src/modules/FlashcardLab/types.ts +2 -0
- package/src/modules/GradeCenterModule/GradeCenterModule.tsx +7 -2
- package/src/modules/GradeCenterModule/types.ts +2 -0
- package/src/modules/QuizModule/QuizModule.tsx +49 -169
- package/src/modules/QuizModule/types.ts +5 -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 +9 -4
- package/src/modules/SurveyModule/types.ts +2 -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 +9 -0
- package/src/progress/achievement-badge.tsx +3 -3
- package/src/progress/grade-indicator.tsx +9 -1
- package/src/progress/progress-ring.tsx +2 -1
- package/src/progress/stat-card.tsx +14 -2
- package/src/progress/types.ts +2 -0
- package/src/provider/HydraProvider.tsx +15 -6
- package/src/questions/choice.tsx +13 -6
- package/src/questions/confidence-indicator.tsx +107 -0
- package/src/questions/essay.tsx +6 -4
- package/src/questions/fill-in-the-blank.tsx +8 -4
- package/src/questions/hotspot.tsx +4 -4
- package/src/questions/index.ts +2 -0
- package/src/questions/inline-choice.tsx +5 -4
- package/src/questions/matching.tsx +5 -4
- package/src/questions/multiple-choice.tsx +13 -6
- package/src/questions/numeric.tsx +8 -4
- package/src/questions/ordering.tsx +12 -4
- package/src/questions/question-renderer.tsx +3 -2
- package/src/questions/scenario.tsx +4 -4
- package/src/questions/spreadsheet.tsx +5 -4
- package/src/questions/true-false.tsx +13 -6
- package/src/sections/AdaptiveLearningPath/AdaptiveLearningPath.tsx +251 -0
- package/src/sections/AdaptiveLearningPath/path-connector.tsx +27 -0
- package/src/sections/AdaptiveLearningPath/path-milestone-marker.tsx +50 -0
- package/src/sections/AdaptiveLearningPath/path-node-card.tsx +166 -0
- package/src/sections/AdaptiveLearningPath/path-skill-bar.tsx +49 -0
- package/src/sections/AdaptiveLearningPath/types.ts +159 -0
- package/src/sections/AnnouncementFeed/AnnouncementFeed.tsx +64 -8
- package/src/sections/AnnouncementFeed/types.ts +15 -1
- package/src/sections/AssessmentReview/AssessmentReview.tsx +37 -0
- package/src/sections/AssessmentReview/types.ts +6 -0
- package/src/sections/AssignmentSubmission/AssignmentSubmission.tsx +37 -1
- package/src/sections/AssignmentSubmission/types.ts +6 -0
- package/src/sections/CertificateViewer/CertificateViewer.tsx +29 -227
- package/src/sections/CertificateViewer/certificate-variants.tsx +170 -0
- package/src/sections/CertificateViewer/types.ts +6 -0
- package/src/sections/ContentAuthoringStudio/ContentAuthoringStudio.tsx +289 -0
- package/src/sections/ContentAuthoringStudio/block-editor-item.tsx +487 -0
- package/src/sections/ContentAuthoringStudio/block-type-picker.tsx +123 -0
- package/src/sections/ContentAuthoringStudio/types.ts +67 -0
- package/src/sections/CourseCatalog/CourseCatalog.tsx +220 -0
- package/src/sections/CourseCatalog/types.ts +76 -0
- package/src/sections/CourseOutline/CourseOutline.tsx +41 -0
- package/src/sections/CourseOutline/types.ts +6 -0
- package/src/sections/DiscussionThread/DiscussionThread.tsx +42 -1
- 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 +100 -94
- package/src/sections/ExamSession/types.ts +6 -0
- package/src/sections/FlashcardStudySession/FlashcardStudySession.tsx +53 -36
- package/src/sections/FlashcardStudySession/types.ts +6 -0
- package/src/sections/ForumBoard/ForumBoard.tsx +67 -7
- package/src/sections/ForumBoard/types.ts +14 -0
- package/src/sections/GradebookTable/GradebookTable.tsx +54 -1
- 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 +34 -6
- package/src/sections/LessonPage/types.ts +6 -0
- package/src/sections/PracticeQuiz/PracticeQuiz.tsx +106 -74
- package/src/sections/PracticeQuiz/types.ts +6 -0
- package/src/sections/ProgressDashboard/ProgressDashboard.tsx +64 -10
- package/src/sections/ProgressDashboard/types.ts +6 -0
- package/src/sections/QuizSession/QuizSession.tsx +71 -82
- package/src/sections/QuizSession/types.ts +6 -0
- package/src/sections/RequirementsChecklist/RequirementsChecklist.tsx +41 -1
- package/src/sections/RequirementsChecklist/types.ts +6 -0
- package/src/sections/ResourceLibrary/ResourceLibrary.tsx +64 -8
- package/src/sections/ResourceLibrary/types.ts +15 -1
- package/src/sections/RubricView/RubricView.tsx +37 -1
- package/src/sections/RubricView/types.ts +6 -0
- package/src/sections/ScrollableQuiz/ScrollableQuiz.tsx +36 -15
- 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 +32 -5
- 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 +40 -0
- package/src/social/user-avatar.tsx +9 -5
- package/src/styles/globals.css +39 -41
- package/src/ui/badge.tsx +8 -0
- package/src/ui/index.ts +2 -0
- package/src/ui/progress.tsx +4 -0
- package/src/ui/rich-text-editor.tsx +10 -0
- package/src/ui/rich-text-toolbar.tsx +2 -1
- package/src/ui/toast.tsx +170 -0
- package/src/utils/debounce.ts +8 -2
- package/src/utils/pick-palette-color.ts +33 -0
- package/src/video/types.ts +16 -0
- package/src/video/video-player.tsx +27 -6
- package/dist/ForumBoard-CHXU3mjC.js +0 -2207
- package/dist/ForumBoard-d1w5-r6n.cjs +0 -1
- package/dist/tabs-DRM2Iq_J.cjs +0 -172
- package/dist/tabs-Wf3h_Cx3.js +0 -21580
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CourseCatalog section — a searchable, filterable course catalog.
|
|
3
|
+
*
|
|
4
|
+
* Displays courses in a grid or list view with search, category tabs,
|
|
5
|
+
* view mode toggling, and optional pagination.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <CourseCatalog
|
|
9
|
+
* courses={courses}
|
|
10
|
+
* categories={categories}
|
|
11
|
+
* onCourseClick={(c) => navigate(`/courses/${c.uid}`)}
|
|
12
|
+
* onEnroll={(c) => enroll(c.uid)}
|
|
13
|
+
* />
|
|
14
|
+
*/
|
|
15
|
+
export interface CourseCatalogProps {
|
|
16
|
+
/** Courses to display */
|
|
17
|
+
courses: CourseInfo[];
|
|
18
|
+
/** Optional categories for tab filtering */
|
|
19
|
+
categories?: {
|
|
20
|
+
uid: string;
|
|
21
|
+
label: string;
|
|
22
|
+
}[];
|
|
23
|
+
/** Called when the user clicks a course */
|
|
24
|
+
onCourseClick: (course: CourseInfo) => void;
|
|
25
|
+
/** Called when the user clicks enroll on a course */
|
|
26
|
+
onEnroll?: (course: CourseInfo) => void;
|
|
27
|
+
/** Layout view mode */
|
|
28
|
+
viewMode?: "grid" | "list";
|
|
29
|
+
/** Whether the user can toggle between grid and list */
|
|
30
|
+
allowViewToggle?: boolean;
|
|
31
|
+
/** Whether to show search */
|
|
32
|
+
showSearch?: boolean;
|
|
33
|
+
/** Empty state message */
|
|
34
|
+
emptyMessage?: string;
|
|
35
|
+
/** When true, disables interactions */
|
|
36
|
+
readOnly?: boolean;
|
|
37
|
+
/** Render skeleton placeholders instead of content */
|
|
38
|
+
isLoading?: boolean;
|
|
39
|
+
/** Error message — renders an error state with optional retry */
|
|
40
|
+
error?: string | null;
|
|
41
|
+
/** Called when the user clicks retry in the error state */
|
|
42
|
+
onRetry?: () => void;
|
|
43
|
+
/** Number of items per page (enables pagination when set with onPageChange) */
|
|
44
|
+
pageSize?: number;
|
|
45
|
+
/** Current page (1-indexed) */
|
|
46
|
+
currentPage?: number;
|
|
47
|
+
/** Total number of items (for server-side pagination) */
|
|
48
|
+
totalItems?: number;
|
|
49
|
+
/** Called when the user navigates to a different page */
|
|
50
|
+
onPageChange?: (page: number) => void;
|
|
51
|
+
/** CSS class name for the root element */
|
|
52
|
+
className?: string;
|
|
53
|
+
/** Inline styles for the root element */
|
|
54
|
+
style?: React.CSSProperties;
|
|
55
|
+
}
|
|
56
|
+
export interface CourseInfo {
|
|
57
|
+
/** Unique identifier */
|
|
58
|
+
uid: string;
|
|
59
|
+
/** Course title */
|
|
60
|
+
title: string;
|
|
61
|
+
/** Course description */
|
|
62
|
+
description?: string;
|
|
63
|
+
/** Thumbnail image URL */
|
|
64
|
+
thumbnailUrl?: string;
|
|
65
|
+
/** Instructor info */
|
|
66
|
+
instructor?: {
|
|
67
|
+
displayName: string;
|
|
68
|
+
avatarUrl?: string;
|
|
69
|
+
};
|
|
70
|
+
/** Category UID for filtering */
|
|
71
|
+
categoryUid?: string;
|
|
72
|
+
/** Progress percentage (0-100) */
|
|
73
|
+
progress?: number;
|
|
74
|
+
/** Enrollment status */
|
|
75
|
+
enrollmentStatus?: "enrolled" | "completed" | "available" | "locked";
|
|
76
|
+
/** Number of enrolled students */
|
|
77
|
+
studentCount?: number;
|
|
78
|
+
/** Estimated duration (e.g. "12 hours") */
|
|
79
|
+
duration?: string;
|
|
80
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { CourseOutlineProps } from './types';
|
|
2
|
-
export declare function CourseOutline({ items, progress, courseTitle, activeItemUid, onItemClick, showOverallProgress, showDuration, showIcons, readOnly, className, style, }: CourseOutlineProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function CourseOutline({ items, progress, courseTitle, activeItemUid, onItemClick, showOverallProgress, showDuration, showIcons, readOnly, isLoading, error, onRetry, className, style, }: CourseOutlineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -42,6 +42,12 @@ export interface CourseOutlineProps {
|
|
|
42
42
|
showIcons?: boolean;
|
|
43
43
|
/** When true, disables all click interactions */
|
|
44
44
|
readOnly?: boolean;
|
|
45
|
+
/** Render skeleton placeholders instead of content */
|
|
46
|
+
isLoading?: boolean;
|
|
47
|
+
/** Error message — renders an error state with optional retry */
|
|
48
|
+
error?: string | null;
|
|
49
|
+
/** Called when the user clicks retry in the error state */
|
|
50
|
+
onRetry?: () => void;
|
|
45
51
|
/** CSS class name for the root element */
|
|
46
52
|
className?: string;
|
|
47
53
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DiscussionThreadProps } from './types';
|
|
2
|
-
export declare function DiscussionThread({ title, rootPost, replies, currentUser, onReply, onToggleLike, onMarkAnswer, maxDepth, allowReplies, sortOrder, readOnly, className, style, }: DiscussionThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function DiscussionThread({ title, rootPost, replies, currentUser, onReply, onToggleLike, onMarkAnswer, maxDepth, allowReplies, sortOrder, readOnly, isLoading, error, onRetry, className, style, }: DiscussionThreadProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,6 +37,12 @@ export interface DiscussionThreadProps {
|
|
|
37
37
|
sortOrder?: "newest" | "oldest" | "most_liked";
|
|
38
38
|
/** When true, disables interactions */
|
|
39
39
|
readOnly?: boolean;
|
|
40
|
+
/** Render skeleton placeholders instead of content */
|
|
41
|
+
isLoading?: boolean;
|
|
42
|
+
/** Error message — renders an error state with optional retry */
|
|
43
|
+
error?: string | null;
|
|
44
|
+
/** Called when the user clicks retry in the error state */
|
|
45
|
+
onRetry?: () => void;
|
|
40
46
|
/** CSS class name for the root element */
|
|
41
47
|
className?: string;
|
|
42
48
|
/** Inline styles for the root element */
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EnrollmentWizard section — a multi-step course enrollment flow.
|
|
3
|
+
*
|
|
4
|
+
* Guides users through course details, prerequisite checks, and enrollment
|
|
5
|
+
* confirmation with visual step progress.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <EnrollmentWizard
|
|
9
|
+
* course={{ uid: "c1", title: "React 101", description: "Learn React" }}
|
|
10
|
+
* prerequisites={[{ uid: "p1", label: "JavaScript Basics", isMet: true }]}
|
|
11
|
+
* onEnroll={(courseUid) => enroll(courseUid)}
|
|
12
|
+
* />
|
|
13
|
+
*/
|
|
14
|
+
export interface EnrollmentWizardProps {
|
|
15
|
+
/** Course information to display */
|
|
16
|
+
course: EnrollmentCourse;
|
|
17
|
+
/** Prerequisites for enrollment */
|
|
18
|
+
prerequisites?: Prerequisite[];
|
|
19
|
+
/** Called when the user confirms enrollment */
|
|
20
|
+
onEnroll: (courseUid: string) => void;
|
|
21
|
+
/** Called when the user cancels the wizard */
|
|
22
|
+
onCancel?: () => void;
|
|
23
|
+
/** Label for the enroll button */
|
|
24
|
+
enrollLabel?: string;
|
|
25
|
+
/** Whether enrollment is in progress (shows spinner) */
|
|
26
|
+
isEnrolling?: boolean;
|
|
27
|
+
/** Render skeleton placeholders instead of content */
|
|
28
|
+
isLoading?: boolean;
|
|
29
|
+
/** Error message — renders an error state with optional retry */
|
|
30
|
+
error?: string | null;
|
|
31
|
+
/** Called when the user clicks retry in the error state */
|
|
32
|
+
onRetry?: () => void;
|
|
33
|
+
/** CSS class name for the root element */
|
|
34
|
+
className?: string;
|
|
35
|
+
/** Inline styles for the root element */
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
export interface EnrollmentCourse {
|
|
39
|
+
/** Course UID */
|
|
40
|
+
uid: string;
|
|
41
|
+
/** Course title */
|
|
42
|
+
title: string;
|
|
43
|
+
/** Course description */
|
|
44
|
+
description?: string;
|
|
45
|
+
/** Thumbnail image URL */
|
|
46
|
+
thumbnailUrl?: string;
|
|
47
|
+
/** Instructor info */
|
|
48
|
+
instructor?: {
|
|
49
|
+
displayName: string;
|
|
50
|
+
avatarUrl?: string;
|
|
51
|
+
};
|
|
52
|
+
/** Estimated duration */
|
|
53
|
+
duration?: string;
|
|
54
|
+
/** Syllabus bullet points */
|
|
55
|
+
syllabus?: string[];
|
|
56
|
+
}
|
|
57
|
+
export interface Prerequisite {
|
|
58
|
+
/** Unique identifier */
|
|
59
|
+
uid: string;
|
|
60
|
+
/** Prerequisite label */
|
|
61
|
+
label: string;
|
|
62
|
+
/** Whether this prerequisite has been met */
|
|
63
|
+
isMet: boolean;
|
|
64
|
+
/** Optional description */
|
|
65
|
+
description?: string;
|
|
66
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ExamSessionProps } from './types';
|
|
2
|
-
export declare function ExamSession({ questions, initialAnswers, onSubmit, onAnswerChange, timeLimitSeconds, timeElapsedSeconds, autoSubmitOnTimeout, timeWarningThreshold, allowBackNavigation, confirmBeforeSubmit, examTitle, instructions, questionMaterials, isSubmitting, readOnly, className, style, }: ExamSessionProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ExamSession({ questions, initialAnswers, onSubmit, onAnswerChange, timeLimitSeconds, timeElapsedSeconds, autoSubmitOnTimeout, timeWarningThreshold, allowBackNavigation, confirmBeforeSubmit, examTitle, instructions, questionMaterials, isSubmitting, readOnly, isLoading, error, onRetry, className, style, }: ExamSessionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -50,6 +50,12 @@ export interface ExamSessionProps {
|
|
|
50
50
|
questionMaterials?: QuestionMaterial[];
|
|
51
51
|
/** When true, all inputs are disabled */
|
|
52
52
|
readOnly?: boolean;
|
|
53
|
+
/** Render skeleton placeholders instead of content */
|
|
54
|
+
isLoading?: boolean;
|
|
55
|
+
/** Error message — renders an error state with optional retry */
|
|
56
|
+
error?: string | null;
|
|
57
|
+
/** Called when the user clicks retry in the error state */
|
|
58
|
+
onRetry?: () => void;
|
|
53
59
|
/** CSS class name for the root element */
|
|
54
60
|
className?: string;
|
|
55
61
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FlashcardStudySessionProps } from './types';
|
|
2
|
-
export declare function FlashcardStudySession({ cards, title, description, shuffled, onComplete, readOnly, className, style, }: FlashcardStudySessionProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function FlashcardStudySession({ cards, title, description, shuffled, onComplete, readOnly, isLoading, error, onRetry, className, style, }: FlashcardStudySessionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,6 +27,12 @@ export interface FlashcardStudySessionProps {
|
|
|
27
27
|
onComplete?: (stats: FlashcardSessionStats) => void;
|
|
28
28
|
/** When true, disables card flipping */
|
|
29
29
|
readOnly?: boolean;
|
|
30
|
+
/** Render skeleton placeholders instead of content */
|
|
31
|
+
isLoading?: boolean;
|
|
32
|
+
/** Error message — renders an error state with optional retry */
|
|
33
|
+
error?: string | null;
|
|
34
|
+
/** Called when the user clicks retry in the error state */
|
|
35
|
+
onRetry?: () => void;
|
|
30
36
|
/** CSS class name for the root element */
|
|
31
37
|
className?: string;
|
|
32
38
|
/** Inline styles for the root element */
|
|
@@ -5,4 +5,4 @@ import { ForumBoardProps } from './types';
|
|
|
5
5
|
* Displays a searchable, sortable list of discussion topics with author info,
|
|
6
6
|
* reply/like counts, timestamps, and new topic creation.
|
|
7
7
|
*/
|
|
8
|
-
export declare function ForumBoard({ title, topics, onTopicClick, onCreateTopic, sortOrder, onSortChange, searchQuery, onSearchChange, readOnly, className, style, }: ForumBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ForumBoard({ title, topics, onTopicClick, onCreateTopic, sortOrder, onSortChange, searchQuery, onSearchChange, readOnly, isLoading, error, onRetry, pageSize, currentPage, totalItems, onPageChange, className, style, }: ForumBoardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -35,6 +35,20 @@ export interface ForumBoardProps {
|
|
|
35
35
|
onSearchChange?: (query: string) => void;
|
|
36
36
|
/** When true, disables create and interactions */
|
|
37
37
|
readOnly?: boolean;
|
|
38
|
+
/** Render skeleton placeholders instead of content */
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/** Error message — renders an error state with optional retry */
|
|
41
|
+
error?: string | null;
|
|
42
|
+
/** Called when the user clicks retry in the error state */
|
|
43
|
+
onRetry?: () => void;
|
|
44
|
+
/** Number of items per page (enables pagination when set with onPageChange) */
|
|
45
|
+
pageSize?: number;
|
|
46
|
+
/** Current page (1-indexed) */
|
|
47
|
+
currentPage?: number;
|
|
48
|
+
/** Total number of items (for server-side pagination) */
|
|
49
|
+
totalItems?: number;
|
|
50
|
+
/** Called when the user navigates to a different page */
|
|
51
|
+
onPageChange?: (page: number) => void;
|
|
38
52
|
/** CSS class name for the root element */
|
|
39
53
|
className?: string;
|
|
40
54
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { GradebookTableProps } from './types';
|
|
2
|
-
export declare function GradebookTable({ items, categories, overallGrade, showWeights, showCategoryTotals, onItemClick, readOnly, className, style, }: GradebookTableProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function GradebookTable({ items, categories, overallGrade, showWeights, showCategoryTotals, onItemClick, readOnly, isLoading, error, onRetry, pageSize, currentPage, totalItems, onPageChange, className, style, }: GradebookTableProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -26,6 +26,20 @@ export interface GradebookTableProps {
|
|
|
26
26
|
onItemClick?: (item: GradeItem) => void;
|
|
27
27
|
/** When true, disables interactions */
|
|
28
28
|
readOnly?: boolean;
|
|
29
|
+
/** Render skeleton placeholders instead of content */
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
/** Error message — renders an error state with optional retry */
|
|
32
|
+
error?: string | null;
|
|
33
|
+
/** Called when the user clicks retry in the error state */
|
|
34
|
+
onRetry?: () => void;
|
|
35
|
+
/** Number of items per page (enables pagination when set with onPageChange) */
|
|
36
|
+
pageSize?: number;
|
|
37
|
+
/** Current page (1-indexed) */
|
|
38
|
+
currentPage?: number;
|
|
39
|
+
/** Total number of items (for server-side pagination) */
|
|
40
|
+
totalItems?: number;
|
|
41
|
+
/** Called when the user navigates to a different page */
|
|
42
|
+
onPageChange?: (page: number) => void;
|
|
29
43
|
/** CSS class name for the root element */
|
|
30
44
|
className?: string;
|
|
31
45
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LecturePlayerProps } from './types';
|
|
2
|
-
export declare function LecturePlayer({ video, notes, layout, notesPanelWidth, notesPanelHeight, className, style, }: LecturePlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function LecturePlayer({ video, notes, layout, notesPanelWidth, notesPanelHeight, isLoading, error, onRetry, onComplete, className, style, }: LecturePlayerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -40,6 +40,14 @@ export interface LecturePlayerProps {
|
|
|
40
40
|
* @default "240px"
|
|
41
41
|
*/
|
|
42
42
|
notesPanelHeight?: string | number;
|
|
43
|
+
/** Render skeleton placeholders instead of content */
|
|
44
|
+
isLoading?: boolean;
|
|
45
|
+
/** Error message — renders an error state with optional retry */
|
|
46
|
+
error?: string | null;
|
|
47
|
+
/** Called when the user clicks retry in the error state */
|
|
48
|
+
onRetry?: () => void;
|
|
49
|
+
/** Called when the video playback ends. */
|
|
50
|
+
onComplete?: () => void;
|
|
43
51
|
/** CSS class name for the root element */
|
|
44
52
|
className?: string;
|
|
45
53
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { LessonPageProps } from './types';
|
|
2
|
-
export declare function LessonPage({ title, blocks, isCompleted, onMarkComplete, onNextLesson, nextLessonTitle, estimatedDuration, showDuration, readOnly, className, style, }: LessonPageProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function LessonPage({ title, blocks, isCompleted, onMarkComplete, onNextLesson, nextLessonTitle, estimatedDuration, showDuration, readOnly, isLoading, error, onRetry, className, style, }: LessonPageProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -33,6 +33,12 @@ export interface LessonPageProps {
|
|
|
33
33
|
showDuration?: boolean;
|
|
34
34
|
/** When true, disables interactive elements */
|
|
35
35
|
readOnly?: boolean;
|
|
36
|
+
/** Render skeleton placeholders instead of content */
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
/** Error message — renders an error state with optional retry */
|
|
39
|
+
error?: string | null;
|
|
40
|
+
/** Called when the user clicks retry in the error state */
|
|
41
|
+
onRetry?: () => void;
|
|
36
42
|
/** CSS class name for the root element */
|
|
37
43
|
className?: string;
|
|
38
44
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PracticeQuizProps } from './types';
|
|
2
|
-
export declare function PracticeQuiz({ questions: questionsProp, instantFeedback, allowRetry, onComplete, shuffled, readOnly, className, style, }: PracticeQuizProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function PracticeQuiz({ questions: questionsProp, instantFeedback, allowRetry, onComplete, shuffled, readOnly, isLoading, error, onRetry, className, style, }: PracticeQuizProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,6 +27,12 @@ export interface PracticeQuizProps {
|
|
|
27
27
|
shuffled?: boolean;
|
|
28
28
|
/** When true, all inputs are disabled */
|
|
29
29
|
readOnly?: boolean;
|
|
30
|
+
/** Render skeleton placeholders instead of content */
|
|
31
|
+
isLoading?: boolean;
|
|
32
|
+
/** Error message — renders an error state with optional retry */
|
|
33
|
+
error?: string | null;
|
|
34
|
+
/** Called when the user clicks retry in the error state */
|
|
35
|
+
onRetry?: () => void;
|
|
30
36
|
/** CSS class name for the root element */
|
|
31
37
|
className?: string;
|
|
32
38
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ProgressDashboardProps } from './types';
|
|
2
|
-
export declare function ProgressDashboard({ overallProgress, totalTimeSpent, modules, recentActivity, streak, achievements, recentActivityLimit, onModuleClick, className, style, }: ProgressDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ProgressDashboard({ overallProgress, totalTimeSpent, modules, recentActivity, streak, achievements, recentActivityLimit, onModuleClick, isLoading, error, onRetry, className, style, }: ProgressDashboardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -32,6 +32,12 @@ export interface ProgressDashboardProps {
|
|
|
32
32
|
recentActivityLimit?: number;
|
|
33
33
|
/** Called when the user clicks a module */
|
|
34
34
|
onModuleClick?: (moduleUid: string) => void;
|
|
35
|
+
/** Render skeleton placeholders instead of content */
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
/** Error message — renders an error state with optional retry */
|
|
38
|
+
error?: string | null;
|
|
39
|
+
/** Called when the user clicks retry in the error state */
|
|
40
|
+
onRetry?: () => void;
|
|
35
41
|
/** CSS class name for the root element */
|
|
36
42
|
className?: string;
|
|
37
43
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { QuizSessionProps } from './types';
|
|
2
|
-
export declare function QuizSession({ questions, initialAnswers, onSubmit, onAnswerChange, timeElapsedSeconds, timeLimitSeconds, questionMaterials, isSubmitting, readOnly, className, style, }: QuizSessionProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function QuizSession({ questions, initialAnswers, onSubmit, onAnswerChange, timeElapsedSeconds, timeLimitSeconds, questionMaterials, isSubmitting, readOnly, isLoading, error, onRetry, className, style, }: QuizSessionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -44,6 +44,12 @@ export interface QuizSessionProps {
|
|
|
44
44
|
questionMaterials?: QuestionMaterial[];
|
|
45
45
|
/** When true, all inputs are disabled (e.g. after submission) */
|
|
46
46
|
readOnly?: boolean;
|
|
47
|
+
/** Render skeleton placeholders instead of content */
|
|
48
|
+
isLoading?: boolean;
|
|
49
|
+
/** Error message — renders an error state with optional retry */
|
|
50
|
+
error?: string | null;
|
|
51
|
+
/** Called when the user clicks retry in the error state */
|
|
52
|
+
onRetry?: () => void;
|
|
47
53
|
/** CSS class name for the root element */
|
|
48
54
|
className?: string;
|
|
49
55
|
/** Inline styles for the root element */
|
|
@@ -5,4 +5,4 @@ import { RequirementsChecklistProps } from './types';
|
|
|
5
5
|
* Displays a vertical list of requirements with an overall progress bar.
|
|
6
6
|
* Incomplete items can be clicked to navigate to the relevant content.
|
|
7
7
|
*/
|
|
8
|
-
export declare function RequirementsChecklist({ title, requirements, onRequirementClick, className, style, }: RequirementsChecklistProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function RequirementsChecklist({ title, requirements, onRequirementClick, isLoading, error, onRetry, className, style, }: RequirementsChecklistProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,6 +18,12 @@ export interface RequirementsChecklistProps {
|
|
|
18
18
|
requirements: Requirement[];
|
|
19
19
|
/** Called when the user clicks an incomplete requirement */
|
|
20
20
|
onRequirementClick?: (uid: string) => void;
|
|
21
|
+
/** Render skeleton placeholders instead of content */
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
/** Error message — renders an error state with optional retry */
|
|
24
|
+
error?: string | null;
|
|
25
|
+
/** Called when the user clicks retry in the error state */
|
|
26
|
+
onRetry?: () => void;
|
|
21
27
|
/** CSS class name for the root element */
|
|
22
28
|
className?: string;
|
|
23
29
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ResourceLibraryProps } from './types';
|
|
2
|
-
export declare function ResourceLibrary({ resources, categories, onResourceClick, onDownload, viewMode: initialViewMode, allowViewToggle, showSearch, emptyMessage, readOnly, className, style, }: ResourceLibraryProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ResourceLibrary({ resources, categories, onResourceClick, onDownload, viewMode: initialViewMode, allowViewToggle, showSearch, emptyMessage, readOnly, isLoading, error, onRetry, pageSize, currentPage, totalItems, onPageChange, className, style, }: ResourceLibraryProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -20,7 +20,7 @@ export interface ResourceLibraryProps {
|
|
|
20
20
|
label: string;
|
|
21
21
|
}[];
|
|
22
22
|
/** Called when the user clicks a resource */
|
|
23
|
-
onResourceClick
|
|
23
|
+
onResourceClick?: (resource: Resource) => void;
|
|
24
24
|
/** Called when the user downloads a resource */
|
|
25
25
|
onDownload?: (resource: Resource) => void;
|
|
26
26
|
/** Layout view mode */
|
|
@@ -33,6 +33,20 @@ export interface ResourceLibraryProps {
|
|
|
33
33
|
emptyMessage?: string;
|
|
34
34
|
/** When true, disables interactions */
|
|
35
35
|
readOnly?: boolean;
|
|
36
|
+
/** Render skeleton placeholders instead of content */
|
|
37
|
+
isLoading?: boolean;
|
|
38
|
+
/** Error message — renders an error state with optional retry */
|
|
39
|
+
error?: string | null;
|
|
40
|
+
/** Called when the user clicks retry in the error state */
|
|
41
|
+
onRetry?: () => void;
|
|
42
|
+
/** Number of items per page (enables pagination when set with onPageChange) */
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
/** Current page (1-indexed) */
|
|
45
|
+
currentPage?: number;
|
|
46
|
+
/** Total number of items (for server-side pagination) */
|
|
47
|
+
totalItems?: number;
|
|
48
|
+
/** Called when the user navigates to a different page */
|
|
49
|
+
onPageChange?: (page: number) => void;
|
|
36
50
|
/** CSS class name for the root element */
|
|
37
51
|
className?: string;
|
|
38
52
|
/** Inline styles for the root element */
|
|
@@ -6,4 +6,4 @@ import { RubricViewProps } from './types';
|
|
|
6
6
|
* shows an overall score. Useful inside AssignmentModule for showing grading criteria
|
|
7
7
|
* and results.
|
|
8
8
|
*/
|
|
9
|
-
export declare function RubricView({ criteria, selectedLevels, totalScore, maxScore, feedback, className, style, }: RubricViewProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function RubricView({ criteria, selectedLevels, totalScore, maxScore, feedback, isLoading, error, onRetry, className, style, }: RubricViewProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -23,6 +23,12 @@ export interface RubricViewProps {
|
|
|
23
23
|
maxScore?: number;
|
|
24
24
|
/** Instructor feedback text */
|
|
25
25
|
feedback?: string;
|
|
26
|
+
/** Render skeleton placeholders instead of content */
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
/** Error message — renders an error state with optional retry */
|
|
29
|
+
error?: string | null;
|
|
30
|
+
/** Called when the user clicks retry in the error state */
|
|
31
|
+
onRetry?: () => void;
|
|
26
32
|
/** CSS class name for the root element */
|
|
27
33
|
className?: string;
|
|
28
34
|
/** Inline styles for the root element */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ScrollableQuizProps } from './types';
|
|
2
|
-
export declare function ScrollableQuiz({ questions, initialAnswers, onSubmit, onAnswerChange, showNavigator, showQuestionNumbers, questionGroups, isSubmitting, readOnly, className, style, }: ScrollableQuizProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function ScrollableQuiz({ questions, initialAnswers, onSubmit, onAnswerChange, showNavigator, showQuestionNumbers, questionGroups, isSubmitting, readOnly, isLoading, error, onRetry, className, style, }: ScrollableQuizProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -35,6 +35,12 @@ export interface ScrollableQuizProps {
|
|
|
35
35
|
isSubmitting?: boolean;
|
|
36
36
|
/** When true, all inputs are disabled */
|
|
37
37
|
readOnly?: boolean;
|
|
38
|
+
/** Render skeleton placeholders instead of content */
|
|
39
|
+
isLoading?: boolean;
|
|
40
|
+
/** Error message — renders an error state with optional retry */
|
|
41
|
+
error?: string | null;
|
|
42
|
+
/** Called when the user clicks retry in the error state */
|
|
43
|
+
onRetry?: () => void;
|
|
38
44
|
/** CSS class name for the root element */
|
|
39
45
|
className?: string;
|
|
40
46
|
/** Inline styles for the root element */
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { StudentProfileProps } from './types';
|
|
2
|
+
export declare function StudentProfile({ student, enrolledCourses, achievements, certificates, stats, showCourses, showAchievements, onCourseClick, onCertificateClick, readOnly, isLoading, error, onRetry, className, style, }: StudentProfileProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StudentProfile section — a student profile overview.
|
|
3
|
+
*
|
|
4
|
+
* Displays student info header, stat cards, enrolled courses list,
|
|
5
|
+
* achievements grid, and certificates list.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* <StudentProfile
|
|
9
|
+
* student={{ uid: "s1", displayName: "Jane Doe", email: "jane@example.com" }}
|
|
10
|
+
* enrolledCourses={courses}
|
|
11
|
+
* achievements={badges}
|
|
12
|
+
* onCourseClick={(uid) => navigate(`/courses/${uid}`)}
|
|
13
|
+
* />
|
|
14
|
+
*/
|
|
15
|
+
export interface StudentProfileProps {
|
|
16
|
+
/** Student information */
|
|
17
|
+
student: StudentInfo;
|
|
18
|
+
/** Enrolled courses */
|
|
19
|
+
enrolledCourses?: EnrolledCourse[];
|
|
20
|
+
/** Earned achievements */
|
|
21
|
+
achievements?: ProfileAchievement[];
|
|
22
|
+
/** Earned certificates */
|
|
23
|
+
certificates?: ProfileCertificate[];
|
|
24
|
+
/** Custom stat cards to display */
|
|
25
|
+
stats?: {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
icon?: React.ReactNode;
|
|
29
|
+
}[];
|
|
30
|
+
/** When false, hides the Enrolled Courses section. @default true */
|
|
31
|
+
showCourses?: boolean;
|
|
32
|
+
/** When false, hides the Achievements section. @default true */
|
|
33
|
+
showAchievements?: boolean;
|
|
34
|
+
/** Called when a course is clicked */
|
|
35
|
+
onCourseClick?: (courseUid: string) => void;
|
|
36
|
+
/** Called when a certificate is clicked */
|
|
37
|
+
onCertificateClick?: (certificateUid: string) => void;
|
|
38
|
+
/** When true, disables interactions */
|
|
39
|
+
readOnly?: boolean;
|
|
40
|
+
/** Render skeleton placeholders instead of content */
|
|
41
|
+
isLoading?: boolean;
|
|
42
|
+
/** Error message — renders an error state with optional retry */
|
|
43
|
+
error?: string | null;
|
|
44
|
+
/** Called when the user clicks retry in the error state */
|
|
45
|
+
onRetry?: () => void;
|
|
46
|
+
/** CSS class name for the root element */
|
|
47
|
+
className?: string;
|
|
48
|
+
/** Inline styles for the root element */
|
|
49
|
+
style?: React.CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
export interface StudentInfo {
|
|
52
|
+
/** Unique identifier */
|
|
53
|
+
uid: string;
|
|
54
|
+
/** Display name */
|
|
55
|
+
displayName: string;
|
|
56
|
+
/** Avatar URL */
|
|
57
|
+
avatarUrl?: string;
|
|
58
|
+
/** Email address */
|
|
59
|
+
email?: string;
|
|
60
|
+
/** Short bio */
|
|
61
|
+
bio?: string;
|
|
62
|
+
/** Join date as ISO string */
|
|
63
|
+
joinedAt?: string;
|
|
64
|
+
/** Role label */
|
|
65
|
+
role?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface EnrolledCourse {
|
|
68
|
+
/** Course UID */
|
|
69
|
+
uid: string;
|
|
70
|
+
/** Course title */
|
|
71
|
+
title: string;
|
|
72
|
+
/** Progress percentage (0-100) */
|
|
73
|
+
progress: number;
|
|
74
|
+
/** Last accessed as ISO string */
|
|
75
|
+
lastAccessedAt?: string;
|
|
76
|
+
}
|
|
77
|
+
export interface ProfileAchievement {
|
|
78
|
+
/** Unique identifier */
|
|
79
|
+
uid: string;
|
|
80
|
+
/** Achievement name */
|
|
81
|
+
name: string;
|
|
82
|
+
/** Achievement description */
|
|
83
|
+
description: string;
|
|
84
|
+
/** Icon URL */
|
|
85
|
+
iconUrl?: string;
|
|
86
|
+
/** Date earned as ISO string */
|
|
87
|
+
earnedAt: string;
|
|
88
|
+
}
|
|
89
|
+
export interface ProfileCertificate {
|
|
90
|
+
/** Unique identifier */
|
|
91
|
+
uid: string;
|
|
92
|
+
/** Course name */
|
|
93
|
+
courseName: string;
|
|
94
|
+
/** Date issued as ISO string */
|
|
95
|
+
issuedAt: string;
|
|
96
|
+
/** Certificate URL */
|
|
97
|
+
certificateUrl?: string;
|
|
98
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SurveyFormProps } from './types';
|
|
2
|
-
export declare function SurveyForm({ title, description, questions, initialAnswers, onSubmit, onAnswerChange, showProgress, requireAll, submitLabel, isSubmitting, readOnly, className, style, }: SurveyFormProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function SurveyForm({ title, description, questions, initialAnswers, onSubmit, onAnswerChange, showProgress, requireAll, submitLabel, isSubmitting, readOnly, isLoading, error, onRetry, className, style, }: SurveyFormProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -37,6 +37,12 @@ export interface SurveyFormProps {
|
|
|
37
37
|
isSubmitting?: boolean;
|
|
38
38
|
/** When true, all inputs are disabled */
|
|
39
39
|
readOnly?: boolean;
|
|
40
|
+
/** Render skeleton placeholders instead of content */
|
|
41
|
+
isLoading?: boolean;
|
|
42
|
+
/** Error message — renders an error state with optional retry */
|
|
43
|
+
error?: string | null;
|
|
44
|
+
/** Called when the user clicks retry in the error state */
|
|
45
|
+
onRetry?: () => void;
|
|
40
46
|
/** CSS class name for the root element */
|
|
41
47
|
className?: string;
|
|
42
48
|
/** Inline styles for the root element */
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SessionAnswer } from '../../questions/types';
|
|
2
|
+
/**
|
|
3
|
+
* Replaces all existing answers for `questionUid` with `rawAnswers`,
|
|
4
|
+
* then invokes an optional change callback with the merged array.
|
|
5
|
+
*/
|
|
6
|
+
export declare function mergeSessionAnswers(prev: SessionAnswer[], questionUid: string, rawAnswers: {
|
|
7
|
+
uid: string;
|
|
8
|
+
content?: string;
|
|
9
|
+
}[], onChange?: (merged: SessionAnswer[]) => void): SessionAnswer[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SectionShellProps {
|
|
3
|
+
isLoading?: boolean;
|
|
4
|
+
error?: string | null;
|
|
5
|
+
onRetry?: () => void;
|
|
6
|
+
/** Skeleton placeholder rendered when `isLoading` is true. */
|
|
7
|
+
skeleton?: ReactNode;
|
|
8
|
+
/** Extra class merged into the loading wrapper (default `"space-y-4"`). */
|
|
9
|
+
loadingClassName?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Shared wrapper that handles loading skeleton and error states
|
|
16
|
+
* so individual sections don't repeat the same early-return blocks.
|
|
17
|
+
*
|
|
18
|
+
* When neither loading nor error, renders children directly (no extra wrapper).
|
|
19
|
+
*/
|
|
20
|
+
export declare function SectionShell({ isLoading, error, onRetry, skeleton, loadingClassName, className, style, children, }: SectionShellProps): import("react/jsx-runtime").JSX.Element;
|