@amityco/react-native-social-uikit 4.0.0-e24bae8.0 → 4.0.0-e3111902.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/snippet/AmityGlobalFeedComponent.js +6 -1
- package/lib/commonjs/snippet/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.js +3 -3
- package/lib/commonjs/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +5 -7
- package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.js +23 -3
- package/lib/commonjs/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js +11 -17
- package/lib/commonjs/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.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 +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.js +8 -23
- package/lib/commonjs/v4/PublicApi/Components/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +13 -3
- package/lib/commonjs/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityDraftStoryPage/AmityDraftStoryPage.js +4 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityDraftStoryPage/AmityDraftStoryPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityDraftStoryPage/styles.js +15 -8
- package/lib/commonjs/v4/PublicApi/Pages/AmityDraftStoryPage/styles.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js +21 -29
- package/lib/commonjs/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +1 -0
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/commonjs/v4/assets/icons/lock.js +6 -4
- package/lib/commonjs/v4/assets/icons/lock.js.map +1 -1
- package/lib/commonjs/v4/component/Avatar/Avatar.js +5 -3
- package/lib/commonjs/v4/component/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityRowItem/CommunityRowItem.js +5 -4
- package/lib/commonjs/v4/component/CommunityRowItem/CommunityRowItem.js.map +1 -1
- package/lib/commonjs/v4/component/Social/CommentList/CommentList.js +24 -15
- package/lib/commonjs/v4/component/Social/CommentList/CommentList.js.map +1 -1
- package/lib/commonjs/v4/component/Social/CommentList/styles.js +12 -0
- package/lib/commonjs/v4/component/Social/CommentList/styles.js.map +1 -1
- package/lib/commonjs/v4/component/Social/CommentListItem/CommentListItem.js +3 -2
- package/lib/commonjs/v4/component/Social/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetItem/TargetItem.js +4 -2
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetItem/TargetItem.js.map +1 -1
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js +22 -2
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +8 -3
- package/lib/commonjs/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
- package/lib/commonjs/v4/elements/CommunityRowImage/CommunityRowImage.js +4 -32
- package/lib/commonjs/v4/elements/CommunityRowImage/CommunityRowImage.js.map +1 -1
- package/lib/commonjs/v4/enum/roomStatus.js +2 -1
- package/lib/commonjs/v4/enum/roomStatus.js.map +1 -1
- package/lib/commonjs/v4/features/community/Membership/components/MemberItem/MemberItem.js +2 -1
- package/lib/commonjs/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
- package/lib/commonjs/v4/features/community/Setting/hooks/useCommunitySetting.js +6 -3
- package/lib/commonjs/v4/features/community/Setting/hooks/useCommunitySetting.js.map +1 -1
- package/lib/commonjs/v4/{component/CommunityCategoryChips/CommunityCategoryChips.js → features/feed/components/CommunityCategories/CommunityCategories.js} +19 -21
- package/lib/commonjs/v4/features/feed/components/CommunityCategories/CommunityCategories.js.map +1 -0
- package/lib/commonjs/v4/features/feed/components/CommunityCategories/index.js +13 -0
- package/lib/commonjs/v4/features/feed/components/CommunityCategories/index.js.map +1 -0
- package/lib/commonjs/v4/{component/CommunityCategoryChips → features/feed/components/CommunityCategories}/styles.js +7 -2
- package/lib/commonjs/v4/features/feed/components/CommunityCategories/styles.js.map +1 -0
- package/lib/commonjs/v4/features/feed/components/index.js +17 -0
- package/lib/commonjs/v4/features/feed/components/index.js.map +1 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/CommunityCategory.js +42 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/CommunityCategory.js.map +1 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/index.js +13 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/index.js.map +1 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/styles.js +29 -0
- package/lib/commonjs/v4/features/feed/elements/CommunityCategory/styles.js.map +1 -0
- package/lib/commonjs/v4/features/feed/elements/index.js +17 -0
- package/lib/commonjs/v4/features/feed/elements/index.js.map +1 -0
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js +33 -38
- package/lib/commonjs/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/commonjs/v4/hook/usePaginator.js +11 -16
- package/lib/commonjs/v4/hook/usePaginator.js.map +1 -1
- package/lib/commonjs/v4/hook/usePostPermission.js +38 -0
- package/lib/commonjs/v4/hook/usePostPermission.js.map +1 -0
- package/lib/commonjs/v4/routes/AmitySocialUIKitV4Navigator.js +1 -0
- package/lib/commonjs/v4/routes/AmitySocialUIKitV4Navigator.js.map +1 -1
- package/lib/commonjs/v4/screen/FollowerList/Components/FollowerListItem.js +1 -1
- package/lib/commonjs/v4/screen/FollowerList/Components/FollowerListItem.js.map +1 -1
- package/lib/module/snippet/AmityGlobalFeedComponent.js +6 -1
- package/lib/module/snippet/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.js +3 -3
- package/lib/module/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +6 -8
- package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.js +23 -3
- package/lib/module/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.js +11 -17
- package/lib/module/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.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 +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.js +9 -23
- package/lib/module/v4/PublicApi/Components/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js +13 -3
- package/lib/module/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityDraftStoryPage/AmityDraftStoryPage.js +4 -0
- package/lib/module/v4/PublicApi/Pages/AmityDraftStoryPage/AmityDraftStoryPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityDraftStoryPage/styles.js +15 -8
- package/lib/module/v4/PublicApi/Pages/AmityDraftStoryPage/styles.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js +23 -31
- package/lib/module/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +1 -0
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/assets/icons/lock.js +6 -4
- package/lib/module/v4/assets/icons/lock.js.map +1 -1
- package/lib/module/v4/component/Avatar/Avatar.js +5 -3
- package/lib/module/v4/component/Avatar/Avatar.js.map +1 -1
- package/lib/module/v4/component/CommunityRowItem/CommunityRowItem.js +5 -4
- package/lib/module/v4/component/CommunityRowItem/CommunityRowItem.js.map +1 -1
- package/lib/module/v4/component/Social/CommentList/CommentList.js +24 -15
- package/lib/module/v4/component/Social/CommentList/CommentList.js.map +1 -1
- package/lib/module/v4/component/Social/CommentList/styles.js +12 -0
- package/lib/module/v4/component/Social/CommentList/styles.js.map +1 -1
- package/lib/module/v4/component/Social/CommentListItem/CommentListItem.js +3 -2
- package/lib/module/v4/component/Social/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/module/v4/component/TargetSelectionPage/TargetItem/TargetItem.js +4 -2
- package/lib/module/v4/component/TargetSelectionPage/TargetItem/TargetItem.js.map +1 -1
- package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js +22 -2
- package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
- package/lib/module/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +8 -3
- package/lib/module/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
- package/lib/module/v4/elements/CommunityRowImage/CommunityRowImage.js +6 -34
- package/lib/module/v4/elements/CommunityRowImage/CommunityRowImage.js.map +1 -1
- package/lib/module/v4/enum/roomStatus.js +2 -1
- package/lib/module/v4/enum/roomStatus.js.map +1 -1
- package/lib/module/v4/features/community/Membership/components/MemberItem/MemberItem.js +2 -1
- package/lib/module/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
- package/lib/module/v4/features/community/Setting/hooks/useCommunitySetting.js +6 -3
- package/lib/module/v4/features/community/Setting/hooks/useCommunitySetting.js.map +1 -1
- package/lib/module/v4/{component/CommunityCategoryChips/CommunityCategoryChips.js → features/feed/components/CommunityCategories/CommunityCategories.js} +18 -19
- package/lib/module/v4/features/feed/components/CommunityCategories/CommunityCategories.js.map +1 -0
- package/lib/module/v4/features/feed/components/CommunityCategories/index.js +2 -0
- package/lib/module/v4/features/feed/components/CommunityCategories/index.js.map +1 -0
- package/lib/module/v4/{component/CommunityCategoryChips → features/feed/components/CommunityCategories}/styles.js +7 -2
- package/lib/module/v4/features/feed/components/CommunityCategories/styles.js.map +1 -0
- package/lib/module/v4/features/feed/components/index.js +2 -0
- package/lib/module/v4/features/feed/components/index.js.map +1 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/CommunityCategory.js +35 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/CommunityCategory.js.map +1 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/index.js +2 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/index.js.map +1 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/styles.js +22 -0
- package/lib/module/v4/features/feed/elements/CommunityCategory/styles.js.map +1 -0
- package/lib/module/v4/features/feed/elements/index.js +2 -0
- package/lib/module/v4/features/feed/elements/index.js.map +1 -0
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js +34 -39
- package/lib/module/v4/hook/useCustomRankingGlobalFeed.js.map +1 -1
- package/lib/module/v4/hook/usePaginator.js +12 -17
- package/lib/module/v4/hook/usePaginator.js.map +1 -1
- package/lib/module/v4/hook/usePostPermission.js +31 -0
- package/lib/module/v4/hook/usePostPermission.js.map +1 -0
- package/lib/module/v4/routes/AmitySocialUIKitV4Navigator.js +1 -0
- package/lib/module/v4/routes/AmitySocialUIKitV4Navigator.js.map +1 -1
- package/lib/module/v4/screen/FollowerList/Components/FollowerListItem.js +1 -1
- package/lib/module/v4/screen/FollowerList/Components/FollowerListItem.js.map +1 -1
- package/lib/typescript/src/components/PollSection/usePoll.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts +4 -0
- package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.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/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.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/AmityDraftStoryPage/AmityDraftStoryPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityDraftStoryPage/styles.d.ts +14 -7
- package/lib/typescript/src/v4/PublicApi/Pages/AmityDraftStoryPage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.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/assets/icons/lock.d.ts +1 -1
- package/lib/typescript/src/v4/assets/icons/lock.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Social/CommentList/CommentList.d.ts +1 -0
- package/lib/typescript/src/v4/component/Social/CommentList/CommentList.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Social/CommentList/styles.d.ts +12 -0
- package/lib/typescript/src/v4/component/Social/CommentList/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Social/CommentListItem/CommentListItem.d.ts +2 -1
- package/lib/typescript/src/v4/component/Social/CommentListItem/CommentListItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/TargetSelectionPage/TargetItem/TargetItem.d.ts +2 -1
- package/lib/typescript/src/v4/component/TargetSelectionPage/TargetItem/TargetItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/TargetSelectionPage/TargetSelectionPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.d.ts.map +1 -1
- package/lib/typescript/src/v4/elements/CommunityRowImage/CommunityRowImage.d.ts +1 -1
- package/lib/typescript/src/v4/elements/CommunityRowImage/CommunityRowImage.d.ts.map +1 -1
- package/lib/typescript/src/v4/enum/roomStatus.d.ts +1 -0
- package/lib/typescript/src/v4/enum/roomStatus.d.ts.map +1 -1
- package/lib/typescript/src/v4/features/community/Membership/components/MemberItem/MemberItem.d.ts.map +1 -1
- package/lib/typescript/src/v4/features/community/Setting/hooks/useCommunitySetting.d.ts.map +1 -1
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/CommunityCategories.d.ts +12 -0
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/CommunityCategories.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/index.d.ts +2 -0
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/index.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/styles.d.ts +30 -0
- package/lib/typescript/src/v4/features/feed/components/CommunityCategories/styles.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/components/index.d.ts +2 -0
- package/lib/typescript/src/v4/features/feed/components/index.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/CommunityCategory.d.ts +12 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/CommunityCategory.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/index.d.ts +2 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/index.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/styles.d.ts +17 -0
- package/lib/typescript/src/v4/features/feed/elements/CommunityCategory/styles.d.ts.map +1 -0
- package/lib/typescript/src/v4/features/feed/elements/index.d.ts +2 -0
- package/lib/typescript/src/v4/features/feed/elements/index.d.ts.map +1 -0
- package/lib/typescript/src/v4/hook/useCustomRankingGlobalFeed.d.ts +6 -1
- package/lib/typescript/src/v4/hook/useCustomRankingGlobalFeed.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePaginator.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts +1 -39
- package/lib/typescript/src/v4/hook/usePendingPostQuery.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePoll.d.ts +1 -1
- package/lib/typescript/src/v4/hook/usePostPermission.d.ts +6 -0
- package/lib/typescript/src/v4/hook/usePostPermission.d.ts.map +1 -0
- package/lib/typescript/src/v4/routes/AmitySocialUIKitV4Navigator.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/snippet/AmityGlobalFeedComponent.tsx +6 -1
- package/src/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.tsx +3 -3
- package/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.tsx +9 -6
- package/src/v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent.tsx +27 -2
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.tsx +29 -36
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx +2 -2
- package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityRecommenedCommunityComponent/RecommenedCommunityItems/RecommenedCommunityItems.tsx +8 -24
- package/src/v4/PublicApi/Pages/AmityCommunityProfilePage/AmityCommunityProfilePage.tsx +13 -3
- package/src/v4/PublicApi/Pages/AmityDraftStoryPage/AmityDraftStoryPage.tsx +5 -0
- package/src/v4/PublicApi/Pages/AmityDraftStoryPage/styles.ts +14 -7
- package/src/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.tsx +27 -33
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +1 -0
- package/src/v4/assets/icons/lock.tsx +7 -6
- package/src/v4/component/Avatar/Avatar.tsx +5 -2
- package/src/v4/component/CommunityRowItem/CommunityRowItem.tsx +4 -4
- package/src/v4/component/Social/CommentList/CommentList.tsx +69 -56
- package/src/v4/component/Social/CommentList/styles.ts +12 -0
- package/src/v4/component/Social/CommentListItem/CommentListItem.tsx +3 -1
- package/src/v4/component/TargetSelectionPage/TargetItem/TargetItem.tsx +3 -0
- package/src/v4/component/TargetSelectionPage/TargetSelectionPage.tsx +23 -1
- package/src/v4/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.tsx +6 -2
- package/src/v4/elements/CommunityRowImage/CommunityRowImage.tsx +7 -34
- package/src/v4/enum/roomStatus.ts +1 -0
- package/src/v4/features/community/Membership/components/MemberItem/MemberItem.tsx +1 -0
- package/src/v4/features/community/Setting/hooks/useCommunitySetting.ts +4 -2
- package/src/v4/{component/CommunityCategoryChips/CommunityCategoryChips.tsx → features/feed/components/CommunityCategories/CommunityCategories.tsx} +20 -22
- package/src/v4/features/feed/components/CommunityCategories/index.ts +1 -0
- package/src/v4/{component/CommunityCategoryChips → features/feed/components/CommunityCategories}/styles.ts +4 -2
- package/src/v4/features/feed/components/index.ts +1 -0
- package/src/v4/features/feed/elements/CommunityCategory/CommunityCategory.tsx +45 -0
- package/src/v4/features/feed/elements/CommunityCategory/index.ts +1 -0
- package/src/v4/features/feed/elements/CommunityCategory/styles.ts +20 -0
- package/src/v4/features/feed/elements/index.ts +1 -0
- package/src/v4/hook/useCustomRankingGlobalFeed.ts +47 -47
- package/src/v4/hook/usePaginator.ts +20 -23
- package/src/v4/hook/usePostPermission.ts +46 -0
- package/src/v4/routes/AmitySocialUIKitV4Navigator.tsx +1 -0
- package/src/v4/screen/FollowerList/Components/FollowerListItem.tsx +1 -1
- package/lib/commonjs/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.js +0 -38
- package/lib/commonjs/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.js.map +0 -1
- package/lib/commonjs/v4/component/CommunityCategoryChips/CommunityCategoryChips.js.map +0 -1
- package/lib/commonjs/v4/component/CommunityCategoryChips/styles.js.map +0 -1
- package/lib/commonjs/v4/elements/CommunityCatetory/CommunityCategory.js +0 -38
- package/lib/commonjs/v4/elements/CommunityCatetory/CommunityCategory.js.map +0 -1
- package/lib/module/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.js +0 -30
- package/lib/module/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.js.map +0 -1
- package/lib/module/v4/component/CommunityCategoryChips/CommunityCategoryChips.js.map +0 -1
- package/lib/module/v4/component/CommunityCategoryChips/styles.js.map +0 -1
- package/lib/module/v4/elements/CommunityCatetory/CommunityCategory.js +0 -31
- package/lib/module/v4/elements/CommunityCatetory/CommunityCategory.js.map +0 -1
- package/lib/typescript/src/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.d.ts +0 -11
- package/lib/typescript/src/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.d.ts.map +0 -1
- package/lib/typescript/src/v4/component/CommunityCategoryChips/CommunityCategoryChips.d.ts +0 -11
- package/lib/typescript/src/v4/component/CommunityCategoryChips/CommunityCategoryChips.d.ts.map +0 -1
- package/lib/typescript/src/v4/component/CommunityCategoryChips/styles.d.ts +0 -27
- package/lib/typescript/src/v4/component/CommunityCategoryChips/styles.d.ts.map +0 -1
- package/lib/typescript/src/v4/elements/CommunityCatetory/CommunityCategory.d.ts +0 -12
- package/lib/typescript/src/v4/elements/CommunityCatetory/CommunityCategory.d.ts.map +0 -1
- package/src/v4/component/CommunityCategoryChips/CommunityCategoryChip/CommunityCategoryChip.tsx +0 -47
- package/src/v4/elements/CommunityCatetory/CommunityCategory.tsx +0 -41
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amityco/react-native-social-uikit",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-e3111902.0",
|
|
4
4
|
"description": "Social UIKit",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"registry": "https://registry.npmjs.org/"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@amityco/ts-sdk-react-native": "^7.
|
|
60
|
+
"@amityco/ts-sdk-react-native": "^7.17.0",
|
|
61
61
|
"@babel/plugin-transform-export-namespace-from": "^7.27.1",
|
|
62
62
|
"@commitlint/config-conventional": "^17.0.2",
|
|
63
63
|
"@evilmartians/lefthook": "^1.2.2",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"@types/react": "18.2.37"
|
|
117
117
|
},
|
|
118
118
|
"peerDependencies": {
|
|
119
|
-
"@amityco/ts-sdk-react-native": "^7.
|
|
119
|
+
"@amityco/ts-sdk-react-native": "^7.17.0",
|
|
120
120
|
"@livekit/react-native": "^2.9.6",
|
|
121
121
|
"@livekit/react-native-webrtc": "^137.0.2",
|
|
122
122
|
"@react-native-async-storage/async-storage": "^1.19.3",
|
|
@@ -25,6 +25,11 @@ import config from '../../uikit.config.json';
|
|
|
25
25
|
},
|
|
26
26
|
}}
|
|
27
27
|
>
|
|
28
|
-
<AmityGlobalFeedComponent
|
|
28
|
+
<AmityGlobalFeedComponent
|
|
29
|
+
itemWithAds={[]}
|
|
30
|
+
refresh={() => Promise.resolve()}
|
|
31
|
+
loading={false}
|
|
32
|
+
onNextPage={() => null}
|
|
33
|
+
/>
|
|
29
34
|
</AmityUiKitProvider>;
|
|
30
35
|
/* end_sample_code */
|
package/src/v4/PublicApi/Components/AmityCommunityHeaderComponent/AmityCommunityHeaderComponent.tsx
CHANGED
|
@@ -11,7 +11,6 @@ import CommunityCover from '../../../elements/CommunityCover/CommunityCover';
|
|
|
11
11
|
import CommunityPrivateBadge from '../../../elements/CommunityPrivateBadge/CommunityPrivateBadge';
|
|
12
12
|
import CommunityName from '../../../elements/CommunityName/CommunityName';
|
|
13
13
|
import CommunityVerifyBadge from '../../../elements/CommunityVerifyBadge/CommunityVerifyBadge';
|
|
14
|
-
import CommunityCategory from '../../../elements/CommunityCatetory/CommunityCategory';
|
|
15
14
|
import CommunityDescription from '../../../elements/CommunityDescription/CommunityDescription';
|
|
16
15
|
import CommunityInfo from '../../../elements/CommunityInfo/CommunityInfo';
|
|
17
16
|
import CommunityJoinButtonElement from '../../../elements/CommunityJoinButtonElement/CommunityJoinButtonElement';
|
|
@@ -24,6 +23,7 @@ import { useNavigation } from '@react-navigation/native';
|
|
|
24
23
|
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
25
24
|
import { RootStackParamList } from '../../../../v4/routes/RouteParamList';
|
|
26
25
|
import { Client } from '@amityco/ts-sdk-react-native';
|
|
26
|
+
import { CommunityCategories } from '../../../../v4/features/feed/components';
|
|
27
27
|
|
|
28
28
|
export interface AmityCommunityHeaderRef {
|
|
29
29
|
height: number;
|
|
@@ -135,10 +135,10 @@ const AmityCommunityHeaderComponent: FC<AmityCommunityHeaderComponentProps> = ({
|
|
|
135
135
|
<CommunityVerifyBadge pageId={pageId} componentId={componentId} />
|
|
136
136
|
)}
|
|
137
137
|
</View>
|
|
138
|
-
<
|
|
138
|
+
<CommunityCategories
|
|
139
139
|
pageId={pageId}
|
|
140
140
|
componentId={componentId}
|
|
141
|
-
|
|
141
|
+
categories={community.categories}
|
|
142
142
|
allVisible={true}
|
|
143
143
|
style={styles.categoryWrap}
|
|
144
144
|
/>
|
|
@@ -10,10 +10,7 @@ import AmityStoryTabComponent from '../AmityStoryTabComponent/AmityStoryTabCompo
|
|
|
10
10
|
import { AmityStoryTabComponentEnum } from '../../types';
|
|
11
11
|
import { usePostImpression } from '../../../../v4/hook/usePostImpression';
|
|
12
12
|
import { useStyle } from './styles';
|
|
13
|
-
import {
|
|
14
|
-
isAmityAd,
|
|
15
|
-
useCustomRankingGlobalFeed,
|
|
16
|
-
} from '../../../hook/useCustomRankingGlobalFeed';
|
|
13
|
+
import { isAmityAd } from '../../../hook/useCustomRankingGlobalFeed';
|
|
17
14
|
import PostAdComponent from '../../../component/PostAdComponent/PostAdComponent';
|
|
18
15
|
import Divider from '../../../component/Divider';
|
|
19
16
|
|
|
@@ -21,6 +18,10 @@ type AmityGlobalFeedComponentType = {
|
|
|
21
18
|
pageId?: PageID;
|
|
22
19
|
isShowStoryTab?: boolean;
|
|
23
20
|
GlobalFeedHeaderComponent?: React.ReactElement;
|
|
21
|
+
itemWithAds: (Amity.Post | Amity.Ad)[] | undefined;
|
|
22
|
+
refresh: () => void;
|
|
23
|
+
loading: boolean;
|
|
24
|
+
onNextPage: (() => void) | null;
|
|
24
25
|
};
|
|
25
26
|
|
|
26
27
|
export const globalFeedPageLimit = 20;
|
|
@@ -29,9 +30,11 @@ const AmityGlobalFeedComponent: FC<AmityGlobalFeedComponentType> = ({
|
|
|
29
30
|
pageId,
|
|
30
31
|
isShowStoryTab = true,
|
|
31
32
|
GlobalFeedHeaderComponent,
|
|
33
|
+
itemWithAds,
|
|
34
|
+
refresh,
|
|
35
|
+
loading,
|
|
36
|
+
onNextPage,
|
|
32
37
|
}) => {
|
|
33
|
-
const { itemWithAds, refresh, loading, onNextPage } =
|
|
34
|
-
useCustomRankingGlobalFeed();
|
|
35
38
|
const componentId = ComponentID.global_feed_component;
|
|
36
39
|
const { isExcluded, themeStyles, accessibilityId } = useAmityComponent({
|
|
37
40
|
pageId,
|
|
@@ -5,23 +5,42 @@ import AmityGlobalFeedComponent from '../AmityGlobalFeedComponent/AmityGlobalFee
|
|
|
5
5
|
import { useStyles } from './styles';
|
|
6
6
|
import Divider from '../../../component/Divider';
|
|
7
7
|
import { useAmityComponent } from '../../../hook';
|
|
8
|
+
import { useCustomRankingGlobalFeed } from '../../../hook/useCustomRankingGlobalFeed';
|
|
9
|
+
import NewsFeedLoadingComponent from '../../../component/NewsFeedLoadingComponent/NewsFeedLoadingComponent';
|
|
10
|
+
import AmityEmptyNewsFeedComponent from '../AmityEmptyNewsFeedComponent/AmityEmptyNewsFeedComponent';
|
|
8
11
|
|
|
9
12
|
type AmityNewsFeedComponentType = {
|
|
10
13
|
pageId?: PageID;
|
|
14
|
+
onPressExploreCommunity?: () => void;
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
const AmityNewsFeedComponent: FC<AmityNewsFeedComponentType> = ({
|
|
14
18
|
pageId = PageID.WildCardPage,
|
|
19
|
+
onPressExploreCommunity,
|
|
15
20
|
}) => {
|
|
21
|
+
const styles = useStyles();
|
|
16
22
|
const componentId = ComponentID.newsfeed_component;
|
|
17
23
|
const { themeStyles, accessibilityId, isExcluded } = useAmityComponent({
|
|
18
24
|
pageId,
|
|
19
25
|
componentId,
|
|
20
26
|
});
|
|
21
27
|
|
|
22
|
-
const
|
|
28
|
+
const { itemWithAds, refresh, globalFeedPosts, loading, onNextPage } =
|
|
29
|
+
useCustomRankingGlobalFeed();
|
|
30
|
+
|
|
23
31
|
if (isExcluded) return null;
|
|
24
32
|
|
|
33
|
+
if (loading || (globalFeedPosts?.length > 0 && !itemWithAds?.length))
|
|
34
|
+
return <NewsFeedLoadingComponent />;
|
|
35
|
+
|
|
36
|
+
if (!loading && !globalFeedPosts?.length)
|
|
37
|
+
return (
|
|
38
|
+
<AmityEmptyNewsFeedComponent
|
|
39
|
+
pageId={pageId}
|
|
40
|
+
onPressExploreCommunity={onPressExploreCommunity}
|
|
41
|
+
/>
|
|
42
|
+
);
|
|
43
|
+
|
|
25
44
|
return (
|
|
26
45
|
<View
|
|
27
46
|
style={styles.container}
|
|
@@ -29,7 +48,13 @@ const AmityNewsFeedComponent: FC<AmityNewsFeedComponentType> = ({
|
|
|
29
48
|
accessibilityLabel={accessibilityId}
|
|
30
49
|
>
|
|
31
50
|
<Divider themeStyles={themeStyles} />
|
|
32
|
-
<AmityGlobalFeedComponent
|
|
51
|
+
<AmityGlobalFeedComponent
|
|
52
|
+
pageId={pageId}
|
|
53
|
+
itemWithAds={itemWithAds}
|
|
54
|
+
refresh={refresh}
|
|
55
|
+
loading={loading}
|
|
56
|
+
onNextPage={onNextPage}
|
|
57
|
+
/>
|
|
33
58
|
</View>
|
|
34
59
|
);
|
|
35
60
|
};
|
|
@@ -8,7 +8,6 @@ import React, {
|
|
|
8
8
|
useCallback,
|
|
9
9
|
} from 'react';
|
|
10
10
|
import { UserInterface, IMentionPosition } from '../../../../types';
|
|
11
|
-
import { getAmityUser } from '../../../../providers/user-provider';
|
|
12
11
|
import { CommentRepository } from '@amityco/ts-sdk-react-native';
|
|
13
12
|
import CommentListItem from './CommentListItem/CommentListItem';
|
|
14
13
|
import { deleteCommentById } from '../../../../providers/Social/comment-sdk';
|
|
@@ -91,9 +90,9 @@ const AmityPostCommentComponent: FC<AmityPostCommentComponentType> = ({
|
|
|
91
90
|
referenceType: postType,
|
|
92
91
|
limit: commentListLimit,
|
|
93
92
|
},
|
|
94
|
-
|
|
93
|
+
({ loading, data, hasNextPage, onNextPage }) => {
|
|
95
94
|
if (!loading) {
|
|
96
|
-
|
|
95
|
+
queryComment(data);
|
|
97
96
|
onNextPageRef.current = hasNextPage ? onNextPage : null;
|
|
98
97
|
setTimeout(() => {
|
|
99
98
|
setIsLoading(false);
|
|
@@ -102,43 +101,37 @@ const AmityPostCommentComponent: FC<AmityPostCommentComponentType> = ({
|
|
|
102
101
|
}
|
|
103
102
|
);
|
|
104
103
|
return () => {
|
|
105
|
-
setCommentList([]);
|
|
106
104
|
unsubComment();
|
|
107
105
|
};
|
|
108
106
|
}, [postId, postType]);
|
|
109
107
|
|
|
110
|
-
const queryComment =
|
|
111
|
-
const formattedCommentList =
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
referenceId: item.referenceId,
|
|
138
|
-
mentionPosition: item?.metadata?.mentioned ?? [],
|
|
139
|
-
};
|
|
140
|
-
})
|
|
141
|
-
);
|
|
108
|
+
const queryComment = (comments: Amity.InternalComment[]) => {
|
|
109
|
+
const formattedCommentList = comments.map((item: Amity.Comment) => {
|
|
110
|
+
const formattedUserObject = {
|
|
111
|
+
userId: item.creator?.userId,
|
|
112
|
+
displayName: item.creator?.displayName,
|
|
113
|
+
avatarFileId: item.creator?.avatarFileId,
|
|
114
|
+
avatarCustomUrl: item.creator?.avatarCustomUrl,
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
return {
|
|
118
|
+
targetType: item.targetType,
|
|
119
|
+
targetId: item.targetId,
|
|
120
|
+
commentId: item.commentId,
|
|
121
|
+
data: item.data as Record<string, any>,
|
|
122
|
+
dataType: item?.dataType || 'text',
|
|
123
|
+
myReactions: item.myReactions as string[],
|
|
124
|
+
reactions: item.reactions as Record<string, number>,
|
|
125
|
+
user: formattedUserObject as UserInterface,
|
|
126
|
+
updatedAt: item.updatedAt,
|
|
127
|
+
editedAt: item.editedAt,
|
|
128
|
+
createdAt: item.createdAt,
|
|
129
|
+
childrenComment: item.children,
|
|
130
|
+
childrenNumber: item.childrenNumber,
|
|
131
|
+
referenceId: item.referenceId,
|
|
132
|
+
mentionPosition: item?.metadata?.mentioned ?? [],
|
|
133
|
+
};
|
|
134
|
+
});
|
|
142
135
|
setCommentList([...formattedCommentList]);
|
|
143
136
|
};
|
|
144
137
|
|
package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/DetailStyle.tsx
CHANGED
|
@@ -121,8 +121,8 @@ const DetailStyle: FC<AmityPostEngagementActionsSubComponentType> = ({
|
|
|
121
121
|
</Text>
|
|
122
122
|
)}
|
|
123
123
|
<Text style={styles.commentCountText}>
|
|
124
|
-
{formatNumber(postData?.
|
|
125
|
-
{renderCommentText(postData?.
|
|
124
|
+
{formatNumber(postData?.localCommentCount)}{' '}
|
|
125
|
+
{renderCommentText(postData?.localCommentCount)}
|
|
126
126
|
</Text>
|
|
127
127
|
</View>
|
|
128
128
|
<View style={[styles.actionSection, styles.detailActionSection]}>
|
package/src/v4/PublicApi/Components/AmityPostEngagementActionsComponent/Components/FeedStyle.tsx
CHANGED
|
@@ -129,7 +129,7 @@ const FeedStyle: FC<AmityPostEngagementActionsSubComponentType> = ({
|
|
|
129
129
|
height={20}
|
|
130
130
|
resizeMode="contain"
|
|
131
131
|
/>
|
|
132
|
-
<Text style={styles.btnText}>{postData?.
|
|
132
|
+
<Text style={styles.btnText}>{postData?.localCommentCount}</Text>
|
|
133
133
|
</TouchableOpacity>
|
|
134
134
|
</View>
|
|
135
135
|
<View style={styles.commentBtn} />
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Image, View } from 'react-native';
|
|
3
|
-
import { ComponentID,
|
|
4
|
-
import { useFile } from '../../../../hook';
|
|
3
|
+
import { ComponentID, PageID } from '../../../../enum';
|
|
5
4
|
import { useStyles } from './styles';
|
|
6
5
|
|
|
7
6
|
import CommunityJoinedButton from '../../../../elements/CommunityJoinedButtonElement/CommunityJoinedButtonElement';
|
|
@@ -10,9 +9,10 @@ import { SvgXml } from 'react-native-svg';
|
|
|
10
9
|
import { community as communityIcon } from '../../../../assets/icons';
|
|
11
10
|
import CommunityPrivateBadge from '../../../../elements/CommunityPrivateBadge/CommunityPrivateBadge';
|
|
12
11
|
import CommunityOfficialBadge from '../../../../elements/CommunityOfficialBadge/CommunityOfficialBadge';
|
|
13
|
-
import CommunityCategory from '../../../../elements/CommunityCatetory/CommunityCategory';
|
|
14
12
|
import CommunityMemeberCount from '../../../../elements/CommunityMemeberCount/CommunityMemeberCount';
|
|
15
13
|
import CommunityDisplayname from '../../../../elements/CommunityDisplayname/CommunityDisplayname';
|
|
14
|
+
import { getFileUrlWithSize } from '../../../../utils';
|
|
15
|
+
import { CommunityCategories } from '../../../../../v4/features/feed/components';
|
|
16
16
|
|
|
17
17
|
type RecommendedCommunityItemProps = {
|
|
18
18
|
pageId?: PageID;
|
|
@@ -22,31 +22,15 @@ type RecommendedCommunityItemProps = {
|
|
|
22
22
|
export const RecommendedCommunityItem: React.FC<
|
|
23
23
|
RecommendedCommunityItemProps
|
|
24
24
|
> = ({ community, pageId = PageID.WildCardPage }) => {
|
|
25
|
-
const { getImage } = useFile();
|
|
26
25
|
const componentId = ComponentID.recommended_communities;
|
|
27
26
|
const styles = useStyles();
|
|
28
|
-
const [imageUrl, setImageUrl] = React.useState<string | undefined>(undefined);
|
|
29
|
-
|
|
30
|
-
useEffect(() => {
|
|
31
|
-
const fetchImage = async () => {
|
|
32
|
-
if (!community.avatarFileId) return;
|
|
33
|
-
|
|
34
|
-
const url = await getImage({
|
|
35
|
-
fileId: community.avatarFileId,
|
|
36
|
-
imageSize: ImageSizeState.large,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
setImageUrl(url);
|
|
40
|
-
};
|
|
41
|
-
fetchImage();
|
|
42
|
-
}, [community.avatarFileId, getImage]);
|
|
43
27
|
|
|
44
28
|
return (
|
|
45
29
|
<View style={styles.container}>
|
|
46
|
-
{community.
|
|
30
|
+
{community.avatar?.fileUrl ? (
|
|
47
31
|
<Image
|
|
48
32
|
style={styles.image}
|
|
49
|
-
source={{ uri:
|
|
33
|
+
source={{ uri: getFileUrlWithSize(community.avatar?.fileUrl) }}
|
|
50
34
|
resizeMode="cover"
|
|
51
35
|
/>
|
|
52
36
|
) : (
|
|
@@ -72,8 +56,8 @@ export const RecommendedCommunityItem: React.FC<
|
|
|
72
56
|
</View>
|
|
73
57
|
<View style={styles.detailBottomWrap}>
|
|
74
58
|
<View style={styles.detailBottomWrapLeft}>
|
|
75
|
-
<
|
|
76
|
-
|
|
59
|
+
<CommunityCategories
|
|
60
|
+
categories={community.categories}
|
|
77
61
|
pageId={pageId}
|
|
78
62
|
componentId={componentId}
|
|
79
63
|
/>
|
|
@@ -41,6 +41,7 @@ import { RouteProp, useNavigation, useRoute } from '@react-navigation/native';
|
|
|
41
41
|
import { useTheme } from 'react-native-paper';
|
|
42
42
|
import { MyMD3Theme } from '../../../../providers/amity-ui-kit-provider';
|
|
43
43
|
import AmityCommunityPinnedPostComponent from '../../../../v4/PublicApi/Components/AmityCommunityPinnedPostComponent/AmityCommunityPinnedPostComponent';
|
|
44
|
+
import { usePostPermission } from '../../../../v4/hook/usePostPermission';
|
|
44
45
|
|
|
45
46
|
type ICommunityProfilePage = {
|
|
46
47
|
defaultCommunityId?: string;
|
|
@@ -68,6 +69,9 @@ const AmityCommunityProfilePage: React.FC<ICommunityProfilePage> = ({
|
|
|
68
69
|
|
|
69
70
|
const animatedOpacity = useRef(new Animated.Value(0)).current;
|
|
70
71
|
const animatedTranslateY = useRef(new Animated.Value(15)).current;
|
|
72
|
+
const stickyHeaderAnimation = useRef<Animated.CompositeAnimation | null>(
|
|
73
|
+
null
|
|
74
|
+
);
|
|
71
75
|
|
|
72
76
|
const scrollY = useRef(new Animated.Value(0)).current;
|
|
73
77
|
const feedRef = useRef<AmityCommunityFeedRef>(null);
|
|
@@ -93,7 +97,7 @@ const AmityCommunityProfilePage: React.FC<ICommunityProfilePage> = ({
|
|
|
93
97
|
animatedTranslateY.setValue(15);
|
|
94
98
|
|
|
95
99
|
// Run entrance animation
|
|
96
|
-
Animated.parallel([
|
|
100
|
+
stickyHeaderAnimation.current = Animated.parallel([
|
|
97
101
|
Animated.timing(animatedOpacity, {
|
|
98
102
|
toValue: 1,
|
|
99
103
|
duration: 200,
|
|
@@ -105,8 +109,12 @@ const AmityCommunityProfilePage: React.FC<ICommunityProfilePage> = ({
|
|
|
105
109
|
easing: Easing.out(Easing.ease),
|
|
106
110
|
useNativeDriver: true,
|
|
107
111
|
}),
|
|
108
|
-
])
|
|
112
|
+
]);
|
|
113
|
+
stickyHeaderAnimation.current.start();
|
|
109
114
|
}
|
|
115
|
+
return () => {
|
|
116
|
+
stickyHeaderAnimation.current?.stop();
|
|
117
|
+
};
|
|
110
118
|
}, [isScrolledPastHeader, animatedOpacity, animatedTranslateY]);
|
|
111
119
|
|
|
112
120
|
const handleLoadMore = useCallback(() => {
|
|
@@ -273,6 +281,8 @@ function CommunityProfileActions({ pageId, communityId, styles }) {
|
|
|
273
281
|
|
|
274
282
|
const hasStoryPermission = useStoryPermission(communityId);
|
|
275
283
|
|
|
284
|
+
const hasPostPermission = usePostPermission({ community });
|
|
285
|
+
|
|
276
286
|
const openBottomSheet = () => setIsBottomSheetVisible(true);
|
|
277
287
|
|
|
278
288
|
const closeBottomSheet = () => setIsBottomSheetVisible(false);
|
|
@@ -350,7 +360,7 @@ function CommunityProfileActions({ pageId, communityId, styles }) {
|
|
|
350
360
|
});
|
|
351
361
|
};
|
|
352
362
|
|
|
353
|
-
if (!
|
|
363
|
+
if (!hasPostPermission) return null;
|
|
354
364
|
|
|
355
365
|
return (
|
|
356
366
|
<Fragment>
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
} from 'react-native';
|
|
9
9
|
import React, { FC, useCallback, useState, useEffect, memo } from 'react';
|
|
10
10
|
import Video from 'react-native-video';
|
|
11
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
11
12
|
import {
|
|
12
13
|
leftLongArrow,
|
|
13
14
|
rightLongArrow,
|
|
@@ -200,6 +201,10 @@ const AmityDraftStoryPage: FC<IAmityDraftStoryPage> = ({
|
|
|
200
201
|
style={[styles.image, isFullScreen && styles.aspect_ratio]}
|
|
201
202
|
/>
|
|
202
203
|
)}
|
|
204
|
+
<LinearGradient
|
|
205
|
+
style={styles.gradientOverlay}
|
|
206
|
+
colors={['transparent', 'rgba(0,0,0,0.8)']}
|
|
207
|
+
/>
|
|
203
208
|
</View>
|
|
204
209
|
{hyperlink?.length > 0 && (
|
|
205
210
|
<TouchableOpacity
|
|
@@ -31,10 +31,8 @@ export const useStyles = () => {
|
|
|
31
31
|
borderRadius: 50,
|
|
32
32
|
},
|
|
33
33
|
imageContainer: {
|
|
34
|
-
|
|
35
|
-
height: width * (16 / 9),
|
|
34
|
+
flex: 1,
|
|
36
35
|
width: width,
|
|
37
|
-
borderRadius: 20,
|
|
38
36
|
backgroundColor: theme.colors.baseShade4,
|
|
39
37
|
justifyContent: 'center',
|
|
40
38
|
overflow: 'hidden',
|
|
@@ -42,15 +40,24 @@ export const useStyles = () => {
|
|
|
42
40
|
aspect_ratio: {
|
|
43
41
|
width: '100%',
|
|
44
42
|
height: '100%',
|
|
43
|
+
resizeMode: 'cover',
|
|
45
44
|
},
|
|
46
45
|
image: {
|
|
47
46
|
width: '100%',
|
|
48
|
-
height: '
|
|
47
|
+
height: '100%',
|
|
48
|
+
resizeMode: 'contain',
|
|
49
|
+
},
|
|
50
|
+
gradientOverlay: {
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
bottom: 0,
|
|
53
|
+
left: 0,
|
|
54
|
+
right: 0,
|
|
55
|
+
height: 160,
|
|
49
56
|
},
|
|
50
57
|
shareStoryBtn: {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
58
|
+
position: 'absolute',
|
|
59
|
+
bottom: 24,
|
|
60
|
+
right: 16,
|
|
54
61
|
flexDirection: 'row',
|
|
55
62
|
justifyContent: 'center',
|
|
56
63
|
alignItems: 'center',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useCallback, useState } from 'react';
|
|
3
|
-
import {
|
|
2
|
+
import { useCallback, useRef, useState } from 'react';
|
|
3
|
+
import { SafeAreaView, StyleSheet, View } from 'react-native';
|
|
4
4
|
import CustomSocialTab from '../../../../v4/component/CustomSocialTab/CustomSocialTab';
|
|
5
5
|
import { useUiKitConfig } from '../../../../v4/hook';
|
|
6
6
|
import {
|
|
@@ -12,15 +12,11 @@ import {
|
|
|
12
12
|
import { useTheme } from 'react-native-paper';
|
|
13
13
|
import { useBehaviour } from '../../../../v4/providers/BehaviourProvider';
|
|
14
14
|
import AmitySocialHomeTopNavigationComponent from '../../../../v4/PublicApi/Components/AmitySocialHomeTopNavigationComponent/AmitySocialHomeTopNavigationComponent';
|
|
15
|
-
import AmityEmptyNewsFeedComponent from '../../../../v4/PublicApi/Components/AmityEmptyNewsFeedComponent/AmityEmptyNewsFeedComponent';
|
|
16
15
|
import AmityMyCommunitiesComponent from '../../../../v4/PublicApi/Components/AmityMyCommunitiesComponent/AmityMyCommunitiesComponent';
|
|
17
16
|
import AmityNewsFeedComponent from '../../../../v4/PublicApi/Components/AmityNewsFeedComponent/AmityNewsFeedComponent';
|
|
18
17
|
import AmityExploreComponent from '../../../../v4/PublicApi/Components/AmityExploreComponent/AmityExploreComponent';
|
|
19
|
-
import NewsFeedLoadingComponent from '../../../../v4/component/NewsFeedLoadingComponent/NewsFeedLoadingComponent';
|
|
20
|
-
import { useCustomRankingGlobalFeed } from '../../../../v4/hook/useCustomRankingGlobalFeed';
|
|
21
18
|
import { MyMD3Theme } from '../../../../providers/amity-ui-kit-provider';
|
|
22
19
|
|
|
23
|
-
LogBox.ignoreAllLogs(true);
|
|
24
20
|
const AmitySocialHomePage = () => {
|
|
25
21
|
const theme = useTheme() as MyMD3Theme;
|
|
26
22
|
const styles = StyleSheet.create({
|
|
@@ -31,8 +27,6 @@ const AmitySocialHomePage = () => {
|
|
|
31
27
|
});
|
|
32
28
|
|
|
33
29
|
const { AmitySocialHomePageBehaviour } = useBehaviour();
|
|
34
|
-
const { itemWithAds: globalFeedPosts, loading } =
|
|
35
|
-
useCustomRankingGlobalFeed();
|
|
36
30
|
|
|
37
31
|
const [newsFeedTab] = useUiKitConfig({
|
|
38
32
|
page: PageID.social_home_page,
|
|
@@ -56,11 +50,13 @@ const AmitySocialHomePage = () => {
|
|
|
56
50
|
}) as string[];
|
|
57
51
|
|
|
58
52
|
const [activeTab, setActiveTab] = useState<string>(newsFeedTab);
|
|
53
|
+
const visitedTabs = useRef<Set<string>>(new Set([newsFeedTab]));
|
|
59
54
|
|
|
60
55
|
const onTabChange = useCallback(
|
|
61
56
|
(tabName: string) => {
|
|
62
57
|
if (AmitySocialHomePageBehaviour.onChooseTab)
|
|
63
58
|
return AmitySocialHomePageBehaviour.onChooseTab(tabName);
|
|
59
|
+
visitedTabs.current.add(tabName);
|
|
64
60
|
setActiveTab(tabName);
|
|
65
61
|
},
|
|
66
62
|
[AmitySocialHomePageBehaviour]
|
|
@@ -70,30 +66,10 @@ const AmitySocialHomePage = () => {
|
|
|
70
66
|
onTabChange(exploreTab);
|
|
71
67
|
}, [exploreTab, onTabChange]);
|
|
72
68
|
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (activeTab === newsFeedTab) {
|
|
79
|
-
if (!loading && globalFeedPosts?.length === 0)
|
|
80
|
-
return (
|
|
81
|
-
<AmityEmptyNewsFeedComponent
|
|
82
|
-
pageId={PageID.social_home_page}
|
|
83
|
-
onPressExploreCommunity={onPressExploreCommunity}
|
|
84
|
-
/>
|
|
85
|
-
);
|
|
86
|
-
return <AmityNewsFeedComponent pageId={PageID.social_home_page} />;
|
|
87
|
-
}
|
|
88
|
-
if (activeTab === myCommunitiesTab)
|
|
89
|
-
return (
|
|
90
|
-
<AmityMyCommunitiesComponent
|
|
91
|
-
pageId={PageID.social_home_page}
|
|
92
|
-
componentId={ComponentID.my_communities}
|
|
93
|
-
/>
|
|
94
|
-
);
|
|
95
|
-
return null;
|
|
96
|
-
};
|
|
69
|
+
const tabStyle = (tab: string) => ({
|
|
70
|
+
flex: 1,
|
|
71
|
+
display: activeTab === tab ? ('flex' as const) : ('none' as const),
|
|
72
|
+
});
|
|
97
73
|
|
|
98
74
|
return (
|
|
99
75
|
<SafeAreaView
|
|
@@ -108,7 +84,25 @@ const AmitySocialHomePage = () => {
|
|
|
108
84
|
onTabChange={onTabChange}
|
|
109
85
|
activeTab={activeTab}
|
|
110
86
|
/>
|
|
111
|
-
{
|
|
87
|
+
<View style={tabStyle(newsFeedTab)}>
|
|
88
|
+
<AmityNewsFeedComponent
|
|
89
|
+
pageId={PageID.social_home_page}
|
|
90
|
+
onPressExploreCommunity={onPressExploreCommunity}
|
|
91
|
+
/>
|
|
92
|
+
</View>
|
|
93
|
+
{visitedTabs.current.has(exploreTab) && (
|
|
94
|
+
<View style={tabStyle(exploreTab)}>
|
|
95
|
+
<AmityExploreComponent pageId={PageID.social_home_page} />
|
|
96
|
+
</View>
|
|
97
|
+
)}
|
|
98
|
+
{visitedTabs.current.has(myCommunitiesTab) && (
|
|
99
|
+
<View style={tabStyle(myCommunitiesTab)}>
|
|
100
|
+
<AmityMyCommunitiesComponent
|
|
101
|
+
pageId={PageID.social_home_page}
|
|
102
|
+
componentId={ComponentID.my_communities}
|
|
103
|
+
/>
|
|
104
|
+
</View>
|
|
105
|
+
)}
|
|
112
106
|
</SafeAreaView>
|
|
113
107
|
);
|
|
114
108
|
};
|
|
@@ -595,6 +595,7 @@ const AmityViewStoryItem: FC<IAmityViewStoryItem> = ({
|
|
|
595
595
|
<CommentList
|
|
596
596
|
postId={currentStory?.storyId}
|
|
597
597
|
postType="story"
|
|
598
|
+
disabledComment={!communityData?.allowCommentInStory}
|
|
598
599
|
disabledInteraction={!communityData?.isJoined}
|
|
599
600
|
onNavigate={onClose}
|
|
600
601
|
/>
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export const icon =
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export const icon =
|
|
2
|
+
() => `<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" fill="none" viewBox="0 0 20 20">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M15.5 8c.813 0 1.5.688 1.5 1.5v7a1.5 1.5 0 01-1.5 1.5h-11A1.48 1.48 0 013 16.5v-7A1.5 1.5 0 014.5 8h1V6.5C5.5 4.031 7.5 2 10 2c2.5.031 4.5 2.063 4.5 4.563V8h1zM7 6.5V8h6V6.5c0-1.625-1.375-3-3-3-1.656 0-3 1.375-3 3zm8.5 10v-7h-11v7h11z"
|
|
6
|
+
></path>
|
|
7
|
+
</svg>
|
|
7
8
|
`;
|
|
8
9
|
|
|
9
10
|
export default icon;
|
|
@@ -54,12 +54,15 @@ function Avatar({ uri, imageProps, iconProps, userAvatarProps }: AvatarProps) {
|
|
|
54
54
|
{...imageProps}
|
|
55
55
|
onError={() => setImageError(true)}
|
|
56
56
|
/>
|
|
57
|
+
{userAvatarProps?.roles && isModerator(userAvatarProps?.roles) && (
|
|
58
|
+
<ModeratorBadge style={styles.moderatorBadge} />
|
|
59
|
+
)}
|
|
57
60
|
</TouchableOpacity>
|
|
58
61
|
) : iconProps ? (
|
|
59
62
|
<SvgXml {...iconProps} />
|
|
60
63
|
) : (
|
|
61
64
|
<TouchableOpacity
|
|
62
|
-
style={[styles.defaultUserAvatar, userAvatarProps
|
|
65
|
+
style={[styles.defaultUserAvatar, userAvatarProps?.style]}
|
|
63
66
|
activeOpacity={0.7}
|
|
64
67
|
onPress={() => {
|
|
65
68
|
if (userAvatarProps?.shouldRedirectToUserProfile) {
|
|
@@ -72,7 +75,7 @@ function Avatar({ uri, imageProps, iconProps, userAvatarProps }: AvatarProps) {
|
|
|
72
75
|
<Typography.Body style={styles.firstChar}>
|
|
73
76
|
{userAvatarProps.userName?.trim()?.charAt(0).toUpperCase()}
|
|
74
77
|
</Typography.Body>
|
|
75
|
-
{userAvatarProps
|
|
78
|
+
{userAvatarProps?.roles && isModerator(userAvatarProps.roles) && (
|
|
76
79
|
<ModeratorBadge style={styles.moderatorBadge} />
|
|
77
80
|
)}
|
|
78
81
|
</TouchableOpacity>
|