@weavy/uikit-react 11.0.0 → 11.2.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/README.md +6 -5
- package/changelog.md +19 -0
- package/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/client/WeavyClient.d.ts +1 -1
- package/dist/cjs/types/contexts/MessengerContext.d.ts +1 -2
- package/dist/cjs/types/hooks/useUser.d.ts +2 -1
- package/dist/cjs/types/types/Messenger.d.ts +0 -1
- package/dist/cjs/types/types/types.d.ts +10 -6
- package/dist/cjs/types/utils/styles.d.ts +2 -2
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/client/WeavyClient.d.ts +1 -1
- package/dist/esm/types/contexts/MessengerContext.d.ts +1 -2
- package/dist/esm/types/hooks/useUser.d.ts +2 -1
- package/dist/esm/types/types/Messenger.d.ts +0 -1
- package/dist/esm/types/types/types.d.ts +10 -6
- package/dist/esm/types/utils/styles.d.ts +2 -2
- package/dist/index.d.ts +2 -3
- package/package.json +1 -1
- package/src/client/WeavyClient.ts +3 -3
- package/src/components/Chat.tsx +8 -11
- package/src/components/Conversation.tsx +2 -2
- package/src/components/ConversationListItem.tsx +2 -2
- package/src/components/FileBrowser.tsx +1 -1
- package/src/components/Messages.tsx +14 -13
- package/src/components/Messenger.tsx +4 -4
- package/src/components/Reactions.tsx +2 -1
- package/src/components/SearchUsers.tsx +2 -2
- package/src/components/Typing.tsx +4 -4
- package/src/contexts/MessengerContext.tsx +4 -12
- package/src/contexts/WeavyContext.tsx +8 -1
- package/src/hooks/useBadge.ts +1 -1
- package/src/hooks/useChat.ts +1 -1
- package/src/hooks/useConversation.ts +1 -1
- package/src/hooks/useConversations.ts +1 -1
- package/src/hooks/useFileUploader.ts +5 -1
- package/src/hooks/useMembers.ts +1 -1
- package/src/hooks/useMessages.ts +1 -1
- package/src/hooks/useMutateChat.ts +1 -1
- package/src/hooks/useMutateConversation.ts +1 -1
- package/src/hooks/useMutateConversationName.ts +1 -1
- package/src/hooks/useMutateDeleteReaction.ts +1 -1
- package/src/hooks/useMutateExternalBlobs.ts +1 -1
- package/src/hooks/useMutateMeeting.ts +1 -1
- package/src/hooks/useMutateMembers.ts +1 -1
- package/src/hooks/useMutateMessage.ts +2 -1
- package/src/hooks/useMutatePinned.ts +1 -1
- package/src/hooks/useMutateReaction.ts +1 -1
- package/src/hooks/useMutateRead.ts +1 -1
- package/src/hooks/useMutateRemoveMembers.ts +1 -1
- package/src/hooks/useMutateTyping.ts +1 -1
- package/src/hooks/usePresence.ts +4 -0
- package/src/hooks/useSearchUsers.ts +1 -1
- package/src/hooks/useUser.ts +4 -3
- package/src/index.ts +2 -2
- package/src/types/Messenger.ts +1 -1
- package/src/types/types.ts +12 -9
- package/src/utils/scrollbarDetection.js +50 -0
- package/src/utils/styles.ts +21 -6
|
@@ -2,7 +2,6 @@ import React from "react";
|
|
|
2
2
|
export declare const MessengerContext: React.Context<MessengerContextProps>;
|
|
3
3
|
declare type Props = {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
options?: MessengerContextOptions;
|
|
6
5
|
};
|
|
7
|
-
declare const MessengerProvider: ({ children
|
|
6
|
+
declare const MessengerProvider: ({ children }: Props) => JSX.Element;
|
|
8
7
|
export default MessengerProvider;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import WeavyClient from "../client/WeavyClient";
|
|
2
|
+
export default function useUser(client: WeavyClient): import("react-query").UseQueryResult<UserType, unknown>;
|
|
@@ -1,29 +1,33 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
interface WeavyClient {
|
|
3
|
+
url: string;
|
|
4
|
+
tokenFactory: (() => string | Promise<string>);
|
|
5
|
+
subscribe: Function;
|
|
6
|
+
unsubscribe: Function;
|
|
7
|
+
}
|
|
2
8
|
declare type WeavyClientOptions = {
|
|
3
|
-
|
|
9
|
+
url: string;
|
|
4
10
|
tokenFactory: (() => string | Promise<string>);
|
|
5
11
|
};
|
|
6
12
|
declare type WeavyContextProps = {
|
|
7
|
-
client:
|
|
13
|
+
client: WeavyClient | null;
|
|
8
14
|
options?: WeavyContextOptions;
|
|
9
15
|
};
|
|
10
16
|
declare type WeavyContextOptions = {
|
|
11
17
|
zoomAuthenticationUrl?: string;
|
|
12
18
|
teamsAuthenticationUrl?: string;
|
|
13
19
|
enableCloudFiles?: boolean;
|
|
20
|
+
enableScrollbarDetection?: boolean;
|
|
14
21
|
filebrowserUrl?: string;
|
|
22
|
+
reactions?: string[];
|
|
15
23
|
};
|
|
16
24
|
declare type MessengerContextProps = {
|
|
17
|
-
options?: MessengerContextOptions;
|
|
18
25
|
selectedConversationId: null | number;
|
|
19
26
|
setSelectedConversationId: Function;
|
|
20
27
|
};
|
|
21
28
|
declare type UserContextProps = {
|
|
22
29
|
user: UserType;
|
|
23
30
|
};
|
|
24
|
-
declare type MessengerContextOptions = {
|
|
25
|
-
reactions?: string[];
|
|
26
|
-
};
|
|
27
31
|
declare type PreviewContextProps = {
|
|
28
32
|
openPreview: Function;
|
|
29
33
|
closePreview: Function;
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export declare function setPrefix(prefix: string): void;
|
|
6
6
|
/**
|
|
7
|
-
* Prefixes one or more classnames (with or without dot) using the themePrefix
|
|
7
|
+
* Prefixes one or more classnames (with or without dot or double dash) using the themePrefix
|
|
8
8
|
* @param {...string} strs
|
|
9
9
|
* @returns string[]
|
|
10
10
|
*/
|
|
11
11
|
export declare function prefixes(...strs: string[]): string[];
|
|
12
12
|
/**
|
|
13
|
-
* Prefixes
|
|
13
|
+
* Prefixes a classname string (containing one or multiple space-separated classnames, with or without dot or double dash) using the themePrefix
|
|
14
14
|
* @param {string} str
|
|
15
15
|
* @returns string
|
|
16
16
|
*/
|