@selfcommunity/react-ui 0.10.2-courses.165 → 0.10.2-courses.167

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.
@@ -38,6 +38,6 @@ const Root = (0, styles_1.styled)(Widget_1.default, {
38
38
  *
39
39
  */
40
40
  function UserCreatedCoursesWidgetSkeleton(props) {
41
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: classes.root }, props, { children: [(0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(List_1.default, Object.assign({ className: classes.list }, { children: [...Array(3)].map((category, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { template: course_1.SCCourseTemplateType.SNIPPET, CourseProps: { userProfileSnippet: true }, elevation: 0 }) }, index))) })) }), ");"] })));
41
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, props, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: (0, jsx_runtime_1.jsx)(List_1.default, Object.assign({ className: classes.list }, { children: [...Array(3)].map((category, index) => ((0, jsx_runtime_1.jsx)(material_1.ListItem, { children: (0, jsx_runtime_1.jsx)(Skeleton_1.default, { template: course_1.SCCourseTemplateType.SNIPPET, CourseProps: { userProfileSnippet: true }, elevation: 0 }) }, index))) })) }) })));
42
42
  }
43
43
  exports.default = UserCreatedCoursesWidgetSkeleton;
@@ -9,11 +9,6 @@ export interface UserCreatedCoursesWidgetProps extends VirtualScrollerItemProps,
9
9
  * @default null
10
10
  */
11
11
  userId: number;
12
- /**
13
- * Hides this component
14
- * @default false
15
- */
16
- autoHide?: boolean;
17
12
  /**
18
13
  * Limit the number of courses to show
19
14
  * @default false
@@ -70,7 +70,7 @@ function UserCreatedCoursesWidget(inProps) {
70
70
  props: inProps,
71
71
  name: constants_1.PREFIX
72
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"]);
73
+ const { userId, limit = 3, className, CourseProps = {}, cacheStrategy = utils_1.CacheStrategies.NETWORK_ONLY, onHeightChange, onStateChange, DialogProps = {} } = props, rest = tslib_1.__rest(props, ["userId", "limit", "className", "CourseProps", "cacheStrategy", "onHeightChange", "onStateChange", "DialogProps"]);
74
74
  // CONTEXT
75
75
  const scUserContext = (0, react_core_1.useSCUser)();
76
76
  const { preferences, features } = (0, react_core_1.useSCPreferences)();
@@ -140,7 +140,7 @@ function UserCreatedCoursesWidget(inProps) {
140
140
  setOpenDialog((prev) => !prev);
141
141
  };
142
142
  // RENDER
143
- if (!coursesEnabled || (autoHide && !state.count && state.initialized) || !userId) {
143
+ if (!coursesEnabled || (!state.count && state.initialized) || !userId) {
144
144
  return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
145
145
  }
146
146
  if (!state.initialized) {
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import Widget from '../Widget';
3
3
  import { styled } from '@mui/material/styles';
4
4
  import { CardContent, ListItem } from '@mui/material';
@@ -35,5 +35,5 @@ const Root = styled(Widget, {
35
35
  *
36
36
  */
37
37
  export default function UserCreatedCoursesWidgetSkeleton(props) {
38
- return (_jsxs(Root, Object.assign({ className: classes.root }, props, { children: [_jsx(CardContent, { children: _jsx(List, Object.assign({ className: classes.list }, { children: [...Array(3)].map((category, index) => (_jsx(ListItem, { children: _jsx(CourseSkeleton, { template: SCCourseTemplateType.SNIPPET, CourseProps: { userProfileSnippet: true }, elevation: 0 }) }, index))) })) }), ");"] })));
38
+ return (_jsx(Root, Object.assign({ className: classes.root }, props, { children: _jsx(CardContent, { children: _jsx(List, Object.assign({ className: classes.list }, { children: [...Array(3)].map((category, index) => (_jsx(ListItem, { children: _jsx(CourseSkeleton, { template: SCCourseTemplateType.SNIPPET, CourseProps: { userProfileSnippet: true }, elevation: 0 }) }, index))) })) }) })));
39
39
  }
@@ -9,11 +9,6 @@ export interface UserCreatedCoursesWidgetProps extends VirtualScrollerItemProps,
9
9
  * @default null
10
10
  */
11
11
  userId: number;
12
- /**
13
- * Hides this component
14
- * @default false
15
- */
16
- autoHide?: boolean;
17
12
  /**
18
13
  * Limit the number of courses to show
19
14
  * @default false
@@ -68,7 +68,7 @@ export default function UserCreatedCoursesWidget(inProps) {
68
68
  props: inProps,
69
69
  name: PREFIX
70
70
  });
71
- const { userId, autoHide, limit = 3, className, CourseProps = {}, cacheStrategy = CacheStrategies.NETWORK_ONLY, onHeightChange, onStateChange, DialogProps = {} } = props, rest = __rest(props, ["userId", "autoHide", "limit", "className", "CourseProps", "cacheStrategy", "onHeightChange", "onStateChange", "DialogProps"]);
71
+ const { userId, limit = 3, className, CourseProps = {}, cacheStrategy = CacheStrategies.NETWORK_ONLY, onHeightChange, onStateChange, DialogProps = {} } = props, rest = __rest(props, ["userId", "limit", "className", "CourseProps", "cacheStrategy", "onHeightChange", "onStateChange", "DialogProps"]);
72
72
  // CONTEXT
73
73
  const scUserContext = useSCUser();
74
74
  const { preferences, features } = useSCPreferences();
@@ -138,7 +138,7 @@ export default function UserCreatedCoursesWidget(inProps) {
138
138
  setOpenDialog((prev) => !prev);
139
139
  };
140
140
  // RENDER
141
- if (!coursesEnabled || (autoHide && !state.count && state.initialized) || !userId) {
141
+ if (!coursesEnabled || (!state.count && state.initialized) || !userId) {
142
142
  return _jsx(HiddenPlaceholder, {});
143
143
  }
144
144
  if (!state.initialized) {