@weavy/uikit-react 14.0.4 → 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 +6 -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
|
@@ -7,8 +7,8 @@ export interface MessageProps {
|
|
|
7
7
|
name: string;
|
|
8
8
|
created_at: string;
|
|
9
9
|
created_by: string;
|
|
10
|
-
attachments:
|
|
11
|
-
meeting
|
|
10
|
+
attachments: FileType[];
|
|
11
|
+
meeting?: MeetingType;
|
|
12
12
|
parentId: number | null;
|
|
13
13
|
reactions: ReactableType[];
|
|
14
14
|
reactions_count?: number;
|
|
@@ -7,11 +7,17 @@ interface WeavyClient {
|
|
|
7
7
|
destroy: Function;
|
|
8
8
|
get: (url: string, retry?: boolean) => Promise<Response>;
|
|
9
9
|
post: (url: string, method: "GET" | "POST" | "PUT" | "DELETE" | "PATCH", body: string | FormData, contentType?: string, retry?: boolean) => Promise<Response>;
|
|
10
|
+
upload: (url: string, method: "POST" | "PUT" | "PATCH", body: string | FormData, contentType?: string, onProgress?: (progress: number) => void, retry?: boolean) => Promise<Response>;
|
|
10
11
|
}
|
|
11
12
|
declare type WeavyClientOptions = {
|
|
12
13
|
url: string;
|
|
13
14
|
tokenFactory: (refresh: boolean) => Promise<string>;
|
|
14
15
|
};
|
|
16
|
+
declare type ServerErrorResponse = {
|
|
17
|
+
status: number;
|
|
18
|
+
title: string;
|
|
19
|
+
detail?: string;
|
|
20
|
+
};
|
|
15
21
|
declare type WeavyContextProps = {
|
|
16
22
|
client: WeavyClient | null;
|
|
17
23
|
options?: WeavyContextOptions;
|
|
@@ -33,9 +39,13 @@ declare type MessengerContextProps = {
|
|
|
33
39
|
declare type UserContextProps = {
|
|
34
40
|
user: UserType;
|
|
35
41
|
};
|
|
42
|
+
declare type CloudFilesContextProps = {
|
|
43
|
+
open: Function;
|
|
44
|
+
};
|
|
36
45
|
declare type PreviewContextProps = {
|
|
37
46
|
openPreview: Function;
|
|
38
47
|
closePreview: Function;
|
|
48
|
+
setPreviewFiles: Function;
|
|
39
49
|
};
|
|
40
50
|
declare type ProviderProps = {
|
|
41
51
|
children: React.ReactNode;
|
|
@@ -63,15 +73,34 @@ declare type MessagesResult = {
|
|
|
63
73
|
end: number;
|
|
64
74
|
count: number;
|
|
65
75
|
};
|
|
76
|
+
declare type SortOrder = {
|
|
77
|
+
by: string;
|
|
78
|
+
descending: boolean;
|
|
79
|
+
};
|
|
80
|
+
declare type FileOrderBy = "id" | "name" | "size" | "created_at" | "modified_at" | "timestamp";
|
|
81
|
+
declare type FileOrder = SortOrder & {
|
|
82
|
+
by: FileOrderBy;
|
|
83
|
+
descending: boolean;
|
|
84
|
+
};
|
|
85
|
+
declare type FileView = "list" | "grid";
|
|
86
|
+
declare type FilesResult = {
|
|
87
|
+
data: FileType[];
|
|
88
|
+
start: number;
|
|
89
|
+
end: number;
|
|
90
|
+
count: number;
|
|
91
|
+
};
|
|
66
92
|
declare type ConversationType = {
|
|
67
93
|
id: number;
|
|
94
|
+
created_by_id: number;
|
|
68
95
|
display_name: string;
|
|
69
96
|
last_message: MessageType;
|
|
70
97
|
is_unread: boolean;
|
|
71
98
|
is_pinned: boolean;
|
|
99
|
+
is_starred: boolean;
|
|
72
100
|
type: string;
|
|
73
|
-
member_ids: number[];
|
|
74
101
|
avatar_url: string;
|
|
102
|
+
user_id?: number;
|
|
103
|
+
member_count?: number;
|
|
75
104
|
};
|
|
76
105
|
declare type MemberType = {
|
|
77
106
|
id: number;
|
|
@@ -91,16 +120,33 @@ declare type MessageType = {
|
|
|
91
120
|
id: number;
|
|
92
121
|
html: string;
|
|
93
122
|
text: string;
|
|
123
|
+
plain: string;
|
|
94
124
|
app_id: number;
|
|
95
125
|
temp?: boolean;
|
|
96
126
|
created_at: string;
|
|
97
127
|
created_by: MemberType;
|
|
98
128
|
created_by_id: number;
|
|
99
|
-
|
|
129
|
+
modified_at?: string;
|
|
130
|
+
modified_by?: MemberType;
|
|
131
|
+
trashed_at?: string;
|
|
132
|
+
trashed_by?: MemberType;
|
|
133
|
+
attachments: FileType[];
|
|
100
134
|
attachment_ids: number[];
|
|
101
|
-
|
|
135
|
+
attachment_count?: number;
|
|
136
|
+
meeting?: MeetingType;
|
|
102
137
|
meeting_id?: number;
|
|
103
138
|
reactions: ReactableType[];
|
|
139
|
+
embed?: EmbedType;
|
|
140
|
+
comment_count?: number;
|
|
141
|
+
is_subscribed: boolean;
|
|
142
|
+
is_trashed: boolean;
|
|
143
|
+
options?: PollOptionType[];
|
|
144
|
+
};
|
|
145
|
+
declare type PollOptionType = {
|
|
146
|
+
id: number | null;
|
|
147
|
+
text: string;
|
|
148
|
+
has_voted?: boolean;
|
|
149
|
+
vote_count?: number;
|
|
104
150
|
};
|
|
105
151
|
declare type UserType = {
|
|
106
152
|
id: number;
|
|
@@ -112,31 +158,47 @@ declare type UserType = {
|
|
|
112
158
|
avatar_url: string;
|
|
113
159
|
presence: string;
|
|
114
160
|
};
|
|
115
|
-
declare type
|
|
161
|
+
declare type FileKindType = "archive" | "audio" | "code" | "document" | "email" | "presentation" | "spreadsheet" | "image" | "text" | "video" | "file";
|
|
162
|
+
declare type PreviewFormatType = "audio" | "code" | "embed" | "html" | "image" | "pdf" | "text" | "video" | "none";
|
|
163
|
+
declare type ProviderType = "google-drive" | "onedrive" | "box" | "dropbox";
|
|
164
|
+
declare type BlobType = {
|
|
116
165
|
id: number;
|
|
117
166
|
name: string;
|
|
167
|
+
size?: number;
|
|
168
|
+
media_type?: string;
|
|
169
|
+
thumbnail_url?: string;
|
|
118
170
|
};
|
|
119
|
-
declare type
|
|
171
|
+
declare type FileType = {
|
|
120
172
|
id: number;
|
|
173
|
+
refId?: number;
|
|
174
|
+
version: number;
|
|
121
175
|
name: string;
|
|
122
|
-
kind:
|
|
176
|
+
kind: FileKindType;
|
|
123
177
|
media_type: string;
|
|
124
|
-
width
|
|
125
|
-
height
|
|
126
|
-
size
|
|
127
|
-
provider
|
|
128
|
-
download_url
|
|
178
|
+
width?: number;
|
|
179
|
+
height?: number;
|
|
180
|
+
size?: number;
|
|
181
|
+
provider?: string;
|
|
182
|
+
download_url?: string;
|
|
129
183
|
embed_url: string;
|
|
130
|
-
external_url
|
|
131
|
-
|
|
184
|
+
external_url?: string;
|
|
185
|
+
application_url?: string;
|
|
132
186
|
preview_format: PreviewFormatType;
|
|
133
|
-
|
|
134
|
-
|
|
187
|
+
preview_url?: string;
|
|
188
|
+
thumbnail_url?: string;
|
|
135
189
|
created_at: string;
|
|
136
190
|
created_by?: UserType;
|
|
137
|
-
|
|
191
|
+
created_by_id: number;
|
|
192
|
+
modified_at?: string;
|
|
193
|
+
modified_by?: UserType;
|
|
194
|
+
modified_by_id?: number;
|
|
195
|
+
comment_ids?: number[];
|
|
196
|
+
is_subscribed: boolean;
|
|
197
|
+
is_trashed: boolean;
|
|
198
|
+
status?: "ok" | "pending" | "conflict" | "error";
|
|
199
|
+
statusText?: string;
|
|
200
|
+
progress?: number;
|
|
138
201
|
};
|
|
139
|
-
declare type PreviewFormatType = "audio" | "code" | "embed" | "html" | "image" | "pdf" | "text" | "video" | "none";
|
|
140
202
|
declare type ReactionType = {
|
|
141
203
|
id: number;
|
|
142
204
|
parent: MessageType;
|
|
@@ -153,11 +215,13 @@ declare type ReactionGroup = {
|
|
|
153
215
|
count: number;
|
|
154
216
|
has_reacted: boolean;
|
|
155
217
|
};
|
|
156
|
-
declare type
|
|
157
|
-
|
|
158
|
-
|
|
218
|
+
declare type ReactionsResult = {
|
|
219
|
+
data: ReactionType[];
|
|
220
|
+
start: number;
|
|
221
|
+
end: number;
|
|
222
|
+
count: number;
|
|
159
223
|
};
|
|
160
|
-
declare type
|
|
224
|
+
declare type MeetingType = {
|
|
161
225
|
id: number;
|
|
162
226
|
provider: string;
|
|
163
227
|
provider_id: string;
|
|
@@ -205,5 +269,57 @@ declare type RealtimeTyping = {
|
|
|
205
269
|
action: string;
|
|
206
270
|
id: number;
|
|
207
271
|
actor: MemberTypingType;
|
|
208
|
-
|
|
272
|
+
entity: EntityType;
|
|
273
|
+
type: string;
|
|
274
|
+
};
|
|
275
|
+
declare type AppType = {
|
|
276
|
+
id: number;
|
|
277
|
+
type: string;
|
|
278
|
+
uid: string;
|
|
279
|
+
display_name: string;
|
|
280
|
+
name: string;
|
|
281
|
+
description: string;
|
|
282
|
+
avatar_url: string;
|
|
283
|
+
metadata: any;
|
|
284
|
+
tags?: string[];
|
|
285
|
+
created_at: string;
|
|
286
|
+
created_by_id: number;
|
|
287
|
+
created_by?: UserType;
|
|
288
|
+
modified_at?: string;
|
|
289
|
+
modified_by_id?: number;
|
|
290
|
+
modified_by?: UserType;
|
|
291
|
+
member_count?: number;
|
|
292
|
+
members?: MemberType[];
|
|
293
|
+
is_subscribed: boolean;
|
|
294
|
+
is_trashed: boolean;
|
|
295
|
+
archive_url: string;
|
|
296
|
+
};
|
|
297
|
+
declare type PostsType = {
|
|
298
|
+
id: number;
|
|
299
|
+
display_name: string;
|
|
300
|
+
last_message: MessageType;
|
|
301
|
+
is_unread: boolean;
|
|
302
|
+
is_pinned: boolean;
|
|
303
|
+
type: string;
|
|
304
|
+
member_ids: number[];
|
|
305
|
+
avatar_url: string;
|
|
306
|
+
};
|
|
307
|
+
declare type EmbedType = {
|
|
308
|
+
id: number;
|
|
309
|
+
title: string;
|
|
310
|
+
description: string;
|
|
311
|
+
type: "link" | "video" | "photo" | "audio" | "rich";
|
|
312
|
+
host: string;
|
|
313
|
+
original_url: string;
|
|
314
|
+
provider_name: string;
|
|
315
|
+
provider_url?: string;
|
|
316
|
+
thumbnail_url?: string;
|
|
317
|
+
thumbnail_width?: number;
|
|
318
|
+
thumbnail_height?: number;
|
|
319
|
+
width?: number;
|
|
320
|
+
height?: number;
|
|
321
|
+
author_name: string;
|
|
322
|
+
author_url: string;
|
|
323
|
+
html?: string;
|
|
324
|
+
image?: string;
|
|
209
325
|
};
|
|
@@ -2,18 +2,34 @@ import React from "react";
|
|
|
2
2
|
declare type DropdownProps = {
|
|
3
3
|
directionX?: "left" | "right";
|
|
4
4
|
directionY?: "up" | "down";
|
|
5
|
+
icon?: string;
|
|
5
6
|
children: React.ReactNode;
|
|
6
7
|
className?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
buttonContent?: React.ReactNode;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
noWrapper?: boolean;
|
|
7
12
|
props?: React.HTMLAttributes<HTMLSpanElement>;
|
|
8
13
|
};
|
|
9
14
|
declare type ItemProps = {
|
|
10
15
|
children: React.ReactNode;
|
|
11
16
|
className?: string;
|
|
12
17
|
onClick?: (e: any) => void;
|
|
18
|
+
active?: boolean;
|
|
13
19
|
props?: React.HTMLAttributes<HTMLDivElement>;
|
|
14
20
|
};
|
|
21
|
+
declare type AnchorProps = {
|
|
22
|
+
children: React.ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
link?: string;
|
|
25
|
+
active?: boolean;
|
|
26
|
+
download?: boolean;
|
|
27
|
+
props?: React.HTMLAttributes<HTMLAnchorElement>;
|
|
28
|
+
};
|
|
15
29
|
declare const UIDropdown: {
|
|
16
|
-
UI: ({ directionX, directionY, children, className, ...props }: DropdownProps) => JSX.Element;
|
|
17
|
-
Item: ({ children, className, onClick, ...props }: ItemProps) => JSX.Element;
|
|
30
|
+
UI: ({ directionX, directionY, icon, children, className, title, buttonContent, disabled, noWrapper, ...props }: DropdownProps) => JSX.Element;
|
|
31
|
+
Item: ({ children, className, onClick, active, ...props }: ItemProps) => JSX.Element;
|
|
32
|
+
Anchor: ({ children, className, link, active, download, ...props }: AnchorProps) => JSX.Element;
|
|
33
|
+
Divider: () => JSX.Element;
|
|
18
34
|
};
|
|
19
35
|
export default UIDropdown;
|
package/dist/cjs/ui/Icon.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
declare type Props = {
|
|
3
3
|
name: string;
|
|
4
4
|
color?: string;
|
|
5
5
|
size?: number;
|
|
6
|
+
title?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
declare type IconActiveStackProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
children: ReactNode;
|
|
6
12
|
};
|
|
7
13
|
declare const UIIcon: {
|
|
8
|
-
UI: ({ name, color, size, ...props }: Props) => JSX.Element;
|
|
14
|
+
UI: ({ name, color, size, className, title, ...props }: Props) => JSX.Element;
|
|
15
|
+
Raw: ({ name, color, size, className, title, ...props }: Props) => JSX.Element;
|
|
16
|
+
ActiveStack: ({ className, children }: IconActiveStackProps) => JSX.Element;
|
|
9
17
|
};
|
|
10
18
|
export default UIIcon;
|
package/dist/cjs/ui/Overlay.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ declare type OverlayProps = {
|
|
|
5
5
|
className?: string;
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
style?: Styles;
|
|
8
|
+
closeOnEsc?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
8
10
|
};
|
|
9
11
|
declare const UIOverlay: {
|
|
10
|
-
UI: ({ children, className, isOpen, style }: OverlayProps) => JSX.Element;
|
|
12
|
+
UI: ({ children, className, isOpen, style, closeOnEsc, onClose }: OverlayProps) => JSX.Element;
|
|
11
13
|
};
|
|
12
14
|
export default UIOverlay;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Styles } from 'react-modal';
|
|
3
|
+
declare type SheetProps = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
style?: Styles;
|
|
8
|
+
title: string;
|
|
9
|
+
onClose?: (e: any) => void;
|
|
10
|
+
};
|
|
11
|
+
declare const UISheet: {
|
|
12
|
+
UI: ({ children, className, isOpen, style, title, onClose }: SheetProps) => JSX.Element;
|
|
13
|
+
};
|
|
14
|
+
export default UISheet;
|
package/dist/cjs/ui/Spinner.d.ts
CHANGED
|
@@ -3,8 +3,9 @@ declare type SpinnerProps = {
|
|
|
3
3
|
size?: number;
|
|
4
4
|
spin?: boolean;
|
|
5
5
|
overlay?: boolean;
|
|
6
|
+
progress?: number;
|
|
6
7
|
};
|
|
7
8
|
declare const UISpinner: {
|
|
8
|
-
UI: ({ spin, size, overlay }: SpinnerProps) => JSX.Element;
|
|
9
|
+
UI: ({ spin, size, overlay, progress }: SpinnerProps) => JSX.Element;
|
|
9
10
|
};
|
|
10
11
|
export default UISpinner;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InfiniteData, QueryClient, QueryKey } from "react-query";
|
|
2
|
+
export declare function findAnyExistingItem<TDataItem>(queryData: InfiniteData<any> | undefined, propertyName: string, value: string, copy?: boolean): TDataItem | undefined;
|
|
3
|
+
export declare function addToQueryData(queryData: any, item: any, sorting?: {
|
|
4
|
+
by?: string;
|
|
5
|
+
descending?: boolean;
|
|
6
|
+
}, tempId?: number): any;
|
|
7
|
+
export declare function updateQueryData(queryData: any, select: number | ((item: any) => boolean), fnUpdater: Function): any;
|
|
8
|
+
export declare function removeQueryData(queryData: any, select: number | ((item: any) => boolean)): any;
|
|
9
|
+
export declare const addCacheItem: <T>(queryClient: QueryClient, key: QueryKey, item: any, tempId?: number, sorting?: {
|
|
10
|
+
by?: string;
|
|
11
|
+
descending?: boolean;
|
|
12
|
+
}) => void | T;
|
|
13
|
+
export declare const updateCacheItem: <T>(queryClient: QueryClient, key: QueryKey, select: number | ((item: any) => boolean), fnUpdater: Function) => void | T;
|
|
14
|
+
export declare const removeCacheItem: <T>(queryClient: QueryClient, key: QueryKey, select: number | ((item: any) => boolean)) => void | T;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const fileSizeAsString: (size: number) => string;
|
|
1
|
+
export declare const fileSizeAsString: (size: number, significantDigits?: number) => string;
|
|
2
2
|
export declare function getExtension(name: string): string;
|
|
3
3
|
export declare function isAudio(ext: string): boolean;
|
|
4
4
|
export declare function isImage(ext: string): boolean;
|
|
@@ -15,3 +15,12 @@ export declare function getIcon(name: string, mediaType?: string): {
|
|
|
15
15
|
icon: string;
|
|
16
16
|
color?: string;
|
|
17
17
|
};
|
|
18
|
+
/**
|
|
19
|
+
* Returns preview formats that can be rendered directly in the browser
|
|
20
|
+
*
|
|
21
|
+
* @param {string} name - Name of the file
|
|
22
|
+
* @returns PreviewFormatType
|
|
23
|
+
*/
|
|
24
|
+
export declare function getWebPreviewFormat(name: string): PreviewFormatType;
|
|
25
|
+
export declare function getProvider(provider: string | undefined): ProviderType | "";
|
|
26
|
+
export declare function getKind(name: string): FileKindType;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function openUrl(url?: string, target?: string, name?: string, download?: boolean): void;
|