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

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.
@@ -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) {
@@ -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) {