@selfcommunity/react-ui 0.10.2-courses.184 → 0.10.2-courses.186

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 (113) hide show
  1. package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  2. package/lib/cjs/components/CourseDashboard/Header.js +29 -24
  3. package/lib/cjs/components/EditCourse/Lessons/LessonRow.d.ts +4 -4
  4. package/lib/cjs/components/EditCourse/Lessons/LessonRow.js +11 -13
  5. package/lib/cjs/components/EditCourse/Lessons/SectionRow.d.ts +4 -4
  6. package/lib/cjs/components/EditCourse/Lessons/SectionRow.js +14 -15
  7. package/lib/cjs/components/EditCourse/Lessons.js +18 -1
  8. package/lib/cjs/components/EditCourse/types.d.ts +14 -0
  9. package/lib/cjs/components/EditCourse/types.js +6 -1
  10. package/lib/cjs/components/Editor/Editor.d.ts +1 -1
  11. package/lib/cjs/components/Editor/Editor.js +1 -1
  12. package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
  13. package/lib/cjs/components/Editor/nodes/HashtagNode.js +6 -4
  14. package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
  15. package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
  16. package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
  17. package/lib/cjs/components/Editor/nodes/MentionNode.js +6 -4
  18. package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  19. package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  20. package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
  21. package/lib/cjs/components/Event/Event.js +6 -3
  22. package/lib/cjs/components/EventForm/types.d.ts +5 -5
  23. package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  24. package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
  25. package/lib/cjs/components/Events/Events.d.ts +5 -0
  26. package/lib/cjs/components/Events/Events.js +21 -10
  27. package/lib/cjs/components/Events/OngoingEventsFilter.d.ts +8 -0
  28. package/lib/cjs/components/Events/OngoingEventsFilter.js +24 -0
  29. package/lib/cjs/components/Feed/Feed.d.ts +2 -2
  30. package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
  31. package/lib/cjs/components/LiveStreamForm/types.d.ts +3 -3
  32. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
  33. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
  34. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
  35. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
  36. package/lib/cjs/components/LiveStreamRoom/types.d.ts +1 -1
  37. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  38. package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  39. package/lib/cjs/components/NavigationToolbar/NavigationToolbar.d.ts +1 -1
  40. package/lib/cjs/components/NavigationToolbar/NavigationToolbar.js +2 -2
  41. package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +1 -1
  42. package/lib/cjs/components/NavigationToolbarMobile/NavigationToolbarMobile.js +4 -4
  43. package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  44. package/lib/cjs/components/SearchDialog/SearchDialog.d.ts +4 -1
  45. package/lib/cjs/components/SearchDialog/SearchDialog.js +2 -2
  46. package/lib/cjs/shared/AccordionLessons/AccordionLessons.js +12 -2
  47. package/lib/cjs/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
  48. package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
  49. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  50. package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  51. package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
  52. package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
  53. package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
  54. package/lib/cjs/types/composer.d.ts +1 -1
  55. package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  56. package/lib/esm/components/CourseDashboard/Header.js +31 -26
  57. package/lib/esm/components/EditCourse/Lessons/LessonRow.d.ts +4 -4
  58. package/lib/esm/components/EditCourse/Lessons/LessonRow.js +12 -14
  59. package/lib/esm/components/EditCourse/Lessons/SectionRow.d.ts +4 -4
  60. package/lib/esm/components/EditCourse/Lessons/SectionRow.js +16 -17
  61. package/lib/esm/components/EditCourse/Lessons.js +20 -3
  62. package/lib/esm/components/EditCourse/types.d.ts +14 -0
  63. package/lib/esm/components/EditCourse/types.js +5 -0
  64. package/lib/esm/components/Editor/Editor.d.ts +1 -1
  65. package/lib/esm/components/Editor/Editor.js +2 -2
  66. package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
  67. package/lib/esm/components/Editor/nodes/HashtagNode.js +6 -4
  68. package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
  69. package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
  70. package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
  71. package/lib/esm/components/Editor/nodes/MentionNode.js +6 -4
  72. package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  73. package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  74. package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
  75. package/lib/esm/components/Event/Event.js +6 -3
  76. package/lib/esm/components/EventForm/types.d.ts +5 -5
  77. package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  78. package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
  79. package/lib/esm/components/Events/Events.d.ts +5 -0
  80. package/lib/esm/components/Events/Events.js +22 -11
  81. package/lib/esm/components/Events/OngoingEventsFilter.d.ts +8 -0
  82. package/lib/esm/components/Events/OngoingEventsFilter.js +21 -0
  83. package/lib/esm/components/Feed/Feed.d.ts +2 -2
  84. package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
  85. package/lib/esm/components/LiveStreamForm/types.d.ts +3 -3
  86. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +1 -1
  87. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +1 -1
  88. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +1 -1
  89. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +2 -2
  90. package/lib/esm/components/LiveStreamRoom/types.d.ts +1 -1
  91. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  92. package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  93. package/lib/esm/components/NavigationToolbar/NavigationToolbar.d.ts +1 -1
  94. package/lib/esm/components/NavigationToolbar/NavigationToolbar.js +2 -2
  95. package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.d.ts +1 -1
  96. package/lib/esm/components/NavigationToolbarMobile/NavigationToolbarMobile.js +4 -4
  97. package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  98. package/lib/esm/components/SearchDialog/SearchDialog.d.ts +4 -1
  99. package/lib/esm/components/SearchDialog/SearchDialog.js +2 -2
  100. package/lib/esm/shared/AccordionLessons/AccordionLessons.js +15 -5
  101. package/lib/esm/shared/CourseUsersTable/CourseUsersTable.d.ts +1 -1
  102. package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
  103. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  104. package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  105. package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
  106. package/lib/esm/shared/StickyBox/index.d.ts +4 -4
  107. package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
  108. package/lib/esm/types/composer.d.ts +1 -1
  109. package/lib/umd/689.js +2 -0
  110. package/lib/umd/react-ui.js +1 -1
  111. package/package.json +11 -11
  112. package/lib/umd/233.js +0 -2
  113. /package/lib/umd/{233.js.LICENSE.txt → 689.js.LICENSE.txt} +0 -0
@@ -1,9 +1,9 @@
1
1
  import { SCEventLocationType, SCEventRecurrenceType, SCLiveStreamSettingsType } from '@selfcommunity/types';
2
- export declare type Place = {
2
+ export type Place = {
3
3
  description: string;
4
4
  id?: string;
5
5
  };
6
- export declare type Geolocation = {
6
+ export type Geolocation = {
7
7
  location: SCEventLocationType;
8
8
  geolocation?: string;
9
9
  lat?: number;
@@ -11,7 +11,7 @@ export declare type Geolocation = {
11
11
  link?: string;
12
12
  liveStreamSettings?: SCLiveStreamSettingsType;
13
13
  };
14
- export declare type InitialFieldState = Geolocation & {
14
+ export type InitialFieldState = Geolocation & {
15
15
  imageOriginal: string | ArrayBuffer;
16
16
  imageOriginalFile: string | Blob;
17
17
  startDate: Date | null;
@@ -24,5 +24,5 @@ export declare type InitialFieldState = Geolocation & {
24
24
  isPublic: boolean;
25
25
  isSubmitting: boolean;
26
26
  };
27
- export declare type FieldStateKeys = keyof InitialFieldState;
28
- export declare type FieldStateValues = InitialFieldState[FieldStateKeys];
27
+ export type FieldStateKeys = keyof InitialFieldState;
28
+ export type FieldStateValues = InitialFieldState[FieldStateKeys];
@@ -1,6 +1,6 @@
1
1
  import { UploadButtonProps } from '@rpldy/upload-button';
2
2
  import type { ComponentType } from 'react';
3
- declare type FileInputProps = {
3
+ type FileInputProps = {
4
4
  accept: string;
5
5
  };
6
6
  declare const asUploadButton: (Component: ComponentType<any>, inputProps: FileInputProps) => import("react").ForwardRefExoticComponent<Pick<UploadButtonProps<Element>, "id" | "className" | "text" | "children" | "onClick" | "method" | "headers" | "paramName" | "params" | "forceJsonResponse" | "withCredentials" | "formatGroupParamName" | "sendWithFormData" | "formDataAllowUndefined" | "formatServerResponse" | "isSuccessfulCall" | "destination" | "fileFilter" | "autoUpload" | "clearPendingOnAdd" | "grouped" | "maxGroupSize" | "inputFieldName" | "fastAbortThreshold" | "userData" | "extraProps"> & import("react").RefAttributes<any>>;
@@ -82,7 +82,7 @@ function EventParticipantsButton(inProps) {
82
82
  }, [scEvent]);
83
83
  // FETCH FIRST FOLLOWERS
84
84
  (0, use_deep_compare_effect_1.useDeepCompareEffectNoCheck)(() => {
85
- if (!scEvent) {
85
+ if (!scEvent || !participantsAvailable) {
86
86
  return;
87
87
  }
88
88
  if (!followers.length && participantsAvailable) {
@@ -58,6 +58,11 @@ export interface EventsProps {
58
58
  * @default true
59
59
  */
60
60
  showFilters?: boolean;
61
+ /**
62
+ * Hides my events title
63
+ * @default false
64
+ */
65
+ hideTitle?: boolean;
61
66
  /**
62
67
  * Filters component
63
68
  * @param props
@@ -21,10 +21,13 @@ const Skeleton_1 = tslib_1.__importDefault(require("../Events/Skeleton"));
21
21
  const constants_1 = require("./constants");
22
22
  const LocationEventsFilter_1 = tslib_1.__importDefault(require("./LocationEventsFilter"));
23
23
  const PastEventsFilter_1 = tslib_1.__importDefault(require("./PastEventsFilter"));
24
+ const OngoingEventsFilter_1 = tslib_1.__importDefault(require("./OngoingEventsFilter"));
24
25
  const classes = {
25
26
  root: `${constants_1.PREFIX}-root`,
26
27
  filters: `${constants_1.PREFIX}-filters`,
27
28
  events: `${constants_1.PREFIX}-events`,
29
+ sectionTitle: `${constants_1.PREFIX}-section-title`,
30
+ divider: `${constants_1.PREFIX}-divider`,
28
31
  item: `${constants_1.PREFIX}-item`,
29
32
  itemSkeleton: `${constants_1.PREFIX}-item-skeleton`,
30
33
  noResults: `${constants_1.PREFIX}-no-results`,
@@ -32,7 +35,7 @@ const classes = {
32
35
  search: `${constants_1.PREFIX}-search`
33
36
  };
34
37
  const options = [
35
- { value: types_1.SCEventDateFilterType.ANY, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.select.any", defaultMessage: "ui.events.select.any" }) },
38
+ { value: types_1.SCEventDateFilterType.ALL, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.select.any", defaultMessage: "ui.events.select.any" }) },
36
39
  { value: types_1.SCEventDateFilterType.TODAY, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.select.today", defaultMessage: "ui.events.select.today" }) },
37
40
  { value: types_1.SCEventDateFilterType.TOMORROW, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.select.tomorrow", defaultMessage: "ui.events.select.tomorrow" }) },
38
41
  { value: types_1.SCEventDateFilterType.THIS_WEEK, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.select.thisWeek", defaultMessage: "ui.events.select.thisWeek" }) },
@@ -46,7 +49,7 @@ const Root = (0, material_1.styled)(material_1.Box, {
46
49
  exports.EventsChipRoot = (0, material_1.styled)(material_1.Chip, {
47
50
  name: constants_1.PREFIX,
48
51
  slot: 'EventsChipRoot',
49
- shouldForwardProp: (prop) => prop !== 'showFollowed' && prop !== 'showPastEvents'
52
+ shouldForwardProp: (prop) => prop !== 'showFollowed' && prop !== 'showPastEvents' && prop !== 'showOngoingEvents'
50
53
  })(() => ({}));
51
54
  /**
52
55
  * > API documentation for the Community-JS Events component. Learn about the available props and the CSS API.
@@ -81,7 +84,7 @@ function Events(inProps) {
81
84
  props: inProps,
82
85
  name: constants_1.PREFIX
83
86
  });
84
- const { endpoint = api_services_1.Endpoints.SearchEvents, endpointQueryParams = { limit: 8, offset: Pagination_1.DEFAULT_PAGINATION_OFFSET }, className, EventComponentProps = { elevation: 0, square: true }, EventsSkeletonComponentProps = {}, EventSkeletonComponentProps = { elevation: 0, square: true }, GridContainerComponentProps = {}, GridItemComponentProps = {}, CreateEventButtonProps = {}, showFilters = false, filters, general = true } = props, rest = tslib_1.__rest(props, ["endpoint", "endpointQueryParams", "className", "EventComponentProps", "EventsSkeletonComponentProps", "EventSkeletonComponentProps", "GridContainerComponentProps", "GridItemComponentProps", "CreateEventButtonProps", "showFilters", "filters", "general"]);
87
+ const { endpoint = api_services_1.Endpoints.SearchEvents, endpointQueryParams = { limit: 8, offset: Pagination_1.DEFAULT_PAGINATION_OFFSET }, className, EventComponentProps = { elevation: 0, square: true }, EventsSkeletonComponentProps = {}, EventSkeletonComponentProps = { elevation: 0, square: true }, GridContainerComponentProps = {}, GridItemComponentProps = {}, CreateEventButtonProps = {}, showFilters = false, filters, general = true, hideTitle = false } = props, rest = tslib_1.__rest(props, ["endpoint", "endpointQueryParams", "className", "EventComponentProps", "EventsSkeletonComponentProps", "EventSkeletonComponentProps", "GridContainerComponentProps", "GridItemComponentProps", "CreateEventButtonProps", "showFilters", "filters", "general", "hideTitle"]);
85
88
  // STATE
86
89
  const [events, setEvents] = (0, react_1.useState)([]);
87
90
  const [loading, setLoading] = (0, react_1.useState)(true);
@@ -91,7 +94,9 @@ function Events(inProps) {
91
94
  const [location, setLocation] = (0, react_1.useState)(types_1.SCEventLocationFilterType.ANY);
92
95
  const [showFollowed, setShowFollowed] = (0, react_1.useState)(false);
93
96
  const [showPastEvents, setShowPastEvents] = (0, react_1.useState)(false);
97
+ const [showOngoingEvents, setShowOngoingEvents] = (0, react_1.useState)(false);
94
98
  const [showMyEvents, setShowMyEvents] = (0, react_1.useState)(false);
99
+ const showUserEvents = !general && (events.length || (!events.length && (showPastEvents || showMyEvents || location !== types_1.SCEventLocationFilterType.ANY)));
95
100
  // CONTEXT
96
101
  const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
97
102
  const scPreferencesContext = (0, react_1.useContext)(react_core_1.SCPreferencesContext);
@@ -118,6 +123,12 @@ function Events(inProps) {
118
123
  const handleDeletePastClick = () => {
119
124
  setShowPastEvents(false);
120
125
  };
126
+ const handleChipOngoingClick = () => {
127
+ setShowOngoingEvents(!showOngoingEvents);
128
+ };
129
+ const handleDeleteOngoingClick = () => {
130
+ setShowOngoingEvents(false);
131
+ };
121
132
  /**
122
133
  * Fetches events list
123
134
  */
@@ -128,7 +139,7 @@ function Events(inProps) {
128
139
  url: endpoint.url({}),
129
140
  method: endpoint.method,
130
141
  params: Object.assign(Object.assign({}, endpointQueryParams), (general
131
- ? Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (query && { search: query })), (dateSearch !== types_1.SCEventDateFilterType.ANY && { date_filter: dateSearch })), (location !== types_1.SCEventLocationFilterType.ANY && { location })), (showFollowed && { follows: showFollowed })), (showPastEvents && { date_filter: types_1.SCEventDateFilterType.PAST })) : Object.assign(Object.assign(Object.assign({ subscription_status: types_1.SCEventSubscriptionStatusType.GOING }, (location !== types_1.SCEventLocationFilterType.ANY && { location })), (showPastEvents && { past: showPastEvents })), (showMyEvents && { created_by: authUserId }))))
142
+ ? Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (query && { search: query })), (dateSearch !== types_1.SCEventDateFilterType.ALL && { date_filter: dateSearch })), (location !== types_1.SCEventLocationFilterType.ANY && { location })), (showFollowed && { follows: showFollowed })), (showOngoingEvents && { date_filter: types_1.SCEventDateFilterType.NOT_PAST })) : Object.assign(Object.assign(Object.assign({ subscription_status: types_1.SCEventSubscriptionStatusType.GOING }, (location !== types_1.SCEventLocationFilterType.ANY && { location })), (showPastEvents && { past: showPastEvents })), (showMyEvents && { created_by: authUserId }))))
132
143
  })
133
144
  .then((res) => {
134
145
  setEvents(res.data.results);
@@ -149,7 +160,7 @@ function Events(inProps) {
149
160
  else {
150
161
  fetchEvents();
151
162
  }
152
- }, [contentAvailability, authUserId, dateSearch, location, showFollowed, showPastEvents, showMyEvents]);
163
+ }, [contentAvailability, authUserId, dateSearch, location, showFollowed, showPastEvents, showMyEvents, showOngoingEvents]);
153
164
  /**
154
165
  * Subscriber for pubsub callback
155
166
  */
@@ -212,24 +223,24 @@ function Events(inProps) {
212
223
  /**
213
224
  * Renders events list
214
225
  */
215
- const c = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : !general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.EventsChipRoot, { color: showMyEvents ? 'secondary' : 'default', variant: showMyEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByCreatedByMe", defaultMessage: "ui.events.filterByCreatedByMe" }), onClick: () => setShowMyEvents(!showMyEvents),
226
+ const content = ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showFilters && ((0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, className: classes.filters, gap: 2 }, { children: filters ? (filters) : showUserEvents ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.EventsChipRoot, { color: showMyEvents ? 'secondary' : 'default', variant: showMyEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByCreatedByMe", defaultMessage: "ui.events.filterByCreatedByMe" }), onClick: () => setShowMyEvents(!showMyEvents),
216
227
  // @ts-expect-error this is needed to use showFollowed into SCEvents
217
- showFollowed: showMyEvents, deleteIcon: showMyEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMyEvents ? () => setShowMyEvents(false) : null, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(PastEventsFilter_1.default, { showPastEvents: showPastEvents, handleClick: handleChipPastClick, handleDeleteClick: handleDeletePastClick, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 2 }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) }))] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByName", defaultMessage: "ui.events.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
228
+ showFollowed: showMyEvents, deleteIcon: showMyEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showMyEvents ? () => setShowMyEvents(false) : null, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(PastEventsFilter_1.default, { showPastEvents: showPastEvents, handleClick: handleChipPastClick, handleDeleteClick: handleDeletePastClick, disabled: loading }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 2 }, { children: (0, jsx_runtime_1.jsx)(LocationEventsFilter_1.default, { value: location, disabled: loading, handleOnChange: handleOnChangeLocation }) }))] })) : general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, xs: 12, md: 3 }, { children: (0, jsx_runtime_1.jsx)(material_1.TextField, { className: classes.search, size: 'small', fullWidth: true, value: query, label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByName", defaultMessage: "ui.events.filterByName" }), variant: "outlined", onChange: handleOnChangeFilterName, disabled: loading, onKeyUp: (e) => {
218
229
  e.preventDefault();
219
230
  if (e.key === 'Enter') {
220
231
  fetchEvents();
221
232
  }
222
233
  }, InputProps: {
223
234
  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({ onClick: () => fetchEvents(), disabled: loading }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }) }))) : ((0, jsx_runtime_1.jsx)(material_1.Button, { size: "small", variant: "contained", color: "secondary", onClick: () => fetchEvents(), endIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "search" }), disabled: loading })) })))
224
- } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, 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: showPastEvents || loading, size: 'small', 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", inputProps: { 'aria-label': option.label } }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, 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, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.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,
235
+ } }) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, 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', 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", inputProps: { 'aria-label': option.label } }), option.label] }), option.value))) }))] })) })), (0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ item: true, 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, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(exports.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,
225
236
  // @ts-expect-error this is needed to use showFollowed into SCEvents
226
- 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, Object.assign({ item: true }, { children: (0, jsx_runtime_1.jsx)(PastEventsFilter_1.default, { showPastEvents: showPastEvents, handleClick: handleChipPastClick, handleDeleteClick: handleDeletePastClick, disabled: dateSearch !== types_1.SCEventDateFilterType.ANY || loading }) }))] })) }))), (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" }) }))] })) : ((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.personal", defaultMessage: "ui.events.noEvents.title.personal" }) }))] })) }))) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Grid, Object.assign({ container: true, spacing: { xs: 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({ item: true, xs: 12, sm: 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({ item: true, xs: 12, sm: 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" }) })))] })) })) })] }));
237
+ 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, Object.assign({ item: true }, { 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, spacing: { xs: 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({ item: true, xs: 12, sm: 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({ item: true, xs: 12, sm: 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" }) })))] })) })) })] }));
227
238
  /**
228
239
  * Renders root object (if content availability community option is false and user is anonymous, component is hidden)
229
240
  */
230
241
  if (!contentAvailability && !scUserContext.user) {
231
242
  return null;
232
243
  }
233
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: c })));
244
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: showUserEvents && !hideTitle ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.sectionTitle }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.myEvents.title", defaultMessage: "ui.events.myEvents.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.divider })] })) : general ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h4", className: classes.sectionTitle }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.allEvents.title", defaultMessage: "ui.events.allEvents.title" }) })), (0, jsx_runtime_1.jsx)(material_1.Divider, { className: classes.divider })] })) : null }), content] })));
234
245
  }
235
246
  exports.default = Events;
@@ -0,0 +1,8 @@
1
+ import { ChipProps } from '@mui/material';
2
+ export interface OngoingEventsFilterProps extends ChipProps {
3
+ autoHide?: boolean;
4
+ showOngoingEvents: boolean;
5
+ handleClick: () => void;
6
+ handleDeleteClick?: () => void;
7
+ }
8
+ export default function OngoingEventsFilter(inProps: OngoingEventsFilterProps): JSX.Element;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const react_intl_1 = require("react-intl");
7
+ const constants_1 = require("./constants");
8
+ const Events_1 = require("./Events");
9
+ function OngoingEventsFilter(inProps) {
10
+ // PROPS
11
+ const props = (0, material_1.useThemeProps)({
12
+ props: inProps,
13
+ name: constants_1.PREFIX
14
+ });
15
+ const { autoHide = false, showOngoingEvents, handleClick, handleDeleteClick } = props, rest = tslib_1.__rest(props, ["autoHide", "showOngoingEvents", "handleClick", "handleDeleteClick"]);
16
+ if (autoHide) {
17
+ return null;
18
+ }
19
+ return ((0, jsx_runtime_1.jsx)(Events_1.EventsChipRoot, Object.assign({ color: showOngoingEvents ? 'secondary' : 'default', variant: showOngoingEvents ? 'filled' : 'outlined', label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.events.filterByOngoingEvents", defaultMessage: "ui.events.filterByOngoingEvents" }), onClick: handleClick,
20
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
21
+ // @ts-ignore
22
+ showOngoingEvents: showOngoingEvents, deleteIcon: showOngoingEvents ? (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) : null, onDelete: showOngoingEvents ? handleDeleteClick : undefined }, rest)));
23
+ }
24
+ exports.default = OngoingEventsFilter;
@@ -9,11 +9,11 @@ import { StickyBoxProps } from '../../shared/StickyBox';
9
9
  /**
10
10
  * FeedSidebarProps has the same props as StickyBoxProps type
11
11
  */
12
- export declare type FeedSidebarProps = StickyBoxProps;
12
+ export type FeedSidebarProps = StickyBoxProps;
13
13
  /**
14
14
  * FeedRef props
15
15
  */
16
- export declare type FeedRef = {
16
+ export type FeedRef = {
17
17
  addFeedData: (obj: any, syncPagination?: boolean) => void;
18
18
  refresh: () => void;
19
19
  getCurrentFeedObjectIds: () => number[];
@@ -11,7 +11,7 @@ interface FeedSkeletonMap {
11
11
  */
12
12
  className?: string;
13
13
  }
14
- export declare type FeedSkeletonProps = React.PropsWithChildren<FeedSkeletonMap>;
14
+ export type FeedSkeletonProps = React.PropsWithChildren<FeedSkeletonMap>;
15
15
  /**
16
16
  * > API documentation for the Community-JS Feed Skeleton component. Learn about the available props and the CSS API.
17
17
 
@@ -1,4 +1,4 @@
1
- export declare type InitialFieldState = {
1
+ export type InitialFieldState = {
2
2
  title: string;
3
3
  description: string;
4
4
  slug?: string;
@@ -7,5 +7,5 @@ export declare type InitialFieldState = {
7
7
  coverFile?: string | Blob;
8
8
  isSubmitting: boolean;
9
9
  };
10
- export declare type FieldStateKeys = keyof InitialFieldState;
11
- export declare type FieldStateValues = InitialFieldState[FieldStateKeys];
10
+ export type FieldStateKeys = keyof InitialFieldState;
11
+ export type FieldStateValues = InitialFieldState[FieldStateKeys];
@@ -1,7 +1,7 @@
1
1
  import { Track } from 'livekit-client';
2
2
  import * as React from 'react';
3
3
  /** @public */
4
- export declare type ControlBarControls = {
4
+ export type ControlBarControls = {
5
5
  microphone?: boolean;
6
6
  camera?: boolean;
7
7
  chat?: boolean;
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { TrackReferenceOrPlaceholder } from '@livekit/components-core';
3
3
  import type { ParticipantClickEvent } from '@livekit/components-core';
4
- export declare type FocusLayoutContainerProps = React.HTMLAttributes<HTMLDivElement>;
4
+ export type FocusLayoutContainerProps = React.HTMLAttributes<HTMLDivElement>;
5
5
  /**
6
6
  * The `FocusLayoutContainer` is a layout component that expects two children:
7
7
  * A small side component: In a video conference, this is usually a carousel of participants
@@ -12,7 +12,7 @@ export declare function useSettingsToggle({ props }: UseSettingsToggleProps): {
12
12
  'aria-pressed': string;
13
13
  };
14
14
  };
15
- export declare type SettingsMenuToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
15
+ export type SettingsMenuToggleProps = React.ButtonHTMLAttributes<HTMLButtonElement>;
16
16
  /**
17
17
  * The `SettingsMenuToggle` component is a button that toggles the visibility of the `SettingsMenu` component.
18
18
  */
@@ -7,12 +7,12 @@ export declare function chain(...callbacks: any[]): (...args: any[]) => void;
7
7
  interface Props {
8
8
  [key: string]: any;
9
9
  }
10
- declare type TupleTypes<T> = {
10
+ type TupleTypes<T> = {
11
11
  [P in keyof T]: T[P];
12
12
  } extends {
13
13
  [key: number]: infer V;
14
14
  } ? V : never;
15
- declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
15
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
16
16
  /**
17
17
  * Merges multiple props objects together. Event handlers are chained,
18
18
  * classNames are combined, and ids are deduplicated - different ids
@@ -14,7 +14,7 @@ export interface TokenResult {
14
14
  accessToken: string;
15
15
  }
16
16
  export declare function isVideoCodec(codec: string): codec is VideoCodec;
17
- export declare type ConnectionDetails = {
17
+ export type ConnectionDetails = {
18
18
  serverUrl: string;
19
19
  roomName: string;
20
20
  participantName: string;
@@ -1,6 +1,6 @@
1
1
  import { BoxProps } from '@mui/material';
2
2
  export declare const PREFIX = "SCDefaultDrawerSkeleton";
3
- export declare type DefaultDrawerSkeletonProps = BoxProps;
3
+ export type DefaultDrawerSkeletonProps = BoxProps;
4
4
  /**
5
5
  * > API documentation for the Community-JS Default Drawer Skeleton component. Learn about the available props and the CSS API.
6
6
 
@@ -1,3 +1,3 @@
1
1
  import { BoxProps } from '@mui/material';
2
- export declare type DefaultHeaderContentProps = BoxProps;
2
+ export type DefaultHeaderContentProps = BoxProps;
3
3
  export default function DefaultHeaderContent(inProps: DefaultHeaderContentProps): JSX.Element;
@@ -17,7 +17,7 @@ export interface NavigationToolbarProps extends ToolbarProps {
17
17
  /**
18
18
  * Searchbar props
19
19
  */
20
- SearchAutocompleteProps?: SearchAutocompleteProps;
20
+ SearchAutocompleteComponentProps?: SearchAutocompleteProps;
21
21
  /**
22
22
  * The navigation path
23
23
  */
@@ -99,7 +99,7 @@ function NavigationToolbar(inProps) {
99
99
  props: inProps,
100
100
  name: constants_1.PREFIX
101
101
  });
102
- const { value = '', className = '', disableSearch = false, disableComposer = false, SearchAutocompleteProps = {}, startActions = null, endActions = null, NavigationSettingsIconButtonComponent = NavigationSettingsIconButton_1.default, NavigationMenuIconButtonComponentProps = {}, NavigationMenuIconButtonComponent = NavigationMenuIconButton_1.default, children = null, NotificationMenuProps = {}, ComposerIconButtonProps = {}, onOpenNotificationMenu, onCloseNotificationMenu } = props, rest = tslib_1.__rest(props, ["value", "className", "disableSearch", "disableComposer", "SearchAutocompleteProps", "startActions", "endActions", "NavigationSettingsIconButtonComponent", "NavigationMenuIconButtonComponentProps", "NavigationMenuIconButtonComponent", "children", "NotificationMenuProps", "ComposerIconButtonProps", "onOpenNotificationMenu", "onCloseNotificationMenu"]);
102
+ const { value = '', className = '', disableSearch = false, disableComposer = false, SearchAutocompleteComponentProps = {}, startActions = null, endActions = null, NavigationSettingsIconButtonComponent = NavigationSettingsIconButton_1.default, NavigationMenuIconButtonComponentProps = {}, NavigationMenuIconButtonComponent = NavigationMenuIconButton_1.default, children = null, NotificationMenuProps = {}, ComposerIconButtonProps = {}, onOpenNotificationMenu, onCloseNotificationMenu } = props, rest = tslib_1.__rest(props, ["value", "className", "disableSearch", "disableComposer", "SearchAutocompleteComponentProps", "startActions", "endActions", "NavigationSettingsIconButtonComponent", "NavigationMenuIconButtonComponentProps", "NavigationMenuIconButtonComponent", "children", "NotificationMenuProps", "ComposerIconButtonProps", "onOpenNotificationMenu", "onCloseNotificationMenu"]);
103
103
  // CONTEXT
104
104
  const scUserContext = (0, react_core_1.useSCUser)();
105
105
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -155,7 +155,7 @@ function NavigationToolbar(inProps) {
155
155
  }), "aria-label": "Groups", to: scRoutingContext.url(react_core_1.SCRoutes.GROUPS_SUBSCRIBED_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "groups" }) }))), eventsEnabled && (scUserContext.user || preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY]) && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.events, {
156
156
  [classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.EVENTS_ROUTE_NAME, {}))
157
157
  }), "aria-label": "Events", to: scRoutingContext.url(react_core_1.SCRoutes.EVENTS_ROUTE_NAME, {}), component: react_core_1.Link }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "CalendarIcon" }) })))] })));
158
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsx)(NavigationMenuIconButtonComponent, Object.assign({}, NavigationMenuIconButtonComponentProps)), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), !scUserContext.user && !preferences[react_core_1.SCPreferences.ADDONS_CLOSED_COMMUNITY] && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "inherit", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.SIGNUP_ROUTE_NAME, {}), className: classes.register }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.appBar.navigation.register", defaultMessage: "ui.appBar.navigation.register" }) }))), preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_ENABLED] && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT] ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT] }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "blank", to: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL], className: classes.customItem }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE], alt: "custom_item" }) })) }))) : ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "blank", to: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL], className: classes.customItem }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE], alt: "custom_item" }) }))) })), _children, (preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY] || scUserContext.user) && !disableSearch ? ((0, jsx_runtime_1.jsx)(SearchAutocomplete_1.default, Object.assign({ className: classes.search, blurOnSelect: true }, SearchAutocompleteProps))) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.search })), startActions, scUserContext.user ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showComposer && (0, jsx_runtime_1.jsx)(ComposerIconButton_1.default, Object.assign({ className: classes.composer }, ComposerIconButtonProps)), (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: scUserContext.user.username }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user), "aria-label": "Profile", className: classes.profile }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, src: scUserContext.user.avatar }) })) })), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.notification, {
158
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [(0, jsx_runtime_1.jsx)(NavigationMenuIconButtonComponent, Object.assign({}, NavigationMenuIconButtonComponentProps)), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), !scUserContext.user && !preferences[react_core_1.SCPreferences.ADDONS_CLOSED_COMMUNITY] && ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ color: "inherit", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.SIGNUP_ROUTE_NAME, {}), className: classes.register }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.appBar.navigation.register", defaultMessage: "ui.appBar.navigation.register" }) }))), preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_ENABLED] && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT] ? ((0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_TEXT] }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "blank", to: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL], className: classes.customItem }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE], alt: "custom_item" }) })) }))) : ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "blank", to: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL], className: classes.customItem }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE], alt: "custom_item" }) }))) })), _children, (preferences[react_core_1.SCPreferences.CONFIGURATIONS_CONTENT_AVAILABILITY] || scUserContext.user) && !disableSearch ? ((0, jsx_runtime_1.jsx)(SearchAutocomplete_1.default, Object.assign({ className: classes.search, blurOnSelect: true }, SearchAutocompleteComponentProps))) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.search })), startActions, scUserContext.user ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [showComposer && (0, jsx_runtime_1.jsx)(ComposerIconButton_1.default, Object.assign({ className: classes.composer }, ComposerIconButtonProps)), (0, jsx_runtime_1.jsx)(material_1.Tooltip, Object.assign({ title: scUserContext.user.username }, { children: (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, scUserContext.user), "aria-label": "Profile", className: classes.profile }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: scUserContext.user.username, src: scUserContext.user.avatar }) })) })), (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.notification, {
159
159
  [classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}))
160
160
  }), "aria-label": "Notification", onClick: handleOpenNotificationMenu }, { children: (0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "notifications_active" }) })) })), Boolean(anchorNotification) && ((0, jsx_runtime_1.jsx)(NotificationMenu_1.default, Object.assign({ className: classes.notificationsMenu, id: "notification-menu", anchorEl: anchorNotification, open: true, onClose: handleCloseNotificationMenu, onClick: handleCloseNotificationMenu, transformOrigin: { horizontal: 'right', vertical: 'top' }, anchorOrigin: { horizontal: 'right', vertical: 'bottom' } }, NotificationMenuProps)))] }), privateMessagingEnabled && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: (0, classnames_1.default)(classes.messages, {
161
161
  [classes.active]: value.startsWith(scRoutingContext.url(react_core_1.SCRoutes.USER_PRIVATE_MESSAGES_ROUTE_NAME, {}))
@@ -16,7 +16,7 @@ export interface NavigationToolbarMobileProps extends ToolbarProps {
16
16
  /**
17
17
  * Props spread to SearchAutocomplete component
18
18
  */
19
- SearchAutocompleteProps?: SearchAutocompleteProps;
19
+ SearchAutocompleteComponentProps?: SearchAutocompleteProps;
20
20
  /**
21
21
  * Actions to be inserted before composer IconButton
22
22
  */
@@ -71,7 +71,7 @@ function NavigationToolbarMobile(inProps) {
71
71
  props: inProps,
72
72
  name: constants_1.PREFIX
73
73
  });
74
- const { className = '', disableSearch = false, preserveDesktopLogo = false, SearchAutocompleteProps = {}, children = null, startActions = null, endActions = null, NavigationMenuIconButtonComponent = NavigationMenuIconButton_1.default, NavigationSettingsIconButtonComponent = NavigationSettingsIconButton_1.default, ComposerIconButtonProps = {} } = props, rest = tslib_1.__rest(props, ["className", "disableSearch", "preserveDesktopLogo", "SearchAutocompleteProps", "children", "startActions", "endActions", "NavigationMenuIconButtonComponent", "NavigationSettingsIconButtonComponent", "ComposerIconButtonProps"]);
74
+ const { className = '', disableSearch = false, preserveDesktopLogo = false, SearchAutocompleteComponentProps = {}, children = null, startActions = null, endActions = null, NavigationMenuIconButtonComponent = NavigationMenuIconButton_1.default, NavigationSettingsIconButtonComponent = NavigationSettingsIconButton_1.default, ComposerIconButtonProps = {} } = props, rest = tslib_1.__rest(props, ["className", "disableSearch", "preserveDesktopLogo", "SearchAutocompleteComponentProps", "children", "startActions", "endActions", "NavigationMenuIconButtonComponent", "NavigationSettingsIconButtonComponent", "ComposerIconButtonProps"]);
75
75
  // CONTEXT
76
76
  const scUserContext = (0, react_core_1.useSCUser)();
77
77
  const scRoutingContext = (0, react_core_1.useSCRouting)();
@@ -98,10 +98,10 @@ function NavigationToolbarMobile(inProps) {
98
98
  // HANDLERS
99
99
  const handleOpenSearch = (0, react_1.useCallback)(() => {
100
100
  setSearchOpen(true);
101
- }, []);
101
+ }, [setSearchOpen]);
102
102
  const handleCloseSearch = (0, react_1.useCallback)(() => {
103
103
  setSearchOpen(false);
104
- }, []);
104
+ }, [setSearchOpen]);
105
105
  // RENDER
106
106
  if (scUserContext.loading) {
107
107
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
@@ -109,7 +109,7 @@ function NavigationToolbarMobile(inProps) {
109
109
  const _children = children || ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavigationMenuIconButtonComponent, {}), (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), className: (0, classnames_1.default)(className, classes.logo, {
110
110
  [classes.logoFlex]: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL].value
111
111
  }) }, { children: !preserveDesktopLogo ? ((0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO_MOBILE].value, alt: "logo" })) : ((0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO].value, alt: "logo" })) })), preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_ENABLED].value && ((0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ target: "blank", to: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_URL].value, className: classes.customItem }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.CONFIGURATIONS_CUSTOM_NAVBAR_ITEM_IMAGE].value, alt: "custom_item" }) })))] }));
112
- return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [_children, startActions, (contentAvailable || scUserContext.user) && !disableSearch && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.search, onClick: handleOpenSearch }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "search" }) })), (0, jsx_runtime_1.jsx)(SearchDialog_1.default, { className: classes.searchDialog, fullScreen: true, open: searchOpen, SearchAutocompleteProps: Object.assign(Object.assign({}, SearchAutocompleteProps), { onClear: handleCloseSearch }) })] })), endActions, (!postOnlyStaffEnabled || (react_core_1.UserUtils.isStaff(scUserContext.user) && postOnlyStaffEnabled)) &&
112
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: [_children, startActions, (contentAvailable || scUserContext.user) && !disableSearch && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.search, onClick: handleOpenSearch }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "search" }) })), (0, jsx_runtime_1.jsx)(SearchDialog_1.default, { className: classes.searchDialog, fullScreen: true, open: searchOpen, SearchAutocompleteComponentProps: Object.assign(Object.assign({}, SearchAutocompleteComponentProps), { onClear: handleCloseSearch }) })] })), endActions, (!postOnlyStaffEnabled || (react_core_1.UserUtils.isStaff(scUserContext.user) && postOnlyStaffEnabled)) &&
113
113
  (scUserContext.user || contentAvailable) &&
114
114
  exploreStreamEnabled && (0, jsx_runtime_1.jsx)(ComposerIconButton_1.default, Object.assign({}, ComposerIconButtonProps)), scUserContext.user && (groupsEnabled || eventsEnabled) && ((0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.notifications, component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.USER_NOTIFICATIONS_ROUTE_NAME, {}) }, { children: (0, jsx_runtime_1.jsx)(material_1.Badge, Object.assign({ badgeContent: scUserContext.user.unseen_notification_banners_counter + scUserContext.user.unseen_interactions_counter, color: "secondary" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "notifications_active" }) })) }))), scUserContext.user ? ((0, jsx_runtime_1.jsx)(NavigationSettingsIconButtonComponent, { className: classes.settings })) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ className: classes.login, color: "inherit", component: react_core_1.Link, to: scRoutingContext.url(react_core_1.SCRoutes.SIGNIN_ROUTE_NAME, {}) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.appBar.navigation.login", defaultMessage: "ui.appBar.navigation.login" }) })))] })));
115
115
  }
@@ -6,7 +6,7 @@ interface PrivateMessageComponentSkeletonMap {
6
6
  */
7
7
  className?: string;
8
8
  }
9
- export declare type PrivateMessageComponentProps = React.PropsWithChildren<PrivateMessageComponentSkeletonMap>;
9
+ export type PrivateMessageComponentProps = React.PropsWithChildren<PrivateMessageComponentSkeletonMap>;
10
10
  /**
11
11
  * > API documentation for the Community-JS Private Messages Skeleton Template. Learn about the available props and the CSS API.
12
12
 
@@ -6,7 +6,10 @@ export interface SearchDialogProps extends DialogProps {
6
6
  * @default null
7
7
  */
8
8
  className?: string;
9
- SearchAutocompleteProps: SearchAutocompleteProps;
9
+ /**
10
+ * Overrides props for the SearchAutocomplete component.
11
+ */
12
+ SearchAutocompleteComponentProps: SearchAutocompleteProps;
10
13
  /**
11
14
  * Other props
12
15
  */
@@ -30,7 +30,7 @@ function Search(inProps) {
30
30
  props: inProps,
31
31
  name: PREFIX
32
32
  });
33
- const { className, SearchAutocompleteProps = { autoFocus: true } } = props, rest = tslib_1.__rest(props, ["className", "SearchAutocompleteProps"]);
34
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(SearchAutocomplete_1.default, Object.assign({ className: classes.search, blurOnSelect: false, open: true, disablePortal: true }, SearchAutocompleteProps)) }) })));
33
+ const { className, SearchAutocompleteComponentProps = { autoFocus: true } } = props, rest = tslib_1.__rest(props, ["className", "SearchAutocompleteComponentProps"]);
34
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(material_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(SearchAutocomplete_1.default, Object.assign({ className: classes.search, blurOnSelect: false, open: true, disablePortal: true }, SearchAutocompleteComponentProps)) }) })));
35
35
  }
36
36
  exports.default = Search;
@@ -11,11 +11,13 @@ const react_core_1 = require("@selfcommunity/react-core");
11
11
  const constants_1 = require("./constants");
12
12
  const Skeleton_1 = tslib_1.__importDefault(require("./Skeleton"));
13
13
  const react_core_2 = require("@selfcommunity/react-core");
14
+ const Bullet_1 = tslib_1.__importDefault(require("../Bullet"));
14
15
  const classes = {
15
16
  root: `${constants_1.PREFIX}-root`,
16
17
  empty: `${constants_1.PREFIX}-empty`,
17
18
  accordion: `${constants_1.PREFIX}-accordion`,
18
19
  summary: `${constants_1.PREFIX}-summary`,
20
+ nameWrapper: `${constants_1.PREFIX}-name-wrapper`,
19
21
  details: `${constants_1.PREFIX}-details`,
20
22
  circle: `${constants_1.PREFIX}-circle`,
21
23
  link: `${constants_1.PREFIX}-link`
@@ -48,6 +50,8 @@ function AccordionLessons(inProps) {
48
50
  const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('sm'));
49
51
  // CONTEXTS
50
52
  const scRoutingContext = (0, react_core_1.useSCRouting)();
53
+ // INTL
54
+ const intl = (0, react_intl_1.useIntl)();
51
55
  // HANDLERS
52
56
  const handleChange = (0, react_1.useCallback)((panel) => (_, newExpanded) => {
53
57
  setExpanded(newExpanded ? panel : false);
@@ -55,8 +59,14 @@ function AccordionLessons(inProps) {
55
59
  if (!course) {
56
60
  return (0, jsx_runtime_1.jsx)(Skeleton_1.default, {});
57
61
  }
58
- return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: ((_a = course.sections) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (course.sections.map((section) => ((0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ className: classes.accordion, expanded: expanded === section.id, onChange: handleChange(section.id), disableGutters: true, elevation: 0, square: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.AccordionSummary, Object.assign({ className: classes.summary, expandIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body1" }, { children: section.name })), !isMobile && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
62
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: ((_a = course.sections) === null || _a === void 0 ? void 0 : _a.length) > 0 ? (course.sections.map((section) => ((0, jsx_runtime_1.jsxs)(material_1.Accordion, Object.assign({ className: classes.accordion, expanded: expanded === section.id, onChange: handleChange(section.id), disableGutters: true, elevation: 0, square: true }, { children: [(0, jsx_runtime_1.jsxs)(material_1.AccordionSummary, Object.assign({ className: classes.summary, expandIcon: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "expand_less" }) }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ className: classes.nameWrapper }, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body1" }, { children: section.name })), viewerJoinStatus !== types_1.SCCourseJoinStatusType.CREATOR && viewerJoinStatus !== types_1.SCCourseJoinStatusType.MANAGER && section.locked && ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Bullet_1.default, {}), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.accordionLessons.date", defaultMessage: "ui.course.accordionLessons.date", values: {
63
+ date: intl.formatDate(section.available_date, { day: 'numeric', month: 'numeric', year: 'numeric' }),
64
+ hour: intl.formatDate(section.available_date, { hour: 'numeric', minute: 'numeric' })
65
+ } }) }))] }))] })), !isMobile && ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ component: "span", variant: "body1" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.table.lessons.title", defaultMessage: "ui.course.table.lessons.title", values: {
59
66
  lessonsNumber: section.lessons.length
60
- } }) })))] })), section.lessons.map((lesson) => ((0, jsx_runtime_1.jsxs)(material_1.AccordionDetails, Object.assign({ className: classes.details }, { children: [lesson.completion_status === types_1.SCCourseLessonCompletionStatusType.COMPLETED ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "small", color: "primary" }, { children: "circle_checked" }))) : lesson.locked ? ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.circle })), course.join_status === null || viewerJoinStatus === types_1.SCCourseJoinStatusType.CREATOR || lesson.locked ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: lesson.name })) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_2.Link, to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME, getUrlLesson(course, section, lesson)), variant: "text", color: "inherit", className: classes.link }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: lesson.name }) })))] }), lesson.id)))] }), section.id)))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.empty }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.accordionLessons.empty", defaultMessage: "ui.course.accordionLessons.empty" }) }))) })));
67
+ } }) })))] })), section.lessons.map((lesson) => ((0, jsx_runtime_1.jsxs)(material_1.AccordionDetails, Object.assign({ className: classes.details }, { children: [lesson.completion_status === types_1.SCCourseLessonCompletionStatusType.COMPLETED ? ((0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ fontSize: "small", color: "primary" }, { children: "circle_checked" }))) : lesson.locked ? ((0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" })) : ((0, jsx_runtime_1.jsx)(material_1.Box, { className: classes.circle })), course.join_status === null ||
68
+ viewerJoinStatus === types_1.SCCourseJoinStatusType.CREATOR ||
69
+ viewerJoinStatus === types_1.SCCourseJoinStatusType.MANAGER ||
70
+ lesson.locked ? ((0, jsx_runtime_1.jsx)(material_1.Typography, { children: lesson.name })) : ((0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ component: react_core_2.Link, to: scRoutingContext.url(react_core_1.SCRoutes.COURSE_LESSON_ROUTE_NAME, getUrlLesson(course, section, lesson)), variant: "text", color: "inherit", className: classes.link }, { children: (0, jsx_runtime_1.jsx)(material_1.Typography, { children: lesson.name }) })))] }), lesson.id)))] }), section.id)))) : ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1", className: classes.empty }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.course.accordionLessons.empty", defaultMessage: "ui.course.accordionLessons.empty" }) }))) })));
61
71
  }
62
72
  exports.default = AccordionLessons;
@@ -1,6 +1,6 @@
1
1
  import { Dispatch } from 'react';
2
2
  import { SCCourseType } from '@selfcommunity/types';
3
- declare type HeaderCellsType = {
3
+ type HeaderCellsType = {
4
4
  id?: string;
5
5
  };
6
6
  export interface CourseUsersTableProps {
@@ -1,5 +1,5 @@
1
1
  import { Component, ReactNode, CSSProperties } from 'react';
2
- declare type Fn = () => any;
2
+ type Fn = () => any;
3
3
  export interface InfiniteScrollProps {
4
4
  next?: Fn;
5
5
  hasMoreNext?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType } from "react";
2
- declare type FileInputProps = {
2
+ type FileInputProps = {
3
3
  capture?: string;
4
4
  accept: string;
5
5
  };
@@ -75,6 +75,6 @@ export interface OutlinedUrlTextFieldProps extends BaseUrlTextFieldProps {
75
75
  */
76
76
  InputProps?: Partial<OutlinedInputProps>;
77
77
  }
78
- export declare type UrlTextFieldProps = StandardUrlTextFieldProps | FilledUrlTextFieldProps | OutlinedUrlTextFieldProps;
78
+ export type UrlTextFieldProps = StandardUrlTextFieldProps | FilledUrlTextFieldProps | OutlinedUrlTextFieldProps;
79
79
  declare const _default: (props: UrlTextFieldProps) => JSX.Element;
80
80
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { TextFieldProps } from '@mui/material';
2
2
  import { SCMetadataType } from '@selfcommunity/types';
3
- export declare type MetadataFieldProps = TextFieldProps & {
3
+ export type MetadataFieldProps = TextFieldProps & {
4
4
  metadata: SCMetadataType;
5
5
  };
6
6
  declare const MetadataField: (props: MetadataFieldProps) => JSX.Element;
@@ -32,18 +32,18 @@ import React from 'react';
32
32
  /**
33
33
  * Types/interfaces
34
34
  */
35
- export declare type UseStickyBoxProps = {
35
+ export type UseStickyBoxProps = {
36
36
  offsetTop?: number;
37
37
  offsetBottom?: number;
38
38
  bottom?: boolean;
39
39
  };
40
- export declare type StickyBoxProps = UseStickyBoxProps & {
40
+ export type StickyBoxProps = UseStickyBoxProps & {
41
41
  style?: React.CSSProperties;
42
42
  className?: string;
43
43
  children?: React.ReactNode;
44
44
  };
45
- export declare type useStickyBox = <T = any>(options?: UseStickyBoxProps) => React.RefCallback<T>;
46
- export declare type StickyBoxComponent = React.FunctionComponent<StickyBoxProps>;
45
+ export type useStickyBox = <T = any>(options?: UseStickyBoxProps) => React.RefCallback<T>;
46
+ export type StickyBoxComponent = React.FunctionComponent<StickyBoxProps>;
47
47
  /**
48
48
  * useStickyBox
49
49
  * @param offsetTop