stream-chat-react-native-core 4.8.0-beta.1 → 4.9.0-beta.2

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.
Files changed (103) hide show
  1. package/lib/commonjs/components/Attachment/GallaryImage.js +41 -0
  2. package/lib/commonjs/components/Attachment/GallaryImage.js.map +1 -0
  3. package/lib/commonjs/components/Attachment/Gallery.js +101 -36
  4. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/Giphy.js +118 -25
  6. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  7. package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js +105 -0
  8. package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -0
  9. package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js +58 -0
  10. package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js.map +1 -0
  11. package/lib/commonjs/components/Attachment/hooks/useLoadingImage.js +32 -0
  12. package/lib/commonjs/components/Attachment/hooks/useLoadingImage.js.map +1 -0
  13. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +3 -2
  14. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  15. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
  16. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  17. package/lib/commonjs/components/Channel/Channel.js +23 -13
  18. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  19. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +4 -0
  20. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  21. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +43 -19
  22. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  23. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +20 -19
  24. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  25. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +14 -15
  26. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  27. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
  28. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  29. package/lib/commonjs/contexts/themeContext/utils/theme.js +4 -0
  30. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  31. package/lib/commonjs/mock-builders/api/channelMocks.js +299 -0
  32. package/lib/commonjs/mock-builders/api/channelMocks.js.map +1 -0
  33. package/lib/commonjs/version.json +1 -1
  34. package/lib/module/components/Attachment/GallaryImage.js +41 -0
  35. package/lib/module/components/Attachment/GallaryImage.js.map +1 -0
  36. package/lib/module/components/Attachment/Gallery.js +101 -36
  37. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  38. package/lib/module/components/Attachment/Giphy.js +118 -25
  39. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  40. package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js +105 -0
  41. package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -0
  42. package/lib/module/components/Attachment/ImageLoadingIndicator.js +58 -0
  43. package/lib/module/components/Attachment/ImageLoadingIndicator.js.map +1 -0
  44. package/lib/module/components/Attachment/hooks/useLoadingImage.js +32 -0
  45. package/lib/module/components/Attachment/hooks/useLoadingImage.js.map +1 -0
  46. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +3 -2
  47. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  48. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +1 -1
  49. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  50. package/lib/module/components/Channel/Channel.js +23 -13
  51. package/lib/module/components/Channel/Channel.js.map +1 -1
  52. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +4 -0
  53. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  54. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +43 -19
  55. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  56. package/lib/module/components/MessageInput/FileUploadPreview.js +20 -19
  57. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  58. package/lib/module/components/MessageInput/ImageUploadPreview.js +14 -15
  59. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  60. package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
  61. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  62. package/lib/module/contexts/themeContext/utils/theme.js +4 -0
  63. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  64. package/lib/module/mock-builders/api/channelMocks.js +299 -0
  65. package/lib/module/mock-builders/api/channelMocks.js.map +1 -0
  66. package/lib/module/version.json +1 -1
  67. package/lib/typescript/components/Attachment/GallaryImage.d.ts +5 -0
  68. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
  69. package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
  70. package/lib/typescript/components/Attachment/ImageLoadingFailedIndicator.d.ts +3 -0
  71. package/lib/typescript/components/Attachment/ImageLoadingIndicator.d.ts +3 -0
  72. package/lib/typescript/components/Attachment/hooks/useLoadingImage.d.ts +7 -0
  73. package/lib/typescript/components/Channel/Channel.d.ts +1 -1
  74. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  75. package/lib/typescript/components/ChannelPreview/hooks/__tests__/useLatestMessagePreview.test.d.ts +1 -0
  76. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +10 -0
  77. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +4 -0
  78. package/lib/typescript/mock-builders/api/channelMocks.d.ts +14 -0
  79. package/package.json +1 -1
  80. package/src/components/Attachment/GallaryImage.tsx +22 -0
  81. package/src/components/Attachment/Gallery.tsx +68 -35
  82. package/src/components/Attachment/Giphy.tsx +68 -1
  83. package/src/components/Attachment/ImageLoadingFailedIndicator.tsx +56 -0
  84. package/src/components/Attachment/ImageLoadingIndicator.tsx +31 -0
  85. package/src/components/Attachment/__tests__/Attachment.test.js +9 -3
  86. package/src/components/Attachment/__tests__/Gallery.test.js +36 -1
  87. package/src/components/Attachment/__tests__/Giphy.test.js +110 -90
  88. package/src/components/Attachment/hooks/useLoadingImage.tsx +8 -0
  89. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +2 -1
  90. package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +1 -1
  91. package/src/components/Channel/Channel.tsx +8 -0
  92. package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -0
  93. package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +0 -1
  94. package/src/components/ChannelPreview/hooks/__tests__/useLatestMessagePreview.test.tsx +145 -0
  95. package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +50 -24
  96. package/src/components/MessageInput/FileUploadPreview.tsx +5 -4
  97. package/src/components/MessageInput/ImageUploadPreview.tsx +2 -3
  98. package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +1 -0
  99. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +1 -0
  100. package/src/contexts/messagesContext/MessagesContext.tsx +15 -0
  101. package/src/contexts/themeContext/utils/theme.ts +8 -0
  102. package/src/mock-builders/api/channelMocks.tsx +272 -0
  103. package/src/version.json +1 -1
@@ -0,0 +1,299 @@
1
+ Object.defineProperty(exports, "__esModule", {
2
+ value: true
3
+ });
4
+ exports.LATEST_MESSAGE = exports.FORMATTED_MESSAGE = exports.CHANNEL_WITH_NO_MESSAGES = exports.CHANNEL_WITH_MESSAGES_TEXT = exports.CHANNEL_WITH_MESSAGES_COMMAND = exports.CHANNEL_WITH_MESSAGES_ATTACHMENTS = exports.CHANNEL_WITH_MESSAGES = exports.CHANNEL_WITH_MENTIONED_USERS = exports.CHANNEL_WITH_EMPTY_MESSAGE = exports.CHANNEL_WITH_DELETED_MESSAGES = exports.CHANNEL = void 0;
5
+
6
+ var _queryMembers = require("../../mock-builders/api/queryMembers");
7
+
8
+ var channelName = 'okechukwu';
9
+ var CHANNEL = {
10
+ data: {
11
+ name: channelName
12
+ },
13
+ state: {
14
+ messages: []
15
+ }
16
+ };
17
+ exports.CHANNEL = CHANNEL;
18
+ var CHANNEL_WITH_MESSAGES_TEXT = {
19
+ data: {
20
+ name: channelName
21
+ },
22
+ state: {
23
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
24
+ messages: [{
25
+ args: 'string',
26
+ attachments: [],
27
+ channel: CHANNEL,
28
+ cid: 'stridkncnng',
29
+ command: 'giphy',
30
+ command_info: {
31
+ name: 'string'
32
+ },
33
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
34
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
35
+ id: 'ljkblk',
36
+ text: 'jkbkbiubicbi',
37
+ type: 'MessageLabel',
38
+ user: {
39
+ id: 'okechukwu'
40
+ }
41
+ }, {
42
+ args: 'string',
43
+ attachments: [],
44
+ channel: CHANNEL,
45
+ cid: 'stridodong',
46
+ command: 'giphy',
47
+ command_info: {
48
+ name: 'string'
49
+ },
50
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
51
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
52
+ id: 'jbkjb',
53
+ text: 'jkbkbiubicbi',
54
+ type: 'MessageLabel',
55
+ user: {
56
+ id: 'okechukwu'
57
+ }
58
+ }]
59
+ }
60
+ };
61
+ exports.CHANNEL_WITH_MESSAGES_TEXT = CHANNEL_WITH_MESSAGES_TEXT;
62
+ var CHANNEL_WITH_DELETED_MESSAGES = {
63
+ data: {
64
+ name: channelName
65
+ },
66
+ state: {
67
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
68
+ messages: [{
69
+ type: 'deleted'
70
+ }, {
71
+ type: 'deleted'
72
+ }]
73
+ }
74
+ };
75
+ exports.CHANNEL_WITH_DELETED_MESSAGES = CHANNEL_WITH_DELETED_MESSAGES;
76
+ var CHANNEL_WITH_NO_MESSAGES = {
77
+ data: {
78
+ name: channelName
79
+ },
80
+ state: {
81
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
82
+ messages: []
83
+ }
84
+ };
85
+ exports.CHANNEL_WITH_NO_MESSAGES = CHANNEL_WITH_NO_MESSAGES;
86
+ var CHANNEL_WITH_MESSAGE_COMMAND = {
87
+ data: {
88
+ name: channelName
89
+ },
90
+ state: {
91
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
92
+ messages: [{
93
+ args: 'string',
94
+ attachments: [],
95
+ channel: CHANNEL,
96
+ cid: 'stridkncnng',
97
+ command: 'giphy',
98
+ command_info: {
99
+ name: 'string'
100
+ },
101
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
102
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
103
+ id: 'ljkblk',
104
+ user: {
105
+ id: 'okechukwu'
106
+ }
107
+ }, {
108
+ args: 'string',
109
+ attachments: [],
110
+ channel: CHANNEL,
111
+ cid: 'stridodong',
112
+ command: 'giphy',
113
+ command_info: {
114
+ name: 'string'
115
+ },
116
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
117
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
118
+ id: 'jbkjb',
119
+ user: {
120
+ id: 'okechukwu'
121
+ }
122
+ }]
123
+ }
124
+ };
125
+ exports.CHANNEL_WITH_MESSAGES_COMMAND = CHANNEL_WITH_MESSAGE_COMMAND;
126
+ var CHANNEL_WITH_MESSAGES_ATTACHMENTS = {
127
+ data: {
128
+ name: channelName
129
+ },
130
+ state: {
131
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
132
+ messages: [{
133
+ args: 'string',
134
+ attachments: [{
135
+ actions: [],
136
+ asset_url: 'string',
137
+ author_icon: 'string',
138
+ author_link: 'string',
139
+ author_name: 'string',
140
+ color: 'string',
141
+ fallback: 'string',
142
+ fields: [],
143
+ file_size: 25,
144
+ footer: 'string',
145
+ footer_icon: 'string',
146
+ image_url: 'string',
147
+ mime_type: 'string',
148
+ og_scrape_url: 'string',
149
+ original_height: 5,
150
+ original_width: 4,
151
+ pretext: 'string',
152
+ text: 'string',
153
+ thumb_url: 'string',
154
+ title: 'string',
155
+ title_link: 'string',
156
+ type: 'string'
157
+ }],
158
+ channel: CHANNEL,
159
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
160
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
161
+ id: 'ljkblk',
162
+ user: {
163
+ id: 'okechukwu'
164
+ }
165
+ }]
166
+ }
167
+ };
168
+ exports.CHANNEL_WITH_MESSAGES_ATTACHMENTS = CHANNEL_WITH_MESSAGES_ATTACHMENTS;
169
+ var LATEST_MESSAGE = {
170
+ args: 'string',
171
+ attachments: [],
172
+ channel: CHANNEL,
173
+ cid: 'string',
174
+ command: 'giphy',
175
+ command_info: {
176
+ name: 'string'
177
+ },
178
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
179
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
180
+ id: 'string',
181
+ text: 'jkbkbiubicbi',
182
+ type: 'MessageLabel',
183
+ user: {
184
+ id: 'okechukwu'
185
+ }
186
+ };
187
+ exports.LATEST_MESSAGE = LATEST_MESSAGE;
188
+ var FORMATTED_MESSAGE = {
189
+ created_at: new Date('2021-02-12T12:12:35.862282Z'),
190
+ id: '',
191
+ message: {},
192
+ pinned_at: new Date('2021-02-12T12:12:35.862282Z'),
193
+ status: 'received',
194
+ updated_at: new Date('2021-02-12T12:12:35.862282Z')
195
+ };
196
+ exports.FORMATTED_MESSAGE = FORMATTED_MESSAGE;
197
+ var CHANNEL_WITH_MENTIONED_USERS = {
198
+ state: {
199
+ members: _queryMembers.ONE_MEMBER_WITH_EMPTY_USER_MOCK,
200
+ messages: [{
201
+ args: 'string',
202
+ attachments: [],
203
+ cid: 'stridkncnng',
204
+ command_info: {
205
+ name: 'string'
206
+ },
207
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
208
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
209
+ mentioned_users: [{
210
+ id: 'Max',
211
+ name: 'Max'
212
+ }, {
213
+ id: 'Ada',
214
+ name: 'Ada'
215
+ }, {
216
+ id: 'Enzo',
217
+ name: 'Enzo'
218
+ }],
219
+ text: 'Max'
220
+ }, {
221
+ args: 'string',
222
+ attachments: [],
223
+ cid: 'stridodong',
224
+ command_info: {
225
+ name: 'string'
226
+ },
227
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
228
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
229
+ mentioned_users: [{
230
+ id: 'Max',
231
+ name: 'Max'
232
+ }, {
233
+ id: 'Ada',
234
+ name: 'Ada'
235
+ }, {
236
+ id: 'Enzo',
237
+ name: 'Enzo'
238
+ }],
239
+ text: 'Max'
240
+ }]
241
+ }
242
+ };
243
+ exports.CHANNEL_WITH_MENTIONED_USERS = CHANNEL_WITH_MENTIONED_USERS;
244
+ var CHANNEL_WITH_EMPTY_MESSAGE = {
245
+ state: {
246
+ members: _queryMembers.ONE_MEMBER_WITH_EMPTY_USER_MOCK,
247
+ messages: [{
248
+ args: 'string',
249
+ attachments: [],
250
+ cid: 'stridkncnng',
251
+ command_info: {
252
+ name: 'string'
253
+ },
254
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
255
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
256
+ mentioned_users: [{
257
+ id: 'Max',
258
+ name: 'Max'
259
+ }, {
260
+ id: 'Ada',
261
+ name: 'Ada'
262
+ }, {
263
+ id: 'Enzo',
264
+ name: 'Enzo'
265
+ }]
266
+ }, {
267
+ args: 'string',
268
+ attachments: [],
269
+ cid: 'stridodong',
270
+ command_info: {
271
+ name: 'string'
272
+ },
273
+ created_at: new Date('2021-02-12T12:12:35.862Z'),
274
+ deleted_at: new Date('2021-02-12T12:12:35.862Z'),
275
+ mentioned_users: [{
276
+ id: 'Max',
277
+ name: 'Max'
278
+ }, {
279
+ id: 'Ada',
280
+ name: 'Ada'
281
+ }, {
282
+ id: 'Enzo',
283
+ name: 'Enzo'
284
+ }]
285
+ }]
286
+ }
287
+ };
288
+ exports.CHANNEL_WITH_EMPTY_MESSAGE = CHANNEL_WITH_EMPTY_MESSAGE;
289
+ var CHANNEL_WITH_MESSAGES = {
290
+ data: {
291
+ name: channelName
292
+ },
293
+ state: {
294
+ members: _queryMembers.GROUP_CHANNEL_MEMBERS_MOCK,
295
+ messages: [FORMATTED_MESSAGE, FORMATTED_MESSAGE]
296
+ }
297
+ };
298
+ exports.CHANNEL_WITH_MESSAGES = CHANNEL_WITH_MESSAGES;
299
+ //# sourceMappingURL=channelMocks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["channelMocks.tsx"],"names":["channelName","CHANNEL","data","name","state","messages","CHANNEL_WITH_MESSAGES_TEXT","members","GROUP_CHANNEL_MEMBERS_MOCK","args","attachments","channel","cid","command","command_info","created_at","Date","deleted_at","id","text","type","user","CHANNEL_WITH_DELETED_MESSAGES","CHANNEL_WITH_NO_MESSAGES","CHANNEL_WITH_MESSAGE_COMMAND","CHANNEL_WITH_MESSAGES_ATTACHMENTS","actions","asset_url","author_icon","author_link","author_name","color","fallback","fields","file_size","footer","footer_icon","image_url","mime_type","og_scrape_url","original_height","original_width","pretext","thumb_url","title","title_link","LATEST_MESSAGE","FORMATTED_MESSAGE","message","pinned_at","status","updated_at","CHANNEL_WITH_MENTIONED_USERS","ONE_MEMBER_WITH_EMPTY_USER_MOCK","mentioned_users","CHANNEL_WITH_EMPTY_MESSAGE","CHANNEL_WITH_MESSAGES"],"mappings":";;;;;AAQA;;AAOA,IAAMA,WAAW,GAAG,WAApB;AACA,IAAMC,OAAO,GAAG;AACdC,EAAAA,IAAI,EAAE;AAAEC,IAAAA,IAAI,EAAEH;AAAR,GADQ;AAEdI,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EpC,QAAAA,EAAE,EAAE,KAAN;AAAaf,QAAAA,IAAI,EAAE;AAAnB,OADe,EAEf;AAAEe,QAAAA,EAAE,EAAE,KAAN;AAAaf,QAAAA,IAAI,EAAE;AAAnB,OAFe,EAGf;AAAEe,QAAAA,EAAE,EAAE,MAAN;AAAcf,QAAAA,IAAI,EAAE;AAApB,OAHe;AAPnB,KAdQ;AAFL;AAD0B,CAAnC;;AAkCA,IAAMqD,qBAAqB,GAAG;AAC5BtD,EAAAA,IAAI,EAAE;AAAEC,IAAAA,IAAI,EAAEH;AAAR,GADsB;AAE5BI,EAAAA,KAAK,EAAE;AACLG,IAAAA,OAAO,EAAEC,wCADJ;AAELH,IAAAA,QAAQ,EAAE,CAAC0C,iBAAD,EAAoBA,iBAApB;AAFL;AAFqB,CAA9B","sourcesContent":["import type {\n Attachment,\n Channel,\n FormatMessageResponse,\n MessageResponse,\n UserResponse,\n} from 'stream-chat';\n\nimport {\n GROUP_CHANNEL_MEMBERS_MOCK,\n ONE_MEMBER_WITH_EMPTY_USER_MOCK,\n} from '../../mock-builders/api/queryMembers';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\nconst channelName = 'okechukwu';\nconst CHANNEL = {\n data: { name: channelName },\n state: { messages: [] },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_MESSAGES_TEXT = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [\n {\n args: 'string',\n attachments: [],\n channel: CHANNEL,\n cid: 'stridkncnng',\n command: 'giphy',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'ljkblk',\n text: 'jkbkbiubicbi',\n type: 'MessageLabel',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n {\n args: 'string',\n attachments: [],\n channel: CHANNEL,\n cid: 'stridodong',\n command: 'giphy',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'jbkjb',\n text: 'jkbkbiubicbi',\n type: 'MessageLabel',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_DELETED_MESSAGES = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [\n {\n type: 'deleted',\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n {\n type: 'deleted',\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_NO_MESSAGES = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_MESSAGE_COMMAND = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [\n {\n args: 'string',\n attachments: [],\n channel: CHANNEL,\n cid: 'stridkncnng',\n command: 'giphy',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'ljkblk',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n {\n args: 'string',\n attachments: [],\n channel: CHANNEL,\n cid: 'stridodong',\n command: 'giphy',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'jbkjb',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_MESSAGES_ATTACHMENTS = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [\n {\n args: 'string',\n attachments: [\n {\n actions: [],\n asset_url: 'string',\n author_icon: 'string',\n author_link: 'string',\n author_name: 'string',\n color: 'string',\n fallback: 'string',\n fields: [],\n file_size: 25,\n footer: 'string',\n footer_icon: 'string',\n image_url: 'string',\n mime_type: 'string',\n og_scrape_url: 'string',\n original_height: 5,\n original_width: 4,\n pretext: 'string',\n text: 'string',\n thumb_url: 'string',\n title: 'string',\n title_link: 'string',\n type: 'string',\n } as Attachment<DefaultStreamChatGenerics>,\n ],\n channel: CHANNEL,\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'ljkblk',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst LATEST_MESSAGE = {\n args: 'string',\n attachments: [],\n channel: CHANNEL,\n cid: 'string',\n command: 'giphy',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n id: 'string',\n text: 'jkbkbiubicbi',\n type: 'MessageLabel',\n user: { id: 'okechukwu' } as unknown as UserResponse<DefaultStreamChatGenerics>,\n} as unknown as MessageResponse<DefaultStreamChatGenerics>;\n\nconst FORMATTED_MESSAGE: FormatMessageResponse<DefaultStreamChatGenerics> = {\n created_at: new Date('2021-02-12T12:12:35.862282Z'),\n id: '',\n message: {} as unknown as MessageResponse<DefaultStreamChatGenerics>,\n pinned_at: new Date('2021-02-12T12:12:35.862282Z'),\n status: 'received',\n updated_at: new Date('2021-02-12T12:12:35.862282Z'),\n};\n\nconst CHANNEL_WITH_MENTIONED_USERS = {\n state: {\n members: ONE_MEMBER_WITH_EMPTY_USER_MOCK,\n messages: [\n {\n args: 'string',\n attachments: [],\n cid: 'stridkncnng',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n mentioned_users: [\n { id: 'Max', name: 'Max' },\n { id: 'Ada', name: 'Ada' },\n { id: 'Enzo', name: 'Enzo' },\n ] as UserResponse<DefaultStreamChatGenerics>[],\n text: 'Max',\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n {\n args: 'string',\n attachments: [],\n cid: 'stridodong',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n mentioned_users: [\n { id: 'Max', name: 'Max' },\n { id: 'Ada', name: 'Ada' },\n { id: 'Enzo', name: 'Enzo' },\n ] as UserResponse<DefaultStreamChatGenerics>[],\n text: 'Max',\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_EMPTY_MESSAGE = {\n state: {\n members: ONE_MEMBER_WITH_EMPTY_USER_MOCK,\n messages: [\n {\n args: 'string',\n attachments: [],\n cid: 'stridkncnng',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n mentioned_users: [\n { id: 'Max', name: 'Max' },\n { id: 'Ada', name: 'Ada' },\n { id: 'Enzo', name: 'Enzo' },\n ] as UserResponse<DefaultStreamChatGenerics>[],\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n {\n args: 'string',\n attachments: [],\n cid: 'stridodong',\n command_info: { name: 'string' },\n created_at: new Date('2021-02-12T12:12:35.862Z'),\n deleted_at: new Date('2021-02-12T12:12:35.862Z'),\n mentioned_users: [\n { id: 'Max', name: 'Max' },\n { id: 'Ada', name: 'Ada' },\n { id: 'Enzo', name: 'Enzo' },\n ] as UserResponse<DefaultStreamChatGenerics>[],\n } as unknown as MessageResponse<DefaultStreamChatGenerics>,\n ],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nconst CHANNEL_WITH_MESSAGES = {\n data: { name: channelName },\n state: {\n members: GROUP_CHANNEL_MEMBERS_MOCK,\n messages: [FORMATTED_MESSAGE, FORMATTED_MESSAGE],\n },\n} as unknown as Channel<DefaultStreamChatGenerics>;\n\nexport {\n CHANNEL,\n CHANNEL_WITH_EMPTY_MESSAGE,\n CHANNEL_WITH_MESSAGES,\n CHANNEL_WITH_MENTIONED_USERS,\n FORMATTED_MESSAGE,\n LATEST_MESSAGE,\n CHANNEL_WITH_MESSAGES_ATTACHMENTS,\n CHANNEL_WITH_MESSAGE_COMMAND as CHANNEL_WITH_MESSAGES_COMMAND,\n CHANNEL_WITH_NO_MESSAGES,\n CHANNEL_WITH_DELETED_MESSAGES,\n CHANNEL_WITH_MESSAGES_TEXT,\n};\n"]}
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "4.8.0-beta.1"
2
+ "version": "4.9.0-beta.2"
3
3
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { ImageProps } from 'react-native';
3
+ export declare const GalleryImage: React.FC<Omit<ImageProps, 'height' | 'source'> & {
4
+ uri: string;
5
+ }>;
@@ -4,7 +4,7 @@ import { MessageContextValue } from '../../contexts/messageContext/MessageContex
4
4
  import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
5
5
  import { OverlayContextValue } from '../../contexts/overlayContext/OverlayContext';
6
6
  import type { DefaultStreamChatGenerics } from '../../types/types';
7
- export declare type GalleryPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'alignment' | 'groupStyles' | 'images' | 'videos' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress' | 'threadList'> & Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'legacyImageViewerSwipeBehaviour' | 'VideoThumbnail'> & Pick<OverlayContextValue, 'setOverlay'> & {
7
+ export declare type GalleryPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'alignment' | 'groupStyles' | 'images' | 'videos' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress' | 'threadList'> & Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'legacyImageViewerSwipeBehaviour' | 'VideoThumbnail' | 'ImageLoadingIndicator' | 'ImageLoadingFailedIndicator'> & Pick<OverlayContextValue, 'setOverlay'> & {
8
8
  channelId: string | undefined;
9
9
  hasThreadReplies?: boolean;
10
10
  /**
@@ -4,7 +4,7 @@ import { MessageContextValue } from '../../contexts/messageContext/MessageContex
4
4
  import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
5
5
  import { OverlayContextValue } from '../../contexts/overlayContext/OverlayContext';
6
6
  import type { DefaultStreamChatGenerics } from '../../types/types';
7
- export declare type GiphyPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'handleAction' | 'isMyMessage' | 'message' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'> & Pick<MessagesContextValue<StreamChatGenerics>, 'giphyVersion' | 'additionalTouchableProps'> & {
7
+ export declare type GiphyPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'handleAction' | 'isMyMessage' | 'message' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress'> & Pick<MessagesContextValue<StreamChatGenerics>, 'giphyVersion' | 'additionalTouchableProps' | 'ImageLoadingIndicator' | 'ImageLoadingFailedIndicator'> & {
8
8
  attachment: Attachment<StreamChatGenerics>;
9
9
  } & Pick<OverlayContextValue, 'setOverlay'>;
10
10
  export declare type GiphyProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<GiphyPropsWithContext<StreamChatGenerics>> & {
@@ -0,0 +1,3 @@
1
+ import { ViewProps } from 'react-native';
2
+ export declare type ImageLoadingFailedIndicatorProps = ViewProps;
3
+ export declare const ImageLoadingFailedIndicator: (props: ImageLoadingFailedIndicatorProps) => JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ViewProps } from 'react-native';
2
+ export declare type ImageLoadingIndicatorProps = ViewProps;
3
+ export declare const ImageLoadingIndicator: (props: ImageLoadingIndicatorProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ export declare const useLoadingImage: () => {
3
+ isLoadingImage: boolean;
4
+ isLoadingImageError: boolean;
5
+ setLoadingImage: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
+ setLoadingImageError: import("react").Dispatch<import("react").SetStateAction<boolean>>;
7
+ };
@@ -15,7 +15,7 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
15
15
  import { ReactionData } from '../../utils/utils';
16
16
  import { LoadingErrorProps } from '../Indicators/LoadingErrorIndicator';
17
17
  export declare const reactionData: ReactionData[];
18
- export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview' | 'VideoThumbnail'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
18
+ export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'ImageLoadingFailedIndicator' | 'ImageLoadingIndicator' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview' | 'VideoThumbnail'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
19
19
  shouldSyncChannel: boolean;
20
20
  /**
21
21
  * Additional props passed to keyboard avoiding view
@@ -1,6 +1,6 @@
1
1
  import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
2
2
  import type { DefaultStreamChatGenerics } from '../../../types/types';
3
- export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, VideoThumbnail, }: MessagesContextValue<StreamChatGenerics> & {
3
+ export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, ImageLoadingFailedIndicator, ImageLoadingIndicator, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, VideoThumbnail, }: MessagesContextValue<StreamChatGenerics> & {
4
4
  /**
5
5
  * To ensure we allow re-render, when channel is changed
6
6
  */
@@ -1,5 +1,7 @@
1
1
  import React, { PropsWithChildren } from 'react';
2
2
  import type { TouchableOpacityProps } from 'react-native';
3
+ import type { ImageLoadingFailedIndicatorProps } from 'src/components/Attachment/ImageLoadingFailedIndicator';
4
+ import type { ImageLoadingIndicatorProps } from 'src/components/Attachment/ImageLoadingIndicator';
3
5
  import type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';
4
6
  import type { Attachment, ChannelState, MessageResponse } from 'stream-chat';
5
7
  import type { AttachmentProps } from '../../components/Attachment/Attachment';
@@ -96,6 +98,14 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
96
98
  * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default
97
99
  * */
98
100
  giphyVersion: keyof NonNullable<Attachment['giphy']>;
101
+ /**
102
+ * The indicator rendered when loading an image fails.
103
+ */
104
+ ImageLoadingFailedIndicator: React.ComponentType<ImageLoadingFailedIndicatorProps>;
105
+ /**
106
+ * The indicator rendered when image is loading. By default renders <ActivityIndicator/>
107
+ */
108
+ ImageLoadingIndicator: React.ComponentType<ImageLoadingIndicatorProps>;
99
109
  /**
100
110
  * When true, messageList will be scrolled at first unread message, when opened.
101
111
  */
@@ -450,6 +450,10 @@ export declare type Theme = {
450
450
  shuffle: TextStyle;
451
451
  title: TextStyle;
452
452
  };
453
+ loadingIndicator: {
454
+ container: ViewStyle;
455
+ roundedView: ViewStyle;
456
+ };
453
457
  pinnedHeader: {
454
458
  container: ViewStyle;
455
459
  label: TextStyle;
@@ -0,0 +1,14 @@
1
+ import type { Channel, FormatMessageResponse, MessageResponse } from 'stream-chat';
2
+ import type { DefaultStreamChatGenerics } from '../../types/types';
3
+ declare const CHANNEL: Channel<DefaultStreamChatGenerics>;
4
+ declare const CHANNEL_WITH_MESSAGES_TEXT: Channel<DefaultStreamChatGenerics>;
5
+ declare const CHANNEL_WITH_DELETED_MESSAGES: Channel<DefaultStreamChatGenerics>;
6
+ declare const CHANNEL_WITH_NO_MESSAGES: Channel<DefaultStreamChatGenerics>;
7
+ declare const CHANNEL_WITH_MESSAGE_COMMAND: Channel<DefaultStreamChatGenerics>;
8
+ declare const CHANNEL_WITH_MESSAGES_ATTACHMENTS: Channel<DefaultStreamChatGenerics>;
9
+ declare const LATEST_MESSAGE: MessageResponse<DefaultStreamChatGenerics>;
10
+ declare const FORMATTED_MESSAGE: FormatMessageResponse<DefaultStreamChatGenerics>;
11
+ declare const CHANNEL_WITH_MENTIONED_USERS: Channel<DefaultStreamChatGenerics>;
12
+ declare const CHANNEL_WITH_EMPTY_MESSAGE: Channel<DefaultStreamChatGenerics>;
13
+ declare const CHANNEL_WITH_MESSAGES: Channel<DefaultStreamChatGenerics>;
14
+ export { CHANNEL, CHANNEL_WITH_EMPTY_MESSAGE, CHANNEL_WITH_MESSAGES, CHANNEL_WITH_MENTIONED_USERS, FORMATTED_MESSAGE, LATEST_MESSAGE, CHANNEL_WITH_MESSAGES_ATTACHMENTS, CHANNEL_WITH_MESSAGE_COMMAND as CHANNEL_WITH_MESSAGES_COMMAND, CHANNEL_WITH_NO_MESSAGES, CHANNEL_WITH_DELETED_MESSAGES, CHANNEL_WITH_MESSAGES_TEXT, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "4.8.0-beta.1",
4
+ "version": "4.9.0-beta.2",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { ImageBackground, ImageProps } from 'react-native';
3
+
4
+ import { makeImageCompatibleUrl } from '../../utils/utils';
5
+
6
+ export const GalleryImage: React.FC<
7
+ Omit<ImageProps, 'height' | 'source'> & {
8
+ uri: string;
9
+ }
10
+ > = (props) => {
11
+ const { uri, ...rest } = props;
12
+
13
+ return (
14
+ <ImageBackground
15
+ {...rest}
16
+ accessibilityLabel='gallery-image'
17
+ source={{
18
+ uri: makeImageCompatibleUrl(uri),
19
+ }}
20
+ />
21
+ );
22
+ };