@selfcommunity/react-ui 0.11.0-alpha.60 → 0.11.0-alpha.62
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/lib/cjs/assets/courses/clapping.d.ts +1 -0
- package/lib/cjs/assets/courses/clapping.js +4 -0
- package/lib/cjs/components/BottomNavigation/BottomNavigation.js +17 -2
- package/lib/cjs/components/CategoryAutocomplete/CategoryAutocomplete.js +6 -8
- package/lib/cjs/components/CommentObject/CommentObject.d.ts +5 -0
- package/lib/cjs/components/CommentObject/CommentObject.js +2 -2
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.d.ts +24 -2
- package/lib/cjs/components/CommentObjectReply/CommentObjectReply.js +17 -4
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.d.ts +38 -0
- package/lib/cjs/components/Composer/Content/ContentLesson/ContentLesson.js +67 -0
- package/lib/cjs/components/Composer/Content/ContentLesson/index.d.ts +3 -0
- package/lib/cjs/components/Composer/Content/ContentLesson/index.js +5 -0
- package/lib/cjs/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -2
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.d.ts +9 -3
- package/lib/cjs/components/ComposerIconButton/ComposerIconButton.js +38 -9
- package/lib/cjs/components/Course/Course.d.ts +92 -0
- package/lib/cjs/components/Course/Course.js +185 -0
- package/lib/cjs/components/Course/CreatePlaceholder.d.ts +39 -0
- package/lib/cjs/components/Course/CreatePlaceholder.js +59 -0
- package/lib/cjs/components/Course/Skeleton.d.ts +51 -0
- package/lib/cjs/components/Course/Skeleton.js +77 -0
- package/lib/cjs/components/Course/constants.d.ts +1 -0
- package/lib/cjs/components/Course/constants.js +4 -0
- package/lib/cjs/components/Course/index.d.ts +4 -0
- package/lib/cjs/components/Course/index.js +8 -0
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.d.ts +9 -0
- package/lib/cjs/components/CourseCompletedDialog/CourseCompletedDialog.js +40 -0
- package/lib/cjs/components/CourseCompletedDialog/index.d.ts +3 -0
- package/lib/cjs/components/CourseCompletedDialog/index.js +5 -0
- package/lib/cjs/components/CourseContentMenu/CourseContentMenu.d.ts +25 -0
- package/lib/cjs/components/CourseContentMenu/CourseContentMenu.js +47 -0
- package/lib/cjs/components/CourseContentMenu/constants.d.ts +1 -0
- package/lib/cjs/components/CourseContentMenu/constants.js +4 -0
- package/lib/cjs/components/CourseContentMenu/index.d.ts +3 -0
- package/lib/cjs/components/CourseContentMenu/index.js +5 -0
- package/lib/cjs/components/CourseDashboard/Header/Skeleton.d.ts +1 -0
- package/lib/cjs/components/CourseDashboard/Header/Skeleton.js +16 -0
- package/lib/cjs/components/CourseDashboard/Header.d.ts +9 -0
- package/lib/cjs/components/CourseDashboard/Header.js +44 -0
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.d.ts +8 -0
- package/lib/cjs/components/CourseDashboard/Student/ActionButton.js +16 -0
- package/lib/cjs/components/CourseDashboard/Student/Skeleton.d.ts +1 -0
- package/lib/cjs/components/CourseDashboard/Student/Skeleton.js +30 -0
- package/lib/cjs/components/CourseDashboard/Student.d.ts +11 -0
- package/lib/cjs/components/CourseDashboard/Student.js +203 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.d.ts +9 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Comments.js +108 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Info.d.ts +11 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Info.js +19 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Skeleton.d.ts +1 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Skeleton.js +25 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Students.d.ts +10 -0
- package/lib/cjs/components/CourseDashboard/Teacher/Students.js +71 -0
- package/lib/cjs/components/CourseDashboard/Teacher.d.ts +11 -0
- package/lib/cjs/components/CourseDashboard/Teacher.js +62 -0
- package/lib/cjs/components/CourseDashboard/constants.d.ts +1 -0
- package/lib/cjs/components/CourseDashboard/constants.js +4 -0
- package/lib/cjs/components/CourseDashboard/index.d.ts +11 -0
- package/lib/cjs/components/CourseDashboard/index.js +11 -0
- package/lib/cjs/components/CourseDashboard/types.d.ts +8 -0
- package/lib/cjs/components/CourseDashboard/types.js +13 -0
- package/lib/cjs/components/CourseForm/CourseForm.d.ts +74 -0
- package/lib/cjs/components/CourseForm/CourseForm.js +273 -0
- package/lib/cjs/components/CourseForm/Dialog.d.ts +8 -0
- package/lib/cjs/components/CourseForm/Dialog.js +19 -0
- package/lib/cjs/components/CourseForm/Edit.d.ts +24 -0
- package/lib/cjs/components/CourseForm/Edit.js +53 -0
- package/lib/cjs/components/CourseForm/Skeleton.d.ts +1 -0
- package/lib/cjs/components/CourseForm/Skeleton.js +17 -0
- package/lib/cjs/components/CourseForm/UploadCourseCover.d.ts +45 -0
- package/lib/cjs/components/CourseForm/UploadCourseCover.js +94 -0
- package/lib/cjs/components/CourseForm/constants.d.ts +1 -0
- package/lib/cjs/components/CourseForm/constants.js +4 -0
- package/lib/cjs/components/CourseForm/index.d.ts +4 -0
- package/lib/cjs/components/CourseForm/index.js +8 -0
- package/lib/cjs/components/CourseFormDialog/CourseFormDialog.d.ts +48 -0
- package/lib/cjs/components/CourseFormDialog/CourseFormDialog.js +67 -0
- package/lib/cjs/components/CourseFormDialog/constants.d.ts +1 -0
- package/lib/cjs/components/CourseFormDialog/constants.js +4 -0
- package/lib/cjs/components/CourseFormDialog/index.d.ts +3 -0
- package/lib/cjs/components/CourseFormDialog/index.js +5 -0
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.d.ts +56 -0
- package/lib/cjs/components/CourseJoinButton/CourseJoinButton.js +148 -0
- package/lib/cjs/components/CourseJoinButton/index.d.ts +3 -0
- package/lib/cjs/components/CourseJoinButton/index.js +5 -0
- package/lib/cjs/components/CourseParticipantsButton/CourseParticipantsButton.d.ts +53 -0
- package/lib/cjs/components/CourseParticipantsButton/CourseParticipantsButton.js +150 -0
- package/lib/cjs/components/CourseParticipantsButton/index.d.ts +3 -0
- package/lib/cjs/components/CourseParticipantsButton/index.js +5 -0
- package/lib/cjs/components/Courses/Courses.d.ts +100 -0
- package/lib/cjs/components/Courses/Courses.js +237 -0
- package/lib/cjs/components/Courses/Skeleton.d.ts +54 -0
- package/lib/cjs/components/Courses/Skeleton.js +45 -0
- package/lib/cjs/components/Courses/constants.d.ts +1 -0
- package/lib/cjs/components/Courses/constants.js +4 -0
- package/lib/cjs/components/Courses/index.d.ts +4 -0
- package/lib/cjs/components/Courses/index.js +8 -0
- package/lib/cjs/components/Courses/prefetchedCourses.d.ts +81 -0
- package/lib/cjs/components/Courses/prefetchedCourses.js +186 -0
- package/lib/cjs/components/CreateCourseButton/CreateCourseButton.d.ts +38 -0
- package/lib/cjs/components/CreateCourseButton/CreateCourseButton.js +81 -0
- package/lib/cjs/components/CreateCourseButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateCourseButton/index.js +5 -0
- package/lib/cjs/components/EditCourse/Customize.d.ts +9 -0
- package/lib/cjs/components/EditCourse/Customize.js +31 -0
- package/lib/cjs/components/EditCourse/EditCourse.d.ts +13 -0
- package/lib/cjs/components/EditCourse/EditCourse.js +110 -0
- package/lib/cjs/components/EditCourse/Lessons/AddButton.d.ts +9 -0
- package/lib/cjs/components/EditCourse/Lessons/AddButton.js +29 -0
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.d.ts +13 -0
- package/lib/cjs/components/EditCourse/Lessons/ChangeLessonStatus.js +92 -0
- package/lib/cjs/components/EditCourse/Lessons/FieldName.d.ts +15 -0
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +83 -0
- package/lib/cjs/components/EditCourse/Lessons/LessonRow.d.ts +15 -0
- package/lib/cjs/components/EditCourse/Lessons/LessonRow.js +68 -0
- package/lib/cjs/components/EditCourse/Lessons/SectionRow.d.ts +14 -0
- package/lib/cjs/components/EditCourse/Lessons/SectionRow.js +158 -0
- package/lib/cjs/components/EditCourse/Lessons/Skeleton.d.ts +1 -0
- package/lib/cjs/components/EditCourse/Lessons/Skeleton.js +20 -0
- package/lib/cjs/components/EditCourse/Lessons.d.ts +11 -0
- package/lib/cjs/components/EditCourse/Lessons.js +196 -0
- package/lib/cjs/components/EditCourse/MenuRow.d.ts +9 -0
- package/lib/cjs/components/EditCourse/MenuRow.js +25 -0
- package/lib/cjs/components/EditCourse/Options/Skeleton.d.ts +1 -0
- package/lib/cjs/components/EditCourse/Options/Skeleton.js +15 -0
- package/lib/cjs/components/EditCourse/Options/SwitchForm.d.ts +11 -0
- package/lib/cjs/components/EditCourse/Options/SwitchForm.js +20 -0
- package/lib/cjs/components/EditCourse/Options.d.ts +9 -0
- package/lib/cjs/components/EditCourse/Options.js +96 -0
- package/lib/cjs/components/EditCourse/Requests.d.ts +12 -0
- package/lib/cjs/components/EditCourse/Requests.js +97 -0
- package/lib/cjs/components/EditCourse/Skeleton.d.ts +8 -0
- package/lib/cjs/components/EditCourse/Skeleton.js +28 -0
- package/lib/cjs/components/EditCourse/Status.d.ts +9 -0
- package/lib/cjs/components/EditCourse/Status.js +33 -0
- package/lib/cjs/components/EditCourse/Users/Skeleton.d.ts +1 -0
- package/lib/cjs/components/EditCourse/Users/Skeleton.js +15 -0
- package/lib/cjs/components/EditCourse/Users.d.ts +11 -0
- package/lib/cjs/components/EditCourse/Users.js +140 -0
- package/lib/cjs/components/EditCourse/constants.d.ts +1 -0
- package/lib/cjs/components/EditCourse/constants.js +4 -0
- package/lib/cjs/components/EditCourse/hooks.d.ts +3 -0
- package/lib/cjs/components/EditCourse/hooks.js +22 -0
- package/lib/cjs/components/EditCourse/index.d.ts +4 -0
- package/lib/cjs/components/EditCourse/index.js +8 -0
- package/lib/cjs/components/EditCourse/types.d.ts +29 -0
- package/lib/cjs/components/EditCourse/types.js +19 -0
- package/lib/cjs/components/Editor/Editor.d.ts +37 -0
- package/lib/cjs/components/Editor/Editor.js +6 -3
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.d.ts +3 -1
- package/lib/cjs/components/Editor/plugins/EmojiPlugin.js +4 -10
- package/lib/cjs/components/Editor/plugins/MediaPlugin.d.ts +14 -0
- package/lib/cjs/components/Editor/plugins/MediaPlugin.js +121 -0
- package/lib/cjs/components/Editor/plugins/ToolbarPlugin.d.ts +5 -0
- package/lib/cjs/components/Editor/plugins/ToolbarPlugin.js +3 -2
- package/lib/cjs/components/Editor/plugins/index.d.ts +2 -1
- package/lib/cjs/components/Editor/plugins/index.js +3 -1
- package/lib/cjs/components/EventForm/EventForm.js +1 -1
- package/lib/cjs/components/LessonAppbar/LessonAppbar.d.ts +42 -0
- package/lib/cjs/components/LessonAppbar/LessonAppbar.js +34 -0
- package/lib/cjs/components/LessonAppbar/constants.d.ts +1 -0
- package/lib/cjs/components/LessonAppbar/constants.js +4 -0
- package/lib/cjs/components/LessonAppbar/index.d.ts +3 -0
- package/lib/cjs/components/LessonAppbar/index.js +5 -0
- package/lib/cjs/components/LessonCommentObject/LessonCommentObject.d.ts +94 -0
- package/lib/cjs/components/LessonCommentObject/LessonCommentObject.js +202 -0
- package/lib/cjs/components/LessonCommentObject/Skeleton.d.ts +21 -0
- package/lib/cjs/components/LessonCommentObject/Skeleton.js +46 -0
- package/lib/cjs/components/LessonCommentObject/constants.d.ts +1 -0
- package/lib/cjs/components/LessonCommentObject/constants.js +4 -0
- package/lib/cjs/components/LessonCommentObject/index.d.ts +4 -0
- package/lib/cjs/components/LessonCommentObject/index.js +8 -0
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.d.ts +76 -0
- package/lib/cjs/components/LessonCommentObjects/LessonCommentObjects.js +185 -0
- package/lib/cjs/components/LessonCommentObjects/Skeleton.d.ts +23 -0
- package/lib/cjs/components/LessonCommentObjects/Skeleton.js +40 -0
- package/lib/cjs/components/LessonCommentObjects/constants.d.ts +1 -0
- package/lib/cjs/components/LessonCommentObjects/constants.js +4 -0
- package/lib/cjs/components/LessonCommentObjects/index.d.ts +4 -0
- package/lib/cjs/components/LessonCommentObjects/index.js +8 -0
- package/lib/cjs/components/LessonDrawer/LessonDrawer.d.ts +50 -0
- package/lib/cjs/components/LessonDrawer/LessonDrawer.js +37 -0
- package/lib/cjs/components/LessonDrawer/constants.d.ts +1 -0
- package/lib/cjs/components/LessonDrawer/constants.js +4 -0
- package/lib/cjs/components/LessonDrawer/index.d.ts +3 -0
- package/lib/cjs/components/LessonDrawer/index.js +5 -0
- package/lib/cjs/components/LessonEditForm/LessonEditForm.d.ts +24 -0
- package/lib/cjs/components/LessonEditForm/LessonEditForm.js +45 -0
- package/lib/cjs/components/LessonEditForm/constants.d.ts +1 -0
- package/lib/cjs/components/LessonEditForm/constants.js +4 -0
- package/lib/cjs/components/LessonEditForm/index.d.ts +3 -0
- package/lib/cjs/components/LessonEditForm/index.js +5 -0
- package/lib/cjs/components/LessonObject/LessonObject.d.ts +40 -0
- package/lib/cjs/components/LessonObject/LessonObject.js +70 -0
- package/lib/cjs/components/LessonObject/constants.d.ts +1 -0
- package/lib/cjs/components/LessonObject/constants.js +4 -0
- package/lib/cjs/components/LessonObject/index.d.ts +3 -0
- package/lib/cjs/components/LessonObject/index.js +5 -0
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.d.ts +26 -0
- package/lib/cjs/components/LessonReleaseMenu/LessonReleaseMenu.js +172 -0
- package/lib/cjs/components/LessonReleaseMenu/constants.d.ts +5 -0
- package/lib/cjs/components/LessonReleaseMenu/constants.js +9 -0
- package/lib/cjs/components/LessonReleaseMenu/index.d.ts +3 -0
- package/lib/cjs/components/LessonReleaseMenu/index.js +5 -0
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerContent.js +7 -5
- package/lib/cjs/components/NavigationToolbar/NavigationToolbar.js +12 -1
- package/lib/cjs/components/Notification/Course/Course.d.ts +15 -0
- package/lib/cjs/components/Notification/Course/Course.js +89 -0
- package/lib/cjs/components/Notification/Course/index.d.ts +3 -0
- package/lib/cjs/components/Notification/Course/index.js +5 -0
- package/lib/cjs/components/Notification/Course/utils.d.ts +5 -0
- package/lib/cjs/components/Notification/Course/utils.js +44 -0
- package/lib/cjs/components/Notification/Notification.js +9 -0
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +9 -0
- package/lib/cjs/components/TagAutocomplete/TagAutocomplete.js +2 -2
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +9 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/Skeleton.d.ts +21 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/Skeleton.js +43 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/UserCreatedCoursesWidget.d.ts +63 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/UserCreatedCoursesWidget.js +154 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/constants.d.ts +1 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/constants.js +4 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/index.d.ts +4 -0
- package/lib/cjs/components/UserCreatedCoursesWidget/index.js +8 -0
- package/lib/cjs/constants/Course.d.ts +6 -0
- package/lib/cjs/constants/Course.js +10 -0
- package/lib/cjs/constants/PubSub.d.ts +14 -0
- package/lib/cjs/constants/PubSub.js +16 -1
- package/lib/cjs/index.d.ts +23 -2
- package/lib/cjs/index.js +60 -5
- package/lib/cjs/shared/AccordionLessons/AccordionLessons.d.ts +8 -0
- package/lib/cjs/shared/AccordionLessons/AccordionLessons.js +65 -0
- package/lib/cjs/shared/AccordionLessons/Skeleton.d.ts +1 -0
- package/lib/cjs/shared/AccordionLessons/Skeleton.js +21 -0
- package/lib/cjs/shared/AccordionLessons/constants.d.ts +1 -0
- package/lib/cjs/shared/AccordionLessons/constants.js +4 -0
- package/lib/cjs/shared/AccordionLessons/index.d.ts +4 -0
- package/lib/cjs/shared/AccordionLessons/index.js +8 -0
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.d.ts +29 -0
- package/lib/cjs/shared/AddUsersButton/AddUsersButton.js +136 -0
- package/lib/cjs/shared/AddUsersButton/index.d.ts +3 -0
- package/lib/cjs/shared/AddUsersButton/index.js +5 -0
- package/lib/cjs/shared/CourseTypePopover/CourseTypePopover.d.ts +9 -0
- package/lib/cjs/shared/CourseTypePopover/CourseTypePopover.js +48 -0
- package/lib/cjs/shared/CourseTypePopover/index.d.ts +3 -0
- package/lib/cjs/shared/CourseTypePopover/index.js +5 -0
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.d.ts +9 -0
- package/lib/cjs/shared/CourseUsersTable/ChangeUsersStatus.js +58 -0
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.d.ts +21 -0
- package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.js +155 -0
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.d.ts +10 -0
- package/lib/cjs/shared/CourseUsersTable/RemoveButton.js +51 -0
- package/lib/cjs/shared/CourseUsersTable/RequestButton.d.ts +10 -0
- package/lib/cjs/shared/CourseUsersTable/RequestButton.js +79 -0
- package/lib/cjs/shared/CourseUsersTable/RowSkeleton.d.ts +8 -0
- package/lib/cjs/shared/CourseUsersTable/RowSkeleton.js +14 -0
- package/lib/cjs/shared/CourseUsersTable/SeeProgressButton.d.ts +9 -0
- package/lib/cjs/shared/CourseUsersTable/SeeProgressButton.js +56 -0
- package/lib/cjs/shared/CourseUsersTable/Skeleton.d.ts +1 -0
- package/lib/cjs/shared/CourseUsersTable/Skeleton.js +19 -0
- package/lib/cjs/shared/CourseUsersTable/constants.d.ts +1 -0
- package/lib/cjs/shared/CourseUsersTable/constants.js +4 -0
- package/lib/cjs/shared/CourseUsersTable/index.d.ts +4 -0
- package/lib/cjs/shared/CourseUsersTable/index.js +8 -0
- package/lib/cjs/shared/DateTimeAgo/index.d.ts +1 -1
- package/lib/cjs/shared/EmptyStatus/EmptyStatus.d.ts +11 -0
- package/lib/cjs/shared/EmptyStatus/EmptyStatus.js +26 -0
- package/lib/cjs/shared/EmptyStatus/index.d.ts +3 -0
- package/lib/cjs/shared/EmptyStatus/index.js +5 -0
- package/lib/cjs/shared/LessonCommentActionsMenu/index.d.ts +41 -0
- package/lib/cjs/shared/LessonCommentActionsMenu/index.js +197 -0
- package/lib/cjs/shared/LessonFilePreview/index.d.ts +12 -0
- package/lib/cjs/shared/LessonFilePreview/index.js +29 -0
- package/lib/cjs/shared/Media/Link/UrlTextField/index.js +2 -3
- package/lib/cjs/types/course.d.ts +40 -0
- package/lib/cjs/types/course.js +33 -0
- package/lib/cjs/types/index.d.ts +2 -1
- package/lib/cjs/types/index.js +6 -1
- package/lib/cjs/utils/course.d.ts +14 -0
- package/lib/cjs/utils/course.js +39 -0
- package/lib/esm/assets/courses/clapping.d.ts +1 -0
- package/lib/esm/assets/courses/clapping.js +1 -0
- package/lib/esm/components/BottomNavigation/BottomNavigation.js +17 -2
- package/lib/esm/components/CategoryAutocomplete/CategoryAutocomplete.js +6 -8
- package/lib/esm/components/CommentObject/CommentObject.d.ts +5 -0
- package/lib/esm/components/CommentObject/CommentObject.js +2 -2
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.d.ts +24 -2
- package/lib/esm/components/CommentObjectReply/CommentObjectReply.js +18 -5
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.d.ts +38 -0
- package/lib/esm/components/Composer/Content/ContentLesson/ContentLesson.js +64 -0
- package/lib/esm/components/Composer/Content/ContentLesson/index.d.ts +3 -0
- package/lib/esm/components/Composer/Content/ContentLesson/index.js +2 -0
- package/lib/esm/components/Composer/Layer/AudienceLayer/AudienceLayer.js +2 -2
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.d.ts +9 -3
- package/lib/esm/components/ComposerIconButton/ComposerIconButton.js +38 -9
- package/lib/esm/components/Course/Course.d.ts +92 -0
- package/lib/esm/components/Course/Course.js +182 -0
- package/lib/esm/components/Course/CreatePlaceholder.d.ts +39 -0
- package/lib/esm/components/Course/CreatePlaceholder.js +56 -0
- package/lib/esm/components/Course/Skeleton.d.ts +51 -0
- package/lib/esm/components/Course/Skeleton.js +74 -0
- package/lib/esm/components/Course/constants.d.ts +1 -0
- package/lib/esm/components/Course/constants.js +1 -0
- package/lib/esm/components/Course/index.d.ts +4 -0
- package/lib/esm/components/Course/index.js +4 -0
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.d.ts +9 -0
- package/lib/esm/components/CourseCompletedDialog/CourseCompletedDialog.js +37 -0
- package/lib/esm/components/CourseCompletedDialog/index.d.ts +3 -0
- package/lib/esm/components/CourseCompletedDialog/index.js +2 -0
- package/lib/esm/components/CourseContentMenu/CourseContentMenu.d.ts +25 -0
- package/lib/esm/components/CourseContentMenu/CourseContentMenu.js +44 -0
- package/lib/esm/components/CourseContentMenu/constants.d.ts +1 -0
- package/lib/esm/components/CourseContentMenu/constants.js +1 -0
- package/lib/esm/components/CourseContentMenu/index.d.ts +3 -0
- package/lib/esm/components/CourseContentMenu/index.js +2 -0
- package/lib/esm/components/CourseDashboard/Header/Skeleton.d.ts +1 -0
- package/lib/esm/components/CourseDashboard/Header/Skeleton.js +13 -0
- package/lib/esm/components/CourseDashboard/Header.d.ts +9 -0
- package/lib/esm/components/CourseDashboard/Header.js +41 -0
- package/lib/esm/components/CourseDashboard/Student/ActionButton.d.ts +8 -0
- package/lib/esm/components/CourseDashboard/Student/ActionButton.js +13 -0
- package/lib/esm/components/CourseDashboard/Student/Skeleton.d.ts +1 -0
- package/lib/esm/components/CourseDashboard/Student/Skeleton.js +26 -0
- package/lib/esm/components/CourseDashboard/Student.d.ts +11 -0
- package/lib/esm/components/CourseDashboard/Student.js +201 -0
- package/lib/esm/components/CourseDashboard/Teacher/Comments.d.ts +9 -0
- package/lib/esm/components/CourseDashboard/Teacher/Comments.js +106 -0
- package/lib/esm/components/CourseDashboard/Teacher/Info.d.ts +11 -0
- package/lib/esm/components/CourseDashboard/Teacher/Info.js +16 -0
- package/lib/esm/components/CourseDashboard/Teacher/Skeleton.d.ts +1 -0
- package/lib/esm/components/CourseDashboard/Teacher/Skeleton.js +21 -0
- package/lib/esm/components/CourseDashboard/Teacher/Students.d.ts +10 -0
- package/lib/esm/components/CourseDashboard/Teacher/Students.js +68 -0
- package/lib/esm/components/CourseDashboard/Teacher.d.ts +11 -0
- package/lib/esm/components/CourseDashboard/Teacher.js +60 -0
- package/lib/esm/components/CourseDashboard/constants.d.ts +1 -0
- package/lib/esm/components/CourseDashboard/constants.js +1 -0
- package/lib/esm/components/CourseDashboard/index.d.ts +11 -0
- package/lib/esm/components/CourseDashboard/index.js +6 -0
- package/lib/esm/components/CourseDashboard/types.d.ts +8 -0
- package/lib/esm/components/CourseDashboard/types.js +10 -0
- package/lib/esm/components/CourseForm/CourseForm.d.ts +74 -0
- package/lib/esm/components/CourseForm/CourseForm.js +270 -0
- package/lib/esm/components/CourseForm/Dialog.d.ts +8 -0
- package/lib/esm/components/CourseForm/Dialog.js +16 -0
- package/lib/esm/components/CourseForm/Edit.d.ts +24 -0
- package/lib/esm/components/CourseForm/Edit.js +50 -0
- package/lib/esm/components/CourseForm/Skeleton.d.ts +1 -0
- package/lib/esm/components/CourseForm/Skeleton.js +14 -0
- package/lib/esm/components/CourseForm/UploadCourseCover.d.ts +45 -0
- package/lib/esm/components/CourseForm/UploadCourseCover.js +91 -0
- package/lib/esm/components/CourseForm/constants.d.ts +1 -0
- package/lib/esm/components/CourseForm/constants.js +1 -0
- package/lib/esm/components/CourseForm/index.d.ts +4 -0
- package/lib/esm/components/CourseForm/index.js +4 -0
- package/lib/esm/components/CourseFormDialog/CourseFormDialog.d.ts +48 -0
- package/lib/esm/components/CourseFormDialog/CourseFormDialog.js +64 -0
- package/lib/esm/components/CourseFormDialog/constants.d.ts +1 -0
- package/lib/esm/components/CourseFormDialog/constants.js +1 -0
- package/lib/esm/components/CourseFormDialog/index.d.ts +3 -0
- package/lib/esm/components/CourseFormDialog/index.js +2 -0
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.d.ts +56 -0
- package/lib/esm/components/CourseJoinButton/CourseJoinButton.js +145 -0
- package/lib/esm/components/CourseJoinButton/index.d.ts +3 -0
- package/lib/esm/components/CourseJoinButton/index.js +2 -0
- package/lib/esm/components/CourseParticipantsButton/CourseParticipantsButton.d.ts +53 -0
- package/lib/esm/components/CourseParticipantsButton/CourseParticipantsButton.js +147 -0
- package/lib/esm/components/CourseParticipantsButton/index.d.ts +3 -0
- package/lib/esm/components/CourseParticipantsButton/index.js +2 -0
- package/lib/esm/components/Courses/Courses.d.ts +100 -0
- package/lib/esm/components/Courses/Courses.js +233 -0
- package/lib/esm/components/Courses/Skeleton.d.ts +54 -0
- package/lib/esm/components/Courses/Skeleton.js +42 -0
- package/lib/esm/components/Courses/constants.d.ts +1 -0
- package/lib/esm/components/Courses/constants.js +1 -0
- package/lib/esm/components/Courses/index.d.ts +4 -0
- package/lib/esm/components/Courses/index.js +4 -0
- package/lib/esm/components/Courses/prefetchedCourses.d.ts +81 -0
- package/lib/esm/components/Courses/prefetchedCourses.js +183 -0
- package/lib/esm/components/CreateCourseButton/CreateCourseButton.d.ts +38 -0
- package/lib/esm/components/CreateCourseButton/CreateCourseButton.js +78 -0
- package/lib/esm/components/CreateCourseButton/index.d.ts +3 -0
- package/lib/esm/components/CreateCourseButton/index.js +2 -0
- package/lib/esm/components/EditCourse/Customize.d.ts +9 -0
- package/lib/esm/components/EditCourse/Customize.js +28 -0
- package/lib/esm/components/EditCourse/EditCourse.d.ts +13 -0
- package/lib/esm/components/EditCourse/EditCourse.js +107 -0
- package/lib/esm/components/EditCourse/Lessons/AddButton.d.ts +9 -0
- package/lib/esm/components/EditCourse/Lessons/AddButton.js +27 -0
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.d.ts +13 -0
- package/lib/esm/components/EditCourse/Lessons/ChangeLessonStatus.js +89 -0
- package/lib/esm/components/EditCourse/Lessons/FieldName.d.ts +15 -0
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +80 -0
- package/lib/esm/components/EditCourse/Lessons/LessonRow.d.ts +15 -0
- package/lib/esm/components/EditCourse/Lessons/LessonRow.js +65 -0
- package/lib/esm/components/EditCourse/Lessons/SectionRow.d.ts +14 -0
- package/lib/esm/components/EditCourse/Lessons/SectionRow.js +155 -0
- package/lib/esm/components/EditCourse/Lessons/Skeleton.d.ts +1 -0
- package/lib/esm/components/EditCourse/Lessons/Skeleton.js +17 -0
- package/lib/esm/components/EditCourse/Lessons.d.ts +11 -0
- package/lib/esm/components/EditCourse/Lessons.js +193 -0
- package/lib/esm/components/EditCourse/MenuRow.d.ts +9 -0
- package/lib/esm/components/EditCourse/MenuRow.js +22 -0
- package/lib/esm/components/EditCourse/Options/Skeleton.d.ts +1 -0
- package/lib/esm/components/EditCourse/Options/Skeleton.js +12 -0
- package/lib/esm/components/EditCourse/Options/SwitchForm.d.ts +11 -0
- package/lib/esm/components/EditCourse/Options/SwitchForm.js +18 -0
- package/lib/esm/components/EditCourse/Options.d.ts +9 -0
- package/lib/esm/components/EditCourse/Options.js +93 -0
- package/lib/esm/components/EditCourse/Requests.d.ts +12 -0
- package/lib/esm/components/EditCourse/Requests.js +94 -0
- package/lib/esm/components/EditCourse/Skeleton.d.ts +8 -0
- package/lib/esm/components/EditCourse/Skeleton.js +25 -0
- package/lib/esm/components/EditCourse/Status.d.ts +9 -0
- package/lib/esm/components/EditCourse/Status.js +29 -0
- package/lib/esm/components/EditCourse/Users/Skeleton.d.ts +1 -0
- package/lib/esm/components/EditCourse/Users/Skeleton.js +12 -0
- package/lib/esm/components/EditCourse/Users.d.ts +11 -0
- package/lib/esm/components/EditCourse/Users.js +137 -0
- package/lib/esm/components/EditCourse/constants.d.ts +1 -0
- package/lib/esm/components/EditCourse/constants.js +1 -0
- package/lib/esm/components/EditCourse/hooks.d.ts +3 -0
- package/lib/esm/components/EditCourse/hooks.js +17 -0
- package/lib/esm/components/EditCourse/index.d.ts +4 -0
- package/lib/esm/components/EditCourse/index.js +4 -0
- package/lib/esm/components/EditCourse/types.d.ts +29 -0
- package/lib/esm/components/EditCourse/types.js +16 -0
- package/lib/esm/components/Editor/Editor.d.ts +37 -0
- package/lib/esm/components/Editor/Editor.js +7 -4
- package/lib/esm/components/Editor/plugins/EmojiPlugin.d.ts +3 -1
- package/lib/esm/components/Editor/plugins/EmojiPlugin.js +4 -10
- package/lib/esm/components/Editor/plugins/MediaPlugin.d.ts +14 -0
- package/lib/esm/components/Editor/plugins/MediaPlugin.js +117 -0
- package/lib/esm/components/Editor/plugins/ToolbarPlugin.d.ts +5 -0
- package/lib/esm/components/Editor/plugins/ToolbarPlugin.js +3 -2
- package/lib/esm/components/Editor/plugins/index.d.ts +2 -1
- package/lib/esm/components/Editor/plugins/index.js +2 -1
- package/lib/esm/components/EventForm/EventForm.js +1 -1
- package/lib/esm/components/LessonAppbar/LessonAppbar.d.ts +42 -0
- package/lib/esm/components/LessonAppbar/LessonAppbar.js +31 -0
- package/lib/esm/components/LessonAppbar/constants.d.ts +1 -0
- package/lib/esm/components/LessonAppbar/constants.js +1 -0
- package/lib/esm/components/LessonAppbar/index.d.ts +3 -0
- package/lib/esm/components/LessonAppbar/index.js +2 -0
- package/lib/esm/components/LessonCommentObject/LessonCommentObject.d.ts +94 -0
- package/lib/esm/components/LessonCommentObject/LessonCommentObject.js +199 -0
- package/lib/esm/components/LessonCommentObject/Skeleton.d.ts +21 -0
- package/lib/esm/components/LessonCommentObject/Skeleton.js +43 -0
- package/lib/esm/components/LessonCommentObject/constants.d.ts +1 -0
- package/lib/esm/components/LessonCommentObject/constants.js +1 -0
- package/lib/esm/components/LessonCommentObject/index.d.ts +4 -0
- package/lib/esm/components/LessonCommentObject/index.js +4 -0
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.d.ts +76 -0
- package/lib/esm/components/LessonCommentObjects/LessonCommentObjects.js +182 -0
- package/lib/esm/components/LessonCommentObjects/Skeleton.d.ts +23 -0
- package/lib/esm/components/LessonCommentObjects/Skeleton.js +37 -0
- package/lib/esm/components/LessonCommentObjects/constants.d.ts +1 -0
- package/lib/esm/components/LessonCommentObjects/constants.js +1 -0
- package/lib/esm/components/LessonCommentObjects/index.d.ts +4 -0
- package/lib/esm/components/LessonCommentObjects/index.js +4 -0
- package/lib/esm/components/LessonDrawer/LessonDrawer.d.ts +50 -0
- package/lib/esm/components/LessonDrawer/LessonDrawer.js +34 -0
- package/lib/esm/components/LessonDrawer/constants.d.ts +1 -0
- package/lib/esm/components/LessonDrawer/constants.js +1 -0
- package/lib/esm/components/LessonDrawer/index.d.ts +3 -0
- package/lib/esm/components/LessonDrawer/index.js +2 -0
- package/lib/esm/components/LessonEditForm/LessonEditForm.d.ts +24 -0
- package/lib/esm/components/LessonEditForm/LessonEditForm.js +42 -0
- package/lib/esm/components/LessonEditForm/constants.d.ts +1 -0
- package/lib/esm/components/LessonEditForm/constants.js +1 -0
- package/lib/esm/components/LessonEditForm/index.d.ts +3 -0
- package/lib/esm/components/LessonEditForm/index.js +2 -0
- package/lib/esm/components/LessonObject/LessonObject.d.ts +40 -0
- package/lib/esm/components/LessonObject/LessonObject.js +67 -0
- package/lib/esm/components/LessonObject/constants.d.ts +1 -0
- package/lib/esm/components/LessonObject/constants.js +1 -0
- package/lib/esm/components/LessonObject/index.d.ts +3 -0
- package/lib/esm/components/LessonObject/index.js +2 -0
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.d.ts +26 -0
- package/lib/esm/components/LessonReleaseMenu/LessonReleaseMenu.js +169 -0
- package/lib/esm/components/LessonReleaseMenu/constants.d.ts +5 -0
- package/lib/esm/components/LessonReleaseMenu/constants.js +6 -0
- package/lib/esm/components/LessonReleaseMenu/index.d.ts +3 -0
- package/lib/esm/components/LessonReleaseMenu/index.js +2 -0
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerContent.js +9 -7
- package/lib/esm/components/NavigationToolbar/NavigationToolbar.js +12 -1
- package/lib/esm/components/Notification/Course/Course.d.ts +15 -0
- package/lib/esm/components/Notification/Course/Course.js +86 -0
- package/lib/esm/components/Notification/Course/index.d.ts +3 -0
- package/lib/esm/components/Notification/Course/index.js +2 -0
- package/lib/esm/components/Notification/Course/utils.d.ts +5 -0
- package/lib/esm/components/Notification/Course/utils.js +39 -0
- package/lib/esm/components/Notification/Notification.js +9 -0
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +9 -0
- package/lib/esm/components/TagAutocomplete/TagAutocomplete.js +2 -2
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +9 -0
- package/lib/esm/components/UserCreatedCoursesWidget/Skeleton.d.ts +21 -0
- package/lib/esm/components/UserCreatedCoursesWidget/Skeleton.js +39 -0
- package/lib/esm/components/UserCreatedCoursesWidget/UserCreatedCoursesWidget.d.ts +63 -0
- package/lib/esm/components/UserCreatedCoursesWidget/UserCreatedCoursesWidget.js +151 -0
- package/lib/esm/components/UserCreatedCoursesWidget/constants.d.ts +1 -0
- package/lib/esm/components/UserCreatedCoursesWidget/constants.js +1 -0
- package/lib/esm/components/UserCreatedCoursesWidget/index.d.ts +4 -0
- package/lib/esm/components/UserCreatedCoursesWidget/index.js +4 -0
- package/lib/esm/constants/Course.d.ts +6 -0
- package/lib/esm/constants/Course.js +7 -0
- package/lib/esm/constants/PubSub.d.ts +14 -0
- package/lib/esm/constants/PubSub.js +15 -0
- package/lib/esm/index.d.ts +23 -2
- package/lib/esm/index.js +26 -5
- package/lib/esm/shared/AccordionLessons/AccordionLessons.d.ts +8 -0
- package/lib/esm/shared/AccordionLessons/AccordionLessons.js +61 -0
- package/lib/esm/shared/AccordionLessons/Skeleton.d.ts +1 -0
- package/lib/esm/shared/AccordionLessons/Skeleton.js +18 -0
- package/lib/esm/shared/AccordionLessons/constants.d.ts +1 -0
- package/lib/esm/shared/AccordionLessons/constants.js +1 -0
- package/lib/esm/shared/AccordionLessons/index.d.ts +4 -0
- package/lib/esm/shared/AccordionLessons/index.js +4 -0
- package/lib/esm/shared/AddUsersButton/AddUsersButton.d.ts +29 -0
- package/lib/esm/shared/AddUsersButton/AddUsersButton.js +134 -0
- package/lib/esm/shared/AddUsersButton/index.d.ts +3 -0
- package/lib/esm/shared/AddUsersButton/index.js +2 -0
- package/lib/esm/shared/CourseTypePopover/CourseTypePopover.d.ts +9 -0
- package/lib/esm/shared/CourseTypePopover/CourseTypePopover.js +45 -0
- package/lib/esm/shared/CourseTypePopover/index.d.ts +3 -0
- package/lib/esm/shared/CourseTypePopover/index.js +2 -0
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.d.ts +9 -0
- package/lib/esm/shared/CourseUsersTable/ChangeUsersStatus.js +56 -0
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.d.ts +21 -0
- package/lib/esm/shared/CourseUsersTable/CourseUsersTable.js +152 -0
- package/lib/esm/shared/CourseUsersTable/RemoveButton.d.ts +10 -0
- package/lib/esm/shared/CourseUsersTable/RemoveButton.js +48 -0
- package/lib/esm/shared/CourseUsersTable/RequestButton.d.ts +10 -0
- package/lib/esm/shared/CourseUsersTable/RequestButton.js +76 -0
- package/lib/esm/shared/CourseUsersTable/RowSkeleton.d.ts +8 -0
- package/lib/esm/shared/CourseUsersTable/RowSkeleton.js +11 -0
- package/lib/esm/shared/CourseUsersTable/SeeProgressButton.d.ts +9 -0
- package/lib/esm/shared/CourseUsersTable/SeeProgressButton.js +53 -0
- package/lib/esm/shared/CourseUsersTable/Skeleton.d.ts +1 -0
- package/lib/esm/shared/CourseUsersTable/Skeleton.js +15 -0
- package/lib/esm/shared/CourseUsersTable/constants.d.ts +1 -0
- package/lib/esm/shared/CourseUsersTable/constants.js +1 -0
- package/lib/esm/shared/CourseUsersTable/index.d.ts +4 -0
- package/lib/esm/shared/CourseUsersTable/index.js +4 -0
- package/lib/esm/shared/DateTimeAgo/index.d.ts +1 -1
- package/lib/esm/shared/EmptyStatus/EmptyStatus.d.ts +11 -0
- package/lib/esm/shared/EmptyStatus/EmptyStatus.js +23 -0
- package/lib/esm/shared/EmptyStatus/index.d.ts +3 -0
- package/lib/esm/shared/EmptyStatus/index.js +2 -0
- package/lib/esm/shared/LessonCommentActionsMenu/index.d.ts +41 -0
- package/lib/esm/shared/LessonCommentActionsMenu/index.js +194 -0
- package/lib/esm/shared/LessonFilePreview/index.d.ts +12 -0
- package/lib/esm/shared/LessonFilePreview/index.js +25 -0
- package/lib/esm/shared/Media/Link/UrlTextField/index.js +3 -4
- package/lib/esm/types/course.d.ts +40 -0
- package/lib/esm/types/course.js +30 -0
- package/lib/esm/types/index.d.ts +2 -1
- package/lib/esm/types/index.js +2 -1
- package/lib/esm/utils/course.d.ts +14 -0
- package/lib/esm/utils/course.js +32 -0
- package/lib/umd/578.js +2 -0
- package/lib/umd/60a7fdeaadfe844bc015.woff2 +0 -0
- package/lib/umd/assets/icons.svg +9 -3
- package/lib/umd/{c3528e120c4e831db2ae.woff → b6dbec3d5816ff8baef1.woff} +0 -0
- package/lib/umd/{a221d3aba0f6753cfbb7.ttf → ba74e493633796d551d1.ttf} +0 -0
- package/lib/umd/{2aa155858f48b8f3911a.eot → c473ce30406a3dad83e1.eot} +0 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +9 -8
- package/lib/umd/239.js +0 -2
- package/lib/umd/36f3af7f155d916c26ff.woff2 +0 -0
- /package/lib/umd/{239.js.LICENSE.txt → 578.js.LICENSE.txt} +0 -0
|
@@ -27,6 +27,7 @@ const classes = {
|
|
|
27
27
|
explore: `${constants_1.PREFIX}-explore`,
|
|
28
28
|
events: `${constants_1.PREFIX}-events`,
|
|
29
29
|
groups: `${constants_1.PREFIX}-groups`,
|
|
30
|
+
courses: `${constants_1.PREFIX}-courses`,
|
|
30
31
|
search: `${constants_1.PREFIX}-search`,
|
|
31
32
|
composer: `${constants_1.PREFIX}-composer`,
|
|
32
33
|
profile: `${constants_1.PREFIX}-profile`,
|
|
@@ -122,6 +123,11 @@ function NavigationToolbar(inProps) {
|
|
|
122
123
|
scPreferences.features.includes(types_1.SCFeatureName.EVENT) &&
|
|
123
124
|
react_core_1.SCPreferences.CONFIGURATIONS_EVENTS_ENABLED in scPreferences.preferences &&
|
|
124
125
|
scPreferences.preferences[react_core_1.SCPreferences.CONFIGURATIONS_EVENTS_ENABLED].value, [scPreferences.preferences, scPreferences.features]);
|
|
126
|
+
const coursesEnabled = (0, react_1.useMemo)(() => scPreferences.preferences &&
|
|
127
|
+
scPreferences.features &&
|
|
128
|
+
scPreferences.features.includes(types_1.SCFeatureName.TAGGING) &&
|
|
129
|
+
react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED in scPreferences.preferences &&
|
|
130
|
+
scPreferences.preferences[react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED].value, [scPreferences.preferences, scPreferences.features]);
|
|
125
131
|
const showComposer = (0, react_1.useMemo)(() => {
|
|
126
132
|
return (!disableComposer &&
|
|
127
133
|
(!scPreferences.preferences[react_core_1.SCPreferences.CONFIGURATIONS_POST_ONLY_STAFF_ENABLED].value || react_core_1.UserUtils.isStaff(scUserContext.user)));
|
|
@@ -142,7 +148,12 @@ function NavigationToolbar(inProps) {
|
|
|
142
148
|
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
143
149
|
}
|
|
144
150
|
const _children = children || ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.navigation }, { children: [scUserContext.user && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.home, { [classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {})) }), "aria-label": "Home", to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "home" }) }))), preferences[react_core_1.SCPreferences.CONFIGURATIONS_EXPLORE_STREAM_ENABLED] &&
|
|
145
|
-
(preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY] || scUserContext.user) &&
|
|
151
|
+
(preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY] || scUserContext.user) &&
|
|
152
|
+
(!scUserContext.user || (!groupsEnabled && !coursesEnabled && !eventsEnabled)) && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.explore, {
|
|
153
|
+
[classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.EXPLORE_ROUTE_NAME, {}))
|
|
154
|
+
}), "aria-label": "Explore", to: scRoutingContext.url(react_core_1.SCRoutes.EXPLORE_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "explore" }) }))), coursesEnabled && (scUserContext.user || preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY]) && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.courses, {
|
|
155
|
+
[classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.COURSES_ROUTE_NAME, {}))
|
|
156
|
+
}), "aria-label": "Courses", to: scRoutingContext.url(react_core_1.SCRoutes.COURSES_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "courses" }) }))), groupsEnabled && scUserContext.user && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.groups, {
|
|
146
157
|
[classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.GROUPS_SUBSCRIBED_ROUTE_NAME, {})) ||
|
|
147
158
|
value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.GROUPS_ROUTE_NAME, {}))
|
|
148
159
|
}), "aria-label": "Groups", to: scRoutingContext.url(react_core_1.SCRoutes.GROUPS_SUBSCRIBED_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "groups" }) }))), eventsEnabled && (scUserContext.user || preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY]) && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.events, {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SCNotificationCourseActivityType } from '@selfcommunity/types';
|
|
2
|
+
import { NotificationItemProps } from '../../../shared/NotificationItem';
|
|
3
|
+
export interface NotificationCourseProps extends Pick<NotificationItemProps, Exclude<keyof NotificationItemProps, 'image' | 'disableTypography' | 'primary' | 'primaryTypographyProps' | 'secondary' | 'secondaryTypographyProps' | 'actions' | 'footer' | 'isNew'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Notification obj
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
notificationObject: SCNotificationCourseActivityType;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This component render the content of the notification of type course
|
|
12
|
+
* @constructor
|
|
13
|
+
* @param props
|
|
14
|
+
*/
|
|
15
|
+
export default function CourseNotification(props: NotificationCourseProps): JSX.Element;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
|
+
const types_1 = require("@selfcommunity/types");
|
|
10
|
+
const react_intl_1 = require("react-intl");
|
|
11
|
+
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
12
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
13
|
+
const types_2 = require("../../../types");
|
|
14
|
+
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
15
|
+
const lab_1 = require("@mui/lab");
|
|
16
|
+
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
17
|
+
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
18
|
+
const constants_1 = require("../constants");
|
|
19
|
+
const Course_1 = tslib_1.__importDefault(require("../../Course"));
|
|
20
|
+
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../../shared/HiddenPlaceholder"));
|
|
21
|
+
const utils_1 = require("./utils");
|
|
22
|
+
const classes = {
|
|
23
|
+
root: `${constants_1.PREFIX}-course-root`,
|
|
24
|
+
avatar: `${constants_1.PREFIX}-avatar`,
|
|
25
|
+
actions: `${constants_1.PREFIX}-actions`,
|
|
26
|
+
seeButton: `${constants_1.PREFIX}see-button`,
|
|
27
|
+
activeAt: `${constants_1.PREFIX}-active-at`,
|
|
28
|
+
snippetTime: `${constants_1.PREFIX}-snippet-time`,
|
|
29
|
+
username: `${constants_1.PREFIX}-username`
|
|
30
|
+
};
|
|
31
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
32
|
+
name: constants_1.PREFIX,
|
|
33
|
+
slot: 'CourseRoot'
|
|
34
|
+
})(() => ({}));
|
|
35
|
+
/**
|
|
36
|
+
* This component render the content of the notification of type course
|
|
37
|
+
* @constructor
|
|
38
|
+
* @param props
|
|
39
|
+
*/
|
|
40
|
+
function CourseNotification(props) {
|
|
41
|
+
// PROPS
|
|
42
|
+
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_2.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
43
|
+
// CONTEXT
|
|
44
|
+
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
45
|
+
// STATE
|
|
46
|
+
const [openAlert, setOpenAlert] = (0, react_1.useState)(false);
|
|
47
|
+
// CONST
|
|
48
|
+
const isSnippetTemplate = template === types_2.SCNotificationObjectTemplateType.SNIPPET;
|
|
49
|
+
const isToastTemplate = template === types_2.SCNotificationObjectTemplateType.TOAST;
|
|
50
|
+
if (!notificationObject.course) {
|
|
51
|
+
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
52
|
+
}
|
|
53
|
+
// RENDER
|
|
54
|
+
if (isSnippetTemplate || isToastTemplate) {
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
56
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
57
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
58
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
59
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
|
|
60
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
63
|
+
? notificationObject.comment.lesson_name
|
|
64
|
+
: notificationObject.course.name,
|
|
65
|
+
link: (...chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
66
|
+
? react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME
|
|
67
|
+
: react_core_1.SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
68
|
+
? (0, utils_1.formatLessonUrl)(notificationObject)
|
|
69
|
+
: notificationObject.course) }, { children: chunks })))
|
|
70
|
+
} })] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url((0, utils_1.getRouteName)(notificationObject), (0, utils_1.getRouteParams)(notificationObject)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) })) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
71
|
+
}
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
73
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
74
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.user.deleted && {
|
|
75
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
|
|
76
|
+
}), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.course.${notificationObject.type}`, defaultMessage: `ui.notification.course.${notificationObject.type}`, values: {
|
|
77
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
78
|
+
// @ts-ignore
|
|
79
|
+
name: notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
80
|
+
? notificationObject.comment.lesson_name
|
|
81
|
+
: notificationObject.course.name,
|
|
82
|
+
link: (...chunks) => ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
83
|
+
? react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME
|
|
84
|
+
: react_core_1.SCRoutes.COURSE_ROUTE_NAME, notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON
|
|
85
|
+
? (0, utils_1.formatLessonUrl)(notificationObject)
|
|
86
|
+
: notificationObject.course) }, { children: chunks })))
|
|
87
|
+
} }), notificationObject.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", dangerouslySetInnerHTML: { __html: notificationObject.comment.html } })) : ((0, jsx_runtime_1.jsx)(Course_1.default, { course: notificationObject.course, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), template: types_2.SCCourseTemplateType.SNIPPET, elevation: 0 }))] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, to: scRoutingContext.url((0, utils_1.getRouteName)(notificationObject), (0, utils_1.getRouteParams)(notificationObject)) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.course.button.see", defaultMessage: "ui.notification.course.button.see" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
88
|
+
}
|
|
89
|
+
exports.default = CourseNotification;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { SCNotificationCourseActivityType } from '@selfcommunity/types';
|
|
2
|
+
declare function formatLessonUrl(notificationObject: SCNotificationCourseActivityType): any;
|
|
3
|
+
declare const getRouteName: (notificationObject: SCNotificationCourseActivityType) => "course_edit" | "course_lesson_comments" | "course";
|
|
4
|
+
declare const getRouteParams: (notificationObject: SCNotificationCourseActivityType) => any;
|
|
5
|
+
export { getRouteName, getRouteParams, formatLessonUrl };
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatLessonUrl = exports.getRouteParams = exports.getRouteName = void 0;
|
|
4
|
+
const course_1 = require("../../../types/course");
|
|
5
|
+
const types_1 = require("@selfcommunity/types");
|
|
6
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
7
|
+
function formatLessonUrl(notificationObject) {
|
|
8
|
+
return {
|
|
9
|
+
id: notificationObject.course.id,
|
|
10
|
+
slug: notificationObject.course.slug,
|
|
11
|
+
section_id: notificationObject.comment.section_id,
|
|
12
|
+
lesson_id: notificationObject.comment.lesson_id
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
exports.formatLessonUrl = formatLessonUrl;
|
|
16
|
+
function formatCourseRequestsUrl(notificationObject) {
|
|
17
|
+
return {
|
|
18
|
+
id: notificationObject.course.id,
|
|
19
|
+
slug: notificationObject.course.slug,
|
|
20
|
+
tab: course_1.SCCourseEditTabType.REQUESTS
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
const getRouteName = (notificationObject) => {
|
|
24
|
+
switch (notificationObject.type) {
|
|
25
|
+
case types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON:
|
|
26
|
+
return react_core_1.SCRoutes.COURSE_LESSON_COMMENTS_ROUTE_NAME;
|
|
27
|
+
case types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_COURSE:
|
|
28
|
+
return react_core_1.SCRoutes.COURSE_EDIT_ROUTE_NAME;
|
|
29
|
+
default:
|
|
30
|
+
return react_core_1.SCRoutes.COURSE_ROUTE_NAME;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
exports.getRouteName = getRouteName;
|
|
34
|
+
const getRouteParams = (notificationObject) => {
|
|
35
|
+
switch (notificationObject.type) {
|
|
36
|
+
case types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON:
|
|
37
|
+
return formatLessonUrl(notificationObject);
|
|
38
|
+
case types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_COURSE:
|
|
39
|
+
return formatCourseRequestsUrl(notificationObject);
|
|
40
|
+
default:
|
|
41
|
+
return notificationObject.course;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
exports.getRouteParams = getRouteParams;
|
|
@@ -39,6 +39,7 @@ const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../shared/User
|
|
|
39
39
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../shared/UserAvatar"));
|
|
40
40
|
const constants_1 = require("./constants");
|
|
41
41
|
const Group_1 = tslib_1.__importDefault(require("./Group"));
|
|
42
|
+
const Course_1 = tslib_1.__importDefault(require("./Course"));
|
|
42
43
|
const messages = (0, react_intl_1.defineMessages)({
|
|
43
44
|
receivePrivateMessage: {
|
|
44
45
|
id: 'ui.notification.receivePrivateMessage',
|
|
@@ -309,6 +310,14 @@ function UserNotification(inProps) {
|
|
|
309
310
|
n.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
310
311
|
return (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n }, i);
|
|
311
312
|
}
|
|
313
|
+
else if (n.type === types_1.SCNotificationTypologyType.USER_ADDED_TO_COURSE ||
|
|
314
|
+
n.type === types_1.SCNotificationTypologyType.MANAGER_ADDED_TO_COURSE ||
|
|
315
|
+
n.type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ||
|
|
316
|
+
n.type === types_1.SCNotificationTypologyType.USER_INVITED_TO_JOIN_COURSE ||
|
|
317
|
+
n.type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_COURSE ||
|
|
318
|
+
n.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_COURSE) {
|
|
319
|
+
return (0, jsx_runtime_1.jsx)(Course_1.default, { notificationObject: n }, i);
|
|
320
|
+
}
|
|
312
321
|
else if (n.type === types_1.SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
313
322
|
return (0, jsx_runtime_1.jsx)(LiveStream_1.default, { notificationObject: n }, i);
|
|
314
323
|
}
|
|
@@ -37,6 +37,7 @@ const constants_1 = require("./constants");
|
|
|
37
37
|
const Group_1 = tslib_1.__importDefault(require("../Notification/Group"));
|
|
38
38
|
const Event_1 = tslib_1.__importDefault(require("../Notification/Event/Event"));
|
|
39
39
|
const LiveStream_1 = tslib_1.__importDefault(require("../Notification/LiveStream"));
|
|
40
|
+
const Course_1 = tslib_1.__importDefault(require("../Notification/Course"));
|
|
40
41
|
const classes = {
|
|
41
42
|
root: `${constants_1.PREFIX}-root`,
|
|
42
43
|
notificationsWrap: `${constants_1.PREFIX}-notifications-wrap`,
|
|
@@ -270,6 +271,14 @@ function SnippetNotifications(inProps) {
|
|
|
270
271
|
n.type === types_2.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
271
272
|
return (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n, template: types_1.SCNotificationObjectTemplateType.SNIPPET }, i);
|
|
272
273
|
}
|
|
274
|
+
else if (n.type === types_2.SCNotificationTypologyType.USER_ADDED_TO_COURSE ||
|
|
275
|
+
n.type === types_2.SCNotificationTypologyType.MANAGER_ADDED_TO_COURSE ||
|
|
276
|
+
n.type === types_2.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ||
|
|
277
|
+
n.type === types_2.SCNotificationTypologyType.USER_INVITED_TO_JOIN_COURSE ||
|
|
278
|
+
n.type === types_2.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_COURSE ||
|
|
279
|
+
n.type === types_2.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_COURSE) {
|
|
280
|
+
return (0, jsx_runtime_1.jsx)(Course_1.default, { notificationObject: n, template: types_1.SCNotificationObjectTemplateType.SNIPPET }, i);
|
|
281
|
+
}
|
|
273
282
|
else if (type === types_2.SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
274
283
|
content = (0, jsx_runtime_1.jsx)(LiveStream_1.default, { notificationObject: n, template: types_1.SCNotificationObjectTemplateType.SNIPPET }, i);
|
|
275
284
|
}
|
|
@@ -19,7 +19,7 @@ const classes = {
|
|
|
19
19
|
const Root = (0, styles_1.styled)(Autocomplete_1.default, {
|
|
20
20
|
name: PREFIX,
|
|
21
21
|
slot: 'Root',
|
|
22
|
-
overridesResolver: (
|
|
22
|
+
overridesResolver: (_props, styles) => styles.root
|
|
23
23
|
})(() => ({}));
|
|
24
24
|
/**
|
|
25
25
|
* > API documentation for the Community-JS Tag Autocomplete component. Learn about the available props and the CSS API.
|
|
@@ -75,7 +75,7 @@ const TagAutocomplete = (inProps) => {
|
|
|
75
75
|
const handleClose = () => {
|
|
76
76
|
setOpen(false);
|
|
77
77
|
};
|
|
78
|
-
const handleChange = (
|
|
78
|
+
const handleChange = (_event, newValue) => {
|
|
79
79
|
setValue(newValue);
|
|
80
80
|
};
|
|
81
81
|
// Render
|
|
@@ -28,6 +28,7 @@ const Contribution_1 = tslib_1.__importDefault(require("../Notification/Contribu
|
|
|
28
28
|
const Group_1 = tslib_1.__importDefault(require("../Notification/Group"));
|
|
29
29
|
const Event_1 = tslib_1.__importDefault(require("../Notification/Event/Event"));
|
|
30
30
|
const LiveStream_1 = tslib_1.__importDefault(require("../Notification/LiveStream"));
|
|
31
|
+
const Course_1 = tslib_1.__importDefault(require("../Notification/Course"));
|
|
31
32
|
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
32
33
|
name: constants_1.PREFIX,
|
|
33
34
|
slot: 'Root'
|
|
@@ -127,6 +128,14 @@ function UserToastNotifications(inProps) {
|
|
|
127
128
|
type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
128
129
|
content = (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n.notification_obj, template: types_2.SCNotificationObjectTemplateType.TOAST });
|
|
129
130
|
}
|
|
131
|
+
else if (type === types_1.SCNotificationTypologyType.USER_ADDED_TO_COURSE ||
|
|
132
|
+
type === types_1.SCNotificationTypologyType.MANAGER_ADDED_TO_COURSE ||
|
|
133
|
+
type === types_1.SCNotificationTypologyType.USER_COMMENTED_A_COURSE_LESSON ||
|
|
134
|
+
type === types_1.SCNotificationTypologyType.USER_INVITED_TO_JOIN_COURSE ||
|
|
135
|
+
type === types_1.SCNotificationTypologyType.USER_ACCEPTED_TO_JOIN_COURSE ||
|
|
136
|
+
type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_COURSE) {
|
|
137
|
+
content = (0, jsx_runtime_1.jsx)(Course_1.default, { notificationObject: n.notification_obj, template: types_2.SCNotificationObjectTemplateType.TOAST });
|
|
138
|
+
}
|
|
130
139
|
else if (type === types_1.SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
131
140
|
content = (0, jsx_runtime_1.jsx)(LiveStream_1.default, { notificationObject: n.notification_obj, template: types_2.SCNotificationObjectTemplateType.TOAST });
|
|
132
141
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* > API documentation for the Community-JS User Profile Categories Followed Widget Skeleton component. Learn about the available props and the CSS API.
|
|
3
|
+
|
|
4
|
+
#### Import
|
|
5
|
+
|
|
6
|
+
```jsx
|
|
7
|
+
import {UserCreatedCoursesWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
#### Component Name
|
|
11
|
+
|
|
12
|
+
The name `SCUserCategoriesFollowedWidget-skeleton-root` can be used when providing style overrides in the theme.
|
|
13
|
+
|
|
14
|
+
#### CSS
|
|
15
|
+
|
|
16
|
+
|Rule Name|Global class|Description|
|
|
17
|
+
|---|---|---|
|
|
18
|
+
|root|.SCUserCreatedCoursesWidget-skeleton-root|Styles applied to the root element.|
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
export default function UserCreatedCoursesWidgetSkeleton(props: any): JSX.Element;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const List_1 = tslib_1.__importDefault(require("@mui/material/List"));
|
|
9
|
+
const Skeleton_1 = tslib_1.__importDefault(require("../Course/Skeleton"));
|
|
10
|
+
const course_1 = require("../../types/course");
|
|
11
|
+
const PREFIX = 'SCUserCreatedCoursesWidgetSkeleton';
|
|
12
|
+
const classes = {
|
|
13
|
+
root: `${PREFIX}-skeleton-root`,
|
|
14
|
+
list: `${PREFIX}-list`
|
|
15
|
+
};
|
|
16
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
17
|
+
name: PREFIX,
|
|
18
|
+
slot: 'SkeletonRoot'
|
|
19
|
+
})(() => ({}));
|
|
20
|
+
/**
|
|
21
|
+
* > API documentation for the Community-JS User Profile Categories Followed Widget Skeleton component. Learn about the available props and the CSS API.
|
|
22
|
+
|
|
23
|
+
#### Import
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import {UserCreatedCoursesWidgetSkeleton} from '@selfcommunity/react-ui';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
#### Component Name
|
|
30
|
+
|
|
31
|
+
The name `SCUserCategoriesFollowedWidget-skeleton-root` can be used when providing style overrides in the theme.
|
|
32
|
+
|
|
33
|
+
#### CSS
|
|
34
|
+
|
|
35
|
+
|Rule Name|Global class|Description|
|
|
36
|
+
|---|---|---|
|
|
37
|
+
|root|.SCUserCreatedCoursesWidget-skeleton-root|Styles applied to the root element.|
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
function UserCreatedCoursesWidgetSkeleton(props) {
|
|
41
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(List_1.default, Object.assign({ className: classes.list }, { children: [...Array(3)].map((category, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { template: course_1.SCCourseTemplateType.SNIPPET, CourseProps: { userProfileSnippet: true }, elevation: 0 }) }, index))) })) }) })));
|
|
42
|
+
}
|
|
43
|
+
exports.default = UserCreatedCoursesWidgetSkeleton;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CacheStrategies } from '@selfcommunity/utils';
|
|
2
|
+
import { BaseDialogProps } from '../../shared/BaseDialog';
|
|
3
|
+
import { WidgetProps } from '../Widget';
|
|
4
|
+
import { VirtualScrollerItemProps } from '../../types/virtualScroller';
|
|
5
|
+
import { CourseProps } from '../Course';
|
|
6
|
+
export interface UserCreatedCoursesWidgetProps extends VirtualScrollerItemProps, WidgetProps {
|
|
7
|
+
/**
|
|
8
|
+
* The user id
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
userId: number;
|
|
12
|
+
/**
|
|
13
|
+
* Limit the number of courses to show
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
limit?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Props to spread to single course object
|
|
19
|
+
* @default empty object
|
|
20
|
+
*/
|
|
21
|
+
CourseProps?: CourseProps;
|
|
22
|
+
/**
|
|
23
|
+
* Caching strategies
|
|
24
|
+
* @default CacheStrategies.CACHE_FIRST
|
|
25
|
+
*/
|
|
26
|
+
cacheStrategy?: CacheStrategies;
|
|
27
|
+
/**
|
|
28
|
+
* Props to spread to subscribed courses dialog
|
|
29
|
+
* @default {}
|
|
30
|
+
*/
|
|
31
|
+
DialogProps?: BaseDialogProps;
|
|
32
|
+
/**
|
|
33
|
+
* Other props
|
|
34
|
+
*/
|
|
35
|
+
[p: string]: any;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* > API documentation for the Community-JS User Profile Courses Created Widget component. Learn about the available props and the CSS API.
|
|
39
|
+
*
|
|
40
|
+
*
|
|
41
|
+
* This component renders the list of the courses that the given user follows.
|
|
42
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserCreatedCourses)
|
|
43
|
+
|
|
44
|
+
#### Import
|
|
45
|
+
```jsx
|
|
46
|
+
import {UserCreatedCoursesWidget} from '@selfcommunity/react-ui';
|
|
47
|
+
```
|
|
48
|
+
#### Component Name
|
|
49
|
+
The name `SCUserCreatedCoursesWidget` can be used when providing style overrides in the theme.
|
|
50
|
+
|
|
51
|
+
#### CSS
|
|
52
|
+
|
|
53
|
+
|Rule Name|Global class|Description|
|
|
54
|
+
|---|---|---|
|
|
55
|
+
|root|.SCUserCreatedCoursesWidget-root|Styles applied to the root element.|
|
|
56
|
+
|title|.SCUserCreatedCoursesWidget-title|Styles applied to the title element.|
|
|
57
|
+
|noResults|.SCUserCreatedCoursesWidget-no-results|Styles applied to no results section.|
|
|
58
|
+
|showMore|.SCUserCreatedCoursesWidget-show-more|Styles applied to show more button element.|
|
|
59
|
+
|dialogRoot|.SCUserCreatedCoursesWidget-dialog-root|Styles applied to the root dialog element.|
|
|
60
|
+
|endMessage|.SCUserCreatedCoursesWidget-end-message|Styles applied to the end message element.|
|
|
61
|
+
* @param inProps
|
|
62
|
+
*/
|
|
63
|
+
export default function UserCreatedCoursesWidget(inProps: UserCreatedCoursesWidgetProps): JSX.Element;
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const List_1 = tslib_1.__importDefault(require("@mui/material/List"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
10
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
11
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
12
|
+
const widget_1 = require("../../utils/widget");
|
|
13
|
+
const types_1 = require("@selfcommunity/types");
|
|
14
|
+
const Errors_1 = require("../../constants/Errors");
|
|
15
|
+
const react_intl_1 = require("react-intl");
|
|
16
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
17
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
18
|
+
const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
|
|
19
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
20
|
+
const system_1 = require("@mui/system");
|
|
21
|
+
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
22
|
+
const constants_1 = require("./constants");
|
|
23
|
+
const Course_1 = tslib_1.__importStar(require("../Course"));
|
|
24
|
+
const course_1 = require("../../types/course");
|
|
25
|
+
const classes = {
|
|
26
|
+
root: `${constants_1.PREFIX}-root`,
|
|
27
|
+
title: `${constants_1.PREFIX}-title`,
|
|
28
|
+
noResults: `${constants_1.PREFIX}-no-results`,
|
|
29
|
+
showMore: `${constants_1.PREFIX}-show-more`,
|
|
30
|
+
dialogRoot: `${constants_1.PREFIX}-dialog-root`,
|
|
31
|
+
endMessage: `${constants_1.PREFIX}-end-message`
|
|
32
|
+
};
|
|
33
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
34
|
+
name: constants_1.PREFIX,
|
|
35
|
+
slot: 'Root'
|
|
36
|
+
})(() => ({}));
|
|
37
|
+
const DialogRoot = (0, styles_1.styled)(BaseDialog_1.default, {
|
|
38
|
+
name: constants_1.PREFIX,
|
|
39
|
+
slot: 'DialogRoot'
|
|
40
|
+
})(() => ({}));
|
|
41
|
+
/**
|
|
42
|
+
* > API documentation for the Community-JS User Profile Courses Created Widget component. Learn about the available props and the CSS API.
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* This component renders the list of the courses that the given user follows.
|
|
46
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserCreatedCourses)
|
|
47
|
+
|
|
48
|
+
#### Import
|
|
49
|
+
```jsx
|
|
50
|
+
import {UserCreatedCoursesWidget} from '@selfcommunity/react-ui';
|
|
51
|
+
```
|
|
52
|
+
#### Component Name
|
|
53
|
+
The name `SCUserCreatedCoursesWidget` can be used when providing style overrides in the theme.
|
|
54
|
+
|
|
55
|
+
#### CSS
|
|
56
|
+
|
|
57
|
+
|Rule Name|Global class|Description|
|
|
58
|
+
|---|---|---|
|
|
59
|
+
|root|.SCUserCreatedCoursesWidget-root|Styles applied to the root element.|
|
|
60
|
+
|title|.SCUserCreatedCoursesWidget-title|Styles applied to the title element.|
|
|
61
|
+
|noResults|.SCUserCreatedCoursesWidget-no-results|Styles applied to no results section.|
|
|
62
|
+
|showMore|.SCUserCreatedCoursesWidget-show-more|Styles applied to show more button element.|
|
|
63
|
+
|dialogRoot|.SCUserCreatedCoursesWidget-dialog-root|Styles applied to the root dialog element.|
|
|
64
|
+
|endMessage|.SCUserCreatedCoursesWidget-end-message|Styles applied to the end message element.|
|
|
65
|
+
* @param inProps
|
|
66
|
+
*/
|
|
67
|
+
function UserCreatedCoursesWidget(inProps) {
|
|
68
|
+
// PROPS
|
|
69
|
+
const props = (0, system_1.useThemeProps)({
|
|
70
|
+
props: inProps,
|
|
71
|
+
name: constants_1.PREFIX
|
|
72
|
+
});
|
|
73
|
+
const { userId, limit = 3, className, CourseProps = {}, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, onHeightChange, onStateChange, DialogProps = {} } = props, rest = tslib_1.__rest(props, ["userId", "limit", "className", "CourseProps", "cacheStrategy", "onHeightChange", "onStateChange", "DialogProps"]);
|
|
74
|
+
// CONTEXT
|
|
75
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
76
|
+
const { preferences, features } = (0, react_core_1.useSCPreferences)();
|
|
77
|
+
const coursesEnabled = (0, react_1.useMemo)(() => preferences &&
|
|
78
|
+
features &&
|
|
79
|
+
features.includes(types_1.SCFeatureName.TAGGING) &&
|
|
80
|
+
features.includes(types_1.SCFeatureName.COURSE) &&
|
|
81
|
+
react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED in preferences &&
|
|
82
|
+
preferences[react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED].value, [preferences, features]);
|
|
83
|
+
// STATE
|
|
84
|
+
const [state, dispatch] = (0, react_1.useReducer)(widget_1.dataWidgetReducer, {
|
|
85
|
+
isLoadingNext: false,
|
|
86
|
+
next: null,
|
|
87
|
+
cacheKey: react_core_1.SCCache.getWidgetStateCacheKey(react_core_1.SCCache.USER_CREATED_COURSES_STATE_CACHE_PREFIX_KEY, userId),
|
|
88
|
+
cacheStrategy
|
|
89
|
+
}, widget_1.stateWidgetInitializer);
|
|
90
|
+
const [openDialog, setOpenDialog] = (0, react_1.useState)(false);
|
|
91
|
+
/**
|
|
92
|
+
* Initialize component
|
|
93
|
+
* Fetch data only if the component is not initialized, and it is not loading data
|
|
94
|
+
*/
|
|
95
|
+
const _initComponent = (0, react_1.useMemo)(() => () => {
|
|
96
|
+
if (!state.initialized && !state.isLoadingNext) {
|
|
97
|
+
api_services_1.CourseService.getUserJoinedCourses(userId, { statuses: types_1.SCCourseJoinStatusType.CREATOR })
|
|
98
|
+
.then((courses) => {
|
|
99
|
+
dispatch({
|
|
100
|
+
type: widget_1.actionWidgetTypes.LOAD_NEXT_SUCCESS,
|
|
101
|
+
payload: {
|
|
102
|
+
count: courses.count,
|
|
103
|
+
results: courses.results,
|
|
104
|
+
initialized: true
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
})
|
|
108
|
+
.catch((error) => {
|
|
109
|
+
dispatch({ type: widget_1.actionWidgetTypes.LOAD_NEXT_FAILURE, payload: { errorLoadNext: error } });
|
|
110
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, [state.isLoadingNext, state.initialized, userId, dispatch]);
|
|
114
|
+
// EFFECTS
|
|
115
|
+
(0, react_1.useEffect)(() => {
|
|
116
|
+
let _t;
|
|
117
|
+
if (coursesEnabled && (0, utils_1.isInteger)(userId) && scUserContext.user !== undefined) {
|
|
118
|
+
_t = setTimeout(_initComponent);
|
|
119
|
+
return () => {
|
|
120
|
+
_t && clearTimeout(_t);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}, [scUserContext.user, coursesEnabled, userId]);
|
|
124
|
+
/**
|
|
125
|
+
* Virtual feed update
|
|
126
|
+
*/
|
|
127
|
+
(0, react_1.useEffect)(() => {
|
|
128
|
+
onHeightChange && onHeightChange();
|
|
129
|
+
}, [state.results.length]);
|
|
130
|
+
(0, react_1.useEffect)(() => {
|
|
131
|
+
if (!coursesEnabled && !scUserContext.user && !(0, utils_1.isInteger)(userId)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
else if (cacheStrategy === utils_1.CacheStrategies.NETWORK_ONLY) {
|
|
135
|
+
onStateChange && onStateChange({ cacheStrategy: utils_1.CacheStrategies.CACHE_FIRST });
|
|
136
|
+
}
|
|
137
|
+
}, [coursesEnabled, cacheStrategy, scUserContext.user, userId]);
|
|
138
|
+
// HANDLERS
|
|
139
|
+
const handleToggleDialogOpen = () => {
|
|
140
|
+
setOpenDialog((prev) => !prev);
|
|
141
|
+
};
|
|
142
|
+
// RENDER
|
|
143
|
+
if (!coursesEnabled || (!state.count && state.initialized) || !userId) {
|
|
144
|
+
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
145
|
+
}
|
|
146
|
+
if (!state.initialized) {
|
|
147
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
148
|
+
}
|
|
149
|
+
const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.title", defaultMessage: "ui.userCreatedCoursesWidget.title", values: {
|
|
150
|
+
total: state.count
|
|
151
|
+
} }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.subtitle.noResults", defaultMessage: "ui.userCreatedCoursesWidget.subtitle.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(List_1.default, { children: state.results.slice(0, limit).map((course) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ elevation: 0, template: course_1.SCCourseTemplateType.SNIPPET, course: course, userProfileSnippet: true }, CourseProps)) }, course.id))) }), limit < state.count && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.button.showAll", defaultMessage: "ui.userCreatedCoursesWidget.button.showAll" }) }))), openDialog && ((0, jsx_runtime_1.jsxs)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.title", defaultMessage: "ui.userCreatedCoursesWidget.title", values: { total: state.count } }), onClose: handleToggleDialogOpen, open: openDialog, scroll: "paper" }, DialogProps, { children: [(0, jsx_runtime_1.jsxs)(List_1.default, { children: [state.results.map((c) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ elevation: 0, template: course_1.SCCourseTemplateType.SNIPPET, course: c, userProfileSnippet: true }, CourseProps)) }, c.id))), state.isLoadingNext && ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, { template: course_1.SCCourseTemplateType.SNIPPET, elevation: 0, CourseProps: { userProfileSnippet: true } }) }))] }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.noMoreResults", defaultMessage: "ui.userCreatedCoursesWidget.noMoreResults" }) }))] })))] }))] }));
|
|
152
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: content })));
|
|
153
|
+
}
|
|
154
|
+
exports.default = UserCreatedCoursesWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCUserCreatedCoursesWidget";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import UserCreatedCoursesWidget, { UserCreatedCoursesWidgetProps } from './UserCreatedCoursesWidget';
|
|
2
|
+
import UserCreatedCoursesWidgetSkeleton from './Skeleton';
|
|
3
|
+
export default UserCreatedCoursesWidget;
|
|
4
|
+
export { UserCreatedCoursesWidgetSkeleton, UserCreatedCoursesWidgetProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserCreatedCoursesWidgetSkeleton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const UserCreatedCoursesWidget_1 = tslib_1.__importDefault(require("./UserCreatedCoursesWidget"));
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
7
|
+
exports.UserCreatedCoursesWidgetSkeleton = Skeleton_1.default;
|
|
8
|
+
exports.default = UserCreatedCoursesWidget_1.default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SCCourseFormStepType = exports.COURSE_DESCRIPTION_MAX_LENGTH = exports.COURSE_TITLE_MAX_LENGTH = void 0;
|
|
4
|
+
exports.COURSE_TITLE_MAX_LENGTH = 50;
|
|
5
|
+
exports.COURSE_DESCRIPTION_MAX_LENGTH = 500;
|
|
6
|
+
var SCCourseFormStepType;
|
|
7
|
+
(function (SCCourseFormStepType) {
|
|
8
|
+
SCCourseFormStepType["GENERAL"] = "general";
|
|
9
|
+
SCCourseFormStepType["CUSTOMIZATION"] = "customization";
|
|
10
|
+
})(SCCourseFormStepType = exports.SCCourseFormStepType || (exports.SCCourseFormStepType = {}));
|