@selfcommunity/react-ui 0.10.5-alpha.0 → 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 +64 -16
  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 +65 -17
  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,192 @@
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 lab_1 = require("@mui/lab");
6
+ const material_1 = require("@mui/material");
7
+ const styles_1 = require("@mui/material/styles");
8
+ const system_1 = require("@mui/system");
9
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
10
+ const react_1 = require("react");
11
+ const react_intl_1 = require("react-intl");
12
+ const LiveStream_1 = require("../../constants/LiveStream");
13
+ const constants_1 = require("./constants");
14
+ const UploadEventCover_1 = tslib_1.__importDefault(require("../EventForm/UploadEventCover"));
15
+ const LiveStreamFormSettings_1 = tslib_1.__importDefault(require("./LiveStreamFormSettings"));
16
+ const api_services_1 = require("@selfcommunity/api-services");
17
+ const Errors_1 = require("../../constants/Errors");
18
+ const utils_1 = require("@selfcommunity/utils");
19
+ const deafultCover_1 = tslib_1.__importDefault(require("../../assets/deafultCover"));
20
+ const classes = {
21
+ root: `${constants_1.PREFIX}-root`,
22
+ form: `${constants_1.PREFIX}-form`,
23
+ title: `${constants_1.PREFIX}-title`,
24
+ cover: `${constants_1.PREFIX}-cover`,
25
+ slug: `${constants_1.PREFIX}-slug`,
26
+ description: `${constants_1.PREFIX}-description`,
27
+ content: `${constants_1.PREFIX}-content`,
28
+ actions: `${constants_1.PREFIX}-actions`,
29
+ error: `${constants_1.PREFIX}-error`,
30
+ genericError: `${constants_1.PREFIX}-generic-error`
31
+ };
32
+ const Root = (0, styles_1.styled)(material_1.Box, {
33
+ name: constants_1.PREFIX,
34
+ slot: 'Root'
35
+ })(({ theme }) => ({}));
36
+ const messages = (0, react_intl_1.defineMessages)({
37
+ title: {
38
+ id: 'ui.liveStreamForm.title.placeholder',
39
+ defaultMessage: 'ui.liveStreamForm.title.placeholder'
40
+ },
41
+ slug: {
42
+ id: 'ui.liveStreamForm.slug.placeholder',
43
+ defaultMessage: 'ui.liveStreamForm.slug.placeholder'
44
+ },
45
+ description: {
46
+ id: 'ui.liveStreamForm.description.placeholder',
47
+ defaultMessage: 'ui.liveStreamForm.description.placeholder'
48
+ }
49
+ });
50
+ /**
51
+ *> API documentation for the Community-JS LiveStreamForm component. Learn about the available props and the CSS API.
52
+ *
53
+ #### Import
54
+ ```jsx
55
+ import {LiveStreamForm} from '@selfcommunity/react-ui';
56
+ ```
57
+
58
+ #### Component Name
59
+ The name `LiveStreamForm` can be used when providing style overrides in the theme.
60
+
61
+ #### CSS
62
+
63
+ |Rule Name|Global class|Description|
64
+ |---|---|---|
65
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
66
+ |title|.SCLiveStreamForm-title|Styles applied to the title element.|
67
+ |cover|.SCLiveStreamForm-cover|Styles applied to the cover field.|
68
+ |form|.SCLiveStreamForm-form|Styles applied to the form element.|
69
+ |name|.SCLiveStreamForm-name|Styles applied to the name field.|
70
+ |description|.SCLiveStreamForm-description|Styles applied to the description field.|
71
+ |content|.SCLiveStreamForm-content|Styles applied to the element.|
72
+ |error|.SCLiveStreamForm-error|Styles applied to the error elements.|
73
+
74
+ * @param inProps
75
+ */
76
+ function LiveStreamForm(inProps) {
77
+ var _a, _b, _c;
78
+ //PROPS
79
+ const props = (0, system_1.useThemeProps)({
80
+ props: inProps,
81
+ name: constants_1.PREFIX
82
+ });
83
+ const { className, onSuccess, onError, liveStream = null } = props, rest = tslib_1.__rest(props, ["className", "onSuccess", "onError", "liveStream"]);
84
+ // INTL
85
+ const intl = (0, react_intl_1.useIntl)();
86
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
87
+ // @ts-ignore
88
+ const initialFieldState = {
89
+ title: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.title) || '',
90
+ description: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.description) || '',
91
+ slug: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.slug) || '',
92
+ settings: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) || constants_1.LIVESTREAM_DEFAULT_SETTINGS,
93
+ cover: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.cover) || '',
94
+ coverFile: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.cover) || '',
95
+ isSubmitting: false
96
+ };
97
+ // STATE
98
+ const [field, setField] = (0, react_1.useState)(initialFieldState);
99
+ const [error, setError] = (0, react_1.useState)({});
100
+ const [genericError, setGenericError] = (0, react_1.useState)(null);
101
+ const _backgroundCover = Object.assign({}, (field.cover ? { background: `url('${field.cover}') center / cover` } : { background: `url('${deafultCover_1.default}') no-repeat 0 0 / 100% 100%` }));
102
+ const handleChangeCover = (0, react_1.useCallback)((cover) => {
103
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['coverFile']: cover })));
104
+ const reader = new FileReader();
105
+ reader.onloadend = () => {
106
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['cover']: reader.result })));
107
+ };
108
+ reader.readAsDataURL(cover);
109
+ if (error.coverError) {
110
+ delete error.coverError;
111
+ setError(error);
112
+ }
113
+ }, [error]);
114
+ const handleSubmit = (0, react_1.useCallback)(() => {
115
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: true })));
116
+ setGenericError(null);
117
+ const formData = new FormData();
118
+ if (field.coverFile) {
119
+ formData.append('cover', field.coverFile);
120
+ }
121
+ formData.append('title', field.title);
122
+ formData.append('description', field.description);
123
+ formData.append('slug', field.slug);
124
+ formData.append('settings', JSON.stringify(field.settings));
125
+ let liveStreamService;
126
+ if (liveStream) {
127
+ liveStreamService = api_services_1.LiveStreamService.update(liveStream.id, formData, {
128
+ headers: { 'Content-Type': 'multipart/form-data' }
129
+ });
130
+ }
131
+ else {
132
+ liveStreamService = api_services_1.LiveStreamService.create(formData, { headers: { 'Content-Type': 'multipart/form-data' } });
133
+ }
134
+ liveStreamService
135
+ .then((data) => {
136
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: false })));
137
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(data);
138
+ })
139
+ .catch((e) => {
140
+ const _error = (0, api_services_1.formatHttpErrorCode)(e);
141
+ if ('errorsError' in _error || !Object.keys(_error).length) {
142
+ setGenericError(intl.formatMessage({
143
+ id: 'ui.liveStreamForm.error.monthlyMinuteLimitReached',
144
+ defaultMessage: 'ui.liveStreamForm.error.monthlyMinuteLimitReached'
145
+ }));
146
+ }
147
+ else {
148
+ setGenericError(null);
149
+ }
150
+ let __errors = {};
151
+ if ('coverError' in _error) {
152
+ __errors = Object.assign(Object.assign({}, __errors), { ['coverError']: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.cover.error.invalid", defaultMessage: "ui.liveStreamForm.cover.error.invalid" }) });
153
+ }
154
+ if ('titleError' in _error) {
155
+ __errors = Object.assign(Object.assign({}, __errors), { ['titleError']: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.title.error.invalid", defaultMessage: "ui.liveStreamForm.title.error.invalid" }) });
156
+ }
157
+ if ('slugError' in _error) {
158
+ __errors = Object.assign(Object.assign({}, __errors), { ['slugError']: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.slug.error.invalid", defaultMessage: "ui.liveStreamForm.slug.error.invalid" }) });
159
+ }
160
+ setError(__errors);
161
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: false })));
162
+ utils_1.Logger.error(Errors_1.SCOPE_SC_UI, e);
163
+ onError === null || onError === void 0 ? void 0 : onError(e);
164
+ });
165
+ }, [field, onSuccess, onError]);
166
+ const handleChange = (0, react_1.useCallback)((event) => {
167
+ const { name, value } = event.target;
168
+ setField((prev) => (Object.assign(Object.assign({}, prev), { [name]: value })));
169
+ if (error[`${name}Error`]) {
170
+ delete error[`${name}Error`];
171
+ setError(error);
172
+ }
173
+ setGenericError(null);
174
+ }, [error, setGenericError]);
175
+ const handleChangeSettings = (0, react_1.useCallback)((data) => {
176
+ setField((prev) => (Object.assign(Object.assign({}, prev), { settings: data })));
177
+ }, [setField]);
178
+ /**
179
+ * Renders root object
180
+ */
181
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: (0, jsx_runtime_1.jsx)(UploadEventCover_1.default, { isCreationMode: true, onChange: handleChangeCover }) })), Boolean(error['coverError']) && (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ color: "error" }, { children: error['coverError'] })), (0, jsx_runtime_1.jsxs)(material_1.FormGroup, Object.assign({ className: classes.form }, { children: [(0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.title, placeholder: `${intl.formatMessage(messages.title)}`, margin: "normal", value: field.title, name: "title", onChange: handleChange, InputProps: {
182
+ endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: LiveStream_1.LIVE_STREAM_TITLE_MAX_LENGTH - field.title.length }))
183
+ }, error: Boolean(field.title.length > LiveStream_1.LIVE_STREAM_TITLE_MAX_LENGTH) || Boolean(error['titleError']), helperText: field.title.length > LiveStream_1.LIVE_STREAM_TITLE_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.title.error.maxLength", defaultMessage: "ui.liveStreamForm.title.error.maxLength" })) : error['titleError'] ? (error['titleError']) : null }), (0, jsx_runtime_1.jsx)(material_1.TextField, { required: true, className: classes.slug, placeholder: `${intl.formatMessage(messages.slug)}`, margin: "normal", value: field.slug, name: "slug", onChange: handleChange, InputProps: {
184
+ endAdornment: (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: LiveStream_1.LIVE_STREAM_SLUG_MAX_LENGTH - field.slug.length }))
185
+ }, error: Boolean(field.slug.length > LiveStream_1.LIVE_STREAM_SLUG_MAX_LENGTH) || Boolean(error['slugError']), helperText: field.title.length > LiveStream_1.LIVE_STREAM_SLUG_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.slug.error.maxLength", defaultMessage: "ui.liveStreamForm.slug.error.maxLength" })) : error['slugError'] ? (error['slugError']) : null }), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, rows: 4, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
186
+ endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_a = field.description) === null || _a === void 0 ? void 0 : _a.length) ? LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH - field.description.length : LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH })))
187
+ }, error: Boolean(((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), (0, jsx_runtime_1.jsx)(LiveStreamFormSettings_1.default, { settings: field.settings, onChange: handleChangeSettings }), genericError && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.genericError }, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.title ||
188
+ field.isSubmitting ||
189
+ field.title.length > LiveStream_1.LIVE_STREAM_TITLE_MAX_LENGTH ||
190
+ field.description.length > LiveStream_1.LIVE_STREAM_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: liveStream ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.button.edit", defaultMessage: "ui.liveStreamForm.button.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.button.create", defaultMessage: "ui.liveStreamForm.button.create" })) })) }))] }))] })));
191
+ }
192
+ exports.default = LiveStreamForm;
@@ -0,0 +1,47 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { SCLiveStreamSettingsType } from '@selfcommunity/types';
3
+ export declare const PREFIX = "SCLiveStreamFormSettings";
4
+ export interface LiveStreamFormSettingsProps extends BoxProps {
5
+ /**
6
+ * Overrides or extends the styles applied to the component.
7
+ * @default null
8
+ */
9
+ className?: string;
10
+ /**
11
+ * Event Object
12
+ * @default null
13
+ */
14
+ settings?: SCLiveStreamSettingsType;
15
+ /**
16
+ * onChange callback
17
+ * @param data
18
+ */
19
+ onChange?: (data: any) => void;
20
+ /**
21
+ * Any other properties
22
+ */
23
+ [p: string]: any;
24
+ }
25
+ /**
26
+ *> API documentation for the Community-JS LiveStreamSettingsForm component. Learn about the available props and the CSS API.
27
+ *
28
+ #### Import
29
+ ```jsx
30
+ import {LiveStreamSettingsForm} from '@selfcommunity/react-ui';
31
+ ```
32
+
33
+ #### Component Name
34
+ The name `LiveStreamSettingsForm` can be used when providing style overrides in the theme.
35
+
36
+ #### CSS
37
+
38
+ |Rule Name|Global class|Description|
39
+ |---|---|---|
40
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
41
+ |switch|.SCLiveStreamForm-switch|Styles applied to the switch element.|
42
+ |switchLabel|.SCLiveStreamForm-switch-label|Styles applied to the switchLabel element.|
43
+ |accessView|.SCLiveStreamForm-access-view|Styles applied to the access view.|
44
+
45
+ * @param inProps
46
+ */
47
+ export default function LiveStreamSettingsForm(inProps: LiveStreamFormSettingsProps): JSX.Element;
@@ -0,0 +1,80 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREFIX = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("react/jsx-runtime");
6
+ const material_1 = require("@mui/material");
7
+ const styles_1 = require("@mui/material/styles");
8
+ const system_1 = require("@mui/system");
9
+ const types_1 = require("@selfcommunity/types");
10
+ const classnames_1 = tslib_1.__importDefault(require("classnames"));
11
+ const react_1 = require("react");
12
+ const react_intl_1 = require("react-intl");
13
+ const constants_1 = require("./constants");
14
+ const react_core_1 = require("@selfcommunity/react-core");
15
+ const UpScalingTierBadge_1 = tslib_1.__importDefault(require("../../shared/UpScalingTierBadge"));
16
+ exports.PREFIX = 'SCLiveStreamFormSettings';
17
+ const classes = {
18
+ root: `${exports.PREFIX}-root`,
19
+ switch: `${exports.PREFIX}-switch`,
20
+ switchLabel: `${exports.PREFIX}-switch-Label`,
21
+ accessView: `${exports.PREFIX}-access-view`,
22
+ accessViewIcon: `${exports.PREFIX}-access-view-icon`
23
+ };
24
+ const Root = (0, styles_1.styled)(material_1.Box, {
25
+ name: exports.PREFIX,
26
+ slot: 'Root'
27
+ })(({ theme }) => ({}));
28
+ /**
29
+ *> API documentation for the Community-JS LiveStreamSettingsForm component. Learn about the available props and the CSS API.
30
+ *
31
+ #### Import
32
+ ```jsx
33
+ import {LiveStreamSettingsForm} from '@selfcommunity/react-ui';
34
+ ```
35
+
36
+ #### Component Name
37
+ The name `LiveStreamSettingsForm` can be used when providing style overrides in the theme.
38
+
39
+ #### CSS
40
+
41
+ |Rule Name|Global class|Description|
42
+ |---|---|---|
43
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
44
+ |switch|.SCLiveStreamForm-switch|Styles applied to the switch element.|
45
+ |switchLabel|.SCLiveStreamForm-switch-label|Styles applied to the switchLabel element.|
46
+ |accessView|.SCLiveStreamForm-access-view|Styles applied to the access view.|
47
+
48
+ * @param inProps
49
+ */
50
+ function LiveStreamSettingsForm(inProps) {
51
+ var _a;
52
+ //PROPS
53
+ const props = (0, system_1.useThemeProps)({
54
+ props: inProps,
55
+ name: exports.PREFIX
56
+ });
57
+ const { className, settings = constants_1.LIVESTREAM_DEFAULT_SETTINGS, onChange } = props, rest = tslib_1.__rest(props, ["className", "settings", "onChange"]);
58
+ // CONTEXT
59
+ const scUserContext = (0, react_1.useContext)(react_core_1.SCUserContext);
60
+ const { preferences, features } = (0, react_core_1.useSCPreferences)();
61
+ const liveStreamEnabled = (0, react_1.useMemo)(() => preferences &&
62
+ features &&
63
+ features.includes(types_1.SCFeatureName.LIVE_STREAM) &&
64
+ react_core_1.SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in preferences &&
65
+ preferences[react_core_1.SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [preferences, features]);
66
+ const authUserId = (0, react_1.useMemo)(() => (scUserContext.user ? scUserContext.user.id : null), [scUserContext.user]);
67
+ const isCommunityOwner = (0, react_1.useMemo)(() => authUserId === 1, [authUserId]);
68
+ const isEnterpriseTier = (0, react_1.useMemo)(() => preferences &&
69
+ react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
70
+ preferences[react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
71
+ preferences[react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === types_1.SCCommunitySubscriptionTier.ENTERPRISE, [preferences]);
72
+ const isEnterpriseFeaturesVisible = (0, react_1.useMemo)(() => Boolean(isEnterpriseTier || isCommunityOwner), [isEnterpriseTier, isCommunityOwner]);
73
+ /**
74
+ * Renders root object
75
+ */
76
+ return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, rest, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, disabled: !liveStreamEnabled, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.muteParticipants), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['muteParticipants']: !(settings === null || settings === void 0 ? void 0 : settings.muteParticipants) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.muteParticipants", defaultMessage: "ui.liveStreamForm.muteParticipants" }) }))] })), isEnterpriseFeaturesVisible && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableVideo), disabled: !isEnterpriseTier || !liveStreamEnabled, onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableVideo']: !(settings === null || settings === void 0 ? void 0 : settings.disableVideo) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.disableVideo", defaultMessage: "ui.liveStreamForm.disableVideo" }) })), (0, jsx_runtime_1.jsx)(UpScalingTierBadge_1.default, { desiredTier: types_1.SCCommunitySubscriptionTier.ENTERPRISE })] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen), disabled: !isEnterpriseTier || !liveStreamEnabled, onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableShareScreen']: !(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.disableShareScreen", defaultMessage: "ui.liveStreamForm.disableShareScreen" }) })), (0, jsx_runtime_1.jsx)(UpScalingTierBadge_1.default, { desiredTier: types_1.SCCommunitySubscriptionTier.ENTERPRISE })] }))] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, disabled: !liveStreamEnabled, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.disableChat), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableChat']: !(settings === null || settings === void 0 ? void 0 : settings.disableChat) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.disableChat", defaultMessage: "ui.liveStreamForm.disableChat" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, disabled: !liveStreamEnabled, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['hideParticipantsList']: !(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.hideParticipantsList", defaultMessage: "ui.liveStreamForm.hideParticipantsList" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, disabled: !liveStreamEnabled, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['automaticallyNotifyFollowers']: !(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.automaticallyNotifyFollowers", defaultMessage: "ui.liveStreamForm.automaticallyNotifyFollowers" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, disabled: !liveStreamEnabled, checked: Boolean(settings === null || settings === void 0 ? void 0 : settings.showInProfile), onChange: () => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['showInProfile']: !(settings === null || settings === void 0 ? void 0 : settings.showInProfile) })) }), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ className: classes.switchLabel }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.showInProfile", defaultMessage: "ui.liveStreamForm.showInProfile" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.FormControl, Object.assign({ className: classes.accessView }, { children: [(0, jsx_runtime_1.jsx)(material_1.InputLabel, Object.assign({ id: "viewLabel" }, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }) })), (0, jsx_runtime_1.jsx)(material_1.Select, Object.assign({ name: "view", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }), labelId: "viewLabel", disabled: !liveStreamEnabled, fullWidth: true, value: (_a = settings === null || settings === void 0 ? void 0 : settings.view) !== null && _a !== void 0 ? _a : types_1.SCLiveStreamViewType.SPEAKER, onChange: (e) => onChange(Object.assign(Object.assign(Object.assign({}, constants_1.LIVESTREAM_DEFAULT_SETTINGS), settings), { ['view']: e.target.value })), displayEmpty: true, renderValue: (selected) => {
77
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.accessViewIcon }, { children: selected === types_1.SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.liveStreamForm.view.${selected}`, defaultMessage: `ui.liveStreamForm.view.${selected}` })] }));
78
+ } }, { children: Object.values(types_1.SCLiveStreamViewType).map((f) => ((0, jsx_runtime_1.jsx)(material_1.MenuItem, Object.assign({ value: f }, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { children: [(0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body1" }, { children: (0, jsx_runtime_1.jsxs)("b", { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, Object.assign({ className: classes.accessViewIcon }, { children: f === types_1.SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.liveStreamForm.view.${f}`, defaultMessage: `ui.liveStreamForm.view.${f}` })] }) })), (0, jsx_runtime_1.jsx)(material_1.Typography, { children: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: `ui.liveStreamForm.view.${f}.description`, defaultMessage: `ui.liveStreamForm.view.${f}.description` }) })] }) }), f))) }))] }))] })));
79
+ }
80
+ exports.default = LiveStreamSettingsForm;
@@ -0,0 +1,15 @@
1
+ import { SCLiveStreamViewType } from '@selfcommunity/types';
2
+ export declare const PREFIX = "SCLiveStreamForm";
3
+ /**
4
+ * Default live stream settings
5
+ */
6
+ export declare const LIVESTREAM_DEFAULT_SETTINGS: {
7
+ muteParticipants: boolean;
8
+ hideParticipantsList: boolean;
9
+ automaticallyNotifyFollowers: boolean;
10
+ disableVideo: boolean;
11
+ disableChat: boolean;
12
+ disableShareScreen: boolean;
13
+ showInProfile: boolean;
14
+ view: SCLiveStreamViewType;
15
+ };
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LIVESTREAM_DEFAULT_SETTINGS = exports.PREFIX = void 0;
4
+ const types_1 = require("@selfcommunity/types");
5
+ exports.PREFIX = 'SCLiveStreamForm';
6
+ /**
7
+ * Default live stream settings
8
+ */
9
+ exports.LIVESTREAM_DEFAULT_SETTINGS = {
10
+ muteParticipants: true,
11
+ hideParticipantsList: false,
12
+ automaticallyNotifyFollowers: false,
13
+ disableVideo: true,
14
+ disableChat: false,
15
+ disableShareScreen: true,
16
+ showInProfile: true,
17
+ view: types_1.SCLiveStreamViewType.SPEAKER
18
+ };
@@ -0,0 +1,3 @@
1
+ import LiveStreamForm, { LiveStreamFormProps } from './LiveStreamForm';
2
+ export default LiveStreamForm;
3
+ export { LiveStreamFormProps };
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const LiveStreamForm_1 = tslib_1.__importDefault(require("./LiveStreamForm"));
5
+ exports.default = LiveStreamForm_1.default;
@@ -0,0 +1,11 @@
1
+ export type InitialFieldState = {
2
+ title: string;
3
+ description: string;
4
+ slug?: string;
5
+ settings?: Record<string, any>;
6
+ cover?: string | ArrayBuffer;
7
+ coverFile?: string | Blob;
8
+ isSubmitting: boolean;
9
+ };
10
+ export type FieldStateKeys = keyof InitialFieldState;
11
+ export type FieldStateValues = InitialFieldState[FieldStateKeys];
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,85 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { SCLiveStreamType } from '@selfcommunity/types';
3
+ import { LocalUserChoices } from '@livekit/components-react';
4
+ import React from 'react';
5
+ import { ConnectionDetails } from './types';
6
+ import { LiveStreamVideoConferenceProps } from './LiveStreamVideoConference';
7
+ import '@livekit/components-styles';
8
+ export interface LiveStreamRoomProps extends BoxProps {
9
+ /**
10
+ * Overrides or extends the styles applied to the component.
11
+ * @default null
12
+ */
13
+ className?: string;
14
+ /**
15
+ * Event Object
16
+ * @default null
17
+ */
18
+ liveStream?: SCLiveStreamType;
19
+ /**
20
+ * Id of the liveStream for filter the feed
21
+ * @default null
22
+ */
23
+ liveStreamId?: number;
24
+ /**
25
+ * Element to be inserted before title
26
+ */
27
+ startPrejoinContent?: React.ReactNode | null;
28
+ /**
29
+ * Element to be inserted after title
30
+ */
31
+ endPrejoinContent?: React.ReactNode | null;
32
+ /**
33
+ * Show title of livestream in prejoin
34
+ */
35
+ showPrejoinTitle?: boolean;
36
+ /**
37
+ * Show description of livestream in prejoin
38
+ */
39
+ showPrejoinDescription?: boolean;
40
+ /**
41
+ * ConnectionDetails Object
42
+ * @default null
43
+ */
44
+ presetConnectionDetails?: ConnectionDetails;
45
+ /**
46
+ * LocalUserChoices Object
47
+ * @default null
48
+ */
49
+ presetPreJoinChoices?: LocalUserChoices;
50
+ /**
51
+ * Props to spread to LiveStreamVideoConference Component
52
+ * @default {}
53
+ */
54
+ LiveStreamVideoConferenceComponentProps?: LiveStreamVideoConferenceProps;
55
+ /**
56
+ * Any other properties
57
+ */
58
+ [p: string]: any;
59
+ }
60
+ /**
61
+ *> API documentation for the Community-JS LiveStreamRoom component. Learn about the available props and the CSS API.
62
+ *
63
+ #### Import
64
+ ```jsx
65
+ import {LiveStreamRoom} from '@selfcommunity/react-ui';
66
+ ```
67
+
68
+ #### Component Name
69
+ The name `LiveStreamRoom` can be used when providing style overrides in the theme.
70
+
71
+ #### CSS
72
+
73
+ |Rule Name|Global class|Description|
74
+ |---|---|---|
75
+ |root|.SCLiveStreamRoom-root|Styles applied to the root element.|
76
+ |title|.SCLiveStreamRoom-title|Styles applied to the title element.|
77
+ |description|.SCLiveStreamRoom-description|Styles applied to the description element.|
78
+ |content|.SCLiveStreamRoom-content|Styles applied to the content.|
79
+ |prejoin|.SCLiveStreamRoom-prejoin|Styles applied to the prejoin.|
80
+ |conference|.SCLiveStreamRoom-conference|Styles applied to the conference.|
81
+ |error|.SCLiveStreamRoom-error|Styles applied to the error elements.|
82
+
83
+ * @param inProps
84
+ */
85
+ export default function LiveStreamRoom(inProps: LiveStreamRoomProps): JSX.Element;