@replyke/core 5.1.6-beta.29 → 5.1.6-beta.30
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/dist/esm/hooks/users/follows/index.d.ts +1 -0
- package/dist/esm/hooks/users/follows/index.js +1 -0
- package/dist/esm/hooks/users/follows/index.js.map +1 -1
- package/dist/esm/hooks/users/follows/useFollowManager.d.ts +9 -0
- package/dist/{cjs/hooks/comments/useReplies.js → esm/hooks/users/follows/useFollowManager.js} +64 -56
- package/dist/esm/hooks/users/follows/useFollowManager.js.map +1 -0
- package/dist/esm/hooks/users/index.d.ts +1 -1
- package/dist/esm/hooks/users/index.js +1 -1
- package/dist/esm/hooks/users/index.js.map +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/config/axios.d.ts +0 -3
- package/dist/cjs/config/axios.js +0 -17
- package/dist/cjs/config/axios.js.map +0 -1
- package/dist/cjs/config/useAxiosPrivate.d.ts +0 -2
- package/dist/cjs/config/useAxiosPrivate.js +0 -82
- package/dist/cjs/config/useAxiosPrivate.js.map +0 -1
- package/dist/cjs/constants/reportReasons.d.ts +0 -12
- package/dist/cjs/constants/reportReasons.js +0 -15
- package/dist/cjs/constants/reportReasons.js.map +0 -1
- package/dist/cjs/context/comment-section-context.d.ts +0 -9
- package/dist/cjs/context/comment-section-context.js +0 -28
- package/dist/cjs/context/comment-section-context.js.map +0 -1
- package/dist/cjs/context/entity-context.d.ts +0 -9
- package/dist/cjs/context/entity-context.js +0 -38
- package/dist/cjs/context/entity-context.js.map +0 -1
- package/dist/cjs/context/index.d.ts +0 -4
- package/dist/cjs/context/index.js +0 -12
- package/dist/cjs/context/index.js.map +0 -1
- package/dist/cjs/context/replyke-context.d.ts +0 -10
- package/dist/cjs/context/replyke-context.js +0 -23
- package/dist/cjs/context/replyke-context.js.map +0 -1
- package/dist/cjs/context/replyke-store-context.d.ts +0 -13
- package/dist/cjs/context/replyke-store-context.js +0 -37
- package/dist/cjs/context/replyke-store-context.js.map +0 -1
- package/dist/cjs/helpers/addCommentsToTree.d.ts +0 -3
- package/dist/cjs/helpers/addCommentsToTree.js +0 -61
- package/dist/cjs/helpers/addCommentsToTree.js.map +0 -1
- package/dist/cjs/helpers/addNotificationsMessages.d.ts +0 -3
- package/dist/cjs/helpers/addNotificationsMessages.js +0 -91
- package/dist/cjs/helpers/addNotificationsMessages.js.map +0 -1
- package/dist/cjs/helpers/getPublicFileUrl.d.ts +0 -2
- package/dist/cjs/helpers/getPublicFileUrl.js +0 -10
- package/dist/cjs/helpers/getPublicFileUrl.js.map +0 -1
- package/dist/cjs/helpers/getUserName.d.ts +0 -2
- package/dist/cjs/helpers/getUserName.js +0 -23
- package/dist/cjs/helpers/getUserName.js.map +0 -1
- package/dist/cjs/helpers/markCommentAsFailed.d.ts +0 -2
- package/dist/cjs/helpers/markCommentAsFailed.js +0 -29
- package/dist/cjs/helpers/markCommentAsFailed.js.map +0 -1
- package/dist/cjs/helpers/removeCommentFromTree.d.ts +0 -2
- package/dist/cjs/helpers/removeCommentFromTree.js +0 -44
- package/dist/cjs/helpers/removeCommentFromTree.js.map +0 -1
- package/dist/cjs/helpers/safeMergeStyleProps.d.ts +0 -1
- package/dist/cjs/helpers/safeMergeStyleProps.js +0 -23
- package/dist/cjs/helpers/safeMergeStyleProps.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/index.d.ts +0 -3
- package/dist/cjs/hooks/app-notifications/index.js +0 -12
- package/dist/cjs/hooks/app-notifications/index.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useAppNotifications.d.ts +0 -21
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js +0 -108
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +0 -1
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.d.ts +0 -13
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js +0 -266
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js.map +0 -1
- package/dist/cjs/hooks/auth/index.d.ts +0 -1
- package/dist/cjs/hooks/auth/index.js +0 -9
- package/dist/cjs/hooks/auth/index.js.map +0 -1
- package/dist/cjs/hooks/auth/useAuth.d.ts +0 -32
- package/dist/cjs/hooks/auth/useAuth.js +0 -180
- package/dist/cjs/hooks/auth/useAuth.js.map +0 -1
- package/dist/cjs/hooks/comments/index.d.ts +0 -12
- package/dist/cjs/hooks/comments/index.js +0 -31
- package/dist/cjs/hooks/comments/index.js.map +0 -1
- package/dist/cjs/hooks/comments/useCommentSection.d.ts +0 -2
- package/dist/cjs/hooks/comments/useCommentSection.js +0 -9
- package/dist/cjs/hooks/comments/useCommentSection.js.map +0 -1
- package/dist/cjs/hooks/comments/useCommentSectionData.d.ts +0 -60
- package/dist/cjs/hooks/comments/useCommentSectionData.js +0 -407
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +0 -1
- package/dist/cjs/hooks/comments/useCommentVotes.d.ts +0 -11
- package/dist/cjs/hooks/comments/useCommentVotes.js +0 -234
- package/dist/cjs/hooks/comments/useCommentVotes.js.map +0 -1
- package/dist/cjs/hooks/comments/useCreateComment.d.ts +0 -14
- package/dist/cjs/hooks/comments/useCreateComment.js +0 -90
- package/dist/cjs/hooks/comments/useCreateComment.js.map +0 -1
- package/dist/cjs/hooks/comments/useDeleteComment.d.ts +0 -4
- package/dist/cjs/hooks/comments/useDeleteComment.js +0 -70
- package/dist/cjs/hooks/comments/useDeleteComment.js.map +0 -1
- package/dist/cjs/hooks/comments/useDownvoteComment.d.ts +0 -5
- package/dist/cjs/hooks/comments/useDownvoteComment.js +0 -71
- package/dist/cjs/hooks/comments/useDownvoteComment.js.map +0 -1
- package/dist/cjs/hooks/comments/useEntityComments.d.ts +0 -22
- package/dist/cjs/hooks/comments/useEntityComments.js +0 -196
- package/dist/cjs/hooks/comments/useEntityComments.js.map +0 -1
- package/dist/cjs/hooks/comments/useFetchComment.d.ts +0 -9
- package/dist/cjs/hooks/comments/useFetchComment.js +0 -74
- package/dist/cjs/hooks/comments/useFetchComment.js.map +0 -1
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.d.ts +0 -9
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js +0 -75
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js.map +0 -1
- package/dist/cjs/hooks/comments/useFetchManyComments.d.ts +0 -12
- package/dist/cjs/hooks/comments/useFetchManyComments.js +0 -88
- package/dist/cjs/hooks/comments/useFetchManyComments.js.map +0 -1
- package/dist/cjs/hooks/comments/useGroupReplies.d.ts +0 -8
- package/dist/cjs/hooks/comments/useGroupReplies.js +0 -24
- package/dist/cjs/hooks/comments/useGroupReplies.js.map +0 -1
- package/dist/cjs/hooks/comments/useProfileComments.d.ts +0 -18
- package/dist/cjs/hooks/comments/useProfileComments.js +0 -179
- package/dist/cjs/hooks/comments/useProfileComments.js.map +0 -1
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.d.ts +0 -5
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.js +0 -71
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.js.map +0 -1
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.d.ts +0 -5
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.js +0 -71
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.js.map +0 -1
- package/dist/cjs/hooks/comments/useReplies.d.ts +0 -13
- package/dist/cjs/hooks/comments/useReplies.js.map +0 -1
- package/dist/cjs/hooks/comments/useUpdateComment.d.ts +0 -6
- package/dist/cjs/hooks/comments/useUpdateComment.js +0 -73
- package/dist/cjs/hooks/comments/useUpdateComment.js.map +0 -1
- package/dist/cjs/hooks/comments/useUpvoteComment.d.ts +0 -5
- package/dist/cjs/hooks/comments/useUpvoteComment.js +0 -71
- package/dist/cjs/hooks/comments/useUpvoteComment.js.map +0 -1
- package/dist/cjs/hooks/crypto/index.d.ts +0 -1
- package/dist/cjs/hooks/crypto/index.js +0 -9
- package/dist/cjs/hooks/crypto/index.js.map +0 -1
- package/dist/cjs/hooks/crypto/useSignTestingJwt.d.ts +0 -6
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js +0 -74
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js.map +0 -1
- package/dist/cjs/hooks/entities/index.d.ts +0 -10
- package/dist/cjs/hooks/entities/index.js +0 -27
- package/dist/cjs/hooks/entities/index.js.map +0 -1
- package/dist/cjs/hooks/entities/useCreateEntity.d.ts +0 -18
- package/dist/cjs/hooks/entities/useCreateEntity.js +0 -79
- package/dist/cjs/hooks/entities/useCreateEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useDeleteEntity.d.ts +0 -4
- package/dist/cjs/hooks/entities/useDeleteEntity.js +0 -72
- package/dist/cjs/hooks/entities/useDeleteEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useDownvoteEntity.d.ts +0 -5
- package/dist/cjs/hooks/entities/useDownvoteEntity.js +0 -71
- package/dist/cjs/hooks/entities/useDownvoteEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useEntity.d.ts +0 -2
- package/dist/cjs/hooks/entities/useEntity.js +0 -9
- package/dist/cjs/hooks/entities/useEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useEntityData.d.ts +0 -24
- package/dist/cjs/hooks/entities/useEntityData.js +0 -246
- package/dist/cjs/hooks/entities/useEntityData.js.map +0 -1
- package/dist/cjs/hooks/entities/useEntityVotes.d.ts +0 -11
- package/dist/cjs/hooks/entities/useEntityVotes.js +0 -241
- package/dist/cjs/hooks/entities/useEntityVotes.js.map +0 -1
- package/dist/cjs/hooks/entities/useFetchEntity.d.ts +0 -5
- package/dist/cjs/hooks/entities/useFetchEntity.js +0 -70
- package/dist/cjs/hooks/entities/useFetchEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.d.ts +0 -6
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js +0 -75
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js.map +0 -1
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.d.ts +0 -5
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js +0 -74
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js.map +0 -1
- package/dist/cjs/hooks/entities/useIncrementEntityViews.d.ts +0 -5
- package/dist/cjs/hooks/entities/useIncrementEntityViews.js +0 -73
- package/dist/cjs/hooks/entities/useIncrementEntityViews.js.map +0 -1
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.d.ts +0 -5
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.js +0 -71
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.js.map +0 -1
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.d.ts +0 -5
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.js +0 -71
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.js.map +0 -1
- package/dist/cjs/hooks/entities/useUpdateEntity.d.ts +0 -19
- package/dist/cjs/hooks/entities/useUpdateEntity.js +0 -77
- package/dist/cjs/hooks/entities/useUpdateEntity.js.map +0 -1
- package/dist/cjs/hooks/entities/useUpvoteEntity.d.ts +0 -5
- package/dist/cjs/hooks/entities/useUpvoteEntity.js +0 -71
- package/dist/cjs/hooks/entities/useUpvoteEntity.js.map +0 -1
- package/dist/cjs/hooks/entity-lists/index.d.ts +0 -4
- package/dist/cjs/hooks/entity-lists/index.js +0 -11
- package/dist/cjs/hooks/entity-lists/index.js.map +0 -1
- package/dist/cjs/hooks/entity-lists/useEntityList.d.ts +0 -53
- package/dist/cjs/hooks/entity-lists/useEntityList.js +0 -358
- package/dist/cjs/hooks/entity-lists/useEntityList.js.map +0 -1
- package/dist/cjs/hooks/entity-lists/useEntityListActions.d.ts +0 -51
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js +0 -196
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js.map +0 -1
- package/dist/cjs/hooks/entity-lists/useInfusedData.d.ts +0 -8
- package/dist/cjs/hooks/entity-lists/useInfusedData.js +0 -130
- package/dist/cjs/hooks/entity-lists/useInfusedData.js.map +0 -1
- package/dist/cjs/hooks/lists/index.d.ts +0 -3
- package/dist/cjs/hooks/lists/index.js +0 -14
- package/dist/cjs/hooks/lists/index.js.map +0 -1
- package/dist/cjs/hooks/lists/useIsEntitySaved.d.ts +0 -5
- package/dist/cjs/hooks/lists/useIsEntitySaved.js +0 -83
- package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +0 -1
- package/dist/cjs/hooks/lists/useLists.d.ts +0 -36
- package/dist/cjs/hooks/lists/useLists.js +0 -239
- package/dist/cjs/hooks/lists/useLists.js.map +0 -1
- package/dist/cjs/hooks/lists/useListsActions.d.ts +0 -21
- package/dist/cjs/hooks/lists/useListsActions.js +0 -341
- package/dist/cjs/hooks/lists/useListsActions.js.map +0 -1
- package/dist/cjs/hooks/projects/index.d.ts +0 -2
- package/dist/cjs/hooks/projects/index.js +0 -11
- package/dist/cjs/hooks/projects/index.js.map +0 -1
- package/dist/cjs/hooks/projects/useProject.d.ts +0 -2
- package/dist/cjs/hooks/projects/useProject.js +0 -9
- package/dist/cjs/hooks/projects/useProject.js.map +0 -1
- package/dist/cjs/hooks/projects/useProjectData.d.ts +0 -10
- package/dist/cjs/hooks/projects/useProjectData.js +0 -78
- package/dist/cjs/hooks/projects/useProjectData.js.map +0 -1
- package/dist/cjs/hooks/reports/index.d.ts +0 -1
- package/dist/cjs/hooks/reports/index.js +0 -9
- package/dist/cjs/hooks/reports/index.js.map +0 -1
- package/dist/cjs/hooks/reports/useCreateReport.d.ts +0 -14
- package/dist/cjs/hooks/reports/useCreateReport.js +0 -108
- package/dist/cjs/hooks/reports/useCreateReport.js.map +0 -1
- package/dist/cjs/hooks/storage/index.d.ts +0 -1
- package/dist/cjs/hooks/storage/index.js +0 -9
- package/dist/cjs/hooks/storage/index.js.map +0 -1
- package/dist/cjs/hooks/storage/useUploadFile.d.ts +0 -14
- package/dist/cjs/hooks/storage/useUploadFile.js +0 -95
- package/dist/cjs/hooks/storage/useUploadFile.js.map +0 -1
- package/dist/cjs/hooks/user/index.d.ts +0 -2
- package/dist/cjs/hooks/user/index.js +0 -12
- package/dist/cjs/hooks/user/index.js.map +0 -1
- package/dist/cjs/hooks/user/useUser.d.ts +0 -18
- package/dist/cjs/hooks/user/useUser.js +0 -116
- package/dist/cjs/hooks/user/useUser.js.map +0 -1
- package/dist/cjs/hooks/user/useUserActions.d.ts +0 -12
- package/dist/cjs/hooks/user/useUserActions.js +0 -125
- package/dist/cjs/hooks/user/useUserActions.js.map +0 -1
- package/dist/cjs/hooks/users/follows/index.d.ts +0 -3
- package/dist/cjs/hooks/users/follows/index.js +0 -13
- package/dist/cjs/hooks/users/follows/index.js.map +0 -1
- package/dist/cjs/hooks/users/follows/useFetchFollow.d.ts +0 -6
- package/dist/cjs/hooks/users/follows/useFetchFollow.js +0 -81
- package/dist/cjs/hooks/users/follows/useFetchFollow.js.map +0 -1
- package/dist/cjs/hooks/users/follows/useFollowUser.d.ts +0 -4
- package/dist/cjs/hooks/users/follows/useFollowUser.js +0 -71
- package/dist/cjs/hooks/users/follows/useFollowUser.js.map +0 -1
- package/dist/cjs/hooks/users/follows/useUnfollowUser.d.ts +0 -4
- package/dist/cjs/hooks/users/follows/useUnfollowUser.js +0 -81
- package/dist/cjs/hooks/users/follows/useUnfollowUser.js.map +0 -1
- package/dist/cjs/hooks/users/index.d.ts +0 -9
- package/dist/cjs/hooks/users/index.js +0 -27
- package/dist/cjs/hooks/users/index.js.map +0 -1
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.d.ts +0 -6
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.js +0 -72
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUser.d.ts +0 -5
- package/dist/cjs/hooks/users/useFetchUser.js +0 -70
- package/dist/cjs/hooks/users/useFetchUser.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserByForeignId.d.ts +0 -5
- package/dist/cjs/hooks/users/useFetchUserByForeignId.js +0 -72
- package/dist/cjs/hooks/users/useFetchUserByForeignId.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.d.ts +0 -6
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.js +0 -71
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.d.ts +0 -6
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.js +0 -71
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.js.map +0 -1
- package/dist/cjs/hooks/users/useFetchUserSuggestions.d.ts +0 -5
- package/dist/cjs/hooks/users/useFetchUserSuggestions.js +0 -72
- package/dist/cjs/hooks/users/useFetchUserSuggestions.js.map +0 -1
- package/dist/cjs/hooks/users/useMentions.d.ts +0 -18
- package/dist/cjs/hooks/users/useMentions.js +0 -185
- package/dist/cjs/hooks/users/useMentions.js.map +0 -1
- package/dist/cjs/hooks/users/useUpdateUser.d.ts +0 -19
- package/dist/cjs/hooks/users/useUpdateUser.js +0 -73
- package/dist/cjs/hooks/users/useUpdateUser.js.map +0 -1
- package/dist/cjs/hooks/utils/index.d.ts +0 -1
- package/dist/cjs/hooks/utils/index.js +0 -9
- package/dist/cjs/hooks/utils/index.js.map +0 -1
- package/dist/cjs/hooks/utils/useGetMetadata.d.ts +0 -4
- package/dist/cjs/hooks/utils/useGetMetadata.js +0 -79
- package/dist/cjs/hooks/utils/useGetMetadata.js.map +0 -1
- package/dist/cjs/index.d.ts +0 -32
- package/dist/cjs/index.js +0 -141
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/interfaces/CommentsSortByOptions.d.ts +0 -1
- package/dist/cjs/interfaces/CommentsSortByOptions.js +0 -3
- package/dist/cjs/interfaces/CommentsSortByOptions.js.map +0 -1
- package/dist/cjs/interfaces/EntityCommentsTree.d.ts +0 -13
- package/dist/cjs/interfaces/EntityCommentsTree.js +0 -3
- package/dist/cjs/interfaces/EntityCommentsTree.js.map +0 -1
- package/dist/cjs/interfaces/EntityListSortByOptions.d.ts +0 -1
- package/dist/cjs/interfaces/EntityListSortByOptions.js +0 -3
- package/dist/cjs/interfaces/EntityListSortByOptions.js.map +0 -1
- package/dist/cjs/interfaces/TimeFrame.d.ts +0 -1
- package/dist/cjs/interfaces/TimeFrame.js +0 -3
- package/dist/cjs/interfaces/TimeFrame.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.d.ts +0 -3
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/ContentFilters.d.ts +0 -5
- package/dist/cjs/interfaces/entity-filters/ContentFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/ContentFilters.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.d.ts +0 -4
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/LocationFilters.d.ts +0 -5
- package/dist/cjs/interfaces/entity-filters/LocationFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/LocationFilters.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.d.ts +0 -7
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.js.map +0 -1
- package/dist/cjs/interfaces/entity-filters/TitleFilters.d.ts +0 -5
- package/dist/cjs/interfaces/entity-filters/TitleFilters.js +0 -3
- package/dist/cjs/interfaces/entity-filters/TitleFilters.js.map +0 -1
- package/dist/cjs/interfaces/models/AppNotification.d.ts +0 -140
- package/dist/cjs/interfaces/models/AppNotification.js +0 -3
- package/dist/cjs/interfaces/models/AppNotification.js.map +0 -1
- package/dist/cjs/interfaces/models/Comment.d.ts +0 -32
- package/dist/cjs/interfaces/models/Comment.js +0 -3
- package/dist/cjs/interfaces/models/Comment.js.map +0 -1
- package/dist/cjs/interfaces/models/Entity.d.ts +0 -37
- package/dist/cjs/interfaces/models/Entity.js +0 -3
- package/dist/cjs/interfaces/models/Entity.js.map +0 -1
- package/dist/cjs/interfaces/models/Follow.d.ts +0 -5
- package/dist/cjs/interfaces/models/Follow.js +0 -3
- package/dist/cjs/interfaces/models/Follow.js.map +0 -1
- package/dist/cjs/interfaces/models/List.d.ts +0 -12
- package/dist/cjs/interfaces/models/List.js +0 -3
- package/dist/cjs/interfaces/models/List.js.map +0 -1
- package/dist/cjs/interfaces/models/Mention.d.ts +0 -4
- package/dist/cjs/interfaces/models/Mention.js +0 -3
- package/dist/cjs/interfaces/models/Mention.js.map +0 -1
- package/dist/cjs/interfaces/models/Project.d.ts +0 -14
- package/dist/cjs/interfaces/models/Project.js +0 -3
- package/dist/cjs/interfaces/models/Project.js.map +0 -1
- package/dist/cjs/interfaces/models/User.d.ts +0 -33
- package/dist/cjs/interfaces/models/User.js +0 -3
- package/dist/cjs/interfaces/models/User.js.map +0 -1
- package/dist/cjs/store/api/appNotificationsApi.d.ts +0 -2024
- package/dist/cjs/store/api/appNotificationsApi.js +0 -224
- package/dist/cjs/store/api/appNotificationsApi.js.map +0 -1
- package/dist/cjs/store/api/baseApi.d.ts +0 -1
- package/dist/cjs/store/api/baseApi.js +0 -43
- package/dist/cjs/store/api/baseApi.js.map +0 -1
- package/dist/cjs/store/api/entityListsApi.d.ts +0 -1719
- package/dist/cjs/store/api/entityListsApi.js +0 -237
- package/dist/cjs/store/api/entityListsApi.js.map +0 -1
- package/dist/cjs/store/api/index.d.ts +0 -4
- package/dist/cjs/store/api/index.js +0 -29
- package/dist/cjs/store/api/index.js.map +0 -1
- package/dist/cjs/store/api/listsApi.d.ts +0 -3044
- package/dist/cjs/store/api/listsApi.js +0 -288
- package/dist/cjs/store/api/listsApi.js.map +0 -1
- package/dist/cjs/store/api/userApi.d.ts +0 -183
- package/dist/cjs/store/api/userApi.js +0 -38
- package/dist/cjs/store/api/userApi.js.map +0 -1
- package/dist/cjs/store/index.d.ts +0 -21
- package/dist/cjs/store/index.js +0 -73
- package/dist/cjs/store/index.js.map +0 -1
- package/dist/cjs/store/middleware.d.ts +0 -4
- package/dist/cjs/store/middleware.js +0 -43
- package/dist/cjs/store/middleware.js.map +0 -1
- package/dist/cjs/store/rootReducer.d.ts +0 -16
- package/dist/cjs/store/rootReducer.js +0 -26
- package/dist/cjs/store/rootReducer.js.map +0 -1
- package/dist/cjs/store/slices/appNotificationsSlice.d.ts +0 -58
- package/dist/cjs/store/slices/appNotificationsSlice.js +0 -135
- package/dist/cjs/store/slices/appNotificationsSlice.js.map +0 -1
- package/dist/cjs/store/slices/authSlice.d.ts +0 -24
- package/dist/cjs/store/slices/authSlice.js +0 -79
- package/dist/cjs/store/slices/authSlice.js.map +0 -1
- package/dist/cjs/store/slices/authThunks.d.ts +0 -40
- package/dist/cjs/store/slices/authThunks.js +0 -363
- package/dist/cjs/store/slices/authThunks.js.map +0 -1
- package/dist/cjs/store/slices/entityListsSlice.d.ts +0 -364
- package/dist/cjs/store/slices/entityListsSlice.js +0 -295
- package/dist/cjs/store/slices/entityListsSlice.js.map +0 -1
- package/dist/cjs/store/slices/index.d.ts +0 -0
- package/dist/cjs/store/slices/index.js +0 -7
- package/dist/cjs/store/slices/index.js.map +0 -1
- package/dist/cjs/store/slices/listsSlice.d.ts +0 -147
- package/dist/cjs/store/slices/listsSlice.js +0 -211
- package/dist/cjs/store/slices/listsSlice.js.map +0 -1
- package/dist/cjs/store/slices/userSlice.d.ts +0 -29
- package/dist/cjs/store/slices/userSlice.js +0 -87
- package/dist/cjs/store/slices/userSlice.js.map +0 -1
- package/dist/cjs/store/types/index.d.ts +0 -8
- package/dist/cjs/store/types/index.js +0 -3
- package/dist/cjs/store/types/index.js.map +0 -1
- package/dist/cjs/utils/constants.d.ts +0 -1
- package/dist/cjs/utils/constants.js +0 -5
- package/dist/cjs/utils/constants.js.map +0 -1
- package/dist/cjs/utils/env.d.ts +0 -19
- package/dist/cjs/utils/env.js +0 -102
- package/dist/cjs/utils/env.js.map +0 -1
- package/dist/cjs/utils/handleError.d.ts +0 -1
- package/dist/cjs/utils/handleError.js +0 -24
- package/dist/cjs/utils/handleError.js.map +0 -1
- package/dist/cjs/utils/isAbsoluteUrl.d.ts +0 -1
- package/dist/cjs/utils/isAbsoluteUrl.js +0 -9
- package/dist/cjs/utils/isAbsoluteUrl.js.map +0 -1
- package/dist/cjs/utils/isReactNative.d.ts +0 -1
- package/dist/cjs/utils/isReactNative.js +0 -8
- package/dist/cjs/utils/isReactNative.js.map +0 -1
- package/dist/cjs/utils/isUUID.d.ts +0 -1
- package/dist/cjs/utils/isUUID.js +0 -8
- package/dist/cjs/utils/isUUID.js.map +0 -1
- package/dist/cjs/utils/keywordHelpers.d.ts +0 -30
- package/dist/cjs/utils/keywordHelpers.js +0 -101
- package/dist/cjs/utils/keywordHelpers.js.map +0 -1
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.useUserActions = useUserActions;
|
|
40
|
-
var react_1 = require("react");
|
|
41
|
-
var react_redux_1 = require("react-redux");
|
|
42
|
-
var userSlice_1 = require("../../store/slices/userSlice");
|
|
43
|
-
var userApi_1 = require("../../store/api/userApi");
|
|
44
|
-
/**
|
|
45
|
-
* Redux-powered hook that provides current user management actions
|
|
46
|
-
* Focused on current user operations only
|
|
47
|
-
*/
|
|
48
|
-
function useUserActions() {
|
|
49
|
-
var _this = this;
|
|
50
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
51
|
-
// RTK Query mutations for current user
|
|
52
|
-
var updateUserMutation = (0, userApi_1.useUpdateUserMutation)()[0];
|
|
53
|
-
// User data management actions
|
|
54
|
-
var handleSetUser = (0, react_1.useCallback)(function (user) {
|
|
55
|
-
dispatch((0, userSlice_1.setUser)(user));
|
|
56
|
-
dispatch((0, userSlice_1.clearError)());
|
|
57
|
-
}, [dispatch]);
|
|
58
|
-
var handleClearUser = (0, react_1.useCallback)(function () {
|
|
59
|
-
dispatch((0, userSlice_1.clearUser)());
|
|
60
|
-
dispatch((0, userSlice_1.clearError)());
|
|
61
|
-
}, [dispatch]);
|
|
62
|
-
// Update user with optimistic updates for instant UI feedback
|
|
63
|
-
var updateUser = (0, react_1.useCallback)(function (projectId, userId, update, currentUser) { return __awaiter(_this, void 0, void 0, function () {
|
|
64
|
-
var originalUser, result, error_1, errorMessage;
|
|
65
|
-
return __generator(this, function (_a) {
|
|
66
|
-
switch (_a.label) {
|
|
67
|
-
case 0:
|
|
68
|
-
if (!projectId || !userId) {
|
|
69
|
-
throw new Error("Project ID and User ID are required");
|
|
70
|
-
}
|
|
71
|
-
dispatch((0, userSlice_1.setUpdating)(true));
|
|
72
|
-
dispatch((0, userSlice_1.clearError)());
|
|
73
|
-
originalUser = currentUser;
|
|
74
|
-
// OPTIMISTIC UPDATE: Apply changes immediately for instant UI feedback
|
|
75
|
-
dispatch((0, userSlice_1.updateUserOptimistic)(update));
|
|
76
|
-
_a.label = 1;
|
|
77
|
-
case 1:
|
|
78
|
-
_a.trys.push([1, 3, 4, 5]);
|
|
79
|
-
return [4 /*yield*/, updateUserMutation({
|
|
80
|
-
projectId: projectId,
|
|
81
|
-
userId: userId,
|
|
82
|
-
update: update
|
|
83
|
-
}).unwrap()];
|
|
84
|
-
case 2:
|
|
85
|
-
result = _a.sent();
|
|
86
|
-
// Replace optimistic update with real server data
|
|
87
|
-
dispatch((0, userSlice_1.setUser)(result));
|
|
88
|
-
return [2 /*return*/, result];
|
|
89
|
-
case 3:
|
|
90
|
-
error_1 = _a.sent();
|
|
91
|
-
// REVERT OPTIMISTIC UPDATE: Restore original user state on API failure
|
|
92
|
-
if (originalUser) {
|
|
93
|
-
dispatch((0, userSlice_1.setUser)(originalUser));
|
|
94
|
-
}
|
|
95
|
-
errorMessage = error_1 instanceof Error ? error_1.message : 'Failed to update user';
|
|
96
|
-
dispatch((0, userSlice_1.setError)(errorMessage));
|
|
97
|
-
throw error_1;
|
|
98
|
-
case 4:
|
|
99
|
-
dispatch((0, userSlice_1.setUpdating)(false));
|
|
100
|
-
return [7 /*endfinally*/];
|
|
101
|
-
case 5: return [2 /*return*/];
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}); }, [updateUserMutation, dispatch]);
|
|
105
|
-
// Removed other-user methods - use existing legacy hooks instead:
|
|
106
|
-
// - useFetchUser
|
|
107
|
-
// - useFetchUserByForeignId
|
|
108
|
-
// - useCheckUsernameAvailability
|
|
109
|
-
// - useFetchUserSuggestions
|
|
110
|
-
// Error handling actions
|
|
111
|
-
var clearUserError = (0, react_1.useCallback)(function () {
|
|
112
|
-
dispatch((0, userSlice_1.clearError)());
|
|
113
|
-
}, [dispatch]);
|
|
114
|
-
return {
|
|
115
|
-
// Current user data management
|
|
116
|
-
setUser: handleSetUser,
|
|
117
|
-
clearUser: handleClearUser,
|
|
118
|
-
// Current user operations
|
|
119
|
-
updateUser: updateUser,
|
|
120
|
-
// Error handling
|
|
121
|
-
clearError: clearUserError,
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
exports.default = useUserActions;
|
|
125
|
-
//# sourceMappingURL=useUserActions.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUserActions.js","sourceRoot":"","sources":["../../../../src/hooks/user/useUserActions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,wCAiFC;AArGD,+BAAoC;AACpC,2CAA0C;AAE1C,0DAOsC;AACtC,mDAGiC;AAEjC;;;GAGG;AACH,SAAgB,cAAc;IAA9B,iBAiFC;IAhFC,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAe,CAAC;IAE5C,uCAAuC;IAChC,IAAA,kBAAkB,GAAI,IAAA,+BAAqB,GAAE,GAA3B,CAA4B;IAErD,+BAA+B;IAC/B,IAAM,aAAa,GAAG,IAAA,mBAAW,EAAC,UAAC,IAAS;QAC1C,QAAQ,CAAC,IAAA,mBAAO,EAAC,IAAI,CAAC,CAAC,CAAC;QACxB,QAAQ,CAAC,IAAA,sBAAU,GAAE,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,IAAM,eAAe,GAAG,IAAA,mBAAW,EAAC;QAClC,QAAQ,CAAC,IAAA,qBAAS,GAAE,CAAC,CAAC;QACtB,QAAQ,CAAC,IAAA,sBAAU,GAAE,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,8DAA8D;IAC9D,IAAM,UAAU,GAAG,IAAA,mBAAW,EAC5B,UAAO,SAAiB,EAAE,MAAc,EAAE,MAAwB,EAAE,WAAiB;;;;;oBACnF,IAAI,CAAC,SAAS,IAAI,CAAC,MAAM,EAAE,CAAC;wBAC1B,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAC;oBACzD,CAAC;oBAED,QAAQ,CAAC,IAAA,uBAAW,EAAC,IAAI,CAAC,CAAC,CAAC;oBAC5B,QAAQ,CAAC,IAAA,sBAAU,GAAE,CAAC,CAAC;oBAGjB,YAAY,GAAG,WAAW,CAAC;oBAEjC,uEAAuE;oBACvE,QAAQ,CAAC,IAAA,gCAAoB,EAAC,MAAM,CAAC,CAAC,CAAC;;;;oBAGtB,qBAAM,kBAAkB,CAAC;4BACtC,SAAS,WAAA;4BACT,MAAM,QAAA;4BACN,MAAM,QAAA;yBACP,CAAC,CAAC,MAAM,EAAE,EAAA;;oBAJL,MAAM,GAAG,SAIJ;oBAEX,kDAAkD;oBAClD,QAAQ,CAAC,IAAA,mBAAO,EAAC,MAAM,CAAC,CAAC,CAAC;oBAC1B,sBAAO,MAAM,EAAC;;;oBAEd,uEAAuE;oBACvE,IAAI,YAAY,EAAE,CAAC;wBACjB,QAAQ,CAAC,IAAA,mBAAO,EAAC,YAAY,CAAC,CAAC,CAAC;oBAClC,CAAC;oBAEK,YAAY,GAAG,OAAK,YAAY,KAAK,CAAC,CAAC,CAAC,OAAK,CAAC,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;oBACtF,QAAQ,CAAC,IAAA,oBAAQ,EAAC,YAAY,CAAC,CAAC,CAAC;oBACjC,MAAM,OAAK,CAAC;;oBAEZ,QAAQ,CAAC,IAAA,uBAAW,EAAC,KAAK,CAAC,CAAC,CAAC;;;;;SAEhC,EACD,CAAC,kBAAkB,EAAE,QAAQ,CAAC,CAC/B,CAAC;IAEF,kEAAkE;IAClE,iBAAiB;IACjB,4BAA4B;IAC5B,mCAAmC;IACnC,4BAA4B;IAE5B,yBAAyB;IACzB,IAAM,cAAc,GAAG,IAAA,mBAAW,EAAC;QACjC,QAAQ,CAAC,IAAA,sBAAU,GAAE,CAAC,CAAC;IACzB,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO;QACL,+BAA+B;QAC/B,OAAO,EAAE,aAAa;QACtB,SAAS,EAAE,eAAe;QAE1B,0BAA0B;QAC1B,UAAU,YAAA;QAEV,iBAAiB;QACjB,UAAU,EAAE,cAAc;KAC3B,CAAC;AACJ,CAAC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useUnfollowUser = exports.useFollowUser = exports.useFetchFollow = void 0;
|
|
7
|
-
var useFetchFollow_1 = require("./useFetchFollow");
|
|
8
|
-
Object.defineProperty(exports, "useFetchFollow", { enumerable: true, get: function () { return __importDefault(useFetchFollow_1).default; } });
|
|
9
|
-
var useFollowUser_1 = require("./useFollowUser");
|
|
10
|
-
Object.defineProperty(exports, "useFollowUser", { enumerable: true, get: function () { return __importDefault(useFollowUser_1).default; } });
|
|
11
|
-
var useUnfollowUser_1 = require("./useUnfollowUser");
|
|
12
|
-
Object.defineProperty(exports, "useUnfollowUser", { enumerable: true, get: function () { return __importDefault(useUnfollowUser_1).default; } });
|
|
13
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB;AAClC,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AACjC,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../projects/useProject"));
|
|
45
|
-
var user_1 = require("../../user");
|
|
46
|
-
function useFetchFollow() {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
50
|
-
var user = (0, user_1.useUser)().user;
|
|
51
|
-
var fetchFollow = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
var userId, response;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
userId = props.userId;
|
|
57
|
-
if (!projectId) {
|
|
58
|
-
throw new Error("No project specified");
|
|
59
|
-
}
|
|
60
|
-
if (!user) {
|
|
61
|
-
throw new Error("No user is logged in");
|
|
62
|
-
}
|
|
63
|
-
if (!userId) {
|
|
64
|
-
throw new Error("No user ID was provided");
|
|
65
|
-
}
|
|
66
|
-
if (userId === user.id) {
|
|
67
|
-
throw new Error("Users don't follow themselves");
|
|
68
|
-
}
|
|
69
|
-
return [4 /*yield*/, axios.get("/".concat(projectId, "/users/").concat(userId, "/follow"), {
|
|
70
|
-
withCredentials: true,
|
|
71
|
-
})];
|
|
72
|
-
case 1:
|
|
73
|
-
response = _a.sent();
|
|
74
|
-
return [2 /*return*/, response.data];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); }, [axios, projectId, user]);
|
|
78
|
-
return fetchFollow;
|
|
79
|
-
}
|
|
80
|
-
exports.default = useFetchFollow;
|
|
81
|
-
//# sourceMappingURL=useFetchFollow.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFetchFollow.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/useFetchFollow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,yEAAmD;AACnD,mCAAqC;AAErC,SAAS,cAAc;IAAvB,iBAiCC;IAhCC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,cAAO,GAAE,KAAd,CAAe;IAE3B,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,UAAO,KAAyB;;;;;oBACtB,MAAM,GAAK,KAAK,OAAV,CAAW;oBACzB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,MAAM,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;wBACvB,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAC;oBACnD,CAAC;oBAEgB,qBAAM,KAAK,CAAC,GAAG,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACvE,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBACF,sBAAO,QAAQ,CAAC,IAAgC,EAAC;;;SAClD,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../projects/useProject"));
|
|
45
|
-
function useFollowUser() {
|
|
46
|
-
var _this = this;
|
|
47
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
48
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
49
|
-
var followUser = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
50
|
-
var userId;
|
|
51
|
-
return __generator(this, function (_a) {
|
|
52
|
-
switch (_a.label) {
|
|
53
|
-
case 0:
|
|
54
|
-
userId = props.userId;
|
|
55
|
-
if (!projectId) {
|
|
56
|
-
throw new Error("No project specified");
|
|
57
|
-
}
|
|
58
|
-
if (!userId) {
|
|
59
|
-
throw new Error("No user ID was provided");
|
|
60
|
-
}
|
|
61
|
-
return [4 /*yield*/, axios.post("/".concat(projectId, "/users/").concat(userId, "/follow"), {}, { withCredentials: true })];
|
|
62
|
-
case 1:
|
|
63
|
-
_a.sent();
|
|
64
|
-
return [2 /*return*/];
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}); }, [axios, projectId]);
|
|
68
|
-
return followUser;
|
|
69
|
-
}
|
|
70
|
-
exports.default = useFollowUser;
|
|
71
|
-
//# sourceMappingURL=useFollowUser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFollowUser.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/useFollowUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,yEAAmD;AAEnD,SAAS,aAAa;IAAtB,iBAyBC;IAxBC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,UAAU,GAAG,IAAA,mBAAW,EAC5B,UAAO,KAAyB;;;;;oBACtB,MAAM,GAAK,KAAK,OAAV,CAAW;oBACzB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,qBAAM,KAAK,CAAC,IAAI,CACd,WAAI,SAAS,oBAAU,MAAM,YAAS,EACtC,EAAE,EACF,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBAJD,SAIC,CAAC;;;;SACH,EACD,CAAC,KAAK,EAAE,SAAS,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useAxiosPrivate_1 = __importDefault(require("../../../config/useAxiosPrivate"));
|
|
44
|
-
var useProject_1 = __importDefault(require("../../projects/useProject"));
|
|
45
|
-
var user_1 = require("../../user");
|
|
46
|
-
function useUnfollowUser() {
|
|
47
|
-
var _this = this;
|
|
48
|
-
var axios = (0, useAxiosPrivate_1.default)();
|
|
49
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
50
|
-
var user = (0, user_1.useUser)().user;
|
|
51
|
-
var unfollowUser = (0, react_1.useCallback)(function (props) { return __awaiter(_this, void 0, void 0, function () {
|
|
52
|
-
var userId;
|
|
53
|
-
return __generator(this, function (_a) {
|
|
54
|
-
switch (_a.label) {
|
|
55
|
-
case 0:
|
|
56
|
-
userId = props.userId;
|
|
57
|
-
if (!projectId) {
|
|
58
|
-
throw new Error("No project specified");
|
|
59
|
-
}
|
|
60
|
-
if (!user) {
|
|
61
|
-
throw new Error("No user is logged in");
|
|
62
|
-
}
|
|
63
|
-
if (!userId) {
|
|
64
|
-
throw new Error("No user ID was provided");
|
|
65
|
-
}
|
|
66
|
-
if (userId === user.id) {
|
|
67
|
-
throw new Error("Users can't unfollow themselves");
|
|
68
|
-
}
|
|
69
|
-
return [4 /*yield*/, axios.delete("/".concat(projectId, "/users/").concat(userId, "/follow"), {
|
|
70
|
-
withCredentials: true,
|
|
71
|
-
})];
|
|
72
|
-
case 1:
|
|
73
|
-
_a.sent();
|
|
74
|
-
return [2 /*return*/];
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
}); }, [axios, projectId, user]);
|
|
78
|
-
return unfollowUser;
|
|
79
|
-
}
|
|
80
|
-
exports.default = useUnfollowUser;
|
|
81
|
-
//# sourceMappingURL=useUnfollowUser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUnfollowUser.js","sourceRoot":"","sources":["../../../../../src/hooks/users/follows/useUnfollowUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,oFAA8D;AAC9D,yEAAmD;AACnD,mCAAqC;AAErC,SAAS,eAAe;IAAxB,iBAgCC;IA/BC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAC3B,IAAA,IAAI,GAAK,IAAA,cAAO,GAAE,KAAd,CAAe;IAE3B,IAAM,YAAY,GAAG,IAAA,mBAAW,EAC9B,UAAO,KAAyB;;;;;oBACtB,MAAM,GAAK,KAAK,OAAV,CAAW;oBACzB,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,IAAI,EAAE,CAAC;wBACV,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,EAAE,CAAC;wBACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;oBAC7C,CAAC;oBAED,IAAI,MAAM,KAAK,IAAI,CAAC,EAAE,EAAE,CAAC;wBACvB,MAAM,IAAI,KAAK,CAAC,iCAAiC,CAAC,CAAC;oBACrD,CAAC;oBAED,qBAAM,KAAK,CAAC,MAAM,CAAC,WAAI,SAAS,oBAAU,MAAM,YAAS,EAAE;4BACzD,eAAe,EAAE,IAAI;yBACtB,CAAC,EAAA;;oBAFF,SAEE,CAAC;;;;SACJ,EACD,CAAC,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,CACzB,CAAC;IAEF,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,kBAAe,eAAe,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { default as useFetchUser } from "./useFetchUser";
|
|
2
|
-
export { default as useFetchUserByForeignId } from "./useFetchUserByForeignId";
|
|
3
|
-
export { default as useFetchUserFollowersCount } from "./useFetchUserFollowersCount";
|
|
4
|
-
export { default as useFetchUserFollowingCount } from "./useFetchUserFollowingCount";
|
|
5
|
-
export { default as useCheckUsernameAvailability } from "./useCheckUsernameAvailability";
|
|
6
|
-
export { default as useFetchUserSuggestions } from "./useFetchUserSuggestions";
|
|
7
|
-
export { default as useMentions } from "./useMentions";
|
|
8
|
-
export { default as useUpdateUser } from "./useUpdateUser";
|
|
9
|
-
export { useFetchFollow, useFollowUser, useUnfollowUser } from "./follows";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.useUnfollowUser = exports.useFollowUser = exports.useFetchFollow = exports.useUpdateUser = exports.useMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserFollowingCount = exports.useFetchUserFollowersCount = exports.useFetchUserByForeignId = exports.useFetchUser = void 0;
|
|
7
|
-
var useFetchUser_1 = require("./useFetchUser");
|
|
8
|
-
Object.defineProperty(exports, "useFetchUser", { enumerable: true, get: function () { return __importDefault(useFetchUser_1).default; } });
|
|
9
|
-
var useFetchUserByForeignId_1 = require("./useFetchUserByForeignId");
|
|
10
|
-
Object.defineProperty(exports, "useFetchUserByForeignId", { enumerable: true, get: function () { return __importDefault(useFetchUserByForeignId_1).default; } });
|
|
11
|
-
var useFetchUserFollowersCount_1 = require("./useFetchUserFollowersCount");
|
|
12
|
-
Object.defineProperty(exports, "useFetchUserFollowersCount", { enumerable: true, get: function () { return __importDefault(useFetchUserFollowersCount_1).default; } });
|
|
13
|
-
var useFetchUserFollowingCount_1 = require("./useFetchUserFollowingCount");
|
|
14
|
-
Object.defineProperty(exports, "useFetchUserFollowingCount", { enumerable: true, get: function () { return __importDefault(useFetchUserFollowingCount_1).default; } });
|
|
15
|
-
var useCheckUsernameAvailability_1 = require("./useCheckUsernameAvailability");
|
|
16
|
-
Object.defineProperty(exports, "useCheckUsernameAvailability", { enumerable: true, get: function () { return __importDefault(useCheckUsernameAvailability_1).default; } });
|
|
17
|
-
var useFetchUserSuggestions_1 = require("./useFetchUserSuggestions");
|
|
18
|
-
Object.defineProperty(exports, "useFetchUserSuggestions", { enumerable: true, get: function () { return __importDefault(useFetchUserSuggestions_1).default; } });
|
|
19
|
-
var useMentions_1 = require("./useMentions");
|
|
20
|
-
Object.defineProperty(exports, "useMentions", { enumerable: true, get: function () { return __importDefault(useMentions_1).default; } });
|
|
21
|
-
var useUpdateUser_1 = require("./useUpdateUser");
|
|
22
|
-
Object.defineProperty(exports, "useUpdateUser", { enumerable: true, get: function () { return __importDefault(useUpdateUser_1).default; } });
|
|
23
|
-
var follows_1 = require("./follows");
|
|
24
|
-
Object.defineProperty(exports, "useFetchFollow", { enumerable: true, get: function () { return follows_1.useFetchFollow; } });
|
|
25
|
-
Object.defineProperty(exports, "useFollowUser", { enumerable: true, get: function () { return follows_1.useFollowUser; } });
|
|
26
|
-
Object.defineProperty(exports, "useUnfollowUser", { enumerable: true, get: function () { return follows_1.useUnfollowUser; } });
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/users/index.ts"],"names":[],"mappings":";;;;;;AAAA,+CAAyD;AAAhD,6HAAA,OAAO,OAAgB;AAChC,qEAA+E;AAAtE,mJAAA,OAAO,OAA2B;AAC3C,2EAAqF;AAA5E,yJAAA,OAAO,OAA8B;AAC9C,2EAAqF;AAA5E,yJAAA,OAAO,OAA8B;AAC9C,+EAAyF;AAAhF,6JAAA,OAAO,OAAgC;AAChD,qEAA+E;AAAtE,mJAAA,OAAO,OAA2B;AAC3C,6CAAuD;AAA9C,2HAAA,OAAO,OAAe;AAC/B,iDAA2D;AAAlD,+HAAA,OAAO,OAAiB;AAEjC,qCAA2E;AAAlE,yGAAA,cAAc,OAAA;AAAE,wGAAA,aAAa,OAAA;AAAE,0GAAA,eAAe,OAAA"}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
44
|
-
var axios_1 = __importDefault(require("../../config/axios"));
|
|
45
|
-
function useCheckUsernameAvailability() {
|
|
46
|
-
var _this = this;
|
|
47
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
48
|
-
var checkUsernameAvailability = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
49
|
-
var response;
|
|
50
|
-
var username = _b.username;
|
|
51
|
-
return __generator(this, function (_c) {
|
|
52
|
-
switch (_c.label) {
|
|
53
|
-
case 0:
|
|
54
|
-
if (!projectId) {
|
|
55
|
-
throw new Error("No project specified");
|
|
56
|
-
}
|
|
57
|
-
if (!username) {
|
|
58
|
-
throw new Error("Please specify a username");
|
|
59
|
-
}
|
|
60
|
-
return [4 /*yield*/, axios_1.default.get("/".concat(projectId, "/users/check-username"), {
|
|
61
|
-
params: { username: username },
|
|
62
|
-
})];
|
|
63
|
-
case 1:
|
|
64
|
-
response = _c.sent();
|
|
65
|
-
return [2 /*return*/, response.data];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); }, [projectId]);
|
|
69
|
-
return checkUsernameAvailability;
|
|
70
|
-
}
|
|
71
|
-
exports.default = useCheckUsernameAvailability;
|
|
72
|
-
//# sourceMappingURL=useCheckUsernameAvailability.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCheckUsernameAvailability.js","sourceRoot":"","sources":["../../../../src/hooks/users/useCheckUsernameAvailability.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AAEpC,sEAAgD;AAChD,6DAAuC;AAEvC,SAAS,4BAA4B;IAArC,iBAyBC;IAxBS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,yBAAyB,GAAG,IAAA,mBAAW,EAC3C,gEAAO,EAAkC;;YAAhC,QAAQ,cAAA;;;;oBACf,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,QAAQ,EAAE,CAAC;wBACd,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;oBAC/C,CAAC;oBAEgB,qBAAM,eAAK,CAAC,GAAG,CAAC,WAAI,SAAS,0BAAuB,EAAE;4BACrE,MAAM,EAAE,EAAE,QAAQ,UAAA,EAAE;yBACrB,CAAC,EAAA;;oBAFI,QAAQ,GAAG,SAEf;oBAEF,sBAAO,QAAQ,CAAC,IAEf,EAAC;;;SACH,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,yBAAyB,CAAC;AACnC,CAAC;AAED,kBAAe,4BAA4B,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
13
|
-
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
39
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
40
|
-
};
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
var react_1 = require("react");
|
|
43
|
-
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
44
|
-
var axios_1 = __importDefault(require("../../config/axios"));
|
|
45
|
-
function useFetchUser() {
|
|
46
|
-
var _this = this;
|
|
47
|
-
var projectId = (0, useProject_1.default)().projectId;
|
|
48
|
-
var fetchUser = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
49
|
-
var response;
|
|
50
|
-
var userId = _b.userId;
|
|
51
|
-
return __generator(this, function (_c) {
|
|
52
|
-
switch (_c.label) {
|
|
53
|
-
case 0:
|
|
54
|
-
if (!projectId) {
|
|
55
|
-
throw new Error("No project specified");
|
|
56
|
-
}
|
|
57
|
-
if (!userId) {
|
|
58
|
-
throw new Error("Please specify a user ID");
|
|
59
|
-
}
|
|
60
|
-
return [4 /*yield*/, axios_1.default.get("/".concat(projectId, "/users/").concat(userId))];
|
|
61
|
-
case 1:
|
|
62
|
-
response = _c.sent();
|
|
63
|
-
return [2 /*return*/, response.data];
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
}); }, [projectId]);
|
|
67
|
-
return fetchUser;
|
|
68
|
-
}
|
|
69
|
-
exports.default = useFetchUser;
|
|
70
|
-
//# sourceMappingURL=useFetchUser.js.map
|