@replyke/core 5.1.6-beta.30 → 5.1.6-beta.32
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/cjs/config/axios.d.ts +3 -0
- package/dist/cjs/config/axios.js +17 -0
- package/dist/cjs/config/axios.js.map +1 -0
- package/dist/cjs/config/useAxiosPrivate.d.ts +2 -0
- package/dist/cjs/config/useAxiosPrivate.js +82 -0
- package/dist/cjs/config/useAxiosPrivate.js.map +1 -0
- package/dist/cjs/constants/reportReasons.d.ts +12 -0
- package/dist/cjs/constants/reportReasons.js +15 -0
- package/dist/cjs/constants/reportReasons.js.map +1 -0
- package/dist/cjs/context/comment-section-context.d.ts +9 -0
- package/dist/cjs/context/comment-section-context.js +28 -0
- package/dist/cjs/context/comment-section-context.js.map +1 -0
- package/dist/cjs/context/entity-context.d.ts +9 -0
- package/dist/cjs/context/entity-context.js +38 -0
- package/dist/cjs/context/entity-context.js.map +1 -0
- package/dist/cjs/context/index.d.ts +4 -0
- package/dist/cjs/context/index.js +12 -0
- package/dist/cjs/context/index.js.map +1 -0
- package/dist/cjs/context/replyke-context.d.ts +10 -0
- package/dist/cjs/context/replyke-context.js +23 -0
- package/dist/cjs/context/replyke-context.js.map +1 -0
- package/dist/cjs/context/replyke-store-context.d.ts +13 -0
- package/dist/cjs/context/replyke-store-context.js +37 -0
- package/dist/cjs/context/replyke-store-context.js.map +1 -0
- package/dist/cjs/helpers/addCommentsToTree.d.ts +3 -0
- package/dist/cjs/helpers/addCommentsToTree.js +61 -0
- package/dist/cjs/helpers/addCommentsToTree.js.map +1 -0
- package/dist/cjs/helpers/addNotificationsMessages.d.ts +3 -0
- package/dist/cjs/helpers/addNotificationsMessages.js +91 -0
- package/dist/cjs/helpers/addNotificationsMessages.js.map +1 -0
- package/dist/cjs/helpers/getPublicFileUrl.d.ts +2 -0
- package/dist/cjs/helpers/getPublicFileUrl.js +10 -0
- package/dist/cjs/helpers/getPublicFileUrl.js.map +1 -0
- package/dist/cjs/helpers/getUserName.d.ts +2 -0
- package/dist/cjs/helpers/getUserName.js +23 -0
- package/dist/cjs/helpers/getUserName.js.map +1 -0
- package/dist/cjs/helpers/markCommentAsFailed.d.ts +2 -0
- package/dist/cjs/helpers/markCommentAsFailed.js +29 -0
- package/dist/cjs/helpers/markCommentAsFailed.js.map +1 -0
- package/dist/cjs/helpers/removeCommentFromTree.d.ts +2 -0
- package/dist/cjs/helpers/removeCommentFromTree.js +44 -0
- package/dist/cjs/helpers/removeCommentFromTree.js.map +1 -0
- package/dist/cjs/helpers/safeMergeStyleProps.d.ts +1 -0
- package/dist/cjs/helpers/safeMergeStyleProps.js +23 -0
- package/dist/cjs/helpers/safeMergeStyleProps.js.map +1 -0
- package/dist/cjs/hooks/app-notifications/index.d.ts +3 -0
- package/dist/cjs/hooks/app-notifications/index.js +12 -0
- package/dist/cjs/hooks/app-notifications/index.js.map +1 -0
- package/dist/cjs/hooks/app-notifications/useAppNotifications.d.ts +21 -0
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js +108 -0
- package/dist/cjs/hooks/app-notifications/useAppNotifications.js.map +1 -0
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.d.ts +13 -0
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js +266 -0
- package/dist/cjs/hooks/app-notifications/useAppNotificationsActions.js.map +1 -0
- package/dist/cjs/hooks/auth/index.d.ts +1 -0
- package/dist/cjs/hooks/auth/index.js +9 -0
- package/dist/cjs/hooks/auth/index.js.map +1 -0
- package/dist/cjs/hooks/auth/useAuth.d.ts +32 -0
- package/dist/cjs/hooks/auth/useAuth.js +180 -0
- package/dist/cjs/hooks/auth/useAuth.js.map +1 -0
- package/dist/cjs/hooks/comments/index.d.ts +12 -0
- package/dist/cjs/hooks/comments/index.js +31 -0
- package/dist/cjs/hooks/comments/index.js.map +1 -0
- package/dist/cjs/hooks/comments/useCommentSection.d.ts +2 -0
- package/dist/cjs/hooks/comments/useCommentSection.js +9 -0
- package/dist/cjs/hooks/comments/useCommentSection.js.map +1 -0
- package/dist/cjs/hooks/comments/useCommentSectionData.d.ts +60 -0
- package/dist/cjs/hooks/comments/useCommentSectionData.js +407 -0
- package/dist/cjs/hooks/comments/useCommentSectionData.js.map +1 -0
- package/dist/cjs/hooks/comments/useCommentVotes.d.ts +11 -0
- package/dist/cjs/hooks/comments/useCommentVotes.js +234 -0
- package/dist/cjs/hooks/comments/useCommentVotes.js.map +1 -0
- package/dist/cjs/hooks/comments/useCreateComment.d.ts +14 -0
- package/dist/cjs/hooks/comments/useCreateComment.js +90 -0
- package/dist/cjs/hooks/comments/useCreateComment.js.map +1 -0
- package/dist/cjs/hooks/comments/useDeleteComment.d.ts +4 -0
- package/dist/cjs/hooks/comments/useDeleteComment.js +70 -0
- package/dist/cjs/hooks/comments/useDeleteComment.js.map +1 -0
- package/dist/cjs/hooks/comments/useDownvoteComment.d.ts +5 -0
- package/dist/cjs/hooks/comments/useDownvoteComment.js +71 -0
- package/dist/cjs/hooks/comments/useDownvoteComment.js.map +1 -0
- package/dist/cjs/hooks/comments/useEntityComments.d.ts +22 -0
- package/dist/cjs/hooks/comments/useEntityComments.js +196 -0
- package/dist/cjs/hooks/comments/useEntityComments.js.map +1 -0
- package/dist/cjs/hooks/comments/useFetchComment.d.ts +9 -0
- package/dist/cjs/hooks/comments/useFetchComment.js +74 -0
- package/dist/cjs/hooks/comments/useFetchComment.js.map +1 -0
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.d.ts +9 -0
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js +75 -0
- package/dist/cjs/hooks/comments/useFetchCommentByForeignId.js.map +1 -0
- package/dist/cjs/hooks/comments/useFetchManyComments.d.ts +12 -0
- package/dist/cjs/hooks/comments/useFetchManyComments.js +88 -0
- package/dist/cjs/hooks/comments/useFetchManyComments.js.map +1 -0
- package/dist/cjs/hooks/comments/useGroupReplies.d.ts +8 -0
- package/dist/cjs/hooks/comments/useGroupReplies.js +24 -0
- package/dist/cjs/hooks/comments/useGroupReplies.js.map +1 -0
- package/dist/cjs/hooks/comments/useProfileComments.d.ts +18 -0
- package/dist/cjs/hooks/comments/useProfileComments.js +179 -0
- package/dist/cjs/hooks/comments/useProfileComments.js.map +1 -0
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.d.ts +5 -0
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.js +71 -0
- package/dist/cjs/hooks/comments/useRemoveCommentDownvote.js.map +1 -0
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.d.ts +5 -0
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.js +71 -0
- package/dist/cjs/hooks/comments/useRemoveCommentUpvote.js.map +1 -0
- package/dist/cjs/hooks/comments/useReplies.d.ts +13 -0
- package/dist/cjs/hooks/comments/useReplies.js +107 -0
- package/dist/cjs/hooks/comments/useReplies.js.map +1 -0
- package/dist/cjs/hooks/comments/useUpdateComment.d.ts +6 -0
- package/dist/cjs/hooks/comments/useUpdateComment.js +73 -0
- package/dist/cjs/hooks/comments/useUpdateComment.js.map +1 -0
- package/dist/cjs/hooks/comments/useUpvoteComment.d.ts +5 -0
- package/dist/cjs/hooks/comments/useUpvoteComment.js +71 -0
- package/dist/cjs/hooks/comments/useUpvoteComment.js.map +1 -0
- package/dist/cjs/hooks/crypto/index.d.ts +1 -0
- package/dist/cjs/hooks/crypto/index.js +9 -0
- package/dist/cjs/hooks/crypto/index.js.map +1 -0
- package/dist/cjs/hooks/crypto/useSignTestingJwt.d.ts +6 -0
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js +74 -0
- package/dist/cjs/hooks/crypto/useSignTestingJwt.js.map +1 -0
- package/dist/cjs/hooks/entities/index.d.ts +10 -0
- package/dist/cjs/hooks/entities/index.js +27 -0
- package/dist/cjs/hooks/entities/index.js.map +1 -0
- package/dist/cjs/hooks/entities/useCreateEntity.d.ts +18 -0
- package/dist/cjs/hooks/entities/useCreateEntity.js +79 -0
- package/dist/cjs/hooks/entities/useCreateEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useDeleteEntity.d.ts +4 -0
- package/dist/cjs/hooks/entities/useDeleteEntity.js +72 -0
- package/dist/cjs/hooks/entities/useDeleteEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useDownvoteEntity.d.ts +5 -0
- package/dist/cjs/hooks/entities/useDownvoteEntity.js +71 -0
- package/dist/cjs/hooks/entities/useDownvoteEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useEntity.d.ts +2 -0
- package/dist/cjs/hooks/entities/useEntity.js +9 -0
- package/dist/cjs/hooks/entities/useEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useEntityData.d.ts +24 -0
- package/dist/cjs/hooks/entities/useEntityData.js +246 -0
- package/dist/cjs/hooks/entities/useEntityData.js.map +1 -0
- package/dist/cjs/hooks/entities/useEntityVotes.d.ts +11 -0
- package/dist/cjs/hooks/entities/useEntityVotes.js +241 -0
- package/dist/cjs/hooks/entities/useEntityVotes.js.map +1 -0
- package/dist/cjs/hooks/entities/useFetchEntity.d.ts +5 -0
- package/dist/cjs/hooks/entities/useFetchEntity.js +70 -0
- package/dist/cjs/hooks/entities/useFetchEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.d.ts +6 -0
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js +75 -0
- package/dist/cjs/hooks/entities/useFetchEntityByForeignId.js.map +1 -0
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.d.ts +5 -0
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js +74 -0
- package/dist/cjs/hooks/entities/useFetchEntityByShortId.js.map +1 -0
- package/dist/cjs/hooks/entities/useIncrementEntityViews.d.ts +5 -0
- package/dist/cjs/hooks/entities/useIncrementEntityViews.js +73 -0
- package/dist/cjs/hooks/entities/useIncrementEntityViews.js.map +1 -0
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.d.ts +5 -0
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.js +71 -0
- package/dist/cjs/hooks/entities/useRemoveEntityDownvote.js.map +1 -0
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.d.ts +5 -0
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.js +71 -0
- package/dist/cjs/hooks/entities/useRemoveEntityUpvote.js.map +1 -0
- package/dist/cjs/hooks/entities/useUpdateEntity.d.ts +19 -0
- package/dist/cjs/hooks/entities/useUpdateEntity.js +77 -0
- package/dist/cjs/hooks/entities/useUpdateEntity.js.map +1 -0
- package/dist/cjs/hooks/entities/useUpvoteEntity.d.ts +5 -0
- package/dist/cjs/hooks/entities/useUpvoteEntity.js +71 -0
- package/dist/cjs/hooks/entities/useUpvoteEntity.js.map +1 -0
- package/dist/cjs/hooks/entity-lists/index.d.ts +4 -0
- package/dist/cjs/hooks/entity-lists/index.js +11 -0
- package/dist/cjs/hooks/entity-lists/index.js.map +1 -0
- package/dist/cjs/hooks/entity-lists/useEntityList.d.ts +53 -0
- package/dist/cjs/hooks/entity-lists/useEntityList.js +359 -0
- package/dist/cjs/hooks/entity-lists/useEntityList.js.map +1 -0
- package/dist/cjs/hooks/entity-lists/useEntityListActions.d.ts +51 -0
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js +198 -0
- package/dist/cjs/hooks/entity-lists/useEntityListActions.js.map +1 -0
- package/dist/cjs/hooks/entity-lists/useInfusedData.d.ts +8 -0
- package/dist/cjs/hooks/entity-lists/useInfusedData.js +130 -0
- package/dist/cjs/hooks/entity-lists/useInfusedData.js.map +1 -0
- package/dist/cjs/hooks/lists/index.d.ts +3 -0
- package/dist/cjs/hooks/lists/index.js +14 -0
- package/dist/cjs/hooks/lists/index.js.map +1 -0
- package/dist/cjs/hooks/lists/useIsEntitySaved.d.ts +5 -0
- package/dist/cjs/hooks/lists/useIsEntitySaved.js +83 -0
- package/dist/cjs/hooks/lists/useIsEntitySaved.js.map +1 -0
- package/dist/cjs/hooks/lists/useLists.d.ts +36 -0
- package/dist/cjs/hooks/lists/useLists.js +239 -0
- package/dist/cjs/hooks/lists/useLists.js.map +1 -0
- package/dist/cjs/hooks/lists/useListsActions.d.ts +21 -0
- package/dist/cjs/hooks/lists/useListsActions.js +341 -0
- package/dist/cjs/hooks/lists/useListsActions.js.map +1 -0
- package/dist/cjs/hooks/projects/index.d.ts +2 -0
- package/dist/cjs/hooks/projects/index.js +11 -0
- package/dist/cjs/hooks/projects/index.js.map +1 -0
- package/dist/cjs/hooks/projects/useProject.d.ts +2 -0
- package/dist/cjs/hooks/projects/useProject.js +9 -0
- package/dist/cjs/hooks/projects/useProject.js.map +1 -0
- package/dist/cjs/hooks/projects/useProjectData.d.ts +10 -0
- package/dist/cjs/hooks/projects/useProjectData.js +78 -0
- package/dist/cjs/hooks/projects/useProjectData.js.map +1 -0
- package/dist/cjs/hooks/reports/index.d.ts +1 -0
- package/dist/cjs/hooks/reports/index.js +9 -0
- package/dist/cjs/hooks/reports/index.js.map +1 -0
- package/dist/cjs/hooks/reports/useCreateReport.d.ts +14 -0
- package/dist/cjs/hooks/reports/useCreateReport.js +108 -0
- package/dist/cjs/hooks/reports/useCreateReport.js.map +1 -0
- package/dist/cjs/hooks/storage/index.d.ts +1 -0
- package/dist/cjs/hooks/storage/index.js +9 -0
- package/dist/cjs/hooks/storage/index.js.map +1 -0
- package/dist/cjs/hooks/storage/useUploadFile.d.ts +14 -0
- package/dist/cjs/hooks/storage/useUploadFile.js +95 -0
- package/dist/cjs/hooks/storage/useUploadFile.js.map +1 -0
- package/dist/cjs/hooks/user/index.d.ts +2 -0
- package/dist/cjs/hooks/user/index.js +12 -0
- package/dist/cjs/hooks/user/index.js.map +1 -0
- package/dist/cjs/hooks/user/useUser.d.ts +18 -0
- package/dist/cjs/hooks/user/useUser.js +116 -0
- package/dist/cjs/hooks/user/useUser.js.map +1 -0
- package/dist/cjs/hooks/user/useUserActions.d.ts +12 -0
- package/dist/cjs/hooks/user/useUserActions.js +125 -0
- package/dist/cjs/hooks/user/useUserActions.js.map +1 -0
- package/dist/cjs/hooks/users/follows/index.d.ts +4 -0
- package/dist/cjs/hooks/users/follows/index.js +15 -0
- package/dist/cjs/hooks/users/follows/index.js.map +1 -0
- package/dist/cjs/hooks/users/follows/useFetchFollow.d.ts +6 -0
- package/dist/cjs/hooks/users/follows/useFetchFollow.js +81 -0
- package/dist/cjs/hooks/users/follows/useFetchFollow.js.map +1 -0
- package/dist/cjs/hooks/users/follows/useFollowManager.d.ts +9 -0
- package/dist/cjs/hooks/users/follows/useFollowManager.js +122 -0
- package/dist/cjs/hooks/users/follows/useFollowManager.js.map +1 -0
- package/dist/cjs/hooks/users/follows/useFollowUser.d.ts +4 -0
- package/dist/cjs/hooks/users/follows/useFollowUser.js +71 -0
- package/dist/cjs/hooks/users/follows/useFollowUser.js.map +1 -0
- package/dist/cjs/hooks/users/follows/useUnfollowUser.d.ts +4 -0
- package/dist/cjs/hooks/users/follows/useUnfollowUser.js +81 -0
- package/dist/cjs/hooks/users/follows/useUnfollowUser.js.map +1 -0
- package/dist/cjs/hooks/users/index.d.ts +9 -0
- package/dist/cjs/hooks/users/index.js +28 -0
- package/dist/cjs/hooks/users/index.js.map +1 -0
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.d.ts +6 -0
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.js +72 -0
- package/dist/cjs/hooks/users/useCheckUsernameAvailability.js.map +1 -0
- package/dist/cjs/hooks/users/useFetchUser.d.ts +5 -0
- package/dist/cjs/hooks/users/useFetchUser.js +70 -0
- package/dist/cjs/hooks/users/useFetchUser.js.map +1 -0
- package/dist/cjs/hooks/users/useFetchUserByForeignId.d.ts +5 -0
- package/dist/cjs/hooks/users/useFetchUserByForeignId.js +72 -0
- package/dist/cjs/hooks/users/useFetchUserByForeignId.js.map +1 -0
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.d.ts +6 -0
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.js +71 -0
- package/dist/cjs/hooks/users/useFetchUserFollowersCount.js.map +1 -0
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.d.ts +6 -0
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.js +71 -0
- package/dist/cjs/hooks/users/useFetchUserFollowingCount.js.map +1 -0
- package/dist/cjs/hooks/users/useFetchUserSuggestions.d.ts +5 -0
- package/dist/cjs/hooks/users/useFetchUserSuggestions.js +72 -0
- package/dist/cjs/hooks/users/useFetchUserSuggestions.js.map +1 -0
- package/dist/cjs/hooks/users/useMentions.d.ts +18 -0
- package/dist/cjs/hooks/users/useMentions.js +185 -0
- package/dist/cjs/hooks/users/useMentions.js.map +1 -0
- package/dist/cjs/hooks/users/useUpdateUser.d.ts +19 -0
- package/dist/cjs/hooks/users/useUpdateUser.js +73 -0
- package/dist/cjs/hooks/users/useUpdateUser.js.map +1 -0
- package/dist/cjs/hooks/utils/index.d.ts +1 -0
- package/dist/cjs/hooks/utils/index.js +9 -0
- package/dist/cjs/hooks/utils/index.js.map +1 -0
- package/dist/cjs/hooks/utils/useGetMetadata.d.ts +4 -0
- package/dist/cjs/hooks/utils/useGetMetadata.js +79 -0
- package/dist/cjs/hooks/utils/useGetMetadata.js.map +1 -0
- package/dist/cjs/index.d.ts +32 -0
- package/dist/cjs/index.js +142 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/interfaces/CommentsSortByOptions.d.ts +1 -0
- package/dist/cjs/interfaces/CommentsSortByOptions.js +3 -0
- package/dist/cjs/interfaces/CommentsSortByOptions.js.map +1 -0
- package/dist/cjs/interfaces/EntityCommentsTree.d.ts +13 -0
- package/dist/cjs/interfaces/EntityCommentsTree.js +3 -0
- package/dist/cjs/interfaces/EntityCommentsTree.js.map +1 -0
- package/dist/cjs/interfaces/EntityListSortByOptions.d.ts +1 -0
- package/dist/cjs/interfaces/EntityListSortByOptions.js +3 -0
- package/dist/cjs/interfaces/EntityListSortByOptions.js.map +1 -0
- package/dist/cjs/interfaces/TimeFrame.d.ts +1 -0
- package/dist/cjs/interfaces/TimeFrame.js +3 -0
- package/dist/cjs/interfaces/TimeFrame.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.d.ts +3 -0
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/AttachmentsFilters.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/ContentFilters.d.ts +5 -0
- package/dist/cjs/interfaces/entity-filters/ContentFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/ContentFilters.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.d.ts +4 -0
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/KeywordsFilters.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/LocationFilters.d.ts +5 -0
- package/dist/cjs/interfaces/entity-filters/LocationFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/LocationFilters.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.d.ts +7 -0
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/MetadataFilters.js.map +1 -0
- package/dist/cjs/interfaces/entity-filters/TitleFilters.d.ts +5 -0
- package/dist/cjs/interfaces/entity-filters/TitleFilters.js +3 -0
- package/dist/cjs/interfaces/entity-filters/TitleFilters.js.map +1 -0
- package/dist/cjs/interfaces/models/AppNotification.d.ts +140 -0
- package/dist/cjs/interfaces/models/AppNotification.js +3 -0
- package/dist/cjs/interfaces/models/AppNotification.js.map +1 -0
- package/dist/cjs/interfaces/models/Comment.d.ts +32 -0
- package/dist/cjs/interfaces/models/Comment.js +3 -0
- package/dist/cjs/interfaces/models/Comment.js.map +1 -0
- package/dist/cjs/interfaces/models/Entity.d.ts +37 -0
- package/dist/cjs/interfaces/models/Entity.js +3 -0
- package/dist/cjs/interfaces/models/Entity.js.map +1 -0
- package/dist/cjs/interfaces/models/Follow.d.ts +5 -0
- package/dist/cjs/interfaces/models/Follow.js +3 -0
- package/dist/cjs/interfaces/models/Follow.js.map +1 -0
- package/dist/cjs/interfaces/models/List.d.ts +12 -0
- package/dist/cjs/interfaces/models/List.js +3 -0
- package/dist/cjs/interfaces/models/List.js.map +1 -0
- package/dist/cjs/interfaces/models/Mention.d.ts +4 -0
- package/dist/cjs/interfaces/models/Mention.js +3 -0
- package/dist/cjs/interfaces/models/Mention.js.map +1 -0
- package/dist/cjs/interfaces/models/Project.d.ts +14 -0
- package/dist/cjs/interfaces/models/Project.js +3 -0
- package/dist/cjs/interfaces/models/Project.js.map +1 -0
- package/dist/cjs/interfaces/models/User.d.ts +33 -0
- package/dist/cjs/interfaces/models/User.js +3 -0
- package/dist/cjs/interfaces/models/User.js.map +1 -0
- package/dist/cjs/store/api/appNotificationsApi.d.ts +2024 -0
- package/dist/cjs/store/api/appNotificationsApi.js +224 -0
- package/dist/cjs/store/api/appNotificationsApi.js.map +1 -0
- package/dist/cjs/store/api/baseApi.d.ts +1 -0
- package/dist/cjs/store/api/baseApi.js +43 -0
- package/dist/cjs/store/api/baseApi.js.map +1 -0
- package/dist/cjs/store/api/entityListsApi.d.ts +1719 -0
- package/dist/cjs/store/api/entityListsApi.js +237 -0
- package/dist/cjs/store/api/entityListsApi.js.map +1 -0
- package/dist/cjs/store/api/index.d.ts +4 -0
- package/dist/cjs/store/api/index.js +29 -0
- package/dist/cjs/store/api/index.js.map +1 -0
- package/dist/cjs/store/api/listsApi.d.ts +3044 -0
- package/dist/cjs/store/api/listsApi.js +288 -0
- package/dist/cjs/store/api/listsApi.js.map +1 -0
- package/dist/cjs/store/api/userApi.d.ts +183 -0
- package/dist/cjs/store/api/userApi.js +38 -0
- package/dist/cjs/store/api/userApi.js.map +1 -0
- package/dist/cjs/store/index.d.ts +21 -0
- package/dist/cjs/store/index.js +73 -0
- package/dist/cjs/store/index.js.map +1 -0
- package/dist/cjs/store/middleware.d.ts +4 -0
- package/dist/cjs/store/middleware.js +43 -0
- package/dist/cjs/store/middleware.js.map +1 -0
- package/dist/cjs/store/rootReducer.d.ts +16 -0
- package/dist/cjs/store/rootReducer.js +26 -0
- package/dist/cjs/store/rootReducer.js.map +1 -0
- package/dist/cjs/store/slices/appNotificationsSlice.d.ts +58 -0
- package/dist/cjs/store/slices/appNotificationsSlice.js +135 -0
- package/dist/cjs/store/slices/appNotificationsSlice.js.map +1 -0
- package/dist/cjs/store/slices/authSlice.d.ts +24 -0
- package/dist/cjs/store/slices/authSlice.js +79 -0
- package/dist/cjs/store/slices/authSlice.js.map +1 -0
- package/dist/cjs/store/slices/authThunks.d.ts +40 -0
- package/dist/cjs/store/slices/authThunks.js +363 -0
- package/dist/cjs/store/slices/authThunks.js.map +1 -0
- package/dist/cjs/store/slices/entityListsSlice.d.ts +364 -0
- package/dist/cjs/store/slices/entityListsSlice.js +295 -0
- package/dist/cjs/store/slices/entityListsSlice.js.map +1 -0
- package/dist/cjs/store/slices/index.d.ts +0 -0
- package/dist/cjs/store/slices/index.js +7 -0
- package/dist/cjs/store/slices/index.js.map +1 -0
- package/dist/cjs/store/slices/listsSlice.d.ts +147 -0
- package/dist/cjs/store/slices/listsSlice.js +211 -0
- package/dist/cjs/store/slices/listsSlice.js.map +1 -0
- package/dist/cjs/store/slices/userSlice.d.ts +29 -0
- package/dist/cjs/store/slices/userSlice.js +87 -0
- package/dist/cjs/store/slices/userSlice.js.map +1 -0
- package/dist/cjs/store/types/index.d.ts +8 -0
- package/dist/cjs/store/types/index.js +3 -0
- package/dist/cjs/store/types/index.js.map +1 -0
- package/dist/cjs/utils/constants.d.ts +1 -0
- package/dist/cjs/utils/constants.js +5 -0
- package/dist/cjs/utils/constants.js.map +1 -0
- package/dist/cjs/utils/env.d.ts +19 -0
- package/dist/cjs/utils/env.js +102 -0
- package/dist/cjs/utils/env.js.map +1 -0
- package/dist/cjs/utils/handleError.d.ts +1 -0
- package/dist/cjs/utils/handleError.js +24 -0
- package/dist/cjs/utils/handleError.js.map +1 -0
- package/dist/cjs/utils/isAbsoluteUrl.d.ts +1 -0
- package/dist/cjs/utils/isAbsoluteUrl.js +9 -0
- package/dist/cjs/utils/isAbsoluteUrl.js.map +1 -0
- package/dist/cjs/utils/isReactNative.d.ts +1 -0
- package/dist/cjs/utils/isReactNative.js +8 -0
- package/dist/cjs/utils/isReactNative.js.map +1 -0
- package/dist/cjs/utils/isUUID.d.ts +1 -0
- package/dist/cjs/utils/isUUID.js +8 -0
- package/dist/cjs/utils/isUUID.js.map +1 -0
- package/dist/cjs/utils/keywordHelpers.d.ts +30 -0
- package/dist/cjs/utils/keywordHelpers.js +101 -0
- package/dist/cjs/utils/keywordHelpers.js.map +1 -0
- package/dist/esm/hooks/entity-lists/useEntityList.js +4 -3
- package/dist/esm/hooks/entity-lists/useEntityList.js.map +1 -1
- package/dist/esm/hooks/entity-lists/useEntityListActions.d.ts +1 -1
- package/dist/esm/hooks/entity-lists/useEntityListActions.js +12 -10
- package/dist/esm/hooks/entity-lists/useEntityListActions.js.map +1 -1
- package/dist/esm/hooks/users/follows/useFollowManager.js +4 -2
- package/dist/esm/hooks/users/follows/useFollowManager.js.map +1 -1
- package/dist/esm/store/api/entityListsApi.d.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,185 @@
|
|
|
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 __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
|
+
if (ar || !(i in from)) {
|
|
41
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
42
|
+
ar[i] = from[i];
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
+
};
|
|
47
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
48
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
49
|
+
};
|
|
50
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
51
|
+
var react_1 = require("react");
|
|
52
|
+
var useFetchUserSuggestions_1 = __importDefault(require("./useFetchUserSuggestions"));
|
|
53
|
+
var handleError_1 = require("../../utils/handleError");
|
|
54
|
+
var useMentions = function (_a) {
|
|
55
|
+
var content = _a.content, setContent = _a.setContent, focus = _a.focus, cursorPosition = _a.cursorPosition, isSelectionActive = _a.isSelectionActive;
|
|
56
|
+
var fetchMentionSuggestions = (0, useFetchUserSuggestions_1.default)();
|
|
57
|
+
// const loading = useRef(false);
|
|
58
|
+
var _b = (0, react_1.useState)(false), loadingState = _b[0], setLoadingState = _b[1];
|
|
59
|
+
var _c = (0, react_1.useState)([]), mentions = _c[0], setMentions = _c[1];
|
|
60
|
+
var _d = (0, react_1.useState)(false), isMentionActive = _d[0], setIsMentionActive = _d[1];
|
|
61
|
+
var _e = (0, react_1.useState)(""), mentionTrigger = _e[0], setMentionTrigger = _e[1];
|
|
62
|
+
var _f = (0, react_1.useState)([]), mentionSuggestions = _f[0], setMentionSuggestions = _f[1];
|
|
63
|
+
var debounceTimerRef = (0, react_1.useRef)(null);
|
|
64
|
+
var debounceDelay = 1000;
|
|
65
|
+
var resetMentions = function () {
|
|
66
|
+
setMentions([]);
|
|
67
|
+
setIsMentionActive(false);
|
|
68
|
+
setMentionTrigger("");
|
|
69
|
+
setMentionSuggestions([]);
|
|
70
|
+
setLoadingState(false);
|
|
71
|
+
};
|
|
72
|
+
var addMention = function (user) {
|
|
73
|
+
if (!user.username)
|
|
74
|
+
throw new Error("User has no username set");
|
|
75
|
+
setMentions(function (prevMentions) {
|
|
76
|
+
// Check if the user already exists based on id
|
|
77
|
+
if (prevMentions.some(function (mention) { return mention.id === user.id; })) {
|
|
78
|
+
return prevMentions; // Return the previous mentions if the user already exists
|
|
79
|
+
}
|
|
80
|
+
// Add the new mention if it doesn't already exist
|
|
81
|
+
return __spreadArray(__spreadArray([], prevMentions, true), [
|
|
82
|
+
{
|
|
83
|
+
id: user.id,
|
|
84
|
+
username: user.username,
|
|
85
|
+
},
|
|
86
|
+
], false);
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
var handleMentionClick = function (user) {
|
|
90
|
+
var mentionRegex = new RegExp("@".concat(mentionTrigger, "(\\s|$)"));
|
|
91
|
+
setContent(content.replace(mentionRegex, "@".concat(user.username, " ")));
|
|
92
|
+
addMention(user);
|
|
93
|
+
setIsMentionActive(false);
|
|
94
|
+
setMentionTrigger("");
|
|
95
|
+
setMentionSuggestions([]);
|
|
96
|
+
setLoadingState(false);
|
|
97
|
+
focus();
|
|
98
|
+
};
|
|
99
|
+
var handleFetchMentionSuggestions = (0, react_1.useCallback)(function (query) { return __awaiter(void 0, void 0, void 0, function () {
|
|
100
|
+
var suggestions, err_1;
|
|
101
|
+
return __generator(this, function (_a) {
|
|
102
|
+
switch (_a.label) {
|
|
103
|
+
case 0:
|
|
104
|
+
_a.trys.push([0, 2, 3, 4]);
|
|
105
|
+
return [4 /*yield*/, fetchMentionSuggestions({ query: query })];
|
|
106
|
+
case 1:
|
|
107
|
+
suggestions = _a.sent();
|
|
108
|
+
if (suggestions && suggestions.length > 0) {
|
|
109
|
+
setMentionSuggestions(suggestions); // Replace with fetched data
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
setMentionSuggestions([]);
|
|
113
|
+
setIsMentionActive(false);
|
|
114
|
+
}
|
|
115
|
+
return [3 /*break*/, 4];
|
|
116
|
+
case 2:
|
|
117
|
+
err_1 = _a.sent();
|
|
118
|
+
(0, handleError_1.handleError)(err_1, "Error fetching mentions");
|
|
119
|
+
return [3 /*break*/, 4];
|
|
120
|
+
case 3:
|
|
121
|
+
setLoadingState(false); // Set to false after data is fetched
|
|
122
|
+
return [7 /*endfinally*/];
|
|
123
|
+
case 4: return [2 /*return*/];
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}); }, [fetchMentionSuggestions]);
|
|
127
|
+
(0, react_1.useEffect)(function () {
|
|
128
|
+
var start = cursorPosition - 1;
|
|
129
|
+
// Move backward from cursor to find the word directly before the cursor
|
|
130
|
+
while (start >= 0 && content[start] !== " ") {
|
|
131
|
+
start--;
|
|
132
|
+
}
|
|
133
|
+
// Extract potential trigger word (start + 1 because `start` is on the space)
|
|
134
|
+
var potentialTrigger = content.slice(start + 1, cursorPosition);
|
|
135
|
+
// Regex to check if the trigger starts with "@" and contains only valid characters
|
|
136
|
+
var validMentionPattern = /^@[\w.]+$/; // \w matches a-z, A-Z, 0-9, and "_"
|
|
137
|
+
if (!isSelectionActive &&
|
|
138
|
+
validMentionPattern.test(potentialTrigger) &&
|
|
139
|
+
potentialTrigger.length > 3) {
|
|
140
|
+
var triggerText_1 = potentialTrigger.slice(1); // remove "@"
|
|
141
|
+
setMentionTrigger(triggerText_1);
|
|
142
|
+
setIsMentionActive(true);
|
|
143
|
+
setLoadingState(true);
|
|
144
|
+
// Clear the previous debounce timer
|
|
145
|
+
if (debounceTimerRef.current) {
|
|
146
|
+
clearTimeout(debounceTimerRef.current);
|
|
147
|
+
}
|
|
148
|
+
// Set a new debounce timer
|
|
149
|
+
debounceTimerRef.current = setTimeout(function () {
|
|
150
|
+
handleFetchMentionSuggestions(triggerText_1);
|
|
151
|
+
}, debounceDelay);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
if (debounceTimerRef.current) {
|
|
155
|
+
clearTimeout(debounceTimerRef.current);
|
|
156
|
+
}
|
|
157
|
+
setMentionTrigger("");
|
|
158
|
+
setIsMentionActive(false);
|
|
159
|
+
setMentionSuggestions([]);
|
|
160
|
+
setLoadingState(false);
|
|
161
|
+
}
|
|
162
|
+
// Cleanup on component unmount to clear any remaining timer
|
|
163
|
+
return function () {
|
|
164
|
+
if (debounceTimerRef.current) {
|
|
165
|
+
clearTimeout(debounceTimerRef.current);
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
}, [
|
|
169
|
+
cursorPosition,
|
|
170
|
+
isSelectionActive,
|
|
171
|
+
handleFetchMentionSuggestions,
|
|
172
|
+
content,
|
|
173
|
+
]);
|
|
174
|
+
return {
|
|
175
|
+
isMentionActive: isMentionActive,
|
|
176
|
+
loading: loadingState,
|
|
177
|
+
mentionSuggestions: mentionSuggestions,
|
|
178
|
+
handleMentionClick: handleMentionClick,
|
|
179
|
+
mentions: mentions,
|
|
180
|
+
addMention: addMention,
|
|
181
|
+
resetMentions: resetMentions,
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
exports.default = useMentions;
|
|
185
|
+
//# sourceMappingURL=useMentions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMentions.js","sourceRoot":"","sources":["../../../../src/hooks/users/useMentions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiE;AAGjE,sFAAgE;AAChE,uDAAsD;AAEtD,IAAM,WAAW,GAAG,UAAC,EAYpB;QAXC,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,KAAK,WAAA,EACL,cAAc,oBAAA,EACd,iBAAiB,uBAAA;IAQjB,IAAM,uBAAuB,GAAG,IAAA,iCAAuB,GAAE,CAAC;IAE1D,iCAAiC;IAC3B,IAAA,KAAkC,IAAA,gBAAQ,E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AAC,OAAO,CAAC,CAAC;YACzC,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE;QACD,cAAc;QACd,iBAAiB;QACjB,6BAA6B;QAC7B,OAAO;KACR,CAAC,CAAC;IAEH,OAAO;QACL,eAAe,iBAAA;QACf,OAAO,EAAE,YAAY;QACrB,kBAAkB,oBAAA;QAClB,kBAAkB,oBAAA;QAClB,QAAQ,UAAA;QACR,UAAU,YAAA;QACV,aAAa,eAAA;KACd,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AuthUser } from "../../interfaces/models/User";
|
|
2
|
+
export type UpdateUserParams = {
|
|
3
|
+
name?: string | null;
|
|
4
|
+
username?: string | null;
|
|
5
|
+
avatar?: string | null;
|
|
6
|
+
bio?: string;
|
|
7
|
+
birthdate?: Date | null;
|
|
8
|
+
location?: {
|
|
9
|
+
latitude: number;
|
|
10
|
+
longitude: number;
|
|
11
|
+
} | null;
|
|
12
|
+
metadata?: Record<string, any>;
|
|
13
|
+
secureMetadata?: Record<string, any>;
|
|
14
|
+
};
|
|
15
|
+
declare function useUpdateUser(): ({ userId, update, }: {
|
|
16
|
+
userId: string;
|
|
17
|
+
update: UpdateUserParams;
|
|
18
|
+
}) => Promise<AuthUser>;
|
|
19
|
+
export default useUpdateUser;
|
|
@@ -0,0 +1,73 @@
|
|
|
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 useUpdateUser() {
|
|
46
|
+
var _this = this;
|
|
47
|
+
var axios = (0, useAxiosPrivate_1.default)();
|
|
48
|
+
var projectId = (0, useProject_1.default)().projectId;
|
|
49
|
+
var updateUser = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
50
|
+
var response;
|
|
51
|
+
var userId = _b.userId, update = _b.update;
|
|
52
|
+
return __generator(this, function (_c) {
|
|
53
|
+
switch (_c.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
if (!projectId) {
|
|
56
|
+
throw new Error("No project specified");
|
|
57
|
+
}
|
|
58
|
+
if (!update || Object.keys(update).length == 0) {
|
|
59
|
+
console.error("Update object is empty");
|
|
60
|
+
}
|
|
61
|
+
return [4 /*yield*/, axios.patch("/".concat(projectId, "/users/").concat(userId), {
|
|
62
|
+
update: update,
|
|
63
|
+
}, { withCredentials: true })];
|
|
64
|
+
case 1:
|
|
65
|
+
response = _c.sent();
|
|
66
|
+
return [2 /*return*/, response.data];
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
}); }, [projectId, axios]);
|
|
70
|
+
return updateUser;
|
|
71
|
+
}
|
|
72
|
+
exports.default = useUpdateUser;
|
|
73
|
+
//# sourceMappingURL=useUpdateUser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdateUser.js","sourceRoot":"","sources":["../../../../src/hooks/users/useUpdateUser.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,iFAA2D;AAC3D,sEAAgD;AAiBhD,SAAS,aAAa;IAAtB,iBAkCC;IAjCC,IAAM,KAAK,GAAG,IAAA,yBAAe,GAAE,CAAC;IACxB,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,UAAU,GAAG,IAAA,mBAAW,EAC5B,gEAAO,EAMN;;YALC,MAAM,YAAA,EACN,MAAM,YAAA;;;;oBAKN,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;wBAC/C,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;oBAC1C,CAAC;oBAEgB,qBAAM,KAAK,CAAC,KAAK,CAChC,WAAI,SAAS,oBAAU,MAAM,CAAE,EAC/B;4BACE,MAAM,QAAA;yBACP,EACD,EAAE,eAAe,EAAE,IAAI,EAAE,CAC1B,EAAA;;oBANK,QAAQ,GAAG,SAMhB;oBAED,sBAAO,QAAQ,CAAC,IAAgB,EAAC;;;SAClC,EACD,CAAC,SAAS,EAAE,KAAK,CAAC,CACnB,CAAC;IAEF,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,kBAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as useGetMetadata } from "./useGetMetadata";
|
|
@@ -0,0 +1,9 @@
|
|
|
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.useGetMetadata = void 0;
|
|
7
|
+
var useGetMetadata_1 = require("./useGetMetadata");
|
|
8
|
+
Object.defineProperty(exports, "useGetMetadata", { enumerable: true, get: function () { return __importDefault(useGetMetadata_1).default; } });
|
|
9
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/hooks/utils/index.ts"],"names":[],"mappings":";;;;;;AAAA,mDAA6D;AAApD,iIAAA,OAAO,OAAkB"}
|
|
@@ -0,0 +1,79 @@
|
|
|
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 axios_1 = __importDefault(require("../../config/axios"));
|
|
44
|
+
var useProject_1 = __importDefault(require("../projects/useProject"));
|
|
45
|
+
var isAbsoluteUrl_1 = require("../../utils/isAbsoluteUrl");
|
|
46
|
+
function useGetMetadata() {
|
|
47
|
+
var _this = this;
|
|
48
|
+
var projectId = (0, useProject_1.default)().projectId;
|
|
49
|
+
var getMetadata = (0, react_1.useCallback)(function (_a) { return __awaiter(_this, [_a], void 0, function (_b) {
|
|
50
|
+
var isAbsolute, response;
|
|
51
|
+
var url = _b.url;
|
|
52
|
+
return __generator(this, function (_c) {
|
|
53
|
+
switch (_c.label) {
|
|
54
|
+
case 0:
|
|
55
|
+
if (!projectId) {
|
|
56
|
+
throw new Error("No project specified");
|
|
57
|
+
}
|
|
58
|
+
if (!url) {
|
|
59
|
+
throw new Error("Please specify a URL");
|
|
60
|
+
}
|
|
61
|
+
isAbsolute = (0, isAbsoluteUrl_1.isAbsoluteUrl)(url);
|
|
62
|
+
if (!isAbsolute) {
|
|
63
|
+
throw new Error("Please provide an absolute URL");
|
|
64
|
+
}
|
|
65
|
+
return [4 /*yield*/, axios_1.default.get("/".concat(projectId, "/utils/get-metadata"), {
|
|
66
|
+
params: {
|
|
67
|
+
url: url,
|
|
68
|
+
},
|
|
69
|
+
})];
|
|
70
|
+
case 1:
|
|
71
|
+
response = _c.sent();
|
|
72
|
+
return [2 /*return*/, response.data];
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
}); }, [projectId]);
|
|
76
|
+
return getMetadata;
|
|
77
|
+
}
|
|
78
|
+
exports.default = useGetMetadata;
|
|
79
|
+
//# sourceMappingURL=useGetMetadata.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGetMetadata.js","sourceRoot":"","sources":["../../../../src/hooks/utils/useGetMetadata.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,6DAAuC;AACvC,sEAAgD;AAChD,2DAA0D;AAE1D,SAAS,cAAc;IAAvB,iBA+BC;IA9BS,IAAA,SAAS,GAAK,IAAA,oBAAU,GAAE,UAAjB,CAAkB;IAEnC,IAAM,WAAW,GAAG,IAAA,mBAAW,EAC7B,gEAAO,EAAwB;;YAAtB,GAAG,SAAA;;;;oBACV,IAAI,CAAC,SAAS,EAAE,CAAC;wBACf,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAED,IAAI,CAAC,GAAG,EAAE,CAAC;wBACT,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;oBAC1C,CAAC;oBAEK,UAAU,GAAG,IAAA,6BAAa,EAAC,GAAG,CAAC,CAAC;oBAEtC,IAAI,CAAC,UAAU,EAAE,CAAC;wBAChB,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAC;oBACpD,CAAC;oBAEgB,qBAAM,eAAK,CAAC,GAAG,CAAC,WAAI,SAAS,wBAAqB,EAAE;4BACnE,MAAM,EAAE;gCACN,GAAG,KAAA;6BACJ;yBACF,CAAC,EAAA;;oBAJI,QAAQ,GAAG,SAIf;oBAEF,sBAAO,QAAQ,CAAC,IAAI,EAAC;;;SACtB,EACD,CAAC,SAAS,CAAC,CACZ,CAAC;IAEF,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export { handleError } from "./utils/handleError";
|
|
2
|
+
export { keywordHelpers } from "./utils/keywordHelpers";
|
|
3
|
+
export { safeMergeStyleProps } from "./helpers/safeMergeStyleProps";
|
|
4
|
+
export { getUserName } from "./helpers/getUserName";
|
|
5
|
+
export { default as getPublicFileUrl } from "./helpers/getPublicFileUrl";
|
|
6
|
+
export { isDevelopment, isProduction, getApiBaseUrl, getEnvVar, } from "./utils/env";
|
|
7
|
+
export { reportReasons } from "./constants/reportReasons";
|
|
8
|
+
export type { ReportReasonKey } from "./constants/reportReasons";
|
|
9
|
+
export { ReplykeProvider, EntityProvider, CommentSectionProvider, } from "./context";
|
|
10
|
+
export { useProject, useProjectData } from "./hooks/projects";
|
|
11
|
+
export { useSignTestingJwt } from "./hooks/crypto";
|
|
12
|
+
export { useAuth, type UseAuthValues } from "./hooks/auth";
|
|
13
|
+
export { useUser, useUserActions, type UseUserProps, type UseUserValues, } from "./hooks/user";
|
|
14
|
+
export { useAppNotifications, useAppNotificationsActions, type UseAppNotificationsProps, type UseAppNotificationsValues, } from "./hooks/app-notifications";
|
|
15
|
+
export { useLists, useListsActions, useIsEntitySaved, type UseListsProps, type UseListsValues, } from "./hooks/lists";
|
|
16
|
+
export { useEntity, useEntityData, useCreateEntity, useFetchEntity, useFetchEntityByForeignId, useFetchEntityByShortId, useUpdateEntity, useEntityVotes, useDeleteEntity, useInfusedData, } from "./hooks/entities";
|
|
17
|
+
export { useEntityList, useEntityListActions, type UseEntityListProps, type UseEntityListValues, type EntityListFilters, type EntityListFetchOptions, } from "./hooks/entity-lists";
|
|
18
|
+
export { useCommentSection, useCommentSectionData, useCreateComment, useFetchManyComments, useFetchComment, useFetchCommentByForeignId, useReplies, useUpdateComment, useCommentVotes, useDeleteComment, useEntityComments, useProfileComments, } from "./hooks/comments";
|
|
19
|
+
export { useFetchUser, useFetchUserByForeignId, useFetchUserFollowersCount, useFetchUserFollowingCount, useCheckUsernameAvailability, useFetchUserSuggestions, useMentions, useUpdateUser, useFetchFollow, useFollowUser, useUnfollowUser, useFollowManager, } from "./hooks/users";
|
|
20
|
+
export { useCreateReport } from "./hooks/reports";
|
|
21
|
+
export { useGetMetadata } from "./hooks/utils";
|
|
22
|
+
export { useUploadFile } from "./hooks/storage";
|
|
23
|
+
export type { EntityCommentsTree } from "./interfaces/EntityCommentsTree";
|
|
24
|
+
export type { UserFull, User, AuthUser } from "./interfaces/models/User";
|
|
25
|
+
export * as AppNotification from "./interfaces/models/AppNotification";
|
|
26
|
+
export type { Entity } from "./interfaces/models/Entity";
|
|
27
|
+
export type { List } from "./interfaces/models/List";
|
|
28
|
+
export type { Comment, GifData } from "./interfaces/models/Comment";
|
|
29
|
+
export type { Mention } from "./interfaces/models/Mention";
|
|
30
|
+
export type { CommentsSortByOptions } from "./interfaces/CommentsSortByOptions";
|
|
31
|
+
export type { EntityListSortByOptions } from "./interfaces/EntityListSortByOptions";
|
|
32
|
+
export type { TimeFrame } from "./interfaces/TimeFrame";
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.useFetchUserByForeignId = exports.useFetchUser = exports.useProfileComments = exports.useEntityComments = exports.useDeleteComment = exports.useCommentVotes = exports.useUpdateComment = exports.useReplies = exports.useFetchCommentByForeignId = exports.useFetchComment = exports.useFetchManyComments = exports.useCreateComment = exports.useCommentSectionData = exports.useCommentSection = exports.useEntityListActions = exports.useEntityList = exports.useInfusedData = exports.useDeleteEntity = exports.useEntityVotes = exports.useUpdateEntity = exports.useFetchEntityByShortId = exports.useFetchEntityByForeignId = exports.useFetchEntity = exports.useCreateEntity = exports.useEntityData = exports.useEntity = exports.useIsEntitySaved = exports.useListsActions = exports.useLists = exports.useAppNotificationsActions = exports.useAppNotifications = exports.useUserActions = exports.useUser = exports.useAuth = exports.useSignTestingJwt = exports.useProjectData = exports.useProject = exports.CommentSectionProvider = exports.EntityProvider = exports.ReplykeProvider = exports.reportReasons = exports.getEnvVar = exports.getApiBaseUrl = exports.isProduction = exports.isDevelopment = exports.getPublicFileUrl = exports.getUserName = exports.safeMergeStyleProps = exports.keywordHelpers = exports.handleError = void 0;
|
|
40
|
+
exports.AppNotification = exports.useUploadFile = exports.useGetMetadata = exports.useCreateReport = exports.useFollowManager = exports.useUnfollowUser = exports.useFollowUser = exports.useFetchFollow = exports.useUpdateUser = exports.useMentions = exports.useFetchUserSuggestions = exports.useCheckUsernameAvailability = exports.useFetchUserFollowingCount = exports.useFetchUserFollowersCount = void 0;
|
|
41
|
+
// Helpers & Utilities
|
|
42
|
+
var handleError_1 = require("./utils/handleError");
|
|
43
|
+
Object.defineProperty(exports, "handleError", { enumerable: true, get: function () { return handleError_1.handleError; } });
|
|
44
|
+
var keywordHelpers_1 = require("./utils/keywordHelpers");
|
|
45
|
+
Object.defineProperty(exports, "keywordHelpers", { enumerable: true, get: function () { return keywordHelpers_1.keywordHelpers; } });
|
|
46
|
+
var safeMergeStyleProps_1 = require("./helpers/safeMergeStyleProps");
|
|
47
|
+
Object.defineProperty(exports, "safeMergeStyleProps", { enumerable: true, get: function () { return safeMergeStyleProps_1.safeMergeStyleProps; } });
|
|
48
|
+
var getUserName_1 = require("./helpers/getUserName");
|
|
49
|
+
Object.defineProperty(exports, "getUserName", { enumerable: true, get: function () { return getUserName_1.getUserName; } });
|
|
50
|
+
var getPublicFileUrl_1 = require("./helpers/getPublicFileUrl");
|
|
51
|
+
Object.defineProperty(exports, "getPublicFileUrl", { enumerable: true, get: function () { return __importDefault(getPublicFileUrl_1).default; } });
|
|
52
|
+
var env_1 = require("./utils/env");
|
|
53
|
+
Object.defineProperty(exports, "isDevelopment", { enumerable: true, get: function () { return env_1.isDevelopment; } });
|
|
54
|
+
Object.defineProperty(exports, "isProduction", { enumerable: true, get: function () { return env_1.isProduction; } });
|
|
55
|
+
Object.defineProperty(exports, "getApiBaseUrl", { enumerable: true, get: function () { return env_1.getApiBaseUrl; } });
|
|
56
|
+
Object.defineProperty(exports, "getEnvVar", { enumerable: true, get: function () { return env_1.getEnvVar; } });
|
|
57
|
+
// Constants
|
|
58
|
+
var reportReasons_1 = require("./constants/reportReasons");
|
|
59
|
+
Object.defineProperty(exports, "reportReasons", { enumerable: true, get: function () { return reportReasons_1.reportReasons; } });
|
|
60
|
+
// Context providers (Redux-powered by default)
|
|
61
|
+
var context_1 = require("./context");
|
|
62
|
+
Object.defineProperty(exports, "ReplykeProvider", { enumerable: true, get: function () { return context_1.ReplykeProvider; } });
|
|
63
|
+
Object.defineProperty(exports, "EntityProvider", { enumerable: true, get: function () { return context_1.EntityProvider; } });
|
|
64
|
+
Object.defineProperty(exports, "CommentSectionProvider", { enumerable: true, get: function () { return context_1.CommentSectionProvider; } });
|
|
65
|
+
// -- projects
|
|
66
|
+
var projects_1 = require("./hooks/projects");
|
|
67
|
+
Object.defineProperty(exports, "useProject", { enumerable: true, get: function () { return projects_1.useProject; } });
|
|
68
|
+
Object.defineProperty(exports, "useProjectData", { enumerable: true, get: function () { return projects_1.useProjectData; } });
|
|
69
|
+
// -- crypto
|
|
70
|
+
var crypto_1 = require("./hooks/crypto");
|
|
71
|
+
Object.defineProperty(exports, "useSignTestingJwt", { enumerable: true, get: function () { return crypto_1.useSignTestingJwt; } });
|
|
72
|
+
// -- authentication (Redux-powered)
|
|
73
|
+
var auth_1 = require("./hooks/auth");
|
|
74
|
+
Object.defineProperty(exports, "useAuth", { enumerable: true, get: function () { return auth_1.useAuth; } });
|
|
75
|
+
// -- (current) user (Redux-powered)
|
|
76
|
+
var user_1 = require("./hooks/user");
|
|
77
|
+
Object.defineProperty(exports, "useUser", { enumerable: true, get: function () { return user_1.useUser; } });
|
|
78
|
+
Object.defineProperty(exports, "useUserActions", { enumerable: true, get: function () { return user_1.useUserActions; } });
|
|
79
|
+
// -- app notifications (Redux-powered)
|
|
80
|
+
var app_notifications_1 = require("./hooks/app-notifications");
|
|
81
|
+
Object.defineProperty(exports, "useAppNotifications", { enumerable: true, get: function () { return app_notifications_1.useAppNotifications; } });
|
|
82
|
+
Object.defineProperty(exports, "useAppNotificationsActions", { enumerable: true, get: function () { return app_notifications_1.useAppNotificationsActions; } });
|
|
83
|
+
// -- lists (Redux-powered)
|
|
84
|
+
var lists_1 = require("./hooks/lists");
|
|
85
|
+
Object.defineProperty(exports, "useLists", { enumerable: true, get: function () { return lists_1.useLists; } });
|
|
86
|
+
Object.defineProperty(exports, "useListsActions", { enumerable: true, get: function () { return lists_1.useListsActions; } });
|
|
87
|
+
Object.defineProperty(exports, "useIsEntitySaved", { enumerable: true, get: function () { return lists_1.useIsEntitySaved; } });
|
|
88
|
+
// -- entities
|
|
89
|
+
var entities_1 = require("./hooks/entities");
|
|
90
|
+
Object.defineProperty(exports, "useEntity", { enumerable: true, get: function () { return entities_1.useEntity; } });
|
|
91
|
+
Object.defineProperty(exports, "useEntityData", { enumerable: true, get: function () { return entities_1.useEntityData; } });
|
|
92
|
+
Object.defineProperty(exports, "useCreateEntity", { enumerable: true, get: function () { return entities_1.useCreateEntity; } });
|
|
93
|
+
Object.defineProperty(exports, "useFetchEntity", { enumerable: true, get: function () { return entities_1.useFetchEntity; } });
|
|
94
|
+
Object.defineProperty(exports, "useFetchEntityByForeignId", { enumerable: true, get: function () { return entities_1.useFetchEntityByForeignId; } });
|
|
95
|
+
Object.defineProperty(exports, "useFetchEntityByShortId", { enumerable: true, get: function () { return entities_1.useFetchEntityByShortId; } });
|
|
96
|
+
Object.defineProperty(exports, "useUpdateEntity", { enumerable: true, get: function () { return entities_1.useUpdateEntity; } });
|
|
97
|
+
Object.defineProperty(exports, "useEntityVotes", { enumerable: true, get: function () { return entities_1.useEntityVotes; } });
|
|
98
|
+
Object.defineProperty(exports, "useDeleteEntity", { enumerable: true, get: function () { return entities_1.useDeleteEntity; } });
|
|
99
|
+
Object.defineProperty(exports, "useInfusedData", { enumerable: true, get: function () { return entities_1.useInfusedData; } });
|
|
100
|
+
// -- entity lists (Redux-powered)
|
|
101
|
+
var entity_lists_1 = require("./hooks/entity-lists");
|
|
102
|
+
Object.defineProperty(exports, "useEntityList", { enumerable: true, get: function () { return entity_lists_1.useEntityList; } });
|
|
103
|
+
Object.defineProperty(exports, "useEntityListActions", { enumerable: true, get: function () { return entity_lists_1.useEntityListActions; } });
|
|
104
|
+
// -- comments
|
|
105
|
+
var comments_1 = require("./hooks/comments");
|
|
106
|
+
Object.defineProperty(exports, "useCommentSection", { enumerable: true, get: function () { return comments_1.useCommentSection; } });
|
|
107
|
+
Object.defineProperty(exports, "useCommentSectionData", { enumerable: true, get: function () { return comments_1.useCommentSectionData; } });
|
|
108
|
+
Object.defineProperty(exports, "useCreateComment", { enumerable: true, get: function () { return comments_1.useCreateComment; } });
|
|
109
|
+
Object.defineProperty(exports, "useFetchManyComments", { enumerable: true, get: function () { return comments_1.useFetchManyComments; } });
|
|
110
|
+
Object.defineProperty(exports, "useFetchComment", { enumerable: true, get: function () { return comments_1.useFetchComment; } });
|
|
111
|
+
Object.defineProperty(exports, "useFetchCommentByForeignId", { enumerable: true, get: function () { return comments_1.useFetchCommentByForeignId; } });
|
|
112
|
+
Object.defineProperty(exports, "useReplies", { enumerable: true, get: function () { return comments_1.useReplies; } });
|
|
113
|
+
Object.defineProperty(exports, "useUpdateComment", { enumerable: true, get: function () { return comments_1.useUpdateComment; } });
|
|
114
|
+
Object.defineProperty(exports, "useCommentVotes", { enumerable: true, get: function () { return comments_1.useCommentVotes; } });
|
|
115
|
+
Object.defineProperty(exports, "useDeleteComment", { enumerable: true, get: function () { return comments_1.useDeleteComment; } });
|
|
116
|
+
Object.defineProperty(exports, "useEntityComments", { enumerable: true, get: function () { return comments_1.useEntityComments; } });
|
|
117
|
+
Object.defineProperty(exports, "useProfileComments", { enumerable: true, get: function () { return comments_1.useProfileComments; } });
|
|
118
|
+
// -- users
|
|
119
|
+
var users_1 = require("./hooks/users");
|
|
120
|
+
Object.defineProperty(exports, "useFetchUser", { enumerable: true, get: function () { return users_1.useFetchUser; } });
|
|
121
|
+
Object.defineProperty(exports, "useFetchUserByForeignId", { enumerable: true, get: function () { return users_1.useFetchUserByForeignId; } });
|
|
122
|
+
Object.defineProperty(exports, "useFetchUserFollowersCount", { enumerable: true, get: function () { return users_1.useFetchUserFollowersCount; } });
|
|
123
|
+
Object.defineProperty(exports, "useFetchUserFollowingCount", { enumerable: true, get: function () { return users_1.useFetchUserFollowingCount; } });
|
|
124
|
+
Object.defineProperty(exports, "useCheckUsernameAvailability", { enumerable: true, get: function () { return users_1.useCheckUsernameAvailability; } });
|
|
125
|
+
Object.defineProperty(exports, "useFetchUserSuggestions", { enumerable: true, get: function () { return users_1.useFetchUserSuggestions; } });
|
|
126
|
+
Object.defineProperty(exports, "useMentions", { enumerable: true, get: function () { return users_1.useMentions; } });
|
|
127
|
+
Object.defineProperty(exports, "useUpdateUser", { enumerable: true, get: function () { return users_1.useUpdateUser; } });
|
|
128
|
+
Object.defineProperty(exports, "useFetchFollow", { enumerable: true, get: function () { return users_1.useFetchFollow; } });
|
|
129
|
+
Object.defineProperty(exports, "useFollowUser", { enumerable: true, get: function () { return users_1.useFollowUser; } });
|
|
130
|
+
Object.defineProperty(exports, "useUnfollowUser", { enumerable: true, get: function () { return users_1.useUnfollowUser; } });
|
|
131
|
+
Object.defineProperty(exports, "useFollowManager", { enumerable: true, get: function () { return users_1.useFollowManager; } });
|
|
132
|
+
// -- reports
|
|
133
|
+
var reports_1 = require("./hooks/reports");
|
|
134
|
+
Object.defineProperty(exports, "useCreateReport", { enumerable: true, get: function () { return reports_1.useCreateReport; } });
|
|
135
|
+
// -- general
|
|
136
|
+
var utils_1 = require("./hooks/utils");
|
|
137
|
+
Object.defineProperty(exports, "useGetMetadata", { enumerable: true, get: function () { return utils_1.useGetMetadata; } });
|
|
138
|
+
// -- storage
|
|
139
|
+
var storage_1 = require("./hooks/storage");
|
|
140
|
+
Object.defineProperty(exports, "useUploadFile", { enumerable: true, get: function () { return storage_1.useUploadFile; } });
|
|
141
|
+
exports.AppNotification = __importStar(require("./interfaces/models/AppNotification"));
|
|
142
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sBAAsB;AACtB,mDAAkD;AAAzC,0GAAA,WAAW,OAAA;AACpB,yDAAwD;AAA/C,gHAAA,cAAc,OAAA;AACvB,qEAAoE;AAA3D,0HAAA,mBAAmB,OAAA;AAC5B,qDAAoD;AAA3C,0GAAA,WAAW,OAAA;AACpB,+DAAyE;AAAhE,qIAAA,OAAO,OAAoB;AACpC,mCAKqB;AAJnB,oGAAA,aAAa,OAAA;AACb,mGAAA,YAAY,OAAA;AACZ,oGAAA,aAAa,OAAA;AACb,gGAAA,SAAS,OAAA;AAGX,YAAY;AACZ,2DAA0D;AAAjD,8GAAA,aAAa,OAAA;AAGtB,+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iBAAiB,OAAA;AACjB,8GAAA,kBAAkB,OAAA;AAGpB,WAAW;AACX,uCAauB;AAZrB,qGAAA,YAAY,OAAA;AACZ,gHAAA,uBAAuB,OAAA;AACvB,mHAAA,0BAA0B,OAAA;AAC1B,mHAAA,0BAA0B,OAAA;AAC1B,qHAAA,4BAA4B,OAAA;AAC5B,gHAAA,uBAAuB,OAAA;AACvB,oGAAA,WAAW,OAAA;AACX,sGAAA,aAAa,OAAA;AACb,uGAAA,cAAc,OAAA;AACd,sGAAA,aAAa,OAAA;AACb,wGAAA,eAAe,OAAA;AACf,yGAAA,gBAAgB,OAAA;AAGlB,aAAa;AACb,2CAAkD;AAAzC,0GAAA,eAAe,OAAA;AAExB,aAAa;AACb,uCAA+C;AAAtC,uGAAA,cAAc,OAAA;AAEvB,aAAa;AACb,2CAAgD;AAAvC,wGAAA,aAAa,OAAA;AAKtB,uFAAuE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CommentsSortByOptions = "top" | "new" | "old";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CommentsSortByOptions.js","sourceRoot":"","sources":["../../../src/interfaces/CommentsSortByOptions.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EntityCommentsTree.js","sourceRoot":"","sources":["../../../src/interfaces/EntityCommentsTree.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EntityListSortByOptions = "top" | "hot" | "new" | "controversial";
|