stream-chat-react-native-core 5.26.1-beta.2 → 5.27.0-beta.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/components/AttachmentPicker/AttachmentPicker.js +7 -11
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +27 -0
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -0
- package/lib/commonjs/components/Chat/Chat.js +12 -5
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +15 -11
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/i18n/es.json +32 -32
- package/lib/commonjs/i18n/fr.json +32 -32
- package/lib/commonjs/i18n/he.json +32 -32
- package/lib/commonjs/i18n/hi.json +31 -31
- package/lib/commonjs/i18n/it.json +31 -31
- package/lib/commonjs/i18n/ja.json +31 -31
- package/lib/commonjs/i18n/ko.json +31 -31
- package/lib/commonjs/i18n/nl.json +31 -31
- package/lib/commonjs/i18n/pt-BR.json +31 -31
- package/lib/commonjs/i18n/ru.json +31 -31
- package/lib/commonjs/i18n/tr.json +31 -31
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/StreamChatRN.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +7 -11
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +27 -0
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -0
- package/lib/module/components/Chat/Chat.js +12 -5
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -2
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +15 -11
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/i18n/es.json +32 -32
- package/lib/module/i18n/fr.json +32 -32
- package/lib/module/i18n/he.json +32 -32
- package/lib/module/i18n/hi.json +31 -31
- package/lib/module/i18n/it.json +31 -31
- package/lib/module/i18n/ja.json +31 -31
- package/lib/module/i18n/ko.json +31 -31
- package/lib/module/i18n/nl.json +31 -31
- package/lib/module/i18n/pt-BR.json +31 -31
- package/lib/module/i18n/ru.json +31 -31
- package/lib/module/i18n/tr.json +31 -31
- package/lib/module/index.js +7 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/StreamChatRN.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts +4 -0
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts +2 -0
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +4 -0
- package/lib/typescript/i18n/es.json +32 -32
- package/lib/typescript/i18n/fr.json +32 -32
- package/lib/typescript/i18n/he.json +32 -32
- package/lib/typescript/i18n/hi.json +31 -31
- package/lib/typescript/i18n/it.json +31 -31
- package/lib/typescript/i18n/ja.json +31 -31
- package/lib/typescript/i18n/ko.json +31 -31
- package/lib/typescript/i18n/nl.json +31 -31
- package/lib/typescript/i18n/pt-BR.json +31 -31
- package/lib/typescript/i18n/ru.json +31 -31
- package/lib/typescript/i18n/tr.json +31 -31
- package/lib/typescript/index.d.ts +1 -1
- package/lib/typescript/utils/StreamChatRN.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +8 -19
- package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx +10 -0
- package/src/components/Chat/Chat.tsx +7 -1
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/contexts/chatContext/ChatContext.tsx +4 -0
- package/src/contexts/overlayContext/OverlayProvider.tsx +3 -0
- package/src/i18n/es.json +32 -32
- package/src/i18n/fr.json +32 -32
- package/src/i18n/he.json +32 -32
- package/src/i18n/hi.json +31 -31
- package/src/i18n/it.json +31 -31
- package/src/i18n/ja.json +31 -31
- package/src/i18n/ko.json +31 -31
- package/src/i18n/nl.json +31 -31
- package/src/i18n/pt-BR.json +31 -31
- package/src/i18n/ru.json +31 -31
- package/src/i18n/tr.json +31 -31
- package/src/index.ts +1 -1
- package/src/utils/StreamChatRN.ts +2 -0
- package/src/version.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "1 Ответ",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "
|
|
5
|
-
"Allow camera access in device settings": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "",
|
|
5
|
+
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
8
|
"Are you sure?": "",
|
|
@@ -13,49 +13,49 @@
|
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
16
|
-
"Device camera is used to take photos or videos.": "
|
|
16
|
+
"Device camera is used to take photos or videos.": "",
|
|
17
17
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
18
|
"Edit Message": "",
|
|
19
|
-
"Editing Message": "
|
|
19
|
+
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
|
-
"Empty message...": "",
|
|
21
|
+
"Empty message...": "Пустое сообщение...",
|
|
22
22
|
"Error loading": "Ошибка при загрузке",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
23
|
+
"Error loading channel list...": "Ошибка загрузки списка каналов...",
|
|
24
|
+
"Error loading messages for this channel...": "Ошибка загрузки сообщений для этого канала...",
|
|
25
|
+
"Error while loading, please reload/refresh": "Ошибка загрузки, пожалуйста перезагрузите или обновите",
|
|
26
|
+
"File type not supported": "Тип файла не поддерживается",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
|
-
"How about sending your first message to a friend?": "",
|
|
30
|
+
"How about sending your first message to a friend?": "Как насчет отправки первого сообщения другу?",
|
|
31
31
|
"Instant Commands": "",
|
|
32
|
-
"Let's start chatting!": "",
|
|
32
|
+
"Let's start chatting!": "Давайте начнем общаться!",
|
|
33
33
|
"Links are disabled": "",
|
|
34
|
-
"Loading channels...": "",
|
|
35
|
-
"Loading messages...": "",
|
|
36
|
-
"Loading...": "",
|
|
34
|
+
"Loading channels...": "Загружаю каналы...",
|
|
35
|
+
"Loading messages...": "Загружаю сообщения...",
|
|
36
|
+
"Loading...": "Загружаю...",
|
|
37
37
|
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
38
|
-
"Message Reactions": "",
|
|
39
|
-
"Message deleted": "",
|
|
38
|
+
"Message Reactions": "Сообщения Реакции",
|
|
39
|
+
"Message deleted": "Сообщение удалено",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "",
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "Пока ничего нет...",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "Видно только вам",
|
|
46
|
-
"Open Settings": "
|
|
47
|
-
"Photo": "",
|
|
48
|
-
"Photos and Videos": "
|
|
46
|
+
"Open Settings": "",
|
|
47
|
+
"Photo": "Фото",
|
|
48
|
+
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "Закреплено пользователем",
|
|
51
|
-
"Please enable access to your photos and videos so you can share them.": "
|
|
51
|
+
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "",
|
|
53
|
+
"Reconnecting...": "Переподключение...",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "Ответить на сообщение",
|
|
56
56
|
"Resend": "",
|
|
57
57
|
"Search GIFs": "Поиск GIF",
|
|
58
|
-
"Select More Photos": "
|
|
58
|
+
"Select More Photos": "",
|
|
59
59
|
"Send Anyway": "",
|
|
60
60
|
"Send a message": "Отправить сообщение",
|
|
61
61
|
"Sending links is not allowed in this conversation": "",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"The message has been reported to a moderator.": "",
|
|
64
64
|
"Thread Reply": "",
|
|
65
65
|
"Unblock User": "",
|
|
66
|
-
"Unknown User": "
|
|
66
|
+
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
69
|
"Unread Messages": "Непрочитанные Сообщения",
|
|
70
|
-
"Video": "",
|
|
71
|
-
"You": "",
|
|
70
|
+
"Video": "видео",
|
|
71
|
+
"You": "Вы",
|
|
72
72
|
"You can't send messages in this channel": "Вы не можете отправлять сообщения в этот канал",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} и еще {{ nonSelfUserLength }} пишут",
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "{{ replyCount }} Ответов",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} пишет",
|
|
78
|
-
"🏙 Attachment...": ""
|
|
78
|
+
"🏙 Attachment...": "🏙 Вложение..."
|
|
79
79
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "1 Cevap",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "
|
|
5
|
-
"Allow camera access in device settings": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "",
|
|
5
|
+
"Allow camera access in device settings": "",
|
|
6
6
|
"Also send to channel": "",
|
|
7
7
|
"Are you sure you want to permanently delete this message?": "",
|
|
8
8
|
"Are you sure?": "",
|
|
@@ -13,49 +13,49 @@
|
|
|
13
13
|
"Copy Message": "",
|
|
14
14
|
"Delete": "",
|
|
15
15
|
"Delete Message": "",
|
|
16
|
-
"Device camera is used to take photos or videos.": "
|
|
16
|
+
"Device camera is used to take photos or videos.": "",
|
|
17
17
|
"Do you want to send a copy of this message to a moderator for further investigation?": "",
|
|
18
18
|
"Edit Message": "",
|
|
19
|
-
"Editing Message": "
|
|
19
|
+
"Editing Message": "",
|
|
20
20
|
"Emoji matching": "",
|
|
21
|
-
"Empty message...": "",
|
|
21
|
+
"Empty message...": "Boş mesaj...",
|
|
22
22
|
"Error loading": "Yükleme hatası",
|
|
23
|
-
"Error loading channel list...": "",
|
|
24
|
-
"Error loading messages for this channel...": "",
|
|
25
|
-
"Error while loading, please reload/refresh": "",
|
|
26
|
-
"File type not supported": "",
|
|
23
|
+
"Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
|
|
24
|
+
"Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
|
|
25
|
+
"Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
|
|
26
|
+
"File type not supported": "Dosya türü desteklenmiyor",
|
|
27
27
|
"Flag": "",
|
|
28
28
|
"Flag Message": "",
|
|
29
29
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
30
|
-
"How about sending your first message to a friend?": "",
|
|
30
|
+
"How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
|
|
31
31
|
"Instant Commands": "",
|
|
32
|
-
"Let's start chatting!": "",
|
|
32
|
+
"Let's start chatting!": "Haydi sohbete başlayalım!",
|
|
33
33
|
"Links are disabled": "",
|
|
34
|
-
"Loading channels...": "",
|
|
35
|
-
"Loading messages...": "",
|
|
36
|
-
"Loading...": "",
|
|
34
|
+
"Loading channels...": "Kanallar yükleniyor...",
|
|
35
|
+
"Loading messages...": "Mesajlar yükleniyor...",
|
|
36
|
+
"Loading...": "Yükleniyor...",
|
|
37
37
|
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
38
|
-
"Message Reactions": "",
|
|
39
|
-
"Message deleted": "",
|
|
38
|
+
"Message Reactions": "Mesaj Tepkileri",
|
|
39
|
+
"Message deleted": "Mesaj silindi",
|
|
40
40
|
"Message flagged": "",
|
|
41
41
|
"Mute User": "",
|
|
42
|
-
"Not supported": "
|
|
43
|
-
"Nothing yet...": "",
|
|
42
|
+
"Not supported": "",
|
|
43
|
+
"Nothing yet...": "Henüz değil...",
|
|
44
44
|
"Ok": "",
|
|
45
45
|
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
46
|
-
"Open Settings": "
|
|
47
|
-
"Photo": "",
|
|
48
|
-
"Photos and Videos": "
|
|
46
|
+
"Open Settings": "",
|
|
47
|
+
"Photo": "Fotoğraf",
|
|
48
|
+
"Photos and Videos": "",
|
|
49
49
|
"Pin to Conversation": "",
|
|
50
50
|
"Pinned by": "Tarafından sabitlendi",
|
|
51
|
-
"Please enable access to your photos and videos so you can share them.": "
|
|
51
|
+
"Please enable access to your photos and videos so you can share them.": "",
|
|
52
52
|
"Please select a channel first": "",
|
|
53
|
-
"Reconnecting...": "",
|
|
53
|
+
"Reconnecting...": "Yeniden Bağlanılıyor...",
|
|
54
54
|
"Reply": "",
|
|
55
55
|
"Reply to Message": "Mesajı Yanıtla",
|
|
56
56
|
"Resend": "",
|
|
57
57
|
"Search GIFs": "GIF Ara",
|
|
58
|
-
"Select More Photos": "
|
|
58
|
+
"Select More Photos": "",
|
|
59
59
|
"Send Anyway": "",
|
|
60
60
|
"Send a message": "Mesaj gönder",
|
|
61
61
|
"Sending links is not allowed in this conversation": "",
|
|
@@ -63,17 +63,17 @@
|
|
|
63
63
|
"The message has been reported to a moderator.": "",
|
|
64
64
|
"Thread Reply": "",
|
|
65
65
|
"Unblock User": "",
|
|
66
|
-
"Unknown User": "
|
|
66
|
+
"Unknown User": "",
|
|
67
67
|
"Unmute User": "",
|
|
68
68
|
"Unpin from Conversation": "",
|
|
69
69
|
"Unread Messages": "Okunmamış Mesajlar",
|
|
70
|
-
"Video": "",
|
|
71
|
-
"You": "",
|
|
70
|
+
"Video": "Video",
|
|
71
|
+
"You": "Sen",
|
|
72
72
|
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
73
73
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
74
|
-
"{{ index }} of {{ photoLength }}": "
|
|
74
|
+
"{{ index }} of {{ photoLength }}": "",
|
|
75
75
|
"{{ replyCount }} Replies": "{{ replyCount }} Cevap",
|
|
76
|
-
"{{ replyCount }} Thread Replies": "
|
|
76
|
+
"{{ replyCount }} Thread Replies": "",
|
|
77
77
|
"{{ user }} is typing": "{{ user }} yazıyor",
|
|
78
|
-
"🏙 Attachment...": ""
|
|
78
|
+
"🏙 Attachment...": "🏙 Ek..."
|
|
79
79
|
}
|
package/lib/commonjs/index.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
registerNativeHandlers: true,
|
|
8
8
|
NetInfo: true,
|
|
9
|
+
iOS14RefreshGallerySelection: true,
|
|
9
10
|
enTranslations: true,
|
|
10
11
|
frTranslations: true,
|
|
11
12
|
hiTranslations: true,
|
|
@@ -55,6 +56,12 @@ Object.defineProperty(exports, "hiTranslations", {
|
|
|
55
56
|
return _hi["default"];
|
|
56
57
|
}
|
|
57
58
|
});
|
|
59
|
+
Object.defineProperty(exports, "iOS14RefreshGallerySelection", {
|
|
60
|
+
enumerable: true,
|
|
61
|
+
get: function get() {
|
|
62
|
+
return _native.iOS14RefreshGallerySelection;
|
|
63
|
+
}
|
|
64
|
+
});
|
|
58
65
|
Object.defineProperty(exports, "itTranslations", {
|
|
59
66
|
enumerable: true,
|
|
60
67
|
get: function get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_native","_contexts","_emojiData","_icons","_types","_patchMessageTextCommand","_Streami18n","_utils","_StreamChatRN","_en","_interopRequireDefault","_fr","_hi","_it","_nl","_ru","_tr","_he","_QuickSqliteClient","_version","OfflineStoreApis","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo } from './native';\nexport * from './contexts';\nexport * from './emoji-data';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/patchMessageTextCommand';\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\nexport * from './utils/StreamChatRN';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n\nimport * as OfflineStoreApis from './store/apis';\nexport { OfflineStoreApis };\n"],"mappings":"
|
|
1
|
+
{"version":3,"names":["_components","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_hooks","_native","_contexts","_emojiData","_icons","_types","_patchMessageTextCommand","_Streami18n","_utils","_StreamChatRN","_en","_interopRequireDefault","_fr","_hi","_it","_nl","_ru","_tr","_he","_QuickSqliteClient","_version","OfflineStoreApis","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","desc","set"],"sources":["index.ts"],"sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo, iOS14RefreshGallerySelection } from './native';\nexport * from './contexts';\nexport * from './emoji-data';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/patchMessageTextCommand';\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\nexport * from './utils/StreamChatRN';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n\nimport * as OfflineStoreApis from './store/apis';\nexport { OfflineStoreApis };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAb,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,MAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,MAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,MAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,MAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AACA,IAAAU,OAAA,GAAAd,OAAA;AACA,IAAAe,SAAA,G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AA,EAAArC,GAAA,cAAA6C,IAAA,KAAAA,IAAA,CAAArC,GAAA,IAAAqC,IAAA,CAAAC,GAAA,KAAAjD,MAAA,CAAAS,cAAA,CAAAoC,MAAA,EAAA1C,GAAA,EAAA6C,IAAA,YAAAH,MAAA,CAAA1C,GAAA,IAAAqC,GAAA,CAAArC,GAAA,SAAA0C,MAAA,cAAAL,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAM,GAAA,CAAAT,GAAA,EAAAK,MAAA,YAAAA,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DEFAULT_GLOBAL_STREAM_CONFIG","resizableCDNHosts","StreamChatRN","_classCallCheck2","_createClass2","key","value","setConfig","config","_extends2","exports"],"sources":["StreamChatRN.ts"],"sourcesContent":["type StreamConfig = {\n resizableCDNHosts: string[];\n};\nconst DEFAULT_GLOBAL_STREAM_CONFIG = {\n resizableCDNHosts: ['.stream-io-cdn.com'],\n};\n\n/**\n * StreamChatRN - Global config for the RN Chat SDK\n * This config is used to enable/disable features and options for the SDK.\n */\nexport class StreamChatRN {\n /**\n * Global config for StreamChatRN.\n */\n static config: StreamConfig = DEFAULT_GLOBAL_STREAM_CONFIG;\n /**\n * Set global config for StreamChatRN allows you to set wished CDN hosts for resizing images.\n * This function accepts an config object that will be merged with the default config.\n * @example StreamChatRN.setConfig({ resizableCDNHosts: ['my-custom-cdn.com', 'my-other-cdn.com'] });\n */\n static setConfig(config: Partial<StreamConfig>) {\n this.config = { ...this.config, ...config };\n }\n}\n"],"mappings":";;;;;;;;AAGA,IAAMA,4BAA4B,GAAG;EACnCC,iBAAiB,EAAE,CAAC,oBAAoB;AAC1C,CAAC;AAAC,
|
|
1
|
+
{"version":3,"names":["DEFAULT_GLOBAL_STREAM_CONFIG","resizableCDNHosts","StreamChatRN","_classCallCheck2","_createClass2","key","value","setConfig","config","_extends2","exports"],"sources":["StreamChatRN.ts"],"sourcesContent":["type StreamConfig = {\n resizableCDNHosts: string[];\n};\nconst DEFAULT_GLOBAL_STREAM_CONFIG = {\n resizableCDNHosts: ['.stream-io-cdn.com'],\n};\n\n/**\n * StreamChatRN - Global config for the RN Chat SDK\n * This config is used to enable/disable features and options for the SDK.\n *\n * @deprecated Use the `resizableCDNHosts` prop in the `Chat` component, instead. StreamChatRN will not be exposed starting the next major release.\n */\nexport class StreamChatRN {\n /**\n * Global config for StreamChatRN.\n */\n static config: StreamConfig = DEFAULT_GLOBAL_STREAM_CONFIG;\n /**\n * Set global config for StreamChatRN allows you to set wished CDN hosts for resizing images.\n * This function accepts an config object that will be merged with the default config.\n * @example StreamChatRN.setConfig({ resizableCDNHosts: ['my-custom-cdn.com', 'my-other-cdn.com'] });\n */\n static setConfig(config: Partial<StreamConfig>) {\n this.config = { ...this.config, ...config };\n }\n}\n"],"mappings":";;;;;;;;AAGA,IAAMA,4BAA4B,GAAG;EACnCC,iBAAiB,EAAE,CAAC,oBAAoB;AAC1C,CAAC;AAAC,IAQWC,YAAY;EAAA,SAAAA,aAAA;IAAA,IAAAC,gBAAA,mBAAAD,YAAA;EAAA;EAAA,IAAAE,aAAA,aAAAF,YAAA;IAAAG,GAAA;IAAAC,KAAA,EAUvB,SAAAC,UAAiBC,MAA6B,EAAE;MAC9C,IAAI,CAACA,MAAM,OAAAC,SAAA,iBAAQ,IAAI,CAACD,MAAM,EAAKA,MAAM,CAAE;IAC7C;EAAC;EAAA,OAAAN,YAAA;AAAA;AAAAQ,OAAA,CAAAR,YAAA,GAAAA,YAAA;AAZUA,YAAY,CAIhBM,MAAM,GAAiBR,4BAA4B"}
|
|
@@ -16,7 +16,6 @@ var _duration = _interopRequireDefault(require("dayjs/plugin/duration"));
|
|
|
16
16
|
var _AttachmentPickerItem = require("./components/AttachmentPickerItem");
|
|
17
17
|
var _AttachmentPickerContext = require("../../contexts/attachmentPickerContext/AttachmentPickerContext");
|
|
18
18
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
19
|
-
var _TranslationContext = require("../../contexts/translationContext/TranslationContext");
|
|
20
19
|
var _useViewport2 = require("../../hooks/useViewport");
|
|
21
20
|
var _native = require("../../native");
|
|
22
21
|
var _this = this,
|
|
@@ -38,6 +37,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
38
37
|
attachmentPickerErrorButtonText = props.attachmentPickerErrorButtonText,
|
|
39
38
|
AttachmentPickerErrorImage = props.AttachmentPickerErrorImage,
|
|
40
39
|
attachmentPickerErrorText = props.attachmentPickerErrorText,
|
|
40
|
+
AttachmentPickerIOSSelectMorePhotos = props.AttachmentPickerIOSSelectMorePhotos,
|
|
41
41
|
ImageOverlaySelectedComponent = props.ImageOverlaySelectedComponent,
|
|
42
42
|
numberOfAttachmentImagesToLoadPerCall = props.numberOfAttachmentImagesToLoadPerCall,
|
|
43
43
|
numberOfAttachmentPickerImageColumns = props.numberOfAttachmentPickerImageColumns,
|
|
@@ -82,8 +82,6 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
82
82
|
photos = _useState10[0],
|
|
83
83
|
setPhotos = _useState10[1];
|
|
84
84
|
var attemptedToLoadPhotosOnOpenRef = (0, _react.useRef)(false);
|
|
85
|
-
var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
|
|
86
|
-
t = _useTranslationContex.t;
|
|
87
85
|
var getMorePhotos = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
|
|
88
86
|
var endCursor, results;
|
|
89
87
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
@@ -251,17 +249,15 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
251
249
|
__self: _this,
|
|
252
250
|
__source: {
|
|
253
251
|
fileName: _jsxFileName,
|
|
254
|
-
lineNumber:
|
|
252
|
+
lineNumber: 301,
|
|
255
253
|
columnNumber: 9
|
|
256
254
|
}
|
|
257
|
-
}, iOSLimited && _react["default"].createElement(
|
|
258
|
-
onPress: _native.iOS14RefreshGallerySelection,
|
|
259
|
-
title: t('Select More Photos'),
|
|
255
|
+
}, iOSLimited && _react["default"].createElement(AttachmentPickerIOSSelectMorePhotos, {
|
|
260
256
|
__self: _this,
|
|
261
257
|
__source: {
|
|
262
258
|
fileName: _jsxFileName,
|
|
263
|
-
lineNumber:
|
|
264
|
-
columnNumber:
|
|
259
|
+
lineNumber: 317,
|
|
260
|
+
columnNumber: 26
|
|
265
261
|
}
|
|
266
262
|
}), _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
|
|
267
263
|
contentContainerStyle: [styles.container, {
|
|
@@ -279,7 +275,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
279
275
|
__self: _this,
|
|
280
276
|
__source: {
|
|
281
277
|
fileName: _jsxFileName,
|
|
282
|
-
lineNumber:
|
|
278
|
+
lineNumber: 318,
|
|
283
279
|
columnNumber: 11
|
|
284
280
|
}
|
|
285
281
|
})), selectedPicker === 'images' && photoError && _react["default"].createElement(AttachmentPickerError, {
|
|
@@ -290,7 +286,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
290
286
|
__self: _this,
|
|
291
287
|
__source: {
|
|
292
288
|
fileName: _jsxFileName,
|
|
293
|
-
lineNumber:
|
|
289
|
+
lineNumber: 333,
|
|
294
290
|
columnNumber: 11
|
|
295
291
|
}
|
|
296
292
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_TranslationContext","_useViewport2","_native","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dayjs","extend","duration","styles","StyleSheet","create","container","flexGrow","fullScreenHeight","Dimensions","height","AttachmentPicker","React","forwardRef","props","ref","AttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","attachmentPickerErrorText","ImageOverlaySelectedComponent","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","translucentStatusBar","_useTheme","useTheme","_useTheme$theme","theme","bottomSheetContentContainer","attachmentPicker","white","colors","_useAttachmentPickerC","useAttachmentPickerContext","closePicker","maxNumberOfFiles","selectedFiles","selectedImages","selectedPicker","setSelectedFiles","setSelectedImages","setSelectedPicker","topInset","_useViewport","useViewport","vh","screenHeight","_useState","useState","_useState2","_slicedToArray2","currentIndex","setCurrentIndex","endCursorRef","useRef","_useState3","_useState4","photoError","setPhotoError","_useState5","_useState6","iOSLimited","setIosLimited","hasNextPageRef","_useState7","_useState8","loadingPhotos","setLoadingPhotos","_useState9","_useState10","photos","setPhotos","attemptedToLoadPhotosOnOpenRef","_useTranslationContex","useTranslationContext","t","getMorePhotos","useCallback","_asyncToGenerator2","_regenerator","mark","_callee","endCursor","results","wrap","_callee$","_context","prev","next","current","getPhotos","after","first","sent","prevPhotos","concat","_toConsumableArray2","assets","hasNextPage","t0","stop","getMorePhotosRef","useEffect","_oniOS14GalleryLibrar","oniOS14GalleryLibrarySelectionChange","undefined","unsubscribe","backAction","backHandler","BackHandler","addEventListener","remove","onKeyboardOpenHandler","keyboardShowEvent","Platform","OS","keyboardSubscription","Keyboard","addListener","removeListener","selectedPhotos","map","asset","numberOfUploads","length","selected","some","image","id","uri","file","handleHeight","getAndroidBottomBarHeightAdjustment","_StatusBar$currentHei","statusBarHeight","StatusBar","currentHeight","bottomBarHeight","getInitialSnapPoint","initialSnapPoint","finalSnapPoint","snapPoints","useMemo","createElement","Fragment","containerHeight","enablePanDownToClose","handleComponent","index","onChange","__self","__source","fileName","lineNumber","columnNumber","Button","onPress","iOS14RefreshGallerySelection","title","BottomSheetFlatList","contentContainerStyle","backgroundColor","opacity","data","keyExtractor","item","numColumns","onEndReached","renderItem","renderAttachmentPickerItem","exports","displayName"],"sources":["AttachmentPicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport {\n BackHandler,\n Button,\n Dimensions,\n Keyboard,\n Platform,\n StatusBar,\n StyleSheet,\n} from 'react-native';\n\nimport BottomSheet, { BottomSheetFlatList, BottomSheetHandleProps } from '@gorhom/bottom-sheet';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\n\nimport type { AttachmentPickerErrorProps } from './components/AttachmentPickerError';\n\nimport { renderAttachmentPickerItem } from './components/AttachmentPickerItem';\n\nimport { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useTranslationContext } from '../../contexts/translationContext/TranslationContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport {\n getPhotos,\n iOS14RefreshGallerySelection,\n oniOS14GalleryLibrarySelectionChange,\n} from '../../native';\nimport type { Asset } from '../../types/types';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst fullScreenHeight = Dimensions.get('window').height;\n\nexport type AttachmentPickerProps = {\n /**\n * Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) of attachment picker.\n *\n * **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)\n */\n AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;\n /**\n * Custom UI component to render error component while opening attachment picker.\n *\n * **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)\n */\n AttachmentPickerError: React.ComponentType<AttachmentPickerErrorProps>;\n /**\n * Custom UI component to render error image for attachment picker\n *\n * **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)\n */\n AttachmentPickerErrorImage: React.ComponentType;\n /**\n * Custom UI component to render overlay component, that shows up on top of [selected image](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) (with tick mark)\n *\n * **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)\n */\n ImageOverlaySelectedComponent: React.ComponentType;\n attachmentPickerBottomSheetHandleHeight?: number;\n attachmentPickerBottomSheetHeight?: number;\n attachmentPickerErrorButtonText?: string;\n attachmentPickerErrorText?: string;\n numberOfAttachmentImagesToLoadPerCall?: number;\n numberOfAttachmentPickerImageColumns?: number;\n translucentStatusBar?: boolean;\n};\n\nexport const AttachmentPicker = React.forwardRef(\n (props: AttachmentPickerProps, ref: React.ForwardedRef<BottomSheet>) => {\n const {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n } = props;\n\n const {\n theme: {\n attachmentPicker: { bottomSheetContentContainer },\n colors: { white },\n },\n } = useTheme();\n const {\n closePicker,\n maxNumberOfFiles,\n selectedFiles,\n selectedImages,\n selectedPicker,\n setSelectedFiles,\n setSelectedImages,\n setSelectedPicker,\n topInset,\n } = useAttachmentPickerContext();\n const { vh } = useViewport();\n\n const screenHeight = vh(100);\n\n const [currentIndex, setCurrentIndex] = useState(-1);\n const endCursorRef = useRef<string>();\n const [photoError, setPhotoError] = useState(false);\n const [iOSLimited, setIosLimited] = useState(false);\n const hasNextPageRef = useRef(true);\n const [loadingPhotos, setLoadingPhotos] = useState(false);\n const [photos, setPhotos] = useState<Asset[]>([]);\n const attemptedToLoadPhotosOnOpenRef = useRef(false);\n const { t } = useTranslationContext();\n\n const getMorePhotos = useCallback(async () => {\n if (\n hasNextPageRef.current &&\n !loadingPhotos &&\n currentIndex > -1 &&\n selectedPicker === 'images'\n ) {\n setPhotoError(false);\n setLoadingPhotos(true);\n const endCursor = endCursorRef.current;\n try {\n const results = await getPhotos({\n after: endCursor,\n first: numberOfAttachmentImagesToLoadPerCall ?? 60,\n });\n endCursorRef.current = results.endCursor;\n setPhotos((prevPhotos) =>\n endCursor ? [...prevPhotos, ...results.assets] : results.assets,\n );\n setIosLimited(results.iOSLimited);\n hasNextPageRef.current = !!results.hasNextPage;\n } catch (error) {\n setPhotoError(true);\n }\n setLoadingPhotos(false);\n }\n }, [currentIndex, selectedPicker, loadingPhotos]);\n\n // we need to use ref here to avoid running effect when getMorePhotos changes\n const getMorePhotosRef = useRef(getMorePhotos);\n getMorePhotosRef.current = getMorePhotos;\n\n useEffect(() => {\n if (selectedPicker !== 'images') return;\n // ios 14 library selection change event is fired when user reselects the images that are permitted to be readable by the app\n const { unsubscribe } = oniOS14GalleryLibrarySelectionChange(() => {\n // we reset the cursor and has next page to true to facilitate fetching of the first page of photos again\n hasNextPageRef.current = true;\n endCursorRef.current = undefined;\n // fetch the first page of photos again\n getMorePhotosRef.current();\n });\n return unsubscribe;\n }, [selectedPicker]);\n\n useEffect(() => {\n const backAction = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [selectedPicker, closePicker]);\n\n useEffect(() => {\n const onKeyboardOpenHandler = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n }\n closePicker();\n };\n const keyboardShowEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const keyboardSubscription = Keyboard.addListener(keyboardShowEvent, onKeyboardOpenHandler);\n\n return () => {\n if (keyboardSubscription?.remove) {\n keyboardSubscription.remove();\n return;\n }\n\n // To keep compatibility with older versions of React Native, where `remove()` is not available\n Keyboard.removeListener(keyboardShowEvent, onKeyboardOpenHandler);\n };\n }, [closePicker, selectedPicker]);\n\n useEffect(() => {\n if (currentIndex < 0) {\n setSelectedPicker(undefined);\n if (!loadingPhotos) {\n endCursorRef.current = undefined;\n hasNextPageRef.current = true;\n attemptedToLoadPhotosOnOpenRef.current = false;\n setPhotoError(false);\n }\n }\n }, [currentIndex, loadingPhotos]);\n\n useEffect(() => {\n if (\n !attemptedToLoadPhotosOnOpenRef.current &&\n selectedPicker === 'images' &&\n endCursorRef.current === undefined &&\n currentIndex > -1 &&\n !loadingPhotos\n ) {\n getMorePhotos();\n // we do this only once on open for avoiding to request permissions in rationale dialog again and again on Android\n attemptedToLoadPhotosOnOpenRef.current = true;\n }\n }, [currentIndex, selectedPicker, getMorePhotos, loadingPhotos]);\n\n const selectedPhotos = photos.map((asset) => ({\n asset,\n ImageOverlaySelectedComponent,\n maxNumberOfFiles,\n numberOfAttachmentPickerImageColumns,\n numberOfUploads: selectedFiles.length + selectedImages.length,\n // `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`\n selected:\n selectedImages.some((image) =>\n image.id ? image.id === asset.id : image.uri === asset.uri,\n ) ||\n selectedFiles.some((file) => (file.id ? file.id === asset.id : file.uri === asset.uri)),\n selectedFiles,\n selectedImages,\n setSelectedFiles,\n setSelectedImages,\n }));\n\n const handleHeight = attachmentPickerBottomSheetHandleHeight || 20;\n\n /**\n * This is to handle issues with Android measurements coming back incorrect.\n * If the StatusBar height is perfectly 1/2 of the difference between the two\n * dimensions for screen and window, it is incorrect and we need to account for\n * this. If you use a translucent header bar more adjustments are needed.\n */\n const getAndroidBottomBarHeightAdjustment = (): number => {\n if (Platform.OS === 'android') {\n const statusBarHeight = StatusBar.currentHeight ?? 0;\n const bottomBarHeight = fullScreenHeight - screenHeight - statusBarHeight;\n if (bottomBarHeight === statusBarHeight) {\n return translucentStatusBar ? 0 : statusBarHeight;\n } else {\n if (translucentStatusBar) {\n if (bottomBarHeight > statusBarHeight) {\n return -bottomBarHeight + statusBarHeight;\n } else {\n return bottomBarHeight > 0 ? -statusBarHeight : 0;\n }\n } else {\n return bottomBarHeight > 0 ? 0 : statusBarHeight;\n }\n }\n }\n return 0;\n };\n\n const getInitialSnapPoint = (): number => {\n if (attachmentPickerBottomSheetHeight !== undefined) {\n return attachmentPickerBottomSheetHeight;\n }\n if (Platform.OS === 'android') {\n return (\n 308 +\n (fullScreenHeight - screenHeight + getAndroidBottomBarHeightAdjustment()) -\n handleHeight\n );\n } else {\n return 308 + (fullScreenHeight - screenHeight);\n }\n };\n\n const initialSnapPoint = getInitialSnapPoint();\n\n const finalSnapPoint =\n Platform.OS === 'android'\n ? fullScreenHeight - topInset - handleHeight\n : fullScreenHeight - topInset;\n\n /**\n * Snap points changing cause a rerender of the position,\n * this is an issue if you are calling close on the bottom sheet.\n */\n const snapPoints = useMemo(\n () => [initialSnapPoint, finalSnapPoint],\n [initialSnapPoint, finalSnapPoint],\n );\n\n return (\n <>\n <BottomSheet\n containerHeight={fullScreenHeight}\n enablePanDownToClose={true}\n handleComponent={\n /**\n * using `null` here instead of `style={{ opacity: photoError ? 0 : 1 }}`\n * as opacity is not an allowed style\n */\n photoError ? null : AttachmentPickerBottomSheetHandle\n }\n handleHeight={handleHeight}\n index={-1}\n onChange={setCurrentIndex}\n ref={ref}\n snapPoints={snapPoints}\n >\n {iOSLimited && (\n <Button onPress={iOS14RefreshGallerySelection} title={t('Select More Photos')} />\n )}\n <BottomSheetFlatList\n contentContainerStyle={[\n styles.container,\n { backgroundColor: white },\n bottomSheetContentContainer,\n { opacity: photoError ? 0 : 1 },\n ]}\n data={selectedPhotos}\n keyExtractor={(item) => item.asset.uri}\n numColumns={numberOfAttachmentPickerImageColumns ?? 3}\n onEndReached={photoError ? undefined : getMorePhotos}\n renderItem={renderAttachmentPickerItem}\n />\n </BottomSheet>\n {selectedPicker === 'images' && photoError && (\n <AttachmentPickerError\n attachmentPickerBottomSheetHeight={initialSnapPoint}\n attachmentPickerErrorButtonText={attachmentPickerErrorButtonText}\n AttachmentPickerErrorImage={AttachmentPickerErrorImage}\n attachmentPickerErrorText={attachmentPickerErrorText}\n />\n )}\n </>\n );\n },\n);\n\nAttachmentPicker.displayName = 'AttachmentPicker';\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAIA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,mBAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,OAAA,GAAAX,OAAA;AAIsB,IAAAY,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAhB,wBAAAoB,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ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":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_bottomSheet","_dayjs","_interopRequireDefault","_duration","_AttachmentPickerItem","_AttachmentPickerContext","_ThemeContext","_useViewport2","_native","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","dayjs","extend","duration","styles","StyleSheet","create","container","flexGrow","fullScreenHeight","Dimensions","height","AttachmentPicker","React","forwardRef","props","ref","AttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","attachmentPickerErrorText","AttachmentPickerIOSSelectMorePhotos","ImageOverlaySelectedComponent","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","translucentStatusBar","_useTheme","useTheme","_useTheme$theme","theme","bottomSheetContentContainer","attachmentPicker","white","colors","_useAttachmentPickerC","useAttachmentPickerContext","closePicker","maxNumberOfFiles","selectedFiles","selectedImages","selectedPicker","setSelectedFiles","setSelectedImages","setSelectedPicker","topInset","_useViewport","useViewport","vh","screenHeight","_useState","useState","_useState2","_slicedToArray2","currentIndex","setCurrentIndex","endCursorRef","useRef","_useState3","_useState4","photoError","setPhotoError","_useState5","_useState6","iOSLimited","setIosLimited","hasNextPageRef","_useState7","_useState8","loadingPhotos","setLoadingPhotos","_useState9","_useState10","photos","setPhotos","attemptedToLoadPhotosOnOpenRef","getMorePhotos","useCallback","_asyncToGenerator2","_regenerator","mark","_callee","endCursor","results","wrap","_callee$","_context","prev","next","current","getPhotos","after","first","sent","prevPhotos","concat","_toConsumableArray2","assets","hasNextPage","t0","stop","getMorePhotosRef","useEffect","_oniOS14GalleryLibrar","oniOS14GalleryLibrarySelectionChange","undefined","unsubscribe","backAction","backHandler","BackHandler","addEventListener","remove","onKeyboardOpenHandler","keyboardShowEvent","Platform","OS","keyboardSubscription","Keyboard","addListener","removeListener","selectedPhotos","map","asset","numberOfUploads","length","selected","some","image","id","uri","file","handleHeight","getAndroidBottomBarHeightAdjustment","_StatusBar$currentHei","statusBarHeight","StatusBar","currentHeight","bottomBarHeight","getInitialSnapPoint","initialSnapPoint","finalSnapPoint","snapPoints","useMemo","createElement","Fragment","containerHeight","enablePanDownToClose","handleComponent","index","onChange","__self","__source","fileName","lineNumber","columnNumber","BottomSheetFlatList","contentContainerStyle","backgroundColor","opacity","data","keyExtractor","item","numColumns","onEndReached","renderItem","renderAttachmentPickerItem","exports","displayName"],"sources":["AttachmentPicker.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { BackHandler, Dimensions, Keyboard, Platform, StatusBar, StyleSheet } from 'react-native';\n\nimport BottomSheet, { BottomSheetFlatList, BottomSheetHandleProps } from '@gorhom/bottom-sheet';\nimport dayjs from 'dayjs';\nimport duration from 'dayjs/plugin/duration';\n\nimport type { AttachmentPickerErrorProps } from './components/AttachmentPickerError';\n\nimport { renderAttachmentPickerItem } from './components/AttachmentPickerItem';\n\nimport { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { useViewport } from '../../hooks/useViewport';\nimport { getPhotos, oniOS14GalleryLibrarySelectionChange } from '../../native';\nimport type { Asset } from '../../types/types';\n\ndayjs.extend(duration);\n\nconst styles = StyleSheet.create({\n container: {\n flexGrow: 1,\n },\n});\n\nconst fullScreenHeight = Dimensions.get('window').height;\n\nexport type AttachmentPickerProps = {\n /**\n * Custom UI component to render [draggable handle](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) of attachment picker.\n *\n * **Default** [AttachmentPickerBottomSheetHandle](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx)\n */\n AttachmentPickerBottomSheetHandle: React.FC<BottomSheetHandleProps>;\n /**\n * Custom UI component to render error component while opening attachment picker.\n *\n * **Default** [AttachmentPickerError](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerError.tsx)\n */\n AttachmentPickerError: React.ComponentType<AttachmentPickerErrorProps>;\n /**\n * Custom UI component to render error image for attachment picker\n *\n * **Default** [AttachmentPickerErrorImage](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/AttachmentPickerErrorImage.tsx)\n */\n AttachmentPickerErrorImage: React.ComponentType;\n /**\n * Custom UI Component to render select more photos for selected gallery access in iOS.\n */\n AttachmentPickerIOSSelectMorePhotos: React.ComponentType;\n /**\n * Custom UI component to render overlay component, that shows up on top of [selected image](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/1.png) (with tick mark)\n *\n * **Default** [ImageOverlaySelectedComponent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/AttachmentPicker/components/ImageOverlaySelectedComponent.tsx)\n */\n ImageOverlaySelectedComponent: React.ComponentType;\n attachmentPickerBottomSheetHandleHeight?: number;\n attachmentPickerBottomSheetHeight?: number;\n attachmentPickerErrorButtonText?: string;\n attachmentPickerErrorText?: string;\n numberOfAttachmentImagesToLoadPerCall?: number;\n numberOfAttachmentPickerImageColumns?: number;\n translucentStatusBar?: boolean;\n};\n\nexport const AttachmentPicker = React.forwardRef(\n (props: AttachmentPickerProps, ref: React.ForwardedRef<BottomSheet>) => {\n const {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n AttachmentPickerIOSSelectMorePhotos,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n } = props;\n\n const {\n theme: {\n attachmentPicker: { bottomSheetContentContainer },\n colors: { white },\n },\n } = useTheme();\n const {\n closePicker,\n maxNumberOfFiles,\n selectedFiles,\n selectedImages,\n selectedPicker,\n setSelectedFiles,\n setSelectedImages,\n setSelectedPicker,\n topInset,\n } = useAttachmentPickerContext();\n const { vh } = useViewport();\n\n const screenHeight = vh(100);\n\n const [currentIndex, setCurrentIndex] = useState(-1);\n const endCursorRef = useRef<string>();\n const [photoError, setPhotoError] = useState(false);\n const [iOSLimited, setIosLimited] = useState(false);\n const hasNextPageRef = useRef(true);\n const [loadingPhotos, setLoadingPhotos] = useState(false);\n const [photos, setPhotos] = useState<Asset[]>([]);\n const attemptedToLoadPhotosOnOpenRef = useRef(false);\n\n const getMorePhotos = useCallback(async () => {\n if (\n hasNextPageRef.current &&\n !loadingPhotos &&\n currentIndex > -1 &&\n selectedPicker === 'images'\n ) {\n setPhotoError(false);\n setLoadingPhotos(true);\n const endCursor = endCursorRef.current;\n try {\n const results = await getPhotos({\n after: endCursor,\n first: numberOfAttachmentImagesToLoadPerCall ?? 60,\n });\n endCursorRef.current = results.endCursor;\n setPhotos((prevPhotos) =>\n endCursor ? [...prevPhotos, ...results.assets] : results.assets,\n );\n setIosLimited(results.iOSLimited);\n hasNextPageRef.current = !!results.hasNextPage;\n } catch (error) {\n setPhotoError(true);\n }\n setLoadingPhotos(false);\n }\n }, [currentIndex, selectedPicker, loadingPhotos]);\n\n // we need to use ref here to avoid running effect when getMorePhotos changes\n const getMorePhotosRef = useRef(getMorePhotos);\n getMorePhotosRef.current = getMorePhotos;\n\n useEffect(() => {\n if (selectedPicker !== 'images') return;\n // ios 14 library selection change event is fired when user reselects the images that are permitted to be readable by the app\n const { unsubscribe } = oniOS14GalleryLibrarySelectionChange(() => {\n // we reset the cursor and has next page to true to facilitate fetching of the first page of photos again\n hasNextPageRef.current = true;\n endCursorRef.current = undefined;\n // fetch the first page of photos again\n getMorePhotosRef.current();\n });\n return unsubscribe;\n }, [selectedPicker]);\n\n useEffect(() => {\n const backAction = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n closePicker();\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [selectedPicker, closePicker]);\n\n useEffect(() => {\n const onKeyboardOpenHandler = () => {\n if (selectedPicker) {\n setSelectedPicker(undefined);\n }\n closePicker();\n };\n const keyboardShowEvent = Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow';\n const keyboardSubscription = Keyboard.addListener(keyboardShowEvent, onKeyboardOpenHandler);\n\n return () => {\n if (keyboardSubscription?.remove) {\n keyboardSubscription.remove();\n return;\n }\n\n // To keep compatibility with older versions of React Native, where `remove()` is not available\n Keyboard.removeListener(keyboardShowEvent, onKeyboardOpenHandler);\n };\n }, [closePicker, selectedPicker]);\n\n useEffect(() => {\n if (currentIndex < 0) {\n setSelectedPicker(undefined);\n if (!loadingPhotos) {\n endCursorRef.current = undefined;\n hasNextPageRef.current = true;\n attemptedToLoadPhotosOnOpenRef.current = false;\n setPhotoError(false);\n }\n }\n }, [currentIndex, loadingPhotos]);\n\n useEffect(() => {\n if (\n !attemptedToLoadPhotosOnOpenRef.current &&\n selectedPicker === 'images' &&\n endCursorRef.current === undefined &&\n currentIndex > -1 &&\n !loadingPhotos\n ) {\n getMorePhotos();\n // we do this only once on open for avoiding to request permissions in rationale dialog again and again on Android\n attemptedToLoadPhotosOnOpenRef.current = true;\n }\n }, [currentIndex, selectedPicker, getMorePhotos, loadingPhotos]);\n\n const selectedPhotos = photos.map((asset) => ({\n asset,\n ImageOverlaySelectedComponent,\n maxNumberOfFiles,\n numberOfAttachmentPickerImageColumns,\n numberOfUploads: selectedFiles.length + selectedImages.length,\n // `id` is available for Expo MediaLibrary while Cameraroll doesn't share id therefore we use `uri`\n selected:\n selectedImages.some((image) =>\n image.id ? image.id === asset.id : image.uri === asset.uri,\n ) ||\n selectedFiles.some((file) => (file.id ? file.id === asset.id : file.uri === asset.uri)),\n selectedFiles,\n selectedImages,\n setSelectedFiles,\n setSelectedImages,\n }));\n\n const handleHeight = attachmentPickerBottomSheetHandleHeight || 20;\n\n /**\n * This is to handle issues with Android measurements coming back incorrect.\n * If the StatusBar height is perfectly 1/2 of the difference between the two\n * dimensions for screen and window, it is incorrect and we need to account for\n * this. If you use a translucent header bar more adjustments are needed.\n */\n const getAndroidBottomBarHeightAdjustment = (): number => {\n if (Platform.OS === 'android') {\n const statusBarHeight = StatusBar.currentHeight ?? 0;\n const bottomBarHeight = fullScreenHeight - screenHeight - statusBarHeight;\n if (bottomBarHeight === statusBarHeight) {\n return translucentStatusBar ? 0 : statusBarHeight;\n } else {\n if (translucentStatusBar) {\n if (bottomBarHeight > statusBarHeight) {\n return -bottomBarHeight + statusBarHeight;\n } else {\n return bottomBarHeight > 0 ? -statusBarHeight : 0;\n }\n } else {\n return bottomBarHeight > 0 ? 0 : statusBarHeight;\n }\n }\n }\n return 0;\n };\n\n const getInitialSnapPoint = (): number => {\n if (attachmentPickerBottomSheetHeight !== undefined) {\n return attachmentPickerBottomSheetHeight;\n }\n if (Platform.OS === 'android') {\n return (\n 308 +\n (fullScreenHeight - screenHeight + getAndroidBottomBarHeightAdjustment()) -\n handleHeight\n );\n } else {\n return 308 + (fullScreenHeight - screenHeight);\n }\n };\n\n const initialSnapPoint = getInitialSnapPoint();\n\n const finalSnapPoint =\n Platform.OS === 'android'\n ? fullScreenHeight - topInset - handleHeight\n : fullScreenHeight - topInset;\n\n /**\n * Snap points changing cause a rerender of the position,\n * this is an issue if you are calling close on the bottom sheet.\n */\n const snapPoints = useMemo(\n () => [initialSnapPoint, finalSnapPoint],\n [initialSnapPoint, finalSnapPoint],\n );\n\n return (\n <>\n <BottomSheet\n containerHeight={fullScreenHeight}\n enablePanDownToClose={true}\n handleComponent={\n /**\n * using `null` here instead of `style={{ opacity: photoError ? 0 : 1 }}`\n * as opacity is not an allowed style\n */\n photoError ? null : AttachmentPickerBottomSheetHandle\n }\n handleHeight={handleHeight}\n index={-1}\n onChange={setCurrentIndex}\n ref={ref}\n snapPoints={snapPoints}\n >\n {iOSLimited && <AttachmentPickerIOSSelectMorePhotos />}\n <BottomSheetFlatList\n contentContainerStyle={[\n styles.container,\n { backgroundColor: white },\n bottomSheetContentContainer,\n { opacity: photoError ? 0 : 1 },\n ]}\n data={selectedPhotos}\n keyExtractor={(item) => item.asset.uri}\n numColumns={numberOfAttachmentPickerImageColumns ?? 3}\n onEndReached={photoError ? undefined : getMorePhotos}\n renderItem={renderAttachmentPickerItem}\n />\n </BottomSheet>\n {selectedPicker === 'images' && photoError && (\n <AttachmentPickerError\n attachmentPickerBottomSheetHeight={initialSnapPoint}\n attachmentPickerErrorButtonText={attachmentPickerErrorButtonText}\n AttachmentPickerErrorImage={AttachmentPickerErrorImage}\n attachmentPickerErrorText={attachmentPickerErrorText}\n />\n )}\n </>\n );\n },\n);\n\nAttachmentPicker.displayName = 'AttachmentPicker';\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AACA,IAAAG,MAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAD,sBAAA,CAAAJ,OAAA;AAIA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,wBAAA,GAAAP,OAAA;AACA,IAAAQ,aAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,OAAA,GAAAV,OAAA;AAA+E,IAAAW,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAf,wBA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AACY,OAAA,CAAA5J,gBAAA,GAAAA,gBAAA;AAEFA,gBAAgB,CAAC6J,WAAW,GAAG,kBAAkB"}
|
package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.AttachmentPickerIOSSelectMorePhotos = void 0;
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _TranslationContext = require("../../../contexts/translationContext/TranslationContext");
|
|
9
|
+
var _native = require("../../../native");
|
|
10
|
+
var _this = this,
|
|
11
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx";
|
|
12
|
+
var AttachmentPickerIOSSelectMorePhotos = function AttachmentPickerIOSSelectMorePhotos() {
|
|
13
|
+
var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
|
|
14
|
+
t = _useTranslationContex.t;
|
|
15
|
+
return _react["default"].createElement(_reactNative.Button, {
|
|
16
|
+
onPress: _native.iOS14RefreshGallerySelection,
|
|
17
|
+
title: t('Select More Photos'),
|
|
18
|
+
__self: _this,
|
|
19
|
+
__source: {
|
|
20
|
+
fileName: _jsxFileName,
|
|
21
|
+
lineNumber: 9,
|
|
22
|
+
columnNumber: 10
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
exports.AttachmentPickerIOSSelectMorePhotos = AttachmentPickerIOSSelectMorePhotos;
|
|
27
|
+
//# sourceMappingURL=AttachmentPickerIOSSelectMorePhotos.js.map
|
package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_TranslationContext","_native","_this","_jsxFileName","AttachmentPickerIOSSelectMorePhotos","_useTranslationContex","useTranslationContext","t","createElement","Button","onPress","iOS14RefreshGallerySelection","title","__self","__source","fileName","lineNumber","columnNumber","exports"],"sources":["AttachmentPickerIOSSelectMorePhotos.tsx"],"sourcesContent":["import React from 'react';\nimport { Button } from 'react-native';\n\nimport { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';\nimport { iOS14RefreshGallerySelection } from '../../../native';\n\nexport const AttachmentPickerIOSSelectMorePhotos = () => {\n const { t } = useTranslationContext();\n return <Button onPress={iOS14RefreshGallerySelection} title={t('Select More Photos')} />;\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAExD,IAAMC,mCAAmC,GAAG,SAAtCA,mCAAmCA,CAAA,EAAS;EACvD,IAAAC,qBAAA,GAAc,IAAAC,yCAAqB,EAAC,CAAC;IAA7BC,CAAC,GAAAF,qBAAA,CAADE,CAAC;EACT,OAAOX,MAAA,YAAAY,aAAA,CAACT,YAAA,CAAAU,MAAM;IAACC,OAAO,EAAEC,oCAA6B;IAACC,KAAK,EAAEL,CAAC,CAAC,oBAAoB,CAAE;IAAAM,MAAA,EAAAX,KAAA;IAAAY,QAAA;MAAAC,QAAA,EAAAZ,YAAA;MAAAa,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAAC;AAC1F,CAAC;AAACC,OAAA,CAAAd,mCAAA,GAAAA,mCAAA"}
|
|
@@ -24,6 +24,7 @@ var _init = _interopRequireDefault(require("../../init"));
|
|
|
24
24
|
var _native = require("../../native");
|
|
25
25
|
var _QuickSqliteClient = require("../../store/QuickSqliteClient");
|
|
26
26
|
var _DBSyncManager = require("../../utils/DBSyncManager");
|
|
27
|
+
var _StreamChatRN = require("../../utils/StreamChatRN");
|
|
27
28
|
var _version = require("../../version.json");
|
|
28
29
|
var _this = this,
|
|
29
30
|
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Chat/Chat.tsx";
|
|
@@ -41,6 +42,8 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
41
42
|
i18nInstance = props.i18nInstance,
|
|
42
43
|
_props$ImageComponent = props.ImageComponent,
|
|
43
44
|
ImageComponent = _props$ImageComponent === void 0 ? _reactNative.Image : _props$ImageComponent,
|
|
45
|
+
_props$resizableCDNHo = props.resizableCDNHosts,
|
|
46
|
+
resizableCDNHosts = _props$resizableCDNHo === void 0 ? ['.stream-io-cdn.com'] : _props$resizableCDNHo,
|
|
44
47
|
style = props.style;
|
|
45
48
|
var _useState = (0, _react.useState)(),
|
|
46
49
|
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
@@ -57,6 +60,9 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
57
60
|
var mutedUsers = (0, _useMutedUsers.useMutedUsers)(client);
|
|
58
61
|
var debugRef = (0, _DebugContext.useDebugContext)();
|
|
59
62
|
var isDebugModeEnabled = __DEV__ && debugRef && debugRef.current;
|
|
63
|
+
_StreamChatRN.StreamChatRN.setConfig({
|
|
64
|
+
resizableCDNHosts: resizableCDNHosts
|
|
65
|
+
});
|
|
60
66
|
(0, _react.useEffect)(function () {
|
|
61
67
|
if (client) {
|
|
62
68
|
client.setUserAgent(_native.SDK + "-" + _reactNative.Platform.OS + "-" + _version.version);
|
|
@@ -93,6 +99,7 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
93
99
|
ImageComponent: ImageComponent,
|
|
94
100
|
isOnline: isOnline,
|
|
95
101
|
mutedUsers: mutedUsers,
|
|
102
|
+
resizableCDNHosts: resizableCDNHosts,
|
|
96
103
|
setActiveChannel: setActiveChannel
|
|
97
104
|
});
|
|
98
105
|
(0, _useSyncDatabase.useSyncDatabase)({
|
|
@@ -108,7 +115,7 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
108
115
|
__self: _this,
|
|
109
116
|
__source: {
|
|
110
117
|
fileName: _jsxFileName,
|
|
111
|
-
lineNumber:
|
|
118
|
+
lineNumber: 232,
|
|
112
119
|
columnNumber: 5
|
|
113
120
|
}
|
|
114
121
|
}, _react["default"].createElement(_TranslationContext.TranslationProvider, {
|
|
@@ -118,7 +125,7 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
118
125
|
__self: _this,
|
|
119
126
|
__source: {
|
|
120
127
|
fileName: _jsxFileName,
|
|
121
|
-
lineNumber:
|
|
128
|
+
lineNumber: 233,
|
|
122
129
|
columnNumber: 7
|
|
123
130
|
}
|
|
124
131
|
}, _react["default"].createElement(_ThemeContext.ThemeProvider, {
|
|
@@ -126,14 +133,14 @@ var ChatWithContext = function ChatWithContext(props) {
|
|
|
126
133
|
__self: _this,
|
|
127
134
|
__source: {
|
|
128
135
|
fileName: _jsxFileName,
|
|
129
|
-
lineNumber:
|
|
136
|
+
lineNumber: 236,
|
|
130
137
|
columnNumber: 9
|
|
131
138
|
}
|
|
132
139
|
}, _react["default"].createElement(_ChannelsStateContext.ChannelsStateProvider, {
|
|
133
140
|
__self: _this,
|
|
134
141
|
__source: {
|
|
135
142
|
fileName: _jsxFileName,
|
|
136
|
-
lineNumber:
|
|
143
|
+
lineNumber: 237,
|
|
137
144
|
columnNumber: 11
|
|
138
145
|
}
|
|
139
146
|
}, children))));
|
|
@@ -147,7 +154,7 @@ var Chat = function Chat(props) {
|
|
|
147
154
|
__self: _this,
|
|
148
155
|
__source: {
|
|
149
156
|
fileName: _jsxFileName,
|
|
150
|
-
lineNumber:
|
|
157
|
+
lineNumber: 272,
|
|
151
158
|
columnNumber: 10
|
|
152
159
|
}
|
|
153
160
|
}));
|