@selfcommunity/react-ui 0.8.0-live.67 → 0.8.0-live.69

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 (34) hide show
  1. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  2. package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +1 -1
  3. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +10 -20
  4. package/lib/cjs/components/Notification/Notification.js +3 -2
  5. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +4 -0
  6. package/lib/cjs/components/ToastNotifications/ToastNotifications.js +6 -2
  7. package/lib/cjs/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
  8. package/lib/cjs/components/UserLiveStreamWidget/Skeleton.js +28 -0
  9. package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
  10. package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.js +129 -0
  11. package/lib/cjs/components/UserLiveStreamWidget/constants.d.ts +1 -0
  12. package/lib/cjs/components/UserLiveStreamWidget/constants.js +4 -0
  13. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +4 -0
  14. package/lib/cjs/components/UserLiveStreamWidget/index.js +8 -0
  15. package/lib/cjs/index.d.ts +2 -1
  16. package/lib/cjs/index.js +4 -1
  17. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +1 -1
  18. package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +1 -1
  19. package/lib/esm/components/Notification/LiveStream/LiveStream.js +11 -21
  20. package/lib/esm/components/Notification/Notification.js +3 -2
  21. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +4 -0
  22. package/lib/esm/components/ToastNotifications/ToastNotifications.js +6 -2
  23. package/lib/esm/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
  24. package/lib/esm/components/UserLiveStreamWidget/Skeleton.js +24 -0
  25. package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
  26. package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.js +126 -0
  27. package/lib/esm/components/UserLiveStreamWidget/constants.d.ts +1 -0
  28. package/lib/esm/components/UserLiveStreamWidget/constants.js +1 -0
  29. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +4 -0
  30. package/lib/esm/components/UserLiveStreamWidget/index.js +4 -0
  31. package/lib/esm/index.d.ts +2 -1
  32. package/lib/esm/index.js +2 -1
  33. package/lib/umd/react-ui.js +1 -1
  34. package/package.json +7 -7
@@ -4,7 +4,7 @@ import { useState } from 'react';
4
4
  import { styled } from '@mui/material/styles';
5
5
  import { Avatar, Box, Icon, Stack, Typography } from '@mui/material';
6
6
  import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
7
- import { FormattedMessage, useIntl } from 'react-intl';
7
+ import { FormattedMessage } from 'react-intl';
8
8
  import DateTimeAgo from '../../../shared/DateTimeAgo';
9
9
  import classNames from 'classnames';
10
10
  import { SCNotificationObjectTemplateType } from '../../../types';
@@ -13,9 +13,9 @@ import { LoadingButton } from '@mui/lab';
13
13
  import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
14
14
  import UserAvatar from '../../../shared/UserAvatar';
15
15
  import { PREFIX } from '../constants';
16
- import { default as EventItem } from '../../Event';
16
+ import LiveStream from '../../LiveStream';
17
17
  const classes = {
18
- root: `${PREFIX}-event-root`,
18
+ root: `${PREFIX}-live-root`,
19
19
  avatar: `${PREFIX}-avatar`,
20
20
  actions: `${PREFIX}-actions`,
21
21
  seeButton: `${PREFIX}see-button`,
@@ -25,10 +25,10 @@ const classes = {
25
25
  };
26
26
  const Root = styled(NotificationItem, {
27
27
  name: PREFIX,
28
- slot: 'EventRoot'
28
+ slot: 'LiveStreamRoot'
29
29
  })(() => ({}));
30
30
  /**
31
- * This component render the content of the notification of type event
31
+ * This component render the content of the notification of type live stream
32
32
  * @constructor
33
33
  * @param props
34
34
  */
@@ -42,28 +42,19 @@ export default function LiveStreamNotification(props) {
42
42
  // CONST
43
43
  const isSnippetTemplate = template === SCNotificationObjectTemplateType.SNIPPET;
44
44
  const isToastTemplate = template === SCNotificationObjectTemplateType.TOAST;
45
- const intl = useIntl();
46
45
  // RENDER
47
- if (isSnippetTemplate || isToastTemplate) {
46
+ if (isSnippetTemplate) {
48
47
  return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: _jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
49
48
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
50
49
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.user.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.user.username, variant: "circular", src: notificationObject.user.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
51
50
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
52
- }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.event.${notificationObject.type}`, defaultMessage: `ui.notification.event.${notificationObject.type}`, values: {
51
+ }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
53
52
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
54
53
  // @ts-ignore
55
54
  icon: (...chunks) => _jsx(Icon, { children: chunks }),
56
- event: notificationObject.live_stream.title,
55
+ live: notificationObject.live_stream.title,
57
56
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
58
- } })] }), secondary: _jsx(_Fragment, { children: _jsx(Typography, Object.assign({ component: "span" }, { children: _jsx(FormattedMessage, { id: "ui.notification.event.dateTime", defaultMessage: "ui.notification.event.dateTime", values: {
59
- date: intl.formatDate(notificationObject.live_stream.created_at, {
60
- weekday: 'long',
61
- day: 'numeric',
62
- year: 'numeric',
63
- month: 'long'
64
- }),
65
- hour: intl.formatDate(notificationObject.live_stream.created_at, { hour: 'numeric', minute: 'numeric' })
66
- } }) })) }), footer: isToastTemplate ? (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at }), _jsx(Typography, Object.assign({ color: "primary" }, { children: _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) })) }))] }))) : (_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
57
+ } })] }), footer: isToastTemplate ? (_jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at }), _jsx(Typography, Object.assign({ color: "primary" }, { children: _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) })) }))] }))) : (_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
67
58
  }
68
59
  return (_jsxs(_Fragment, { children: [_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: _jsx(Link, Object.assign({}, (!notificationObject.user.deleted && {
69
60
  to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.user)
@@ -72,8 +63,7 @@ export default function LiveStreamNotification(props) {
72
63
  }), { onClick: notificationObject.user.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.user.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
73
64
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
74
65
  // @ts-ignore
75
- icon: (...chunks) => _jsx(Icon, { children: chunks }),
76
- event: notificationObject.live_stream.title,
66
+ live: notificationObject.live_stream.title,
77
67
  link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
78
- } }), _jsx(EventItem, { event: notificationObject.live_stream, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.event.button.see", defaultMessage: "ui.notification.event.button.see" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
68
+ } }), _jsx(LiveStream, { liveStream: notificationObject.live_stream, actions: _jsx(_Fragment, {}), elevation: 0 })] }), actions: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [_jsx(DateTimeAgo, { date: notificationObject.active_at, className: classes.activeAt }), _jsx(LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: _jsx(FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && _jsx(UserDeletedSnackBar, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
79
69
  }
@@ -16,6 +16,8 @@ import KindlyNoticeForNotification from './KindlyNoticeFor';
16
16
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
17
17
  import KindlyNoticeFlagNotification from './KindlyNoticeFlag';
18
18
  import VoteUpNotification from './VoteUp';
19
+ import EventNotification from './Event/Event';
20
+ import LiveStreamNotification from './LiveStream/LiveStream';
19
21
  import Icon from '@mui/material/Icon';
20
22
  import { SCOPE_SC_UI } from '../../constants/Errors';
21
23
  import { getContribution, getContributionRouteName, getContributionSnippet, getRouteData } from '../../utils/contribution';
@@ -35,7 +37,6 @@ import UserDeletedSnackBar from '../../shared/UserDeletedSnackBar';
35
37
  import UserAvatar from '../../shared/UserAvatar';
36
38
  import { PREFIX } from './constants';
37
39
  import GroupNotification from './Group';
38
- import EventNotification from './Event/Event';
39
40
  const messages = defineMessages({
40
41
  receivePrivateMessage: {
41
42
  id: 'ui.notification.receivePrivateMessage',
@@ -307,7 +308,7 @@ export default function UserNotification(inProps) {
307
308
  return _jsx(EventNotification, { notificationObject: n }, i);
308
309
  }
309
310
  else if (n.type === SCNotificationTypologyType.LIVE_STREAM_STARTED) {
310
- return _jsx(EventNotification, { notificationObject: n }, i);
311
+ return _jsx(LiveStreamNotification, { notificationObject: n }, i);
311
312
  }
312
313
  return null;
313
314
  }
@@ -34,6 +34,7 @@ import NotificationItem from '../../shared/NotificationItem';
34
34
  import { PREFIX } from './constants';
35
35
  import GroupNotification from '../Notification/Group';
36
36
  import EventNotification from '../Notification/Event/Event';
37
+ import LiveStreamNotification from '../Notification/LiveStream';
37
38
  const classes = {
38
39
  root: `${PREFIX}-root`,
39
40
  notificationsWrap: `${PREFIX}-notifications-wrap`,
@@ -267,6 +268,9 @@ export default function SnippetNotifications(inProps) {
267
268
  n.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
268
269
  return _jsx(EventNotification, { notificationObject: n, template: SCNotificationObjectTemplateType.SNIPPET }, i);
269
270
  }
271
+ else if (type === SCNotificationTypologyType.LIVE_STREAM_STARTED) {
272
+ content = _jsx(LiveStreamNotification, { notificationObject: n, template: SCNotificationObjectTemplateType.SNIPPET }, i);
273
+ }
270
274
  if (type && handleNotification) {
271
275
  /** Override content */
272
276
  content = handleNotification(type, n, content);
@@ -6,8 +6,9 @@ import { SCNotification, useSCAlertMessages, useSCContext, useSCUser } from '@se
6
6
  import { SCNotificationTopicType, SCNotificationTypologyType } from '@selfcommunity/types';
7
7
  import PubSub from 'pubsub-js';
8
8
  import { useSnackbar } from 'notistack';
9
- import CustomSnackMessage from '../../shared/CustomSnackMessage';
9
+ import { PREFIX } from './constants';
10
10
  import { SCBroadcastMessageTemplateType, SCNotificationObjectTemplateType } from '../../types';
11
+ import CustomSnackMessage from '../../shared/CustomSnackMessage';
11
12
  import CommentNotification from '../Notification/Comment';
12
13
  import ContributionFollowNotification from '../Notification/ContributionFollow';
13
14
  import UserFollowNotification from '../Notification/UserFollow';
@@ -21,9 +22,9 @@ import UserBlockedNotification from '../Notification/UserBlocked';
21
22
  import Message from '../BroadcastMessages/Message';
22
23
  import { useThemeProps } from '@mui/system';
23
24
  import ContributionNotification from '../Notification/Contribution';
24
- import { PREFIX } from './constants';
25
25
  import GroupNotification from '../Notification/Group';
26
26
  import EventNotification from '../Notification/Event/Event';
27
+ import LiveStreamNotification from '../Notification/LiveStream';
27
28
  const Root = styled(Box, {
28
29
  name: PREFIX,
29
30
  slot: 'Root'
@@ -123,6 +124,9 @@ export default function UserToastNotifications(inProps) {
123
124
  type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
124
125
  content = _jsx(EventNotification, { notificationObject: n.notification_obj, template: SCNotificationObjectTemplateType.TOAST });
125
126
  }
127
+ else if (type === SCNotificationTypologyType.LIVE_STREAM_STARTED) {
128
+ content = _jsx(LiveStreamNotification, { notificationObject: n.notification_obj, template: SCNotificationObjectTemplateType.TOAST });
129
+ }
126
130
  }
127
131
  if (n.activity_type && n.activity_type === SCNotificationTypologyType.NOTIFICATION_BANNER) {
128
132
  /** Notification of type: 'notification_banner' */
@@ -0,0 +1,2 @@
1
+ import 'swiper/css';
2
+ export default function UserLiveStreamWidgetSkeleton(): JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CardActions, CardContent, Divider, Skeleton, Stack } from '@mui/material';
3
+ import { styled } from '@mui/system';
4
+ import { Fragment } from 'react';
5
+ import 'swiper/css';
6
+ import { EventSkeleton } from '../Event';
7
+ import Widget from '../Widget';
8
+ import { PREFIX } from './constants';
9
+ const classes = {
10
+ root: `${PREFIX}-skeleton-root`,
11
+ content: `${PREFIX}-content`,
12
+ user: `${PREFIX}-user`,
13
+ liveWrapper: `${PREFIX}-live-wrapper`,
14
+ event: `${PREFIX}-event`,
15
+ actions: `${PREFIX}-actions`
16
+ };
17
+ const Root = styled(Widget, {
18
+ name: PREFIX,
19
+ slot: 'SkeletonRoot',
20
+ overridesResolver: (_props, styles) => styles.skeletonRoot
21
+ })(() => ({}));
22
+ export default function UserLiveStreamWidgetSkeleton() {
23
+ return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [_jsx(CardContent, Object.assign({ className: classes.content }, { children: _jsx(Stack, Object.assign({ className: classes.liveWrapper }, { children: [1, 2, 3, 4].map((_event, i, array) => (_jsxs(Fragment, { children: [_jsx(EventSkeleton, { elevation: 0, className: classes.event }), i < array.length - 1 && _jsx(Divider, {})] }, i))) })) })), _jsx(CardActions, Object.assign({ className: classes.actions }, { children: _jsx(Skeleton, { animation: "wave", width: "52px", height: "20px" }) }))] })));
24
+ }
@@ -0,0 +1,47 @@
1
+ import { SCUserType } from '@selfcommunity/types';
2
+ import { CacheStrategies } from '@selfcommunity/utils';
3
+ import 'swiper/css';
4
+ import { BaseDialogProps } from '../../shared/BaseDialog';
5
+ import { WidgetProps } from '../Widget';
6
+ import { LiveStreamProps } from '../LiveStream';
7
+ export interface UserLiveStreamWidgetProps extends WidgetProps {
8
+ /**
9
+ * The user id
10
+ * @default null
11
+ */
12
+ userId: number;
13
+ /**
14
+ * User Object
15
+ * @default null
16
+ */
17
+ user?: SCUserType;
18
+ /**
19
+ * Props to spread to single live stream object
20
+ * @default {}
21
+ */
22
+ liveStreamComponentProps?: LiveStreamProps;
23
+ /**
24
+ * API Query Params
25
+ * @default [{'limit': 20, 'offset': 0}]
26
+ */
27
+ endpointQueryParams?: Record<string, string | number>;
28
+ /**
29
+ * Caching strategies
30
+ * @default CacheStrategies.CACHE_FIRST
31
+ */
32
+ cacheStrategy?: CacheStrategies;
33
+ /**
34
+ * Props to spread to users suggestion dialog
35
+ * @default {}
36
+ */
37
+ dialogProps?: BaseDialogProps;
38
+ /**
39
+ * Limit param
40
+ */
41
+ limit?: number;
42
+ /**
43
+ * Other props
44
+ */
45
+ [p: string]: any;
46
+ }
47
+ export default function UserLiveStreamWidget(inProps: UserLiveStreamWidgetProps): JSX.Element;
@@ -0,0 +1,126 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button, CardActions, CardContent, Divider, List, ListItem, Stack, Typography, useThemeProps } from '@mui/material';
4
+ import { styled } from '@mui/system';
5
+ import { Endpoints, http, UserApiClient } from '@selfcommunity/api-services';
6
+ import { SCCache, SCPreferences, useSCFetchUser, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
7
+ import { isInteger, Logger } from '@selfcommunity/utils';
8
+ import { Fragment, useCallback, useEffect, useMemo, useReducer, useState } from 'react';
9
+ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
10
+ import 'swiper/css';
11
+ import { SCOPE_SC_UI } from '../../constants/Errors';
12
+ import { DEFAULT_PAGINATION_OFFSET } from '../../constants/Pagination';
13
+ import BaseDialog from '../../shared/BaseDialog';
14
+ import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
15
+ import InfiniteScroll from '../../shared/InfiniteScroll';
16
+ import { actionWidgetTypes, dataWidgetReducer, stateWidgetInitializer } from '../../utils/widget';
17
+ import Widget from '../Widget';
18
+ import { PREFIX } from './constants';
19
+ import Skeleton from './Skeleton';
20
+ import LiveStream, { LiveStreamSkeleton } from '../LiveStream';
21
+ const messages = defineMessages({
22
+ title: {
23
+ id: 'ui.userLiveStreamWidget.title',
24
+ defaultMessage: 'ui.userLiveStreamWidget.title'
25
+ }
26
+ });
27
+ const classes = {
28
+ root: `${PREFIX}-root`,
29
+ content: `${PREFIX}-content`,
30
+ header: `${PREFIX}-header`,
31
+ avatarWrapper: `${PREFIX}-avatar-wrapper`,
32
+ avatar: `${PREFIX}-avatar`,
33
+ liveWrapper: `${PREFIX}-live-wrapper`,
34
+ live: `${PREFIX}-live`,
35
+ actions: `${PREFIX}-actions`,
36
+ actionButton: `${PREFIX}-action-button`,
37
+ dialogRoot: `${PREFIX}-dialog-root`,
38
+ infiniteScroll: `${PREFIX}-infinite-scroll`,
39
+ endMessage: `${PREFIX}-end-message`
40
+ };
41
+ const Root = styled(Widget, {
42
+ name: PREFIX,
43
+ slot: 'Root',
44
+ overridesResolver: (_props, styles) => styles.root
45
+ })(() => ({}));
46
+ const DialogRoot = styled(BaseDialog, {
47
+ name: PREFIX,
48
+ slot: 'DialogRoot',
49
+ overridesResolver: (_props, styles) => styles.dialogRoot
50
+ })(() => ({}));
51
+ export default function UserLiveStreamWidget(inProps) {
52
+ // PROPS
53
+ const props = useThemeProps({
54
+ props: inProps,
55
+ name: PREFIX
56
+ });
57
+ const { userId, user, liveStreamComponentProps = { elevation: 0, square: true }, endpointQueryParams = { limit: 5, offset: DEFAULT_PAGINATION_OFFSET }, cacheStrategy, dialogProps, limit = 5 } = props, rest = __rest(props, ["userId", "user", "liveStreamComponentProps", "endpointQueryParams", "cacheStrategy", "dialogProps", "limit"]);
58
+ // STATE
59
+ const [state, dispatch] = useReducer(dataWidgetReducer, {
60
+ isLoadingNext: false,
61
+ next: null,
62
+ cacheKey: SCCache.getWidgetStateCacheKey(SCCache.USER_LIVE_STREAM_CACHE_PREFIX_KEY, isInteger(userId) ? userId : user.id),
63
+ cacheStrategy,
64
+ visibleItems: limit
65
+ }, stateWidgetInitializer);
66
+ const [openDialog, setOpenDialog] = useState(false);
67
+ // CONTEXT
68
+ const scUserContext = useSCUser();
69
+ const scPreferencesContext = useSCPreferences();
70
+ const { scUser } = useSCFetchUser({ id: userId, user });
71
+ // HOOKS
72
+ const intl = useIntl();
73
+ // MEMO
74
+ const liveStreamEnabled = useMemo(() => SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in scPreferencesContext.preferences &&
75
+ scPreferencesContext.preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [scPreferencesContext.preferences]);
76
+ console.log(liveStreamEnabled);
77
+ const _initComponent = useCallback(() => {
78
+ if (!state.initialized && !state.isLoadingNext) {
79
+ dispatch({ type: actionWidgetTypes.LOADING_NEXT });
80
+ UserApiClient.getUserLiveStream(scUser.id, endpointQueryParams)
81
+ .then((payload) => {
82
+ dispatch({ type: actionWidgetTypes.LOAD_NEXT_SUCCESS, payload: Object.assign(Object.assign({}, payload), { initialized: true }) });
83
+ })
84
+ .catch((error) => {
85
+ dispatch({ type: actionWidgetTypes.LOAD_NEXT_FAILURE, payload: { errorLoadNext: error } });
86
+ Logger.error(SCOPE_SC_UI, error);
87
+ });
88
+ }
89
+ }, [scUser, state.isLoadingNext, state.initialized, dispatch]);
90
+ // EFFECTS
91
+ useEffect(() => {
92
+ let _t;
93
+ if (scUserContext.user && scUser && liveStreamEnabled) {
94
+ _t = setTimeout(_initComponent);
95
+ return () => {
96
+ clearTimeout(_t);
97
+ };
98
+ }
99
+ }, [scUserContext.user, scUser, liveStreamEnabled]);
100
+ // HANDLERS
101
+ /**
102
+ * Handles pagination
103
+ */
104
+ const handleNext = useCallback(() => {
105
+ dispatch({ type: actionWidgetTypes.LOADING_NEXT });
106
+ http
107
+ .request({
108
+ url: state.next,
109
+ method: Endpoints.GetLiveStream.method
110
+ })
111
+ .then((res) => {
112
+ dispatch({ type: actionWidgetTypes.LOAD_NEXT_SUCCESS, payload: res.data });
113
+ });
114
+ }, [dispatch, state.next, state.isLoadingNext, state.initialized]);
115
+ const handleToggleDialogOpen = useCallback(() => {
116
+ setOpenDialog((prev) => !prev);
117
+ }, []);
118
+ if (!scUser && !state.initialized) {
119
+ return _jsx(Skeleton, {});
120
+ }
121
+ // RENDER
122
+ if (!scUser.user || (state === null || state === void 0 ? void 0 : state.count) === 0 || !liveStreamEnabled) {
123
+ return _jsx(HiddenPlaceholder, {});
124
+ }
125
+ return (_jsxs(Root, Object.assign({ className: classes.root }, rest, { children: [_jsxs(CardContent, Object.assign({ className: classes.content }, { children: [_jsx(Typography, Object.assign({ variant: "h4" }, { children: _jsx("b", { children: intl.formatMessage(messages.title, { user: scUser.username }) }) })), _jsx(Stack, Object.assign({ className: classes.liveWrapper }, { children: state === null || state === void 0 ? void 0 : state.results.map((_live, i, array) => (_jsxs(Fragment, { children: [_jsx(LiveStream, Object.assign({ liveStream: _live }, liveStreamComponentProps, { className: classes.live })), i < array.length - 1 && _jsx(Divider, {})] }, i))) }))] })), state.count > state.visibleItems && (_jsx(CardActions, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ onClick: handleToggleDialogOpen, className: classes.actionButton }, { children: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.userLiveStreamWidget.showAll", defaultMessage: "ui.userLiveStreamWidget.showAll" }) })) })) }))), openDialog && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.title, { user: scUser.username }), onClose: handleToggleDialogOpen, open: openDialog }, dialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: _jsx(LiveStreamSkeleton, Object.assign({ elevation: 0 }, liveStreamComponentProps)), className: classes.infiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.userLiveStreamWidget.noMoreResults", defaultMessage: "ui.userLiveStreamWidget.noMoreResults" }) })) }, { children: _jsx(List, { children: state.results.map((live) => (_jsx(ListItem, { children: _jsx(LiveStream, Object.assign({ elevation: 0, liveStream: live }, liveStreamComponentProps)) }, live.id))) }) })) })))] })));
126
+ }
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCUserLiveStreamWidget";
@@ -0,0 +1 @@
1
+ export const PREFIX = 'SCUserLiveStreamWidget';
@@ -0,0 +1,4 @@
1
+ import UserLiveStreamWidget, { UserLiveStreamWidgetProps } from './UserLiveStreamWidget';
2
+ import UserLiveStreamWidgetSkeleton from './Skeleton';
3
+ export default UserLiveStreamWidget;
4
+ export { UserLiveStreamWidgetSkeleton, type UserLiveStreamWidgetProps };
@@ -0,0 +1,4 @@
1
+ import UserLiveStreamWidget from './UserLiveStreamWidget';
2
+ import UserLiveStreamWidgetSkeleton from './Skeleton';
3
+ export default UserLiveStreamWidget;
4
+ export { UserLiveStreamWidgetSkeleton };
@@ -124,6 +124,7 @@ import UserProfileHeader, { UserProfileHeaderProps, UserProfileHeaderSkeleton }
124
124
  import UserSocialAssociation, { UserSocialAssociationProps } from './components/UserSocialAssociation';
125
125
  import UserSubscribedGroupsWidget, { UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton } from './components/UserSubscribedGroupsWidget';
126
126
  import UserSuggestionWidget, { UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton } from './components/UserSuggestionWidget';
127
+ import UserLiveStreamWidget, { UserLiveStreamWidgetProps, UserLiveStreamWidgetSkeleton } from './components/UserLiveStreamWidget';
127
128
  import Widget, { WidgetProps } from './components/Widget';
128
129
  import { MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO } from './constants/Media';
129
130
  import LiveStream, { LiveStreamProps, LiveStreamSkeletonProps, LiveStreamSkeleton } from './components/LiveStream';
@@ -185,4 +186,4 @@ import LogoSelfCommunity from './assets/logo';
185
186
  /**
186
187
  * List all exports
187
188
  */
188
- export { AcceptRequestUserEventButton, AcceptRequestUserEventButtonProps, AccountChangeMailValidation, AccountChangeMailValidationProps, AccountDataPortability, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDataPortabilityProps, AccountDelete, AccountDeleteButton, AccountDeleteButtonProps, AccountDeleteProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AvatarGroupSkeleton, BaseDialog, BaseDialogProps, BaseItem, BaseItemProps, BaseLightbox, BaseLightboxProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, bytesToSize, generateRoomId, randomString, decodePassphrase, encodePassphrase, Calendar, CalendarProps, Categories, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, Category, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowButton, CategoryFollowButtonProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, CategoryProps, CategorySkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingPeopleWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CentralProgress, ChangeCover, ChangeCoverProps, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, ChangePicture, ChangePictureProps, CommentObject, CommentObjectProps, CommentObjectReply, CommentObjectReplyProps, CommentObjectSkeleton, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, CommentsObject, CommentsObjectProps, CommentsObjectSkeleton, Composer, ComposerIconButton, ComposerIconButtonProps, ComposerProps, ConfirmDialog, ConnectionUserButton, ConsentSolution, ConsentSolutionButton, ConsentSolutionButtonProps, ConsentSolutionProps, ConsentSolutionSkeleton, ContributionUtils, CreateEventButton, CreateEventButtonProps, CreateEventWidget, CreateEventWidgetProps, CreateEventWidgetSkeleton, CreateGroupButton, EventForm, EventFormProps, EventFormDialog, EventFormDialogProps, CreateGroupButtonProps, CustomAdv, CustomAdvProps, CustomAdvSkeleton, DEFAULT_FIELDS, DEFAULT_PAGINATION_LIMIT, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultDrawerContentProps, DefaultHeaderContent, DefaultHeaderContentProps, EditEventButton, EditEventButtonProps, EditGroupButton, EditGroupButtonProps, EditMediaProps, Editor, EditorProps, EditorSkeleton, EmailTextField, Event, EventActionsMenu, EventActionsMenuProps, EventHeader, EventHeaderProps, EventHeaderSkeleton, EventInfoDetails, EventInfoDetailsProps, EventInfoWidget, EventInfoWidgetProps, EventInviteButton, EventInviteButtonProps, EventLocationWidget, EventLocationWidgetProps, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetProps, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetProps, EventMembersWidgetSkeleton, EventParticipantsButton, EventParticipantsButtonProps, EventProps, Events, EventSkeleton, EventSkeletonProps, EventsProps, EventsSkeleton, EventsSkeletonProps, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedObjectProps, FeedObjectSkeleton, FeedProps, FeedRef, FeedSidebarProps, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, File, FollowUserButton, FollowUserButtonProps, Footer, FooterProps, FooterSkeleton, FriendshipButtonProps, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, Group, GroupActionsMenu, GroupActionsMenuProps, GroupForm, GroupFormProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInviteButtonProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupProps, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSettingsIconButtonProps, GroupSkeleton, GroupsProps, GroupsSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorDetailProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorProps, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, InfiniteScroll, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, InviteUserEventButton, InviteUserEventButtonProps, LanguageSwitcher, LEGAL_POLICIES, Lightbox, LightboxProps, Link, LINKEDIN_SHARE, LocationAutocomplete, LocationAutocompleteProps, LogoSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, MediaChunkUploader, MediaChunkUploaderProps, MessageUploaderUtils, MetadataField, MetadataFieldProps, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetProps, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuDrawerProps, NavigationMenuHeader, NavigationMenuIconButton, NavigationMenuIconButtonProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbarProps, NavigationToolbarSkeleton, Notification, NotificationProps, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetProps, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetActionType, PlatformWidgetProps, PlatformWidgetSkeleton, PollSuggestionWidget, PollSuggestionWidgetProps, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, ProgressBar, ProgressBarProps, RelatedEventsWidget, RelatedEventsWidgetProps, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, RelatedFeedObjectWidgetProps, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventMembersEventType, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCGroupMembersEventType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Share, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, StickyBox, StickyBoxComponent, StickyBoxProps, SuggestedEventsWidget, SuggestedEventsWidgetProps, SuggestedEventsWidgetSkeleton, TagChip, TagChipProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserActionIconButtonProps, UserAvatar, UserAvatarProps, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserCounters, UserCountersProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoDialogProps, UserInfoProps, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileBlockedProps, UserProfileEdit, UserProfileEditProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserProps, UserSkeleton, UserSocialAssociation, UserSocialAssociationProps, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, useStickyBox, UseStickyBoxProps, LiveStream, LiveStreamProps, LiveStreamSkeletonProps, LiveStreamSkeleton, LiveStreamInfoDetails, LiveStreamInfoDetailsProps, CreateLiveStreamDialog, CreateLiveStreamDialogProps, CreateLiveStreamButton, CreateLiveStreamButtonProps, LiveStreamForm, LiveStreamFormProps, LiveStreamRoom, LiveStreamRoomProps, LiveStreamVideoConference, LiveStreamVideoConferenceProps, VirtualScrollerItemProps, Widget, WidgetProps, X_SHARE };
189
+ export { AcceptRequestUserEventButton, AcceptRequestUserEventButtonProps, AccountChangeMailValidation, AccountChangeMailValidationProps, AccountDataPortability, AccountDataPortabilityButton, AccountDataPortabilityButtonProps, AccountDataPortabilityProps, AccountDelete, AccountDeleteButton, AccountDeleteButtonProps, AccountDeleteProps, AccountRecover, AccountRecoverProps, AccountReset, AccountResetProps, AccountVerify, AccountVerifyProps, AvatarGroupSkeleton, BaseDialog, BaseDialogProps, BaseItem, BaseItemProps, BaseLightbox, BaseLightboxProps, BottomNavigation, BottomNavigationProps, BroadcastMessages, BroadcastMessagesProps, BroadcastMessagesSkeleton, bytesToSize, generateRoomId, randomString, decodePassphrase, encodePassphrase, Calendar, CalendarProps, Categories, CategoriesPopularWidget, CategoriesPopularWidgetSkeleton, CategoriesProps, CategoriesSkeleton, CategoriesSkeletonProps, CategoriesSuggestionWidget, CategoriesSuggestionWidgetProps, CategoriesSuggestionWidgetSkeleton, Category, CategoryAutocomplete, CategoryAutocompleteProps, CategoryFollowButton, CategoryFollowButtonProps, CategoryFollowersButton, CategoryFollowersButtonProps, CategoryHeader, CategoryHeaderProps, CategoryHeaderSkeleton, CategoryProps, CategorySkeleton, CategoryTrendingFeedWidget, CategoryTrendingFeedWidgetProps, CategoryTrendingFeedWidgetSkeleton, CategoryTrendingPeopleWidgetSkeleton, CategoryTrendingUsersWidget, CategoryTrendingUsersWidgetProps, CentralProgress, ChangeCover, ChangeCoverProps, ChangeGroupCover, ChangeGroupCoverProps, ChangeGroupPicture, ChangeGroupPictureProps, ChangePicture, ChangePictureProps, CommentObject, CommentObjectProps, CommentObjectReply, CommentObjectReplyProps, CommentObjectSkeleton, CommentsFeedObject, CommentsFeedObjectProps, CommentsFeedObjectSkeleton, CommentsObject, CommentsObjectProps, CommentsObjectSkeleton, Composer, ComposerIconButton, ComposerIconButtonProps, ComposerProps, ConfirmDialog, ConnectionUserButton, ConsentSolution, ConsentSolutionButton, ConsentSolutionButtonProps, ConsentSolutionProps, ConsentSolutionSkeleton, ContributionUtils, CreateEventButton, CreateEventButtonProps, CreateEventWidget, CreateEventWidgetProps, CreateEventWidgetSkeleton, CreateGroupButton, EventForm, EventFormProps, EventFormDialog, EventFormDialogProps, CreateGroupButtonProps, CustomAdv, CustomAdvProps, CustomAdvSkeleton, DEFAULT_FIELDS, DEFAULT_PAGINATION_LIMIT, DEFAULT_PAGINATION_OFFSET, DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WIDGETS_NUMBER, DefaultDrawerContent, DefaultDrawerContentProps, DefaultHeaderContent, DefaultHeaderContentProps, EditEventButton, EditEventButtonProps, EditGroupButton, EditGroupButtonProps, EditMediaProps, Editor, EditorProps, EditorSkeleton, EmailTextField, Event, EventActionsMenu, EventActionsMenuProps, EventHeader, EventHeaderProps, EventHeaderSkeleton, EventInfoDetails, EventInfoDetailsProps, EventInfoWidget, EventInfoWidgetProps, EventInviteButton, EventInviteButtonProps, EventLocationWidget, EventLocationWidgetProps, EventLocationWidgetSkeleton, EventMediaWidget, EventMediaWidgetProps, EventMediaWidgetSkeleton, EventMembersWidget, EventMembersWidgetProps, EventMembersWidgetSkeleton, EventParticipantsButton, EventParticipantsButtonProps, EventProps, Events, EventSkeleton, EventSkeletonProps, EventsProps, EventsSkeleton, EventsSkeletonProps, FACEBOOK_SHARE, Feed, FeedObject, FeedObjectMediaPreview, FeedObjectMediaPreviewProps, FeedObjectProps, FeedObjectSkeleton, FeedProps, FeedRef, FeedSidebarProps, FeedSkeleton, FeedUpdatesWidget, FeedUpdatesWidgetProps, FeedUpdatesWidgetSkeleton, File, FollowUserButton, FollowUserButtonProps, Footer, FooterProps, FooterSkeleton, FriendshipButtonProps, FriendshipUserButton, GenericSkeleton, getRelativeTime, getUnseenNotification, getUnseenNotificationCounter, Group, GroupActionsMenu, GroupActionsMenuProps, GroupForm, GroupFormProps, GroupHeader, GroupHeaderProps, GroupHeaderSkeleton, GroupInfoWidget, GroupInfoWidgetProps, GroupInfoWidgetSkeleton, GroupInviteButton, GroupInviteButtonProps, GroupInvitedWidget, GroupInvitedWidgetProps, GroupInvitedWidgetSkeleton, GroupMembersButton, GroupMembersButtonProps, GroupMembersWidget, GroupMembersWidgetProps, GroupMembersWidgetSkeleton, GroupProps, GroupRequestsWidget, GroupRequestsWidgetProps, GroupRequestsWidgetSkeleton, Groups, GroupSettingsIconButton, GroupSettingsIconButtonProps, GroupSkeleton, GroupsProps, GroupsSkeleton, GroupSubscribeButton, GroupSubscribeButtonProps, HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorDetailProps, IncubatorListWidget, IncubatorListWidgetProps, IncubatorProps, IncubatorSubscribeButton, IncubatorSubscribeButtonProps, IncubatorSuggestionWidget, IncubatorSuggestionWidgetProps, InfiniteScroll, InlineComposerWidget, InlineComposerWidgetProps, InlineComposerWidgetSkeleton, InviteUserEventButton, InviteUserEventButtonProps, LanguageSwitcher, LEGAL_POLICIES, Lightbox, LightboxProps, Link, LINKEDIN_SHARE, LocationAutocomplete, LocationAutocompleteProps, LogoSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetProps, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, MediaChunkUploader, MediaChunkUploaderProps, MessageUploaderUtils, MetadataField, MetadataFieldProps, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetProps, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuDrawerProps, NavigationMenuHeader, NavigationMenuIconButton, NavigationMenuIconButtonProps, NavigationSettingsIconButton, NavigationSettingsIconButtonProps, NavigationSettingsItem, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileProps, NavigationToolbarMobileSkeleton, NavigationToolbarProps, NavigationToolbarSkeleton, Notification, NotificationProps, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetProps, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetActionType, PlatformWidgetProps, PlatformWidgetSkeleton, PollSuggestionWidget, PollSuggestionWidgetProps, PrivateMessageComponent, PrivateMessageComponentProps, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorProps, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSettingsIconButtonProps, PrivateMessageSnippetItem, PrivateMessageSnippetItemProps, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsProps, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemProps, PrivateMessageThreadItemSkeleton, PrivateMessageThreadProps, PrivateMessageThreadSkeleton, ProgressBar, ProgressBarProps, RelatedEventsWidget, RelatedEventsWidgetProps, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, RelatedFeedObjectWidgetProps, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventMembersEventType, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCFeedWidgetType, SCGroupMembersEventType, SCMediaChunkType, SCMediaObjectType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchAutocompleteProps, SearchDialog, SearchDialogProps, Share, SnippetNotifications, SnippetNotificationsProps, SnippetNotificationsSkeleton, StickyBox, StickyBoxComponent, StickyBoxProps, SuggestedEventsWidget, SuggestedEventsWidgetProps, SuggestedEventsWidgetSkeleton, TagChip, TagChipProps, ToastNotifications, ToastNotificationsProps, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserActionIconButtonProps, UserAvatar, UserAvatarProps, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetProps, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetProps, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetProps, UserConnectionsWidgetSkeleton, UserCounters, UserCountersProps, UserDeletedSnackBar, UserDeletedSnackBarProps, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetProps, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetProps, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetProps, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoDialogProps, UserInfoProps, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileBlockedProps, UserProfileEdit, UserProfileEditProps, UserProfileEditSectionAccount, UserProfileEditSectionAccountProps, UserProfileEditSectionPublicInfo, UserProfileEditSectionPublicInfoProps, UserProfileEditSectionSettings, UserProfileEditSectionSettingsProps, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderProps, UserProfileHeaderSkeleton, UserProps, UserSkeleton, UserSocialAssociation, UserSocialAssociationProps, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetProps, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetProps, UserSuggestionWidgetSkeleton, UserLiveStreamWidget, UserLiveStreamWidgetProps, UserLiveStreamWidgetSkeleton, useStickyBox, UseStickyBoxProps, LiveStream, LiveStreamProps, LiveStreamSkeletonProps, LiveStreamSkeleton, LiveStreamInfoDetails, LiveStreamInfoDetailsProps, CreateLiveStreamDialog, CreateLiveStreamDialogProps, CreateLiveStreamButton, CreateLiveStreamButtonProps, LiveStreamForm, LiveStreamFormProps, LiveStreamRoom, LiveStreamRoomProps, LiveStreamVideoConference, LiveStreamVideoConferenceProps, VirtualScrollerItemProps, Widget, WidgetProps, X_SHARE };
package/lib/esm/index.js CHANGED
@@ -124,6 +124,7 @@ import UserProfileHeader, { UserProfileHeaderSkeleton } from './components/UserP
124
124
  import UserSocialAssociation from './components/UserSocialAssociation';
125
125
  import UserSubscribedGroupsWidget, { UserSubscribedGroupsWidgetSkeleton } from './components/UserSubscribedGroupsWidget';
126
126
  import UserSuggestionWidget, { UserSuggestionWidgetSkeleton } from './components/UserSuggestionWidget';
127
+ import UserLiveStreamWidget, { UserLiveStreamWidgetSkeleton } from './components/UserLiveStreamWidget';
127
128
  import Widget from './components/Widget';
128
129
  import { MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO } from './constants/Media';
129
130
  import LiveStream, { LiveStreamSkeleton } from './components/LiveStream';
@@ -192,4 +193,4 @@ DEFAULT_PAGINATION_QUERY_PARAM_NAME, DEFAULT_PRELOAD_OFFSET_VIEWPORT, DEFAULT_WI
192
193
  /* SC UI SHARED */
193
194
  HiddenPlaceholder, Incubator, IncubatorDetail, IncubatorListWidget, IncubatorSubscribeButton, IncubatorSuggestionWidget, InfiniteScroll, InlineComposerWidget, InlineComposerWidgetSkeleton, InviteUserEventButton, LanguageSwitcher, LEGAL_POLICIES, Lightbox, Link, LINKEDIN_SHARE, LocationAutocomplete,
194
195
  /* Assets */
195
- LogoSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, MediaChunkUploader, MessageUploaderUtils, MetadataField, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuHeader, NavigationMenuIconButton, NavigationSettingsIconButton, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileSkeleton, NavigationToolbarSkeleton, Notification, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetSkeleton, PollSuggestionWidget, PrivateMessageComponent, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSnippetItem, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemSkeleton, PrivateMessageThreadSkeleton, ProgressBar, RelatedEventsWidget, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchDialog, Share, SnippetNotifications, SnippetNotificationsSkeleton, StickyBox, SuggestedEventsWidget, SuggestedEventsWidgetSkeleton, TagChip, ToastNotifications, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserAvatar, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetSkeleton, UserCounters, UserDeletedSnackBar, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileEdit, UserProfileEditSectionAccount, UserProfileEditSectionPublicInfo, UserProfileEditSectionSettings, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderSkeleton, UserSkeleton, UserSocialAssociation, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetSkeleton, useStickyBox, LiveStream, LiveStreamSkeleton, LiveStreamInfoDetails, CreateLiveStreamDialog, CreateLiveStreamButton, LiveStreamForm, LiveStreamRoom, LiveStreamVideoConference, Widget, X_SHARE };
196
+ LogoSelfCommunity, LoyaltyProgramWidget, LoyaltyProgramWidgetSkeleton, MAX_PRELOAD_OFFSET_VIEWPORT, MEDIA_EMBED_SC_LINK_TYPE, MEDIA_EMBED_SC_SHARED_EVENT, MEDIA_EMBED_SC_SHARED_OBJECT, MEDIA_TYPE_DOCUMENT, MEDIA_TYPE_EMBED, MEDIA_TYPE_EVENT, MEDIA_TYPE_IMAGE, MEDIA_TYPE_LINK, MEDIA_TYPE_SHARE, MEDIA_TYPE_URL, MEDIA_TYPE_VIDEO, MediaChunkUploader, MessageUploaderUtils, MetadataField, MIN_PRELOAD_OFFSET_VIEWPORT, MyEventsWidget, MyEventsWidgetSkeleton, NavigationMenuContent, NavigationMenuDrawer, NavigationMenuHeader, NavigationMenuIconButton, NavigationSettingsIconButton, NavigationToolbar, NavigationToolbarMobile, NavigationToolbarMobileSkeleton, NavigationToolbarSkeleton, Notification, NotificationSkeleton, OnBoardingWidget, OnBoardingWidgetSkeleton, PasswordTextField, PhoneTextField, PlatformWidget, PlatformWidgetSkeleton, PollSuggestionWidget, PrivateMessageComponent, PrivateMessageComponentSkeleton, PrivateMessageEditor, PrivateMessageEditorSkeleton, PrivateMessageSettingsIconButton, PrivateMessageSnippetItem, PrivateMessageSnippetItemSkeleton, PrivateMessageSnippets, PrivateMessageSnippetsSkeleton, PrivateMessageThread, PrivateMessageThreadItem, PrivateMessageThreadItemSkeleton, PrivateMessageThreadSkeleton, ProgressBar, RelatedEventsWidget, RelatedEventsWidgetSkeleton, RelatedFeedObjectsWidget, RelatedFeedObjectsWidgetSkeleton, ReplyComment, SCBroadcastMessageTemplateType, SCCommentsOrderBy, SCEventTemplateType, SCFeedObjectActivitiesType, SCFeedObjectTemplateType, SCNotificationObjectTemplateType, SCUserProfileFields, SCUserProfileSettings, SCUserSocialAssociations, SearchAutocomplete, SearchDialog, Share, SnippetNotifications, SnippetNotificationsSkeleton, StickyBox, SuggestedEventsWidget, SuggestedEventsWidgetSkeleton, TagChip, ToastNotifications, ToastNotificationsSkeleton, UrlTextField, User, UserActionIconButton, UserAvatar, UserConnectionsRequestsSentWidget, UserConnectionsRequestsSentWidgetSkeleton, UserConnectionsRequestsWidget, UserConnectionsRequestsWidgetSkeleton, UserConnectionsWidget, UserConnectionsWidgetSkeleton, UserCounters, UserDeletedSnackBar, UserFollowedCategoriesWidget, UserFollowedCategoriesWidgetSkeleton, UserFollowedUsersWidget, UserFollowedUsersWidgetSkeleton, UserFollowersWidget, UserFollowersWidgetSkeleton, UserInfo, UserInfoDialog, UserInfoSkeleton, UsernameTextField, UserProfileBlocked, UserProfileEdit, UserProfileEditSectionAccount, UserProfileEditSectionPublicInfo, UserProfileEditSectionSettings, UserProfileEditSkeleton, UserProfileHeader, UserProfileHeaderSkeleton, UserSkeleton, UserSocialAssociation, UserSubscribedGroupsWidget, UserSubscribedGroupsWidgetSkeleton, UserSuggestionWidget, UserSuggestionWidgetSkeleton, UserLiveStreamWidget, UserLiveStreamWidgetSkeleton, useStickyBox, LiveStream, LiveStreamSkeleton, LiveStreamInfoDetails, CreateLiveStreamDialog, CreateLiveStreamButton, LiveStreamForm, LiveStreamRoom, LiveStreamVideoConference, Widget, X_SHARE };