@selfcommunity/react-ui 1.2.5-alpha.3 → 1.2.5-alpha.5

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 (35) hide show
  1. package/lib/cjs/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
  2. package/lib/cjs/components/Course/Course.js +1 -1
  3. package/lib/cjs/components/CourseDashboard/Student.js +2 -2
  4. package/lib/cjs/components/CourseForm/CourseForm.d.ts +2 -2
  5. package/lib/cjs/components/CourseForm/CourseForm.js +2 -2
  6. package/lib/cjs/components/CourseFormDialog/CourseFormDialog.js +3 -2
  7. package/lib/cjs/components/CreateCourseButton/CreateCourseButton.d.ts +1 -1
  8. package/lib/cjs/components/CreateCourseButton/CreateCourseButton.js +1 -1
  9. package/lib/cjs/components/EventLocationWidget/EventMap.js +7 -5
  10. package/lib/cjs/components/Events/Events.js +1 -5
  11. package/lib/cjs/components/Feed/Feed.js +1 -1
  12. package/lib/cjs/components/InlineComposerWidget/InlineComposerWidget.js +1 -1
  13. package/lib/cjs/shared/Media/File/DisplayComponent.d.ts +2 -2
  14. package/lib/cjs/shared/Media/File/DisplayComponent.js +6 -4
  15. package/lib/cjs/shared/Media/File/DocComponent.js +1 -1
  16. package/lib/cjs/shared/Media/File/PreviewComponent.js +1 -1
  17. package/lib/esm/components/CommentsFeedObject/CommentsFeedObject.js +1 -1
  18. package/lib/esm/components/Course/Course.js +1 -1
  19. package/lib/esm/components/CourseDashboard/Student.js +2 -2
  20. package/lib/esm/components/CourseForm/CourseForm.d.ts +2 -2
  21. package/lib/esm/components/CourseForm/CourseForm.js +2 -2
  22. package/lib/esm/components/CourseFormDialog/CourseFormDialog.js +3 -2
  23. package/lib/esm/components/CreateCourseButton/CreateCourseButton.d.ts +1 -1
  24. package/lib/esm/components/CreateCourseButton/CreateCourseButton.js +1 -1
  25. package/lib/esm/components/EventLocationWidget/EventMap.js +7 -5
  26. package/lib/esm/components/Events/Events.js +1 -5
  27. package/lib/esm/components/Feed/Feed.js +1 -1
  28. package/lib/esm/components/InlineComposerWidget/InlineComposerWidget.js +1 -1
  29. package/lib/esm/index.js +3 -1
  30. package/lib/esm/shared/Media/File/DisplayComponent.d.ts +2 -2
  31. package/lib/esm/shared/Media/File/DisplayComponent.js +6 -4
  32. package/lib/esm/shared/Media/File/DocComponent.js +1 -1
  33. package/lib/esm/shared/Media/File/PreviewComponent.js +1 -1
  34. package/lib/umd/react-ui.js +1 -1
  35. package/package.json +7 -7
@@ -90,7 +90,7 @@ function CommentsFeedObject(inProps) {
90
90
  */
91
91
  const renderTitle = (0, react_1.useMemo)(() => () => {
92
92
  if (showTitle) {
93
- return ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", gutterBottom: true, color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
93
+ return ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "p", variant: "h6", gutterBottom: true, color: "inherit" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
94
94
  }
95
95
  return null;
96
96
  }, [total, isLoading]);
@@ -165,7 +165,7 @@ function Course(inProps) {
165
165
  to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
166
166
  }), { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !((_b = scCourse.created_by) === null || _b === void 0 ? void 0 : _b.community_badge), smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scCourse.name, src: (_c = scCourse.created_by) === null || _c === void 0 ? void 0 : _c.avatar, className: classes.previewAvatar }) })) }))] })), (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.previewContent }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ className: classes.previewCreator }, (!((_d = scCourse.created_by) === null || _d === void 0 ? void 0 : _d.deleted) && {
167
167
  to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
168
- }), { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (_e = scCourse.created_by) === null || _e === void 0 ? void 0 : _e.username })) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_ROUTE_NAME, scCourse), className: classes.previewNameWrapper }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), (0, jsx_runtime_1.jsx)(material_1.Stack, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.previewInfo }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.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' }), ' - ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` }), isPaymentsEnabled && ((_f = scCourse.paywalls) === null || _f === void 0 ? void 0 : _f.length) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["\u00A0", (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "pagamenti" })] }))] })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.previewCategory }, { children: [scCourse.categories.slice(0, MAX_VISIBLE_CATEGORIES).map((category) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { size: "small", label: category.name }, category.id))), scCourse.categories.length > MAX_VISIBLE_CATEGORIES && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: scCourse.categories.slice(MAX_VISIBLE_CATEGORIES).map((cat) => ((0, jsx_runtime_1.jsx)(material_1.Box, { children: cat.name }, cat.id))) }) }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { size: "small", label: `+${scCourse.categories.length - MAX_VISIBLE_CATEGORIES}`, sx: { cursor: 'pointer' } }) })))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.previewProgress }, { children: renderProgress() }))] })), actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.previewActions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
168
+ }), { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: (_e = scCourse.created_by) === null || _e === void 0 ? void 0 : _e.username })) })), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_ROUTE_NAME, scCourse), className: classes.previewNameWrapper }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "h2", variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), (0, jsx_runtime_1.jsx)(material_1.Stack, { children: (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: classes.previewInfo }, { children: [(0, jsx_runtime_1.jsx)(react_intl_1.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' }), ' - ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.course.type.${scCourse.type}`, defaultMessage: `ui.course.type.${scCourse.type}` }), isPaymentsEnabled && ((_f = scCourse.paywalls) === null || _f === void 0 ? void 0 : _f.length) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: ["\u00A0", (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "pagamenti" })] }))] })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.previewCategory }, { children: [scCourse.categories.slice(0, MAX_VISIBLE_CATEGORIES).map((category) => ((0, jsx_runtime_1.jsx)(material_1.Chip, { size: "small", label: category.name }, category.id))), scCourse.categories.length > MAX_VISIBLE_CATEGORIES && ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: scCourse.categories.slice(MAX_VISIBLE_CATEGORIES).map((cat) => ((0, jsx_runtime_1.jsx)(material_1.Box, { children: cat.name }, cat.id))) }) }, { children: (0, jsx_runtime_1.jsx)(material_1.Chip, { size: "small", label: `+${scCourse.categories.length - MAX_VISIBLE_CATEGORIES}`, sx: { cursor: 'pointer' } }) })))] })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.previewProgress }, { children: renderProgress() }))] })), actions !== null && actions !== void 0 ? actions : ((0, jsx_runtime_1.jsx)(material_1.CardActions, Object.assign({ className: classes.previewActions }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", size: "small", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
169
169
  }
170
170
  else {
171
171
  contentObj = ((0, jsx_runtime_1.jsx)(SnippetRoot, { elevation: 0, className: classes.snippetRoot, image: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.snippetImage }, { children: [(0, jsx_runtime_1.jsx)(material_1.Avatar, { variant: "square", alt: scCourse.name, src: scCourse.image_medium, className: userProfileSnippet ? classes.snippetAvatarUserProfile : classes.snippetAvatar }), !userProfileSnippet &&
@@ -206,9 +206,9 @@ function Student(inProps) {
206
206
  scCourse.privacy === types_1.SCCoursePrivacyType.DRAFT) &&
207
207
  scCourse.description && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: (0, classnames_1.default)(classes.margin, classes.defaultContrastColor) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.description", defaultMessage: "ui.course.dashboard.student.description" }) })), (0, jsx_runtime_1.jsx)(material_1.Stack, Object.assign({ className: classes.box }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: (0, classnames_1.default)(classes.description, classes.paperContrastColor) }, { children: scCourse.description })) }))] })), (((scCourse.privacy === types_1.SCCoursePrivacyType.PRIVATE || scCourse.privacy === types_1.SCCoursePrivacyType.SECRET) &&
208
208
  (scCourse.join_status === types_1.SCCourseJoinStatusType.MANAGER || scCourse.join_status === types_1.SCCourseJoinStatusType.JOINED)) ||
209
- (scCourse.privacy === types_1.SCCoursePrivacyType.OPEN && scCourse.join_status !== types_1.SCCourseJoinStatusType.CREATOR)) && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [scCourse.join_status !== null && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: (0, classnames_1.default)(classes.margin, classes.defaultContrastColor) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.progress", defaultMessage: "ui.course.dashboard.student.progress" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.box }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.percentageWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.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 } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.progress.percentage", defaultMessage: "ui.course.dashboard.student.progress.percentage", values: { percentage: scCourse.user_completion_rate } }) }))] })), (0, jsx_runtime_1.jsx)(material_1.LinearProgress, { className: classes.progress, variant: "determinate", value: scCourse.user_completion_rate })] }))] })), scCourse.user_completion_rate === 100 && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: (0, classnames_1.default)(classes.completedWrapper, classes.margin) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h3", className: classes.defaultContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.completed", defaultMessage: "ui.course.dashboard.student.completed" }) })), (0, jsx_runtime_1.jsx)("img", { src: clapping_1.default, alt: intl.formatMessage({ id: 'ui.course.dashboard.student.completed', defaultMessage: 'ui.course.dashboard.student.completed' }), width: 32, height: 32 })] }))), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: (0, classnames_1.default)(classes.margin, classes.defaultContrastColor) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.contents", defaultMessage: "ui.course.dashboard.student.contents" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.lessonsSections }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.sections.title", defaultMessage: "ui.course.table.sections.title", values: {
209
+ (scCourse.privacy === types_1.SCCoursePrivacyType.OPEN && scCourse.join_status !== types_1.SCCourseJoinStatusType.CREATOR)) && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [scCourse.join_status !== null && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h6", className: (0, classnames_1.default)(classes.margin, classes.defaultContrastColor) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.progress", defaultMessage: "ui.course.dashboard.student.progress" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.box }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.percentageWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.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 } }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.progress.percentage", defaultMessage: "ui.course.dashboard.student.progress.percentage", values: { percentage: scCourse.user_completion_rate } }) }))] })), (0, jsx_runtime_1.jsx)(material_1.LinearProgress, { className: classes.progress, variant: "determinate", value: scCourse.user_completion_rate })] }))] })), scCourse.user_completion_rate === 100 && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: (0, classnames_1.default)(classes.completedWrapper, classes.margin) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "h2", variant: "h3", className: classes.defaultContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.completed", defaultMessage: "ui.course.dashboard.student.completed" }) })), (0, jsx_runtime_1.jsx)("img", { src: clapping_1.default, alt: intl.formatMessage({ id: 'ui.course.dashboard.student.completed', defaultMessage: 'ui.course.dashboard.student.completed' }), width: 32, height: 32 })] }))), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "h2", variant: "h6", className: (0, classnames_1.default)(classes.margin, classes.defaultContrastColor) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.dashboard.student.contents", defaultMessage: "ui.course.dashboard.student.contents" }) })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.lessonsSections }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "h3", variant: "h5", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.sections.title", defaultMessage: "ui.course.table.sections.title", values: {
210
210
  sectionsNumber: scCourse.num_sections
211
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.circle }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
211
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.circle }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "h3", variant: "h5", className: classes.paperContrastColor }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
212
212
  lessonsNumber: scCourse.num_lessons
213
213
  } }) }))] })), (0, jsx_runtime_1.jsx)(AccordionLessons_1.default, { course: scCourse, className: classes.accordion })] }))] })));
214
214
  }
@@ -1,5 +1,5 @@
1
1
  import { BoxProps } from '@mui/material';
2
- import { SCCourseType } from '@selfcommunity/types';
2
+ import { SCCourseType, SCCourseTypologyType } from '@selfcommunity/types';
3
3
  import { SCCourseFormStepType } from '../../constants/Course';
4
4
  export interface CourseFormProps extends BoxProps {
5
5
  /**
@@ -26,7 +26,7 @@ export interface CourseFormProps extends BoxProps {
26
26
  * On step change callback function
27
27
  * @default null
28
28
  */
29
- onStepChange?: (step: SCCourseFormStepType, type: SCCourseType) => void;
29
+ onStepChange?: (step: SCCourseFormStepType, type: SCCourseTypologyType) => void;
30
30
  /**
31
31
  * On error callback function
32
32
  * @default null
@@ -116,7 +116,7 @@ function CourseForm(inProps) {
116
116
  imageOriginal: (course === null || course === void 0 ? void 0 : course.image_bigger) || '',
117
117
  imageOriginalFile: '',
118
118
  name: (course === null || course === void 0 ? void 0 : course.name) || '',
119
- type: (course === null || course === void 0 ? void 0 : course.type) || '',
119
+ type: (course === null || course === void 0 ? void 0 : course.type) || types_1.SCCourseTypologyType.SELF,
120
120
  description: course ? course.description : '',
121
121
  categories: course ? course.categories : [],
122
122
  privacy: course ? course.privacy : '',
@@ -160,7 +160,7 @@ function CourseForm(inProps) {
160
160
  */
161
161
  const handleChangeStep = (newStep) => {
162
162
  setStep(newStep);
163
- onStepChange(newStep, field.type);
163
+ onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(newStep, field.type);
164
164
  };
165
165
  /**
166
166
  * Formats categories object to a specific format needed in the form body
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const material_1 = require("@mui/material");
6
6
  const system_1 = require("@mui/system");
7
+ const types_1 = require("@selfcommunity/types");
7
8
  const classnames_1 = tslib_1.__importDefault(require("classnames"));
8
9
  const react_intl_1 = require("react-intl");
9
10
  const BaseDialog_1 = tslib_1.__importDefault(require("../../shared/BaseDialog"));
@@ -45,9 +46,9 @@ function CourseFormDialog(inProps) {
45
46
  });
46
47
  const { className, open = true, onClose, CourseFormComponentProps = {} } = props, rest = tslib_1.__rest(props, ["className", "open", "onClose", "CourseFormComponentProps"]);
47
48
  // STATE
48
- // TODO - temporary hardcoded CUSTOMIZATION and 'self-paced' --> previous value: GENERAL and ''
49
+ // TODO - temporary hardcoded CUSTOMIZATION and SELF --> previous value: GENERAL and ''
49
50
  const [step, setStep] = (0, react_1.useState)(Course_1.SCCourseFormStepType.CUSTOMIZATION);
50
- const [type, setType] = (0, react_1.useState)('self-paced');
51
+ const [type, setType] = (0, react_1.useState)(types_1.SCCourseTypologyType.SELF);
51
52
  //HANDLERS
52
53
  const handleStepTypeChange = (step, type) => {
53
54
  setStep(step);
@@ -35,4 +35,4 @@ export interface CreateCourseButtonProps extends ButtonProps {
35
35
 
36
36
  * @param inProps
37
37
  */
38
- export default function CreateCourseButton(inProps: CreateCourseButtonProps): JSX.Element;
38
+ export default function CreateCourseButton(inProps: CreateCourseButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -17,7 +17,7 @@ const classes = {
17
17
  const Root = (0, material_1.styled)(material_1.Button, {
18
18
  name: PREFIX,
19
19
  slot: 'Root',
20
- overridesResolver: (props, styles) => styles.root
20
+ overridesResolver: (_props, styles) => styles.root
21
21
  })(() => ({}));
22
22
  /**
23
23
  *> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_core_1 = require("@selfcommunity/react-core");
5
5
  const react_google_maps_1 = require("@vis.gl/react-google-maps");
6
+ const react_intl_1 = require("react-intl");
6
7
  function EventMap(props) {
7
8
  // PROPS
8
9
  const { event, className } = props;
9
10
  // HOOKS
10
11
  const { isLoaded } = (0, react_core_1.useSCGoogleApiLoader)();
12
+ const intl = (0, react_intl_1.useIntl)();
11
13
  if (!isLoaded) {
12
14
  return null;
13
15
  }
@@ -17,12 +19,12 @@ function EventMap(props) {
17
19
  * https://developers.google.com/maps/deprecations
18
20
  * https://developers.google.com/maps/documentation/javascript/advanced-markers/migration
19
21
  */
20
- return ((0, jsx_runtime_1.jsx)(react_google_maps_1.Map, Object.assign({ className: className, mapId: "aef14f6caa750c5616b23934", defaultCenter: {
21
- lat: event.geolocation_lat,
22
- lng: event.geolocation_lng
23
- }, zoom: 15, gestureHandling: "greedy", fullscreenControl: false, mapTypeControl: false, streetViewControl: false, zoomControl: false }, { children: (0, jsx_runtime_1.jsx)(react_google_maps_1.AdvancedMarker, { position: {
22
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ role: "region", "aria-label": intl.formatMessage({ id: 'ui.eventLocationWidget.map.ariaLabel', defaultMessage: 'ui.eventLocationWidget.map.ariaLabel' }) }, { children: (0, jsx_runtime_1.jsx)(react_google_maps_1.Map, Object.assign({ className: className, mapId: "aef14f6caa750c5616b23934", defaultCenter: {
24
23
  lat: event.geolocation_lat,
25
24
  lng: event.geolocation_lng
26
- } }) })));
25
+ }, zoom: 15, gestureHandling: "greedy", fullscreenControl: false, mapTypeControl: false, streetViewControl: false, zoomControl: false }, { children: (0, jsx_runtime_1.jsx)(react_google_maps_1.AdvancedMarker, { position: {
26
+ lat: event.geolocation_lat,
27
+ lng: event.geolocation_lng
28
+ } }) })) })));
27
29
  }
28
30
  exports.default = EventMap;
@@ -234,11 +234,7 @@ function Events(inProps) {
234
234
  input: {
235
235
  endAdornment: ((0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ title: intl.formatMessage({ id: 'ui.events.filterByName', defaultMessage: 'ui.events.filterByName' }), onClick: () => fetchEvents(), disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, { title: intl.formatMessage({ id: 'ui.events.filterByName', defaultMessage: 'ui.events.filterByName' }), size: "small", variant: "contained", color: "secondary", onClick: () => fetchEvents(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading })) })))
236
236
  }
237
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) }), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ disabled: showOngoingEvents || loading, size: "small", title: intl.formatMessage({ id: 'ui.events.filterByDate', defaultMessage: 'ui.events.filterByDate' }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select", slotProps: {
238
- input: {
239
- 'aria-label': `${option.label}`
240
- }
241
- } }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
237
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ fullWidth: true }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, Object.assign({ htmlFor: "filterByDate" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) })), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ id: "filterByDate", disabled: showOngoingEvents || loading, size: "small", title: intl.formatMessage({ id: 'ui.events.filterByDate', defaultMessage: 'ui.events.filterByDate' }), label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => ((0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ value: option.value }, { children: [(0, jsx_runtime_1.jsx)(material_1.Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select" }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && ((0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
242
238
  // @ts-expect-error this is needed to use showFollowed into SCEvents
243
239
  showFollowed: showFollowed, deleteIcon: showFollowed ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showFollowed ? handleDeleteClick : null, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, { children: (0, jsx_runtime_1.jsx)(OngoingEventsFilter_1.default, { showOngoingEvents: showOngoingEvents, handleClick: handleChipOngoingClick, handleDeleteClick: handleDeleteOngoingClick, disabled: dateSearch !== types_1.SCEventDateFilterType.ALL || loading }) })] })) : null }))), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: loading ? ((0, jsx_runtime_1.jsx)(Skeleton_1.default, Object.assign({}, EventsSkeletonComponentProps, { EventSkeletonProps: EventSkeletonComponentProps }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !events.length ? ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.noResults }, { children: general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (onlyStaffEnabled && react_core_1.UserUtils.isStaff(scUserContext.user)) || !onlyStaffEnabled ? ((0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({}, CreateEventButtonProps))) : null })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title", defaultMessage: "ui.events.noEvents.title" }) }))] })) : showUserEvents ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.noEvents.title.personal", defaultMessage: "ui.events.noEvents.title.personal" }) })) })) : null }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", spacing: 2, gap: 2, className: classes.events }, GridContainerComponentProps, { children: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [events.map((event) => ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.item }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.default, Object.assign({ event: event, eventId: event.id }, EventComponentProps)) }), event.id))), authUserId && events.length % 2 !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.itemSkeleton }, GridItemComponentProps, { children: (0, jsx_runtime_1.jsx)(Event_1.EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (0, jsx_runtime_1.jsx)(CreateEventButton_1.default, Object.assign({ variant: "outlined", color: "primary", size: "small" }, CreateEventButtonProps, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.skeleton.action.add", defaultMessage: "ui.events.skeleton.action.add" }) })) })) }), "skeleton-item"))] }) })), Boolean(next) && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "text", onClick: handleNext, className: classes.showMore }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.button.seeMore", defaultMessage: "ui.events.button.seeMore" }) })))] })) })) })] }));
244
240
  /**
@@ -430,6 +430,6 @@ const Feed = (inProps, ref) => {
430
430
  if (feedDataObject.isLoadingNext && !feedDataLeft.length) {
431
431
  return ((0, jsx_runtime_1.jsx)(Skeleton_2.default, { children: [...Array(3)].map((_v, i) => ((0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps), i))) }));
432
432
  }
433
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ role: "main", container: true, width: "100%", spacing: 2, id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(CustomAdv_1.default, Object.assign({ position: types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: (0, jsx_runtime_1.jsxs)(InfiniteScroll_1.default, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.end }, { children: [(0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: endMessage }) })), FooterComponent ? (0, jsx_runtime_1.jsx)(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, (0, jsx_runtime_1.jsx)(VirtualizedScroller_1.default, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: react_core_1.SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: react_core_1.SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: (0, jsx_runtime_1.jsx)(StickyBox_1.default, Object.assign({ className: classes.right }, FeedSidebarProps, { children: (0, jsx_runtime_1.jsx)(react_1.default.Suspense, Object.assign({ fallback: (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => ((0, jsx_runtime_1.jsx)(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
433
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ container: true, width: "100%", spacing: 2, id: id, className: (0, classnames_1.default)(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: 12 }, { children: (0, jsx_runtime_1.jsx)(CustomAdv_1.default, Object.assign({ position: types_1.SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: (0, jsx_runtime_1.jsxs)(InfiniteScroll_1.default, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: (0, jsx_runtime_1.jsx)(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.end }, { children: [(0, jsx_runtime_1.jsx)(Widget_1.default, Object.assign({ className: classes.endMessage }, { children: (0, jsx_runtime_1.jsx)(material_1.CardContent, { children: endMessage }) })), FooterComponent ? (0, jsx_runtime_1.jsx)(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, (0, jsx_runtime_1.jsx)(VirtualizedScroller_1.default, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: react_core_1.SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: react_core_1.SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: (0, jsx_runtime_1.jsx)(StickyBox_1.default, Object.assign({ className: classes.right }, FeedSidebarProps, { children: (0, jsx_runtime_1.jsx)(react_1.default.Suspense, Object.assign({ fallback: (0, jsx_runtime_1.jsx)(Skeleton_1.GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => ((0, jsx_runtime_1.jsx)(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
434
434
  };
435
435
  exports.default = (0, react_1.forwardRef)(Feed);
@@ -104,6 +104,6 @@ function InlineComposerWidget(inProps) {
104
104
  if (!react_core_1.UserUtils.isStaff(scUserContext.user) && !react_core_1.UserUtils.isPublisher(scUserContext.user) && onlyStaffEnabled) {
105
105
  return (0, jsx_runtime_1.jsx)(HiddenPlaceholder_1.default, {});
106
106
  }
107
- return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.input }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", disableFocusRipple: true, disableRipple: true, disableElevation: true, onClick: handleOpen, fullWidth: true, color: "inherit" }, { children: label !== null && label !== void 0 ? label : (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.inlineComposerWidget.label", defaultMessage: "ui.inlineComposerWidget.label" }) })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.avatar }, { children: !scUserContext.user ? ((0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: intl.formatMessage({ id: 'ui.inlineComposerWidget.avatar.alt', defaultMessage: 'ui.inlineComposerWidget.avatar.alt' }), variant: "circular" })) : ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar }) }))) }))] })) })), open && ((0, jsx_runtime_1.jsx)(Composer_1.default, { open: open, mediaObjectTypes: mediaObjectTypes, defaultValue: defaultValue, fullWidth: true, onClose: handleClose, onSuccess: handleSuccess, feedType: feedType }))] }));
107
+ return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ className: classes.root }, rest, { children: (0, jsx_runtime_1.jsxs)(material_1.CardContent, Object.assign({ className: classes.content }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.input }, { children: (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "text", disableFocusRipple: true, disableRipple: true, disableElevation: true, onClick: handleOpen, fullWidth: true, color: "inherit" }, { children: label !== null && label !== void 0 ? label : (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.inlineComposerWidget.label", defaultMessage: "ui.inlineComposerWidget.label" }) })) })), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.avatar }, { children: !scUserContext.user ? ((0, jsx_runtime_1.jsx)(material_1.Avatar, { "aria-label": intl.formatMessage({ id: 'ui.inlineComposerWidget.avatar.alt', defaultMessage: 'ui.inlineComposerWidget.avatar.alt' }), variant: "circular" })) : ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar }) }))) }))] })) })), open && ((0, jsx_runtime_1.jsx)(Composer_1.default, { open: open, mediaObjectTypes: mediaObjectTypes, defaultValue: defaultValue, fullWidth: true, onClose: handleClose, onSuccess: handleSuccess, feedType: feedType }))] }));
108
108
  }
109
109
  exports.default = InlineComposerWidget;
@@ -23,7 +23,7 @@ export interface ImagePreviewComponentProps {
23
23
  /**
24
24
  * Handles on media click
25
25
  */
26
- onMediaClick?: (any: any) => void;
26
+ onMediaClick?: (media: SCMediaType) => void;
27
27
  }
28
- declare const _default: (props: ImagePreviewComponentProps) => JSX.Element;
28
+ declare const _default: (props: ImagePreviewComponentProps) => import("react/jsx-runtime").JSX.Element;
29
29
  export default _default;
@@ -36,7 +36,7 @@ const Root = (0, material_1.styled)(material_1.Stack, {
36
36
  })(() => ({}));
37
37
  exports.default = (props) => {
38
38
  // PROPS
39
- const { className = '', medias = [], maxVisible = 5, gallery = true, onMediaClick = null } = props;
39
+ const { className = '', medias = [], maxVisible = 5, gallery = true, onMediaClick = undefined } = props;
40
40
  // STATE
41
41
  const [preview, setPreview] = (0, react_1.useState)(-1);
42
42
  const [toolbarButtons, setToolbarButtons] = (0, react_1.useState)(undefined);
@@ -86,8 +86,10 @@ exports.default = (props) => {
86
86
  const renderOne = () => {
87
87
  const overlay = images.length > maxVisible && maxVisible == 1 ? renderCountOverlay(true) : renderOverlay(0);
88
88
  const isGif = images[0]['image_mimetype'] ? images[0]['image_mimetype'].includes('image/gif') : false;
89
- const isLandscape = images[0].image_height < images[0].image_width;
90
- return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", style: Object.assign({}, (images[0].image_thumbnail && images[0].image_thumbnail.color ? { backgroundColor: images[0].image_thumbnail.color } : {})) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ ref: ref, size: 12, className: (0, classnames_1.default)(classes.border, classes.heightOne, Object.assign(Object.assign({}, (isGif || isLandscape ? { [classes.background]: true } : { [classes.backgroundPortrait]: true })), { [classes.gallery]: gallery, [classes.heightHalfOne]: images.length > 1 })), onClick: () => openPreviewImage(0), style: Object.assign({ background: `url(${getImageUrl(images[0], inView && isGif)})` }, (isLandscape ? { paddingTop: `${(100 * images[0].image_height) / images[0].image_width}%` } : {})) }, { children: [overlay, renderTitle(images[0])] })) })));
89
+ const isLandscape = images[0].image_height && images[0].image_width && images[0].image_height < images[0].image_width;
90
+ return ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, width: "100%", style: Object.assign({}, (images[0].image_thumbnail && images[0].image_thumbnail.color ? { backgroundColor: images[0].image_thumbnail.color } : {})) }, { children: (0, jsx_runtime_1.jsxs)(material_1.Grid, Object.assign({ ref: ref, size: 12, className: (0, classnames_1.default)(classes.border, classes.heightOne, Object.assign(Object.assign({}, (isGif || isLandscape ? { [classes.background]: true } : { [classes.backgroundPortrait]: true })), { [classes.gallery]: gallery, [classes.heightHalfOne]: images.length > 1 })), onClick: () => openPreviewImage(0), style: Object.assign({ background: `url(${getImageUrl(images[0], inView && isGif)})` }, (isLandscape && images[0].image_height && images[0].image_width
91
+ ? { paddingTop: `${(100 * images[0].image_height) / images[0].image_width}%` }
92
+ : {})) }, { children: [overlay, renderTitle(images[0])] })) })));
91
93
  };
92
94
  const renderTwo = () => {
93
95
  const overlay = images.length > maxVisible && [2, 3].includes(+maxVisible) ? renderCountOverlay(true) : renderOverlay(1);
@@ -124,7 +126,7 @@ exports.default = (props) => {
124
126
  const url = window.URL.createObjectURL(blob);
125
127
  const link = document.createElement('a');
126
128
  link.href = url;
127
- link.download = docs[index].title;
129
+ link.download = docs[index].title || '';
128
130
  link.click();
129
131
  // Cleanup
130
132
  window.URL.revokeObjectURL(url);
@@ -73,6 +73,6 @@ function DocComponent(props) {
73
73
  return fallback_1.default;
74
74
  }
75
75
  }, [document.mimetype]);
76
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.docRoot, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: document.title, src: getImage() }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.textWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.contrastColor) }, { children: document.title })), document.size && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.subtitle, classes.contrastColor) }, { children: formatBytes(document.size) }))] })), (handleDownload || onDelete) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.actionWrapper }, { children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => onDelete(document.id) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))), handleDownload && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [document.mimetype === types_1.SCMimeTypes.PDF && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, component: react_core_1.Link, to: document.url, target: "_blank", onClick: () => onMediaClick === null || onMediaClick === void 0 ? void 0 : onMediaClick(document) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => handleDownload(index) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))] }))] })))] })));
76
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.docRoot, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { component: "img", alt: document.title, src: getImage() }), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.textWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.title, classes.contrastColor) }, { children: document.title })), document.size && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.subtitle, classes.contrastColor) }, { children: formatBytes(document.size) }))] })), (handleDownload || onDelete) && ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.actionWrapper }, { children: [onDelete && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => onDelete(document.id) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "delete" }) }))), handleDownload && index && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [document.mimetype === types_1.SCMimeTypes.PDF && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, component: react_core_1.Link, to: document.url, target: "_blank", onClick: () => onMediaClick === null || onMediaClick === void 0 ? void 0 : onMediaClick(document) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "visibility" }) }))), (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.action, onClick: () => handleDownload(index) }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "download" }) }))] }))] })))] })));
77
77
  }
78
78
  exports.default = DocComponent;
@@ -32,7 +32,7 @@ const PreviewComponent = (0, react_1.forwardRef)((props, ref) => {
32
32
  // EFFECTS
33
33
  (0, react_1.useEffect)(() => {
34
34
  if (typeof document === undefined) {
35
- return null;
35
+ return;
36
36
  }
37
37
  const sortable = document.getElementById(SORTABLE_ID);
38
38
  if (sortable) {
@@ -88,7 +88,7 @@ export default function CommentsFeedObject(inProps) {
88
88
  */
89
89
  const renderTitle = useMemo(() => () => {
90
90
  if (showTitle) {
91
- return (_jsx(Typography, Object.assign({ variant: "h6", gutterBottom: true, color: "inherit" }, { children: _jsx(FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
91
+ return (_jsx(Typography, Object.assign({ component: "p", variant: "h6", gutterBottom: true, color: "inherit" }, { children: _jsx(FormattedMessage, { id: "ui.commentsObject.title", defaultMessage: "ui.commentsObject.title", values: { total: total } }) })));
92
92
  }
93
93
  return null;
94
94
  }, [total, isLoading]);
@@ -163,7 +163,7 @@ export default function Course(inProps) {
163
163
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
164
164
  }), { 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) && {
165
165
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scCourse.created_by)
166
- }), { 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 })) })), _jsx(Stack, { children: _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}` }), isPaymentsEnabled && ((_f = scCourse.paywalls) === null || _f === void 0 ? void 0 : _f.length) && (_jsxs(_Fragment, { children: ["\u00A0", _jsx(Icon, { children: "pagamenti" })] }))] })) }), _jsxs(Box, Object.assign({ className: classes.previewCategory }, { children: [scCourse.categories.slice(0, MAX_VISIBLE_CATEGORIES).map((category) => (_jsx(Chip, { size: "small", label: category.name }, category.id))), scCourse.categories.length > MAX_VISIBLE_CATEGORIES && (_jsx(Tooltip, Object.assign({ title: _jsx(_Fragment, { children: scCourse.categories.slice(MAX_VISIBLE_CATEGORIES).map((cat) => (_jsx(Box, { children: cat.name }, cat.id))) }) }, { children: _jsx(Chip, { size: "small", label: `+${scCourse.categories.length - MAX_VISIBLE_CATEGORIES}`, sx: { cursor: 'pointer' } }) })))] })), _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: "contained", size: "small", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
166
+ }), { 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({ component: "h2", variant: "h6", className: classes.previewName }, { children: scCourse.name })) })), _jsx(Stack, { children: _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}` }), isPaymentsEnabled && ((_f = scCourse.paywalls) === null || _f === void 0 ? void 0 : _f.length) && (_jsxs(_Fragment, { children: ["\u00A0", _jsx(Icon, { children: "pagamenti" })] }))] })) }), _jsxs(Box, Object.assign({ className: classes.previewCategory }, { children: [scCourse.categories.slice(0, MAX_VISIBLE_CATEGORIES).map((category) => (_jsx(Chip, { size: "small", label: category.name }, category.id))), scCourse.categories.length > MAX_VISIBLE_CATEGORIES && (_jsx(Tooltip, Object.assign({ title: _jsx(_Fragment, { children: scCourse.categories.slice(MAX_VISIBLE_CATEGORIES).map((cat) => (_jsx(Box, { children: cat.name }, cat.id))) }) }, { children: _jsx(Chip, { size: "small", label: `+${scCourse.categories.length - MAX_VISIBLE_CATEGORIES}`, sx: { cursor: 'pointer' } }) })))] })), _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: "contained", size: "small", component: Link, to: scRoutingContext.url(SCRoutes.COURSE_ROUTE_NAME, scCourse) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.course.see", id: "ui.course.see" }) })) })))] })));
167
167
  }
168
168
  else {
169
169
  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 &&
@@ -204,9 +204,9 @@ function Student(inProps) {
204
204
  scCourse.privacy === SCCoursePrivacyType.DRAFT) &&
205
205
  scCourse.description && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classNames(classes.margin, classes.defaultContrastColor) }, { 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", className: classNames(classes.description, classes.paperContrastColor) }, { children: scCourse.description })) }))] })), (((scCourse.privacy === SCCoursePrivacyType.PRIVATE || scCourse.privacy === SCCoursePrivacyType.SECRET) &&
206
206
  (scCourse.join_status === SCCourseJoinStatusType.MANAGER || scCourse.join_status === SCCourseJoinStatusType.JOINED)) ||
207
- (scCourse.privacy === SCCoursePrivacyType.OPEN && scCourse.join_status !== SCCourseJoinStatusType.CREATOR)) && (_jsxs(Fragment, { children: [scCourse.join_status !== null && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classNames(classes.margin, classes.defaultContrastColor) }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.progress", defaultMessage: "ui.course.dashboard.student.progress" }) })), _jsxs(Stack, Object.assign({ className: classes.box }, { children: [_jsxs(Stack, Object.assign({ className: classes.percentageWrapper }, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { 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", className: classes.paperContrastColor }, { 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.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", className: classes.defaultContrastColor }, { 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: classNames(classes.margin, classes.defaultContrastColor) }, { 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", className: classes.paperContrastColor }, { children: _jsx(FormattedMessage, { id: "ui.course.table.sections.title", defaultMessage: "ui.course.table.sections.title", values: {
207
+ (scCourse.privacy === SCCoursePrivacyType.OPEN && scCourse.join_status !== SCCourseJoinStatusType.CREATOR)) && (_jsxs(Fragment, { children: [scCourse.join_status !== null && (_jsxs(Fragment, { children: [_jsx(Typography, Object.assign({ variant: "h6", className: classNames(classes.margin, classes.defaultContrastColor) }, { children: _jsx(FormattedMessage, { id: "ui.course.dashboard.student.progress", defaultMessage: "ui.course.dashboard.student.progress" }) })), _jsxs(Stack, Object.assign({ className: classes.box }, { children: [_jsxs(Stack, Object.assign({ className: classes.percentageWrapper }, { children: [_jsx(Typography, Object.assign({ variant: "body1", className: classes.paperContrastColor }, { 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", className: classes.paperContrastColor }, { 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.user_completion_rate })] }))] })), scCourse.user_completion_rate === 100 && (_jsxs(Stack, Object.assign({ className: classNames(classes.completedWrapper, classes.margin) }, { children: [_jsx(Typography, Object.assign({ component: "h2", variant: "h3", className: classes.defaultContrastColor }, { 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({ component: "h2", variant: "h6", className: classNames(classes.margin, classes.defaultContrastColor) }, { 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({ component: "h3", variant: "h5", className: classes.paperContrastColor }, { children: _jsx(FormattedMessage, { id: "ui.course.table.sections.title", defaultMessage: "ui.course.table.sections.title", values: {
208
208
  sectionsNumber: scCourse.num_sections
209
- } }) })), _jsx(Box, { className: classes.circle }), _jsx(Typography, Object.assign({ variant: "h5", className: classes.paperContrastColor }, { children: _jsx(FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
209
+ } }) })), _jsx(Box, { className: classes.circle }), _jsx(Typography, Object.assign({ component: "h3", variant: "h5", className: classes.paperContrastColor }, { children: _jsx(FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
210
210
  lessonsNumber: scCourse.num_lessons
211
211
  } }) }))] })), _jsx(AccordionLessons, { course: scCourse, className: classes.accordion })] }))] })));
212
212
  }
@@ -1,5 +1,5 @@
1
1
  import { BoxProps } from '@mui/material';
2
- import { SCCourseType } from '@selfcommunity/types';
2
+ import { SCCourseType, SCCourseTypologyType } from '@selfcommunity/types';
3
3
  import { SCCourseFormStepType } from '../../constants/Course';
4
4
  export interface CourseFormProps extends BoxProps {
5
5
  /**
@@ -26,7 +26,7 @@ export interface CourseFormProps extends BoxProps {
26
26
  * On step change callback function
27
27
  * @default null
28
28
  */
29
- onStepChange?: (step: SCCourseFormStepType, type: SCCourseType) => void;
29
+ onStepChange?: (step: SCCourseFormStepType, type: SCCourseTypologyType) => void;
30
30
  /**
31
31
  * On error callback function
32
32
  * @default null
@@ -114,7 +114,7 @@ export default function CourseForm(inProps) {
114
114
  imageOriginal: (course === null || course === void 0 ? void 0 : course.image_bigger) || '',
115
115
  imageOriginalFile: '',
116
116
  name: (course === null || course === void 0 ? void 0 : course.name) || '',
117
- type: (course === null || course === void 0 ? void 0 : course.type) || '',
117
+ type: (course === null || course === void 0 ? void 0 : course.type) || SCCourseTypologyType.SELF,
118
118
  description: course ? course.description : '',
119
119
  categories: course ? course.categories : [],
120
120
  privacy: course ? course.privacy : '',
@@ -158,7 +158,7 @@ export default function CourseForm(inProps) {
158
158
  */
159
159
  const handleChangeStep = (newStep) => {
160
160
  setStep(newStep);
161
- onStepChange(newStep, field.type);
161
+ onStepChange === null || onStepChange === void 0 ? void 0 : onStepChange(newStep, field.type);
162
162
  };
163
163
  /**
164
164
  * Formats categories object to a specific format needed in the form body
@@ -2,6 +2,7 @@ import { __rest } from "tslib";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { styled } from '@mui/material';
4
4
  import { useThemeProps } from '@mui/system';
5
+ import { SCCourseTypologyType } from '@selfcommunity/types';
5
6
  import classNames from 'classnames';
6
7
  import { FormattedMessage } from 'react-intl';
7
8
  import BaseDialog from '../../shared/BaseDialog';
@@ -43,9 +44,9 @@ export default function CourseFormDialog(inProps) {
43
44
  });
44
45
  const { className, open = true, onClose, CourseFormComponentProps = {} } = props, rest = __rest(props, ["className", "open", "onClose", "CourseFormComponentProps"]);
45
46
  // STATE
46
- // TODO - temporary hardcoded CUSTOMIZATION and 'self-paced' --> previous value: GENERAL and ''
47
+ // TODO - temporary hardcoded CUSTOMIZATION and SELF --> previous value: GENERAL and ''
47
48
  const [step, setStep] = useState(SCCourseFormStepType.CUSTOMIZATION);
48
- const [type, setType] = useState('self-paced');
49
+ const [type, setType] = useState(SCCourseTypologyType.SELF);
49
50
  //HANDLERS
50
51
  const handleStepTypeChange = (step, type) => {
51
52
  setStep(step);
@@ -35,4 +35,4 @@ export interface CreateCourseButtonProps extends ButtonProps {
35
35
 
36
36
  * @param inProps
37
37
  */
38
- export default function CreateCourseButton(inProps: CreateCourseButtonProps): JSX.Element;
38
+ export default function CreateCourseButton(inProps: CreateCourseButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -15,7 +15,7 @@ const classes = {
15
15
  const Root = styled(Button, {
16
16
  name: PREFIX,
17
17
  slot: 'Root',
18
- overridesResolver: (props, styles) => styles.root
18
+ overridesResolver: (_props, styles) => styles.root
19
19
  })(() => ({}));
20
20
  /**
21
21
  *> API documentation for the Community-JS Create Group Button component. Learn about the available props and the CSS API.
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useSCGoogleApiLoader } from '@selfcommunity/react-core';
3
3
  import { Map, AdvancedMarker } from '@vis.gl/react-google-maps';
4
+ import { useIntl } from 'react-intl';
4
5
  export default function EventMap(props) {
5
6
  // PROPS
6
7
  const { event, className } = props;
7
8
  // HOOKS
8
9
  const { isLoaded } = useSCGoogleApiLoader();
10
+ const intl = useIntl();
9
11
  if (!isLoaded) {
10
12
  return null;
11
13
  }
@@ -15,11 +17,11 @@ export default function EventMap(props) {
15
17
  * https://developers.google.com/maps/deprecations
16
18
  * https://developers.google.com/maps/documentation/javascript/advanced-markers/migration
17
19
  */
18
- return (_jsx(Map, Object.assign({ className: className, mapId: "aef14f6caa750c5616b23934", defaultCenter: {
19
- lat: event.geolocation_lat,
20
- lng: event.geolocation_lng
21
- }, zoom: 15, gestureHandling: "greedy", fullscreenControl: false, mapTypeControl: false, streetViewControl: false, zoomControl: false }, { children: _jsx(AdvancedMarker, { position: {
20
+ return (_jsx("div", Object.assign({ role: "region", "aria-label": intl.formatMessage({ id: 'ui.eventLocationWidget.map.ariaLabel', defaultMessage: 'ui.eventLocationWidget.map.ariaLabel' }) }, { children: _jsx(Map, Object.assign({ className: className, mapId: "aef14f6caa750c5616b23934", defaultCenter: {
22
21
  lat: event.geolocation_lat,
23
22
  lng: event.geolocation_lng
24
- } }) })));
23
+ }, zoom: 15, gestureHandling: "greedy", fullscreenControl: false, mapTypeControl: false, streetViewControl: false, zoomControl: false }, { children: _jsx(AdvancedMarker, { position: {
24
+ lat: event.geolocation_lat,
25
+ lng: event.geolocation_lng
26
+ } }) })) })));
25
27
  }
@@ -232,11 +232,7 @@ export default function Events(inProps) {
232
232
  input: {
233
233
  endAdornment: (_jsx(InputAdornment, Object.assign({ position: "end" }, { children: isMobile ? (_jsx(IconButton, Object.assign({ title: intl.formatMessage({ id: 'ui.events.filterByName', defaultMessage: 'ui.events.filterByName' }), onClick: () => fetchEvents(), disabled: loading }, { children: _jsx(Icon, { children: "search" }) }))) : (_jsx(Button, { title: intl.formatMessage({ id: 'ui.events.filterByName', defaultMessage: 'ui.events.filterByName' }), size: "small", variant: "contained", color: "secondary", onClick: () => fetchEvents(), endIcon: _jsx(Icon, { children: "search" }), disabled: loading })) })))
234
234
  }
235
- } }) })), _jsx(Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: _jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [_jsx(InputLabel, { children: _jsx(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) }), _jsx(Select, Object.assign({ disabled: showOngoingEvents || loading, size: "small", title: intl.formatMessage({ id: 'ui.events.filterByDate', defaultMessage: 'ui.events.filterByDate' }), label: _jsx(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => (_jsxs(MenuItem, Object.assign({ value: option.value }, { children: [_jsx(Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select", slotProps: {
236
- input: {
237
- 'aria-label': `${option.label}`
238
- }
239
- } }), option.label] }), option.value))) }))] })) })), _jsx(Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: _jsx(LocationEventsFilter, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && (_jsx(Grid, { children: _jsx(EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
235
+ } }) })), _jsx(Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: _jsxs(FormControl, Object.assign({ fullWidth: true }, { children: [_jsx(InputLabel, Object.assign({ htmlFor: "filterByDate" }, { children: _jsx(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }) })), _jsx(Select, Object.assign({ id: "filterByDate", disabled: showOngoingEvents || loading, size: "small", title: intl.formatMessage({ id: 'ui.events.filterByDate', defaultMessage: 'ui.events.filterByDate' }), label: _jsx(FormattedMessage, { id: "ui.events.filterByDate", defaultMessage: "ui.events.filterByDate" }), value: dateSearch, onChange: handleOnChangeTimeFrame, renderValue: (selected) => options.find((option) => option.value === selected).label }, { children: options.map((option) => (_jsxs(MenuItem, Object.assign({ value: option.value }, { children: [_jsx(Radio, { checked: dateSearch === option.value, value: option.value, name: "radio-button-select" }), option.label] }), option.value))) }))] })) })), _jsx(Grid, Object.assign({ size: { xs: 12, md: 2 } }, { children: _jsx(LocationEventsFilter, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) })), authUserId && (_jsx(Grid, { children: _jsx(EventsChipRoot, { color: showFollowed ? 'secondary' : 'default', variant: showFollowed ? 'filled' : 'outlined', label: _jsx(FormattedMessage, { id: "ui.events.filterByFollowedInterest", defaultMessage: "ui.events.filterByFollowedInterest" }), onClick: handleChipClick,
240
236
  // @ts-expect-error this is needed to use showFollowed into SCEvents
241
237
  showFollowed: showFollowed, deleteIcon: showFollowed ? _jsx(Icon, { children: "close" }) : null, onDelete: showFollowed ? handleDeleteClick : null, disabled: loading }) })), _jsx(Grid, { children: _jsx(OngoingEventsFilter, { showOngoingEvents: showOngoingEvents, handleClick: handleChipOngoingClick, handleDeleteClick: handleDeleteOngoingClick, disabled: dateSearch !== SCEventDateFilterType.ALL || loading }) })] })) : null }))), _jsx(_Fragment, { children: loading ? (_jsx(Skeleton, Object.assign({}, EventsSkeletonComponentProps, { EventSkeletonProps: EventSkeletonComponentProps }))) : (_jsx(_Fragment, { children: !events.length ? (_jsx(Box, Object.assign({ className: classes.noResults }, { children: general ? (_jsxs(_Fragment, { children: [_jsx(EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: (onlyStaffEnabled && UserUtils.isStaff(scUserContext.user)) || !onlyStaffEnabled ? (_jsx(CreateEventButton, Object.assign({}, CreateEventButtonProps))) : null })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.events.noEvents.title", defaultMessage: "ui.events.noEvents.title" }) }))] })) : showUserEvents ? (_jsx(_Fragment, { children: _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.events.noEvents.title.personal", defaultMessage: "ui.events.noEvents.title.personal" }) })) })) : null }))) : (_jsxs(_Fragment, { children: [_jsx(Grid, Object.assign({ container: true, width: "100%", spacing: 2, gap: 2, className: classes.events }, GridContainerComponentProps, { children: _jsxs(_Fragment, { children: [events.map((event) => (_jsx(Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.item }, GridItemComponentProps, { children: _jsx(Event, Object.assign({ event: event, eventId: event.id }, EventComponentProps)) }), event.id))), authUserId && events.length % 2 !== 0 && (_jsx(Grid, Object.assign({ size: { xs: 12, md: 6 }, className: classes.itemSkeleton }, GridItemComponentProps, { children: _jsx(EventSkeleton, Object.assign({}, EventSkeletonComponentProps, { skeletonsAnimation: false, actions: _jsx(CreateEventButton, Object.assign({ variant: "outlined", color: "primary", size: "small" }, CreateEventButtonProps, { children: _jsx(FormattedMessage, { id: "ui.events.skeleton.action.add", defaultMessage: "ui.events.skeleton.action.add" }) })) })) }), "skeleton-item"))] }) })), Boolean(next) && (_jsx(Button, Object.assign({ color: "secondary", variant: "text", onClick: handleNext, className: classes.showMore }, { children: _jsx(FormattedMessage, { id: "ui.events.button.seeMore", defaultMessage: "ui.events.button.seeMore" }) })))] })) })) })] }));
242
238
  /**
@@ -427,6 +427,6 @@ const Feed = (inProps, ref) => {
427
427
  if (feedDataObject.isLoadingNext && !feedDataLeft.length) {
428
428
  return (_jsx(FeedSkeleton, { children: [...Array(3)].map((_v, i) => (_jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps), i))) }));
429
429
  }
430
- return (_jsxs(Root, Object.assign({ role: "main", container: true, width: "100%", spacing: 2, id: id, className: classNames(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? (_jsx(Grid, Object.assign({ size: 12 }, { children: _jsx(CustomAdv, Object.assign({ position: SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, _jsx(Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: _jsxs(InfiniteScroll, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: _jsxs(Box, Object.assign({ className: classes.end }, { children: [_jsx(Widget, Object.assign({ className: classes.endMessage }, { children: _jsx(CardContent, { children: endMessage }) })), FooterComponent ? _jsx(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: _jsx(Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, _jsx(VirtualizedScroller, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && (_jsx(Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: _jsx(StickyBoxComp, Object.assign({ className: classes.right }, FeedSidebarProps, { children: _jsx(React.Suspense, Object.assign({ fallback: _jsx(GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => (_jsx(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
430
+ return (_jsxs(Root, Object.assign({ container: true, width: "100%", spacing: 2, id: id, className: classNames(classes.root, className) }, { children: [advEnabled && !hideAdvs && enabledCustomAdvPositions.includes(SCCustomAdvPosition.POSITION_BELOW_TOPBAR) ? (_jsx(Grid, Object.assign({ size: 12 }, { children: _jsx(CustomAdv, Object.assign({ position: SCCustomAdvPosition.POSITION_BELOW_TOPBAR }, CustomAdvProps)) }))) : null, _jsx(Grid, Object.assign({ size: { xs: 12, md: 7 } }, { children: _jsxs(InfiniteScroll, Object.assign({ ref: containerRef, className: classes.left, dataLength: feedDataLeft.length, next: getNextPage, previous: getPreviousPage, hasMoreNext: Boolean(feedDataObject.next), hasMorePrevious: Boolean(feedDataObject.previous), header: PreviousPageLink, footer: NextPageLink, loaderNext: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), loaderPrevious: _jsx(ItemSkeleton, Object.assign({}, ItemSkeletonProps)), scrollThreshold: "90%", endMessage: _jsxs(Box, Object.assign({ className: classes.end }, { children: [_jsx(Widget, Object.assign({ className: classes.endMessage }, { children: _jsx(CardContent, { children: endMessage }) })), FooterComponent ? _jsx(FooterComponent, Object.assign({}, FooterComponentProps)) : null] })), refreshFunction: refresh, pullDownToRefresh: true, pullDownToRefreshThreshold: 1000, pullDownToRefreshContent: null, releaseToRefreshContent: _jsx(Button, Object.assign({ color: "secondary", variant: "contained", className: classes.refresh }, { children: refreshMessage })), style: { overflow: 'visible' } }, (scrollableTargetId && { scrollableTarget: scrollableTargetId }), { children: [renderHeaderComponent(), feedDataObject.count === 0 && emptyFeedPlaceholder && emptyFeedPlaceholder, _jsx(VirtualizedScroller, Object.assign({ className: classes.leftItems, items: feedDataLeft, itemComponent: InnerItem, onMount: onScrollerMount, onScrollerStateChange: onScrollerStateChange, getItemId: getScrollItemId, preserveScrollPosition: true, preserveScrollPositionOnPrependItems: true, cacheScrollStateKey: SCCache.getVirtualizedScrollStateCacheKey(id), cacheScrollerPositionKey: SCCache.getFeedSPCacheKey(id), cacheStrategy: cacheStrategy }, (scrollableTargetId && { getScrollableContainer: () => document.getElementById(scrollableTargetId) }), VirtualizedScrollerProps))] })) })), feedDataRight.length > 0 && !hideAdvs && (_jsx(Grid, Object.assign({ sx: { display: { xs: 'none', sm: 'block' } }, size: { xs: 12, md: 5 } }, { children: _jsx(StickyBoxComp, Object.assign({ className: classes.right }, FeedSidebarProps, { children: _jsx(React.Suspense, Object.assign({ fallback: _jsx(GenericSkeleton, {}) }, { children: feedDataRight.map((d, i) => (_jsx(d.component, Object.assign({}, d.componentProps), i))) })) })) })))] })));
431
431
  };
432
432
  export default forwardRef(Feed);
@@ -102,5 +102,5 @@ export default function InlineComposerWidget(inProps) {
102
102
  if (!UserUtils.isStaff(scUserContext.user) && !UserUtils.isPublisher(scUserContext.user) && onlyStaffEnabled) {
103
103
  return _jsx(HiddenPlaceholder, {});
104
104
  }
105
- return (_jsxs(React.Fragment, { children: [_jsx(Root, Object.assign({ className: classes.root }, rest, { children: _jsxs(CardContent, Object.assign({ className: classes.content }, { children: [_jsx(Box, Object.assign({ className: classes.input }, { children: _jsx(Button, Object.assign({ variant: "text", disableFocusRipple: true, disableRipple: true, disableElevation: true, onClick: handleOpen, fullWidth: true, color: "inherit" }, { children: label !== null && label !== void 0 ? label : _jsx(FormattedMessage, { id: "ui.inlineComposerWidget.label", defaultMessage: "ui.inlineComposerWidget.label" }) })) })), _jsx(Box, Object.assign({ className: classes.avatar }, { children: !scUserContext.user ? (_jsx(Avatar, { alt: intl.formatMessage({ id: 'ui.inlineComposerWidget.avatar.alt', defaultMessage: 'ui.inlineComposerWidget.avatar.alt' }), variant: "circular" })) : (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: _jsx(Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar }) }))) }))] })) })), open && (_jsx(Composer, { open: open, mediaObjectTypes: mediaObjectTypes, defaultValue: defaultValue, fullWidth: true, onClose: handleClose, onSuccess: handleSuccess, feedType: feedType }))] }));
105
+ return (_jsxs(React.Fragment, { children: [_jsx(Root, Object.assign({ className: classes.root }, rest, { children: _jsxs(CardContent, Object.assign({ className: classes.content }, { children: [_jsx(Box, Object.assign({ className: classes.input }, { children: _jsx(Button, Object.assign({ variant: "text", disableFocusRipple: true, disableRipple: true, disableElevation: true, onClick: handleOpen, fullWidth: true, color: "inherit" }, { children: label !== null && label !== void 0 ? label : _jsx(FormattedMessage, { id: "ui.inlineComposerWidget.label", defaultMessage: "ui.inlineComposerWidget.label" }) })) })), _jsx(Box, Object.assign({ className: classes.avatar }, { children: !scUserContext.user ? (_jsx(Avatar, { "aria-label": intl.formatMessage({ id: 'ui.inlineComposerWidget.avatar.alt', defaultMessage: 'ui.inlineComposerWidget.avatar.alt' }), variant: "circular" })) : (_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user) }, { children: _jsx(Avatar, { alt: scUserContext.user.username, variant: "circular", src: scUserContext.user.avatar }) }))) }))] })) })), open && (_jsx(Composer, { open: open, mediaObjectTypes: mediaObjectTypes, defaultValue: defaultValue, fullWidth: true, onClose: handleClose, onSuccess: handleSuccess, feedType: feedType }))] }));
106
106
  }
package/lib/esm/index.js CHANGED
@@ -238,7 +238,9 @@ export { AcceptRequestUserEventButton, AccountChangeMailValidation, AccountDataP
238
238
  /* SC CONSENT SOLUTION */
239
239
  ConsentSolution, ConsentSolutionButton, ConsentSolutionSkeleton, ContributionUtils, SCCourseEditTabType, Course, CourseSkeleton, CourseJoinButton, Courses, CoursesSkeleton, CourseTypePopover, CreateCourseButton, CourseContentMenu, CourseDashboard, TeacherSkeleton, StudentSkeleton, CreateEventButton, CreateEventWidget, CreateEventWidgetSkeleton, CreateGroupButton, EventForm, EventFormDialog, CustomAdv, CustomAdvSkeleton, DEFAULT_FIELDS, DEFAULT_PAGINATION_LIMIT, DEFAULT_PAGINATION_OFFSET,
240
240
  /* SC UI PAGINATION */
241
- DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultHeaderContent, DefaultDrawerSkeleton, EditEventButton, EditGroupButton, Editor, EditorSkeleton, EmailTextField, EditCourse, EditCourseSkeleton, Event, EventActionsMenu, EventHeader, EventHeaderSkeleton, EventInfoDetails, EventInfoWidget, EventInviteButton, EventLocationWidget, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetSkeleton, EventParticipantsButton, Events, EventSkeleton, EventsSkeleton, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectSkeleton, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetSkeleton, File, FollowUserButton, Footer, FooterSkeleton, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, getUrlLesson, Group, GroupActionsMenu, GroupForm, GroupHeader, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInvitedWidget, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersWidget, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSkeleton, GroupsSkeleton, GroupSubscribeButton,
241
+ DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultHeaderContent, DefaultDrawerSkeleton, EditEventButton, EditGroupButton, Editor, EditorSkeleton, EmailTextField, EditCourse, EditCourseSkeleton,
242
+ /* EVENTS */
243
+ Event, EventActionsMenu, EventHeader, EventHeaderSkeleton, EventInfoDetails, EventInfoWidget, EventInviteButton, EventLocationWidget, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetSkeleton, EventParticipantsButton, Events, EventSkeleton, EventsSkeleton, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectSkeleton, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetSkeleton, File, FollowUserButton, Footer, FooterSkeleton, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, getUrlLesson, Group, GroupActionsMenu, GroupForm, GroupHeader, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInvitedWidget, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersWidget, GroupMembersWidgetSkeleton, GroupRequestsWidget, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSkeleton, GroupsSkeleton, GroupSubscribeButton,
242
244
  /* SC UI SHARED */
243
245
  AccordionLessons, AccordionLessonsSkeleton, AddUsersButton, CourseUsersTable, CourseUsersTableSkeleton, EmptyStatus, HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorListWidget, IncubatorSubscribeButton, IncubatorSuggestionWidget, InfiniteScroll, ScrollContainer, InlineComposerWidget, InlineComposerWidgetSkeleton, InviteUserEventButton, LessonAppbar, LessonDrawer, LessonEditForm, LessonObject, LanguageSwitcher, LEGAL_POLICIES, CourseCompletedDialog, Lightbox, Link, LINKEDIN_SHARE, LocationAutocomplete,
244
246
  /* Assets */
@@ -23,7 +23,7 @@ export interface ImagePreviewComponentProps {
23
23
  /**
24
24
  * Handles on media click
25
25
  */
26
- onMediaClick?: (any: any) => void;
26
+ onMediaClick?: (media: SCMediaType) => void;
27
27
  }
28
- declare const _default: (props: ImagePreviewComponentProps) => JSX.Element;
28
+ declare const _default: (props: ImagePreviewComponentProps) => import("react/jsx-runtime").JSX.Element;
29
29
  export default _default;