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

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
@@ -8,7 +8,7 @@ import { LocalizationProvider, MobileDatePicker, MobileTimePicker } from '@mui/x
8
8
  import { AdapterDateFns } from '@mui/x-date-pickers/AdapterDateFns';
9
9
  import { EventService, formatHttpErrorCode } from '@selfcommunity/api-services';
10
10
  import { SCPreferences, useSCContext, useSCPreferences } from '@selfcommunity/react-core';
11
- import { SCEventLocationType, SCEventPrivacyType, SCEventRecurrenceType } from '@selfcommunity/types';
11
+ import { SCEventLocationType, SCEventPrivacyType, SCEventRecurrenceType, SCFeatureName } from '@selfcommunity/types';
12
12
  import { Logger } from '@selfcommunity/utils';
13
13
  import classNames from 'classnames';
14
14
  import enLocale from 'date-fns/locale/en-US';
@@ -23,6 +23,8 @@ import { DAILY_LATER_DAYS, MONTHLY_LATER_DAYS, NEVER_LATER_DAYS, PREFIX, WEEKLY_
23
23
  import EventAddress from './EventAddress';
24
24
  import UploadEventCover from './UploadEventCover';
25
25
  import { combineDateAndTime, getLaterDaysDate, getLaterHoursDate, getNewDate } from './utils';
26
+ import { LIVESTREAM_DEFAULT_SETTINGS } from '../LiveStreamForm/constants';
27
+ import CoverPlaceholder from '../../assets/deafultCover';
26
28
  const messages = defineMessages({
27
29
  name: {
28
30
  id: 'ui.eventForm.name.placeholder',
@@ -117,13 +119,13 @@ const Root = styled(Box, {
117
119
  * @param inProps
118
120
  */
119
121
  export default function EventForm(inProps) {
120
- var _a, _b, _c;
122
+ var _a, _b, _c, _d, _e;
121
123
  //PROPS
122
124
  const props = useThemeProps({
123
125
  props: inProps,
124
126
  name: PREFIX
125
127
  });
126
- const { className, onSuccess, onError, event = null } = props, rest = __rest(props, ["className", "onSuccess", "onError", "event"]);
128
+ const { className, onSuccess, onError, event, presetLocation, EventAddressComponentProps = {} } = props, rest = __rest(props, ["className", "onSuccess", "onError", "event", "presetLocation", "EventAddressComponentProps"]);
127
129
  // CONTEXT
128
130
  const scContext = useSCContext();
129
131
  // INTL
@@ -131,20 +133,29 @@ export default function EventForm(inProps) {
131
133
  const startDateTime = useMemo(() => getNewDate(event === null || event === void 0 ? void 0 : event.start_date), [event]);
132
134
  const endDateTime = useMemo(() => getNewDate(event === null || event === void 0 ? void 0 : event.end_date), [event]);
133
135
  const initialFieldState = {
136
+ name: (event === null || event === void 0 ? void 0 : event.name) || '',
137
+ description: event ? event.description : '',
134
138
  imageOriginal: (event === null || event === void 0 ? void 0 : event.image_bigger) || '',
135
139
  imageOriginalFile: '',
136
140
  startDate: event ? startDateTime : getNewDate(),
137
141
  startTime: event ? startDateTime : getLaterHoursDate(1),
138
142
  endDate: (event === null || event === void 0 ? void 0 : event.end_date) ? endDateTime : getNewDate(),
139
143
  endTime: (event === null || event === void 0 ? void 0 : event.end_date) ? endDateTime : getLaterHoursDate(3),
140
- location: (event === null || event === void 0 ? void 0 : event.location) || SCEventLocationType.PERSON,
144
+ location: (event === null || event === void 0 ? void 0 : event.location)
145
+ ? event.location === SCEventLocationType.ONLINE && event.live_stream
146
+ ? SCEventLocationType.LIVESTREAM
147
+ : SCEventLocationType.ONLINE
148
+ : ((_a = EventAddressComponentProps.locations) === null || _a === void 0 ? void 0 : _a.length)
149
+ ? presetLocation in EventAddressComponentProps.locations
150
+ ? presetLocation
151
+ : EventAddressComponentProps.locations[0]
152
+ : SCEventLocationType.PERSON,
141
153
  geolocation: (event === null || event === void 0 ? void 0 : event.geolocation) || '',
142
154
  lat: (event === null || event === void 0 ? void 0 : event.geolocation_lat) || null,
143
155
  lng: (event === null || event === void 0 ? void 0 : event.geolocation_lng) || null,
144
156
  link: (event === null || event === void 0 ? void 0 : event.link) || '',
157
+ liveStreamSettings: (event === null || event === void 0 ? void 0 : event.live_stream) ? event === null || event === void 0 ? void 0 : event.live_stream.settings : null,
145
158
  recurring: (event === null || event === void 0 ? void 0 : event.recurring) || SCEventRecurrenceType.NEVER,
146
- name: (event === null || event === void 0 ? void 0 : event.name) || '',
147
- description: event ? event.description : '',
148
159
  isPublic: (event === null || event === void 0 ? void 0 : event.privacy) === SCEventPrivacyType.PUBLIC || true,
149
160
  isSubmitting: false
150
161
  };
@@ -154,13 +165,18 @@ export default function EventForm(inProps) {
154
165
  const [genericError, setGenericError] = useState(null);
155
166
  // PREFERENCES
156
167
  const scPreferences = useSCPreferences();
168
+ const liveStreamEnabled = useMemo(() => scPreferences.preferences &&
169
+ scPreferences.features &&
170
+ scPreferences.features.includes(SCFeatureName.LIVE_STREAM) &&
171
+ SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in scPreferences.preferences &&
172
+ scPreferences.preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [scPreferences.preferences, scPreferences.features]);
157
173
  const privateEnabled = useMemo(() => scPreferences.preferences[SCPreferences.CONFIGURATIONS_EVENTS_PRIVATE_ENABLED].value, [scPreferences.preferences]);
158
174
  const visibilityEnabled = useMemo(() => scPreferences.preferences[SCPreferences.CONFIGURATIONS_EVENTS_VISIBILITY_ENABLED].value, [scPreferences.preferences]);
159
175
  const disablePastStartTime = useMemo(() => field.startDate.getDate() === getNewDate().getDate(), [field]);
160
176
  const disablePastEndTime = useMemo(() => field.endDate.getDate() === getNewDate().getDate(), [field]);
161
177
  const _backgroundCover = Object.assign({}, (field.imageOriginal
162
178
  ? { background: `url('${field.imageOriginal}') center / cover` }
163
- : { background: `url('${scPreferences.preferences[SCPreferences.IMAGES_USER_DEFAULT_COVER].value}') center / cover` }));
179
+ : { background: `url('${CoverPlaceholder}') no-repeat 0 0 / 100% 100%` }));
164
180
  const handleChangeCover = useCallback((cover) => {
165
181
  setField((prev) => (Object.assign(Object.assign({}, prev), { ['imageOriginalFile']: cover })));
166
182
  const reader = new FileReader();
@@ -192,6 +208,9 @@ export default function EventForm(inProps) {
192
208
  setField((prev) => (Object.assign(Object.assign({}, prev), data)));
193
209
  setGenericError(null);
194
210
  }, []);
211
+ const handleLiveStreamSettingsData = useCallback((data) => {
212
+ setField((prev) => (Object.assign(Object.assign({}, prev), { liveStreamSettings: Object.assign(Object.assign({}, prev.liveStreamSettings), data) })));
213
+ }, []);
195
214
  const handleSubmit = useCallback(() => {
196
215
  setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: true })));
197
216
  setGenericError(null);
@@ -203,14 +222,21 @@ export default function EventForm(inProps) {
203
222
  formData.append('start_date', combineDateAndTime(field.startDate, field.startTime));
204
223
  formData.append('recurring', field.recurring);
205
224
  formData.append('end_date', combineDateAndTime(field.endDate, field.endTime));
206
- formData.append('location', field.location);
225
+ formData.append('location', field.location === SCEventLocationType.PERSON ? SCEventLocationType.PERSON : SCEventLocationType.ONLINE);
207
226
  if (field.location === SCEventLocationType.ONLINE) {
208
227
  formData.append('link', field.link);
228
+ formData.append('live_stream_settings', null);
229
+ }
230
+ else if (field.location === SCEventLocationType.LIVESTREAM) {
231
+ formData.append('link', '');
232
+ formData.append('live_stream_settings', JSON.stringify(Object.assign(Object.assign({}, LIVESTREAM_DEFAULT_SETTINGS), field.liveStreamSettings)));
209
233
  }
210
234
  else if (field.location === SCEventLocationType.PERSON) {
211
235
  formData.append('geolocation', field.geolocation);
212
236
  formData.append('geolocation_lat', field.lat.toString());
213
237
  formData.append('geolocation_lng', field.lng.toString());
238
+ formData.append('link', '');
239
+ formData.append('live_stream_settings', null);
214
240
  }
215
241
  if (privateEnabled) {
216
242
  formData.append('privacy', field.isPublic ? SCEventPrivacyType.PUBLIC : SCEventPrivacyType.PRIVATE);
@@ -234,12 +260,18 @@ export default function EventForm(inProps) {
234
260
  })
235
261
  .catch((e) => {
236
262
  const _error = formatHttpErrorCode(e);
237
- if ('errorsError' in _error || !Object.keys(_error).length) {
263
+ if (!Object.keys(_error).length) {
238
264
  setGenericError(intl.formatMessage({
239
265
  id: 'ui.eventForm.genericError',
240
266
  defaultMessage: 'ui.eventForm.genericError'
241
267
  }));
242
268
  }
269
+ else if ('codeError' in _error) {
270
+ setGenericError(intl.formatMessage({
271
+ id: 'ui.eventForm.liveStream.error.monthlyMinuteLimitReached',
272
+ defaultMessage: 'ui.eventForm.liveStream.error.monthlyMinuteLimitReached'
273
+ }));
274
+ }
243
275
  else {
244
276
  setGenericError(null);
245
277
  }
@@ -264,7 +296,7 @@ export default function EventForm(inProps) {
264
296
  setError(error);
265
297
  }
266
298
  setGenericError(null);
267
- }, [setField, error]);
299
+ }, [error, setField, setGenericError]);
268
300
  const handleChangeDateTime = useCallback((value, name) => {
269
301
  setField((prev) => (Object.assign(Object.assign({}, prev), { [name]: value })));
270
302
  if (error[`${name}Error`]) {
@@ -276,7 +308,7 @@ export default function EventForm(inProps) {
276
308
  setError(error);
277
309
  }
278
310
  setGenericError(null);
279
- }, [setField, error]);
311
+ }, [error, setField, setGenericError]);
280
312
  const shouldDisableDate = useCallback((date) => {
281
313
  let disabled = false;
282
314
  switch (field.recurring) {
@@ -345,7 +377,13 @@ export default function EventForm(inProps) {
345
377
  // @ts-ignore
346
378
  toolbarTitle: _jsx(FormattedMessage, { id: "ui.eventForm.time.title", defaultMessage: "ui.eventForm.time.title" })
347
379
  }
348
- }, onChange: (value) => handleChangeDateTime(value, 'endTime'), shouldDisableTime: shouldDisableTime })] })) })), _jsx(EventAddress, { forwardGeolocationData: handleGeoData, event: event !== null && event !== void 0 ? event : null }), privateEnabled && (_jsxs(Box, Object.assign({ className: classes.privacySection }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", justifyContent: "center" }, { children: [_jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: !field.isPublic }) }, { children: [_jsx(Icon, { children: "private" }), _jsx(FormattedMessage, { id: "ui.eventForm.privacy.private", defaultMessage: "ui.eventForm.privacy.private" })] })), _jsx(Switch, { className: classes.switch, checked: field.isPublic, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isPublic']: !field.isPublic }))), disabled: event && !field.isPublic }), _jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: field.isPublic }) }, { children: [_jsx(Icon, { children: "public" }), _jsx(FormattedMessage, { id: "ui.eventForm.privacy.public", defaultMessage: "ui.eventForm.privacy.public" })] }))] })), _jsx(Typography, Object.assign({ variant: "body2", textAlign: "center", className: classes.privacySectionInfo }, { children: field.isPublic ? (_jsx(FormattedMessage, { id: "ui.eventForm.privacy.public.info", defaultMessage: "ui.eventForm.privacy.public.info", values: {
380
+ }, onChange: (value) => handleChangeDateTime(value, 'endTime'), shouldDisableTime: shouldDisableTime })] })) })), _jsx(EventAddress, Object.assign({ forwardGeolocationData: handleGeoData, forwardLivestreamSettingsData: handleLiveStreamSettingsData, event: Object.assign(Object.assign({}, event), {
381
+ name: field.name,
382
+ start_date: field.startDate,
383
+ location: field.location,
384
+ geolocation: field.geolocation,
385
+ live_stream: Object.assign(Object.assign({ title: field.name || `${intl.formatMessage(messages.name)}` }, (event && ((_b = event.live_stream) === null || _b === void 0 ? void 0 : _b.created_at) && { created_at: field.startDate })), { settings: field.liveStreamSettings })
386
+ }) }, EventAddressComponentProps)), privateEnabled && (_jsxs(Box, Object.assign({ className: classes.privacySection }, { children: [_jsxs(Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", justifyContent: "center" }, { children: [_jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: !field.isPublic }) }, { children: [_jsx(Icon, { children: "private" }), _jsx(FormattedMessage, { id: "ui.eventForm.privacy.private", defaultMessage: "ui.eventForm.privacy.private" })] })), _jsx(Switch, { className: classes.switch, checked: field.isPublic, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isPublic']: !field.isPublic }))), disabled: event && !field.isPublic }), _jsxs(Typography, Object.assign({ className: classNames(classes.switchLabel, { [classes.active]: field.isPublic }) }, { children: [_jsx(Icon, { children: "public" }), _jsx(FormattedMessage, { id: "ui.eventForm.privacy.public", defaultMessage: "ui.eventForm.privacy.public" })] }))] })), _jsx(Typography, Object.assign({ variant: "body2", textAlign: "center", className: classes.privacySectionInfo }, { children: field.isPublic ? (_jsx(FormattedMessage, { id: "ui.eventForm.privacy.public.info", defaultMessage: "ui.eventForm.privacy.public.info", values: {
349
387
  // eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
350
388
  // @ts-ignores
351
389
  b: (chunks) => _jsx("strong", { children: chunks })
@@ -354,16 +392,18 @@ export default function EventForm(inProps) {
354
392
  // @ts-ignore
355
393
  b: (chunks) => _jsx("strong", { children: chunks })
356
394
  } })) }))] }))), _jsx(TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
357
- endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_a = field.description) === null || _a === void 0 ? void 0 : _a.length) ? EVENT_DESCRIPTION_MAX_LENGTH - field.description.length : EVENT_DESCRIPTION_MAX_LENGTH })))
358
- }, error: Boolean(((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) > EVENT_DESCRIPTION_MAX_LENGTH), helperText: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > EVENT_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.eventForm.description.error.maxLength", defaultMessage: "ui.eventForm.description.error.maxLength" })) : null }), 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.name ||
395
+ endAdornment: (_jsx(Typography, Object.assign({ variant: "body2" }, { children: ((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) ? EVENT_DESCRIPTION_MAX_LENGTH - field.description.length : EVENT_DESCRIPTION_MAX_LENGTH })))
396
+ }, error: Boolean(((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > EVENT_DESCRIPTION_MAX_LENGTH), helperText: ((_e = field.description) === null || _e === void 0 ? void 0 : _e.length) > EVENT_DESCRIPTION_MAX_LENGTH ? (_jsx(FormattedMessage, { id: "ui.eventForm.description.error.maxLength", defaultMessage: "ui.eventForm.description.error.maxLength" })) : null }), 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.name ||
359
397
  !field.startDate ||
360
398
  !field.startTime ||
361
399
  !field.endDate ||
362
400
  !field.endTime ||
401
+ Boolean(genericError) ||
363
402
  (field.location === SCEventLocationType.ONLINE && !field.link) ||
364
403
  (field.location === SCEventLocationType.PERSON && !field.geolocation) ||
365
404
  (field.recurring !== SCEventRecurrenceType.NEVER && !field.endDate && !field.endTime) ||
366
405
  field.isSubmitting ||
367
406
  field.name.length > EVENT_TITLE_MAX_LENGTH ||
368
- field.description.length > EVENT_DESCRIPTION_MAX_LENGTH, variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: event ? (_jsx(FormattedMessage, { id: "ui.eventForm.button.edit", defaultMessage: "ui.eventForm.button.edit" })) : (_jsx(FormattedMessage, { id: "ui.eventForm.button.create", defaultMessage: "ui.eventForm.button.create" })) })) }))] }))] })));
407
+ field.description.length > EVENT_DESCRIPTION_MAX_LENGTH ||
408
+ (field.location === SCEventLocationType.LIVESTREAM && !liveStreamEnabled), variant: "contained", onClick: handleSubmit, color: "secondary" }, { children: event ? (_jsx(FormattedMessage, { id: "ui.eventForm.button.edit", defaultMessage: "ui.eventForm.button.edit" })) : (_jsx(FormattedMessage, { id: "ui.eventForm.button.create", defaultMessage: "ui.eventForm.button.create" })) })) }))] }))] })));
369
409
  }
@@ -1,16 +1,17 @@
1
- import { SCEventLocationType, SCEventRecurrenceType } from '@selfcommunity/types';
2
- export declare type Place = {
1
+ import { SCEventLocationType, SCEventRecurrenceType, SCLiveStreamSettingsType } from '@selfcommunity/types';
2
+ export type Place = {
3
3
  description: string;
4
4
  id?: string;
5
5
  };
6
- export declare type Geolocation = {
6
+ export type Geolocation = {
7
7
  location: SCEventLocationType;
8
8
  geolocation?: string;
9
9
  lat?: number;
10
10
  lng?: number;
11
11
  link?: string;
12
+ liveStreamSettings?: SCLiveStreamSettingsType;
12
13
  };
13
- export declare type InitialFieldState = Geolocation & {
14
+ export type InitialFieldState = Geolocation & {
14
15
  imageOriginal: string | ArrayBuffer;
15
16
  imageOriginalFile: string | Blob;
16
17
  startDate: Date | null;
@@ -23,5 +24,5 @@ export declare type InitialFieldState = Geolocation & {
23
24
  isPublic: boolean;
24
25
  isSubmitting: boolean;
25
26
  };
26
- export declare type FieldStateKeys = keyof InitialFieldState;
27
- export declare type FieldStateValues = InitialFieldState[FieldStateKeys];
27
+ export type FieldStateKeys = keyof InitialFieldState;
28
+ export type FieldStateValues = InitialFieldState[FieldStateKeys];
@@ -18,7 +18,7 @@ export interface EventFormDialogProps extends BaseDialogProps {
18
18
  onClose?: () => void;
19
19
  /**
20
20
  * Props to spread to EventForm component
21
- * @default {}
21
+ * @default undefined
22
22
  */
23
23
  EventFormComponentProps?: EventFormProps;
24
24
  /**
@@ -40,14 +40,14 @@ export default function EventFormDialog(inProps) {
40
40
  props: inProps,
41
41
  name: PREFIX
42
42
  });
43
- const { className, open = true, onClose, EventFormComponentProps = {} } = props, rest = __rest(props, ["className", "open", "onClose", "EventFormComponentProps"]);
43
+ const { className, open = true, onClose, EventFormComponentProps } = props, rest = __rest(props, ["className", "open", "onClose", "EventFormComponentProps"]);
44
44
  const handleSuccess = useCallback((event) => {
45
45
  var _a;
46
- (_a = EventFormComponentProps.onSuccess) === null || _a === void 0 ? void 0 : _a.call(EventFormComponentProps, event);
46
+ (_a = EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.onSuccess) === null || _a === void 0 ? void 0 : _a.call(EventFormComponentProps, event);
47
47
  onClose === null || onClose === void 0 ? void 0 : onClose();
48
48
  }, [onClose, EventFormComponentProps]);
49
49
  /**
50
50
  * Renders root object
51
51
  */
52
- return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, title: (EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.event) ? (_jsx(FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : (_jsx(FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: classNames(classes.root, className) }, rest, { children: _jsx(EventForm, Object.assign({}, EventFormComponentProps, { onSuccess: handleSuccess })) })));
52
+ return (_jsx(Root, Object.assign({ DialogContentProps: { dividers: false }, title: (EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.event) ? (_jsx(FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : (_jsx(FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: classNames(classes.root, className) }, rest, { children: _jsx(EventForm, Object.assign({}, (EventFormComponentProps && EventFormComponentProps), { onSuccess: handleSuccess })) })));
53
53
  }
@@ -66,7 +66,7 @@ export default function EventInfoWidget(inProps) {
66
66
  const handleToggleSummary = useCallback(() => {
67
67
  setExpanded(!expanded);
68
68
  }, [expanded]);
69
- const hasGeolocationOrLink = useMemo(() => Boolean((scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation) || (scEvent === null || scEvent === void 0 ? void 0 : scEvent.link)), [scEvent]);
69
+ const hasGeolocationOrLink = useMemo(() => Boolean((scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation) || (scEvent === null || scEvent === void 0 ? void 0 : scEvent.link) || (scEvent === null || scEvent === void 0 ? void 0 : scEvent.live_stream)), [scEvent]);
70
70
  const showInfo = useMemo(() => ((scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) === SCEventPrivacyType.PUBLIC && hasGeolocationOrLink) ||
71
71
  ([SCEventSubscriptionStatusType.SUBSCRIBED, SCEventSubscriptionStatusType.GOING, SCEventSubscriptionStatusType.NOT_GOING].indexOf(scEvent === null || scEvent === void 0 ? void 0 : scEvent.subscription_status) > -1 &&
72
72
  hasGeolocationOrLink), [scEvent]);
@@ -245,9 +245,9 @@ export default function EventMediaWidget(inProps) {
245
245
  }
246
246
  return (_jsxs(Root, Object.assign({ className: classes.root }, rest, { showPadding: hasAllow }, { children: [_jsx(CardHeader, { title: _jsxs(Stack, Object.assign({ direction: "row", justifyContent: "space-between", alignItems: "center" }, { children: [_jsx(Typography, Object.assign({ variant: "h5" }, { children: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.title", defaultMessage: "ui.eventMediaWidget.title" }) })), hasAllow && mediasCount > 0 && _jsx(TriggerButton, { size: "small", onAdd: handleAddMedia })] })), className: classes.header }), _jsx(Divider, {}), _jsxs(CardContent, Object.assign({ className: classes.content }, { children: [_jsxs(Box, Object.assign({ className: classes.grid }, { children: [showSkeleton === 'widget' && _jsx(EventMediaSkeleton, {}), medias.slice(0, MEDIAS_TO_SHOW).map((media, i, array) => (_jsx(Box, Object.assign({ onClick: () => handleOpenLightbox(i), sx: {
247
247
  background: `url(${media.image}) no-repeat center`
248
- }, className: classes.media }, { children: medias.length > array.length && i === array.length - 1 && (_jsxs(Fragment, { children: [_jsx(Box, { className: classes.mediaLayer }), _jsx(Box, Object.assign({ className: classes.countHiddenMediaWrapper }, { children: _jsxs(Typography, Object.assign({ className: classes.countHiddenMedia }, { children: ["+", countHiddenMedia] })) }))] })) }), media.id))), hasAllow && mediasCount === 0 && (_jsx(Tooltip, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.add", defaultMessage: "ui.eventMediaWidget.add" }) }, { children: _jsx(TriggerButton, { size: "large", onAdd: handleAddMedia, isSquare: true }) })))] })), preview !== -1 && _jsx(Lightbox, { onClose: handleCloseLightbox, index: preview, medias: medias, onIndexChange: _fetchNext })] })), hasAllow && mediasCount > 0 && (_jsx(CardActions, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ onClick: handleToggleDialogOpen }, { children: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.showAll", defaultMessage: "ui.eventMediaWidget.showAll" }) })) })) }))), openDialog && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.title, { user: scEvent.managed_by.username }), onClose: handleToggleDialogOpen, open: openDialog }, dialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: medias.length, height: isMobile ? '100%' : '515px', next: handleNext, hasMoreNext: Boolean(state.next), className: classes.dialogInfiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.noMoreResults", defaultMessage: "ui.eventMediaWidget.noMoreResults" }) })) }, { children: _jsxs(Box, Object.assign({ className: classes.grid }, { children: [medias.map((media) => (_jsx(Box, Object.assign({ sx: {
248
+ }, className: classes.media }, { children: medias.length > array.length && i === array.length - 1 && (_jsxs(Fragment, { children: [_jsx(Box, { className: classes.mediaLayer }), _jsx(Box, Object.assign({ className: classes.countHiddenMediaWrapper }, { children: _jsxs(Typography, Object.assign({ className: classes.countHiddenMedia }, { children: ["+", countHiddenMedia] })) }))] })) }), media.id))), hasAllow && mediasCount === 0 && (_jsx(Tooltip, Object.assign({ title: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.add", defaultMessage: "ui.eventMediaWidget.add" }) }, { children: _jsx(TriggerButton, { size: "large", onAdd: handleAddMedia, isSquare: true }) })))] })), preview !== -1 && _jsx(Lightbox, { onClose: handleCloseLightbox, index: preview, medias: medias, onIndexChange: _fetchNext })] })), hasAllow && mediasCount > 0 && (_jsx(CardActions, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ onClick: handleToggleDialogOpen }, { children: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.showAll", defaultMessage: "ui.eventMediaWidget.showAll" }) })) })) }))), _jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: intl.formatMessage(messages.title, { user: scEvent.managed_by.username }), onClose: handleToggleDialogOpen, open: openDialog }, dialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: medias.length, height: isMobile ? '100%' : '515px', next: handleNext, hasMoreNext: Boolean(state.next), className: classes.dialogInfiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.noMoreResults", defaultMessage: "ui.eventMediaWidget.noMoreResults" }) })) }, { children: _jsxs(Box, Object.assign({ className: classes.grid }, { children: [medias.map((media) => (_jsx(Box, Object.assign({ sx: {
249
249
  background: `url(${media.image}) no-repeat center`
250
250
  }, className: classes.dialogMediaWrapper }, { children: _jsx(Stack, Object.assign({ className: classes.dialogButtonWrapper }, { children: _jsx(LoadingButton, Object.assign({ className: classes.dialogLoadingButton, loading: mediaId === media.id, size: "large", onClick: () => handleRemoveMedia(media.id), sx: {
251
251
  color: (theme) => (mediaId === media.id ? 'transparent' : theme.palette.common.white)
252
- } }, { children: _jsx(Icon, Object.assign({ fontSize: "inherit" }, { children: "delete" })) })) })) }), media.id))), showSkeleton === 'dialog' && Array.from(Array(countHiddenMedia)).map((_, i) => _jsx(EventMediaSkeleton, {}, i))] })) })) }))), openDialogConfirm && (_jsx(ConfirmDialog, { open: openDialogConfirm, title: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.title", defaultMessage: "ui.eventMediaWidget.dialog.title" }), content: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.msg", defaultMessage: "ui.eventMediaWidget.dialog.msg" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.confirm", defaultMessage: "ui.eventMediaWidget.dialog.confirm" }), isUpdating: loading, onConfirm: handleConfirmAction, onClose: handleCloseAction }))] })));
252
+ } }, { children: _jsx(Icon, Object.assign({ fontSize: "inherit" }, { children: "delete" })) })) })) }), media.id))), showSkeleton === 'dialog' && Array.from(Array(countHiddenMedia)).map((_, i) => _jsx(EventMediaSkeleton, {}, i))] })) })) })), _jsx(ConfirmDialog, { open: openDialogConfirm, title: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.title", defaultMessage: "ui.eventMediaWidget.dialog.title" }), content: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.msg", defaultMessage: "ui.eventMediaWidget.dialog.msg" }), btnConfirm: _jsx(FormattedMessage, { id: "ui.eventMediaWidget.dialog.confirm", defaultMessage: "ui.eventMediaWidget.dialog.confirm" }), isUpdating: loading, onConfirm: handleConfirmAction, onClose: handleCloseAction })] })));
253
253
  }
@@ -1,6 +1,6 @@
1
1
  import { UploadButtonProps } from '@rpldy/upload-button';
2
2
  import type { ComponentType } from 'react';
3
- declare type FileInputProps = {
3
+ type FileInputProps = {
4
4
  accept: string;
5
5
  };
6
6
  declare const asUploadButton: (Component: ComponentType<any>, inputProps: FileInputProps) => import("react").ForwardRefExoticComponent<Pick<UploadButtonProps<Element>, "id" | "className" | "text" | "children" | "onClick" | "method" | "headers" | "paramName" | "params" | "forceJsonResponse" | "withCredentials" | "formatGroupParamName" | "sendWithFormData" | "formDataAllowUndefined" | "formatServerResponse" | "isSuccessfulCall" | "destination" | "fileFilter" | "autoUpload" | "clearPendingOnAdd" | "grouped" | "maxGroupSize" | "inputFieldName" | "fastAbortThreshold" | "userData" | "extraProps"> & import("react").RefAttributes<any>>;
@@ -132,5 +132,5 @@ export default function TabContentComponent(props) {
132
132
  else if (tabValue === TabContentEnum.REQUESTS && (actionProps === null || actionProps === void 0 ? void 0 : actionProps.count) === 0) {
133
133
  return (_jsx(Typography, Object.assign({ variant: "body1" }, { children: _jsx(FormattedMessage, { id: "ui.eventMembersWidget.noOtherRequests", defaultMessage: "ui.eventMembersWidget.noOtherRequests" }) })));
134
134
  }
135
- return (_jsxs(_Fragment, { children: [_jsx(List, { children: users === null || users === void 0 ? void 0 : users.slice(0, state.visibleItems).map((user) => (_jsx(ListItem, { children: _jsx(User, Object.assign({ elevation: 0, user: user }, userProps, { actions: getActionsComponent(user.id) })) }, user.id))) }), state.count > state.visibleItems && (_jsx(Button, Object.assign({ onClick: handleToggleDialogOpen, className: classes.actionButton }, { children: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.eventMembersWidget.showAll", defaultMessage: "ui.eventMembersWidget.showAll" }) })) }))), openDialog && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { defaultMessage: "ui.eventMembersWidget.title", id: "ui.eventMembersWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, dialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: _jsx(UserSkeleton, Object.assign({ elevation: 0 }, userProps)), className: classes.infiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventMembersWidget.noMoreResults", defaultMessage: "ui.eventMembersWidget.noMoreResults" }) })) }, { children: _jsx(List, { children: state.results.map((user) => (_jsx(ListItem, { children: _jsx(User, Object.assign({ elevation: 0, user: user }, userProps)) }, user.id))) }) })) })))] }));
135
+ return (_jsxs(_Fragment, { children: [_jsx(List, { children: users === null || users === void 0 ? void 0 : users.slice(0, state.visibleItems).map((user) => (_jsx(ListItem, { children: _jsx(User, Object.assign({ elevation: 0, user: user }, userProps, { actions: getActionsComponent(user.id) })) }, user.id))) }), state.count > state.visibleItems && (_jsx(Button, Object.assign({ onClick: handleToggleDialogOpen, className: classes.actionButton }, { children: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.eventMembersWidget.showAll", defaultMessage: "ui.eventMembersWidget.showAll" }) })) }))), _jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { defaultMessage: "ui.eventMembersWidget.title", id: "ui.eventMembersWidget.title" }), onClose: handleToggleDialogOpen, open: openDialog }, dialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: state.results.length, next: handleNext, hasMoreNext: Boolean(state.next), loaderNext: _jsx(UserSkeleton, Object.assign({ elevation: 0 }, userProps)), className: classes.infiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventMembersWidget.noMoreResults", defaultMessage: "ui.eventMembersWidget.noMoreResults" }) })) }, { children: _jsx(List, { children: state.results.map((user) => (_jsx(ListItem, { children: _jsx(User, Object.assign({ elevation: 0, user: user }, userProps)) }, user.id))) }) })) }))] }));
136
136
  }
@@ -1,4 +1,4 @@
1
- export declare type TabContentType = '1' | '2' | '3';
1
+ export type TabContentType = '1' | '2' | '3';
2
2
  export declare enum TabContentEnum {
3
3
  PARTICIPANTS = "1",
4
4
  INVITED = "2",
@@ -133,5 +133,5 @@ export default function EventParticipantsButton(inProps) {
133
133
  }, [setOpen]);
134
134
  return (_jsxs(_Fragment, { children: [_jsxs(Root, Object.assign({ className: classNames(classes.root, className), onClick: handleToggleDialogOpen, disabled: loading || !scEvent || scEvent.goings_counter === 0,
135
135
  // @ts-expect-error this is needed to use followers into SCEventParticipantsButton
136
- followers: followers }, rest, { children: [!hideCaption && (_jsx(Typography, Object.assign({ className: classes.participants, variant: "caption" }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.eventParticipantsButton.participants", id: "ui.eventParticipantsButton.participants" }) }))), !followers.length && (loading || !scEvent) ? (_jsx(AvatarGroupSkeleton, Object.assign({}, rest, (!participantsAvailable && { skeletonsAnimation: false })))) : (_jsx(AvatarGroup, Object.assign({ total: followers.length, renderSurplus: renderSurplus }, { children: followers.map((c) => (_jsx(Avatar, { alt: c.username, src: c.avatar }, c.id))) })))] })), open && (_jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { defaultMessage: "ui.eventParticipantsButton.dialogTitle", id: "ui.eventParticipantsButton.dialogTitle", values: { total: scEvent.goings_counter } }), onClose: handleToggleDialogOpen, open: open }, DialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: followers.length, next: fetchFollowers, hasMoreNext: next !== null || loading, loaderNext: _jsx(UserSkeleton, { elevation: 0 }), className: classes.infiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventParticipantsButton.noOtherParticipants", defaultMessage: "ui.eventParticipantsButton.noOtherParticipants" }) })) }, { children: _jsx(List, { children: followers.map((follower) => (_jsx(ListItem, { children: _jsx(User, { elevation: 0, user: follower }) }, follower.id))) }) })) })))] }));
136
+ followers: followers }, rest, { children: [!hideCaption && (_jsx(Typography, Object.assign({ className: classes.participants, variant: "caption" }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.eventParticipantsButton.participants", id: "ui.eventParticipantsButton.participants" }) }))), !followers.length && (loading || !scEvent) ? (_jsx(AvatarGroupSkeleton, Object.assign({}, rest, (!participantsAvailable && { skeletonsAnimation: false })))) : (_jsx(AvatarGroup, Object.assign({ total: followers.length, renderSurplus: renderSurplus }, { children: followers.map((c) => (_jsx(Avatar, { alt: c.username, src: c.avatar }, c.id))) })))] })), _jsx(DialogRoot, Object.assign({ className: classes.dialogRoot, title: _jsx(FormattedMessage, { defaultMessage: "ui.eventParticipantsButton.dialogTitle", id: "ui.eventParticipantsButton.dialogTitle", values: { total: (scEvent === null || scEvent === void 0 ? void 0 : scEvent.goings_counter) || 0 } }), onClose: handleToggleDialogOpen, open: open }, DialogProps, { children: _jsx(InfiniteScroll, Object.assign({ dataLength: followers.length, next: fetchFollowers, hasMoreNext: next !== null || loading, loaderNext: _jsx(UserSkeleton, { elevation: 0 }), className: classes.infiniteScroll, endMessage: _jsx(Typography, Object.assign({ className: classes.endMessage }, { children: _jsx(FormattedMessage, { id: "ui.eventParticipantsButton.noOtherParticipants", defaultMessage: "ui.eventParticipantsButton.noOtherParticipants" }) })) }, { children: _jsx(List, { children: followers.map((follower) => (_jsx(ListItem, { children: _jsx(User, { elevation: 0, user: follower }) }, follower.id))) }) })) }))] }));
137
137
  }
@@ -9,11 +9,11 @@ import { StickyBoxProps } from '../../shared/StickyBox';
9
9
  /**
10
10
  * FeedSidebarProps has the same props as StickyBoxProps type
11
11
  */
12
- export declare type FeedSidebarProps = StickyBoxProps;
12
+ export type FeedSidebarProps = StickyBoxProps;
13
13
  /**
14
14
  * FeedRef props
15
15
  */
16
- export declare type FeedRef = {
16
+ export type FeedRef = {
17
17
  addFeedData: (obj: any, syncPagination?: boolean) => void;
18
18
  refresh: () => void;
19
19
  getCurrentFeedObjectIds: () => number[];
@@ -11,7 +11,7 @@ interface FeedSkeletonMap {
11
11
  */
12
12
  className?: string;
13
13
  }
14
- export declare type FeedSkeletonProps = React.PropsWithChildren<FeedSkeletonMap>;
14
+ export type FeedSkeletonProps = React.PropsWithChildren<FeedSkeletonMap>;
15
15
  /**
16
16
  * > API documentation for the Community-JS Feed Skeleton component. Learn about the available props and the CSS API.
17
17
 
@@ -33,7 +33,7 @@ export default function Activities(props) {
33
33
  feedObject,
34
34
  feedObjectType,
35
35
  cacheStrategy,
36
- pageSize: 2,
36
+ pageSize: 1,
37
37
  orderBy: selectedActivities === SCFeedObjectActivitiesType.CONNECTIONS_COMMENTS
38
38
  ? SCCommentsOrderBy.CONNECTION_DESC
39
39
  : selectedActivities === SCFeedObjectActivitiesType.FIRST_COMMENTS
@@ -0,0 +1,79 @@
1
+ import { SCLiveStreamType } from '@selfcommunity/types';
2
+ import React from 'react';
3
+ import { SCLiveStreamTemplateType } from '../../types/liveStream';
4
+ import { WidgetProps } from '../Widget';
5
+ import { LiveStreamSkeletonProps } from './index';
6
+ export interface LiveStreamProps extends WidgetProps {
7
+ /**
8
+ * Event Object
9
+ * @default null
10
+ */
11
+ liveStream?: SCLiveStreamType;
12
+ /**
13
+ * Id of the liveStream for filter the feed
14
+ * @default null
15
+ */
16
+ liveStreamId?: number;
17
+ /**
18
+ * Event template type
19
+ * @default 'preview'
20
+ */
21
+ template?: SCLiveStreamTemplateType;
22
+ /**
23
+ * Actions
24
+ * @default null
25
+ */
26
+ actions?: React.ReactNode;
27
+ /**
28
+ * Hide in progress
29
+ * @default false
30
+ */
31
+ hideInProgress?: boolean;
32
+ /**
33
+ * Hide liveStream planner
34
+ * @default false
35
+ */
36
+ hideLiveStreamHost?: boolean;
37
+ /**
38
+ * Props to spread to EventSkeleton component
39
+ * @default {}
40
+ */
41
+ LiveStreamSkeletonComponentProps?: LiveStreamSkeletonProps;
42
+ /**
43
+ * Any other properties
44
+ */
45
+ [p: string]: any;
46
+ }
47
+ /**
48
+ * > API documentation for the Community-JS Live Stream component. Learn about the available props and the CSS API.
49
+ *
50
+ *
51
+ * This component renders an liveStream item.
52
+ * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Event)
53
+
54
+ #### Import
55
+
56
+ ```jsx
57
+ import {liveStream} from '@selfcommunity/react-ui';
58
+ ```
59
+
60
+ #### Component Name
61
+
62
+ The name `SCLiveStream` can be used when providing style overrides in the theme.
63
+
64
+
65
+ #### CSS
66
+
67
+ |Rule Name|Global class|Description|
68
+ |---|---|---|
69
+ |root|.SCLiveStream-root|Styles applied to the root element.|
70
+ |avatar|.SCLiveStream-avatar|Styles applied to the avatar element.|
71
+ |primary|.SCLiveStream-primary|Styles applied to the primary item element section|
72
+ |secondary|.SCLiveStream-secondary|Styles applied to the secondary item element section|
73
+ |actions|.SCLiveStream-actions|Styles applied to the actions section.|
74
+
75
+
76
+ *
77
+ * @param inProps
78
+ */
79
+ export default function LiveStream(inProps: LiveStreamProps): JSX.Element;
@@ -0,0 +1,140 @@
1
+ import { __rest } from "tslib";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Avatar, Box, Button, CardActions, CardContent, CardMedia, Chip, Divider, Typography } from '@mui/material';
4
+ import { styled } from '@mui/material/styles';
5
+ import { useThemeProps } from '@mui/system';
6
+ import { Link, SCRoutes, useSCFetchLiveStream, useSCRouting } from '@selfcommunity/react-core';
7
+ import classNames from 'classnames';
8
+ import { useMemo } from 'react';
9
+ import { FormattedMessage, useIntl } from 'react-intl';
10
+ import BaseItem from '../../shared/BaseItem';
11
+ import Calendar from '../../shared/Calendar';
12
+ import { SCLiveStreamTemplateType } from '../../types/liveStream';
13
+ import User from '../User';
14
+ import Widget from '../Widget';
15
+ import { PREFIX } from './constants';
16
+ import { LiveStreamSkeleton } from './index';
17
+ import LiveStreamInfoDetails from '../../shared/LiveStreamInfoDetails';
18
+ const classes = {
19
+ root: `${PREFIX}-root`,
20
+ detailRoot: `${PREFIX}-detail-root`,
21
+ previewRoot: `${PREFIX}-preview-root`,
22
+ snippetRoot: `${PREFIX}-snippet-root`,
23
+ detailImageWrapper: `${PREFIX}-detail-image-wrapper`,
24
+ detailImage: `${PREFIX}-detail-image`,
25
+ detailInProgress: `${PREFIX}-detail-in-progress`,
26
+ detailNameWrapper: `${PREFIX}-detail-name-wrapper`,
27
+ detailName: `${PREFIX}-detail-name`,
28
+ detailContent: `${PREFIX}-detail-content`,
29
+ detailUser: `${PREFIX}-detail-user`,
30
+ detailFirstDivider: `${PREFIX}-detail-first-divider`,
31
+ detailSecondDivider: `${PREFIX}-detail-second-divider`,
32
+ detailActions: `${PREFIX}-detail-actions`,
33
+ previewImageWrapper: `${PREFIX}-preview-image-wrapper`,
34
+ previewImage: `${PREFIX}-preview-image`,
35
+ previewInProgress: `${PREFIX}-preview-in-progress`,
36
+ previewNameWrapper: `${PREFIX}-preview-name-wrapper`,
37
+ previewName: `${PREFIX}-preview-name`,
38
+ previewContent: `${PREFIX}-preview-content`,
39
+ previewActions: `${PREFIX}-preview-actions`,
40
+ snippetImage: `${PREFIX}-snippet-image`,
41
+ snippetAvatar: `${PREFIX}-snippet-avatar`,
42
+ snippetInProgress: `${PREFIX}-snippet-in-progress`,
43
+ snippetPrimary: `${PREFIX}-snippet-primary`,
44
+ snippetSecondary: `${PREFIX}-snippet-secondary`,
45
+ snippetActions: `${PREFIX}-snippet-actions`
46
+ };
47
+ const Root = styled(Widget, {
48
+ name: PREFIX,
49
+ slot: 'Root',
50
+ overridesResolver: (props, styles) => styles.root
51
+ })(() => ({}));
52
+ const DetailRoot = styled(Box, {
53
+ name: PREFIX,
54
+ slot: 'DetailRoot',
55
+ overridesResolver: (props, styles) => styles.detailRoot
56
+ })(() => ({}));
57
+ const PreviewRoot = styled(Box, {
58
+ name: PREFIX,
59
+ slot: 'PreviewRoot',
60
+ overridesResolver: (props, styles) => styles.previewRoot
61
+ })(() => ({}));
62
+ const SnippetRoot = styled(BaseItem, {
63
+ name: PREFIX,
64
+ slot: 'SnippetRoot',
65
+ overridesResolver: (props, styles) => styles.snippetRoot
66
+ })(() => ({}));
67
+ /**
68
+ * > API documentation for the Community-JS Live Stream component. Learn about the available props and the CSS API.
69
+ *
70
+ *
71
+ * This component renders an liveStream item.
72
+ * Take a look at our <strong>demo</strong> component [here](/docs/sdk/community-js/react-ui/Components/Event)
73
+
74
+ #### Import
75
+
76
+ ```jsx
77
+ import {liveStream} from '@selfcommunity/react-ui';
78
+ ```
79
+
80
+ #### Component Name
81
+
82
+ The name `SCLiveStream` can be used when providing style overrides in the theme.
83
+
84
+
85
+ #### CSS
86
+
87
+ |Rule Name|Global class|Description|
88
+ |---|---|---|
89
+ |root|.SCLiveStream-root|Styles applied to the root element.|
90
+ |avatar|.SCLiveStream-avatar|Styles applied to the avatar element.|
91
+ |primary|.SCLiveStream-primary|Styles applied to the primary item element section|
92
+ |secondary|.SCLiveStream-secondary|Styles applied to the secondary item element section|
93
+ |actions|.SCLiveStream-actions|Styles applied to the actions section.|
94
+
95
+
96
+ *
97
+ * @param inProps
98
+ */
99
+ export default function LiveStream(inProps) {
100
+ // PROPS
101
+ const props = useThemeProps({
102
+ props: inProps,
103
+ name: PREFIX
104
+ });
105
+ const { id = `live_stream_object_${props.liveStreamId ? props.liveStreamId : props.liveStream ? props.liveStream.id : ''}`, liveStreamId = null, liveStream = null, className = null, template = SCLiveStreamTemplateType.SNIPPET, hideInProgress = false, hideLiveStreamHost = false, actions, EventSkeletonComponentProps = {} } = props, rest = __rest(props, ["id", "liveStreamId", "liveStream", "className", "template", "hideInProgress", "hideLiveStreamHost", "actions", "EventSkeletonComponentProps"]);
106
+ // STATE
107
+ const { scLiveStream } = useSCFetchLiveStream({ id: liveStreamId, liveStream });
108
+ const inProgress = useMemo(() => scLiveStream /* && scLiveStream.running */, [scLiveStream]);
109
+ // CONTEXT
110
+ const scRoutingContext = useSCRouting();
111
+ // HOOKS
112
+ const intl = useIntl();
113
+ /**
114
+ * Renders liveStream object
115
+ */
116
+ if (!scLiveStream) {
117
+ return _jsx(LiveStreamSkeleton, Object.assign({ template: template }, EventSkeletonComponentProps, rest, { actions: actions }));
118
+ }
119
+ /**
120
+ * Renders liveStream object
121
+ */
122
+ let contentObj;
123
+ if (template === SCLiveStreamTemplateType.DETAIL) {
124
+ contentObj = (_jsxs(DetailRoot, Object.assign({ className: classes.detailRoot }, { children: [_jsxs(Box, Object.assign({ className: classes.detailImageWrapper }, { children: [_jsx(CardMedia, { component: "img", image: scLiveStream.cover, alt: scLiveStream.title, className: classes.detailImage }), !hideInProgress && inProgress && (_jsx(Chip, { size: "small", component: "div", label: _jsx(FormattedMessage, { id: "ui.liveStream.inProgress", defaultMessage: "ui.liveStream.inProgress" }), className: classes.detailInProgress })), _jsx(Calendar, { day: new Date(scLiveStream.created_at).getDate() })] })), _jsxs(CardContent, Object.assign({ className: classes.detailContent }, { children: [_jsx(Box, Object.assign({ className: classes.detailNameWrapper }, { children: _jsx(Typography, Object.assign({ variant: "h3", className: classes.detailName }, { children: scLiveStream.title })) })), _jsx(LiveStreamInfoDetails, { liveStream: scLiveStream }), !hideLiveStreamHost && (_jsx(User, { user: scLiveStream.host, elevation: 0, secondary: _jsx(Typography, Object.assign({ variant: "caption" }, { children: _jsx(FormattedMessage, { id: "ui.myEventsWidget.planner", defaultMessage: "ui.myEventsWidget.planner" }) })), actions: _jsx(_Fragment, {}), className: classes.detailUser })), _jsx(Divider, { className: classes.detailSecondDivider })] })), actions !== null && actions !== void 0 ? actions : (_jsx(CardActions, Object.assign({ className: classes.detailActions }, { children: _jsx(Button, Object.assign({ size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.liveStream.see", id: "ui.liveStream.see" }) })) })))] })));
125
+ }
126
+ else if (template === SCLiveStreamTemplateType.PREVIEW) {
127
+ contentObj = (_jsxs(PreviewRoot, Object.assign({ className: classes.previewRoot }, { children: [_jsxs(Box, Object.assign({ position: "relative", className: classes.previewImageWrapper }, { children: [_jsx(CardMedia, { component: "img", image: scLiveStream.cover, alt: scLiveStream.title, className: classes.previewImage }), !hideInProgress && inProgress && (_jsx(Chip, { size: "small", component: "div", label: _jsx(FormattedMessage, { id: "ui.liveStream.inProgress", defaultMessage: "ui.liveStream.inProgress" }), className: classes.previewInProgress }))] })), _jsx(CardContent, Object.assign({ className: classes.previewContent }, { children: _jsx(LiveStreamInfoDetails, { liveStream: scLiveStream, beforeDateInfo: _jsx(Link, Object.assign({ to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream), className: classes.previewNameWrapper }, { children: _jsx(Typography, Object.assign({ variant: "h5", className: classes.previewName }, { children: scLiveStream.title })) })) }) })), actions !== null && actions !== void 0 ? actions : (_jsx(CardActions, Object.assign({ className: classes.previewActions }, { children: _jsx(Button, Object.assign({ size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.liveStream.see", id: "ui.liveStream.see" }) })) })))] })));
128
+ }
129
+ else {
130
+ contentObj = (_jsx(SnippetRoot, { elevation: 0, square: true, disableTypography: true, className: classes.snippetRoot, image: _jsxs(Box, Object.assign({ className: classes.snippetImage }, { children: [_jsx(Avatar, { variant: "square", alt: scLiveStream.title, src: scLiveStream.cover, className: classes.snippetAvatar }), ' ', !hideInProgress && inProgress && (_jsx(Chip, { size: "small", component: "div", label: _jsx(FormattedMessage, { id: "ui.liveStream.inProgress", defaultMessage: "ui.liveStream.inProgress" }), className: classes.snippetInProgress }))] })), primary: _jsxs(Link, Object.assign({}, (scLiveStream.id && { to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream) }), { className: classes.snippetPrimary }, { children: [_jsx(Typography, Object.assign({ component: "span" }, { children: `${intl.formatDate(scLiveStream.created_at, {
131
+ weekday: 'long',
132
+ month: 'long',
133
+ day: 'numeric'
134
+ })}` })), _jsx(Typography, Object.assign({ variant: "body1" }, { children: scLiveStream.title }))] })), secondary: _jsx(Typography, Object.assign({ component: "p", variant: "body2", className: classes.snippetSecondary }, { children: _jsx(FormattedMessage, { id: `ui.eventForm.address.liveStream.label`, defaultMessage: `ui.eventForm.address.liveStream.label` }) })), actions: actions !== null && actions !== void 0 ? actions : (_jsx(Box, Object.assign({ className: classes.snippetActions }, { children: _jsx(Button, Object.assign({ size: "small", variant: "outlined", component: Link, to: scRoutingContext.url(SCRoutes.LIVESTREAM_ROUTE_NAME, scLiveStream) }, { children: _jsx(FormattedMessage, { defaultMessage: "ui.liveStream.see", id: "ui.liveStream.see" }) })) }))) }));
135
+ }
136
+ /**
137
+ * Renders root object
138
+ */
139
+ return (_jsx(Root, Object.assign({ id: id, className: classNames(classes.root, className, `${PREFIX}-${template}`) }, rest, { children: contentObj })));
140
+ }