@amityco/react-native-social-uikit 4.0.0 → 4.0.1-324acbfd.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/core/assets/icons/index.js +8 -0
- package/lib/commonjs/core/assets/icons/index.js.map +1 -1
- package/lib/commonjs/core/assets/icons/visitorLimit.js +30 -0
- package/lib/commonjs/core/assets/icons/visitorLimit.js.map +1 -0
- package/lib/commonjs/core/constants/index.js +11 -1
- package/lib/commonjs/core/constants/index.js.map +1 -1
- package/lib/commonjs/core/hooks/useAuth.js +6 -2
- package/lib/commonjs/core/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/core/providers/AmityUIKitProvider.js.map +1 -1
- package/lib/commonjs/core/providers/AuthProvider.js +46 -16
- package/lib/commonjs/core/providers/AuthProvider.js.map +1 -1
- package/lib/commonjs/core/routes/AmityPageRenderer.js +5 -1
- package/lib/commonjs/core/routes/AmityPageRenderer.js.map +1 -1
- package/lib/commonjs/core/routes/AmityUIKitNavigator.js +42 -1
- package/lib/commonjs/core/routes/AmityUIKitNavigator.js.map +1 -1
- package/lib/commonjs/index.js +12 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/social/components/Social/CommentList/CommentList.js +7 -1
- package/lib/commonjs/social/components/Social/CommentList/CommentList.js.map +1 -1
- package/lib/commonjs/social/components/Social/CommentListItem/CommentListItem.js +16 -3
- package/lib/commonjs/social/components/Social/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/commonjs/social/components/legacy/Social/ReplyCommentList/index.js +12 -2
- package/lib/commonjs/social/components/legacy/Social/ReplyCommentList/index.js.map +1 -1
- package/lib/commonjs/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +6 -1
- package/lib/commonjs/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
- package/lib/commonjs/social/enums/enumUIKitID.js +2 -0
- package/lib/commonjs/social/enums/enumUIKitID.js.map +1 -1
- package/lib/commonjs/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js +15 -3
- package/lib/commonjs/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/commonjs/social/features/comment/components/PostComment/ReplyCommentList/index.js +12 -2
- package/lib/commonjs/social/features/comment/components/PostComment/ReplyCommentList/index.js.map +1 -1
- package/lib/commonjs/social/features/feed/components/TopNavigation/TopNavigation.js +5 -1
- package/lib/commonjs/social/features/feed/components/TopNavigation/TopNavigation.js.map +1 -1
- package/lib/commonjs/social/features/post/Detail/index.js +8 -2
- package/lib/commonjs/social/features/post/Detail/index.js.map +1 -1
- package/lib/commonjs/social/features/post/components/Content/Content.js +5 -1
- package/lib/commonjs/social/features/post/components/Content/Content.js.map +1 -1
- package/lib/commonjs/social/features/post/components/EngagementActions/Components/DetailStyle.js +9 -1
- package/lib/commonjs/social/features/post/components/EngagementActions/Components/DetailStyle.js.map +1 -1
- package/lib/commonjs/social/features/post/components/EngagementActions/Components/FeedStyle.js +9 -1
- package/lib/commonjs/social/features/post/components/EngagementActions/Components/FeedStyle.js.map +1 -1
- package/lib/commonjs/social/features/user/CreateProfile/CreateProfile.js +114 -0
- package/lib/commonjs/social/features/user/CreateProfile/CreateProfile.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.js +78 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/index.js +13 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/index.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/styles.js +51 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/ImageUpload/styles.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/TopBar.js +34 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/TopBar.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/index.js +13 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/index.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/styles.js +37 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/TopBar/styles.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/index.js +28 -0
- package/lib/commonjs/social/features/user/CreateProfile/components/index.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/hooks/index.js +17 -0
- package/lib/commonjs/social/features/user/CreateProfile/hooks/index.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/hooks/useCreateProfile.js +194 -0
- package/lib/commonjs/social/features/user/CreateProfile/hooks/useCreateProfile.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/index.js +13 -0
- package/lib/commonjs/social/features/user/CreateProfile/index.js.map +1 -0
- package/lib/commonjs/social/features/user/CreateProfile/styles.js +40 -0
- package/lib/commonjs/social/features/user/CreateProfile/styles.js.map +1 -0
- package/lib/commonjs/social/features/user/Profile/components/Header/hooks/useHeader.js +6 -1
- package/lib/commonjs/social/features/user/Profile/components/Header/hooks/useHeader.js.map +1 -1
- package/lib/commonjs/social/hooks/index.js +11 -0
- package/lib/commonjs/social/hooks/index.js.map +1 -1
- package/lib/commonjs/social/hooks/useGlobalBehavior.js +53 -0
- package/lib/commonjs/social/hooks/useGlobalBehavior.js.map +1 -0
- package/lib/commonjs/social/hooks/usePostPermission.js +4 -2
- package/lib/commonjs/social/hooks/usePostPermission.js.map +1 -1
- package/lib/commonjs/social/hooks/useStoryPermission.js +3 -2
- package/lib/commonjs/social/hooks/useStoryPermission.js.map +1 -1
- package/lib/commonjs/social/index.js +13 -0
- package/lib/commonjs/social/index.js.map +1 -1
- package/lib/commonjs/social/providers/BehaviourProvider.js +1 -0
- package/lib/commonjs/social/providers/BehaviourProvider.js.map +1 -1
- package/lib/commonjs/social/screens/CreateUserProfile/CreateUserProfile.js +20 -0
- package/lib/commonjs/social/screens/CreateUserProfile/CreateUserProfile.js.map +1 -0
- package/lib/commonjs/social/screens/CreateUserProfile/index.js +13 -0
- package/lib/commonjs/social/screens/CreateUserProfile/index.js.map +1 -0
- package/lib/commonjs/social/screens/SocialHomePage/index.js +22 -7
- package/lib/commonjs/social/screens/SocialHomePage/index.js.map +1 -1
- package/lib/commonjs/social/screens/VisitorUsageLimit/VisitorUsageLimit.js +78 -0
- package/lib/commonjs/social/screens/VisitorUsageLimit/VisitorUsageLimit.js.map +1 -0
- package/lib/commonjs/social/screens/VisitorUsageLimit/index.js +13 -0
- package/lib/commonjs/social/screens/VisitorUsageLimit/index.js.map +1 -0
- package/lib/commonjs/social/screens/VisitorUsageLimit/styles.js +50 -0
- package/lib/commonjs/social/screens/VisitorUsageLimit/styles.js.map +1 -0
- package/lib/commonjs/social/screens/index.js +11 -0
- package/lib/commonjs/social/screens/index.js.map +1 -1
- package/lib/module/core/assets/icons/index.js +1 -0
- package/lib/module/core/assets/icons/index.js.map +1 -1
- package/lib/module/core/assets/icons/visitorLimit.js +23 -0
- package/lib/module/core/assets/icons/visitorLimit.js.map +1 -0
- package/lib/module/core/constants/index.js +10 -0
- package/lib/module/core/constants/index.js.map +1 -1
- package/lib/module/core/hooks/useAuth.js +6 -2
- package/lib/module/core/hooks/useAuth.js.map +1 -1
- package/lib/module/core/providers/AmityUIKitProvider.js.map +1 -1
- package/lib/module/core/providers/AuthProvider.js +46 -16
- package/lib/module/core/providers/AuthProvider.js.map +1 -1
- package/lib/module/core/routes/AmityPageRenderer.js +5 -1
- package/lib/module/core/routes/AmityPageRenderer.js.map +1 -1
- package/lib/module/core/routes/AmityUIKitNavigator.js +42 -1
- package/lib/module/core/routes/AmityUIKitNavigator.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/social/components/Social/CommentList/CommentList.js +7 -1
- package/lib/module/social/components/Social/CommentList/CommentList.js.map +1 -1
- package/lib/module/social/components/Social/CommentListItem/CommentListItem.js +16 -3
- package/lib/module/social/components/Social/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/module/social/components/legacy/Social/ReplyCommentList/index.js +12 -2
- package/lib/module/social/components/legacy/Social/ReplyCommentList/index.js.map +1 -1
- package/lib/module/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js +7 -2
- package/lib/module/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.js.map +1 -1
- package/lib/module/social/enums/enumUIKitID.js +2 -0
- package/lib/module/social/enums/enumUIKitID.js.map +1 -1
- package/lib/module/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js +16 -4
- package/lib/module/social/features/comment/components/PostComment/CommentListItem/CommentListItem.js.map +1 -1
- package/lib/module/social/features/comment/components/PostComment/ReplyCommentList/index.js +12 -2
- package/lib/module/social/features/comment/components/PostComment/ReplyCommentList/index.js.map +1 -1
- package/lib/module/social/features/feed/components/TopNavigation/TopNavigation.js +5 -1
- package/lib/module/social/features/feed/components/TopNavigation/TopNavigation.js.map +1 -1
- package/lib/module/social/features/post/Detail/index.js +8 -2
- package/lib/module/social/features/post/Detail/index.js.map +1 -1
- package/lib/module/social/features/post/components/Content/Content.js +5 -1
- package/lib/module/social/features/post/components/Content/Content.js.map +1 -1
- package/lib/module/social/features/post/components/EngagementActions/Components/DetailStyle.js +10 -2
- package/lib/module/social/features/post/components/EngagementActions/Components/DetailStyle.js.map +1 -1
- package/lib/module/social/features/post/components/EngagementActions/Components/FeedStyle.js +10 -2
- package/lib/module/social/features/post/components/EngagementActions/Components/FeedStyle.js.map +1 -1
- package/lib/module/social/features/user/CreateProfile/CreateProfile.js +107 -0
- package/lib/module/social/features/user/CreateProfile/CreateProfile.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.js +72 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/index.js +2 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/index.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/styles.js +44 -0
- package/lib/module/social/features/user/CreateProfile/components/ImageUpload/styles.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/TopBar.js +27 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/TopBar.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/index.js +2 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/index.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/styles.js +30 -0
- package/lib/module/social/features/user/CreateProfile/components/TopBar/styles.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/components/index.js +3 -0
- package/lib/module/social/features/user/CreateProfile/components/index.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/hooks/index.js +2 -0
- package/lib/module/social/features/user/CreateProfile/hooks/index.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/hooks/useCreateProfile.js +187 -0
- package/lib/module/social/features/user/CreateProfile/hooks/useCreateProfile.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/index.js +2 -0
- package/lib/module/social/features/user/CreateProfile/index.js.map +1 -0
- package/lib/module/social/features/user/CreateProfile/styles.js +33 -0
- package/lib/module/social/features/user/CreateProfile/styles.js.map +1 -0
- package/lib/module/social/features/user/Profile/components/Header/hooks/useHeader.js +7 -2
- package/lib/module/social/features/user/Profile/components/Header/hooks/useHeader.js.map +1 -1
- package/lib/module/social/hooks/index.js +1 -0
- package/lib/module/social/hooks/index.js.map +1 -1
- package/lib/module/social/hooks/useGlobalBehavior.js +45 -0
- package/lib/module/social/hooks/useGlobalBehavior.js.map +1 -0
- package/lib/module/social/hooks/usePostPermission.js +4 -2
- package/lib/module/social/hooks/usePostPermission.js.map +1 -1
- package/lib/module/social/hooks/useStoryPermission.js +3 -2
- package/lib/module/social/hooks/useStoryPermission.js.map +1 -1
- package/lib/module/social/index.js +2 -1
- package/lib/module/social/index.js.map +1 -1
- package/lib/module/social/providers/BehaviourProvider.js +1 -0
- package/lib/module/social/providers/BehaviourProvider.js.map +1 -1
- package/lib/module/social/screens/CreateUserProfile/CreateUserProfile.js +14 -0
- package/lib/module/social/screens/CreateUserProfile/CreateUserProfile.js.map +1 -0
- package/lib/module/social/screens/CreateUserProfile/index.js +2 -0
- package/lib/module/social/screens/CreateUserProfile/index.js.map +1 -0
- package/lib/module/social/screens/SocialHomePage/index.js +23 -8
- package/lib/module/social/screens/SocialHomePage/index.js.map +1 -1
- package/lib/module/social/screens/VisitorUsageLimit/VisitorUsageLimit.js +72 -0
- package/lib/module/social/screens/VisitorUsageLimit/VisitorUsageLimit.js.map +1 -0
- package/lib/module/social/screens/VisitorUsageLimit/index.js +2 -0
- package/lib/module/social/screens/VisitorUsageLimit/index.js.map +1 -0
- package/lib/module/social/screens/VisitorUsageLimit/styles.js +43 -0
- package/lib/module/social/screens/VisitorUsageLimit/styles.js.map +1 -0
- package/lib/module/social/screens/index.js +1 -0
- package/lib/module/social/screens/index.js.map +1 -1
- package/lib/typescript/core/assets/icons/index.d.ts +1 -0
- package/lib/typescript/core/assets/icons/index.d.ts.map +1 -1
- package/lib/typescript/core/assets/icons/visitorLimit.d.ts +3 -0
- package/lib/typescript/core/assets/icons/visitorLimit.d.ts.map +1 -0
- package/lib/typescript/core/constants/index.d.ts +8 -0
- package/lib/typescript/core/constants/index.d.ts.map +1 -1
- package/lib/typescript/core/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/core/providers/AmityUIKitProvider.d.ts +2 -1
- package/lib/typescript/core/providers/AmityUIKitProvider.d.ts.map +1 -1
- package/lib/typescript/core/providers/AuthProvider.d.ts.map +1 -1
- package/lib/typescript/core/routes/AmityPageRenderer.d.ts.map +1 -1
- package/lib/typescript/core/routes/AmityUIKitNavigator.d.ts.map +1 -1
- package/lib/typescript/core/routes/RouteParamList.d.ts +1 -0
- package/lib/typescript/core/routes/RouteParamList.d.ts.map +1 -1
- package/lib/typescript/core/types/auth.d.ts +2 -0
- package/lib/typescript/core/types/auth.d.ts.map +1 -1
- package/lib/typescript/core/types/behaviour.d.ts +18 -0
- package/lib/typescript/core/types/behaviour.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/social/components/Social/CommentList/CommentList.d.ts.map +1 -1
- package/lib/typescript/social/components/Social/CommentListItem/CommentListItem.d.ts.map +1 -1
- package/lib/typescript/social/components/legacy/Social/ReplyCommentList/index.d.ts.map +1 -1
- package/lib/typescript/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.d.ts.map +1 -1
- package/lib/typescript/social/enums/enumUIKitID.d.ts +2 -0
- package/lib/typescript/social/enums/enumUIKitID.d.ts.map +1 -1
- package/lib/typescript/social/features/comment/components/PostComment/CommentListItem/CommentListItem.d.ts.map +1 -1
- package/lib/typescript/social/features/comment/components/PostComment/ReplyCommentList/index.d.ts.map +1 -1
- package/lib/typescript/social/features/feed/components/TopNavigation/TopNavigation.d.ts.map +1 -1
- package/lib/typescript/social/features/post/Detail/index.d.ts.map +1 -1
- package/lib/typescript/social/features/post/components/Content/Content.d.ts.map +1 -1
- package/lib/typescript/social/features/post/components/EngagementActions/Components/DetailStyle.d.ts.map +1 -1
- package/lib/typescript/social/features/post/components/EngagementActions/Components/FeedStyle.d.ts.map +1 -1
- package/lib/typescript/social/features/user/CreateProfile/CreateProfile.d.ts +28 -0
- package/lib/typescript/social/features/user/CreateProfile/CreateProfile.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.d.ts +9 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/index.d.ts +2 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/index.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/styles.d.ts +39 -0
- package/lib/typescript/social/features/user/CreateProfile/components/ImageUpload/styles.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/TopBar.d.ts +7 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/TopBar.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/index.d.ts +2 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/index.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/styles.d.ts +25 -0
- package/lib/typescript/social/features/user/CreateProfile/components/TopBar/styles.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/components/index.d.ts +3 -0
- package/lib/typescript/social/features/user/CreateProfile/components/index.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/hooks/index.d.ts +2 -0
- package/lib/typescript/social/features/user/CreateProfile/hooks/index.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/hooks/useCreateProfile.d.ts +74 -0
- package/lib/typescript/social/features/user/CreateProfile/hooks/useCreateProfile.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/index.d.ts +3 -0
- package/lib/typescript/social/features/user/CreateProfile/index.d.ts.map +1 -0
- package/lib/typescript/social/features/user/CreateProfile/styles.d.ts +28 -0
- package/lib/typescript/social/features/user/CreateProfile/styles.d.ts.map +1 -0
- package/lib/typescript/social/features/user/Profile/components/Header/hooks/useHeader.d.ts.map +1 -1
- package/lib/typescript/social/hooks/index.d.ts +1 -0
- package/lib/typescript/social/hooks/index.d.ts.map +1 -1
- package/lib/typescript/social/hooks/useGlobalBehavior.d.ts +23 -0
- package/lib/typescript/social/hooks/useGlobalBehavior.d.ts.map +1 -0
- package/lib/typescript/social/hooks/usePostPermission.d.ts.map +1 -1
- package/lib/typescript/social/hooks/useStoryPermission.d.ts.map +1 -1
- package/lib/typescript/social/index.d.ts +2 -1
- package/lib/typescript/social/index.d.ts.map +1 -1
- package/lib/typescript/social/providers/BehaviourProvider.d.ts.map +1 -1
- package/lib/typescript/social/screens/CreateUserProfile/CreateUserProfile.d.ts +7 -0
- package/lib/typescript/social/screens/CreateUserProfile/CreateUserProfile.d.ts.map +1 -0
- package/lib/typescript/social/screens/CreateUserProfile/index.d.ts +3 -0
- package/lib/typescript/social/screens/CreateUserProfile/index.d.ts.map +1 -0
- package/lib/typescript/social/screens/SocialHomePage/index.d.ts.map +1 -1
- package/lib/typescript/social/screens/VisitorUsageLimit/VisitorUsageLimit.d.ts +2 -0
- package/lib/typescript/social/screens/VisitorUsageLimit/VisitorUsageLimit.d.ts.map +1 -0
- package/lib/typescript/social/screens/VisitorUsageLimit/index.d.ts +2 -0
- package/lib/typescript/social/screens/VisitorUsageLimit/index.d.ts.map +1 -0
- package/lib/typescript/social/screens/VisitorUsageLimit/styles.d.ts +38 -0
- package/lib/typescript/social/screens/VisitorUsageLimit/styles.d.ts.map +1 -0
- package/lib/typescript/social/screens/index.d.ts +1 -0
- package/lib/typescript/social/screens/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/core/assets/icons/index.ts +1 -0
- package/src/core/assets/icons/visitorLimit.tsx +23 -0
- package/src/core/constants/index.ts +12 -0
- package/src/core/hooks/useAuth.ts +4 -0
- package/src/core/providers/AmityUIKitProvider.tsx +2 -1
- package/src/core/providers/AuthProvider.tsx +41 -12
- package/src/core/routes/AmityPageRenderer.tsx +11 -0
- package/src/core/routes/AmityUIKitNavigator.tsx +38 -1
- package/src/core/routes/RouteParamList.tsx +4 -0
- package/src/core/types/auth.ts +2 -0
- package/src/core/types/behaviour.ts +18 -0
- package/src/index.tsx +4 -0
- package/src/social/components/Social/CommentList/CommentList.tsx +5 -1
- package/src/social/components/Social/CommentListItem/CommentListItem.tsx +19 -12
- package/src/social/components/legacy/Social/ReplyCommentList/index.tsx +17 -11
- package/src/social/elements/CommunityJoinButtonElement/CommunityJoinButtonElement.tsx +10 -2
- package/src/social/enums/enumUIKitID.ts +2 -0
- package/src/social/features/comment/components/PostComment/CommentListItem/CommentListItem.tsx +22 -16
- package/src/social/features/comment/components/PostComment/ReplyCommentList/index.tsx +17 -11
- package/src/social/features/feed/components/TopNavigation/TopNavigation.tsx +3 -1
- package/src/social/features/post/Detail/index.tsx +6 -2
- package/src/social/features/post/components/Content/Content.tsx +7 -4
- package/src/social/features/post/components/EngagementActions/Components/DetailStyle.tsx +7 -2
- package/src/social/features/post/components/EngagementActions/Components/FeedStyle.tsx +7 -2
- package/src/social/features/user/CreateProfile/CreateProfile.tsx +121 -0
- package/src/social/features/user/CreateProfile/components/ImageUpload/ImageUpload.tsx +85 -0
- package/src/social/features/user/CreateProfile/components/ImageUpload/index.ts +1 -0
- package/src/social/features/user/CreateProfile/components/ImageUpload/styles.ts +44 -0
- package/src/social/features/user/CreateProfile/components/TopBar/TopBar.tsx +30 -0
- package/src/social/features/user/CreateProfile/components/TopBar/index.ts +1 -0
- package/src/social/features/user/CreateProfile/components/TopBar/styles.ts +30 -0
- package/src/social/features/user/CreateProfile/components/index.ts +2 -0
- package/src/social/features/user/CreateProfile/hooks/index.ts +1 -0
- package/src/social/features/user/CreateProfile/hooks/useCreateProfile.ts +186 -0
- package/src/social/features/user/CreateProfile/index.ts +2 -0
- package/src/social/features/user/CreateProfile/styles.ts +33 -0
- package/src/social/features/user/Profile/components/Header/hooks/useHeader.ts +5 -2
- package/src/social/hooks/index.ts +1 -0
- package/src/social/hooks/useGlobalBehavior.ts +39 -0
- package/src/social/hooks/usePostPermission.ts +3 -1
- package/src/social/hooks/useStoryPermission.ts +8 -6
- package/src/social/index.tsx +2 -0
- package/src/social/providers/BehaviourProvider.tsx +1 -0
- package/src/social/screens/CreateUserProfile/CreateUserProfile.tsx +19 -0
- package/src/social/screens/CreateUserProfile/index.ts +2 -0
- package/src/social/screens/SocialHomePage/index.tsx +36 -13
- package/src/social/screens/VisitorUsageLimit/VisitorUsageLimit.tsx +78 -0
- package/src/social/screens/VisitorUsageLimit/index.ts +1 -0
- package/src/social/screens/VisitorUsageLimit/styles.ts +43 -0
- package/src/social/screens/index.ts +1 -0
- package/uikit.config.json +17 -0
|
@@ -14,7 +14,9 @@ export const AuthContext = /*#__PURE__*/createContext({
|
|
|
14
14
|
apiRegion: 'sg',
|
|
15
15
|
authToken: '',
|
|
16
16
|
fcmToken: undefined,
|
|
17
|
-
isGlobalBan: false
|
|
17
|
+
isGlobalBan: false,
|
|
18
|
+
isVisitorUsageLimitReached: false,
|
|
19
|
+
isVisitorOrBot: false
|
|
18
20
|
});
|
|
19
21
|
export const AuthContextProvider = ({
|
|
20
22
|
userId,
|
|
@@ -36,6 +38,8 @@ export const AuthContextProvider = ({
|
|
|
36
38
|
}
|
|
37
39
|
});
|
|
38
40
|
const [isGlobalBan, setIsGlobalBan] = useState(false);
|
|
41
|
+
const [isVisitorUsageLimitReached, setIsVisitorUsageLimitReached] = useState(false);
|
|
42
|
+
const [isVisitorOrBot, setIsVisitorOrBot] = useState(false);
|
|
39
43
|
const sessionHandler = {
|
|
40
44
|
sessionWillRenewAccessToken(renewal) {
|
|
41
45
|
renewal.renew();
|
|
@@ -51,23 +55,42 @@ export const AuthContextProvider = ({
|
|
|
51
55
|
if (sessionState === 'established') {
|
|
52
56
|
setIsConnected(true);
|
|
53
57
|
onSdkReady();
|
|
58
|
+
// Same check as the Web UIKit's isVisitorOrBot in SDKProvider
|
|
59
|
+
setIsVisitorOrBot(Client.getCurrentUserType() !== 'signed-in');
|
|
54
60
|
}
|
|
55
61
|
}, [sessionState]);
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
// SDK emits this (throttled, 2s window) when a visitor/bot session gets
|
|
64
|
+
// error 400323 — daily usage limit exceeded. The session stays alive, so
|
|
65
|
+
// this is tracked separately from isGlobalBan. In-memory only: the flag
|
|
66
|
+
// resets when the provider remounts or the user signs in with a userId.
|
|
67
|
+
return Client.onVisitorUsageLimitReached(() => {
|
|
68
|
+
setIsVisitorUsageLimitReached(true);
|
|
69
|
+
});
|
|
70
|
+
}, []);
|
|
56
71
|
const handleConnect = useCallback(async () => {
|
|
57
|
-
let loginParam;
|
|
58
|
-
loginParam = {
|
|
59
|
-
userId: userId,
|
|
60
|
-
displayName: displayName
|
|
61
|
-
};
|
|
62
|
-
if ((authToken === null || authToken === void 0 ? void 0 : authToken.length) > 0) {
|
|
63
|
-
loginParam = {
|
|
64
|
-
...loginParam,
|
|
65
|
-
authToken: authToken
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
72
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
if (userId) {
|
|
74
|
+
let loginParam = {
|
|
75
|
+
userId: userId,
|
|
76
|
+
displayName: displayName
|
|
77
|
+
};
|
|
78
|
+
if ((authToken === null || authToken === void 0 ? void 0 : authToken.length) > 0) {
|
|
79
|
+
loginParam = {
|
|
80
|
+
...loginParam,
|
|
81
|
+
authToken: authToken
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
const response = await Client.login(loginParam, sessionHandler);
|
|
85
|
+
if (!response) return;
|
|
86
|
+
} else {
|
|
87
|
+
// No userId — connect as a visitor (read-only session, same
|
|
88
|
+
// convention as the Web UIKit's registerDevice without userId)
|
|
89
|
+
const response = await Client.loginAsVisitor({
|
|
90
|
+
sessionHandler
|
|
91
|
+
});
|
|
92
|
+
if (!response) return;
|
|
93
|
+
}
|
|
71
94
|
} catch (err) {
|
|
72
95
|
var _err$message;
|
|
73
96
|
if (err !== null && err !== void 0 && (_err$message = err.message) !== null && _err$message !== void 0 && _err$message.includes(ERROR_CODE.GLOBAL_BAN)) {
|
|
@@ -81,7 +104,11 @@ export const AuthContextProvider = ({
|
|
|
81
104
|
console.log(err);
|
|
82
105
|
}
|
|
83
106
|
}
|
|
84
|
-
|
|
107
|
+
// Depend on userId (and the other login params) so that when the host
|
|
108
|
+
// switches a visitor session to a signed-in one by passing a userId, this
|
|
109
|
+
// callback re-reads the new value and calls Client.login instead of
|
|
110
|
+
// re-using the stale (undefined) userId and re-connecting as a visitor.
|
|
111
|
+
}, [userId, displayName, authToken, fcmToken]);
|
|
85
112
|
const login = async () => {
|
|
86
113
|
setError('');
|
|
87
114
|
setLoading(true);
|
|
@@ -96,6 +123,7 @@ export const AuthContextProvider = ({
|
|
|
96
123
|
}
|
|
97
124
|
};
|
|
98
125
|
useEffect(() => {
|
|
126
|
+
setIsVisitorUsageLimitReached(false);
|
|
99
127
|
login();
|
|
100
128
|
}, [userId]);
|
|
101
129
|
const logout = async () => {
|
|
@@ -117,7 +145,9 @@ export const AuthContextProvider = ({
|
|
|
117
145
|
isConnected,
|
|
118
146
|
sessionState,
|
|
119
147
|
apiRegion: apiRegion.toLowerCase(),
|
|
120
|
-
isGlobalBan
|
|
148
|
+
isGlobalBan,
|
|
149
|
+
isVisitorUsageLimitReached,
|
|
150
|
+
isVisitorOrBot
|
|
121
151
|
}
|
|
122
152
|
}, children);
|
|
123
153
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createContext","useCallback","useEffect","useState","Client","Alert","ERROR_CODE","onSdkReady","AuthContext","client","isConnecting","error","login","logout","isConnected","sessionState","apiRegion","authToken","fcmToken","undefined","isGlobalBan","AuthContextProvider","userId","displayName","apiKey","apiEndpoint","children","setError","setLoading","setIsConnected","setSessionState","createClient","http","setIsGlobalBan","sessionHandler","sessionWillRenewAccessToken","renewal","renew","onSessionStateChange","state","reason","handleConnect","loginParam","length","response","err","_err$message","message","includes","GLOBAL_BAN","registerPushNotification","console","log","e","errorText","stopUnreadSync","alert","React","createElement","Provider","value","toLowerCase"],"sourceRoot":"../../../../src","sources":["core/providers/AuthProvider.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,MAAM,QAAQ,8BAA8B;AAErD,SAASC,KAAK,QAAQ,cAAc;AAEpC,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,UAAU,QAAQ,sBAAsB;AAEjD,OAAO,MAAMC,WAAW,gBAAGR,aAAa,CAAuB;EAC7DS,MAAM,EAAE,IAAI;EACZC,YAAY,EAAE,KAAK;EACnBC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAEA,CAAA,KAAM,CAAC,CAAC;EACfC,MAAM,EAAEA,CAAA,KAAM,CAAC,CAAC;EAChBC,WAAW,EAAE,KAAK;EAClBC,YAAY,EAAE,EAAE;EAChBC,SAAS,EAAE,IAAI;EACfC,SAAS,EAAE,EAAE;EACbC,QAAQ,EAAEC,SAAS;EACnBC,WAAW,EAAE;
|
|
1
|
+
{"version":3,"names":["createContext","useCallback","useEffect","useState","Client","Alert","ERROR_CODE","onSdkReady","AuthContext","client","isConnecting","error","login","logout","isConnected","sessionState","apiRegion","authToken","fcmToken","undefined","isGlobalBan","isVisitorUsageLimitReached","isVisitorOrBot","AuthContextProvider","userId","displayName","apiKey","apiEndpoint","children","setError","setLoading","setIsConnected","setSessionState","createClient","http","setIsGlobalBan","setIsVisitorUsageLimitReached","setIsVisitorOrBot","sessionHandler","sessionWillRenewAccessToken","renewal","renew","onSessionStateChange","state","reason","getCurrentUserType","onVisitorUsageLimitReached","handleConnect","loginParam","length","response","loginAsVisitor","err","_err$message","message","includes","GLOBAL_BAN","registerPushNotification","console","log","e","errorText","stopUnreadSync","alert","React","createElement","Provider","value","toLowerCase"],"sourceRoot":"../../../../src","sources":["core/providers/AuthProvider.tsx"],"mappings":"AAAA,SACEA,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,QAAQ,QAEH,OAAO;AACd,SAASC,MAAM,QAAQ,8BAA8B;AAErD,SAASC,KAAK,QAAQ,cAAc;AAEpC,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,UAAU,QAAQ,sBAAsB;AAEjD,OAAO,MAAMC,WAAW,gBAAGR,aAAa,CAAuB;EAC7DS,MAAM,EAAE,IAAI;EACZC,YAAY,EAAE,KAAK;EACnBC,KAAK,EAAE,EAAE;EACTC,KAAK,EAAEA,CAAA,KAAM,CAAC,CAAC;EACfC,MAAM,EAAEA,CAAA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V,MAAMC,SAAS,GACb,CAACD,CAAC,aAADA,CAAC,uBAADA,CAAC,CAAYN,OAAO,KAAI,+BAA+B;MAE1DjD,KAAK,CAAC0D,KAAK,CAACF,SAAS,CAAC;IACxB;EACF,CAAC;EAED,oBACEG,KAAA,CAAAC,aAAA,CAACzD,WAAW,CAAC0D,QAAQ;IACnBC,KAAK,EAAE;MACLxD,KAAK;MACLD,YAAY;MACZE,KAAK;MACLH,MAAM;MACNI,MAAM;MACNC,WAAW;MACXC,YAAY;MACZC,SAAS,EAAEA,SAAS,CAACoD,WAAW,CAAC,CAAC;MAClChD,WAAW;MACXC,0BAA0B;MAC1BC;IACF;EAAE,GAEDM,QACmB,CAAC;AAE3B,CAAC;AACD,eAAeL,mBAAmB","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ import { useTheme } from 'react-native-paper';
|
|
|
11
11
|
import PostTypeChoiceModal from '../../social/components/legacy/PostTypeChoiceModal/PostTypeChoiceModal';
|
|
12
12
|
import CreateStoryScreen from '../../social/screens/CreateStory/CreateStoryScreen';
|
|
13
13
|
import Toast from '../../social/components/legacy/Toast/Toast';
|
|
14
|
+
import SnackbarToast from '../../social/components/Toast';
|
|
14
15
|
import AmitySocialGlobalSearchPage from '../../social/screens/SocialGlobalSearch';
|
|
15
16
|
import AmityMyCommunitiesSearchPage from '../../social/screens/MyCommunitiesSearch';
|
|
16
17
|
import PostTargetSelection from '../../social/screens/PostTargetSelection';
|
|
@@ -70,6 +71,9 @@ export default function PageRenderer({
|
|
|
70
71
|
}), /*#__PURE__*/React.createElement(Stack.Screen, {
|
|
71
72
|
name: "AmityPostEngagementContentComponent",
|
|
72
73
|
children: () => children
|
|
74
|
+
}), /*#__PURE__*/React.createElement(Stack.Screen, {
|
|
75
|
+
name: "AmityCreateUserProfilePage",
|
|
76
|
+
children: () => children
|
|
73
77
|
}), /*#__PURE__*/React.createElement(Stack.Screen, {
|
|
74
78
|
name: "AmitySocialHomePage",
|
|
75
79
|
component: AmitySocialHomePage
|
|
@@ -208,6 +212,6 @@ export default function PageRenderer({
|
|
|
208
212
|
options: {
|
|
209
213
|
animation: 'slide_from_bottom'
|
|
210
214
|
}
|
|
211
|
-
})), /*#__PURE__*/React.createElement(PostTypeChoiceModal, null), /*#__PURE__*/React.createElement(Toast, null)));
|
|
215
|
+
})), /*#__PURE__*/React.createElement(PostTypeChoiceModal, null), /*#__PURE__*/React.createElement(Toast, null), /*#__PURE__*/React.createElement(SnackbarToast, null)));
|
|
212
216
|
}
|
|
213
217
|
//# sourceMappingURL=AmityPageRenderer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NavigationContainer","NavigationIndependentTree","React","createNativeStackNavigator","useAuth","AmitySocialHomePage","PostDetail","CreatePost","UserProfileScreen","EditUserScreen","UserRelationshipScreen","BlockedUsersScreen","UserPendingFollowRequests","CreateCommunity","useTheme","PostTypeChoiceModal","CreateStoryScreen","Toast","AmitySocialGlobalSearchPage","AmityMyCommunitiesSearchPage","PostTargetSelection","StoryTargetSelection","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","EditPost","AmityExploreComponent","PollPostComposer","CommunityAddCategory","CommunityAddMember","EditCommunity","CommunityPostPermission","CommunityStorySetting","CommunityNotificationSettingScreen","CommunityPostsNotificationSettingScreen","CommunityCommentsNotificationSettingScreen","CommunityStoriesNotificationSettingScreen","CommunityLivestreamsNotificationSettingScreen","CommunityPendingRequest","CommunitySetting","AmityCommunityProfilePage","LivestreamTerminated","PollTargetSelection","LivestreamPostTargetSelection","CommunityMembership","CreateLivestream","LivestreamPlayer","PageRenderer","children","_children$type","_children$type2","Stack","isConnected","theme","createElement","Navigator","id","undefined","screenOptions","headerShown","headerShadowVisible","contentStyle","backgroundColor","colors","background","headerStyle","headerTitleStyle","color","base","initialRouteName","type","displayName","name","Screen","component","props","options","animation"],"sourceRoot":"../../../../src","sources":["core/routes/AmityPageRenderer.tsx"],"mappings":"AAAA,SACEA,mBAAmB,EACnBC,yBAAyB,QACp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OC,gBAAgB,MAAM,uCAAuC;AACpE,OAAOC,yBAAyB,MAAM,uCAAuC;AAC7E,OAAOC,oBAAoB,MAAM,2CAA2C;AAC5E,OAAOC,mBAAmB,MAAM,0CAA0C;AAC1E,OAAOC,6BAA6B,MAAM,oDAAoD;AAC9F,OAAOC,mBAAmB,MAAM,0CAA0C;AAC1E,OAAOC,gBAAgB,MAAM,uCAAuC;AACpE,OAAOC,gBAAgB,MAAM,uCAAuC;AAKpE,eAAe,SAASC,YAAYA,CAAC;EAAEC;AAA4B,CAAC,EAAE;EAAA,IAAAC,cAAA,EAAAC,eAAA;EACpE,MAAMC,KAAK,
|
|
1
|
+
{"version":3,"names":["NavigationContainer","NavigationIndependentTree","React","createNativeStackNavigator","useAuth","AmitySocialHomePage","PostDetail","CreatePost","UserProfileScreen","EditUserScreen","UserRelationshipScreen","BlockedUsersScreen","UserPendingFollowRequests","CreateCommunity","useTheme","PostTypeChoiceModal","CreateStoryScreen","Toast","SnackbarToast","AmitySocialGlobalSearchPage","AmityMyCommunitiesSearchPage","PostTargetSelection","StoryTargetSelection","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","EditPost","AmityExploreComponent","PollPostComposer","CommunityAddCategory","CommunityAddMember","EditCommunity","CommunityPostPermission","CommunityStorySetting","CommunityNotificationSettingScreen","CommunityPostsNotificationSettingScreen","CommunityCommentsNotificationSettingScreen","CommunityStoriesNotificationSettingScreen","CommunityLivestreamsNotificationSettingScreen","CommunityPendingRequest","CommunitySetting","AmityCommunityProfilePage","LivestreamTerminated","PollTargetSelection","LivestreamPostTargetSelection","CommunityMembership","CreateLivestream","LivestreamPlayer","PageRenderer","children","_children$type","_children$type2","Stack","isConnected","theme","createElement","Navigator","id","undefined","screenOptions","headerShown","headerShadowVisible","contentStyle","backgroundColor","colors","background","headerStyle","headerTitleStyle","color","base","initialRouteName","type","displayName","name","Screen","component","props","options","animation"],"sourceRoot":"../../../../src","sources":["core/routes/AmityPageRenderer.tsx"],"mappings":"AAAA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,eAGF3E,KAAA,CAAAoD,aAAA,CAACH,KAAK,CAACsB,MAAM;IACXD,IAAI,EAAC,+BAA+B;IACpCE,SAAS,EAAE/B,6BAA8B;IACzCiC,OAAO,EAAE;MAAEC,SAAS,EAAE;IAAoB;EAAE,CAC7C,CAAC,eACF3E,KAAA,CAAAoD,aAAA,CAACH,KAAK,CAACsB,MAAM;IACXD,IAAI,EAAC,kBAAkB;IACvBE,SAAS,EAAE7B,gBAAiB;IAC5B+B,OAAO,EAAE;MAAEC,SAAS,EAAE;IAAoB;EAAE,CAC7C,CAAC,eACF3E,KAAA,CAAAoD,aAAA,CAACH,KAAK,CAACsB,MAAM;IACXD,IAAI,EAAC,kBAAkB;IACvBE,SAAS,EAAE5B,gBAAiB;IAC5B8B,OAAO,EAAE;MAAEC,SAAS,EAAE;IAAoB;EAAE,CAC7C,CAAC,eACF3E,KAAA,CAAAoD,aAAA,CAACH,KAAK,CAACsB,MAAM;IACXD,IAAI,EAAC,sBAAsB;IAC3BE,SAAS,EAAEjC,oBAAqB;IAChCmC,OAAO,EAAE;MAAEC,SAAS,EAAE;IAAoB;EAAE,CAC7C,CACc,CAClB,eACD3E,KAAA,CAAAoD,aAAA,CAACvC,mBAAmB,MAAE,CAAC,eACvBb,KAAA,CAAAoD,aAAA,CAACrC,KAAK,MAAE,CAAC,eAGTf,KAAA,CAAAoD,aAAA,CAACpC,aAAa,MAAE,CACG,CACI,CAAC;AAEhC","ignoreList":[]}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
1
2
|
import { NavigationContainer, NavigationIndependentTree } from '@react-navigation/native';
|
|
3
|
+
import { View } from 'react-native';
|
|
2
4
|
import { navigationRef, onNavigationReady } from './navigation';
|
|
3
5
|
import { createNativeStackNavigator } from '@react-navigation/native-stack';
|
|
4
6
|
import useAuth from '../hooks/useAuth';
|
|
@@ -38,14 +40,53 @@ import { CommunityStoriesNotificationSettingScreen } from '../../social/screens/
|
|
|
38
40
|
import { CommunityLivestreamsNotificationSettingScreen } from '../../social/screens/CommunityLivestreamsNotificationSetting';
|
|
39
41
|
import CommunityPendingRequest from '../../social/screens/CommunityPendingRequest';
|
|
40
42
|
import { GlobalBan } from '../../social/screens/GlobalBan';
|
|
43
|
+
import { VisitorUsageLimit } from '../../social/screens/VisitorUsageLimit';
|
|
44
|
+
import { useBehaviour } from '../../social/providers/BehaviourProvider';
|
|
41
45
|
import { ImageViewerScreen, VideoPlayerScreen, EditUserScreen, UserProfileScreen, UserRelationshipScreen, BlockedUsersScreen, UserPendingFollowRequests } from '../../social/screens';
|
|
42
46
|
const Stack = createNativeStackNavigator();
|
|
43
47
|
export default function AmitySocialUIKitV4Navigator() {
|
|
44
48
|
const theme = useTheme();
|
|
45
49
|
const {
|
|
46
|
-
isGlobalBan
|
|
50
|
+
isGlobalBan,
|
|
51
|
+
isVisitorUsageLimitReached,
|
|
52
|
+
isConnected
|
|
47
53
|
} = useAuth();
|
|
54
|
+
const {
|
|
55
|
+
AmityGlobalBehavior
|
|
56
|
+
} = useBehaviour();
|
|
57
|
+
const handleVisitorUsageLimitReached = AmityGlobalBehavior === null || AmityGlobalBehavior === void 0 ? void 0 : AmityGlobalBehavior.handleVisitorUsageLimitReached;
|
|
58
|
+
const hasHandledUsageLimit = useRef(false);
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
if (!isVisitorUsageLimitReached) {
|
|
61
|
+
hasHandledUsageLimit.current = false;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
// Customer override replaces the default full-page swap; guard so rapid
|
|
65
|
+
// repeat events trigger a single navigation.
|
|
66
|
+
if (handleVisitorUsageLimitReached && !hasHandledUsageLimit.current) {
|
|
67
|
+
hasHandledUsageLimit.current = true;
|
|
68
|
+
handleVisitorUsageLimitReached();
|
|
69
|
+
}
|
|
70
|
+
}, [isVisitorUsageLimitReached, handleVisitorUsageLimitReached]);
|
|
48
71
|
if (isGlobalBan) return /*#__PURE__*/React.createElement(GlobalBan, null);
|
|
72
|
+
|
|
73
|
+
// Wait for the session to establish before mounting the home page. Until then
|
|
74
|
+
// isVisitorOrBot is unknown (defaults to false), so rendering now would flash
|
|
75
|
+
// the full signed-in UIKit for a frame before resolving to visitor mode.
|
|
76
|
+
if (!isConnected) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
78
|
+
style: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
backgroundColor: theme.colors.background
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Default usage-limit handling: replace the whole navigation tree with the
|
|
86
|
+
// dead-end error page so back-navigation cannot escape it.
|
|
87
|
+
if (isVisitorUsageLimitReached && !handleVisitorUsageLimitReached) {
|
|
88
|
+
return /*#__PURE__*/React.createElement(VisitorUsageLimit, null);
|
|
89
|
+
}
|
|
49
90
|
return /*#__PURE__*/React.createElement(NavigationIndependentTree, null, /*#__PURE__*/React.createElement(NavigationContainer, {
|
|
50
91
|
ref: navigationRef,
|
|
51
92
|
onReady: onNavigationReady
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NavigationContainer","NavigationIndependentTree","navigationRef","onNavigationReady","createNativeStackNavigator","useAuth","AmitySocialHomePage","PostDetail","CreatePost","CreateCommunity","useTheme","PostTypeChoiceModal","CreateStoryScreen","Toast","AmitySocialGlobalSearchPage","AmityMyCommunitiesSearchPage","CreateLivestream","PostTargetSelection","StoryTargetSelection","LivestreamPostTargetSelection","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","AmityCommunityProfilePage","EditPost","LivestreamPlayer","LivestreamTerminated","PollTargetSelection","PollPostComposer","CommunityAddCategory","CommunityAddMember","EditCommunity","CommunitySetting","CommunityMembership","CommunityPostPermission","CommunityStorySetting","CommunityNotificationSettingScreen","CommunityPostsNotificationSettingScreen","CommunityCommentsNotificationSettingScreen","CommunityStoriesNotificationSettingScreen","CommunityLivestreamsNotificationSettingScreen","CommunityPendingRequest","GlobalBan","ImageViewerScreen","VideoPlayerScreen","EditUserScreen","UserProfileScreen","UserRelationshipScreen","BlockedUsersScreen","UserPendingFollowRequests","Stack","AmitySocialUIKitV4Navigator","theme","isGlobalBan","
|
|
1
|
+
{"version":3,"names":["useEffect","useRef","NavigationContainer","NavigationIndependentTree","View","navigationRef","onNavigationReady","createNativeStackNavigator","useAuth","AmitySocialHomePage","PostDetail","CreatePost","CreateCommunity","useTheme","PostTypeChoiceModal","CreateStoryScreen","Toast","AmitySocialGlobalSearchPage","AmityMyCommunitiesSearchPage","CreateLivestream","PostTargetSelection","StoryTargetSelection","LivestreamPostTargetSelection","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","AmityCommunityProfilePage","EditPost","LivestreamPlayer","LivestreamTerminated","PollTargetSelection","PollPostComposer","CommunityAddCategory","CommunityAddMember","EditCommunity","CommunitySetting","CommunityMembership","CommunityPostPermission","CommunityStorySetting","CommunityNotificationSettingScreen","CommunityPostsNotificationSettingScreen","CommunityCommentsNotificationSettingScreen","CommunityStoriesNotificationSettingScreen","CommunityLivestreamsNotificationSettingScreen","CommunityPendingRequest","GlobalBan","VisitorUsageLimit","useBehaviour","ImageViewerScreen","VideoPlayerScreen","EditUserScreen","UserProfileScreen","UserRelationshipScreen","BlockedUsersScreen","UserPendingFollowRequests","Stack","AmitySocialUIKitV4Navigator","theme","isGlobalBan","isVisitorUsageLimitReached","isConnected","AmityGlobalBehavior","handleVisitorUsageLimitReached","hasHandledUsageLimit","current","React","createElement","style","flex","backgroundColor","colors","background","ref","onReady","Navigator","id","screenOptions","headerShown","headerShadowVisible","contentStyle","headerStyle","headerTitleStyle","color","base","Screen","name","component","options","animation","presentation"],"sourceRoot":"../../../../src","sources":["core/routes/AmityUIKitNavigator.tsx"],"mappings":"AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SACEC,mBAAmB,EACnBC,yBAAyB,QACpB,0BAA0B;AACjC,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC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AAC,aAAA,CAACnD,mBAAmB,MAAE,CAAC,eACvBkD,KAAA,CAAAC,aAAA,CAACjD,KAAK,MAAE,CACW,CACI,CAAC;AAEhC","ignoreList":[]}
|
package/lib/module/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BackHandler } from 'react-native';
|
|
2
2
|
import { AmityPageRenderer, AmityUiKitProvider, AmityUiKitSocial, ErrorBoundary, navigate } from './core';
|
|
3
|
-
import { AmityStoryTabComponent, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityExploreComponent, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, AmityCommunityProfilePage as CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, AmityPostComposerMode, AmityStoryTabComponentEnum, mediaAttachment, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage } from './social';
|
|
3
|
+
import { AmityStoryTabComponent, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityExploreComponent, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, AmityCommunityProfilePage as CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, AmityPostComposerMode, AmityStoryTabComponentEnum, mediaAttachment, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityCreateProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage, VisitorUsageLimit } from './social';
|
|
4
4
|
|
|
5
5
|
// Polyfill for BackHandler compatibility with older libraries like react-native-modalbox
|
|
6
6
|
// In React Native 0.65+, BackHandler.removeEventListener was removed
|
|
@@ -21,5 +21,5 @@ if (!BackHandler.removeEventListener) {
|
|
|
21
21
|
}
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
|
-
export { AmityUiKitProvider, ErrorBoundary, AmityUiKitSocial, AmityStoryTabComponent, AmityStoryTabComponentEnum, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityPostComposerMode, mediaAttachment, AmityExploreComponent, AmityPageRenderer, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, navigate };
|
|
24
|
+
export { AmityUiKitProvider, ErrorBoundary, AmityUiKitSocial, VisitorUsageLimit, AmityStoryTabComponent, AmityStoryTabComponentEnum, AmityCreateStoryPage, AmityDraftStoryPage, AmityViewStoryPage, AmitySocialHomePage, AmitySocialHomeTopNavigationComponent, AmityCommunitySearchResultComponent, AmitySocialGlobalSearchPage, AmityTopSearchBarComponent, AmityEmptyNewsFeedComponent, AmityGlobalFeedComponent, AmityMyCommunitiesComponent, AmityNewsFeedComponent, AmityPostContentComponent, AmityPostDetailPage, AmityPostTargetSelectionPageType, AmityCreatePostMenuComponent, AmityDetailedMediaAttachmentComponent, AmityMediaAttachmentComponent, AmityPostCommentComponent, AmityPostComposerPage, AmityPostEngagementActionsComponent, AmityPostTargetSelectionPage, AmityReactionListComponent, AmityStoryTargetSelectionPage, AmityUserSearchResultComponent, AmityMyCommunitiesSearchPage, AmityPostComposerMode, mediaAttachment, AmityExploreComponent, AmityPageRenderer, PostDetail, AmityUserProfilePage, AmityEditUserProfilePage, AmityCreateProfilePage, AmityUserRelationshipPage, AmityBlockedUsersPage, AmityAllCategoriesPage, AmityCommunitiesByCategoryPage, CommunityProfilePage, AmityCreateLivestreamPage, AmityLivestreamPostTargetSelectionPage, AmityLivestreamTerminatedPage, AmityLivestreamPlayerPage, AmityPollTargetSelectionPage, AmityPollPostComposerPage, AmityCommunityFeedComponent, AmityCommunityHeaderComponent, AmityCommunityImageFeedComponent, AmityCommunityVideoFeedComponent, AmityThumbnailActionComponent, AmityPostEngagementContentComponent, AmityPostTargetType, AmityCommunitySetupPage, AmityCommunityAddCategoryPage, AmityCommunityAddMemberPage, AmityCommunityPendingRequestPage, AmityCommunitySettingPage, AmityCommunityMembershipPage, AmityCommunityPostPermissionPage, AmityCommunityStorySettingPage, AmityCommunityNotificationSettingPage, AmityCommunityPostsNotificationSettingPage, AmityCommunityCommentsNotificationSettingPage, AmityCommunityStoriesNotificationSettingPage, AmityCommunityLivestreamsNotificationSettingPage, AmityCommunityPinnedPostComponent, AmityPendingPostListComponent, AmityGlobalStoryTabWrapper, navigate };
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BackHandler","AmityPageRenderer","AmityUiKitProvider","AmityUiKitSocial","ErrorBoundary","navigate","AmityStoryTabComponent","AmityCreateStoryPage","AmityDraftStoryPage","AmityViewStoryPage","AmitySocialHomePage","AmitySocialHomeTopNavigationComponent","AmityCommunitySearchResultComponent","AmitySocialGlobalSearchPage","AmityTopSearchBarComponent","AmityEmptyNewsFeedComponent","AmityGlobalFeedComponent","AmityMyCommunitiesComponent","AmityNewsFeedComponent","AmityPostContentComponent","AmityPostDetailPage","AmityPostTargetSelectionPageType","AmityCreatePostMenuComponent","AmityDetailedMediaAttachmentComponent","AmityMediaAttachmentComponent","AmityPostCommentComponent","AmityPostComposerPage","AmityPostEngagementActionsComponent","AmityPostTargetSelectionPage","AmityReactionListComponent","AmityStoryTargetSelectionPage","AmityUserSearchResultComponent","AmityMyCommunitiesSearchPage","AmityExploreComponent","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","AmityCommunityProfilePage","CommunityProfilePage","AmityCreateLivestreamPage","AmityLivestreamPostTargetSelectionPage","AmityLivestreamTerminatedPage","AmityLivestreamPlayerPage","AmityPollTargetSelectionPage","AmityPollPostComposerPage","AmityCommunityFeedComponent","AmityCommunityHeaderComponent","AmityCommunityImageFeedComponent","AmityCommunityVideoFeedComponent","AmityThumbnailActionComponent","AmityPostEngagementContentComponent","AmityPostTargetType","AmityCommunitySetupPage","AmityCommunityAddCategoryPage","AmityCommunityAddMemberPage","AmityCommunityPendingRequestPage","AmityCommunitySettingPage","AmityCommunityMembershipPage","AmityCommunityPostPermissionPage","AmityCommunityStorySettingPage","AmityCommunityNotificationSettingPage","AmityCommunityPostsNotificationSettingPage","AmityCommunityCommentsNotificationSettingPage","AmityCommunityStoriesNotificationSettingPage","AmityCommunityLivestreamsNotificationSettingPage","AmityCommunityPinnedPostComponent","AmityPendingPostListComponent","AmityGlobalStoryTabWrapper","AmityPostComposerMode","AmityStoryTabComponentEnum","mediaAttachment","PostDetail","AmityUserProfilePage","AmityEditUserProfilePage","AmityUserRelationshipPage","AmityBlockedUsersPage","removeEventListener","listeners","Map","originalAddEventListener","addEventListener","eventName","handler","subscription","set","_eventName","get","remove","delete"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,cAAc;AAC1C,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,EAChBC,aAAa,EACbC,QAAQ,QACH,QAAQ;AACf,SACEC,sBAAsB,EACtBC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,EAClBC,mBAAmB,EACnBC,qCAAqC,EACrCC,mCAAmC,EACnCC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,wBAAwB,EACxBC,2BAA2B,EAC3BC,sBAAsB,EACtBC,yBAAyB,EACzBC,mBAAmB,EACnBC,gCAAgC,EAChCC,4BAA4B,EAC5BC,qCAAqC,EACrCC,6BAA6B,EAC7BC,yBAAyB,EACzBC,qBAAqB,EACrBC,mCAAmC,EACnCC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,4BAA4B,EAC5BC,qBAAqB,EACrBC,sBAAsB,EACtBC,8BAA8B,EAC9BC,yBAAyB,IAAIC,oBAAoB,EACjDC,yBAAyB,EACzBC,sCAAsC,EACtCC,6BAA6B,EAC7BC,yBAAyB,EACzBC,4BAA4B,EAC5BC,yBAAyB,EACzBC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,gCAAgC,EAChCC,gCAAgC,EAChCC,6BAA6B,EAC7BC,mCAAmC,EACnCC,mBAAmB,EACnBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,gCAAgC,EAChCC,yBAAyB,EACzBC,4BAA4B,EAC5BC,gCAAgC,EAChCC,8BAA8B,EAC9BC,qCAAqC,EACrCC,0CAA0C,EAC1CC,6CAA6C,EAC7CC,4CAA4C,EAC5CC,gDAAgD,EAChDC,iCAAiC,EACjCC,6BAA6B,EAC7BC,0BAA0B,EAC1BC,qBAAqB,EACrBC,0BAA0B,EAC1BC,eAAe,EACfC,UAAU,EACVC,oBAAoB,EACpBC,wBAAwB,EACxBC,yBAAyB,EACzBC,qBAAqB,
|
|
1
|
+
{"version":3,"names":["BackHandler","AmityPageRenderer","AmityUiKitProvider","AmityUiKitSocial","ErrorBoundary","navigate","AmityStoryTabComponent","AmityCreateStoryPage","AmityDraftStoryPage","AmityViewStoryPage","AmitySocialHomePage","AmitySocialHomeTopNavigationComponent","AmityCommunitySearchResultComponent","AmitySocialGlobalSearchPage","AmityTopSearchBarComponent","AmityEmptyNewsFeedComponent","AmityGlobalFeedComponent","AmityMyCommunitiesComponent","AmityNewsFeedComponent","AmityPostContentComponent","AmityPostDetailPage","AmityPostTargetSelectionPageType","AmityCreatePostMenuComponent","AmityDetailedMediaAttachmentComponent","AmityMediaAttachmentComponent","AmityPostCommentComponent","AmityPostComposerPage","AmityPostEngagementActionsComponent","AmityPostTargetSelectionPage","AmityReactionListComponent","AmityStoryTargetSelectionPage","AmityUserSearchResultComponent","AmityMyCommunitiesSearchPage","AmityExploreComponent","AmityAllCategoriesPage","AmityCommunitiesByCategoryPage","AmityCommunityProfilePage","CommunityProfilePage","AmityCreateLivestreamPage","AmityLivestreamPostTargetSelectionPage","AmityLivestreamTerminatedPage","AmityLivestreamPlayerPage","AmityPollTargetSelectionPage","AmityPollPostComposerPage","AmityCommunityFeedComponent","AmityCommunityHeaderComponent","AmityCommunityImageFeedComponent","AmityCommunityVideoFeedComponent","AmityThumbnailActionComponent","AmityPostEngagementContentComponent","AmityPostTargetType","AmityCommunitySetupPage","AmityCommunityAddCategoryPage","AmityCommunityAddMemberPage","AmityCommunityPendingRequestPage","AmityCommunitySettingPage","AmityCommunityMembershipPage","AmityCommunityPostPermissionPage","AmityCommunityStorySettingPage","AmityCommunityNotificationSettingPage","AmityCommunityPostsNotificationSettingPage","AmityCommunityCommentsNotificationSettingPage","AmityCommunityStoriesNotificationSettingPage","AmityCommunityLivestreamsNotificationSettingPage","AmityCommunityPinnedPostComponent","AmityPendingPostListComponent","AmityGlobalStoryTabWrapper","AmityPostComposerMode","AmityStoryTabComponentEnum","mediaAttachment","PostDetail","AmityUserProfilePage","AmityEditUserProfilePage","AmityCreateProfilePage","AmityUserRelationshipPage","AmityBlockedUsersPage","VisitorUsageLimit","removeEventListener","listeners","Map","originalAddEventListener","addEventListener","eventName","handler","subscription","set","_eventName","get","remove","delete"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"AAAA,SAASA,WAAW,QAAQ,cAAc;AAC1C,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,EAChBC,aAAa,EACbC,QAAQ,QACH,QAAQ;AACf,SACEC,sBAAsB,EACtBC,oBAAoB,EACpBC,mBAAmB,EACnBC,kBAAkB,EAClBC,mBAAmB,EACnBC,qCAAqC,EACrCC,mCAAmC,EACnCC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,2BAA2B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AyB,EACzBC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,gCAAgC,EAChCC,gCAAgC,EAChCC,6BAA6B,EAC7BC,mCAAmC,EACnCC,mBAAmB,EACnBC,uBAAuB,EACvBC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,gCAAgC,EAChCC,yBAAyB,EACzBC,4BAA4B,EAC5BC,gCAAgC,EAChCC,8BAA8B,EAC9BC,qCAAqC,EACrCC,0CAA0C,EAC1CC,6CAA6C,EAC7CC,4CAA4C,EAC5CC,gDAAgD,EAChDC,iCAAiC,EACjCC,6BAA6B,EAC7BC,0BAA0B,EAC1B7D,QAAQ","ignoreList":[]}
|
|
@@ -17,6 +17,7 @@ import { useToast } from '../../../../core/stores/slices/toastSlice';
|
|
|
17
17
|
import { lock } from '../../../../core/assets/icons';
|
|
18
18
|
import { Typography } from '../../../../core/components/Typography/Typography';
|
|
19
19
|
import { MAX_MENTION_USERS } from '../../../../core/constants';
|
|
20
|
+
import useAuth from '../../../../core/hooks/useAuth';
|
|
20
21
|
const commentListLimit = 8;
|
|
21
22
|
const CommentList = ({
|
|
22
23
|
postId,
|
|
@@ -26,6 +27,11 @@ const CommentList = ({
|
|
|
26
27
|
withAvatar,
|
|
27
28
|
disabledComment
|
|
28
29
|
}) => {
|
|
30
|
+
// Web parity: visitors never see the comment composer
|
|
31
|
+
const {
|
|
32
|
+
isVisitorOrBot
|
|
33
|
+
} = useAuth();
|
|
34
|
+
const hideComposer = disabledInteraction || isVisitorOrBot;
|
|
29
35
|
const styles = useStyles();
|
|
30
36
|
const theme = useTheme();
|
|
31
37
|
const onNextPageRef = useRef(null);
|
|
@@ -211,7 +217,7 @@ const CommentList = ({
|
|
|
211
217
|
style: styles.closeIcon,
|
|
212
218
|
xml: closeIcon(theme.colors.baseShade2),
|
|
213
219
|
width: 20
|
|
214
|
-
})))), !
|
|
220
|
+
})))), !hideComposer && (disabledComment ? /*#__PURE__*/React.createElement(View, {
|
|
215
221
|
style: styles.disabledCommentWrap
|
|
216
222
|
}, /*#__PURE__*/React.createElement(SvgXml, {
|
|
217
223
|
width: 20,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Alert","FlatList","Keyboard","Text","TouchableOpacity","View","useEffect","useState","useRef","memo","CommentRepository","CommentListItem","createComment","createReplyComment","deleteCommentById","useStyles","useTheme","closeIcon","SvgXml","usePaginatorApi","isAmityAd","CommentAdComponent","useMention","replaceTriggerValues","MyAvatar","useToast","lock","Typography","MAX_MENTION_USERS","commentListLimit","CommentList","postId","postType","disabledInteraction","onNavigate","withAvatar","disabledComment","styles","theme","onNextPageRef","commentList","setCommentList","loadingComments","setLoadingComments","replyUserName","setReplyUserName","replyCommentId","setReplyCommentId","inputMessage","setInputMessage","mentionNames","setMentionNames","mentionsPosition","setMentionsPosition","inputBarHeight","setInputBarHeight","showCommentErrorToast","renderInput","renderSuggestions","value","onChange","setMentionUsers","user","prev","some","mentionedUser","id","length","alert","text","setMentionPosition","position","itemWithAds","items","placement","pageSize","getItemId","item","commentId","getComments","dataTypes","matchType","values","referenceId","referenceType","limit","error","loading","data","hasNextPage","onNextPage","queryComment","current","mentionTokenRegex","activeUserIds","Set","match","exec","add","filter","has","userId","comments","formattedCommentList","map","_item$creator","_item$creator2","_item$creator3","_item$metadata","formattedUserObject","creator","displayName","avatarFileId","dataType","myReactions","reactions","updatedAt","editedAt","createdAt","childrenComment","children","childrenNumber","mentionPosition","metadata","mentioned","onDeleteComment","isDeleted","prevCommentList","updatedCommentList","handleClickReply","onCloseReply","handleSend","trim","comment","name","dismiss","renderFooterComponent","React","createElement","style","commentListFooter","type","suggestionContainer","bottom","onLayout","e","nativeEvent","layout","height","replyLabelWrap","replyLabel","userNameLabel","onPress","xml","colors","baseShade2","width","disabledCommentWrap","color","Body","disabledCommentText","inputWrap","inputContainer","multiline","scrollEnabled","textInput","lineHeight","placeholder","placeholderTextColor","baseShade3","disabled","postBtn","postBtnText","postDisabledBtn","root","keyboardShouldPersistTaps","contentContainerStyle","listContent","renderItem","ad","onDelete","commentDetail","onClickReply","keyExtractor","index","adId","ListEmptyComponent","emptyContainer","emptyText","onEndReachedThreshold","onEndReached"],"sourceRoot":"../../../../../../src","sources":["social/components/Social/CommentList/CommentList.tsx"],"mappings":"AAAA,SACEA,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,SAAaC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,OAAO;AAE7D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,OAAOC,eAAe,MAAM,oCAAoC;AAChE,SACEC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,QACZ,iCAAiC;AACxC,SAASC,SAAS,QAAQ,UAAU;AAEpC,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,SAAS,QAAQ,2CAA2C;AACrE,OAAOC,kBAAkB,MAAM,6CAA6C;AAC5E,OAAOC,UAAU,MAAM,2BAA2B;AAClD,SAASC,oBAAoB,QAAQ,kCAAkC;AACvE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,2CAA2C;AACpE,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,UAAU,QAAQ,mDAAmD;AAC9E,SAASC,iBAAiB,QAAQ,4BAA4B;AA4B9D,MAAMC,gBAAgB,GAAG,CAAC;AAE1B,MAAMC,WAAiC,GAAGA,CAAC;EACzCC,MAAM;EACNC,QAAQ;EACRC,mBAAmB;EACnBC,UAAU;EACVC,UAAU;EACVC;AACF,CAAC,KAAK;EACJ,MAAMC,MAAM,GAAGtB,SAAS,CAAC,CAAC;EAC1B,MAAMuB,KAAK,GAAGtB,QAAQ,CAAC,CAAe;EACtC,MAAMuB,aAAa,GAAG/B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,OAAO,IAAIrD,aAAa,CAACqD,OAAO,CAAC;EAAE,CACtE,CAAC,EACD4C,qBAAqB,CAAC,CACnB,CAAC;AAEX,CAAC;AAED,4BAAe/H,IAAI,CAACqB,WAAW,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["Alert","FlatList","Keyboard","Text","TouchableOpacity","View","useEffect","useState","useRef","memo","CommentRepository","CommentListItem","createComment","createReplyComment","deleteCommentById","useStyles","useTheme","closeIcon","SvgXml","usePaginatorApi","isAmityAd","CommentAdComponent","useMention","replaceTriggerValues","MyAvatar","useToast","lock","Typography","MAX_MENTION_USERS","useAuth","commentListLimit","CommentList","postId","postType","disabledInteraction","onNavigate","withAvatar","disabledComment","isVisitorOrBot","hideComposer","styles","theme","onNextPageRef","commentList","setCommentList","loadingComments","setLoadingComments","replyUserName","setReplyUserName","replyCommentId","setReplyCommentId","inputMessage","setInputMessage","mentionNames","setMentionNames","mentionsPosition","setMentionsPosition","inputBarHeight","setInputBarHeight","showCommentErrorToast","renderInput","renderSuggestions","value","onChange","setMentionUsers","user","prev","some","mentionedUser","id","length","alert","text","setMentionPosition","position","itemWithAds","items","placement","pageSize","getItemId","item","commentId","getComments","dataTypes","matchType","values","referenceId","referenceType","limit","error","loading","data","hasNextPage","onNextPage","queryComment","current","mentionTokenRegex","activeUserIds","Set","match","exec","add","filter","has","userId","comments","formattedCommentList","map","_item$creator","_item$creator2","_item$creator3","_item$metadata","formattedUserObject","creator","displayName","avatarFileId","dataType","myReactions","reactions","updatedAt","editedAt","createdAt","childrenComment","children","childrenNumber","mentionPosition","metadata","mentioned","onDeleteComment","isDeleted","prevCommentList","updatedCommentList","handleClickReply","onCloseReply","handleSend","trim","comment","name","dismiss","renderFooterComponent","React","createElement","style","commentListFooter","type","suggestionContainer","bottom","onLayout","e","nativeEvent","layout","height","replyLabelWrap","replyLabel","userNameLabel","onPress","xml","colors","baseShade2","width","disabledCommentWrap","color","Body","disabledCommentText","inputWrap","inputContainer","multiline","scrollEnabled","textInput","lineHeight","placeholder","placeholderTextColor","baseShade3","disabled","postBtn","postBtnText","postDisabledBtn","root","keyboardShouldPersistTaps","contentContainerStyle","listContent","renderItem","ad","onDelete","commentDetail","onClickReply","keyExtractor","index","adId","ListEmptyComponent","emptyContainer","emptyText","onEndReachedThreshold","onEndReached"],"sourceRoot":"../../../../../../src","sources":["social/components/Social/CommentList/CommentList.tsx"],"mappings":"AAAA,SACEA,KAAK,EACLC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,SAAaC,SAAS,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,IAAI,QAAQ,OAAO;AAE7D,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,OAAOC,eAAe,MAAM,oCAAoC;AAChE,SACEC,aAAa,EACbC,kBAAkB,EAClBC,iBAAiB,QACZ,iCAAiC;AACxC,SAASC,SAAS,QAAQ,UAAU;AAEpC,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,SAASC,SAAS,QAAQ,mCAAmC;AAC7D,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,eAAe,QAAQ,6BAA6B;AAC7D,SAASC,SAAS,QAAQ,2CAA2C;AACrE,OAAOC,kBAAkB,MAAM,6CAA6C;AAC5E,OAAOC,UAAU,MAAM,2BAA2B;AAClD,SAASC,oBAAoB,QAAQ,kCAAkC;AACvE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,QAAQ,QAAQ,2CAA2C;AACpE,SAASC,IAAI,QAAQ,+BAA+B;AACpD,SAASC,UAAU,QAAQ,mDAAmD;AAC9E,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,OAAOC,OAAO,MAAM,gCAAgC;AA4BpD,MAAMC,gBAAgB,GAAG,CAAC;AAE1B,MAAMC,WAAiC,GAAGA,CAAC;EACzCC,MAAM;EACNC,QAAQ;EACRC,mBAAmB;EACnBC,UAAU;EACVC,UAAU;EACVC;AACF,CA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C,aAAA,CAACxI,IAAI;MAACyI,KAAK,EAAEtG,MAAM,CAACsJ;IAAe,gBACjClD,KAAA,CAAAC,aAAA,CAAC1I,IAAI;MAAC2I,KAAK,EAAEtG,MAAM,CAACuJ;IAAU,GAAC,iBAAqB,CAChD,CAET;IACDC,qBAAqB,EAAE,GAAI;IAC3BC,YAAY,EAAEA,CAAA,KAAMvJ,aAAa,CAACqD,OAAO,IAAIrD,aAAa,CAACqD,OAAO,CAAC;EAAE,CACtE,CAAC,EACD4C,qBAAqB,CAAC,CACnB,CAAC;AAEX,CAAC;AAED,4BAAelI,IAAI,CAACsB,WAAW,CAAC","ignoreList":[]}
|
|
@@ -15,6 +15,7 @@ import ReplyCommentList from '../../legacy/Social/ReplyCommentList';
|
|
|
15
15
|
import AmityReactionListComponent from '../../../features/reaction/components/List';
|
|
16
16
|
import { CommentRepository } from '@amityco/ts-sdk-react-native';
|
|
17
17
|
import { useTimeDifference } from '../../../hooks/useTimeDifference';
|
|
18
|
+
import { useGlobalBehavior } from '../../../hooks/useGlobalBehavior';
|
|
18
19
|
import { LinkPreview } from '../../PreviewLink';
|
|
19
20
|
import { Typography } from '../../../../core/components/Typography/Typography';
|
|
20
21
|
import { pen, report, trash, unreport } from '../../../../core/assets/icons';
|
|
@@ -221,6 +222,18 @@ const CommentListItem = ({
|
|
|
221
222
|
const onHandleReply = () => {
|
|
222
223
|
onClickReply && onClickReply(user, commentId);
|
|
223
224
|
};
|
|
225
|
+
|
|
226
|
+
// Web parity: visitors see Like/Reply but taps show the sign-in toast
|
|
227
|
+
const {
|
|
228
|
+
handleGlobalBehavior,
|
|
229
|
+
isVisitorOrBot
|
|
230
|
+
} = useGlobalBehavior();
|
|
231
|
+
const onPressLike = () => handleGlobalBehavior({
|
|
232
|
+
defaultBehavior: addReactionToComment
|
|
233
|
+
});
|
|
234
|
+
const onPressReply = () => handleGlobalBehavior({
|
|
235
|
+
defaultBehavior: onHandleReply
|
|
236
|
+
});
|
|
224
237
|
const onPressCommentReaction = () => {
|
|
225
238
|
setIsReactionListVisible(true);
|
|
226
239
|
};
|
|
@@ -274,16 +287,16 @@ const CommentListItem = ({
|
|
|
274
287
|
}, timeDifference), (editedAt !== createdAt || isEditComment) && /*#__PURE__*/React.createElement(Typography.Caption, {
|
|
275
288
|
style: styles.headerTextTime
|
|
276
289
|
}, ' ', "(edited)")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
277
|
-
onPress:
|
|
290
|
+
onPress: onPressLike,
|
|
278
291
|
style: styles.likeBtn
|
|
279
292
|
}, /*#__PURE__*/React.createElement(Typography.CaptionBold, {
|
|
280
293
|
style: isLike ? styles.likedText : styles.btnText
|
|
281
294
|
}, "Like")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
282
|
-
onPress: disabledComment ? undefined :
|
|
295
|
+
onPress: disabledComment ? undefined : onPressReply,
|
|
283
296
|
style: styles.likeBtn
|
|
284
297
|
}, /*#__PURE__*/React.createElement(Typography.CaptionBold, {
|
|
285
298
|
style: styles.btnText
|
|
286
|
-
}, "Reply")), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
299
|
+
}, "Reply")), !isVisitorOrBot && /*#__PURE__*/React.createElement(TouchableOpacity, {
|
|
287
300
|
onPress: openModal
|
|
288
301
|
}, /*#__PURE__*/React.createElement(SvgXml, {
|
|
289
302
|
xml: threeDots(theme.colors.baseShade2),
|