@selfcommunity/react-ui 0.10.5-alpha.2 → 0.10.5-alpha.3
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 +91 -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/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 +54 -8
- package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
- package/lib/cjs/components/EventForm/EventForm.js +51 -13
- 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/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/types.d.ts +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/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 +75 -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/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 +10 -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/asUploadButton.d.ts +1 -1
- 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 +88 -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/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 +54 -8
- package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
- package/lib/esm/components/EventForm/EventForm.js +51 -13
- 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/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/types.d.ts +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/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 +71 -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/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 +13 -4
- 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/asUploadButton.d.ts +1 -1
- 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,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for monitoring livestream.
|
|
3
|
+
* @param {number} warningThreshold
|
|
4
|
+
* @param showWarnings
|
|
5
|
+
* @param performDisconnect
|
|
6
|
+
*/
|
|
7
|
+
export declare function useLivestreamCheck(warningThreshold?: number, showWarnings?: boolean, performDisconnect?: boolean): any;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { useCallback, useEffect, useReducer, useRef } from 'react';
|
|
2
|
+
import { LiveStreamApiClient } from '@selfcommunity/api-services';
|
|
3
|
+
import { useDisconnectButton, useParticipants } from '@livekit/components-react';
|
|
4
|
+
import { useLiveStream } from './LiveStreamProvider';
|
|
5
|
+
import { useSnackbar } from 'notistack';
|
|
6
|
+
import { useIntl } from 'react-intl';
|
|
7
|
+
import { useSCUser } from '@selfcommunity/react-core';
|
|
8
|
+
import { LIVE_CHECKING_INITIAL_DELAY_GUEST, LIVE_CHECKING_INITIAL_DELAY_HOST, LIVE_CHECKING_INTERVAL, WARNING_THRESHOLD_EXPIRING_SOON } from '../constants';
|
|
9
|
+
import { RoomEvent } from 'livekit-client';
|
|
10
|
+
const _INITIAL_STATE = {
|
|
11
|
+
checkStarted: false,
|
|
12
|
+
timeRemaining: 60,
|
|
13
|
+
isExpiringSoonAloneInRoom: false,
|
|
14
|
+
isExpiringSoonMissingHost: false,
|
|
15
|
+
isExpiringSoonFewMinutesRemaining: false,
|
|
16
|
+
isExpiredSoonAloneInRoom: false,
|
|
17
|
+
isExpiredSoonMissingHost: false,
|
|
18
|
+
isExpiredSoonFewMinutesRemaining: false
|
|
19
|
+
};
|
|
20
|
+
const reducer = (state, action) => {
|
|
21
|
+
switch (action.type) {
|
|
22
|
+
case 'startChecking':
|
|
23
|
+
return Object.assign(Object.assign({}, _INITIAL_STATE), { checkStarted: true });
|
|
24
|
+
case 'stopChecking':
|
|
25
|
+
return Object.assign(Object.assign({}, _INITIAL_STATE), { checkStarted: false });
|
|
26
|
+
case 'reset':
|
|
27
|
+
return Object.assign({}, _INITIAL_STATE);
|
|
28
|
+
case 'isExpiringSoonAloneInRoom':
|
|
29
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonAloneInRoom: action.value });
|
|
30
|
+
case 'isExpiringSoonMissingHost':
|
|
31
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonMissingHost: action.value });
|
|
32
|
+
case 'isExpiringSoonFewMinutesRemaining':
|
|
33
|
+
return Object.assign(Object.assign({}, state), { isExpiringSoonFewMinutesRemaining: action.value });
|
|
34
|
+
case 'isExpiredAloneInRoom':
|
|
35
|
+
return Object.assign(Object.assign({}, state), { isExpiredAloneInRoom: action.value });
|
|
36
|
+
case 'isExpiredSoonMissingHost':
|
|
37
|
+
return Object.assign(Object.assign({}, state), { isExpiredSoonMissingHost: action.value });
|
|
38
|
+
case 'isExpiredSoonFewMinutesRemaining':
|
|
39
|
+
return Object.assign(Object.assign({}, state), { isExpiredSoonFewMinutesRemaining: action.value });
|
|
40
|
+
case 'timeRemaining':
|
|
41
|
+
return Object.assign(Object.assign({}, state), { timeRemaining: action.value });
|
|
42
|
+
default:
|
|
43
|
+
return Object.assign(Object.assign({}, state), { [action.type]: action.value });
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Custom hook for monitoring livestream.
|
|
48
|
+
* @param {number} warningThreshold
|
|
49
|
+
* @param showWarnings
|
|
50
|
+
* @param performDisconnect
|
|
51
|
+
*/
|
|
52
|
+
export function useLivestreamCheck(warningThreshold = WARNING_THRESHOLD_EXPIRING_SOON, showWarnings = true, performDisconnect = true) {
|
|
53
|
+
// STATE
|
|
54
|
+
const [state, dispatch] = useReducer(reducer, _INITIAL_STATE);
|
|
55
|
+
const intervalRef = useRef(null);
|
|
56
|
+
// HOOKS
|
|
57
|
+
const scUserContext = useSCUser();
|
|
58
|
+
const participants = useParticipants({
|
|
59
|
+
updateOnlyOn: [
|
|
60
|
+
RoomEvent.ParticipantConnected,
|
|
61
|
+
RoomEvent.ParticipantDisconnected,
|
|
62
|
+
RoomEvent.ConnectionStateChanged,
|
|
63
|
+
RoomEvent.Connected,
|
|
64
|
+
RoomEvent.Disconnected,
|
|
65
|
+
RoomEvent.TrackSubscribed,
|
|
66
|
+
RoomEvent.TrackUnsubscribed
|
|
67
|
+
]
|
|
68
|
+
});
|
|
69
|
+
const { liveStream } = useLiveStream();
|
|
70
|
+
const { buttonProps } = useDisconnectButton({});
|
|
71
|
+
const { enqueueSnackbar } = useSnackbar();
|
|
72
|
+
const __DEBUG = useRef(true);
|
|
73
|
+
// INTL
|
|
74
|
+
const intl = useIntl();
|
|
75
|
+
/**
|
|
76
|
+
* fetchLivestreamStatus
|
|
77
|
+
*/
|
|
78
|
+
const fetchLivestreamStatus = () => {
|
|
79
|
+
LiveStreamApiClient.getMonthlyDuration()
|
|
80
|
+
.then((r) => {
|
|
81
|
+
dispatch({ type: 'timeRemaining', value: r.remaining_minutes });
|
|
82
|
+
if (r.remaining_minutes > 0 && r.remaining_minutes <= warningThreshold) {
|
|
83
|
+
if (!state.isExpiringSoonFewMinutesRemaining &&
|
|
84
|
+
!state.isExpiredSoonFewMinutesRemaining &&
|
|
85
|
+
liveStream.host.id === scUserContext.user.id &&
|
|
86
|
+
showWarnings) {
|
|
87
|
+
__DEBUG && console.log('Warning: ');
|
|
88
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.fewMinutesRemaining', defaultMessage: 'ui.liveStreamRoom.check.fewMinutesRemaining' }), {
|
|
89
|
+
variant: 'warning',
|
|
90
|
+
autoHideDuration: 30000
|
|
91
|
+
});
|
|
92
|
+
dispatch({ type: 'isExpiringSoonFewMinutesRemaining', value: true });
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else if (r.remaining_minutes <= 0) {
|
|
96
|
+
__DEBUG && console.log('Livestream expired');
|
|
97
|
+
dispatch({ type: 'isExpiredFewMinutesRemaining', value: true });
|
|
98
|
+
}
|
|
99
|
+
else if (state.isExpiredFewMinutesRemaining) {
|
|
100
|
+
dispatch({ type: 'isExpiringSoonFewMinutesRemaining', value: false });
|
|
101
|
+
}
|
|
102
|
+
})
|
|
103
|
+
.catch((error) => {
|
|
104
|
+
console.error('Error fetching live status:', error);
|
|
105
|
+
});
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Check live
|
|
109
|
+
*/
|
|
110
|
+
const check = useCallback(() => {
|
|
111
|
+
if (__DEBUG) {
|
|
112
|
+
console.log('Checking live status');
|
|
113
|
+
console.log('Status: ', state);
|
|
114
|
+
console.log('Checking participants...', participants.length);
|
|
115
|
+
console.log(participants);
|
|
116
|
+
}
|
|
117
|
+
if (participants.length <= 1) {
|
|
118
|
+
if (!state.isExpiringSoonAloneInRoom && !state.isExpiredAloneInRoom && showWarnings) {
|
|
119
|
+
__DEBUG && console.log('Set expire soon: you are alone in the room');
|
|
120
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.youAreAloneInTheRoom', defaultMessage: 'ui.liveStreamRoom.check.youAreAloneInTheRoom' }), { variant: 'warning', autoHideDuration: 10000 });
|
|
121
|
+
state.isExpiringSoonAloneInRoom
|
|
122
|
+
? dispatch({ type: 'isExpiredAloneInRoom', value: true })
|
|
123
|
+
: dispatch({ type: 'isExpiringSoonAloneInRoom', value: true });
|
|
124
|
+
}
|
|
125
|
+
else if (performDisconnect && (state.isExpiringSoonAloneInRoom || state.isExpiredAloneInRoom)) {
|
|
126
|
+
// Leave the room
|
|
127
|
+
__DEBUG && console.log('Leave the room: no participants');
|
|
128
|
+
buttonProps.onClick();
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
else if (state.isExpiringSoonAloneInRoom) {
|
|
133
|
+
__DEBUG && console.log('Reset expire soon');
|
|
134
|
+
dispatch({ type: 'isExpiringSoonAloneInRoom', value: false });
|
|
135
|
+
}
|
|
136
|
+
__DEBUG && console.log('Checking live speaker...');
|
|
137
|
+
const speaker = participants.find((pt) => {
|
|
138
|
+
return pt.name === liveStream.host.username;
|
|
139
|
+
});
|
|
140
|
+
if (!speaker) {
|
|
141
|
+
if (!state.isExpiredSoonMissingHost && !state.isExpiringSoonMissingHost && liveStream.host.id !== scUserContext.user.id && showWarnings) {
|
|
142
|
+
enqueueSnackbar(intl.formatMessage({ id: 'ui.liveStreamRoom.check.hostMissing', defaultMessage: 'ui.liveStreamRoom.check.hostMissing' }), {
|
|
143
|
+
variant: 'warning',
|
|
144
|
+
autoHideDuration: 10000
|
|
145
|
+
});
|
|
146
|
+
state.isExpiringSoonMissingHost
|
|
147
|
+
? dispatch({ type: 'isExpiredSoonMissingHost', value: true })
|
|
148
|
+
: dispatch({ type: 'isExpiringSoonMissingHost', value: true });
|
|
149
|
+
}
|
|
150
|
+
else if (performDisconnect && (state.isExpiredSoonMissingHost || state.isExpiringSoonMissingHost)) {
|
|
151
|
+
// Leave the room
|
|
152
|
+
__DEBUG && console.log('Leave the room: no host');
|
|
153
|
+
buttonProps.onClick();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
else if (state.isExpiringSoonMissingHost) {
|
|
157
|
+
dispatch({ type: 'isExpiringSoonMissingHost', value: false });
|
|
158
|
+
}
|
|
159
|
+
__DEBUG && console.log('Checking live status resources...');
|
|
160
|
+
fetchLivestreamStatus();
|
|
161
|
+
}, [state, buttonProps, participants]);
|
|
162
|
+
/**
|
|
163
|
+
* Check live status
|
|
164
|
+
*/
|
|
165
|
+
useEffect(() => {
|
|
166
|
+
if (state.checkStarted) {
|
|
167
|
+
intervalRef.current = setInterval(check, LIVE_CHECKING_INTERVAL * 60000);
|
|
168
|
+
}
|
|
169
|
+
return () => {
|
|
170
|
+
intervalRef.current && clearInterval(intervalRef.current);
|
|
171
|
+
};
|
|
172
|
+
}, [state, participants]);
|
|
173
|
+
/**
|
|
174
|
+
* Start the checking after a delay
|
|
175
|
+
*/
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
let _timeout;
|
|
178
|
+
if (liveStream) {
|
|
179
|
+
_timeout = setTimeout(() => {
|
|
180
|
+
// Start the checking after 5 minutes
|
|
181
|
+
dispatch({ type: 'startChecking' });
|
|
182
|
+
__DEBUG && console.log('Start checking');
|
|
183
|
+
}, (liveStream.host.id === scUserContext.user.id ? LIVE_CHECKING_INITIAL_DELAY_HOST : LIVE_CHECKING_INITIAL_DELAY_GUEST) * 60000);
|
|
184
|
+
}
|
|
185
|
+
return () => {
|
|
186
|
+
_timeout && clearTimeout(_timeout);
|
|
187
|
+
dispatch({ type: 'stopChecking' });
|
|
188
|
+
};
|
|
189
|
+
}, [liveStream]);
|
|
190
|
+
return state;
|
|
191
|
+
}
|
|
@@ -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,74 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
import clsx from 'clsx';
|
|
13
|
+
/**
|
|
14
|
+
* Calls all functions in the order they were chained with the same arguments.
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
export function chain(...callbacks) {
|
|
18
|
+
return (...args) => {
|
|
19
|
+
for (const callback of callbacks) {
|
|
20
|
+
if (typeof callback === 'function') {
|
|
21
|
+
try {
|
|
22
|
+
callback(...args);
|
|
23
|
+
}
|
|
24
|
+
catch (e) {
|
|
25
|
+
console.error(e);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Merges multiple props objects together. Event handlers are chained,
|
|
33
|
+
* classNames are combined, and ids are deduplicated - different ids
|
|
34
|
+
* will trigger a side-effect and re-render components hooked up with `useId`.
|
|
35
|
+
* For all other props, the last prop object overrides all previous ones.
|
|
36
|
+
* @param args - Multiple sets of props to merge together.
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
export function mergePropsReactAria(...args) {
|
|
40
|
+
// Start with a base clone of the first argument. This is a lot faster than starting
|
|
41
|
+
// with an empty object and adding properties as we go.
|
|
42
|
+
const result = Object.assign({}, args[0]);
|
|
43
|
+
for (let i = 1; i < args.length; i++) {
|
|
44
|
+
const props = args[i];
|
|
45
|
+
for (const key in props) {
|
|
46
|
+
const a = result[key];
|
|
47
|
+
const b = props[key];
|
|
48
|
+
// Chain events
|
|
49
|
+
if (typeof a === 'function' &&
|
|
50
|
+
typeof b === 'function' &&
|
|
51
|
+
// This is a lot faster than a regex.
|
|
52
|
+
key[0] === 'o' &&
|
|
53
|
+
key[1] === 'n' &&
|
|
54
|
+
key.charCodeAt(2) >= /* 'A' */ 65 &&
|
|
55
|
+
key.charCodeAt(2) <= /* 'Z' */ 90) {
|
|
56
|
+
result[key] = chain(a, b);
|
|
57
|
+
// Merge classnames, sometimes classNames are empty string which eval to false, so we just need to do a type check
|
|
58
|
+
}
|
|
59
|
+
else if ((key === 'className' || key === 'UNSAFE_className') && typeof a === 'string' && typeof b === 'string') {
|
|
60
|
+
result[key] = clsx(a, b);
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
result[key] = b !== undefined ? b : a;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
return result;
|
|
68
|
+
}
|
|
69
|
+
export function isProp(prop) {
|
|
70
|
+
return prop !== undefined;
|
|
71
|
+
}
|
|
72
|
+
export function mergeProps(...props) {
|
|
73
|
+
return mergePropsReactAria(...props.filter(isProp));
|
|
74
|
+
}
|
|
@@ -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,21 @@
|
|
|
1
|
+
export const PREFIX = 'SCLiveStreamRoom';
|
|
2
|
+
export const defaultVideoOptions = {
|
|
3
|
+
hq: true,
|
|
4
|
+
codec: 'vp9'
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Start the checking after a delay
|
|
8
|
+
* In minutes
|
|
9
|
+
*/
|
|
10
|
+
export const LIVE_CHECKING_INITIAL_DELAY_HOST = 4;
|
|
11
|
+
export const LIVE_CHECKING_INITIAL_DELAY_GUEST = 1;
|
|
12
|
+
/**
|
|
13
|
+
* Checking live status on VideoLiveConference
|
|
14
|
+
* In minutes
|
|
15
|
+
*/
|
|
16
|
+
export const LIVE_CHECKING_INTERVAL = 1;
|
|
17
|
+
/**
|
|
18
|
+
* Warning threshold expiring soon
|
|
19
|
+
* In minutes
|
|
20
|
+
*/
|
|
21
|
+
export const 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
|
+
};
|
|
@@ -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
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo } from 'react';
|
|
3
4
|
import { styled } from '@mui/material/styles';
|
|
4
5
|
import { Box, Divider, Drawer, Icon, IconButton, List } from '@mui/material';
|
|
5
6
|
import classNames from 'classnames';
|
|
@@ -7,6 +8,8 @@ import { useThemeProps } from '@mui/system';
|
|
|
7
8
|
import ScrollContainer from '../../shared/ScrollContainer';
|
|
8
9
|
import DefaultDrawerContent from './DefaultDrawerContent';
|
|
9
10
|
import DefaultHeaderContent from './DefaultHeaderContent';
|
|
11
|
+
import CreateLiveStreamButton from '../CreateLiveStreamButton';
|
|
12
|
+
import { useSCUser } from '@selfcommunity/react-core';
|
|
10
13
|
const PREFIX = 'SCNavigationMenuDrawer';
|
|
11
14
|
const classes = {
|
|
12
15
|
root: `${PREFIX}-root`,
|
|
@@ -14,7 +17,10 @@ const classes = {
|
|
|
14
17
|
drawerRoot: `${PREFIX}-drawer-root`,
|
|
15
18
|
drawerHeader: `${PREFIX}-drawer-header`,
|
|
16
19
|
drawerHeaderAction: `${PREFIX}-drawer-header-action`,
|
|
17
|
-
drawerContent: `${PREFIX}-drawer-content
|
|
20
|
+
drawerContent: `${PREFIX}-drawer-content`,
|
|
21
|
+
drawerFooter: `${PREFIX}-drawer-footer`,
|
|
22
|
+
drawerFooterLiveStream: `${PREFIX}-drawer-footer-live`,
|
|
23
|
+
drawerFooterLiveStreamButton: `${PREFIX}-drawer-footer-live-button`
|
|
18
24
|
};
|
|
19
25
|
const Root = styled(Drawer, {
|
|
20
26
|
name: PREFIX,
|
|
@@ -22,11 +28,14 @@ const Root = styled(Drawer, {
|
|
|
22
28
|
overridesResolver: (props, styles) => styles.root
|
|
23
29
|
})(({ theme }) => ({}));
|
|
24
30
|
export default function NavigationMenuDrawer(inProps) {
|
|
31
|
+
var _a;
|
|
25
32
|
// PROPS
|
|
26
33
|
const props = useThemeProps({
|
|
27
34
|
props: inProps,
|
|
28
35
|
name: PREFIX
|
|
29
36
|
});
|
|
30
|
-
const { className = null, showDrawerHeader = true, drawerHeaderContent = _jsx(DefaultHeaderContent, {}), drawerContent = _jsx(DefaultDrawerContent, {}), ScrollContainerProps = {}, open, onClose } = props, rest = __rest(props, ["className", "showDrawerHeader", "drawerHeaderContent", "drawerContent", "ScrollContainerProps", "open", "onClose"]);
|
|
31
|
-
|
|
37
|
+
const { className = null, showDrawerHeader = true, drawerHeaderContent = _jsx(DefaultHeaderContent, {}), drawerContent = _jsx(DefaultDrawerContent, {}), showDrawerFooterContent = true, drawerFooterContent = null, ScrollContainerProps = {}, CreateLiveStreamButtonComponentProps = {}, open, onClose } = props, rest = __rest(props, ["className", "showDrawerHeader", "drawerHeaderContent", "drawerContent", "showDrawerFooterContent", "drawerFooterContent", "ScrollContainerProps", "CreateLiveStreamButtonComponentProps", "open", "onClose"]);
|
|
38
|
+
const scUserContext = useSCUser();
|
|
39
|
+
const canCreateLiveStream = 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]);
|
|
40
|
+
return (_jsxs(Root, Object.assign({ anchor: "left", className: classNames(classes.root, className), open: open, onClose: onClose }, rest, { children: [showDrawerHeader && (_jsxs(_Fragment, { children: [_jsxs(Box, Object.assign({ className: classes.drawerHeader }, { children: [drawerHeaderContent, _jsx(IconButton, Object.assign({ className: classes.drawerHeaderAction, onClick: onClose }, { children: _jsx(Icon, { children: "close" }) }))] })), _jsx(Divider, {})] })), _jsx(ScrollContainer, Object.assign({}, ScrollContainerProps, { children: _jsx(List, Object.assign({ className: classes.drawerContent, onClick: onClose }, { children: drawerContent })) })), showDrawerFooterContent && (_jsx(_Fragment, { children: _jsx(Box, Object.assign({ className: classes.drawerFooter }, { children: drawerFooterContent ? (drawerFooterContent) : (_jsxs(_Fragment, { children: [canCreateLiveStream && _jsx(Divider, {}), _jsx(Box, Object.assign({ className: classes.drawerFooterLiveStream }, { children: _jsx(CreateLiveStreamButton, Object.assign({ color: "primary", className: classes.drawerFooterLiveStreamButton, fullWidth: true }, CreateLiveStreamButtonComponentProps)) }))] })) })) }))] })));
|
|
32
41
|
}
|
|
@@ -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,72 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { Avatar, Box, Icon, Stack, Typography } from '@mui/material';
|
|
6
|
+
import { Link, SCRoutes, useSCRouting } from '@selfcommunity/react-core';
|
|
7
|
+
import { FormattedMessage } from 'react-intl';
|
|
8
|
+
import DateTimeAgo from '../../../shared/DateTimeAgo';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { SCNotificationObjectTemplateType } from '../../../types';
|
|
11
|
+
import NotificationItem from '../../../shared/NotificationItem';
|
|
12
|
+
import { LoadingButton } from '@mui/lab';
|
|
13
|
+
import UserDeletedSnackBar from '../../../shared/UserDeletedSnackBar';
|
|
14
|
+
import UserAvatar from '../../../shared/UserAvatar';
|
|
15
|
+
import { PREFIX } from '../constants';
|
|
16
|
+
import LiveStream from '../../LiveStream';
|
|
17
|
+
const classes = {
|
|
18
|
+
root: `${PREFIX}-live-root`,
|
|
19
|
+
avatar: `${PREFIX}-avatar`,
|
|
20
|
+
actions: `${PREFIX}-actions`,
|
|
21
|
+
seeButton: `${PREFIX}see-button`,
|
|
22
|
+
activeAt: `${PREFIX}-active-at`,
|
|
23
|
+
snippetTime: `${PREFIX}-snippet-time`,
|
|
24
|
+
username: `${PREFIX}-username`
|
|
25
|
+
};
|
|
26
|
+
const Root = styled(NotificationItem, {
|
|
27
|
+
name: PREFIX,
|
|
28
|
+
slot: 'LiveStreamRoot'
|
|
29
|
+
})(() => ({}));
|
|
30
|
+
/**
|
|
31
|
+
* This component render the content of the notification of type live stream
|
|
32
|
+
* @constructor
|
|
33
|
+
* @param props
|
|
34
|
+
*/
|
|
35
|
+
export default function LiveStreamNotification(props) {
|
|
36
|
+
// PROPS
|
|
37
|
+
const { notificationObject, id = `n_${props.notificationObject['sid']}`, className, template = SCNotificationObjectTemplateType.DETAIL } = props, rest = __rest(props, ["notificationObject", "id", "className", "template"]);
|
|
38
|
+
// CONTEXT
|
|
39
|
+
const scRoutingContext = useSCRouting();
|
|
40
|
+
// STATE
|
|
41
|
+
const [openAlert, setOpenAlert] = useState(false);
|
|
42
|
+
// CONST
|
|
43
|
+
const isSnippetTemplate = template === SCNotificationObjectTemplateType.SNIPPET;
|
|
44
|
+
const isToastTemplate = template === SCNotificationObjectTemplateType.TOAST;
|
|
45
|
+
const inProgress = Boolean(!notificationObject.live_stream.closed_at_by_host &&
|
|
46
|
+
notificationObject.live_stream.last_started_at &&
|
|
47
|
+
!notificationObject.live_stream.last_finished_at);
|
|
48
|
+
// RENDER
|
|
49
|
+
if (isSnippetTemplate) {
|
|
50
|
+
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.live_stream.host.deleted && {
|
|
51
|
+
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
52
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: _jsx(Avatar, { alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar, classes: { root: classes.avatar } }) })) })), primary: _jsxs(Box, { children: [_jsx(Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
53
|
+
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
54
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}.title`, defaultMessage: `ui.notification.${notificationObject.type}.title`, values: {
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
icon: (...chunks) => _jsx(Icon, { children: chunks }),
|
|
58
|
+
live: notificationObject.live_stream.title,
|
|
59
|
+
link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
60
|
+
} })] }), 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)));
|
|
61
|
+
}
|
|
62
|
+
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.live_stream.host.deleted && {
|
|
63
|
+
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
64
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null }, { children: _jsx(UserAvatar, Object.assign({ hide: !notificationObject.live_stream.host.community_badge, smaller: true }, { children: _jsx(Avatar, { className: classes.avatar, alt: notificationObject.live_stream.host.username, variant: "circular", src: notificationObject.live_stream.host.avatar }) })) })), primary: _jsxs(_Fragment, { children: [_jsx(Link, Object.assign({}, (!notificationObject.live_stream.host.deleted && {
|
|
65
|
+
to: scRoutingContext.url(SCRoutes.USER_PROFILE_ROUTE_NAME, notificationObject.live_stream.host)
|
|
66
|
+
}), { onClick: notificationObject.live_stream.host.deleted ? () => setOpenAlert(true) : null, className: classes.username }, { children: notificationObject.live_stream.host.username })), ' ', _jsx(FormattedMessage, { id: `ui.notification.${notificationObject.type}`, defaultMessage: `ui.notification.${notificationObject.type}`, values: {
|
|
67
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
68
|
+
// @ts-ignore
|
|
69
|
+
live: notificationObject.live_stream.title,
|
|
70
|
+
link: (...chunks) => _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, notificationObject.live_stream) }, { children: chunks }))
|
|
71
|
+
} }), _jsx(LiveStream, { liveStream: notificationObject.live_stream, hideInProgress: !inProgress, 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) })] }));
|
|
72
|
+
}
|
|
@@ -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',
|
|
@@ -306,6 +307,9 @@ export default function UserNotification(inProps) {
|
|
|
306
307
|
n.type === SCNotificationTypologyType.USER_REQUESTED_TO_JOIN_EVENT) {
|
|
307
308
|
return _jsx(EventNotification, { notificationObject: n }, i);
|
|
308
309
|
}
|
|
310
|
+
else if (n.type === SCNotificationTypologyType.LIVE_STREAM_STARTED) {
|
|
311
|
+
return _jsx(LiveStreamNotification, { notificationObject: n }, i);
|
|
312
|
+
}
|
|
309
313
|
return null;
|
|
310
314
|
}
|
|
311
315
|
/**
|