@sendbird/uikit-chat-hooks 3.6.0 → 3.7.1
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/lib/commonjs/channel/useGroupChannelList/index.js +1 -1
- package/lib/commonjs/channel/useGroupChannelList/index.js.map +1 -1
- package/lib/commonjs/channel/useGroupChannelList/useGroupChannelListWithCollection.js +4 -0
- package/lib/commonjs/channel/useGroupChannelList/useGroupChannelListWithCollection.js.map +1 -1
- package/lib/commonjs/channel/useGroupChannelList/useGroupChannelListWithQuery.js +4 -0
- package/lib/commonjs/channel/useGroupChannelList/useGroupChannelListWithQuery.js.map +1 -1
- package/lib/commonjs/channel/useGroupChannelMessages/index.js +1 -1
- package/lib/commonjs/channel/useGroupChannelMessages/index.js.map +1 -1
- package/lib/commonjs/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.js +4 -0
- package/lib/commonjs/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.js.map +1 -1
- package/lib/commonjs/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.js +4 -0
- package/lib/commonjs/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.js.map +1 -1
- package/lib/commonjs/handler/useChannelHandler.js +3 -0
- package/lib/commonjs/handler/useChannelHandler.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/module/channel/useGroupChannelList/index.js +1 -1
- package/lib/module/channel/useGroupChannelList/index.js.map +1 -1
- package/lib/module/channel/useGroupChannelList/useGroupChannelListWithCollection.js +4 -0
- package/lib/module/channel/useGroupChannelList/useGroupChannelListWithCollection.js.map +1 -1
- package/lib/module/channel/useGroupChannelList/useGroupChannelListWithQuery.js +4 -0
- package/lib/module/channel/useGroupChannelList/useGroupChannelListWithQuery.js.map +1 -1
- package/lib/module/channel/useGroupChannelMessages/index.js +1 -1
- package/lib/module/channel/useGroupChannelMessages/index.js.map +1 -1
- package/lib/module/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.js +4 -0
- package/lib/module/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.js.map +1 -1
- package/lib/module/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.js +4 -0
- package/lib/module/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.js.map +1 -1
- package/lib/module/handler/useChannelHandler.js +3 -0
- package/lib/module/handler/useChannelHandler.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/typescript/src/channel/useGroupChannelList/index.d.ts +1 -1
- package/lib/typescript/src/channel/useGroupChannelList/useGroupChannelListWithCollection.d.ts +3 -0
- package/lib/typescript/src/channel/useGroupChannelList/useGroupChannelListWithQuery.d.ts +3 -0
- package/lib/typescript/src/channel/useGroupChannelMessages/index.d.ts +1 -1
- package/lib/typescript/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.d.ts +3 -0
- package/lib/typescript/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.d.ts +3 -0
- package/lib/typescript/src/handler/useChannelHandler.d.ts +3 -0
- package/lib/typescript/src/types.d.ts +2 -2
- package/package.json +6 -6
- package/src/channel/useGroupChannelList/index.ts +1 -1
- package/src/channel/useGroupChannelList/useGroupChannelListWithCollection.ts +3 -0
- package/src/channel/useGroupChannelList/useGroupChannelListWithQuery.ts +3 -0
- package/src/channel/useGroupChannelMessages/index.ts +1 -1
- package/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithCollection.ts +3 -0
- package/src/channel/useGroupChannelMessages/useGroupChannelMessagesWithQuery.ts +3 -0
- package/src/handler/useChannelHandler.ts +3 -0
- package/src/types.ts +2 -2
|
@@ -2,5 +2,8 @@ import { GroupChannelHandler } from '@sendbird/chat/groupChannel';
|
|
|
2
2
|
import { OpenChannelHandler } from '@sendbird/chat/openChannel';
|
|
3
3
|
import type { SendbirdChatSDK } from '@sendbird/uikit-utils';
|
|
4
4
|
type ChannelType = 'open' | 'group';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
7
|
+
* */
|
|
5
8
|
export declare const useChannelHandler: <T extends ChannelType = "group">(sdk: SendbirdChatSDK, handlerId: string, hookHandler: Partial<T extends "group" ? GroupChannelHandler : OpenChannelHandler>, type?: T) => void;
|
|
6
9
|
export {};
|
|
@@ -13,7 +13,7 @@ export interface CustomBidirectionalQueryInterface<Data> {
|
|
|
13
13
|
hasPrev: () => boolean;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
16
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
17
17
|
*
|
|
18
18
|
* @interface UseGroupChannelList
|
|
19
19
|
* @description interface for group channel list hook
|
|
@@ -50,7 +50,7 @@ export type UseGroupChannelListOptions = {
|
|
|
50
50
|
enableCollectionWithoutLocalCache?: boolean;
|
|
51
51
|
};
|
|
52
52
|
/**
|
|
53
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
53
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
54
54
|
*
|
|
55
55
|
* @interface UseGroupChannelMessages
|
|
56
56
|
* @description interface for group channel messages hook
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendbird/uikit-chat-hooks",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.1",
|
|
4
4
|
"description": "A set of React hooks for integrating Sendbird chat functionality into your React app.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sendbird",
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@sendbird/uikit-utils": "3.
|
|
48
|
+
"@sendbird/uikit-utils": "3.7.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@sendbird/uikit-testing-tools": "3.
|
|
51
|
+
"@sendbird/uikit-testing-tools": "3.7.1",
|
|
52
52
|
"@types/react": "*",
|
|
53
|
-
"react": "
|
|
53
|
+
"react": "18.2.0",
|
|
54
54
|
"react-native-builder-bob": "^0.18.0",
|
|
55
55
|
"typescript": "5.2.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@sendbird/chat": "^4.
|
|
58
|
+
"@sendbird/chat": "^4.12.9",
|
|
59
59
|
"react": ">=16.13.1"
|
|
60
60
|
},
|
|
61
61
|
"react-native-builder-bob": {
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
]
|
|
73
73
|
]
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "9d1b5148c4af415c985566bddb45a20c97b365fd"
|
|
76
76
|
}
|
|
@@ -5,7 +5,7 @@ import { useGroupChannelListWithCollection } from './useGroupChannelListWithColl
|
|
|
5
5
|
import { useGroupChannelListWithQuery } from './useGroupChannelListWithQuery';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
8
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
9
9
|
* */
|
|
10
10
|
export const useGroupChannelList: UseGroupChannelList = (sdk, userId, options) => {
|
|
11
11
|
if (sdk.isCacheEnabled || options?.enableCollectionWithoutLocalCache) {
|
|
@@ -26,6 +26,9 @@ const createGroupChannelListCollection = (
|
|
|
26
26
|
});
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
31
|
+
* */
|
|
29
32
|
export const useGroupChannelListWithCollection: UseGroupChannelList = (sdk, userId, options) => {
|
|
30
33
|
const handlerId = useUniqHandlerId('useGroupChannelListWithCollection');
|
|
31
34
|
const { deliveryReceiptEnabled } = useAppFeatures(sdk);
|
|
@@ -23,6 +23,9 @@ const createGroupChannelListQuery = (
|
|
|
23
23
|
});
|
|
24
24
|
};
|
|
25
25
|
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
28
|
+
* */
|
|
26
29
|
export const useGroupChannelListWithQuery: UseGroupChannelList = (sdk, userId, options) => {
|
|
27
30
|
const { deliveryReceiptEnabled } = useAppFeatures(sdk);
|
|
28
31
|
const queryRef = useRef<SendbirdGroupChannelListQuery>();
|
|
@@ -5,7 +5,7 @@ import { useGroupChannelMessagesWithCollection } from './useGroupChannelMessages
|
|
|
5
5
|
import { useGroupChannelMessagesWithQuery } from './useGroupChannelMessagesWithQuery';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
8
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
9
9
|
* */
|
|
10
10
|
export const useGroupChannelMessages: UseGroupChannelMessages = (sdk, channel, userId, options) => {
|
|
11
11
|
if (sdk.isCacheEnabled || options?.enableCollectionWithoutLocalCache) {
|
|
@@ -46,6 +46,9 @@ function shouldUseSearchLimit(startingPoint: number) {
|
|
|
46
46
|
return startingPoint < Date.now();
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
51
|
+
* */
|
|
49
52
|
export const useGroupChannelMessagesWithCollection: UseGroupChannelMessages = (sdk, channel, userId, options) => {
|
|
50
53
|
const initialStartingPoint = options?.startingPoint ?? Number.MAX_SAFE_INTEGER;
|
|
51
54
|
const initialLimit = shouldUseSearchLimit(initialStartingPoint) ? MESSAGE_LIMIT.SEARCH : MESSAGE_LIMIT.DEFAULT;
|
|
@@ -31,6 +31,9 @@ const createMessageQuery = (channel: SendbirdGroupChannel, options?: UseGroupCha
|
|
|
31
31
|
return channel.createPreviousMessageListQuery(params);
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
36
|
+
* */
|
|
34
37
|
export const useGroupChannelMessagesWithQuery: UseGroupChannelMessages = (sdk, channel, userId, options) => {
|
|
35
38
|
const queryRef = useRef<SendbirdPreviousMessageListQuery>();
|
|
36
39
|
const handlerId = useUniqHandlerId('useGroupChannelMessagesWithQuery');
|
|
@@ -6,6 +6,9 @@ import type { SendbirdChatSDK } from '@sendbird/uikit-utils';
|
|
|
6
6
|
|
|
7
7
|
type ChannelType = 'open' | 'group';
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
11
|
+
* */
|
|
9
12
|
export const useChannelHandler = <T extends ChannelType = 'group'>(
|
|
10
13
|
sdk: SendbirdChatSDK,
|
|
11
14
|
handlerId: string,
|
package/src/types.ts
CHANGED
|
@@ -33,7 +33,7 @@ export interface CustomBidirectionalQueryInterface<Data> {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/**
|
|
36
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
36
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
37
37
|
*
|
|
38
38
|
* @interface UseGroupChannelList
|
|
39
39
|
* @description interface for group channel list hook
|
|
@@ -75,7 +75,7 @@ export type UseGroupChannelListOptions = {
|
|
|
75
75
|
};
|
|
76
76
|
|
|
77
77
|
/**
|
|
78
|
-
* @deprecated This hook is deprecated and will be replaced by the 'uikit-tools' package.
|
|
78
|
+
* @deprecated This hook is deprecated and will be replaced by the '@sendbird/uikit-tools' package.
|
|
79
79
|
*
|
|
80
80
|
* @interface UseGroupChannelMessages
|
|
81
81
|
* @description interface for group channel messages hook
|