@selfcommunity/react-ui 0.11.0-alpha.60 → 0.11.0-alpha.61
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
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Button, Chip, FormControl, Grid, Icon, IconButton, InputAdornment, Stack, styled, TextField, Typography, useMediaQuery, useTheme, useThemeProps } from '@mui/material';
|
|
4
|
+
import { Endpoints, http } from '@selfcommunity/api-services';
|
|
5
|
+
import { SCPreferences, SCUserContext, useSCPreferences } from '@selfcommunity/react-core';
|
|
6
|
+
import { Logger } from '@selfcommunity/utils';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import PubSub from 'pubsub-js';
|
|
9
|
+
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';
|
|
10
|
+
import { FormattedMessage } from 'react-intl';
|
|
11
|
+
import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
12
|
+
import { DEFAULT_PAGINATION_OFFSET } from '../../constants/Pagination';
|
|
13
|
+
import { SCCourseEventType, SCTopicType } from '../../constants/PubSub';
|
|
14
|
+
import Course, { CourseSkeleton } from '../Course';
|
|
15
|
+
import Skeleton from '../Courses/Skeleton';
|
|
16
|
+
import { PREFIX } from './constants';
|
|
17
|
+
import { SCCourseTemplateType } from '../../types/course';
|
|
18
|
+
import CategoryAutocomplete from '../CategoryAutocomplete';
|
|
19
|
+
import CourseCreatePlaceholder from '../Course/CreatePlaceholder';
|
|
20
|
+
import InfiniteScroll from '../../shared/InfiniteScroll';
|
|
21
|
+
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
22
|
+
const classes = {
|
|
23
|
+
root: `${PREFIX}-root`,
|
|
24
|
+
category: `${PREFIX}-category`,
|
|
25
|
+
courses: `${PREFIX}-courses`,
|
|
26
|
+
emptyBox: `${PREFIX}-empty-box`,
|
|
27
|
+
emptyIcon: `${PREFIX}-empty-icon`,
|
|
28
|
+
emptyRotatedBox: `${PREFIX}-empty-rotated-box`,
|
|
29
|
+
filters: `${PREFIX}-filters`,
|
|
30
|
+
item: `${PREFIX}-item`,
|
|
31
|
+
itemPlaceholder: `${PREFIX}-item-placeholder`,
|
|
32
|
+
noResults: `${PREFIX}-no-results`,
|
|
33
|
+
search: `${PREFIX}-search`,
|
|
34
|
+
studentEmptyView: `${PREFIX}-student-empty-view`,
|
|
35
|
+
teacherEmptyView: `${PREFIX}-teacher-empty-view`,
|
|
36
|
+
endMessage: `${PREFIX}-end-message`
|
|
37
|
+
};
|
|
38
|
+
const Root = styled(Box, {
|
|
39
|
+
name: PREFIX,
|
|
40
|
+
slot: 'Root'
|
|
41
|
+
})(() => ({}));
|
|
42
|
+
export const CoursesChipRoot = styled(Chip, {
|
|
43
|
+
name: PREFIX,
|
|
44
|
+
slot: 'CoursesChipRoot',
|
|
45
|
+
shouldForwardProp: (prop) => prop !== 'showMine' && prop !== 'showManagedCourses'
|
|
46
|
+
})(() => ({}));
|
|
47
|
+
/**
|
|
48
|
+
* > API documentation for the Community-JS Courses component. Learn about the available props and the CSS API.
|
|
49
|
+
*
|
|
50
|
+
*
|
|
51
|
+
* The Courses component renders the list of all available courses.
|
|
52
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Courses)
|
|
53
|
+
|
|
54
|
+
#### Import
|
|
55
|
+
```jsx
|
|
56
|
+
import {Courses} from '@selfcommunity/react-ui';
|
|
57
|
+
```
|
|
58
|
+
#### Component Name
|
|
59
|
+
The name `SCCourses` can be used when providing style overrides in the theme.
|
|
60
|
+
|
|
61
|
+
#### CSS
|
|
62
|
+
|
|
63
|
+
|Rule Name|Global class|Description|
|
|
64
|
+
|---|---|---|
|
|
65
|
+
|root|.SCCourses-root|Styles applied to the root element.|
|
|
66
|
+
|category|.SCCourses-category|Styles applied to the category autocomplete element.|
|
|
67
|
+
|courses|.SCCourses-courses|Styles applied to the courses section.|
|
|
68
|
+
|emptyBox|.SCCourses-empty-box|Styles applied to the empty box element.|
|
|
69
|
+
|emptyIcon|.SCCourses-empty-icon|Styles applied to the empty icon element.|
|
|
70
|
+
|emptyRotatedBox|.SCCourses-empty-rotated-box|Styles applied to the rotated empty box element.|
|
|
71
|
+
|filters|.SCCourses-filters|Styles applied to the filters section.|
|
|
72
|
+
|item|.SCCourses-item|Styles applied to an individual item.|
|
|
73
|
+
|itemPlaceholder|.SCCourses-item-placeholder|Styles applied to the placeholder for an item.|
|
|
74
|
+
|noResults|.SCCourses-no-results|Styles applied when there are no results.|
|
|
75
|
+
|search|.SCCourses-search|Styles applied to the search element.|
|
|
76
|
+
|studentEmptyView|.SCCourses-student-empty-view|Styles applied to the student empty view.|
|
|
77
|
+
|teacherEmptyView|.SCCourses-teacher-empty-view|Styles applied to the teacher empty view.|
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
* @param inProps
|
|
81
|
+
*/
|
|
82
|
+
export default function Courses(inProps) {
|
|
83
|
+
var _a;
|
|
84
|
+
// PROPS
|
|
85
|
+
const props = useThemeProps({
|
|
86
|
+
props: inProps,
|
|
87
|
+
name: PREFIX
|
|
88
|
+
});
|
|
89
|
+
const { endpointQueryParams = { limit: 8, offset: DEFAULT_PAGINATION_OFFSET }, className, CourseComponentProps = {}, CoursesSkeletonComponentProps = {}, CourseSkeletonComponentProps = { template: SCCourseTemplateType.PREVIEW }, CreateCourseButtonComponentProps = {}, GridContainerComponentProps = {}, GridItemComponentProps = {}, showFilters = true, filters } = props, rest = __rest(props, ["endpointQueryParams", "className", "CourseComponentProps", "CoursesSkeletonComponentProps", "CourseSkeletonComponentProps", "CreateCourseButtonComponentProps", "GridContainerComponentProps", "GridItemComponentProps", "showFilters", "filters"]);
|
|
90
|
+
// STATE
|
|
91
|
+
const [courses, setCourses] = useState([]);
|
|
92
|
+
const [loading, setLoading] = useState(true);
|
|
93
|
+
const [next, setNext] = useState(null);
|
|
94
|
+
const [query, setQuery] = useState('');
|
|
95
|
+
const [_categories, setCategories] = useState([]);
|
|
96
|
+
const [showMine, setShowMine] = useState(false);
|
|
97
|
+
const [showManagedCourses, setShowManagedCourses] = useState(false);
|
|
98
|
+
// CONTEXT
|
|
99
|
+
const scUserContext = useContext(SCUserContext);
|
|
100
|
+
const { preferences } = useSCPreferences();
|
|
101
|
+
// MEMO
|
|
102
|
+
const contentAvailability = SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY in preferences && preferences[SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY].value;
|
|
103
|
+
const onlyStaffEnabled = useMemo(() => { var _a; return (_a = preferences[SCPreferences.CONFIGURATIONS_COURSES_ONLY_STAFF_ENABLED]) === null || _a === void 0 ? void 0 : _a.value; }, [preferences]);
|
|
104
|
+
const canCreateCourse = useMemo(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_course; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
|
|
105
|
+
// CONST
|
|
106
|
+
const authUserId = scUserContext.user ? scUserContext.user.id : null;
|
|
107
|
+
const theme = useTheme();
|
|
108
|
+
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
|
109
|
+
// REFS
|
|
110
|
+
const updatesSubscription = useRef(null);
|
|
111
|
+
// HANDLERS
|
|
112
|
+
const handleChipClick = () => {
|
|
113
|
+
setShowMine(!showMine);
|
|
114
|
+
};
|
|
115
|
+
const handleDeleteClick = () => {
|
|
116
|
+
setShowMine(false);
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Fetches courses list
|
|
120
|
+
*/
|
|
121
|
+
const fetchCourses = () => {
|
|
122
|
+
return http
|
|
123
|
+
.request({
|
|
124
|
+
url: Endpoints.SearchCourses.url({}),
|
|
125
|
+
method: Endpoints.SearchCourses.method,
|
|
126
|
+
params: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, endpointQueryParams), (_categories.length && { categories: JSON.stringify(_categories) })), (query && { search: query })), (showManagedCourses && { statuses: JSON.stringify(['creator', 'manager']) })), (showMine && { statuses: JSON.stringify(['joined', 'manager']) }))
|
|
127
|
+
})
|
|
128
|
+
.then((res) => {
|
|
129
|
+
setCourses(res.data.results);
|
|
130
|
+
setNext(res.data.next);
|
|
131
|
+
setLoading(false);
|
|
132
|
+
})
|
|
133
|
+
.catch((error) => {
|
|
134
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
135
|
+
});
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* On mount, fetches courses list
|
|
139
|
+
*/
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
if (!contentAvailability && !authUserId) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
fetchCourses();
|
|
146
|
+
}
|
|
147
|
+
}, [contentAvailability, authUserId, showMine, showManagedCourses, _categories]);
|
|
148
|
+
/**
|
|
149
|
+
* Subscriber for pubsub callback
|
|
150
|
+
*/
|
|
151
|
+
const onDeleteCourseHandler = useCallback((_msg, deleted) => {
|
|
152
|
+
setCourses((prev) => {
|
|
153
|
+
if (prev.some((e) => e.id === deleted)) {
|
|
154
|
+
return prev.filter((e) => e.id !== deleted);
|
|
155
|
+
}
|
|
156
|
+
return prev;
|
|
157
|
+
});
|
|
158
|
+
}, [courses]);
|
|
159
|
+
/**
|
|
160
|
+
* On mount, subscribe to receive course updates (only delete)
|
|
161
|
+
*/
|
|
162
|
+
useEffect(() => {
|
|
163
|
+
if (courses) {
|
|
164
|
+
updatesSubscription.current = PubSub.subscribe(`${SCTopicType.COURSE}.${SCCourseEventType.DELETE}`, onDeleteCourseHandler);
|
|
165
|
+
}
|
|
166
|
+
return () => {
|
|
167
|
+
updatesSubscription.current && PubSub.unsubscribe(updatesSubscription.current);
|
|
168
|
+
};
|
|
169
|
+
}, [courses]);
|
|
170
|
+
const handleNext = useMemo(() => () => {
|
|
171
|
+
if (!next) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
return http
|
|
175
|
+
.request({
|
|
176
|
+
url: next,
|
|
177
|
+
method: Endpoints.SearchCourses.method
|
|
178
|
+
})
|
|
179
|
+
.then((res) => {
|
|
180
|
+
setCourses([...courses, ...res.data.results]);
|
|
181
|
+
setNext(res.data.next);
|
|
182
|
+
})
|
|
183
|
+
.catch((error) => console.log(error))
|
|
184
|
+
.then(() => setLoading(false));
|
|
185
|
+
}, [next]);
|
|
186
|
+
/**
|
|
187
|
+
* Handle change filter name
|
|
188
|
+
* @param course
|
|
189
|
+
*/
|
|
190
|
+
const handleOnChangeFilterName = (course) => {
|
|
191
|
+
setQuery(course.target.value);
|
|
192
|
+
};
|
|
193
|
+
/**
|
|
194
|
+
* Handle change category
|
|
195
|
+
* @param categories
|
|
196
|
+
*/
|
|
197
|
+
const handleOnChangeCategory = (categories) => {
|
|
198
|
+
const categoriesIds = categories.map((item) => item.id);
|
|
199
|
+
setCategories(categoriesIds);
|
|
200
|
+
};
|
|
201
|
+
const handleScrollUp = () => {
|
|
202
|
+
window.scrollTo({ left: 0, top: 0, behavior: 'smooth' });
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Renders courses list
|
|
206
|
+
*/
|
|
207
|
+
const c = (_jsxs(_Fragment, { children: [showFilters && (_jsx(Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : (_jsxs(_Fragment, { children: [_jsx(Grid, Object.assign({ item: true, xs: 12, md: 3 }, { children: _jsx(TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: _jsx(FormattedMessage, { id: "ui.courses.filterByName", defaultMessage: "ui.courses.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
if (e.key === 'Enter') {
|
|
210
|
+
fetchCourses();
|
|
211
|
+
}
|
|
212
|
+
}, InputProps: {
|
|
213
|
+
endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? (_jsx(IconButton, Object.assign({ onClick: () => fetchCourses(), disabled: loading }, { children: _jsx(Icon, { children: "search" }) }))) : (_jsx(Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchCourses(), endIcon: _jsx(Icon, { children: "search" }), disabled: loading })) })))
|
|
214
|
+
} }) })), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && (_jsx(Grid, Object.assign({ item: true }, { children: _jsx(CoursesChipRoot, { color: showManagedCourses ? 'primary' : 'default', variant: showManagedCourses ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.courses.filterByManagedByMe", defaultMessage: "ui.courses.filterByManagedByMe" }), onClick: () => setShowManagedCourses(!showManagedCourses),
|
|
215
|
+
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
216
|
+
showManagedCourses: showManagedCourses, deleteIcon: showManagedCourses ? _jsx(Icon, { children: "close" }) : null, onDelete: showManagedCourses ? () => setShowManagedCourses(false) : null, disabled: loading || showMine }) }))), _jsx(Grid, Object.assign({ item: true, xs: 12, md: "auto" }, { children: _jsx(FormControl, Object.assign({ fullWidth: true }, { children: _jsx(CategoryAutocomplete, { onChange: handleOnChangeCategory, className: classes.category, size: "small", multiple: true }) })) })), authUserId && (_jsx(Grid, Object.assign({ item: true }, { children: _jsx(CoursesChipRoot, { color: showMine ? 'primary' : 'default', variant: showMine ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.courses.filterByMine", defaultMessage: "ui.courses.filterByMine" }), onClick: handleChipClick,
|
|
217
|
+
// @ts-expect-error this is needed to use showMine into SCCourses
|
|
218
|
+
showMine: showMine, deleteIcon: showMine ? _jsx(Icon, { children: "close" }) : null, onDelete: showMine ? handleDeleteClick : null, disabled: loading || showManagedCourses }) })))] })) }))), _jsx(_Fragment, { children: !courses.length ? (_jsx(Box, Object.assign({ className: classes.noResults }, { children: !canCreateCourse && onlyStaffEnabled ? (_jsxs(Stack, Object.assign({ className: classes.studentEmptyView }, { children: [_jsx(Stack, Object.assign({ className: classes.emptyBox }, { children: _jsx(Stack, Object.assign({ className: classes.emptyRotatedBox }, { children: _jsx(Icon, Object.assign({ className: classes.emptyIcon, color: "disabled", fontSize: "large" }, { children: "courses" })) })) })), _jsx(Typography, Object.assign({ variant: "h5", textAlign: "center" }, { children: _jsx(FormattedMessage, { id: "ui.courses.empty.title", defaultMessage: "ui.courses.empty.title" }) })), _jsx(Typography, Object.assign({ variant: "body1", textAlign: "center" }, { children: _jsx(FormattedMessage, { id: "ui.courses.empty.info", defaultMessage: "ui.courses.empty.info" }) }))] }))) : (_jsx(Box, Object.assign({ className: classes.teacherEmptyView }, { children: _jsx(Skeleton, Object.assign({ teacherView: (onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled, coursesNumber: 1 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps })) }))) }))) : (_jsx(InfiniteScroll, Object.assign({ dataLength: courses.length, next: handleNext, hasMoreNext: Boolean(next), loaderNext: isMobile ? (_jsx(CourseSkeleton, { template: SCCourseTemplateType.PREVIEW })) : (_jsx(Skeleton, Object.assign({ coursesNumber: 4 }, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps }))), endMessage: _jsx(Typography, Object.assign({ component: "div", className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.courses.endMessage", defaultMessage: "ui.courses.endMessage", values: {
|
|
219
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
220
|
+
// @ts-ignore
|
|
221
|
+
button: (chunk) => (_jsx(Button, Object.assign({ color: "secondary", variant: "text", onClick: handleScrollUp }, { children: chunk })))
|
|
222
|
+
} }) })) }, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: _jsxs(_Fragment, { children: [courses.map((course) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3, className: classes.item }, GridItemComponentProps, { children: _jsx(Course, Object.assign({ courseId: course.id }, CourseComponentProps)) }), course.id))), authUserId && ((onlyStaffEnabled && canCreateCourse) || !onlyStaffEnabled) && courses.length % 2 !== 0 && (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3, className: classes.itemPlaceholder }, GridItemComponentProps, { children: _jsx(CourseCreatePlaceholder, { CreateCourseButtonComponentProps: CreateCourseButtonComponentProps }) }), "placeholder-item"))] }) })) }))) })] }));
|
|
223
|
+
/**
|
|
224
|
+
* Renders root object (if content availability community option is false and user is anonymous, component is hidden)
|
|
225
|
+
*/
|
|
226
|
+
if (!contentAvailability && !scUserContext.user) {
|
|
227
|
+
return _jsx(HiddenPlaceholder, {});
|
|
228
|
+
}
|
|
229
|
+
if (loading) {
|
|
230
|
+
return _jsx(Skeleton, Object.assign({}, CoursesSkeletonComponentProps, { CourseSkeletonProps: CourseSkeletonComponentProps }));
|
|
231
|
+
}
|
|
232
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: c })));
|
|
233
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { GridProps } from '@mui/material';
|
|
2
|
+
export interface CoursesSkeletonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Overrides or extends the styles applied to the component.
|
|
10
|
+
* @default null
|
|
11
|
+
*/
|
|
12
|
+
CourseSkeletonProps?: any;
|
|
13
|
+
/**
|
|
14
|
+
* Props spread to grid container
|
|
15
|
+
* @default {}
|
|
16
|
+
*/
|
|
17
|
+
GridContainerComponentProps?: Pick<GridProps, Exclude<keyof GridProps, 'container' | 'component' | 'children' | 'item' | 'classes'>>;
|
|
18
|
+
/**
|
|
19
|
+
* Props spread to single grid item
|
|
20
|
+
* @default {}
|
|
21
|
+
*/
|
|
22
|
+
GridItemComponentProps?: Pick<GridProps, Exclude<keyof GridProps, 'container' | 'component' | 'children' | 'item' | 'classes'>>;
|
|
23
|
+
/**
|
|
24
|
+
* @default 20
|
|
25
|
+
*/
|
|
26
|
+
coursesNumber?: number;
|
|
27
|
+
/**
|
|
28
|
+
* If true, shows a different skeleton obj
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
31
|
+
teacherView?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/**https://www.figma.com/design/bm7N6ykMLLmaAA22g34bRY/Corsi?t=HKaD6ErrzGpYDJr1-0
|
|
34
|
+
* > API documentation for the Community-JS Groups Skeleton component. Learn about the available props and the CSS API.
|
|
35
|
+
|
|
36
|
+
#### Import
|
|
37
|
+
|
|
38
|
+
```jsx
|
|
39
|
+
import {CoursesSkeleton} from '@selfcommunity/react-ui';
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Component Name
|
|
43
|
+
|
|
44
|
+
The name `SCCourses-skeleton-root` can be used when providing style overrides in the theme.
|
|
45
|
+
|
|
46
|
+
#### CSS
|
|
47
|
+
|
|
48
|
+
|Rule Name|Global class|Description|
|
|
49
|
+
|---|---|---|
|
|
50
|
+
|root|.SCCourses-skeleton-root|Styles applied to the root element.|
|
|
51
|
+
|courses|.SCCourses-skeleton-courses|Styles applied to the group elements.|
|
|
52
|
+
*
|
|
53
|
+
*/
|
|
54
|
+
export default function CoursesSkeleton(inProps: CoursesSkeletonProps): JSX.Element;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { PREFIX } from './constants';
|
|
5
|
+
import { Box, Grid } from '@mui/material';
|
|
6
|
+
import classNames from 'classnames';
|
|
7
|
+
import { CourseSkeleton } from '../Course';
|
|
8
|
+
import CourseCreatePlaceholder from '../Course/CreatePlaceholder';
|
|
9
|
+
const classes = {
|
|
10
|
+
root: `${PREFIX}-skeleton-root`,
|
|
11
|
+
courses: `${PREFIX}-skeleton-courses`,
|
|
12
|
+
item: `${PREFIX}-skeleton-item`
|
|
13
|
+
};
|
|
14
|
+
const Root = styled(Box, {
|
|
15
|
+
name: PREFIX,
|
|
16
|
+
slot: 'SkeletonRoot'
|
|
17
|
+
})(() => ({}));
|
|
18
|
+
/**https://www.figma.com/design/bm7N6ykMLLmaAA22g34bRY/Corsi?t=HKaD6ErrzGpYDJr1-0
|
|
19
|
+
* > API documentation for the Community-JS Groups Skeleton component. Learn about the available props and the CSS API.
|
|
20
|
+
|
|
21
|
+
#### Import
|
|
22
|
+
|
|
23
|
+
```jsx
|
|
24
|
+
import {CoursesSkeleton} from '@selfcommunity/react-ui';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Component Name
|
|
28
|
+
|
|
29
|
+
The name `SCCourses-skeleton-root` can be used when providing style overrides in the theme.
|
|
30
|
+
|
|
31
|
+
#### CSS
|
|
32
|
+
|
|
33
|
+
|Rule Name|Global class|Description|
|
|
34
|
+
|---|---|---|
|
|
35
|
+
|root|.SCCourses-skeleton-root|Styles applied to the root element.|
|
|
36
|
+
|courses|.SCCourses-skeleton-courses|Styles applied to the group elements.|
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export default function CoursesSkeleton(inProps) {
|
|
40
|
+
const { className, CourseSkeletonProps = {}, coursesNumber = 8, GridContainerComponentProps = {}, GridItemComponentProps = {}, teacherView = false } = inProps, rest = __rest(inProps, ["className", "CourseSkeletonProps", "coursesNumber", "GridContainerComponentProps", "GridItemComponentProps", "teacherView"]);
|
|
41
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: _jsx(Grid, Object.assign({ container: true, spacing: { xs: 3 }, className: classes.courses }, GridContainerComponentProps, { children: [...Array(coursesNumber)].map((course, index) => (_jsx(Grid, Object.assign({ item: true, xs: 12, sm: 12, md: 6, lg: 3 }, GridItemComponentProps, { className: classes.item }, { children: teacherView ? _jsx(CourseCreatePlaceholder, {}) : _jsx(CourseSkeleton, Object.assign({}, CourseSkeletonProps)) }), index))) })) })));
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCourses";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCCourses';
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const prefetchedCourses: {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
slug: string;
|
|
5
|
+
type: string;
|
|
6
|
+
privacy: string;
|
|
7
|
+
image_bigger: string;
|
|
8
|
+
image_big: string;
|
|
9
|
+
image_medium: string;
|
|
10
|
+
image_small: string;
|
|
11
|
+
join_status: string;
|
|
12
|
+
created_at: string;
|
|
13
|
+
created_by: {
|
|
14
|
+
id: number;
|
|
15
|
+
username: string;
|
|
16
|
+
real_name: string;
|
|
17
|
+
avatar: string;
|
|
18
|
+
ext_id: any;
|
|
19
|
+
deleted: boolean;
|
|
20
|
+
followings_counter: number;
|
|
21
|
+
followers_counter: number;
|
|
22
|
+
posts_counter: number;
|
|
23
|
+
discussions_counter: number;
|
|
24
|
+
polls_counter: number;
|
|
25
|
+
categories_counter: number;
|
|
26
|
+
date_joined: string;
|
|
27
|
+
bio: string;
|
|
28
|
+
location: string;
|
|
29
|
+
location_lat_lng: any;
|
|
30
|
+
position_lat_lng: any;
|
|
31
|
+
date_of_birth: string;
|
|
32
|
+
description: string;
|
|
33
|
+
gender: string;
|
|
34
|
+
website: string;
|
|
35
|
+
cover: string;
|
|
36
|
+
tags: {
|
|
37
|
+
id: number;
|
|
38
|
+
type: string;
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
color: string;
|
|
42
|
+
visible: boolean;
|
|
43
|
+
visibility_boost: boolean;
|
|
44
|
+
active: boolean;
|
|
45
|
+
deleted: boolean;
|
|
46
|
+
created_at: string;
|
|
47
|
+
}[];
|
|
48
|
+
reputation: number;
|
|
49
|
+
language: string;
|
|
50
|
+
community_badge: boolean;
|
|
51
|
+
reg_approved: boolean;
|
|
52
|
+
job: string;
|
|
53
|
+
store: string;
|
|
54
|
+
brand: string;
|
|
55
|
+
race: string;
|
|
56
|
+
};
|
|
57
|
+
categories: {
|
|
58
|
+
id: number;
|
|
59
|
+
tags: any[];
|
|
60
|
+
followed: boolean;
|
|
61
|
+
order: number;
|
|
62
|
+
name: string;
|
|
63
|
+
name_synonyms: string;
|
|
64
|
+
slug: string;
|
|
65
|
+
slogan: string;
|
|
66
|
+
html_info: any;
|
|
67
|
+
seo_title: string;
|
|
68
|
+
seo_description: string;
|
|
69
|
+
auto_follow: string;
|
|
70
|
+
active: boolean;
|
|
71
|
+
image_original: string;
|
|
72
|
+
image_bigger: string;
|
|
73
|
+
image_big: string;
|
|
74
|
+
image_medium: string;
|
|
75
|
+
image_small: string;
|
|
76
|
+
emotional_image_original: string;
|
|
77
|
+
emotional_image_position: number;
|
|
78
|
+
stream_order_by: string;
|
|
79
|
+
followers_counter: number;
|
|
80
|
+
}[];
|
|
81
|
+
}[];
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
export const prefetchedCourses = [
|
|
2
|
+
{
|
|
3
|
+
id: 1,
|
|
4
|
+
name: 'Distributed multi-state capability',
|
|
5
|
+
slug: 'distributed-multi-state-capability',
|
|
6
|
+
type: 'structured',
|
|
7
|
+
privacy: 'open',
|
|
8
|
+
image_bigger: 'https://static-cache.quentrix.com/wioggmfc/upfiles/structureds/bigger/distributed-multi-state-capability_3372.jpg',
|
|
9
|
+
image_big: 'https://static-cache.quentrix.com/wioggmfc/upfiles/structureds/big/distributed-multi-state-capability_0486.jpg',
|
|
10
|
+
image_medium: 'https://static-cache.quentrix.com/wioggmfc/upfiles/structureds/medium/distributed-multi-state-capability_5903.jpg',
|
|
11
|
+
image_small: 'https://static-cache.quentrix.com/wioggmfc/upfiles/structureds/small/distributed-multi-state-capability_6812.jpg',
|
|
12
|
+
join_status: 'manager',
|
|
13
|
+
created_at: '2025-01-16T14:52:24.400913+01:00',
|
|
14
|
+
created_by: {
|
|
15
|
+
id: 9,
|
|
16
|
+
username: 'team',
|
|
17
|
+
real_name: '',
|
|
18
|
+
avatar: 'https://static-cache.quentrix.com/wioggmfc/upfiles/svg/T9.svg',
|
|
19
|
+
ext_id: null,
|
|
20
|
+
deleted: false,
|
|
21
|
+
followings_counter: 0,
|
|
22
|
+
followers_counter: 5,
|
|
23
|
+
posts_counter: 12,
|
|
24
|
+
discussions_counter: 4,
|
|
25
|
+
polls_counter: 4,
|
|
26
|
+
categories_counter: 2,
|
|
27
|
+
date_joined: '2024-04-10T14:37:48.153981+02:00',
|
|
28
|
+
bio: '',
|
|
29
|
+
location: '',
|
|
30
|
+
location_lat_lng: null,
|
|
31
|
+
position_lat_lng: null,
|
|
32
|
+
date_of_birth: null,
|
|
33
|
+
description: '',
|
|
34
|
+
gender: 'Unspecified',
|
|
35
|
+
website: '',
|
|
36
|
+
cover: null,
|
|
37
|
+
tags: [],
|
|
38
|
+
reputation: 159,
|
|
39
|
+
language: 'it',
|
|
40
|
+
community_badge: true,
|
|
41
|
+
reg_approved: true,
|
|
42
|
+
job: 'Barbiere',
|
|
43
|
+
store: 'Brescia',
|
|
44
|
+
brand: 'Prima Classe',
|
|
45
|
+
race: null
|
|
46
|
+
},
|
|
47
|
+
categories: [
|
|
48
|
+
{
|
|
49
|
+
id: 1,
|
|
50
|
+
tags: [],
|
|
51
|
+
followed: true,
|
|
52
|
+
order: 14,
|
|
53
|
+
name: 'Band preferite',
|
|
54
|
+
name_synonyms: '',
|
|
55
|
+
slug: 'band-preferite',
|
|
56
|
+
slogan: "Note che si trasformano in emozioni: condividi la tua passione musicale, esplorando insieme le band preferite che ti fanno vibrare l'anima.",
|
|
57
|
+
html_info: null,
|
|
58
|
+
seo_title: '',
|
|
59
|
+
seo_description: '',
|
|
60
|
+
auto_follow: 'none',
|
|
61
|
+
active: true,
|
|
62
|
+
image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/original/band-preferite_4420.png',
|
|
63
|
+
image_bigger: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/bigger/band-preferite_8770.png',
|
|
64
|
+
image_big: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/big/band-preferite_7524.png',
|
|
65
|
+
image_medium: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/medium/band-preferite_8937.png',
|
|
66
|
+
image_small: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/small/band-preferite_3325.png',
|
|
67
|
+
emotional_image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/e_original/band-preferite_4837.png',
|
|
68
|
+
emotional_image_position: 50,
|
|
69
|
+
stream_order_by: 'recent',
|
|
70
|
+
followers_counter: 315
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 2,
|
|
76
|
+
name: 'Pre-emptive fresh-thinking frame',
|
|
77
|
+
slug: 'pre-emptive-fresh-thinking-frame',
|
|
78
|
+
type: 'scheduled',
|
|
79
|
+
privacy: 'open',
|
|
80
|
+
image_bigger: 'https://static-cache.quentrix.com/wioggmfc/upfiles/scheduleds/bigger/pre-emptive-fresh-thinking-frame_1155.jpg',
|
|
81
|
+
image_big: 'https://static-cache.quentrix.com/wioggmfc/upfiles/scheduleds/big/pre-emptive-fresh-thinking-frame_2446.jpg',
|
|
82
|
+
image_medium: 'https://static-cache.quentrix.com/wioggmfc/upfiles/scheduleds/medium/pre-emptive-fresh-thinking-frame_3088.jpg',
|
|
83
|
+
image_small: 'https://static-cache.quentrix.com/wioggmfc/upfiles/scheduleds/small/pre-emptive-fresh-thinking-frame_3209.jpg',
|
|
84
|
+
join_status: 'joined',
|
|
85
|
+
created_at: '2025-01-20T12:38:43.200219+01:00',
|
|
86
|
+
created_by: {
|
|
87
|
+
id: 1,
|
|
88
|
+
username: 'admin',
|
|
89
|
+
real_name: 'Amministratore',
|
|
90
|
+
avatar: 'https://static-cache.quentrix.com/wioggmfc/upfiles/avatars/1/resized/209/209/28b02add2c23b3a71801734eba773592.png',
|
|
91
|
+
ext_id: null,
|
|
92
|
+
deleted: false,
|
|
93
|
+
followings_counter: 1,
|
|
94
|
+
followers_counter: 4,
|
|
95
|
+
posts_counter: 614,
|
|
96
|
+
discussions_counter: 551,
|
|
97
|
+
polls_counter: 84,
|
|
98
|
+
categories_counter: 5,
|
|
99
|
+
date_joined: '2024-04-10T13:23:59.754335+02:00',
|
|
100
|
+
bio: 'Vidi, feci, raccontai e poi me ne andai',
|
|
101
|
+
location: 'Milano',
|
|
102
|
+
location_lat_lng: null,
|
|
103
|
+
position_lat_lng: null,
|
|
104
|
+
date_of_birth: '1973-07-09',
|
|
105
|
+
description: 'Avvocato Civilista',
|
|
106
|
+
gender: 'Unspecified',
|
|
107
|
+
website: 'https://selfcommunity.com/',
|
|
108
|
+
cover: 'https://static-cache.quentrix.com/wioggmfc/upfiles/user_media/admin/cover/55655364-f786-4ead-a97f-56b1770ad951.jpg',
|
|
109
|
+
tags: [
|
|
110
|
+
{
|
|
111
|
+
id: 93,
|
|
112
|
+
type: 'user',
|
|
113
|
+
name: 'PINO',
|
|
114
|
+
description: '',
|
|
115
|
+
color: '#e57373',
|
|
116
|
+
visible: true,
|
|
117
|
+
visibility_boost: false,
|
|
118
|
+
active: true,
|
|
119
|
+
deleted: false,
|
|
120
|
+
created_at: '2024-05-31T16:15:43.986224+02:00'
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
reputation: 2748,
|
|
124
|
+
language: 'it',
|
|
125
|
+
community_badge: false,
|
|
126
|
+
reg_approved: true,
|
|
127
|
+
job: 'JR Clinic Manager',
|
|
128
|
+
store: 'Erbusco',
|
|
129
|
+
brand: 'Il Barbiere',
|
|
130
|
+
race: 'Umano'
|
|
131
|
+
},
|
|
132
|
+
categories: [
|
|
133
|
+
{
|
|
134
|
+
id: 1,
|
|
135
|
+
tags: [],
|
|
136
|
+
followed: true,
|
|
137
|
+
order: 14,
|
|
138
|
+
name: 'Band preferite',
|
|
139
|
+
name_synonyms: '',
|
|
140
|
+
slug: 'band-preferite',
|
|
141
|
+
slogan: "Note che si trasformano in emozioni: condividi la tua passione musicale, esplorando insieme le band preferite che ti fanno vibrare l'anima.",
|
|
142
|
+
html_info: null,
|
|
143
|
+
seo_title: '',
|
|
144
|
+
seo_description: '',
|
|
145
|
+
auto_follow: 'none',
|
|
146
|
+
active: true,
|
|
147
|
+
image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/original/band-preferite_4420.png',
|
|
148
|
+
image_bigger: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/bigger/band-preferite_8770.png',
|
|
149
|
+
image_big: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/big/band-preferite_7524.png',
|
|
150
|
+
image_medium: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/medium/band-preferite_8937.png',
|
|
151
|
+
image_small: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/small/band-preferite_3325.png',
|
|
152
|
+
emotional_image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/e_original/band-preferite_4837.png',
|
|
153
|
+
emotional_image_position: 50,
|
|
154
|
+
stream_order_by: 'recent',
|
|
155
|
+
followers_counter: 315
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 2,
|
|
159
|
+
tags: [],
|
|
160
|
+
followed: true,
|
|
161
|
+
order: 13,
|
|
162
|
+
name: 'Nuovi generi musicali alternativi',
|
|
163
|
+
name_synonyms: '#alternative',
|
|
164
|
+
slug: 'nuovi-generi-musicali',
|
|
165
|
+
slogan: "Esplora l'innovazione sonora e scopri nuovi ritmi inaspettati. Abbraccia l'originalità dei nuovi generi musicali alternativi e lasciati trasportare dalle vibrazioni uniche.",
|
|
166
|
+
html_info: null,
|
|
167
|
+
seo_title: '',
|
|
168
|
+
seo_description: '',
|
|
169
|
+
auto_follow: 'forced',
|
|
170
|
+
active: true,
|
|
171
|
+
image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/original/nuovi-generi-musicali_5714.png',
|
|
172
|
+
image_bigger: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/bigger/nuovi-generi-musicali_8854.png',
|
|
173
|
+
image_big: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/big/nuovi-generi-musicali_0593.png',
|
|
174
|
+
image_medium: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/medium/nuovi-generi-musicali_0368.png',
|
|
175
|
+
image_small: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/small/nuovi-generi-musicali_7491.png',
|
|
176
|
+
emotional_image_original: 'https://static-cache.quentrix.com/wioggmfc/upfiles/categories/e_original/nuovi-generi-musicali_7739.png',
|
|
177
|
+
emotional_image_position: 50,
|
|
178
|
+
stream_order_by: 'recent',
|
|
179
|
+
followers_counter: 345
|
|
180
|
+
}
|
|
181
|
+
]
|
|
182
|
+
}
|
|
183
|
+
];
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ButtonProps } from '@mui/material';
|
|
2
|
+
import { CourseFormDialogProps } from '../CourseFormDialog';
|
|
3
|
+
export interface CreateCourseButtonProps extends ButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Overrides or extends the styles applied to the component.
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Props to spread to CreateGroup component
|
|
11
|
+
* @default empty object
|
|
12
|
+
*/
|
|
13
|
+
CourseFormDialogComponentProps?: CourseFormDialogProps;
|
|
14
|
+
/**
|
|
15
|
+
* Any other properties
|
|
16
|
+
*/
|
|
17
|
+
[p: string]: any;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
|
|
21
|
+
*
|
|
22
|
+
#### Import
|
|
23
|
+
```jsx
|
|
24
|
+
import {CreateCourseButton} from '@selfcommunity/react-ui';
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
#### Component Name
|
|
28
|
+
The name `SCCreateCourseButton` can be used when providing style overrides in the theme.
|
|
29
|
+
|
|
30
|
+
#### CSS
|
|
31
|
+
|
|
32
|
+
|Rule Name|Global class|Description|
|
|
33
|
+
|---|---|---|
|
|
34
|
+
|root|.SCCreateCourseButton-root|Styles applied to the root element.|
|
|
35
|
+
|
|
36
|
+
* @param inProps
|
|
37
|
+
*/
|
|
38
|
+
export default function CreateCourseButton(inProps: CreateCourseButtonProps): JSX.Element;
|