stream-chat-react-native-core 5.21.0-beta.2 → 5.21.0-beta.3
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 +34 -17
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/i18n/en.json +1 -0
- package/lib/commonjs/i18n/fr.json +33 -32
- package/lib/commonjs/i18n/he.json +1 -0
- package/lib/commonjs/i18n/hi.json +33 -32
- package/lib/commonjs/i18n/it.json +33 -32
- package/lib/commonjs/i18n/ja.json +1 -0
- package/lib/commonjs/i18n/ko.json +1 -0
- package/lib/commonjs/i18n/nl.json +33 -32
- package/lib/commonjs/i18n/ru.json +33 -32
- package/lib/commonjs/i18n/tr.json +33 -32
- package/lib/commonjs/native.js +6 -1
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +34 -17
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/i18n/en.json +1 -0
- package/lib/module/i18n/fr.json +33 -32
- package/lib/module/i18n/he.json +1 -0
- package/lib/module/i18n/hi.json +33 -32
- package/lib/module/i18n/it.json +33 -32
- package/lib/module/i18n/ja.json +1 -0
- package/lib/module/i18n/ko.json +1 -0
- package/lib/module/i18n/nl.json +33 -32
- package/lib/module/i18n/ru.json +33 -32
- package/lib/module/i18n/tr.json +33 -32
- package/lib/module/native.js +6 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/i18n/en.json +1 -0
- package/lib/typescript/i18n/fr.json +33 -32
- package/lib/typescript/i18n/he.json +1 -0
- package/lib/typescript/i18n/hi.json +33 -32
- package/lib/typescript/i18n/it.json +33 -32
- package/lib/typescript/i18n/ja.json +1 -0
- package/lib/typescript/i18n/ko.json +1 -0
- package/lib/typescript/i18n/nl.json +33 -32
- package/lib/typescript/i18n/ru.json +33 -32
- package/lib/typescript/i18n/tr.json +33 -32
- package/lib/typescript/native.d.ts +4 -0
- package/lib/typescript/utils/Streami18n.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +21 -2
- package/src/i18n/en.json +1 -0
- package/src/i18n/fr.json +33 -32
- package/src/i18n/he.json +1 -0
- package/src/i18n/hi.json +33 -32
- package/src/i18n/it.json +33 -32
- package/src/i18n/ja.json +1 -0
- package/src/i18n/ko.json +1 -0
- package/src/i18n/nl.json +33 -32
- package/src/i18n/ru.json +33 -32
- package/src/i18n/tr.json +33 -32
- package/src/native.ts +9 -0
- package/src/version.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "1 Antwoord",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "",
|
|
5
|
-
"Also send to channel": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "Geef toegang tot uw galerij",
|
|
5
|
+
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
7
7
|
"Block User": "",
|
|
8
8
|
"Cancel": "",
|
|
@@ -14,57 +14,58 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Emoji-overeenkomsten",
|
|
17
|
-
"Empty message...": "
|
|
18
|
-
"Error loading": "
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
17
|
+
"Empty message...": "",
|
|
18
|
+
"Error loading": "",
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Directe Opdrachten",
|
|
27
|
-
"Links are disabled": "
|
|
27
|
+
"Links are disabled": "",
|
|
28
28
|
"Loading channels...": "",
|
|
29
29
|
"Loading messages...": "",
|
|
30
30
|
"Loading...": "",
|
|
31
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
31
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
32
32
|
"Message Reactions": "Bericht Reacties",
|
|
33
|
-
"Message deleted": "
|
|
33
|
+
"Message deleted": "",
|
|
34
34
|
"Message flagged": "",
|
|
35
35
|
"Mute User": "",
|
|
36
|
-
"Not supported": "",
|
|
37
|
-
"Nothing yet...": "
|
|
36
|
+
"Not supported": "niet ondersteund",
|
|
37
|
+
"Nothing yet...": "",
|
|
38
38
|
"Ok": "",
|
|
39
|
-
"Only visible to you": "
|
|
39
|
+
"Only visible to you": "",
|
|
40
40
|
"Photo": "Foto",
|
|
41
|
-
"Photos and Videos": "",
|
|
41
|
+
"Photos and Videos": "Foto's en video's",
|
|
42
42
|
"Pin to Conversation": "",
|
|
43
|
-
"Pinned by": "
|
|
44
|
-
"Please enable access to your photos and videos so you can share them.": "",
|
|
45
|
-
"Please select a channel first": "
|
|
46
|
-
"Reconnecting...": "
|
|
43
|
+
"Pinned by": "",
|
|
44
|
+
"Please enable access to your photos and videos so you can share them.": "Schakel toegang tot uw foto's en video's in zodat u ze kunt delen.",
|
|
45
|
+
"Please select a channel first": "",
|
|
46
|
+
"Reconnecting...": "",
|
|
47
47
|
"Reply": "",
|
|
48
|
-
"Reply to Message": "
|
|
48
|
+
"Reply to Message": "",
|
|
49
49
|
"Resend": "",
|
|
50
|
-
"Search GIFs": "
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
50
|
+
"Search GIFs": "",
|
|
51
|
+
"Select More Photos": "Selecteer Meer foto's",
|
|
52
|
+
"Send a message": "",
|
|
53
|
+
"Sending links is not allowed in this conversation": "",
|
|
54
|
+
"Slow mode ON": "",
|
|
54
55
|
"The message has been reported to a moderator.": "",
|
|
55
56
|
"Thread Reply": "",
|
|
56
57
|
"Unblock User": "",
|
|
57
|
-
"Unknown User": "",
|
|
58
|
+
"Unknown User": "Onbekende gebruiker",
|
|
58
59
|
"Unmute User": "",
|
|
59
60
|
"Unpin from Conversation": "",
|
|
60
|
-
"Unread Messages": "
|
|
61
|
+
"Unread Messages": "",
|
|
61
62
|
"Video": "Video",
|
|
62
|
-
"You": "
|
|
63
|
-
"You can't send messages in this channel": "
|
|
63
|
+
"You": "",
|
|
64
|
+
"You can't send messages in this channel": "",
|
|
64
65
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
65
|
-
"{{ index }} of {{ photoLength }}": "",
|
|
66
|
+
"{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
|
|
66
67
|
"{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
|
|
67
|
-
"{{ replyCount }} Thread Replies": "
|
|
68
|
+
"{{ replyCount }} Thread Replies": "",
|
|
68
69
|
"{{ user }} is typing": "",
|
|
69
|
-
"🏙 Attachment...": "
|
|
70
|
+
"🏙 Attachment...": ""
|
|
70
71
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "1 Ответ",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "",
|
|
5
|
-
"Also send to channel": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "Разрешить доступ к вашей галерее",
|
|
5
|
+
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
7
7
|
"Block User": "",
|
|
8
8
|
"Cancel": "",
|
|
@@ -14,57 +14,58 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Соответствие эмодзи",
|
|
17
|
-
"Empty message...": "
|
|
18
|
-
"Error loading": "
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
17
|
+
"Empty message...": "",
|
|
18
|
+
"Error loading": "",
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Мгновенные Команды",
|
|
27
|
-
"Links are disabled": "
|
|
27
|
+
"Links are disabled": "",
|
|
28
28
|
"Loading channels...": "",
|
|
29
29
|
"Loading messages...": "",
|
|
30
30
|
"Loading...": "",
|
|
31
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
31
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
32
32
|
"Message Reactions": "Сообщения Реакции",
|
|
33
|
-
"Message deleted": "
|
|
33
|
+
"Message deleted": "",
|
|
34
34
|
"Message flagged": "",
|
|
35
35
|
"Mute User": "",
|
|
36
|
-
"Not supported": "",
|
|
37
|
-
"Nothing yet...": "
|
|
36
|
+
"Not supported": "не поддерживается",
|
|
37
|
+
"Nothing yet...": "",
|
|
38
38
|
"Ok": "",
|
|
39
|
-
"Only visible to you": "
|
|
39
|
+
"Only visible to you": "",
|
|
40
40
|
"Photo": "Фото",
|
|
41
|
-
"Photos and Videos": "",
|
|
41
|
+
"Photos and Videos": "Фото и видео",
|
|
42
42
|
"Pin to Conversation": "",
|
|
43
|
-
"Pinned by": "
|
|
44
|
-
"Please enable access to your photos and videos so you can share them.": "",
|
|
45
|
-
"Please select a channel first": "
|
|
46
|
-
"Reconnecting...": "
|
|
43
|
+
"Pinned by": "",
|
|
44
|
+
"Please enable access to your photos and videos so you can share them.": "Разрешите доступ к своим фотографиям и видео, чтобы вы могли ими поделиться.",
|
|
45
|
+
"Please select a channel first": "",
|
|
46
|
+
"Reconnecting...": "",
|
|
47
47
|
"Reply": "",
|
|
48
|
-
"Reply to Message": "
|
|
48
|
+
"Reply to Message": "",
|
|
49
49
|
"Resend": "",
|
|
50
|
-
"Search GIFs": "
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
50
|
+
"Search GIFs": "",
|
|
51
|
+
"Select More Photos": "Выбрать больше фотографий",
|
|
52
|
+
"Send a message": "",
|
|
53
|
+
"Sending links is not allowed in this conversation": "",
|
|
54
|
+
"Slow mode ON": "",
|
|
54
55
|
"The message has been reported to a moderator.": "",
|
|
55
56
|
"Thread Reply": "",
|
|
56
57
|
"Unblock User": "",
|
|
57
|
-
"Unknown User": "",
|
|
58
|
+
"Unknown User": "Неизвестный пользователь",
|
|
58
59
|
"Unmute User": "",
|
|
59
60
|
"Unpin from Conversation": "",
|
|
60
|
-
"Unread Messages": "
|
|
61
|
+
"Unread Messages": "",
|
|
61
62
|
"Video": "видео",
|
|
62
|
-
"You": "
|
|
63
|
-
"You can't send messages in this channel": "
|
|
63
|
+
"You": "",
|
|
64
|
+
"You can't send messages in this channel": "",
|
|
64
65
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
65
|
-
"{{ index }} of {{ photoLength }}": "",
|
|
66
|
+
"{{ index }} of {{ photoLength }}": "{{ index }} из {{ photoLength }}",
|
|
66
67
|
"{{ replyCount }} Replies": "{{ replyCount }} Ответов",
|
|
67
|
-
"{{ replyCount }} Thread Replies": "
|
|
68
|
+
"{{ replyCount }} Thread Replies": "",
|
|
68
69
|
"{{ user }} is typing": "",
|
|
69
|
-
"🏙 Attachment...": "
|
|
70
|
+
"🏙 Attachment...": ""
|
|
70
71
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"1 Reply": "1 Cevap",
|
|
3
|
-
"1 Thread Reply": "
|
|
4
|
-
"Allow access to your Gallery": "",
|
|
5
|
-
"Also send to channel": "
|
|
3
|
+
"1 Thread Reply": "",
|
|
4
|
+
"Allow access to your Gallery": "Galerinize erişime izin verin",
|
|
5
|
+
"Also send to channel": "",
|
|
6
6
|
"Are you sure you want to permanently delete this message?": "",
|
|
7
7
|
"Block User": "",
|
|
8
8
|
"Cancel": "",
|
|
@@ -14,57 +14,58 @@
|
|
|
14
14
|
"Edit Message": "",
|
|
15
15
|
"Editing Message": "",
|
|
16
16
|
"Emoji matching": "Emoji eşleştirme",
|
|
17
|
-
"Empty message...": "
|
|
18
|
-
"Error loading": "
|
|
19
|
-
"Error loading channel list...": "
|
|
20
|
-
"Error loading messages for this channel...": "
|
|
21
|
-
"Error while loading, please reload/refresh": "
|
|
22
|
-
"File type not supported": "
|
|
17
|
+
"Empty message...": "",
|
|
18
|
+
"Error loading": "",
|
|
19
|
+
"Error loading channel list...": "",
|
|
20
|
+
"Error loading messages for this channel...": "",
|
|
21
|
+
"Error while loading, please reload/refresh": "",
|
|
22
|
+
"File type not supported": "",
|
|
23
23
|
"Flag": "",
|
|
24
24
|
"Flag Message": "",
|
|
25
25
|
"Flag action failed either due to a network issue or the message is already flagged": "",
|
|
26
26
|
"Instant Commands": "Anlık Komutlar",
|
|
27
|
-
"Links are disabled": "
|
|
27
|
+
"Links are disabled": "",
|
|
28
28
|
"Loading channels...": "",
|
|
29
29
|
"Loading messages...": "",
|
|
30
30
|
"Loading...": "",
|
|
31
|
-
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "
|
|
31
|
+
"Maximum file size upload limit reached. Please upload a file below {{MAX_FILE_SIZE_TO_UPLOAD_IN_MB}} MB.": "",
|
|
32
32
|
"Message Reactions": "Mesaj Tepkileri",
|
|
33
|
-
"Message deleted": "
|
|
33
|
+
"Message deleted": "",
|
|
34
34
|
"Message flagged": "",
|
|
35
35
|
"Mute User": "",
|
|
36
|
-
"Not supported": "",
|
|
37
|
-
"Nothing yet...": "
|
|
36
|
+
"Not supported": "Desteklenmiyor",
|
|
37
|
+
"Nothing yet...": "",
|
|
38
38
|
"Ok": "",
|
|
39
|
-
"Only visible to you": "
|
|
39
|
+
"Only visible to you": "",
|
|
40
40
|
"Photo": "Fotoğraf",
|
|
41
|
-
"Photos and Videos": "",
|
|
41
|
+
"Photos and Videos": "Fotoğraflar ve Videolar",
|
|
42
42
|
"Pin to Conversation": "",
|
|
43
|
-
"Pinned by": "
|
|
44
|
-
"Please enable access to your photos and videos so you can share them.": "",
|
|
45
|
-
"Please select a channel first": "
|
|
46
|
-
"Reconnecting...": "
|
|
43
|
+
"Pinned by": "",
|
|
44
|
+
"Please enable access to your photos and videos so you can share them.": "Paylaşım yapabilmek için lutfen fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
|
|
45
|
+
"Please select a channel first": "",
|
|
46
|
+
"Reconnecting...": "",
|
|
47
47
|
"Reply": "",
|
|
48
|
-
"Reply to Message": "
|
|
48
|
+
"Reply to Message": "",
|
|
49
49
|
"Resend": "",
|
|
50
|
-
"Search GIFs": "
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
50
|
+
"Search GIFs": "",
|
|
51
|
+
"Select More Photos": "Daha Fazla Fotoğraf Seçin",
|
|
52
|
+
"Send a message": "",
|
|
53
|
+
"Sending links is not allowed in this conversation": "",
|
|
54
|
+
"Slow mode ON": "",
|
|
54
55
|
"The message has been reported to a moderator.": "",
|
|
55
56
|
"Thread Reply": "",
|
|
56
57
|
"Unblock User": "",
|
|
57
|
-
"Unknown User": "",
|
|
58
|
+
"Unknown User": "Bilinmeyen kullanıcı",
|
|
58
59
|
"Unmute User": "",
|
|
59
60
|
"Unpin from Conversation": "",
|
|
60
|
-
"Unread Messages": "
|
|
61
|
+
"Unread Messages": "",
|
|
61
62
|
"Video": "Video",
|
|
62
|
-
"You": "
|
|
63
|
-
"You can't send messages in this channel": "
|
|
63
|
+
"You": "",
|
|
64
|
+
"You can't send messages in this channel": "",
|
|
64
65
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "",
|
|
65
|
-
"{{ index }} of {{ photoLength }}": "",
|
|
66
|
+
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
66
67
|
"{{ replyCount }} Replies": "{{ replyCount }} Cevap",
|
|
67
|
-
"{{ replyCount }} Thread Replies": "
|
|
68
|
+
"{{ replyCount }} Thread Replies": "",
|
|
68
69
|
"{{ user }} is typing": "",
|
|
69
|
-
"🏙 Attachment...": "
|
|
70
|
+
"🏙 Attachment...": ""
|
|
70
71
|
}
|
package/lib/commonjs/native.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Object.defineProperty(exports, "__esModule", {
|
|
2
2
|
value: true
|
|
3
3
|
});
|
|
4
|
-
exports.triggerHaptic = exports.takePhoto = exports.shareImage = exports.setClipboardString = exports.saveFile = exports.registerNativeHandlers = exports.pickDocument = exports.oniOS14GalleryLibrarySelectionChange = exports.isVideoPackageAvailable = exports.isAudioPackageAvailable = exports.getPhotos = exports.getLocalAssetUri = exports.deleteFile = exports.compressImage = exports.Video = exports.Sound = exports.SDK = exports.NetInfo = exports.FlatList = void 0;
|
|
4
|
+
exports.triggerHaptic = exports.takePhoto = exports.shareImage = exports.setClipboardString = exports.saveFile = exports.registerNativeHandlers = exports.pickDocument = exports.oniOS14GalleryLibrarySelectionChange = exports.isVideoPackageAvailable = exports.isAudioPackageAvailable = exports.iOS14RefreshGallerySelection = exports.getPhotos = exports.getLocalAssetUri = exports.deleteFile = exports.compressImage = exports.Video = exports.Sound = exports.SDK = exports.NetInfo = exports.FlatList = void 0;
|
|
5
5
|
var _reactNative = require("react-native");
|
|
6
6
|
var fail = function fail() {
|
|
7
7
|
throw Error('Native handler was not registered, you should import stream-chat-expo or stream-chat-react-native');
|
|
@@ -14,6 +14,8 @@ var getLocalAssetUri = fail;
|
|
|
14
14
|
exports.getLocalAssetUri = getLocalAssetUri;
|
|
15
15
|
var oniOS14GalleryLibrarySelectionChange = fail;
|
|
16
16
|
exports.oniOS14GalleryLibrarySelectionChange = oniOS14GalleryLibrarySelectionChange;
|
|
17
|
+
var iOS14RefreshGallerySelection = fail;
|
|
18
|
+
exports.iOS14RefreshGallerySelection = iOS14RefreshGallerySelection;
|
|
17
19
|
var getPhotos = fail;
|
|
18
20
|
exports.getPhotos = getPhotos;
|
|
19
21
|
var FlatList = _reactNative.FlatList;
|
|
@@ -60,6 +62,9 @@ var registerNativeHandlers = function registerNativeHandlers(handlers) {
|
|
|
60
62
|
if (handlers.getPhotos) {
|
|
61
63
|
exports.getPhotos = getPhotos = handlers.getPhotos;
|
|
62
64
|
}
|
|
65
|
+
if (handlers.iOS14RefreshGallerySelection) {
|
|
66
|
+
exports.iOS14RefreshGallerySelection = iOS14RefreshGallerySelection = handlers.iOS14RefreshGallerySelection;
|
|
67
|
+
}
|
|
63
68
|
if (handlers.oniOS14GalleryLibrarySelectionChange) {
|
|
64
69
|
exports.oniOS14GalleryLibrarySelectionChange = oniOS14GalleryLibrarySelectionChange = handlers.oniOS14GalleryLibrarySelectionChange;
|
|
65
70
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","fail","Error","compressImage","exports","deleteFile","getLocalAssetUri","oniOS14GalleryLibrarySelectionChange","getPhotos","FlatList","DefaultFlatList","NetInfo","addEventListener","fetch","pickDocument","saveFile","setClipboardString","shareImage","takePhoto","triggerHaptic","SDK","Sound","Video","registerNativeHandlers","handlers","undefined","isVideoPackageAvailable","isAudioPackageAvailable","Player","initializeSound"],"sources":["native.ts"],"sourcesContent":["import type React from 'react';\nimport { FlatList as DefaultFlatList, StyleProp, ViewStyle } from 'react-native';\n\nimport type { NetInfoSubscription } from '@react-native-community/netinfo';\n\nimport type { Asset, File } from './types/types';\n\nconst fail = () => {\n throw Error(\n 'Native handler was not registered, you should import stream-chat-expo or stream-chat-react-native',\n );\n};\n\ntype CompressImage = ({\n compressImageQuality,\n height,\n uri,\n width,\n}: {\n compressImageQuality: number;\n height: number;\n uri: string;\n width: number;\n}) => Promise<string> | never;\nexport let compressImage: CompressImage = fail;\n\ntype DeleteFile = ({ uri }: { uri: string }) => Promise<boolean> | never;\nexport let deleteFile: DeleteFile = fail;\n\ntype GetLocalAssetUri = (uriOrAssetId: string) => Promise<string | undefined> | never;\nexport let getLocalAssetUri: GetLocalAssetUri = fail;\n\ntype OniOS14LibrarySelectionChange = (callback: () => void) => { unsubscribe: () => void };\nexport let oniOS14GalleryLibrarySelectionChange: OniOS14LibrarySelectionChange = fail;\n\ntype GetPhotos = ({ after, first }: { first: number; after?: string }) =>\n | Promise<{\n assets: Array<Omit<Asset, 'source'> & { source: 'picker' }>;\n endCursor: string;\n hasNextPage: boolean;\n }>\n | never;\nexport let getPhotos: GetPhotos = fail;\n\ntype NetInfo = {\n addEventListener: (listener: (isConnected: boolean) => void) => NetInfoSubscription | never;\n fetch: (requestedInterface?: string | undefined) => Promise<boolean> | never;\n};\n\nexport let FlatList = DefaultFlatList;\n\nexport let NetInfo: NetInfo = {\n addEventListener: fail,\n fetch: fail,\n};\n\ntype PickDocument = ({ maxNumberOfFiles }: { maxNumberOfFiles?: number }) =>\n | Promise<{\n cancelled: boolean;\n assets?: File[];\n }>\n | never;\nexport let pickDocument: PickDocument = fail;\n\ntype SaveFileOptions = {\n fileName: string;\n fromUrl: string;\n};\ntype SaveFile = (options: SaveFileOptions) => Promise<string> | never;\nexport let saveFile: SaveFile = fail;\n\ntype SetClipboardString = (text: string) => Promise<void> | never;\nexport let setClipboardString: SetClipboardString = fail;\n\ntype ShareOptions = {\n type?: string;\n url?: string;\n};\ntype ShareImage = (options: ShareOptions) => Promise<boolean> | never;\nexport let shareImage: ShareImage = fail;\n\ntype Photo =\n | (Omit<Asset, 'source'> & {\n cancelled: false;\n source: 'camera';\n })\n | { cancelled: true };\ntype TakePhoto = (options: { compressImageQuality?: number }) => Promise<Photo> | never;\nexport let takePhoto: TakePhoto = fail;\n\ntype HapticFeedbackMethod =\n | 'impactHeavy'\n | 'impactLight'\n | 'impactMedium'\n | 'notificationError'\n | 'notificationSuccess'\n | 'notificationWarning'\n | 'selection';\ntype TriggerHaptic = (method: HapticFeedbackMethod) => void | never;\nexport let triggerHaptic: TriggerHaptic = fail;\n\nexport type PlaybackStatus = {\n didJustFinish: boolean;\n durationMillis: number;\n error: string;\n isBuffering: boolean;\n isLoaded: boolean;\n isLooping: boolean;\n isPlaying: boolean;\n positionMillis: number;\n};\n\nexport type AVPlaybackStatusToSet = {\n isLooping: boolean;\n isMuted: boolean;\n positionMillis: number;\n progressUpdateIntervalMillis: number;\n rate: number;\n shouldCorrectPitch: boolean;\n shouldPlay: boolean;\n volume: number;\n};\n\nexport let SDK: string;\n\nexport type SoundOptions = {\n basePathOrCallback?: string;\n callback?: () => void;\n filenameOrFile?: string;\n initialStatus?: Partial<AVPlaybackStatusToSet>;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n source?: { uri: string };\n};\n\nexport type SoundReturnType = {\n paused: boolean;\n testID: string;\n getDuration?: () => number;\n isPlaying?: () => boolean;\n onBuffer?: (props: { isBuffering: boolean }) => void;\n onEnd?: () => void;\n onLoad?: (payload: VideoPayloadData) => void;\n onLoadStart?: () => void;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n onProgress?: (data: VideoProgressData) => void;\n onReadyForDisplay?: () => void;\n pauseAsync?: () => void;\n play?: () => void;\n playAsync?: () => void;\n replayAsync?: () => void;\n resizeMode?: string;\n seek?: (progress: number) => void;\n setPositionAsync?: (millis: number) => void;\n soundRef?: React.RefObject<SoundReturnType>;\n stopAsync?: () => void;\n style?: StyleProp<ViewStyle>;\n unloadAsync?: () => void;\n uri?: string;\n};\n\nexport type SoundType = {\n initializeSound: (\n source?: { uri: string },\n initialStatus?: Partial<AVPlaybackStatusToSet>,\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void,\n ) => Promise<SoundReturnType | null>;\n Player: React.ComponentType<SoundReturnType> | null;\n};\n\nexport let Sound: SoundType;\n\nexport type VideoProgressData = {\n currentTime: number;\n seekableDuration: number;\n playableDuration?: number;\n};\n\nexport type VideoPayloadData = {\n duration: number;\n audioTracks?: { index: number; language: string; title: string; type: string }[];\n currentPosition?: number;\n naturalSize?: { height: number; orientation: 'portrait' | 'landscape'; width: number };\n textTracks?: { index: number; language: string; title: string; type: string }[];\n videoTracks?: {\n bitrate: number;\n codecs: string;\n height: number;\n trackId: number;\n width: number;\n }[];\n};\n\nexport type VideoType = {\n paused: boolean;\n testID: string;\n uri: string;\n videoRef: React.RefObject<VideoType>;\n onBuffer?: (props: { isBuffering: boolean }) => void;\n onEnd?: () => void;\n onLoad?: (payload: VideoPayloadData) => void;\n onLoadStart?: () => void;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n onProgress?: (data: VideoProgressData) => void;\n onReadyForDisplay?: () => void;\n repeat?: boolean;\n replayAsync?: () => void;\n resizeMode?: string;\n seek?: (progress: number) => void;\n setPositionAsync?: (position: number) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nexport let Video: React.ComponentType<VideoType>;\n\ntype Handlers = {\n compressImage?: CompressImage;\n deleteFile?: DeleteFile;\n FlatList?: typeof DefaultFlatList;\n getLocalAssetUri?: GetLocalAssetUri;\n getPhotos?: GetPhotos;\n NetInfo?: NetInfo;\n oniOS14GalleryLibrarySelectionChange?: OniOS14LibrarySelectionChange;\n pickDocument?: PickDocument;\n saveFile?: SaveFile;\n SDK?: string;\n setClipboardString?: SetClipboardString;\n shareImage?: ShareImage;\n Sound?: SoundType;\n takePhoto?: TakePhoto;\n triggerHaptic?: TriggerHaptic;\n Video?: React.ComponentType<VideoType>;\n};\n\nexport const registerNativeHandlers = (handlers: Handlers) => {\n if (handlers.compressImage) {\n compressImage = handlers.compressImage;\n }\n\n if (handlers.deleteFile) {\n deleteFile = handlers.deleteFile;\n }\n\n if (handlers.FlatList) {\n FlatList = handlers.FlatList;\n }\n if (handlers.NetInfo) {\n NetInfo = handlers.NetInfo;\n }\n\n if (handlers.getLocalAssetUri) {\n getLocalAssetUri = handlers.getLocalAssetUri;\n }\n\n if (handlers.getPhotos) {\n getPhotos = handlers.getPhotos;\n }\n\n if (handlers.oniOS14GalleryLibrarySelectionChange) {\n oniOS14GalleryLibrarySelectionChange = handlers.oniOS14GalleryLibrarySelectionChange;\n }\n\n if (handlers.pickDocument !== undefined) {\n pickDocument = handlers.pickDocument;\n }\n\n if (handlers.saveFile) {\n saveFile = handlers.saveFile;\n }\n\n if (handlers.SDK) {\n SDK = handlers.SDK;\n }\n\n if (handlers.shareImage !== undefined) {\n shareImage = handlers.shareImage;\n }\n\n if (handlers.Sound) {\n Sound = handlers.Sound;\n }\n\n if (handlers.takePhoto) {\n takePhoto = handlers.takePhoto;\n }\n\n if (handlers.triggerHaptic) {\n triggerHaptic = handlers.triggerHaptic;\n }\n\n if (handlers.Video) {\n Video = handlers.Video;\n }\n\n if (handlers.setClipboardString !== undefined) {\n setClipboardString = handlers.setClipboardString;\n }\n};\n\nexport const isVideoPackageAvailable = () => !!Video;\nexport const isAudioPackageAvailable = () => !!Sound.Player || !!Sound.initializeSound;\n"],"mappings":";;;;AACA,IAAAA,YAAA,GAAAC,OAAA;AAMA,IAAMC,IAAI,GAAG,SAAPA,IAAIA,CAAA,EAAS;EACjB,MAAMC,KAAK,CACT,mGACF,CAAC;AACH,CAAC;AAaM,IAAIC,aAA4B,GAAGF,IAAI;AAACG,OAAA,CAAAD,aAAA,GAAAA,aAAA;AAGxC,IAAIE,UAAsB,GAAGJ,IAAI;AAACG,OAAA,CAAAC,UAAA,GAAAA,U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,CAACH,KAAK,EAAE;IAClBjB,OAAA,CAAAiB,KAAA,GAAAA,KAAK,GAAGG,QAAQ,CAACH,KAAK;EACxB;EAEA,IAAIG,QAAQ,CAACN,SAAS,EAAE;IACtBd,OAAA,CAAAc,SAAA,GAAAA,SAAS,GAAGM,QAAQ,CAACN,SAAS;EAChC;EAEA,IAAIM,QAAQ,CAACL,aAAa,EAAE;IAC1Bf,OAAA,CAAAe,aAAA,GAAAA,aAAa,GAAGK,QAAQ,CAACL,aAAa;EACxC;EAEA,IAAIK,QAAQ,CAACF,KAAK,EAAE;IAClBlB,OAAA,CAAAkB,KAAA,GAAAA,KAAK,GAAGE,QAAQ,CAACF,KAAK;EACxB;EAEA,IAAIE,QAAQ,CAACR,kBAAkB,KAAKS,SAAS,EAAE;IAC7CrB,OAAA,CAAAY,kBAAA,GAAAA,kBAAkB,GAAGQ,QAAQ,CAACR,kBAAkB;EAClD;AACF,CAAC;AAACZ,OAAA,CAAAmB,sBAAA,GAAAA,sBAAA;AAEK,IAAMG,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAA;EAAA,OAAS,CAAC,CAACJ,KAAK;AAAA;AAAClB,OAAA,CAAAsB,uBAAA,GAAAA,uBAAA;AAC9C,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAA;EAAA,OAAS,CAAC,CAACN,KAAK,CAACO,MAAM,IAAI,CAAC,CAACP,KAAK,CAACQ,eAAe;AAAA;AAACzB,OAAA,CAAAuB,uBAAA,GAAAA,uBAAA"}
|
|
1
|
+
{"version":3,"names":["_reactNative","require","fail","Error","compressImage","exports","deleteFile","getLocalAssetUri","oniOS14GalleryLibrarySelectionChange","iOS14RefreshGallerySelection","getPhotos","FlatList","DefaultFlatList","NetInfo","addEventListener","fetch","pickDocument","saveFile","setClipboardString","shareImage","takePhoto","triggerHaptic","SDK","Sound","Video","registerNativeHandlers","handlers","undefined","isVideoPackageAvailable","isAudioPackageAvailable","Player","initializeSound"],"sources":["native.ts"],"sourcesContent":["import type React from 'react';\nimport { FlatList as DefaultFlatList, StyleProp, ViewStyle } from 'react-native';\n\nimport type { NetInfoSubscription } from '@react-native-community/netinfo';\n\nimport type { Asset, File } from './types/types';\n\nconst fail = () => {\n throw Error(\n 'Native handler was not registered, you should import stream-chat-expo or stream-chat-react-native',\n );\n};\n\ntype CompressImage = ({\n compressImageQuality,\n height,\n uri,\n width,\n}: {\n compressImageQuality: number;\n height: number;\n uri: string;\n width: number;\n}) => Promise<string> | never;\nexport let compressImage: CompressImage = fail;\n\ntype DeleteFile = ({ uri }: { uri: string }) => Promise<boolean> | never;\nexport let deleteFile: DeleteFile = fail;\n\ntype GetLocalAssetUri = (uriOrAssetId: string) => Promise<string | undefined> | never;\nexport let getLocalAssetUri: GetLocalAssetUri = fail;\n\ntype OniOS14LibrarySelectionChange = (callback: () => void) => { unsubscribe: () => void };\nexport let oniOS14GalleryLibrarySelectionChange: OniOS14LibrarySelectionChange = fail;\n\ntype iOS14RefreshGallerySelection = () => Promise<void>;\nexport let iOS14RefreshGallerySelection: iOS14RefreshGallerySelection = fail;\n\ntype GetPhotos = ({ after, first }: { first: number; after?: string }) =>\n | Promise<{\n assets: Array<Omit<Asset, 'source'> & { source: 'picker' }>;\n endCursor: string;\n hasNextPage: boolean;\n iOSLimited: boolean;\n }>\n | never;\nexport let getPhotos: GetPhotos = fail;\n\ntype NetInfo = {\n addEventListener: (listener: (isConnected: boolean) => void) => NetInfoSubscription | never;\n fetch: (requestedInterface?: string | undefined) => Promise<boolean> | never;\n};\n\nexport let FlatList = DefaultFlatList;\n\nexport let NetInfo: NetInfo = {\n addEventListener: fail,\n fetch: fail,\n};\n\ntype PickDocument = ({ maxNumberOfFiles }: { maxNumberOfFiles?: number }) =>\n | Promise<{\n cancelled: boolean;\n assets?: File[];\n }>\n | never;\nexport let pickDocument: PickDocument = fail;\n\ntype SaveFileOptions = {\n fileName: string;\n fromUrl: string;\n};\ntype SaveFile = (options: SaveFileOptions) => Promise<string> | never;\nexport let saveFile: SaveFile = fail;\n\ntype SetClipboardString = (text: string) => Promise<void> | never;\nexport let setClipboardString: SetClipboardString = fail;\n\ntype ShareOptions = {\n type?: string;\n url?: string;\n};\ntype ShareImage = (options: ShareOptions) => Promise<boolean> | never;\nexport let shareImage: ShareImage = fail;\n\ntype Photo =\n | (Omit<Asset, 'source'> & {\n cancelled: false;\n source: 'camera';\n })\n | { cancelled: true };\ntype TakePhoto = (options: { compressImageQuality?: number }) => Promise<Photo> | never;\nexport let takePhoto: TakePhoto = fail;\n\ntype HapticFeedbackMethod =\n | 'impactHeavy'\n | 'impactLight'\n | 'impactMedium'\n | 'notificationError'\n | 'notificationSuccess'\n | 'notificationWarning'\n | 'selection';\ntype TriggerHaptic = (method: HapticFeedbackMethod) => void | never;\nexport let triggerHaptic: TriggerHaptic = fail;\n\nexport type PlaybackStatus = {\n didJustFinish: boolean;\n durationMillis: number;\n error: string;\n isBuffering: boolean;\n isLoaded: boolean;\n isLooping: boolean;\n isPlaying: boolean;\n positionMillis: number;\n};\n\nexport type AVPlaybackStatusToSet = {\n isLooping: boolean;\n isMuted: boolean;\n positionMillis: number;\n progressUpdateIntervalMillis: number;\n rate: number;\n shouldCorrectPitch: boolean;\n shouldPlay: boolean;\n volume: number;\n};\n\nexport let SDK: string;\n\nexport type SoundOptions = {\n basePathOrCallback?: string;\n callback?: () => void;\n filenameOrFile?: string;\n initialStatus?: Partial<AVPlaybackStatusToSet>;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n source?: { uri: string };\n};\n\nexport type SoundReturnType = {\n paused: boolean;\n testID: string;\n getDuration?: () => number;\n isPlaying?: () => boolean;\n onBuffer?: (props: { isBuffering: boolean }) => void;\n onEnd?: () => void;\n onLoad?: (payload: VideoPayloadData) => void;\n onLoadStart?: () => void;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n onProgress?: (data: VideoProgressData) => void;\n onReadyForDisplay?: () => void;\n pauseAsync?: () => void;\n play?: () => void;\n playAsync?: () => void;\n replayAsync?: () => void;\n resizeMode?: string;\n seek?: (progress: number) => void;\n setPositionAsync?: (millis: number) => void;\n soundRef?: React.RefObject<SoundReturnType>;\n stopAsync?: () => void;\n style?: StyleProp<ViewStyle>;\n unloadAsync?: () => void;\n uri?: string;\n};\n\nexport type SoundType = {\n initializeSound: (\n source?: { uri: string },\n initialStatus?: Partial<AVPlaybackStatusToSet>,\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void,\n ) => Promise<SoundReturnType | null>;\n Player: React.ComponentType<SoundReturnType> | null;\n};\n\nexport let Sound: SoundType;\n\nexport type VideoProgressData = {\n currentTime: number;\n seekableDuration: number;\n playableDuration?: number;\n};\n\nexport type VideoPayloadData = {\n duration: number;\n audioTracks?: { index: number; language: string; title: string; type: string }[];\n currentPosition?: number;\n naturalSize?: { height: number; orientation: 'portrait' | 'landscape'; width: number };\n textTracks?: { index: number; language: string; title: string; type: string }[];\n videoTracks?: {\n bitrate: number;\n codecs: string;\n height: number;\n trackId: number;\n width: number;\n }[];\n};\n\nexport type VideoType = {\n paused: boolean;\n testID: string;\n uri: string;\n videoRef: React.RefObject<VideoType>;\n onBuffer?: (props: { isBuffering: boolean }) => void;\n onEnd?: () => void;\n onLoad?: (payload: VideoPayloadData) => void;\n onLoadStart?: () => void;\n onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;\n onProgress?: (data: VideoProgressData) => void;\n onReadyForDisplay?: () => void;\n repeat?: boolean;\n replayAsync?: () => void;\n resizeMode?: string;\n seek?: (progress: number) => void;\n setPositionAsync?: (position: number) => void;\n style?: StyleProp<ViewStyle>;\n};\n\nexport let Video: React.ComponentType<VideoType>;\n\ntype Handlers = {\n iOS14RefreshGallerySelection: iOS14RefreshGallerySelection;\n compressImage?: CompressImage;\n deleteFile?: DeleteFile;\n FlatList?: typeof DefaultFlatList;\n getLocalAssetUri?: GetLocalAssetUri;\n getPhotos?: GetPhotos;\n NetInfo?: NetInfo;\n oniOS14GalleryLibrarySelectionChange?: OniOS14LibrarySelectionChange;\n pickDocument?: PickDocument;\n saveFile?: SaveFile;\n SDK?: string;\n setClipboardString?: SetClipboardString;\n shareImage?: ShareImage;\n Sound?: SoundType;\n takePhoto?: TakePhoto;\n triggerHaptic?: TriggerHaptic;\n Video?: React.ComponentType<VideoType>;\n};\n\nexport const registerNativeHandlers = (handlers: Handlers) => {\n if (handlers.compressImage) {\n compressImage = handlers.compressImage;\n }\n\n if (handlers.deleteFile) {\n deleteFile = handlers.deleteFile;\n }\n\n if (handlers.FlatList) {\n FlatList = handlers.FlatList;\n }\n if (handlers.NetInfo) {\n NetInfo = handlers.NetInfo;\n }\n\n if (handlers.getLocalAssetUri) {\n getLocalAssetUri = handlers.getLocalAssetUri;\n }\n\n if (handlers.getPhotos) {\n getPhotos = handlers.getPhotos;\n }\n\n if (handlers.iOS14RefreshGallerySelection) {\n iOS14RefreshGallerySelection = handlers.iOS14RefreshGallerySelection;\n }\n\n if (handlers.oniOS14GalleryLibrarySelectionChange) {\n oniOS14GalleryLibrarySelectionChange = handlers.oniOS14GalleryLibrarySelectionChange;\n }\n\n if (handlers.pickDocument !== undefined) {\n pickDocument = handlers.pickDocument;\n }\n\n if (handlers.saveFile) {\n saveFile = handlers.saveFile;\n }\n\n if (handlers.SDK) {\n SDK = handlers.SDK;\n }\n\n if (handlers.shareImage !== undefined) {\n shareImage = handlers.shareImage;\n }\n\n if (handlers.Sound) {\n Sound = handlers.Sound;\n }\n\n if (handlers.takePhoto) {\n takePhoto = handlers.takePhoto;\n }\n\n if (handlers.triggerHaptic) {\n triggerHaptic = handlers.triggerHaptic;\n }\n\n if (handlers.Video) {\n Video = handlers.Video;\n }\n\n if (handlers.setClipboardString !== undefined) {\n setClipboardString = handlers.setClipboardString;\n }\n};\n\nexport const isVideoPackageAvailable = () => !!Video;\nexport const isAudioPackageAvailable = () => !!Sound.Player || !!Sound.initializeSound;\n"],"mappings":";;;;AACA,IAAAA,YAAA,GAAAC,OAAA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SAA1BA,uBAAuBA,CAAA;EAAA,OAAS,CAAC,CAACN,KAAK,CAACO,MAAM,IAAI,CAAC,CAACP,KAAK,CAACQ,eAAe;AAAA;AAAC1B,OAAA,CAAAwB,uBAAA,GAAAA,uBAAA"}
|
|
@@ -16,6 +16,7 @@ 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");
|
|
19
20
|
var _native = require("../../native");
|
|
20
21
|
var _utils = require("../../utils/utils");
|
|
21
22
|
var _this = this,
|
|
@@ -65,23 +66,29 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
65
66
|
_useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
|
|
66
67
|
photoError = _useState4[0],
|
|
67
68
|
setPhotoError = _useState4[1];
|
|
68
|
-
var hasNextPageRef = (0, _react.useRef)(true);
|
|
69
69
|
var _useState5 = (0, _react.useState)(false),
|
|
70
70
|
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
var
|
|
71
|
+
iOSLimited = _useState6[0],
|
|
72
|
+
setIosLimited = _useState6[1];
|
|
73
|
+
var hasNextPageRef = (0, _react.useRef)(true);
|
|
74
|
+
var _useState7 = (0, _react.useState)(false),
|
|
74
75
|
_useState8 = (0, _slicedToArray2["default"])(_useState7, 2),
|
|
75
|
-
|
|
76
|
-
|
|
76
|
+
loadingPhotos = _useState8[0],
|
|
77
|
+
setLoadingPhotos = _useState8[1];
|
|
78
|
+
var _useState9 = (0, _react.useState)([]),
|
|
79
|
+
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
80
|
+
photos = _useState10[0],
|
|
81
|
+
setPhotos = _useState10[1];
|
|
77
82
|
var attemptedToLoadPhotosOnOpenRef = (0, _react.useRef)(false);
|
|
83
|
+
var _useTranslationContex = (0, _TranslationContext.useTranslationContext)(),
|
|
84
|
+
t = _useTranslationContex.t;
|
|
78
85
|
var getMorePhotos = (0, _react.useCallback)((0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee() {
|
|
79
86
|
var endCursor, results;
|
|
80
87
|
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
81
88
|
while (1) switch (_context.prev = _context.next) {
|
|
82
89
|
case 0:
|
|
83
90
|
if (!(hasNextPageRef.current && !loadingPhotos && currentIndex > -1 && selectedPicker === 'images')) {
|
|
84
|
-
_context.next =
|
|
91
|
+
_context.next = 18;
|
|
85
92
|
break;
|
|
86
93
|
}
|
|
87
94
|
setPhotoError(false);
|
|
@@ -99,20 +106,21 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
99
106
|
setPhotos(function (prevPhotos) {
|
|
100
107
|
return endCursor ? [].concat((0, _toConsumableArray2["default"])(prevPhotos), (0, _toConsumableArray2["default"])(results.assets)) : results.assets;
|
|
101
108
|
});
|
|
109
|
+
setIosLimited(results.iOSLimited);
|
|
102
110
|
hasNextPageRef.current = !!results.hasNextPage;
|
|
103
|
-
_context.next =
|
|
111
|
+
_context.next = 17;
|
|
104
112
|
break;
|
|
105
|
-
case
|
|
106
|
-
_context.prev =
|
|
113
|
+
case 14:
|
|
114
|
+
_context.prev = 14;
|
|
107
115
|
_context.t0 = _context["catch"](4);
|
|
108
116
|
setPhotoError(true);
|
|
109
|
-
case 16:
|
|
110
|
-
setLoadingPhotos(false);
|
|
111
117
|
case 17:
|
|
118
|
+
setLoadingPhotos(false);
|
|
119
|
+
case 18:
|
|
112
120
|
case "end":
|
|
113
121
|
return _context.stop();
|
|
114
122
|
}
|
|
115
|
-
}, _callee, null, [[4,
|
|
123
|
+
}, _callee, null, [[4, 14]]);
|
|
116
124
|
})), [currentIndex, selectedPicker, loadingPhotos]);
|
|
117
125
|
var getMorePhotosRef = (0, _react.useRef)(getMorePhotos);
|
|
118
126
|
getMorePhotosRef.current = getMorePhotos;
|
|
@@ -235,10 +243,19 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
235
243
|
__self: _this,
|
|
236
244
|
__source: {
|
|
237
245
|
fileName: _jsxFileName,
|
|
238
|
-
lineNumber:
|
|
246
|
+
lineNumber: 302,
|
|
239
247
|
columnNumber: 9
|
|
240
248
|
}
|
|
241
|
-
}, _react["default"].createElement(
|
|
249
|
+
}, iOSLimited && _react["default"].createElement(_reactNative.Button, {
|
|
250
|
+
onPress: _native.iOS14RefreshGallerySelection,
|
|
251
|
+
title: t('Select More Photos'),
|
|
252
|
+
__self: _this,
|
|
253
|
+
__source: {
|
|
254
|
+
fileName: _jsxFileName,
|
|
255
|
+
lineNumber: 319,
|
|
256
|
+
columnNumber: 13
|
|
257
|
+
}
|
|
258
|
+
}), _react["default"].createElement(_bottomSheet.BottomSheetFlatList, {
|
|
242
259
|
contentContainerStyle: [styles.container, {
|
|
243
260
|
backgroundColor: white
|
|
244
261
|
}, bottomSheetContentContainer, {
|
|
@@ -254,7 +271,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
254
271
|
__self: _this,
|
|
255
272
|
__source: {
|
|
256
273
|
fileName: _jsxFileName,
|
|
257
|
-
lineNumber:
|
|
274
|
+
lineNumber: 321,
|
|
258
275
|
columnNumber: 11
|
|
259
276
|
}
|
|
260
277
|
})), selectedPicker === 'images' && photoError && _react["default"].createElement(AttachmentPickerError, {
|
|
@@ -265,7 +282,7 @@ var AttachmentPicker = _react["default"].forwardRef(function (props, ref) {
|
|
|
265
282
|
__self: _this,
|
|
266
283
|
__source: {
|
|
267
284
|
fileName: _jsxFileName,
|
|
268
|
-
lineNumber:
|
|
285
|
+
lineNumber: 336,
|
|
269
286
|
columnNumber: 11
|
|
270
287
|
}
|
|
271
288
|
}));
|