@weavy/uikit-react 14.0.3 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/settings.json +2 -0
- package/changelog.md +10 -0
- package/dist/cjs/client/WeavyClient.d.ts +1 -0
- package/dist/cjs/components/Attachment.d.ts +5 -5
- package/dist/cjs/components/Blob.d.ts +9 -0
- package/dist/cjs/components/Comment.d.ts +18 -0
- package/dist/cjs/components/CommentCount.d.ts +7 -0
- package/dist/cjs/components/CommentEdit.d.ts +16 -0
- package/dist/cjs/components/CommentPlaceholder.d.ts +8 -0
- package/dist/cjs/components/CommentTrashed.d.ts +15 -0
- package/dist/cjs/components/CommentView.d.ts +18 -0
- package/dist/cjs/components/Comments.d.ts +8 -0
- package/dist/cjs/components/ConversationListItem.d.ts +1 -1
- package/dist/cjs/components/Dropzone.d.ts +10 -0
- package/dist/cjs/components/Editor.d.ts +25 -0
- package/dist/cjs/components/Embed.d.ts +8 -0
- package/dist/cjs/components/FileItem.d.ts +41 -0
- package/dist/cjs/components/FileList.d.ts +11 -0
- package/dist/cjs/components/FileVersions.d.ts +9 -0
- package/dist/cjs/components/Files.d.ts +4 -0
- package/dist/cjs/components/Image.d.ts +3 -3
- package/dist/cjs/components/MeetingCard.d.ts +1 -1
- package/dist/cjs/components/Meetings.d.ts +2 -1
- package/dist/cjs/components/Poll.d.ts +8 -0
- package/dist/cjs/components/PollOption.d.ts +10 -0
- package/dist/cjs/components/Post.d.ts +21 -0
- package/dist/cjs/components/PostEdit.d.ts +17 -0
- package/dist/cjs/components/PostList.d.ts +6 -0
- package/dist/cjs/components/PostPlaceholder.d.ts +8 -0
- package/dist/cjs/components/PostTrashed.d.ts +14 -0
- package/dist/cjs/components/PostView.d.ts +21 -0
- package/dist/cjs/components/Posts.d.ts +4 -0
- package/dist/cjs/components/Preview.d.ts +1 -3
- package/dist/cjs/components/PreviewFiles.d.ts +10 -0
- package/dist/cjs/components/Reactions.d.ts +6 -2
- package/dist/cjs/components/SearchUsers.d.ts +2 -1
- package/dist/cjs/contexts/CloudFilesContext.d.ts +9 -0
- package/dist/cjs/hooks/useApps.d.ts +1 -0
- package/dist/cjs/hooks/useCloudFiles.d.ts +3 -0
- package/dist/cjs/hooks/useCommentList.d.ts +1 -0
- package/dist/cjs/hooks/useEmbeds.d.ts +5 -0
- package/dist/cjs/hooks/useFileList.d.ts +1 -0
- package/dist/cjs/hooks/useFileUploader.d.ts +8 -0
- package/dist/cjs/hooks/useFileVersions.d.ts +2 -0
- package/dist/cjs/hooks/useInfiniteScroll.d.ts +4 -0
- package/dist/cjs/hooks/useIsFirstRender.d.ts +2 -0
- package/dist/cjs/hooks/useMutateApps.d.ts +5 -0
- package/dist/cjs/hooks/useMutateComment.d.ts +10 -0
- package/dist/cjs/hooks/useMutateConversationName.d.ts +1 -1
- package/dist/cjs/hooks/useMutateDeleteReaction.d.ts +3 -1
- package/dist/cjs/hooks/useMutateEditComment.d.ts +10 -0
- package/dist/cjs/hooks/useMutateEditPost.d.ts +10 -0
- package/dist/cjs/hooks/useMutateExternalBlobs.d.ts +2 -2
- package/dist/cjs/hooks/useMutateFile.d.ts +26 -0
- package/dist/cjs/hooks/useMutateFileRename.d.ts +5 -0
- package/dist/cjs/hooks/useMutateFileSubscribe.d.ts +7 -0
- package/dist/cjs/hooks/useMutateFileTrash.d.ts +10 -0
- package/dist/cjs/hooks/useMutateFileVersion.d.ts +7 -0
- package/dist/cjs/hooks/useMutateFiles.d.ts +2 -0
- package/dist/cjs/hooks/useMutateLeaveConversation.d.ts +4 -0
- package/dist/cjs/hooks/useMutateMessage.d.ts +2 -2
- package/dist/cjs/hooks/useMutatePost.d.ts +10 -0
- package/dist/cjs/hooks/useMutateReaction.d.ts +3 -1
- package/dist/cjs/hooks/useMutateRead.d.ts +1 -1
- package/dist/cjs/hooks/useMutateReplaceReaction.d.ts +6 -0
- package/dist/cjs/hooks/useMutateRestoreComment.d.ts +5 -0
- package/dist/cjs/hooks/useMutateRestorePost.d.ts +4 -0
- package/dist/cjs/hooks/useMutateStarred.d.ts +4 -0
- package/dist/cjs/hooks/useMutateSubscribe.d.ts +4 -0
- package/dist/cjs/hooks/useMutateTrashComment.d.ts +5 -0
- package/dist/cjs/hooks/useMutateTrashPost.d.ts +4 -0
- package/dist/cjs/hooks/useMutateTyping.d.ts +2 -0
- package/dist/cjs/hooks/useMutateUnsubscribe.d.ts +4 -0
- package/dist/cjs/hooks/useMutateVote.d.ts +5 -0
- package/dist/cjs/hooks/usePost.d.ts +1 -0
- package/dist/cjs/hooks/usePosts.d.ts +1 -0
- package/dist/cjs/hooks/usePostsList.d.ts +1 -0
- package/dist/cjs/hooks/useReactionList.d.ts +1 -0
- package/dist/cjs/hooks/useSessionState.d.ts +2 -0
- package/dist/cjs/hooks/useUnload.d.ts +2 -0
- package/dist/cjs/hooks/useUpdateEffect.d.ts +3 -0
- package/dist/cjs/hooks/useVotes.d.ts +1 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +28 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/ConversationListItem.d.ts +1 -0
- package/dist/cjs/types/Files.d.ts +7 -0
- package/dist/cjs/types/Message.d.ts +2 -2
- package/dist/cjs/types/Posts.d.ts +4 -0
- package/dist/cjs/types/interfaces.d.ts +9 -0
- package/dist/cjs/types/types.d.ts +138 -22
- package/dist/cjs/ui/Dropdown.d.ts +18 -2
- package/dist/cjs/ui/Icon.d.ts +10 -2
- package/dist/cjs/ui/Overlay.d.ts +3 -1
- package/dist/cjs/ui/Sheet.d.ts +14 -0
- package/dist/cjs/ui/Spinner.d.ts +2 -1
- package/dist/cjs/utils/cacheUtils.d.ts +14 -0
- package/dist/cjs/utils/fileUtilities.d.ts +10 -1
- package/dist/cjs/utils/mentions.d.ts +6 -0
- package/dist/cjs/utils/openUrl.d.ts +1 -0
- package/dist/css/weavy-chat.css +637 -218
- package/dist/css/weavy-files.css +3046 -0
- package/dist/css/weavy-messenger.css +643 -213
- package/dist/css/weavy-posts.css +2773 -0
- package/dist/css/weavy.css +1749 -308
- package/dist/esm/client/WeavyClient.d.ts +1 -0
- package/dist/esm/components/Attachment.d.ts +5 -5
- package/dist/esm/components/Blob.d.ts +9 -0
- package/dist/esm/components/Comment.d.ts +18 -0
- package/dist/esm/components/CommentCount.d.ts +7 -0
- package/dist/esm/components/CommentEdit.d.ts +16 -0
- package/dist/esm/components/CommentPlaceholder.d.ts +8 -0
- package/dist/esm/components/CommentTrashed.d.ts +15 -0
- package/dist/esm/components/CommentView.d.ts +18 -0
- package/dist/esm/components/Comments.d.ts +8 -0
- package/dist/esm/components/ConversationListItem.d.ts +1 -1
- package/dist/esm/components/Dropzone.d.ts +10 -0
- package/dist/esm/components/Editor.d.ts +25 -0
- package/dist/esm/components/Embed.d.ts +8 -0
- package/dist/esm/components/FileItem.d.ts +41 -0
- package/dist/esm/components/FileList.d.ts +11 -0
- package/dist/esm/components/FileVersions.d.ts +9 -0
- package/dist/esm/components/Files.d.ts +4 -0
- package/dist/esm/components/Image.d.ts +3 -3
- package/dist/esm/components/MeetingCard.d.ts +1 -1
- package/dist/esm/components/Meetings.d.ts +2 -1
- package/dist/esm/components/Poll.d.ts +8 -0
- package/dist/esm/components/PollOption.d.ts +10 -0
- package/dist/esm/components/Post.d.ts +21 -0
- package/dist/esm/components/PostEdit.d.ts +17 -0
- package/dist/esm/components/PostList.d.ts +6 -0
- package/dist/esm/components/PostPlaceholder.d.ts +8 -0
- package/dist/esm/components/PostTrashed.d.ts +14 -0
- package/dist/esm/components/PostView.d.ts +21 -0
- package/dist/esm/components/Posts.d.ts +4 -0
- package/dist/esm/components/Preview.d.ts +1 -3
- package/dist/esm/components/PreviewFiles.d.ts +10 -0
- package/dist/esm/components/Reactions.d.ts +6 -2
- package/dist/esm/components/SearchUsers.d.ts +2 -1
- package/dist/esm/contexts/CloudFilesContext.d.ts +9 -0
- package/dist/esm/hooks/useApps.d.ts +1 -0
- package/dist/esm/hooks/useCloudFiles.d.ts +3 -0
- package/dist/esm/hooks/useCommentList.d.ts +1 -0
- package/dist/esm/hooks/useEmbeds.d.ts +5 -0
- package/dist/esm/hooks/useFileList.d.ts +1 -0
- package/dist/esm/hooks/useFileUploader.d.ts +8 -0
- package/dist/esm/hooks/useFileVersions.d.ts +2 -0
- package/dist/esm/hooks/useInfiniteScroll.d.ts +4 -0
- package/dist/esm/hooks/useIsFirstRender.d.ts +2 -0
- package/dist/esm/hooks/useMutateApps.d.ts +5 -0
- package/dist/esm/hooks/useMutateComment.d.ts +10 -0
- package/dist/esm/hooks/useMutateConversationName.d.ts +1 -1
- package/dist/esm/hooks/useMutateDeleteReaction.d.ts +3 -1
- package/dist/esm/hooks/useMutateEditComment.d.ts +10 -0
- package/dist/esm/hooks/useMutateEditPost.d.ts +10 -0
- package/dist/esm/hooks/useMutateExternalBlobs.d.ts +2 -2
- package/dist/esm/hooks/useMutateFile.d.ts +26 -0
- package/dist/esm/hooks/useMutateFileRename.d.ts +5 -0
- package/dist/esm/hooks/useMutateFileSubscribe.d.ts +7 -0
- package/dist/esm/hooks/useMutateFileTrash.d.ts +10 -0
- package/dist/esm/hooks/useMutateFileVersion.d.ts +7 -0
- package/dist/esm/hooks/useMutateFiles.d.ts +2 -0
- package/dist/esm/hooks/useMutateLeaveConversation.d.ts +4 -0
- package/dist/esm/hooks/useMutateMessage.d.ts +2 -2
- package/dist/esm/hooks/useMutatePost.d.ts +10 -0
- package/dist/esm/hooks/useMutateReaction.d.ts +3 -1
- package/dist/esm/hooks/useMutateRead.d.ts +1 -1
- package/dist/esm/hooks/useMutateReplaceReaction.d.ts +6 -0
- package/dist/esm/hooks/useMutateRestoreComment.d.ts +5 -0
- package/dist/esm/hooks/useMutateRestorePost.d.ts +4 -0
- package/dist/esm/hooks/useMutateStarred.d.ts +4 -0
- package/dist/esm/hooks/useMutateSubscribe.d.ts +4 -0
- package/dist/esm/hooks/useMutateTrashComment.d.ts +5 -0
- package/dist/esm/hooks/useMutateTrashPost.d.ts +4 -0
- package/dist/esm/hooks/useMutateTyping.d.ts +2 -0
- package/dist/esm/hooks/useMutateUnsubscribe.d.ts +4 -0
- package/dist/esm/hooks/useMutateVote.d.ts +5 -0
- package/dist/esm/hooks/usePost.d.ts +1 -0
- package/dist/esm/hooks/usePosts.d.ts +1 -0
- package/dist/esm/hooks/usePostsList.d.ts +1 -0
- package/dist/esm/hooks/useReactionList.d.ts +1 -0
- package/dist/esm/hooks/useSessionState.d.ts +2 -0
- package/dist/esm/hooks/useUnload.d.ts +2 -0
- package/dist/esm/hooks/useUpdateEffect.d.ts +3 -0
- package/dist/esm/hooks/useVotes.d.ts +1 -0
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.js +28 -6
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/ConversationListItem.d.ts +1 -0
- package/dist/esm/types/Files.d.ts +7 -0
- package/dist/esm/types/Message.d.ts +2 -2
- package/dist/esm/types/Posts.d.ts +4 -0
- package/dist/esm/types/interfaces.d.ts +9 -0
- package/dist/esm/types/types.d.ts +138 -22
- package/dist/esm/ui/Dropdown.d.ts +18 -2
- package/dist/esm/ui/Icon.d.ts +10 -2
- package/dist/esm/ui/Overlay.d.ts +3 -1
- package/dist/esm/ui/Sheet.d.ts +14 -0
- package/dist/esm/ui/Spinner.d.ts +2 -1
- package/dist/esm/utils/cacheUtils.d.ts +14 -0
- package/dist/esm/utils/fileUtilities.d.ts +10 -1
- package/dist/esm/utils/mentions.d.ts +6 -0
- package/dist/esm/utils/openUrl.d.ts +1 -0
- package/dist/index.d.ts +50 -6
- package/package.json +8 -2
- package/src/client/WeavyClient.ts +35 -1
- package/src/components/Attachment.tsx +20 -13
- package/src/components/Blob.tsx +28 -0
- package/src/components/Comment.tsx +43 -0
- package/src/components/CommentCount.tsx +15 -0
- package/src/components/CommentEdit.tsx +48 -0
- package/src/components/CommentPlaceholder.tsx +34 -0
- package/src/components/CommentTrashed.tsx +45 -0
- package/src/components/CommentView.tsx +142 -0
- package/src/components/Comments.tsx +78 -0
- package/src/components/Conversation.tsx +85 -31
- package/src/components/ConversationList.tsx +12 -41
- package/src/components/ConversationListItem.tsx +125 -74
- package/src/components/Dropzone.tsx +26 -0
- package/src/components/Editor.tsx +700 -0
- package/src/components/Embed.tsx +80 -0
- package/src/components/FileItem.tsx +391 -0
- package/src/components/FileList.tsx +166 -0
- package/src/components/FileVersions.tsx +100 -0
- package/src/components/Files.tsx +294 -0
- package/src/components/Image.tsx +11 -10
- package/src/components/Meeting.tsx +1 -2
- package/src/components/MeetingCard.tsx +1 -1
- package/src/components/Meetings.tsx +13 -5
- package/src/components/Message.tsx +14 -19
- package/src/components/Messages.tsx +38 -64
- package/src/components/NewConversation.tsx +8 -6
- package/src/components/PdfViewer.tsx +2 -2
- package/src/components/Poll.tsx +45 -0
- package/src/components/PollOption.tsx +65 -0
- package/src/components/Post.tsx +45 -0
- package/src/components/PostEdit.tsx +49 -0
- package/src/components/PostList.tsx +95 -0
- package/src/components/PostPlaceholder.tsx +32 -0
- package/src/components/PostTrashed.tsx +35 -0
- package/src/components/PostView.tsx +194 -0
- package/src/components/Posts.tsx +59 -0
- package/src/components/Preview.tsx +16 -23
- package/src/components/PreviewFiles.tsx +336 -0
- package/src/components/Reactions.tsx +142 -38
- package/src/components/SearchUsers.tsx +77 -37
- package/src/components/Typing.tsx +1 -1
- package/src/{components/FileBrowser.tsx → contexts/CloudFilesContext.tsx} +46 -30
- package/src/contexts/PreviewContext.tsx +102 -85
- package/src/contexts/WeavyContext.tsx +10 -6
- package/src/hooks/useApps.ts +23 -0
- package/src/hooks/useCloudFiles.ts +12 -0
- package/src/hooks/useCommentList.ts +30 -0
- package/src/hooks/useEmbeds.ts +126 -0
- package/src/hooks/useEvents.ts +3 -1
- package/src/hooks/useFileList.ts +84 -0
- package/src/hooks/useFileUploader.ts +38 -1
- package/src/hooks/useFileVersions.ts +20 -0
- package/src/hooks/useInfiniteScroll.ts +45 -0
- package/src/hooks/useIsFirstRender.ts +15 -0
- package/src/hooks/useMembers.ts +3 -3
- package/src/hooks/useMutateApps.ts +48 -0
- package/src/hooks/useMutateComment.ts +60 -0
- package/src/hooks/useMutateConversationName.ts +1 -1
- package/src/hooks/useMutateDeleteReaction.ts +17 -4
- package/src/hooks/useMutateEditComment.ts +63 -0
- package/src/hooks/useMutateEditPost.ts +64 -0
- package/src/hooks/useMutateExternalBlobs.ts +5 -9
- package/src/hooks/useMutateFile.ts +311 -0
- package/src/hooks/useMutateFileRename.ts +51 -0
- package/src/hooks/useMutateFileSubscribe.ts +80 -0
- package/src/hooks/useMutateFileTrash.ts +115 -0
- package/src/hooks/useMutateFileVersion.ts +85 -0
- package/src/hooks/useMutateFiles.ts +23 -0
- package/src/hooks/useMutateLeaveConversation.ts +38 -0
- package/src/hooks/useMutateMessage.ts +23 -62
- package/src/hooks/useMutatePost.ts +60 -0
- package/src/hooks/useMutateReaction.ts +21 -6
- package/src/hooks/useMutateRead.ts +8 -2
- package/src/hooks/useMutateRemoveMembers.ts +2 -9
- package/src/hooks/useMutateReplaceReaction.ts +59 -0
- package/src/hooks/useMutateRestoreComment.ts +37 -0
- package/src/hooks/useMutateRestorePost.ts +36 -0
- package/src/hooks/useMutateStarred.ts +35 -0
- package/src/hooks/useMutateSubscribe.ts +36 -0
- package/src/hooks/useMutateTrashComment.ts +37 -0
- package/src/hooks/useMutateTrashPost.ts +36 -0
- package/src/hooks/useMutateTyping.ts +5 -3
- package/src/hooks/useMutateUnsubscribe.ts +36 -0
- package/src/hooks/useMutateVote.ts +59 -0
- package/src/hooks/usePost.ts +20 -0
- package/src/hooks/usePosts.ts +21 -0
- package/src/hooks/usePostsList.ts +31 -0
- package/src/hooks/useReactionList.ts +21 -0
- package/src/hooks/useSearchUsers.ts +2 -2
- package/src/hooks/useSessionState.ts +23 -0
- package/src/hooks/useUnload.ts +19 -0
- package/src/hooks/useUpdateEffect.ts +16 -0
- package/src/hooks/useVotes.ts +21 -0
- package/src/index.ts +5 -1
- package/src/scss/theme/_appbar.scss +8 -4
- package/src/scss/theme/_card.scss +2 -0
- package/src/scss/theme/_comment-editor-cm.scss +5 -1
- package/src/scss/theme/_comments.scss +9 -8
- package/src/scss/theme/_conversations.scss +4 -0
- package/src/scss/theme/_files.scss +2 -81
- package/src/scss/theme/_icons.scss +21 -3
- package/src/scss/theme/_input.scss +13 -7
- package/src/scss/theme/_item.scss +23 -1
- package/src/scss/theme/_message-editor-cm.scss +5 -1
- package/src/scss/theme/_pager.scss +1 -1
- package/src/scss/theme/_post-editor-cm.scss +2 -2
- package/src/scss/theme/_post.scss +3 -10
- package/src/scss/theme/_preview-pdf-viewer.scss +996 -0
- package/src/scss/theme/_preview-pdf.scss +57 -783
- package/src/scss/theme/_sheet.scss +4 -1
- package/src/scss/theme/_spinner.scss +10 -1
- package/src/scss/theme/_tables.scss +2 -0
- package/src/scss/theme/base/_scroll.scss +3 -0
- package/src/scss/weavy-chat.scss +3 -1
- package/src/scss/weavy-files.scss +31 -0
- package/src/scss/weavy-messenger.scss +3 -1
- package/src/scss/weavy-posts.scss +35 -0
- package/src/scss/weavy.scss +2 -0
- package/src/types/ConversationListItem.ts +1 -0
- package/src/types/Files.ts +7 -0
- package/src/types/Message.ts +2 -2
- package/src/types/Posts.ts +4 -0
- package/src/types/interfaces.ts +13 -0
- package/src/types/types.ts +157 -28
- package/src/ui/Button.tsx +6 -5
- package/src/ui/Dropdown.tsx +67 -16
- package/src/ui/Icon.tsx +112 -15
- package/src/ui/Overlay.tsx +6 -2
- package/src/ui/Sheet.tsx +87 -0
- package/src/ui/Spinner.tsx +7 -4
- package/src/utils/cacheUtils.ts +246 -0
- package/src/utils/fileUtilities.ts +208 -24
- package/src/utils/infinite-scroll.js +103 -0
- package/src/utils/mentions.ts +50 -0
- package/src/utils/openUrl.ts +41 -0
- package/src/utils/{scrollToBottom.js → scroll-position.js} +50 -9
- package/src/utils/{scrollbarDetection.js → scrollbar-detection.js} +0 -0
- package/src/utils/utils.js +15 -1
- package/tsconfig.json +1 -1
- package/dist/cjs/components/ConversationForm.d.ts +0 -7
- package/dist/cjs/components/File.d.ts +0 -9
- package/dist/cjs/components/FileBrowser.d.ts +0 -6
- package/dist/cjs/hooks/usePreview.d.ts +0 -4
- package/dist/cjs/hooks/useReactions.d.ts +0 -3
- package/dist/esm/components/ConversationForm.d.ts +0 -7
- package/dist/esm/components/File.d.ts +0 -9
- package/dist/esm/components/FileBrowser.d.ts +0 -6
- package/dist/esm/hooks/usePreview.d.ts +0 -4
- package/dist/esm/hooks/useReactions.d.ts +0 -3
- package/src/components/ConversationForm.tsx +0 -210
- package/src/components/File.tsx +0 -21
- package/src/hooks/usePreview.ts +0 -21
- package/src/hooks/useReactions.ts +0 -51
- package/src/utils/infiniteScroll.js +0 -184
|
@@ -14,6 +14,7 @@ export default class WeavyClient {
|
|
|
14
14
|
constructor(options: WeavyClientOptions);
|
|
15
15
|
get(url: string, retry?: boolean): Promise<Response>;
|
|
16
16
|
post(url: string, method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH", body: string | FormData, contentType?: string, retry?: boolean): Promise<Response>;
|
|
17
|
+
upload(url: string, method: "POST" | "PUT" | "PATCH", body: string | FormData, contentType?: string, onProgress?: (progress: number) => void, retry?: boolean): Promise<Response>;
|
|
17
18
|
getToken(refresh: boolean): Promise<string>;
|
|
18
19
|
tokenFactoryInternal(refresh?: boolean, fromSR?: boolean): Promise<string>;
|
|
19
20
|
subscribe(group: string, event: string, callback: any): Promise<void>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type Props = {
|
|
3
3
|
previewFormat: string;
|
|
4
|
-
url
|
|
5
|
-
previewUrl
|
|
4
|
+
url?: string;
|
|
5
|
+
previewUrl?: string;
|
|
6
6
|
mediaType: string;
|
|
7
7
|
name: string;
|
|
8
8
|
kind: string;
|
|
9
|
-
size
|
|
10
|
-
provider
|
|
9
|
+
size?: number;
|
|
10
|
+
provider?: string;
|
|
11
11
|
onClick?: (e: any) => void;
|
|
12
12
|
};
|
|
13
|
-
declare const Attachment: ({
|
|
13
|
+
declare const Attachment: ({ url, previewUrl, name, size, provider, onClick }: Props) => JSX.Element;
|
|
14
14
|
export default Attachment;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
parentId: number;
|
|
5
|
+
id: number;
|
|
6
|
+
text: string;
|
|
7
|
+
html: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
modified_at?: string;
|
|
10
|
+
created_by: MemberType;
|
|
11
|
+
trashed_at?: string;
|
|
12
|
+
attachments: FileType[];
|
|
13
|
+
reactions: ReactableType[];
|
|
14
|
+
embed: EmbedType | undefined;
|
|
15
|
+
is_trashed: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const Comment: ({ ...props }: Props) => JSX.Element;
|
|
18
|
+
export default Comment;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
parentId: number;
|
|
5
|
+
id: number;
|
|
6
|
+
text: string;
|
|
7
|
+
html: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
created_by: MemberType;
|
|
10
|
+
attachments: FileType[];
|
|
11
|
+
reactions: ReactableType[];
|
|
12
|
+
embed: EmbedType | undefined;
|
|
13
|
+
onClose: (e?: any) => void;
|
|
14
|
+
};
|
|
15
|
+
declare const CommentEdit: ({ appId, parentId, id, text, embed, attachments, onClose }: Props) => JSX.Element;
|
|
16
|
+
export default CommentEdit;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
parentId: number;
|
|
5
|
+
id: number;
|
|
6
|
+
text: string;
|
|
7
|
+
html: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
created_by: MemberType;
|
|
10
|
+
attachments: FileType[];
|
|
11
|
+
reactions: ReactableType[];
|
|
12
|
+
embed: EmbedType | undefined;
|
|
13
|
+
};
|
|
14
|
+
declare const CommentTrashed: ({ id, appId, parentId }: Props) => JSX.Element;
|
|
15
|
+
export default CommentTrashed;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
parentId: number;
|
|
5
|
+
id: number;
|
|
6
|
+
text: string;
|
|
7
|
+
html: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
modified_at?: string;
|
|
10
|
+
created_by: MemberType;
|
|
11
|
+
trashed_at?: string;
|
|
12
|
+
attachments: FileType[];
|
|
13
|
+
reactions: ReactableType[];
|
|
14
|
+
embed: EmbedType | undefined;
|
|
15
|
+
onEdit: (e: any) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const CommentView: ({ appId, id, parentId, html, created_at, modified_at, created_by, attachments, reactions, embed, onEdit }: Props) => JSX.Element;
|
|
18
|
+
export default CommentView;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConversationListItemProps } from '../types/ConversationListItem';
|
|
3
|
-
declare const ConversationListItem: ({ item, refetchConversations }: ConversationListItemProps) => JSX.Element;
|
|
3
|
+
declare const ConversationListItem: ({ item, userId, refetchConversations }: ConversationListItemProps) => JSX.Element;
|
|
4
4
|
export default ConversationListItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FileRejection, DropEvent, Accept } from "react-dropzone";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
onDrop: <T extends File>(acceptedFiles: T[], fileRejections: FileRejection[], event: DropEvent) => void;
|
|
5
|
+
accept?: Accept;
|
|
6
|
+
dragClass: string;
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
declare const Dropzone: ({ onDrop, accept, dragClass, children }: Props) => JSX.Element;
|
|
10
|
+
export default Dropzone;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
id?: number;
|
|
4
|
+
appId: number;
|
|
5
|
+
parentId?: number;
|
|
6
|
+
placeholder: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
buttonText: string;
|
|
9
|
+
embed?: EmbedType | undefined;
|
|
10
|
+
attachments?: FileType[] | undefined;
|
|
11
|
+
options?: PollOptionType[] | undefined;
|
|
12
|
+
meeting?: MeetingType | undefined;
|
|
13
|
+
showAttachments?: boolean;
|
|
14
|
+
showCloudFiles?: boolean;
|
|
15
|
+
showEmbeds?: boolean;
|
|
16
|
+
showPolls?: boolean;
|
|
17
|
+
showMeetings?: boolean;
|
|
18
|
+
showTyping?: boolean;
|
|
19
|
+
useDraft?: boolean;
|
|
20
|
+
onSubmit: (text: string, blobs: BlobType[], attachments: FileType[], meeting: number | null, embed: number | null, options: PollOptionType[]) => Promise<void>;
|
|
21
|
+
editorType: "posts" | "comments" | "messages";
|
|
22
|
+
editorLocation: "apps" | "posts" | "messages" | "files";
|
|
23
|
+
};
|
|
24
|
+
declare const Editor: ({ id, appId, parentId, placeholder, text, buttonText, embed, attachments: initialAttachments, options: initialOptions, meeting: initialMeeting, showAttachments, showCloudFiles, showEmbeds, showPolls, showMeetings, showTyping, useDraft, onSubmit, editorType, editorLocation }: Props) => JSX.Element;
|
|
25
|
+
export default Editor;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
declare type FileProps = {
|
|
3
|
+
file: FileType;
|
|
4
|
+
className?: string;
|
|
5
|
+
onClick?: (e: any) => void;
|
|
6
|
+
onRename?: (name: string, file: FileType) => void;
|
|
7
|
+
isRenaming?: boolean;
|
|
8
|
+
onSubscribe?: (file: FileType) => void;
|
|
9
|
+
onUnsubscribe?: (file: FileType) => void;
|
|
10
|
+
onTrash?: (file: FileType) => void;
|
|
11
|
+
onRestore?: (file: FileType) => void;
|
|
12
|
+
onDeleteForever?: (file: FileType) => void;
|
|
13
|
+
onHandleError?: (file: FileType) => void;
|
|
14
|
+
statusText?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
};
|
|
18
|
+
export declare const triggerDownload: (file: FileType) => void;
|
|
19
|
+
export declare const triggerExternal: (file: FileType) => void;
|
|
20
|
+
export declare const triggerApplication: (file: FileType) => void;
|
|
21
|
+
declare type FileMenuProps = {
|
|
22
|
+
file: FileType;
|
|
23
|
+
className?: string;
|
|
24
|
+
onRename?: (e: any) => void;
|
|
25
|
+
onSubscribe?: (e: any) => void;
|
|
26
|
+
onUnsubscribe?: (e: any) => void;
|
|
27
|
+
onTrash?: (e: any) => void;
|
|
28
|
+
onRestore?: (e: any) => void;
|
|
29
|
+
onDeleteForever?: (e: any) => void;
|
|
30
|
+
children?: ReactNode;
|
|
31
|
+
noWrapper?: boolean;
|
|
32
|
+
props?: React.HTMLAttributes<HTMLSpanElement>;
|
|
33
|
+
};
|
|
34
|
+
export declare const FileMenu: ({ file, className, onRename, onSubscribe, onUnsubscribe, onTrash, onRestore, onDeleteForever, children, noWrapper, ...props }: FileMenuProps) => JSX.Element;
|
|
35
|
+
declare const _default: {
|
|
36
|
+
Row: ({ file, className, onClick, onRename, isRenaming, onSubscribe, onUnsubscribe, onTrash, onRestore, onDeleteForever, onHandleError, statusText, title, children }: FileProps) => JSX.Element;
|
|
37
|
+
Card: ({ file, className, onClick, onRename, isRenaming, onSubscribe, onUnsubscribe, onTrash, onRestore, onDeleteForever, onHandleError, statusText, title, children }: FileProps) => JSX.Element;
|
|
38
|
+
Item: ({ file, className, onClick, onRename, isRenaming, onSubscribe, onUnsubscribe, onTrash, onRestore, onDeleteForever, onHandleError, statusText, title, children }: FileProps) => JSX.Element;
|
|
39
|
+
Menu: ({ file, className, onRename, onSubscribe, onUnsubscribe, onTrash, onRestore, onDeleteForever, children, noWrapper, ...props }: FileMenuProps) => JSX.Element;
|
|
40
|
+
};
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
view?: FileView;
|
|
5
|
+
order?: FileOrder;
|
|
6
|
+
trashed?: boolean;
|
|
7
|
+
onSorting?: (order: FileOrder) => void;
|
|
8
|
+
onHandleError?: (file: FileType) => void;
|
|
9
|
+
};
|
|
10
|
+
declare const FileList: ({ appId, view, order, trashed, onSorting, onHandleError }: Props) => JSX.Element;
|
|
11
|
+
export default FileList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { QueryKey } from 'react-query';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
filesKey: QueryKey;
|
|
5
|
+
file: FileType;
|
|
6
|
+
onVersionSelect?: (currentVersionFile: FileType) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const FileVersions: ({ filesKey, file, onVersionSelect }: Props) => JSX.Element;
|
|
9
|
+
export default FileVersions;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type Props = {
|
|
3
3
|
onMeetingAdded: Function;
|
|
4
|
+
dropdown?: boolean;
|
|
4
5
|
};
|
|
5
|
-
declare const Meetings: ({ onMeetingAdded }: Props) => JSX.Element;
|
|
6
|
+
declare const Meetings: ({ onMeetingAdded, dropdown }: Props) => JSX.Element;
|
|
6
7
|
export default Meetings;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
id: number;
|
|
4
|
+
text: string;
|
|
5
|
+
has_voted: boolean | undefined;
|
|
6
|
+
ratio: number;
|
|
7
|
+
onVote: (id: number) => Promise<void>;
|
|
8
|
+
};
|
|
9
|
+
declare const PollOption: ({ id, text, has_voted, ratio, onVote }: Props) => JSX.Element;
|
|
10
|
+
export default PollOption;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
id: number;
|
|
5
|
+
text: string;
|
|
6
|
+
html: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
modified_at?: string;
|
|
9
|
+
created_by: MemberType;
|
|
10
|
+
trashed_at?: string;
|
|
11
|
+
attachments: FileType[];
|
|
12
|
+
reactions: ReactableType[];
|
|
13
|
+
embed: EmbedType | undefined;
|
|
14
|
+
comment_count?: number;
|
|
15
|
+
is_subscribed: boolean;
|
|
16
|
+
is_trashed: boolean;
|
|
17
|
+
options?: PollOptionType[];
|
|
18
|
+
meeting?: MeetingType;
|
|
19
|
+
};
|
|
20
|
+
declare const Post: ({ ...props }: Props) => JSX.Element;
|
|
21
|
+
export default Post;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
id: number;
|
|
5
|
+
text: string;
|
|
6
|
+
html: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
created_by: MemberType;
|
|
9
|
+
attachments: FileType[];
|
|
10
|
+
reactions: ReactableType[];
|
|
11
|
+
embed: EmbedType | undefined;
|
|
12
|
+
meeting?: MeetingType | undefined;
|
|
13
|
+
options?: PollOptionType[];
|
|
14
|
+
onClose: (e?: any) => void;
|
|
15
|
+
};
|
|
16
|
+
declare const PostEdit: ({ appId, id, text, embed, attachments, options, meeting, onClose }: Props) => JSX.Element;
|
|
17
|
+
export default PostEdit;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
id: number;
|
|
5
|
+
text: string;
|
|
6
|
+
html: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
created_by: MemberType;
|
|
9
|
+
attachments: FileType[];
|
|
10
|
+
reactions: ReactableType[];
|
|
11
|
+
embed: EmbedType | undefined;
|
|
12
|
+
};
|
|
13
|
+
declare const PostTrashed: ({ id, appId }: Props) => JSX.Element;
|
|
14
|
+
export default PostTrashed;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
appId: number;
|
|
4
|
+
id: number;
|
|
5
|
+
text: string;
|
|
6
|
+
html: string;
|
|
7
|
+
created_at: string;
|
|
8
|
+
modified_at?: string;
|
|
9
|
+
created_by: MemberType;
|
|
10
|
+
trashed_at?: string;
|
|
11
|
+
attachments: FileType[];
|
|
12
|
+
reactions: ReactableType[];
|
|
13
|
+
embed: EmbedType | undefined;
|
|
14
|
+
comment_count?: number;
|
|
15
|
+
is_subscribed: boolean;
|
|
16
|
+
options?: PollOptionType[];
|
|
17
|
+
meeting?: MeetingType;
|
|
18
|
+
onEdit: (e: any) => void;
|
|
19
|
+
};
|
|
20
|
+
declare const PostView: ({ appId, id, html, created_at, modified_at, created_by, attachments, reactions, embed, comment_count, is_subscribed, options, meeting, onEdit }: Props) => JSX.Element;
|
|
21
|
+
export default PostView;
|
|
@@ -34,12 +34,10 @@ declare type IconProps = {
|
|
|
34
34
|
children?: React.ReactNode;
|
|
35
35
|
src: string;
|
|
36
36
|
icon: string;
|
|
37
|
-
name: string;
|
|
38
37
|
provider?: string;
|
|
39
|
-
download?: boolean;
|
|
40
38
|
className?: string;
|
|
41
39
|
};
|
|
42
|
-
export declare const PreviewIcon: ({ children, src, icon,
|
|
40
|
+
export declare const PreviewIcon: ({ children, src, icon, provider, className }: IconProps) => JSX.Element;
|
|
43
41
|
declare type PreviewProps = {
|
|
44
42
|
client: any;
|
|
45
43
|
src: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UseInfiniteQueryResult } from "react-query";
|
|
3
|
+
declare type Props = {
|
|
4
|
+
appId: number;
|
|
5
|
+
infiniteFiles: UseInfiniteQueryResult<FilesResult, unknown>;
|
|
6
|
+
previewId?: number;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const PreviewFiles: ({ appId, infiniteFiles, previewId, onClose }: Props) => JSX.Element;
|
|
10
|
+
export default PreviewFiles;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type ReactionMenuProps = {
|
|
3
3
|
id: number;
|
|
4
|
+
parentId: number | null;
|
|
5
|
+
type: "messages" | "posts" | "comments";
|
|
6
|
+
placement?: "top" | "top-start" | "top-end";
|
|
4
7
|
reactions: ReactableType[];
|
|
5
8
|
};
|
|
6
9
|
declare type ReactionsProps = {
|
|
7
10
|
id: number;
|
|
11
|
+
type: "messages" | "posts" | "comments";
|
|
8
12
|
parentId: number | null;
|
|
9
13
|
reactions: ReactableType[];
|
|
10
14
|
};
|
|
11
|
-
export declare const ReactionsMenu: ({ id, reactions }: ReactionMenuProps) => JSX.Element;
|
|
12
|
-
export declare const ReactionsList: ({ id, reactions }: ReactionsProps) => JSX.Element;
|
|
15
|
+
export declare const ReactionsMenu: ({ id, parentId, type, placement, reactions }: ReactionMenuProps) => JSX.Element;
|
|
16
|
+
export declare const ReactionsList: ({ id, type, reactions }: ReactionsProps) => JSX.Element;
|
|
13
17
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare type SearchUsersProps = {
|
|
3
|
+
existingMembers?: MemberType[];
|
|
3
4
|
handleSubmit: any;
|
|
4
5
|
buttonTitle: string;
|
|
5
6
|
};
|
|
6
|
-
declare const SearchUsers: ({ handleSubmit, buttonTitle }: SearchUsersProps) => JSX.Element;
|
|
7
|
+
declare const SearchUsers: ({ existingMembers, handleSubmit, buttonTitle }: SearchUsersProps) => JSX.Element;
|
|
7
8
|
export default SearchUsers;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const CloudFilesContext: React.Context<CloudFilesContextProps>;
|
|
3
|
+
declare type Props = {
|
|
4
|
+
client: any;
|
|
5
|
+
options: WeavyContextOptions;
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
};
|
|
8
|
+
declare const CloudFilesProvider: ({ children, options, client }: Props) => JSX.Element;
|
|
9
|
+
export default CloudFilesProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useApp(uid: string, options: any): import("react-query").UseQueryResult<AppType, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useCommentList(parentId: number | null, type: "posts" | "files" | "apps", options: any): import("react-query").UseInfiniteQueryResult<MessagesResult, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useFileList(appId: number | null, options?: any): import("react-query").UseInfiniteQueryResult<FilesResult, unknown>;
|
|
@@ -1 +1,9 @@
|
|
|
1
|
+
export declare type UploadFileProps = {
|
|
2
|
+
file: File;
|
|
3
|
+
onProgress?: (variables: UploadProgressProps) => void;
|
|
4
|
+
};
|
|
5
|
+
export declare type UploadProgressProps = {
|
|
6
|
+
progress: number;
|
|
7
|
+
};
|
|
8
|
+
export declare function useUploadFile(): (file: File, onProgress?: ((variables: UploadProgressProps) => void) | undefined) => Promise<BlobType>;
|
|
1
9
|
export default function useFileUploader(callback: Function): import("react-query").UseMutationResult<void, any, any, unknown>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { UseInfiniteQueryResult } from "react-query/types/react/types";
|
|
3
|
+
export default function useInfinteScroll(infiniteQuery: UseInfiniteQueryResult, deps?: React.DependencyList, reverse?: boolean): import("react").MutableRefObject<any>;
|
|
4
|
+
export declare function useReverseInfiniteScroll(infiniteQuery: UseInfiniteQueryResult, deps?: React.DependencyList): import("react").MutableRefObject<any>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function useMutateComment(): import("react-query").UseMutationResult<MessageType, unknown, {
|
|
2
|
+
parentId: number | null;
|
|
3
|
+
type: "posts" | "files" | "apps";
|
|
4
|
+
text: string;
|
|
5
|
+
blobs: BlobType[];
|
|
6
|
+
meeting: number | null;
|
|
7
|
+
embed: number | null;
|
|
8
|
+
}, {
|
|
9
|
+
tempId: number;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function useMutateEditPost(): import("react-query").UseMutationResult<MessageType, unknown, {
|
|
2
|
+
id: number | null;
|
|
3
|
+
appId: number | null;
|
|
4
|
+
parentId: number | null;
|
|
5
|
+
text: string;
|
|
6
|
+
blobs: BlobType[];
|
|
7
|
+
attachments: FileType[];
|
|
8
|
+
meeting: number | null;
|
|
9
|
+
embed: number | null;
|
|
10
|
+
}, void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default function useMutateEditPost(): import("react-query").UseMutationResult<MessageType, unknown, {
|
|
2
|
+
id: number | null;
|
|
3
|
+
appId: number | null;
|
|
4
|
+
text: string;
|
|
5
|
+
blobs: BlobType[];
|
|
6
|
+
attachments: FileType[];
|
|
7
|
+
options: PollOptionType[];
|
|
8
|
+
meeting: number | null;
|
|
9
|
+
embed: number | null;
|
|
10
|
+
}, void>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export default function useMutateExternalBlobs(): import("react-query").UseMutationResult<any, unknown, {
|
|
2
|
-
|
|
1
|
+
export default function useMutateExternalBlobs(client: WeavyClient): import("react-query").UseMutationResult<any, unknown, {
|
|
2
|
+
blob: any;
|
|
3
3
|
}, unknown>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Mutation, MutationKey, QueryKey } from "react-query";
|
|
2
|
+
import { UploadProgressProps } from "./useFileUploader";
|
|
3
|
+
export declare type CreateFileProps = {
|
|
4
|
+
blob: BlobType;
|
|
5
|
+
file?: FileType;
|
|
6
|
+
replace?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare type MutateFileProps = {
|
|
9
|
+
file: File;
|
|
10
|
+
onProgress?: (variables: UploadProgressProps) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare type MutationFileContext = {
|
|
13
|
+
file: FileType;
|
|
14
|
+
blob: BlobType;
|
|
15
|
+
};
|
|
16
|
+
export declare type FileMutation = Mutation<FileType | BlobType, ServerErrorResponse, MutateFileProps, MutationFileContext | undefined>;
|
|
17
|
+
export declare function isFileMutation(mutation: unknown): mutation is FileMutation;
|
|
18
|
+
export declare function useMutatingFileUploads(filesKey: MutationKey): {
|
|
19
|
+
mutations: FileMutation[];
|
|
20
|
+
status: string | undefined;
|
|
21
|
+
progress: number | undefined;
|
|
22
|
+
};
|
|
23
|
+
export declare function useRemoveMutatingFileUpload(filesKey: MutationKey): (mutation: FileMutation) => void;
|
|
24
|
+
export declare function useClearMutatingFileUpload(filesKey: MutationKey): () => void;
|
|
25
|
+
export declare function useMutateFileUpload(filesKey: QueryKey, createFile?: ({ blob, replace }: CreateFileProps) => Promise<FileType>): import("react-query").UseMutationResult<BlobType, ServerErrorResponse, MutateFileProps, MutationFileContext>;
|
|
26
|
+
export declare function useMutateFileCreate(filesKey: QueryKey, createFile: ({ blob, file, replace }: CreateFileProps) => Promise<FileType>): import("react-query").UseMutationResult<FileType, ServerErrorResponse, CreateFileProps, MutationFileContext>;
|