stream-chat-react-native-core 4.2.0 → 4.3.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/Attachment/Giphy.js +57 -26
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +28 -13
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +6 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +24 -21
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +5 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +50 -173
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js +138 -0
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +179 -0
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js +138 -0
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js.map +1 -0
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +15 -12
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +8 -2
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Giphy.js +57 -26
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +28 -13
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +6 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +24 -21
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +5 -0
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +50 -173
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js +138 -0
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js.map +1 -0
- package/lib/module/components/MessageInput/components/InputGiphySearch.js +179 -0
- package/lib/module/components/MessageInput/components/InputGiphySearch.js.map +1 -0
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js +138 -0
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js.map +1 -0
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +15 -12
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +8 -2
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Giphy.d.ts +5 -3
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +2 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/components/InputEditingStateHeader.d.ts +10 -0
- package/lib/typescript/components/MessageInput/components/InputGiphySearch.d.ts +10 -0
- package/lib/typescript/components/MessageInput/components/InputReplyStateHeader.d.ts +10 -0
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +7 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +5 -0
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +8 -2
- package/package.json +1 -1
- package/src/components/Attachment/Giphy.tsx +41 -12
- package/src/components/Channel/Channel.tsx +9 -0
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +6 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +1 -1
- package/src/components/ImageGallery/ImageGallery.tsx +14 -6
- package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +7 -0
- package/src/components/Message/MessageSimple/utils/parseLinks.ts +2 -1
- package/src/components/MessageInput/MessageInput.tsx +28 -109
- package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +0 -2
- package/src/components/MessageInput/components/InputEditingStateHeader.tsx +102 -0
- package/src/components/MessageInput/components/InputGiphySearch.tsx +129 -0
- package/src/components/MessageInput/components/InputReplyStateHeader.tsx +102 -0
- package/src/contexts/messageInputContext/MessageInputContext.tsx +9 -0
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +6 -0
- package/src/contexts/overlayContext/OverlayContext.tsx +5 -0
- package/src/contexts/overlayContext/OverlayProvider.tsx +2 -0
- package/src/contexts/themeContext/utils/theme.ts +16 -4
- package/src/version.json +1 -1
|
@@ -28,6 +28,9 @@ var useCreateInputMessageInputContext = function useCreateInputMessageInputConte
|
|
|
28
28
|
initialValue = _ref.initialValue,
|
|
29
29
|
Input = _ref.Input,
|
|
30
30
|
InputButtons = _ref.InputButtons,
|
|
31
|
+
InputEditingStateHeader = _ref.InputEditingStateHeader,
|
|
32
|
+
InputGiphySearch = _ref.InputGiphySearch,
|
|
33
|
+
InputReplyStateHeader = _ref.InputReplyStateHeader,
|
|
31
34
|
maxMessageLength = _ref.maxMessageLength,
|
|
32
35
|
maxNumberOfFiles = _ref.maxNumberOfFiles,
|
|
33
36
|
mentionAllAppUsersEnabled = _ref.mentionAllAppUsersEnabled,
|
|
@@ -69,6 +72,9 @@ var useCreateInputMessageInputContext = function useCreateInputMessageInputConte
|
|
|
69
72
|
initialValue: initialValue,
|
|
70
73
|
Input: Input,
|
|
71
74
|
InputButtons: InputButtons,
|
|
75
|
+
InputEditingStateHeader: InputEditingStateHeader,
|
|
76
|
+
InputGiphySearch: InputGiphySearch,
|
|
77
|
+
InputReplyStateHeader: InputReplyStateHeader,
|
|
72
78
|
maxMessageLength: maxMessageLength,
|
|
73
79
|
maxNumberOfFiles: maxNumberOfFiles,
|
|
74
80
|
mentionAllAppUsersEnabled: mentionAllAppUsersEnabled,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCreateInputMessageInputContext.ts"],"names":["useCreateInputMessageInputContext","additionalTextInputProps","AttachButton","autoCompleteSuggestionsLimit","autoCompleteTriggerSettings","channelId","clearEditingState","clearQuotedMessageState","CommandsButton","compressImageQuality","CooldownTimer","doDocUploadRequest","doImageUploadRequest","editing","editMessage","FileUploadPreview","hasCommands","hasFilePicker","hasImagePicker","ImageUploadPreview","initialValue","Input","InputButtons","maxMessageLength","maxNumberOfFiles","mentionAllAppUsersEnabled","mentionAllAppUsersQuery","MoreOptionsButton","numberOfLines","onChangeText","quotedMessage","SendButton","sendImageAsync","sendMessage","SendMessageDisallowedIndicator","setInputRef","setQuotedMessageState","ShowThreadMessageInChannelButton","UploadProgressIndicator","editingExists","quotedMessageId","id","inputMessageInputContext"],"mappings":";;;;;AAAA;;AAKO,IAAMA,iCAAiC,GAAG,SAApCA,iCAAoC,
|
|
1
|
+
{"version":3,"sources":["useCreateInputMessageInputContext.ts"],"names":["useCreateInputMessageInputContext","additionalTextInputProps","AttachButton","autoCompleteSuggestionsLimit","autoCompleteTriggerSettings","channelId","clearEditingState","clearQuotedMessageState","CommandsButton","compressImageQuality","CooldownTimer","doDocUploadRequest","doImageUploadRequest","editing","editMessage","FileUploadPreview","hasCommands","hasFilePicker","hasImagePicker","ImageUploadPreview","initialValue","Input","InputButtons","InputEditingStateHeader","InputGiphySearch","InputReplyStateHeader","maxMessageLength","maxNumberOfFiles","mentionAllAppUsersEnabled","mentionAllAppUsersQuery","MoreOptionsButton","numberOfLines","onChangeText","quotedMessage","SendButton","sendImageAsync","sendMessage","SendMessageDisallowedIndicator","setInputRef","setQuotedMessageState","ShowThreadMessageInChannelButton","UploadProgressIndicator","editingExists","quotedMessageId","id","inputMessageInputContext"],"mappings":";;;;;AAAA;;AAKO,IA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AAA,KAAK,EAALA,KApBK;AAqBLC,MAAAA,YAAY,EAAZA,YArBK;AAsBLC,MAAAA,uBAAuB,EAAvBA,uBAtBK;AAuBLC,MAAAA,gBAAgB,EAAhBA,gBAvBK;AAwBLC,MAAAA,qBAAqB,EAArBA,qBAxBK;AAyBLC,MAAAA,gBAAgB,EAAhBA,gBAzBK;AA0BLC,MAAAA,gBAAgB,EAAhBA,gBA1BK;AA2BLC,MAAAA,yBAAyB,EAAzBA,yBA3BK;AA4BLC,MAAAA,uBAAuB,EAAvBA,uBA5BK;AA6BLC,MAAAA,iBAAiB,EAAjBA,iBA7BK;AA8BLC,MAAAA,aAAa,EAAbA,aA9BK;AA+BLC,MAAAA,YAAY,EAAZA,YA/BK;AAgCLC,MAAAA,aAAa,EAAbA,aAhCK;AAiCLC,MAAAA,UAAU,EAAVA,UAjCK;AAkCLC,MAAAA,cAAc,EAAdA,cAlCK;AAmCLC,MAAAA,WAAW,EAAXA,WAnCK;AAoCLC,MAAAA,8BAA8B,EAA9BA,8BApCK;AAqCLC,MAAAA,WAAW,EAAXA,WArCK;AAsCLC,MAAAA,qBAAqB,EAArBA,qBAtCK;AAuCLC,MAAAA,gCAAgC,EAAhCA,gCAvCK;AAwCLC,MAAAA,uBAAuB,EAAvBA;AAxCK,KAAP;AAAA,GADkF,EA2ClF,CACEhC,oBADF,EAEEJ,SAFF,EAGEqC,aAHF,EAIEtB,YAJF,EAKEM,gBALF,EAMEiB,eANF,CA3CkF,CAApF;AAqDA,SAAOE,wBAAP;AACD,CA/GM","sourcesContent":["import { useMemo } from 'react';\n\nimport type { InputMessageInputContextValue } from '../../../contexts/messageInputContext/MessageInputContext';\nimport type { DefaultStreamChatGenerics } from '../../../types/types';\n\nexport const useCreateInputMessageInputContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n additionalTextInputProps,\n AttachButton,\n autoCompleteSuggestionsLimit,\n autoCompleteTriggerSettings,\n channelId,\n clearEditingState,\n clearQuotedMessageState,\n CommandsButton,\n compressImageQuality,\n CooldownTimer,\n doDocUploadRequest,\n doImageUploadRequest,\n editing,\n editMessage,\n FileUploadPreview,\n hasCommands,\n hasFilePicker,\n hasImagePicker,\n ImageUploadPreview,\n initialValue,\n Input,\n InputButtons,\n InputEditingStateHeader,\n InputGiphySearch,\n InputReplyStateHeader,\n maxMessageLength,\n maxNumberOfFiles,\n mentionAllAppUsersEnabled,\n mentionAllAppUsersQuery,\n MoreOptionsButton,\n numberOfLines,\n onChangeText,\n quotedMessage,\n SendButton,\n sendImageAsync,\n sendMessage,\n SendMessageDisallowedIndicator,\n setInputRef,\n setQuotedMessageState,\n ShowThreadMessageInChannelButton,\n UploadProgressIndicator,\n}: InputMessageInputContextValue<StreamChatGenerics> & {\n /**\n * To ensure we allow re-render, when channel is changed\n */\n channelId?: string;\n}) => {\n const editingExists = !!editing;\n const quotedMessageId = quotedMessage\n ? typeof quotedMessage === 'boolean'\n ? ''\n : quotedMessage.id\n : '';\n\n const inputMessageInputContext: InputMessageInputContextValue<StreamChatGenerics> = useMemo(\n () => ({\n additionalTextInputProps,\n AttachButton,\n autoCompleteSuggestionsLimit,\n autoCompleteTriggerSettings,\n clearEditingState,\n clearQuotedMessageState,\n CommandsButton,\n compressImageQuality,\n CooldownTimer,\n doDocUploadRequest,\n doImageUploadRequest,\n editing,\n editMessage,\n FileUploadPreview,\n hasCommands,\n hasFilePicker,\n hasImagePicker,\n ImageUploadPreview,\n initialValue,\n Input,\n InputButtons,\n InputEditingStateHeader,\n InputGiphySearch,\n InputReplyStateHeader,\n maxMessageLength,\n maxNumberOfFiles,\n mentionAllAppUsersEnabled,\n mentionAllAppUsersQuery,\n MoreOptionsButton,\n numberOfLines,\n onChangeText,\n quotedMessage,\n SendButton,\n sendImageAsync,\n sendMessage,\n SendMessageDisallowedIndicator,\n setInputRef,\n setQuotedMessageState,\n ShowThreadMessageInChannelButton,\n UploadProgressIndicator,\n }),\n [\n compressImageQuality,\n channelId,\n editingExists,\n initialValue,\n maxMessageLength,\n quotedMessageId,\n ],\n );\n\n return inputMessageInputContext;\n};\n"]}
|
|
@@ -24,7 +24,7 @@ var useCreatePaginatedMessageListContext = function useCreatePaginatedMessageLis
|
|
|
24
24
|
return "" + deleted_at + (latest_reactions ? latest_reactions.map(function (_ref3) {
|
|
25
25
|
var type = _ref3.type;
|
|
26
26
|
return type;
|
|
27
|
-
}).join() : '') + reply_count + status + updated_at.toISOString();
|
|
27
|
+
}).join() : '') + reply_count + status + ((updated_at == null ? void 0 : updated_at.toISOString == null ? void 0 : updated_at.toISOString()) || updated_at);
|
|
28
28
|
}).join();
|
|
29
29
|
var paginatedMessagesContext = (0, _react.useMemo)(function () {
|
|
30
30
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useCreatePaginatedMessageListContext.ts"],"names":["useCreatePaginatedMessageListContext","channelId","hasMore","loadingMore","loadingMoreRecent","loadMore","loadMoreRecent","messages","setLoadingMore","setLoadingMoreRecent","messagesUpdated","map","deleted_at","latest_reactions","reply_count","status","updated_at","type","join","toISOString","paginatedMessagesContext"],"mappings":";;;;;AAAA;;AAKO,IAAMA,oCAAoC,GAAG,SAAvCA,oCAAuC,OAc9C;AAAA,MAXJC,SAWI,QAXJA,SAWI;AAAA,MAVJC,OAUI,QAVJA,OAUI;AAAA,MATJC,WASI,QATJA,WASI;AAAA,MARJC,iBAQI,QARJA,iBAQI;AAAA,MAPJC,QAOI,QAPJA,QAOI;AAAA,MANJC,cAMI,QANJA,cAMI;AAAA,MALJC,QAKI,QALJA,QAKI;AAAA,MAJJC,cAII,QAJJA,cAII;AAAA,MAHJC,oBAGI,QAHJA,oBAGI;AACJ,MAAMC,eAAe,GAAGH,QAAQ,CAC7BI,GADqB,CAEpB;AAAA,QAAGC,UAAH,SAAGA,UAAH;AAAA,QAAeC,gBAAf,SAAeA,gBAAf;AAAA,QAAiCC,WAAjC,SAAiCA,WAAjC;AAAA,QAA8CC,MAA9C,SAA8CA,MAA9C;AAAA,QAAsDC,UAAtD,SAAsDA,UAAtD;AAAA,gBACKJ,UADL,IAEIC,gBAAgB,GAAGA,gBAAgB,CAACF,GAAjB,CAAqB;AAAA,UAAGM,IAAH,SAAGA,IAAH;AAAA,aAAcA,IAAd;AAAA,KAArB,EAAyCC,IAAzC,EAAH,GAAqD,EAFzE,IAGKJ,WAHL,GAGmBC,MAHnB,
|
|
1
|
+
{"version":3,"sources":["useCreatePaginatedMessageListContext.ts"],"names":["useCreatePaginatedMessageListContext","channelId","hasMore","loadingMore","loadingMoreRecent","loadMore","loadMoreRecent","messages","setLoadingMore","setLoadingMoreRecent","messagesUpdated","map","deleted_at","latest_reactions","reply_count","status","updated_at","type","join","toISOString","paginatedMessagesContext"],"mappings":";;;;;AAAA;;AAKO,IAAMA,oCAAoC,GAAG,SAAvCA,oCAAuC,OAc9C;AAAA,MAXJC,SAWI,QAXJA,SAWI;AAAA,MAVJC,OAUI,QAVJA,OAUI;AAAA,MATJC,WASI,QATJA,WASI;AAAA,MARJC,iBAQI,QARJA,iBAQI;AAAA,MAPJC,QAOI,QAPJA,QAOI;AAAA,MANJC,cAMI,QANJA,cAMI;AAAA,MALJC,QAKI,QALJA,QAKI;AAAA,MAJJC,cAII,QAJJA,cAII;AAAA,MAHJC,oBAGI,QAHJA,oBAGI;AACJ,MAAMC,eAAe,GAAGH,QAAQ,CAC7BI,GADqB,CAEpB;AAAA,QAAGC,UAAH,SAAGA,UAAH;AAAA,QAAeC,gBAAf,SAAeA,gBAAf;AAAA,QAAiCC,WAAjC,SAAiCA,WAAjC;AAAA,QAA8CC,MAA9C,SAA8CA,MAA9C;AAAA,QAAsDC,UAAtD,SAAsDA,UAAtD;AAAA,gBACKJ,UADL,IAEIC,gBAAgB,GAAGA,gBAAgB,CAACF,GAAjB,CAAqB;AAAA,UAAGM,IAAH,SAAGA,IAAH;AAAA,aAAcA,IAAd;AAAA,KAArB,EAAyCC,IAAzC,EAAH,GAAqD,EAFzE,IAGKJ,WAHL,GAGmBC,MAHnB,IAG4B,CAAAC,UAAU,QAAV,YAAAA,UAAU,CAAEG,WAAZ,oBAAAH,UAAU,CAAEG,WAAZ,OAA+BH,UAH3D;AAAA,GAFoB,EAOrBE,IAPqB,EAAxB;AASA,MAAME,wBAA8E,GAAG,oBACrF;AAAA,WAAO;AACLlB,MAAAA,OAAO,EAAPA,OADK;AAELC,MAAAA,WAAW,EAAXA,WAFK;AAGLC,MAAAA,iBAAiB,EAAjBA,iBAHK;AAILC,MAAAA,QAAQ,EAARA,QAJK;AAKLC,MAAAA,cAAc,EAAdA,cALK;AAMLC,MAAAA,QAAQ,EAARA,QANK;AAOLC,MAAAA,cAAc,EAAdA,cAPK;AAQLC,MAAAA,oBAAoB,EAApBA;AARK,KAAP;AAAA,GADqF,EAWrF,CAACR,SAAD,EAAYC,OAAZ,EAAqBE,iBAArB,EAAwCD,WAAxC,EAAqDO,eAArD,CAXqF,CAAvF;AAcA,SAAOU,wBAAP;AACD,CAvCM","sourcesContent":["import { useMemo } from 'react';\n\nimport type { PaginatedMessageListContextValue } from '../../../contexts/paginatedMessageListContext/PaginatedMessageListContext';\nimport type { DefaultStreamChatGenerics } from '../../../types/types';\n\nexport const useCreatePaginatedMessageListContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n channelId,\n hasMore,\n loadingMore,\n loadingMoreRecent,\n loadMore,\n loadMoreRecent,\n messages,\n setLoadingMore,\n setLoadingMoreRecent,\n}: PaginatedMessageListContextValue<StreamChatGenerics> & {\n channelId?: string;\n}) => {\n const messagesUpdated = messages\n .map(\n ({ deleted_at, latest_reactions, reply_count, status, updated_at }) =>\n `${deleted_at}${\n latest_reactions ? latest_reactions.map(({ type }) => type).join() : ''\n }${reply_count}${status}${updated_at?.toISOString?.() || updated_at}`,\n )\n .join();\n\n const paginatedMessagesContext: PaginatedMessageListContextValue<StreamChatGenerics> = useMemo(\n () => ({\n hasMore,\n loadingMore,\n loadingMoreRecent,\n loadMore,\n loadMoreRecent,\n messages,\n setLoadingMore,\n setLoadingMoreRecent,\n }),\n [channelId, hasMore, loadingMoreRecent, loadingMore, messagesUpdated],\n );\n\n return paginatedMessagesContext;\n};\n"]}
|
|
@@ -84,7 +84,8 @@ exports.IsSwiping = IsSwiping;
|
|
|
84
84
|
var ImageGallery = function ImageGallery(props) {
|
|
85
85
|
var _StatusBar$currentHei, _photos$selectedIndex;
|
|
86
86
|
|
|
87
|
-
var
|
|
87
|
+
var giphyVersion = props.giphyVersion,
|
|
88
|
+
imageGalleryCustomComponents = props.imageGalleryCustomComponents,
|
|
88
89
|
imageGalleryGridHandleHeight = props.imageGalleryGridHandleHeight,
|
|
89
90
|
imageGalleryGridSnapPoints = props.imageGalleryGridSnapPoints,
|
|
90
91
|
numberOfImageGalleryGridColumns = props.numberOfImageGalleryGridColumns,
|
|
@@ -220,7 +221,9 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
220
221
|
var _cur$attachments;
|
|
221
222
|
|
|
222
223
|
var attachmentImages = ((_cur$attachments = cur.attachments) == null ? void 0 : _cur$attachments.filter(function (attachment) {
|
|
223
|
-
|
|
224
|
+
var _attachment$giphy, _attachment$giphy$gip;
|
|
225
|
+
|
|
226
|
+
return attachment.type === 'giphy' && (((_attachment$giphy = attachment.giphy) == null ? void 0 : (_attachment$giphy$gip = _attachment$giphy[giphyVersion]) == null ? void 0 : _attachment$giphy$gip.url) || attachment.thumb_url || attachment.image_url) || attachment.type === 'image' && !attachment.title_link && !attachment.og_scrape_url && (0, _getUrlOfImageAttachment.getUrlOfImageAttachment)(attachment);
|
|
224
227
|
})) || [];
|
|
225
228
|
var attachmentPhotos = attachmentImages.map(function (a) {
|
|
226
229
|
var imageUrl = (0, _getUrlOfImageAttachment.getUrlOfImageAttachment)(a);
|
|
@@ -582,7 +585,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
582
585
|
__self: _this,
|
|
583
586
|
__source: {
|
|
584
587
|
fileName: _jsxFileName,
|
|
585
|
-
lineNumber:
|
|
588
|
+
lineNumber: 1050,
|
|
586
589
|
columnNumber: 5
|
|
587
590
|
}
|
|
588
591
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -590,7 +593,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
590
593
|
__self: _this,
|
|
591
594
|
__source: {
|
|
592
595
|
fileName: _jsxFileName,
|
|
593
|
-
lineNumber:
|
|
596
|
+
lineNumber: 1051,
|
|
594
597
|
columnNumber: 7
|
|
595
598
|
}
|
|
596
599
|
}), _react["default"].createElement(_reactNativeGestureHandler.TapGestureHandler, {
|
|
@@ -602,7 +605,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
602
605
|
__self: _this,
|
|
603
606
|
__source: {
|
|
604
607
|
fileName: _jsxFileName,
|
|
605
|
-
lineNumber:
|
|
608
|
+
lineNumber: 1052,
|
|
606
609
|
columnNumber: 7
|
|
607
610
|
}
|
|
608
611
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -610,7 +613,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
610
613
|
__self: _this,
|
|
611
614
|
__source: {
|
|
612
615
|
fileName: _jsxFileName,
|
|
613
|
-
lineNumber:
|
|
616
|
+
lineNumber: 1059,
|
|
614
617
|
columnNumber: 9
|
|
615
618
|
}
|
|
616
619
|
}, _react["default"].createElement(_reactNativeGestureHandler.TapGestureHandler, {
|
|
@@ -624,7 +627,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
624
627
|
__self: _this,
|
|
625
628
|
__source: {
|
|
626
629
|
fileName: _jsxFileName,
|
|
627
|
-
lineNumber:
|
|
630
|
+
lineNumber: 1060,
|
|
628
631
|
columnNumber: 11
|
|
629
632
|
}
|
|
630
633
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -632,7 +635,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
632
635
|
__self: _this,
|
|
633
636
|
__source: {
|
|
634
637
|
fileName: _jsxFileName,
|
|
635
|
-
lineNumber:
|
|
638
|
+
lineNumber: 1069,
|
|
636
639
|
columnNumber: 13
|
|
637
640
|
}
|
|
638
641
|
}, _react["default"].createElement(_reactNativeGestureHandler.PinchGestureHandler, {
|
|
@@ -642,7 +645,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
642
645
|
__self: _this,
|
|
643
646
|
__source: {
|
|
644
647
|
fileName: _jsxFileName,
|
|
645
|
-
lineNumber:
|
|
648
|
+
lineNumber: 1070,
|
|
646
649
|
columnNumber: 15
|
|
647
650
|
}
|
|
648
651
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -650,7 +653,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
650
653
|
__self: _this,
|
|
651
654
|
__source: {
|
|
652
655
|
fileName: _jsxFileName,
|
|
653
|
-
lineNumber:
|
|
656
|
+
lineNumber: 1075,
|
|
654
657
|
columnNumber: 17
|
|
655
658
|
}
|
|
656
659
|
}, _react["default"].createElement(_reactNativeGestureHandler.PanGestureHandler, {
|
|
@@ -663,7 +666,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
663
666
|
__self: _this,
|
|
664
667
|
__source: {
|
|
665
668
|
fileName: _jsxFileName,
|
|
666
|
-
lineNumber:
|
|
669
|
+
lineNumber: 1076,
|
|
667
670
|
columnNumber: 19
|
|
668
671
|
}
|
|
669
672
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -671,7 +674,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
671
674
|
__self: _this,
|
|
672
675
|
__source: {
|
|
673
676
|
fileName: _jsxFileName,
|
|
674
|
-
lineNumber:
|
|
677
|
+
lineNumber: 1084,
|
|
675
678
|
columnNumber: 21
|
|
676
679
|
}
|
|
677
680
|
}, _react["default"].createElement(_reactNativeReanimated["default"].View, {
|
|
@@ -685,7 +688,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
685
688
|
__self: _this,
|
|
686
689
|
__source: {
|
|
687
690
|
fileName: _jsxFileName,
|
|
688
|
-
lineNumber:
|
|
691
|
+
lineNumber: 1085,
|
|
689
692
|
columnNumber: 23
|
|
690
693
|
}
|
|
691
694
|
}, photos.map(function (photo, i) {
|
|
@@ -709,7 +712,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
709
712
|
__self: _this,
|
|
710
713
|
__source: {
|
|
711
714
|
fileName: _jsxFileName,
|
|
712
|
-
lineNumber:
|
|
715
|
+
lineNumber: 1101,
|
|
713
716
|
columnNumber: 27
|
|
714
717
|
}
|
|
715
718
|
});
|
|
@@ -721,7 +724,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
721
724
|
__self: _this,
|
|
722
725
|
__source: {
|
|
723
726
|
fileName: _jsxFileName,
|
|
724
|
-
lineNumber:
|
|
727
|
+
lineNumber: 1132,
|
|
725
728
|
columnNumber: 7
|
|
726
729
|
}
|
|
727
730
|
})), _react["default"].createElement(_ImageGalleryFooter.ImageGalleryFooter, (0, _extends2["default"])({
|
|
@@ -735,7 +738,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
735
738
|
__self: _this,
|
|
736
739
|
__source: {
|
|
737
740
|
fileName: _jsxFileName,
|
|
738
|
-
lineNumber:
|
|
741
|
+
lineNumber: 1138,
|
|
739
742
|
columnNumber: 7
|
|
740
743
|
}
|
|
741
744
|
})), _react["default"].createElement(_ImageGalleryOverlay.ImageGalleryOverlay, {
|
|
@@ -745,14 +748,14 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
745
748
|
__self: _this,
|
|
746
749
|
__source: {
|
|
747
750
|
fileName: _jsxFileName,
|
|
748
|
-
lineNumber:
|
|
751
|
+
lineNumber: 1147,
|
|
749
752
|
columnNumber: 7
|
|
750
753
|
}
|
|
751
754
|
}), _react["default"].createElement(_bottomSheet.BottomSheetModalProvider, {
|
|
752
755
|
__self: _this,
|
|
753
756
|
__source: {
|
|
754
757
|
fileName: _jsxFileName,
|
|
755
|
-
lineNumber:
|
|
758
|
+
lineNumber: 1152,
|
|
756
759
|
columnNumber: 7
|
|
757
760
|
}
|
|
758
761
|
}, _react["default"].createElement(_bottomSheet.BottomSheetModal, {
|
|
@@ -765,7 +768,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
765
768
|
__self: _this,
|
|
766
769
|
__source: {
|
|
767
770
|
fileName: _jsxFileName,
|
|
768
|
-
lineNumber:
|
|
771
|
+
lineNumber: 1157,
|
|
769
772
|
columnNumber: 13
|
|
770
773
|
}
|
|
771
774
|
}));
|
|
@@ -780,7 +783,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
780
783
|
__self: _this,
|
|
781
784
|
__source: {
|
|
782
785
|
fileName: _jsxFileName,
|
|
783
|
-
lineNumber:
|
|
786
|
+
lineNumber: 1153,
|
|
784
787
|
columnNumber: 9
|
|
785
788
|
}
|
|
786
789
|
}, _react["default"].createElement(_ImageGrid.ImageGrid, (0, _extends2["default"])({
|
|
@@ -792,7 +795,7 @@ var ImageGallery = function ImageGallery(props) {
|
|
|
792
795
|
__self: _this,
|
|
793
796
|
__source: {
|
|
794
797
|
fileName: _jsxFileName,
|
|
795
|
-
lineNumber:
|
|
798
|
+
lineNumber: 1168,
|
|
796
799
|
columnNumber: 11
|
|
797
800
|
}
|
|
798
801
|
})))));
|