@selfcommunity/react-templates 0.4.5-courses.105 → 0.4.5-courses.106

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.
Files changed (30) hide show
  1. package/lib/cjs/index.d.ts +1 -2
  2. package/lib/cjs/index.js +1 -3
  3. package/lib/esm/index.d.ts +1 -2
  4. package/lib/esm/index.js +1 -2
  5. package/lib/umd/react-templates.js +1 -1
  6. package/package.json +6 -6
  7. package/lib/cjs/components/Courses/Courses.d.ts +0 -25
  8. package/lib/cjs/components/Courses/Courses.js +0 -29
  9. package/lib/cjs/components/Courses/constants.d.ts +0 -1
  10. package/lib/cjs/components/Courses/constants.js +0 -4
  11. package/lib/cjs/components/Courses/index.d.ts +0 -3
  12. package/lib/cjs/components/Courses/index.js +0 -5
  13. package/lib/cjs/components/EditCourse/EditCourse.d.ts +0 -27
  14. package/lib/cjs/components/EditCourse/EditCourse.js +0 -29
  15. package/lib/cjs/components/EditCourse/constants.d.ts +0 -1
  16. package/lib/cjs/components/EditCourse/constants.js +0 -4
  17. package/lib/cjs/components/EditCourse/index.d.ts +0 -3
  18. package/lib/cjs/components/EditCourse/index.js +0 -5
  19. package/lib/esm/components/Courses/Courses.d.ts +0 -25
  20. package/lib/esm/components/Courses/Courses.js +0 -25
  21. package/lib/esm/components/Courses/constants.d.ts +0 -1
  22. package/lib/esm/components/Courses/constants.js +0 -1
  23. package/lib/esm/components/Courses/index.d.ts +0 -3
  24. package/lib/esm/components/Courses/index.js +0 -2
  25. package/lib/esm/components/EditCourse/EditCourse.d.ts +0 -27
  26. package/lib/esm/components/EditCourse/EditCourse.js +0 -25
  27. package/lib/esm/components/EditCourse/constants.d.ts +0 -1
  28. package/lib/esm/components/EditCourse/constants.js +0 -1
  29. package/lib/esm/components/EditCourse/index.d.ts +0 -3
  30. package/lib/esm/components/EditCourse/index.js +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@selfcommunity/react-templates",
3
- "version": "0.4.5-courses.105+a4f33a9cd",
3
+ "version": "0.4.5-courses.106+d3e68fd6c",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "./lib/cjs/index.js",
@@ -67,10 +67,10 @@
67
67
  "react-intl": "^6.5.5"
68
68
  },
69
69
  "dependencies": {
70
- "@selfcommunity/react-core": "0.6.4-courses.107+a4f33a9cd",
71
- "@selfcommunity/react-i18n": "0.7.4-courses.107+a4f33a9cd",
72
- "@selfcommunity/react-ui": "0.10.2-courses.105+a4f33a9cd",
73
- "@selfcommunity/types": "0.7.4-courses.153+a4f33a9cd",
70
+ "@selfcommunity/react-core": "0.6.4-courses.108+d3e68fd6c",
71
+ "@selfcommunity/react-i18n": "0.7.4-courses.108+d3e68fd6c",
72
+ "@selfcommunity/react-ui": "0.10.2-courses.106+d3e68fd6c",
73
+ "@selfcommunity/types": "0.7.4-courses.154+d3e68fd6c",
74
74
  "@types/classnames": "^2.3.1",
75
75
  "classnames": "^2.3.2"
76
76
  },
@@ -126,5 +126,5 @@
126
126
  "bugs": {
127
127
  "url": "https://github.com/selfcommunity/community-js/issues"
128
128
  },
129
- "gitHead": "a4f33a9cd9aaa7d4011d2a14754d9935667ef2c7"
129
+ "gitHead": "d3e68fd6c3434e4ca0c72680880fd173c3bca7f9"
130
130
  }
@@ -1,25 +0,0 @@
1
- import { SCCourseType } from '@selfcommunity/types';
2
- import { HTMLAttributes } from 'react';
3
- export interface CoursesTemplateProps {
4
- /**
5
- * Id of the feed object
6
- * @default 'course_dashboard'
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: HTMLAttributes<HTMLDivElement>['className'];
14
- /**
15
- * Course Object
16
- * @default null
17
- */
18
- course?: SCCourseType;
19
- /**
20
- * Id of the course for filter the feed
21
- * @default null
22
- */
23
- courseId?: number;
24
- }
25
- export default function CoursesTemplate(inProps: CoursesTemplateProps): JSX.Element;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const material_1 = require("@mui/material");
6
- const react_core_1 = require("@selfcommunity/react-core");
7
- const constants_1 = require("./constants");
8
- const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
- const react_ui_1 = require("@selfcommunity/react-ui");
10
- const classes = {
11
- root: `${constants_1.PREFIX}-root`
12
- };
13
- const Root = (0, material_1.styled)(material_1.Box, {
14
- name: constants_1.PREFIX,
15
- slot: 'Root'
16
- })(() => ({}));
17
- function CoursesTemplate(inProps) {
18
- // PROPS
19
- const props = (0, material_1.useThemeProps)({
20
- props: inProps,
21
- name: constants_1.PREFIX
22
- });
23
- const { id = 'courses', className = null, course = null, courseId = null } = props;
24
- // HOOKS
25
- const { scCourse } = (0, react_core_1.useSCFetchCourse)({ id: courseId, course });
26
- const scUserContext = (0, react_core_1.useSCUser)();
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.Courses, { endpoint: { url: () => '', method: 'GET' } }) })));
28
- }
29
- exports.default = CoursesTemplate;
@@ -1 +0,0 @@
1
- export declare const PREFIX = "SCCoursesTemplate";
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PREFIX = void 0;
4
- exports.PREFIX = 'SCCoursesTemplate';
@@ -1,3 +0,0 @@
1
- import CoursesTemplate, { CoursesTemplateProps } from './Courses';
2
- export default CoursesTemplate;
3
- export { CoursesTemplateProps };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const Courses_1 = tslib_1.__importDefault(require("./Courses"));
5
- exports.default = Courses_1.default;
@@ -1,27 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { SCCourseType } from '@selfcommunity/types';
3
- export interface EditCourseProps {
4
- /**
5
- * Id of the feed object
6
- * @default 'course_edit'
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: HTMLAttributes<HTMLDivElement>['className'];
14
- /**
15
- * Course Object
16
- * @default null
17
- */
18
- course?: SCCourseType;
19
- /**
20
- * Id of the course for filter the feed
21
- * @default null
22
- */
23
- courseId?: number;
24
- page: 'lessons' | 'customize' | 'users' | 'options';
25
- onTabChange: (page: 'lessons' | 'customize' | 'users' | 'options') => void;
26
- }
27
- export default function EditCourse(inProps: EditCourseProps): JSX.Element;
@@ -1,29 +0,0 @@
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 constants_1 = require("./constants");
6
- const material_1 = require("@mui/material");
7
- const react_core_1 = require("@selfcommunity/react-core");
8
- const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
- const react_ui_1 = require("@selfcommunity/react-ui");
10
- const api_services_1 = require("@selfcommunity/api-services");
11
- const classes = {
12
- root: `${constants_1.PREFIX}-root`
13
- };
14
- const Root = (0, material_1.styled)(material_1.Box, {
15
- name: constants_1.PREFIX,
16
- slot: 'Root'
17
- })(() => ({}));
18
- function EditCourse(inProps) {
19
- // PROPS
20
- const props = (0, material_1.useThemeProps)({
21
- props: inProps,
22
- name: constants_1.PREFIX
23
- });
24
- const { id = 'course_edit', className = null, course = null, courseId = null, page, onTabChange } = props;
25
- // HOOKS
26
- const { scCourse } = (0, react_core_1.useSCFetchCourse)({ id: courseId, course, params: { view: api_services_1.CourseInfoViewType.EDIT } });
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
- }
29
- exports.default = EditCourse;
@@ -1 +0,0 @@
1
- export declare const PREFIX = "SCEditCourse";
@@ -1,4 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PREFIX = void 0;
4
- exports.PREFIX = 'SCEditCourse';
@@ -1,3 +0,0 @@
1
- import EditCourse, { EditCourseProps } from './EditCourse';
2
- export default EditCourse;
3
- export { EditCourseProps };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const EditCourse_1 = tslib_1.__importDefault(require("./EditCourse"));
5
- exports.default = EditCourse_1.default;
@@ -1,25 +0,0 @@
1
- import { SCCourseType } from '@selfcommunity/types';
2
- import { HTMLAttributes } from 'react';
3
- export interface CoursesTemplateProps {
4
- /**
5
- * Id of the feed object
6
- * @default 'course_dashboard'
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: HTMLAttributes<HTMLDivElement>['className'];
14
- /**
15
- * Course Object
16
- * @default null
17
- */
18
- course?: SCCourseType;
19
- /**
20
- * Id of the course for filter the feed
21
- * @default null
22
- */
23
- courseId?: number;
24
- }
25
- export default function CoursesTemplate(inProps: CoursesTemplateProps): JSX.Element;
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box, styled, useThemeProps } from '@mui/material';
3
- import { useSCFetchCourse, useSCUser } from '@selfcommunity/react-core';
4
- import { PREFIX } from './constants';
5
- import classNames from 'classnames';
6
- import { Courses } from '@selfcommunity/react-ui';
7
- const classes = {
8
- root: `${PREFIX}-root`
9
- };
10
- const Root = styled(Box, {
11
- name: PREFIX,
12
- slot: 'Root'
13
- })(() => ({}));
14
- export default function CoursesTemplate(inProps) {
15
- // PROPS
16
- const props = useThemeProps({
17
- props: inProps,
18
- name: PREFIX
19
- });
20
- const { id = 'courses', className = null, course = null, courseId = null } = props;
21
- // HOOKS
22
- const { scCourse } = useSCFetchCourse({ id: courseId, course });
23
- const scUserContext = useSCUser();
24
- return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className) }, { children: _jsx(Courses, { endpoint: { url: () => '', method: 'GET' } }) })));
25
- }
@@ -1 +0,0 @@
1
- export declare const PREFIX = "SCCoursesTemplate";
@@ -1 +0,0 @@
1
- export const PREFIX = 'SCCoursesTemplate';
@@ -1,3 +0,0 @@
1
- import CoursesTemplate, { CoursesTemplateProps } from './Courses';
2
- export default CoursesTemplate;
3
- export { CoursesTemplateProps };
@@ -1,2 +0,0 @@
1
- import CoursesTemplate from './Courses';
2
- export default CoursesTemplate;
@@ -1,27 +0,0 @@
1
- import { HTMLAttributes } from 'react';
2
- import { SCCourseType } from '@selfcommunity/types';
3
- export interface EditCourseProps {
4
- /**
5
- * Id of the feed object
6
- * @default 'course_edit'
7
- */
8
- id?: string;
9
- /**
10
- * Overrides or extends the styles applied to the component.
11
- * @default null
12
- */
13
- className?: HTMLAttributes<HTMLDivElement>['className'];
14
- /**
15
- * Course Object
16
- * @default null
17
- */
18
- course?: SCCourseType;
19
- /**
20
- * Id of the course for filter the feed
21
- * @default null
22
- */
23
- courseId?: number;
24
- page: 'lessons' | 'customize' | 'users' | 'options';
25
- onTabChange: (page: 'lessons' | 'customize' | 'users' | 'options') => void;
26
- }
27
- export default function EditCourse(inProps: EditCourseProps): JSX.Element;
@@ -1,25 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { PREFIX } from './constants';
3
- import { Box, styled, useThemeProps } from '@mui/material';
4
- import { useSCFetchCourse } from '@selfcommunity/react-core';
5
- import classNames from 'classnames';
6
- import { EditCourse as Edit } from '@selfcommunity/react-ui';
7
- import { CourseInfoViewType } from '@selfcommunity/api-services';
8
- const classes = {
9
- root: `${PREFIX}-root`
10
- };
11
- const Root = styled(Box, {
12
- name: PREFIX,
13
- slot: 'Root'
14
- })(() => ({}));
15
- export default function EditCourse(inProps) {
16
- // PROPS
17
- const props = useThemeProps({
18
- props: inProps,
19
- name: PREFIX
20
- });
21
- const { id = 'course_edit', className = null, course = null, courseId = null, page, onTabChange } = props;
22
- // HOOKS
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(Edit, { course: scCourse, page: page, onTabChange: onTabChange }) })));
25
- }
@@ -1 +0,0 @@
1
- export declare const PREFIX = "SCEditCourse";
@@ -1 +0,0 @@
1
- export const PREFIX = 'SCEditCourse';
@@ -1,3 +0,0 @@
1
- import EditCourse, { EditCourseProps } from './EditCourse';
2
- export default EditCourse;
3
- export { EditCourseProps };
@@ -1,2 +0,0 @@
1
- import EditCourse from './EditCourse';
2
- export default EditCourse;