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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +91 -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 +54 -8
  35. package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
  36. package/lib/cjs/components/EventForm/EventForm.js +51 -13
  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 +75 -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 +10 -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 +88 -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 +54 -8
  195. package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
  196. package/lib/esm/components/EventForm/EventForm.js +51 -13
  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 +71 -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 +13 -4
  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,88 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Button, Icon } from '@mui/material';
4
+ import { styled } from '@mui/material/styles';
5
+ import { useThemeProps } from '@mui/system';
6
+ import { SCPreferences, SCUserContext, UserUtils, useSCPreferences } from '@selfcommunity/react-core';
7
+ import classNames from 'classnames';
8
+ import React, { useContext, useMemo } from 'react';
9
+ import { FormattedMessage } from 'react-intl';
10
+ import { SCCommunitySubscriptionTier } from '@selfcommunity/types';
11
+ import CreateLivestreamDialog from '../CreateLiveStreamDialog';
12
+ const PREFIX = 'SCCreateLivestreamButton';
13
+ const classes = {
14
+ root: `${PREFIX}-root`
15
+ };
16
+ const Root = styled(Button, {
17
+ name: PREFIX,
18
+ slot: 'Root',
19
+ overridesResolver: (props, styles) => styles.root
20
+ })(() => ({}));
21
+ /**
22
+ *> API documentation for the Community-JS CreateLiveStreamButton component. Learn about the available props and the CSS API.
23
+ *
24
+ #### Import
25
+ ```jsx
26
+ import {CreateLiveStreamButton} from '@selfcommunity/react-ui';
27
+ ```
28
+
29
+ #### Component Name
30
+ The name `SCCreateLiveStreamButton` can be used when providing style overrides in the theme.
31
+
32
+ #### CSS
33
+
34
+ |Rule Name|Global class|Description|
35
+ |---|---|---|
36
+ |root|.SCCreateLivestreamButton-root|Styles applied to the root element.|
37
+
38
+ * @param inProps
39
+ */
40
+ export default function CreateLiveStreamButton(inProps) {
41
+ //PROPS
42
+ const props = useThemeProps({
43
+ props: inProps,
44
+ name: PREFIX
45
+ });
46
+ const { className, CreateLiveStreamDialogComponentProps = {}, onSuccess, children } = props, rest = __rest(props, ["className", "CreateLiveStreamDialogComponentProps", "onSuccess", "children"]);
47
+ // CONTEXT
48
+ const scUserContext = useContext(SCUserContext);
49
+ const { preferences, features } = useSCPreferences();
50
+ // STATE
51
+ const [open, setOpen] = React.useState(false);
52
+ // CONST
53
+ const authUserId = useMemo(() => (scUserContext.user ? scUserContext.user.id : null), [scUserContext.user]);
54
+ const isStaff = useMemo(() => scUserContext.user && UserUtils.isStaff(scUserContext.user), [scUserContext.user]);
55
+ const isCommunityOwner = useMemo(() => authUserId === 1, [authUserId]);
56
+ const isFreeTrialTier = useMemo(() => preferences &&
57
+ SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
58
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
59
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.FREE_TRIAL, [preferences]);
60
+ const liveStreamEnabled = useMemo(() => preferences &&
61
+ features &&
62
+ SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in preferences &&
63
+ preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [preferences, features]);
64
+ const onlyStaffEnabled = useMemo(() => preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ONLY_STAFF_ENABLED].value, [preferences]);
65
+ /**
66
+ * Handle close
67
+ */
68
+ const handleClose = () => {
69
+ setOpen((o) => !o);
70
+ };
71
+ /**
72
+ * Handle close
73
+ */
74
+ const handleSuccess = (data) => {
75
+ onSuccess && onSuccess(data);
76
+ setOpen((o) => !o);
77
+ };
78
+ /**
79
+ * If there's no authUserId, component is hidden.
80
+ */
81
+ if (!liveStreamEnabled || !authUserId || (onlyStaffEnabled && !isStaff) || (isFreeTrialTier && !isCommunityOwner)) {
82
+ return null;
83
+ }
84
+ /**
85
+ * Renders root object
86
+ */
87
+ return (_jsxs(React.Fragment, { children: [_jsx(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleClose, variant: "contained", color: "secondary", startIcon: _jsx(Icon, { children: "photo_camera" }) }, rest, { children: children !== null && children !== void 0 ? children : _jsx(FormattedMessage, { id: "ui.createEventButton.goLive", defaultMessage: "ui.createEventButton.goLive" }) })), open && _jsx(CreateLivestreamDialog, Object.assign({ open: true, onClose: handleClose, onSuccess: handleSuccess }, CreateLiveStreamDialogComponentProps))] }));
88
+ }
@@ -0,0 +1,3 @@
1
+ import CreateLiveStreamButton, { CreateLiveStreamButtonProps } from './CreateLiveStreamButton';
2
+ export default CreateLiveStreamButton;
3
+ export { CreateLiveStreamButtonProps };
@@ -0,0 +1,2 @@
1
+ import CreateLiveStreamButton from './CreateLiveStreamButton';
2
+ export default CreateLiveStreamButton;
@@ -0,0 +1,49 @@
1
+ import { SCEventType, SCLiveStreamType } from '@selfcommunity/types';
2
+ import { BaseDialogProps } from '../../shared/BaseDialog';
3
+ export interface CreateLiveStreamDialogProps extends BaseDialogProps {
4
+ /**
5
+ * Overrides or extends the styles applied to the component.
6
+ * @default null
7
+ */
8
+ className?: string;
9
+ /**
10
+ * Open dialog
11
+ * @default true
12
+ */
13
+ open?: boolean;
14
+ /**
15
+ * On dialog close callback function
16
+ * @default null
17
+ */
18
+ onClose?: () => void;
19
+ /**
20
+ * On success callback function
21
+ * @default null
22
+ */
23
+ onSuccess?: (data: SCEventType | SCLiveStreamType) => void;
24
+ /**
25
+ * Any other properties
26
+ */
27
+ [p: string]: any;
28
+ }
29
+ /**
30
+ *> API documentation for the Community-JS CreateLiveStreamDialog component. Learn about the available props and the CSS API.
31
+ *
32
+ #### Import
33
+ ```jsx
34
+ import {CreateLivestreamDialog} from '@selfcommunity/react-ui';
35
+ ```
36
+
37
+ #### Component Name
38
+ The name `SCCreateLivestreamDialog` can be used when providing style overrides in the theme.
39
+
40
+ #### CSS
41
+
42
+ |Rule Name|Global class|Description|
43
+ |---|---|---|
44
+ |root|.SCCreateLivestreamDialog-root|Styles applied to the root element.|
45
+ |content|.SCCreateLivestreamDialog-content|Styles applied to the content element.|
46
+
47
+ * @param inProps
48
+ */
49
+ export default function CreateLiveStreamDialog(inProps: CreateLiveStreamDialogProps): JSX.Element;
@@ -0,0 +1,100 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import React, { useCallback, useEffect, useMemo, useState } from 'react';
4
+ import { styled } from '@mui/material/styles';
5
+ import { useThemeProps } from '@mui/system';
6
+ import { useSCUser } from '@selfcommunity/react-core';
7
+ import { SCEventLocationType } from '@selfcommunity/types';
8
+ import classNames from 'classnames';
9
+ import { FormattedMessage } from 'react-intl';
10
+ import BaseDialog from '../../shared/BaseDialog';
11
+ import { PREFIX } from './constants';
12
+ import EventForm from '../EventForm';
13
+ import LiveStreamSelector from './LiveStreamSelector/LiveStreamSelector';
14
+ import { CreateLiveStreamStep, LiveStreamType } from './types';
15
+ import LiveStreamForm from '../LiveStreamForm';
16
+ import Slide from '@mui/material/Slide';
17
+ import { Box, Button, Icon } from '@mui/material';
18
+ const classes = {
19
+ root: `${PREFIX}-root`,
20
+ title: `${PREFIX}-title`,
21
+ content: `${PREFIX}-content`
22
+ };
23
+ const Root = styled(BaseDialog, {
24
+ name: PREFIX,
25
+ slot: 'Root'
26
+ })(({ theme }) => ({
27
+ paddingBottom: '0px !important',
28
+ [`& .${classes.title}`]: {
29
+ display: 'flex'
30
+ },
31
+ [`& .${classes.content}`]: {
32
+ paddingBottom: 0
33
+ }
34
+ }));
35
+ const Transition = React.forwardRef(function Transition(props, ref) {
36
+ return _jsx(Slide, Object.assign({ direction: "up", ref: ref }, props));
37
+ });
38
+ /**
39
+ *> API documentation for the Community-JS CreateLiveStreamDialog component. Learn about the available props and the CSS API.
40
+ *
41
+ #### Import
42
+ ```jsx
43
+ import {CreateLivestreamDialog} from '@selfcommunity/react-ui';
44
+ ```
45
+
46
+ #### Component Name
47
+ The name `SCCreateLivestreamDialog` can be used when providing style overrides in the theme.
48
+
49
+ #### CSS
50
+
51
+ |Rule Name|Global class|Description|
52
+ |---|---|---|
53
+ |root|.SCCreateLivestreamDialog-root|Styles applied to the root element.|
54
+ |content|.SCCreateLivestreamDialog-content|Styles applied to the content element.|
55
+
56
+ * @param inProps
57
+ */
58
+ export default function CreateLiveStreamDialog(inProps) {
59
+ var _a, _b;
60
+ //PROPS
61
+ const props = useThemeProps({
62
+ props: inProps,
63
+ name: PREFIX
64
+ });
65
+ const { className, open = true, onClose, onSuccess } = props, rest = __rest(props, ["className", "open", "onClose", "onSuccess"]);
66
+ // CONTEXT
67
+ const scUserContext = useSCUser();
68
+ const canCreateLiveStream = useMemo(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_live_stream; }, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission]);
69
+ const canCreateEvent = useMemo(() => { var _a, _b; return (_b = (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission) === null || _b === void 0 ? void 0 : _b.create_event; }, [(_b = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _b === void 0 ? void 0 : _b.permission]);
70
+ // STATE
71
+ const [step, setStep] = useState(canCreateEvent ? CreateLiveStreamStep.SELECT_TYPE : CreateLiveStreamStep.CREATE_LIVE);
72
+ const [liveType, setLiveType] = useState(canCreateEvent ? null : LiveStreamType.DIRECT_LIVE);
73
+ // HANDLER
74
+ const handleLiveTypeSelected = useCallback((l) => {
75
+ setLiveType(l);
76
+ }, []);
77
+ const handleLiveTypeSelectedNext = useCallback((l) => {
78
+ setLiveType(l);
79
+ setStep(CreateLiveStreamStep.CREATE_LIVE);
80
+ }, []);
81
+ const handleBack = useCallback((l) => {
82
+ setStep(CreateLiveStreamStep.SELECT_TYPE);
83
+ }, []);
84
+ const handleSubmit = useCallback((e) => {
85
+ onSuccess && onSuccess(e);
86
+ }, []);
87
+ useEffect(() => {
88
+ if (!canCreateEvent) {
89
+ setLiveType(LiveStreamType.DIRECT_LIVE);
90
+ }
91
+ }, [canCreateEvent]);
92
+ // user must be logged
93
+ if (!scUserContext.user || !canCreateLiveStream) {
94
+ return null;
95
+ }
96
+ /**
97
+ * Renders root object
98
+ */
99
+ return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, maxWidth: 'md', title: _jsxs(Box, Object.assign({ className: classes.title, component: 'span' }, { children: [Boolean(step === CreateLiveStreamStep.CREATE_LIVE && canCreateEvent) && (_jsx(Button, Object.assign({ variant: "text", onClick: handleBack, startIcon: _jsx(Icon, { children: "arrow_back" }) }, { children: "Back" }))), _jsx(Box, Object.assign({ component: 'span' }, { children: _jsx(FormattedMessage, { id: "ui.createLivestreamDialog.title", defaultMessage: "ui.createLivestreamDialog.title" }) }))] })), fullWidth: true, open: open, scroll: 'paper', onClose: onClose, className: classNames(classes.root, className), TransitionComponent: Transition, PaperProps: { elevation: 0 } }, rest, { children: _jsxs(Box, Object.assign({ className: classes.content }, { children: [step === CreateLiveStreamStep.SELECT_TYPE && (_jsx(LiveStreamSelector, { liveSelected: liveType, onLiveSelected: handleLiveTypeSelected, onNext: handleLiveTypeSelectedNext })), step === CreateLiveStreamStep.CREATE_LIVE && (_jsx(_Fragment, { children: liveType === LiveStreamType.EVENT_LIVE ? (_jsx(EventForm, { EventAddressComponentProps: { locations: [SCEventLocationType.LIVESTREAM] }, onSuccess: handleSubmit })) : (_jsx(LiveStreamForm, { onSuccess: handleSubmit })) }))] })) })));
100
+ }
@@ -0,0 +1,47 @@
1
+ import { LiveStreamType } from '../types';
2
+ export declare const PREFIX = "SCLiveStreamSelector";
3
+ export interface LiveStreamSelectorProps {
4
+ /**
5
+ * Overrides or extends the styles applied to the component.
6
+ * @default null
7
+ */
8
+ className?: string;
9
+ /**
10
+ * Option selected
11
+ */
12
+ liveSelected?: LiveStreamType;
13
+ /**
14
+ * Callback on selected option
15
+ * @param LiveStreamType
16
+ */
17
+ onLiveSelected?: (live: LiveStreamType) => void;
18
+ /**
19
+ * On success callback function
20
+ * @default null
21
+ */
22
+ onNext?: (live: LiveStreamType) => void;
23
+ /**
24
+ * Any other properties
25
+ */
26
+ [p: string]: any;
27
+ }
28
+ /**
29
+ *> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
30
+ *
31
+ #### Import
32
+ ```jsx
33
+ import {LiveStreamSelector} from '@selfcommunity/react-ui';
34
+ ```
35
+
36
+ #### Component Name
37
+ The name `SCLiveStreamSelector` can be used when providing style overrides in the theme.
38
+
39
+ #### CSS
40
+
41
+ |Rule Name|Global class|Description|
42
+ |---|---|---|
43
+ |root|.SCCreateLivestreamDialog-root|Styles applied to the root element.|
44
+
45
+ * @param inProps
46
+ */
47
+ export default function LiveStreamSelector(inProps: LiveStreamSelectorProps): JSX.Element;
@@ -0,0 +1,183 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useMemo, useState } from 'react';
3
+ import { styled } from '@mui/material/styles';
4
+ import { Box, Typography, Button, Paper, Container, Radio, Alert } from '@mui/material';
5
+ import Icon from '@mui/material/Icon';
6
+ import { useThemeProps } from '@mui/system';
7
+ import classNames from 'classnames';
8
+ import { LiveStreamType } from '../types';
9
+ import { useSnackbar } from 'notistack';
10
+ import { FormattedMessage, useIntl } from 'react-intl';
11
+ import EventImage from '../../../assets/liveStream/event';
12
+ import LiveImage from '../../../assets/liveStream/live';
13
+ import { LiveStreamApiClient } from '@selfcommunity/api-services';
14
+ import { WARNING_THRESHOLD_EXPIRING_SOON } from '../../LiveStreamRoom/constants';
15
+ import { Link, SCPreferences, useSCContext, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
16
+ import { SCCommunitySubscriptionTier } from '@selfcommunity/types';
17
+ import { SELFCOMMUNITY_PRICING } from '../../PlatformWidget/constants';
18
+ export const PREFIX = 'SCLiveStreamSelector';
19
+ const classes = {
20
+ root: `${PREFIX}-root`,
21
+ warning: `${PREFIX}-warning`,
22
+ options: `${PREFIX}-options`,
23
+ actions: `${PREFIX}-actions`
24
+ };
25
+ const Root = styled(Container, {
26
+ name: PREFIX,
27
+ slot: 'Root'
28
+ })(({ theme }) => ({}));
29
+ // Styled components
30
+ const OptionCard = styled(Paper, {
31
+ name: PREFIX,
32
+ slot: 'optionCardRoot',
33
+ shouldForwardProp: (prop) => prop !== 'selected'
34
+ })(({ theme, selected }) => ({}));
35
+ const FeatureItem = styled(Box, {
36
+ name: PREFIX,
37
+ slot: 'featureItemRoot'
38
+ })(({ theme }) => ({}));
39
+ /**
40
+ *> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
41
+ *
42
+ #### Import
43
+ ```jsx
44
+ import {LiveStreamSelector} from '@selfcommunity/react-ui';
45
+ ```
46
+
47
+ #### Component Name
48
+ The name `SCLiveStreamSelector` can be used when providing style overrides in the theme.
49
+
50
+ #### CSS
51
+
52
+ |Rule Name|Global class|Description|
53
+ |---|---|---|
54
+ |root|.SCCreateLivestreamDialog-root|Styles applied to the root element.|
55
+
56
+ * @param inProps
57
+ */
58
+ export default function LiveStreamSelector(inProps) {
59
+ //PROPS
60
+ const props = useThemeProps({
61
+ props: inProps,
62
+ name: PREFIX
63
+ });
64
+ const { className, liveSelected, onLiveSelected, onNext } = props;
65
+ // CONTEXT
66
+ const scContext = useSCContext();
67
+ const scUserContext = useSCUser();
68
+ const { enqueueSnackbar } = useSnackbar();
69
+ // STATE
70
+ const [selectedOption, setSelectedOption] = useState(liveSelected);
71
+ const [timeRemaining, setTimeRemaining] = useState(null);
72
+ // HOOKS
73
+ const { preferences } = useSCPreferences();
74
+ const isCommunityOwner = useMemo(() => { var _a; return ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.id) === 1; }, [scUserContext.user]);
75
+ const isFreeTrialTier = useMemo(() => preferences &&
76
+ SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
77
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
78
+ preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.FREE_TRIAL, [preferences]);
79
+ const intl = useIntl();
80
+ const options = [
81
+ {
82
+ title: intl.formatMessage({ id: 'ui.liveStreamForm.selector.scheduleLiveEvent', defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEvent' }),
83
+ image: EventImage,
84
+ type: LiveStreamType.EVENT_LIVE,
85
+ features: [
86
+ intl.formatMessage({
87
+ id: 'ui.liveStreamForm.selector.scheduleLiveEventItem1',
88
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem1'
89
+ }),
90
+ intl.formatMessage({
91
+ id: 'ui.liveStreamForm.selector.scheduleLiveEventItem2',
92
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem2'
93
+ }),
94
+ intl.formatMessage({
95
+ id: 'ui.liveStreamForm.selector.scheduleLiveEventItem3',
96
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem3'
97
+ })
98
+ ],
99
+ icons: [_jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" })]
100
+ },
101
+ {
102
+ title: intl.formatMessage({
103
+ id: 'ui.liveStreamForm.selector.scheduleLiveStream',
104
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStream'
105
+ }),
106
+ image: LiveImage,
107
+ type: LiveStreamType.DIRECT_LIVE,
108
+ features: [
109
+ intl.formatMessage({
110
+ id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem1',
111
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem1'
112
+ }),
113
+ intl.formatMessage({
114
+ id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem2',
115
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem2'
116
+ }),
117
+ intl.formatMessage({
118
+ id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem3',
119
+ defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem3'
120
+ })
121
+ ],
122
+ icons: [_jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" })]
123
+ }
124
+ ];
125
+ const handleOptionSelect = (type) => {
126
+ setSelectedOption(type);
127
+ onLiveSelected(type);
128
+ };
129
+ const handleNext = () => {
130
+ if (!selectedOption) {
131
+ enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.common.error", defaultMessage: "ui.common.error" }), {
132
+ variant: 'error',
133
+ autoHideDuration: 3000
134
+ });
135
+ }
136
+ else {
137
+ onNext && onNext(selectedOption);
138
+ }
139
+ };
140
+ const fetchLivestreamStatus = () => {
141
+ LiveStreamApiClient.getMonthlyDuration()
142
+ .then((r) => {
143
+ setTimeRemaining(r.remaining_minutes);
144
+ })
145
+ .catch((error) => {
146
+ console.error('Error fetching live status:', error);
147
+ });
148
+ };
149
+ useEffect(() => {
150
+ fetchLivestreamStatus();
151
+ }, []);
152
+ const warning = useMemo(() => {
153
+ let _message;
154
+ if (isFreeTrialTier && isCommunityOwner) {
155
+ _message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningSubscriptionRequired", defaultMessage: "ui.liveStreamForm.selector.warningSubscriptionRequired", values: {
156
+ // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
157
+ // @ts-ignore
158
+ link: (...chunks) => _jsx(Link, Object.assign({ to: SELFCOMMUNITY_PRICING[scContext.settings.locale.default] }, { children: chunks }))
159
+ } }));
160
+ }
161
+ else if (timeRemaining !== null && timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON) {
162
+ if (timeRemaining <= 1) {
163
+ _message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningMinutesExausted", defaultMessage: "ui.liveStreamForm.selector.warningMinutesExausted" }));
164
+ }
165
+ else if (timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON) {
166
+ _message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningRemainingMinutes", defaultMessage: "ui.liveStreamForm.selector.warningRemainingMinutes", values: { minutes: timeRemaining } }));
167
+ }
168
+ }
169
+ if (_message) {
170
+ return (_jsx(Box, Object.assign({ className: classes.warning }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "warning" }, { children: _message })) })));
171
+ }
172
+ return null;
173
+ }, [timeRemaining, isFreeTrialTier]);
174
+ return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), maxWidth: "lg", sx: { py: 4 } }, { children: [_jsx(Typography, Object.assign({ variant: "h4", component: "h1", align: "center", gutterBottom: true, sx: { mb: 4, fontWeight: 500 } }, { children: "How do you want to go live?" })), warning, _jsx(Box, Object.assign({ className: classes.options }, { children: options.map((option, index) => (_jsxs(OptionCard, Object.assign({ selected: selectedOption === option.type, onClick: () => handleOptionSelect(option.type), elevation: 0, role: "button", tabIndex: 0, onKeyDown: (e) => {
175
+ if (e.key === 'Enter' || e.key === ' ') {
176
+ handleOptionSelect(index);
177
+ e.preventDefault();
178
+ }
179
+ }, theme: undefined }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "h2", sx: { fontWeight: 500 } }, { children: option.title })), _jsx(Radio, { checked: selectedOption === option.type })] }), _jsx("img", { src: option.image, alt: "logo" }), _jsx(Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
180
+ const _Icon = option.icons[featureIndex];
181
+ return (_jsxs(FeatureItem, Object.assign({ component: "li" }, { children: [_Icon, _jsx(Typography, Object.assign({ variant: "body2", color: "text.secondary", sx: { flex: 1 } }, { children: feature }))] }), featureIndex));
182
+ }) }))] }), index))) })), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ disabled: !selectedOption || !timeRemaining || isFreeTrialTier, variant: "contained", onClick: handleNext, color: "secondary" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.next", defaultMessage: "ui.liveStreamForm.selector.next" }) })) }))] })));
183
+ }
@@ -0,0 +1 @@
1
+ export declare const PREFIX = "SCCreateLiveStreamDialog";
@@ -0,0 +1 @@
1
+ export const PREFIX = 'SCCreateLiveStreamDialog';
@@ -0,0 +1,3 @@
1
+ import CreateLiveStreamDialog, { CreateLiveStreamDialogProps } from './CreateLiveStreamDialog';
2
+ export default CreateLiveStreamDialog;
3
+ export { CreateLiveStreamDialogProps };
@@ -0,0 +1,2 @@
1
+ import CreateLiveStreamDialog from './CreateLiveStreamDialog';
2
+ export default CreateLiveStreamDialog;
@@ -0,0 +1,8 @@
1
+ export declare enum CreateLiveStreamStep {
2
+ SELECT_TYPE = "_select_type",
3
+ CREATE_LIVE = "_create_live"
4
+ }
5
+ export declare enum LiveStreamType {
6
+ EVENT_LIVE = "_event_live",
7
+ DIRECT_LIVE = "_direct_live"
8
+ }
@@ -0,0 +1,10 @@
1
+ export var CreateLiveStreamStep;
2
+ (function (CreateLiveStreamStep) {
3
+ CreateLiveStreamStep["SELECT_TYPE"] = "_select_type";
4
+ CreateLiveStreamStep["CREATE_LIVE"] = "_create_live";
5
+ })(CreateLiveStreamStep || (CreateLiveStreamStep = {}));
6
+ export var LiveStreamType;
7
+ (function (LiveStreamType) {
8
+ LiveStreamType["EVENT_LIVE"] = "_event_live";
9
+ LiveStreamType["DIRECT_LIVE"] = "_direct_live";
10
+ })(LiveStreamType || (LiveStreamType = {}));
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type EditorRef = {
2
+ export type EditorRef = {
3
3
  focus: () => void;
4
4
  };
5
5
  export interface EditorProps {
@@ -1,7 +1,7 @@
1
1
  import { DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
2
2
  import { SCCategoryType } from '@selfcommunity/types';
3
3
  import { DOMConversionMap } from 'lexical/LexicalNode';
4
- export declare type SerializedHashtagNode = Spread<{
4
+ export type SerializedHashtagNode = Spread<{
5
5
  category: SCCategoryType;
6
6
  type: 'hashtag';
7
7
  version: 1;
@@ -9,16 +9,16 @@ function convertHashtagElement(domNode) {
9
9
  };
10
10
  }
11
11
  export class HashtagNode extends TextNode {
12
- constructor(category, text, key) {
13
- super(text !== null && text !== void 0 ? text : `#${category.name}`, key);
14
- this.__category = category;
15
- }
16
12
  static getType() {
17
13
  return 'hashtag';
18
14
  }
19
15
  static clone(node) {
20
16
  return new HashtagNode(node.__category, node.__text, node.__key);
21
17
  }
18
+ constructor(category, text, key) {
19
+ super(text !== null && text !== void 0 ? text : `#${category.name}`, key);
20
+ this.__category = category;
21
+ }
22
22
  createDOM(config) {
23
23
  const tag = 'hashtag';
24
24
  const dom = document.createElement(tag);
@@ -12,7 +12,7 @@ export interface ImagePayload {
12
12
  declare function convertImageElement(domNode: any): {
13
13
  node: ImageNode;
14
14
  };
15
- export declare type SerializedImageNode = Spread<{
15
+ export type SerializedImageNode = Spread<{
16
16
  altText: string;
17
17
  maxWidth: number | string;
18
18
  src: string;
@@ -104,18 +104,18 @@ function convertImageElement(domNode) {
104
104
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
105
105
  // @ts-ignore
106
106
  export class ImageNode extends DecoratorNode {
107
- constructor(src, altText, maxWidth, key) {
108
- super(key);
109
- this.__src = src;
110
- this.__altText = altText;
111
- this.__maxWidth = maxWidth;
112
- }
113
107
  static getType() {
114
108
  return 'image';
115
109
  }
116
110
  static clone(node) {
117
111
  return new ImageNode(node.__src, node.__altText, node.__maxWidth, node.__key);
118
112
  }
113
+ constructor(src, altText, maxWidth, key) {
114
+ super(key);
115
+ this.__src = src;
116
+ this.__altText = altText;
117
+ this.__maxWidth = maxWidth;
118
+ }
119
119
  setWidthAndHeight(width, height) {
120
120
  const writable = this.getWritable();
121
121
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore
@@ -1,7 +1,7 @@
1
1
  import { DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
2
2
  import { SCUserType } from '@selfcommunity/types';
3
3
  import { DOMConversionMap } from 'lexical/LexicalNode';
4
- export declare type SerializedMentionNode = Spread<{
4
+ export type SerializedMentionNode = Spread<{
5
5
  user: SCUserType;
6
6
  type: 'mention';
7
7
  version: 1;
@@ -22,16 +22,16 @@ function convertMentionElement(domNode) {
22
22
  };
23
23
  }
24
24
  export class MentionNode extends TextNode {
25
- constructor(user, text, key) {
26
- super(text !== null && text !== void 0 ? text : `@${user.username}`, key);
27
- this.__user = user;
28
- }
29
25
  static getType() {
30
26
  return 'mention';
31
27
  }
32
28
  static clone(node) {
33
29
  return new MentionNode(node.__user, node.__text, node.__key);
34
30
  }
31
+ constructor(user, text, key) {
32
+ super(text !== null && text !== void 0 ? text : `@${user.username}`, key);
33
+ this.__user = user;
34
+ }
35
35
  createDOM(config) {
36
36
  const tag = 'mention';
37
37
  const dom = document.createElement(tag);
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare type ApiRef = {
2
+ export type ApiRef = {
3
3
  focus: () => void;
4
4
  };
5
5
  declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<ApiRef>>;
@@ -15,7 +15,10 @@ const MATCHERS = [
15
15
  index: match.index,
16
16
  length: match[0].length,
17
17
  text: match[0],
18
- url: normalizeURL(match[0])
18
+ url: normalizeURL(match[0]),
19
+ attributes: {
20
+ target: '_blank'
21
+ }
19
22
  });
20
23
  },
21
24
  (text) => {
@@ -24,7 +27,10 @@ const MATCHERS = [
24
27
  index: match.index,
25
28
  length: match[0].length,
26
29
  text: match[0],
27
- url: `mailto:${match[0]}`
30
+ url: `mailto:${match[0]}`,
31
+ attributes: {
32
+ target: '_blank'
33
+ }
28
34
  });
29
35
  }
30
36
  ];