@selfcommunity/react-ui 0.10.5-alpha.2 → 0.10.5-alpha.4
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.
- package/lib/cjs/assets/deafultCover.d.ts +2 -0
- package/lib/cjs/assets/deafultCover.js +3 -0
- package/lib/cjs/assets/liveStream/event.d.ts +2 -0
- package/lib/cjs/assets/liveStream/event.js +3 -0
- package/lib/cjs/assets/liveStream/live.d.ts +2 -0
- package/lib/cjs/assets/liveStream/live.js +3 -0
- package/lib/cjs/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/cjs/components/CreateLiveStreamButton/CreateLiveStreamButton.js +92 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamButton/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/cjs/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +103 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/cjs/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +188 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/cjs/components/CreateLiveStreamDialog/constants.js +4 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/cjs/components/CreateLiveStreamDialog/index.js +5 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/cjs/components/CreateLiveStreamDialog/types.js +13 -0
- package/lib/cjs/components/Editor/Editor.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/cjs/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/cjs/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/cjs/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/cjs/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/cjs/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/cjs/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/cjs/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/cjs/components/EventForm/EventAddress.js +59 -8
- package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
- package/lib/cjs/components/EventForm/EventForm.js +51 -13
- package/lib/cjs/components/EventForm/types.d.ts +7 -6
- package/lib/cjs/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/cjs/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/cjs/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/cjs/components/Feed/Feed.d.ts +2 -2
- package/lib/cjs/components/Feed/Skeleton.d.ts +1 -1
- package/lib/cjs/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/cjs/components/LiveStream/LiveStream.js +143 -0
- package/lib/cjs/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/cjs/components/LiveStream/Skeleton.js +92 -0
- package/lib/cjs/components/LiveStream/constants.d.ts +1 -0
- package/lib/cjs/components/LiveStream/constants.js +4 -0
- package/lib/cjs/components/LiveStream/index.d.ts +4 -0
- package/lib/cjs/components/LiveStream/index.js +8 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamForm.js +192 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/cjs/components/LiveStreamForm/LiveStreamFormSettings.js +75 -0
- package/lib/cjs/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/cjs/components/LiveStreamForm/constants.js +18 -0
- package/lib/cjs/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamForm/index.js +5 -0
- package/lib/cjs/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/cjs/components/LiveStreamForm/types.js +2 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamRoom.js +199 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +62 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +76 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +33 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +13 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +137 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +8 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +65 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +215 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +39 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +251 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +32 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +35 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +31 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +151 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +6 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +195 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/cjs/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +82 -0
- package/lib/cjs/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/cjs/components/LiveStreamRoom/constants.js +24 -0
- package/lib/cjs/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/cjs/components/LiveStreamRoom/index.js +5 -0
- package/lib/cjs/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/cjs/components/LiveStreamRoom/types.js +8 -0
- package/lib/cjs/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/cjs/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/cjs/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/cjs/components/Notification/LiveStream/LiveStream.js +75 -0
- package/lib/cjs/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/cjs/components/Notification/LiveStream/index.js +5 -0
- package/lib/cjs/components/Notification/Notification.js +5 -1
- package/lib/cjs/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/cjs/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/cjs/components/PlatformWidget/constants.js +5 -1
- package/lib/cjs/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/cjs/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/cjs/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/cjs/components/UserLiveStreamWidget/Skeleton.js +28 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/cjs/components/UserLiveStreamWidget/UserLiveStreamWidget.js +133 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/cjs/components/UserLiveStreamWidget/constants.js +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/cjs/components/UserLiveStreamWidget/index.js +8 -0
- package/lib/cjs/constants/LiveStream.d.ts +3 -0
- package/lib/cjs/constants/LiveStream.js +6 -0
- package/lib/cjs/index.d.ts +12 -1
- package/lib/cjs/index.js +33 -6
- package/lib/cjs/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/cjs/shared/CopyTextArea/index.js +8 -2
- package/lib/cjs/shared/EventInfoDetails/index.js +10 -1
- package/lib/cjs/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/cjs/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/cjs/shared/LiveStreamInfoDetails/index.js +53 -0
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/cjs/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/cjs/shared/StickyBox/index.d.ts +4 -4
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/cjs/shared/UpScalingTierBadge/UpScalingTierBadge.js +14 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/cjs/shared/UpScalingTierBadge/index.js +63 -0
- package/lib/cjs/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/cjs/types/composer.d.ts +1 -1
- package/lib/cjs/types/liveStream.d.ts +5 -0
- package/lib/cjs/types/liveStream.js +9 -0
- package/lib/cjs/utils/liveStream.d.ts +4 -0
- package/lib/cjs/utils/liveStream.js +25 -0
- package/lib/esm/assets/deafultCover.d.ts +2 -0
- package/lib/esm/assets/deafultCover.js +1 -0
- package/lib/esm/assets/liveStream/event.d.ts +2 -0
- package/lib/esm/assets/liveStream/event.js +1 -0
- package/lib/esm/assets/liveStream/live.d.ts +2 -0
- package/lib/esm/assets/liveStream/live.js +1 -0
- package/lib/esm/components/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.d.ts +44 -0
- package/lib/esm/components/CreateLiveStreamButton/CreateLiveStreamButton.js +89 -0
- package/lib/esm/components/CreateLiveStreamButton/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamButton/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.d.ts +49 -0
- package/lib/esm/components/CreateLiveStreamDialog/CreateLiveStreamDialog.js +100 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.d.ts +47 -0
- package/lib/esm/components/CreateLiveStreamDialog/LiveStreamSelector/LiveStreamSelector.js +183 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.d.ts +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/constants.js +1 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.d.ts +3 -0
- package/lib/esm/components/CreateLiveStreamDialog/index.js +2 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.d.ts +8 -0
- package/lib/esm/components/CreateLiveStreamDialog/types.js +10 -0
- package/lib/esm/components/Editor/Editor.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/HashtagNode.js +4 -4
- package/lib/esm/components/Editor/nodes/ImageNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/ImageNode.js +6 -6
- package/lib/esm/components/Editor/nodes/MentionNode.d.ts +1 -1
- package/lib/esm/components/Editor/nodes/MentionNode.js +4 -4
- package/lib/esm/components/Editor/plugins/ApiPlugin.d.ts +1 -1
- package/lib/esm/components/Editor/plugins/MentionsPlugin.d.ts +2 -2
- package/lib/esm/components/Editor/shared/useDecorators.d.ts +2 -2
- package/lib/esm/components/EventForm/EventAddress.d.ts +4 -2
- package/lib/esm/components/EventForm/EventAddress.js +59 -8
- package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
- package/lib/esm/components/EventForm/EventForm.js +51 -13
- package/lib/esm/components/EventForm/types.d.ts +7 -6
- package/lib/esm/components/EventFormDialog/EventFormDialog.d.ts +1 -1
- package/lib/esm/components/EventFormDialog/EventFormDialog.js +3 -3
- package/lib/esm/components/EventInfoWidget/EventInfoWidget.js +1 -1
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/esm/components/Feed/Feed.d.ts +2 -2
- package/lib/esm/components/Feed/Skeleton.d.ts +1 -1
- package/lib/esm/components/LiveStream/LiveStream.d.ts +79 -0
- package/lib/esm/components/LiveStream/LiveStream.js +140 -0
- package/lib/esm/components/LiveStream/Skeleton.d.ts +46 -0
- package/lib/esm/components/LiveStream/Skeleton.js +89 -0
- package/lib/esm/components/LiveStream/constants.d.ts +1 -0
- package/lib/esm/components/LiveStream/constants.js +1 -0
- package/lib/esm/components/LiveStream/index.d.ts +4 -0
- package/lib/esm/components/LiveStream/index.js +4 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.d.ts +55 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamForm.js +189 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.d.ts +47 -0
- package/lib/esm/components/LiveStreamForm/LiveStreamFormSettings.js +71 -0
- package/lib/esm/components/LiveStreamForm/constants.d.ts +15 -0
- package/lib/esm/components/LiveStreamForm/constants.js +15 -0
- package/lib/esm/components/LiveStreamForm/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamForm/index.js +2 -0
- package/lib/esm/components/LiveStreamForm/types.d.ts +11 -0
- package/lib/esm/components/LiveStreamForm/types.js +1 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.d.ts +85 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamRoom.js +196 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.d.ts +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ControlBar.js +58 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.d.ts +10 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/DisconnectButton.js +73 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/FocusLayout.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.d.ts +17 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamProvider.js +9 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.d.ts +77 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/LiveStreamVideoConference.js +134 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.d.ts +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantPlaceholder.js +6 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.d.ts +28 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTile.js +60 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.d.ts +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileActions.js +212 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.d.ts +15 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/ParticipantTileAvatar.js +36 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.d.ts +55 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/PreJoin.js +245 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.d.ts +5 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/RecordingIndicator.js +29 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.d.ts +19 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/SettingsMenuToggle.js +30 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.d.ts +23 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/TrackToggle.js +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.d.ts +26 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/VideoConference.js +147 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/constants.js +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.d.ts +7 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/useLiveStreamCheck.js +191 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.d.ts +27 -0
- package/lib/esm/components/LiveStreamRoom/LiveStreamVideoConference/utils.js +74 -0
- package/lib/esm/components/LiveStreamRoom/constants.d.ts +21 -0
- package/lib/esm/components/LiveStreamRoom/constants.js +21 -0
- package/lib/esm/components/LiveStreamRoom/index.d.ts +3 -0
- package/lib/esm/components/LiveStreamRoom/index.js +2 -0
- package/lib/esm/components/LiveStreamRoom/types.d.ts +22 -0
- package/lib/esm/components/LiveStreamRoom/types.js +4 -0
- package/lib/esm/components/NavigationMenuIconButton/DefaultDrawerSkeleton.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/DefaultHeaderContent.d.ts +1 -1
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.d.ts +16 -0
- package/lib/esm/components/NavigationMenuIconButton/NavigationMenuDrawer.js +12 -3
- package/lib/esm/components/Notification/LiveStream/LiveStream.d.ts +15 -0
- package/lib/esm/components/Notification/LiveStream/LiveStream.js +72 -0
- package/lib/esm/components/Notification/LiveStream/index.d.ts +3 -0
- package/lib/esm/components/Notification/LiveStream/index.js +2 -0
- package/lib/esm/components/Notification/Notification.js +5 -1
- package/lib/esm/components/OnBoardingWidget/OnBoardingWidget.js +5 -5
- package/lib/esm/components/PlatformWidget/constants.d.ts +4 -0
- package/lib/esm/components/PlatformWidget/constants.js +4 -0
- package/lib/esm/components/PrivateMessageComponent/Skeleton.d.ts +1 -1
- package/lib/esm/components/SnippetNotifications/SnippetNotifications.js +4 -0
- package/lib/esm/components/ToastNotifications/ToastNotifications.js +6 -2
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.d.ts +2 -0
- package/lib/esm/components/UserLiveStreamWidget/Skeleton.js +24 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.d.ts +47 -0
- package/lib/esm/components/UserLiveStreamWidget/UserLiveStreamWidget.js +130 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.d.ts +1 -0
- package/lib/esm/components/UserLiveStreamWidget/constants.js +1 -0
- package/lib/esm/components/UserLiveStreamWidget/index.d.ts +4 -0
- package/lib/esm/components/UserLiveStreamWidget/index.js +4 -0
- package/lib/esm/constants/LiveStream.d.ts +3 -0
- package/lib/esm/constants/LiveStream.js +3 -0
- package/lib/esm/index.d.ts +12 -1
- package/lib/esm/index.js +13 -2
- package/lib/esm/shared/CopyTextArea/index.d.ts +2 -2
- package/lib/esm/shared/CopyTextArea/index.js +8 -2
- package/lib/esm/shared/EventInfoDetails/index.js +13 -4
- package/lib/esm/shared/InfiniteScroll/index.d.ts +1 -1
- package/lib/esm/shared/LiveStreamInfoDetails/index.d.ts +17 -0
- package/lib/esm/shared/LiveStreamInfoDetails/index.js +50 -0
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/Link/UrlTextField/index.d.ts +1 -1
- package/lib/esm/shared/MetadataField/MetadataField.d.ts +1 -1
- package/lib/esm/shared/StickyBox/index.d.ts +4 -4
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.d.ts +5 -0
- package/lib/esm/shared/UpScalingTierBadge/UpScalingTierBadge.js +10 -0
- package/lib/esm/shared/UpScalingTierBadge/index.d.ts +7 -0
- package/lib/esm/shared/UpScalingTierBadge/index.js +60 -0
- package/lib/esm/shared/UsernameTextField/index.d.ts +1 -1
- package/lib/esm/types/composer.d.ts +1 -1
- package/lib/esm/types/liveStream.d.ts +5 -0
- package/lib/esm/types/liveStream.js +6 -0
- package/lib/esm/utils/liveStream.d.ts +4 -0
- package/lib/esm/utils/liveStream.js +18 -0
- package/lib/umd/653.js +2 -0
- package/lib/umd/react-ui.js +1 -19
- package/lib/umd/react-ui.js.LICENSE.txt +2 -0
- package/package.json +22 -8
- package/lib/umd/314.js +0 -2
- /package/lib/umd/{314.js.LICENSE.txt → 653.js.LICENSE.txt} +0 -0
|
@@ -6,19 +6,28 @@ const material_1 = require("@mui/material");
|
|
|
6
6
|
const Icon_1 = tslib_1.__importDefault(require("@mui/material/Icon"));
|
|
7
7
|
const styles_1 = require("@mui/material/styles");
|
|
8
8
|
const system_1 = require("@mui/system");
|
|
9
|
+
const react_core_1 = require("@selfcommunity/react-core");
|
|
9
10
|
const types_1 = require("@selfcommunity/types");
|
|
10
11
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
11
12
|
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
12
13
|
const react_1 = require("react");
|
|
13
14
|
const react_intl_1 = require("react-intl");
|
|
14
|
-
const HiddenPlaceholder_1 = tslib_1.__importDefault(require("../../shared/HiddenPlaceholder"));
|
|
15
15
|
const UrlTextField_1 = tslib_1.__importDefault(require("../../shared/UrlTextField"));
|
|
16
16
|
const constants_1 = require("./constants");
|
|
17
|
-
const
|
|
17
|
+
const LiveStream_1 = tslib_1.__importDefault(require("../LiveStream"));
|
|
18
|
+
const LiveStreamFormSettings_1 = tslib_1.__importDefault(require("../LiveStreamForm/LiveStreamFormSettings"));
|
|
19
|
+
const liveStream_1 = require("../../types/liveStream");
|
|
20
|
+
const constants_2 = require("../LiveStreamForm/constants");
|
|
21
|
+
const utils_1 = require("./utils");
|
|
22
|
+
const react_core_2 = require("@selfcommunity/react-core");
|
|
18
23
|
const messages = (0, react_intl_1.defineMessages)({
|
|
19
24
|
virtualPlaceholder: {
|
|
20
25
|
id: 'ui.eventForm.address.online.placeholder',
|
|
21
26
|
defaultMessage: 'ui.eventForm.address.online.placeholder'
|
|
27
|
+
},
|
|
28
|
+
name: {
|
|
29
|
+
id: 'ui.eventForm.name.placeholder',
|
|
30
|
+
defaultMessage: 'ui.eventForm.name.placeholder'
|
|
22
31
|
}
|
|
23
32
|
});
|
|
24
33
|
const classes = {
|
|
@@ -32,6 +41,7 @@ const Root = (0, styles_1.styled)(material_1.Box, {
|
|
|
32
41
|
slot: 'EventAddressRoot'
|
|
33
42
|
})(() => ({}));
|
|
34
43
|
function EventAddress(inProps) {
|
|
44
|
+
var _a, _b;
|
|
35
45
|
//PROPS
|
|
36
46
|
const props = (0, system_1.useThemeProps)({
|
|
37
47
|
props: inProps,
|
|
@@ -40,18 +50,53 @@ function EventAddress(inProps) {
|
|
|
40
50
|
// INTL
|
|
41
51
|
const intl = (0, react_intl_1.useIntl)();
|
|
42
52
|
// PROPS
|
|
43
|
-
const { className,
|
|
53
|
+
const { className, locations = [types_1.SCEventLocationType.PERSON, types_1.SCEventLocationType.ONLINE, types_1.SCEventLocationType.LIVESTREAM], event, forwardGeolocationData, forwardLivestreamSettingsData } = props;
|
|
44
54
|
// STATE
|
|
45
|
-
const [location, setLocation] = (0, react_1.useState)((event === null || event === void 0 ? void 0 : event.location) ||
|
|
55
|
+
const [location, setLocation] = (0, react_1.useState)((event === null || event === void 0 ? void 0 : event.location) || locations[0]);
|
|
46
56
|
const [geolocation, setGeoLocation] = (0, react_1.useState)(event ? { description: event.geolocation } : null);
|
|
47
57
|
const [inputValue, setInputValue] = (0, react_1.useState)('');
|
|
48
58
|
const [suggestions, setSuggestions] = (0, react_1.useState)([]);
|
|
49
59
|
const [timeoutId, setTimeoutId] = (0, react_1.useState)(null);
|
|
60
|
+
const liveStream = (0, react_1.useMemo)(() => {
|
|
61
|
+
return (event.live_stream ||
|
|
62
|
+
{
|
|
63
|
+
title: (event === null || event === void 0 ? void 0 : event.name) || `${intl.formatMessage(messages.name)}`,
|
|
64
|
+
created_at: (event === null || event === void 0 ? void 0 : event.start_date) || (0, utils_1.getNewDate)(),
|
|
65
|
+
settings: constants_2.LIVESTREAM_DEFAULT_SETTINGS
|
|
66
|
+
});
|
|
67
|
+
}, [event]);
|
|
68
|
+
// CONTEXT
|
|
69
|
+
const scUserContext = (0, react_core_1.useSCUser)();
|
|
70
|
+
const { preferences, features } = (0, react_core_1.useSCPreferences)();
|
|
71
|
+
const isFreeTrialTier = (0, react_1.useMemo)(() => preferences &&
|
|
72
|
+
react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
|
|
73
|
+
preferences[react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
|
|
74
|
+
preferences[react_core_1.SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === types_1.SCCommunitySubscriptionTier.FREE_TRIAL, [preferences]);
|
|
75
|
+
const liveStreamEnabled = (0, react_1.useMemo)(() => preferences &&
|
|
76
|
+
features &&
|
|
77
|
+
features.includes(types_1.SCFeatureName.LIVE_STREAM) &&
|
|
78
|
+
react_core_1.SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in preferences &&
|
|
79
|
+
preferences[react_core_1.SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [preferences, features]);
|
|
80
|
+
const canViewLiveTab = (0, react_1.useMemo)(() => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
return (!isFreeTrialTier || (isFreeTrialTier && (scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) && (scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user.id) === 1)) &&
|
|
83
|
+
(((_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) || event.live_stream);
|
|
84
|
+
}, [(_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission, event]);
|
|
85
|
+
const isInPersonTabActive = (0, react_1.useMemo)(() => locations.includes(types_1.SCEventLocationType.PERSON) || event.location === types_1.SCEventLocationType.PERSON, [locations]);
|
|
86
|
+
const isOnlineTabActive = (0, react_1.useMemo)(() => locations.includes(types_1.SCEventLocationType.ONLINE) || event.location === types_1.SCEventLocationType.ONLINE, [locations]);
|
|
87
|
+
const isLiveTabActive = (0, react_1.useMemo)(() => {
|
|
88
|
+
var _a, _b;
|
|
89
|
+
return liveStreamEnabled &&
|
|
90
|
+
locations.includes(types_1.SCEventLocationType.LIVESTREAM) &&
|
|
91
|
+
(!isFreeTrialTier || (isFreeTrialTier && (scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) && (scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user.id) === 1)) &&
|
|
92
|
+
(((_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) || event.live_stream);
|
|
93
|
+
}, [liveStreamEnabled, (_b = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _b === void 0 ? void 0 : _b.permission, event]);
|
|
50
94
|
// HOOKS
|
|
51
|
-
const { isLoaded, geocodingApiKey } = (0,
|
|
95
|
+
const { isLoaded, geocodingApiKey } = (0, react_core_2.useSCGoogleApiLoader)();
|
|
52
96
|
// HANDLERS
|
|
53
97
|
const handleChange = (_event, newValue) => {
|
|
54
98
|
setLocation(newValue);
|
|
99
|
+
forwardGeolocationData({ location: newValue });
|
|
55
100
|
};
|
|
56
101
|
const handleSelection = (_event, newValue) => tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
57
102
|
if (newValue) {
|
|
@@ -82,6 +127,9 @@ function EventAddress(inProps) {
|
|
|
82
127
|
const handleLinkChange = (event) => {
|
|
83
128
|
forwardGeolocationData({ location, link: event.target.value });
|
|
84
129
|
};
|
|
130
|
+
const handleLiveStreamSettingsChange = (settings) => {
|
|
131
|
+
forwardLivestreamSettingsData(settings);
|
|
132
|
+
};
|
|
85
133
|
(0, react_1.useEffect)(() => {
|
|
86
134
|
if (timeoutId) {
|
|
87
135
|
clearTimeout(timeoutId);
|
|
@@ -106,10 +154,13 @@ function EventAddress(inProps) {
|
|
|
106
154
|
}
|
|
107
155
|
}, [inputValue]);
|
|
108
156
|
if (!geocodingApiKey && !isLoaded) {
|
|
109
|
-
return
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
if (!isInPersonTabActive && !isOnlineTabActive && !isLiveTabActive) {
|
|
160
|
+
return null;
|
|
110
161
|
}
|
|
111
|
-
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ className: classes.tabs, value: location, onChange: handleChange, indicatorColor: "secondary", textColor: "secondary", variant: "fullWidth" }, { children: [(0, jsx_runtime_1.jsx)(material_1.Tab, { value: types_1.SCEventLocationType.PERSON, classes: { root: classes.tab }, icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "add_location_alt" }), iconPosition: "start", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.label", defaultMessage: "ui.eventForm.address.live.label" }) }), (0, jsx_runtime_1.jsx)(material_1.Tab, { value: types_1.SCEventLocationType.ONLINE, classes: { root: classes.tab }, icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "play_circle_outline" }), iconPosition: "start", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.online.label", defaultMessage: "ui.eventForm.address.online.label" }) })] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.tabContent }, { children: [location === types_1.SCEventLocationType.PERSON && ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { disabled: !geocodingApiKey, size: "small", value: geolocation, onChange: handleSelection, inputValue: inputValue, onInputChange: handleLocationChange, options: suggestions, getOptionLabel: (option) => option.description || geolocation.description, noOptionsText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.noResults", defaultMessage: "ui.eventForm.address.live.noResults" }), isOptionEqualToValue: (option, value) => option.description === value.description, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.placeholder", defaultMessage: "ui.eventForm.address.live.placeholder" }), variant: "outlined", fullWidth: true, InputProps: Object.assign(Object.assign({}, params.InputProps), { endAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "add_location_alt" }) })), params.InputProps.endAdornment] })) }) }))) })), location === types_1.SCEventLocationType.ONLINE && ((0, jsx_runtime_1.jsx)(UrlTextField_1.default, { size: "small", fullWidth: true, type: "url", placeholder: `${intl.formatMessage(messages.virtualPlaceholder)}`, helperText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.online.help", defaultMessage: "ui.eventForm.address.online.help" }), InputProps: {
|
|
162
|
+
return ((0, jsx_runtime_1.jsxs)(Root, Object.assign({ className: (0, classnames_1.default)(classes.root, className) }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Tabs, Object.assign({ className: classes.tabs, value: location, onChange: handleChange, indicatorColor: "secondary", textColor: "secondary", variant: "fullWidth" }, { children: [isInPersonTabActive && ((0, jsx_runtime_1.jsx)(material_1.Tab, { value: types_1.SCEventLocationType.PERSON, classes: { root: classes.tab }, icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "add_location_alt" }), iconPosition: "start", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.label", defaultMessage: "ui.eventForm.address.live.label" }) })), isOnlineTabActive && ((0, jsx_runtime_1.jsx)(material_1.Tab, { value: types_1.SCEventLocationType.ONLINE, classes: { root: classes.tab }, icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "play_circle_outline" }), iconPosition: "start", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.online.label", defaultMessage: "ui.eventForm.address.online.label" }) })), isLiveTabActive && canViewLiveTab && ((0, jsx_runtime_1.jsx)(material_1.Tab, { value: types_1.SCEventLocationType.LIVESTREAM, classes: { root: classes.tab }, icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "photo_camera" }), iconPosition: "start", label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.liveStream.label", defaultMessage: "ui.eventForm.address.liveStream.label" }) }))] })), (0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.tabContent }, { children: [isInPersonTabActive && location === types_1.SCEventLocationType.PERSON && ((0, jsx_runtime_1.jsx)(material_1.Autocomplete, { disabled: !geocodingApiKey, size: "small", value: geolocation, onChange: handleSelection, inputValue: inputValue, onInputChange: handleLocationChange, options: suggestions, getOptionLabel: (option) => option.description || geolocation.description, noOptionsText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.noResults", defaultMessage: "ui.eventForm.address.live.noResults" }), isOptionEqualToValue: (option, value) => option.description === value.description, renderInput: (params) => ((0, jsx_runtime_1.jsx)(material_1.TextField, Object.assign({}, params, { label: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.live.placeholder", defaultMessage: "ui.eventForm.address.live.placeholder" }), variant: "outlined", fullWidth: true, InputProps: Object.assign(Object.assign({}, params.InputProps), { endAdornment: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.InputAdornment, Object.assign({ position: "start" }, { children: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "add_location_alt" }) })), params.InputProps.endAdornment] })) }) }))) })), isOnlineTabActive && location === types_1.SCEventLocationType.ONLINE && ((0, jsx_runtime_1.jsx)(UrlTextField_1.default, { size: "small", fullWidth: true, type: "url", placeholder: `${intl.formatMessage(messages.virtualPlaceholder)}`, helperText: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.address.online.help", defaultMessage: "ui.eventForm.address.online.help" }), InputProps: {
|
|
112
163
|
endAdornment: (0, jsx_runtime_1.jsx)(Icon_1.default, { children: "play_circle_outline" })
|
|
113
|
-
}, onChange: handleLinkChange }))] }))] })));
|
|
164
|
+
}, onChange: handleLinkChange })), isLiveTabActive && canViewLiveTab && location === types_1.SCEventLocationType.LIVESTREAM && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(LiveStream_1.default, { template: liveStream_1.SCLiveStreamTemplateType.SNIPPET, liveStream: liveStream, actions: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }), (0, jsx_runtime_1.jsx)(LiveStreamFormSettings_1.default, { settings: liveStream.settings || constants_2.LIVESTREAM_DEFAULT_SETTINGS, onChange: handleLiveStreamSettingsChange })] }))] }))] })));
|
|
114
165
|
}
|
|
115
166
|
exports.default = EventAddress;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@mui/material';
|
|
2
|
-
import { SCEventType } from '@selfcommunity/types';
|
|
2
|
+
import { SCEventLocationType, SCEventType } from '@selfcommunity/types';
|
|
3
|
+
import { EventAddressProps } from './EventAddress';
|
|
3
4
|
export interface EventFormProps extends BoxProps {
|
|
4
5
|
/**
|
|
5
6
|
* Overrides or extends the styles applied to the component.
|
|
@@ -11,6 +12,11 @@ export interface EventFormProps extends BoxProps {
|
|
|
11
12
|
* @default null
|
|
12
13
|
*/
|
|
13
14
|
event?: SCEventType;
|
|
15
|
+
/**
|
|
16
|
+
* Initial location
|
|
17
|
+
* @default SCEventLocationType.PERSON
|
|
18
|
+
*/
|
|
19
|
+
presetLocation?: SCEventLocationType;
|
|
14
20
|
/**
|
|
15
21
|
* On success callback function
|
|
16
22
|
* @default null
|
|
@@ -21,6 +27,11 @@ export interface EventFormProps extends BoxProps {
|
|
|
21
27
|
* @default null
|
|
22
28
|
*/
|
|
23
29
|
onError?: (error: any) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Props to spread to EventAddress component
|
|
32
|
+
* @default empty object
|
|
33
|
+
*/
|
|
34
|
+
EventAddressComponentProps?: Pick<EventAddressProps, 'locations'>;
|
|
24
35
|
/**
|
|
25
36
|
* Any other properties
|
|
26
37
|
*/
|
|
@@ -25,6 +25,8 @@ const constants_1 = require("./constants");
|
|
|
25
25
|
const EventAddress_1 = tslib_1.__importDefault(require("./EventAddress"));
|
|
26
26
|
const UploadEventCover_1 = tslib_1.__importDefault(require("./UploadEventCover"));
|
|
27
27
|
const utils_2 = require("./utils");
|
|
28
|
+
const constants_2 = require("../LiveStreamForm/constants");
|
|
29
|
+
const deafultCover_1 = tslib_1.__importDefault(require("../../assets/deafultCover"));
|
|
28
30
|
const messages = (0, react_intl_1.defineMessages)({
|
|
29
31
|
name: {
|
|
30
32
|
id: 'ui.eventForm.name.placeholder',
|
|
@@ -119,13 +121,13 @@ const Root = (0, styles_1.styled)(material_1.Box, {
|
|
|
119
121
|
* @param inProps
|
|
120
122
|
*/
|
|
121
123
|
function EventForm(inProps) {
|
|
122
|
-
var _a, _b, _c;
|
|
124
|
+
var _a, _b, _c, _d;
|
|
123
125
|
//PROPS
|
|
124
126
|
const props = (0, system_1.useThemeProps)({
|
|
125
127
|
props: inProps,
|
|
126
128
|
name: constants_1.PREFIX
|
|
127
129
|
});
|
|
128
|
-
const { className, onSuccess, onError, event =
|
|
130
|
+
const { className, onSuccess, onError, event, presetLocation, EventAddressComponentProps = {} } = props, rest = tslib_1.__rest(props, ["className", "onSuccess", "onError", "event", "presetLocation", "EventAddressComponentProps"]);
|
|
129
131
|
// CONTEXT
|
|
130
132
|
const scContext = (0, react_core_1.useSCContext)();
|
|
131
133
|
// INTL
|
|
@@ -133,20 +135,29 @@ function EventForm(inProps) {
|
|
|
133
135
|
const startDateTime = (0, react_1.useMemo)(() => (0, utils_2.getNewDate)(event === null || event === void 0 ? void 0 : event.start_date), [event]);
|
|
134
136
|
const endDateTime = (0, react_1.useMemo)(() => (0, utils_2.getNewDate)(event === null || event === void 0 ? void 0 : event.end_date), [event]);
|
|
135
137
|
const initialFieldState = {
|
|
138
|
+
name: (event === null || event === void 0 ? void 0 : event.name) || '',
|
|
139
|
+
description: event ? event.description : '',
|
|
136
140
|
imageOriginal: (event === null || event === void 0 ? void 0 : event.image_bigger) || '',
|
|
137
141
|
imageOriginalFile: '',
|
|
138
142
|
startDate: event ? startDateTime : (0, utils_2.getNewDate)(),
|
|
139
143
|
startTime: event ? startDateTime : (0, utils_2.getLaterHoursDate)(1),
|
|
140
144
|
endDate: (event === null || event === void 0 ? void 0 : event.end_date) ? endDateTime : (0, utils_2.getNewDate)(),
|
|
141
145
|
endTime: (event === null || event === void 0 ? void 0 : event.end_date) ? endDateTime : (0, utils_2.getLaterHoursDate)(3),
|
|
142
|
-
location: (event === null || event === void 0 ? void 0 : event.location)
|
|
146
|
+
location: (event === null || event === void 0 ? void 0 : event.location)
|
|
147
|
+
? event.location === types_1.SCEventLocationType.ONLINE && event.live_stream
|
|
148
|
+
? types_1.SCEventLocationType.LIVESTREAM
|
|
149
|
+
: types_1.SCEventLocationType.ONLINE
|
|
150
|
+
: ((_a = EventAddressComponentProps.locations) === null || _a === void 0 ? void 0 : _a.length)
|
|
151
|
+
? presetLocation in EventAddressComponentProps.locations
|
|
152
|
+
? presetLocation
|
|
153
|
+
: EventAddressComponentProps.locations[0]
|
|
154
|
+
: types_1.SCEventLocationType.PERSON,
|
|
143
155
|
geolocation: (event === null || event === void 0 ? void 0 : event.geolocation) || '',
|
|
144
156
|
lat: (event === null || event === void 0 ? void 0 : event.geolocation_lat) || null,
|
|
145
157
|
lng: (event === null || event === void 0 ? void 0 : event.geolocation_lng) || null,
|
|
146
158
|
link: (event === null || event === void 0 ? void 0 : event.link) || '',
|
|
159
|
+
liveStreamSettings: (event === null || event === void 0 ? void 0 : event.live_stream) ? event === null || event === void 0 ? void 0 : event.live_stream.settings : null,
|
|
147
160
|
recurring: (event === null || event === void 0 ? void 0 : event.recurring) || types_1.SCEventRecurrenceType.NEVER,
|
|
148
|
-
name: (event === null || event === void 0 ? void 0 : event.name) || '',
|
|
149
|
-
description: event ? event.description : '',
|
|
150
161
|
isPublic: (event === null || event === void 0 ? void 0 : event.privacy) === types_1.SCEventPrivacyType.PUBLIC || true,
|
|
151
162
|
isSubmitting: false
|
|
152
163
|
};
|
|
@@ -162,7 +173,7 @@ function EventForm(inProps) {
|
|
|
162
173
|
const disablePastEndTime = (0, react_1.useMemo)(() => field.endDate.getDate() === (0, utils_2.getNewDate)().getDate(), [field]);
|
|
163
174
|
const _backgroundCover = Object.assign({}, (field.imageOriginal
|
|
164
175
|
? { background: `url('${field.imageOriginal}') center / cover` }
|
|
165
|
-
: { background: `url('${
|
|
176
|
+
: { background: `url('${deafultCover_1.default}') no-repeat 0 0 / 100% 100%` }));
|
|
166
177
|
const handleChangeCover = (0, react_1.useCallback)((cover) => {
|
|
167
178
|
setField((prev) => (Object.assign(Object.assign({}, prev), { ['imageOriginalFile']: cover })));
|
|
168
179
|
const reader = new FileReader();
|
|
@@ -194,6 +205,9 @@ function EventForm(inProps) {
|
|
|
194
205
|
setField((prev) => (Object.assign(Object.assign({}, prev), data)));
|
|
195
206
|
setGenericError(null);
|
|
196
207
|
}, []);
|
|
208
|
+
const handleLiveStreamSettingsData = (0, react_1.useCallback)((data) => {
|
|
209
|
+
setField((prev) => (Object.assign(Object.assign({}, prev), { liveStreamSettings: Object.assign(Object.assign({}, prev.liveStreamSettings), data) })));
|
|
210
|
+
}, []);
|
|
197
211
|
const handleSubmit = (0, react_1.useCallback)(() => {
|
|
198
212
|
setField((prev) => (Object.assign(Object.assign({}, prev), { ['isSubmitting']: true })));
|
|
199
213
|
setGenericError(null);
|
|
@@ -205,14 +219,21 @@ function EventForm(inProps) {
|
|
|
205
219
|
formData.append('start_date', (0, utils_2.combineDateAndTime)(field.startDate, field.startTime));
|
|
206
220
|
formData.append('recurring', field.recurring);
|
|
207
221
|
formData.append('end_date', (0, utils_2.combineDateAndTime)(field.endDate, field.endTime));
|
|
208
|
-
formData.append('location', field.location);
|
|
222
|
+
formData.append('location', field.location === types_1.SCEventLocationType.PERSON ? types_1.SCEventLocationType.PERSON : types_1.SCEventLocationType.ONLINE);
|
|
209
223
|
if (field.location === types_1.SCEventLocationType.ONLINE) {
|
|
210
224
|
formData.append('link', field.link);
|
|
225
|
+
formData.append('live_stream_settings', '');
|
|
226
|
+
}
|
|
227
|
+
else if (field.location === types_1.SCEventLocationType.LIVESTREAM) {
|
|
228
|
+
formData.append('link', '');
|
|
229
|
+
formData.append('live_stream_settings', JSON.stringify(Object.assign(Object.assign({}, constants_2.LIVESTREAM_DEFAULT_SETTINGS), field.liveStreamSettings)));
|
|
211
230
|
}
|
|
212
231
|
else if (field.location === types_1.SCEventLocationType.PERSON) {
|
|
213
232
|
formData.append('geolocation', field.geolocation);
|
|
214
233
|
formData.append('geolocation_lat', field.lat.toString());
|
|
215
234
|
formData.append('geolocation_lng', field.lng.toString());
|
|
235
|
+
formData.append('link', '');
|
|
236
|
+
formData.append('live_stream_settings', '');
|
|
216
237
|
}
|
|
217
238
|
if (privateEnabled) {
|
|
218
239
|
formData.append('privacy', field.isPublic ? types_1.SCEventPrivacyType.PUBLIC : types_1.SCEventPrivacyType.PRIVATE);
|
|
@@ -236,12 +257,18 @@ function EventForm(inProps) {
|
|
|
236
257
|
})
|
|
237
258
|
.catch((e) => {
|
|
238
259
|
const _error = (0, api_services_1.formatHttpErrorCode)(e);
|
|
239
|
-
if (
|
|
260
|
+
if (!Object.keys(_error).length) {
|
|
240
261
|
setGenericError(intl.formatMessage({
|
|
241
262
|
id: 'ui.eventForm.genericError',
|
|
242
263
|
defaultMessage: 'ui.eventForm.genericError'
|
|
243
264
|
}));
|
|
244
265
|
}
|
|
266
|
+
else if ('errorsError' in _error) {
|
|
267
|
+
setGenericError(intl.formatMessage({
|
|
268
|
+
id: 'ui.eventForm.liveStream.error.monthlyMinuteLimitReached',
|
|
269
|
+
defaultMessage: 'ui.eventForm.liveStream.error.monthlyMinuteLimitReached'
|
|
270
|
+
}));
|
|
271
|
+
}
|
|
245
272
|
else {
|
|
246
273
|
setGenericError(null);
|
|
247
274
|
}
|
|
@@ -266,7 +293,7 @@ function EventForm(inProps) {
|
|
|
266
293
|
setError(error);
|
|
267
294
|
}
|
|
268
295
|
setGenericError(null);
|
|
269
|
-
}, [setField,
|
|
296
|
+
}, [error, setField, setGenericError]);
|
|
270
297
|
const handleChangeDateTime = (0, react_1.useCallback)((value, name) => {
|
|
271
298
|
setField((prev) => (Object.assign(Object.assign({}, prev), { [name]: value })));
|
|
272
299
|
if (error[`${name}Error`]) {
|
|
@@ -278,7 +305,7 @@ function EventForm(inProps) {
|
|
|
278
305
|
setError(error);
|
|
279
306
|
}
|
|
280
307
|
setGenericError(null);
|
|
281
|
-
}, [setField,
|
|
308
|
+
}, [error, setField, setGenericError]);
|
|
282
309
|
const shouldDisableDate = (0, react_1.useCallback)((date) => {
|
|
283
310
|
let disabled = false;
|
|
284
311
|
switch (field.recurring) {
|
|
@@ -347,7 +374,17 @@ function EventForm(inProps) {
|
|
|
347
374
|
// @ts-ignore
|
|
348
375
|
toolbarTitle: (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.time.title", defaultMessage: "ui.eventForm.time.title" })
|
|
349
376
|
}
|
|
350
|
-
}, onChange: (value) => handleChangeDateTime(value, 'endTime'), shouldDisableTime: shouldDisableTime })] })) })), (0, jsx_runtime_1.jsx)(EventAddress_1.default,
|
|
377
|
+
}, onChange: (value) => handleChangeDateTime(value, 'endTime'), shouldDisableTime: shouldDisableTime })] })) })), (0, jsx_runtime_1.jsx)(EventAddress_1.default, Object.assign({ forwardGeolocationData: handleGeoData, forwardLivestreamSettingsData: handleLiveStreamSettingsData, event: Object.assign(Object.assign({}, event), {
|
|
378
|
+
name: field.name,
|
|
379
|
+
start_date: field.startDate,
|
|
380
|
+
location: field.location,
|
|
381
|
+
geolocation: field.geolocation,
|
|
382
|
+
live_stream: {
|
|
383
|
+
title: field.name || `${intl.formatMessage(messages.name)}`,
|
|
384
|
+
created_at: field.startDate,
|
|
385
|
+
settings: field.liveStreamSettings
|
|
386
|
+
}
|
|
387
|
+
}) }, EventAddressComponentProps)), privateEnabled && ((0, jsx_runtime_1.jsxs)(material_1.Box, Object.assign({ className: classes.privacySection }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Stack, Object.assign({ direction: "row", spacing: 1, alignItems: "center", justifyContent: "center" }, { children: [(0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: !field.isPublic }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "private" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.privacy.private", defaultMessage: "ui.eventForm.privacy.private" })] })), (0, jsx_runtime_1.jsx)(material_1.Switch, { className: classes.switch, checked: field.isPublic, onChange: () => setField((prev) => (Object.assign(Object.assign({}, prev), { ['isPublic']: !field.isPublic }))), disabled: event && !field.isPublic }), (0, jsx_runtime_1.jsxs)(material_1.Typography, Object.assign({ className: (0, classnames_1.default)(classes.switchLabel, { [classes.active]: field.isPublic }) }, { children: [(0, jsx_runtime_1.jsx)(material_1.Icon, { children: "public" }), (0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.privacy.public", defaultMessage: "ui.eventForm.privacy.public" })] }))] })), (0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2", textAlign: "center", className: classes.privacySectionInfo }, { children: field.isPublic ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.privacy.public.info", defaultMessage: "ui.eventForm.privacy.public.info", values: {
|
|
351
388
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore,@typescript-eslint/ban-ts-comment
|
|
352
389
|
// @ts-ignores
|
|
353
390
|
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
@@ -356,12 +393,13 @@ function EventForm(inProps) {
|
|
|
356
393
|
// @ts-ignore
|
|
357
394
|
b: (chunks) => (0, jsx_runtime_1.jsx)("strong", { children: chunks })
|
|
358
395
|
} })) }))] }))), (0, jsx_runtime_1.jsx)(material_1.TextField, { multiline: true, className: classes.description, placeholder: `${intl.formatMessage(messages.description)}`, margin: "normal", value: field.description, name: "description", onChange: handleChange, InputProps: {
|
|
359
|
-
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((
|
|
360
|
-
}, error: Boolean(((
|
|
396
|
+
endAdornment: ((0, jsx_runtime_1.jsx)(material_1.Typography, Object.assign({ variant: "body2" }, { children: ((_b = field.description) === null || _b === void 0 ? void 0 : _b.length) ? Event_1.EVENT_DESCRIPTION_MAX_LENGTH - field.description.length : Event_1.EVENT_DESCRIPTION_MAX_LENGTH })))
|
|
397
|
+
}, error: Boolean(((_c = field.description) === null || _c === void 0 ? void 0 : _c.length) > Event_1.EVENT_DESCRIPTION_MAX_LENGTH), helperText: ((_d = field.description) === null || _d === void 0 ? void 0 : _d.length) > Event_1.EVENT_DESCRIPTION_MAX_LENGTH ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.description.error.maxLength", defaultMessage: "ui.eventForm.description.error.maxLength" })) : null }), genericError && ((0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.genericError }, { children: (0, jsx_runtime_1.jsx)(material_1.Alert, Object.assign({ variant: "filled", severity: "error" }, { children: genericError })) }))), (0, jsx_runtime_1.jsx)(material_1.Box, Object.assign({ className: classes.actions }, { children: (0, jsx_runtime_1.jsx)(lab_1.LoadingButton, Object.assign({ loading: field.isSubmitting, disabled: !field.name ||
|
|
361
398
|
!field.startDate ||
|
|
362
399
|
!field.startTime ||
|
|
363
400
|
!field.endDate ||
|
|
364
401
|
!field.endTime ||
|
|
402
|
+
Boolean(genericError) ||
|
|
365
403
|
(field.location === types_1.SCEventLocationType.ONLINE && !field.link) ||
|
|
366
404
|
(field.location === types_1.SCEventLocationType.PERSON && !field.geolocation) ||
|
|
367
405
|
(field.recurring !== types_1.SCEventRecurrenceType.NEVER && !field.endDate && !field.endTime) ||
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { SCEventLocationType, SCEventRecurrenceType } from '@selfcommunity/types';
|
|
2
|
-
export
|
|
1
|
+
import { SCEventLocationType, SCEventRecurrenceType, SCLiveStreamSettingsType } from '@selfcommunity/types';
|
|
2
|
+
export type Place = {
|
|
3
3
|
description: string;
|
|
4
4
|
id?: string;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
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
|
|
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
|
|
27
|
-
export
|
|
27
|
+
export type FieldStateKeys = keyof InitialFieldState;
|
|
28
|
+
export type FieldStateValues = InitialFieldState[FieldStateKeys];
|
|
@@ -42,15 +42,15 @@ function EventFormDialog(inProps) {
|
|
|
42
42
|
props: inProps,
|
|
43
43
|
name: constants_1.PREFIX
|
|
44
44
|
});
|
|
45
|
-
const { className, open = true, onClose, EventFormComponentProps
|
|
45
|
+
const { className, open = true, onClose, EventFormComponentProps } = props, rest = tslib_1.__rest(props, ["className", "open", "onClose", "EventFormComponentProps"]);
|
|
46
46
|
const handleSuccess = (0, react_1.useCallback)((event) => {
|
|
47
47
|
var _a;
|
|
48
|
-
(_a = EventFormComponentProps.onSuccess) === null || _a === void 0 ? void 0 : _a.call(EventFormComponentProps, event);
|
|
48
|
+
(_a = EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.onSuccess) === null || _a === void 0 ? void 0 : _a.call(EventFormComponentProps, event);
|
|
49
49
|
onClose === null || onClose === void 0 ? void 0 : onClose();
|
|
50
50
|
}, [onClose, EventFormComponentProps]);
|
|
51
51
|
/**
|
|
52
52
|
* Renders root object
|
|
53
53
|
*/
|
|
54
|
-
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, title: (EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.event) ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(EventForm_1.default, Object.assign({}, EventFormComponentProps, { onSuccess: handleSuccess })) })));
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(Root, Object.assign({ DialogContentProps: { dividers: false }, title: (EventFormComponentProps === null || EventFormComponentProps === void 0 ? void 0 : EventFormComponentProps.event) ? ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title.edit", defaultMessage: "ui.eventForm.title.edit" })) : ((0, jsx_runtime_1.jsx)(react_intl_1.FormattedMessage, { id: "ui.eventForm.title", defaultMessage: "ui.eventForm.title" })), open: open, onClose: onClose, className: (0, classnames_1.default)(classes.root, className) }, rest, { children: (0, jsx_runtime_1.jsx)(EventForm_1.default, Object.assign({}, (EventFormComponentProps && EventFormComponentProps), { onSuccess: handleSuccess })) })));
|
|
55
55
|
}
|
|
56
56
|
exports.default = EventFormDialog;
|
|
@@ -68,7 +68,7 @@ function EventInfoWidget(inProps) {
|
|
|
68
68
|
const handleToggleSummary = (0, react_1.useCallback)(() => {
|
|
69
69
|
setExpanded(!expanded);
|
|
70
70
|
}, [expanded]);
|
|
71
|
-
const hasGeolocationOrLink = (0, react_1.useMemo)(() => Boolean((scEvent === null || scEvent === void 0 ? void 0 : scEvent.geolocation) || (scEvent === null || scEvent === void 0 ? void 0 : scEvent.link)), [scEvent]);
|
|
71
|
+
const hasGeolocationOrLink = (0, react_1.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]);
|
|
72
72
|
const showInfo = (0, react_1.useMemo)(() => ((scEvent === null || scEvent === void 0 ? void 0 : scEvent.privacy) === types_1.SCEventPrivacyType.PUBLIC && hasGeolocationOrLink) ||
|
|
73
73
|
([types_1.SCEventSubscriptionStatusType.SUBSCRIBED, types_1.SCEventSubscriptionStatusType.GOING, types_1.SCEventSubscriptionStatusType.NOT_GOING].indexOf(scEvent === null || scEvent === void 0 ? void 0 : scEvent.subscription_status) > -1 &&
|
|
74
74
|
hasGeolocationOrLink), [scEvent]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { UploadButtonProps } from '@rpldy/upload-button';
|
|
2
2
|
import type { ComponentType } from 'react';
|
|
3
|
-
|
|
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>>;
|
|
@@ -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
|
|
12
|
+
export type FeedSidebarProps = StickyBoxProps;
|
|
13
13
|
/**
|
|
14
14
|
* FeedRef props
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
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
|
|
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
|
|
|
@@ -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;
|