stream-chat-react-native-core 9.0.0-beta.36 → 9.0.0-beta.37

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 (44) hide show
  1. package/lib/commonjs/version.json +1 -1
  2. package/lib/module/version.json +1 -1
  3. package/package.json +1 -1
  4. package/src/version.json +1 -1
  5. package/lib/commonjs/components/BottomSheetCompatibility/BottomSheetModal.js +0 -8
  6. package/lib/commonjs/components/BottomSheetCompatibility/BottomSheetModal.js.map +0 -1
  7. package/lib/commonjs/components/ChannelList/utils.js +0 -51
  8. package/lib/commonjs/components/ChannelList/utils.js.map +0 -1
  9. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +0 -215
  10. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +0 -1
  11. package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js +0 -8
  12. package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js.map +0 -1
  13. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessageFlashList.js +0 -15
  14. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessageFlashList.js.map +0 -1
  15. package/lib/commonjs/components/docs/data.js +0 -476
  16. package/lib/commonjs/components/docs/data.js.map +0 -1
  17. package/lib/module/components/BottomSheetCompatibility/BottomSheetModal.js +0 -8
  18. package/lib/module/components/BottomSheetCompatibility/BottomSheetModal.js.map +0 -1
  19. package/lib/module/components/ChannelList/utils.js +0 -51
  20. package/lib/module/components/ChannelList/utils.js.map +0 -1
  21. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +0 -215
  22. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +0 -1
  23. package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js +0 -8
  24. package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js.map +0 -1
  25. package/lib/module/components/MessageList/utils/getLastReceivedMessageFlashList.js +0 -15
  26. package/lib/module/components/MessageList/utils/getLastReceivedMessageFlashList.js.map +0 -1
  27. package/lib/module/components/docs/data.js +0 -476
  28. package/lib/module/components/docs/data.js.map +0 -1
  29. package/lib/typescript/components/BottomSheetCompatibility/BottomSheetModal.d.ts +0 -8
  30. package/lib/typescript/components/BottomSheetCompatibility/BottomSheetModal.d.ts.map +0 -1
  31. package/lib/typescript/components/ChannelList/utils.d.ts +0 -22
  32. package/lib/typescript/components/ChannelList/utils.d.ts.map +0 -1
  33. package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.d.ts +0 -10
  34. package/lib/typescript/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.d.ts.map +0 -1
  35. package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts +0 -8
  36. package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts.map +0 -1
  37. package/lib/typescript/components/MessageList/utils/getLastReceivedMessageFlashList.d.ts +0 -3
  38. package/lib/typescript/components/MessageList/utils/getLastReceivedMessageFlashList.d.ts.map +0 -1
  39. package/src/components/BottomSheetCompatibility/BottomSheetModal.tsx +0 -16
  40. package/src/components/ChannelList/utils.ts +0 -76
  41. package/src/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.tsx +0 -248
  42. package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +0 -12
  43. package/src/components/MessageList/utils/getLastReceivedMessageFlashList.ts +0 -20
  44. package/src/components/docs/data.js +0 -524
@@ -1,524 +0,0 @@
1
- /* global require */
2
- const Dayjs = require('dayjs');
3
- const StreamChat = require('stream-chat').StreamChat;
4
- export const client = new StreamChat('qk4nn7rpcn75');
5
-
6
- client.connectUser(
7
- {
8
- id: 'John',
9
- },
10
- 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiSm9obiIsImlhdCI6MTU0ODI5ODUxN30.hyonbQnOLuFsr15mdmc_JF4sBOm2SURK4eBvTOx3ZIg',
11
- );
12
-
13
- export const channel = client.channel('messaging', 'general', {
14
- image: 'https://s3-us-west-2.amazonaws.com/s.cdpn.io/195612/chat_avatar_01_green.jpg',
15
- name: 'Talk about the documentation',
16
- });
17
-
18
- export const channelContext = {
19
- channel,
20
- client,
21
- };
22
-
23
- export const translationContext = {
24
- t: (text) => text,
25
- tDateTimeParser: (date) => Dayjs(date),
26
- };
27
- export const suggestionsContext = {
28
- closeSuggestions: () => {},
29
- openSuggestions: () => {},
30
- setInputBoxContainerRef: () => {},
31
- updateSuggestions: () => {},
32
- };
33
-
34
- const filters = { example: 1, type: 'team' };
35
- const sort = { last_updated: -1 };
36
-
37
- export const channels = client.queryChannels(filters, sort, {
38
- subscribe: true,
39
- });
40
-
41
- export const message = {
42
- __html:
43
- '<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
44
- attachments: [],
45
- command: '',
46
- created_at: '2019-01-25T00:18:59.675Z',
47
- html: '<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
48
- id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
49
- own_reactions: [
50
- {
51
- created_at: '2019-01-25T16:24:00.173967Z',
52
- id: 142,
53
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
54
- type: 'love',
55
- user: {
56
- created_at: '2019-01-22T16:35:18.417456Z',
57
- id: 'thierry',
58
- last_active: '2019-01-25T09:23:47.108127-07:00',
59
- online: true,
60
- role: 'user',
61
- updated_at: '2019-01-25T16:23:47.052538Z',
62
- },
63
- },
64
- {
65
- created_at: '2019-01-25T16:23:58.939438Z',
66
- id: 141,
67
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
68
- type: 'like',
69
- user: {
70
- created_at: '2019-01-22T16:35:18.417456Z',
71
- id: 'thierry',
72
- last_active: '2019-01-25T09:23:47.108127-07:00',
73
- online: true,
74
- role: 'user',
75
- updated_at: '2019-01-25T16:23:47.052538Z',
76
- },
77
- },
78
- ],
79
- reaction_counts: {
80
- like: 1,
81
- love: 1,
82
- },
83
- reactions: [
84
- {
85
- created_at: '2019-01-25T16:24:00.173967Z',
86
- id: 142,
87
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
88
- type: 'love',
89
- user: {
90
- created_at: '2019-01-22T16:35:18.417456Z',
91
- id: 'thierry',
92
- last_active: '2019-01-25T09:23:47.108127-07:00',
93
- online: true,
94
- role: 'user',
95
- updated_at: '2019-01-25T16:23:47.052538Z',
96
- },
97
- },
98
- {
99
- created_at: '2019-01-25T16:23:58.939438Z',
100
- id: 141,
101
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
102
- type: 'like',
103
- user: {
104
- created_at: '2019-01-22T16:35:18.417456Z',
105
- id: 'thierry',
106
- last_active: '2019-01-25T09:23:47.108127-07:00',
107
- online: true,
108
- role: 'user',
109
- updated_at: '2019-01-25T16:23:47.052538Z',
110
- },
111
- },
112
- ],
113
- reply_count: 0,
114
- status: 'received',
115
- text: 'Hey this is getstream message',
116
- type: 'regular',
117
- updated_at: '2019-01-25T16:24:00.181Z',
118
- user: {
119
- created_at: '2019-01-22T16:35:18.417456Z',
120
- id: 'thierry',
121
- image: 'https://cdn.pixabay.com/photo/2014/03/25/16/54/user-297566__340.png',
122
- last_active: '2019-01-25T09:23:47.108127-07:00',
123
- online: true,
124
- role: 'user',
125
- updated_at: '2019-01-25T16:23:47.052538Z',
126
- },
127
- };
128
-
129
- export const messageWithImages = {
130
- __html:
131
- '<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
132
- attachments: [
133
- {
134
- image_url:
135
- 'https://images.unsplash.com/photo-1548256434-c7d2374b1077?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
136
- thumb_url:
137
- 'https://images.unsplash.com/photo-1548256434-c7d2374b1077?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
138
- type: 'image',
139
- },
140
- {
141
- image_url:
142
- 'https://www.fujifilm.com/products/digital_cameras/x/fujifilm_x_t1/sample_images/img/index/ff_x_t1_002.JPG',
143
- thumb_url:
144
- 'https://www.fujifilm.com/products/digital_cameras/x/fujifilm_x_t1/sample_images/img/index/ff_x_t1_002.JPG',
145
- type: 'image',
146
- },
147
- {
148
- image_url: 'https://www.fujixpassion.com/wp-content/uploads/2016/01/Image-1-Title.jpg',
149
- thumb_url: 'https://www.fujixpassion.com/wp-content/uploads/2016/01/Image-1-Title.jpg',
150
- type: 'image',
151
- },
152
- {
153
- image_url: 'https://i-cdn.phonearena.com/images/articles/47012-image/photo2.jpg',
154
- thumb_url: 'https://i-cdn.phonearena.com/images/articles/47012-image/photo2.jpg',
155
- type: 'image',
156
- },
157
- ],
158
- command: '',
159
- created_at: '2019-01-25T00:18:59.675Z',
160
- html: '',
161
- id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
162
- own_reactions: [
163
- {
164
- created_at: '2019-01-25T16:24:00.173967Z',
165
- id: 142,
166
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
167
- type: 'love',
168
- user: {
169
- created_at: '2019-01-22T16:35:18.417456Z',
170
- id: 'thierry',
171
- last_active: '2019-01-25T09:23:47.108127-07:00',
172
- online: true,
173
- role: 'user',
174
- updated_at: '2019-01-25T16:23:47.052538Z',
175
- },
176
- },
177
- {
178
- created_at: '2019-01-25T16:23:58.939438Z',
179
- id: 141,
180
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
181
- type: 'like',
182
- user: {
183
- created_at: '2019-01-22T16:35:18.417456Z',
184
- id: 'thierry',
185
- last_active: '2019-01-25T09:23:47.108127-07:00',
186
- online: true,
187
- role: 'user',
188
- updated_at: '2019-01-25T16:23:47.052538Z',
189
- },
190
- },
191
- ],
192
- reaction_counts: {
193
- like: 1,
194
- love: 1,
195
- },
196
- reactions: [
197
- {
198
- created_at: '2019-01-25T16:24:00.173967Z',
199
- id: 142,
200
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
201
- type: 'love',
202
- user: {
203
- created_at: '2019-01-22T16:35:18.417456Z',
204
- id: 'thierry',
205
- last_active: '2019-01-25T09:23:47.108127-07:00',
206
- online: true,
207
- role: 'user',
208
- updated_at: '2019-01-25T16:23:47.052538Z',
209
- },
210
- },
211
- {
212
- created_at: '2019-01-25T16:23:58.939438Z',
213
- id: 141,
214
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
215
- type: 'like',
216
- user: {
217
- created_at: '2019-01-22T16:35:18.417456Z',
218
- id: 'thierry',
219
- last_active: '2019-01-25T09:23:47.108127-07:00',
220
- online: true,
221
- role: 'user',
222
- updated_at: '2019-01-25T16:23:47.052538Z',
223
- },
224
- },
225
- ],
226
- reply_count: 0,
227
- status: 'received',
228
- text: 'This message contains images',
229
- type: 'regular',
230
- updated_at: '2019-01-25T16:24:00.181Z',
231
- user: {
232
- created_at: '2019-01-22T16:35:18.417456Z',
233
- id: 'thierry',
234
- image: 'https://cdn.pixabay.com/photo/2014/03/25/16/54/user-297566__340.png',
235
- last_active: '2019-01-25T09:23:47.108127-07:00',
236
- online: true,
237
- role: 'user',
238
- updated_at: '2019-01-25T16:23:47.052538Z',
239
- },
240
- };
241
-
242
- export const messageWithUrlPreview = {
243
- __html:
244
- '<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
245
- attachments: [
246
- {
247
- image_url:
248
- 'https://images.unsplash.com/photo-1548256434-c7d2374b1077?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
249
- og_scrape_url: 'https://unsplash.com/photos/lxuB4abGzXc',
250
- text: 'Download this photo in Addu City, Maldives by Ibrahim Shabil (@shabilphotos)',
251
- thumb_url:
252
- 'https://images.unsplash.com/photo-1548256434-c7d2374b1077?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
253
- title: 'Cosmic Home photo by Ibrahim Shabil (@shabilphotos) on Unsplash',
254
- title_link: 'https://unsplash.com/photos/lxuB4abGzXc',
255
- type: 'image',
256
- },
257
- ],
258
- command: '',
259
- created_at: '2019-01-25T00:18:59.675Z',
260
- html: '<p><a href="https://unsplash.com/photos/lxuB4abGzXc" rel="nofollow">https://unsplash.com/photos/lxuB4abGzXc</a></p>\n',
261
- id: 'thierry-e298f569-8745-407f-a02b-f75c0206612f',
262
- own_reactions: [
263
- {
264
- created_at: '2019-01-25T16:24:00.173967Z',
265
- id: 142,
266
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
267
- type: 'love',
268
- user: {
269
- created_at: '2019-01-22T16:35:18.417456Z',
270
- id: 'thierry',
271
- last_active: '2019-01-25T09:23:47.108127-07:00',
272
- online: true,
273
- role: 'user',
274
- updated_at: '2019-01-25T16:23:47.052538Z',
275
- },
276
- },
277
- {
278
- created_at: '2019-01-25T16:23:58.939438Z',
279
- id: 141,
280
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
281
- type: 'like',
282
- user: {
283
- created_at: '2019-01-22T16:35:18.417456Z',
284
- id: 'thierry',
285
- last_active: '2019-01-25T09:23:47.108127-07:00',
286
- online: true,
287
- role: 'user',
288
- updated_at: '2019-01-25T16:23:47.052538Z',
289
- },
290
- },
291
- ],
292
- reaction_counts: {
293
- like: 1,
294
- love: 1,
295
- },
296
- reactions: [
297
- {
298
- created_at: '2019-01-25T16:24:00.173967Z',
299
- id: 142,
300
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
301
- type: 'love',
302
- user: {
303
- created_at: '2019-01-22T16:35:18.417456Z',
304
- id: 'thierry',
305
- last_active: '2019-01-25T09:23:47.108127-07:00',
306
- online: true,
307
- role: 'user',
308
- updated_at: '2019-01-25T16:23:47.052538Z',
309
- },
310
- },
311
- {
312
- created_at: '2019-01-25T16:23:58.939438Z',
313
- id: 141,
314
- message_id: 'd46540e6-fb54-42bf-9de1-654c866cf587',
315
- type: 'like',
316
- user: {
317
- created_at: '2019-01-22T16:35:18.417456Z',
318
- id: 'thierry',
319
- last_active: '2019-01-25T09:23:47.108127-07:00',
320
- online: true,
321
- role: 'user',
322
- updated_at: '2019-01-25T16:23:47.052538Z',
323
- },
324
- },
325
- ],
326
- reply_count: 0,
327
- status: 'received',
328
- text: 'https://unsplash.com/photos/lxuB4abGzXc',
329
- type: 'regular',
330
- updated_at: '2019-01-25T16:24:00.181Z',
331
- user: {
332
- created_at: '2019-01-22T16:35:18.417456Z',
333
- id: 'thierry',
334
- image: 'https://cdn.pixabay.com/photo/2014/03/25/16/54/user-297566__340.png',
335
- last_active: '2019-01-25T09:23:47.108127-07:00',
336
- online: true,
337
- role: 'user',
338
- updated_at: '2019-01-25T16:23:47.052538Z',
339
- },
340
- };
341
-
342
- export const thread = {
343
- __html:
344
- '<p>this place looks amazing: <a href="https://unsplash.com/photos/f3hDGOHptrM" rel="nofollow">https://unsplash.com/photos/f3hDGOHptrM</a></p>\n',
345
- attachments: [
346
- {
347
- image_url:
348
- 'https://images.unsplash.com/photo-1548345233-4557b8809829?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
349
- og_scrape_url: 'https://unsplash.com/photos/f3hDGOHptrM',
350
- text: 'Download this photo by Sandra Seitamaa (@seitamaaphotography)',
351
- thumb_url:
352
- 'https://images.unsplash.com/photo-1548345233-4557b8809829?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjEyMDd9',
353
- title:
354
- 'Plant, tree, nature and river HD photo by Sandra Seitamaa (@seitamaaphotography) on Unsplash',
355
- title_link: 'https://unsplash.com/photos/f3hDGOHptrM',
356
- type: 'image',
357
- },
358
- ],
359
- command: '',
360
- created_at: '2019-01-25T21:25:45.306Z',
361
- html: '<p>this place looks amazing: <a href="https://unsplash.com/photos/f3hDGOHptrM" rel="nofollow">https://unsplash.com/photos/f3hDGOHptrM</a></p>\n',
362
- id: 'thierry-ec4eac2b-1278-4f49-8b20-2ebcd76dace5',
363
- own_reactions: [],
364
- reaction_counts: null,
365
- reactions: [],
366
- reply_count: 2,
367
- status: 'received',
368
- text: 'this place looks amazing: https://unsplash.com/photos/f3hDGOHptrM',
369
- type: 'regular',
370
- updated_at: '2019-01-25T21:25:45.306Z',
371
- user: {
372
- created_at: '2019-01-22T16:35:18.417456Z',
373
- id: 'thierry',
374
- online: true,
375
- role: 'user',
376
- updated_at: '2019-01-25T21:27:39.606466Z',
377
- },
378
- };
379
-
380
- export const threadMessages = [
381
- {
382
- __html: '<p>whow, where is that?</p>\n',
383
- attachments: [],
384
- command: '',
385
- created_at: new Date('2019-01-25T21:26:06.346Z'),
386
- html: '<p>whow, where is that?</p>\n',
387
- id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
388
- own_reactions: [],
389
- parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
390
- reaction_counts: null,
391
- reactions: [],
392
- reply_count: 0,
393
- status: 'received',
394
- text: 'whow, where is that?',
395
- type: 'reply',
396
- updated_at: '2019-01-25T21:26:06.346Z',
397
- user: {
398
- created_at: '2019-01-22T16:35:18.417456Z',
399
- id: 'thierry',
400
- invisible: false,
401
- last_active: '0001-01-01T00:00:00Z',
402
- mutes: [],
403
- online: false,
404
- role: 'user',
405
- updated_at: '2019-01-25T21:27:39.606466Z',
406
- },
407
- },
408
- {
409
- __html: '<p>it’s soo green, amazing</p>\n',
410
- attachments: [],
411
- command: '',
412
- created_at: new Date('2019-01-25T21:26:11.863Z'),
413
- html: '<p>it’s soo green, amazing</p>\n',
414
- id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
415
- own_reactions: [],
416
- parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
417
- reaction_counts: null,
418
- reactions: [],
419
- reply_count: 0,
420
- status: 'received',
421
- text: "it's soo green, amazing",
422
- type: 'reply',
423
- updated_at: '2019-01-25T21:26:11.863Z',
424
- user: {
425
- created_at: '2019-01-22T16:35:18.417456Z',
426
- id: 'thierry',
427
- invisible: false,
428
- last_active: '0001-01-01T00:00:00Z',
429
- mutes: [],
430
- online: false,
431
- role: 'user',
432
- updated_at: '2019-01-25T21:27:39.606466Z',
433
- },
434
- },
435
- ];
436
-
437
- export const messages = [
438
- {
439
- __html: '<p>whow, where is that?</p>\n',
440
- attachments: [],
441
- command: '',
442
- created_at: new Date('2019-01-25T21:26:06.346Z'),
443
- html: '<p>whow, where is that?</p>\n',
444
- id: 'thierry-97a02ade-3a38-4400-9377-001c10fc2663',
445
- own_reactions: [],
446
- parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
447
- reaction_counts: null,
448
- reactions: [],
449
- reply_count: 0,
450
- status: 'received',
451
- text: 'whow, where is that?',
452
- type: 'reply',
453
- updated_at: '2019-01-25T21:26:06.346Z',
454
- user: {
455
- created_at: '2019-01-22T16:35:18.417456Z',
456
- id: 'thierry',
457
- invisible: false,
458
- last_active: '0001-01-01T00:00:00Z',
459
- mutes: [],
460
- online: false,
461
- role: 'user',
462
- updated_at: '2019-01-25T21:27:39.606466Z',
463
- },
464
- },
465
- {
466
- __html: '<p>it’s soo green, amazing</p>\n',
467
- attachments: [],
468
- command: '',
469
- created_at: new Date('2019-01-25T21:26:11.863Z'),
470
- html: '<p>it’s soo green, amazing</p>\n',
471
- id: 'thierry-264fdc4d-03c5-4f93-b97c-cfe5612968aa',
472
- own_reactions: [],
473
- parent_id: '6312fb0b-0c94-4107-a036-376ac5ab650b',
474
- reaction_counts: null,
475
- reactions: [],
476
- reply_count: 0,
477
- status: 'received',
478
- text: "it's soo green, amazing",
479
- type: 'reply',
480
- updated_at: '2019-01-25T21:26:11.863Z',
481
- user: {
482
- created_at: '2019-01-22T16:35:18.417456Z',
483
- id: 'thierry',
484
- invisible: false,
485
- last_active: '0001-01-01T00:00:00Z',
486
- mutes: [],
487
- online: false,
488
- role: 'user',
489
- updated_at: '2019-01-25T21:27:39.606466Z',
490
- },
491
- },
492
- ];
493
-
494
- export const users = [
495
- {
496
- created_at: '2019-01-28T16:03:25.619982Z',
497
- id: 'thierry',
498
- last_active: '2019-01-28T15:07:32.314676-07:00',
499
- online: true,
500
- role: 'user',
501
- updated_at: '2019-01-28T22:07:32.297119Z',
502
- },
503
- ];
504
-
505
- export const MessageMock = {
506
- canDeleteMessage: () => true,
507
- canEditMessage: () => true,
508
- handleDelete: console.log,
509
- handleEdit: console.log,
510
- handleFlag: console.log,
511
- handleMute: console.log,
512
- };
513
-
514
- // Based on: https://javascript.info/promise-basics#example-loadscript
515
- function dynamicallyLoadScript(url) {
516
- return new Promise(function (resolve, reject) {
517
- const script = document.createElement('script');
518
- script.src = url;
519
- script.onload = resolve;
520
- script.onerror = () => reject(new Error(`Error when loading ${url}!`));
521
- document.body.appendChild(script);
522
- });
523
- }
524
- dynamicallyLoadScript('https://snack.expo.io/embed.js');