@amityco/react-native-social-uikit 4.0.0-8373e87.0 → 4.0.0-93c391d.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -14
- package/lib/commonjs/components/Toast/Toast.js +2 -1
- package/lib/commonjs/components/Toast/Toast.js.map +1 -1
- package/lib/commonjs/providers/file-provider.js +38 -19
- package/lib/commonjs/providers/file-provider.js.map +1 -1
- package/lib/commonjs/screens/CategorytList/index.js.map +1 -1
- package/lib/commonjs/snippet/AmityCommunitySearchResultComponent.js +3 -3
- package/lib/commonjs/snippet/AmityCommunitySearchResultComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityCreatePostMenuComponent.js +3 -3
- package/lib/commonjs/snippet/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityDetailedMediaAttachmentComponent.js +4 -4
- package/lib/commonjs/snippet/AmityDetailedMediaAttachmentComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityEmptyNewsFeedComponent.js +3 -3
- package/lib/commonjs/snippet/AmityEmptyNewsFeedComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityGlobalFeedComponent.js +3 -3
- package/lib/commonjs/snippet/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityMediaAttachmentComponent.js +4 -4
- package/lib/commonjs/snippet/AmityMediaAttachmentComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityMyCommunitiesComponent.js +3 -3
- package/lib/commonjs/snippet/AmityMyCommunitiesComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityMyCommunitiesSearchPage.js +3 -3
- package/lib/commonjs/snippet/AmityMyCommunitiesSearchPage.js.map +1 -1
- package/lib/commonjs/snippet/AmityNewsFeedComponent.js +3 -3
- package/lib/commonjs/snippet/AmityNewsFeedComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityPostComposerPage.js +4 -4
- package/lib/commonjs/snippet/AmityPostComposerPage.js.map +1 -1
- package/lib/commonjs/snippet/AmityPostContentComponent.js +3 -3
- package/lib/commonjs/snippet/AmityPostContentComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityPostDetailPage.js +3 -3
- package/lib/commonjs/snippet/AmityPostDetailPage.js.map +1 -1
- package/lib/commonjs/snippet/AmityPostTargetSelectionPage.js +4 -4
- package/lib/commonjs/snippet/AmityPostTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/snippet/AmityReactionListComponent.js +3 -3
- package/lib/commonjs/snippet/AmityReactionListComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmitySocialGlobalSearchPage.js +3 -3
- package/lib/commonjs/snippet/AmitySocialGlobalSearchPage.js.map +1 -1
- package/lib/commonjs/snippet/AmitySocialHomePage.js +3 -3
- package/lib/commonjs/snippet/AmitySocialHomePage.js.map +1 -1
- package/lib/commonjs/snippet/AmitySocialHomeTopNavigationComponent.js +3 -3
- package/lib/commonjs/snippet/AmitySocialHomeTopNavigationComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityStoryTargetSelectionPage.js +3 -3
- package/lib/commonjs/snippet/AmityStoryTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/snippet/AmityTopSearchBarComponent.js +3 -3
- package/lib/commonjs/snippet/AmityTopSearchBarComponent.js.map +1 -1
- package/lib/commonjs/snippet/AmityUserSearchResultComponent.js +3 -3
- package/lib/commonjs/snippet/AmityUserSearchResultComponent.js.map +1 -1
- package/lib/commonjs/svg/svg-xml-list.js +6 -1
- package/lib/commonjs/svg/svg-xml-list.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +4 -3
- package/lib/commonjs/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +0 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js +7 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js +7 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +46 -3
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js +7 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js +7 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
- 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 +9 -4
- package/lib/commonjs/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/commonjs/v4/component/CommunityStories/styles.js +7 -2
- package/lib/commonjs/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/index.js +21 -22
- package/lib/commonjs/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingImage/styles.js +19 -2
- package/lib/commonjs/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/commonjs/v4/component/LoadingVideo/index.js +11 -3
- package/lib/commonjs/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js +11 -4
- package/lib/commonjs/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/styles.js +5 -0
- package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/PreviewLink/LinkPreview.js +3 -3
- package/lib/commonjs/v4/component/PreviewLink/LinkPreview.js.map +1 -1
- package/lib/commonjs/v4/component/PreviewLink/utils.js +9 -73
- package/lib/commonjs/v4/component/PreviewLink/utils.js.map +1 -1
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js +10 -4
- package/lib/commonjs/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
- package/lib/commonjs/v4/elements/ActionButton/ActionButton.js.map +1 -1
- package/lib/commonjs/v4/elements/ImageViewer/ImageViewer.js.map +1 -1
- package/lib/commonjs/v4/elements/VideoViewer/VideoViewer.js.map +1 -1
- package/lib/commonjs/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
- package/lib/commonjs/v4/features/community/shared/components/Privacy/index.js.map +1 -1
- package/lib/commonjs/v4/hook/useImagePicker.js.map +1 -1
- package/lib/commonjs/v4/providers/BehaviourProvider.js +2 -1
- package/lib/commonjs/v4/providers/BehaviourProvider.js.map +1 -1
- package/lib/module/components/Toast/Toast.js +2 -1
- package/lib/module/components/Toast/Toast.js.map +1 -1
- package/lib/module/providers/file-provider.js +38 -19
- package/lib/module/providers/file-provider.js.map +1 -1
- package/lib/module/screens/CategorytList/index.js.map +1 -1
- package/lib/module/snippet/AmityCommunitySearchResultComponent.js +1 -1
- package/lib/module/snippet/AmityCommunitySearchResultComponent.js.map +1 -1
- package/lib/module/snippet/AmityCreatePostMenuComponent.js +1 -1
- package/lib/module/snippet/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/module/snippet/AmityDetailedMediaAttachmentComponent.js +1 -1
- package/lib/module/snippet/AmityDetailedMediaAttachmentComponent.js.map +1 -1
- package/lib/module/snippet/AmityEmptyNewsFeedComponent.js +1 -1
- package/lib/module/snippet/AmityEmptyNewsFeedComponent.js.map +1 -1
- package/lib/module/snippet/AmityGlobalFeedComponent.js +1 -1
- package/lib/module/snippet/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/module/snippet/AmityMediaAttachmentComponent.js +1 -1
- package/lib/module/snippet/AmityMediaAttachmentComponent.js.map +1 -1
- package/lib/module/snippet/AmityMyCommunitiesComponent.js +1 -1
- package/lib/module/snippet/AmityMyCommunitiesComponent.js.map +1 -1
- package/lib/module/snippet/AmityMyCommunitiesSearchPage.js +1 -1
- package/lib/module/snippet/AmityMyCommunitiesSearchPage.js.map +1 -1
- package/lib/module/snippet/AmityNewsFeedComponent.js +1 -1
- package/lib/module/snippet/AmityNewsFeedComponent.js.map +1 -1
- package/lib/module/snippet/AmityPostComposerPage.js +1 -1
- package/lib/module/snippet/AmityPostComposerPage.js.map +1 -1
- package/lib/module/snippet/AmityPostContentComponent.js +1 -1
- package/lib/module/snippet/AmityPostContentComponent.js.map +1 -1
- package/lib/module/snippet/AmityPostDetailPage.js +1 -1
- package/lib/module/snippet/AmityPostDetailPage.js.map +1 -1
- package/lib/module/snippet/AmityPostTargetSelectionPage.js +1 -1
- package/lib/module/snippet/AmityPostTargetSelectionPage.js.map +1 -1
- package/lib/module/snippet/AmityReactionListComponent.js +1 -1
- package/lib/module/snippet/AmityReactionListComponent.js.map +1 -1
- package/lib/module/snippet/AmitySocialGlobalSearchPage.js +1 -1
- package/lib/module/snippet/AmitySocialGlobalSearchPage.js.map +1 -1
- package/lib/module/snippet/AmitySocialHomePage.js +1 -1
- package/lib/module/snippet/AmitySocialHomePage.js.map +1 -1
- package/lib/module/snippet/AmitySocialHomeTopNavigationComponent.js +1 -1
- package/lib/module/snippet/AmitySocialHomeTopNavigationComponent.js.map +1 -1
- package/lib/module/snippet/AmityStoryTargetSelectionPage.js +1 -1
- package/lib/module/snippet/AmityStoryTargetSelectionPage.js.map +1 -1
- package/lib/module/snippet/AmityTopSearchBarComponent.js +1 -1
- package/lib/module/snippet/AmityTopSearchBarComponent.js.map +1 -1
- package/lib/module/snippet/AmityUserSearchResultComponent.js +1 -1
- package/lib/module/snippet/AmityUserSearchResultComponent.js.map +1 -1
- package/lib/module/svg/svg-xml-list.js +4 -0
- package/lib/module/svg/svg-xml-list.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js +5 -4
- package/lib/module/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js +0 -1
- package/lib/module/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js +7 -1
- package/lib/module/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js +7 -1
- package/lib/module/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js +46 -3
- package/lib/module/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js +7 -1
- package/lib/module/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js +7 -1
- package/lib/module/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js +54 -21
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.js.map +1 -1
- package/lib/module/v4/PublicApi/Pages/AmityViewStoryPage/styles.js +24 -2
- 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 +10 -5
- package/lib/module/v4/component/CommunityStories/index.js.map +1 -1
- package/lib/module/v4/component/CommunityStories/styles.js +7 -2
- package/lib/module/v4/component/CommunityStories/styles.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/index.js +21 -21
- package/lib/module/v4/component/LoadingImage/index.js.map +1 -1
- package/lib/module/v4/component/LoadingImage/styles.js +19 -2
- package/lib/module/v4/component/LoadingImage/styles.js.map +1 -1
- package/lib/module/v4/component/LoadingVideo/index.js +11 -3
- package/lib/module/v4/component/LoadingVideo/index.js.map +1 -1
- package/lib/module/v4/component/MyStories/StoryCircleItem.js +13 -6
- package/lib/module/v4/component/MyStories/StoryCircleItem.js.map +1 -1
- package/lib/module/v4/component/MyStories/styles.js +5 -0
- package/lib/module/v4/component/MyStories/styles.js.map +1 -1
- package/lib/module/v4/component/PreviewLink/LinkPreview.js +3 -3
- package/lib/module/v4/component/PreviewLink/LinkPreview.js.map +1 -1
- package/lib/module/v4/component/PreviewLink/utils.js +9 -73
- package/lib/module/v4/component/PreviewLink/utils.js.map +1 -1
- package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js +10 -4
- package/lib/module/v4/component/TargetSelectionPage/TargetSelectionPage.js.map +1 -1
- package/lib/module/v4/elements/ActionButton/ActionButton.js.map +1 -1
- package/lib/module/v4/elements/ImageViewer/ImageViewer.js.map +1 -1
- package/lib/module/v4/elements/VideoViewer/VideoViewer.js.map +1 -1
- package/lib/module/v4/features/community/Membership/components/MemberItem/MemberItem.js.map +1 -1
- package/lib/module/v4/features/community/shared/components/Privacy/index.js.map +1 -1
- package/lib/module/v4/hook/useImagePicker.js.map +1 -1
- package/lib/module/v4/providers/BehaviourProvider.js +2 -1
- package/lib/module/v4/providers/BehaviourProvider.js.map +1 -1
- package/lib/typescript/src/components/Toast/Toast.d.ts.map +1 -1
- package/lib/typescript/src/providers/file-provider.d.ts.map +1 -1
- package/lib/typescript/src/screens/CategorytList/index.d.ts.map +1 -1
- package/lib/typescript/src/svg/svg-xml-list.d.ts +1 -0
- package/lib/typescript/src/svg/svg-xml-list.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts +1 -0
- package/lib/typescript/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.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/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.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/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.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 +22 -0
- 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 +5 -0
- package/lib/typescript/src/v4/component/CommunityStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts +2 -1
- package/lib/typescript/src/v4/component/LoadingImage/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts +21 -0
- package/lib/typescript/src/v4/component/LoadingImage/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/LoadingVideo/index.d.ts +2 -1
- 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 +5 -0
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/PreviewLink/utils.d.ts +6 -1
- package/lib/typescript/src/v4/component/PreviewLink/utils.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/TargetSelectionPage/TargetSelectionPage.d.ts +2 -1
- package/lib/typescript/src/v4/component/TargetSelectionPage/TargetSelectionPage.d.ts.map +1 -1
- package/lib/typescript/src/v4/elements/ActionButton/ActionButton.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/shared/components/Privacy/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/useImagePicker.d.ts.map +1 -1
- package/lib/typescript/src/v4/providers/BehaviourProvider.d.ts.map +1 -1
- package/lib/typescript/src/v4/types/behaviour.interface.d.ts +7 -0
- package/lib/typescript/src/v4/types/behaviour.interface.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/Toast/Toast.tsx +1 -0
- package/src/providers/file-provider.tsx +42 -20
- package/src/screens/CategorytList/index.tsx +7 -14
- package/src/snippet/AmityCommunitySearchResultComponent.tsx +1 -1
- package/src/snippet/AmityCreatePostMenuComponent.tsx +1 -1
- package/src/snippet/AmityDetailedMediaAttachmentComponent.tsx +1 -1
- package/src/snippet/AmityEmptyNewsFeedComponent.tsx +1 -1
- package/src/snippet/AmityGlobalFeedComponent.tsx +1 -1
- package/src/snippet/AmityMediaAttachmentComponent.tsx +1 -1
- package/src/snippet/AmityMyCommunitiesComponent.tsx +1 -1
- package/src/snippet/AmityMyCommunitiesSearchPage.tsx +1 -1
- package/src/snippet/AmityNewsFeedComponent.tsx +1 -1
- package/src/snippet/AmityPostComposerPage.tsx +1 -1
- package/src/snippet/AmityPostContentComponent.tsx +1 -1
- package/src/snippet/AmityPostDetailPage.tsx +1 -1
- package/src/snippet/AmityPostTargetSelectionPage.tsx +1 -1
- package/src/snippet/AmityReactionListComponent.tsx +1 -1
- package/src/snippet/AmitySocialGlobalSearchPage.tsx +1 -1
- package/src/snippet/AmitySocialHomePage.tsx +1 -1
- package/src/snippet/AmitySocialHomeTopNavigationComponent.tsx +1 -1
- package/src/snippet/AmityStoryTargetSelectionPage.tsx +1 -1
- package/src/snippet/AmityTopSearchBarComponent.tsx +1 -1
- package/src/snippet/AmityUserSearchResultComponent.tsx +1 -1
- package/src/svg/svg-xml-list.ts +6 -0
- package/src/v4/PublicApi/Components/AmityCommunityFeedComponent/AmityCommunityFeedComponent.tsx +2 -2
- package/src/v4/PublicApi/Components/AmityCommunityProfileTabComponent/AmityCommunityProfileTabComponent.tsx +97 -97
- package/src/v4/PublicApi/Components/AmityGlobalFeedComponent/AmityGlobalFeedComponent.tsx +12 -7
- package/src/v4/PublicApi/Components/AmityPostContentComponent/AmityPostContentComponent.tsx +0 -2
- package/src/v4/PublicApi/Components/AmityReactionListComponent/AmityReactionListComponent.tsx +9 -9
- package/src/v4/PublicApi/Pages/AmityLivestreamPostTargetSelectionPage/AmityLivestreamPostTargetSelectionPage.tsx +6 -0
- package/src/v4/PublicApi/Pages/AmityPollTargetSelectionPage/AmityPollTargetSelectionPage.tsx +6 -1
- package/src/v4/PublicApi/Pages/AmityPostComposerPage/AmityPostComposerPage.tsx +53 -2
- package/src/v4/PublicApi/Pages/AmityPostTargetSelectionPage/AmityPostTargetSelectionPage.tsx +7 -0
- package/src/v4/PublicApi/Pages/AmitySocialHomePage/AmitySocialHomePage.tsx +5 -1
- package/src/v4/PublicApi/Pages/AmityStoryTargetSelectionPage/AmityStoryTargetSelectionPage.tsx +7 -0
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/Components/AmityViewStoryItem.tsx +122 -57
- package/src/v4/PublicApi/Pages/AmityViewStoryPage/styles.ts +23 -1
- package/src/v4/assets/icons/toast.tsx +12 -9
- package/src/v4/component/CommunityStories/index.tsx +26 -17
- package/src/v4/component/CommunityStories/styles.ts +7 -2
- package/src/v4/component/LoadingImage/index.tsx +28 -22
- package/src/v4/component/LoadingImage/styles.ts +17 -0
- package/src/v4/component/LoadingVideo/index.tsx +12 -3
- package/src/v4/component/MyStories/StoryCircleItem.tsx +19 -12
- package/src/v4/component/MyStories/styles.ts +5 -0
- package/src/v4/component/PreviewLink/LinkPreview.tsx +3 -3
- package/src/v4/component/PreviewLink/utils.ts +9 -108
- package/src/v4/component/TargetSelectionPage/TargetSelectionPage.tsx +12 -4
- package/src/v4/elements/ActionButton/ActionButton.tsx +4 -1
- package/src/v4/elements/ImageViewer/ImageViewer.tsx +1 -1
- package/src/v4/elements/VideoViewer/VideoViewer.tsx +1 -1
- package/src/v4/features/community/Membership/components/MemberItem/MemberItem.tsx +11 -2
- package/src/v4/features/community/shared/components/Privacy/index.tsx +4 -1
- package/src/v4/hook/useImagePicker.ts +4 -1
- package/src/v4/providers/BehaviourProvider.tsx +1 -0
- package/src/v4/types/behaviour.interface.ts +7 -0
|
@@ -10,8 +10,6 @@ import { closeIcon, toastIcon } from '../../../svg/svg-xml-list';
|
|
|
10
10
|
import { useStyles } from './styles';
|
|
11
11
|
import { useTheme } from 'react-native-paper';
|
|
12
12
|
import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
13
|
-
import uiSlice from '../../../redux/slices/uiSlice';
|
|
14
|
-
import { useUIKitDispatch } from '../../../redux/store';
|
|
15
13
|
|
|
16
14
|
interface OverlayImageProps {
|
|
17
15
|
source: string;
|
|
@@ -23,6 +21,7 @@ interface OverlayImageProps {
|
|
|
23
21
|
index: number,
|
|
24
22
|
originalPath: string
|
|
25
23
|
) => void;
|
|
24
|
+
onUploadError?: (hasError: boolean, source: string) => void;
|
|
26
25
|
index?: number;
|
|
27
26
|
isUploaded: boolean;
|
|
28
27
|
fileId?: string;
|
|
@@ -36,6 +35,7 @@ const LoadingImage = ({
|
|
|
36
35
|
onClose,
|
|
37
36
|
index,
|
|
38
37
|
onLoadFinish,
|
|
38
|
+
onUploadError,
|
|
39
39
|
isUploaded = false,
|
|
40
40
|
fileId = '',
|
|
41
41
|
isEditMode = false,
|
|
@@ -44,8 +44,6 @@ const LoadingImage = ({
|
|
|
44
44
|
setIsUploading,
|
|
45
45
|
}: OverlayImageProps) => {
|
|
46
46
|
const theme = useTheme() as MyMD3Theme;
|
|
47
|
-
const dispatch = useUIKitDispatch();
|
|
48
|
-
const { showToastMessage } = uiSlice.actions;
|
|
49
47
|
const [loading, setLoading] = useState(true);
|
|
50
48
|
const [progress, setProgress] = useState(0);
|
|
51
49
|
const [isProcess, setIsProcess] = useState<boolean>(false);
|
|
@@ -84,33 +82,39 @@ const LoadingImage = ({
|
|
|
84
82
|
source
|
|
85
83
|
);
|
|
86
84
|
} else {
|
|
85
|
+
setIsUploading(false);
|
|
87
86
|
handleLoadEnd();
|
|
88
|
-
|
|
87
|
+
setIsProcess(false);
|
|
89
88
|
setIsUploadError(true);
|
|
89
|
+
onUploadError?.(true, source);
|
|
90
90
|
}
|
|
91
91
|
} catch (error) {
|
|
92
92
|
handleLoadEnd();
|
|
93
|
-
|
|
93
|
+
setIsProcess(false);
|
|
94
|
+
setIsUploading(false);
|
|
94
95
|
setIsUploadError(true);
|
|
96
|
+
onUploadError?.(true, source);
|
|
95
97
|
}
|
|
96
98
|
}, [
|
|
97
|
-
dispatch,
|
|
98
99
|
handleLoadEnd,
|
|
99
100
|
index,
|
|
100
101
|
onLoadFinish,
|
|
102
|
+
onUploadError,
|
|
101
103
|
setIsUploading,
|
|
102
|
-
showToastMessage,
|
|
103
104
|
source,
|
|
104
105
|
]);
|
|
105
106
|
|
|
106
107
|
const handleDelete = async () => {
|
|
107
|
-
if (!
|
|
108
|
-
if (!isEditMode) {
|
|
108
|
+
if (fileId && !isEditMode) {
|
|
109
109
|
await deleteAmityFile(fileId);
|
|
110
110
|
}
|
|
111
111
|
onClose && onClose(source, fileId, postId);
|
|
112
112
|
};
|
|
113
113
|
useEffect(() => {
|
|
114
|
+
setIsUploadError(false);
|
|
115
|
+
onUploadError?.(false, source);
|
|
116
|
+
setProgress(0);
|
|
117
|
+
setIsProcess(false);
|
|
114
118
|
if (isUploaded) {
|
|
115
119
|
setLoading(false);
|
|
116
120
|
} else {
|
|
@@ -151,19 +155,21 @@ const LoadingImage = ({
|
|
|
151
155
|
)}
|
|
152
156
|
</View>
|
|
153
157
|
)}
|
|
154
|
-
{!loading && isUploadError
|
|
155
|
-
<
|
|
156
|
-
<
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
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>
|
|
158
|
+
{!loading && isUploadError && (
|
|
159
|
+
<View style={styles.failedOverlay}>
|
|
160
|
+
<TouchableOpacity style={styles.errorOverlay} onPress={onRetryUpload}>
|
|
161
|
+
<SvgXml xml={toastIcon()} width="28" height="28" />
|
|
162
|
+
</TouchableOpacity>
|
|
163
|
+
</View>
|
|
166
164
|
)}
|
|
165
|
+
|
|
166
|
+
<TouchableOpacity
|
|
167
|
+
style={styles.closeButton}
|
|
168
|
+
disabled={(loading || isProcess) && !isUploadError}
|
|
169
|
+
onPress={handleDelete}
|
|
170
|
+
>
|
|
171
|
+
<SvgXml xml={closeIcon(theme.colors.base)} width="12" height="12" />
|
|
172
|
+
</TouchableOpacity>
|
|
167
173
|
</View>
|
|
168
174
|
);
|
|
169
175
|
};
|
|
@@ -18,12 +18,28 @@ export const useStyles = () => {
|
|
|
18
18
|
height: '100%',
|
|
19
19
|
resizeMode: 'cover',
|
|
20
20
|
borderRadius: 5,
|
|
21
|
+
position: 'relative',
|
|
21
22
|
},
|
|
22
23
|
overlay: {
|
|
23
24
|
...StyleSheet.absoluteFillObject,
|
|
24
25
|
justifyContent: 'center',
|
|
25
26
|
alignItems: 'center',
|
|
26
27
|
},
|
|
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
|
+
},
|
|
27
43
|
progressBar: {
|
|
28
44
|
marginVertical: 10,
|
|
29
45
|
},
|
|
@@ -40,6 +56,7 @@ export const useStyles = () => {
|
|
|
40
56
|
padding: 7,
|
|
41
57
|
backgroundColor: 'rgba(0, 0, 0, 0.4)',
|
|
42
58
|
borderRadius: 72,
|
|
59
|
+
zIndex: 10,
|
|
43
60
|
},
|
|
44
61
|
});
|
|
45
62
|
};
|
|
@@ -35,6 +35,7 @@ interface OverlayImageProps {
|
|
|
35
35
|
originalPath: string,
|
|
36
36
|
thumbNail: string
|
|
37
37
|
) => void;
|
|
38
|
+
onUploadError?: (hasError: boolean, source: string) => void;
|
|
38
39
|
index?: number;
|
|
39
40
|
isUploaded: boolean;
|
|
40
41
|
fileId?: string;
|
|
@@ -50,6 +51,7 @@ const LoadingVideo = ({
|
|
|
50
51
|
onClose,
|
|
51
52
|
index,
|
|
52
53
|
onLoadFinish,
|
|
54
|
+
onUploadError,
|
|
53
55
|
isUploaded = false,
|
|
54
56
|
thumbNail,
|
|
55
57
|
onPlay,
|
|
@@ -129,23 +131,30 @@ const LoadingVideo = ({
|
|
|
129
131
|
} else {
|
|
130
132
|
handleLoadEnd();
|
|
131
133
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
134
|
+
setIsProcess(false);
|
|
132
135
|
setIsUploadError(true);
|
|
136
|
+
onUploadError?.(true, source);
|
|
133
137
|
}
|
|
134
138
|
} catch (error) {
|
|
135
139
|
handleLoadEnd();
|
|
136
140
|
dispatch(showToastMessage({ toastMessage: 'Failed to upload file' }));
|
|
141
|
+
setIsProcess(false);
|
|
137
142
|
setIsUploadError(true);
|
|
143
|
+
onUploadError?.(true, source);
|
|
138
144
|
}
|
|
139
145
|
}, [source]);
|
|
140
146
|
|
|
141
147
|
const handleDelete = async () => {
|
|
142
|
-
if (!
|
|
143
|
-
if (!isEditMode) {
|
|
148
|
+
if (fileId && !isEditMode) {
|
|
144
149
|
await deleteAmityFile(fileId);
|
|
145
150
|
}
|
|
146
151
|
onClose && onClose(source, fileId, postId);
|
|
147
152
|
};
|
|
148
153
|
useEffect(() => {
|
|
154
|
+
setIsUploadError(false);
|
|
155
|
+
onUploadError?.(false, source);
|
|
156
|
+
setProgress(0);
|
|
157
|
+
setIsProcess(false);
|
|
149
158
|
if (isUploaded) {
|
|
150
159
|
setLoading(false);
|
|
151
160
|
} else {
|
|
@@ -216,7 +225,7 @@ const LoadingVideo = ({
|
|
|
216
225
|
) : (
|
|
217
226
|
<TouchableOpacity
|
|
218
227
|
style={styles.closeButton}
|
|
219
|
-
disabled={loading || isProcess}
|
|
228
|
+
disabled={(loading || isProcess) && !isUploadError}
|
|
220
229
|
onPress={handleDelete}
|
|
221
230
|
>
|
|
222
231
|
<SvgXml xml={closeIcon(theme.colors.base)} width="12" height="12" />
|
|
@@ -2,12 +2,13 @@ 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,
|
|
5
6
|
officialIcon,
|
|
6
7
|
privateIcon,
|
|
7
8
|
storyRing,
|
|
8
9
|
} from '../../../svg/svg-xml-list';
|
|
9
10
|
import { ComponentID, ElementID, ImageSizeState, PageID } from '../../enum';
|
|
10
|
-
import { useFile } from '../../hook';
|
|
11
|
+
import { useFile, useStoryPermission } from '../../hook';
|
|
11
12
|
import useConfig from '../../hook/useConfig';
|
|
12
13
|
import { useStyles } from './styles';
|
|
13
14
|
import { CommunityRepository } from '@amityco/ts-sdk-react-native';
|
|
@@ -26,17 +27,19 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
26
27
|
const theme = useTheme() as MyMD3Theme;
|
|
27
28
|
const [avatarUrl, setAvatarUrl] = useState(null);
|
|
28
29
|
const [communityData, setCommunityData] = useState<Amity.Community>(null);
|
|
30
|
+
const hasStoryPermission = useStoryPermission(storyTarget.targetId);
|
|
29
31
|
const { getImage } = useFile();
|
|
30
32
|
const { getUiKitConfig } = useConfig();
|
|
31
33
|
const styles = useStyles();
|
|
32
|
-
const storyRingColor: string[] =
|
|
33
|
-
|
|
34
|
-
page: PageID.StoryPage,
|
|
35
|
-
component: ComponentID.StoryTab,
|
|
36
|
-
element: ElementID.StoryRing,
|
|
37
|
-
})?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
|
|
38
|
-
: storyTarget?.failedStoriesCount > 0
|
|
34
|
+
const storyRingColor: string[] =
|
|
35
|
+
hasStoryPermission && storyTarget?.failedStoriesCount > 0
|
|
39
36
|
? ['#DE1029', '#DE1029']
|
|
37
|
+
: storyTarget?.hasUnseen
|
|
38
|
+
? (getUiKitConfig({
|
|
39
|
+
page: PageID.StoryPage,
|
|
40
|
+
component: ComponentID.StoryTab,
|
|
41
|
+
element: ElementID.StoryRing,
|
|
42
|
+
})?.progress_color as string[]) ?? ['#e2e2e2', '#e2e2e2']
|
|
40
43
|
: ['#e2e2e2', '#e2e2e2'];
|
|
41
44
|
|
|
42
45
|
useEffect(() => {
|
|
@@ -68,8 +71,8 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
68
71
|
source={
|
|
69
72
|
avatarUrl
|
|
70
73
|
? {
|
|
71
|
-
|
|
72
|
-
|
|
74
|
+
uri: avatarUrl,
|
|
75
|
+
}
|
|
73
76
|
: require('../../assets/images/userAvatar.png')
|
|
74
77
|
}
|
|
75
78
|
style={styles.communityAvatar}
|
|
@@ -80,12 +83,16 @@ const StoryCircleItem: FC<IStoryCircleItem> = ({
|
|
|
80
83
|
height={68}
|
|
81
84
|
xml={storyRing(storyRingColor[0], storyRingColor[1])}
|
|
82
85
|
/>
|
|
83
|
-
{
|
|
86
|
+
{hasStoryPermission && storyTarget?.failedStoriesCount > 0 ? (
|
|
87
|
+
<View style={styles.errorIcon}>
|
|
88
|
+
<SvgXml width={16} height={16} xml={errorIcon()} />
|
|
89
|
+
</View>
|
|
90
|
+
) : communityData?.isOfficial ? (
|
|
84
91
|
<SvgXml
|
|
85
92
|
style={styles.officialIcon}
|
|
86
93
|
xml={officialIcon(theme.colors.primary)}
|
|
87
94
|
/>
|
|
88
|
-
)}
|
|
95
|
+
) : null}
|
|
89
96
|
<View style={styles.textRow}>
|
|
90
97
|
{!communityData?.isPublic && (
|
|
91
98
|
<SvgXml width={17} height={17} xml={privateIcon(theme.colors.base)} />
|
|
@@ -21,7 +21,7 @@ export const LinkPreview = React.memo(
|
|
|
21
21
|
|
|
22
22
|
const fetchData = async () => {
|
|
23
23
|
setData(undefined);
|
|
24
|
-
const newData = await getPreviewData(text
|
|
24
|
+
const newData = await getPreviewData(text);
|
|
25
25
|
if (!isCancelled) {
|
|
26
26
|
setData(newData);
|
|
27
27
|
}
|
|
@@ -37,8 +37,8 @@ export const LinkPreview = React.memo(
|
|
|
37
37
|
|
|
38
38
|
const renderImageNode = React.useCallback(
|
|
39
39
|
(image: PreviewDataImage) => {
|
|
40
|
-
const imageUrl = image
|
|
41
|
-
? { uri: image
|
|
40
|
+
const imageUrl = image
|
|
41
|
+
? { uri: image }
|
|
42
42
|
: require('../../assets/images/previewLinkDefaultBackground.png');
|
|
43
43
|
|
|
44
44
|
return (
|
|
@@ -2,6 +2,7 @@ import { decode } from 'html-entities';
|
|
|
2
2
|
import { Image } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { PreviewData, PreviewDataImage, Size } from './types';
|
|
5
|
+
import { Client } from '@amityco/ts-sdk-react-native';
|
|
5
6
|
|
|
6
7
|
export const getActualImageUrl = (baseUrl: string, imageUrl?: string) => {
|
|
7
8
|
let actualImageUrl = imageUrl?.trim();
|
|
@@ -54,7 +55,7 @@ export const getImageSize = (url: string) => {
|
|
|
54
55
|
|
|
55
56
|
// Functions below use functions from the same file and mocks are not working
|
|
56
57
|
/* istanbul ignore next */
|
|
57
|
-
export const getPreviewData = async (text: string
|
|
58
|
+
export const getPreviewData = async (text: string) => {
|
|
58
59
|
const previewData: PreviewData = {
|
|
59
60
|
description: undefined,
|
|
60
61
|
image: undefined,
|
|
@@ -77,114 +78,14 @@ export const getPreviewData = async (text: string, requestTimeout = 5000) => {
|
|
|
77
78
|
url = 'https://' + url;
|
|
78
79
|
}
|
|
79
80
|
|
|
80
|
-
|
|
81
|
-
const abortController = new AbortController();
|
|
81
|
+
const request = await Client.fetchLinkPreview(url);
|
|
82
82
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
abortControllerTimeout = setTimeout(() => {
|
|
92
|
-
abortController.abort();
|
|
93
|
-
}, requestTimeout);
|
|
94
|
-
|
|
95
|
-
const response = await request;
|
|
96
|
-
|
|
97
|
-
clearTimeout(abortControllerTimeout);
|
|
98
|
-
|
|
99
|
-
previewData.link = url;
|
|
100
|
-
|
|
101
|
-
const contentType = response.headers.get('content-type') ?? '';
|
|
102
|
-
|
|
103
|
-
if (REGEX_IMAGE_CONTENT_TYPE.test(contentType)) {
|
|
104
|
-
const image = await getPreviewDataImage(url);
|
|
105
|
-
previewData.image = image;
|
|
106
|
-
return previewData;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const html = await response.text();
|
|
110
|
-
|
|
111
|
-
// Some pages return undefined
|
|
112
|
-
if (!html) return previewData;
|
|
113
|
-
|
|
114
|
-
const head = html.substring(0, html.indexOf('<body'));
|
|
115
|
-
|
|
116
|
-
// Get page title
|
|
117
|
-
const title = REGEX_TITLE.exec(head);
|
|
118
|
-
previewData.title = getHtmlEntitiesDecodedText(title?.[1]);
|
|
119
|
-
|
|
120
|
-
let matches: RegExpMatchArray | null;
|
|
121
|
-
const meta: RegExpMatchArray[] = [];
|
|
122
|
-
while ((matches = REGEX_META.exec(head)) !== null) {
|
|
123
|
-
// @ts-ignore
|
|
124
|
-
meta.push([...matches]);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
const metaPreviewData = meta.reduce<{
|
|
128
|
-
description?: string;
|
|
129
|
-
imageUrl?: string;
|
|
130
|
-
title?: string;
|
|
131
|
-
}>(
|
|
132
|
-
(acc, curr) => {
|
|
133
|
-
// Verify that we have property/name and content
|
|
134
|
-
// Note that if a page will specify property, name and content in the same meta, regex will fail
|
|
135
|
-
if (!curr[2] || !curr[3]) return acc;
|
|
136
|
-
|
|
137
|
-
// Only take the first occurrence
|
|
138
|
-
// For description take the meta description tag into consideration
|
|
139
|
-
const description =
|
|
140
|
-
!acc.description &&
|
|
141
|
-
(getContent(curr[2], curr[3], 'og:description') ||
|
|
142
|
-
getContent(curr[2], curr[3], 'description'));
|
|
143
|
-
const ogImage =
|
|
144
|
-
!acc.imageUrl && getContent(curr[2], curr[3], 'og:image');
|
|
145
|
-
const ogTitle = !acc.title && getContent(curr[2], curr[3], 'og:title');
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
description: description
|
|
149
|
-
? getHtmlEntitiesDecodedText(description)
|
|
150
|
-
: acc.description,
|
|
151
|
-
imageUrl: ogImage ? getActualImageUrl(url, ogImage) : acc.imageUrl,
|
|
152
|
-
title: ogTitle ? getHtmlEntitiesDecodedText(ogTitle) : acc.title,
|
|
153
|
-
};
|
|
154
|
-
},
|
|
155
|
-
{ title: previewData.title }
|
|
156
|
-
);
|
|
157
|
-
|
|
158
|
-
previewData.description = metaPreviewData.description;
|
|
159
|
-
previewData.image = await getPreviewDataImage(metaPreviewData.imageUrl);
|
|
160
|
-
previewData.title = metaPreviewData.title;
|
|
161
|
-
|
|
162
|
-
if (!previewData.image) {
|
|
163
|
-
let imageMatches: RegExpMatchArray | null;
|
|
164
|
-
const tags: RegExpMatchArray[] = [];
|
|
165
|
-
while ((imageMatches = REGEX_IMAGE_TAG.exec(html)) !== null) {
|
|
166
|
-
// @ts-ignore
|
|
167
|
-
tags.push([...imageMatches]);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
let images: PreviewDataImage[] = [];
|
|
171
|
-
|
|
172
|
-
for (const tag of tags
|
|
173
|
-
.filter((t) => !t[1].startsWith('data'))
|
|
174
|
-
.slice(0, 5)) {
|
|
175
|
-
const image = await getPreviewDataImage(getActualImageUrl(url, tag[1]));
|
|
176
|
-
|
|
177
|
-
if (!image) continue;
|
|
178
|
-
|
|
179
|
-
images = [...images, image];
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
previewData.image = images.sort(
|
|
183
|
-
(a, b) => b.height * b.width - a.height * a.width
|
|
184
|
-
)[0];
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return previewData;
|
|
83
|
+
return {
|
|
84
|
+
description: request.description || undefined,
|
|
85
|
+
image: request.image || undefined,
|
|
86
|
+
link: url,
|
|
87
|
+
title: request.title || undefined,
|
|
88
|
+
};
|
|
188
89
|
} catch {
|
|
189
90
|
return previewData;
|
|
190
91
|
}
|
|
@@ -13,11 +13,12 @@ import type { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
|
13
13
|
import CloseButtonIconElement from '../../PublicApi/Elements/CloseButtonIconElement/CloseButtonIconElement';
|
|
14
14
|
import { PageID, ComponentID, ElementID } from '../../enum';
|
|
15
15
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
16
|
-
import { useNavigation } from '@react-navigation/native';
|
|
17
16
|
import TextKeyElement from '../../PublicApi/Elements/TextKeyElement/TextKeyElement';
|
|
18
17
|
import { Typography } from '../Typography/Typography';
|
|
19
18
|
import { useStyles } from './styles';
|
|
20
19
|
import { Illustration } from '../../../v4/PublicApi/Components/AmityEmptyNewsFeedComponent/Elements';
|
|
20
|
+
import { useNavigation } from '@react-navigation/native';
|
|
21
|
+
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
21
22
|
|
|
22
23
|
export type FeedParams = {
|
|
23
24
|
targetId: string;
|
|
@@ -48,21 +49,23 @@ interface ITargetSelectionPage {
|
|
|
48
49
|
postSetting,
|
|
49
50
|
needApprovalOnPostCreation,
|
|
50
51
|
}: FeedParams) => void;
|
|
52
|
+
onClickClose?: () => void;
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
const TargetSelectionPage = ({
|
|
54
56
|
pageId,
|
|
55
57
|
hideMyTimelineTarget = false,
|
|
56
58
|
onSelectFeed,
|
|
59
|
+
onClickClose,
|
|
57
60
|
}: ITargetSelectionPage) => {
|
|
58
61
|
const { client } = useAuth();
|
|
59
|
-
|
|
62
|
+
|
|
60
63
|
const defaultTheme = useTheme() as MyMD3Theme;
|
|
61
64
|
|
|
62
65
|
const user = useUser((client as Amity.Client).userId);
|
|
63
66
|
const { communities, onNextCommunityPage, loading } = useCommunities();
|
|
64
67
|
const { themeStyles, accessibilityId } = useAmityPage({ pageId });
|
|
65
|
-
|
|
68
|
+
const navigation = useNavigation<NativeStackNavigationProp<any>>();
|
|
66
69
|
const theme = themeStyles || defaultTheme;
|
|
67
70
|
const styles = useStyles(theme);
|
|
68
71
|
|
|
@@ -102,7 +105,12 @@ const TargetSelectionPage = ({
|
|
|
102
105
|
<View style={styles.header}>
|
|
103
106
|
<TouchableOpacity
|
|
104
107
|
style={styles.closeButton}
|
|
105
|
-
onPress={() =>
|
|
108
|
+
onPress={() => {
|
|
109
|
+
onClickClose?.();
|
|
110
|
+
if (navigation.canGoBack()) {
|
|
111
|
+
navigation.goBack();
|
|
112
|
+
}
|
|
113
|
+
}}
|
|
106
114
|
>
|
|
107
115
|
<CloseButtonIconElement style={styles.closeIcon} pageID={pageId} />
|
|
108
116
|
</TouchableOpacity>
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { useAmityElement } from '../../../v4/hook';
|
|
3
3
|
import { ComponentID, ElementID, PageID } from '../../../v4/enum';
|
|
4
|
-
import Button, {
|
|
4
|
+
import Button, {
|
|
5
|
+
BUTTON_SIZE,
|
|
6
|
+
ButtonProps,
|
|
7
|
+
} from '../../../v4/component/Button/Button';
|
|
5
8
|
import { useStyles } from './styles';
|
|
6
9
|
|
|
7
10
|
type ActionButtonProps = ButtonProps & {
|
|
@@ -27,7 +27,7 @@ const ImageViewer: FC<ImageViewerProps> = ({
|
|
|
27
27
|
images,
|
|
28
28
|
onNextImage,
|
|
29
29
|
onPreviousImage,
|
|
30
|
-
onClose = () => {
|
|
30
|
+
onClose = () => {},
|
|
31
31
|
}) => {
|
|
32
32
|
const [active, setActive] = useState(currentImageIndex);
|
|
33
33
|
const scrollViewRef = useRef<ScrollView>(null);
|
|
@@ -27,7 +27,7 @@ const VideoViewer: FC<VideoViewerProps> = ({
|
|
|
27
27
|
images,
|
|
28
28
|
onNextImage,
|
|
29
29
|
onPreviousImage,
|
|
30
|
-
onClose = () => {
|
|
30
|
+
onClose = () => {},
|
|
31
31
|
}) => {
|
|
32
32
|
const [active, setActive] = useState(currentImageIndex);
|
|
33
33
|
const scrollViewRef = useRef<ScrollView>(null);
|
|
@@ -9,8 +9,17 @@ import { useBottomSheet } from '../../../../../../redux/slices/bottomSheetSlice'
|
|
|
9
9
|
import MenuAction from '../../../../../../v4/elements/MenuAction';
|
|
10
10
|
import { MemberRoles } from '../../../../../../v4/constants';
|
|
11
11
|
import { useToast } from '../../../../../../v4/stores/slices/toast';
|
|
12
|
-
import {
|
|
13
|
-
|
|
12
|
+
import {
|
|
13
|
+
demote,
|
|
14
|
+
promote,
|
|
15
|
+
report,
|
|
16
|
+
trash,
|
|
17
|
+
unreport,
|
|
18
|
+
} from '../../../../../../v4/assets/icons';
|
|
19
|
+
import {
|
|
20
|
+
checkEditRolePermission,
|
|
21
|
+
isModerator,
|
|
22
|
+
} from '../../../../../../v4/utils/permissions';
|
|
14
23
|
import {
|
|
15
24
|
useRolesQuery,
|
|
16
25
|
useMembersQuery,
|
|
@@ -5,7 +5,10 @@ import { Radio } from '../../../../../../v4/component/core/Radio';
|
|
|
5
5
|
import { ElementID, PageID } from '../../../../../../v4/enum';
|
|
6
6
|
import FormLabel from '../../../../../../v4/elements/FormLabel';
|
|
7
7
|
import { AmityCommunityPrivacyEnum } from '../../types';
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
public as $public,
|
|
10
|
+
private as $private,
|
|
11
|
+
} from '../../../../../../v4/assets/icons';
|
|
9
12
|
import { Title } from '../../../../../../v4/elements';
|
|
10
13
|
import FormDescription from '../../../../../../v4/elements/FormDescription';
|
|
11
14
|
import CommunityPrivacyIcon from '../../../../../../v4/elements/CommunityPrivacyIcon';
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
|
|
10
10
|
import { isValidImageType } from '../utils';
|
|
11
11
|
import { useCameraPermission } from './usePermissions';
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
deleteAmityFile,
|
|
14
|
+
uploadImageFile,
|
|
15
|
+
} from '../../providers/file-provider';
|
|
13
16
|
|
|
14
17
|
export type UseImagePickerResponse = {
|
|
15
18
|
progress: number;
|
|
@@ -38,6 +38,9 @@ export interface IBehaviour {
|
|
|
38
38
|
goToUserProfilePage?: (arg?: { userId?: string }) => void;
|
|
39
39
|
goToPostComposerPage?: () => void;
|
|
40
40
|
};
|
|
41
|
+
AmityPostComposerPageBehavior?: {
|
|
42
|
+
onPressPost?: () => void;
|
|
43
|
+
};
|
|
41
44
|
AmityCommunitySearchResultComponent?: {
|
|
42
45
|
goToCommunityProfilePage?: (arg?: {
|
|
43
46
|
targetId: string;
|
|
@@ -100,12 +103,14 @@ export interface IBehaviour {
|
|
|
100
103
|
needApprovalOnPostCreation?: boolean;
|
|
101
104
|
isPublic?: boolean;
|
|
102
105
|
}) => void;
|
|
106
|
+
onClickClose?: () => void;
|
|
103
107
|
};
|
|
104
108
|
AmityStoryTargetSelectionPageBehavior?: {
|
|
105
109
|
goToStoryComposerPage?: (arg?: {
|
|
106
110
|
targetId: string;
|
|
107
111
|
targetType: 'community' | 'user';
|
|
108
112
|
}) => void;
|
|
113
|
+
onClickClose?: () => void;
|
|
109
114
|
};
|
|
110
115
|
AmityLivestreamPostTargetSelectionPageBehavior?: {
|
|
111
116
|
goToCreateLivestreamPage?: (arg?: {
|
|
@@ -123,6 +128,7 @@ export interface IBehaviour {
|
|
|
123
128
|
needApprovalOnPostCreation?: boolean;
|
|
124
129
|
isPublic?: boolean;
|
|
125
130
|
}) => void;
|
|
131
|
+
onClickClose?: () => void;
|
|
126
132
|
};
|
|
127
133
|
AmityCommunityProfilePageBehavior?: {
|
|
128
134
|
goToPendingPostPage?: () => void;
|
|
@@ -140,6 +146,7 @@ export interface IBehaviour {
|
|
|
140
146
|
pop?: number;
|
|
141
147
|
community?: Amity.Community;
|
|
142
148
|
}) => void;
|
|
149
|
+
onClickClose?: () => void;
|
|
143
150
|
};
|
|
144
151
|
AmityCommunitySetupPageBehavior?: {
|
|
145
152
|
goToAddCategoryPage?: (context: AddCategoryPageContext) => void;
|