@selfcommunity/react-ui 0.10.5-alpha.1 → 0.10.5-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) hide show
  1. package/lib/cjs/assets/deafultCover.d.ts +2 -0
  2. package/lib/cjs/assets/deafultCover.js +3 -0
  3. package/lib/cjs/assets/liveStream/event.d.ts +2 -0
  4. package/lib/cjs/assets/liveStream/event.js +3 -0
  5. package/lib/cjs/assets/liveStream/live.d.ts +2 -0
  6. package/lib/cjs/assets/liveStream/live.js +3 -0
  7. package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  8. package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
  9. package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.js +92 -0
  10. package/lib/cjs/components/CreateLiveStreamButton/index.d.ts +3 -0
  11. package/lib/cjs/components/CreateLiveStreamButton/index.js +5 -0
  12. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
  13. package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +103 -0
  14. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
  15. package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +188 -0
  16. package/lib/cjs/components/CreateLiveStreamDialog/constants.d.ts +1 -0
  17. package/lib/cjs/components/CreateLiveStreamDialog/constants.js +4 -0
  18. package/lib/cjs/components/CreateLiveStreamDialog/index.d.ts +3 -0
  19. package/lib/cjs/components/CreateLiveStreamDialog/index.js +5 -0
  20. package/lib/cjs/components/CreateLiveStreamDialog/types.d.ts +8 -0
  21. package/lib/cjs/components/CreateLiveStreamDialog/types.js +13 -0
  22. package/lib/cjs/components/Editor/Editor.d.ts +1 -1
  23. package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
  24. package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
  25. package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
  26. package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
  27. package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
  28. package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
  29. package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  30. package/lib/cjs/components/Editor/plugins/AutoLinkPlugin.js +8 -2
  31. package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  32. package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
  33. package/lib/cjs/components/EventForm/EventAddress.d.ts +4 -2
  34. package/lib/cjs/components/EventForm/EventAddress.js +55 -8
  35. package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
  36. package/lib/cjs/components/EventForm/EventForm.js +54 -14
  37. package/lib/cjs/components/EventForm/types.d.ts +7 -6
  38. package/lib/cjs/components/EventFormDialog/EventFormDialog.d.ts +1 -1
  39. package/lib/cjs/components/EventFormDialog/EventFormDialog.js +3 -3
  40. package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +1 -1
  41. package/lib/cjs/components/EventMediaWidget/EventMediaWidget.js +2 -2
  42. package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  43. package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +1 -1
  44. package/lib/cjs/components/EventMembersWidget/types.d.ts +1 -1
  45. package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
  46. package/lib/cjs/components/Feed/Feed.d.ts +2 -2
  47. package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
  48. package/lib/cjs/components/FeedObject/Activities/Activities.js +1 -1
  49. package/lib/cjs/components/LiveStream/LiveStream.d.ts +79 -0
  50. package/lib/cjs/components/LiveStream/LiveStream.js +143 -0
  51. package/lib/cjs/components/LiveStream/Skeleton.d.ts +46 -0
  52. package/lib/cjs/components/LiveStream/Skeleton.js +92 -0
  53. package/lib/cjs/components/LiveStream/constants.d.ts +1 -0
  54. package/lib/cjs/components/LiveStream/constants.js +4 -0
  55. package/lib/cjs/components/LiveStream/index.d.ts +4 -0
  56. package/lib/cjs/components/LiveStream/index.js +8 -0
  57. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
  58. package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +192 -0
  59. package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
  60. package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +80 -0
  61. package/lib/cjs/components/LiveStreamForm/constants.d.ts +15 -0
  62. package/lib/cjs/components/LiveStreamForm/constants.js +18 -0
  63. package/lib/cjs/components/LiveStreamForm/index.d.ts +3 -0
  64. package/lib/cjs/components/LiveStreamForm/index.js +5 -0
  65. package/lib/cjs/components/LiveStreamForm/types.d.ts +11 -0
  66. package/lib/cjs/components/LiveStreamForm/types.js +2 -0
  67. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
  68. package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +199 -0
  69. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
  70. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +62 -0
  71. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
  72. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +76 -0
  73. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
  74. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +33 -0
  75. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
  76. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +13 -0
  77. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
  78. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +137 -0
  79. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
  80. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +8 -0
  81. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
  82. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +65 -0
  83. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
  84. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +215 -0
  85. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
  86. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +39 -0
  87. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
  88. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +251 -0
  89. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
  90. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +32 -0
  91. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
  92. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +35 -0
  93. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
  94. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +31 -0
  95. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
  96. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +151 -0
  97. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
  98. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +6 -0
  99. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
  100. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.js +5 -0
  101. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
  102. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +195 -0
  103. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
  104. package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +82 -0
  105. package/lib/cjs/components/LiveStreamRoom/constants.d.ts +21 -0
  106. package/lib/cjs/components/LiveStreamRoom/constants.js +24 -0
  107. package/lib/cjs/components/LiveStreamRoom/index.d.ts +3 -0
  108. package/lib/cjs/components/LiveStreamRoom/index.js +5 -0
  109. package/lib/cjs/components/LiveStreamRoom/types.d.ts +22 -0
  110. package/lib/cjs/components/LiveStreamRoom/types.js +8 -0
  111. package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  112. package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  113. package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
  114. package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
  115. package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +15 -0
  116. package/lib/cjs/components/Notification/LiveStream/LiveStream.js +75 -0
  117. package/lib/cjs/components/Notification/LiveStream/index.d.ts +3 -0
  118. package/lib/cjs/components/Notification/LiveStream/index.js +5 -0
  119. package/lib/cjs/components/Notification/Notification.js +5 -1
  120. package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
  121. package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
  122. package/lib/cjs/components/PlatformWidget/constants.js +5 -1
  123. package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  124. package/lib/cjs/components/RelatedEventsWidget/RelatedEventsWidget.js +1 -1
  125. package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +4 -0
  126. package/lib/cjs/components/ToastNotifications/ToastNotifications.js +6 -2
  127. package/lib/cjs/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
  128. package/lib/cjs/components/UserLiveStreamWidget/Skeleton.js +28 -0
  129. package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
  130. package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.js +133 -0
  131. package/lib/cjs/components/UserLiveStreamWidget/constants.d.ts +1 -0
  132. package/lib/cjs/components/UserLiveStreamWidget/constants.js +4 -0
  133. package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +4 -0
  134. package/lib/cjs/components/UserLiveStreamWidget/index.js +8 -0
  135. package/lib/cjs/constants/LiveStream.d.ts +3 -0
  136. package/lib/cjs/constants/LiveStream.js +6 -0
  137. package/lib/cjs/index.d.ts +12 -1
  138. package/lib/cjs/index.js +33 -6
  139. package/lib/cjs/shared/CopyTextArea/index.d.ts +2 -2
  140. package/lib/cjs/shared/CopyTextArea/index.js +8 -2
  141. package/lib/cjs/shared/EventInfoDetails/index.js +17 -1
  142. package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
  143. package/lib/cjs/shared/LiveStreamInfoDetails/index.d.ts +17 -0
  144. package/lib/cjs/shared/LiveStreamInfoDetails/index.js +53 -0
  145. package/lib/cjs/shared/Media/File/PreviewComponent.js +3 -4
  146. package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
  147. package/lib/cjs/shared/Media/Link/DisplayComponent.js +1 -4
  148. package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  149. package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
  150. package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
  151. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  152. package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
  153. package/lib/cjs/shared/UpScalingTierBadge/index.d.ts +7 -0
  154. package/lib/cjs/shared/UpScalingTierBadge/index.js +63 -0
  155. package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
  156. package/lib/cjs/types/composer.d.ts +1 -1
  157. package/lib/cjs/types/liveStream.d.ts +5 -0
  158. package/lib/cjs/types/liveStream.js +9 -0
  159. package/lib/cjs/utils/liveStream.d.ts +4 -0
  160. package/lib/cjs/utils/liveStream.js +25 -0
  161. package/lib/esm/assets/deafultCover.d.ts +2 -0
  162. package/lib/esm/assets/deafultCover.js +1 -0
  163. package/lib/esm/assets/liveStream/event.d.ts +2 -0
  164. package/lib/esm/assets/liveStream/event.js +1 -0
  165. package/lib/esm/assets/liveStream/live.d.ts +2 -0
  166. package/lib/esm/assets/liveStream/live.js +1 -0
  167. package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
  168. package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
  169. package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.js +89 -0
  170. package/lib/esm/components/CreateLiveStreamButton/index.d.ts +3 -0
  171. package/lib/esm/components/CreateLiveStreamButton/index.js +2 -0
  172. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
  173. package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +100 -0
  174. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
  175. package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +183 -0
  176. package/lib/esm/components/CreateLiveStreamDialog/constants.d.ts +1 -0
  177. package/lib/esm/components/CreateLiveStreamDialog/constants.js +1 -0
  178. package/lib/esm/components/CreateLiveStreamDialog/index.d.ts +3 -0
  179. package/lib/esm/components/CreateLiveStreamDialog/index.js +2 -0
  180. package/lib/esm/components/CreateLiveStreamDialog/types.d.ts +8 -0
  181. package/lib/esm/components/CreateLiveStreamDialog/types.js +10 -0
  182. package/lib/esm/components/Editor/Editor.d.ts +1 -1
  183. package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
  184. package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
  185. package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
  186. package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
  187. package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
  188. package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
  189. package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
  190. package/lib/esm/components/Editor/plugins/AutoLinkPlugin.js +8 -2
  191. package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
  192. package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
  193. package/lib/esm/components/EventForm/EventAddress.d.ts +4 -2
  194. package/lib/esm/components/EventForm/EventAddress.js +55 -8
  195. package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
  196. package/lib/esm/components/EventForm/EventForm.js +55 -15
  197. package/lib/esm/components/EventForm/types.d.ts +7 -6
  198. package/lib/esm/components/EventFormDialog/EventFormDialog.d.ts +1 -1
  199. package/lib/esm/components/EventFormDialog/EventFormDialog.js +3 -3
  200. package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +1 -1
  201. package/lib/esm/components/EventMediaWidget/EventMediaWidget.js +2 -2
  202. package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
  203. package/lib/esm/components/EventMembersWidget/TabContentComponent.js +1 -1
  204. package/lib/esm/components/EventMembersWidget/types.d.ts +1 -1
  205. package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +1 -1
  206. package/lib/esm/components/Feed/Feed.d.ts +2 -2
  207. package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
  208. package/lib/esm/components/FeedObject/Activities/Activities.js +1 -1
  209. package/lib/esm/components/LiveStream/LiveStream.d.ts +79 -0
  210. package/lib/esm/components/LiveStream/LiveStream.js +140 -0
  211. package/lib/esm/components/LiveStream/Skeleton.d.ts +46 -0
  212. package/lib/esm/components/LiveStream/Skeleton.js +89 -0
  213. package/lib/esm/components/LiveStream/constants.d.ts +1 -0
  214. package/lib/esm/components/LiveStream/constants.js +1 -0
  215. package/lib/esm/components/LiveStream/index.d.ts +4 -0
  216. package/lib/esm/components/LiveStream/index.js +4 -0
  217. package/lib/esm/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
  218. package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +189 -0
  219. package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
  220. package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +76 -0
  221. package/lib/esm/components/LiveStreamForm/constants.d.ts +15 -0
  222. package/lib/esm/components/LiveStreamForm/constants.js +15 -0
  223. package/lib/esm/components/LiveStreamForm/index.d.ts +3 -0
  224. package/lib/esm/components/LiveStreamForm/index.js +2 -0
  225. package/lib/esm/components/LiveStreamForm/types.d.ts +11 -0
  226. package/lib/esm/components/LiveStreamForm/types.js +1 -0
  227. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
  228. package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +196 -0
  229. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
  230. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +58 -0
  231. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
  232. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +73 -0
  233. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
  234. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +27 -0
  235. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
  236. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +9 -0
  237. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
  238. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +134 -0
  239. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
  240. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +6 -0
  241. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
  242. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +60 -0
  243. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
  244. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +212 -0
  245. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
  246. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +36 -0
  247. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
  248. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +245 -0
  249. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
  250. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +29 -0
  251. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
  252. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +30 -0
  253. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
  254. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +27 -0
  255. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
  256. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +147 -0
  257. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
  258. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +3 -0
  259. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
  260. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.js +2 -0
  261. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
  262. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +191 -0
  263. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
  264. package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +74 -0
  265. package/lib/esm/components/LiveStreamRoom/constants.d.ts +21 -0
  266. package/lib/esm/components/LiveStreamRoom/constants.js +21 -0
  267. package/lib/esm/components/LiveStreamRoom/index.d.ts +3 -0
  268. package/lib/esm/components/LiveStreamRoom/index.js +2 -0
  269. package/lib/esm/components/LiveStreamRoom/types.d.ts +22 -0
  270. package/lib/esm/components/LiveStreamRoom/types.js +4 -0
  271. package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
  272. package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
  273. package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
  274. package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
  275. package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +15 -0
  276. package/lib/esm/components/Notification/LiveStream/LiveStream.js +72 -0
  277. package/lib/esm/components/Notification/LiveStream/index.d.ts +3 -0
  278. package/lib/esm/components/Notification/LiveStream/index.js +2 -0
  279. package/lib/esm/components/Notification/Notification.js +5 -1
  280. package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
  281. package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
  282. package/lib/esm/components/PlatformWidget/constants.js +4 -0
  283. package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
  284. package/lib/esm/components/RelatedEventsWidget/RelatedEventsWidget.js +1 -1
  285. package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +4 -0
  286. package/lib/esm/components/ToastNotifications/ToastNotifications.js +6 -2
  287. package/lib/esm/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
  288. package/lib/esm/components/UserLiveStreamWidget/Skeleton.js +24 -0
  289. package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
  290. package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.js +130 -0
  291. package/lib/esm/components/UserLiveStreamWidget/constants.d.ts +1 -0
  292. package/lib/esm/components/UserLiveStreamWidget/constants.js +1 -0
  293. package/lib/esm/components/UserLiveStreamWidget/index.d.ts +4 -0
  294. package/lib/esm/components/UserLiveStreamWidget/index.js +4 -0
  295. package/lib/esm/constants/LiveStream.d.ts +3 -0
  296. package/lib/esm/constants/LiveStream.js +3 -0
  297. package/lib/esm/index.d.ts +12 -1
  298. package/lib/esm/index.js +13 -2
  299. package/lib/esm/shared/CopyTextArea/index.d.ts +2 -2
  300. package/lib/esm/shared/CopyTextArea/index.js +8 -2
  301. package/lib/esm/shared/EventInfoDetails/index.js +21 -5
  302. package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
  303. package/lib/esm/shared/LiveStreamInfoDetails/index.d.ts +17 -0
  304. package/lib/esm/shared/LiveStreamInfoDetails/index.js +50 -0
  305. package/lib/esm/shared/Media/File/PreviewComponent.js +3 -4
  306. package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
  307. package/lib/esm/shared/Media/Link/DisplayComponent.js +1 -4
  308. package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
  309. package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
  310. package/lib/esm/shared/StickyBox/index.d.ts +4 -4
  311. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
  312. package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
  313. package/lib/esm/shared/UpScalingTierBadge/index.d.ts +7 -0
  314. package/lib/esm/shared/UpScalingTierBadge/index.js +60 -0
  315. package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
  316. package/lib/esm/types/composer.d.ts +1 -1
  317. package/lib/esm/types/liveStream.d.ts +5 -0
  318. package/lib/esm/types/liveStream.js +6 -0
  319. package/lib/esm/utils/liveStream.d.ts +4 -0
  320. package/lib/esm/utils/liveStream.js +18 -0
  321. package/lib/umd/653.js +2 -0
  322. package/lib/umd/react-ui.js +1 -19
  323. package/lib/umd/react-ui.js.LICENSE.txt +2 -0
  324. package/package.json +22 -8
  325. package/lib/umd/314.js +0 -2
  326. /package/lib/umd/{314.js.LICENSE.txt → 653.js.LICENSE.txt} +0 -0
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const material_1 = require("@mui/material");
6
+ const styles_1 = require("@mui/material/styles");
7
+ const system_1 = require("@mui/system");
8
+ const react_core_1 = require("@selfcommunity/react-core");
9
+ const types_1 = require("@selfcommunity/types");
10
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
+ const constants_1 = require("./constants");
12
+ const components_react_1 = require("@livekit/components-react");
13
+ const react_1 = require("react");
14
+ const components_core_1 = require("@livekit/components-core");
15
+ const constants_2 = require("../constants");
16
+ const react_intl_1 = require("react-intl");
17
+ const VideoConference_1 = require("./VideoConference");
18
+ const LiveStreamProvider_1 = require("./LiveStreamProvider");
19
+ const DialogContent_1 = tslib_1.__importDefault(require("@mui/material/DialogContent"));
20
+ const BaseDialog_1 = tslib_1.__importDefault(require("../../../shared/BaseDialog"));
21
+ const notistack_1 = require("notistack");
22
+ const classes = {
23
+ root: `${constants_1.PREFIX}-root`,
24
+ logo: `${constants_1.PREFIX}-logo`,
25
+ title: `${constants_1.PREFIX}-title`,
26
+ content: `${constants_1.PREFIX}-content`,
27
+ endConferenceWrap: `${constants_1.PREFIX}-end-conference-wrap`,
28
+ btnBackHome: `${constants_1.PREFIX}-btn-back-home`,
29
+ actions: `${constants_1.PREFIX}-actions`,
30
+ error: `${constants_1.PREFIX}-error`
31
+ };
32
+ const Root = (0, styles_1.styled)(material_1.Box, {
33
+ name: constants_1.PREFIX,
34
+ slot: 'Root'
35
+ })(({ theme }) => ({}));
36
+ const DialogRoot = (0, styles_1.styled)(BaseDialog_1.default, {
37
+ name: constants_1.PREFIX,
38
+ slot: 'Root',
39
+ overridesResolver: (props, styles) => styles.dialogRoot
40
+ })(({ theme }) => ({}));
41
+ const PREFERENCES = [react_core_1.SCPreferences.LOGO_NAVBAR_LOGO];
42
+ /**
43
+ *> API documentation for the Community-JS LiveStreamVideoConference component. Learn about the available props and the CSS API.
44
+ *
45
+ #### Import
46
+ ```jsx
47
+ import {LiveStreamVideoConference} from '@selfcommunity/react-ui';
48
+ ```
49
+
50
+ #### Component Name
51
+ The name `LiveStreamVideoConference` can be used when providing style overrides in the theme.
52
+
53
+ #### CSS
54
+
55
+ |Rule Name|Global class|Description|
56
+ |---|---|---|
57
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
58
+
59
+ * @param inProps
60
+ */
61
+ function LiveStreamVideoConference(inProps) {
62
+ //PROPS
63
+ const props = (0, system_1.useThemeProps)({
64
+ props: inProps,
65
+ name: constants_1.PREFIX
66
+ });
67
+ const { className, handleOnLeaveRoom, userChoices = components_core_1.defaultUserChoices, connectionDetails = {}, LiveKitRoomComponentProps = {
68
+ /* simulateParticipants: true */
69
+ }, VideoConferenceComponentProps = {}, startConferenceEndContent, endConferenceEndContent, options = constants_2.defaultVideoOptions } = props, rest = tslib_1.__rest(props, ["className", "handleOnLeaveRoom", "userChoices", "connectionDetails", "LiveKitRoomComponentProps", "VideoConferenceComponentProps", "startConferenceEndContent", "endConferenceEndContent", "options"]);
70
+ // CONTEXT
71
+ const scUserContext = (0, react_core_1.useSCUser)();
72
+ const scRoutingContext = (0, react_core_1.useSCRouting)();
73
+ const scPreferences = (0, react_core_1.useSCPreferences)();
74
+ const { liveStream } = (0, LiveStreamProvider_1.useLiveStream)();
75
+ // STATE
76
+ const [liveActive, setLiveActive] = (0, react_1.useState)(true);
77
+ const [error, setError] = (0, react_1.useState)(null);
78
+ // PREFERENCES
79
+ const preferences = (0, react_1.useMemo)(() => {
80
+ const _preferences = {};
81
+ PREFERENCES.map((p) => (_preferences[p] = p in scPreferences.preferences ? scPreferences.preferences[p].value : null));
82
+ return _preferences;
83
+ }, [scPreferences.preferences]);
84
+ // PERMISSIONS
85
+ const canUseAudio = (0, react_1.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]);
86
+ const canUseVideo = (0, react_1.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]);
87
+ const canUseChat = (0, react_1.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]);
88
+ const canUseShareScreen = (0, react_1.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]);
89
+ const speakerFocused = (0, react_1.useMemo)(() => (scUserContext.user && liveStream && liveStream.settings.view === types_1.SCLiveStreamViewType.SPEAKER ? liveStream.host : null), [scUserContext, liveStream]);
90
+ const hideParticipantsList = (0, react_1.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]);
91
+ // CONNECT OPTIONS
92
+ const connectOptions = (0, react_1.useMemo)(() => {
93
+ return {
94
+ autoSubscribe: true
95
+ };
96
+ }, []);
97
+ // HANDLERS
98
+ /**
99
+ * Handle on leave
100
+ */
101
+ const handleOnLeave = (0, react_1.useCallback)(() => {
102
+ setLiveActive(false);
103
+ handleOnLeaveRoom === null || handleOnLeaveRoom === void 0 ? void 0 : handleOnLeaveRoom();
104
+ }, [handleOnLeaveRoom]);
105
+ /**
106
+ * Handle on error
107
+ */
108
+ const handleError = (0, react_1.useCallback)((error) => {
109
+ console.error(error);
110
+ if (error.message !== 'Client initiated disconnect') {
111
+ setError(`Encountered an unexpected error, check the console logs for details: ${error.message}`);
112
+ }
113
+ setLiveActive(false);
114
+ }, []);
115
+ /**
116
+ * Handle encryption error
117
+ */
118
+ const handleEncryptionError = (0, react_1.useCallback)((error) => {
119
+ console.error(error);
120
+ setError(`Encountered an unexpected encryption error, check the console logs for details: ${error.message}`);
121
+ setLiveActive(false);
122
+ }, []);
123
+ const handleBackHome = (0, react_1.useCallback)(() => {
124
+ (0, notistack_1.closeSnackbar)();
125
+ }, [notistack_1.closeSnackbar]);
126
+ /**
127
+ * User must be authenticated
128
+ */
129
+ if (!scUserContext.user || !connectionDetails) {
130
+ return (0, jsx_runtime_1.jsx)(material_1.CircularProgress, {});
131
+ }
132
+ /**
133
+ * Renders root object
134
+ */
135
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: liveActive && !error ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_react_1.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: (0, jsx_runtime_1.jsxs)(components_react_1.LayoutContextProvider, { children: [(0, jsx_runtime_1.jsx)(VideoConference_1.VideoConference, Object.assign({ chatMessageFormatter: components_react_1.formatChatMessageLinks }, (speakerFocused && { speakerFocused: liveStream.host }), VideoConferenceComponentProps, { disableMicrophone: !canUseAudio, disableCamera: !canUseVideo, disableChat: !canUseChat, disableShareScreen: !canUseShareScreen, hideParticipantsList: hideParticipantsList })), (0, jsx_runtime_1.jsx)(components_react_1.ConnectionState, {})] }) })) })) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: error ? ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ open: true, maxWidth: 'md', fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(DialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.endConferenceWrap }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), startConferenceEndContent, error, (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", color: "secondary", component: react_core_1.Link, to: '/', className: classes.btnBackHome }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.button.backHome", defaultMessage: "ui.liveStreamRoom.button.backHome" }) })), endConferenceEndContent] })) }) }))) : liveActive === false ? ((0, jsx_runtime_1.jsx)(DialogRoot, Object.assign({ open: true, maxWidth: 'md', fullWidth: true }, { children: (0, jsx_runtime_1.jsx)(DialogContent_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.endConferenceWrap }, { children: [(0, jsx_runtime_1.jsx)(react_core_1.Link, Object.assign({ to: scRoutingContext.url(react_core_1.SCRoutes.HOME_ROUTE_NAME, {}), className: classes.logo }, { children: (0, jsx_runtime_1.jsx)("img", { src: preferences[react_core_1.SCPreferences.LOGO_NAVBAR_LOGO], alt: "logo" }) })), startConferenceEndContent, (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "h5" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.conference.end", defaultMessage: "ui.liveStreamRoom.conference.end" }) })), (0, jsx_runtime_1.jsx)(material_1.Button, Object.assign({ variant: "contained", color: "secondary", component: react_core_1.Link, to: '/', onClick: handleBackHome, className: classes.btnBackHome }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.button.backHome", defaultMessage: "ui.liveStreamRoom.button.backHome" }) })), endConferenceEndContent] })) }) }))) : ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, {})) })) })));
136
+ }
137
+ exports.default = LiveStreamVideoConference;
@@ -0,0 +1,6 @@
1
+ import type { SVGProps } from 'react';
2
+ /**
3
+ * @internal
4
+ */
5
+ declare const SvgParticipantPlaceholder: (props: SVGProps<SVGSVGElement>) => JSX.Element;
6
+ export default SvgParticipantPlaceholder;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const jsx_runtime_1 = require("react/jsx-runtime");
4
+ /**
5
+ * @internal
6
+ */
7
+ const SvgParticipantPlaceholder = (props) => ((0, jsx_runtime_1.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: [(0, jsx_runtime_1.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 }), (0, jsx_runtime_1.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 })] })));
8
+ exports.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,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ParticipantTile = exports.TrackRefContextIfNeeded = exports.ParticipantContextIfNeeded = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const React = tslib_1.__importStar(require("react"));
7
+ const livekit_client_1 = require("livekit-client");
8
+ const components_core_1 = require("@livekit/components-core");
9
+ const components_react_1 = require("@livekit/components-react");
10
+ const ParticipantTileAvatar_1 = tslib_1.__importDefault(require("./ParticipantTileAvatar"));
11
+ const ParticipantTileActions_1 = tslib_1.__importDefault(require("./ParticipantTileActions"));
12
+ const react_core_1 = require("@selfcommunity/react-core");
13
+ /**
14
+ * The `ParticipantContextIfNeeded` component only creates a `ParticipantContext`
15
+ * if there is no `ParticipantContext` already.
16
+ */
17
+ function ParticipantContextIfNeeded(props) {
18
+ const hasContext = !!(0, components_react_1.useMaybeParticipantContext)();
19
+ return props.participant && !hasContext ? ((0, jsx_runtime_1.jsx)(components_react_1.ParticipantContext.Provider, Object.assign({ value: props.participant }, { children: props.children }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.children }));
20
+ }
21
+ exports.ParticipantContextIfNeeded = ParticipantContextIfNeeded;
22
+ /**
23
+ * Only create a `TrackRefContext` if there is no `TrackRefContext` already.
24
+ */
25
+ function TrackRefContextIfNeeded(props) {
26
+ const hasContext = !!(0, components_react_1.useMaybeTrackRefContext)();
27
+ return props.trackRef && !hasContext ? ((0, jsx_runtime_1.jsx)(components_react_1.TrackRefContext.Provider, Object.assign({ value: props.trackRef }, { children: props.children }))) : ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: props.children }));
28
+ }
29
+ exports.TrackRefContextIfNeeded = TrackRefContextIfNeeded;
30
+ /**
31
+ * The `ParticipantTile` component is the base utility wrapper for displaying a visual representation of a participant.
32
+ * This component can be used as a child of the `TrackLoop` component or by passing a track reference as property.
33
+ */
34
+ exports.ParticipantTile =
35
+ /* @__PURE__ */ React.forwardRef(function ParticipantTile(_a, ref) {
36
+ var _b, _c;
37
+ var { trackRef, children, onParticipantClick, disableSpeakingIndicator, disableTileActions = false } = _a, htmlProps = tslib_1.__rest(_a, ["trackRef", "children", "onParticipantClick", "disableSpeakingIndicator", "disableTileActions"]);
38
+ const scUserContext = (0, react_core_1.useSCUser)();
39
+ const trackReference = (0, components_react_1.useEnsureTrackRef)(trackRef);
40
+ const { elementProps } = (0, components_react_1.useParticipantTile)({
41
+ htmlProps,
42
+ disableSpeakingIndicator,
43
+ onParticipantClick,
44
+ trackRef: trackReference
45
+ });
46
+ const isEncrypted = (0, components_react_1.useIsEncrypted)(trackReference.participant);
47
+ const layoutContext = (0, components_react_1.useMaybeLayoutContext)();
48
+ const autoManageSubscription = (_b = (0, components_react_1.useFeatureContext)()) === null || _b === void 0 ? void 0 : _b.autoSubscription;
49
+ const handleSubscribe = React.useCallback((subscribed) => {
50
+ if (trackReference.source &&
51
+ !subscribed &&
52
+ layoutContext &&
53
+ layoutContext.pin.dispatch &&
54
+ (0, components_core_1.isTrackReferencePinned)(trackReference, layoutContext.pin.state)) {
55
+ layoutContext.pin.dispatch({ msg: 'clear_pin' });
56
+ }
57
+ }, [trackReference, layoutContext]);
58
+ return ((0, jsx_runtime_1.jsx)("div", Object.assign({ ref: ref, style: { position: 'relative' } }, elementProps, { children: (0, jsx_runtime_1.jsx)(TrackRefContextIfNeeded, Object.assign({ trackRef: trackReference }, { children: (0, jsx_runtime_1.jsxs)(ParticipantContextIfNeeded, Object.assign({ participant: trackReference.participant }, { children: [children !== null && children !== void 0 ? children : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, components_core_1.isTrackReference)(trackReference) &&
59
+ (((_c = trackReference.publication) === null || _c === void 0 ? void 0 : _c.kind) === 'video' ||
60
+ trackReference.source === livekit_client_1.Track.Source.Camera ||
61
+ trackReference.source === livekit_client_1.Track.Source.ScreenShare) ? ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_react_1.VideoTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe, manageSubscription: autoManageSubscription }) })) : ((0, components_core_1.isTrackReference)(trackReference) && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(components_react_1.AudioTrack, { trackRef: trackReference, onSubscriptionStatusChanged: handleSubscribe }) }))), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "lk-participant-placeholder" }, { children: (0, jsx_runtime_1.jsx)(ParticipantTileAvatar_1.default, { participant: trackReference.participant }) })), (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "lk-participant-metadata" }, { children: [(0, jsx_runtime_1.jsx)("div", Object.assign({ className: "lk-participant-metadata-item" }, { children: trackReference.source === livekit_client_1.Track.Source.Camera ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEncrypted && (0, jsx_runtime_1.jsx)(components_react_1.LockLockedIcon, { style: { marginRight: '0.25rem' } }), (0, jsx_runtime_1.jsx)(components_react_1.TrackMutedIndicator, { trackRef: {
62
+ participant: trackReference.participant,
63
+ source: livekit_client_1.Track.Source.Microphone
64
+ }, show: 'muted' }), (0, jsx_runtime_1.jsx)(components_react_1.ParticipantName, { children: !disableTileActions && (0, jsx_runtime_1.jsx)(ParticipantTileActions_1.default, {}) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_react_1.ScreenShareIcon, { style: { marginRight: '0.25rem' } }), (0, jsx_runtime_1.jsx)(components_react_1.ParticipantName, { children: "'s screen" })] })) })), (0, jsx_runtime_1.jsx)(components_react_1.ConnectionQualityIndicator, { className: "lk-participant-metadata-item" })] }))] })), (0, jsx_runtime_1.jsx)(components_react_1.FocusToggle, { trackRef: trackReference })] })) })) })));
65
+ });
@@ -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,215 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const styles_1 = require("@mui/material/styles");
7
+ const react_intl_1 = require("react-intl");
8
+ const Popper_1 = tslib_1.__importDefault(require("@mui/material/Popper"));
9
+ const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
10
+ const notistack_1 = require("notistack");
11
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
12
+ const material_1 = require("@mui/material");
13
+ const api_services_1 = require("@selfcommunity/api-services");
14
+ const react_core_1 = require("@selfcommunity/react-core");
15
+ const constants_1 = require("./constants");
16
+ const ConfirmDialog_1 = tslib_1.__importDefault(require("../../../shared/ConfirmDialog/ConfirmDialog"));
17
+ const components_react_1 = require("@livekit/components-react");
18
+ const LiveStreamProvider_1 = require("./LiveStreamProvider");
19
+ const utils_1 = require("@selfcommunity/utils");
20
+ const Errors_1 = require("../../../constants/Errors");
21
+ const PREFIX = 'SCParticipantTileActionsMenu';
22
+ const classes = {
23
+ root: `${PREFIX}-root`,
24
+ button: `${PREFIX}-button`,
25
+ popperRoot: `${PREFIX}-popper-root`,
26
+ paper: `${PREFIX}-paper`,
27
+ item: `${PREFIX}-item`,
28
+ itemText: `${PREFIX}-item-text`,
29
+ subItem: `${PREFIX}-sub-item`,
30
+ subItemText: `${PREFIX}-sub-item-text`,
31
+ footerSubItems: `${PREFIX}-footer-sub-items`,
32
+ selectedIcon: `${PREFIX}-selected-icon`,
33
+ sectionBadge: `${PREFIX}-section-badge`,
34
+ sectionWithSelectionIcon: `${PREFIX}-section-with-selection-icon`,
35
+ visibilityIcons: `${PREFIX}-visibility-icons`
36
+ };
37
+ const PopperRoot = (0, styles_1.styled)(Popper_1.default, {
38
+ name: PREFIX,
39
+ slot: 'Root',
40
+ overridesResolver: (props, styles) => styles.popperRoot
41
+ })(() => ({
42
+ '& .SCParticipantTileActionsMenu-paper': {
43
+ borderRadius: 5
44
+ }
45
+ }));
46
+ const Root = (0, styles_1.styled)(material_1.Box, {
47
+ name: PREFIX,
48
+ slot: 'Root',
49
+ overridesResolver: (props, styles) => styles.root
50
+ })(({ theme }) => ({
51
+ display: 'inline-block',
52
+ '& button': {
53
+ color: theme.palette.common.white
54
+ }
55
+ }));
56
+ function ContributionActionsMenu(props) {
57
+ // PROPS
58
+ const { className, participant, onRemoveParticipant, onBanParticipant, PopperProps = {} } = props, rest = tslib_1.__rest(props, ["className", "participant", "onRemoveParticipant", "onBanParticipant", "PopperProps"]);
59
+ // CONTEXT
60
+ const theme = (0, material_1.useTheme)();
61
+ const isMobile = (0, material_1.useMediaQuery)(theme.breakpoints.down('md'));
62
+ const scContext = (0, react_1.useContext)(react_core_1.SCContext);
63
+ const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
64
+ const { enqueueSnackbar } = (0, notistack_1.useSnackbar)();
65
+ const p = (0, components_react_1.useEnsureParticipant)(participant);
66
+ const { liveStream } = (0, LiveStreamProvider_1.useLiveStream)();
67
+ // GENERAL POPPER STATE
68
+ const [open, setOpen] = (0, react_1.useState)(false);
69
+ const [isLoading, setIsLoading] = (0, react_1.useState)(false);
70
+ // CONFIRM ACTION DIALOG STATE
71
+ const [openConfirmDialog, setOpenConfirmDialog] = (0, react_1.useState)(false);
72
+ const [currentAction, setCurrentAction] = (0, react_1.useState)(null);
73
+ const [currentActionLoading, setCurrentActionLoading] = (0, react_1.useState)(null);
74
+ // CONST
75
+ let popperRef = (0, react_1.useRef)(null);
76
+ /**
77
+ * Handles open popup
78
+ */
79
+ function handleOpen() {
80
+ if (scUserContext.user) {
81
+ setOpen(true);
82
+ }
83
+ else {
84
+ scContext.settings.handleAnonymousAction();
85
+ }
86
+ }
87
+ /**
88
+ * Closes popup
89
+ */
90
+ function handleClose() {
91
+ if (popperRef.current && popperRef.current.contains(event.target)) {
92
+ return;
93
+ }
94
+ setOpen(false);
95
+ if (rest.onClose) {
96
+ rest.onClose();
97
+ }
98
+ }
99
+ /**
100
+ * Perform ban participant
101
+ */
102
+ const performRemoveOrBanParticipant = (0, react_1.useMemo)(() => (ban = false) => tslib_1.__awaiter(this, void 0, void 0, function* () {
103
+ const res = yield api_services_1.LiveStreamApiClient.removeParticipant(liveStream.id, { participant_id: p.identity, ban });
104
+ if (res.status >= 300) {
105
+ return Promise.reject(res);
106
+ }
107
+ return yield Promise.resolve(res.data);
108
+ }), [p]);
109
+ /**
110
+ * Handle action
111
+ */
112
+ function handleAction(action) {
113
+ if ([constants_1.REMOVE_ROOM_USER, constants_1.BAN_ROOM_USER].indexOf(action) > -1) {
114
+ setCurrentAction(action);
115
+ setOpenConfirmDialog(true);
116
+ handleClose();
117
+ }
118
+ }
119
+ /**
120
+ * Perform additional operations at the end of single action
121
+ */
122
+ function performPostConfirmAction(success) {
123
+ if (success) {
124
+ setCurrentActionLoading(null);
125
+ setCurrentAction(null);
126
+ setOpenConfirmDialog(false);
127
+ enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.actionSuccess", defaultMessage: "ui.contributionActionMenu.actionSuccess" }), {
128
+ variant: 'success',
129
+ autoHideDuration: 3000
130
+ });
131
+ }
132
+ else {
133
+ setCurrentActionLoading(null);
134
+ enqueueSnackbar((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.contributionActionMenu.actionError", defaultMessage: "ui.contributionActionMenu.actionError" }), {
135
+ variant: 'error',
136
+ autoHideDuration: 3000
137
+ });
138
+ }
139
+ }
140
+ /**
141
+ * Delete a contribution
142
+ */
143
+ function handleConfirmedAction() {
144
+ if (p && !isLoading && !currentActionLoading) {
145
+ if (currentAction === constants_1.REMOVE_ROOM_USER) {
146
+ setCurrentActionLoading(constants_1.REMOVE_ROOM_USER);
147
+ performRemoveOrBanParticipant()
148
+ .then(() => {
149
+ onRemoveParticipant && onRemoveParticipant(p);
150
+ performPostConfirmAction(true);
151
+ })
152
+ .catch((error) => {
153
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
154
+ performPostConfirmAction(false);
155
+ });
156
+ }
157
+ else if (currentAction === constants_1.BAN_ROOM_USER) {
158
+ setCurrentActionLoading(constants_1.BAN_ROOM_USER);
159
+ performRemoveOrBanParticipant(true)
160
+ .then(() => {
161
+ onBanParticipant && onBanParticipant(p);
162
+ performPostConfirmAction(true);
163
+ })
164
+ .catch((error) => {
165
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, error);
166
+ performPostConfirmAction(false);
167
+ });
168
+ }
169
+ }
170
+ }
171
+ /**
172
+ * Can authenticated ban a user in a room
173
+ */
174
+ const canRemoveOrBanUser = (0, react_1.useMemo)(() => () => {
175
+ return (scUserContext.user &&
176
+ liveStream &&
177
+ p &&
178
+ p.identity &&
179
+ liveStream.host.id === scUserContext.user.id &&
180
+ scUserContext.user.id.toString() !== p.identity);
181
+ }, [scUserContext, liveStream, p]);
182
+ /**
183
+ * Renders section general
184
+ */
185
+ function renderGeneralSection() {
186
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: canRemoveOrBanUser() && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem, disabled: currentActionLoading === constants_1.REMOVE_ROOM_USER }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "person" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.removeRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.removeRoomUser" }), onClick: () => handleAction(constants_1.REMOVE_ROOM_USER), classes: { root: classes.itemText } })] })), (0, jsx_runtime_1.jsxs)(material_1.MenuItem, Object.assign({ className: classes.subItem, disabled: currentActionLoading === constants_1.BAN_ROOM_USER }, { children: [(0, jsx_runtime_1.jsx)(material_1.ListItemIcon, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "error" }) }), (0, jsx_runtime_1.jsx)(material_1.ListItemText, { primary: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.banRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.banRoomUser" }), onClick: () => handleAction(constants_1.BAN_ROOM_USER), classes: { root: classes.itemText } })] }))] })) }));
187
+ }
188
+ /**
189
+ * Renders contribution menu content
190
+ */
191
+ function renderContent() {
192
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { children: (0, jsx_runtime_1.jsx)(material_1.MenuList, { children: renderGeneralSection() }) }));
193
+ }
194
+ /**
195
+ * Renders component only if the logged user has actions available
196
+ */
197
+ if (!canRemoveOrBanUser()) {
198
+ return null;
199
+ }
200
+ /**
201
+ * Renders component
202
+ */
203
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsx)(material_1.IconButton, Object.assign({ ref: (ref) => {
204
+ popperRef.current = ref;
205
+ }, "aria-haspopup": "true", onClick: handleOpen, className: classes.button, size: "small" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "expand_more" }) })), isMobile ? ((0, jsx_runtime_1.jsx)(material_1.SwipeableDrawer, Object.assign({ open: open, onClose: handleClose, onOpen: handleOpen, anchor: "bottom", disableSwipeToOpen: true }, { children: renderContent() }))) : ((0, jsx_runtime_1.jsx)(PopperRoot, Object.assign({ open: open, anchorEl: popperRef.current, role: undefined, transition: true, className: classes.popperRoot }, PopperProps, { placement: "right" }, { children: ({ TransitionProps, placement }) => ((0, jsx_runtime_1.jsx)(material_1.Grow, Object.assign({}, TransitionProps, { style: { transformOrigin: placement === 'bottom' ? 'center top' : 'center bottom' } }, { children: (0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ variant: 'outlined', className: classes.paper }, { children: (0, jsx_runtime_1.jsx)(material_1.ClickAwayListener, Object.assign({ onClickAway: handleClose }, { children: renderContent() })) })) }))) }))), openConfirmDialog && ((0, jsx_runtime_1.jsx)(ConfirmDialog_1.default, Object.assign({ open: openConfirmDialog }, (currentAction === constants_1.REMOVE_ROOM_USER
206
+ ? {
207
+ content: ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.removeRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.removeRoomUser" }))
208
+ }
209
+ : currentAction === constants_1.BAN_ROOM_USER
210
+ ? {
211
+ content: ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamRoom.participantTileActions.banRoomUser", defaultMessage: "ui.liveStreamRoom.participantTileActions.banRoomUser" }))
212
+ }
213
+ : {}), { onConfirm: handleConfirmedAction, isUpdating: Boolean(currentActionLoading), onClose: () => setOpenConfirmDialog(false) })))] })));
214
+ }
215
+ exports.default = ContributionActionsMenu;
@@ -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;
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const styles_1 = require("@mui/material/styles");
6
+ const system_1 = require("@mui/system");
7
+ const material_1 = require("@mui/material");
8
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
9
+ const ParticipantPlaceholder_1 = tslib_1.__importDefault(require("./ParticipantPlaceholder"));
10
+ const react_core_1 = require("@selfcommunity/react-core");
11
+ const PREFIX = 'SCParticipantTileAvatar';
12
+ const classes = {
13
+ root: `${PREFIX}-root`
14
+ };
15
+ const Root = (0, styles_1.styled)(material_1.Box, {
16
+ name: PREFIX,
17
+ slot: 'Root',
18
+ overridesResolver: (props, styles) => styles.root
19
+ })(({ theme }) => ({
20
+ height: 'auto !important',
21
+ '& img': {
22
+ borderRadius: '50%',
23
+ width: 100,
24
+ height: 100
25
+ }
26
+ }));
27
+ function ParticipantTileAvatar(inProps) {
28
+ // PROPS
29
+ const props = (0, system_1.useThemeProps)({
30
+ props: inProps,
31
+ name: PREFIX
32
+ });
33
+ const { className, user, participant } = props, rest = tslib_1.__rest(props, ["className", "user", "participant"]);
34
+ // CONTEXT
35
+ const scContext = (0, react_core_1.useSCContext)();
36
+ // RENDER
37
+ return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ className: (0, classnames_1.default)(className, classes.root) }, rest, { children: user ? ((0, jsx_runtime_1.jsx)("img", { src: `${user.avatar}` })) : participant && participant.identity ? ((0, jsx_runtime_1.jsx)("img", { src: `${scContext.settings.portal}/api/v2/avatar/${participant.identity}` })) : ((0, jsx_runtime_1.jsx)(ParticipantPlaceholder_1.default, {})) })));
38
+ }
39
+ exports.default = ParticipantTileAvatar;
@@ -0,0 +1,55 @@
1
+ import type { CreateLocalTracksOptions, LocalAudioTrack, LocalTrack, LocalVideoTrack } from 'livekit-client';
2
+ import { Track } from 'livekit-client';
3
+ import * as React from 'react';
4
+ import type { LocalUserChoices } from '@livekit/components-core';
5
+ /**
6
+ * Props for the PreJoin component.
7
+ * @public
8
+ */
9
+ export interface PreJoinProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onSubmit' | 'onError'> {
10
+ /** This function is called with the `LocalUserChoices` if validation is passed. */
11
+ onSubmit?: (values: LocalUserChoices) => void;
12
+ /**
13
+ * Provide your custom validation function. Only if validation is successful the user choices are past to the onSubmit callback.
14
+ */
15
+ onValidate?: (values: LocalUserChoices) => boolean;
16
+ onError?: (error: Error) => void;
17
+ /** Prefill the input form with initial values. */
18
+ defaults?: Partial<LocalUserChoices>;
19
+ /** Display a debug window for your convenience. */
20
+ debug?: boolean;
21
+ joinLabel?: string;
22
+ micLabel?: string;
23
+ camLabel?: string;
24
+ userLabel?: string;
25
+ /**
26
+ * If true, user choices are persisted across sessions.
27
+ * @defaultValue true
28
+ * @alpha
29
+ */
30
+ persistUserChoices?: boolean;
31
+ }
32
+ /** @alpha */
33
+ export declare function usePreviewTracks(options: CreateLocalTracksOptions, onError?: (err: Error) => void): LocalTrack<Track.Kind>[];
34
+ /** @public */
35
+ export declare function usePreviewDevice<T extends LocalVideoTrack | LocalAudioTrack>(enabled: boolean, deviceId: string, kind: 'videoinput' | 'audioinput'): {
36
+ selectedDevice: MediaDeviceInfo;
37
+ localTrack: T;
38
+ deviceError: Error;
39
+ };
40
+ /**
41
+ * The `PreJoin` prefab component is normally presented to the user before he enters a room.
42
+ * This component allows the user to check and select the preferred media device (camera und microphone).
43
+ * On submit the user decisions are returned, which can then be passed on to the `LiveKitRoom` so that the user enters the room with the correct media devices.
44
+ *
45
+ * @remarks
46
+ * This component is independent of the `LiveKitRoom` component and should not be nested within it.
47
+ * Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <PreJoin />
52
+ * ```
53
+ * @public
54
+ */
55
+ export declare function PreJoin({ defaults, onValidate, onSubmit, onError, debug, joinLabel, micLabel, camLabel, userLabel, persistUserChoices, ...htmlProps }: PreJoinProps): JSX.Element;