stream-chat-react-native-core 5.13.0-beta.2 → 5.13.0-beta.4
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/components/MessageInput/AttachButton.js +4 -10
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +4 -10
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +7 -7
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/mock-builders/api/sendReaction.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +4 -10
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +4 -10
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +7 -7
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/mock-builders/api/sendReaction.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/offline-support/index.test.ts +13 -0
- package/src/__tests__/offline-support/offline-feature.js +686 -0
- package/src/__tests__/offline-support/optimistic-update.js +374 -0
- package/src/components/MessageInput/AttachButton.tsx +3 -4
- package/src/components/MessageInput/CommandsButton.tsx +3 -4
- package/src/components/MessageInput/SendButton.tsx +4 -3
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +120 -152
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +248 -248
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +182 -214
- package/src/version.json +1 -1
- package/lib/typescript/components/Attachment/__tests__/openUrlSafely.test.d.ts +0 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/__tests__/useChannelUpdated.test.d.ts +0 -1
- package/lib/typescript/components/ChannelPreview/__tests__/ChannelPreview.test.d.ts +0 -1
- package/lib/typescript/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.d.ts +0 -1
- package/lib/typescript/components/ChannelPreview/hooks/__tests__/useLatestMessagePreview.test.d.ts +0 -1
- package/lib/typescript/components/Chat/hooks/__tests__/useAppSettings.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/AnimatedVideoGallery.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGallery.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryFooter.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryGrid.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryGridHandle.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryHeader.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryOverlay.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/__tests__/ImageGalleryVideoControl.test.d.ts +0 -1
- package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +0 -1
- package/lib/typescript/components/Message/MessageSimple/__tests__/MessageTextContainer.test.d.ts +0 -1
- package/lib/typescript/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.d.ts +0 -1
- package/lib/typescript/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.d.ts +0 -1
- package/lib/typescript/components/MessageList/__tests__/useMessageList.test.d.ts +0 -1
- package/lib/typescript/components/MessageList/utils/__tests__/getDateSeparators.test.d.ts +0 -1
- package/lib/typescript/components/Reply/__tests__/Reply.test.d.ts +0 -1
- package/lib/typescript/contexts/__tests__/index.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/MessageInputContext.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/isValidMessage.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/pickFile.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/removeFile.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/removeImage.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/sendMessage.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/sendMessageAsync.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/updateMessage.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/uploadFile.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/uploadImage.test.d.ts +0 -1
- package/lib/typescript/contexts/messageInputContext/__tests__/useMessageDetailsForState.test.d.ts +0 -1
- package/lib/typescript/hooks/__tests__/useAppStateListener.test.d.ts +0 -1
- package/lib/typescript/hooks/__tests__/useTranslatedMessage.test.d.ts +0 -1
- package/lib/typescript/mock-builders/api/channelMocks.d.ts +0 -14
- package/lib/typescript/mock-builders/api/getOrCreateChannel.d.ts +0 -19
- package/lib/typescript/mock-builders/api/queryMembers.d.ts +0 -161
- package/lib/typescript/mock-builders/api/useMockedApis.d.ts +0 -1
- package/lib/typescript/mock-builders/api/utils.d.ts +0 -7
- package/lib/typescript/mock-builders/event/messageNew.d.ts +0 -2
- package/lib/typescript/mock-builders/event/messageRead.d.ts +0 -8
- package/lib/typescript/mock-builders/generator/attachment.d.ts +0 -10
- package/lib/typescript/mock-builders/generator/channel.d.ts +0 -120
- package/lib/typescript/mock-builders/generator/message.d.ts +0 -38
- package/lib/typescript/mock-builders/generator/user.d.ts +0 -30
- package/lib/typescript/mock-builders/mock.d.ts +0 -3
- package/lib/typescript/store/sqlite-utils/__tests__/createSelectQuery.test.d.ts +0 -1
- package/lib/typescript/utils/__tests__/patchMessageTextCommand.test.d.ts +0 -1
- package/src/__tests__/offline-feature.test.js +0 -675
- package/src/__tests__/optimistic-update.test.js +0 -369
- /package/src/mock-builders/api/{sendReaction.tsx → sendReaction.ts} +0 -0
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
export function queryMembersApi(members?: any): {
|
|
2
|
-
response: {
|
|
3
|
-
data: any;
|
|
4
|
-
status: number;
|
|
5
|
-
};
|
|
6
|
-
type: string;
|
|
7
|
-
};
|
|
8
|
-
export namespace ONE_CHANNEL_MEMBER_MOCK {
|
|
9
|
-
namespace okey {
|
|
10
|
-
const banned: boolean;
|
|
11
|
-
const channel_role: string;
|
|
12
|
-
const created_at: string;
|
|
13
|
-
const role: string;
|
|
14
|
-
const shadow_banned: boolean;
|
|
15
|
-
const updated_at: string;
|
|
16
|
-
namespace user {
|
|
17
|
-
const id: string;
|
|
18
|
-
const name: string;
|
|
19
|
-
}
|
|
20
|
-
const user_id: string;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export namespace GROUP_CHANNEL_MEMBERS_MOCK {
|
|
24
|
-
export namespace ben {
|
|
25
|
-
const banned_1: boolean;
|
|
26
|
-
export { banned_1 as banned };
|
|
27
|
-
const channel_role_1: string;
|
|
28
|
-
export { channel_role_1 as channel_role };
|
|
29
|
-
const created_at_1: string;
|
|
30
|
-
export { created_at_1 as created_at };
|
|
31
|
-
const role_1: string;
|
|
32
|
-
export { role_1 as role };
|
|
33
|
-
const shadow_banned_1: boolean;
|
|
34
|
-
export { shadow_banned_1 as shadow_banned };
|
|
35
|
-
const updated_at_1: string;
|
|
36
|
-
export { updated_at_1 as updated_at };
|
|
37
|
-
export namespace user_1 {
|
|
38
|
-
const id_1: string;
|
|
39
|
-
export { id_1 as id };
|
|
40
|
-
const name_1: string;
|
|
41
|
-
export { name_1 as name };
|
|
42
|
-
}
|
|
43
|
-
export { user_1 as user };
|
|
44
|
-
const user_id_1: string;
|
|
45
|
-
export { user_id_1 as user_id };
|
|
46
|
-
}
|
|
47
|
-
export namespace nick {
|
|
48
|
-
const banned_2: boolean;
|
|
49
|
-
export { banned_2 as banned };
|
|
50
|
-
const channel_role_2: string;
|
|
51
|
-
export { channel_role_2 as channel_role };
|
|
52
|
-
const created_at_2: string;
|
|
53
|
-
export { created_at_2 as created_at };
|
|
54
|
-
const role_2: string;
|
|
55
|
-
export { role_2 as role };
|
|
56
|
-
const shadow_banned_2: boolean;
|
|
57
|
-
export { shadow_banned_2 as shadow_banned };
|
|
58
|
-
const updated_at_2: string;
|
|
59
|
-
export { updated_at_2 as updated_at };
|
|
60
|
-
export namespace user_2 {
|
|
61
|
-
const id_2: string;
|
|
62
|
-
export { id_2 as id };
|
|
63
|
-
const name_2: string;
|
|
64
|
-
export { name_2 as name };
|
|
65
|
-
}
|
|
66
|
-
export { user_2 as user };
|
|
67
|
-
const user_id_2: string;
|
|
68
|
-
export { user_id_2 as user_id };
|
|
69
|
-
}
|
|
70
|
-
export namespace okey_1 {
|
|
71
|
-
const banned_3: boolean;
|
|
72
|
-
export { banned_3 as banned };
|
|
73
|
-
const channel_role_3: string;
|
|
74
|
-
export { channel_role_3 as channel_role };
|
|
75
|
-
const created_at_3: string;
|
|
76
|
-
export { created_at_3 as created_at };
|
|
77
|
-
const role_3: string;
|
|
78
|
-
export { role_3 as role };
|
|
79
|
-
const shadow_banned_3: boolean;
|
|
80
|
-
export { shadow_banned_3 as shadow_banned };
|
|
81
|
-
const updated_at_3: string;
|
|
82
|
-
export { updated_at_3 as updated_at };
|
|
83
|
-
export namespace user_3 {
|
|
84
|
-
const id_3: string;
|
|
85
|
-
export { id_3 as id };
|
|
86
|
-
const name_3: string;
|
|
87
|
-
export { name_3 as name };
|
|
88
|
-
}
|
|
89
|
-
export { user_3 as user };
|
|
90
|
-
const user_id_3: string;
|
|
91
|
-
export { user_id_3 as user_id };
|
|
92
|
-
}
|
|
93
|
-
export { okey_1 as okey };
|
|
94
|
-
export namespace qatest1 {
|
|
95
|
-
const banned_4: boolean;
|
|
96
|
-
export { banned_4 as banned };
|
|
97
|
-
const channel_role_4: string;
|
|
98
|
-
export { channel_role_4 as channel_role };
|
|
99
|
-
const created_at_4: string;
|
|
100
|
-
export { created_at_4 as created_at };
|
|
101
|
-
const role_4: string;
|
|
102
|
-
export { role_4 as role };
|
|
103
|
-
const shadow_banned_4: boolean;
|
|
104
|
-
export { shadow_banned_4 as shadow_banned };
|
|
105
|
-
const updated_at_4: string;
|
|
106
|
-
export { updated_at_4 as updated_at };
|
|
107
|
-
export namespace user_4 {
|
|
108
|
-
const id_4: string;
|
|
109
|
-
export { id_4 as id };
|
|
110
|
-
const name_4: string;
|
|
111
|
-
export { name_4 as name };
|
|
112
|
-
}
|
|
113
|
-
export { user_4 as user };
|
|
114
|
-
const user_id_4: string;
|
|
115
|
-
export { user_id_4 as user_id };
|
|
116
|
-
}
|
|
117
|
-
export namespace thierry {
|
|
118
|
-
const banned_5: boolean;
|
|
119
|
-
export { banned_5 as banned };
|
|
120
|
-
const channel_role_5: string;
|
|
121
|
-
export { channel_role_5 as channel_role };
|
|
122
|
-
const created_at_5: string;
|
|
123
|
-
export { created_at_5 as created_at };
|
|
124
|
-
const role_5: string;
|
|
125
|
-
export { role_5 as role };
|
|
126
|
-
const shadow_banned_5: boolean;
|
|
127
|
-
export { shadow_banned_5 as shadow_banned };
|
|
128
|
-
const updated_at_5: string;
|
|
129
|
-
export { updated_at_5 as updated_at };
|
|
130
|
-
export namespace user_5 {
|
|
131
|
-
const id_5: string;
|
|
132
|
-
export { id_5 as id };
|
|
133
|
-
const name_5: string;
|
|
134
|
-
export { name_5 as name };
|
|
135
|
-
}
|
|
136
|
-
export { user_5 as user };
|
|
137
|
-
const user_id_5: string;
|
|
138
|
-
export { user_id_5 as user_id };
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
export namespace ONE_MEMBER_WITH_EMPTY_USER_MOCK {
|
|
142
|
-
export namespace okey_2 {
|
|
143
|
-
const banned_6: boolean;
|
|
144
|
-
export { banned_6 as banned };
|
|
145
|
-
const channel_role_6: string;
|
|
146
|
-
export { channel_role_6 as channel_role };
|
|
147
|
-
const created_at_6: string;
|
|
148
|
-
export { created_at_6 as created_at };
|
|
149
|
-
const role_6: string;
|
|
150
|
-
export { role_6 as role };
|
|
151
|
-
const shadow_banned_6: boolean;
|
|
152
|
-
export { shadow_banned_6 as shadow_banned };
|
|
153
|
-
const updated_at_6: string;
|
|
154
|
-
export { updated_at_6 as updated_at };
|
|
155
|
-
const user_6: {};
|
|
156
|
-
export { user_6 as user };
|
|
157
|
-
const user_id_6: string;
|
|
158
|
-
export { user_id_6 as user_id };
|
|
159
|
-
}
|
|
160
|
-
export { okey_2 as okey };
|
|
161
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function useMockedApis(client: any, apiResponses: any): void;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export function generateAttachmentAction(a: any): any;
|
|
2
|
-
export function generateVideoAttachment(a: any): any;
|
|
3
|
-
export function generateImageAttachment(a: any): any;
|
|
4
|
-
export function generateImageUploadPreview(a: any): any;
|
|
5
|
-
export function generateAudioAttachment(a: any): any;
|
|
6
|
-
export function generateFileAttachment(a: any): any;
|
|
7
|
-
export function generateFileUploadPreview(a: any): any;
|
|
8
|
-
export function generateCardAttachment(a: any): any;
|
|
9
|
-
export function generateImgurAttachment(): any;
|
|
10
|
-
export function generateGiphyAttachment(): any;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
/// <reference types="jest" />
|
|
2
|
-
export declare const generateChannel: (customValues: {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}) => {
|
|
5
|
-
_client: {};
|
|
6
|
-
data: {
|
|
7
|
-
cid: string;
|
|
8
|
-
config: {
|
|
9
|
-
name: any;
|
|
10
|
-
type: any;
|
|
11
|
-
automod: string;
|
|
12
|
-
automod_behavior: string;
|
|
13
|
-
commands: {
|
|
14
|
-
args: string;
|
|
15
|
-
description: string;
|
|
16
|
-
name: string;
|
|
17
|
-
set: string;
|
|
18
|
-
}[];
|
|
19
|
-
connect_events: boolean;
|
|
20
|
-
created_at: string;
|
|
21
|
-
max_message_length: number;
|
|
22
|
-
message_retention: string;
|
|
23
|
-
mutes: boolean;
|
|
24
|
-
reactions: boolean;
|
|
25
|
-
read_events: boolean;
|
|
26
|
-
replies: boolean;
|
|
27
|
-
search: boolean;
|
|
28
|
-
typing_events: boolean;
|
|
29
|
-
updated_at: string;
|
|
30
|
-
uploads: boolean;
|
|
31
|
-
url_enrichment: boolean;
|
|
32
|
-
};
|
|
33
|
-
created_at: string;
|
|
34
|
-
created_by: {
|
|
35
|
-
banned: boolean;
|
|
36
|
-
created_at: string;
|
|
37
|
-
id: string;
|
|
38
|
-
image: string;
|
|
39
|
-
name: string;
|
|
40
|
-
online: boolean;
|
|
41
|
-
role: string;
|
|
42
|
-
updated_at: string;
|
|
43
|
-
};
|
|
44
|
-
frozen: boolean;
|
|
45
|
-
id: any;
|
|
46
|
-
own_capabilities: string[];
|
|
47
|
-
type: any;
|
|
48
|
-
updated_at: string;
|
|
49
|
-
};
|
|
50
|
-
id: any;
|
|
51
|
-
state: {
|
|
52
|
-
members: {};
|
|
53
|
-
messages: never[];
|
|
54
|
-
setIsUpToDate: jest.Mock<any, any>;
|
|
55
|
-
};
|
|
56
|
-
type: any;
|
|
57
|
-
};
|
|
58
|
-
export declare const generateChannelResponse: (customValues?: {
|
|
59
|
-
channel?: Record<string, any>;
|
|
60
|
-
id?: string;
|
|
61
|
-
messages?: Record<string, any>[];
|
|
62
|
-
type?: string;
|
|
63
|
-
}) => {
|
|
64
|
-
channel: {
|
|
65
|
-
id: string;
|
|
66
|
-
type: string;
|
|
67
|
-
user: {
|
|
68
|
-
banned: boolean;
|
|
69
|
-
created_at: string;
|
|
70
|
-
id: string;
|
|
71
|
-
image: string;
|
|
72
|
-
name: string;
|
|
73
|
-
online: boolean;
|
|
74
|
-
role: string;
|
|
75
|
-
updated_at: string;
|
|
76
|
-
};
|
|
77
|
-
cid: string;
|
|
78
|
-
config: {
|
|
79
|
-
name: any;
|
|
80
|
-
type: any;
|
|
81
|
-
automod: string;
|
|
82
|
-
automod_behavior: string;
|
|
83
|
-
commands: {
|
|
84
|
-
args: string;
|
|
85
|
-
description: string;
|
|
86
|
-
name: string;
|
|
87
|
-
set: string;
|
|
88
|
-
}[];
|
|
89
|
-
connect_events: boolean;
|
|
90
|
-
created_at: string;
|
|
91
|
-
max_message_length: number;
|
|
92
|
-
message_retention: string;
|
|
93
|
-
mutes: boolean;
|
|
94
|
-
reactions: boolean;
|
|
95
|
-
read_events: boolean;
|
|
96
|
-
replies: boolean;
|
|
97
|
-
search: boolean;
|
|
98
|
-
typing_events: boolean;
|
|
99
|
-
updated_at: string;
|
|
100
|
-
uploads: boolean;
|
|
101
|
-
url_enrichment: boolean;
|
|
102
|
-
};
|
|
103
|
-
created_at: string;
|
|
104
|
-
created_by: {
|
|
105
|
-
banned: boolean;
|
|
106
|
-
created_at: string;
|
|
107
|
-
id: string;
|
|
108
|
-
image: string;
|
|
109
|
-
name: string;
|
|
110
|
-
online: boolean;
|
|
111
|
-
role: string;
|
|
112
|
-
updated_at: string;
|
|
113
|
-
};
|
|
114
|
-
frozen: boolean;
|
|
115
|
-
own_capabilities: string[];
|
|
116
|
-
updated_at: string;
|
|
117
|
-
};
|
|
118
|
-
members: never[];
|
|
119
|
-
messages: Record<string, any>[];
|
|
120
|
-
};
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
export function generateMessage(options?: {}): {
|
|
2
|
-
attachments: never[];
|
|
3
|
-
created_at: any;
|
|
4
|
-
html: string;
|
|
5
|
-
id: string;
|
|
6
|
-
text: string;
|
|
7
|
-
type: string;
|
|
8
|
-
updated_at: any;
|
|
9
|
-
user: {
|
|
10
|
-
banned: boolean;
|
|
11
|
-
created_at: string;
|
|
12
|
-
id: string;
|
|
13
|
-
image: string;
|
|
14
|
-
name: string;
|
|
15
|
-
online: boolean;
|
|
16
|
-
role: string;
|
|
17
|
-
updated_at: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
export function generateStaticMessage(seed: any, options: any, date: any): {
|
|
21
|
-
attachments: never[];
|
|
22
|
-
created_at: any;
|
|
23
|
-
html: string;
|
|
24
|
-
id: string;
|
|
25
|
-
text: string;
|
|
26
|
-
type: string;
|
|
27
|
-
updated_at: any;
|
|
28
|
-
user: {
|
|
29
|
-
banned: boolean;
|
|
30
|
-
created_at: string;
|
|
31
|
-
id: string;
|
|
32
|
-
image: string;
|
|
33
|
-
name: string;
|
|
34
|
-
online: boolean;
|
|
35
|
-
role: string;
|
|
36
|
-
updated_at: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
export function getUserDefaults(): {
|
|
2
|
-
banned: boolean;
|
|
3
|
-
created_at: string;
|
|
4
|
-
id: string;
|
|
5
|
-
image: string;
|
|
6
|
-
name: string;
|
|
7
|
-
online: boolean;
|
|
8
|
-
role: string;
|
|
9
|
-
updated_at: string;
|
|
10
|
-
};
|
|
11
|
-
export function generateUser(options?: {}): {
|
|
12
|
-
banned: boolean;
|
|
13
|
-
created_at: string;
|
|
14
|
-
id: string;
|
|
15
|
-
image: string;
|
|
16
|
-
name: string;
|
|
17
|
-
online: boolean;
|
|
18
|
-
role: string;
|
|
19
|
-
updated_at: string;
|
|
20
|
-
};
|
|
21
|
-
export function generateStaticUser(userNumber: any): {
|
|
22
|
-
banned: boolean;
|
|
23
|
-
created_at: string;
|
|
24
|
-
id: string;
|
|
25
|
-
image: string;
|
|
26
|
-
name: string;
|
|
27
|
-
online: boolean;
|
|
28
|
-
role: string;
|
|
29
|
-
updated_at: string;
|
|
30
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|