@amityco/react-native-social-uikit 4.0.0-ca3519f.0 → 4.0.0-cfcb02e.0
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/README.md +1 -1
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/commonjs/components/ErrorBoundary/ErrorBoundary.js +77 -0
- package/lib/commonjs/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/lib/commonjs/components/ErrorBoundary/index.js +20 -0
- package/lib/commonjs/components/ErrorBoundary/index.js.map +1 -0
- package/lib/commonjs/components/MediaSection/index.js +3 -3
- package/lib/commonjs/components/MediaSection/index.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js +14 -5
- package/lib/commonjs/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/commonjs/components/PostTypeChoiceModal/style.js +1 -2
- package/lib/commonjs/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/commonjs/components/Social/PostList/index.js +8 -5
- package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
- package/lib/commonjs/hooks/useAuth.js +4 -2
- package/lib/commonjs/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/index.js +13 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/Social/communities-sdk.js +2 -1
- package/lib/commonjs/providers/Social/communities-sdk.js.map +1 -1
- package/lib/commonjs/providers/amity-ui-kit-provider.js +4 -2
- package/lib/commonjs/providers/amity-ui-kit-provider.js.map +1 -1
- package/lib/commonjs/providers/auth-provider.js +20 -11
- package/lib/commonjs/providers/auth-provider.js.map +1 -1
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js +16 -16
- package/lib/commonjs/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/commonjs/screens/LivestreamPlayer/index.js +3 -6
- package/lib/commonjs/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/commonjs/svg/svg-xml-list.js +1 -1
- package/lib/commonjs/util/postTypeChecker.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +43 -25
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js +4 -16
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.js +22 -9
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.js +4 -3
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.js +14 -13
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.js +8 -10
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +2 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
- package/lib/commonjs/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Elements/CommonElements/AvatarElement.js +16 -9
- package/lib/commonjs/v4/PublicApi/Elements/CommonElements/AvatarElement.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +28 -25
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +231 -76
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +50 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
- package/lib/commonjs/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +113 -124
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +3 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.js +21 -2
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmitySocialGlobalSearchPage/AmitySocialGlobalSearchPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.js +17 -6
- package/lib/commonjs/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +1 -1
- package/lib/commonjs/v4/assets/icons/poll.js +2 -2
- package/lib/commonjs/v4/component/LivestreamContent/index.js +12 -12
- package/lib/commonjs/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyAvatar/MyAvatar.js +9 -6
- package/lib/commonjs/v4/component/MyAvatar/MyAvatar.js.map +1 -1
- package/lib/commonjs/v4/component/PollContent/PollResults.js +1 -0
- package/lib/commonjs/v4/component/PollContent/PollResults.js.map +1 -1
- package/lib/commonjs/v4/component/PostContent/index.js +4 -4
- package/lib/commonjs/v4/component/PostContent/index.js.map +1 -1
- package/lib/commonjs/v4/component/PostMenu/index.js +2 -2
- package/lib/commonjs/v4/component/PostMenu/index.js.map +1 -1
- package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js +16 -9
- package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/commonjs/v4/component/SearchResultItem/SearchResultItem.js +1 -0
- package/lib/commonjs/v4/component/SearchResultItem/SearchResultItem.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/index.js +4 -4
- package/lib/commonjs/v4/component/Toast/index.js.map +1 -1
- package/lib/commonjs/v4/component/Toast/styles.js +2 -2
- package/lib/commonjs/v4/component/Toast/styles.js.map +1 -1
- package/lib/commonjs/v4/constants/index.js +4 -2
- package/lib/commonjs/v4/constants/index.js.map +1 -1
- package/lib/commonjs/v4/elements/CommunityCreatePostButton/CommunityCreatePostButton.js +1 -1
- package/lib/commonjs/v4/elements/CommunityCreatePostButton/CommunityCreatePostButton.js.map +1 -1
- package/lib/commonjs/v4/engine/AssetDownloader.js +2 -1
- package/lib/commonjs/v4/engine/AssetDownloader.js.map +1 -1
- package/lib/commonjs/v4/enum/roomStatus.js +15 -0
- package/lib/commonjs/v4/enum/roomStatus.js.map +1 -0
- package/lib/commonjs/v4/features/room/hooks/useRoom.js +26 -0
- package/lib/commonjs/v4/features/room/hooks/useRoom.js.map +1 -0
- package/lib/commonjs/v4/hook/index.js +22 -0
- package/lib/commonjs/v4/hook/index.js.map +1 -1
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +1 -3
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/commonjs/v4/hook/usePostSubscription.js +38 -0
- package/lib/commonjs/v4/hook/usePostSubscription.js.map +1 -0
- package/lib/commonjs/v4/hook/useRoomSubscription.js +22 -0
- package/lib/commonjs/v4/hook/useRoomSubscription.js.map +1 -0
- package/lib/commonjs/v4/index.js +7 -0
- package/lib/commonjs/v4/index.js.map +1 -1
- package/lib/commonjs/v4/routes/AmityPageRenderer.js +5 -0
- package/lib/commonjs/v4/routes/AmityPageRenderer.js.map +1 -1
- package/lib/commonjs/v4/routes/AmitySocialUIKitV4Navigator.js +4 -1
- package/lib/commonjs/v4/routes/AmitySocialUIKitV4Navigator.js.map +1 -1
- package/lib/commonjs/v4/screen/GlobalBan/GlobalBan.js +42 -0
- package/lib/commonjs/v4/screen/GlobalBan/GlobalBan.js.map +1 -0
- package/lib/commonjs/v4/screen/GlobalBan/index.js +13 -0
- package/lib/commonjs/v4/screen/GlobalBan/index.js.map +1 -0
- package/lib/commonjs/v4/screen/GlobalBan/styles.js +46 -0
- package/lib/commonjs/v4/screen/GlobalBan/styles.js.map +1 -0
- package/lib/commonjs/v4/screen/PostDetail/index.js +3 -2
- package/lib/commonjs/v4/screen/PostDetail/index.js.map +1 -1
- package/lib/commonjs/v4/stores/slices/toast.js +4 -1
- package/lib/commonjs/v4/stores/slices/toast.js.map +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/module/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- package/lib/module/components/ErrorBoundary/ErrorBoundary.js +69 -0
- package/lib/module/components/ErrorBoundary/ErrorBoundary.js.map +1 -0
- package/lib/module/components/ErrorBoundary/index.js +3 -0
- package/lib/module/components/ErrorBoundary/index.js.map +1 -0
- package/lib/module/components/MediaSection/index.js +3 -3
- package/lib/module/components/MediaSection/index.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js +15 -8
- package/lib/module/components/PostTypeChoiceModal/PostTypeChoiceModal.js.map +1 -1
- package/lib/module/components/PostTypeChoiceModal/style.js +1 -2
- package/lib/module/components/PostTypeChoiceModal/style.js.map +1 -1
- package/lib/module/components/Social/PostList/index.js +8 -5
- package/lib/module/components/Social/PostList/index.js.map +1 -1
- package/lib/module/hooks/useAuth.js +4 -2
- package/lib/module/hooks/useAuth.js.map +1 -1
- package/lib/module/index.js +3 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/Social/communities-sdk.js +2 -1
- package/lib/module/providers/Social/communities-sdk.js.map +1 -1
- package/lib/module/providers/amity-ui-kit-provider.js +4 -2
- package/lib/module/providers/amity-ui-kit-provider.js.map +1 -1
- package/lib/module/providers/auth-provider.js +20 -11
- package/lib/module/providers/auth-provider.js.map +1 -1
- package/lib/module/screens/CreateLivestream/CreateLivestream.js +17 -17
- package/lib/module/screens/CreateLivestream/CreateLivestream.js.map +1 -1
- package/lib/module/screens/LivestreamPlayer/index.js +4 -8
- package/lib/module/screens/LivestreamPlayer/index.js.map +1 -1
- package/lib/module/svg/svg-xml-list.js +1 -1
- package/lib/module/util/postTypeChecker.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +44 -26
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js +4 -16
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.js +22 -9
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.js +4 -3
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.js +14 -13
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.js +8 -10
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +2 -1
- package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js +2 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js +3 -2
- package/lib/module/v4/PublicApi/Elements/ButtonWithIconElement/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Elements/CommonElements/AvatarElement.js +16 -9
- package/lib/module/v4/PublicApi/Elements/CommonElements/AvatarElement.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +29 -26
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js +2 -2
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js +236 -80
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js +42 -0
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.js.map +1 -0
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js +71 -3
- package/lib/module/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js +115 -126
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +3 -2
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.js +21 -2
- package/lib/module/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmitySocialGlobalSearchPage/AmitySocialGlobalSearchPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.js +17 -6
- package/lib/module/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/assets/icons/poll.js +2 -2
- package/lib/module/v4/component/LivestreamContent/index.js +13 -13
- package/lib/module/v4/component/LivestreamContent/index.js.map +1 -1
- package/lib/module/v4/component/MyAvatar/MyAvatar.js +9 -6
- package/lib/module/v4/component/MyAvatar/MyAvatar.js.map +1 -1
- package/lib/module/v4/component/PollContent/PollResults.js +1 -0
- package/lib/module/v4/component/PollContent/PollResults.js.map +1 -1
- package/lib/module/v4/component/PostContent/index.js +4 -4
- package/lib/module/v4/component/PostContent/index.js.map +1 -1
- package/lib/module/v4/component/PostMenu/index.js +2 -2
- package/lib/module/v4/component/PostMenu/index.js.map +1 -1
- package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js +17 -10
- package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/module/v4/component/SearchResultItem/SearchResultItem.js +1 -0
- package/lib/module/v4/component/SearchResultItem/SearchResultItem.js.map +1 -1
- package/lib/module/v4/component/Toast/index.js +4 -4
- package/lib/module/v4/component/Toast/index.js.map +1 -1
- package/lib/module/v4/component/Toast/styles.js +2 -2
- package/lib/module/v4/component/Toast/styles.js.map +1 -1
- package/lib/module/v4/constants/index.js +3 -1
- package/lib/module/v4/constants/index.js.map +1 -1
- package/lib/module/v4/elements/CommunityCreatePostButton/CommunityCreatePostButton.js +1 -1
- package/lib/module/v4/elements/CommunityCreatePostButton/CommunityCreatePostButton.js.map +1 -1
- package/lib/module/v4/engine/AssetDownloader.js +2 -1
- package/lib/module/v4/engine/AssetDownloader.js.map +1 -1
- package/lib/module/v4/enum/roomStatus.js +9 -0
- package/lib/module/v4/enum/roomStatus.js.map +1 -0
- package/lib/module/v4/features/room/hooks/useRoom.js +20 -0
- package/lib/module/v4/features/room/hooks/useRoom.js.map +1 -0
- package/lib/module/v4/hook/index.js +2 -0
- package/lib/module/v4/hook/index.js.map +1 -1
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +1 -3
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/module/v4/hook/usePostSubscription.js +31 -0
- package/lib/module/v4/hook/usePostSubscription.js.map +1 -0
- package/lib/module/v4/hook/useRoomSubscription.js +15 -0
- package/lib/module/v4/hook/useRoomSubscription.js.map +1 -0
- package/lib/module/v4/index.js +1 -1
- package/lib/module/v4/index.js.map +1 -1
- package/lib/module/v4/routes/AmityPageRenderer.js +5 -0
- package/lib/module/v4/routes/AmityPageRenderer.js.map +1 -1
- package/lib/module/v4/routes/AmitySocialUIKitV4Navigator.js +4 -1
- package/lib/module/v4/routes/AmitySocialUIKitV4Navigator.js.map +1 -1
- package/lib/module/v4/screen/GlobalBan/GlobalBan.js +35 -0
- package/lib/module/v4/screen/GlobalBan/GlobalBan.js.map +1 -0
- package/lib/module/v4/screen/GlobalBan/index.js +2 -0
- package/lib/module/v4/screen/GlobalBan/index.js.map +1 -0
- package/lib/module/v4/screen/GlobalBan/styles.js +39 -0
- package/lib/module/v4/screen/GlobalBan/styles.js.map +1 -0
- package/lib/module/v4/screen/PostDetail/index.js +3 -2
- package/lib/module/v4/screen/PostDetail/index.js.map +1 -1
- package/lib/module/v4/stores/slices/toast.js +4 -1
- package/lib/module/v4/stores/slices/toast.js.map +1 -1
- package/lib/typescript/src/components/ErrorBoundary/ErrorBoundary.d.ts +20 -0
- package/lib/typescript/src/components/ErrorBoundary/ErrorBoundary.d.ts.map +1 -0
- package/lib/typescript/src/components/ErrorBoundary/index.d.ts +3 -0
- package/lib/typescript/src/components/ErrorBoundary/index.d.ts.map +1 -0
- package/lib/typescript/src/components/MediaSection/index.d.ts.map +1 -1
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts +1 -2
- package/lib/typescript/src/components/PostTypeChoiceModal/style.d.ts.map +1 -1
- package/lib/typescript/src/components/Social/PostList/index.d.ts +1 -3
- package/lib/typescript/src/components/Social/PostList/index.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/amity-ui-kit-provider.d.ts.map +1 -1
- package/lib/typescript/src/providers/auth-provider.d.ts.map +1 -1
- package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
- package/lib/typescript/src/types/auth.interface.d.ts +1 -0
- package/lib/typescript/src/types/auth.interface.d.ts.map +1 -1
- package/lib/typescript/src/types/user.interface.d.ts +1 -0
- package/lib/typescript/src/types/user.interface.d.ts.map +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts +1 -1
- package/lib/typescript/src/util/postTypeChecker.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.d.ts +1 -2
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.d.ts +3 -5
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts +1 -3
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Elements/CommonElements/AvatarElement.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Elements/CommonElements/AvatarElement.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts +8 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.d.ts.map +1 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts +70 -2
- package/lib/typescript/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmitySocialGlobalSearchPage/AmitySocialGlobalSearchPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts +1 -1
- package/lib/typescript/src/v4/component/LivestreamContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyAvatar/MyAvatar.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/PollContent/PollResults.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/PostContent/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/RenderTextWithMention/RenderTextWithMention.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/SearchResultItem/SearchResultItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts +1 -1
- package/lib/typescript/src/v4/component/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/constants/index.d.ts +2 -0
- package/lib/typescript/src/v4/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/enum/roomStatus.d.ts +9 -0
- package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/room/hooks/useRoom.d.ts +2 -0
- package/lib/typescript/src/v4/features/room/hooks/useRoom.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/index.d.ts +2 -0
- package/lib/typescript/src/v4/hook/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +3 -0
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts +4 -0
- package/lib/typescript/src/v4/hook/usePostSubscription.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts +4 -0
- package/lib/typescript/src/v4/hook/useRoomSubscription.d.ts.map +1 -0
- package/lib/typescript/src/v4/index.d.ts +1 -0
- package/lib/typescript/src/v4/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/routes/AmityPageRenderer.d.ts.map +1 -1
- package/lib/typescript/src/v4/routes/AmitySocialUIKitV4Navigator.d.ts.map +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts +2 -1
- package/lib/typescript/src/v4/routes/RouteParamList.d.ts.map +1 -1
- package/lib/typescript/src/v4/screen/GlobalBan/GlobalBan.d.ts +3 -0
- package/lib/typescript/src/v4/screen/GlobalBan/GlobalBan.d.ts.map +1 -0
- package/lib/typescript/src/v4/screen/GlobalBan/index.d.ts +2 -0
- package/lib/typescript/src/v4/screen/GlobalBan/index.d.ts.map +1 -0
- package/lib/typescript/src/v4/screen/GlobalBan/styles.d.ts +34 -0
- package/lib/typescript/src/v4/screen/GlobalBan/styles.d.ts.map +1 -0
- package/lib/typescript/src/v4/screen/PostDetail/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/stores/slices/toast.d.ts +1 -0
- package/lib/typescript/src/v4/stores/slices/toast.d.ts.map +1 -1
- package/package.json +10 -4
- package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
- package/src/components/ErrorBoundary/ErrorBoundary.tsx +84 -0
- package/src/components/ErrorBoundary/index.ts +2 -0
- package/src/components/MediaSection/index.tsx +4 -6
- package/src/components/PostTypeChoiceModal/PostTypeChoiceModal.tsx +15 -15
- package/src/components/PostTypeChoiceModal/style.ts +1 -2
- package/src/components/Social/PostList/index.tsx +8 -6
- package/src/hooks/useAuth.ts +2 -0
- package/src/index.tsx +4 -2
- package/src/providers/Social/communities-sdk.ts +1 -1
- package/src/providers/amity-ui-kit-provider.tsx +33 -27
- package/src/providers/auth-provider.tsx +17 -7
- package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
- package/src/screens/LivestreamPlayer/index.tsx +9 -15
- package/src/svg/svg-xml-list.ts +1 -1
- package/src/types/auth.interface.ts +1 -0
- package/src/types/user.interface.ts +1 -0
- package/src/util/postTypeChecker.ts +1 -1
- package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +47 -31
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.tsx +4 -11
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/CommentListItem.tsx +39 -15
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/CommentListItem/styles.ts +3 -2
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/index.tsx +38 -23
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/ReplyCommentList/styles.ts +5 -7
- package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +2 -1
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
- package/src/v4/PublicApi/Elements/ButtonWithIconElement/styles.ts +3 -2
- package/src/v4/PublicApi/Elements/CommonElements/AvatarElement.tsx +23 -10
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +24 -25
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +273 -101
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/RoomView.tsx +48 -0
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/styles.ts +72 -3
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.tsx +150 -155
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +3 -1
- package/src/v4/PublicApi/Pages/AmityPostDetailPage/AmityPostDetailPage.tsx +20 -1
- package/src/v4/PublicApi/Pages/AmitySocialGlobalSearchPage/AmitySocialGlobalSearchPage.tsx +0 -1
- package/src/v4/PublicApi/Pages/AmityUserProfilePage/AmityUserProfilePage.tsx +24 -7
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +1 -1
- package/src/v4/assets/icons/poll.tsx +2 -2
- package/src/v4/component/LivestreamContent/index.tsx +22 -22
- package/src/v4/component/MyAvatar/MyAvatar.tsx +12 -6
- package/src/v4/component/PollContent/PollResults.tsx +1 -0
- package/src/v4/component/PostContent/index.tsx +6 -8
- package/src/v4/component/PostMenu/index.tsx +2 -2
- package/src/v4/component/RenderTextWithMention/RenderTextWithMention.tsx +16 -10
- package/src/v4/component/SearchResultItem/SearchResultItem.tsx +3 -0
- package/src/v4/component/Toast/index.tsx +1 -1
- package/src/v4/component/Toast/styles.ts +2 -2
- package/src/v4/constants/index.ts +4 -0
- package/src/v4/elements/CommunityCreatePostButton/CommunityCreatePostButton.tsx +1 -1
- package/src/v4/engine/AssetDownloader.ts +1 -1
- package/src/v4/enum/roomStatus.ts +8 -0
- package/src/v4/features/room/hooks/useRoom.ts +20 -0
- package/src/v4/hook/index.ts +2 -0
- package/src/v4/hook/useCustomRankingGlobalFeed.ts +1 -1
- package/src/v4/hook/usePostSubscription.ts +34 -0
- package/src/v4/hook/useRoomSubscription.ts +19 -0
- package/src/v4/index.tsx +1 -1
- package/src/v4/routes/AmityPageRenderer.tsx +6 -0
- package/src/v4/routes/AmitySocialUIKitV4Navigator.tsx +5 -1
- package/src/v4/routes/RouteParamList.tsx +2 -1
- package/src/v4/screen/GlobalBan/GlobalBan.tsx +38 -0
- package/src/v4/screen/GlobalBan/index.ts +1 -0
- package/src/v4/screen/GlobalBan/styles.ts +39 -0
- package/src/v4/screen/PostDetail/index.tsx +1 -0
- package/src/v4/stores/slices/toast.ts +5 -0
- package/uikit.config.json +1 -1
- package/lib/commonjs/v4/enum/livestreamStatus.js +0 -13
- package/lib/commonjs/v4/enum/livestreamStatus.js.map +0 -1
- package/lib/module/v4/enum/livestreamStatus.js +0 -7
- package/lib/module/v4/enum/livestreamStatus.js.map +0 -1
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts +0 -7
- package/lib/typescript/src/v4/enum/livestreamStatus.d.ts.map +0 -1
- package/src/v4/enum/livestreamStatus.ts +0 -6
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
ImageStyle,
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import React, { useEffect, useState, useCallback, Fragment } from 'react';
|
|
10
|
-
import { FileRepository,
|
|
10
|
+
import { FileRepository, RoomRepository } from '@amityco/ts-sdk-react-native';
|
|
11
11
|
import { useStyles } from './styles';
|
|
12
12
|
import { useNavigation } from '@react-navigation/native';
|
|
13
13
|
import { SvgXml } from 'react-native-svg';
|
|
14
14
|
import type { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
15
15
|
import { play } from '../../assets/icons';
|
|
16
16
|
import { Typography } from '../Typography/Typography';
|
|
17
|
-
import {
|
|
17
|
+
import { RoomStatus } from '../../enum/roomStatus';
|
|
18
18
|
import LiveStreamEndThumbnail from './LivestreamEndedThumbnail';
|
|
19
19
|
import LiveStreamIdleThumbnail from './LivestreamIdleThumbnail';
|
|
20
20
|
import RenderTextWithMention from '../RenderTextWithMention/RenderTextWithMention';
|
|
@@ -22,14 +22,14 @@ import { RootStackParamList } from '../../routes/RouteParamList';
|
|
|
22
22
|
import LiveStreamTerminatedThumbnail from './LivestreamTerminatedThumbnail';
|
|
23
23
|
|
|
24
24
|
interface ILivestreamContent {
|
|
25
|
-
|
|
25
|
+
roomId: Amity.Room['roomId'];
|
|
26
26
|
onPressPost: () => void;
|
|
27
27
|
post: Amity.Post;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
31
31
|
post,
|
|
32
|
-
|
|
32
|
+
roomId,
|
|
33
33
|
onPressPost,
|
|
34
34
|
}) => {
|
|
35
35
|
const { styles, theme } = useStyles();
|
|
@@ -39,18 +39,18 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
39
39
|
>();
|
|
40
40
|
|
|
41
41
|
const [error, setError] = useState<boolean>(false);
|
|
42
|
-
const [livestream, setLivestream] = useState<Amity.
|
|
42
|
+
const [livestream, setLivestream] = useState<Amity.Room>();
|
|
43
43
|
const [thumbnailUrl, setThumbnailUrl] = useState<ImageSourcePropType>();
|
|
44
44
|
const [isUpcoming, setIsUpcoming] = useState<boolean>(false);
|
|
45
45
|
|
|
46
46
|
const onPlayLivestream = useCallback(() => {
|
|
47
47
|
navigation.navigate('LivestreamPlayer', {
|
|
48
48
|
post,
|
|
49
|
-
|
|
49
|
+
roomId: livestream.roomId,
|
|
50
50
|
});
|
|
51
51
|
}, [livestream, navigation, post]);
|
|
52
52
|
|
|
53
|
-
const getLivestreamThumbnail = async (currentStream: Amity.
|
|
53
|
+
const getLivestreamThumbnail = async (currentStream: Amity.Room) => {
|
|
54
54
|
const defaultThumbnail = require('../../assets/images/livestream.png');
|
|
55
55
|
|
|
56
56
|
if (currentStream.thumbnailFileId) {
|
|
@@ -71,8 +71,8 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
71
71
|
|
|
72
72
|
useEffect(() => {
|
|
73
73
|
setIsUpcoming(true);
|
|
74
|
-
const unsubscribe =
|
|
75
|
-
|
|
74
|
+
const unsubscribe = RoomRepository.getRoom(
|
|
75
|
+
roomId,
|
|
76
76
|
({ data, loading, error: streamError }) => {
|
|
77
77
|
if (streamError) setError(!!streamError);
|
|
78
78
|
if (!loading && data) {
|
|
@@ -86,13 +86,13 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
86
86
|
return () => {
|
|
87
87
|
unsubscribe();
|
|
88
88
|
};
|
|
89
|
-
}, [
|
|
89
|
+
}, [roomId]);
|
|
90
90
|
|
|
91
91
|
if (!livestream) return null;
|
|
92
92
|
|
|
93
93
|
if (error || livestream?.isDeleted) {
|
|
94
94
|
return (
|
|
95
|
-
<View key={livestream.
|
|
95
|
+
<View key={livestream.roomId} style={styles.container}>
|
|
96
96
|
<LiveStreamIdleThumbnail />
|
|
97
97
|
</View>
|
|
98
98
|
);
|
|
@@ -102,12 +102,12 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
102
102
|
livestream?.moderation?.terminateLabels &&
|
|
103
103
|
livestream?.moderation?.terminateLabels?.length > 0;
|
|
104
104
|
const isLiveOrEnded =
|
|
105
|
-
livestream?.status ===
|
|
106
|
-
livestream?.status ===
|
|
105
|
+
livestream?.status === RoomStatus.live ||
|
|
106
|
+
livestream?.status === RoomStatus.ended;
|
|
107
107
|
|
|
108
108
|
if (isTerminated && isLiveOrEnded) {
|
|
109
109
|
return (
|
|
110
|
-
<View key={livestream.
|
|
110
|
+
<View key={livestream.roomId} style={styles.container}>
|
|
111
111
|
<LiveStreamTerminatedThumbnail />
|
|
112
112
|
</View>
|
|
113
113
|
);
|
|
@@ -129,7 +129,7 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
129
129
|
)}
|
|
130
130
|
</Pressable>
|
|
131
131
|
<View style={styles.container}>
|
|
132
|
-
{(livestream.status ===
|
|
132
|
+
{(livestream.status === RoomStatus.idle || isUpcoming) &&
|
|
133
133
|
thumbnailUrl && (
|
|
134
134
|
<View style={styles.content}>
|
|
135
135
|
<Image
|
|
@@ -144,12 +144,11 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
144
144
|
</View>
|
|
145
145
|
)}
|
|
146
146
|
|
|
147
|
-
{livestream.status ===
|
|
148
|
-
<LiveStreamEndThumbnail />
|
|
149
|
-
)}
|
|
147
|
+
{livestream.status === RoomStatus.ended && <LiveStreamEndThumbnail />}
|
|
150
148
|
|
|
151
|
-
{(livestream.status ===
|
|
152
|
-
livestream.status ===
|
|
149
|
+
{(livestream.status === RoomStatus.live ||
|
|
150
|
+
livestream.status === RoomStatus.recorded ||
|
|
151
|
+
livestream.status === RoomStatus.waitingReconnect) &&
|
|
153
152
|
thumbnailUrl &&
|
|
154
153
|
!isUpcoming && (
|
|
155
154
|
<View style={styles.content}>
|
|
@@ -157,14 +156,15 @@ const LivestreamContent: React.FC<ILivestreamContent> = ({
|
|
|
157
156
|
source={thumbnailUrl}
|
|
158
157
|
style={styles.streamImageCover as ImageStyle}
|
|
159
158
|
/>
|
|
160
|
-
{livestream.status ===
|
|
159
|
+
{(livestream.status === RoomStatus.live ||
|
|
160
|
+
livestream.status === RoomStatus.waitingReconnect) && (
|
|
161
161
|
<View style={styles.streamStatusLive}>
|
|
162
162
|
<Typography.CaptionBold style={styles.streamStatusText}>
|
|
163
163
|
LIVE
|
|
164
164
|
</Typography.CaptionBold>
|
|
165
165
|
</View>
|
|
166
166
|
)}
|
|
167
|
-
{livestream.status ===
|
|
167
|
+
{livestream.status === RoomStatus.recorded && (
|
|
168
168
|
<View style={styles.streamStatusRecorded}>
|
|
169
169
|
<Typography.CaptionBold style={styles.streamStatusText}>
|
|
170
170
|
RECORDED
|
|
@@ -15,13 +15,19 @@ const MyAvatar: FC<MyAvatarProp> = (props) => {
|
|
|
15
15
|
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
UserRepository.getUser(myId, async ({ data, loading, error }) => {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
setAvatarUrl(avatar ?? defaultAvatarUri);
|
|
18
|
+
if (loading || error || !data) return;
|
|
19
|
+
|
|
20
|
+
if (data.avatarCustomUrl) {
|
|
21
|
+
setAvatarUrl(data.avatarCustomUrl);
|
|
22
|
+
return;
|
|
24
23
|
}
|
|
24
|
+
|
|
25
|
+
const avatar = await getImage({
|
|
26
|
+
fileId: data.avatarFileId,
|
|
27
|
+
imageSize: ImageSizeState.small,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
setAvatarUrl(avatar ?? defaultAvatarUri);
|
|
25
31
|
});
|
|
26
32
|
}, [getImage, myId]);
|
|
27
33
|
|
|
@@ -43,9 +43,7 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
43
43
|
const [imagePosts, setImagePosts] = useState<string[]>([]);
|
|
44
44
|
const [videoPosts, setVideoPosts] = useState<IVideoPost[]>([]);
|
|
45
45
|
const [pollIds, setPollIds] = useState<{ pollId: string }[]>([]);
|
|
46
|
-
const [livestreamId, setLivestreamId] = useState<Amity.
|
|
47
|
-
[]
|
|
48
|
-
);
|
|
46
|
+
const [livestreamId, setLivestreamId] = useState<Amity.Room['roomId'][]>([]);
|
|
49
47
|
|
|
50
48
|
const [imagePostsFullSize, setImagePostsFullSize] = useState<MediaUri[]>([]);
|
|
51
49
|
const [videoPostsFullSize, setVideoPostsFullSize] = useState<MediaUri[]>([]);
|
|
@@ -96,7 +94,7 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
96
94
|
const images: string[] = [];
|
|
97
95
|
const videos: IVideoPost[] = [];
|
|
98
96
|
const polls: { pollId: string }[] = [];
|
|
99
|
-
const livestreams: Amity.
|
|
97
|
+
const livestreams: Amity.Room['roomId'][] = [];
|
|
100
98
|
|
|
101
99
|
response.forEach((item) => {
|
|
102
100
|
if (item?.dataType === 'image' && item?.data?.fileId) {
|
|
@@ -119,9 +117,9 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
119
117
|
if (!polls.some((poll) => poll.pollId === item.data.pollId)) {
|
|
120
118
|
polls.push(item.data);
|
|
121
119
|
}
|
|
122
|
-
} else if (item?.dataType === '
|
|
123
|
-
if (!livestreams.includes(item.data.
|
|
124
|
-
livestreams.push(item.data.
|
|
120
|
+
} else if (item?.dataType === 'room') {
|
|
121
|
+
if (!livestreams.includes(item.data.roomId)) {
|
|
122
|
+
livestreams.push(item.data.roomId);
|
|
125
123
|
}
|
|
126
124
|
}
|
|
127
125
|
});
|
|
@@ -344,7 +342,7 @@ const PostContent: React.FC<IPostContent> = ({
|
|
|
344
342
|
<LivestreamContent
|
|
345
343
|
post={post}
|
|
346
344
|
onPressPost={onPressPost}
|
|
347
|
-
|
|
345
|
+
roomId={livestreamId[0]}
|
|
348
346
|
/>
|
|
349
347
|
) : (
|
|
350
348
|
renderMediaPosts()
|
|
@@ -255,7 +255,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
|
|
|
255
255
|
],
|
|
256
256
|
},
|
|
257
257
|
(post?.creator?.userId === myId || isIAmModerator) &&
|
|
258
|
-
((childrenPost?.dataType !== '
|
|
258
|
+
((childrenPost?.dataType !== 'room' &&
|
|
259
259
|
childrenPost?.dataType !== 'poll') ||
|
|
260
260
|
(childrenPost?.dataType === 'poll' &&
|
|
261
261
|
pollData?.status === 'open')) &&
|
|
@@ -280,7 +280,7 @@ export function PostMenu({ pageId, componentId, post }: PostMenuProps) {
|
|
|
280
280
|
</TouchableOpacity>
|
|
281
281
|
)}
|
|
282
282
|
{post?.creator?.userId === myId &&
|
|
283
|
-
childrenPost?.dataType !== '
|
|
283
|
+
childrenPost?.dataType !== 'room' &&
|
|
284
284
|
childrenPost?.dataType !== 'poll' && (
|
|
285
285
|
<TouchableOpacity
|
|
286
286
|
onPress={goToEditPost}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Text, Linking } from 'react-native';
|
|
1
|
+
import { Text, Linking, TouchableOpacity } from 'react-native';
|
|
2
2
|
import { useStyles } from './styles';
|
|
3
3
|
import React, { memo, useCallback } from 'react';
|
|
4
4
|
import { useNavigation } from '@react-navigation/native';
|
|
@@ -6,6 +6,7 @@ import { IMentionPosition } from '../../types/type';
|
|
|
6
6
|
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
7
7
|
import { RootStackParamList } from '../../routes/RouteParamList';
|
|
8
8
|
import ReadMore from '@fawazahmed/react-native-read-more';
|
|
9
|
+
import { URL_REGEX } from '../../../v4/constants';
|
|
9
10
|
|
|
10
11
|
interface IrenderTextWithMention {
|
|
11
12
|
mentionPositionArr: IMentionPosition[];
|
|
@@ -28,10 +29,9 @@ const RenderTextWithMention: React.FC<IrenderTextWithMention> = ({
|
|
|
28
29
|
const navigation =
|
|
29
30
|
useNavigation() as NativeStackNavigationProp<RootStackParamList>;
|
|
30
31
|
const linkArr = useCallback((text: string): LinkInfo[] => {
|
|
31
|
-
const urlRegex = /(https?:\/\/|www\.)[^\s]+/g;
|
|
32
32
|
const links: LinkInfo[] = [];
|
|
33
33
|
let match;
|
|
34
|
-
while ((match =
|
|
34
|
+
while ((match = URL_REGEX.exec(text)) !== null) {
|
|
35
35
|
links.push({
|
|
36
36
|
link: match[0],
|
|
37
37
|
index: match.index,
|
|
@@ -54,8 +54,14 @@ const RenderTextWithMention: React.FC<IrenderTextWithMention> = ({
|
|
|
54
54
|
},
|
|
55
55
|
[navigation]
|
|
56
56
|
);
|
|
57
|
-
const handleLinkClick = useCallback((url: string) => {
|
|
58
|
-
|
|
57
|
+
const handleLinkClick = useCallback(async (url: string) => {
|
|
58
|
+
try {
|
|
59
|
+
const hasProtocol = /^(https?|ftp|mailto):/.test(url);
|
|
60
|
+
const formattedUrl = hasProtocol ? url : `https://${url}`;
|
|
61
|
+
await Linking.openURL(formattedUrl);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.warn('Failed to open URL:', error);
|
|
64
|
+
}
|
|
59
65
|
}, []);
|
|
60
66
|
|
|
61
67
|
const handleOnClick = useCallback(
|
|
@@ -88,14 +94,14 @@ const RenderTextWithMention: React.FC<IrenderTextWithMention> = ({
|
|
|
88
94
|
const nonHighlightedText = textPost.slice(currentPosition, index);
|
|
89
95
|
// Add highlighted text
|
|
90
96
|
const highlightedText = (
|
|
91
|
-
<
|
|
92
|
-
selectable
|
|
97
|
+
<TouchableOpacity
|
|
93
98
|
onPress={() => handleOnClick(link, userId)}
|
|
94
99
|
key={`highlighted-${i}`}
|
|
95
|
-
style={styles.mentionText}
|
|
96
100
|
>
|
|
97
|
-
{
|
|
98
|
-
|
|
101
|
+
<Text style={styles.mentionText} selectable>
|
|
102
|
+
{textPost.slice(index, index + length)}
|
|
103
|
+
</Text>
|
|
104
|
+
</TouchableOpacity>
|
|
99
105
|
);
|
|
100
106
|
|
|
101
107
|
// Update currentPosition for the next iteration
|
|
@@ -91,6 +91,9 @@ const SearchResultItem: FC<SearchResultItemType> = ({
|
|
|
91
91
|
pageID={pageId}
|
|
92
92
|
componentID={componentId}
|
|
93
93
|
elementID={ElementID.community_avatar}
|
|
94
|
+
avatarCustomUrl={
|
|
95
|
+
searchType === TabName.Users ? item?.avatarCustomUrl : undefined
|
|
96
|
+
}
|
|
94
97
|
targetType={searchType === TabName.Communities ? 'community' : 'user'}
|
|
95
98
|
/>
|
|
96
99
|
<View style={styles.profileInfoContainer}>
|
|
@@ -8,8 +8,8 @@ import { informative, failed, success } from '../../assets/icons';
|
|
|
8
8
|
import { CircularProgressIndicator } from '../CircularProgressIndicator';
|
|
9
9
|
|
|
10
10
|
const Toast = () => {
|
|
11
|
-
const { styles, theme } = useStyles();
|
|
12
11
|
const { hideToast, toast } = useToast();
|
|
12
|
+
const { styles, theme } = useStyles(toast.bottomPosition);
|
|
13
13
|
const timeoutRef = useRef<number | null>(null);
|
|
14
14
|
const fadeIn = useRef(new Animated.Value(0)).current;
|
|
15
15
|
|
|
@@ -3,7 +3,7 @@ import { useTheme } from 'react-native-paper';
|
|
|
3
3
|
import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
4
4
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
5
5
|
|
|
6
|
-
export const useStyles = () => {
|
|
6
|
+
export const useStyles = (bottomPosition: number = 16) => {
|
|
7
7
|
const theme = useTheme<MyMD3Theme>();
|
|
8
8
|
const { bottom } = useSafeAreaInsets();
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@ export const useStyles = () => {
|
|
|
13
13
|
zIndex: 999,
|
|
14
14
|
width: '90%',
|
|
15
15
|
borderRadius: 8,
|
|
16
|
-
bottom: bottom +
|
|
16
|
+
bottom: bottom + bottomPosition,
|
|
17
17
|
paddingVertical: 16,
|
|
18
18
|
alignSelf: 'center',
|
|
19
19
|
flexDirection: 'row',
|
|
@@ -24,6 +24,7 @@ export const ERROR_CODE = {
|
|
|
24
24
|
IMAGE_NUDITY: '500000',
|
|
25
25
|
ONLY_ONE_MODERATOR: '400317',
|
|
26
26
|
ONLY_ONE_MEMBER: '400318',
|
|
27
|
+
GLOBAL_BAN: '400312',
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
export const COMMENT_ERROR_MESSAGE = {
|
|
@@ -105,3 +106,6 @@ export const QUERY_KEY = {
|
|
|
105
106
|
POSTS_COLLECTION: 'posts-collections',
|
|
106
107
|
PINNED_POSTS_COLLECTION: 'pinned-posts-collections',
|
|
107
108
|
};
|
|
109
|
+
|
|
110
|
+
export const URL_REGEX =
|
|
111
|
+
/(?:(?:https?|ftp):\/\/(?:[a-zA-Z0-9.-]+|[\d.]+)(?::\d{1,5})?(?:\/(?:[^\s<>|()]*(?:\([^\s<>|()]*\)[^\s<>|()]*)*)*)?|mailto:[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}|www\.(?:[a-zA-Z0-9.-]+)(?:\/(?:[^\s<>|()]*(?:\([^\s<>|()]*\)[^\s<>|()]*)*)*)?(?!\.))/g;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import { RoomRepository } from '@amityco/ts-sdk-react-native';
|
|
3
|
+
|
|
4
|
+
export function useRoom(roomId: string) {
|
|
5
|
+
const [room, setRoom] = useState<Amity.Room | null>(null);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
let unsubscribe: Amity.Unsubscriber;
|
|
9
|
+
if (roomId) {
|
|
10
|
+
unsubscribe = RoomRepository.getRoom(roomId, ({ data }) => {
|
|
11
|
+
setRoom(data);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return () => {
|
|
15
|
+
unsubscribe && unsubscribe();
|
|
16
|
+
};
|
|
17
|
+
}, [roomId]);
|
|
18
|
+
|
|
19
|
+
return room;
|
|
20
|
+
}
|
package/src/v4/hook/index.ts
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
getPostTopic,
|
|
4
|
+
PostRepository,
|
|
5
|
+
subscribeTopic,
|
|
6
|
+
} from '@amityco/ts-sdk-react-native';
|
|
7
|
+
|
|
8
|
+
export const usePostSubscription = (postId: string) => {
|
|
9
|
+
const [subscribedPost, setSubscribedPost] = useState<Amity.Post>(null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
let unsubscribe: () => void;
|
|
13
|
+
if (postId) {
|
|
14
|
+
unsubscribe = PostRepository.getPost(postId, ({ data }) => {
|
|
15
|
+
setSubscribedPost(data);
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return () => {
|
|
19
|
+
unsubscribe && unsubscribe();
|
|
20
|
+
};
|
|
21
|
+
}, [postId]);
|
|
22
|
+
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
let unsubscribe: () => void;
|
|
25
|
+
if (subscribedPost) {
|
|
26
|
+
unsubscribe = subscribeTopic(getPostTopic(subscribedPost));
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
unsubscribe && unsubscribe();
|
|
30
|
+
};
|
|
31
|
+
}, [subscribedPost]);
|
|
32
|
+
|
|
33
|
+
return { subscribedPost };
|
|
34
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getRoomWatcherTopic,
|
|
3
|
+
subscribeTopic,
|
|
4
|
+
} from '@amityco/ts-sdk-react-native';
|
|
5
|
+
import { useEffect } from 'react';
|
|
6
|
+
|
|
7
|
+
export const useRoomSubscription = ({ room }: { room?: Amity.Room | null }) => {
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const unsubscriber: Amity.Unsubscriber[] = [];
|
|
10
|
+
|
|
11
|
+
if (room?.roomId && room?.status !== 'recorded') {
|
|
12
|
+
unsubscriber.push(subscribeTopic(getRoomWatcherTopic(room)));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return () => unsubscriber.forEach((fn) => fn());
|
|
16
|
+
}, [room, room?.roomId]);
|
|
17
|
+
|
|
18
|
+
return null;
|
|
19
|
+
};
|
package/src/v4/index.tsx
CHANGED
|
@@ -11,7 +11,7 @@ export { default as AmityMyCommunitiesSearchPage } from './PublicApi/Pages/Amity
|
|
|
11
11
|
export { default as AmityAllCategoriesPage } from './PublicApi/Pages/AmityAllCategoriesPage/AmityAllCategoriesPage';
|
|
12
12
|
export { default as AmityCommunitiesByCategoryPage } from './PublicApi/Pages/AmityCommunitiesByCategoryPage/AmityCommunitiesByCategoryPage';
|
|
13
13
|
export { default as AmityCommunityProfilePage } from './PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage';
|
|
14
|
-
|
|
14
|
+
export { default as AmityCreateLivestreamPage } from './PublicApi/Pages/AmityCreateLivestreamPage';
|
|
15
15
|
export { default as AmityLivestreamPostTargetSelectionPage } from './PublicApi/Pages/AmityLivestreamPostTargetSelectionPage';
|
|
16
16
|
export { default as AmityLivestreamTerminatedPage } from './PublicApi/Pages/AmityLivestreamTerminatedPage';
|
|
17
17
|
export { default as AmityLivestreamPlayerPage } from './PublicApi/Pages/AmityLivestreamPlayerPage';
|
|
@@ -65,6 +65,7 @@ import AmityCommunityProfilePage from '../PublicApi/Pages/AmityCommunityProfileP
|
|
|
65
65
|
import LivestreamTerminated from '../screen/LivestreamTerminated';
|
|
66
66
|
import PollTargetSelection from '../screen/PollTargetSelection';
|
|
67
67
|
import LivestreamPostTargetSelection from '../screen/LivestreamPostTargetSelection';
|
|
68
|
+
import CommunityMembership from '../screen/CommunityMembership';
|
|
68
69
|
|
|
69
70
|
interface PageRendererProps {
|
|
70
71
|
children: React.JSX.Element;
|
|
@@ -82,6 +83,7 @@ export default function PageRenderer({ children }: PageRendererProps) {
|
|
|
82
83
|
<Stack.Navigator
|
|
83
84
|
id={undefined}
|
|
84
85
|
screenOptions={{
|
|
86
|
+
headerShown: false,
|
|
85
87
|
headerShadowVisible: false,
|
|
86
88
|
contentStyle: {
|
|
87
89
|
backgroundColor: theme.colors.background,
|
|
@@ -192,6 +194,10 @@ export default function PageRenderer({ children }: PageRendererProps) {
|
|
|
192
194
|
name="CommunityAddMember"
|
|
193
195
|
component={CommunityAddMember}
|
|
194
196
|
/>
|
|
197
|
+
<Stack.Screen
|
|
198
|
+
name="CommunityMembership"
|
|
199
|
+
component={CommunityMembership}
|
|
200
|
+
/>
|
|
195
201
|
<Stack.Screen
|
|
196
202
|
name="CommunityPostPermission"
|
|
197
203
|
component={CommunityPostPermission}
|
|
@@ -65,13 +65,17 @@ import CommunityCommentsNotificationSetting from '../../v4/screen/CommunityComme
|
|
|
65
65
|
import CommunityStoriesNotificationSetting from '../../v4/screen/CommunityStoriesNotificationSetting';
|
|
66
66
|
import CommunityLivestreamsNotificationSetting from '../../v4/screen/CommunityLivestreamsNotificationSetting';
|
|
67
67
|
import CommunityPendingRequest from '../../v4/screen/CommunityPendingRequest';
|
|
68
|
+
import { GlobalBan } from '../screen/GlobalBan';
|
|
68
69
|
|
|
69
70
|
export default function AmitySocialUIKitV4Navigator() {
|
|
70
71
|
const Stack = createNativeStackNavigator<RootStackParamList>();
|
|
71
|
-
const { isConnected } = useAuth();
|
|
72
|
+
const { isConnected, isGlobalBan } = useAuth();
|
|
72
73
|
const theme = useTheme() as MyMD3Theme;
|
|
73
74
|
|
|
74
75
|
const styles = useStyles();
|
|
76
|
+
|
|
77
|
+
if (isGlobalBan) return <GlobalBan />;
|
|
78
|
+
|
|
75
79
|
return (
|
|
76
80
|
<NavigationIndependentTree>
|
|
77
81
|
<NavigationContainer>
|
|
@@ -35,6 +35,7 @@ export type RootStackParamList = {
|
|
|
35
35
|
postId: string;
|
|
36
36
|
showEndPopup?: boolean;
|
|
37
37
|
category?: AmityPostCategory;
|
|
38
|
+
isDeleted?: boolean;
|
|
38
39
|
};
|
|
39
40
|
UserProfile: {
|
|
40
41
|
userId: string;
|
|
@@ -72,7 +73,7 @@ export type RootStackParamList = {
|
|
|
72
73
|
targetType: string;
|
|
73
74
|
};
|
|
74
75
|
LivestreamPlayer: {
|
|
75
|
-
|
|
76
|
+
roomId: string;
|
|
76
77
|
post: Amity.Post;
|
|
77
78
|
};
|
|
78
79
|
LivestreamTerminated: {
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
3
|
+
import { useStyles } from './styles';
|
|
4
|
+
import { Typography } from '../../../v4/component/Typography/Typography';
|
|
5
|
+
import { View } from 'react-native';
|
|
6
|
+
import { SvgXml } from 'react-native-svg';
|
|
7
|
+
import { warning } from '../../../v4/assets/icons';
|
|
8
|
+
|
|
9
|
+
export function GlobalBan() {
|
|
10
|
+
const { styles, theme } = useStyles();
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<SafeAreaView style={styles.container} edges={['top', 'left']}>
|
|
14
|
+
<View style={styles.container}>
|
|
15
|
+
<View style={styles.titleContainer}>
|
|
16
|
+
<Typography.TitleBold style={styles.title}>
|
|
17
|
+
Community
|
|
18
|
+
</Typography.TitleBold>
|
|
19
|
+
</View>
|
|
20
|
+
<View style={styles.contentContainer}>
|
|
21
|
+
<SvgXml
|
|
22
|
+
width={56}
|
|
23
|
+
height={56}
|
|
24
|
+
xml={warning()}
|
|
25
|
+
color={theme.colors.base}
|
|
26
|
+
/>
|
|
27
|
+
<Typography.Headline style={styles.title}>
|
|
28
|
+
You've been banned.
|
|
29
|
+
</Typography.Headline>
|
|
30
|
+
<Typography.Body style={styles.body}>
|
|
31
|
+
Based on your previous activities, your account has been banned from
|
|
32
|
+
all feeds.
|
|
33
|
+
</Typography.Body>
|
|
34
|
+
</View>
|
|
35
|
+
</View>
|
|
36
|
+
</SafeAreaView>
|
|
37
|
+
);
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GlobalBan } from './GlobalBan';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from 'react-native-paper';
|
|
3
|
+
import type { MyMD3Theme } from 'src/providers/amity-ui-kit-provider';
|
|
4
|
+
|
|
5
|
+
export const useStyles = () => {
|
|
6
|
+
const theme = useTheme<MyMD3Theme>();
|
|
7
|
+
|
|
8
|
+
const styles = StyleSheet.create({
|
|
9
|
+
container: {
|
|
10
|
+
flex: 1,
|
|
11
|
+
backgroundColor: theme.colors.background,
|
|
12
|
+
},
|
|
13
|
+
titleContainer: {
|
|
14
|
+
padding: 16,
|
|
15
|
+
borderBottomWidth: 1,
|
|
16
|
+
flexDirection: 'row',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
borderBottomColor: theme.colors.baseShade4,
|
|
19
|
+
},
|
|
20
|
+
title: {
|
|
21
|
+
color: theme.colors.base,
|
|
22
|
+
},
|
|
23
|
+
contentContainer: {
|
|
24
|
+
gap: 8,
|
|
25
|
+
flex: 1,
|
|
26
|
+
paddingVertical: 24,
|
|
27
|
+
alignItems: 'center',
|
|
28
|
+
paddingHorizontal: 16,
|
|
29
|
+
flexDirection: 'column',
|
|
30
|
+
justifyContent: 'center',
|
|
31
|
+
},
|
|
32
|
+
body: {
|
|
33
|
+
textAlign: 'center',
|
|
34
|
+
color: theme.colors.baseShade2,
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
return { styles, theme };
|
|
39
|
+
};
|