@amityco/react-native-social-uikit 4.0.0-5ae18d07.0 → 4.0.0-61103059.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/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js +1 -1
- package/lib/commonjs/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.js.map +1 -1
- 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 +1 -3
- package/lib/commonjs/components/Social/PostList/index.js.map +1 -1
- package/lib/commonjs/components/Toast/Toast.js +1 -2
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/index.js +6 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/file-provider.js +19 -38
- package/lib/commonjs/providers/file-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 +2 -7
- package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
- package/lib/commonjs/util/postTypeChecker.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.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/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 +217 -68
- 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 +151 -124
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/commonjs/v4/assets/icons/toast.js +6 -6
- package/lib/commonjs/v4/assets/icons/toast.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/index.js +4 -9
- package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/styles.js +2 -7
- package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
- 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/LoadingImage/index.js +25 -22
- package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/styles.js +2 -19
- package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingVideo/index.js +3 -11
- package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +4 -11
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/styles.js +0 -5
- package/lib/commonjs/v4/component/MyStories/styles.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/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 +2 -1
- package/lib/commonjs/v4/constants/index.js.map +1 -1
- package/lib/commonjs/v4/enum/roomStatus.js +14 -0
- package/lib/commonjs/v4/enum/roomStatus.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/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/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 +1 -3
- package/lib/module/components/Social/PostList/index.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +1 -2
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/index.js +2 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/file-provider.js +19 -38
- package/lib/module/providers/file-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 -5
- package/lib/module/svg/svg-xml-list.js.map +1 -1
- package/lib/module/util/postTypeChecker.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js +11 -9
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.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/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 +222 -72
- 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 +153 -126
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/AmityLivestreamPlayerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js +2 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +1 -37
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +21 -54
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +2 -24
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js.map +1 -1
- package/lib/module/v4/assets/icons/toast.js +6 -6
- package/lib/module/v4/assets/icons/toast.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/index.js +5 -10
- package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/styles.js +2 -7
- package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
- 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/LoadingImage/index.js +24 -22
- package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/styles.js +2 -19
- package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/module/v4/component/LoadingVideo/index.js +3 -11
- package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/module/v4/component/MyStories/StoryCircleItem.js +6 -13
- package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/module/v4/component/MyStories/styles.js +0 -5
- package/lib/module/v4/component/MyStories/styles.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/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 +1 -0
- package/lib/module/v4/constants/index.js.map +1 -1
- package/lib/module/v4/enum/roomStatus.js +8 -0
- package/lib/module/v4/enum/roomStatus.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/stores/slices/toast.js +4 -1
- package/lib/module/v4/stores/slices/toast.js.map +1 -1
- 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/components/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
- package/lib/typescript/src/screens/LivestreamPlayer/index.d.ts.map +1 -1
- package/lib/typescript/src/svg/svg-xml-list.d.ts +0 -1
- package/lib/typescript/src/svg/svg-xml-list.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/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/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/AmityPostComposerPage/AmityPostComposerPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts +0 -22
- package/lib/typescript/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/assets/icons/toast.d.ts +3 -3
- package/lib/typescript/src/v4/assets/icons/toast.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts +0 -5
- package/lib/typescript/src/v4/component/CommunityStories/styles.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/LoadingImage/index.d.ts +1 -2
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +0 -21
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +1 -2
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/StoryCircleItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts +0 -5
- package/lib/typescript/src/v4/component/MyStories/styles.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/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 +1 -0
- package/lib/typescript/src/v4/constants/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/enum/roomStatus.d.ts +8 -0
- package/lib/typescript/src/v4/enum/roomStatus.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/RouteParamList.d.ts +1 -1
- package/lib/typescript/src/v4/routes/RouteParamList.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 +6 -3
- package/src/components/CreatePostChooseTargetModal/CreatePostChooseTargetModal.tsx +1 -1
- 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 +1 -4
- package/src/components/Toast/Toast.tsx +0 -1
- package/src/index.tsx +2 -2
- package/src/providers/file-provider.tsx +20 -42
- package/src/screens/CreateLivestream/CreateLivestream.tsx +17 -17
- package/src/screens/LivestreamPlayer/index.tsx +9 -15
- package/src/svg/svg-xml-list.ts +1 -7
- package/src/util/postTypeChecker.ts +1 -1
- package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +10 -10
- package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +1 -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/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +24 -25
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/styles.ts +2 -2
- package/src/v4/PublicApi/Pages/AmityCreateLivestreamPage/AmityCreateLivestreamPage.tsx +255 -89
- 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 +206 -154
- package/src/v4/PublicApi/Pages/AmityLivestreamPlayerPage/styles.ts +2 -0
- package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +0 -46
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +57 -122
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +1 -23
- package/src/v4/assets/icons/toast.tsx +9 -12
- package/src/v4/component/CommunityStories/index.tsx +17 -26
- package/src/v4/component/CommunityStories/styles.ts +2 -7
- package/src/v4/component/LivestreamContent/index.tsx +21 -22
- package/src/v4/component/LoadingImage/index.tsx +25 -28
- package/src/v4/component/LoadingImage/styles.ts +0 -17
- package/src/v4/component/LoadingVideo/index.tsx +3 -12
- package/src/v4/component/MyStories/StoryCircleItem.tsx +12 -19
- package/src/v4/component/MyStories/styles.ts +0 -5
- 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/Toast/index.tsx +1 -1
- package/src/v4/component/Toast/styles.ts +2 -2
- package/src/v4/constants/index.ts +3 -0
- package/src/v4/enum/roomStatus.ts +7 -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/RouteParamList.tsx +1 -1
- 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
|
@@ -8,6 +8,10 @@ import {
|
|
|
8
8
|
} from '../../../providers/file-provider';
|
|
9
9
|
import { closeIcon, toastIcon } from '../../../svg/svg-xml-list';
|
|
10
10
|
import { useStyles } from './styles';
|
|
11
|
+
import { useTheme } from 'react-native-paper';
|
|
12
|
+
import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
13
|
+
import uiSlice from '../../../redux/slices/uiSlice';
|
|
14
|
+
import { useUIKitDispatch } from '../../../redux/store';
|
|
11
15
|
|
|
12
16
|
interface OverlayImageProps {
|
|
13
17
|
source: string;
|
|
@@ -19,7 +23,6 @@ interface OverlayImageProps {
|
|
|
19
23
|
index: number,
|
|
20
24
|
originalPath: string
|
|
21
25
|
) => void;
|
|
22
|
-
onUploadError?: (hasError: boolean, source: string) => void;
|
|
23
26
|
index?: number;
|
|
24
27
|
isUploaded: boolean;
|
|
25
28
|
fileId?: string;
|
|
@@ -33,7 +36,6 @@ const LoadingImage = ({
|
|
|
33
36
|
onClose,
|
|
34
37
|
index,
|
|
35
38
|
onLoadFinish,
|
|
36
|
-
onUploadError,
|
|
37
39
|
isUploaded = false,
|
|
38
40
|
fileId = '',
|
|
39
41
|
isEditMode = false,
|
|
@@ -41,6 +43,9 @@ const LoadingImage = ({
|
|
|
41
43
|
postId,
|
|
42
44
|
setIsUploading,
|
|
43
45
|
}: OverlayImageProps) => {
|
|
46
|
+
const theme = useTheme() as MyMD3Theme;
|
|
47
|
+
const dispatch = useUIKitDispatch();
|
|
48
|
+
const { showToastMessage } = uiSlice.actions;
|
|
44
49
|
const [loading, setLoading] = useState(true);
|
|
45
50
|
const [progress, setProgress] = useState(0);
|
|
46
51
|
const [isProcess, setIsProcess] = useState<boolean>(false);
|
|
@@ -79,39 +84,33 @@ const LoadingImage = ({
|
|
|
79
84
|
source
|
|
80
85
|
);
|
|
81
86
|
} else {
|
|
82
|
-
setIsUploading(false);
|
|
83
87
|
handleLoadEnd();
|
|
84
|
-
|
|
88
|
+
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
85
89
|
setIsUploadError(true);
|
|
86
|
-
onUploadError?.(true, source);
|
|
87
90
|
}
|
|
88
91
|
} catch (error) {
|
|
89
92
|
handleLoadEnd();
|
|
90
|
-
|
|
91
|
-
setIsUploading(false);
|
|
93
|
+
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
92
94
|
setIsUploadError(true);
|
|
93
|
-
onUploadError?.(true, source);
|
|
94
95
|
}
|
|
95
96
|
}, [
|
|
97
|
+
dispatch,
|
|
96
98
|
handleLoadEnd,
|
|
97
99
|
index,
|
|
98
100
|
onLoadFinish,
|
|
99
|
-
onUploadError,
|
|
100
101
|
setIsUploading,
|
|
102
|
+
showToastMessage,
|
|
101
103
|
source,
|
|
102
104
|
]);
|
|
103
105
|
|
|
104
106
|
const handleDelete = async () => {
|
|
105
|
-
if (fileId
|
|
107
|
+
if (!fileId) return null;
|
|
108
|
+
if (!isEditMode) {
|
|
106
109
|
await deleteAmityFile(fileId);
|
|
107
110
|
}
|
|
108
111
|
onClose && onClose(source, fileId, postId);
|
|
109
112
|
};
|
|
110
113
|
useEffect(() => {
|
|
111
|
-
setIsUploadError(false);
|
|
112
|
-
onUploadError?.(false, source);
|
|
113
|
-
setProgress(0);
|
|
114
|
-
setIsProcess(false);
|
|
115
114
|
if (isUploaded) {
|
|
116
115
|
setLoading(false);
|
|
117
116
|
} else {
|
|
@@ -152,21 +151,19 @@ const LoadingImage = ({
|
|
|
152
151
|
)}
|
|
153
152
|
</View>
|
|
154
153
|
)}
|
|
155
|
-
{!loading && isUploadError
|
|
156
|
-
<
|
|
157
|
-
<
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
154
|
+
{!loading && isUploadError ? (
|
|
155
|
+
<TouchableOpacity style={styles.overlay} onPress={onRetryUpload}>
|
|
156
|
+
<SvgXml xml={toastIcon()} width="24" height="24" />
|
|
157
|
+
</TouchableOpacity>
|
|
158
|
+
) : (
|
|
159
|
+
<TouchableOpacity
|
|
160
|
+
style={styles.closeButton}
|
|
161
|
+
disabled={loading || isProcess}
|
|
162
|
+
onPress={handleDelete}
|
|
163
|
+
>
|
|
164
|
+
<SvgXml xml={closeIcon(theme.colors.base)} width="12" height="12" />
|
|
165
|
+
</TouchableOpacity>
|
|
161
166
|
)}
|
|
162
|
-
|
|
163
|
-
<TouchableOpacity
|
|
164
|
-
style={styles.closeButton}
|
|
165
|
-
disabled={(loading || isProcess) && !isUploadError}
|
|
166
|
-
onPress={handleDelete}
|
|
167
|
-
>
|
|
168
|
-
<SvgXml xml={closeIcon('white')} width="12" height="12" />
|
|
169
|
-
</TouchableOpacity>
|
|
170
167
|
</View>
|
|
171
168
|
);
|
|
172
169
|
};
|
|
@@ -18,28 +18,12 @@ export const useStyles = () => {
|
|
|
18
18
|
height: '100%',
|
|
19
19
|
resizeMode: 'cover',
|
|
20
20
|
borderRadius: 5,
|
|
21
|
-
position: 'relative',
|
|
22
21
|
},
|
|
23
22
|
overlay: {
|
|
24
23
|
...StyleSheet.absoluteFillObject,
|
|
25
24
|
justifyContent: 'center',
|
|
26
25
|
alignItems: 'center',
|
|
27
26
|
},
|
|
28
|
-
failedOverlay: {
|
|
29
|
-
...StyleSheet.absoluteFillObject,
|
|
30
|
-
justifyContent: 'center',
|
|
31
|
-
alignItems: 'center',
|
|
32
|
-
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
33
|
-
borderRadius: 5,
|
|
34
|
-
},
|
|
35
|
-
errorOverlay: {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
top: '50%',
|
|
38
|
-
left: 0,
|
|
39
|
-
right: 0,
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
},
|
|
43
27
|
progressBar: {
|
|
44
28
|
marginVertical: 10,
|
|
45
29
|
},
|
|
@@ -56,7 +40,6 @@ export const useStyles = () => {
|
|
|
56
40
|
padding: 7,
|
|
57
41
|
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
58
42
|
borderRadius: 72,
|
|
59
|
-
zIndex: 10,
|
|
60
43
|
},
|
|
61
44
|
});
|
|
62
45
|
};
|
|
@@ -35,7 +35,6 @@ interface OverlayImageProps {
|
|
|
35
35
|
originalPath: string,
|
|
36
36
|
thumbNail: string
|
|
37
37
|
) => void;
|
|
38
|
-
onUploadError?: (hasError: boolean, source: string) => void;
|
|
39
38
|
index?: number;
|
|
40
39
|
isUploaded: boolean;
|
|
41
40
|
fileId?: string;
|
|
@@ -51,7 +50,6 @@ const LoadingVideo = ({
|
|
|
51
50
|
onClose,
|
|
52
51
|
index,
|
|
53
52
|
onLoadFinish,
|
|
54
|
-
onUploadError,
|
|
55
53
|
isUploaded = false,
|
|
56
54
|
thumbNail,
|
|
57
55
|
onPlay,
|
|
@@ -131,30 +129,23 @@ const LoadingVideo = ({
|
|
|
131
129
|
} else {
|
|
132
130
|
handleLoadEnd();
|
|
133
131
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
134
|
-
setIsProcess(false);
|
|
135
132
|
setIsUploadError(true);
|
|
136
|
-
onUploadError?.(true, source);
|
|
137
133
|
}
|
|
138
134
|
} catch (error) {
|
|
139
135
|
handleLoadEnd();
|
|
140
136
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
141
|
-
setIsProcess(false);
|
|
142
137
|
setIsUploadError(true);
|
|
143
|
-
onUploadError?.(true, source);
|
|
144
138
|
}
|
|
145
139
|
}, [source]);
|
|
146
140
|
|
|
147
141
|
const handleDelete = async () => {
|
|
148
|
-
if (fileId
|
|
142
|
+
if (!fileId) return null;
|
|
143
|
+
if (!isEditMode) {
|
|
149
144
|
await deleteAmityFile(fileId);
|
|
150
145
|
}
|
|
151
146
|
onClose && onClose(source, fileId, postId);
|
|
152
147
|
};
|
|
153
148
|
useEffect(() => {
|
|
154
|
-
setIsUploadError(false);
|
|
155
|
-
onUploadError?.(false, source);
|
|
156
|
-
setProgress(0);
|
|
157
|
-
setIsProcess(false);
|
|
158
149
|
if (isUploaded) {
|
|
159
150
|
setLoading(false);
|
|
160
151
|
} else {
|
|
@@ -225,7 +216,7 @@ const LoadingVideo = ({
|
|
|
225
216
|
) : (
|
|
226
217
|
<TouchableOpacity
|
|
227
218
|
style={styles.closeButton}
|
|
228
|
-
disabled={
|
|
219
|
+
disabled={loading || isProcess}
|
|
229
220
|
onPress={handleDelete}
|
|
230
221
|
>
|
|
231
222
|
<SvgXml xml={closeIcon(theme.colors.base)} width="12" height="12" />
|
|
@@ -2,13 +2,12 @@ import { Image, Text, TouchableOpacity, View } from 'react-native';
|
|
|
2
2
|
import React, { FC, useEffect, useState } from 'react';
|
|
3
3
|
import { SvgXml } from 'react-native-svg';
|
|
4
4
|
import {
|
|
5
|
-
errorIcon,
|
|
6
5
|
officialIcon,
|
|
7
6
|
privateIcon,
|
|
8
7
|
storyRing,
|
|
9
8
|
} from '../../../svg/svg-xml-list';
|
|
10
9
|
import { ComponentID, ElementID, ImageSizeState, PageID } from '../../enum';
|
|
11
|
-
import { useFile
|
|
10
|
+
import { useFile } from '../../hook';
|
|
12
11
|
import useConfig from '../../hook/useConfig';
|
|
13
12
|
import { useStyles } from './styles';
|
|
14
13
|
import { CommunityRepository } from '@amityco/ts-sdk-react-native';
|
|
@@ -27,20 +26,18 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
27
26
|
const theme = useTheme() as MyMD3Theme;
|
|
28
27
|
const [avatarUrl, setAvatarUrl] = useState(null);
|
|
29
28
|
const [communityData, setCommunityData] = useState<Amity.Community>(null);
|
|
30
|
-
const hasStoryPermission = useStoryPermission(storyTarget.targetId);
|
|
31
29
|
const { getImage } = useFile();
|
|
32
30
|
const { getUiKitConfig } = useConfig();
|
|
33
31
|
const styles = useStyles();
|
|
34
|
-
const storyRingColor: string[] =
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
: ['#e2e2e2', '#e2e2e2'];
|
|
32
|
+
const storyRingColor: string[] = storyTarget?.hasUnseen
|
|
33
|
+
? (getUiKitConfig({
|
|
34
|
+
page: PageID.StoryPage,
|
|
35
|
+
component: ComponentID.StoryTab,
|
|
36
|
+
element: ElementID.StoryRing,
|
|
37
|
+
})?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
|
|
38
|
+
: storyTarget?.failedStoriesCount > 0
|
|
39
|
+
? ['#DE1029', '#DE1029']
|
|
40
|
+
: ['#e2e2e2', '#e2e2e2'];
|
|
44
41
|
|
|
45
42
|
useEffect(() => {
|
|
46
43
|
if (storyTarget.targetType !== 'community') return;
|
|
@@ -83,16 +80,12 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
83
80
|
height={68}
|
|
84
81
|
xml={storyRing(storyRingColor[0], storyRingColor[1])}
|
|
85
82
|
/>
|
|
86
|
-
{
|
|
87
|
-
<View style={styles.errorIcon}>
|
|
88
|
-
<SvgXml width={16} height={16} xml={errorIcon()} />
|
|
89
|
-
</View>
|
|
90
|
-
) : communityData?.isOfficial ? (
|
|
83
|
+
{communityData?.isOfficial && (
|
|
91
84
|
<SvgXml
|
|
92
85
|
style={styles.officialIcon}
|
|
93
86
|
xml={officialIcon(theme.colors.primary)}
|
|
94
87
|
/>
|
|
95
|
-
)
|
|
88
|
+
)}
|
|
96
89
|
<View style={styles.textRow}>
|
|
97
90
|
{!communityData?.isPublic && (
|
|
98
91
|
<SvgXml width={17} height={17} xml={privateIcon(theme.colors.base)} />
|
|
@@ -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
|
|
@@ -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',
|
|
@@ -105,3 +105,6 @@ export const QUERY_KEY = {
|
|
|
105
105
|
POSTS_COLLECTION: 'posts-collections',
|
|
106
106
|
PINNED_POSTS_COLLECTION: 'pinned-posts-collections',
|
|
107
107
|
};
|
|
108
|
+
|
|
109
|
+
export const URL_REGEX =
|
|
110
|
+
/(?:(?: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;
|
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';
|
|
@@ -10,12 +10,14 @@ type ToastState = {
|
|
|
10
10
|
message: string;
|
|
11
11
|
type: 'failed' | 'success' | 'informative' | 'loading';
|
|
12
12
|
duration?: number;
|
|
13
|
+
bottomPosition?: number;
|
|
13
14
|
};
|
|
14
15
|
const initialState: ToastState = {
|
|
15
16
|
visible: false,
|
|
16
17
|
message: '',
|
|
17
18
|
type: 'loading',
|
|
18
19
|
duration: 2500,
|
|
20
|
+
bottomPosition: 16,
|
|
19
21
|
};
|
|
20
22
|
|
|
21
23
|
const toastSlice = createSlice({
|
|
@@ -27,12 +29,15 @@ const toastSlice = createSlice({
|
|
|
27
29
|
state.message = action.payload.message;
|
|
28
30
|
state.type = action.payload.type;
|
|
29
31
|
state.duration = action.payload.duration ?? initialState.duration;
|
|
32
|
+
state.bottomPosition =
|
|
33
|
+
action.payload.bottomPosition ?? initialState.bottomPosition;
|
|
30
34
|
},
|
|
31
35
|
hideToast: (state) => {
|
|
32
36
|
state.visible = false;
|
|
33
37
|
state.message = '';
|
|
34
38
|
state.type = 'loading';
|
|
35
39
|
state.duration = 2500;
|
|
40
|
+
state.bottomPosition = 16;
|
|
36
41
|
},
|
|
37
42
|
},
|
|
38
43
|
});
|
package/uikit.config.json
CHANGED
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
"image": "create_poll_button"
|
|
288
288
|
},
|
|
289
289
|
"social_home_page/create_post_menu/create_livestream_button": {
|
|
290
|
-
"text": "
|
|
290
|
+
"text": "Live stream",
|
|
291
291
|
"image": "create_livestream_button"
|
|
292
292
|
},
|
|
293
293
|
"select_post_target_page/*/close_button": {
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LivestreamStatus = void 0;
|
|
7
|
-
const LivestreamStatus = exports.LivestreamStatus = {
|
|
8
|
-
idle: 'idle',
|
|
9
|
-
live: 'live',
|
|
10
|
-
recorded: 'recorded',
|
|
11
|
-
ended: 'ended'
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=livestreamStatus.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LivestreamStatus","exports","idle","live","recorded","ended"],"sourceRoot":"../../../../src","sources":["v4/enum/livestreamStatus.ts"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC9BE,IAAI,EAAE,MAA4B;EAClCC,IAAI,EAAE,MAA4B;EAClCC,QAAQ,EAAE,UAAgC;EAC1CC,KAAK,EAAE;AACT,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["LivestreamStatus","idle","live","recorded","ended"],"sourceRoot":"../../../../src","sources":["v4/enum/livestreamStatus.ts"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,GAAG;EAC9BC,IAAI,EAAE,MAA4B;EAClCC,IAAI,EAAE,MAA4B;EAClCC,QAAQ,EAAE,UAAgC;EAC1CC,KAAK,EAAE;AACT,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"livestreamStatus.d.ts","sourceRoot":"","sources":["../../../../../src/v4/enum/livestreamStatus.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;UACX,KAAK,CAAC,YAAY;UAClB,KAAK,CAAC,YAAY;cACV,KAAK,CAAC,YAAY;WACxB,KAAK,CAAC,YAAY;CACrC,CAAC"}
|