@selfcommunity/react-templates 0.4.5-courses.100 → 0.4.5-courses.102
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/{CourseDashboard/CourseDashboard.d.ts → Course/Course.d.ts} +3 -3
- package/lib/cjs/components/{CourseDashboard/CourseDashboard.js → Course/Course.js} +3 -3
- package/lib/cjs/components/Course/constants.d.ts +1 -0
- package/lib/cjs/components/{CourseDashboard → Course}/constants.js +1 -1
- package/lib/cjs/components/Course/index.d.ts +3 -0
- package/lib/cjs/components/Course/index.js +5 -0
- package/lib/cjs/components/EditCourse/EditCourse.d.ts +2 -2
- package/lib/cjs/components/EditCourse/EditCourse.js +2 -2
- package/lib/cjs/components/EditCourse/constants.d.ts +1 -1
- package/lib/cjs/components/EditCourse/constants.js +1 -1
- package/lib/cjs/components/EditCourse/index.d.ts +3 -3
- package/lib/cjs/index.d.ts +3 -1
- package/lib/cjs/index.js +5 -1
- package/lib/esm/components/{CourseDashboard/CourseDashboard.d.ts → Course/Course.d.ts} +3 -3
- package/lib/esm/components/{CourseDashboard/CourseDashboard.js → Course/Course.js} +2 -2
- 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 +3 -0
- package/lib/esm/components/Course/index.js +2 -0
- package/lib/esm/components/EditCourse/EditCourse.d.ts +2 -2
- package/lib/esm/components/EditCourse/EditCourse.js +3 -3
- package/lib/esm/components/EditCourse/constants.d.ts +1 -1
- package/lib/esm/components/EditCourse/constants.js +1 -1
- package/lib/esm/components/EditCourse/index.d.ts +3 -3
- package/lib/esm/components/EditCourse/index.js +2 -2
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +3 -1
- package/lib/umd/react-templates.js +1 -1
- package/package.json +6 -6
- package/lib/cjs/components/CourseDashboard/constants.d.ts +0 -1
- package/lib/cjs/components/CourseDashboard/index.d.ts +0 -3
- package/lib/cjs/components/CourseDashboard/index.js +0 -5
- package/lib/esm/components/CourseDashboard/constants.d.ts +0 -1
- package/lib/esm/components/CourseDashboard/constants.js +0 -1
- package/lib/esm/components/CourseDashboard/index.d.ts +0 -3
- package/lib/esm/components/CourseDashboard/index.js +0 -2
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SCCourseType } from '@selfcommunity/types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface CourseProps {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the feed object
|
|
6
|
-
* @default '
|
|
6
|
+
* @default 'course'
|
|
7
7
|
*/
|
|
8
8
|
id?: string;
|
|
9
9
|
/**
|
|
@@ -25,4 +25,4 @@ export interface CourseDashboardTemplateProps {
|
|
|
25
25
|
onTabChange?: (page: 'students' | 'comments') => void;
|
|
26
26
|
viewDashboard?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export default function
|
|
28
|
+
export default function Course(inProps: CourseProps): JSX.Element;
|
|
@@ -15,13 +15,13 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
15
15
|
name: constants_1.PREFIX,
|
|
16
16
|
slot: 'Root'
|
|
17
17
|
})(() => ({}));
|
|
18
|
-
function
|
|
18
|
+
function Course(inProps) {
|
|
19
19
|
// PROPS
|
|
20
20
|
const props = (0, material_1.useThemeProps)({
|
|
21
21
|
props: inProps,
|
|
22
22
|
name: constants_1.PREFIX
|
|
23
23
|
});
|
|
24
|
-
const { id = '
|
|
24
|
+
const { id = 'course', className = null, course = null, courseId = null, page, onTabChange, viewDashboard } = props;
|
|
25
25
|
// HOOKS
|
|
26
26
|
const { scCourse, error } = (0, react_core_1.useSCFetchCourse)({
|
|
27
27
|
id: courseId,
|
|
@@ -36,4 +36,4 @@ function CourseDashboardTemplate(inProps) {
|
|
|
36
36
|
}
|
|
37
37
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: (0, jsx_runtime_1.jsx)(react_ui_1.CourseDashboard.Student, { course: scCourse }) })));
|
|
38
38
|
}
|
|
39
|
-
exports.default =
|
|
39
|
+
exports.default = Course;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCourse";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SCCourseType } from '@selfcommunity/types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface EditCourseProps {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the feed object
|
|
6
6
|
* @default 'course_edit'
|
|
@@ -24,4 +24,4 @@ export interface EditCourseTemplateProps {
|
|
|
24
24
|
page: 'lessons' | 'customize' | 'users' | 'options';
|
|
25
25
|
onTabChange: (page: 'lessons' | 'customize' | 'users' | 'options') => void;
|
|
26
26
|
}
|
|
27
|
-
export default function
|
|
27
|
+
export default function EditCourse(inProps: EditCourseProps): JSX.Element;
|
|
@@ -15,7 +15,7 @@ const Root = (0, material_1.styled)(material_1.Box, {
|
|
|
15
15
|
name: constants_1.PREFIX,
|
|
16
16
|
slot: 'Root'
|
|
17
17
|
})(() => ({}));
|
|
18
|
-
function
|
|
18
|
+
function EditCourse(inProps) {
|
|
19
19
|
// PROPS
|
|
20
20
|
const props = (0, material_1.useThemeProps)({
|
|
21
21
|
props: inProps,
|
|
@@ -26,4 +26,4 @@ function EditCourseTemplate(inProps) {
|
|
|
26
26
|
const { scCourse } = (0, react_core_1.useSCFetchCourse)({ id: courseId, course, params: { view: api_services_1.CourseInfoViewType.EDIT } });
|
|
27
27
|
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: (0, jsx_runtime_1.jsx)(react_ui_1.EditCourse, { course: scCourse, page: page, onTabChange: onTabChange }) })));
|
|
28
28
|
}
|
|
29
|
-
exports.default =
|
|
29
|
+
exports.default = EditCourse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PREFIX = "
|
|
1
|
+
export declare const PREFIX = "SCEditCourse";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default
|
|
3
|
-
export {
|
|
1
|
+
import EditCourse, { EditCourseProps } from './EditCourse';
|
|
2
|
+
export default EditCourse;
|
|
3
|
+
export { EditCourseProps };
|
package/lib/cjs/index.d.ts
CHANGED
|
@@ -12,4 +12,6 @@ import GroupFeed, { GroupFeedProps, GroupFeedSkeleton } from './components/Group
|
|
|
12
12
|
import Event, { EventProps, EventSkeleton } from './components/Event';
|
|
13
13
|
import EventFeed, { EventFeedProps, EventFeedSkeleton } from './components/EventFeed';
|
|
14
14
|
import Lesson, { LessonProps } from './components/Lesson';
|
|
15
|
-
|
|
15
|
+
import Course, { CourseProps } from './components/Course';
|
|
16
|
+
import EditCourse, { EditCourseProps } from './components/EditCourse';
|
|
17
|
+
export { Category, CategoryProps, CategorySkeleton, CategoryFeed, CategoryFeedProps, CategoryFeedSkeleton, Course, CourseProps, EditCourse, EditCourseProps, ExploreFeed, ExploreFeedProps, ExploreFeedSkeleton, FeedObjectDetail, FeedObjectDetailProps, FeedObjectDetailSkeleton, MainFeed, MainFeedProps, MainFeedSkeleton, NotificationFeed, NotificationFeedProps, NotificationFeedSkeleton, UserFeed, UserFeedProps, UserFeedSkeleton, UserProfile, UserProfileProps, UserProfileSkeleton, LoyaltyProgramDetail, LoyaltyProgramDetailProps, LoyaltyProgramDetailSkeleton, GroupFeed, GroupFeedProps, GroupFeedSkeleton, Group, GroupProps, GroupSkeleton, Event, EventProps, EventSkeleton, EventFeed, EventFeedProps, EventFeedSkeleton, Lesson, LessonProps };
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Lesson = exports.EventFeedSkeleton = exports.EventFeed = exports.EventSkeleton = exports.Event = exports.GroupSkeleton = exports.Group = exports.GroupFeedSkeleton = exports.GroupFeed = exports.LoyaltyProgramDetailSkeleton = exports.LoyaltyProgramDetail = exports.UserProfileSkeleton = exports.UserProfile = exports.UserFeedSkeleton = exports.UserFeed = exports.NotificationFeedSkeleton = exports.NotificationFeed = exports.MainFeedSkeleton = exports.MainFeed = exports.FeedObjectDetailSkeleton = exports.FeedObjectDetail = exports.ExploreFeedSkeleton = exports.ExploreFeed = exports.CategoryFeedSkeleton = exports.CategoryFeed = exports.CategorySkeleton = exports.Category = void 0;
|
|
3
|
+
exports.Lesson = exports.EventFeedSkeleton = exports.EventFeed = exports.EventSkeleton = exports.Event = exports.GroupSkeleton = exports.Group = exports.GroupFeedSkeleton = exports.GroupFeed = exports.LoyaltyProgramDetailSkeleton = exports.LoyaltyProgramDetail = exports.UserProfileSkeleton = exports.UserProfile = exports.UserFeedSkeleton = exports.UserFeed = exports.NotificationFeedSkeleton = exports.NotificationFeed = exports.MainFeedSkeleton = exports.MainFeed = exports.FeedObjectDetailSkeleton = exports.FeedObjectDetail = exports.ExploreFeedSkeleton = exports.ExploreFeed = exports.EditCourse = exports.Course = exports.CategoryFeedSkeleton = exports.CategoryFeed = exports.CategorySkeleton = exports.Category = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Category_1 = tslib_1.__importStar(require("./components/Category"));
|
|
6
6
|
exports.Category = Category_1.default;
|
|
@@ -43,3 +43,7 @@ exports.EventFeed = EventFeed_1.default;
|
|
|
43
43
|
Object.defineProperty(exports, "EventFeedSkeleton", { enumerable: true, get: function () { return EventFeed_1.EventFeedSkeleton; } });
|
|
44
44
|
const Lesson_1 = tslib_1.__importDefault(require("./components/Lesson"));
|
|
45
45
|
exports.Lesson = Lesson_1.default;
|
|
46
|
+
const Course_1 = tslib_1.__importDefault(require("./components/Course"));
|
|
47
|
+
exports.Course = Course_1.default;
|
|
48
|
+
const EditCourse_1 = tslib_1.__importDefault(require("./components/EditCourse"));
|
|
49
|
+
exports.EditCourse = EditCourse_1.default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SCCourseType } from '@selfcommunity/types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface CourseProps {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the feed object
|
|
6
|
-
* @default '
|
|
6
|
+
* @default 'course'
|
|
7
7
|
*/
|
|
8
8
|
id?: string;
|
|
9
9
|
/**
|
|
@@ -25,4 +25,4 @@ export interface CourseDashboardTemplateProps {
|
|
|
25
25
|
onTabChange?: (page: 'students' | 'comments') => void;
|
|
26
26
|
viewDashboard?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export default function
|
|
28
|
+
export default function Course(inProps: CourseProps): JSX.Element;
|
|
@@ -12,13 +12,13 @@ const Root = styled(Box, {
|
|
|
12
12
|
name: PREFIX,
|
|
13
13
|
slot: 'Root'
|
|
14
14
|
})(() => ({}));
|
|
15
|
-
export default function
|
|
15
|
+
export default function Course(inProps) {
|
|
16
16
|
// PROPS
|
|
17
17
|
const props = useThemeProps({
|
|
18
18
|
props: inProps,
|
|
19
19
|
name: PREFIX
|
|
20
20
|
});
|
|
21
|
-
const { id = '
|
|
21
|
+
const { id = 'course', className = null, course = null, courseId = null, page, onTabChange, viewDashboard } = props;
|
|
22
22
|
// HOOKS
|
|
23
23
|
const { scCourse, error } = useSCFetchCourse({
|
|
24
24
|
id: courseId,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCourse";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCCourse';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { SCCourseType } from '@selfcommunity/types';
|
|
3
|
-
export interface
|
|
3
|
+
export interface EditCourseProps {
|
|
4
4
|
/**
|
|
5
5
|
* Id of the feed object
|
|
6
6
|
* @default 'course_edit'
|
|
@@ -24,4 +24,4 @@ export interface EditCourseTemplateProps {
|
|
|
24
24
|
page: 'lessons' | 'customize' | 'users' | 'options';
|
|
25
25
|
onTabChange: (page: 'lessons' | 'customize' | 'users' | 'options') => void;
|
|
26
26
|
}
|
|
27
|
-
export default function
|
|
27
|
+
export default function EditCourse(inProps: EditCourseProps): JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { PREFIX } from './constants';
|
|
|
3
3
|
import { Box, styled, useThemeProps } from '@mui/material';
|
|
4
4
|
import { useSCFetchCourse } from '@selfcommunity/react-core';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
import { EditCourse } from '@selfcommunity/react-ui';
|
|
6
|
+
import { EditCourse as Edit } from '@selfcommunity/react-ui';
|
|
7
7
|
import { CourseInfoViewType } from '@selfcommunity/api-services';
|
|
8
8
|
const classes = {
|
|
9
9
|
root: `${PREFIX}-root`
|
|
@@ -12,7 +12,7 @@ const Root = styled(Box, {
|
|
|
12
12
|
name: PREFIX,
|
|
13
13
|
slot: 'Root'
|
|
14
14
|
})(() => ({}));
|
|
15
|
-
export default function
|
|
15
|
+
export default function EditCourse(inProps) {
|
|
16
16
|
// PROPS
|
|
17
17
|
const props = useThemeProps({
|
|
18
18
|
props: inProps,
|
|
@@ -21,5 +21,5 @@ export default function EditCourseTemplate(inProps) {
|
|
|
21
21
|
const { id = 'course_edit', className = null, course = null, courseId = null, page, onTabChange } = props;
|
|
22
22
|
// HOOKS
|
|
23
23
|
const { scCourse } = useSCFetchCourse({ id: courseId, course, params: { view: CourseInfoViewType.EDIT } });
|
|
24
|
-
return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: _jsx(
|
|
24
|
+
return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: _jsx(Edit, { course: scCourse, page: page, onTabChange: onTabChange }) })));
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PREFIX = "
|
|
1
|
+
export declare const PREFIX = "SCEditCourse";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const PREFIX = '
|
|
1
|
+
export const PREFIX = 'SCEditCourse';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default
|
|
3
|
-
export {
|
|
1
|
+
import EditCourse, { EditCourseProps } from './EditCourse';
|
|
2
|
+
export default EditCourse;
|
|
3
|
+
export { EditCourseProps };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
export default
|
|
1
|
+
import EditCourse from './EditCourse';
|
|
2
|
+
export default EditCourse;
|
package/lib/esm/index.d.ts
CHANGED
|
@@ -12,4 +12,6 @@ import GroupFeed, { GroupFeedProps, GroupFeedSkeleton } from './components/Group
|
|
|
12
12
|
import Event, { EventProps, EventSkeleton } from './components/Event';
|
|
13
13
|
import EventFeed, { EventFeedProps, EventFeedSkeleton } from './components/EventFeed';
|
|
14
14
|
import Lesson, { LessonProps } from './components/Lesson';
|
|
15
|
-
|
|
15
|
+
import Course, { CourseProps } from './components/Course';
|
|
16
|
+
import EditCourse, { EditCourseProps } from './components/EditCourse';
|
|
17
|
+
export { Category, CategoryProps, CategorySkeleton, CategoryFeed, CategoryFeedProps, CategoryFeedSkeleton, Course, CourseProps, EditCourse, EditCourseProps, ExploreFeed, ExploreFeedProps, ExploreFeedSkeleton, FeedObjectDetail, FeedObjectDetailProps, FeedObjectDetailSkeleton, MainFeed, MainFeedProps, MainFeedSkeleton, NotificationFeed, NotificationFeedProps, NotificationFeedSkeleton, UserFeed, UserFeedProps, UserFeedSkeleton, UserProfile, UserProfileProps, UserProfileSkeleton, LoyaltyProgramDetail, LoyaltyProgramDetailProps, LoyaltyProgramDetailSkeleton, GroupFeed, GroupFeedProps, GroupFeedSkeleton, Group, GroupProps, GroupSkeleton, Event, EventProps, EventSkeleton, EventFeed, EventFeedProps, EventFeedSkeleton, Lesson, LessonProps };
|
package/lib/esm/index.js
CHANGED
|
@@ -12,4 +12,6 @@ import GroupFeed, { GroupFeedSkeleton } from './components/GroupFeed';
|
|
|
12
12
|
import Event, { EventSkeleton } from './components/Event';
|
|
13
13
|
import EventFeed, { EventFeedSkeleton } from './components/EventFeed';
|
|
14
14
|
import Lesson from './components/Lesson';
|
|
15
|
-
|
|
15
|
+
import Course from './components/Course';
|
|
16
|
+
import EditCourse from './components/EditCourse';
|
|
17
|
+
export { Category, CategorySkeleton, CategoryFeed, CategoryFeedSkeleton, Course, EditCourse, ExploreFeed, ExploreFeedSkeleton, FeedObjectDetail, FeedObjectDetailSkeleton, MainFeed, MainFeedSkeleton, NotificationFeed, NotificationFeedSkeleton, UserFeed, UserFeedSkeleton, UserProfile, UserProfileSkeleton, LoyaltyProgramDetail, LoyaltyProgramDetailSkeleton, GroupFeed, GroupFeedSkeleton, Group, GroupSkeleton, Event, EventSkeleton, EventFeed, EventFeedSkeleton, Lesson };
|