@selfcommunity/react-ui 0.10.2-courses.163 → 0.10.2-courses.165
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/components/Course/Course.d.ts +5 -4
- package/lib/cjs/components/Course/Course.js +13 -17
- package/lib/cjs/components/Course/Skeleton.d.ts +5 -0
- package/lib/cjs/components/Course/Skeleton.js +4 -4
- package/lib/cjs/components/CourseDashboard/Student.js +27 -11
- package/lib/cjs/components/EditCourse/Lessons/FieldName.js +3 -3
- package/lib/cjs/components/EditCourse/Lessons/LessonRow.js +7 -2
- package/lib/cjs/components/EditCourse/Lessons/SectionRow.js +17 -6
- package/lib/cjs/components/EditCourse/Lessons.js +8 -2
- 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 +68 -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/index.d.ts +2 -1
- package/lib/cjs/index.js +5 -2
- package/lib/esm/components/Course/Course.d.ts +5 -4
- package/lib/esm/components/Course/Course.js +13 -17
- package/lib/esm/components/Course/Skeleton.d.ts +5 -0
- package/lib/esm/components/Course/Skeleton.js +4 -4
- package/lib/esm/components/CourseDashboard/Student.js +27 -11
- package/lib/esm/components/EditCourse/Lessons/FieldName.js +3 -3
- package/lib/esm/components/EditCourse/Lessons/LessonRow.js +7 -2
- package/lib/esm/components/EditCourse/Lessons/SectionRow.js +17 -6
- package/lib/esm/components/EditCourse/Lessons.js +8 -2
- 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 +68 -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/index.d.ts +2 -1
- package/lib/esm/index.js +2 -1
- package/lib/umd/react-ui.js +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const List_1 = tslib_1.__importDefault(require("@mui/material/List"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
10
|
+
const utils_1 = require("@selfcommunity/utils");
|
|
11
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
12
|
+
const widget_1 = require("../../utils/widget");
|
|
13
|
+
const types_1 = require("@selfcommunity/types");
|
|
14
|
+
const Errors_1 = require("../../constants/Errors");
|
|
15
|
+
const react_intl_1 = require("react-intl");
|
|
16
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
17
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
18
|
+
const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
|
|
19
|
+
const Widget_1 = tslib_1.__importDefault(require("../Widget"));
|
|
20
|
+
const system_1 = require("@mui/system");
|
|
21
|
+
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
22
|
+
const constants_1 = require("./constants");
|
|
23
|
+
const Course_1 = tslib_1.__importStar(require("../Course"));
|
|
24
|
+
const course_1 = require("../../types/course");
|
|
25
|
+
const classes = {
|
|
26
|
+
root: `${constants_1.PREFIX}-root`,
|
|
27
|
+
title: `${constants_1.PREFIX}-title`,
|
|
28
|
+
noResults: `${constants_1.PREFIX}-no-results`,
|
|
29
|
+
showMore: `${constants_1.PREFIX}-show-more`,
|
|
30
|
+
dialogRoot: `${constants_1.PREFIX}-dialog-root`,
|
|
31
|
+
endMessage: `${constants_1.PREFIX}-end-message`
|
|
32
|
+
};
|
|
33
|
+
const Root = (0, styles_1.styled)(Widget_1.default, {
|
|
34
|
+
name: constants_1.PREFIX,
|
|
35
|
+
slot: 'Root'
|
|
36
|
+
})(() => ({}));
|
|
37
|
+
const DialogRoot = (0, styles_1.styled)(BaseDialog_1.default, {
|
|
38
|
+
name: constants_1.PREFIX,
|
|
39
|
+
slot: 'DialogRoot'
|
|
40
|
+
})(() => ({}));
|
|
41
|
+
/**
|
|
42
|
+
* > API documentation for the Community-JS User Profile Courses Created Widget component. Learn about the available props and the CSS API.
|
|
43
|
+
*
|
|
44
|
+
*
|
|
45
|
+
* This component renders the list of the courses that the given user follows.
|
|
46
|
+
* Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/UserCreatedCourses)
|
|
47
|
+
|
|
48
|
+
#### Import
|
|
49
|
+
```jsx
|
|
50
|
+
import {UserCreatedCoursesWidget} from '@selfcommunity/react-ui';
|
|
51
|
+
```
|
|
52
|
+
#### Component Name
|
|
53
|
+
The name `SCUserCreatedCoursesWidget` can be used when providing style overrides in the theme.
|
|
54
|
+
|
|
55
|
+
#### CSS
|
|
56
|
+
|
|
57
|
+
|Rule Name|Global class|Description|
|
|
58
|
+
|---|---|---|
|
|
59
|
+
|root|.SCUserCreatedCoursesWidget-root|Styles applied to the root element.|
|
|
60
|
+
|title|.SCUserCreatedCoursesWidget-title|Styles applied to the title element.|
|
|
61
|
+
|noResults|.SCUserCreatedCoursesWidget-no-results|Styles applied to no results section.|
|
|
62
|
+
|showMore|.SCUserCreatedCoursesWidget-show-more|Styles applied to show more button element.|
|
|
63
|
+
|dialogRoot|.SCUserCreatedCoursesWidget-dialog-root|Styles applied to the root dialog element.|
|
|
64
|
+
|endMessage|.SCUserCreatedCoursesWidget-end-message|Styles applied to the end message element.|
|
|
65
|
+
* @param inProps
|
|
66
|
+
*/
|
|
67
|
+
function UserCreatedCoursesWidget(inProps) {
|
|
68
|
+
// PROPS
|
|
69
|
+
const props = (0, system_1.useThemeProps)({
|
|
70
|
+
props: inProps,
|
|
71
|
+
name: constants_1.PREFIX
|
|
72
|
+
});
|
|
73
|
+
const { userId, autoHide, limit = 3, className, CourseProps = {}, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, onHeightChange, onStateChange, DialogProps = {} } = props, rest = tslib_1.__rest(props, ["userId", "autoHide", "limit", "className", "CourseProps", "cacheStrategy", "onHeightChange", "onStateChange", "DialogProps"]);
|
|
74
|
+
// CONTEXT
|
|
75
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
76
|
+
const { preferences, features } = (0, react_core_1.useSCPreferences)();
|
|
77
|
+
const coursesEnabled = (0, react_1.useMemo)(() => preferences &&
|
|
78
|
+
features &&
|
|
79
|
+
features.includes(types_1.SCFeatureName.TAGGING) &&
|
|
80
|
+
features.includes(types_1.SCFeatureName.COURSE) &&
|
|
81
|
+
react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED in preferences &&
|
|
82
|
+
preferences[react_core_1.SCPreferences.CONFIGURATIONS_COURSES_ENABLED].value, [preferences, features]);
|
|
83
|
+
// STATE
|
|
84
|
+
const [state, dispatch] = (0, react_1.useReducer)(widget_1.dataWidgetReducer, {
|
|
85
|
+
isLoadingNext: false,
|
|
86
|
+
next: null,
|
|
87
|
+
cacheKey: react_core_1.SCCache.getWidgetStateCacheKey(react_core_1.SCCache.USER_CREATED_COURSES_STATE_CACHE_PREFIX_KEY, userId),
|
|
88
|
+
cacheStrategy
|
|
89
|
+
}, widget_1.stateWidgetInitializer);
|
|
90
|
+
const [openDialog, setOpenDialog] = (0, react_1.useState)(false);
|
|
91
|
+
/**
|
|
92
|
+
* Initialize component
|
|
93
|
+
* Fetch data only if the component is not initialized, and it is not loading data
|
|
94
|
+
*/
|
|
95
|
+
const _initComponent = (0, react_1.useMemo)(() => () => {
|
|
96
|
+
if (!state.initialized && !state.isLoadingNext) {
|
|
97
|
+
api_services_1.CourseService.getUserJoinedCourses(userId, { statuses: types_1.SCCourseJoinStatusType.CREATOR })
|
|
98
|
+
.then((courses) => {
|
|
99
|
+
dispatch({
|
|
100
|
+
type: widget_1.actionWidgetTypes.LOAD_NEXT_SUCCESS,
|
|
101
|
+
payload: {
|
|
102
|
+
count: courses.count,
|
|
103
|
+
results: courses.results,
|
|
104
|
+
initialized: true
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
})
|
|
108
|
+
.catch((error) => {
|
|
109
|
+
dispatch({ type: widget_1.actionWidgetTypes.LOAD_NEXT_FAILURE, payload: { errorLoadNext: error } });
|
|
110
|
+
utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
}, [state.isLoadingNext, state.initialized, userId, dispatch]);
|
|
114
|
+
// EFFECTS
|
|
115
|
+
(0, react_1.useEffect)(() => {
|
|
116
|
+
let _t;
|
|
117
|
+
if (coursesEnabled && (0, utils_1.isInteger)(userId) && scUserContext.user !== undefined) {
|
|
118
|
+
_t = setTimeout(_initComponent);
|
|
119
|
+
return () => {
|
|
120
|
+
_t && clearTimeout(_t);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
}, [scUserContext.user, coursesEnabled, userId]);
|
|
124
|
+
/**
|
|
125
|
+
* Virtual feed update
|
|
126
|
+
*/
|
|
127
|
+
(0, react_1.useEffect)(() => {
|
|
128
|
+
onHeightChange && onHeightChange();
|
|
129
|
+
}, [state.results.length]);
|
|
130
|
+
(0, react_1.useEffect)(() => {
|
|
131
|
+
if (!coursesEnabled && !scUserContext.user && !(0, utils_1.isInteger)(userId)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
else if (cacheStrategy === utils_1.CacheStrategies.NETWORK_ONLY) {
|
|
135
|
+
onStateChange && onStateChange({ cacheStrategy: utils_1.CacheStrategies.CACHE_FIRST });
|
|
136
|
+
}
|
|
137
|
+
}, [coursesEnabled, cacheStrategy, scUserContext.user, userId]);
|
|
138
|
+
// HANDLERS
|
|
139
|
+
const handleToggleDialogOpen = () => {
|
|
140
|
+
setOpenDialog((prev) => !prev);
|
|
141
|
+
};
|
|
142
|
+
// RENDER
|
|
143
|
+
if (!coursesEnabled || (autoHide && !state.count && state.initialized) || !userId) {
|
|
144
|
+
return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
|
|
145
|
+
}
|
|
146
|
+
if (!state.initialized) {
|
|
147
|
+
return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
|
|
148
|
+
}
|
|
149
|
+
const content = ((0, jsx_runtime_1.jsxs)(material_1.CardContent, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.title, variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.title", defaultMessage: "ui.userCreatedCoursesWidget.title", values: {
|
|
150
|
+
total: state.count
|
|
151
|
+
} }) })), !state.count ? ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.noResults, variant: "body2" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.subtitle.noResults", defaultMessage: "ui.userCreatedCoursesWidget.subtitle.noResults" }) }))) : ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(List_1.default, { children: state.results.slice(0, limit).map((course) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ elevation: 0, template: course_1.SCCourseTemplateType.SNIPPET, course: course, userProfileSnippet: true }, CourseProps)) }, course.id))) }), limit < state.count && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.showMore, onClick: handleToggleDialogOpen }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.button.showAll", defaultMessage: "ui.userCreatedCoursesWidget.button.showAll" }) }))), openDialog && ((0, jsx_runtime_1.jsxs)(DialogRoot, Object.assign({ className: classes.dialogRoot, title: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.title", defaultMessage: "ui.userCreatedCoursesWidget.title", values: { total: state.count } }), onClose: handleToggleDialogOpen, open: openDialog, scroll: "paper" }, DialogProps, { children: [(0, jsx_runtime_1.jsxs)(List_1.default, { children: [state.results.map((c) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.default, Object.assign({ elevation: 0, template: course_1.SCCourseTemplateType.SNIPPET, course: c, userProfileSnippet: true }, CourseProps)) }, c.id))), state.isLoadingNext && ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Course_1.CourseSkeleton, { template: course_1.SCCourseTemplateType.SNIPPET, elevation: 0, CourseProps: { userProfileSnippet: true } }) }))] }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.userCreatedCoursesWidget.noMoreResults", defaultMessage: "ui.userCreatedCoursesWidget.noMoreResults" }) }))] })))] }))] }));
|
|
152
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: content })));
|
|
153
|
+
}
|
|
154
|
+
exports.default = UserCreatedCoursesWidget;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCUserCreatedCoursesWidget";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import UserCreatedCoursesWidget, { UserCreatedCoursesWidgetProps } from './UserCreatedCoursesWidget';
|
|
2
|
+
import UserCreatedCoursesWidgetSkeleton from './Skeleton';
|
|
3
|
+
export default UserCreatedCoursesWidget;
|
|
4
|
+
export { UserCreatedCoursesWidgetSkeleton, UserCreatedCoursesWidgetProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserCreatedCoursesWidgetSkeleton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const UserCreatedCoursesWidget_1 = tslib_1.__importDefault(require("./UserCreatedCoursesWidget"));
|
|
6
|
+
const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
|
|
7
|
+
exports.UserCreatedCoursesWidgetSkeleton = Skeleton_1.default;
|
|
8
|
+
exports.default = UserCreatedCoursesWidget_1.default;
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -127,6 +127,7 @@ import UserConnectionsRequestsSentWidget, { UserConnectionsRequestsSentWidgetPro
|
|
|
127
127
|
import UserConnectionsRequestsWidget, { UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton } from './components/UserConnectionsRequestsWidget';
|
|
128
128
|
import UserConnectionsWidget, { UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton } from './components/UserConnectionsWidget';
|
|
129
129
|
import UserCounters, { UserCountersProps } from './components/UserCounters';
|
|
130
|
+
import UserCreatedCoursesWidget, { UserCreatedCoursesWidgetProps, UserCreatedCoursesWidgetSkeleton } from './components/UserCreatedCoursesWidget';
|
|
130
131
|
import UserFollowedCategoriesWidget, { UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton } from './components/UserFollowedCategoriesWidget';
|
|
131
132
|
import UserFollowedUsersWidget, { UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton } from './components/UserFollowedUsersWidget';
|
|
132
133
|
import UserFollowersWidget, { UserFollowersWidgetProps, UserFollowersWidgetSkeleton } from './components/UserFollowersWidget';
|
|
@@ -209,4 +210,4 @@ import DefaultCoverSelfCommunity from './assets/deafultCover';
|
|
|
209
210
|
/**
|
|
210
211
|
* List all exports
|
|
211
212
|
*/
|
|
212
|
-
export { AcceptRequestUserEventButton, AcceptRequestUserEventButtonProps, AccountChangeMailValidation, AccountChangeMailValidationProps, AccountDataPortability, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDataPortabilityProps, AccountDelete, AccountDeleteButton, AccountDeleteButtonProps, AccountDeleteProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AvatarGroupSkeleton, BaseDialog, BaseDialogProps, BaseItem, BaseItemProps, BaseLightbox, BaseLightboxProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, bytesToSize, generateRoomId, randomString, decodePassphrase, encodePassphrase, getCurrentSectionAndLessonIndex, Calendar, CalendarProps, Categories, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, Category, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowButton, CategoryFollowButtonProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, CategoryProps, CategorySkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingPeopleWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CentralProgress, ChangeCover, ChangeCoverProps, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, ChangePicture, ChangePictureProps, CommentObject, CommentObjectProps, CommentObjectReply, CommentObjectReplyProps, CommentObjectSkeleton, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, CommentsObject, CommentsObjectProps, CommentsObjectSkeleton, Composer, ComposerIconButton, ComposerIconButtonProps, ComposerProps, ConfirmDialog, ConnectionUserButton, ConsentSolution, ConsentSolutionButton, ConsentSolutionButtonProps, ConsentSolutionProps, ConsentSolutionSkeleton, ContributionUtils, SCCourseEditTabType, Course, CourseProps, CourseSkeleton, CourseSkeletonProps, CourseJoinButton, CourseJoinButtonProps, Courses, CreateCourseButton, CreateCourseButtonProps, CoursesProps, CoursesSkeleton, CoursesSkeletonProps, CourseContentMenu, CourseContentMenuProps, CourseDashboard, TeacherCourseDashboardProps, TeacherSkeleton, StudentCourseDashboardProps, StudentSkeleton, CreateEventButton, CreateEventButtonProps, CreateEventWidget, CreateEventWidgetProps, CreateEventWidgetSkeleton, CreateGroupButton, EventForm, EventFormProps, EventFormDialog, EventFormDialogProps, CreateGroupButtonProps, CustomAdv, CustomAdvProps, CustomAdvSkeleton, DEFAULT_FIELDS, DEFAULT_PAGINATION_LIMIT, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultDrawerContentProps, DefaultHeaderContent, DefaultHeaderContentProps, DefaultDrawerSkeleton, DefaultDrawerSkeletonProps, EditEventButton, EditEventButtonProps, EditGroupButton, EditGroupButtonProps, EditMediaProps, Editor, EditorProps, EditorSkeleton, EmailTextField, EditCourse, EditCourseProps, EditCourseSkeleton, Event, EventActionsMenu, EventActionsMenuProps, EventHeader, EventHeaderProps, EventHeaderSkeleton, EventInfoDetails, EventInfoDetailsProps, EventInfoWidget, EventInfoWidgetProps, EventInviteButton, EventInviteButtonProps, EventLocationWidget, EventLocationWidgetProps, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetProps, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetProps, EventMembersWidgetSkeleton, EventParticipantsButton, EventParticipantsButtonProps, EventProps, Events, EventSkeleton, EventSkeletonProps, EventsProps, EventsSkeleton, EventsSkeletonProps, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedObjectProps, FeedObjectSkeleton, FeedProps, FeedRef, FeedSidebarProps, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, File, FollowUserButton, FollowUserButtonProps, Footer, FooterProps, FooterSkeleton, FriendshipButtonProps, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, Group, GroupActionsMenu, GroupActionsMenuProps, GroupForm, GroupFormProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInviteButtonProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupProps, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSettingsIconButtonProps, GroupSkeleton, GroupsProps, GroupsSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, AccordionLessons, AccordionLessonsProps, AccordionLessonsSkeleton, AddUsersButton, AddUsersButtonProps, CourseUsersTable, CourseUsersTableProps, CourseUsersTableSkeleton, EmptyStatus, EmptyStatusProps, HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorDetailProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorProps, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, InfiniteScroll, ScrollContainer, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, InviteUserEventButton, LessonAppbar, LessonAppbarProps, LessonDrawer, LessonDrawerProps, LessonEditForm, LessonEditFormProps, LessonObject, LessonObjectProps, InviteUserEventButtonProps, LanguageSwitcher, LEGAL_POLICIES, CourseCompletedDialog, CourseCompletedDialogProps, Lightbox, LightboxProps, Link, LINKEDIN_SHARE, LocationAutocomplete, LocationAutocompleteProps, LogoSelfCommunity, DefaultCoverSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, SCCourseFormStepType, MediaChunkUploader, MediaChunkUploaderProps, MessageUploaderUtils, MetadataField, MetadataFieldProps, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetProps, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuDrawerProps, NavigationMenuHeader, NavigationMenuIconButton, NavigationMenuIconButtonProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbarProps, NavigationToolbarSkeleton, Notification, NotificationProps, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetProps, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetActionType, PlatformWidgetProps, PlatformWidgetSkeleton, PollSuggestionWidget, PollSuggestionWidgetProps, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, ProgressBar, ProgressBarProps, RelatedEventsWidget, RelatedEventsWidgetProps, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, RelatedFeedObjectWidgetProps, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventMembersEventType, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCGroupMembersEventType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Share, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, StickyBox, StickyBoxComponent, StickyBoxProps, SuggestedEventsWidget, TagAutocomplete, TagAutocompleteProps, SuggestedEventsWidgetProps, SuggestedEventsWidgetSkeleton, TagChip, TagChipProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserActionIconButtonProps, UserAvatar, UserAvatarProps, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserCounters, UserCountersProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoDialogProps, UserInfoProps, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileBlockedProps, UserProfileEdit, UserProfileEditProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserProps, UserSkeleton, UserSocialAssociation, UserSocialAssociationProps, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, UserLiveStreamWidget, UserLiveStreamWidgetProps, UserLiveStreamWidgetSkeleton, useStickyBox, UseStickyBoxProps, LiveStream, LiveStreamProps, LiveStreamSkeletonProps, LiveStreamSkeleton, LiveStreamInfoDetails, LiveStreamInfoDetailsProps, UpScalingTierBadge, UpScalingTierProps, CreateLiveStreamDialog, CreateLiveStreamDialogProps, CreateLiveStreamButton, CreateLiveStreamButtonProps, LiveStreamForm, LiveStreamFormProps, LiveStreamRoom, LiveStreamRoomProps, LiveStreamVideoConference, LiveStreamVideoConferenceProps, VirtualScrollerItemProps, SCCourseTemplateType, SCLessonActionsType, SCLessonModeType, Widget, WidgetProps, X_SHARE, PROVIDER_ICONS_CONTAINED, PROVIDER_ICONS_OUTLINED };
|
|
213
|
+
export { AcceptRequestUserEventButton, AcceptRequestUserEventButtonProps, AccountChangeMailValidation, AccountChangeMailValidationProps, AccountDataPortability, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDataPortabilityProps, AccountDelete, AccountDeleteButton, AccountDeleteButtonProps, AccountDeleteProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AvatarGroupSkeleton, BaseDialog, BaseDialogProps, BaseItem, BaseItemProps, BaseLightbox, BaseLightboxProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, bytesToSize, generateRoomId, randomString, decodePassphrase, encodePassphrase, getCurrentSectionAndLessonIndex, Calendar, CalendarProps, Categories, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, Category, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowButton, CategoryFollowButtonProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, CategoryProps, CategorySkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingPeopleWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CentralProgress, ChangeCover, ChangeCoverProps, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, ChangePicture, ChangePictureProps, CommentObject, CommentObjectProps, CommentObjectReply, CommentObjectReplyProps, CommentObjectSkeleton, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, CommentsObject, CommentsObjectProps, CommentsObjectSkeleton, Composer, ComposerIconButton, ComposerIconButtonProps, ComposerProps, ConfirmDialog, ConnectionUserButton, ConsentSolution, ConsentSolutionButton, ConsentSolutionButtonProps, ConsentSolutionProps, ConsentSolutionSkeleton, ContributionUtils, SCCourseEditTabType, Course, CourseProps, CourseSkeleton, CourseSkeletonProps, CourseJoinButton, CourseJoinButtonProps, Courses, CreateCourseButton, CreateCourseButtonProps, CoursesProps, CoursesSkeleton, CoursesSkeletonProps, CourseContentMenu, CourseContentMenuProps, CourseDashboard, TeacherCourseDashboardProps, TeacherSkeleton, StudentCourseDashboardProps, StudentSkeleton, CreateEventButton, CreateEventButtonProps, CreateEventWidget, CreateEventWidgetProps, CreateEventWidgetSkeleton, CreateGroupButton, EventForm, EventFormProps, EventFormDialog, EventFormDialogProps, CreateGroupButtonProps, CustomAdv, CustomAdvProps, CustomAdvSkeleton, DEFAULT_FIELDS, DEFAULT_PAGINATION_LIMIT, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultDrawerContentProps, DefaultHeaderContent, DefaultHeaderContentProps, DefaultDrawerSkeleton, DefaultDrawerSkeletonProps, EditEventButton, EditEventButtonProps, EditGroupButton, EditGroupButtonProps, EditMediaProps, Editor, EditorProps, EditorSkeleton, EmailTextField, EditCourse, EditCourseProps, EditCourseSkeleton, Event, EventActionsMenu, EventActionsMenuProps, EventHeader, EventHeaderProps, EventHeaderSkeleton, EventInfoDetails, EventInfoDetailsProps, EventInfoWidget, EventInfoWidgetProps, EventInviteButton, EventInviteButtonProps, EventLocationWidget, EventLocationWidgetProps, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetProps, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetProps, EventMembersWidgetSkeleton, EventParticipantsButton, EventParticipantsButtonProps, EventProps, Events, EventSkeleton, EventSkeletonProps, EventsProps, EventsSkeleton, EventsSkeletonProps, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedObjectProps, FeedObjectSkeleton, FeedProps, FeedRef, FeedSidebarProps, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, File, FollowUserButton, FollowUserButtonProps, Footer, FooterProps, FooterSkeleton, FriendshipButtonProps, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, Group, GroupActionsMenu, GroupActionsMenuProps, GroupForm, GroupFormProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInviteButtonProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupProps, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSettingsIconButtonProps, GroupSkeleton, GroupsProps, GroupsSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, AccordionLessons, AccordionLessonsProps, AccordionLessonsSkeleton, AddUsersButton, AddUsersButtonProps, CourseUsersTable, CourseUsersTableProps, CourseUsersTableSkeleton, EmptyStatus, EmptyStatusProps, HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorDetailProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorProps, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, InfiniteScroll, ScrollContainer, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, InviteUserEventButton, LessonAppbar, LessonAppbarProps, LessonDrawer, LessonDrawerProps, LessonEditForm, LessonEditFormProps, LessonObject, LessonObjectProps, InviteUserEventButtonProps, LanguageSwitcher, LEGAL_POLICIES, CourseCompletedDialog, CourseCompletedDialogProps, Lightbox, LightboxProps, Link, LINKEDIN_SHARE, LocationAutocomplete, LocationAutocompleteProps, LogoSelfCommunity, DefaultCoverSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, SCCourseFormStepType, MediaChunkUploader, MediaChunkUploaderProps, MessageUploaderUtils, MetadataField, MetadataFieldProps, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetProps, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuDrawerProps, NavigationMenuHeader, NavigationMenuIconButton, NavigationMenuIconButtonProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbarProps, NavigationToolbarSkeleton, Notification, NotificationProps, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetProps, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetActionType, PlatformWidgetProps, PlatformWidgetSkeleton, PollSuggestionWidget, PollSuggestionWidgetProps, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, ProgressBar, ProgressBarProps, RelatedEventsWidget, RelatedEventsWidgetProps, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, RelatedFeedObjectWidgetProps, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventMembersEventType, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCGroupMembersEventType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Share, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, StickyBox, StickyBoxComponent, StickyBoxProps, SuggestedEventsWidget, TagAutocomplete, TagAutocompleteProps, SuggestedEventsWidgetProps, SuggestedEventsWidgetSkeleton, TagChip, TagChipProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserActionIconButtonProps, UserAvatar, UserAvatarProps, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserCounters, UserCountersProps, UserCreatedCoursesWidget, UserCreatedCoursesWidgetProps, UserCreatedCoursesWidgetSkeleton, UserDeletedSnackBar, UserDeletedSnackBarProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoDialogProps, UserInfoProps, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileBlockedProps, UserProfileEdit, UserProfileEditProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserProps, UserSkeleton, UserSocialAssociation, UserSocialAssociationProps, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, UserLiveStreamWidget, UserLiveStreamWidgetProps, UserLiveStreamWidgetSkeleton, useStickyBox, UseStickyBoxProps, LiveStream, LiveStreamProps, LiveStreamSkeletonProps, LiveStreamSkeleton, LiveStreamInfoDetails, LiveStreamInfoDetailsProps, UpScalingTierBadge, UpScalingTierProps, CreateLiveStreamDialog, CreateLiveStreamDialogProps, CreateLiveStreamButton, CreateLiveStreamButtonProps, LiveStreamForm, LiveStreamFormProps, LiveStreamRoom, LiveStreamRoomProps, LiveStreamVideoConference, LiveStreamVideoConferenceProps, VirtualScrollerItemProps, SCCourseTemplateType, SCLessonActionsType, SCLessonModeType, Widget, WidgetProps, X_SHARE, PROVIDER_ICONS_CONTAINED, PROVIDER_ICONS_OUTLINED };
|
package/lib/cjs/index.js
CHANGED
|
@@ -5,8 +5,8 @@ exports.EventInfoDetails = exports.EventHeaderSkeleton = exports.EventHeader = e
|
|
|
5
5
|
exports.AccordionLessons = exports.GroupSubscribeButton = exports.GroupsSkeleton = exports.GroupSkeleton = exports.GroupSettingsIconButton = exports.Groups = exports.GroupRequestsWidgetSkeleton = exports.GroupRequestsWidget = exports.GroupMembersWidgetSkeleton = exports.GroupMembersWidget = exports.GroupMembersButton = exports.GroupInvitedWidgetSkeleton = exports.GroupInvitedWidget = exports.GroupInviteButton = exports.GroupInfoWidgetSkeleton = exports.GroupInfoWidget = exports.GroupHeaderSkeleton = exports.GroupHeader = exports.GroupForm = exports.GroupActionsMenu = exports.Group = exports.getUnseenNotificationCounter = exports.getUnseenNotification = exports.getRelativeTime = exports.GenericSkeleton = exports.FriendshipUserButton = exports.FooterSkeleton = exports.Footer = exports.FollowUserButton = exports.File = exports.FeedUpdatesWidgetSkeleton = exports.FeedUpdatesWidget = exports.FeedSkeleton = exports.FeedObjectSkeleton = exports.FeedObjectMediaPreview = exports.FeedObject = exports.Feed = exports.FACEBOOK_SHARE = exports.EventsSkeleton = exports.EventSkeleton = exports.Events = exports.EventParticipantsButton = exports.EventMembersWidgetSkeleton = exports.EventMembersWidget = exports.EventMediaWidgetSkeleton = exports.EventMediaWidget = exports.EventLocationWidgetSkeleton = exports.EventLocationWidget = exports.EventInviteButton = exports.EventInfoWidget = void 0;
|
|
6
6
|
exports.MyEventsWidgetSkeleton = exports.MyEventsWidget = exports.MIN_PRELOAD_OFFSET_VIEWPORT = exports.MetadataField = exports.MessageUploaderUtils = exports.MediaChunkUploader = exports.SCCourseFormStepType = exports.MEDIA_TYPE_VIDEO = exports.MEDIA_TYPE_URL = exports.MEDIA_TYPE_SHARE = exports.MEDIA_TYPE_LINK = exports.MEDIA_TYPE_IMAGE = exports.MEDIA_TYPE_EVENT = exports.MEDIA_TYPE_EMBED = exports.MEDIA_TYPE_DOCUMENT = exports.MEDIA_EMBED_SC_SHARED_OBJECT = exports.MEDIA_EMBED_SC_SHARED_EVENT = exports.MEDIA_EMBED_SC_LINK_TYPE = exports.MAX_PRELOAD_OFFSET_VIEWPORT = exports.LoyaltyProgramWidgetSkeleton = exports.LoyaltyProgramWidget = exports.DefaultCoverSelfCommunity = exports.LogoSelfCommunity = exports.LocationAutocomplete = exports.LINKEDIN_SHARE = exports.Link = exports.Lightbox = exports.CourseCompletedDialog = exports.LEGAL_POLICIES = exports.LanguageSwitcher = exports.LessonObject = exports.LessonEditForm = exports.LessonDrawer = exports.LessonAppbar = exports.InviteUserEventButton = exports.InlineComposerWidgetSkeleton = exports.InlineComposerWidget = exports.ScrollContainer = exports.InfiniteScroll = exports.IncubatorSuggestionWidget = exports.IncubatorSubscribeButton = exports.IncubatorListWidget = exports.IncubatorDetail = exports.Incubator = exports.HiddenPlaceholder = exports.EmptyStatus = exports.CourseUsersTableSkeleton = exports.CourseUsersTable = exports.AddUsersButton = exports.AccordionLessonsSkeleton = void 0;
|
|
7
7
|
exports.SnippetNotifications = exports.Share = exports.SearchDialog = exports.SearchAutocomplete = exports.SCUserSocialAssociations = exports.SCUserProfileSettings = exports.SCUserProfileFields = exports.SCNotificationObjectTemplateType = exports.SCFeedObjectTemplateType = exports.SCFeedObjectActivitiesType = exports.SCEventTemplateType = exports.SCCommentsOrderBy = exports.SCBroadcastMessageTemplateType = exports.ReplyComment = exports.RelatedFeedObjectsWidgetSkeleton = exports.RelatedFeedObjectsWidget = exports.RelatedEventsWidgetSkeleton = exports.RelatedEventsWidget = exports.ProgressBar = exports.PrivateMessageThreadSkeleton = exports.PrivateMessageThreadItemSkeleton = exports.PrivateMessageThreadItem = exports.PrivateMessageThread = exports.PrivateMessageSnippetsSkeleton = exports.PrivateMessageSnippets = exports.PrivateMessageSnippetItemSkeleton = exports.PrivateMessageSnippetItem = exports.PrivateMessageSettingsIconButton = exports.PrivateMessageEditorSkeleton = exports.PrivateMessageEditor = exports.PrivateMessageComponentSkeleton = exports.PrivateMessageComponent = exports.PollSuggestionWidget = exports.PlatformWidgetSkeleton = exports.PlatformWidget = exports.PhoneTextField = exports.PasswordTextField = exports.OnBoardingWidgetSkeleton = exports.OnBoardingWidget = exports.NotificationSkeleton = exports.Notification = exports.NavigationToolbarSkeleton = exports.NavigationToolbarMobileSkeleton = exports.NavigationToolbarMobile = exports.NavigationToolbar = exports.NavigationSettingsIconButton = exports.NavigationMenuIconButton = exports.NavigationMenuHeader = exports.NavigationMenuDrawer = exports.NavigationMenuContent = void 0;
|
|
8
|
-
exports.
|
|
9
|
-
exports.PROVIDER_ICONS_OUTLINED = exports.PROVIDER_ICONS_CONTAINED = exports.X_SHARE = exports.Widget = exports.SCLessonModeType = exports.SCLessonActionsType = exports.SCCourseTemplateType = exports.LiveStreamVideoConference = exports.LiveStreamRoom = exports.LiveStreamForm = exports.CreateLiveStreamButton = exports.CreateLiveStreamDialog = exports.UpScalingTierBadge = void 0;
|
|
8
|
+
exports.LiveStream = exports.useStickyBox = exports.UserLiveStreamWidgetSkeleton = exports.UserLiveStreamWidget = exports.UserSuggestionWidgetSkeleton = exports.UserSuggestionWidget = exports.UserSubscribedGroupsWidgetSkeleton = exports.UserSubscribedGroupsWidget = exports.UserSocialAssociation = exports.UserSkeleton = exports.UserProfileHeaderSkeleton = exports.UserProfileHeader = exports.UserProfileEditSkeleton = exports.UserProfileEditSectionSettings = exports.UserProfileEditSectionPublicInfo = exports.UserProfileEditSectionAccount = exports.UserProfileEdit = exports.UserProfileBlocked = exports.UsernameTextField = exports.UserInfoSkeleton = exports.UserInfoDialog = exports.UserInfo = exports.UserFollowersWidgetSkeleton = exports.UserFollowersWidget = exports.UserFollowedUsersWidgetSkeleton = exports.UserFollowedUsersWidget = exports.UserFollowedCategoriesWidgetSkeleton = exports.UserFollowedCategoriesWidget = exports.UserDeletedSnackBar = exports.UserCreatedCoursesWidgetSkeleton = exports.UserCreatedCoursesWidget = exports.UserCounters = exports.UserConnectionsWidgetSkeleton = exports.UserConnectionsWidget = exports.UserConnectionsRequestsWidgetSkeleton = exports.UserConnectionsRequestsWidget = exports.UserConnectionsRequestsSentWidgetSkeleton = exports.UserConnectionsRequestsSentWidget = exports.UserAvatar = exports.UserActionIconButton = exports.User = exports.UrlTextField = exports.ToastNotificationsSkeleton = exports.ToastNotifications = exports.TagChip = exports.SuggestedEventsWidgetSkeleton = exports.TagAutocomplete = exports.SuggestedEventsWidget = exports.StickyBox = exports.SnippetNotificationsSkeleton = void 0;
|
|
9
|
+
exports.PROVIDER_ICONS_OUTLINED = exports.PROVIDER_ICONS_CONTAINED = exports.X_SHARE = exports.Widget = exports.SCLessonModeType = exports.SCLessonActionsType = exports.SCCourseTemplateType = exports.LiveStreamVideoConference = exports.LiveStreamRoom = exports.LiveStreamForm = exports.CreateLiveStreamButton = exports.CreateLiveStreamDialog = exports.UpScalingTierBadge = exports.LiveStreamInfoDetails = exports.LiveStreamSkeleton = void 0;
|
|
10
10
|
const tslib_1 = require("tslib");
|
|
11
11
|
/**
|
|
12
12
|
* Components
|
|
@@ -328,6 +328,9 @@ exports.UserConnectionsWidget = UserConnectionsWidget_1.default;
|
|
|
328
328
|
Object.defineProperty(exports, "UserConnectionsWidgetSkeleton", { enumerable: true, get: function () { return UserConnectionsWidget_1.UserConnectionsWidgetSkeleton; } });
|
|
329
329
|
const UserCounters_1 = tslib_1.__importDefault(require("./components/UserCounters"));
|
|
330
330
|
exports.UserCounters = UserCounters_1.default;
|
|
331
|
+
const UserCreatedCoursesWidget_1 = tslib_1.__importStar(require("./components/UserCreatedCoursesWidget"));
|
|
332
|
+
exports.UserCreatedCoursesWidget = UserCreatedCoursesWidget_1.default;
|
|
333
|
+
Object.defineProperty(exports, "UserCreatedCoursesWidgetSkeleton", { enumerable: true, get: function () { return UserCreatedCoursesWidget_1.UserCreatedCoursesWidgetSkeleton; } });
|
|
331
334
|
const UserFollowedCategoriesWidget_1 = tslib_1.__importStar(require("./components/UserFollowedCategoriesWidget"));
|
|
332
335
|
exports.UserFollowedCategoriesWidget = UserFollowedCategoriesWidget_1.default;
|
|
333
336
|
Object.defineProperty(exports, "UserFollowedCategoriesWidgetSkeleton", { enumerable: true, get: function () { return UserFollowedCategoriesWidget_1.UserFollowedCategoriesWidgetSkeleton; } });
|
|
@@ -20,6 +20,10 @@ export interface CourseProps extends WidgetProps {
|
|
|
20
20
|
* @default 'preview'
|
|
21
21
|
*/
|
|
22
22
|
template?: SCCourseTemplateType;
|
|
23
|
+
/**
|
|
24
|
+
* It shows a different snippet type
|
|
25
|
+
*/
|
|
26
|
+
userProfileSnippet?: boolean;
|
|
23
27
|
/**
|
|
24
28
|
* Actions
|
|
25
29
|
* @default null
|
|
@@ -79,12 +83,9 @@ export interface CourseProps extends WidgetProps {
|
|
|
79
83
|
|previewProgress|.SCCourses-preview-progress|Styles applied to indicate the progress section in the preview template.|
|
|
80
84
|
|previewProgressBar|.SCCourses-preview-progress-bar|Styles applied to the progress bar in the preview template.|
|
|
81
85
|
|snippetRoot|.SCCourses-snippet-root|Styles applied to the root element in the snippet template.|
|
|
82
|
-
|snippetActions|.SCCourses-snippet-actions|Styles applied to the actions section in the snippet template.|
|
|
83
86
|
|snippetAvatar|.SCCourses-snippet-avatar|Styles applied to the avatar element in the snippet template.|
|
|
84
87
|
|snippetImage|.SCCourses-snippet-image|Styles applied to the image element in the snippet template.|
|
|
85
|
-
|
|
86
|
-
|snippetSecondary|.SCCourses-snippet-secondary|Styles applied to the secondary section in the snippet template.|
|
|
87
|
-
|
|
88
|
+
|
|
88
89
|
*
|
|
89
90
|
* @param inProps
|
|
90
91
|
*/
|
|
@@ -13,9 +13,9 @@ import CourseParticipantsButton from '../CourseParticipantsButton';
|
|
|
13
13
|
import Widget from '../Widget';
|
|
14
14
|
import { PREFIX } from './constants';
|
|
15
15
|
import CourseSkeleton from './Skeleton';
|
|
16
|
-
import BaseItem from '../../shared/BaseItem';
|
|
17
16
|
import { isCourseCompleted, isCourseNew } from '../../utils/course';
|
|
18
17
|
import UserAvatar from '../../shared/UserAvatar';
|
|
18
|
+
import BaseItemButton from '../../shared/BaseItemButton';
|
|
19
19
|
const classes = {
|
|
20
20
|
root: `${PREFIX}-root`,
|
|
21
21
|
chip: `${PREFIX}-chip`,
|
|
@@ -34,11 +34,9 @@ const classes = {
|
|
|
34
34
|
previewProgress: `${PREFIX}-preview-progress`,
|
|
35
35
|
previewProgressBar: `${PREFIX}-preview-progress-bar`,
|
|
36
36
|
snippetRoot: `${PREFIX}-snippet-root`,
|
|
37
|
-
snippetActions: `${PREFIX}-snippet-actions`,
|
|
38
37
|
snippetAvatar: `${PREFIX}-snippet-avatar`,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
snippetSecondary: `${PREFIX}-snippet-secondary`
|
|
38
|
+
snippetAvatarUserProfile: `${PREFIX}-snippet-avatar-user-profile-view`,
|
|
39
|
+
snippetImage: `${PREFIX}-snippet-image`
|
|
42
40
|
};
|
|
43
41
|
const Root = styled(Widget, {
|
|
44
42
|
name: PREFIX,
|
|
@@ -50,7 +48,7 @@ const PreviewRoot = styled(Box, {
|
|
|
50
48
|
slot: 'PreviewRoot',
|
|
51
49
|
overridesResolver: (_props, styles) => styles.previewRoot
|
|
52
50
|
})(() => ({}));
|
|
53
|
-
const SnippetRoot = styled(
|
|
51
|
+
const SnippetRoot = styled(BaseItemButton, {
|
|
54
52
|
name: PREFIX,
|
|
55
53
|
slot: 'SnippetRoot',
|
|
56
54
|
overridesResolver: (_props, styles) => styles.snippetRoot
|
|
@@ -94,22 +92,20 @@ const SnippetRoot = styled(BaseItem, {
|
|
|
94
92
|
|previewProgress|.SCCourses-preview-progress|Styles applied to indicate the progress section in the preview template.|
|
|
95
93
|
|previewProgressBar|.SCCourses-preview-progress-bar|Styles applied to the progress bar in the preview template.|
|
|
96
94
|
|snippetRoot|.SCCourses-snippet-root|Styles applied to the root element in the snippet template.|
|
|
97
|
-
|snippetActions|.SCCourses-snippet-actions|Styles applied to the actions section in the snippet template.|
|
|
98
95
|
|snippetAvatar|.SCCourses-snippet-avatar|Styles applied to the avatar element in the snippet template.|
|
|
99
96
|
|snippetImage|.SCCourses-snippet-image|Styles applied to the image element in the snippet template.|
|
|
100
|
-
|
|
101
|
-
|snippetSecondary|.SCCourses-snippet-secondary|Styles applied to the secondary section in the snippet template.|
|
|
102
|
-
|
|
97
|
+
|
|
103
98
|
*
|
|
104
99
|
* @param inProps
|
|
105
100
|
*/
|
|
106
101
|
export default function Course(inProps) {
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
107
103
|
// PROPS
|
|
108
104
|
const props = useThemeProps({
|
|
109
105
|
props: inProps,
|
|
110
106
|
name: PREFIX
|
|
111
107
|
});
|
|
112
|
-
const { id = `course_object_${props.courseId ? props.courseId : props.course ? props.course.id : ''}`, courseId = null, course = null, className = null, template = SCCourseTemplateType.PREVIEW, actions, CourseParticipantsButtonComponentProps = {}, CourseSkeletonComponentProps = {} } = props, rest = __rest(props, ["id", "courseId", "course", "className", "template", "actions", "CourseParticipantsButtonComponentProps", "CourseSkeletonComponentProps"]);
|
|
108
|
+
const { id = `course_object_${props.courseId ? props.courseId : props.course ? props.course.id : ''}`, courseId = null, course = null, className = null, template = SCCourseTemplateType.PREVIEW, actions, CourseParticipantsButtonComponentProps = {}, CourseSkeletonComponentProps = {}, userProfileSnippet } = props, rest = __rest(props, ["id", "courseId", "course", "className", "template", "actions", "CourseParticipantsButtonComponentProps", "CourseSkeletonComponentProps", "userProfileSnippet"]);
|
|
113
109
|
// STATE
|
|
114
110
|
const { scCourse } = useSCFetchCourse({ id: courseId, course });
|
|
115
111
|
// CONTEXT
|
|
@@ -153,20 +149,20 @@ export default function Course(inProps) {
|
|
|
153
149
|
? 'primary'
|
|
154
150
|
: isCourseAdmin && !scCourse.privacy
|
|
155
151
|
? 'default'
|
|
156
|
-
: 'secondary', label: chipLabel, className: classes.chip })), _jsx(Link, Object.assign({}, (!scCourse.created_by.deleted && {
|
|
152
|
+
: 'secondary', label: chipLabel, className: classes.chip })), _jsx(Link, Object.assign({}, (!((_a = scCourse.created_by) === null || _a === void 0 ? void 0 : _a.deleted) && {
|
|
157
153
|
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
|
|
158
|
-
}), { children: _jsx(UserAvatar, Object.assign({ hide: !scCourse.created_by.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: scCourse.name, src: scCourse.created_by.avatar, className: classes.previewAvatar }) })) }))] })), _jsxs(CardContent, Object.assign({ className: classes.previewContent }, { children: [_jsx(Link, Object.assign({ className: classes.previewCreator }, (!scCourse.created_by.deleted && {
|
|
154
|
+
}), { children: _jsx(UserAvatar, Object.assign({ hide: !((_b = scCourse.created_by) === null || _b === void 0 ? void 0 : _b.community_badge), smaller: true }, { children: _jsx(Avatar, { alt: scCourse.name, src: (_c = scCourse.created_by) === null || _c === void 0 ? void 0 : _c.avatar, className: classes.previewAvatar }) })) }))] })), _jsxs(CardContent, Object.assign({ className: classes.previewContent }, { children: [_jsx(Link, Object.assign({ className: classes.previewCreator }, (!((_d = scCourse.created_by) === null || _d === void 0 ? void 0 : _d.deleted) && {
|
|
159
155
|
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
|
|
160
|
-
}), { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: scCourse.created_by.username })) })), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse), className: classes.previewNameWrapper }, { children: _jsx(Typography, Object.assign({ variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), _jsxs(Typography, Object.assign({ className: classes.previewInfo }, { children: [_jsx(FormattedMessage, { id: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft', defaultMessage: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft' }), "-", _jsx(FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` })] })), _jsx(Box, Object.assign({ className: classes.previewCategory }, { children: scCourse.categories.map((category) => (_jsx(Chip, { size: "small", label: category.name }, category.id))) })), _jsx(Box, Object.assign({ className: classes.previewProgress }, { children: renderProgress() }))] })), actions !== null && actions !== void 0 ? actions : (_jsx(CardActions, Object.assign({ className: classes.previewActions }, { children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see
|
|
156
|
+
}), { children: _jsx(Typography, Object.assign({ variant: "body2" }, { children: (_e = scCourse.created_by) === null || _e === void 0 ? void 0 : _e.username })) })), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse), className: classes.previewNameWrapper }, { children: _jsx(Typography, Object.assign({ variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), _jsxs(Typography, Object.assign({ className: classes.previewInfo }, { children: [_jsx(FormattedMessage, { id: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft', defaultMessage: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft' }), "-", _jsx(FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` })] })), _jsx(Box, Object.assign({ className: classes.previewCategory }, { children: scCourse.categories.map((category) => (_jsx(Chip, { size: "small", label: category.name }, category.id))) })), _jsx(Box, Object.assign({ className: classes.previewProgress }, { children: renderProgress() }))] })), actions !== null && actions !== void 0 ? actions : (_jsx(CardActions, Object.assign({ className: classes.previewActions }, { children: _jsx(Button, Object.assign({ variant: "outlined", size: "small", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
|
|
161
157
|
}
|
|
162
158
|
else {
|
|
163
|
-
contentObj = (_jsx(SnippetRoot, { elevation: 0, className: classes.snippetRoot, image: _jsxs(Box, Object.assign({ className: classes.snippetImage }, { children: [_jsx(Avatar, { variant: "square", alt: scCourse.name, src: scCourse.image_medium, className: classes.snippetAvatar }), (isCourseAdmin || isCourseCompleted(scCourse) || isCourseNew(scCourse)) && (_jsx(Chip, { size: "small", component: "div", color: isCourseCompleted(scCourse) || (isCourseAdmin && scCourse.privacy)
|
|
159
|
+
contentObj = (_jsx(SnippetRoot, { elevation: 0, className: classes.snippetRoot, image: _jsxs(Box, Object.assign({ className: classes.snippetImage }, { children: [_jsx(Avatar, { variant: "square", alt: scCourse.name, src: scCourse.image_medium, className: userProfileSnippet ? classes.snippetAvatarUserProfile : classes.snippetAvatar }), !userProfileSnippet && (isCourseAdmin || isCourseCompleted(scCourse) || isCourseNew(scCourse)) && (_jsx(Chip, { size: "small", component: "div", color: isCourseCompleted(scCourse) || (isCourseAdmin && scCourse.privacy)
|
|
164
160
|
? 'primary'
|
|
165
161
|
: isCourseAdmin && !scCourse.privacy
|
|
166
162
|
? 'default'
|
|
167
|
-
: 'secondary', label: chipLabel, className: classes.chip }))] })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!scCourse.created_by.deleted && {
|
|
163
|
+
: 'secondary', label: chipLabel, className: classes.chip }))] })), primary: _jsxs(_Fragment, { children: [!userProfileSnippet && (_jsx(Link, Object.assign({}, (!((_f = scCourse.created_by) === null || _f === void 0 ? void 0 : _f.deleted) && {
|
|
168
164
|
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
|
|
169
|
-
}), {
|
|
165
|
+
}), { children: _jsx(Typography, Object.assign({ component: "span" }, { children: (_g = scCourse.created_by) === null || _g === void 0 ? void 0 : _g.username })) }))), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: scCourse.name })) }))] }), secondary: _jsx(_Fragment, { children: userProfileSnippet ? (_jsx(_Fragment, { children: !scCourse.hide_member_count && (_jsx(FormattedMessage, { id: "ui.course.userProfileSnippet.students", defaultMessage: "ui.course.userProfileSnippet.students", values: { students: scCourse.member_count } })) })) : (_jsxs(_Fragment, { children: [_jsx(FormattedMessage, { id: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft', defaultMessage: scCourse.privacy ? `ui.course.privacy.${scCourse.privacy}` : 'ui.course.privacy.draft' }), "-", _jsx(FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` })] })) }), actions: actions !== null && actions !== void 0 ? actions : (_jsx(Button, Object.assign({ size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) }))) }));
|
|
170
166
|
}
|
|
171
167
|
/**
|
|
172
168
|
* Renders root object
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SCCourseTemplateType } from '../../types/course';
|
|
3
3
|
import { WidgetProps } from '../Widget';
|
|
4
|
+
import { CourseProps } from './Course';
|
|
4
5
|
export interface CourseSkeletonProps extends WidgetProps {
|
|
5
6
|
/**
|
|
6
7
|
* Overrides or extends the styles applied to the component.
|
|
@@ -20,6 +21,10 @@ export interface CourseSkeletonProps extends WidgetProps {
|
|
|
20
21
|
* Prop to pass an action to be rendered next to the skeleton
|
|
21
22
|
*/
|
|
22
23
|
actions?: React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* CourseProps
|
|
26
|
+
*/
|
|
27
|
+
CourseProps?: CourseProps;
|
|
23
28
|
}
|
|
24
29
|
/**
|
|
25
30
|
* > API documentation for the Community-JS Course Skeleton component. Learn about the available props and the CSS API.
|
|
@@ -5,10 +5,10 @@ import Skeleton from '@mui/material/Skeleton';
|
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { useThemeProps } from '@mui/system';
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import BaseItem from '../../shared/BaseItem';
|
|
9
8
|
import { SCCourseTemplateType } from '../../types/course';
|
|
10
9
|
import Widget from '../Widget';
|
|
11
10
|
import { PREFIX } from './constants';
|
|
11
|
+
import BaseItemButton from '../../shared/BaseItemButton';
|
|
12
12
|
const classes = {
|
|
13
13
|
root: `${PREFIX}-skeleton-root`,
|
|
14
14
|
skeletonPreviewRoot: `${PREFIX}-skeleton-preview-root`,
|
|
@@ -27,7 +27,7 @@ const SkeletonPreviewRoot = styled(Box, {
|
|
|
27
27
|
name: PREFIX,
|
|
28
28
|
slot: 'SkeletonPreviewRoot'
|
|
29
29
|
})(() => ({}));
|
|
30
|
-
const SkeletonSnippetRoot = styled(
|
|
30
|
+
const SkeletonSnippetRoot = styled(BaseItemButton, {
|
|
31
31
|
name: PREFIX,
|
|
32
32
|
slot: 'SkeletonSnippetRoot'
|
|
33
33
|
})(() => ({}));
|
|
@@ -59,7 +59,7 @@ export default function CourseSkeleton(inProps) {
|
|
|
59
59
|
props: inProps,
|
|
60
60
|
name: PREFIX
|
|
61
61
|
});
|
|
62
|
-
const { className, template, skeletonsAnimation = 'wave', actions } = props, rest = __rest(props, ["className", "template", "skeletonsAnimation", "actions"]);
|
|
62
|
+
const { className, template, skeletonsAnimation = 'wave', actions, CourseProps } = props, rest = __rest(props, ["className", "template", "skeletonsAnimation", "actions", "CourseProps"]);
|
|
63
63
|
/**
|
|
64
64
|
* Renders course object
|
|
65
65
|
*/
|
|
@@ -68,7 +68,7 @@ export default function CourseSkeleton(inProps) {
|
|
|
68
68
|
contentObj = (_jsxs(SkeletonPreviewRoot, Object.assign({ className: classes.skeletonPreviewRoot }, { children: [_jsxs(Box, Object.assign({ position: "relative" }, { children: [_jsx(Skeleton, { variant: "rectangular", animation: skeletonsAnimation, width: "100%", height: "110px" }), _jsx(Skeleton, { className: classes.skeletonPreviewAvatar, variant: "rounded", animation: skeletonsAnimation })] })), _jsxs(CardContent, Object.assign({ className: classes.skeletonPreviewContent }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, width: "20%", height: 14, sx: { marginTop: 1 }, variant: "rectangular" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "40%", height: 14, sx: { marginTop: 1.5 }, variant: "rectangular" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "60%", height: 14, sx: { marginTop: 4.5 }, variant: "rectangular" })] })), _jsx(CardActions, Object.assign({ className: classes.skeletonPreviewActions }, { children: actions !== undefined ? actions : _jsx(Skeleton, { variant: "rounded", width: 100, height: 30 }) }))] })));
|
|
69
69
|
}
|
|
70
70
|
else {
|
|
71
|
-
contentObj = (_jsx(SkeletonSnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.skeletonSnippetRoot, image: _jsxs(Box, Object.assign({ className: classes.skeletonSnippetImage }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", width: 100, height: 60 }),
|
|
71
|
+
contentObj = (_jsx(SkeletonSnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.skeletonSnippetRoot, image: _jsxs(Box, Object.assign({ className: classes.skeletonSnippetImage }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", width: (CourseProps === null || CourseProps === void 0 ? void 0 : CourseProps.userProfileSnippet) ? 60 : 100, height: 60 }), _jsx(Icon, Object.assign({ fontSize: "large" }, { children: "courses" }))] })), primary: (CourseProps === null || CourseProps === void 0 ? void 0 : CourseProps.userProfileSnippet) ? (_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: 120, style: { marginBottom: 10 } })) : (_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: 40, style: { marginBottom: 12 } })), secondary: (CourseProps === null || CourseProps === void 0 ? void 0 : CourseProps.userProfileSnippet) ? (_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: 60 })) : (_jsxs(_Fragment, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: 120, style: { marginBottom: 10 } }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: 60 })] })), actions: _jsx(_Fragment, { children: actions !== undefined ? (actions) : (_jsx(Button, Object.assign({ size: "small", variant: "outlined", disabled: true }, { children: _jsx(Skeleton, { animation: skeletonsAnimation, height: 15, width: 60 }) }))) }) }));
|
|
72
72
|
}
|
|
73
73
|
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className, `${PREFIX}-skeleton-${template}`) }, rest, { children: contentObj })));
|
|
74
74
|
}
|
|
@@ -17,14 +17,20 @@ import { SCOPE_SC_UI } from '../../constants/Errors';
|
|
|
17
17
|
import { useSnackbar } from 'notistack';
|
|
18
18
|
import StudentSkeleton from './Student/Skeleton';
|
|
19
19
|
import UserAvatar from '../../shared/UserAvatar';
|
|
20
|
-
const
|
|
20
|
+
const BUTTON_MESSAGES = {
|
|
21
21
|
dashboard: 'ui.course.dashboard.student.button.dashboard',
|
|
22
22
|
request: 'ui.course.dashboard.student.button.request',
|
|
23
|
+
signUp: 'ui.course.dashboard.student.button.signUp',
|
|
23
24
|
review: 'ui.course.dashboard.student.button.review',
|
|
24
25
|
cancel: 'ui.course.dashboard.student.button.cancel',
|
|
25
26
|
start: 'ui.course.dashboard.student.button.start',
|
|
26
27
|
continue: 'ui.course.dashboard.student.button.continue'
|
|
27
28
|
};
|
|
29
|
+
const SNACKBAR_MESSAGES = {
|
|
30
|
+
cancel: 'ui.course.dashboard.student.snackbar.success.cancel',
|
|
31
|
+
enroll: 'ui.course.dashboard.student.snackbar.success.enroll',
|
|
32
|
+
request: 'ui.course.dashboard.student.snackbar.success.request'
|
|
33
|
+
};
|
|
28
34
|
const classes = {
|
|
29
35
|
root: `${PREFIX}-root`,
|
|
30
36
|
studentContainer: `${PREFIX}-student-container`,
|
|
@@ -90,7 +96,7 @@ function Student(inProps) {
|
|
|
90
96
|
// CONTEXTS
|
|
91
97
|
const scRoutingContext = useSCRouting();
|
|
92
98
|
// HOOKS
|
|
93
|
-
const { scCourse } = useSCFetchCourse({ id: courseId, course });
|
|
99
|
+
const { scCourse, setSCCourse } = useSCFetchCourse({ id: courseId, course });
|
|
94
100
|
const intl = useIntl();
|
|
95
101
|
const { enqueueSnackbar } = useSnackbar();
|
|
96
102
|
// EFFETCS
|
|
@@ -103,20 +109,24 @@ function Student(inProps) {
|
|
|
103
109
|
const handleRequest = useCallback(() => {
|
|
104
110
|
setLoadingRequest(true);
|
|
105
111
|
let request;
|
|
112
|
+
let updatedCourse;
|
|
106
113
|
if (sentRequest) {
|
|
107
114
|
request = CourseService.leaveOrRemoveCourseRequest(scCourse.id);
|
|
115
|
+
updatedCourse = Object.assign(Object.assign({}, scCourse), { join_status: null });
|
|
108
116
|
}
|
|
109
117
|
else {
|
|
110
118
|
request = CourseService.joinOrAcceptInviteToCourse(scCourse.id);
|
|
119
|
+
updatedCourse = Object.assign(Object.assign({}, scCourse), { join_status: scCourse.privacy === SCCoursePrivacyType.PRIVATE ? SCCourseJoinStatusType.REQUESTED : SCCourseJoinStatusType.JOINED });
|
|
111
120
|
}
|
|
112
121
|
request
|
|
113
122
|
.then(() => {
|
|
114
|
-
|
|
123
|
+
setSCCourse(updatedCourse);
|
|
124
|
+
setSentRequest((prev) => !prev);
|
|
125
|
+
setLoadingRequest(false);
|
|
126
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: sentRequest ? SNACKBAR_MESSAGES.request : scCourse.join_status === null ? SNACKBAR_MESSAGES.enroll : SNACKBAR_MESSAGES.cancel, defaultMessage: sentRequest ? SNACKBAR_MESSAGES.request : scCourse.join_status === null ? SNACKBAR_MESSAGES.enroll : SNACKBAR_MESSAGES.cancel }), {
|
|
115
127
|
variant: 'success',
|
|
116
128
|
autoHideDuration: 3000
|
|
117
129
|
});
|
|
118
|
-
setSentRequest((prev) => !prev);
|
|
119
|
-
setLoadingRequest(false);
|
|
120
130
|
})
|
|
121
131
|
.catch((error) => {
|
|
122
132
|
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.common.error.action", defaultMessage: "ui.common.error.action" }), {
|
|
@@ -131,10 +141,16 @@ function Student(inProps) {
|
|
|
131
141
|
if (!scCourse) {
|
|
132
142
|
return _jsx(_Fragment, {});
|
|
133
143
|
}
|
|
134
|
-
return (_jsxs(Stack, Object.assign({ className: classes.actionsWrapper }, { children: [(scCourse.join_status === SCCourseJoinStatusType.CREATOR || scCourse.join_status === SCCourseJoinStatusType.MANAGER) && (_jsx(ActionButton, { labelId:
|
|
135
|
-
(scCourse.join_status === SCCourseJoinStatusType.MANAGER ||
|
|
136
|
-
(scCourse.privacy === SCCoursePrivacyType.OPEN && scCourse.join_status !== SCCourseJoinStatusType.CREATOR)) && (_jsx(ActionButton, { labelId: scCourse.
|
|
137
|
-
|
|
144
|
+
return (_jsxs(Stack, Object.assign({ className: classes.actionsWrapper }, { children: [(scCourse.join_status === SCCourseJoinStatusType.CREATOR || scCourse.join_status === SCCourseJoinStatusType.MANAGER) && (_jsx(ActionButton, { labelId: BUTTON_MESSAGES.dashboard, to: scRoutingContext.url(SCRoutes.COURSE_DASHBOARD_ROUTE_NAME, scCourse), color: "inherit", variant: "outlined" })), (((scCourse.privacy === SCCoursePrivacyType.PRIVATE || scCourse.privacy === SCCoursePrivacyType.SECRET) &&
|
|
145
|
+
(scCourse.join_status === SCCourseJoinStatusType.MANAGER || scCourse.join_status === SCCourseJoinStatusType.JOINED)) ||
|
|
146
|
+
(scCourse.privacy === SCCoursePrivacyType.OPEN && scCourse.join_status !== SCCourseJoinStatusType.CREATOR)) && (_jsx(ActionButton, { labelId: scCourse.join_status === null
|
|
147
|
+
? BUTTON_MESSAGES.signUp
|
|
148
|
+
: scCourse.user_completion_rate === 0
|
|
149
|
+
? BUTTON_MESSAGES.start
|
|
150
|
+
: scCourse.user_completion_rate === 100
|
|
151
|
+
? BUTTON_MESSAGES.review
|
|
152
|
+
: BUTTON_MESSAGES.continue, to: scCourse.join_status !== null ? scRoutingContext.url(SCRoutes.COURSE_LESSON_ROUTE_NAME, getUrlNextLesson(scCourse)) : undefined, disabled: scCourse.join_status !== null ? getIsNextLessonLocked(scCourse) : undefined, color: scCourse.user_completion_rate === 100 ? 'inherit' : undefined, variant: scCourse.user_completion_rate === 100 ? 'outlined' : undefined, loading: scCourse.join_status === null ? loadingRequest : undefined, onClick: scCourse.join_status === null ? handleRequest : undefined })), scCourse.privacy === SCCoursePrivacyType.PRIVATE &&
|
|
153
|
+
(scCourse.join_status === null || scCourse.join_status === SCCourseJoinStatusType.REQUESTED) && (_jsx(ActionButton, { labelId: sentRequest ? BUTTON_MESSAGES.cancel : BUTTON_MESSAGES.request, color: "inherit", variant: "outlined", loading: loadingRequest, onClick: handleRequest }))] })));
|
|
138
154
|
}, [scCourse, sentRequest, loadingRequest, handleRequest]);
|
|
139
155
|
if (!scCourse) {
|
|
140
156
|
return _jsx(StudentSkeleton, {});
|
|
@@ -143,12 +159,12 @@ function Student(inProps) {
|
|
|
143
159
|
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
|
|
144
160
|
}), { children: _jsx(UserAvatar, Object.assign({ hide: !scCourse.created_by.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, src: scCourse.created_by.avatar, alt: scCourse.created_by.username }) })) })), _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!scCourse.created_by.deleted && {
|
|
145
161
|
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
|
|
146
|
-
}), { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: scCourse.created_by.username })) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.header.user.creator", defaultMessage: "ui.course.dashboard.header.user.creator" }) }))] })] })), actionButton] })), _jsx(Divider, {}), ((scCourse.privacy === SCCoursePrivacyType.PRIVATE &&
|
|
162
|
+
}), { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: scCourse.created_by.username })) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.header.user.creator", defaultMessage: "ui.course.dashboard.header.user.creator" }) }))] })] })), actionButton] })), _jsx(Divider, {}), (((scCourse.privacy === SCCoursePrivacyType.PRIVATE || scCourse.privacy === SCCoursePrivacyType.SECRET) &&
|
|
147
163
|
(scCourse.join_status === SCCourseJoinStatusType.CREATOR ||
|
|
148
164
|
scCourse.join_status === SCCourseJoinStatusType.MANAGER ||
|
|
149
165
|
scCourse.join_status === SCCourseJoinStatusType.JOINED)) ||
|
|
150
166
|
scCourse.privacy === SCCoursePrivacyType.OPEN ||
|
|
151
|
-
scCourse.privacy === SCCoursePrivacyType.DRAFT) && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classes.margin }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.description", defaultMessage: "ui.course.dashboard.student.description" }) })), _jsx(Stack, Object.assign({ className: classes.box }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: scCourse.description })) }))] })), ((scCourse.privacy === SCCoursePrivacyType.PRIVATE &&
|
|
167
|
+
scCourse.privacy === SCCoursePrivacyType.DRAFT) && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classes.margin }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.description", defaultMessage: "ui.course.dashboard.student.description" }) })), _jsx(Stack, Object.assign({ className: classes.box }, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: scCourse.description })) }))] })), (((scCourse.privacy === SCCoursePrivacyType.PRIVATE || scCourse.privacy === SCCoursePrivacyType.SECRET) &&
|
|
152
168
|
(scCourse.join_status === SCCourseJoinStatusType.MANAGER || scCourse.join_status === SCCourseJoinStatusType.JOINED)) ||
|
|
153
169
|
(scCourse.privacy === SCCoursePrivacyType.OPEN && scCourse.join_status !== SCCourseJoinStatusType.CREATOR)) && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classes.margin }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.progress", defaultMessage: "ui.course.dashboard.student.description" }) })), _jsxs(Stack, Object.assign({ className: classes.box }, { children: [_jsxs(Stack, Object.assign({ className: classes.percentageWrapper }, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.progress.described", defaultMessage: "ui.course.dashboard.student.progress.described", values: { progress: scCourse.num_lessons_completed, end: scCourse.num_lessons } }) })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.progress.percentage", defaultMessage: "ui.course.dashboard.student.progress.percentage", values: { percentage: scCourse.user_completion_rate } }) }))] })), _jsx(LinearProgress, { className: classes.progress, variant: "determinate", value: scCourse === null || scCourse === void 0 ? void 0 : scCourse.user_completion_rate })] })), scCourse.user_completion_rate === 100 && (_jsxs(Stack, Object.assign({ className: classNames(classes.completedWrapper, classes.margin) }, { children: [_jsx(Typography, Object.assign({ variant: "h3" }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.completed", defaultMessage: "ui.course.dashboard.student.completed" }) })), _jsx("img", { src: CLAPPING, alt: intl.formatMessage({ id: 'ui.course.dashboard.student.completed', defaultMessage: 'ui.course.dashboard.student.completed' }), width: 32, height: 32 })] }))), _jsx(Typography, Object.assign({ variant: "h6", className: classes.margin }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.contents", defaultMessage: "ui.course.dashboard.student.contents" }) })), _jsxs(Stack, Object.assign({ className: classes.lessonsSections }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.course.table.sections.title", defaultMessage: "ui.course.table.sections.title", values: {
|
|
154
170
|
sectionsNumber: scCourse.num_sections
|
|
@@ -22,12 +22,12 @@ function FieldName(props) {
|
|
|
22
22
|
const { endpoint, row, isNewRow, handleManageRow, editMode, handleDisableEditMode } = props;
|
|
23
23
|
// STATES
|
|
24
24
|
const [loading, setLoading] = useState(false);
|
|
25
|
-
const [name, setName] = useState(
|
|
25
|
+
const [name, setName] = useState(row.name);
|
|
26
26
|
// HOOKS
|
|
27
27
|
const { enqueueSnackbar } = useSnackbar();
|
|
28
28
|
// DEBOUNCE
|
|
29
|
-
const debounceSetData = debounce((
|
|
30
|
-
setName(
|
|
29
|
+
const debounceSetData = debounce((newName) => {
|
|
30
|
+
setName(newName);
|
|
31
31
|
}, 300);
|
|
32
32
|
// HANDLERS
|
|
33
33
|
const handleChange = useCallback((e) => {
|