@selfcommunity/react-ui 0.10.5-alpha.1 → 0.10.5-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/AutoLinkPlugin.js +8 -2
- 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 +55 -8
- package/lib/cjs/components/EventForm/EventForm.d.ts +12 -1
- package/lib/cjs/components/EventForm/EventForm.js +54 -14
- 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/EventMediaWidget.js +2 -2
- package/lib/cjs/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/cjs/components/EventMembersWidget/TabContentComponent.js +1 -1
- package/lib/cjs/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/cjs/components/EventParticipantsButton/EventParticipantsButton.js +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/FeedObject/Activities/Activities.js +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 +80 -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/RelatedEventsWidget/RelatedEventsWidget.js +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 +17 -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/PreviewComponent.js +3 -4
- package/lib/cjs/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/cjs/shared/Media/Link/DisplayComponent.js +1 -4
- 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/AutoLinkPlugin.js +8 -2
- 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 +55 -8
- package/lib/esm/components/EventForm/EventForm.d.ts +12 -1
- package/lib/esm/components/EventForm/EventForm.js +55 -15
- 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/EventMediaWidget.js +2 -2
- package/lib/esm/components/EventMediaWidget/asUploadButton.d.ts +1 -1
- package/lib/esm/components/EventMembersWidget/TabContentComponent.js +1 -1
- package/lib/esm/components/EventMembersWidget/types.d.ts +1 -1
- package/lib/esm/components/EventParticipantsButton/EventParticipantsButton.js +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/FeedObject/Activities/Activities.js +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 +76 -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/RelatedEventsWidget/RelatedEventsWidget.js +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 +21 -5
- 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/PreviewComponent.js +3 -4
- package/lib/esm/shared/Media/File/asUploadButton.d.ts +1 -1
- package/lib/esm/shared/Media/Link/DisplayComponent.js +1 -4
- 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
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { styled } from '@mui/material/styles';
|
|
4
|
+
import { Box, Typography, Button, Paper, Container, Radio, Alert } from '@mui/material';
|
|
5
|
+
import Icon from '@mui/material/Icon';
|
|
6
|
+
import { useThemeProps } from '@mui/system';
|
|
7
|
+
import classNames from 'classnames';
|
|
8
|
+
import { LiveStreamType } from '../types';
|
|
9
|
+
import { useSnackbar } from 'notistack';
|
|
10
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
11
|
+
import EventImage from '../../../assets/liveStream/event';
|
|
12
|
+
import LiveImage from '../../../assets/liveStream/live';
|
|
13
|
+
import { LiveStreamApiClient } from '@selfcommunity/api-services';
|
|
14
|
+
import { WARNING_THRESHOLD_EXPIRING_SOON } from '../../LiveStreamRoom/constants';
|
|
15
|
+
import { Link, SCPreferences, useSCContext, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
16
|
+
import { SCCommunitySubscriptionTier } from '@selfcommunity/types';
|
|
17
|
+
import { SELFCOMMUNITY_PRICING } from '../../PlatformWidget/constants';
|
|
18
|
+
export const PREFIX = 'SCLiveStreamSelector';
|
|
19
|
+
const classes = {
|
|
20
|
+
root: `${PREFIX}-root`,
|
|
21
|
+
warning: `${PREFIX}-warning`,
|
|
22
|
+
options: `${PREFIX}-options`,
|
|
23
|
+
actions: `${PREFIX}-actions`
|
|
24
|
+
};
|
|
25
|
+
const Root = styled(Container, {
|
|
26
|
+
name: PREFIX,
|
|
27
|
+
slot: 'Root'
|
|
28
|
+
})(({ theme }) => ({}));
|
|
29
|
+
// Styled components
|
|
30
|
+
const OptionCard = styled(Paper, {
|
|
31
|
+
name: PREFIX,
|
|
32
|
+
slot: 'optionCardRoot',
|
|
33
|
+
shouldForwardProp: (prop) => prop !== 'selected'
|
|
34
|
+
})(({ theme, selected }) => ({}));
|
|
35
|
+
const FeatureItem = styled(Box, {
|
|
36
|
+
name: PREFIX,
|
|
37
|
+
slot: 'featureItemRoot'
|
|
38
|
+
})(({ theme }) => ({}));
|
|
39
|
+
/**
|
|
40
|
+
*> API documentation for the Community-JS LiveStreamSelector component. Learn about the available props and the CSS API.
|
|
41
|
+
*
|
|
42
|
+
#### Import
|
|
43
|
+
```jsx
|
|
44
|
+
import {LiveStreamSelector} from '@selfcommunity/react-ui';
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Component Name
|
|
48
|
+
The name `SCLiveStreamSelector` can be used when providing style overrides in the theme.
|
|
49
|
+
|
|
50
|
+
#### CSS
|
|
51
|
+
|
|
52
|
+
|Rule Name|Global class|Description|
|
|
53
|
+
|---|---|---|
|
|
54
|
+
|root|.SCCreateLivestreamDialog-root|Styles applied to the root element.|
|
|
55
|
+
|
|
56
|
+
* @param inProps
|
|
57
|
+
*/
|
|
58
|
+
export default function LiveStreamSelector(inProps) {
|
|
59
|
+
//PROPS
|
|
60
|
+
const props = useThemeProps({
|
|
61
|
+
props: inProps,
|
|
62
|
+
name: PREFIX
|
|
63
|
+
});
|
|
64
|
+
const { className, liveSelected, onLiveSelected, onNext } = props;
|
|
65
|
+
// CONTEXT
|
|
66
|
+
const scContext = useSCContext();
|
|
67
|
+
const scUserContext = useSCUser();
|
|
68
|
+
const { enqueueSnackbar } = useSnackbar();
|
|
69
|
+
// STATE
|
|
70
|
+
const [selectedOption, setSelectedOption] = useState(liveSelected);
|
|
71
|
+
const [timeRemaining, setTimeRemaining] = useState(null);
|
|
72
|
+
// HOOKS
|
|
73
|
+
const { preferences } = useSCPreferences();
|
|
74
|
+
const isCommunityOwner = useMemo(() => { var _a; return ((_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.id) === 1; }, [scUserContext.user]);
|
|
75
|
+
const isFreeTrialTier = useMemo(() => preferences &&
|
|
76
|
+
SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
|
|
77
|
+
preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
|
|
78
|
+
preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.FREE_TRIAL, [preferences]);
|
|
79
|
+
const intl = useIntl();
|
|
80
|
+
const options = [
|
|
81
|
+
{
|
|
82
|
+
title: intl.formatMessage({ id: 'ui.liveStreamForm.selector.scheduleLiveEvent', defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEvent' }),
|
|
83
|
+
image: EventImage,
|
|
84
|
+
type: LiveStreamType.EVENT_LIVE,
|
|
85
|
+
features: [
|
|
86
|
+
intl.formatMessage({
|
|
87
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveEventItem1',
|
|
88
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem1'
|
|
89
|
+
}),
|
|
90
|
+
intl.formatMessage({
|
|
91
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveEventItem2',
|
|
92
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem2'
|
|
93
|
+
}),
|
|
94
|
+
intl.formatMessage({
|
|
95
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveEventItem3',
|
|
96
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveEventItem3'
|
|
97
|
+
})
|
|
98
|
+
],
|
|
99
|
+
icons: [_jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" })]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
title: intl.formatMessage({
|
|
103
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveStream',
|
|
104
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStream'
|
|
105
|
+
}),
|
|
106
|
+
image: LiveImage,
|
|
107
|
+
type: LiveStreamType.DIRECT_LIVE,
|
|
108
|
+
features: [
|
|
109
|
+
intl.formatMessage({
|
|
110
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem1',
|
|
111
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem1'
|
|
112
|
+
}),
|
|
113
|
+
intl.formatMessage({
|
|
114
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem2',
|
|
115
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem2'
|
|
116
|
+
}),
|
|
117
|
+
intl.formatMessage({
|
|
118
|
+
id: 'ui.liveStreamForm.selector.scheduleLiveStreamItem3',
|
|
119
|
+
defaultMessage: 'ui.liveStreamForm.selector.scheduleLiveStreamItem3'
|
|
120
|
+
})
|
|
121
|
+
],
|
|
122
|
+
icons: [_jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" }), _jsx(Icon, { children: "chevron_right" })]
|
|
123
|
+
}
|
|
124
|
+
];
|
|
125
|
+
const handleOptionSelect = (type) => {
|
|
126
|
+
setSelectedOption(type);
|
|
127
|
+
onLiveSelected(type);
|
|
128
|
+
};
|
|
129
|
+
const handleNext = () => {
|
|
130
|
+
if (!selectedOption) {
|
|
131
|
+
enqueueSnackbar(_jsx(FormattedMessage, { id: "ui.common.error", defaultMessage: "ui.common.error" }), {
|
|
132
|
+
variant: 'error',
|
|
133
|
+
autoHideDuration: 3000
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
onNext && onNext(selectedOption);
|
|
138
|
+
}
|
|
139
|
+
};
|
|
140
|
+
const fetchLivestreamStatus = () => {
|
|
141
|
+
LiveStreamApiClient.getMonthlyDuration()
|
|
142
|
+
.then((r) => {
|
|
143
|
+
setTimeRemaining(r.remaining_minutes);
|
|
144
|
+
})
|
|
145
|
+
.catch((error) => {
|
|
146
|
+
console.error('Error fetching live status:', error);
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
useEffect(() => {
|
|
150
|
+
fetchLivestreamStatus();
|
|
151
|
+
}, []);
|
|
152
|
+
const warning = useMemo(() => {
|
|
153
|
+
let _message;
|
|
154
|
+
if (isFreeTrialTier && isCommunityOwner) {
|
|
155
|
+
_message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningSubscriptionRequired", defaultMessage: "ui.liveStreamForm.selector.warningSubscriptionRequired", values: {
|
|
156
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
157
|
+
// @ts-ignore
|
|
158
|
+
link: (...chunks) => _jsx(Link, Object.assign({ to: SELFCOMMUNITY_PRICING[scContext.settings.locale.default] }, { children: chunks }))
|
|
159
|
+
} }));
|
|
160
|
+
}
|
|
161
|
+
else if (timeRemaining !== null && timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON) {
|
|
162
|
+
if (timeRemaining <= 1) {
|
|
163
|
+
_message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningMinutesExausted", defaultMessage: "ui.liveStreamForm.selector.warningMinutesExausted" }));
|
|
164
|
+
}
|
|
165
|
+
else if (timeRemaining <= WARNING_THRESHOLD_EXPIRING_SOON) {
|
|
166
|
+
_message = (_jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.warningRemainingMinutes", defaultMessage: "ui.liveStreamForm.selector.warningRemainingMinutes", values: { minutes: timeRemaining } }));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
if (_message) {
|
|
170
|
+
return (_jsx(Box, Object.assign({ className: classes.warning }, { children: _jsx(Alert, Object.assign({ variant: "filled", severity: "warning" }, { children: _message })) })));
|
|
171
|
+
}
|
|
172
|
+
return null;
|
|
173
|
+
}, [timeRemaining, isFreeTrialTier]);
|
|
174
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className), maxWidth: "lg", sx: { py: 4 } }, { children: [_jsx(Typography, Object.assign({ variant: "h4", component: "h1", align: "center", gutterBottom: true, sx: { mb: 4, fontWeight: 500 } }, { children: "How do you want to go live?" })), warning, _jsx(Box, Object.assign({ className: classes.options }, { children: options.map((option, index) => (_jsxs(OptionCard, Object.assign({ selected: selectedOption === option.type, onClick: () => handleOptionSelect(option.type), elevation: 0, role: "button", tabIndex: 0, onKeyDown: (e) => {
|
|
175
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
176
|
+
handleOptionSelect(index);
|
|
177
|
+
e.preventDefault();
|
|
178
|
+
}
|
|
179
|
+
}, theme: undefined }, { children: [_jsxs(Box, { children: [_jsx(Typography, Object.assign({ variant: "h6", component: "h2", sx: { fontWeight: 500 } }, { children: option.title })), _jsx(Radio, { checked: selectedOption === option.type })] }), _jsx("img", { src: option.image, alt: "logo" }), _jsx(Box, Object.assign({ component: "ul" }, { children: option.features.map((feature, featureIndex) => {
|
|
180
|
+
const _Icon = option.icons[featureIndex];
|
|
181
|
+
return (_jsxs(FeatureItem, Object.assign({ component: "li" }, { children: [_Icon, _jsx(Typography, Object.assign({ variant: "body2", color: "text.secondary", sx: { flex: 1 } }, { children: feature }))] }), featureIndex));
|
|
182
|
+
}) }))] }), index))) })), _jsx(Box, Object.assign({ className: classes.actions }, { children: _jsx(Button, Object.assign({ disabled: !selectedOption || !timeRemaining || isFreeTrialTier, variant: "contained", onClick: handleNext, color: "secondary" }, { children: _jsx(FormattedMessage, { id: "ui.liveStreamForm.selector.next", defaultMessage: "ui.liveStreamForm.selector.next" }) })) }))] })));
|
|
183
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PREFIX = "SCCreateLiveStreamDialog";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const PREFIX = 'SCCreateLiveStreamDialog';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var CreateLiveStreamStep;
|
|
2
|
+
(function (CreateLiveStreamStep) {
|
|
3
|
+
CreateLiveStreamStep["SELECT_TYPE"] = "_select_type";
|
|
4
|
+
CreateLiveStreamStep["CREATE_LIVE"] = "_create_live";
|
|
5
|
+
})(CreateLiveStreamStep || (CreateLiveStreamStep = {}));
|
|
6
|
+
export var LiveStreamType;
|
|
7
|
+
(function (LiveStreamType) {
|
|
8
|
+
LiveStreamType["EVENT_LIVE"] = "_event_live";
|
|
9
|
+
LiveStreamType["DIRECT_LIVE"] = "_direct_live";
|
|
10
|
+
})(LiveStreamType || (LiveStreamType = {}));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
|
2
2
|
import { SCCategoryType } from '@selfcommunity/types';
|
|
3
3
|
import { DOMConversionMap } from 'lexical/LexicalNode';
|
|
4
|
-
export
|
|
4
|
+
export type SerializedHashtagNode = Spread<{
|
|
5
5
|
category: SCCategoryType;
|
|
6
6
|
type: 'hashtag';
|
|
7
7
|
version: 1;
|
|
@@ -9,16 +9,16 @@ function convertHashtagElement(domNode) {
|
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
11
|
export class HashtagNode extends TextNode {
|
|
12
|
-
constructor(category, text, key) {
|
|
13
|
-
super(text !== null && text !== void 0 ? text : `#${category.name}`, key);
|
|
14
|
-
this.__category = category;
|
|
15
|
-
}
|
|
16
12
|
static getType() {
|
|
17
13
|
return 'hashtag';
|
|
18
14
|
}
|
|
19
15
|
static clone(node) {
|
|
20
16
|
return new HashtagNode(node.__category, node.__text, node.__key);
|
|
21
17
|
}
|
|
18
|
+
constructor(category, text, key) {
|
|
19
|
+
super(text !== null && text !== void 0 ? text : `#${category.name}`, key);
|
|
20
|
+
this.__category = category;
|
|
21
|
+
}
|
|
22
22
|
createDOM(config) {
|
|
23
23
|
const tag = 'hashtag';
|
|
24
24
|
const dom = document.createElement(tag);
|
|
@@ -12,7 +12,7 @@ export interface ImagePayload {
|
|
|
12
12
|
declare function convertImageElement(domNode: any): {
|
|
13
13
|
node: ImageNode;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type SerializedImageNode = Spread<{
|
|
16
16
|
altText: string;
|
|
17
17
|
maxWidth: number | string;
|
|
18
18
|
src: string;
|
|
@@ -104,18 +104,18 @@ function convertImageElement(domNode) {
|
|
|
104
104
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
105
105
|
// @ts-ignore
|
|
106
106
|
export class ImageNode extends DecoratorNode {
|
|
107
|
-
constructor(src, altText, maxWidth, key) {
|
|
108
|
-
super(key);
|
|
109
|
-
this.__src = src;
|
|
110
|
-
this.__altText = altText;
|
|
111
|
-
this.__maxWidth = maxWidth;
|
|
112
|
-
}
|
|
113
107
|
static getType() {
|
|
114
108
|
return 'image';
|
|
115
109
|
}
|
|
116
110
|
static clone(node) {
|
|
117
111
|
return new ImageNode(node.__src, node.__altText, node.__maxWidth, node.__key);
|
|
118
112
|
}
|
|
113
|
+
constructor(src, altText, maxWidth, key) {
|
|
114
|
+
super(key);
|
|
115
|
+
this.__src = src;
|
|
116
|
+
this.__altText = altText;
|
|
117
|
+
this.__maxWidth = maxWidth;
|
|
118
|
+
}
|
|
119
119
|
setWidthAndHeight(width, height) {
|
|
120
120
|
const writable = this.getWritable();
|
|
121
121
|
// eslint-disable-next-line @typescript-eslint/ban-ts-ignore
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DOMExportOutput, EditorConfig, LexicalNode, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
|
2
2
|
import { SCUserType } from '@selfcommunity/types';
|
|
3
3
|
import { DOMConversionMap } from 'lexical/LexicalNode';
|
|
4
|
-
export
|
|
4
|
+
export type SerializedMentionNode = Spread<{
|
|
5
5
|
user: SCUserType;
|
|
6
6
|
type: 'mention';
|
|
7
7
|
version: 1;
|
|
@@ -22,16 +22,16 @@ function convertMentionElement(domNode) {
|
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
export class MentionNode extends TextNode {
|
|
25
|
-
constructor(user, text, key) {
|
|
26
|
-
super(text !== null && text !== void 0 ? text : `@${user.username}`, key);
|
|
27
|
-
this.__user = user;
|
|
28
|
-
}
|
|
29
25
|
static getType() {
|
|
30
26
|
return 'mention';
|
|
31
27
|
}
|
|
32
28
|
static clone(node) {
|
|
33
29
|
return new MentionNode(node.__user, node.__text, node.__key);
|
|
34
30
|
}
|
|
31
|
+
constructor(user, text, key) {
|
|
32
|
+
super(text !== null && text !== void 0 ? text : `@${user.username}`, key);
|
|
33
|
+
this.__user = user;
|
|
34
|
+
}
|
|
35
35
|
createDOM(config) {
|
|
36
36
|
const tag = 'mention';
|
|
37
37
|
const dom = document.createElement(tag);
|
|
@@ -15,7 +15,10 @@ const MATCHERS = [
|
|
|
15
15
|
index: match.index,
|
|
16
16
|
length: match[0].length,
|
|
17
17
|
text: match[0],
|
|
18
|
-
url: normalizeURL(match[0])
|
|
18
|
+
url: normalizeURL(match[0]),
|
|
19
|
+
attributes: {
|
|
20
|
+
target: '_blank'
|
|
21
|
+
}
|
|
19
22
|
});
|
|
20
23
|
},
|
|
21
24
|
(text) => {
|
|
@@ -24,7 +27,10 @@ const MATCHERS = [
|
|
|
24
27
|
index: match.index,
|
|
25
28
|
length: match[0].length,
|
|
26
29
|
text: match[0],
|
|
27
|
-
url: `mailto:${match[0]}
|
|
30
|
+
url: `mailto:${match[0]}`,
|
|
31
|
+
attributes: {
|
|
32
|
+
target: '_blank'
|
|
33
|
+
}
|
|
28
34
|
});
|
|
29
35
|
}
|
|
30
36
|
];
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { LexicalEditor } from 'lexical';
|
|
9
9
|
import * as React from 'react';
|
|
10
|
-
|
|
10
|
+
type ErrorBoundaryProps = {
|
|
11
11
|
children: JSX.Element;
|
|
12
12
|
onError: (error: Error) => void;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ErrorBoundaryType = React.ComponentClass<ErrorBoundaryProps> | React.FC<ErrorBoundaryProps>;
|
|
15
15
|
export declare function useDecorators(editor: LexicalEditor, ErrorBoundary: ErrorBoundaryType): Array<JSX.Element>;
|
|
16
16
|
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { SCEventType } from '@selfcommunity/types';
|
|
1
|
+
import { SCEventLocationType, SCEventType } from '@selfcommunity/types';
|
|
2
2
|
import { Geolocation } from './types';
|
|
3
3
|
export interface EventAddressProps {
|
|
4
|
-
|
|
4
|
+
locations?: SCEventLocationType[];
|
|
5
|
+
event?: SCEventType | Partial<SCEventType>;
|
|
5
6
|
forwardGeolocationData: (data: Geolocation) => void;
|
|
7
|
+
forwardLivestreamSettingsData: (settings: any) => void;
|
|
6
8
|
className?: string;
|
|
7
9
|
}
|
|
8
10
|
export default function EventAddress(inProps: EventAddressProps): JSX.Element;
|
|
@@ -4,19 +4,28 @@ import { Autocomplete, Box, InputAdornment, Tab, Tabs, TextField } from '@mui/ma
|
|
|
4
4
|
import Icon from '@mui/material/Icon';
|
|
5
5
|
import { styled } from '@mui/material/styles';
|
|
6
6
|
import { useThemeProps } from '@mui/system';
|
|
7
|
-
import {
|
|
7
|
+
import { SCPreferences, useSCPreferences, useSCUser } from '@selfcommunity/react-core';
|
|
8
|
+
import { SCCommunitySubscriptionTier, SCEventLocationType, SCFeatureName } from '@selfcommunity/types';
|
|
8
9
|
import axios from 'axios';
|
|
9
10
|
import classNames from 'classnames';
|
|
10
|
-
import { useEffect, useState } from 'react';
|
|
11
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
11
12
|
import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
|
|
12
|
-
import HiddenPlaceholder from '../../shared/HiddenPlaceholder';
|
|
13
13
|
import UrlTextField from '../../shared/UrlTextField';
|
|
14
14
|
import { PREFIX } from './constants';
|
|
15
|
+
import LiveStream from '../LiveStream';
|
|
16
|
+
import LiveStreamFormSettings from '../LiveStreamForm/LiveStreamFormSettings';
|
|
17
|
+
import { SCLiveStreamTemplateType } from '../../types/liveStream';
|
|
18
|
+
import { LIVESTREAM_DEFAULT_SETTINGS } from '../LiveStreamForm/constants';
|
|
19
|
+
import { getNewDate } from './utils';
|
|
15
20
|
import { useSCGoogleApiLoader } from '@selfcommunity/react-core';
|
|
16
21
|
const messages = defineMessages({
|
|
17
22
|
virtualPlaceholder: {
|
|
18
23
|
id: 'ui.eventForm.address.online.placeholder',
|
|
19
24
|
defaultMessage: 'ui.eventForm.address.online.placeholder'
|
|
25
|
+
},
|
|
26
|
+
name: {
|
|
27
|
+
id: 'ui.eventForm.name.placeholder',
|
|
28
|
+
defaultMessage: 'ui.eventForm.name.placeholder'
|
|
20
29
|
}
|
|
21
30
|
});
|
|
22
31
|
const classes = {
|
|
@@ -30,6 +39,7 @@ const Root = styled(Box, {
|
|
|
30
39
|
slot: 'EventAddressRoot'
|
|
31
40
|
})(() => ({}));
|
|
32
41
|
export default function EventAddress(inProps) {
|
|
42
|
+
var _a;
|
|
33
43
|
//PROPS
|
|
34
44
|
const props = useThemeProps({
|
|
35
45
|
props: inProps,
|
|
@@ -38,18 +48,49 @@ export default function EventAddress(inProps) {
|
|
|
38
48
|
// INTL
|
|
39
49
|
const intl = useIntl();
|
|
40
50
|
// PROPS
|
|
41
|
-
const { className,
|
|
51
|
+
const { className, locations = [SCEventLocationType.PERSON, SCEventLocationType.ONLINE, SCEventLocationType.LIVESTREAM], event, forwardGeolocationData, forwardLivestreamSettingsData } = props;
|
|
42
52
|
// STATE
|
|
43
|
-
const [location, setLocation] = useState((event === null || event === void 0 ? void 0 : event.location) ||
|
|
53
|
+
const [location, setLocation] = useState((event === null || event === void 0 ? void 0 : event.location) || locations[0]);
|
|
44
54
|
const [geolocation, setGeoLocation] = useState(event ? { description: event.geolocation } : null);
|
|
45
55
|
const [inputValue, setInputValue] = useState('');
|
|
46
56
|
const [suggestions, setSuggestions] = useState([]);
|
|
47
57
|
const [timeoutId, setTimeoutId] = useState(null);
|
|
58
|
+
const liveStream = useMemo(() => {
|
|
59
|
+
return (event.live_stream ||
|
|
60
|
+
{
|
|
61
|
+
title: (event === null || event === void 0 ? void 0 : event.name) || `${intl.formatMessage(messages.name)}`,
|
|
62
|
+
created_at: (event === null || event === void 0 ? void 0 : event.start_date) || getNewDate(),
|
|
63
|
+
settings: LIVESTREAM_DEFAULT_SETTINGS
|
|
64
|
+
});
|
|
65
|
+
}, [event]);
|
|
66
|
+
// CONTEXT
|
|
67
|
+
const scUserContext = useSCUser();
|
|
68
|
+
const { preferences, features } = useSCPreferences();
|
|
69
|
+
const isFreeTrialTier = useMemo(() => preferences &&
|
|
70
|
+
SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER in preferences &&
|
|
71
|
+
preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value &&
|
|
72
|
+
preferences[SCPreferences.CONFIGURATIONS_SUBSCRIPTION_TIER].value === SCCommunitySubscriptionTier.FREE_TRIAL, [preferences]);
|
|
73
|
+
const liveStreamEnabled = useMemo(() => preferences &&
|
|
74
|
+
features &&
|
|
75
|
+
features.includes(SCFeatureName.LIVE_STREAM) &&
|
|
76
|
+
SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED in preferences &&
|
|
77
|
+
preferences[SCPreferences.CONFIGURATIONS_LIVE_STREAM_ENABLED].value, [preferences, features]);
|
|
78
|
+
const isInPersonTabActive = useMemo(() => locations.includes(SCEventLocationType.PERSON) || event.location === SCEventLocationType.PERSON, [locations, event]);
|
|
79
|
+
const isOnlineTabActive = useMemo(() => locations.includes(SCEventLocationType.ONLINE) || event.location === SCEventLocationType.ONLINE, [locations, event]);
|
|
80
|
+
const isLiveTabActive = useMemo(() => {
|
|
81
|
+
var _a, _b;
|
|
82
|
+
return (liveStreamEnabled &&
|
|
83
|
+
locations.includes(SCEventLocationType.LIVESTREAM) &&
|
|
84
|
+
!isFreeTrialTier /* || (isFreeTrialTier && scUserContext?.user && scUserContext?.user.id === 1)*/ &&
|
|
85
|
+
((_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)) ||
|
|
86
|
+
(event.live_stream && event.live_stream.created_at);
|
|
87
|
+
}, [liveStreamEnabled, (_a = scUserContext === null || scUserContext === void 0 ? void 0 : scUserContext.user) === null || _a === void 0 ? void 0 : _a.permission, event]);
|
|
48
88
|
// HOOKS
|
|
49
89
|
const { isLoaded, geocodingApiKey } = useSCGoogleApiLoader();
|
|
50
90
|
// HANDLERS
|
|
51
91
|
const handleChange = (_event, newValue) => {
|
|
52
92
|
setLocation(newValue);
|
|
93
|
+
forwardGeolocationData({ location: newValue });
|
|
53
94
|
};
|
|
54
95
|
const handleSelection = (_event, newValue) => __awaiter(this, void 0, void 0, function* () {
|
|
55
96
|
if (newValue) {
|
|
@@ -80,6 +121,9 @@ export default function EventAddress(inProps) {
|
|
|
80
121
|
const handleLinkChange = (event) => {
|
|
81
122
|
forwardGeolocationData({ location, link: event.target.value });
|
|
82
123
|
};
|
|
124
|
+
const handleLiveStreamSettingsChange = (settings) => {
|
|
125
|
+
forwardLivestreamSettingsData(settings);
|
|
126
|
+
};
|
|
83
127
|
useEffect(() => {
|
|
84
128
|
if (timeoutId) {
|
|
85
129
|
clearTimeout(timeoutId);
|
|
@@ -104,9 +148,12 @@ export default function EventAddress(inProps) {
|
|
|
104
148
|
}
|
|
105
149
|
}, [inputValue]);
|
|
106
150
|
if (!geocodingApiKey && !isLoaded) {
|
|
107
|
-
return
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
if (!isInPersonTabActive && !isOnlineTabActive && !isLiveTabActive) {
|
|
154
|
+
return null;
|
|
108
155
|
}
|
|
109
|
-
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsxs(Tabs, Object.assign({ className: classes.tabs, value: location, onChange: handleChange, indicatorColor: "secondary", textColor: "secondary", variant: "fullWidth" }, { children: [_jsx(Tab, { value: SCEventLocationType.PERSON, classes: { root: classes.tab }, icon: _jsx(Icon, { children: "add_location_alt" }), iconPosition: "start", label: _jsx(FormattedMessage, { id: "ui.eventForm.address.live.label", defaultMessage: "ui.eventForm.address.live.label" }) }), _jsx(Tab, { value: SCEventLocationType.ONLINE, classes: { root: classes.tab }, icon: _jsx(Icon, { children: "play_circle_outline" }), iconPosition: "start", label: _jsx(FormattedMessage, { id: "ui.eventForm.address.online.label", defaultMessage: "ui.eventForm.address.online.label" }) })] })), _jsxs(Box, Object.assign({ className: classes.tabContent }, { children: [location === SCEventLocationType.PERSON && (_jsx(Autocomplete, { disabled: !geocodingApiKey, size: "small", value: geolocation, onChange: handleSelection, inputValue: inputValue, onInputChange: handleLocationChange, options: suggestions, getOptionLabel: (option) => option.description || geolocation.description, noOptionsText: _jsx(FormattedMessage, { id: "ui.eventForm.address.live.noResults", defaultMessage: "ui.eventForm.address.live.noResults" }), isOptionEqualToValue: (option, value) => option.description === value.description, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { label: _jsx(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: (_jsxs(_Fragment, { children: [_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "add_location_alt" }) })), params.InputProps.endAdornment] })) }) }))) })), location === SCEventLocationType.ONLINE && (_jsx(UrlTextField, { size: "small", fullWidth: true, type: "url", placeholder: `${intl.formatMessage(messages.virtualPlaceholder)}`, helperText: _jsx(FormattedMessage, { id: "ui.eventForm.address.online.help", defaultMessage: "ui.eventForm.address.online.help" }), InputProps: {
|
|
156
|
+
return (_jsxs(Root, Object.assign({ className: classNames(classes.root, className) }, { children: [_jsxs(Tabs, Object.assign({ className: classes.tabs, value: location, onChange: handleChange, indicatorColor: "secondary", textColor: "secondary", variant: "fullWidth" }, { children: [isInPersonTabActive && (_jsx(Tab, { value: SCEventLocationType.PERSON, classes: { root: classes.tab }, icon: _jsx(Icon, { children: "add_location_alt" }), iconPosition: "start", label: _jsx(FormattedMessage, { id: "ui.eventForm.address.live.label", defaultMessage: "ui.eventForm.address.live.label" }) })), isOnlineTabActive && (_jsx(Tab, { value: SCEventLocationType.ONLINE, classes: { root: classes.tab }, icon: _jsx(Icon, { children: "play_circle_outline" }), iconPosition: "start", label: _jsx(FormattedMessage, { id: "ui.eventForm.address.online.label", defaultMessage: "ui.eventForm.address.online.label" }) })), isLiveTabActive && (_jsx(Tab, { value: SCEventLocationType.LIVESTREAM, classes: { root: classes.tab }, icon: _jsx(Icon, { children: "photo_camera" }), iconPosition: "start", label: _jsx(FormattedMessage, { id: "ui.eventForm.address.liveStream.label", defaultMessage: "ui.eventForm.address.liveStream.label" }) }))] })), _jsxs(Box, Object.assign({ className: classes.tabContent }, { children: [isInPersonTabActive && location === SCEventLocationType.PERSON && (_jsx(Autocomplete, { disabled: !geocodingApiKey, size: "small", value: geolocation, onChange: handleSelection, inputValue: inputValue, onInputChange: handleLocationChange, options: suggestions, getOptionLabel: (option) => option.description || geolocation.description, noOptionsText: _jsx(FormattedMessage, { id: "ui.eventForm.address.live.noResults", defaultMessage: "ui.eventForm.address.live.noResults" }), isOptionEqualToValue: (option, value) => option.description === value.description, renderInput: (params) => (_jsx(TextField, Object.assign({}, params, { label: _jsx(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: (_jsxs(_Fragment, { children: [_jsx(InputAdornment, Object.assign({ position: "start" }, { children: _jsx(Icon, { children: "add_location_alt" }) })), params.InputProps.endAdornment] })) }) }))) })), isOnlineTabActive && location === SCEventLocationType.ONLINE && (_jsx(UrlTextField, { size: "small", fullWidth: true, type: "url", placeholder: `${intl.formatMessage(messages.virtualPlaceholder)}`, helperText: _jsx(FormattedMessage, { id: "ui.eventForm.address.online.help", defaultMessage: "ui.eventForm.address.online.help" }), InputProps: {
|
|
110
157
|
endAdornment: _jsx(Icon, { children: "play_circle_outline" })
|
|
111
|
-
}, onChange: handleLinkChange }))] }))] })));
|
|
158
|
+
}, onChange: handleLinkChange })), isLiveTabActive && location === SCEventLocationType.LIVESTREAM && (_jsxs(_Fragment, { children: [_jsx(LiveStream, { template: SCLiveStreamTemplateType.SNIPPET, liveStream: liveStream, actions: _jsx(_Fragment, {}) }), _jsx(LiveStreamFormSettings, { settings: liveStream.settings || LIVESTREAM_DEFAULT_SETTINGS, onChange: handleLiveStreamSettingsChange })] }))] }))] })));
|
|
112
159
|
}
|
|
@@ -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
|
*/
|