@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,27 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ParticipantTile } from './ParticipantTile';
|
|
4
|
+
import { mergeProps } from './utils';
|
|
5
|
+
/**
|
|
6
|
+
* The `FocusLayoutContainer` is a layout component that expects two children:
|
|
7
|
+
* A small side component: In a video conference, this is usually a carousel of participants
|
|
8
|
+
* who are not in focus. And a larger main component to display the focused participant.
|
|
9
|
+
* For example, with the `FocusLayout` component.
|
|
10
|
+
*/
|
|
11
|
+
export function FocusLayoutContainer(props) {
|
|
12
|
+
const elementProps = mergeProps(props, { className: 'lk-focus-layout' });
|
|
13
|
+
return _jsx("div", Object.assign({}, elementProps, { children: props.children }));
|
|
14
|
+
}
|
|
15
|
+
export function FocusLayoutContainerNoParticipants(props) {
|
|
16
|
+
const elementProps = mergeProps(props, { className: 'lk-focus-layout' });
|
|
17
|
+
return (_jsx("div", Object.assign({}, elementProps, { style: { gridTemplateColumns: 'none' } }, { children: props.children })));
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The `FocusLayout` component is just a light wrapper around the `ParticipantTile` to display a single participant.
|
|
21
|
+
*/
|
|
22
|
+
export function FocusLayout(_a) {
|
|
23
|
+
var { trackRef } = _a, htmlProps = __rest(_a, ["trackRef"]);
|
|
24
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
return _jsx(ParticipantTile, Object.assign({ trackRef: trackRef }, htmlProps));
|
|
27
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SCLiveStreamType } from '@selfcommunity/types';
|
|
3
|
+
/**
|
|
4
|
+
* Interface LiveStreamContextType
|
|
5
|
+
*/
|
|
6
|
+
export interface LiveStreamContextType {
|
|
7
|
+
/**
|
|
8
|
+
* Options
|
|
9
|
+
*/
|
|
10
|
+
liveStream: SCLiveStreamType;
|
|
11
|
+
}
|
|
12
|
+
export declare const LiveStreamContext: import("react").Context<LiveStreamContextType>;
|
|
13
|
+
/**
|
|
14
|
+
* Let's only export the `useLiveStream` hook instead of the context.
|
|
15
|
+
* We only want to use the hook directly and never the context component.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useLiveStream(): LiveStreamContextType;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export const LiveStreamContext = createContext({});
|
|
3
|
+
/**
|
|
4
|
+
* Let's only export the `useLiveStream` hook instead of the context.
|
|
5
|
+
* We only want to use the hook directly and never the context component.
|
|
6
|
+
*/
|
|
7
|
+
export function useLiveStream() {
|
|
8
|
+
return useContext(LiveStreamContext);
|
|
9
|
+
}
|
package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { BoxProps } from '@mui/material';
|
|
2
|
+
import { LiveKitRoomProps, LocalUserChoices, VideoConferenceProps } from '@livekit/components-react';
|
|
3
|
+
import { VideoCodec } from 'livekit-client';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { ConnectionDetails } from '../types';
|
|
6
|
+
export interface LiveStreamVideoConferenceProps extends BoxProps {
|
|
7
|
+
/**
|
|
8
|
+
* Overrides or extends the styles applied to the component.
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* User choices
|
|
14
|
+
*/
|
|
15
|
+
userChoices?: LocalUserChoices;
|
|
16
|
+
/**
|
|
17
|
+
* Connection details, include
|
|
18
|
+
* serverUrl: serverUrl,
|
|
19
|
+
* roomName: roomName,
|
|
20
|
+
* participantToken: participantToken,
|
|
21
|
+
* participantName: participantName
|
|
22
|
+
*/
|
|
23
|
+
connectionDetails?: ConnectionDetails;
|
|
24
|
+
/**
|
|
25
|
+
* Override video options
|
|
26
|
+
*/
|
|
27
|
+
options?: {
|
|
28
|
+
hq: boolean;
|
|
29
|
+
codec: VideoCodec;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* onLeave room callback
|
|
33
|
+
*/
|
|
34
|
+
handleOnLeaveRoom?: () => void;
|
|
35
|
+
/**
|
|
36
|
+
* Props to spread to LiveKitRoomComponent
|
|
37
|
+
* @default {}
|
|
38
|
+
*/
|
|
39
|
+
LiveKitRoomComponentProps?: LiveKitRoomProps;
|
|
40
|
+
/**
|
|
41
|
+
* Props to spread to VideoConferenceComponent
|
|
42
|
+
* @default {}
|
|
43
|
+
*/
|
|
44
|
+
VideoConferenceComponentProps?: VideoConferenceProps;
|
|
45
|
+
/**
|
|
46
|
+
* Element to be inserted before end conference content
|
|
47
|
+
*/
|
|
48
|
+
startConferenceEndContent?: React.ReactNode | null;
|
|
49
|
+
/**
|
|
50
|
+
* Element to be inserted after end conference content
|
|
51
|
+
*/
|
|
52
|
+
endConferenceEndContent?: React.ReactNode | null;
|
|
53
|
+
/**
|
|
54
|
+
* Any other properties
|
|
55
|
+
*/
|
|
56
|
+
[p: string]: any;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
*> API documentation for the Community-JS LiveStreamVideoConference component. Learn about the available props and the CSS API.
|
|
60
|
+
*
|
|
61
|
+
#### Import
|
|
62
|
+
```jsx
|
|
63
|
+
import {LiveStreamVideoConference} from '@selfcommunity/react-ui';
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
#### Component Name
|
|
67
|
+
The name `LiveStreamVideoConference` can be used when providing style overrides in the theme.
|
|
68
|
+
|
|
69
|
+
#### CSS
|
|
70
|
+
|
|
71
|
+
|Rule Name|Global class|Description|
|
|
72
|
+
|---|---|---|
|
|
73
|
+
|root|.SCLiveStreamForm-root|Styles applied to the root element.|
|
|
74
|
+
|
|
75
|
+
* @param inProps
|
|
76
|
+
*/
|
|
77
|
+
export default function LiveStreamVideoConference(inProps: LiveStreamVideoConferenceProps): JSX.Element;
|
package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { Box, Button, CircularProgress, Typography } from '@mui/material';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { useThemeProps } from '@mui/system';
|
|
6
|
+
import { Link, SCPreferences, SCRoutes, useSCPreferences, useSCRouting, useSCUser } from '@selfcommunity/react-core';
|
|
7
|
+
import { SCLiveStreamViewType } from '@selfcommunity/types';
|
|
8
|
+
import classNames from 'classnames';
|
|
9
|
+
import { PREFIX } from './constants';
|
|
10
|
+
import { ConnectionState, formatChatMessageLinks, LayoutContextProvider, LiveKitRoom } from '@livekit/components-react';
|
|
11
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
12
|
+
import { defaultUserChoices } from '@livekit/components-core';
|
|
13
|
+
import { defaultVideoOptions } from '../constants';
|
|
14
|
+
import { FormattedMessage } from 'react-intl';
|
|
15
|
+
import { VideoConference } from './VideoConference';
|
|
16
|
+
import { useLiveStream } from './LiveStreamProvider';
|
|
17
|
+
import DialogContent from '@mui/material/DialogContent';
|
|
18
|
+
import BaseDialog from '../../../shared/BaseDialog';
|
|
19
|
+
import { closeSnackbar } from 'notistack';
|
|
20
|
+
const classes = {
|
|
21
|
+
root: `${PREFIX}-root`,
|
|
22
|
+
logo: `${PREFIX}-logo`,
|
|
23
|
+
title: `${PREFIX}-title`,
|
|
24
|
+
content: `${PREFIX}-content`,
|
|
25
|
+
endConferenceWrap: `${PREFIX}-end-conference-wrap`,
|
|
26
|
+
btnBackHome: `${PREFIX}-btn-back-home`,
|
|
27
|
+
actions: `${PREFIX}-actions`,
|
|
28
|
+
error: `${PREFIX}-error`
|
|
29
|
+
};
|
|
30
|
+
const Root = styled(Box, {
|
|
31
|
+
name: PREFIX,
|
|
32
|
+
slot: 'Root'
|
|
33
|
+
})(({ theme }) => ({}));
|
|
34
|
+
const DialogRoot = styled(BaseDialog, {
|
|
35
|
+
name: PREFIX,
|
|
36
|
+
slot: 'Root',
|
|
37
|
+
overridesResolver: (props, styles) => styles.dialogRoot
|
|
38
|
+
})(({ theme }) => ({}));
|
|
39
|
+
const PREFERENCES = [SCPreferences.LOGO_NAVBAR_LOGO];
|
|
40
|
+
/**
|
|
41
|
+
*> API documentation for the Community-JS LiveStreamVideoConference component. Learn about the available props and the CSS API.
|
|
42
|
+
*
|
|
43
|
+
#### Import
|
|
44
|
+
```jsx
|
|
45
|
+
import {LiveStreamVideoConference} from '@selfcommunity/react-ui';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Component Name
|
|
49
|
+
The name `LiveStreamVideoConference` can be used when providing style overrides in the theme.
|
|
50
|
+
|
|
51
|
+
#### CSS
|
|
52
|
+
|
|
53
|
+
|Rule Name|Global class|Description|
|
|
54
|
+
|---|---|---|
|
|
55
|
+
|root|.SCLiveStreamForm-root|Styles applied to the root element.|
|
|
56
|
+
|
|
57
|
+
* @param inProps
|
|
58
|
+
*/
|
|
59
|
+
export default function LiveStreamVideoConference(inProps) {
|
|
60
|
+
//PROPS
|
|
61
|
+
const props = useThemeProps({
|
|
62
|
+
props: inProps,
|
|
63
|
+
name: PREFIX
|
|
64
|
+
});
|
|
65
|
+
const { className, handleOnLeaveRoom, userChoices = defaultUserChoices, connectionDetails = {}, LiveKitRoomComponentProps = {
|
|
66
|
+
/* simulateParticipants: true */
|
|
67
|
+
}, VideoConferenceComponentProps = {}, startConferenceEndContent, endConferenceEndContent, options = defaultVideoOptions } = props, rest = __rest(props, ["className", "handleOnLeaveRoom", "userChoices", "connectionDetails", "LiveKitRoomComponentProps", "VideoConferenceComponentProps", "startConferenceEndContent", "endConferenceEndContent", "options"]);
|
|
68
|
+
// CONTEXT
|
|
69
|
+
const scUserContext = useSCUser();
|
|
70
|
+
const scRoutingContext = useSCRouting();
|
|
71
|
+
const scPreferences = useSCPreferences();
|
|
72
|
+
const { liveStream } = useLiveStream();
|
|
73
|
+
// STATE
|
|
74
|
+
const [liveActive, setLiveActive] = useState(true);
|
|
75
|
+
const [error, setError] = useState(null);
|
|
76
|
+
// PREFERENCES
|
|
77
|
+
const preferences = useMemo(() => {
|
|
78
|
+
const _preferences = {};
|
|
79
|
+
PREFERENCES.map((p) => (_preferences[p] = p in scPreferences.preferences ? scPreferences.preferences[p].value : null));
|
|
80
|
+
return _preferences;
|
|
81
|
+
}, [scPreferences.preferences]);
|
|
82
|
+
// PERMISSIONS
|
|
83
|
+
const canUseAudio = useMemo(() => { var _a; return scUserContext.user && liveStream && (liveStream.host.id === scUserContext.user.id || (liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.muteParticipants))); }, [scUserContext, liveStream]);
|
|
84
|
+
const canUseVideo = useMemo(() => { var _a; return scUserContext.user && liveStream && (liveStream.host.id === scUserContext.user.id || (liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.disableVideo))); }, [scUserContext, liveStream]);
|
|
85
|
+
const canUseChat = useMemo(() => { var _a; return scUserContext.user && liveStream && liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.disableChat); }, [scUserContext, liveStream]);
|
|
86
|
+
const canUseShareScreen = useMemo(() => { var _a; return scUserContext.user && liveStream && (liveStream.host.id === scUserContext.user.id || (liveStream && !((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.disableShareScreen))); }, [scUserContext, liveStream]);
|
|
87
|
+
const speakerFocused = useMemo(() => (scUserContext.user && liveStream && liveStream.settings.view === SCLiveStreamViewType.SPEAKER ? liveStream.host : null), [scUserContext, liveStream]);
|
|
88
|
+
const hideParticipantsList = useMemo(() => { var _a; return scUserContext.user && liveStream && ((_a = liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) === null || _a === void 0 ? void 0 : _a.hideParticipantsList) && liveStream.host.id !== scUserContext.user.id; }, [scUserContext, liveStream]);
|
|
89
|
+
// CONNECT OPTIONS
|
|
90
|
+
const connectOptions = useMemo(() => {
|
|
91
|
+
return {
|
|
92
|
+
autoSubscribe: true
|
|
93
|
+
};
|
|
94
|
+
}, []);
|
|
95
|
+
// HANDLERS
|
|
96
|
+
/**
|
|
97
|
+
* Handle on leave
|
|
98
|
+
*/
|
|
99
|
+
const handleOnLeave = useCallback(() => {
|
|
100
|
+
setLiveActive(false);
|
|
101
|
+
handleOnLeaveRoom === null || handleOnLeaveRoom === void 0 ? void 0 : handleOnLeaveRoom();
|
|
102
|
+
}, [handleOnLeaveRoom]);
|
|
103
|
+
/**
|
|
104
|
+
* Handle on error
|
|
105
|
+
*/
|
|
106
|
+
const handleError = useCallback((error) => {
|
|
107
|
+
console.error(error);
|
|
108
|
+
if (error.message !== 'Client initiated disconnect') {
|
|
109
|
+
setError(`Encountered an unexpected error, check the console logs for details: ${error.message}`);
|
|
110
|
+
}
|
|
111
|
+
setLiveActive(false);
|
|
112
|
+
}, []);
|
|
113
|
+
/**
|
|
114
|
+
* Handle encryption error
|
|
115
|
+
*/
|
|
116
|
+
const handleEncryptionError = useCallback((error) => {
|
|
117
|
+
console.error(error);
|
|
118
|
+
setError(`Encountered an unexpected encryption error, check the console logs for details: ${error.message}`);
|
|
119
|
+
setLiveActive(false);
|
|
120
|
+
}, []);
|
|
121
|
+
const handleBackHome = useCallback(() => {
|
|
122
|
+
closeSnackbar();
|
|
123
|
+
}, [closeSnackbar]);
|
|
124
|
+
/**
|
|
125
|
+
* User must be authenticated
|
|
126
|
+
*/
|
|
127
|
+
if (!scUserContext.user || !connectionDetails) {
|
|
128
|
+
return _jsx(CircularProgress, {});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Renders root object
|
|
132
|
+
*/
|
|
133
|
+
return (_jsx(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: liveActive && !error ? (_jsx(_Fragment, { children: _jsx(LiveKitRoom, Object.assign({ connect: Boolean(liveActive), token: connectionDetails['participantToken'], serverUrl: connectionDetails['serverUrl'], connectOptions: connectOptions, video: userChoices.videoEnabled, audio: userChoices.audioEnabled, onDisconnected: handleOnLeave, onEncryptionError: handleEncryptionError, onError: handleError }, LiveKitRoomComponentProps, { children: _jsxs(LayoutContextProvider, { children: [_jsx(VideoConference, Object.assign({ chatMessageFormatter: formatChatMessageLinks }, (speakerFocused && { speakerFocused: liveStream.host }), VideoConferenceComponentProps, { disableMicrophone: !canUseAudio, disableCamera: !canUseVideo, disableChat: !canUseChat, disableShareScreen: !canUseShareScreen, hideParticipantsList: hideParticipantsList })), _jsx(ConnectionState, {})] }) })) })) : (_jsx(_Fragment, { children: error ? (_jsx(DialogRoot, Object.assign({ open: true, maxWidth: 'md', fullWidth: true }, { children: _jsx(DialogContent, { children: _jsxs(Box, Object.assign({ className: classes.endConferenceWrap }, { children: [_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: _jsx("img", { src: preferences[SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), startConferenceEndContent, error, _jsx(Button, Object.assign({ variant: "contained", color: "secondary", component: Link, to: '/', className: classes.btnBackHome }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.button.backHome", defaultMessage: "ui.liveStreamRoom.button.backHome" }) })), endConferenceEndContent] })) }) }))) : liveActive === false ? (_jsx(DialogRoot, Object.assign({ open: true, maxWidth: 'md', fullWidth: true }, { children: _jsx(DialogContent, { children: _jsxs(Box, Object.assign({ className: classes.endConferenceWrap }, { children: [_jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: _jsx("img", { src: preferences[SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), startConferenceEndContent, _jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.conference.end", defaultMessage: "ui.liveStreamRoom.conference.end" }) })), _jsx(Button, Object.assign({ variant: "contained", color: "secondary", component: Link, to: '/', onClick: handleBackHome, className: classes.btnBackHome }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.button.backHome", defaultMessage: "ui.liveStreamRoom.button.backHome" }) })), endConferenceEndContent] })) }) }))) : (_jsx(CircularProgress, {})) })) })));
|
|
134
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
const SvgParticipantPlaceholder = (props) => (_jsxs("svg", Object.assign({ width: 90, height: 90, viewBox: "0 0 320 320", preserveAspectRatio: "xMidYMid meet", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, props, { children: [_jsx("path", { d: "M160 180C204.182 180 240 144.183 240 100C240 55.8172 204.182 20 160 20C115.817 20 79.9997 55.8172 79.9997 100C79.9997 144.183 115.817 180 160 180Z", fill: "white", fillOpacity: 0.25 }), _jsx("path", { d: "M97.6542 194.614C103.267 191.818 109.841 192.481 115.519 195.141C129.025 201.466 144.1 205 159.999 205C175.899 205 190.973 201.466 204.48 195.141C210.158 192.481 216.732 191.818 222.345 194.614C262.703 214.719 291.985 253.736 298.591 300.062C300.15 310.997 291.045 320 280 320H39.9997C28.954 320 19.8495 310.997 21.4087 300.062C28.014 253.736 57.2966 214.72 97.6542 194.614Z", fill: "white", fillOpacity: 0.25 })] })));
|
|
6
|
+
export default SvgParticipantPlaceholder;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Participant } from 'livekit-client';
|
|
3
|
+
import type { ParticipantClickEvent, TrackReferenceOrPlaceholder } from '@livekit/components-core';
|
|
4
|
+
/**
|
|
5
|
+
* The `ParticipantContextIfNeeded` component only creates a `ParticipantContext`
|
|
6
|
+
* if there is no `ParticipantContext` already.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ParticipantContextIfNeeded(props: React.PropsWithChildren<{
|
|
9
|
+
participant?: Participant;
|
|
10
|
+
}>): JSX.Element;
|
|
11
|
+
/**
|
|
12
|
+
* Only create a `TrackRefContext` if there is no `TrackRefContext` already.
|
|
13
|
+
*/
|
|
14
|
+
export declare function TrackRefContextIfNeeded(props: React.PropsWithChildren<{
|
|
15
|
+
trackRef?: TrackReferenceOrPlaceholder;
|
|
16
|
+
}>): JSX.Element;
|
|
17
|
+
export interface ParticipantTileProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
18
|
+
/** The track reference to display. */
|
|
19
|
+
trackRef?: TrackReferenceOrPlaceholder;
|
|
20
|
+
disableSpeakingIndicator?: boolean;
|
|
21
|
+
disableTileActions?: boolean;
|
|
22
|
+
onParticipantClick?: (event: ParticipantClickEvent) => void;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The `ParticipantTile` component is the base utility wrapper for displaying a visual representation of a participant.
|
|
26
|
+
* This component can be used as a child of the `TrackLoop` component or by passing a track reference as property.
|
|
27
|
+
*/
|
|
28
|
+
export declare const ParticipantTile: (props: ParticipantTileProps & React.RefAttributes<HTMLDivElement>) => React.ReactNode;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Track } from 'livekit-client';
|
|
5
|
+
import { isTrackReference, isTrackReferencePinned } from '@livekit/components-core';
|
|
6
|
+
import { AudioTrack, ConnectionQualityIndicator, FocusToggle, LockLockedIcon, ParticipantContext, ParticipantName, ScreenShareIcon, TrackMutedIndicator, TrackRefContext, useEnsureTrackRef, useFeatureContext, useIsEncrypted, useMaybeLayoutContext, useMaybeParticipantContext, useMaybeTrackRefContext, useParticipantTile, VideoTrack } from '@livekit/components-react';
|
|
7
|
+
import ParticipantTileAvatar from './ParticipantTileAvatar';
|
|
8
|
+
import ParticipantTileActions from './ParticipantTileActions';
|
|
9
|
+
import { useSCUser } from '@selfcommunity/react-core';
|
|
10
|
+
/**
|
|
11
|
+
* The `ParticipantContextIfNeeded` component only creates a `ParticipantContext`
|
|
12
|
+
* if there is no `ParticipantContext` already.
|
|
13
|
+
*/
|
|
14
|
+
export function ParticipantContextIfNeeded(props) {
|
|
15
|
+
const hasContext = !!useMaybeParticipantContext();
|
|
16
|
+
return props.participant && !hasContext ? (_jsx(ParticipantContext.Provider, Object.assign({ value: props.participant }, { children: props.children }))) : (_jsx(_Fragment, { children: props.children }));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Only create a `TrackRefContext` if there is no `TrackRefContext` already.
|
|
20
|
+
*/
|
|
21
|
+
export function TrackRefContextIfNeeded(props) {
|
|
22
|
+
const hasContext = !!useMaybeTrackRefContext();
|
|
23
|
+
return props.trackRef && !hasContext ? (_jsx(TrackRefContext.Provider, Object.assign({ value: props.trackRef }, { children: props.children }))) : (_jsx(_Fragment, { children: props.children }));
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The `ParticipantTile` component is the base utility wrapper for displaying a visual representation of a participant.
|
|
27
|
+
* This component can be used as a child of the `TrackLoop` component or by passing a track reference as property.
|
|
28
|
+
*/
|
|
29
|
+
export const ParticipantTile =
|
|
30
|
+
/* @__PURE__ */ React.forwardRef(function ParticipantTile(_a, ref) {
|
|
31
|
+
var _b, _c;
|
|
32
|
+
var { trackRef, children, onParticipantClick, disableSpeakingIndicator, disableTileActions = false } = _a, htmlProps = __rest(_a, ["trackRef", "children", "onParticipantClick", "disableSpeakingIndicator", "disableTileActions"]);
|
|
33
|
+
const scUserContext = useSCUser();
|
|
34
|
+
const trackReference = useEnsureTrackRef(trackRef);
|
|
35
|
+
const { elementProps } = useParticipantTile({
|
|
36
|
+
htmlProps,
|
|
37
|
+
disableSpeakingIndicator,
|
|
38
|
+
onParticipantClick,
|
|
39
|
+
trackRef: trackReference
|
|
40
|
+
});
|
|
41
|
+
const isEncrypted = useIsEncrypted(trackReference.participant);
|
|
42
|
+
const layoutContext = useMaybeLayoutContext();
|
|
43
|
+
const autoManageSubscription = (_b = useFeatureContext()) === null || _b === void 0 ? void 0 : _b.autoSubscription;
|
|
44
|
+
const handleSubscribe = React.useCallback((subscribed) => {
|
|
45
|
+
if (trackReference.source &&
|
|
46
|
+
!subscribed &&
|
|
47
|
+
layoutContext &&
|
|
48
|
+
layoutContext.pin.dispatch &&
|
|
49
|
+
isTrackReferencePinned(trackReference, layoutContext.pin.state)) {
|
|
50
|
+
layoutContext.pin.dispatch({ msg: 'clear_pin' });
|
|
51
|
+
}
|
|
52
|
+
}, [trackReference, layoutContext]);
|
|
53
|
+
return (_jsx("div", Object.assign({ ref: ref, style: { position: 'relative' } }, elementProps, { children: _jsx(TrackRefContextIfNeeded, Object.assign({ trackRef: trackReference }, { children: _jsxs(ParticipantContextIfNeeded, Object.assign({ participant: trackReference.participant }, { children: [children !== null && children !== void 0 ? children : (_jsxs(_Fragment, { children: [isTrackReference(trackReference) &&
|
|
54
|
+
(((_c = trackReference.publication) === null || _c === void 0 ? void 0 : _c.kind) === 'video' ||
|
|
55
|
+
trackReference.source === Track.Source.Camera ||
|
|
56
|
+
trackReference.source === Track.Source.ScreenShare) ? (_jsx(_Fragment, { children: _jsx(VideoTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe, manageSubscription: autoManageSubscription }) })) : (isTrackReference(trackReference) && (_jsx(_Fragment, { children: _jsx(AudioTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe }) }))), _jsx("div", Object.assign({ className: "lk-participant-placeholder" }, { children: _jsx(ParticipantTileAvatar, { participant: trackReference.participant }) })), _jsxs("div", Object.assign({ className: "lk-participant-metadata" }, { children: [_jsx("div", Object.assign({ className: "lk-participant-metadata-item" }, { children: trackReference.source === Track.Source.Camera ? (_jsxs(_Fragment, { children: [isEncrypted && _jsx(LockLockedIcon, { style: { marginRight: '0.25rem' } }), _jsx(TrackMutedIndicator, { trackRef: {
|
|
57
|
+
participant: trackReference.participant,
|
|
58
|
+
source: Track.Source.Microphone
|
|
59
|
+
}, show: 'muted' }), _jsx(ParticipantName, { children: !disableTileActions && _jsx(ParticipantTileActions, {}) })] })) : (_jsxs(_Fragment, { children: [_jsx(ScreenShareIcon, { style: { marginRight: '0.25rem' } }), _jsx(ParticipantName, { children: "'s screen" })] })) })), _jsx(ConnectionQualityIndicator, { className: "lk-participant-metadata-item" })] }))] })), _jsx(FocusToggle, { trackRef: trackReference })] })) })) })));
|
|
60
|
+
});
|
package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export interface ParticipantTileActionsMenuProps {
|
|
2
|
+
/**
|
|
3
|
+
* Overrides or extends the styles applied to the component.
|
|
4
|
+
* @default null
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
/**
|
|
8
|
+
* User Object
|
|
9
|
+
* @default null
|
|
10
|
+
*/
|
|
11
|
+
participant?: any;
|
|
12
|
+
/**
|
|
13
|
+
* Handle remove user
|
|
14
|
+
*/
|
|
15
|
+
onRemoveParticipant?: (p: any) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Handle ban user
|
|
18
|
+
*/
|
|
19
|
+
onBanParticipant?: (p: any) => void;
|
|
20
|
+
/**
|
|
21
|
+
* Props to spread to popper
|
|
22
|
+
* @default empty object
|
|
23
|
+
*/
|
|
24
|
+
PopperProps?: any;
|
|
25
|
+
/**
|
|
26
|
+
* Any other properties
|
|
27
|
+
*/
|
|
28
|
+
[p: string]: any;
|
|
29
|
+
}
|
|
30
|
+
export default function ContributionActionsMenu(props: ParticipantTileActionsMenuProps): JSX.Element;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
import { __awaiter, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useContext, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import { styled } from '@mui/material/styles';
|
|
5
|
+
import { FormattedMessage } from 'react-intl';
|
|
6
|
+
import Popper from '@mui/material/Popper';
|
|
7
|
+
import Icon from '@mui/material/Icon';
|
|
8
|
+
import { useSnackbar } from 'notistack';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import { Box, ClickAwayListener, Grow, IconButton, ListItemIcon, ListItemText, MenuItem, MenuList, Paper, SwipeableDrawer, useMediaQuery, useTheme } from '@mui/material';
|
|
11
|
+
import { LiveStreamApiClient } from '@selfcommunity/api-services';
|
|
12
|
+
import { SCContext, SCUserContext } from '@selfcommunity/react-core';
|
|
13
|
+
import { BAN_ROOM_USER, REMOVE_ROOM_USER } from './constants';
|
|
14
|
+
import ConfirmDialog from '../../../shared/ConfirmDialog/ConfirmDialog';
|
|
15
|
+
import { useEnsureParticipant } from '@livekit/components-react';
|
|
16
|
+
import { useLiveStream } from './LiveStreamProvider';
|
|
17
|
+
import { Logger } from '@selfcommunity/utils';
|
|
18
|
+
import { SCOPE_SC_UI } from '../../../constants/Errors';
|
|
19
|
+
const PREFIX = 'SCParticipantTileActionsMenu';
|
|
20
|
+
const classes = {
|
|
21
|
+
root: `${PREFIX}-root`,
|
|
22
|
+
button: `${PREFIX}-button`,
|
|
23
|
+
popperRoot: `${PREFIX}-popper-root`,
|
|
24
|
+
paper: `${PREFIX}-paper`,
|
|
25
|
+
item: `${PREFIX}-item`,
|
|
26
|
+
itemText: `${PREFIX}-item-text`,
|
|
27
|
+
subItem: `${PREFIX}-sub-item`,
|
|
28
|
+
subItemText: `${PREFIX}-sub-item-text`,
|
|
29
|
+
footerSubItems: `${PREFIX}-footer-sub-items`,
|
|
30
|
+
selectedIcon: `${PREFIX}-selected-icon`,
|
|
31
|
+
sectionBadge: `${PREFIX}-section-badge`,
|
|
32
|
+
sectionWithSelectionIcon: `${PREFIX}-section-with-selection-icon`,
|
|
33
|
+
visibilityIcons: `${PREFIX}-visibility-icons`
|
|
34
|
+
};
|
|
35
|
+
const PopperRoot = styled(Popper, {
|
|
36
|
+
name: PREFIX,
|
|
37
|
+
slot: 'Root',
|
|
38
|
+
overridesResolver: (props, styles) => styles.popperRoot
|
|
39
|
+
})(() => ({
|
|
40
|
+
'& .SCParticipantTileActionsMenu-paper': {
|
|
41
|
+
borderRadius: 5
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
const Root = styled(Box, {
|
|
45
|
+
name: PREFIX,
|
|
46
|
+
slot: 'Root',
|
|
47
|
+
overridesResolver: (props, styles) => styles.root
|
|
48
|
+
})(({ theme }) => ({
|
|
49
|
+
display: 'inline-block',
|
|
50
|
+
'& button': {
|
|
51
|
+
color: theme.palette.common.white
|
|
52
|
+
}
|
|
53
|
+
}));
|
|
54
|
+
export default function ContributionActionsMenu(props) {
|
|
55
|
+
// PROPS
|
|
56
|
+
const { className, participant, onRemoveParticipant, onBanParticipant, PopperProps = {} } = props, rest = __rest(props, ["className", "participant", "onRemoveParticipant", "onBanParticipant", "PopperProps"]);
|
|
57
|
+
// CONTEXT
|
|
58
|
+
const theme = useTheme();
|
|
59
|
+
const isMobile = useMediaQuery(theme.breakpoints.down('md'));
|
|
60
|
+
const scContext = useContext(SCContext);
|
|
61
|
+
const scUserContext = useContext(SCUserContext);
|
|
62
|
+
const { enqueueSnackbar } = useSnackbar();
|
|
63
|
+
const p = useEnsureParticipant(participant);
|
|
64
|
+
const { liveStream } = useLiveStream();
|
|
65
|
+
// GENERAL POPPER STATE
|
|
66
|
+
const [open, setOpen] = useState(false);
|
|
67
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
68
|
+
// CONFIRM ACTION DIALOG STATE
|
|
69
|
+
const [openConfirmDialog, setOpenConfirmDialog] = useState(false);
|
|
70
|
+
const [currentAction, setCurrentAction] = useState(null);
|
|
71
|
+
const [currentActionLoading, setCurrentActionLoading] = useState(null);
|
|
72
|
+
// CONST
|
|
73
|
+
let popperRef = useRef(null);
|
|
74
|
+
/**
|
|
75
|
+
* Handles open popup
|
|
76
|
+
*/
|
|
77
|
+
function handleOpen() {
|
|
78
|
+
if (scUserContext.user) {
|
|
79
|
+
setOpen(true);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
scContext.settings.handleAnonymousAction();
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Closes popup
|
|
87
|
+
*/
|
|
88
|
+
function handleClose() {
|
|
89
|
+
if (popperRef.current && popperRef.current.contains(event.target)) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
setOpen(false);
|
|
93
|
+
if (rest.onClose) {
|
|
94
|
+
rest.onClose();
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Perform ban participant
|
|
99
|
+
*/
|
|
100
|
+
const performRemoveOrBanParticipant = useMemo(() => (ban = false) => __awaiter(this, void 0, void 0, function* () {
|
|
101
|
+
const res = yield LiveStreamApiClient.removeParticipant(liveStream.id, { participant_id: p.identity, ban });
|
|
102
|
+
if (res.status >= 300) {
|
|
103
|
+
return Promise.reject(res);
|
|
104
|
+
}
|
|
105
|
+
return yield Promise.resolve(res.data);
|
|
106
|
+
}), [p]);
|
|
107
|
+
/**
|
|
108
|
+
* Handle action
|
|
109
|
+
*/
|
|
110
|
+
function handleAction(action) {
|
|
111
|
+
if ([REMOVE_ROOM_USER, BAN_ROOM_USER].indexOf(action) > -1) {
|
|
112
|
+
setCurrentAction(action);
|
|
113
|
+
setOpenConfirmDialog(true);
|
|
114
|
+
handleClose();
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Perform additional operations at the end of single action
|
|
119
|
+
*/
|
|
120
|
+
function performPostConfirmAction(success) {
|
|
121
|
+
if (success) {
|
|
122
|
+
setCurrentActionLoading(null);
|
|
123
|
+
setCurrentAction(null);
|
|
124
|
+
setOpenConfirmDialog(false);
|
|
125
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.contributionActionMenu.actionSuccess", defaultMessage: "ui.contributionActionMenu.actionSuccess" }), {
|
|
126
|
+
variant: 'success',
|
|
127
|
+
autoHideDuration: 3000
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
setCurrentActionLoading(null);
|
|
132
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.contributionActionMenu.actionError", defaultMessage: "ui.contributionActionMenu.actionError" }), {
|
|
133
|
+
variant: 'error',
|
|
134
|
+
autoHideDuration: 3000
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* Delete a contribution
|
|
140
|
+
*/
|
|
141
|
+
function handleConfirmedAction() {
|
|
142
|
+
if (p && !isLoading && !currentActionLoading) {
|
|
143
|
+
if (currentAction === REMOVE_ROOM_USER) {
|
|
144
|
+
setCurrentActionLoading(REMOVE_ROOM_USER);
|
|
145
|
+
performRemoveOrBanParticipant()
|
|
146
|
+
.then(() => {
|
|
147
|
+
onRemoveParticipant && onRemoveParticipant(p);
|
|
148
|
+
performPostConfirmAction(true);
|
|
149
|
+
})
|
|
150
|
+
.catch((error) => {
|
|
151
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
152
|
+
performPostConfirmAction(false);
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
else if (currentAction === BAN_ROOM_USER) {
|
|
156
|
+
setCurrentActionLoading(BAN_ROOM_USER);
|
|
157
|
+
performRemoveOrBanParticipant(true)
|
|
158
|
+
.then(() => {
|
|
159
|
+
onBanParticipant && onBanParticipant(p);
|
|
160
|
+
performPostConfirmAction(true);
|
|
161
|
+
})
|
|
162
|
+
.catch((error) => {
|
|
163
|
+
Logger.error(SCOPE_SC_UI, error);
|
|
164
|
+
performPostConfirmAction(false);
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Can authenticated ban a user in a room
|
|
171
|
+
*/
|
|
172
|
+
const canRemoveOrBanUser = useMemo(() => () => {
|
|
173
|
+
return (scUserContext.user &&
|
|
174
|
+
liveStream &&
|
|
175
|
+
p &&
|
|
176
|
+
p.identity &&
|
|
177
|
+
liveStream.host.id === scUserContext.user.id &&
|
|
178
|
+
scUserContext.user.id.toString() !== p.identity);
|
|
179
|
+
}, [scUserContext, liveStream, p]);
|
|
180
|
+
/**
|
|
181
|
+
* Renders section general
|
|
182
|
+
*/
|
|
183
|
+
function renderGeneralSection() {
|
|
184
|
+
return (_jsx(Box, { children: canRemoveOrBanUser() && (_jsxs(_Fragment, { children: [_jsxs(MenuItem, Object.assign({ className: classes.subItem, disabled: currentActionLoading === REMOVE_ROOM_USER }, { children: [_jsx(ListItemIcon, { children: _jsx(Icon, { children: "person" }) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.removeRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.removeRoomUser" }), onClick: () => handleAction(REMOVE_ROOM_USER), classes: { root: classes.itemText } })] })), _jsxs(MenuItem, Object.assign({ className: classes.subItem, disabled: currentActionLoading === BAN_ROOM_USER }, { children: [_jsx(ListItemIcon, { children: _jsx(Icon, { children: "error" }) }), _jsx(ListItemText, { primary: _jsx(FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.banRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.banRoomUser" }), onClick: () => handleAction(BAN_ROOM_USER), classes: { root: classes.itemText } })] }))] })) }));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Renders contribution menu content
|
|
188
|
+
*/
|
|
189
|
+
function renderContent() {
|
|
190
|
+
return (_jsx(Box, { children: _jsx(MenuList, { children: renderGeneralSection() }) }));
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Renders component only if the logged user has actions available
|
|
194
|
+
*/
|
|
195
|
+
if (!canRemoveOrBanUser()) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Renders component
|
|
200
|
+
*/
|
|
201
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsx(IconButton, Object.assign({ ref: (ref) => {
|
|
202
|
+
popperRef.current = ref;
|
|
203
|
+
}, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: _jsx(Icon, { children: "expand_more" }) })), isMobile ? (_jsx(SwipeableDrawer, Object.assign({ open: open, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : (_jsx(PopperRoot, Object.assign({ open: open, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "right" }, { children: ({ TransitionProps, placement }) => (_jsx(Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: _jsx(Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: _jsx(ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))), openConfirmDialog && (_jsx(ConfirmDialog, Object.assign({ open: openConfirmDialog }, (currentAction === REMOVE_ROOM_USER
|
|
204
|
+
? {
|
|
205
|
+
content: (_jsx(FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.removeRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.removeRoomUser" }))
|
|
206
|
+
}
|
|
207
|
+
: currentAction === BAN_ROOM_USER
|
|
208
|
+
? {
|
|
209
|
+
content: (_jsx(FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.banRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.banRoomUser" }))
|
|
210
|
+
}
|
|
211
|
+
: {}), { onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) })))] })));
|
|
212
|
+
}
|
package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SCUserType } from '@selfcommunity/types';
|
|
2
|
+
export interface ParticipantTileAvatarProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* User Object
|
|
6
|
+
* @default null
|
|
7
|
+
*/
|
|
8
|
+
user?: SCUserType;
|
|
9
|
+
/**
|
|
10
|
+
* User Object
|
|
11
|
+
* @default null
|
|
12
|
+
*/
|
|
13
|
+
participant?: any;
|
|
14
|
+
}
|
|
15
|
+
export default function ParticipantTileAvatar(inProps: ParticipantTileAvatarProps): JSX.Element;
|