@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
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from 'react-native-paper';
|
|
3
|
+
export const useStyles = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
gap: 8,
|
|
8
|
+
flexDirection: 'column',
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
justifyContent: 'center'
|
|
11
|
+
},
|
|
12
|
+
choosePhotoLabel: {
|
|
13
|
+
color: theme.colors.primary
|
|
14
|
+
},
|
|
15
|
+
disabled: {
|
|
16
|
+
opacity: 0.5
|
|
17
|
+
},
|
|
18
|
+
imageContainer: {
|
|
19
|
+
width: 64,
|
|
20
|
+
height: 64,
|
|
21
|
+
borderRadius: 100,
|
|
22
|
+
position: 'relative'
|
|
23
|
+
},
|
|
24
|
+
image: {
|
|
25
|
+
width: '100%',
|
|
26
|
+
height: '100%',
|
|
27
|
+
borderRadius: 100,
|
|
28
|
+
objectFit: 'cover'
|
|
29
|
+
},
|
|
30
|
+
iconContainer: {
|
|
31
|
+
inset: 0,
|
|
32
|
+
zIndex: 10,
|
|
33
|
+
padding: 20,
|
|
34
|
+
borderRadius: 100,
|
|
35
|
+
position: 'absolute',
|
|
36
|
+
backgroundColor: theme.colors.transparentBlack
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
return {
|
|
40
|
+
styles,
|
|
41
|
+
theme
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","useTheme","useStyles","theme","styles","create","container","gap","flexDirection","alignItems","justifyContent","choosePhotoLabel","color","colors","primary","disabled","opacity","imageContainer","width","height","borderRadius","position","image","objectFit","iconContainer","inset","zIndex","padding","backgroundColor","transparentBlack"],"sourceRoot":"../../../../../../../../src","sources":["social/features/user/CreateProfile/components/ImageUpload/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAG7C,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAMC,KAAK,GAAGF,QAAQ,CAAa,CAAC;EAEpC,MAAMG,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,GAAG,EAAE,CAAC;MACNC,aAAa,EAAE,QAAQ;MACvBC,UAAU,EAAE,QAAQ;MACpBC,cAAc,EAAE;IAClB,CAAC;IACDC,gBAAgB,EAAE;MAChBC,KAAK,EAAET,KAAK,CAACU,MAAM,CAACC;IACtB,CAAC;IACDC,QAAQ,EAAE;MACRC,OAAO,EAAE;IACX,CAAC;IACDC,cAAc,EAAE;MACdC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE,EAAE;MACVC,YAAY,EAAE,GAAG;MACjBC,QAAQ,EAAE;IACZ,CAAC;IACDC,KAAK,EAAE;MACLJ,KAAK,EAAE,MAAM;MACbC,MAAM,EAAE,MAAM;MACdC,YAAY,EAAE,GAAG;MACjBG,SAAS,EAAE;IACb,CAAC;IACDC,aAAa,EAAE;MACbC,KAAK,EAAE,CAAC;MACRC,MAAM,EAAE,EAAE;MACVC,OAAO,EAAE,EAAE;MACXP,YAAY,EAAE,GAAG;MACjBC,QAAQ,EAAE,UAAU;MACpBO,eAAe,EAAEzB,KAAK,CAACU,MAAM,CAACgB;IAChC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEzB,MAAM;IAAED;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { View } from 'react-native';
|
|
2
|
+
import { useStyles } from './styles';
|
|
3
|
+
import BackButton from '../../../../../elements/BackButton';
|
|
4
|
+
import { Title } from '../../../../../elements';
|
|
5
|
+
import { ElementID, PageID } from '../../../../../enums';
|
|
6
|
+
export function TopBar({
|
|
7
|
+
onCancel,
|
|
8
|
+
disabled
|
|
9
|
+
}) {
|
|
10
|
+
const {
|
|
11
|
+
styles
|
|
12
|
+
} = useStyles();
|
|
13
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
14
|
+
style: styles.container
|
|
15
|
+
}, /*#__PURE__*/React.createElement(BackButton, {
|
|
16
|
+
disabled: disabled,
|
|
17
|
+
pageId: PageID.create_user_profile_page,
|
|
18
|
+
onPress: onCancel
|
|
19
|
+
}), /*#__PURE__*/React.createElement(Title, {
|
|
20
|
+
style: styles.title,
|
|
21
|
+
pageId: PageID.create_user_profile_page,
|
|
22
|
+
elementId: ElementID.title
|
|
23
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
24
|
+
style: styles.dummy
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=TopBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["View","useStyles","BackButton","Title","ElementID","PageID","TopBar","onCancel","disabled","styles","React","createElement","style","container","pageId","create_user_profile_page","onPress","title","elementId","dummy"],"sourceRoot":"../../../../../../../../src","sources":["social/features/user/CreateProfile/components/TopBar/TopBar.tsx"],"mappings":"AAAA,SAASA,IAAI,QAAQ,cAAc;AACnC,SAASC,SAAS,QAAQ,UAAU;AACpC,OAAOC,UAAU,MAAM,oCAAoC;AAC3D,SAASC,KAAK,QAAQ,yBAAyB;AAC/C,SAASC,SAAS,EAAEC,MAAM,QAAQ,sBAAsB;AAOxD,OAAO,SAASC,MAAMA,CAAC;EAAEC,QAAQ;EAAEC;AAAsB,CAAC,EAAE;EAC1D,MAAM;IAAEC;EAAO,CAAC,GAAGR,SAAS,CAAC,CAAC;EAE9B,oBACES,KAAA,CAAAC,aAAA,CAACX,IAAI;IAACY,KAAK,EAAEH,MAAM,CAACI;EAAU,gBAC5BH,KAAA,CAAAC,aAAA,CAACT,UAAU;IACTM,QAAQ,EAAEA,QAAS;IACnBM,MAAM,EAAET,MAAM,CAACU,wBAAyB;IACxCC,OAAO,EAAET;EAAS,CACnB,CAAC,eACFG,KAAA,CAAAC,aAAA,CAACR,KAAK;IACJS,KAAK,EAAEH,MAAM,CAACQ,KAAM;IACpBH,MAAM,EAAET,MAAM,CAACU,wBAAyB;IACxCG,SAAS,EAAEd,SAAS,CAACa;EAAM,CAC5B,CAAC,eACFP,KAAA,CAAAC,aAAA,CAACX,IAAI;IAACY,KAAK,EAAEH,MAAM,CAACU;EAAM,CAAE,CACxB,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TopBar"],"sourceRoot":"../../../../../../../../src","sources":["social/features/user/CreateProfile/components/TopBar/index.ts"],"mappings":"AAAA,SAASA,MAAM,QAAQ,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from 'react-native-paper';
|
|
3
|
+
export const useStyles = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
gap: 8,
|
|
8
|
+
paddingVertical: 16,
|
|
9
|
+
flexDirection: 'row',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
paddingHorizontal: 12,
|
|
12
|
+
justifyContent: 'space-between',
|
|
13
|
+
backgroundColor: theme.colors.background
|
|
14
|
+
},
|
|
15
|
+
title: {
|
|
16
|
+
flex: 1,
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
color: theme.colors.base
|
|
19
|
+
},
|
|
20
|
+
dummy: {
|
|
21
|
+
width: 24,
|
|
22
|
+
height: 24
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
return {
|
|
26
|
+
styles,
|
|
27
|
+
theme
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","useTheme","useStyles","theme","styles","create","container","gap","paddingVertical","flexDirection","alignItems","paddingHorizontal","justifyContent","backgroundColor","colors","background","title","flex","textAlign","color","base","dummy","width","height"],"sourceRoot":"../../../../../../../../src","sources":["social/features/user/CreateProfile/components/TopBar/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AAEzC,SAASC,QAAQ,QAAQ,oBAAoB;AAE7C,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAMC,KAAK,GAAGF,QAAQ,CAAa,CAAC;EAEpC,MAAMG,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,GAAG,EAAE,CAAC;MACNC,eAAe,EAAE,EAAE;MACnBC,aAAa,EAAE,KAAK;MACpBC,UAAU,EAAE,QAAQ;MACpBC,iBAAiB,EAAE,EAAE;MACrBC,cAAc,EAAE,eAAe;MAC/BC,eAAe,EAAEV,KAAK,CAACW,MAAM,CAACC;IAChC,CAAC;IACDC,KAAK,EAAE;MACLC,IAAI,EAAE,CAAC;MACPC,SAAS,EAAE,QAAQ;MACnBC,KAAK,EAAEhB,KAAK,CAACW,MAAM,CAACM;IACtB,CAAC;IACDC,KAAK,EAAE;MACLC,KAAK,EAAE,EAAE;MACTC,MAAM,EAAE;IACV;EACF,CAAC,CAAC;EAEF,OAAO;IAAEnB,MAAM;IAAED;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../src","sources":["social/features/user/CreateProfile/components/index.ts"],"mappings":"AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../../../src","sources":["social/features/user/CreateProfile/hooks/index.ts"],"mappings":"AAAA,cAAc,oBAAoB","ignoreList":[]}
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import * as z from 'zod';
|
|
2
|
+
import { useEffect, useRef } from 'react';
|
|
3
|
+
import { useStyles } from '../styles';
|
|
4
|
+
import { useForm } from 'react-hook-form';
|
|
5
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
6
|
+
import { useMutation } from '@tanstack/react-query';
|
|
7
|
+
import { Client, UserRepository } from '@amityco/ts-sdk-react-native';
|
|
8
|
+
import { useToast } from '../../../../../core/stores/slices/toastSlice';
|
|
9
|
+
import { CHARACTER_LIMIT, ERROR_CODE } from '../../../../../core/constants';
|
|
10
|
+
import { PageID } from '../../../../enums';
|
|
11
|
+
import { useAmityPage } from '../../../../hooks';
|
|
12
|
+
import { useNetInfo } from '@react-native-community/netinfo';
|
|
13
|
+
import { useUpload } from '../../../../../core/hooks';
|
|
14
|
+
|
|
15
|
+
// A visitor session is read-only, so the avatar cannot be uploaded while the
|
|
16
|
+
// page is shown (still a visitor). Instead we hold the locally picked image
|
|
17
|
+
// (just its uri) and upload it AFTER Client.login signs the user in.
|
|
18
|
+
|
|
19
|
+
// The success toast is hosted inside this page's tree. onCreated typically
|
|
20
|
+
// tears that tree down (host swaps to the signed-in app), which would unmount
|
|
21
|
+
// the toast before it finishes fading in. Defer onCreated so the success toast
|
|
22
|
+
// stays visible across the transition. Sized to the toast fade-in + a brief
|
|
23
|
+
// display window.
|
|
24
|
+
const ON_CREATED_DELAY = 800;
|
|
25
|
+
const schema = z.object({
|
|
26
|
+
image: z.custom().nullish(),
|
|
27
|
+
displayName: z.string().min(1).max(CHARACTER_LIMIT.USER_DISPLAY_NAME),
|
|
28
|
+
description: z.string().max(CHARACTER_LIMIT.USER_DESCRIPTION).optional()
|
|
29
|
+
});
|
|
30
|
+
// The provider owns visitor login; this page performs the real signed-in login
|
|
31
|
+
// itself on save (mirroring the Web UIKit's CreateUserProfilePage). Logging in
|
|
32
|
+
// with a userId creates the user on the network if it does not exist yet and
|
|
33
|
+
// sets the initial display name — the visitor -> signed-in transition. The host
|
|
34
|
+
// then settles the session by passing the returned userId to the provider.
|
|
35
|
+
export const useCreateProfile = ({
|
|
36
|
+
userId,
|
|
37
|
+
authToken,
|
|
38
|
+
onCreated
|
|
39
|
+
}) => {
|
|
40
|
+
const {
|
|
41
|
+
styles,
|
|
42
|
+
theme
|
|
43
|
+
} = useStyles();
|
|
44
|
+
const {
|
|
45
|
+
accessibilityId
|
|
46
|
+
} = useAmityPage({
|
|
47
|
+
pageId: PageID.create_user_profile_page
|
|
48
|
+
});
|
|
49
|
+
const {
|
|
50
|
+
showToast,
|
|
51
|
+
hideToast
|
|
52
|
+
} = useToast();
|
|
53
|
+
const {
|
|
54
|
+
isConnected
|
|
55
|
+
} = useNetInfo();
|
|
56
|
+
const {
|
|
57
|
+
uploadImage
|
|
58
|
+
} = useUpload();
|
|
59
|
+
|
|
60
|
+
// Tracks the deferred onCreated call so it can be cleared if the page
|
|
61
|
+
// unmounts before it fires.
|
|
62
|
+
const onCreatedTimer = useRef(undefined);
|
|
63
|
+
useEffect(() => () => clearTimeout(onCreatedTimer.current), []);
|
|
64
|
+
const {
|
|
65
|
+
watch,
|
|
66
|
+
control,
|
|
67
|
+
handleSubmit,
|
|
68
|
+
formState: {
|
|
69
|
+
isValid,
|
|
70
|
+
isSubmitting
|
|
71
|
+
}
|
|
72
|
+
} = useForm({
|
|
73
|
+
resolver: zodResolver(schema),
|
|
74
|
+
mode: 'onChange',
|
|
75
|
+
defaultValues: {
|
|
76
|
+
image: null,
|
|
77
|
+
displayName: '',
|
|
78
|
+
description: ''
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
const sessionHandler = {
|
|
82
|
+
sessionWillRenewAccessToken(renewal) {
|
|
83
|
+
renewal.renew();
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
const {
|
|
87
|
+
mutateAsync
|
|
88
|
+
} = useMutation({
|
|
89
|
+
mutationKey: ['create-user-profile', userId],
|
|
90
|
+
onMutate: () => {
|
|
91
|
+
// Long-running toast shown while the SDK calls run, matching the loading
|
|
92
|
+
// toast used by other composers (e.g. PollPostComposer).
|
|
93
|
+
showToast({
|
|
94
|
+
message: 'Creating profile...',
|
|
95
|
+
type: 'loading'
|
|
96
|
+
});
|
|
97
|
+
},
|
|
98
|
+
mutationFn: async data => {
|
|
99
|
+
var _data$image;
|
|
100
|
+
let loginParam = {
|
|
101
|
+
userId,
|
|
102
|
+
displayName: data.displayName || undefined
|
|
103
|
+
};
|
|
104
|
+
if (authToken && authToken.length > 0) {
|
|
105
|
+
loginParam = {
|
|
106
|
+
...loginParam,
|
|
107
|
+
authToken
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
await Client.login(loginParam, sessionHandler);
|
|
111
|
+
|
|
112
|
+
// The avatar upload is a write, which a visitor session cannot perform.
|
|
113
|
+
// Now that login has signed the user in, upload the locally picked image
|
|
114
|
+
// and then apply the remaining profile fields (about + avatar).
|
|
115
|
+
let avatarFileId;
|
|
116
|
+
if ((_data$image = data.image) !== null && _data$image !== void 0 && _data$image.uri) {
|
|
117
|
+
var _uploaded$data;
|
|
118
|
+
const uploaded = await uploadImage({
|
|
119
|
+
file: data.image.uri
|
|
120
|
+
});
|
|
121
|
+
avatarFileId = uploaded === null || uploaded === void 0 || (_uploaded$data = uploaded.data) === null || _uploaded$data === void 0 || (_uploaded$data = _uploaded$data[0]) === null || _uploaded$data === void 0 ? void 0 : _uploaded$data.fileId;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// displayName is set during login; apply the remaining fields here.
|
|
125
|
+
const payload = {
|
|
126
|
+
description: data.description || undefined,
|
|
127
|
+
avatarFileId
|
|
128
|
+
};
|
|
129
|
+
if (payload.description != null || payload.avatarFileId != null) {
|
|
130
|
+
await UserRepository.updateUser(userId, payload);
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
userId,
|
|
134
|
+
displayName: data.displayName || ''
|
|
135
|
+
};
|
|
136
|
+
},
|
|
137
|
+
onSuccess: createdUser => {
|
|
138
|
+
// Replace the loading toast in-place (no hideToast first — a hide->show
|
|
139
|
+
// double dispatch can cancel the success toast's fade-in before it shows).
|
|
140
|
+
showToast({
|
|
141
|
+
type: 'success',
|
|
142
|
+
message: 'Successfully created your profile!'
|
|
143
|
+
});
|
|
144
|
+
// Defer the transition briefly so the toast starts showing here before the
|
|
145
|
+
// host swaps screens. The toast state is shared (Redux), so it keeps
|
|
146
|
+
// displaying on the destination (signed-in) screen too.
|
|
147
|
+
onCreatedTimer.current = setTimeout(() => onCreated === null || onCreated === void 0 ? void 0 : onCreated(createdUser), ON_CREATED_DELAY);
|
|
148
|
+
},
|
|
149
|
+
onError: error => {
|
|
150
|
+
var _error$message;
|
|
151
|
+
hideToast();
|
|
152
|
+
if ((_error$message = error.message) !== null && _error$message !== void 0 && _error$message.includes(ERROR_CODE.BLOCKED_WORD)) {
|
|
153
|
+
showToast({
|
|
154
|
+
type: 'informative',
|
|
155
|
+
message: "Your profile wasn't saved as it contains a blocked word."
|
|
156
|
+
});
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
showToast({
|
|
160
|
+
type: 'informative',
|
|
161
|
+
message: 'Failed to save your profile. Please try again.'
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
const onSubmit = async data => {
|
|
166
|
+
if (isConnected === false) {
|
|
167
|
+
showToast({
|
|
168
|
+
type: 'informative',
|
|
169
|
+
message: 'Failed to save your profile. Please try again.'
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
await mutateAsync(data);
|
|
174
|
+
};
|
|
175
|
+
return {
|
|
176
|
+
styles,
|
|
177
|
+
theme,
|
|
178
|
+
watch,
|
|
179
|
+
control,
|
|
180
|
+
handleSubmit,
|
|
181
|
+
onSubmit,
|
|
182
|
+
isValid,
|
|
183
|
+
isSubmitting,
|
|
184
|
+
accessibilityId
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
//# sourceMappingURL=useCreateProfile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["z","useEffect","useRef","useStyles","useForm","zodResolver","useMutation","Client","UserRepository","useToast","CHARACTER_LIMIT","ERROR_CODE","PageID","useAmityPage","useNetInfo","useUpload","ON_CREATED_DELAY","schema","object","image","custom","nullish","displayName","string","min","max","USER_DISPLAY_NAME","description","USER_DESCRIPTION","optional","useCreateProfile","userId","authToken","onCreated","styles","theme","accessibilityId","pageId","create_user_profile_page","showToast","hideToast","isConnected","uploadImage","onCreatedTimer","undefined","clearTimeout","current","watch","control","handleSubmit","formState","isValid","isSubmitting","resolver","mode","defaultValues","sessionHandler","sessionWillRenewAccessToken","renewal","renew","mutateAsync","mutationKey","onMutate","message","type","mutationFn","data","_data$image","loginParam","length","login","avatarFileId","uri","_uploaded$data","uploaded","file","fileId","payload","updateUser","onSuccess","createdUser","setTimeout","onError","error","_error$message","includes","BLOCKED_WORD","onSubmit"],"sourceRoot":"../../../../../../../src","sources":["social/features/user/CreateProfile/hooks/useCreateProfile.ts"],"mappings":"AAAA,OAAO,KAAKA,CAAC,MAAM,KAAK;AACxB,SAASC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AACzC,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,OAAO,QAAQ,iBAAiB;AACzC,SAASC,WAAW,QAAQ,yBAAyB;AACrD,SAASC,WAAW,QAAQ,uBAAuB;AACnD,SAASC,MAAM,EAAEC,cAAc,QAAQ,8BAA8B;AACrE,SAASC,QAAQ,QAAQ,8CAA8C;AACvE,SAASC,eAAe,EAAEC,UAAU,QAAQ,+BAA+B;AAC3E,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,YAAY,QAAQ,mBAAmB;AAChD,SAASC,UAAU,QAAQ,iCAAiC;AAC5D,SAASC,SAAS,QAAQ,2BAA2B;;AAErD;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,MAAMC,gBAAgB,GAAG,GAAG;AAE5B,M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E,aAAa;QACnBD,OAAO,EAAE;MACX,CAAC,CAAC;MACF;IACF;IACA,MAAMH,WAAW,CAACM,IAAI,CAAC;EACzB,CAAC;EAED,OAAO;IACLhC,MAAM;IACNC,KAAK;IACLY,KAAK;IACLC,OAAO;IACPC,YAAY;IACZsC,QAAQ;IACRpC,OAAO;IACPC,YAAY;IACZhB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["CreateProfile"],"sourceRoot":"../../../../../../src","sources":["social/features/user/CreateProfile/index.ts"],"mappings":"AAAA,SAASA,aAAa,QAAQ,iBAAiB","ignoreList":[]}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { StyleSheet } from 'react-native';
|
|
2
|
+
import { useTheme } from 'react-native-paper';
|
|
3
|
+
export const useStyles = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const styles = StyleSheet.create({
|
|
6
|
+
container: {
|
|
7
|
+
flex: 1,
|
|
8
|
+
backgroundColor: theme.colors.background
|
|
9
|
+
},
|
|
10
|
+
keyboardAvoidingView: {
|
|
11
|
+
flex: 1
|
|
12
|
+
},
|
|
13
|
+
contentContainer: {
|
|
14
|
+
paddingVertical: 16
|
|
15
|
+
},
|
|
16
|
+
inputContainer: {
|
|
17
|
+
paddingHorizontal: 16,
|
|
18
|
+
paddingTop: 24
|
|
19
|
+
},
|
|
20
|
+
submitButtonContainer: {
|
|
21
|
+
padding: 16,
|
|
22
|
+
borderTopWidth: 1,
|
|
23
|
+
paddingBottom: 16,
|
|
24
|
+
borderTopColor: theme.colors.baseShade4,
|
|
25
|
+
backgroundColor: theme.colors.background
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
styles,
|
|
30
|
+
theme
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["StyleSheet","useTheme","useStyles","theme","styles","create","container","flex","backgroundColor","colors","background","keyboardAvoidingView","contentContainer","paddingVertical","inputContainer","paddingHorizontal","paddingTop","submitButtonContainer","padding","borderTopWidth","paddingBottom","borderTopColor","baseShade4"],"sourceRoot":"../../../../../../src","sources":["social/features/user/CreateProfile/styles.ts"],"mappings":"AAAA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,QAAQ,QAAQ,oBAAoB;AAG7C,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAAM;EAC7B,MAAMC,KAAK,GAAGF,QAAQ,CAAa,CAAC;EAEpC,MAAMG,MAAM,GAAGJ,UAAU,CAACK,MAAM,CAAC;IAC/BC,SAAS,EAAE;MACTC,IAAI,EAAE,CAAC;MACPC,eAAe,EAAEL,KAAK,CAACM,MAAM,CAACC;IAChC,CAAC;IACDC,oBAAoB,EAAE;MACpBJ,IAAI,EAAE;IACR,CAAC;IACDK,gBAAgB,EAAE;MAChBC,eAAe,EAAE;IACnB,CAAC;IACDC,cAAc,EAAE;MACdC,iBAAiB,EAAE,EAAE;MACrBC,UAAU,EAAE;IACd,CAAC;IACDC,qBAAqB,EAAE;MACrBC,OAAO,EAAE,EAAE;MACXC,cAAc,EAAE,CAAC;MACjBC,aAAa,EAAE,EAAE;MACjBC,cAAc,EAAElB,KAAK,CAACM,MAAM,CAACa,UAAU;MACvCd,eAAe,EAAEL,KAAK,CAACM,MAAM,CAACC;IAChC;EACF,CAAC,CAAC;EAEF,OAAO;IAAEN,MAAM;IAAED;EAAM,CAAC;AAC1B,CAAC","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import { formatCount } from '../../../../../../../core/utils/time';
|
|
|
4
4
|
import { useStyles } from '../styles';
|
|
5
5
|
import { useNavigation } from '@react-navigation/native';
|
|
6
6
|
import { useBehaviour } from '../../../../../../providers/BehaviourProvider';
|
|
7
|
-
import { useBlockUser } from '../../../../../../hooks';
|
|
7
|
+
import { useBlockUser, useGlobalBehavior } from '../../../../../../hooks';
|
|
8
8
|
import useAuth from '../../../../../../../core/hooks/useAuth';
|
|
9
9
|
import { useFollowUser } from '../../../../../../hooks/queries/useFollowUser';
|
|
10
10
|
import useSocialSettings from '../../../../../../../core/hooks/useSocialSettings';
|
|
@@ -37,6 +37,9 @@ export function useHeader(user) {
|
|
|
37
37
|
const {
|
|
38
38
|
showToast
|
|
39
39
|
} = useToast();
|
|
40
|
+
const {
|
|
41
|
+
handleGlobalBehavior
|
|
42
|
+
} = useGlobalBehavior();
|
|
40
43
|
const {
|
|
41
44
|
followUser,
|
|
42
45
|
unfollowUser,
|
|
@@ -59,7 +62,9 @@ export function useHeader(user) {
|
|
|
59
62
|
};
|
|
60
63
|
const handleFollow = () => {
|
|
61
64
|
if (!(user !== null && user !== void 0 && user.userId)) return;
|
|
62
|
-
|
|
65
|
+
handleGlobalBehavior({
|
|
66
|
+
defaultBehavior: () => followUser(user.userId)
|
|
67
|
+
});
|
|
63
68
|
};
|
|
64
69
|
const handleUnfollow = () => {
|
|
65
70
|
if (!(user !== null && user !== void 0 && user.userId)) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useFollowInfo","formatCount","useStyles","useNavigation","useBehaviour","useBlockUser","useAuth","useFollowUser","useSocialSettings","useBottomSheet","useToast","unfollow","TOAST","useHeader","user","BADGE_SIZE","BADGE_GAP","navigation","AmityUserProfileHeaderComponentBehavior","unBlockUser","client","socialSettings","isPrivateNetwork","userPrivacySetting","openBottomSheet","closeBottomSheet","bottomSheetHeight","showToast","followUser","unfollowUser","isLoading","isFollowLoading","followInfo","userId","enabled","isMyProfile","isBlockedByMe","status","isFollowing","isPending","pendingFollowRequestCount","pendingCount","showPendingBanner","handleUnblock","displayName","handleFollow","handleUnfollow","confirm","followingActions","label","iconProps","xml","testID","accessibilityLabel","onPress","badgePosition","setBadgePosition","styles","theme","badgePaddingRight","isBrand","badgeTop","top","badgeLeft","left","onTextLayout","e","lines","nativeEvent","length","lastLine","y","height","width","navigateToPendingFollowRequests","goToPendingFollowRequestPage","navigate","navigateToRelationship","tab","type","message","USER","RELATIONSHIP","FOLLOW_TO_INTERACT","goToUserRelationshipPage","selectedTab","push","badgeSize","showBadge","brandBadgeAccessibilityLabel","followingCount","followerCount"],"sourceRoot":"../../../../../../../../../src","sources":["social/features/user/Profile/components/Header/hooks/useHeader.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,OAAO;AAEhC,SAASC,aAAa,QAAQ,iCAAiC;AAC/D,SAASC,WAAW,QAAQ,sCAAsC;AAClE,SAASC,SAAS,QAAQ,WAAW;AACrC,SAASC,aAAa,QAAQ,0BAA0B;AAIxD,SAASC,YAAY,QAAQ,+CAA+C;AAC5E,SAASC,YAAY,QAAQ,yBAAyB;
|
|
1
|
+
{"version":3,"names":["useState","useFollowInfo","formatCount","useStyles","useNavigation","useBehaviour","useBlockUser","useGlobalBehavior","useAuth","useFollowUser","useSocialSettings","useBottomSheet","useToast","unfollow","TOAST","useHeader","user","BADGE_SIZE","BADGE_GAP","navigation","AmityUserProfileHeaderComponentBehavior","unBlockUser","client","socialSettings","isPrivateNetwork","userPrivacySetting","openBottomSheet","closeBottomSheet","bottomSheetHeight","showToast","handleGlobalBehavior","followUser","unfollowUser","isLoading","isFollowLoading","followInfo","userId","enabled","isMyProfile","isBlockedByMe","status","isFollowing","isPending","pendingFollowRequestCount","pendingCount","showPendingBanner","handleUnblock","displayName","handleFollow","defaultBehavior","handleUnfollow","confirm","followingActions","label","iconProps","xml","testID","accessibilityLabel","onPress","badgePosition","setBadgePosition","styles","theme","badgePaddingRight","isBrand","badgeTop","top","badgeLeft","left","onTextLayout","e","lines","nativeEvent","length","lastLine","y","height","width","navigateToPendingFollowRequests","goToPendingFollowRequestPage","navigate","navigateToRelationship","tab","type","message","USER","RELATIONSHIP","FOLLOW_TO_INTERACT","goToUserRelationshipPage","selectedTab","push","badgeSize","showBadge","brandBadgeAccessibilityLabel","followingCount","followerCount"],"sourceRoot":"../../../../../../../../../src","sources":["social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/B,cAAc,uDAAuD;AACrE,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,iBAAiB;AAC/B,cAAc,4BAA4B;AAC1C,cAAc,wBAAwB;AACtC,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["social/hooks/index.ts"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,WAAW;AACzB,cAAc,kBAAkB;AAChC,cAAc,YAAY;AAC1B,cAAc,sBAAsB;AACpC,cAAc,WAAW;AACzB,cAAc,qBAAqB;AACnC,cAAc,kBAAkB;AAChC,cAAc,kBAAkB;AAChC,cAAc,iCAAiC;AAC/C,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,aAAa;AAC3B,cAAc,qBAAqB;AACnC,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,oBAAoB;AAClC,cAAc,qBAAqB;AACnC,cAAc,4BAA4B;AAC1C,cAAc,0BAA0B;AACxC,cAAc,iBAAiB;AAC/B,cAAc,uDAAuD;AACrE,cAAc,kBAAkB;AAChC,cAAc,uBAAuB;AACrC,cAAc,mBAAmB;AACjC,cAAc,iBAAiB;AAC/B,cAAc,4BAA4B;AAC1C,cAAc,wBAAwB;AACtC,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,uBAAuB;AACrC,cAAc,wBAAwB;AACtC,cAAc,qBAAqB","ignoreList":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useCallback } from 'react';
|
|
2
|
+
import useAuth from '../../core/hooks/useAuth';
|
|
3
|
+
import { useBehaviour } from '../providers/BehaviourProvider';
|
|
4
|
+
import { useToast } from '../../core/stores/slices/toastSlice';
|
|
5
|
+
import { VISITOR_USER_ACTION_TOAST } from '../../core/constants';
|
|
6
|
+
const TOAST_DURATION = 3000;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Mirrors the Web UIKit's useGlobalBehavior: gate a restricted action behind
|
|
10
|
+
* the visitor/bot check. For signed-in users the default behaviour runs; for
|
|
11
|
+
* visitors the AmityGlobalBehavior.handleVisitorUserAction override is
|
|
12
|
+
* called when provided, otherwise a "create an account or sign in" toast is
|
|
13
|
+
* shown.
|
|
14
|
+
*/
|
|
15
|
+
export const useGlobalBehavior = () => {
|
|
16
|
+
const {
|
|
17
|
+
isVisitorOrBot
|
|
18
|
+
} = useAuth();
|
|
19
|
+
const {
|
|
20
|
+
AmityGlobalBehavior
|
|
21
|
+
} = useBehaviour();
|
|
22
|
+
const {
|
|
23
|
+
showToast
|
|
24
|
+
} = useToast();
|
|
25
|
+
const handleGlobalBehavior = useCallback(({
|
|
26
|
+
defaultBehavior
|
|
27
|
+
}) => {
|
|
28
|
+
if (isVisitorOrBot) {
|
|
29
|
+
if (AmityGlobalBehavior !== null && AmityGlobalBehavior !== void 0 && AmityGlobalBehavior.handleVisitorUserAction) {
|
|
30
|
+
return AmityGlobalBehavior.handleVisitorUserAction();
|
|
31
|
+
}
|
|
32
|
+
return showToast({
|
|
33
|
+
message: VISITOR_USER_ACTION_TOAST,
|
|
34
|
+
type: 'informative',
|
|
35
|
+
duration: TOAST_DURATION
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return defaultBehavior === null || defaultBehavior === void 0 ? void 0 : defaultBehavior();
|
|
39
|
+
}, [isVisitorOrBot, AmityGlobalBehavior, showToast]);
|
|
40
|
+
return {
|
|
41
|
+
handleGlobalBehavior,
|
|
42
|
+
isVisitorOrBot
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=useGlobalBehavior.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useAuth","useBehaviour","useToast","VISITOR_USER_ACTION_TOAST","TOAST_DURATION","useGlobalBehavior","isVisitorOrBot","AmityGlobalBehavior","showToast","handleGlobalBehavior","defaultBehavior","handleVisitorUserAction","message","type","duration"],"sourceRoot":"../../../../src","sources":["social/hooks/useGlobalBehavior.ts"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,OAAOC,OAAO,MAAM,0BAA0B;AAC9C,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,QAAQ,QAAQ,qCAAqC;AAC9D,SAASC,yBAAyB,QAAQ,sBAAsB;AAEhE,MAAMC,cAAc,GAAG,IAAI;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAM;EACrC,MAAM;IAAEC;EAAe,CAAC,GAAGN,OAAO,CAAC,CAAC;EACpC,MAAM;IAAEO;EAAoB,CAAC,GAAGN,YAAY,CAAC,CAAC;EAC9C,MAAM;IAAEO;EAAU,CAAC,GAAGN,QAAQ,CAAC,CAAC;EAEhC,MAAMO,oBAAoB,GAAGV,WAAW,CACtC,CAAC;IAAEW;EAAkD,CAAC,KAAK;IACzD,IAAIJ,cAAc,EAAE;MAClB,IAAIC,mBAAmB,aAAnBA,mBAAmB,eAAnBA,mBAAmB,CAAEI,uBAAuB,EAAE;QAChD,OAAOJ,mBAAmB,CAACI,uBAAuB,CAAC,CAAC;MACtD;MACA,OAAOH,SAAS,CAAC;QACfI,OAAO,EAAET,yBAAyB;QAClCU,IAAI,EAAE,aAAa;QACnBC,QAAQ,EAAEV;MACZ,CAAC,CAAC;IACJ;IACA,OAAOM,eAAe,aAAfA,eAAe,uBAAfA,eAAe,CAAG,CAAC;EAC5B,CAAC,EACD,CAACJ,cAAc,EAAEC,mBAAmB,EAAEC,SAAS,CACjD,CAAC;EAED,OAAO;IAAEC,oBAAoB;IAAEH;EAAe,CAAC;AACjD,CAAC","ignoreList":[]}
|
|
@@ -7,11 +7,13 @@ export function usePostPermission({
|
|
|
7
7
|
community
|
|
8
8
|
}) {
|
|
9
9
|
const {
|
|
10
|
-
client
|
|
10
|
+
client,
|
|
11
|
+
isVisitorOrBot
|
|
11
12
|
} = useAuth();
|
|
12
13
|
const [hasPostPermission, setHasPostPermission] = useState(false);
|
|
13
14
|
const isOnlyAdminCanPost = (community === null || community === void 0 ? void 0 : community.postSetting) === CommunityPostSettings.ONLY_ADMIN_CAN_POST;
|
|
14
15
|
useEffect(() => {
|
|
16
|
+
if (isVisitorOrBot) return;
|
|
15
17
|
if (!(community !== null && community !== void 0 && community.communityId) || !(client !== null && client !== void 0 && client.userId)) return;
|
|
16
18
|
CommunityRepository.Membership.getMembers({
|
|
17
19
|
communityId: community.communityId,
|
|
@@ -24,7 +26,7 @@ export function usePostPermission({
|
|
|
24
26
|
const userRoles = (_data$find = data.find(member => member.userId === client.userId)) === null || _data$find === void 0 ? void 0 : _data$find.roles;
|
|
25
27
|
setHasPostPermission(isOnlyAdminCanPost ? isModerator(userRoles) : !!(community !== null && community !== void 0 && community.isJoined));
|
|
26
28
|
});
|
|
27
|
-
}, [community === null || community === void 0 ? void 0 : community.communityId, client === null || client === void 0 ? void 0 : client.userId, isOnlyAdminCanPost, community === null || community === void 0 ? void 0 : community.isJoined]);
|
|
29
|
+
}, [community === null || community === void 0 ? void 0 : community.communityId, client === null || client === void 0 ? void 0 : client.userId, isOnlyAdminCanPost, community === null || community === void 0 ? void 0 : community.isJoined, isVisitorOrBot]);
|
|
28
30
|
return hasPostPermission;
|
|
29
31
|
}
|
|
30
32
|
//# sourceMappingURL=usePostPermission.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["CommunityPostSettings","CommunityRepository","useEffect","useState","isModerator","useAuth","MemberRoles","usePostPermission","community","client","hasPostPermission","setHasPostPermission","isOnlyAdminCanPost","postSetting","ONLY_ADMIN_CAN_POST","communityId","userId","Membership","getMembers","limit","roles","ADMIN","COMMUNITY_MODERATOR","data","_data$find","userRoles","find","member","isJoined"],"sourceRoot":"../../../../src","sources":["social/hooks/usePostPermission.ts"],"mappings":"AAAA,SACEA,qBAAqB,EACrBC,mBAAmB,QACd,8BAA8B;AACrC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,WAAW,QAAQ,sBAAsB;AAClD,OAAOC,OAAO,MAAM,0BAA0B;AAC9C,SAASC,WAAW,QAAQ,sBAAsB;AAMlD,OAAO,SAASC,iBAAiBA,CAAC;EAAEC;AAAmC,CAAC,EAAE;EACxE,MAAM;IAAEC;
|
|
1
|
+
{"version":3,"names":["CommunityPostSettings","CommunityRepository","useEffect","useState","isModerator","useAuth","MemberRoles","usePostPermission","community","client","isVisitorOrBot","hasPostPermission","setHasPostPermission","isOnlyAdminCanPost","postSetting","ONLY_ADMIN_CAN_POST","communityId","userId","Membership","getMembers","limit","roles","ADMIN","COMMUNITY_MODERATOR","data","_data$find","userRoles","find","member","isJoined"],"sourceRoot":"../../../../src","sources":["social/hooks/usePostPermission.ts"],"mappings":"AAAA,SACEA,qBAAqB,EACrBC,mBAAmB,QACd,8BAA8B;AACrC,SAASC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,WAAW,QAAQ,sBAAsB;AAClD,OAAOC,OAAO,MAAM,0BAA0B;AAC9C,SAASC,WAAW,QAAQ,sBAAsB;AAMlD,OAAO,SAASC,iBAAiBA,CAAC;EAAEC;AAAmC,CAAC,EAAE;EACxE,MAAM;IAAEC,MAAM;IAAEC;EAAe,CAAC,GAAGL,OAAO,CAAC,CAAC;EAC5C,MAAM,CAACM,iBAAiB,EAAEC,oBAAoB,CAAC,GAAGT,QAAQ,CAAC,KAAK,CAAC;EAEjE,MAAMU,kBAAkB,GACtB,CAAAL,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEM,WAAW,MAAKd,qBAAqB,CAACe,mBAAmB;EAEtEb,SAAS,CAAC,MAAM;IACd,IAAIQ,cAAc,EAAE;IACpB,IAAI,EAACF,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEQ,WAAW,KAAI,EAACP,MAAM,aAANA,MAAM,eAANA,MAAM,CAAEQ,MAAM,GAAE;IAEhDhB,mBAAmB,CAACiB,UAAU,CAACC,UAAU,CACvC;MACEH,WAAW,EAAER,SAAS,CAACQ,WAAW;MAClCI,KAAK,EAAE,EAAE;MACTC,KAAK,EAAE,CAACf,WAAW,CAACgB,KAAK,EAAEhB,WAAW,CAACiB,mBAAmB;IAC5D,CAAC,EACD,CAAC;MAAEC;IAAK,CAAC,KAAK;MAAA,IAAAC,UAAA;MACZ,MAAMC,SAAS,IAAAD,UAAA,GAAGD,IAAI,CAACG,IAAI,CACxBC,MAAM,IAAKA,MAAM,CAACX,MAAM,KAAKR,MAAM,CAACQ,MACvC,CAAC,cAAAQ,UAAA,uBAFiBA,UAAA,CAEfJ,KAAK;MACRT,oBAAoB,CAClBC,kBAAkB,GAAGT,WAAW,CAACsB,SAAS,CAAC,GAAG,CAAC,EAAClB,SAAS,aAATA,SAAS,eAATA,SAAS,CAAEqB,QAAQ,CACrE,CAAC;IACH,CACF,CAAC;EACH,CAAC,EAAE,CACDrB,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEQ,WAAW,EACtBP,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEQ,MAAM,EACdJ,kBAAkB,EAClBL,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEqB,QAAQ,EACnBnB,cAAc,CACf,CAAC;EAEF,OAAOC,iBAAiB;AAC1B","ignoreList":[]}
|
|
@@ -5,14 +5,15 @@ import { checkStoryPermission, isAdmin } from '../utils/permissions';
|
|
|
5
5
|
export function useStoryPermission(communityId) {
|
|
6
6
|
var _socialSettings$story, _socialSettings$story2;
|
|
7
7
|
const {
|
|
8
|
-
client
|
|
8
|
+
client,
|
|
9
|
+
isVisitorOrBot
|
|
9
10
|
} = useAuth();
|
|
10
11
|
const {
|
|
11
12
|
socialSettings
|
|
12
13
|
} = useSocialSettings();
|
|
13
14
|
const user = useUser((client === null || client === void 0 ? void 0 : client.userId) || '');
|
|
14
15
|
const isGlobalAdmin = isAdmin(user === null || user === void 0 ? void 0 : user.roles);
|
|
15
|
-
const hasStoryPermission = !communityId ? socialSettings === null || socialSettings === void 0 || (_socialSettings$story = socialSettings.story) === null || _socialSettings$story === void 0 ? void 0 : _socialSettings$story.allowAllUserToCreateStory : (socialSettings === null || socialSettings === void 0 || (_socialSettings$story2 = socialSettings.story) === null || _socialSettings$story2 === void 0 ? void 0 : _socialSettings$story2.allowAllUserToCreateStory) || isGlobalAdmin || checkStoryPermission(client, communityId);
|
|
16
|
+
const hasStoryPermission = !isVisitorOrBot && (!communityId ? socialSettings === null || socialSettings === void 0 || (_socialSettings$story = socialSettings.story) === null || _socialSettings$story === void 0 ? void 0 : _socialSettings$story.allowAllUserToCreateStory : (socialSettings === null || socialSettings === void 0 || (_socialSettings$story2 = socialSettings.story) === null || _socialSettings$story2 === void 0 ? void 0 : _socialSettings$story2.allowAllUserToCreateStory) || isGlobalAdmin || checkStoryPermission(client, communityId));
|
|
16
17
|
return {
|
|
17
18
|
hasStoryPermission
|
|
18
19
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAuth","useUser","useSocialSettings","checkStoryPermission","isAdmin","useStoryPermission","communityId","_socialSettings$story","_socialSettings$story2","client","socialSettings","user","userId","isGlobalAdmin","roles","hasStoryPermission","story","allowAllUserToCreateStory"],"sourceRoot":"../../../../src","sources":["social/hooks/useStoryPermission.ts"],"mappings":"AAAA,OAAOA,OAAO,MAAM,0BAA0B;AAC9C,SAASC,OAAO,QAAQ,WAAW;AACnC,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,SAASC,oBAAoB,EAAEC,OAAO,QAAQ,sBAAsB;AAEpE,OAAO,SAASC,kBAAkBA,CAACC,WAAoB,EAAE;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EACvD,MAAM;IAAEC;
|
|
1
|
+
{"version":3,"names":["useAuth","useUser","useSocialSettings","checkStoryPermission","isAdmin","useStoryPermission","communityId","_socialSettings$story","_socialSettings$story2","client","isVisitorOrBot","socialSettings","user","userId","isGlobalAdmin","roles","hasStoryPermission","story","allowAllUserToCreateStory"],"sourceRoot":"../../../../src","sources":["social/hooks/useStoryPermission.ts"],"mappings":"AAAA,OAAOA,OAAO,MAAM,0BAA0B;AAC9C,SAASC,OAAO,QAAQ,WAAW;AACnC,OAAOC,iBAAiB,MAAM,oCAAoC;AAClE,SAASC,oBAAoB,EAAEC,OAAO,QAAQ,sBAAsB;AAEpE,OAAO,SAASC,kBAAkBA,CAACC,WAAoB,EAAE;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EACvD,MAAM;IAAEC,MAAM;IAAEC;EAAe,CAAC,GAAGV,OAAO,CAAC,CAAC;EAC5C,MAAM;IAAEW;EAAe,CAAC,GAAGT,iBAAiB,CAAC,CAAC;EAC9C,MAAMU,IAAI,GAAGX,OAAO,CAAC,CAAAQ,MAAM,aAANA,MAAM,uBAANA,MAAM,CAAEI,MAAM,KAAI,EAAE,CAAC;EAE1C,MAAMC,aAAa,GAAGV,OAAO,CAACQ,IAAI,aAAJA,IAAI,uBAAJA,IAAI,CAAEG,KAAK,CAAC;EAE1C,MAAMC,kBAAkB,GACtB,CAACN,cAAc,KACd,CAACJ,WAAW,GACTK,cAAc,aAAdA,cAAc,gBAAAJ,qBAAA,GAAdI,cAAc,CAAEM,KAAK,cAAAV,qBAAA,uBAArBA,qBAAA,CAAuBW,yBAAyB,GAChD,CAAAP,cAAc,aAAdA,cAAc,gBAAAH,sBAAA,GAAdG,cAAc,CAAEM,KAAK,cAAAT,sBAAA,uBAArBA,sBAAA,CAAuBU,yBAAyB,KAChDJ,aAAa,IACbX,oBAAoB,CAACM,MAAM,EAAEH,WAAW,CAAC,CAAC;EAEhD,OAAO;IAAEU;EAAmB,CAAC;AAC/B","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@ export { default as AmityCreateStoryPage } from './features/story/Create';
|
|
|
2
2
|
export { default as AmityDraftStoryPage } from './features/story/Draft/Draft';
|
|
3
3
|
export { default as AmityViewStoryPage } from './features/story/View/View';
|
|
4
4
|
export { default as AmitySocialHomePage } from './screens/SocialHomePage';
|
|
5
|
+
export { VisitorUsageLimit } from './screens/VisitorUsageLimit';
|
|
5
6
|
export { default as AmitySocialGlobalSearchPage } from './screens/SocialGlobalSearch';
|
|
6
7
|
export { default as AmityPostDetailPage } from './features/post/Detail';
|
|
7
8
|
export { default as AmityPostTargetSelectionPage } from './features/post/TargetSelection';
|
|
@@ -17,7 +18,7 @@ export { default as AmityLivestreamPlayerPage } from './features/livestream/Play
|
|
|
17
18
|
|
|
18
19
|
// User
|
|
19
20
|
|
|
20
|
-
export { UserRelationshipScreen as AmityUserRelationshipPage, EditUserScreen as AmityEditUserProfilePage, UserProfileScreen as AmityUserProfilePage, BlockedUsersScreen as AmityBlockedUsersPage, UserPendingFollowRequests as AmityUserPendingFollowRequestsPage } from './screens';
|
|
21
|
+
export { UserRelationshipScreen as AmityUserRelationshipPage, EditUserScreen as AmityEditUserProfilePage, CreateUserProfileScreen as AmityCreateProfilePage, UserProfileScreen as AmityUserProfilePage, BlockedUsersScreen as AmityBlockedUsersPage, UserPendingFollowRequests as AmityUserPendingFollowRequestsPage } from './screens';
|
|
21
22
|
export { Header as AmityUserProfileHeaderComponent } from './features/user/Profile/components/Header';
|
|
22
23
|
export { Feed as AmityUserFeedComponent } from './features/user/Profile/components/Feed';
|
|
23
24
|
export { ImageFeed as AmityUserImageFeedComponent } from './features/user/Profile/components/ImageFeed';
|