@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,46 @@
1
+ import React from 'react';
2
+ import { SCLiveStreamTemplateType } from '../../types/liveStream';
3
+ import { WidgetProps } from '../Widget';
4
+ export interface LiveStreamSkeletonProps extends WidgetProps {
5
+ /**
6
+ * Overrides or extends the styles applied to the component.
7
+ * @default null
8
+ */
9
+ className?: string;
10
+ /**
11
+ * LiveStream template type
12
+ * @default 'preview'
13
+ */
14
+ template?: SCLiveStreamTemplateType;
15
+ /**
16
+ * Disable skeleton animation
17
+ */
18
+ skeletonsAnimation?: false | 'wave' | 'pulse';
19
+ /**
20
+ * Prop to pass an action to be rendered next to the skeleton
21
+ */
22
+ actions?: React.ReactNode;
23
+ }
24
+ /**
25
+ * > API documentation for the Community-JS LiveStream Skeleton component. Learn about the available props and the CSS API.
26
+
27
+ #### Import
28
+
29
+ ```jsx
30
+ import {LiveStreamSkeleton} from '@selfcommunity/react-ui';
31
+ ```
32
+
33
+ #### Component Name
34
+
35
+ The name `SCLiveStream-skeleton-root` can be used when providing style overrides in the theme.
36
+
37
+ #### CSS
38
+
39
+ |Rule Name|Global class|Description|
40
+ |---|---|---|
41
+ |root|.SCLiveStream-skeleton-root|Styles applied to the root element.|
42
+ |image|.SCLiveStream-skeleton-image|Styles applied to the image element.|
43
+ |action|.SCLiveStream-skeleton-action|Styles applied to action section.|
44
+ *
45
+ */
46
+ export default function LiveStreamSkeleton(inProps: LiveStreamSkeletonProps): JSX.Element;
@@ -0,0 +1,89 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { AvatarGroup, Box, Button, CardActions, CardContent, Divider, Icon, Stack, useTheme } from '@mui/material';
4
+ import Skeleton from '@mui/material/Skeleton';
5
+ import { styled } from '@mui/material/styles';
6
+ import { useThemeProps } from '@mui/system';
7
+ import classNames from 'classnames';
8
+ import BaseItem from '../../shared/BaseItem';
9
+ import { SCLiveStreamTemplateType } from '../../types/liveStream';
10
+ import Widget from '../Widget';
11
+ import { PREFIX } from './constants';
12
+ const classes = {
13
+ root: `${PREFIX}-skeleton-root`,
14
+ skeletonDetailRoot: `${PREFIX}-skeleton-detail-root`,
15
+ skeletonPreviewRoot: `${PREFIX}-skeleton-preview-root`,
16
+ skeletonSnippetRoot: `${PREFIX}-skeleton-snippet-root`,
17
+ skeletonDetailCalendar: `${PREFIX}-skeleton-detail-calendar`,
18
+ skeletonDetailContent: `${PREFIX}-skeleton-detail-content`,
19
+ skeletonDetailActions: `${PREFIX}-skeleton-detail-actions`,
20
+ skeletonDetailUser: `${PREFIX}-skeleton-detail-user`,
21
+ skeletonDetailFirstDivider: `${PREFIX}-skeleton-detail-first-divider`,
22
+ skeletonDetailSecondDivider: `${PREFIX}-skeleton-detail-second-divider`,
23
+ skeletonPreviewContent: `${PREFIX}-skeleton-preview-content`,
24
+ skeletonPreviewName: `${PREFIX}-skeleton-preview-name`,
25
+ skeletonPreviewActions: `${PREFIX}-skeleton-preview-actions`,
26
+ skeletonSnippetImage: `${PREFIX}-skeleton-snippet-image`,
27
+ skeletonSnippetAction: `${PREFIX}-skeleton-snippet-action`
28
+ };
29
+ const Root = styled(Widget, {
30
+ name: PREFIX,
31
+ slot: 'SkeletonRoot'
32
+ })(() => ({}));
33
+ const SkeletonDetailRoot = styled(Box, {
34
+ name: PREFIX,
35
+ slot: 'SkeletonDetailRoot'
36
+ })(() => ({}));
37
+ const SkeletonPreviewRoot = styled(Box, {
38
+ name: PREFIX,
39
+ slot: 'SkeletonPreviewRoot'
40
+ })(() => ({}));
41
+ const SkeletonSnippetRoot = styled(BaseItem, {
42
+ name: PREFIX,
43
+ slot: 'SkeletonSnippetRoot'
44
+ })(() => ({}));
45
+ /**
46
+ * > API documentation for the Community-JS LiveStream Skeleton component. Learn about the available props and the CSS API.
47
+
48
+ #### Import
49
+
50
+ ```jsx
51
+ import {LiveStreamSkeleton} from '@selfcommunity/react-ui';
52
+ ```
53
+
54
+ #### Component Name
55
+
56
+ The name `SCLiveStream-skeleton-root` can be used when providing style overrides in the theme.
57
+
58
+ #### CSS
59
+
60
+ |Rule Name|Global class|Description|
61
+ |---|---|---|
62
+ |root|.SCLiveStream-skeleton-root|Styles applied to the root element.|
63
+ |image|.SCLiveStream-skeleton-image|Styles applied to the image element.|
64
+ |action|.SCLiveStream-skeleton-action|Styles applied to action section.|
65
+ *
66
+ */
67
+ export default function LiveStreamSkeleton(inProps) {
68
+ // PROPS
69
+ const props = useThemeProps({
70
+ props: inProps,
71
+ name: PREFIX
72
+ });
73
+ const { className, template = SCLiveStreamTemplateType.SNIPPET, skeletonsAnimation = 'wave', actions } = props, rest = __rest(props, ["className", "template", "skeletonsAnimation", "actions"]);
74
+ const theme = useTheme();
75
+ /**
76
+ * Renders liveStream object
77
+ */
78
+ let contentObj;
79
+ if (template === SCLiveStreamTemplateType.DETAIL) {
80
+ contentObj = (_jsxs(SkeletonDetailRoot, Object.assign({ className: classes.skeletonDetailRoot }, { children: [_jsxs(Box, Object.assign({ position: "relative" }, { children: [_jsx(Skeleton, { variant: "rectangular", animation: skeletonsAnimation, width: "100%", height: "170px" }), _jsx(Skeleton, { className: classes.skeletonDetailCalendar, variant: "rounded", animation: skeletonsAnimation, width: "60px", height: "60px" })] })), _jsxs(CardContent, Object.assign({ className: classes.skeletonDetailContent }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, width: "36%", height: "40px" }), _jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "9px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "50%", height: "20px" })] })), _jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "9px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "35%", height: "20px" })] })), _jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "14px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "27%", height: "20px" })] })), _jsxs(Stack, Object.assign({ direction: "row", gap: "8px", className: classes.skeletonDetailUser }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "36px", height: "36px" }), _jsxs(Stack, Object.assign({ gap: "1px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, width: "75px", height: "15px" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "86px", height: "16px" })] }))] })), _jsx(Divider, { className: classes.skeletonDetailFirstDivider }), _jsxs(Stack, Object.assign({ direction: "row", gap: "8px", alignItems: "center", height: "28px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, width: "68px", height: "20px" }), _jsxs(AvatarGroup, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" })] })] })), _jsx(Divider, { className: classes.skeletonDetailSecondDivider })] })), _jsx(CardActions, Object.assign({ className: classes.skeletonDetailActions }, { children: actions !== undefined ? actions : _jsx(Skeleton, { variant: "rounded", width: 100, height: 30 }) }))] })));
81
+ }
82
+ else if (template === SCLiveStreamTemplateType.PREVIEW) {
83
+ contentObj = (_jsxs(SkeletonPreviewRoot, Object.assign({ className: classes.skeletonPreviewRoot }, { children: [_jsx(Box, Object.assign({ position: "relative" }, { children: _jsx(Skeleton, { variant: "rectangular", animation: skeletonsAnimation, width: "100%", height: "80px" }) })), _jsxs(CardContent, Object.assign({ className: classes.skeletonPreviewContent }, { children: [_jsxs(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px" }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: "21px", height: "21px" }), _jsx(Skeleton, { animation: skeletonsAnimation, width: "50%", height: "20px" })] })), _jsx(Skeleton, { animation: skeletonsAnimation, width: "67%", height: "25px", className: classes.skeletonPreviewName }), _jsx(Stack, Object.assign({ direction: "row", alignItems: "center", gap: "8px", marginBottom: "2px" }, { children: _jsx(Skeleton, { animation: skeletonsAnimation, width: "27%", height: "18px" }) })), _jsx(Stack, Object.assign({ direction: "row", gap: "8px", alignItems: "center" }, { children: _jsxs(AvatarGroup, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "circular", width: `${theme.selfcommunity.user.avatar.sizeSmall}px`, height: `${theme.selfcommunity.user.avatar.sizeSmall}px` })] }) }))] })), _jsx(CardActions, Object.assign({ className: classes.skeletonPreviewActions }, { children: actions !== undefined ? actions : _jsx(Skeleton, { variant: "rounded", width: 100, height: 30 }) }))] })));
84
+ }
85
+ else {
86
+ contentObj = (_jsx(SkeletonSnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.skeletonSnippetRoot, image: _jsxs(Box, Object.assign({ className: classes.skeletonSnippetImage }, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", width: 100, height: 60 }), " ", _jsx(Icon, Object.assign({ fontSize: "large" }, { children: "CalendarIcon" }))] })), primary: _jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: "40%", style: { marginBottom: 12 } }), secondary: _jsxs(_Fragment, { children: [_jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: "60%", style: { marginBottom: 10, marginRight: 5 } }), _jsx(Skeleton, { animation: skeletonsAnimation, variant: "rectangular", height: 10, width: "35%" })] }), actions: _jsx(_Fragment, { children: actions !== undefined ? (actions) : (_jsx(Button, Object.assign({ size: "small", variant: "outlined", disabled: true }, { children: _jsx(Skeleton, { animation: skeletonsAnimation, height: 10, width: 30, style: { marginTop: 5, marginBottom: 5 } }) }))) }) }));
87
+ }
88
+ return (_jsx(Root, Object.assign({ className: classNames(classes.root, className, `${PREFIX}-skeleton-${template}`) }, rest, { children: contentObj })));
89
+ }
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCLiveStream";
@@ -0,0 +1 @@
1
+ export const PREFIX = 'SCLiveStream';
@@ -0,0 +1,4 @@
1
+ import LiveStream, { LiveStreamProps } from './LiveStream';
2
+ import LiveStreamSkeleton, { LiveStreamSkeletonProps } from './Skeleton';
3
+ export default LiveStream;
4
+ export { LiveStreamProps, LiveStreamSkeleton, LiveStreamSkeletonProps };
@@ -0,0 +1,4 @@
1
+ import LiveStream from './LiveStream';
2
+ import LiveStreamSkeleton from './Skeleton';
3
+ export default LiveStream;
4
+ export { LiveStreamSkeleton };
@@ -0,0 +1,55 @@
1
+ import { BoxProps } from '@mui/material';
2
+ import { SCLiveStreamType } from '@selfcommunity/types';
3
+ export interface LiveStreamFormProps extends BoxProps {
4
+ /**
5
+ * Overrides or extends the styles applied to the component.
6
+ * @default null
7
+ */
8
+ className?: string;
9
+ /**
10
+ * Event Object
11
+ * @default null
12
+ */
13
+ liveStream?: SCLiveStreamType;
14
+ /**
15
+ * On success callback function
16
+ * @default null
17
+ */
18
+ onSuccess?: (data: SCLiveStreamType) => void;
19
+ /**
20
+ * On error callback function
21
+ * @default null
22
+ */
23
+ onError?: (error: any) => void;
24
+ /**
25
+ * Any other properties
26
+ */
27
+ [p: string]: any;
28
+ }
29
+ /**
30
+ *> API documentation for the Community-JS LiveStreamForm component. Learn about the available props and the CSS API.
31
+ *
32
+ #### Import
33
+ ```jsx
34
+ import {LiveStreamForm} from '@selfcommunity/react-ui';
35
+ ```
36
+
37
+ #### Component Name
38
+ The name `LiveStreamForm` can be used when providing style overrides in the theme.
39
+
40
+ #### CSS
41
+
42
+ |Rule Name|Global class|Description|
43
+ |---|---|---|
44
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
45
+ |title|.SCLiveStreamForm-title|Styles applied to the title element.|
46
+ |cover|.SCLiveStreamForm-cover|Styles applied to the cover field.|
47
+ |form|.SCLiveStreamForm-form|Styles applied to the form element.|
48
+ |name|.SCLiveStreamForm-name|Styles applied to the name field.|
49
+ |description|.SCLiveStreamForm-description|Styles applied to the description field.|
50
+ |content|.SCLiveStreamForm-content|Styles applied to the element.|
51
+ |error|.SCLiveStreamForm-error|Styles applied to the error elements.|
52
+
53
+ * @param inProps
54
+ */
55
+ export default function LiveStreamForm(inProps: LiveStreamFormProps): JSX.Element;
@@ -0,0 +1,189 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { LoadingButton } from '@mui/lab';
4
+ import { Alert, Box, FormGroup, Paper, TextField, Typography } from '@mui/material';
5
+ import { styled } from '@mui/material/styles';
6
+ import { useThemeProps } from '@mui/system';
7
+ import classNames from 'classnames';
8
+ import { useCallback, useState } from 'react';
9
+ import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
10
+ import { LIVE_STREAM_DESCRIPTION_MAX_LENGTH, LIVE_STREAM_TITLE_MAX_LENGTH, LIVE_STREAM_SLUG_MAX_LENGTH } from '../../constants/LiveStream';
11
+ import { LIVESTREAM_DEFAULT_SETTINGS, PREFIX } from './constants';
12
+ import UploadEventCover from '../EventForm/UploadEventCover';
13
+ import LiveStreamSettingsForm from './LiveStreamFormSettings';
14
+ import { formatHttpErrorCode, LiveStreamService } from '@selfcommunity/api-services';
15
+ import { SCOPE_SC_UI } from '../../constants/Errors';
16
+ import { Logger } from '@selfcommunity/utils';
17
+ import CoverPlaceholder from '../../assets/deafultCover';
18
+ const classes = {
19
+ root: `${PREFIX}-root`,
20
+ form: `${PREFIX}-form`,
21
+ title: `${PREFIX}-title`,
22
+ cover: `${PREFIX}-cover`,
23
+ slug: `${PREFIX}-slug`,
24
+ description: `${PREFIX}-description`,
25
+ content: `${PREFIX}-content`,
26
+ actions: `${PREFIX}-actions`,
27
+ error: `${PREFIX}-error`,
28
+ genericError: `${PREFIX}-generic-error`
29
+ };
30
+ const Root = styled(Box, {
31
+ name: PREFIX,
32
+ slot: 'Root'
33
+ })(({ theme }) => ({}));
34
+ const messages = defineMessages({
35
+ title: {
36
+ id: 'ui.liveStreamForm.title.placeholder',
37
+ defaultMessage: 'ui.liveStreamForm.title.placeholder'
38
+ },
39
+ slug: {
40
+ id: 'ui.liveStreamForm.slug.placeholder',
41
+ defaultMessage: 'ui.liveStreamForm.slug.placeholder'
42
+ },
43
+ description: {
44
+ id: 'ui.liveStreamForm.description.placeholder',
45
+ defaultMessage: 'ui.liveStreamForm.description.placeholder'
46
+ }
47
+ });
48
+ /**
49
+ *> API documentation for the Community-JS LiveStreamForm component. Learn about the available props and the CSS API.
50
+ *
51
+ #### Import
52
+ ```jsx
53
+ import {LiveStreamForm} from '@selfcommunity/react-ui';
54
+ ```
55
+
56
+ #### Component Name
57
+ The name `LiveStreamForm` can be used when providing style overrides in the theme.
58
+
59
+ #### CSS
60
+
61
+ |Rule Name|Global class|Description|
62
+ |---|---|---|
63
+ |root|.SCLiveStreamForm-root|Styles applied to the root element.|
64
+ |title|.SCLiveStreamForm-title|Styles applied to the title element.|
65
+ |cover|.SCLiveStreamForm-cover|Styles applied to the cover field.|
66
+ |form|.SCLiveStreamForm-form|Styles applied to the form element.|
67
+ |name|.SCLiveStreamForm-name|Styles applied to the name field.|
68
+ |description|.SCLiveStreamForm-description|Styles applied to the description field.|
69
+ |content|.SCLiveStreamForm-content|Styles applied to the element.|
70
+ |error|.SCLiveStreamForm-error|Styles applied to the error elements.|
71
+
72
+ * @param inProps
73
+ */
74
+ export default function LiveStreamForm(inProps) {
75
+ var _a, _b, _c;
76
+ //PROPS
77
+ const props = useThemeProps({
78
+ props: inProps,
79
+ name: PREFIX
80
+ });
81
+ const { className, onSuccess, onError, liveStream = null } = props, rest = __rest(props, ["className", "onSuccess", "onError", "liveStream"]);
82
+ // INTL
83
+ const intl = useIntl();
84
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
85
+ // @ts-ignore
86
+ const initialFieldState = {
87
+ title: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.title) || '',
88
+ description: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.description) || '',
89
+ slug: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.slug) || '',
90
+ settings: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.settings) || LIVESTREAM_DEFAULT_SETTINGS,
91
+ cover: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.cover) || '',
92
+ coverFile: (liveStream === null || liveStream === void 0 ? void 0 : liveStream.cover) || '',
93
+ isSubmitting: false
94
+ };
95
+ // STATE
96
+ const [field, setField] = useState(initialFieldState);
97
+ const [error, setError] = useState({});
98
+ const [genericError, setGenericError] = useState(null);
99
+ const _backgroundCover = Object.assign({}, (field.cover ? { background: `url('${field.cover}') center / cover` } : { background: `url('${CoverPlaceholder}') no-repeat 0 0 / 100% 100%` }));
100
+ const handleChangeCover = useCallback((cover) => {
101
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['coverFile']: cover })));
102
+ const reader = new FileReader();
103
+ reader.onloadend = () => {
104
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['cover']: reader.result })));
105
+ };
106
+ reader.readAsDataURL(cover);
107
+ if (error.coverError) {
108
+ delete error.coverError;
109
+ setError(error);
110
+ }
111
+ }, [error]);
112
+ const handleSubmit = useCallback(() => {
113
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: true })));
114
+ setGenericError(null);
115
+ const formData = new FormData();
116
+ if (field.coverFile) {
117
+ formData.append('cover', field.coverFile);
118
+ }
119
+ formData.append('title', field.title);
120
+ formData.append('description', field.description);
121
+ formData.append('slug', field.slug);
122
+ formData.append('settings', JSON.stringify(field.settings));
123
+ let liveStreamService;
124
+ if (liveStream) {
125
+ liveStreamService = LiveStreamService.update(liveStream.id, formData, {
126
+ headers: { 'Content-Type': 'multipart/form-data' }
127
+ });
128
+ }
129
+ else {
130
+ liveStreamService = LiveStreamService.create(formData, { headers: { 'Content-Type': 'multipart/form-data' } });
131
+ }
132
+ liveStreamService
133
+ .then((data) => {
134
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: false })));
135
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(data);
136
+ })
137
+ .catch((e) => {
138
+ const _error = formatHttpErrorCode(e);
139
+ if ('errorsError' in _error || !Object.keys(_error).length) {
140
+ setGenericError(intl.formatMessage({
141
+ id: 'ui.liveStreamForm.error.monthlyMinuteLimitReached',
142
+ defaultMessage: 'ui.liveStreamForm.error.monthlyMinuteLimitReached'
143
+ }));
144
+ }
145
+ else {
146
+ setGenericError(null);
147
+ }
148
+ let __errors = {};
149
+ if ('coverError' in _error) {
150
+ __errors = Object.assign(Object.assign({}, __errors), { ['coverError']: _jsx(FormattedMessage, { id: "ui.liveStreamForm.cover.error.invalid", defaultMessage: "ui.liveStreamForm.cover.error.invalid" }) });
151
+ }
152
+ if ('titleError' in _error) {
153
+ __errors = Object.assign(Object.assign({}, __errors), { ['titleError']: _jsx(FormattedMessage, { id: "ui.liveStreamForm.title.error.invalid", defaultMessage: "ui.liveStreamForm.title.error.invalid" }) });
154
+ }
155
+ if ('slugError' in _error) {
156
+ __errors = Object.assign(Object.assign({}, __errors), { ['slugError']: _jsx(FormattedMessage, { id: "ui.liveStreamForm.slug.error.invalid", defaultMessage: "ui.liveStreamForm.slug.error.invalid" }) });
157
+ }
158
+ setError(__errors);
159
+ setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: false })));
160
+ Logger.error(SCOPE_SC_UI, e);
161
+ onError === null || onError === void 0 ? void 0 : onError(e);
162
+ });
163
+ }, [field, onSuccess, onError]);
164
+ const handleChange = useCallback((event) => {
165
+ const { name, value } = event.target;
166
+ setField((prev) => (Object.assign(Object.assign({}, prev), { [name]: value })));
167
+ if (error[`${name}Error`]) {
168
+ delete error[`${name}Error`];
169
+ setError(error);
170
+ }
171
+ setGenericError(null);
172
+ }, [error, setGenericError]);
173
+ const handleChangeSettings = useCallback((data) => {
174
+ setField((prev) => (Object.assign(Object.assign({}, prev), { settings: data })));
175
+ }, [setField]);
176
+ /**
177
+ * Renders root object
178
+ */
179
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsx(Paper, Object.assign({ style: _backgroundCover, classes: { root: classes.cover } }, { children: _jsx(UploadEventCover, { isCreationMode: true, onChange: handleChangeCover }) })), Boolean(error['coverError']) && _jsx(Typography, Object.assign({ color: "error" }, { children: error['coverError'] })), _jsxs(FormGroup, Object.assign({ className: classes.form }, { children: [_jsx(TextField, { required: true, className: classes.title, placeholder: `${intl.formatMessage(messages.title)}`, margin: "normal", value: field.title, name: "title", onChange: handleChange, InputProps: {
180
+ endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: LIVE_STREAM_TITLE_MAX_LENGTH - field.title.length }))
181
+ }, error: Boolean(field.title.length > LIVE_STREAM_TITLE_MAX_LENGTH) || Boolean(error['titleError']), helperText: field.title.length > LIVE_STREAM_TITLE_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.title.error.maxLength", defaultMessage: "ui.liveStreamForm.title.error.maxLength" })) : error['titleError'] ? (error['titleError']) : null }), _jsx(TextField, { required: true, className: classes.slug, placeholder: `${intl.formatMessage(messages.slug)}`, margin: "normal", value: field.slug, name: "slug", onChange: handleChange, InputProps: {
182
+ endAdornment: _jsx(Typography, Object.assign({ variant: "body2" }, { children: LIVE_STREAM_SLUG_MAX_LENGTH - field.slug.length }))
183
+ }, error: Boolean(field.slug.length > LIVE_STREAM_SLUG_MAX_LENGTH) || Boolean(error['slugError']), helperText: field.title.length > LIVE_STREAM_SLUG_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.slug.error.maxLength", defaultMessage: "ui.liveStreamForm.slug.error.maxLength" })) : error['slugError'] ? (error['slugError']) : null }), _jsx(TextField, { multiline: true, rows: 4, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
184
+ endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_a = field.description) === null || _a === void 0 ? void 0 : _a.length) ? LIVE_STREAM_DESCRIPTION_MAX_LENGTH - field.description.length : LIVE_STREAM_DESCRIPTION_MAX_LENGTH })))
185
+ }, error: Boolean(((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH), helperText: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > LIVE_STREAM_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.description.error.maxLength", defaultMessage: "ui.liveStreamForm.description.error.maxLength" })) : null }), _jsx(LiveStreamSettingsForm, { settings: field.settings, onChange: handleChangeSettings }), genericError && (_jsx(Box, Object.assign({ className: classes.genericError }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.title ||
186
+ field.isSubmitting ||
187
+ field.title.length > LIVE_STREAM_TITLE_MAX_LENGTH ||
188
+ field.description.length > LIVE_STREAM_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: liveStream ? (_jsx(FormattedMessage, { id: "ui.liveStreamForm.button.edit", defaultMessage: "ui.liveStreamForm.button.edit" })) : (_jsx(FormattedMessage, { id: "ui.liveStreamForm.button.create", defaultMessage: "ui.liveStreamForm.button.create" })) })) }))] }))] })));
189
+ }
@@ -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,76 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Box, FormControl, Icon, InputLabel, MenuItem, Select, Stack, Switch, Typography } from '@mui/material';
4
+ import { styled } from '@mui/material/styles';
5
+ import { useThemeProps } from '@mui/system';
6
+ import { SCCommunitySubscriptionTier, SCFeatureName, SCLiveStreamViewType } from '@selfcommunity/types';
7
+ import classNames from 'classnames';
8
+ import { useContext, useMemo } from 'react';
9
+ import { FormattedMessage } from 'react-intl';
10
+ import { LIVESTREAM_DEFAULT_SETTINGS } from './constants';
11
+ import { SCPreferences, SCUserContext, useSCPreferences } from '@selfcommunity/react-core';
12
+ import UpScalingTierBadge from '../../shared/UpScalingTierBadge';
13
+ export const PREFIX = 'SCLiveStreamFormSettings';
14
+ const classes = {
15
+ root: `${PREFIX}-root`,
16
+ switch: `${PREFIX}-switch`,
17
+ switchLabel: `${PREFIX}-switch-Label`,
18
+ accessView: `${PREFIX}-access-view`,
19
+ accessViewIcon: `${PREFIX}-access-view-icon`
20
+ };
21
+ const Root = styled(Box, {
22
+ name: PREFIX,
23
+ slot: 'Root'
24
+ })(({ theme }) => ({}));
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) {
48
+ var _a;
49
+ //PROPS
50
+ const props = useThemeProps({
51
+ props: inProps,
52
+ name: PREFIX
53
+ });
54
+ const { className, settings = LIVESTREAM_DEFAULT_SETTINGS, onChange } = props, rest = __rest(props, ["className", "settings", "onChange"]);
55
+ // CONTEXT
56
+ const scUserContext = useContext(SCUserContext);
57
+ const { preferences, features } = useSCPreferences();
58
+ const liveStreamEnabled = useMemo(() => preferences &&
59
+ features &&
60
+ features.includes(SCFeatureName.LIVE_STREAM) &&
61
+ SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in preferences &&
62
+ preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [preferences, features]);
63
+ const authUserId = useMemo(() => (scUserContext.user ? scUserContext.user.id : null), [scUserContext.user]);
64
+ const isCommunityOwner = useMemo(() => authUserId === 1, [authUserId]);
65
+ const isEnterpriseTier = useMemo(() => preferences &&
66
+ SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
67
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
68
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.ENTERPRISE, [preferences]);
69
+ const isEnterpriseFeaturesVisible = useMemo(() => Boolean(isEnterpriseTier || isCommunityOwner), [isEnterpriseTier, isCommunityOwner]);
70
+ /**
71
+ * Renders root object
72
+ */
73
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, rest, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['muteParticipants']: !(settings === null || settings === void 0 ? void 0 : settings.muteParticipants) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.muteParticipants", defaultMessage: "ui.liveStreamForm.muteParticipants" }) }))] })), isEnterpriseFeaturesVisible && (_jsxs(_Fragment, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableVideo']: !(settings === null || settings === void 0 ? void 0 : settings.disableVideo) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableVideo", defaultMessage: "ui.liveStreamForm.disableVideo" }) })), _jsx(UpScalingTierBadge, { desiredTier: SCCommunitySubscriptionTier.ENTERPRISE })] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableShareScreen']: !(settings === null || settings === void 0 ? void 0 : settings.disableShareScreen) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableShareScreen", defaultMessage: "ui.liveStreamForm.disableShareScreen" }) })), _jsx(UpScalingTierBadge, { desiredTier: SCCommunitySubscriptionTier.ENTERPRISE })] }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['disableChat']: !(settings === null || settings === void 0 ? void 0 : settings.disableChat) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.disableChat", defaultMessage: "ui.liveStreamForm.disableChat" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['hideParticipantsList']: !(settings === null || settings === void 0 ? void 0 : settings.hideParticipantsList) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.hideParticipantsList", defaultMessage: "ui.liveStreamForm.hideParticipantsList" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['automaticallyNotifyFollowers']: !(settings === null || settings === void 0 ? void 0 : settings.automaticallyNotifyFollowers) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.automaticallyNotifyFollowers", defaultMessage: "ui.liveStreamForm.automaticallyNotifyFollowers" }) }))] })), _jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center" }, { children: [_jsx(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({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['showInProfile']: !(settings === null || settings === void 0 ? void 0 : settings.showInProfile) })) }), _jsx(Typography, Object.assign({ className: classes.switchLabel }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.showInProfile", defaultMessage: "ui.liveStreamForm.showInProfile" }) }))] })), _jsxs(FormControl, Object.assign({ className: classes.accessView }, { children: [_jsx(InputLabel, Object.assign({ id: "viewLabel" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.view.label", defaultMessage: "ui.liveStreamForm.view.label" }) })), _jsx(Select, Object.assign({ name: "view", label: _jsx(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 : SCLiveStreamViewType.SPEAKER, onChange: (e) => onChange(Object.assign(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), settings), { ['view']: e.target.value })), displayEmpty: true, renderValue: (selected) => {
74
+ return (_jsxs(_Fragment, { children: [_jsx(Icon, Object.assign({ className: classes.accessViewIcon }, { children: selected === SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${selected}`, defaultMessage: `ui.liveStreamForm.view.${selected}` })] }));
75
+ } }, { children: Object.values(SCLiveStreamViewType).map((f) => (_jsx(MenuItem, Object.assign({ value: f }, { children: _jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsxs("b", { children: [_jsx(Icon, Object.assign({ className: classes.accessViewIcon }, { children: f === SCLiveStreamViewType.SPEAKER ? 'upload' : 'category' })), "\u00A0", _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${f}`, defaultMessage: `ui.liveStreamForm.view.${f}` })] }) })), _jsx(Typography, { children: _jsx(FormattedMessage, { id: `ui.liveStreamForm.view.${f}.description`, defaultMessage: `ui.liveStreamForm.view.${f}.description` }) })] }) }), f))) }))] }))] })));
76
+ }
@@ -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,15 @@
1
+ import { SCLiveStreamViewType } from '@selfcommunity/types';
2
+ export const PREFIX = 'SCLiveStreamForm';
3
+ /**
4
+ * Default live stream settings
5
+ */
6
+ export const LIVESTREAM_DEFAULT_SETTINGS = {
7
+ muteParticipants: true,
8
+ hideParticipantsList: false,
9
+ automaticallyNotifyFollowers: false,
10
+ disableVideo: true,
11
+ disableChat: false,
12
+ disableShareScreen: true,
13
+ showInProfile: true,
14
+ view: SCLiveStreamViewType.SPEAKER
15
+ };
@@ -0,0 +1,3 @@
1
+ import LiveStreamForm, { LiveStreamFormProps } from './LiveStreamForm';
2
+ export default LiveStreamForm;
3
+ export { LiveStreamFormProps };
@@ -0,0 +1,2 @@
1
+ import LiveStreamForm from './LiveStreamForm';
2
+ export default LiveStreamForm;
@@ -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 @@
1
+ export {};