@selfcommunity/react-ui 0.10.5-alpha.1 → 0.10.5-alpha.11
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/assets/deafultCover.d.ts +2 -0
- package/lib/cjs/assets/deafultCover.js +3 -0
- package/lib/cjs/assets/liveStream/event.d.ts +2 -0
- package/lib/cjs/assets/liveStream/event.js +3 -0
- package/lib/cjs/assets/liveStream/live.d.ts +2 -0
- package/lib/cjs/assets/liveStream/live.js +3 -0
- package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.js +92 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +103 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +188 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.js +4 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.js +13 -0
- package/lib/cjs/components/Editor/Editor.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/cjs/components/Editor/plugins/AutoLinkPlugin.js +8 -2
- package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/cjs/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/cjs/components/EventForm/EventAddress.js +55 -8
- package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
- package/lib/cjs/components/EventForm/EventForm.js +54 -14
- package/lib/cjs/components/EventForm/types.d.ts +7 -6
- package/lib/cjs/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/cjs/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -2
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +1 -1
- package/lib/cjs/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
- package/lib/cjs/components/Feed/Feed.d.ts +2 -2
- package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
- package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -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 +55 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +192 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +80 -0
- package/lib/cjs/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/cjs/components/LiveStreamForm/constants.js +18 -0
- package/lib/cjs/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamForm/index.js +5 -0
- package/lib/cjs/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/cjs/components/LiveStreamForm/types.js +2 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +199 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +62 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +76 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +33 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +13 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +137 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +8 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +65 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +215 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +39 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +251 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +32 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +35 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +31 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +151 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +195 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +82 -0
- package/lib/cjs/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/constants.js +24 -0
- package/lib/cjs/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/cjs/components/LiveStreamRoom/types.js +8 -0
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +75 -0
- package/lib/cjs/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/cjs/components/Notification/LiveStream/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +5 -1
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/cjs/components/RelatedEventsWidget/RelatedEventsWidget.js +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.js +28 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.js +133 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.js +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.js +8 -0
- package/lib/cjs/constants/LiveStream.d.ts +3 -0
- package/lib/cjs/constants/LiveStream.js +6 -0
- package/lib/cjs/index.d.ts +12 -1
- package/lib/cjs/index.js +33 -6
- package/lib/cjs/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/cjs/shared/CopyTextArea/index.js +8 -2
- package/lib/cjs/shared/EventInfoDetails/index.js +17 -1
- package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/cjs/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/cjs/shared/LiveStreamInfoDetails/index.js +53 -0
- package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +1 -4
- package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.js +63 -0
- package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/cjs/types/composer.d.ts +1 -1
- package/lib/cjs/types/liveStream.d.ts +5 -0
- package/lib/cjs/types/liveStream.js +9 -0
- package/lib/cjs/utils/liveStream.d.ts +4 -0
- package/lib/cjs/utils/liveStream.js +25 -0
- package/lib/esm/assets/deafultCover.d.ts +2 -0
- package/lib/esm/assets/deafultCover.js +1 -0
- package/lib/esm/assets/liveStream/event.d.ts +2 -0
- package/lib/esm/assets/liveStream/event.js +1 -0
- package/lib/esm/assets/liveStream/live.d.ts +2 -0
- package/lib/esm/assets/liveStream/live.js +1 -0
- package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.js +89 -0
- package/lib/esm/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamButton/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +100 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +183 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.js +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.js +10 -0
- package/lib/esm/components/Editor/Editor.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/esm/components/Editor/plugins/AutoLinkPlugin.js +8 -2
- package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/esm/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/esm/components/EventForm/EventAddress.js +55 -8
- package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
- package/lib/esm/components/EventForm/EventForm.js +55 -15
- package/lib/esm/components/EventForm/types.d.ts +7 -6
- package/lib/esm/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/esm/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -2
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/TabContentComponent.js +1 -1
- package/lib/esm/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
- package/lib/esm/components/Feed/Feed.d.ts +2 -2
- package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
- package/lib/esm/components/FeedObject/Activities/Activities.js +1 -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 +55 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +189 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +76 -0
- package/lib/esm/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/esm/components/LiveStreamForm/constants.js +15 -0
- package/lib/esm/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamForm/index.js +2 -0
- package/lib/esm/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/esm/components/LiveStreamForm/types.js +1 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +196 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +58 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +73 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +9 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +134 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +60 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +212 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +36 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +245 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +147 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +191 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +74 -0
- package/lib/esm/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/constants.js +21 -0
- package/lib/esm/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/esm/components/LiveStreamRoom/types.js +4 -0
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +72 -0
- package/lib/esm/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/esm/components/Notification/LiveStream/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +5 -1
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/esm/components/RelatedEventsWidget/RelatedEventsWidget.js +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.js +24 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.js +130 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.js +1 -0
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/esm/components/UserLiveStreamWidget/index.js +4 -0
- package/lib/esm/constants/LiveStream.d.ts +3 -0
- package/lib/esm/constants/LiveStream.js +3 -0
- package/lib/esm/index.d.ts +12 -1
- package/lib/esm/index.js +13 -2
- package/lib/esm/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/esm/shared/CopyTextArea/index.js +8 -2
- package/lib/esm/shared/EventInfoDetails/index.js +21 -5
- package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/esm/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/esm/shared/LiveStreamInfoDetails/index.js +50 -0
- package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/Link/DisplayComponent.js +1 -4
- package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/esm/shared/StickyBox/index.d.ts +4 -4
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
- package/lib/esm/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/esm/shared/UpScalingTierBadge/index.js +60 -0
- package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/esm/types/composer.d.ts +1 -1
- package/lib/esm/types/liveStream.d.ts +5 -0
- package/lib/esm/types/liveStream.js +6 -0
- package/lib/esm/utils/liveStream.d.ts +4 -0
- package/lib/esm/utils/liveStream.js +18 -0
- package/lib/umd/653.js +2 -0
- package/lib/umd/react-ui.js +1 -19
- package/lib/umd/react-ui.js.LICENSE.txt +2 -0
- package/package.json +22 -8
- package/lib/umd/314.js +0 -2
- /package/lib/umd/{314.js.LICENSE.txt → 653.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useLivestreamCheck = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const api_services_1 = require("@selfcommunity/api-services");
|
|
6
|
+
const components_react_1 = require("@livekit/components-react");
|
|
7
|
+
const LiveStreamProvider_1 = require("./LiveStreamProvider");
|
|
8
|
+
const notistack_1 = require("notistack");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
11
|
+
const constants_1 = require("../constants");
|
|
12
|
+
const livekit_client_1 = require("livekit-client");
|
|
13
|
+
const _INITIAL_STATE = {
|
|
14
|
+
checkStarted: false,
|
|
15
|
+
timeRemaining: 60,
|
|
16
|
+
isExpiringSoonAloneInRoom: false,
|
|
17
|
+
isExpiringSoonMissingHost: false,
|
|
18
|
+
isExpiringSoonFewMinutesRemaining: false,
|
|
19
|
+
isExpiredSoonAloneInRoom: false,
|
|
20
|
+
isExpiredSoonMissingHost: false,
|
|
21
|
+
isExpiredSoonFewMinutesRemaining: false
|
|
22
|
+
};
|
|
23
|
+
const reducer = (state, action) => {
|
|
24
|
+
switch (action.type) {
|
|
25
|
+
case 'startChecking':
|
|
26
|
+
return Object.assign(Object.assign({}, _INITIAL_STATE), { checkStarted: true });
|
|
27
|
+
case 'stopChecking':
|
|
28
|
+
return Object.assign(Object.assign({}, _INITIAL_STATE), { checkStarted: false });
|
|
29
|
+
case 'reset':
|
|
30
|
+
return Object.assign({}, _INITIAL_STATE);
|
|
31
|
+
case 'isExpiringSoonAloneInRoom':
|
|
32
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonAloneInRoom: action.value });
|
|
33
|
+
case 'isExpiringSoonMissingHost':
|
|
34
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonMissingHost: action.value });
|
|
35
|
+
case 'isExpiringSoonFewMinutesRemaining':
|
|
36
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonFewMinutesRemaining: action.value });
|
|
37
|
+
case 'isExpiredAloneInRoom':
|
|
38
|
+
return Object.assign(Object.assign({}, state), { isExpiredAloneInRoom: action.value });
|
|
39
|
+
case 'isExpiredSoonMissingHost':
|
|
40
|
+
return Object.assign(Object.assign({}, state), { isExpiredSoonMissingHost: action.value });
|
|
41
|
+
case 'isExpiredSoonFewMinutesRemaining':
|
|
42
|
+
return Object.assign(Object.assign({}, state), { isExpiredSoonFewMinutesRemaining: action.value });
|
|
43
|
+
case 'timeRemaining':
|
|
44
|
+
return Object.assign(Object.assign({}, state), { timeRemaining: action.value });
|
|
45
|
+
default:
|
|
46
|
+
return Object.assign(Object.assign({}, state), { [action.type]: action.value });
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Custom hook for monitoring livestream.
|
|
51
|
+
* @param {number} warningThreshold
|
|
52
|
+
* @param showWarnings
|
|
53
|
+
* @param performDisconnect
|
|
54
|
+
*/
|
|
55
|
+
function useLivestreamCheck(warningThreshold = constants_1.WARNING_THRESHOLD_EXPIRING_SOON, showWarnings = true, performDisconnect = true) {
|
|
56
|
+
// STATE
|
|
57
|
+
const [state, dispatch] = (0, react_1.useReducer)(reducer, _INITIAL_STATE);
|
|
58
|
+
const intervalRef = (0, react_1.useRef)(null);
|
|
59
|
+
// HOOKS
|
|
60
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
61
|
+
const participants = (0, components_react_1.useParticipants)({
|
|
62
|
+
updateOnlyOn: [
|
|
63
|
+
livekit_client_1.RoomEvent.ParticipantConnected,
|
|
64
|
+
livekit_client_1.RoomEvent.ParticipantDisconnected,
|
|
65
|
+
livekit_client_1.RoomEvent.ConnectionStateChanged,
|
|
66
|
+
livekit_client_1.RoomEvent.Connected,
|
|
67
|
+
livekit_client_1.RoomEvent.Disconnected,
|
|
68
|
+
livekit_client_1.RoomEvent.TrackSubscribed,
|
|
69
|
+
livekit_client_1.RoomEvent.TrackUnsubscribed
|
|
70
|
+
]
|
|
71
|
+
});
|
|
72
|
+
const { liveStream } = (0, LiveStreamProvider_1.useLiveStream)();
|
|
73
|
+
const { buttonProps } = (0, components_react_1.useDisconnectButton)({});
|
|
74
|
+
const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
|
|
75
|
+
const __DEBUG = (0, react_1.useRef)(true);
|
|
76
|
+
// INTL
|
|
77
|
+
const intl = (0, react_intl_1.useIntl)();
|
|
78
|
+
/**
|
|
79
|
+
* fetchLivestreamStatus
|
|
80
|
+
*/
|
|
81
|
+
const fetchLivestreamStatus = () => {
|
|
82
|
+
api_services_1.LiveStreamApiClient.getMonthlyDuration()
|
|
83
|
+
.then((r) => {
|
|
84
|
+
dispatch({ type: 'timeRemaining', value: r.remaining_minutes });
|
|
85
|
+
if (r.remaining_minutes > 0 && r.remaining_minutes <= warningThreshold) {
|
|
86
|
+
if (!state.isExpiringSoonFewMinutesRemaining &&
|
|
87
|
+
!state.isExpiredSoonFewMinutesRemaining &&
|
|
88
|
+
liveStream.host.id === scUserContext.user.id &&
|
|
89
|
+
showWarnings) {
|
|
90
|
+
__DEBUG && console.log('Warning: ');
|
|
91
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.fewMinutesRemaining', defaultMessage: 'ui.liveStreamRoom.check.fewMinutesRemaining' }), {
|
|
92
|
+
variant: 'warning',
|
|
93
|
+
autoHideDuration: 30000
|
|
94
|
+
});
|
|
95
|
+
dispatch({ type: 'isExpiringSoonFewMinutesRemaining', value: true });
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
else if (r.remaining_minutes <= 0) {
|
|
99
|
+
__DEBUG && console.log('Livestream expired');
|
|
100
|
+
dispatch({ type: 'isExpiredFewMinutesRemaining', value: true });
|
|
101
|
+
}
|
|
102
|
+
else if (state.isExpiredFewMinutesRemaining) {
|
|
103
|
+
dispatch({ type: 'isExpiringSoonFewMinutesRemaining', value: false });
|
|
104
|
+
}
|
|
105
|
+
})
|
|
106
|
+
.catch((error) => {
|
|
107
|
+
console.error('Error fetching live status:', error);
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Check live
|
|
112
|
+
*/
|
|
113
|
+
const check = (0, react_1.useCallback)(() => {
|
|
114
|
+
if (__DEBUG) {
|
|
115
|
+
console.log('Checking live status');
|
|
116
|
+
console.log('Status: ', state);
|
|
117
|
+
console.log('Checking participants...', participants.length);
|
|
118
|
+
console.log(participants);
|
|
119
|
+
}
|
|
120
|
+
if (participants.length <= 1) {
|
|
121
|
+
if (!state.isExpiringSoonAloneInRoom && !state.isExpiredAloneInRoom && showWarnings) {
|
|
122
|
+
__DEBUG && console.log('Set expire soon: you are alone in the room');
|
|
123
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.youAreAloneInTheRoom', defaultMessage: 'ui.liveStreamRoom.check.youAreAloneInTheRoom' }), { variant: 'warning', autoHideDuration: 10000 });
|
|
124
|
+
state.isExpiringSoonAloneInRoom
|
|
125
|
+
? dispatch({ type: 'isExpiredAloneInRoom', value: true })
|
|
126
|
+
: dispatch({ type: 'isExpiringSoonAloneInRoom', value: true });
|
|
127
|
+
}
|
|
128
|
+
else if (performDisconnect && (state.isExpiringSoonAloneInRoom || state.isExpiredAloneInRoom)) {
|
|
129
|
+
// Leave the room
|
|
130
|
+
__DEBUG && console.log('Leave the room: no participants');
|
|
131
|
+
buttonProps.onClick();
|
|
132
|
+
}
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
else if (state.isExpiringSoonAloneInRoom) {
|
|
136
|
+
__DEBUG && console.log('Reset expire soon');
|
|
137
|
+
dispatch({ type: 'isExpiringSoonAloneInRoom', value: false });
|
|
138
|
+
}
|
|
139
|
+
__DEBUG && console.log('Checking live speaker...');
|
|
140
|
+
const speaker = participants.find((pt) => {
|
|
141
|
+
return pt.name === liveStream.host.username;
|
|
142
|
+
});
|
|
143
|
+
if (!speaker) {
|
|
144
|
+
if (!state.isExpiredSoonMissingHost && !state.isExpiringSoonMissingHost && liveStream.host.id !== scUserContext.user.id && showWarnings) {
|
|
145
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.hostMissing', defaultMessage: 'ui.liveStreamRoom.check.hostMissing' }), {
|
|
146
|
+
variant: 'warning',
|
|
147
|
+
autoHideDuration: 10000
|
|
148
|
+
});
|
|
149
|
+
state.isExpiringSoonMissingHost
|
|
150
|
+
? dispatch({ type: 'isExpiredSoonMissingHost', value: true })
|
|
151
|
+
: dispatch({ type: 'isExpiringSoonMissingHost', value: true });
|
|
152
|
+
}
|
|
153
|
+
else if (performDisconnect && (state.isExpiredSoonMissingHost || state.isExpiringSoonMissingHost)) {
|
|
154
|
+
// Leave the room
|
|
155
|
+
__DEBUG && console.log('Leave the room: no host');
|
|
156
|
+
buttonProps.onClick();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
else if (state.isExpiringSoonMissingHost) {
|
|
160
|
+
dispatch({ type: 'isExpiringSoonMissingHost', value: false });
|
|
161
|
+
}
|
|
162
|
+
__DEBUG && console.log('Checking live status resources...');
|
|
163
|
+
fetchLivestreamStatus();
|
|
164
|
+
}, [state, buttonProps, participants]);
|
|
165
|
+
/**
|
|
166
|
+
* Check live status
|
|
167
|
+
*/
|
|
168
|
+
(0, react_1.useEffect)(() => {
|
|
169
|
+
if (state.checkStarted) {
|
|
170
|
+
intervalRef.current = setInterval(check, constants_1.LIVE_CHECKING_INTERVAL * 60000);
|
|
171
|
+
}
|
|
172
|
+
return () => {
|
|
173
|
+
intervalRef.current && clearInterval(intervalRef.current);
|
|
174
|
+
};
|
|
175
|
+
}, [state, participants]);
|
|
176
|
+
/**
|
|
177
|
+
* Start the checking after a delay
|
|
178
|
+
*/
|
|
179
|
+
(0, react_1.useEffect)(() => {
|
|
180
|
+
let _timeout;
|
|
181
|
+
if (liveStream) {
|
|
182
|
+
_timeout = setTimeout(() => {
|
|
183
|
+
// Start the checking after 5 minutes
|
|
184
|
+
dispatch({ type: 'startChecking' });
|
|
185
|
+
__DEBUG && console.log('Start checking');
|
|
186
|
+
}, (liveStream.host.id === scUserContext.user.id ? constants_1.LIVE_CHECKING_INITIAL_DELAY_HOST : constants_1.LIVE_CHECKING_INITIAL_DELAY_GUEST) * 60000);
|
|
187
|
+
}
|
|
188
|
+
return () => {
|
|
189
|
+
_timeout && clearTimeout(_timeout);
|
|
190
|
+
dispatch({ type: 'stopChecking' });
|
|
191
|
+
};
|
|
192
|
+
}, [liveStream]);
|
|
193
|
+
return state;
|
|
194
|
+
}
|
|
195
|
+
exports.useLivestreamCheck = useLivestreamCheck;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare function chain(...callbacks: any[]): (...args: any[]) => void;
|
|
7
|
+
interface Props {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
}
|
|
10
|
+
type TupleTypes<T> = {
|
|
11
|
+
[P in keyof T]: T[P];
|
|
12
|
+
} extends {
|
|
13
|
+
[key: number]: infer V;
|
|
14
|
+
} ? V : never;
|
|
15
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
16
|
+
/**
|
|
17
|
+
* Merges multiple props objects together. Event handlers are chained,
|
|
18
|
+
* classNames are combined, and ids are deduplicated - different ids
|
|
19
|
+
* will trigger a side-effect and re-render components hooked up with `useId`.
|
|
20
|
+
* For all other props, the last prop object overrides all previous ones.
|
|
21
|
+
* @param args - Multiple sets of props to merge together.
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare function mergePropsReactAria<T extends Props[]>(...args: T): UnionToIntersection<TupleTypes<T>>;
|
|
25
|
+
export declare function isProp<U extends HTMLElement, T extends React.HTMLAttributes<U>>(prop: T | undefined): prop is T;
|
|
26
|
+
export declare function mergeProps<U extends HTMLElement, T extends Array<React.HTMLAttributes<U> | undefined>>(...props: T): import("react").HTMLAttributes<U>;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
4
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
6
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7
|
+
*
|
|
8
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
9
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
10
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
11
|
+
* governing permissions and limitations under the License.
|
|
12
|
+
*/
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.mergeProps = exports.isProp = exports.mergePropsReactAria = exports.chain = void 0;
|
|
15
|
+
const tslib_1 = require("tslib");
|
|
16
|
+
const clsx_1 = tslib_1.__importDefault(require("clsx"));
|
|
17
|
+
/**
|
|
18
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
function chain(...callbacks) {
|
|
22
|
+
return (...args) => {
|
|
23
|
+
for (const callback of callbacks) {
|
|
24
|
+
if (typeof callback === 'function') {
|
|
25
|
+
try {
|
|
26
|
+
callback(...args);
|
|
27
|
+
}
|
|
28
|
+
catch (e) {
|
|
29
|
+
console.error(e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
exports.chain = chain;
|
|
36
|
+
/**
|
|
37
|
+
* Merges multiple props objects together. Event handlers are chained,
|
|
38
|
+
* classNames are combined, and ids are deduplicated - different ids
|
|
39
|
+
* will trigger a side-effect and re-render components hooked up with `useId`.
|
|
40
|
+
* For all other props, the last prop object overrides all previous ones.
|
|
41
|
+
* @param args - Multiple sets of props to merge together.
|
|
42
|
+
* @internal
|
|
43
|
+
*/
|
|
44
|
+
function mergePropsReactAria(...args) {
|
|
45
|
+
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
46
|
+
// with an empty object and adding properties as we go.
|
|
47
|
+
const result = Object.assign({}, args[0]);
|
|
48
|
+
for (let i = 1; i < args.length; i++) {
|
|
49
|
+
const props = args[i];
|
|
50
|
+
for (const key in props) {
|
|
51
|
+
const a = result[key];
|
|
52
|
+
const b = props[key];
|
|
53
|
+
// Chain events
|
|
54
|
+
if (typeof a === 'function' &&
|
|
55
|
+
typeof b === 'function' &&
|
|
56
|
+
// This is a lot faster than a regex.
|
|
57
|
+
key[0] === 'o' &&
|
|
58
|
+
key[1] === 'n' &&
|
|
59
|
+
key.charCodeAt(2) >= /* 'A' */ 65 &&
|
|
60
|
+
key.charCodeAt(2) <= /* 'Z' */ 90) {
|
|
61
|
+
result[key] = chain(a, b);
|
|
62
|
+
// Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check
|
|
63
|
+
}
|
|
64
|
+
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') {
|
|
65
|
+
result[key] = (0, clsx_1.default)(a, b);
|
|
66
|
+
}
|
|
67
|
+
else {
|
|
68
|
+
result[key] = b !== undefined ? b : a;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return result;
|
|
73
|
+
}
|
|
74
|
+
exports.mergePropsReactAria = mergePropsReactAria;
|
|
75
|
+
function isProp(prop) {
|
|
76
|
+
return prop !== undefined;
|
|
77
|
+
}
|
|
78
|
+
exports.isProp = isProp;
|
|
79
|
+
function mergeProps(...props) {
|
|
80
|
+
return mergePropsReactAria(...props.filter(isProp));
|
|
81
|
+
}
|
|
82
|
+
exports.mergeProps = mergeProps;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export declare const PREFIX = "SCLiveStreamRoom";
|
|
2
|
+
export declare const defaultVideoOptions: {
|
|
3
|
+
readonly hq: true;
|
|
4
|
+
readonly codec: "vp9";
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Start the checking after a delay
|
|
8
|
+
* In minutes
|
|
9
|
+
*/
|
|
10
|
+
export declare const LIVE_CHECKING_INITIAL_DELAY_HOST = 4;
|
|
11
|
+
export declare const LIVE_CHECKING_INITIAL_DELAY_GUEST = 1;
|
|
12
|
+
/**
|
|
13
|
+
* Checking live status on VideoLiveConference
|
|
14
|
+
* In minutes
|
|
15
|
+
*/
|
|
16
|
+
export declare const LIVE_CHECKING_INTERVAL = 1;
|
|
17
|
+
/**
|
|
18
|
+
* Warning threshold expiring soon
|
|
19
|
+
* In minutes
|
|
20
|
+
*/
|
|
21
|
+
export declare const WARNING_THRESHOLD_EXPIRING_SOON = 5;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WARNING_THRESHOLD_EXPIRING_SOON = exports.LIVE_CHECKING_INTERVAL = exports.LIVE_CHECKING_INITIAL_DELAY_GUEST = exports.LIVE_CHECKING_INITIAL_DELAY_HOST = exports.defaultVideoOptions = exports.PREFIX = void 0;
|
|
4
|
+
exports.PREFIX = 'SCLiveStreamRoom';
|
|
5
|
+
exports.defaultVideoOptions = {
|
|
6
|
+
hq: true,
|
|
7
|
+
codec: 'vp9'
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Start the checking after a delay
|
|
11
|
+
* In minutes
|
|
12
|
+
*/
|
|
13
|
+
exports.LIVE_CHECKING_INITIAL_DELAY_HOST = 4;
|
|
14
|
+
exports.LIVE_CHECKING_INITIAL_DELAY_GUEST = 1;
|
|
15
|
+
/**
|
|
16
|
+
* Checking live status on VideoLiveConference
|
|
17
|
+
* In minutes
|
|
18
|
+
*/
|
|
19
|
+
exports.LIVE_CHECKING_INTERVAL = 1;
|
|
20
|
+
/**
|
|
21
|
+
* Warning threshold expiring soon
|
|
22
|
+
* In minutes
|
|
23
|
+
*/
|
|
24
|
+
exports.WARNING_THRESHOLD_EXPIRING_SOON = 5;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { LocalAudioTrack, LocalVideoTrack } from 'livekit-client';
|
|
2
|
+
import { VideoCodec } from 'livekit-client';
|
|
3
|
+
export interface SessionProps {
|
|
4
|
+
roomName: string;
|
|
5
|
+
identity: string;
|
|
6
|
+
audioTrack?: LocalAudioTrack;
|
|
7
|
+
videoTrack?: LocalVideoTrack;
|
|
8
|
+
region?: string;
|
|
9
|
+
turnServer?: RTCIceServer;
|
|
10
|
+
forceRelay?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface TokenResult {
|
|
13
|
+
identity: string;
|
|
14
|
+
accessToken: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function isVideoCodec(codec: string): codec is VideoCodec;
|
|
17
|
+
export type ConnectionDetails = {
|
|
18
|
+
serverUrl: string;
|
|
19
|
+
roomName: string;
|
|
20
|
+
participantName: string;
|
|
21
|
+
participantToken: string;
|
|
22
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isVideoCodec = void 0;
|
|
4
|
+
const livekit_client_1 = require("livekit-client");
|
|
5
|
+
function isVideoCodec(codec) {
|
|
6
|
+
return livekit_client_1.videoCodecs.includes(codec);
|
|
7
|
+
}
|
|
8
|
+
exports.isVideoCodec = isVideoCodec;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
|
2
2
|
export declare const PREFIX = "SCDefaultDrawerSkeleton";
|
|
3
|
-
export
|
|
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,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DrawerProps } from '@mui/material';
|
|
3
|
+
import { CreateLiveStreamButtonProps } from '../CreateLiveStreamButton';
|
|
3
4
|
export interface NavigationMenuDrawerProps extends DrawerProps {
|
|
4
5
|
/**
|
|
5
6
|
* Hide drawer header
|
|
@@ -16,6 +17,16 @@ export interface NavigationMenuDrawerProps extends DrawerProps {
|
|
|
16
17
|
* @default null
|
|
17
18
|
*/
|
|
18
19
|
drawerContent?: React.ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Hide drawer footer
|
|
22
|
+
* @default true
|
|
23
|
+
*/
|
|
24
|
+
showDrawerFooter?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Custom Drawer footer content
|
|
27
|
+
* @default null
|
|
28
|
+
*/
|
|
29
|
+
drawerFooterContent?: React.ReactNode;
|
|
19
30
|
/**
|
|
20
31
|
* Props to spread to ScrollContainer component
|
|
21
32
|
* This lib use 'react-custom-scrollbars' component to perform scrollbars
|
|
@@ -23,6 +34,11 @@ export interface NavigationMenuDrawerProps extends DrawerProps {
|
|
|
23
34
|
* @default {}
|
|
24
35
|
*/
|
|
25
36
|
ScrollContainerProps?: Record<string, any>;
|
|
37
|
+
/**
|
|
38
|
+
* Props to spread to CreateLiveStreamButton component
|
|
39
|
+
* @default {}
|
|
40
|
+
*/
|
|
41
|
+
CreateLiveStreamButtonComponentProps?: CreateLiveStreamButtonProps;
|
|
26
42
|
/**
|
|
27
43
|
* Any other properties
|
|
28
44
|
*/
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
5
6
|
const styles_1 = require("@mui/material/styles");
|
|
6
7
|
const material_1 = require("@mui/material");
|
|
7
8
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
@@ -9,6 +10,8 @@ const system_1 = require("@mui/system");
|
|
|
9
10
|
const ScrollContainer_1 = tslib_1.__importDefault(require("../../shared/ScrollContainer"));
|
|
10
11
|
const DefaultDrawerContent_1 = tslib_1.__importDefault(require("./DefaultDrawerContent"));
|
|
11
12
|
const DefaultHeaderContent_1 = tslib_1.__importDefault(require("./DefaultHeaderContent"));
|
|
13
|
+
const CreateLiveStreamButton_1 = tslib_1.__importDefault(require("../CreateLiveStreamButton"));
|
|
14
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
12
15
|
const PREFIX = 'SCNavigationMenuDrawer';
|
|
13
16
|
const classes = {
|
|
14
17
|
root: `${PREFIX}-root`,
|
|
@@ -16,7 +19,10 @@ const classes = {
|
|
|
16
19
|
drawerRoot: `${PREFIX}-drawer-root`,
|
|
17
20
|
drawerHeader: `${PREFIX}-drawer-header`,
|
|
18
21
|
drawerHeaderAction: `${PREFIX}-drawer-header-action`,
|
|
19
|
-
drawerContent: `${PREFIX}-drawer-content
|
|
22
|
+
drawerContent: `${PREFIX}-drawer-content`,
|
|
23
|
+
drawerFooter: `${PREFIX}-drawer-footer`,
|
|
24
|
+
drawerFooterLiveStream: `${PREFIX}-drawer-footer-live`,
|
|
25
|
+
drawerFooterLiveStreamButton: `${PREFIX}-drawer-footer-live-button`
|
|
20
26
|
};
|
|
21
27
|
const Root = (0, styles_1.styled)(material_1.Drawer, {
|
|
22
28
|
name: PREFIX,
|
|
@@ -24,12 +30,15 @@ const Root = (0, styles_1.styled)(material_1.Drawer, {
|
|
|
24
30
|
overridesResolver: (props, styles) => styles.root
|
|
25
31
|
})(({ theme }) => ({}));
|
|
26
32
|
function NavigationMenuDrawer(inProps) {
|
|
33
|
+
var _a;
|
|
27
34
|
// PROPS
|
|
28
35
|
const props = (0, system_1.useThemeProps)({
|
|
29
36
|
props: inProps,
|
|
30
37
|
name: PREFIX
|
|
31
38
|
});
|
|
32
|
-
const { className = null, showDrawerHeader = true, drawerHeaderContent = (0, jsx_runtime_1.jsx)(DefaultHeaderContent_1.default, {}), drawerContent = (0, jsx_runtime_1.jsx)(DefaultDrawerContent_1.default, {}), ScrollContainerProps = {}, open, onClose } = props, rest = tslib_1.__rest(props, ["className", "showDrawerHeader", "drawerHeaderContent", "drawerContent", "ScrollContainerProps", "open", "onClose"]);
|
|
33
|
-
|
|
39
|
+
const { className = null, showDrawerHeader = true, drawerHeaderContent = (0, jsx_runtime_1.jsx)(DefaultHeaderContent_1.default, {}), drawerContent = (0, jsx_runtime_1.jsx)(DefaultDrawerContent_1.default, {}), showDrawerFooterContent = true, drawerFooterContent = null, ScrollContainerProps = {}, CreateLiveStreamButtonComponentProps = {}, open, onClose } = props, rest = tslib_1.__rest(props, ["className", "showDrawerHeader", "drawerHeaderContent", "drawerContent", "showDrawerFooterContent", "drawerFooterContent", "ScrollContainerProps", "CreateLiveStreamButtonComponentProps", "open", "onClose"]);
|
|
40
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
41
|
+
const canCreateLiveStream = (0, react_1.useMemo)(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_livestream; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ anchor: "left", className: (0, classnames_1.default)(classes.root, className), open: open, onClose: onClose }, rest, { children: [showDrawerHeader && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.drawerHeader }, { children: [drawerHeaderContent, (0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ className: classes.drawerHeaderAction, onClick: onClose }, { children: (0, jsx_runtime_1.jsx)(material_1.Icon, { children: "close" }) }))] })), (0, jsx_runtime_1.jsx)(material_1.Divider, {})] })), (0, jsx_runtime_1.jsx)(ScrollContainer_1.default, Object.assign({}, ScrollContainerProps, { children: (0, jsx_runtime_1.jsx)(material_1.List, Object.assign({ className: classes.drawerContent, onClick: onClose }, { children: drawerContent })) })), showDrawerFooterContent && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.drawerFooter }, { children: drawerFooterContent ? (drawerFooterContent) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [canCreateLiveStream && (0, jsx_runtime_1.jsx)(material_1.Divider, {}), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.drawerFooterLiveStream }, { children: (0, jsx_runtime_1.jsx)(CreateLiveStreamButton_1.default, Object.assign({ color: "primary", className: classes.drawerFooterLiveStreamButton, fullWidth: true }, CreateLiveStreamButtonComponentProps)) }))] })) })) }))] })));
|
|
34
43
|
}
|
|
35
44
|
exports.default = NavigationMenuDrawer;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SCNotificationLiveStreamActivityType } from '@selfcommunity/types';
|
|
2
|
+
import { NotificationItemProps } from '../../../shared/NotificationItem';
|
|
3
|
+
export interface NotificationLiveStreamProps extends Pick<NotificationItemProps, Exclude<keyof NotificationItemProps, 'image' | 'disableTypography' | 'primary' | 'primaryTypographyProps' | 'secondary' | 'secondaryTypographyProps' | 'actions' | 'footer' | 'isNew'>> {
|
|
4
|
+
/**
|
|
5
|
+
* Notification obj
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
notificationObject: SCNotificationLiveStreamActivityType;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This component render the content of the notification of type live stream
|
|
12
|
+
* @constructor
|
|
13
|
+
* @param props
|
|
14
|
+
*/
|
|
15
|
+
export default function LiveStreamNotification(props: NotificationLiveStreamProps): JSX.Element;
|
|
@@ -0,0 +1,75 @@
|
|
|
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 react_1 = require("react");
|
|
6
|
+
const styles_1 = require("@mui/material/styles");
|
|
7
|
+
const material_1 = require("@mui/material");
|
|
8
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
|
+
const react_intl_1 = require("react-intl");
|
|
10
|
+
const DateTimeAgo_1 = tslib_1.__importDefault(require("../../../shared/DateTimeAgo"));
|
|
11
|
+
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
|
+
const types_1 = require("../../../types");
|
|
13
|
+
const NotificationItem_1 = tslib_1.__importDefault(require("../../../shared/NotificationItem"));
|
|
14
|
+
const lab_1 = require("@mui/lab");
|
|
15
|
+
const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../../shared/UserDeletedSnackBar"));
|
|
16
|
+
const UserAvatar_1 = tslib_1.__importDefault(require("../../../shared/UserAvatar"));
|
|
17
|
+
const constants_1 = require("../constants");
|
|
18
|
+
const LiveStream_1 = tslib_1.__importDefault(require("../../LiveStream"));
|
|
19
|
+
const classes = {
|
|
20
|
+
root: `${constants_1.PREFIX}-live-root`,
|
|
21
|
+
avatar: `${constants_1.PREFIX}-avatar`,
|
|
22
|
+
actions: `${constants_1.PREFIX}-actions`,
|
|
23
|
+
seeButton: `${constants_1.PREFIX}see-button`,
|
|
24
|
+
activeAt: `${constants_1.PREFIX}-active-at`,
|
|
25
|
+
snippetTime: `${constants_1.PREFIX}-snippet-time`,
|
|
26
|
+
username: `${constants_1.PREFIX}-username`
|
|
27
|
+
};
|
|
28
|
+
const Root = (0, styles_1.styled)(NotificationItem_1.default, {
|
|
29
|
+
name: constants_1.PREFIX,
|
|
30
|
+
slot: 'LiveStreamRoot'
|
|
31
|
+
})(() => ({}));
|
|
32
|
+
/**
|
|
33
|
+
* This component render the content of the notification of type live stream
|
|
34
|
+
* @constructor
|
|
35
|
+
* @param props
|
|
36
|
+
*/
|
|
37
|
+
function LiveStreamNotification(props) {
|
|
38
|
+
// PROPS
|
|
39
|
+
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = types_1.SCNotificationObjectTemplateType.DETAIL } = props, rest = tslib_1.__rest(props, ["notificationObject", "id", "className", "template"]);
|
|
40
|
+
// CONTEXT
|
|
41
|
+
const scRoutingContext = (0, react_core_1.useSCRouting)();
|
|
42
|
+
// STATE
|
|
43
|
+
const [openAlert, setOpenAlert] = (0, react_1.useState)(false);
|
|
44
|
+
// CONST
|
|
45
|
+
const isSnippetTemplate = template === types_1.SCNotificationObjectTemplateType.SNIPPET;
|
|
46
|
+
const isToastTemplate = template === types_1.SCNotificationObjectTemplateType.TOAST;
|
|
47
|
+
const inProgress = Boolean(!notificationObject.live_stream.closed_at_by_host &&
|
|
48
|
+
notificationObject.live_stream.last_started_at &&
|
|
49
|
+
!notificationObject.live_stream.last_finished_at);
|
|
50
|
+
// RENDER
|
|
51
|
+
if (isSnippetTemplate) {
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
53
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
54
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar, classes: { root: classes.avatar } }) })) })), primary: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
55
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
56
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
|
|
57
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
icon: (...chunks) => (0, jsx_runtime_1.jsx)(material_1.Icon, { children: chunks }),
|
|
60
|
+
live: notificationObject.live_stream.title,
|
|
61
|
+
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
62
|
+
} })] }), footer: isToastTemplate ? ((0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "primary" }, { children: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) })) }))] }))) : ((0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.snippetTime })) }, rest)));
|
|
63
|
+
}
|
|
64
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Root, Object.assign({ id: id, className: (0, classnames_1.default)(classes.root, className, `${constants_1.PREFIX}-${template}`), template: template, isNew: notificationObject.is_new, disableTypography: true, image: (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
65
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
66
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: (0, jsx_runtime_1.jsx)(UserAvatar_1.default, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: (0, jsx_runtime_1.jsx)(material_1.Avatar, { className: classes.avatar, alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar }) })) })), primary: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
67
|
+
to: scRoutingContext.url(react_core_1.SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
68
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
69
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
live: notificationObject.live_stream.title,
|
|
72
|
+
link: (...chunks) => (0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
73
|
+
} }), (0, jsx_runtime_1.jsx)(LiveStream_1.default, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), elevation: 0 })] }), actions: (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center", spacing: 2 }, { children: [(0, jsx_runtime_1.jsx)(DateTimeAgo_1.default, { date: notificationObject.active_at, className: classes.activeAt }), (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ color: 'primary', variant: "outlined", size: "small", classes: { root: classes.seeButton }, component: react_core_1.Link, disabled: Boolean(notificationObject.live_stream.closed_at_by_host), to: scRoutingContext.url(react_core_1.SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.notification.live_stream_started.join", defaultMessage: "ui.notification.live_stream_started.join" }) }))] })) }, rest)), openAlert && (0, jsx_runtime_1.jsx)(UserDeletedSnackBar_1.default, { open: openAlert, handleClose: () => setOpenAlert(false) })] }));
|
|
74
|
+
}
|
|
75
|
+
exports.default = LiveStreamNotification;
|
|
@@ -18,6 +18,8 @@ const KindlyNoticeFor_1 = tslib_1.__importDefault(require("./KindlyNoticeFor"));
|
|
|
18
18
|
const react_intl_1 = require("react-intl");
|
|
19
19
|
const KindlyNoticeFlag_1 = tslib_1.__importDefault(require("./KindlyNoticeFlag"));
|
|
20
20
|
const VoteUp_1 = tslib_1.__importDefault(require("./VoteUp"));
|
|
21
|
+
const Event_1 = tslib_1.__importDefault(require("./Event/Event"));
|
|
22
|
+
const LiveStream_1 = tslib_1.__importDefault(require("./LiveStream/LiveStream"));
|
|
21
23
|
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
22
24
|
const Errors_1 = require("../../constants/Errors");
|
|
23
25
|
const contribution_1 = require("../../utils/contribution");
|
|
@@ -37,7 +39,6 @@ const UserDeletedSnackBar_1 = tslib_1.__importDefault(require("../../shared/User
|
|
|
37
39
|
const UserAvatar_1 = tslib_1.__importDefault(require("../../shared/UserAvatar"));
|
|
38
40
|
const constants_1 = require("./constants");
|
|
39
41
|
const Group_1 = tslib_1.__importDefault(require("./Group"));
|
|
40
|
-
const Event_1 = tslib_1.__importDefault(require("./Event/Event"));
|
|
41
42
|
const messages = (0, react_intl_1.defineMessages)({
|
|
42
43
|
receivePrivateMessage: {
|
|
43
44
|
id: 'ui.notification.receivePrivateMessage',
|
|
@@ -308,6 +309,9 @@ function UserNotification(inProps) {
|
|
|
308
309
|
n.type === types_1.SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
309
310
|
return (0, jsx_runtime_1.jsx)(Event_1.default, { notificationObject: n }, i);
|
|
310
311
|
}
|
|
312
|
+
else if (n.type === types_1.SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
313
|
+
return (0, jsx_runtime_1.jsx)(LiveStream_1.default, { notificationObject: n }, i);
|
|
314
|
+
}
|
|
311
315
|
return null;
|
|
312
316
|
}
|
|
313
317
|
/**
|