@weavy/uikit-react 11.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/.github/workflows/publish.yml +16 -0
- package/LICENSE.md +21 -0
- package/README.md +110 -0
- package/changelog.md +50 -0
- package/dist/cjs/index.js +39 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/types/client/WeavyClient.d.ts +16 -0
- package/dist/cjs/types/components/Attachment.d.ts +13 -0
- package/dist/cjs/types/components/Avatar.d.ts +11 -0
- package/dist/cjs/types/components/Chat.d.ts +4 -0
- package/dist/cjs/types/components/Conversation.d.ts +4 -0
- package/dist/cjs/types/components/ConversationBadge.d.ts +3 -0
- package/dist/cjs/types/components/ConversationForm.d.ts +7 -0
- package/dist/cjs/types/components/ConversationList.d.ts +3 -0
- package/dist/cjs/types/components/ConversationListItem.d.ts +4 -0
- package/dist/cjs/types/components/File.d.ts +9 -0
- package/dist/cjs/types/components/FileBrowser.d.ts +6 -0
- package/dist/cjs/types/components/Image.d.ts +16 -0
- package/dist/cjs/types/components/Meeting.d.ts +8 -0
- package/dist/cjs/types/components/MeetingCard.d.ts +6 -0
- package/dist/cjs/types/components/Meetings.d.ts +6 -0
- package/dist/cjs/types/components/Message.d.ts +4 -0
- package/dist/cjs/types/components/Messages.d.ts +9 -0
- package/dist/cjs/types/components/Messenger.d.ts +4 -0
- package/dist/cjs/types/components/NewConversation.d.ts +3 -0
- package/dist/cjs/types/components/Presence.d.ts +7 -0
- package/dist/cjs/types/components/Reactions.d.ts +13 -0
- package/dist/cjs/types/components/SearchUsers.d.ts +7 -0
- package/dist/cjs/types/components/SeenBy.d.ts +9 -0
- package/dist/cjs/types/components/Typing.d.ts +8 -0
- package/dist/cjs/types/contexts/MessengerContext.d.ts +8 -0
- package/dist/cjs/types/contexts/PreviewContext.d.ts +7 -0
- package/dist/cjs/types/contexts/UserContext.d.ts +8 -0
- package/dist/cjs/types/contexts/WeavyContext.d.ts +10 -0
- package/dist/cjs/types/hooks/useBadge.d.ts +1 -0
- package/dist/cjs/types/hooks/useChat.d.ts +1 -0
- package/dist/cjs/types/hooks/useConversation.d.ts +1 -0
- package/dist/cjs/types/hooks/useConversations.d.ts +1 -0
- package/dist/cjs/types/hooks/useDebounce.d.ts +2 -0
- package/dist/cjs/types/hooks/useEvents.d.ts +6 -0
- package/dist/cjs/types/hooks/useFileUploader.d.ts +1 -0
- package/dist/cjs/types/hooks/useMembers.d.ts +1 -0
- package/dist/cjs/types/hooks/useMessages.d.ts +1 -0
- package/dist/cjs/types/hooks/useMutateChat.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateConversation.d.ts +3 -0
- package/dist/cjs/types/hooks/useMutateConversationName.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateDeleteReaction.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateExternalBlobs.d.ts +3 -0
- package/dist/cjs/types/hooks/useMutateMeeting.d.ts +3 -0
- package/dist/cjs/types/hooks/useMutateMembers.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateMessage.d.ts +9 -0
- package/dist/cjs/types/hooks/useMutatePinned.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateReaction.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateRead.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateRemoveMembers.d.ts +4 -0
- package/dist/cjs/types/hooks/useMutateTyping.d.ts +3 -0
- package/dist/cjs/types/hooks/usePresence.d.ts +1 -0
- package/dist/cjs/types/hooks/usePreview.d.ts +4 -0
- package/dist/cjs/types/hooks/useReactions.d.ts +3 -0
- package/dist/cjs/types/hooks/useSearchUsers.d.ts +1 -0
- package/dist/cjs/types/hooks/useThrottle.d.ts +2 -0
- package/dist/cjs/types/hooks/useUser.d.ts +1 -0
- package/dist/cjs/types/index.d.ts +15 -0
- package/dist/cjs/types/types/Chat.d.ts +3 -0
- package/dist/cjs/types/types/Conversation.d.ts +4 -0
- package/dist/cjs/types/types/ConversationListItem.d.ts +4 -0
- package/dist/cjs/types/types/Message.d.ts +15 -0
- package/dist/cjs/types/types/Messenger.d.ts +3 -0
- package/dist/cjs/types/types/types.d.ts +150 -0
- package/dist/cjs/types/ui/Button.d.ts +4 -0
- package/dist/cjs/types/ui/Dropdown.d.ts +19 -0
- package/dist/cjs/types/ui/Icon.d.ts +10 -0
- package/dist/cjs/types/ui/Overlay.d.ts +12 -0
- package/dist/cjs/types/utils/fileUtilities.d.ts +5 -0
- package/dist/cjs/types/utils/styles.d.ts +17 -0
- package/dist/esm/index.js +39 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/types/client/WeavyClient.d.ts +16 -0
- package/dist/esm/types/components/Attachment.d.ts +13 -0
- package/dist/esm/types/components/Avatar.d.ts +11 -0
- package/dist/esm/types/components/Chat.d.ts +4 -0
- package/dist/esm/types/components/Conversation.d.ts +4 -0
- package/dist/esm/types/components/ConversationBadge.d.ts +3 -0
- package/dist/esm/types/components/ConversationForm.d.ts +7 -0
- package/dist/esm/types/components/ConversationList.d.ts +3 -0
- package/dist/esm/types/components/ConversationListItem.d.ts +4 -0
- package/dist/esm/types/components/File.d.ts +9 -0
- package/dist/esm/types/components/FileBrowser.d.ts +6 -0
- package/dist/esm/types/components/Image.d.ts +16 -0
- package/dist/esm/types/components/Meeting.d.ts +8 -0
- package/dist/esm/types/components/MeetingCard.d.ts +6 -0
- package/dist/esm/types/components/Meetings.d.ts +6 -0
- package/dist/esm/types/components/Message.d.ts +4 -0
- package/dist/esm/types/components/Messages.d.ts +9 -0
- package/dist/esm/types/components/Messenger.d.ts +4 -0
- package/dist/esm/types/components/NewConversation.d.ts +3 -0
- package/dist/esm/types/components/Presence.d.ts +7 -0
- package/dist/esm/types/components/Reactions.d.ts +13 -0
- package/dist/esm/types/components/SearchUsers.d.ts +7 -0
- package/dist/esm/types/components/SeenBy.d.ts +9 -0
- package/dist/esm/types/components/Typing.d.ts +8 -0
- package/dist/esm/types/contexts/MessengerContext.d.ts +8 -0
- package/dist/esm/types/contexts/PreviewContext.d.ts +7 -0
- package/dist/esm/types/contexts/UserContext.d.ts +8 -0
- package/dist/esm/types/contexts/WeavyContext.d.ts +10 -0
- package/dist/esm/types/hooks/useBadge.d.ts +1 -0
- package/dist/esm/types/hooks/useChat.d.ts +1 -0
- package/dist/esm/types/hooks/useConversation.d.ts +1 -0
- package/dist/esm/types/hooks/useConversations.d.ts +1 -0
- package/dist/esm/types/hooks/useDebounce.d.ts +2 -0
- package/dist/esm/types/hooks/useEvents.d.ts +6 -0
- package/dist/esm/types/hooks/useFileUploader.d.ts +1 -0
- package/dist/esm/types/hooks/useMembers.d.ts +1 -0
- package/dist/esm/types/hooks/useMessages.d.ts +1 -0
- package/dist/esm/types/hooks/useMutateChat.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateConversation.d.ts +3 -0
- package/dist/esm/types/hooks/useMutateConversationName.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateDeleteReaction.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateExternalBlobs.d.ts +3 -0
- package/dist/esm/types/hooks/useMutateMeeting.d.ts +3 -0
- package/dist/esm/types/hooks/useMutateMembers.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateMessage.d.ts +9 -0
- package/dist/esm/types/hooks/useMutatePinned.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateReaction.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateRead.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateRemoveMembers.d.ts +4 -0
- package/dist/esm/types/hooks/useMutateTyping.d.ts +3 -0
- package/dist/esm/types/hooks/usePresence.d.ts +1 -0
- package/dist/esm/types/hooks/usePreview.d.ts +4 -0
- package/dist/esm/types/hooks/useReactions.d.ts +3 -0
- package/dist/esm/types/hooks/useSearchUsers.d.ts +1 -0
- package/dist/esm/types/hooks/useThrottle.d.ts +2 -0
- package/dist/esm/types/hooks/useUser.d.ts +1 -0
- package/dist/esm/types/index.d.ts +15 -0
- package/dist/esm/types/types/Chat.d.ts +3 -0
- package/dist/esm/types/types/Conversation.d.ts +4 -0
- package/dist/esm/types/types/ConversationListItem.d.ts +4 -0
- package/dist/esm/types/types/Message.d.ts +15 -0
- package/dist/esm/types/types/Messenger.d.ts +3 -0
- package/dist/esm/types/types/types.d.ts +150 -0
- package/dist/esm/types/ui/Button.d.ts +4 -0
- package/dist/esm/types/ui/Dropdown.d.ts +19 -0
- package/dist/esm/types/ui/Icon.d.ts +10 -0
- package/dist/esm/types/ui/Overlay.d.ts +12 -0
- package/dist/esm/types/utils/fileUtilities.d.ts +5 -0
- package/dist/esm/types/utils/styles.d.ts +17 -0
- package/dist/index.d.ts +98 -0
- package/package.json +47 -0
- package/rollup.config.js +41 -0
- package/src/client/WeavyClient.ts +95 -0
- package/src/components/Attachment.tsx +33 -0
- package/src/components/Avatar.tsx +26 -0
- package/src/components/Chat.tsx +68 -0
- package/src/components/Conversation.tsx +220 -0
- package/src/components/ConversationBadge.tsx +44 -0
- package/src/components/ConversationForm.tsx +217 -0
- package/src/components/ConversationList.tsx +61 -0
- package/src/components/ConversationListItem.tsx +155 -0
- package/src/components/File.tsx +21 -0
- package/src/components/FileBrowser.tsx +86 -0
- package/src/components/Image.tsx +66 -0
- package/src/components/Meeting.tsx +21 -0
- package/src/components/MeetingCard.tsx +31 -0
- package/src/components/Meetings.tsx +58 -0
- package/src/components/Message.tsx +90 -0
- package/src/components/Messages.tsx +271 -0
- package/src/components/Messenger.tsx +34 -0
- package/src/components/NewConversation.tsx +50 -0
- package/src/components/Presence.tsx +15 -0
- package/src/components/Reactions.tsx +95 -0
- package/src/components/SearchUsers.tsx +90 -0
- package/src/components/SeenBy.tsx +26 -0
- package/src/components/Typing.tsx +131 -0
- package/src/contexts/MessengerContext.tsx +44 -0
- package/src/contexts/PreviewContext.tsx +105 -0
- package/src/contexts/UserContext.tsx +31 -0
- package/src/contexts/WeavyContext.tsx +66 -0
- package/src/hooks/useBadge.ts +32 -0
- package/src/hooks/useChat.ts +32 -0
- package/src/hooks/useConversation.ts +28 -0
- package/src/hooks/useConversations.ts +27 -0
- package/src/hooks/useDebounce.ts +22 -0
- package/src/hooks/useEvents.ts +43 -0
- package/src/hooks/useFileUploader.ts +35 -0
- package/src/hooks/useMembers.ts +27 -0
- package/src/hooks/useMessages.ts +42 -0
- package/src/hooks/useMessenger.ts +51 -0
- package/src/hooks/useMutateChat.ts +44 -0
- package/src/hooks/useMutateConversation.ts +40 -0
- package/src/hooks/useMutateConversationName.ts +41 -0
- package/src/hooks/useMutateDeleteReaction.ts +38 -0
- package/src/hooks/useMutateExternalBlobs.ts +39 -0
- package/src/hooks/useMutateMeeting.ts +39 -0
- package/src/hooks/useMutateMembers.ts +43 -0
- package/src/hooks/useMutateMessage.ts +116 -0
- package/src/hooks/useMutatePinned.ts +40 -0
- package/src/hooks/useMutateReaction.ts +38 -0
- package/src/hooks/useMutateRead.ts +40 -0
- package/src/hooks/useMutateRemoveMembers.ts +43 -0
- package/src/hooks/useMutateTyping.ts +34 -0
- package/src/hooks/usePresence.ts +32 -0
- package/src/hooks/usePreview.ts +21 -0
- package/src/hooks/useReactions.ts +53 -0
- package/src/hooks/useSearchUsers.ts +26 -0
- package/src/hooks/useThrottle.ts +13 -0
- package/src/hooks/useUser.ts +38 -0
- package/src/index.ts +33 -0
- package/src/types/Chat.ts +3 -0
- package/src/types/Conversation.ts +4 -0
- package/src/types/ConversationListItem.ts +4 -0
- package/src/types/Message.ts +16 -0
- package/src/types/Messenger.ts +3 -0
- package/src/types/emoji-toolkit.d.ts +1 -0
- package/src/types/types.ts +175 -0
- package/src/ui/Button.tsx +32 -0
- package/src/ui/Dropdown.tsx +58 -0
- package/src/ui/Icon.tsx +79 -0
- package/src/ui/Overlay.tsx +41 -0
- package/src/utils/fileUtilities.ts +230 -0
- package/src/utils/infiniteScroll.js +175 -0
- package/src/utils/scrollToBottom.js +75 -0
- package/src/utils/styles.ts +42 -0
- package/tsconfig.json +108 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default class WeavyClient {
|
|
2
|
+
uri: string;
|
|
3
|
+
tokenFactory: () => string | Promise<string>;
|
|
4
|
+
connection: import("@microsoft/signalr").HubConnection;
|
|
5
|
+
groups: string[];
|
|
6
|
+
connectionEvents: any[];
|
|
7
|
+
isConnectionStarted: any;
|
|
8
|
+
EVENT_NAMESPACE: string;
|
|
9
|
+
EVENT_CLOSE: string;
|
|
10
|
+
EVENT_RECONNECTING: string;
|
|
11
|
+
EVENT_RECONNECTED: string;
|
|
12
|
+
constructor(options: WeavyClientOptions);
|
|
13
|
+
subscribe(group: string, event: string, callback: any): Promise<void>;
|
|
14
|
+
unsubscribe(group: string, event: string, callback: any): Promise<void>;
|
|
15
|
+
triggerHandler(name: string, ...data: any): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
previewFormat: string;
|
|
4
|
+
url: string;
|
|
5
|
+
previewUrl: string;
|
|
6
|
+
mediaType: string;
|
|
7
|
+
name: string;
|
|
8
|
+
kind: string;
|
|
9
|
+
size: number;
|
|
10
|
+
provider: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Attachment: ({ previewFormat, url, previewUrl, mediaType, name, kind, size, provider }: Props) => JSX.Element;
|
|
13
|
+
export default Attachment;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
id?: number;
|
|
4
|
+
name: string;
|
|
5
|
+
src: string;
|
|
6
|
+
presence?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
declare const Avatar: ({ id, src, name, presence, size, className }: Props) => JSX.Element;
|
|
11
|
+
export default Avatar;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type ImageProps = {
|
|
3
|
+
src: string;
|
|
4
|
+
previewSrc: string;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
more?: number;
|
|
8
|
+
onClick: (e: any) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare const Image: ({ src, previewSrc, width, height, more, onClick }: ImageProps) => JSX.Element;
|
|
11
|
+
declare type ImageGridProps = {
|
|
12
|
+
children: React.ReactNode;
|
|
13
|
+
limit?: number;
|
|
14
|
+
};
|
|
15
|
+
export declare const ImageGrid: ({ children, limit }: ImageGridProps) => JSX.Element;
|
|
16
|
+
export default Image;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type Props = {
|
|
3
|
+
id: number;
|
|
4
|
+
members: MembersResult | undefined;
|
|
5
|
+
displayName?: string;
|
|
6
|
+
avatarUrl?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const Messages: ({ id, members, displayName, avatarUrl }: Props) => JSX.Element;
|
|
9
|
+
export default Messages;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type ReactionMenuProps = {
|
|
3
|
+
id: number;
|
|
4
|
+
reactions: ReactableType[];
|
|
5
|
+
};
|
|
6
|
+
declare type ReactionsProps = {
|
|
7
|
+
id: number;
|
|
8
|
+
parentId: number | null;
|
|
9
|
+
reactions: ReactableType[];
|
|
10
|
+
};
|
|
11
|
+
export declare const ReactionsMenu: ({ id, reactions }: ReactionMenuProps) => JSX.Element;
|
|
12
|
+
export declare const ReactionsList: ({ id, reactions }: ReactionsProps) => JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const MessengerContext: React.Context<MessengerContextProps>;
|
|
3
|
+
declare type Props = {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
options?: MessengerContextOptions;
|
|
6
|
+
};
|
|
7
|
+
declare const MessengerProvider: ({ children, options }: Props) => JSX.Element;
|
|
8
|
+
export default MessengerProvider;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const UserContext: React.Context<UserContextProps>;
|
|
3
|
+
declare type Props = {
|
|
4
|
+
client: any;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
declare const UserProvider: ({ children, client }: Props) => JSX.Element;
|
|
8
|
+
export default UserProvider;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import WeavyClient from "../client/WeavyClient";
|
|
3
|
+
export declare const WeavyContext: React.Context<WeavyContextProps>;
|
|
4
|
+
declare type Props = {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
client: WeavyClient;
|
|
7
|
+
options?: WeavyContextOptions;
|
|
8
|
+
};
|
|
9
|
+
declare const WeavyProvider: ({ children, client, options }: Props) => JSX.Element;
|
|
10
|
+
export default WeavyProvider;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useBadge(): import("react-query").UseQueryResult<BadgeType, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useChat(id: string, options: any): import("react-query").UseQueryResult<ConversationType, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useConversation(id: number | null, options: any): import("react-query").UseQueryResult<ConversationType, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useConversations(): import("react-query").UseQueryResult<ConversationsResult, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useFileUploader(callback: Function): import("react-query").UseMutationResult<void, any, any, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useMembers(id: number | null, options: any): import("react-query").UseQueryResult<MembersResult, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useMessages(id: number | null, options: any): import("react-query").UseInfiniteQueryResult<MessagesResult, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePresence(): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useSearchUsers(text: string, options: any): import("react-query").UseQueryResult<MembersResult, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function useUser(client: any): import("react-query").UseQueryResult<UserType, unknown>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import WeavyClient from './client/WeavyClient';
|
|
2
|
+
import WeavyProvider from './contexts/WeavyContext';
|
|
3
|
+
import { WeavyContext } from './contexts/WeavyContext';
|
|
4
|
+
import MessengerProvider from './contexts/MessengerContext';
|
|
5
|
+
import { MessengerContext } from './contexts/MessengerContext';
|
|
6
|
+
import Messenger from './components/Messenger';
|
|
7
|
+
import ConversationBadge from './components/ConversationBadge';
|
|
8
|
+
import ConversationList from './components/ConversationList';
|
|
9
|
+
import Conversation from './components/Conversation';
|
|
10
|
+
import Chat from './components/Chat';
|
|
11
|
+
import Button from './ui/Button';
|
|
12
|
+
import Dropdown from './ui/Dropdown';
|
|
13
|
+
import Icon from './ui/Icon';
|
|
14
|
+
import Overlay from './ui/Overlay';
|
|
15
|
+
export { WeavyClient, WeavyContext, WeavyProvider, MessengerProvider, MessengerContext, Messenger, ConversationList, Conversation, Chat, ConversationBadge, Button, Dropdown, Icon, Overlay };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface MessageProps {
|
|
2
|
+
id: number;
|
|
3
|
+
html: string;
|
|
4
|
+
temp?: boolean | false;
|
|
5
|
+
me: boolean;
|
|
6
|
+
avatar?: string;
|
|
7
|
+
name: string;
|
|
8
|
+
created_at: string;
|
|
9
|
+
attachments: AttachmentType[];
|
|
10
|
+
meeting: MeetingCardType;
|
|
11
|
+
parentId: number | null;
|
|
12
|
+
reactions: ReactableType[];
|
|
13
|
+
reactions_count?: number;
|
|
14
|
+
seenBy: MemberType[];
|
|
15
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type WeavyClientOptions = {
|
|
3
|
+
uri: string;
|
|
4
|
+
tokenFactory: (() => string | Promise<string>);
|
|
5
|
+
};
|
|
6
|
+
declare type WeavyContextProps = {
|
|
7
|
+
client: any;
|
|
8
|
+
options?: WeavyContextOptions;
|
|
9
|
+
};
|
|
10
|
+
declare type WeavyContextOptions = {
|
|
11
|
+
zoomAuthenticationUrl?: string;
|
|
12
|
+
teamsAuthenticationUrl?: string;
|
|
13
|
+
enableCloudFiles?: boolean;
|
|
14
|
+
filebrowserUrl?: string;
|
|
15
|
+
};
|
|
16
|
+
declare type MessengerContextProps = {
|
|
17
|
+
options?: MessengerContextOptions;
|
|
18
|
+
selectedConversationId: null | number;
|
|
19
|
+
setSelectedConversationId: Function;
|
|
20
|
+
};
|
|
21
|
+
declare type UserContextProps = {
|
|
22
|
+
user: UserType;
|
|
23
|
+
};
|
|
24
|
+
declare type MessengerContextOptions = {
|
|
25
|
+
reactions?: string[];
|
|
26
|
+
};
|
|
27
|
+
declare type PreviewContextProps = {
|
|
28
|
+
openPreview: Function;
|
|
29
|
+
closePreview: Function;
|
|
30
|
+
};
|
|
31
|
+
declare type ProviderProps = {
|
|
32
|
+
children: React.ReactNode;
|
|
33
|
+
client: any;
|
|
34
|
+
};
|
|
35
|
+
declare type InsertConversationProps = {
|
|
36
|
+
title: string;
|
|
37
|
+
text: string;
|
|
38
|
+
};
|
|
39
|
+
declare type ConversationsResult = {
|
|
40
|
+
data: ConversationType[];
|
|
41
|
+
start: number;
|
|
42
|
+
end: number;
|
|
43
|
+
count: number;
|
|
44
|
+
};
|
|
45
|
+
declare type MembersResult = {
|
|
46
|
+
data: MemberType[];
|
|
47
|
+
start: number;
|
|
48
|
+
end: number;
|
|
49
|
+
count: number;
|
|
50
|
+
};
|
|
51
|
+
declare type MessagesResult = {
|
|
52
|
+
data: MessageType[];
|
|
53
|
+
start: number;
|
|
54
|
+
end: number;
|
|
55
|
+
count: number;
|
|
56
|
+
};
|
|
57
|
+
declare type ConversationType = {
|
|
58
|
+
id: number;
|
|
59
|
+
display_name: string;
|
|
60
|
+
last_message: MessageType;
|
|
61
|
+
is_unread: boolean;
|
|
62
|
+
is_pinned: boolean;
|
|
63
|
+
type: string;
|
|
64
|
+
member_ids: number[];
|
|
65
|
+
avatar_url: string;
|
|
66
|
+
};
|
|
67
|
+
declare type MemberType = {
|
|
68
|
+
id: number;
|
|
69
|
+
name: string;
|
|
70
|
+
display_name: string;
|
|
71
|
+
avatar_url: string;
|
|
72
|
+
delivered_at: string;
|
|
73
|
+
read_at: string;
|
|
74
|
+
presence: string;
|
|
75
|
+
};
|
|
76
|
+
declare type MessageType = {
|
|
77
|
+
id: number;
|
|
78
|
+
html: string;
|
|
79
|
+
text: string;
|
|
80
|
+
app_id: number;
|
|
81
|
+
temp?: boolean;
|
|
82
|
+
created_at: string;
|
|
83
|
+
created_by: MemberType;
|
|
84
|
+
attachments: AttachmentType[];
|
|
85
|
+
attachment_ids: number[];
|
|
86
|
+
meeting: MeetingCardType;
|
|
87
|
+
meeting_id?: number;
|
|
88
|
+
reactions: ReactableType[];
|
|
89
|
+
};
|
|
90
|
+
declare type UserType = {
|
|
91
|
+
id: number;
|
|
92
|
+
username: string;
|
|
93
|
+
email: string;
|
|
94
|
+
name: string;
|
|
95
|
+
title: string;
|
|
96
|
+
avatar_url: string;
|
|
97
|
+
presence: string;
|
|
98
|
+
};
|
|
99
|
+
declare type FileType = {
|
|
100
|
+
id: number;
|
|
101
|
+
name: string;
|
|
102
|
+
};
|
|
103
|
+
declare type AttachmentType = {
|
|
104
|
+
id: number;
|
|
105
|
+
name: string;
|
|
106
|
+
kind: string;
|
|
107
|
+
media_type: string;
|
|
108
|
+
width: number;
|
|
109
|
+
height: number;
|
|
110
|
+
size: number;
|
|
111
|
+
provider: string;
|
|
112
|
+
download_url: string;
|
|
113
|
+
preview_url: string;
|
|
114
|
+
thumbnail_url: string;
|
|
115
|
+
external_url: string;
|
|
116
|
+
};
|
|
117
|
+
declare type ReactionType = {
|
|
118
|
+
id: number;
|
|
119
|
+
parent: MessageType;
|
|
120
|
+
content: string;
|
|
121
|
+
created_by: MemberType;
|
|
122
|
+
count?: number;
|
|
123
|
+
};
|
|
124
|
+
declare type ReactableType = {
|
|
125
|
+
content: string;
|
|
126
|
+
created_by_id: number;
|
|
127
|
+
};
|
|
128
|
+
declare type ReactionGroup = {
|
|
129
|
+
content: string;
|
|
130
|
+
count: number;
|
|
131
|
+
has_reacted: boolean;
|
|
132
|
+
};
|
|
133
|
+
declare type MeetingType = {
|
|
134
|
+
id: number;
|
|
135
|
+
provider: string;
|
|
136
|
+
};
|
|
137
|
+
declare type MeetingCardType = {
|
|
138
|
+
id: number;
|
|
139
|
+
provider: string;
|
|
140
|
+
provider_id: string;
|
|
141
|
+
uuid: string;
|
|
142
|
+
join_url: string;
|
|
143
|
+
recording_url: string;
|
|
144
|
+
ended_at: string;
|
|
145
|
+
};
|
|
146
|
+
declare type BadgeType = {
|
|
147
|
+
private: number;
|
|
148
|
+
rooms: number;
|
|
149
|
+
chat: number;
|
|
150
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
declare type DropdownProps = {
|
|
3
|
+
directionX?: "left" | "right";
|
|
4
|
+
directionY?: "up" | "down";
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
props?: React.HTMLAttributes<HTMLSpanElement>;
|
|
8
|
+
};
|
|
9
|
+
declare type ItemProps = {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
onClick?: (e: any) => void;
|
|
13
|
+
props?: React.HTMLAttributes<HTMLDivElement>;
|
|
14
|
+
};
|
|
15
|
+
declare const UIDropdown: {
|
|
16
|
+
UI: ({ directionX, directionY, children, className, ...props }: DropdownProps) => JSX.Element;
|
|
17
|
+
Item: ({ children, className, onClick, ...props }: ItemProps) => JSX.Element;
|
|
18
|
+
};
|
|
19
|
+
export default UIDropdown;
|