stream-chat-react-native-core
Version:
The official React Native and Expo components for Stream Chat, a service for building chat applications
91 lines • 2.45 kB
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.useCreateMessageInputContext = void 0;
var _react = require("react");
var useCreateMessageInputContext = ({
additionalTextInputProps,
allowSendBeforeAttachmentsUpload,
asyncMessagesLockDistance,
asyncMessagesMinimumPressDuration,
asyncMessagesSlideToCancelDistance,
audioRecordingSendOnComplete,
attachmentPickerBottomSheetHeight,
attachmentSelectionBarHeight,
audioRecordingEnabled,
closeAttachmentPicker,
closePollCreationDialog,
compressImageQuality,
createPollOptionGap,
editMessage,
focusInputOnPickerClose,
handleAttachButtonPress,
hasCameraPicker,
hasCommands,
hasFilePicker,
hasImagePicker,
inputBoxRef,
messageInputFloating,
messageInputHeightStore,
openAttachmentPicker,
openPollCreationDialog,
pickAndUploadImageFromNativePicker,
pickFile,
sendMessage,
setInputBoxRef,
setInputRef,
showPollCreationDialog,
takeAndUploadImage,
uploadNewFile,
audioRecorderManager,
startVoiceRecording,
deleteVoiceRecording,
uploadVoiceRecording,
stopVoiceRecording,
thread
}) => {
var threadId = thread?.id;
var messageInputContext = (0, _react.useMemo)(() => ({
additionalTextInputProps,
allowSendBeforeAttachmentsUpload,
asyncMessagesLockDistance,
asyncMessagesMinimumPressDuration,
asyncMessagesSlideToCancelDistance,
audioRecordingSendOnComplete,
attachmentPickerBottomSheetHeight,
attachmentSelectionBarHeight,
audioRecordingEnabled,
closeAttachmentPicker,
closePollCreationDialog,
compressImageQuality,
createPollOptionGap,
editMessage,
focusInputOnPickerClose,
handleAttachButtonPress,
hasCameraPicker,
hasCommands,
hasFilePicker,
hasImagePicker,
inputBoxRef,
messageInputFloating,
messageInputHeightStore,
openAttachmentPicker,
openPollCreationDialog,
pickAndUploadImageFromNativePicker,
pickFile,
sendMessage,
setInputBoxRef,
setInputRef,
showPollCreationDialog,
takeAndUploadImage,
uploadNewFile,
audioRecorderManager,
startVoiceRecording,
deleteVoiceRecording,
uploadVoiceRecording,
stopVoiceRecording
}), [threadId, showPollCreationDialog, allowSendBeforeAttachmentsUpload]);
return messageInputContext;
};
exports.useCreateMessageInputContext = useCreateMessageInputContext;
//# sourceMappingURL=useCreateMessageInputContext.js.map