@selfcommunity/react-ui 0.8.0-live.54 → 0.8.0-live.56
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.
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +0 -5
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.js +2 -16
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +0 -2
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +13 -31
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +10 -2
- package/lib/cjs/components/EventForm/EventAddress.d.ts +2 -1
- package/lib/cjs/components/EventForm/EventAddress.js +23 -3
- package/lib/cjs/components/EventForm/EventForm.js +8 -1
- package/lib/cjs/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/cjs/components/LiveStream/LiveStream.js +143 -0
- package/lib/cjs/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/cjs/components/LiveStream/Skeleton.js +92 -0
- package/lib/cjs/components/LiveStream/constants.d.ts +1 -0
- package/lib/cjs/components/LiveStream/constants.js +4 -0
- package/lib/cjs/components/LiveStream/index.d.ts +4 -0
- package/lib/cjs/components/LiveStream/index.js +8 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.d.ts +1 -1
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +33 -38
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.d.ts +46 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +61 -0
- package/lib/cjs/components/LiveStreamForm/constants.d.ts +7 -0
- package/lib/cjs/components/LiveStreamForm/constants.js +8 -1
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.d.ts +3 -2
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +24 -38
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +7 -2
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +4 -4
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +39 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +112 -0
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +2 -16
- package/lib/cjs/index.d.ts +3 -1
- package/lib/cjs/index.js +6 -1
- package/lib/cjs/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/cjs/shared/LiveStreamInfoDetails/index.js +45 -0
- package/lib/cjs/types/liveStream.d.ts +5 -0
- package/lib/cjs/types/liveStream.js +9 -0
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +0 -5
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.js +3 -17
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +0 -2
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +10 -28
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +10 -2
- package/lib/esm/components/EventForm/EventAddress.d.ts +2 -1
- package/lib/esm/components/EventForm/EventAddress.js +23 -3
- package/lib/esm/components/EventForm/EventForm.js +8 -1
- package/lib/esm/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/esm/components/LiveStream/LiveStream.js +140 -0
- package/lib/esm/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/esm/components/LiveStream/Skeleton.js +89 -0
- package/lib/esm/components/LiveStream/constants.d.ts +1 -0
- package/lib/esm/components/LiveStream/constants.js +1 -0
- package/lib/esm/components/LiveStream/index.d.ts +4 -0
- package/lib/esm/components/LiveStream/index.js +4 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.d.ts +1 -1
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +33 -38
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.d.ts +46 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +57 -0
- package/lib/esm/components/LiveStreamForm/constants.d.ts +7 -0
- package/lib/esm/components/LiveStreamForm/constants.js +7 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.d.ts +3 -2
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +26 -40
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +7 -2
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +5 -5
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +39 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +108 -0
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +3 -17
- package/lib/esm/index.d.ts +3 -1
- package/lib/esm/index.js +3 -1
- package/lib/esm/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/esm/shared/LiveStreamInfoDetails/index.js +42 -0
- package/lib/esm/types/liveStream.d.ts +5 -0
- package/lib/esm/types/liveStream.js +6 -0
- package/lib/umd/react-ui.js +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box, Icon, Stack, styled, Tooltip, Typography, useThemeProps } from '@mui/material';
|
|
3
|
+
import { Link, SCRoutes, useSCFetchLiveStream, useSCRouting } from '@selfcommunity/react-core';
|
|
4
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
5
|
+
const PREFIX = 'SCLiveStreamInfoDetails';
|
|
6
|
+
const classes = {
|
|
7
|
+
root: `${PREFIX}-root`,
|
|
8
|
+
iconTextWrapper: `${PREFIX}-icon-text-wrapper`,
|
|
9
|
+
inProgress: `${PREFIX}-in-progress`,
|
|
10
|
+
link: `${PREFIX}-link`,
|
|
11
|
+
url: `${PREFIX}-url`,
|
|
12
|
+
creationWrapper: `${PREFIX}-creation-wrapper`
|
|
13
|
+
};
|
|
14
|
+
const Root = styled(Stack, {
|
|
15
|
+
name: PREFIX,
|
|
16
|
+
slot: 'Root',
|
|
17
|
+
overridesResolver: (_props, styles) => styles.root
|
|
18
|
+
})(() => ({}));
|
|
19
|
+
export default function LiveStreamInfoDetails(inProps) {
|
|
20
|
+
// PROPS
|
|
21
|
+
const props = useThemeProps({
|
|
22
|
+
props: inProps,
|
|
23
|
+
name: PREFIX
|
|
24
|
+
});
|
|
25
|
+
const { liveStream, liveStreamId, hideDateIcon = false, hideLocationIcon = false, hideCreatedIcon = false, hasDateInfo = true, hasLocationInfo = true, hasCreatedInfo = false, hasInProgress = false, beforeDateInfo, beforeLocationInfo, beforeCreatedInfo } = props;
|
|
26
|
+
// CONTEXT
|
|
27
|
+
const scRoutingContext = useSCRouting();
|
|
28
|
+
// HOOKS
|
|
29
|
+
const intl = useIntl();
|
|
30
|
+
const { scLiveStream } = useSCFetchLiveStream({ id: liveStreamId, liveStream });
|
|
31
|
+
if (!scLiveStream) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
return (_jsxs(Root, Object.assign({ className: classes.root }, { children: [beforeDateInfo, hasDateInfo && (_jsxs(Stack, Object.assign({ className: classes.iconTextWrapper }, { children: [!hideDateIcon && _jsx(Icon, Object.assign({ fontSize: "small" }, { children: scLiveStream.closed_at ? 'calendar_off' : 'CalendarIcon' })), hasInProgress && scLiveStream.running && (_jsx(Tooltip, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.eventInfoDetails.inProgress", defaultMessage: "ui.eventInfoDetails.inProgress" }) }, { children: _jsx(Box, { className: classes.inProgress }) })))] }))), beforeLocationInfo, hasLocationInfo && (_jsxs(Stack, Object.assign({ className: classes.iconTextWrapper }, { children: [!hideLocationIcon && _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "play_circle_outline" })), _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream), target: "_blank", className: classes.link }, { children: _jsx(Typography, Object.assign({ variant: "body1", className: classes.url }, { children: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream) })) }))] }))), beforeCreatedInfo, hasCreatedInfo && (_jsxs(Stack, Object.assign({ className: classes.creationWrapper }, { children: [!hideCreatedIcon && _jsx(Icon, Object.assign({ fontSize: "small" }, { children: "create" })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.eventInfoDetails.date.create", defaultMessage: "ui.eventInfoDetails.date.create", values: {
|
|
35
|
+
date: intl.formatDate(scLiveStream.created_at, {
|
|
36
|
+
weekday: 'long',
|
|
37
|
+
day: 'numeric',
|
|
38
|
+
year: 'numeric',
|
|
39
|
+
month: 'long'
|
|
40
|
+
})
|
|
41
|
+
} }) }))] })))] })));
|
|
42
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var SCLiveStreamTemplateType;
|
|
2
|
+
(function (SCLiveStreamTemplateType) {
|
|
3
|
+
SCLiveStreamTemplateType["DETAIL"] = "detail";
|
|
4
|
+
SCLiveStreamTemplateType["SNIPPET"] = "snippet";
|
|
5
|
+
SCLiveStreamTemplateType["PREVIEW"] = "preview";
|
|
6
|
+
})(SCLiveStreamTemplateType || (SCLiveStreamTemplateType = {}));
|