@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,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
const material_1 = require("@mui/material");
|
|
5
|
+
function CourseUsersTableRowSkeleton(props) {
|
|
6
|
+
const { header = false, animation = 'wave', editMode = false } = props;
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TableRow, { children: Array.from(new Array(editMode ? 4 : 5)).map((_, i, array) => {
|
|
8
|
+
if (!editMode && i === array.length - 1) {
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(material_1.TableCell, Object.assign({ width: "14%" }, { children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "rounded", width: "139px", height: "29px" }) }), i));
|
|
10
|
+
}
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.TableCell, Object.assign({ width: !editMode ? '20%' : '25%' }, { children: [!header && i === 0 && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", alignItems: "center", gap: "16px" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "circular", width: "30px", height: "30px" }), (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "text", width: "118px", height: "24px" })] }))), ((!header && i > 0) || header) && (0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: animation, variant: "text", width: "78px", height: "24px" })] }), i));
|
|
12
|
+
}) }));
|
|
13
|
+
}
|
|
14
|
+
exports.default = CourseUsersTableRowSkeleton;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SCCourseType, SCUserType } from '@selfcommunity/types';
|
|
3
|
+
interface SeeProgressButtonProps {
|
|
4
|
+
course: SCCourseType;
|
|
5
|
+
user: SCUserType;
|
|
6
|
+
}
|
|
7
|
+
declare function SeeProgressButton(props: SeeProgressButtonProps): JSX.Element;
|
|
8
|
+
declare const _default: import("react").MemoExoticComponent<typeof SeeProgressButton>;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,56 @@
|
|
|
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 material_1 = require("@mui/material");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const react_intl_1 = require("react-intl");
|
|
8
|
+
const BaseDialog_1 = tslib_1.__importDefault(require("../BaseDialog"));
|
|
9
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
10
|
+
const constants_1 = require("./constants");
|
|
11
|
+
const AccordionLessons_1 = tslib_1.__importDefault(require("../AccordionLessons"));
|
|
12
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
13
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
14
|
+
const Errors_1 = require("../../constants/Errors");
|
|
15
|
+
const UserAvatar_1 = tslib_1.__importDefault(require("../UserAvatar"));
|
|
16
|
+
const classes = {
|
|
17
|
+
dialogRoot: `${constants_1.PREFIX}-dialog-root`,
|
|
18
|
+
contentWrapper: `${constants_1.PREFIX}-content-wrapper`,
|
|
19
|
+
infoOuterWrapper: `${constants_1.PREFIX}-info-outer-wrapper`,
|
|
20
|
+
infoInnerWrapper: `${constants_1.PREFIX}-info-inner-wrapper`,
|
|
21
|
+
avatarWrapper: `${constants_1.PREFIX}-avatar-wrapper`,
|
|
22
|
+
avatar: `${constants_1.PREFIX}-avatar`
|
|
23
|
+
};
|
|
24
|
+
const DialogRoot = (0, material_1.styled)(BaseDialog_1.default, {
|
|
25
|
+
name: constants_1.PREFIX,
|
|
26
|
+
slot: 'DialogRoot',
|
|
27
|
+
overridesResolver: (_props, styles) => styles.dialogRoot
|
|
28
|
+
})(() => ({}));
|
|
29
|
+
function SeeProgressButton(props) {
|
|
30
|
+
// PROPS
|
|
31
|
+
const { course, user } = props;
|
|
32
|
+
// STATES
|
|
33
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
34
|
+
const [student, setStudent] = (0, react_1.useState)(null);
|
|
35
|
+
// CONTEXTS
|
|
36
|
+
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
37
|
+
// HOOKS
|
|
38
|
+
const theme = (0, material_1.useTheme)();
|
|
39
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
40
|
+
// EFFECTS
|
|
41
|
+
(0, react_1.useEffect)(() => {
|
|
42
|
+
if (open && !student) {
|
|
43
|
+
api_services_1.CourseService.getSpecificCourseInfo(course.id, { user: user.id })
|
|
44
|
+
.then((data) => setStudent(data))
|
|
45
|
+
.catch((error) => utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error));
|
|
46
|
+
}
|
|
47
|
+
}, [open, student, course, user]);
|
|
48
|
+
// HANDLERS
|
|
49
|
+
const handleToggleOpen = (0, react_1.useCallback)(() => {
|
|
50
|
+
setOpen((prev) => !prev);
|
|
51
|
+
}, [setOpen]);
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ size: "small", color: "inherit", onClick: handleToggleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "chevron_right" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "outlined", size: "small", color: "inherit", onClick: handleToggleOpen }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.action.btn.label", defaultMessage: "ui.courseUsersTable.action.btn.label" }) })) }))), open && ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ DialogContentProps: { dividers: isMobile }, open: true, scroll: "paper", onClose: handleToggleOpen, title: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.dialog.title", defaultMessage: "ui.courseUsersTable.dialog.title" }) })), className: classes.dialogRoot }, { children: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.contentWrapper }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.infoOuterWrapper }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.infoInnerWrapper }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.avatarWrapper }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!course.created_by.deleted && {
|
|
53
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, course.created_by)
|
|
54
|
+
}), { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !course.created_by.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, src: user.avatar, alt: user.username }) })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: user.username }))] })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, user), variant: "outlined", size: "small", color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.dialog.btn.label", defaultMessage: "ui.courseUsersTable.dialog.btn.label" }) })) }))] })), student ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.dialog.info.text1", defaultMessage: "ui.courseUsersTable.dialog.info.text1", values: { lessonsCompleted: student.num_lessons_completed } }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "text", width: "100px", height: "21px" })), student ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.courseUsersTable.dialog.info.text2", defaultMessage: "ui.courseUsersTable.dialog.info.text2", values: { courseCompleted: student.user_completion_rate } }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "text", width: "100px", height: "21px" }))] })), (0, jsx_runtime_1.jsx)(AccordionLessons_1.default, { course: student, viewerJoinStatus: course.join_status })] })) })))] }));
|
|
55
|
+
}
|
|
56
|
+
exports.default = (0, react_1.memo)(SeeProgressButton);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function CourseUsersTableSkeleton(): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
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 material_1 = require("@mui/material");
|
|
6
|
+
const RowSkeleton_1 = tslib_1.__importDefault(require("./RowSkeleton"));
|
|
7
|
+
const constants_1 = require("./constants");
|
|
8
|
+
const classes = {
|
|
9
|
+
root: `${constants_1.PREFIX}-skeleton-root`
|
|
10
|
+
};
|
|
11
|
+
const Root = (0, material_1.styled)(material_1.Box, {
|
|
12
|
+
name: constants_1.PREFIX,
|
|
13
|
+
slot: 'SkeletonRoot',
|
|
14
|
+
overridesResolver: (_props, styles) => styles.skeletonRoot
|
|
15
|
+
})(() => ({}));
|
|
16
|
+
function CourseUsersTableSkeleton() {
|
|
17
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, { children: [(0, jsx_runtime_1.jsx)(material_1.Skeleton, { animation: "wave", variant: "rectangular", width: "100%", height: "53px" }), (0, jsx_runtime_1.jsx)(material_1.TableContainer, { children: (0, jsx_runtime_1.jsxs)(material_1.Table, { children: [(0, jsx_runtime_1.jsx)(material_1.TableHead, { children: (0, jsx_runtime_1.jsx)(RowSkeleton_1.default, { header: true, editMode: true }) }), (0, jsx_runtime_1.jsx)(material_1.TableBody, { children: (0, jsx_runtime_1.jsx)(RowSkeleton_1.default, { editMode: true }) })] }) })] })));
|
|
18
|
+
}
|
|
19
|
+
exports.default = CourseUsersTableSkeleton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCourseUsersTable";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CourseUsersTableSkeleton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const CourseUsersTable_1 = tslib_1.__importDefault(require("./CourseUsersTable"));
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
7
|
+
exports.CourseUsersTableSkeleton = Skeleton_1.default;
|
|
8
|
+
exports.default = CourseUsersTable_1.default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface EmptyStatusProps {
|
|
3
|
+
icon: string;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
actions?: ReactNode;
|
|
7
|
+
className?: HTMLAttributes<HTMLDivElement>['className'];
|
|
8
|
+
}
|
|
9
|
+
declare function EmptyStatus(props: EmptyStatusProps): JSX.Element;
|
|
10
|
+
declare const _default: import("react").MemoExoticComponent<typeof EmptyStatus>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 material_1 = require("@mui/material");
|
|
6
|
+
const react_intl_1 = require("react-intl");
|
|
7
|
+
const react_1 = require("react");
|
|
8
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
9
|
+
const PREFIX = 'SCEmptyStatus';
|
|
10
|
+
const classes = {
|
|
11
|
+
root: `${PREFIX}-root`,
|
|
12
|
+
box: `${PREFIX}-box`,
|
|
13
|
+
rotatedBox: `${PREFIX}-rotated-box`,
|
|
14
|
+
icon: `${PREFIX}-icon`
|
|
15
|
+
};
|
|
16
|
+
const Root = (0, material_1.styled)(material_1.Stack, {
|
|
17
|
+
name: PREFIX,
|
|
18
|
+
slot: 'Root',
|
|
19
|
+
overridesResolver: (_props, styles) => styles.root
|
|
20
|
+
})(() => ({}));
|
|
21
|
+
function EmptyStatus(props) {
|
|
22
|
+
// PROPS
|
|
23
|
+
const { icon, title, description, actions, className } = props;
|
|
24
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.box }, { children: (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.rotatedBox }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.icon, color: "disabled", fontSize: "large" }, { children: icon })) })) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: title, defaultMessage: title }) })), description && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: description, defaultMessage: description }) }))), actions] })));
|
|
25
|
+
}
|
|
26
|
+
exports.default = (0, react_1.memo)(EmptyStatus);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { SCCourseCommentType, SCCourseLessonType } from '@selfcommunity/types';
|
|
2
|
+
export interface LessonCommentActionsMenuProps {
|
|
3
|
+
/**
|
|
4
|
+
* Overrides or extends the styles applied to the component.
|
|
5
|
+
* @default null
|
|
6
|
+
*/
|
|
7
|
+
className?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Course Lesson obj
|
|
10
|
+
* @default null
|
|
11
|
+
*/
|
|
12
|
+
lesson: SCCourseLessonType;
|
|
13
|
+
/**
|
|
14
|
+
* Course CommentObject id
|
|
15
|
+
* @default null
|
|
16
|
+
*/
|
|
17
|
+
commentObjectId?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Course Comment obj
|
|
20
|
+
* @default null
|
|
21
|
+
*/
|
|
22
|
+
commentObject: SCCourseCommentType;
|
|
23
|
+
/**
|
|
24
|
+
* Handle edit obj
|
|
25
|
+
*/
|
|
26
|
+
onEdit?: (obj: SCCourseCommentType) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Handle delete obj
|
|
29
|
+
*/
|
|
30
|
+
onDelete?: (obj: SCCourseCommentType) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Props to spread to popper
|
|
33
|
+
* @default empty object
|
|
34
|
+
*/
|
|
35
|
+
PopperProps?: any;
|
|
36
|
+
/**
|
|
37
|
+
* Any other properties
|
|
38
|
+
*/
|
|
39
|
+
[p: string]: any;
|
|
40
|
+
}
|
|
41
|
+
export default function LessonCommentActionsMenu(props: LessonCommentActionsMenuProps): JSX.Element;
|
|
@@ -0,0 +1,197 @@
|
|
|
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 react_intl_1 = require("react-intl");
|
|
8
|
+
const Popper_1 = tslib_1.__importDefault(require("@mui/material/Popper"));
|
|
9
|
+
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
10
|
+
const CentralProgress_1 = tslib_1.__importDefault(require("../CentralProgress"));
|
|
11
|
+
const Errors_1 = require("../../constants/Errors");
|
|
12
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
13
|
+
const notistack_1 = require("notistack");
|
|
14
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
15
|
+
const ConfirmDialog_1 = tslib_1.__importDefault(require("../ConfirmDialog/ConfirmDialog"));
|
|
16
|
+
const material_1 = require("@mui/material");
|
|
17
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
18
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
19
|
+
const EDIT_COMMENT = '_edit_comment';
|
|
20
|
+
const DELETE_COMMENT = '_delete_comment';
|
|
21
|
+
const PREFIX = 'SCLessonCommentActionsMenu';
|
|
22
|
+
const classes = {
|
|
23
|
+
root: `${PREFIX}-root`,
|
|
24
|
+
button: `${PREFIX}-button`,
|
|
25
|
+
popperRoot: `${PREFIX}-popper-root`,
|
|
26
|
+
paper: `${PREFIX}-paper`,
|
|
27
|
+
item: `${PREFIX}-item`,
|
|
28
|
+
itemText: `${PREFIX}-item-text`,
|
|
29
|
+
subItem: `${PREFIX}-sub-item`
|
|
30
|
+
};
|
|
31
|
+
const PopperRoot = (0, styles_1.styled)(Popper_1.default, {
|
|
32
|
+
name: PREFIX,
|
|
33
|
+
slot: 'Root',
|
|
34
|
+
overridesResolver: (props, styles) => styles.popperRoot
|
|
35
|
+
})(() => ({}));
|
|
36
|
+
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
37
|
+
name: PREFIX,
|
|
38
|
+
slot: 'Root',
|
|
39
|
+
overridesResolver: (props, styles) => styles.root
|
|
40
|
+
})(() => ({}));
|
|
41
|
+
function LessonCommentActionsMenu(props) {
|
|
42
|
+
// PROPS
|
|
43
|
+
const { className, lesson, commentObjectId, commentObject, onEdit, onDelete, PopperProps = {} } = props, rest = tslib_1.__rest(props, ["className", "lesson", "commentObjectId", "commentObject", "onEdit", "onDelete", "PopperProps"]);
|
|
44
|
+
// CONTEXT
|
|
45
|
+
const theme = (0, material_1.useTheme)();
|
|
46
|
+
const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
|
|
47
|
+
const scContext = (0, react_1.useContext)(react_core_1.SCContext);
|
|
48
|
+
const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
|
|
49
|
+
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
50
|
+
// COMMENT STATE
|
|
51
|
+
const { obj: commentObj, setObj: setCommentObj } = (0, react_core_1.useSCFetchLessonCommentObject)({ id: commentObjectId, commentObject: commentObject, lesson: lesson });
|
|
52
|
+
// GENERAL POPPER STATE
|
|
53
|
+
const [open, setOpen] = (0, react_1.useState)(false);
|
|
54
|
+
// CONFIRM ACTION DIALOG STATE
|
|
55
|
+
const [openConfirmDialog, setOpenConfirmDialog] = (0, react_1.useState)(false);
|
|
56
|
+
const [currentAction, setCurrentAction] = (0, react_1.useState)(null);
|
|
57
|
+
const [currentActionLoading, setCurrentActionLoading] = (0, react_1.useState)(null);
|
|
58
|
+
// CONST
|
|
59
|
+
let popperRef = (0, react_1.useRef)(null);
|
|
60
|
+
/**
|
|
61
|
+
* Handles open popup
|
|
62
|
+
*/
|
|
63
|
+
function handleOpen() {
|
|
64
|
+
if (scUserContext.user) {
|
|
65
|
+
setOpen(true);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
scContext.settings.handleAnonymousAction();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Closes popup
|
|
73
|
+
*/
|
|
74
|
+
function handleClose() {
|
|
75
|
+
if (popperRef.current && popperRef.current.contains(event.target)) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
setOpen(false);
|
|
79
|
+
if (rest.onClose) {
|
|
80
|
+
rest.onClose();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Perform delete comment
|
|
85
|
+
*/
|
|
86
|
+
const performDeleteComment = (0, react_1.useMemo)(() => () => {
|
|
87
|
+
return api_services_1.http
|
|
88
|
+
.request({
|
|
89
|
+
url: api_services_1.Endpoints.DeleteCourseComment.url({
|
|
90
|
+
id: lesson.course_id,
|
|
91
|
+
section_id: lesson.section_id,
|
|
92
|
+
lesson_id: lesson.id,
|
|
93
|
+
comment_id: commentObject.id
|
|
94
|
+
}),
|
|
95
|
+
method: api_services_1.Endpoints.DeleteCourseComment.method
|
|
96
|
+
})
|
|
97
|
+
.then((res) => {
|
|
98
|
+
if (res.status >= 300) {
|
|
99
|
+
return Promise.reject(res);
|
|
100
|
+
}
|
|
101
|
+
return Promise.resolve(res.data);
|
|
102
|
+
});
|
|
103
|
+
}, [commentObj, lesson]);
|
|
104
|
+
/**
|
|
105
|
+
* handle action
|
|
106
|
+
*/
|
|
107
|
+
function handleAction(action) {
|
|
108
|
+
if (react_core_1.UserUtils.isBlocked(scUserContext.user) && [EDIT_COMMENT].includes(action)) {
|
|
109
|
+
// if user is blocked, deny edit and moderate
|
|
110
|
+
enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.common.userBlocked", defaultMessage: "ui.common.userBlocked" }), {
|
|
111
|
+
variant: 'warning',
|
|
112
|
+
autoHideDuration: 3000
|
|
113
|
+
});
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
if (action === EDIT_COMMENT) {
|
|
117
|
+
onEdit && onEdit(commentObj);
|
|
118
|
+
handleClose();
|
|
119
|
+
}
|
|
120
|
+
else {
|
|
121
|
+
setCurrentAction(DELETE_COMMENT);
|
|
122
|
+
setOpenConfirmDialog(true);
|
|
123
|
+
handleClose();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Perform additional operations at the end of single action
|
|
128
|
+
*/
|
|
129
|
+
function performPostConfirmAction(success) {
|
|
130
|
+
if (success) {
|
|
131
|
+
setCurrentActionLoading(null);
|
|
132
|
+
setCurrentAction(null);
|
|
133
|
+
setOpenConfirmDialog(false);
|
|
134
|
+
enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonCommentActionMenu.actionSuccess", defaultMessage: "ui.lessonCommentActionMenu.actionSuccess" }), {
|
|
135
|
+
variant: 'success',
|
|
136
|
+
autoHideDuration: 3000
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
setCurrentActionLoading(null);
|
|
141
|
+
enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonCommentActionMenu.actionError", defaultMessage: "ui.lessonCommentActionMenu.actionError" }), {
|
|
142
|
+
variant: 'error',
|
|
143
|
+
autoHideDuration: 3000
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Deletes a comment
|
|
149
|
+
*/
|
|
150
|
+
function handleConfirmedAction() {
|
|
151
|
+
if (commentObj && !currentActionLoading) {
|
|
152
|
+
if (currentAction === DELETE_COMMENT) {
|
|
153
|
+
setCurrentActionLoading(DELETE_COMMENT);
|
|
154
|
+
performDeleteComment()
|
|
155
|
+
.then(() => {
|
|
156
|
+
onDelete && onDelete(commentObj);
|
|
157
|
+
performPostConfirmAction(true);
|
|
158
|
+
})
|
|
159
|
+
.catch((error) => {
|
|
160
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
161
|
+
performPostConfirmAction(false);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* CIf the authenticated user can modify the comment
|
|
168
|
+
*/
|
|
169
|
+
function canModifyContribution() {
|
|
170
|
+
return scUserContext.user && scUserContext.user.id === commentObj.created_by.id;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* If the authenticated user can delete the comment
|
|
174
|
+
*/
|
|
175
|
+
function canDeleteContribution() {
|
|
176
|
+
return scUserContext.user && scUserContext.user.id === commentObj.created_by.id;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Renders comment menu content
|
|
180
|
+
*/
|
|
181
|
+
function renderContent() {
|
|
182
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: !commentObj ? ((0, jsx_runtime_1.jsx)(CentralProgress_1.default, { size: 30 })) : ((0, jsx_runtime_1.jsxs)(material_1.MenuList, { children: [canModifyContribution() && ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "edit" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonCommentActionMenu.edit", defaultMessage: "ui.lessonCommentActionMenu.edit" }), onClick: () => handleAction(EDIT_COMMENT), classes: { root: classes.itemText } })] }))), canDeleteContribution() && ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: currentActionLoading === DELETE_COMMENT ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 20 }) : (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "delete" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.lessonCommentActionMenu.delete", defaultMessage: "ui.lessonCommentActionMenu.delete" }), onClick: () => handleAction(DELETE_COMMENT), classes: { root: classes.itemText } })] })))] })) }));
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Renders component
|
|
186
|
+
*/
|
|
187
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton
|
|
188
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
189
|
+
// @ts-ignore
|
|
190
|
+
, Object.assign({
|
|
191
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
ref: (ref) => {
|
|
194
|
+
popperRef.current = ref;
|
|
195
|
+
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "more_vert" }) })), open && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: true, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: true, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "bottom-end" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: (0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))) })), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, { open: openConfirmDialog, onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) }))] })));
|
|
196
|
+
}
|
|
197
|
+
exports.default = LessonCommentActionsMenu;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface LessonFilePreviewProps {
|
|
2
|
+
/**
|
|
3
|
+
* Overrides or extends the styles applied to the component.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* The media object to show
|
|
9
|
+
*/
|
|
10
|
+
media: any;
|
|
11
|
+
}
|
|
12
|
+
export default function LessonFilePreview(props: LessonFilePreviewProps): JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
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 styles_1 = require("@mui/material/styles");
|
|
6
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
9
|
+
const Media_1 = require("../../constants/Media");
|
|
10
|
+
const PREFIX = 'SCLessonFilePreview';
|
|
11
|
+
const classes = {
|
|
12
|
+
root: `${PREFIX}-root`,
|
|
13
|
+
item: `${PREFIX}-item`,
|
|
14
|
+
title: `${PREFIX}-title`
|
|
15
|
+
};
|
|
16
|
+
const Root = (0, styles_1.styled)(material_1.Box, {
|
|
17
|
+
name: PREFIX,
|
|
18
|
+
slot: 'Root',
|
|
19
|
+
overridesResolver: (props, styles) => styles.root
|
|
20
|
+
})(() => ({}));
|
|
21
|
+
function LessonFilePreview(props) {
|
|
22
|
+
// PROPS
|
|
23
|
+
const { className, media } = props;
|
|
24
|
+
/**
|
|
25
|
+
* Renders component
|
|
26
|
+
*/
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className), sx: { backgroundImage: `url(${(media === null || media === void 0 ? void 0 : media.image_thumbnail) ? media.image_thumbnail.url : media.image})` } }, { children: media.title && ((0, jsx_runtime_1.jsx)(material_1.Link, Object.assign({ href: media.url, target: "_blank", rel: "noopener noreferrer" }, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.title }, { children: [media.type === Media_1.MEDIA_TYPE_DOCUMENT && (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "picture_as_pdf" }), media.title] })) }))) }), media.id));
|
|
28
|
+
}
|
|
29
|
+
exports.default = LessonFilePreview;
|
|
@@ -16,6 +16,7 @@ const INITIAL_STATE = {
|
|
|
16
16
|
urlError: null
|
|
17
17
|
};
|
|
18
18
|
exports.default = (props) => {
|
|
19
|
+
var _a, _b;
|
|
19
20
|
// STATE
|
|
20
21
|
const [isCreating, setIsCreating] = (0, react_1.useState)(false);
|
|
21
22
|
const [state, setState] = (0, react_1.useState)(Object.assign({}, INITIAL_STATE));
|
|
@@ -75,7 +76,5 @@ exports.default = (props) => {
|
|
|
75
76
|
* Renders url text field
|
|
76
77
|
*/
|
|
77
78
|
return ((0, jsx_runtime_1.jsx)("form", Object.assign({ method: "post", onSubmit: handleSubmit }, { children: (0, jsx_runtime_1.jsx)(TextField_1.default, Object.assign({ value: url, type: "url", onChange: handleChange, onPaste: handlePaste, error: error || Boolean(urlError), helperText: helperText ||
|
|
78
|
-
(urlError && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.composer.media.link.add.error.${urlError}`, defaultMessage: `ui.composer.media.link.add.error.${urlError}` }))) || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.media.link.add.help", defaultMessage: "ui.composer.media.link.add.help" }), disabled: isCreating }, rest, { InputProps: {
|
|
79
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Fade, Object.assign({ in: urlError === null && url !== '' }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.default, Object.assign({ size: "small", disabled: isCreating, type: "submit" }, { children: isCreating ? (0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "primary", size: 20 }) : (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.media.link.add.submit", defaultMessage: "ui.composer.media.link.add.submit" }) })) })) })))
|
|
80
|
-
} })) })));
|
|
79
|
+
(urlError && ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.composer.media.link.add.error.${urlError}`, defaultMessage: `ui.composer.media.link.add.error.${urlError}` }))) || (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.media.link.add.help", defaultMessage: "ui.composer.media.link.add.help" }), disabled: isCreating }, rest, { InputProps: Object.assign(Object.assign({}, rest.InputProps), { endAdornment: ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: url === '' && ((_a = rest.InputProps) === null || _a === void 0 ? void 0 : _a.endAdornment) ? ((_b = rest.InputProps) === null || _b === void 0 ? void 0 : _b.endAdornment) : ((0, jsx_runtime_1.jsx)(InputAdornment_1.default, Object.assign({ position: "end" }, { children: (0, jsx_runtime_1.jsx)(material_1.Fade, Object.assign({ in: urlError === null && url !== '' }, { children: (0, jsx_runtime_1.jsx)(IconButton_1.default, Object.assign({ size: "small", disabled: isCreating, type: "submit" }, { children: isCreating ? ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { color: "primary", size: 20 })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.composer.media.link.add.submit", defaultMessage: "ui.composer.media.link.add.submit" })) })) })) }))) })) }) })) })));
|
|
81
80
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SCUserType } from '@selfcommunity/types';
|
|
2
|
+
export declare enum SCCourseTemplateType {
|
|
3
|
+
SNIPPET = "snippet",
|
|
4
|
+
PREVIEW = "preview"
|
|
5
|
+
}
|
|
6
|
+
export declare enum SCLessonActionsType {
|
|
7
|
+
COMMENTS = "comments",
|
|
8
|
+
LESSONS = "lessons",
|
|
9
|
+
SETTINGS = "settings"
|
|
10
|
+
}
|
|
11
|
+
export declare enum SCLessonModeType {
|
|
12
|
+
VIEW = "view",
|
|
13
|
+
EDIT = "edit"
|
|
14
|
+
}
|
|
15
|
+
export declare enum SCCourseEditTabType {
|
|
16
|
+
LESSONS = "lessons",
|
|
17
|
+
CUSTOMIZE = "customize",
|
|
18
|
+
USERS = "users",
|
|
19
|
+
REQUESTS = "requests",
|
|
20
|
+
OPTIONS = "options"
|
|
21
|
+
}
|
|
22
|
+
export declare enum SCCourseUsersTableModeType {
|
|
23
|
+
DASHBOARD = "dashboard",
|
|
24
|
+
EDIT = "edit",
|
|
25
|
+
REQUESTS = "requests"
|
|
26
|
+
}
|
|
27
|
+
export interface SCCourseEditManageUserProps {
|
|
28
|
+
tab: SCCourseEditTabType;
|
|
29
|
+
user?: SCUserType;
|
|
30
|
+
request?: SCUserType;
|
|
31
|
+
}
|
|
32
|
+
export interface SCCourseEditManageUserRef {
|
|
33
|
+
handleManageUser: (user: SCUserType) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface SCCourseGetUrlLessonData {
|
|
36
|
+
id: number;
|
|
37
|
+
slug: string;
|
|
38
|
+
section_id: number;
|
|
39
|
+
lesson_id: number;
|
|
40
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SCCourseUsersTableModeType = exports.SCCourseEditTabType = exports.SCLessonModeType = exports.SCLessonActionsType = exports.SCCourseTemplateType = void 0;
|
|
4
|
+
var SCCourseTemplateType;
|
|
5
|
+
(function (SCCourseTemplateType) {
|
|
6
|
+
SCCourseTemplateType["SNIPPET"] = "snippet";
|
|
7
|
+
SCCourseTemplateType["PREVIEW"] = "preview";
|
|
8
|
+
})(SCCourseTemplateType = exports.SCCourseTemplateType || (exports.SCCourseTemplateType = {}));
|
|
9
|
+
var SCLessonActionsType;
|
|
10
|
+
(function (SCLessonActionsType) {
|
|
11
|
+
SCLessonActionsType["COMMENTS"] = "comments";
|
|
12
|
+
SCLessonActionsType["LESSONS"] = "lessons";
|
|
13
|
+
SCLessonActionsType["SETTINGS"] = "settings";
|
|
14
|
+
})(SCLessonActionsType = exports.SCLessonActionsType || (exports.SCLessonActionsType = {}));
|
|
15
|
+
var SCLessonModeType;
|
|
16
|
+
(function (SCLessonModeType) {
|
|
17
|
+
SCLessonModeType["VIEW"] = "view";
|
|
18
|
+
SCLessonModeType["EDIT"] = "edit";
|
|
19
|
+
})(SCLessonModeType = exports.SCLessonModeType || (exports.SCLessonModeType = {}));
|
|
20
|
+
var SCCourseEditTabType;
|
|
21
|
+
(function (SCCourseEditTabType) {
|
|
22
|
+
SCCourseEditTabType["LESSONS"] = "lessons";
|
|
23
|
+
SCCourseEditTabType["CUSTOMIZE"] = "customize";
|
|
24
|
+
SCCourseEditTabType["USERS"] = "users";
|
|
25
|
+
SCCourseEditTabType["REQUESTS"] = "requests";
|
|
26
|
+
SCCourseEditTabType["OPTIONS"] = "options";
|
|
27
|
+
})(SCCourseEditTabType = exports.SCCourseEditTabType || (exports.SCCourseEditTabType = {}));
|
|
28
|
+
var SCCourseUsersTableModeType;
|
|
29
|
+
(function (SCCourseUsersTableModeType) {
|
|
30
|
+
SCCourseUsersTableModeType["DASHBOARD"] = "dashboard";
|
|
31
|
+
SCCourseUsersTableModeType["EDIT"] = "edit";
|
|
32
|
+
SCCourseUsersTableModeType["REQUESTS"] = "requests";
|
|
33
|
+
})(SCCourseUsersTableModeType = exports.SCCourseUsersTableModeType || (exports.SCCourseUsersTableModeType = {}));
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ import { VirtualScrollerItemProps } from './virtualScroller';
|
|
|
8
8
|
import { SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations } from './user';
|
|
9
9
|
import { PlatformWidgetActionType } from './platformWidget';
|
|
10
10
|
import { SCEventTemplateType } from './event';
|
|
11
|
-
|
|
11
|
+
import { SCCourseTemplateType, SCLessonActionsType, SCLessonModeType, SCCourseEditTabType } from './course';
|
|
12
|
+
export { SCFeedWidgetType, SCMediaObjectType, SCMediaChunkType, SCCommentsOrderBy, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCNotificationObjectTemplateType, SCBroadcastMessageTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, VirtualScrollerItemProps, PlatformWidgetActionType, SCEventTemplateType, SCCourseTemplateType, SCLessonActionsType, SCLessonModeType, SCCourseEditTabType };
|
package/lib/cjs/types/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SCEventTemplateType = exports.SCUserSocialAssociations = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.SCBroadcastMessageTemplateType = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCCommentsOrderBy = void 0;
|
|
3
|
+
exports.SCCourseEditTabType = exports.SCLessonModeType = exports.SCLessonActionsType = exports.SCCourseTemplateType = exports.SCEventTemplateType = exports.SCUserSocialAssociations = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.SCBroadcastMessageTemplateType = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCCommentsOrderBy = void 0;
|
|
4
4
|
const comments_1 = require("./comments");
|
|
5
5
|
Object.defineProperty(exports, "SCCommentsOrderBy", { enumerable: true, get: function () { return comments_1.SCCommentsOrderBy; } });
|
|
6
6
|
const feedObject_1 = require("./feedObject");
|
|
@@ -16,3 +16,8 @@ Object.defineProperty(exports, "SCUserProfileSettings", { enumerable: true, get:
|
|
|
16
16
|
Object.defineProperty(exports, "SCUserSocialAssociations", { enumerable: true, get: function () { return user_1.SCUserSocialAssociations; } });
|
|
17
17
|
const event_1 = require("./event");
|
|
18
18
|
Object.defineProperty(exports, "SCEventTemplateType", { enumerable: true, get: function () { return event_1.SCEventTemplateType; } });
|
|
19
|
+
const course_1 = require("./course");
|
|
20
|
+
Object.defineProperty(exports, "SCCourseTemplateType", { enumerable: true, get: function () { return course_1.SCCourseTemplateType; } });
|
|
21
|
+
Object.defineProperty(exports, "SCLessonActionsType", { enumerable: true, get: function () { return course_1.SCLessonActionsType; } });
|
|
22
|
+
Object.defineProperty(exports, "SCLessonModeType", { enumerable: true, get: function () { return course_1.SCLessonModeType; } });
|
|
23
|
+
Object.defineProperty(exports, "SCCourseEditTabType", { enumerable: true, get: function () { return course_1.SCCourseEditTabType; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SCCourseLessonType, SCCourseSectionType, SCCourseType } from '@selfcommunity/types';
|
|
2
|
+
import { SCCourseGetUrlLessonData } from '../types/course';
|
|
3
|
+
export declare function isCourseNew(course: SCCourseType | null): boolean;
|
|
4
|
+
export declare function isCourseCompleted(course: SCCourseType | null): boolean;
|
|
5
|
+
declare enum unitType {
|
|
6
|
+
DAYS = "days",
|
|
7
|
+
WEEKS = "weeks"
|
|
8
|
+
}
|
|
9
|
+
export declare function getDripDelayAndUnit(value: number): {
|
|
10
|
+
delay: number;
|
|
11
|
+
_unit: unitType;
|
|
12
|
+
};
|
|
13
|
+
export declare function getUrlLesson(course: SCCourseType, lesson: Partial<SCCourseLessonType>, section?: SCCourseSectionType): SCCourseGetUrlLessonData;
|
|
14
|
+
export {};
|