@sendbird/uikit-react-native 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/lib/commonjs/components/ChannelInput/SendInput.js +2 -1
  2. package/lib/commonjs/components/ChannelInput/SendInput.js.map +1 -1
  3. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js +33 -23
  4. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js.map +1 -1
  5. package/lib/commonjs/components/ChannelInput/index.js +11 -5
  6. package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
  7. package/lib/commonjs/components/ChannelMessageList/index.js +6 -1
  8. package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
  9. package/lib/commonjs/components/ChannelThreadMessageList/index.js +6 -1
  10. package/lib/commonjs/components/ChannelThreadMessageList/index.js.map +1 -1
  11. package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js +2 -2
  12. package/lib/commonjs/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js.map +1 -1
  13. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js +1 -1
  14. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js.map +1 -1
  15. package/lib/commonjs/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.js +2 -2
  16. package/lib/commonjs/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.js.map +1 -1
  17. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js +7 -3
  18. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  19. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js +7 -3
  20. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -1
  21. package/lib/commonjs/components/ThreadParentMessageRenderer/index.js +1 -1
  22. package/lib/commonjs/components/ThreadParentMessageRenderer/index.js.map +1 -1
  23. package/lib/commonjs/containers/SendbirdUIKitContainer.js +0 -1
  24. package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
  25. package/lib/commonjs/contexts/PlatformServiceCtx.js +2 -1
  26. package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -1
  27. package/lib/commonjs/contexts/SBUHandlersCtx.js.map +1 -1
  28. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +2 -2
  29. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  30. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +8 -4
  31. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  32. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadMessageList.js +1 -1
  33. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadMessageList.js.map +1 -1
  34. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js +8 -3
  35. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js.map +1 -1
  36. package/lib/commonjs/fragments/createGroupChannelFragment.js +3 -2
  37. package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
  38. package/lib/commonjs/fragments/createGroupChannelThreadFragment.js +3 -2
  39. package/lib/commonjs/fragments/createGroupChannelThreadFragment.js.map +1 -1
  40. package/lib/commonjs/hooks/useConnection.js +2 -2
  41. package/lib/commonjs/hooks/useConnection.js.map +1 -1
  42. package/lib/commonjs/hooks/usePushTokenRegistration.js +28 -7
  43. package/lib/commonjs/hooks/usePushTokenRegistration.js.map +1 -1
  44. package/lib/commonjs/localization/StringSet.en.js +2 -3
  45. package/lib/commonjs/localization/StringSet.en.js.map +1 -1
  46. package/lib/commonjs/platform/createPlayerService.expo.js +8 -2
  47. package/lib/commonjs/platform/createPlayerService.expo.js.map +1 -1
  48. package/lib/commonjs/platform/createPlayerService.native.js +9 -3
  49. package/lib/commonjs/platform/createPlayerService.native.js.map +1 -1
  50. package/lib/commonjs/platform/createRecorderService.native.js +8 -2
  51. package/lib/commonjs/platform/createRecorderService.native.js.map +1 -1
  52. package/lib/commonjs/version.js +1 -1
  53. package/lib/commonjs/version.js.map +1 -1
  54. package/lib/module/components/ChannelInput/SendInput.js +2 -1
  55. package/lib/module/components/ChannelInput/SendInput.js.map +1 -1
  56. package/lib/module/components/ChannelInput/VoiceMessageInput.js +34 -24
  57. package/lib/module/components/ChannelInput/VoiceMessageInput.js.map +1 -1
  58. package/lib/module/components/ChannelInput/index.js +12 -6
  59. package/lib/module/components/ChannelInput/index.js.map +1 -1
  60. package/lib/module/components/ChannelMessageList/index.js +6 -1
  61. package/lib/module/components/ChannelMessageList/index.js.map +1 -1
  62. package/lib/module/components/ChannelThreadMessageList/index.js +6 -1
  63. package/lib/module/components/ChannelThreadMessageList/index.js.map +1 -1
  64. package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js +1 -1
  65. package/lib/module/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.js.map +1 -1
  66. package/lib/module/components/GroupChannelMessageRenderer/index.js +1 -1
  67. package/lib/module/components/GroupChannelMessageRenderer/index.js.map +1 -1
  68. package/lib/module/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.js +1 -1
  69. package/lib/module/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.js.map +1 -1
  70. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js +8 -4
  71. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  72. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js +7 -3
  73. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -1
  74. package/lib/module/components/ThreadParentMessageRenderer/index.js +1 -1
  75. package/lib/module/components/ThreadParentMessageRenderer/index.js.map +1 -1
  76. package/lib/module/containers/SendbirdUIKitContainer.js +0 -1
  77. package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
  78. package/lib/module/contexts/PlatformServiceCtx.js +2 -1
  79. package/lib/module/contexts/PlatformServiceCtx.js.map +1 -1
  80. package/lib/module/contexts/SBUHandlersCtx.js.map +1 -1
  81. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +2 -2
  82. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  83. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +8 -4
  84. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  85. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadMessageList.js +1 -1
  86. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadMessageList.js.map +1 -1
  87. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js +8 -3
  88. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js.map +1 -1
  89. package/lib/module/fragments/createGroupChannelFragment.js +3 -2
  90. package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
  91. package/lib/module/fragments/createGroupChannelThreadFragment.js +3 -2
  92. package/lib/module/fragments/createGroupChannelThreadFragment.js.map +1 -1
  93. package/lib/module/hooks/useConnection.js +2 -2
  94. package/lib/module/hooks/useConnection.js.map +1 -1
  95. package/lib/module/hooks/usePushTokenRegistration.js +28 -7
  96. package/lib/module/hooks/usePushTokenRegistration.js.map +1 -1
  97. package/lib/module/localization/StringSet.en.js +2 -2
  98. package/lib/module/localization/StringSet.en.js.map +1 -1
  99. package/lib/module/platform/createPlayerService.expo.js +9 -3
  100. package/lib/module/platform/createPlayerService.expo.js.map +1 -1
  101. package/lib/module/platform/createPlayerService.native.js +10 -4
  102. package/lib/module/platform/createPlayerService.native.js.map +1 -1
  103. package/lib/module/platform/createRecorderService.native.js +9 -3
  104. package/lib/module/platform/createRecorderService.native.js.map +1 -1
  105. package/lib/module/version.js +1 -1
  106. package/lib/module/version.js.map +1 -1
  107. package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +1 -1
  108. package/lib/typescript/src/contexts/SBUHandlersCtx.d.ts +1 -1
  109. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput.d.ts +1 -1
  110. package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +1 -1
  111. package/lib/typescript/src/domain/groupChannelThread/component/GroupChannelThreadInput.d.ts +1 -1
  112. package/lib/typescript/src/domain/groupChannelThread/component/GroupChannelThreadMessageList.d.ts +1 -1
  113. package/lib/typescript/src/domain/openChannel/component/OpenChannelInput.d.ts +1 -1
  114. package/lib/typescript/src/domain/openChannel/component/OpenChannelMessageList.d.ts +1 -1
  115. package/lib/typescript/src/version.d.ts +1 -1
  116. package/package.json +6 -6
  117. package/src/components/ChannelInput/SendInput.tsx +2 -1
  118. package/src/components/ChannelInput/VoiceMessageInput.tsx +40 -24
  119. package/src/components/ChannelInput/index.tsx +16 -6
  120. package/src/components/ChannelMessageList/index.tsx +5 -1
  121. package/src/components/ChannelThreadMessageList/index.tsx +5 -1
  122. package/src/components/GroupChannelMessageRenderer/GroupChannelMessageDateSeparator.tsx +1 -1
  123. package/src/components/GroupChannelMessageRenderer/index.tsx +1 -1
  124. package/src/components/OpenChannelMessageRenderer/OpenChannelMessageDateSeparator.tsx +1 -1
  125. package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +10 -5
  126. package/src/components/ReactionBottomSheets/ReactionListBottomSheet.tsx +7 -4
  127. package/src/components/ThreadParentMessageRenderer/index.tsx +1 -1
  128. package/src/containers/SendbirdUIKitContainer.tsx +0 -1
  129. package/src/contexts/PlatformServiceCtx.tsx +2 -1
  130. package/src/contexts/SBUHandlersCtx.tsx +1 -1
  131. package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +2 -2
  132. package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +8 -4
  133. package/src/domain/groupChannelThread/component/GroupChannelThreadMessageList.tsx +1 -1
  134. package/src/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.tsx +7 -3
  135. package/src/fragments/createGroupChannelFragment.tsx +3 -2
  136. package/src/fragments/createGroupChannelThreadFragment.tsx +3 -2
  137. package/src/hooks/useConnection.ts +8 -2
  138. package/src/hooks/usePushTokenRegistration.ts +28 -7
  139. package/src/localization/StringSet.en.ts +2 -2
  140. package/src/platform/createPlayerService.expo.tsx +9 -3
  141. package/src/platform/createPlayerService.native.tsx +10 -4
  142. package/src/platform/createRecorderService.native.tsx +9 -3
  143. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["React","useContext","useEffect","useRef","Box","GroupChannelMessage","Text","TypingIndicatorBubble","useUIKitTheme","calcMessageGrouping","getMessageType","isMyMessage","isVoiceMessage","shouldRenderParentMessage","shouldRenderReaction","useIIFE","VOICE_MESSAGE_META_ARRAY_DURATION_KEY","GroupChannelContexts","useLocalization","usePlatformService","useSBUHandlers","useSendbirdChat","TypingIndicatorType","ReactionAddons","GroupChannelMessageDateSeparator","GroupChannelMessageFocusAnimation","GroupChannelMessageOutgoingStatus","GroupChannelMessageParentMessage","GroupChannelMessageReplyInfo","GroupChannelMessageRenderer","_ref","channel","message","onPress","onLongPress","onPressParentMessage","onShowUserProfile","onReplyInThreadMessage","enableMessageGrouping","focused","prevMessage","nextMessage","hideParentMessage","handlers","playerUnsubscribes","palette","sbOptions","currentUser","mentionManager","voiceMessageStatusManager","STRINGS","mediaService","playerService","groupWithPrev","groupWithNext","Boolean","uikit","groupChannel","replyType","variant","userId","reactionChildren","configs","uikitWithAppInfo","isSuper","enableReactionsSupergroup","enableReactions","reactions","length","createElement","Message","replyInfo","threadInfo","replyCount","resetPlayer","current","forEach","unsubscribe","reset","messageProps","onPressURL","url","onOpenURL","onPressAvatar","sender","onPressMentionedUser","mentionedUser","onToggleVoiceMessage","state","setState","sendingStatus","uri","pause","play","shouldSeekToTime","duration","currentTime","seekFinished","forPlayback","addPlaybackListener","_ref2","stopped","setCurrentTime","channelUrl","messageId","prevState","forState","addStateListener","status","push","seek","groupedWithPrev","groupedWithNext","children","parentMessage","childMessage","strings","edited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","senderName","nickname","LABELS","USER_NO_NAME","sentDate","MESSAGE_BUBBLE_TIME","fileName","isFileMessage","MESSAGE_BUBBLE_FILE_TITLE","unknownTitle","MESSAGE_BUBBLE_UNKNOWN_TITLE","unknownDescription","MESSAGE_BUBBLE_UNKNOWN_DESC","userMessageProps","renderRegexTextChildren","shouldUseMentionedMessageTemplate","enableMention","mentionedMessageTemplate","regexTextPatterns","regex","templateRegex","replacer","_ref3","_message$mentionedUse","match","groups","parentProps","index","keyPrefix","user","mentionedUsers","find","it","mentionColor","onBackgroundLight01","color","_extends","key","_messageProps$onPress","call","style","fontWeight","backgroundColor","highlight","asMentionedMessageText","renderMessage","Admin","ogMetaData","enableOgtag","OpenGraphUser","User","File","ImageFile","VideoFile","fetchThumbnailFromVideoSource","getVideoThumbnail","timeMills","VoiceFile","durationMetaArrayKey","initialCurrentTime","getCurrentTime","onSubscribeStatus","subscribe","onUnsubscribeStatus","onUnmount","Unknown","messageGap","isAdminMessage","paddingHorizontal","marginBottom","GroupChannelTypingIndicatorBubble","publish","PubSub","typingUsers","TypingIndicator","shouldRenderBubble","enableTypingIndicator","typingIndicatorTypes","has","Bubble","type","marginTop","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef } from 'react';\n\nimport type { GroupChannelMessageProps, RegexTextPattern } from '@sendbird/uikit-react-native-foundation';\nimport {\n Box,\n GroupChannelMessage,\n Text,\n TypingIndicatorBubble,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdAdminMessage,\n SendbirdFileMessage,\n SendbirdMessage,\n SendbirdUserMessage,\n calcMessageGrouping,\n getMessageType,\n isMyMessage,\n isVoiceMessage,\n shouldRenderParentMessage,\n shouldRenderReaction,\n useIIFE,\n} from '@sendbird/uikit-utils';\n\nimport { VOICE_MESSAGE_META_ARRAY_DURATION_KEY } from '../../constants';\nimport { GroupChannelContexts } from '../../domain/groupChannel/module/moduleContext';\nimport type { GroupChannelProps } from '../../domain/groupChannel/types';\nimport { useLocalization, usePlatformService, useSBUHandlers, useSendbirdChat } from '../../hooks/useContext';\nimport { TypingIndicatorType } from '../../types';\nimport { ReactionAddons } from '../ReactionAddons';\nimport GroupChannelMessageDateSeparator from './GroupChannelMessageDateSeparator';\nimport GroupChannelMessageFocusAnimation from './GroupChannelMessageFocusAnimation';\nimport GroupChannelMessageOutgoingStatus from './GroupChannelMessageOutgoingStatus';\nimport GroupChannelMessageParentMessage from './GroupChannelMessageParentMessage';\nimport GroupChannelMessageReplyInfo from './GroupChannelMessageReplyInfo';\n\nconst GroupChannelMessageRenderer: GroupChannelProps['Fragment']['renderMessage'] = ({\n channel,\n message,\n onPress,\n onLongPress,\n onPressParentMessage,\n onShowUserProfile,\n onReplyInThreadMessage,\n enableMessageGrouping,\n focused,\n prevMessage,\n nextMessage,\n hideParentMessage,\n}) => {\n const handlers = useSBUHandlers();\n const playerUnsubscribes = useRef<(() => void)[]>([]);\n const { palette } = useUIKitTheme();\n const { sbOptions, currentUser, mentionManager, voiceMessageStatusManager } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { mediaService, playerService } = usePlatformService();\n const { groupWithPrev, groupWithNext } = calcMessageGrouping(\n Boolean(enableMessageGrouping),\n message,\n prevMessage,\n nextMessage,\n sbOptions.uikit.groupChannel.channel.replyType === 'thread',\n shouldRenderParentMessage(message, hideParentMessage),\n );\n\n const variant = isMyMessage(message, currentUser?.userId) ? 'outgoing' : 'incoming';\n\n const reactionChildren = useIIFE(() => {\n const configs = sbOptions.uikitWithAppInfo.groupChannel.channel;\n if (\n shouldRenderReaction(channel, channel.isSuper ? configs.enableReactionsSupergroup : configs.enableReactions) &&\n message.reactions &&\n message.reactions.length > 0\n ) {\n return <ReactionAddons.Message channel={channel} message={message} />;\n }\n return null;\n });\n\n const replyInfo = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType !== 'thread') return null;\n if (!channel || !message.threadInfo || !message.threadInfo.replyCount) return null;\n return <GroupChannelMessageReplyInfo channel={channel} message={message} onPress={onReplyInThreadMessage} />;\n });\n\n const resetPlayer = async () => {\n playerUnsubscribes.current.forEach((unsubscribe) => {\n try {\n unsubscribe();\n } catch {}\n });\n playerUnsubscribes.current.length = 0;\n await playerService.reset();\n };\n\n const messageProps: Omit<GroupChannelMessageProps<SendbirdMessage>, 'message'> = {\n channel,\n variant,\n onPress,\n onLongPress,\n onPressURL: (url) => handlers.onOpenURL(url),\n onPressAvatar: () => {\n if ('sender' in message) onShowUserProfile?.(message.sender);\n },\n onPressMentionedUser: (mentionedUser) => {\n if (mentionedUser) onShowUserProfile?.(mentionedUser);\n },\n onToggleVoiceMessage: async (state, setState) => {\n if (isVoiceMessage(message) && message.sendingStatus === 'succeeded') {\n if (playerService.uri === message.url) {\n if (playerService.state === 'playing') {\n await playerService.pause();\n } else {\n await playerService.play(message.url);\n }\n } else {\n if (playerService.state !== 'idle') {\n await resetPlayer();\n }\n\n const shouldSeekToTime = state.duration > state.currentTime && state.currentTime > 0;\n let seekFinished = !shouldSeekToTime;\n\n const forPlayback = playerService.addPlaybackListener(({ stopped, currentTime, duration }) => {\n voiceMessageStatusManager.setCurrentTime(message.channelUrl, message.messageId, currentTime);\n if (seekFinished) {\n setState((prevState) => ({ ...prevState, currentTime: stopped ? 0 : currentTime, duration }));\n }\n });\n const forState = playerService.addStateListener((state) => {\n switch (state) {\n case 'preparing':\n setState((prevState) => ({ ...prevState, status: 'preparing' }));\n break;\n case 'playing':\n setState((prevState) => ({ ...prevState, status: 'playing' }));\n break;\n case 'idle':\n case 'paused': {\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n case 'stopped':\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n });\n playerUnsubscribes.current.push(forPlayback, forState);\n\n await playerService.play(message.url);\n if (shouldSeekToTime) {\n await playerService.seek(state.currentTime);\n seekFinished = true;\n }\n }\n }\n },\n groupedWithPrev: groupWithPrev,\n groupedWithNext: groupWithNext,\n children: reactionChildren,\n replyInfo: replyInfo,\n sendingStatus: isMyMessage(message, currentUser?.userId) ? (\n <GroupChannelMessageOutgoingStatus channel={channel} message={message} />\n ) : null,\n parentMessage: shouldRenderParentMessage(message, hideParentMessage) ? (\n <GroupChannelMessageParentMessage\n channel={channel}\n message={message.parentMessage}\n variant={variant}\n childMessage={message}\n onPress={onPressParentMessage}\n />\n ) : null,\n strings: {\n edited: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX,\n senderName: ('sender' in message && message.sender.nickname) || STRINGS.LABELS.USER_NO_NAME,\n sentDate: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_TIME(message),\n fileName: message.isFileMessage() ? STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message) : '',\n unknownTitle: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_TITLE(message),\n unknownDescription: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_DESC(message),\n },\n };\n\n const userMessageProps: {\n renderRegexTextChildren: (message: SendbirdUserMessage) => string;\n regexTextPatterns: RegexTextPattern[];\n } = {\n renderRegexTextChildren: (message) => {\n if (\n mentionManager.shouldUseMentionedMessageTemplate(message, sbOptions.uikit.groupChannel.channel.enableMention)\n ) {\n return message.mentionedMessageTemplate;\n } else {\n return message.message;\n }\n },\n regexTextPatterns: [\n {\n regex: mentionManager.templateRegex,\n replacer({ match, groups, parentProps, index, keyPrefix }) {\n const user = message.mentionedUsers?.find((it) => it.userId === groups[2]);\n if (user) {\n const mentionColor =\n !isMyMessage(message, currentUser?.userId) && user.userId === currentUser?.userId\n ? palette.onBackgroundLight01\n : parentProps?.color;\n\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n color={mentionColor}\n onPress={() => messageProps.onPressMentionedUser?.(user)}\n onLongPress={messageProps.onLongPress}\n style={[\n parentProps?.style,\n { fontWeight: '700' },\n user.userId === currentUser?.userId && { backgroundColor: palette.highlight },\n ]}\n >\n {`${mentionManager.asMentionedMessageText(user)}`}\n </Text>\n );\n }\n return match;\n },\n },\n ],\n };\n\n const renderMessage = () => {\n switch (getMessageType(message)) {\n case 'admin': {\n return <GroupChannelMessage.Admin message={message as SendbirdAdminMessage} {...messageProps} />;\n }\n case 'user':\n case 'user.opengraph': {\n if (message.ogMetaData && sbOptions.uikitWithAppInfo.groupChannel.channel.enableOgtag) {\n return (\n <GroupChannelMessage.OpenGraphUser\n message={message as SendbirdUserMessage}\n {...userMessageProps}\n {...messageProps}\n />\n );\n } else {\n return (\n <GroupChannelMessage.User\n message={message as SendbirdUserMessage}\n {...userMessageProps}\n {...messageProps}\n />\n );\n }\n }\n case 'file':\n case 'file.audio': {\n return <GroupChannelMessage.File message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.image': {\n return <GroupChannelMessage.ImageFile message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.video': {\n return (\n <GroupChannelMessage.VideoFile\n message={message as SendbirdFileMessage}\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'file.voice': {\n return (\n <GroupChannelMessage.VoiceFile\n message={message as SendbirdFileMessage}\n durationMetaArrayKey={VOICE_MESSAGE_META_ARRAY_DURATION_KEY}\n initialCurrentTime={voiceMessageStatusManager.getCurrentTime(message.channelUrl, message.messageId)}\n onSubscribeStatus={voiceMessageStatusManager.subscribe}\n onUnsubscribeStatus={voiceMessageStatusManager.unsubscribe}\n onUnmount={() => {\n if (isVoiceMessage(message) && playerService.uri === message.url) {\n resetPlayer();\n }\n }}\n {...messageProps}\n />\n );\n }\n case 'unknown':\n default: {\n return <GroupChannelMessage.Unknown message={message} {...messageProps} />;\n }\n }\n };\n\n const messageGap = useIIFE(() => {\n if (message.isAdminMessage()) {\n if (nextMessage?.isAdminMessage()) {\n return 8;\n } else {\n return 16;\n }\n } else if (nextMessage && shouldRenderParentMessage(nextMessage, hideParentMessage)) {\n return 16;\n } else if (groupWithNext) {\n return 2;\n } else {\n return 16;\n }\n });\n\n return (\n <Box paddingHorizontal={16} marginBottom={messageGap}>\n <GroupChannelMessageDateSeparator message={message} prevMessage={prevMessage} />\n <GroupChannelMessageFocusAnimation focused={focused}>{renderMessage()}</GroupChannelMessageFocusAnimation>\n </Box>\n );\n};\n\nexport const GroupChannelTypingIndicatorBubble = () => {\n const { sbOptions } = useSendbirdChat();\n const { publish } = useContext(GroupChannelContexts.PubSub);\n const { typingUsers } = useContext(GroupChannelContexts.TypingIndicator);\n\n const shouldRenderBubble = useIIFE(() => {\n if (typingUsers.length === 0) return false;\n if (!sbOptions.uikit.groupChannel.channel.enableTypingIndicator) return false;\n if (!sbOptions.uikit.groupChannel.channel.typingIndicatorTypes.has(TypingIndicatorType.Bubble)) return false;\n return true;\n });\n\n useEffect(() => {\n if (shouldRenderBubble) publish({ type: 'TYPING_BUBBLE_RENDERED' });\n }, [shouldRenderBubble]);\n\n if (!shouldRenderBubble) return null;\n return (\n <Box paddingHorizontal={16} marginTop={4} marginBottom={16}>\n <TypingIndicatorBubble typingUsers={typingUsers} />\n </Box>\n );\n};\n\nexport default React.memo(GroupChannelMessageRenderer);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAG5D,SACEC,GAAG,EACHC,mBAAmB,EACnBC,IAAI,EACJC,qBAAqB,EACrBC,aAAa,QACR,yCAAyC;AAChD,SAKEC,mBAAmB,EACnBC,cAAc,EACdC,WAAW,EACXC,cAAc,EACdC,yBAAyB,EACzBC,oBAAoB,EACpBC,OAAO,QACF,uBAAuB;AAE9B,SAASC,qCAAqC,QAAQ,iBAAiB;AACvE,SAASC,oBAAoB,QAAQ,gDAAgD;AAErF,SAASC,eAAe,EAAEC,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,MAAMC,kBAAkB,GAAGpL,OAAO,CAAC,MAAM;IACvC,IAAIkL,WAAW,CAAC7H,MAAM,KAAK,CAAC,EAAE,OAAO,KAAK;IAC1C,IAAI,CAACtB,SAAS,CAACU,KAAK,CAACC,YAAY,CAAC1B,OAAO,CAACqK,qBAAqB,EAAE,OAAO,KAAK;IAC7E,IAAI,CAACtJ,SAAS,CAACU,KAAK,CAACC,YAAY,CAAC1B,OAAO,CAACsK,oBAAoB,CAACC,GAAG,CAAChL,mBAAmB,CAACiL,MAAM,CAAC,EAAE,OAAO,KAAK;IAC5G,OAAO,IAAI;EACb,CAAC,CAAC;EAEFrM,SAAS,CAAC,MAAM;IACd,IAAIiM,kBAAkB,EAAEJ,OAAO,CAAC;MAAES,IAAI,EAAE;IAAyB,CAAC,CAAC;EACrE,CAAC,EAAE,CAACL,kBAAkB,CAAC,CAAC;EAExB,IAAI,CAACA,kBAAkB,EAAE,OAAO,IAAI;EACpC,oBACEnM,KAAA,CAAAqE,aAAA,CAACjE,GAAG;IAACwL,iBAAiB,EAAE,EAAG;IAACa,SAAS,EAAE,CAAE;IAACZ,YAAY,EAAE;EAAG,gBACzD7L,KAAA,CAAAqE,aAAA,CAAC9D,qBAAqB;IAAC0L,WAAW,EAAEA;EAAY,EAAG,CAC/C;AAEV,CAAC;AAED,4BAAejM,KAAK,CAAC0M,IAAI,CAAC7K,2BAA2B,CAAC"}
1
+ {"version":3,"names":["React","useContext","useEffect","useRef","Box","GroupChannelMessage","Text","TypingIndicatorBubble","useUIKitTheme","calcMessageGrouping","getMessageType","isMyMessage","isVoiceMessage","shouldRenderParentMessage","shouldRenderReaction","useIIFE","VOICE_MESSAGE_META_ARRAY_DURATION_KEY","GroupChannelContexts","useLocalization","usePlatformService","useSBUHandlers","useSendbirdChat","TypingIndicatorType","ReactionAddons","GroupChannelMessageDateSeparator","GroupChannelMessageFocusAnimation","GroupChannelMessageOutgoingStatus","GroupChannelMessageParentMessage","GroupChannelMessageReplyInfo","GroupChannelMessageRenderer","_ref","channel","message","onPress","onLongPress","onPressParentMessage","onShowUserProfile","onReplyInThreadMessage","enableMessageGrouping","focused","prevMessage","nextMessage","hideParentMessage","handlers","playerUnsubscribes","palette","sbOptions","currentUser","mentionManager","voiceMessageStatusManager","STRINGS","mediaService","playerService","groupWithPrev","groupWithNext","Boolean","uikit","groupChannel","replyType","variant","userId","reactionChildren","configs","uikitWithAppInfo","isSuper","enableReactionsSupergroup","enableReactions","reactions","length","createElement","Message","replyInfo","threadInfo","replyCount","resetPlayer","current","forEach","unsubscribe","reset","messageProps","onPressURL","url","onOpenURL","onPressAvatar","sender","onPressMentionedUser","mentionedUser","onToggleVoiceMessage","state","setState","sendingStatus","uri","pause","play","shouldSeekToTime","duration","currentTime","seekFinished","forPlayback","addPlaybackListener","_ref2","stopped","setCurrentTime","channelUrl","messageId","prevState","forState","addStateListener","status","push","seek","groupedWithPrev","groupedWithNext","children","parentMessage","childMessage","strings","edited","GROUP_CHANNEL","MESSAGE_BUBBLE_EDITED_POSTFIX","senderName","nickname","LABELS","USER_NO_NAME","sentDate","MESSAGE_BUBBLE_TIME","fileName","isFileMessage","MESSAGE_BUBBLE_FILE_TITLE","unknownTitle","MESSAGE_BUBBLE_UNKNOWN_TITLE","unknownDescription","MESSAGE_BUBBLE_UNKNOWN_DESC","userMessageProps","renderRegexTextChildren","shouldUseMentionedMessageTemplate","enableMention","mentionedMessageTemplate","regexTextPatterns","regex","templateRegex","replacer","_ref3","_message$mentionedUse","match","groups","parentProps","index","keyPrefix","user","mentionedUsers","find","it","mentionColor","onBackgroundLight01","color","_extends","key","_messageProps$onPress","call","style","fontWeight","backgroundColor","highlight","asMentionedMessageText","renderMessage","Admin","ogMetaData","enableOgtag","OpenGraphUser","User","File","ImageFile","VideoFile","fetchThumbnailFromVideoSource","getVideoThumbnail","timeMills","VoiceFile","durationMetaArrayKey","initialCurrentTime","getCurrentTime","onSubscribeStatus","subscribe","onUnsubscribeStatus","onUnmount","catch","_","Unknown","messageGap","isAdminMessage","paddingHorizontal","marginBottom","GroupChannelTypingIndicatorBubble","publish","PubSub","typingUsers","TypingIndicator","shouldRenderBubble","enableTypingIndicator","typingIndicatorTypes","has","Bubble","type","marginTop","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { useContext, useEffect, useRef } from 'react';\n\nimport type { GroupChannelMessageProps, RegexTextPattern } from '@sendbird/uikit-react-native-foundation';\nimport {\n Box,\n GroupChannelMessage,\n Text,\n TypingIndicatorBubble,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdAdminMessage,\n SendbirdFileMessage,\n SendbirdMessage,\n SendbirdUserMessage,\n calcMessageGrouping,\n getMessageType,\n isMyMessage,\n isVoiceMessage,\n shouldRenderParentMessage,\n shouldRenderReaction,\n useIIFE,\n} from '@sendbird/uikit-utils';\n\nimport { VOICE_MESSAGE_META_ARRAY_DURATION_KEY } from '../../constants';\nimport { GroupChannelContexts } from '../../domain/groupChannel/module/moduleContext';\nimport type { GroupChannelProps } from '../../domain/groupChannel/types';\nimport { useLocalization, usePlatformService, useSBUHandlers, useSendbirdChat } from '../../hooks/useContext';\nimport { TypingIndicatorType } from '../../types';\nimport { ReactionAddons } from '../ReactionAddons';\nimport GroupChannelMessageDateSeparator from './GroupChannelMessageDateSeparator';\nimport GroupChannelMessageFocusAnimation from './GroupChannelMessageFocusAnimation';\nimport GroupChannelMessageOutgoingStatus from './GroupChannelMessageOutgoingStatus';\nimport GroupChannelMessageParentMessage from './GroupChannelMessageParentMessage';\nimport GroupChannelMessageReplyInfo from './GroupChannelMessageReplyInfo';\n\nconst GroupChannelMessageRenderer: GroupChannelProps['Fragment']['renderMessage'] = ({\n channel,\n message,\n onPress,\n onLongPress,\n onPressParentMessage,\n onShowUserProfile,\n onReplyInThreadMessage,\n enableMessageGrouping,\n focused,\n prevMessage,\n nextMessage,\n hideParentMessage,\n}) => {\n const handlers = useSBUHandlers();\n const playerUnsubscribes = useRef<(() => void)[]>([]);\n const { palette } = useUIKitTheme();\n const { sbOptions, currentUser, mentionManager, voiceMessageStatusManager } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n const { mediaService, playerService } = usePlatformService();\n const { groupWithPrev, groupWithNext } = calcMessageGrouping(\n Boolean(enableMessageGrouping),\n message,\n prevMessage,\n nextMessage,\n sbOptions.uikit.groupChannel.channel.replyType === 'thread',\n shouldRenderParentMessage(message, hideParentMessage),\n );\n\n const variant = isMyMessage(message, currentUser?.userId) ? 'outgoing' : 'incoming';\n\n const reactionChildren = useIIFE(() => {\n const configs = sbOptions.uikitWithAppInfo.groupChannel.channel;\n if (\n shouldRenderReaction(channel, channel.isSuper ? configs.enableReactionsSupergroup : configs.enableReactions) &&\n message.reactions &&\n message.reactions.length > 0\n ) {\n return <ReactionAddons.Message channel={channel} message={message} />;\n }\n return null;\n });\n\n const replyInfo = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType !== 'thread') return null;\n if (!channel || !message.threadInfo || !message.threadInfo.replyCount) return null;\n return <GroupChannelMessageReplyInfo channel={channel} message={message} onPress={onReplyInThreadMessage} />;\n });\n\n const resetPlayer = async () => {\n playerUnsubscribes.current.forEach((unsubscribe) => {\n try {\n unsubscribe();\n } catch {}\n });\n playerUnsubscribes.current.length = 0;\n await playerService.reset();\n };\n\n const messageProps: Omit<GroupChannelMessageProps<SendbirdMessage>, 'message'> = {\n channel,\n variant,\n onPress,\n onLongPress,\n onPressURL: (url) => handlers.onOpenURL(url),\n onPressAvatar: () => {\n if ('sender' in message) onShowUserProfile?.(message.sender);\n },\n onPressMentionedUser: (mentionedUser) => {\n if (mentionedUser) onShowUserProfile?.(mentionedUser);\n },\n onToggleVoiceMessage: async (state, setState) => {\n if (isVoiceMessage(message) && message.sendingStatus === 'succeeded') {\n if (playerService.uri === message.url) {\n if (playerService.state === 'playing') {\n await playerService.pause();\n } else {\n await playerService.play(message.url);\n }\n } else {\n if (playerService.state !== 'idle') {\n await resetPlayer();\n }\n\n const shouldSeekToTime = state.duration > state.currentTime && state.currentTime > 0;\n let seekFinished = !shouldSeekToTime;\n\n const forPlayback = playerService.addPlaybackListener(({ stopped, currentTime, duration }) => {\n voiceMessageStatusManager.setCurrentTime(message.channelUrl, message.messageId, currentTime);\n if (seekFinished) {\n setState((prevState) => ({ ...prevState, currentTime: stopped ? 0 : currentTime, duration }));\n }\n });\n const forState = playerService.addStateListener((state) => {\n switch (state) {\n case 'preparing':\n setState((prevState) => ({ ...prevState, status: 'preparing' }));\n break;\n case 'playing':\n setState((prevState) => ({ ...prevState, status: 'playing' }));\n break;\n case 'idle':\n case 'paused': {\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n case 'stopped':\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n });\n playerUnsubscribes.current.push(forPlayback, forState);\n\n await playerService.play(message.url);\n if (shouldSeekToTime) {\n await playerService.seek(state.currentTime);\n seekFinished = true;\n }\n }\n }\n },\n groupedWithPrev: groupWithPrev,\n groupedWithNext: groupWithNext,\n children: reactionChildren,\n replyInfo: replyInfo,\n sendingStatus: isMyMessage(message, currentUser?.userId) ? (\n <GroupChannelMessageOutgoingStatus channel={channel} message={message} />\n ) : null,\n parentMessage: shouldRenderParentMessage(message, hideParentMessage) ? (\n <GroupChannelMessageParentMessage\n channel={channel}\n message={message.parentMessage}\n variant={variant}\n childMessage={message}\n onPress={onPressParentMessage}\n />\n ) : null,\n strings: {\n edited: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_EDITED_POSTFIX,\n senderName: ('sender' in message && message.sender.nickname) || STRINGS.LABELS.USER_NO_NAME,\n sentDate: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_TIME(message),\n fileName: message.isFileMessage() ? STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_FILE_TITLE(message) : '',\n unknownTitle: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_TITLE(message),\n unknownDescription: STRINGS.GROUP_CHANNEL.MESSAGE_BUBBLE_UNKNOWN_DESC(message),\n },\n };\n\n const userMessageProps: {\n renderRegexTextChildren: (message: SendbirdUserMessage) => string;\n regexTextPatterns: RegexTextPattern[];\n } = {\n renderRegexTextChildren: (message) => {\n if (\n mentionManager.shouldUseMentionedMessageTemplate(message, sbOptions.uikit.groupChannel.channel.enableMention)\n ) {\n return message.mentionedMessageTemplate;\n } else {\n return message.message;\n }\n },\n regexTextPatterns: [\n {\n regex: mentionManager.templateRegex,\n replacer({ match, groups, parentProps, index, keyPrefix }) {\n const user = message.mentionedUsers?.find((it) => it.userId === groups[2]);\n if (user) {\n const mentionColor =\n !isMyMessage(message, currentUser?.userId) && user.userId === currentUser?.userId\n ? palette.onBackgroundLight01\n : parentProps?.color;\n\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n color={mentionColor}\n onPress={() => messageProps.onPressMentionedUser?.(user)}\n onLongPress={messageProps.onLongPress}\n style={[\n parentProps?.style,\n { fontWeight: '700' },\n user.userId === currentUser?.userId && { backgroundColor: palette.highlight },\n ]}\n >\n {`${mentionManager.asMentionedMessageText(user)}`}\n </Text>\n );\n }\n return match;\n },\n },\n ],\n };\n\n const renderMessage = () => {\n switch (getMessageType(message)) {\n case 'admin': {\n return <GroupChannelMessage.Admin message={message as SendbirdAdminMessage} {...messageProps} />;\n }\n case 'user':\n case 'user.opengraph': {\n if (message.ogMetaData && sbOptions.uikitWithAppInfo.groupChannel.channel.enableOgtag) {\n return (\n <GroupChannelMessage.OpenGraphUser\n message={message as SendbirdUserMessage}\n {...userMessageProps}\n {...messageProps}\n />\n );\n } else {\n return (\n <GroupChannelMessage.User\n message={message as SendbirdUserMessage}\n {...userMessageProps}\n {...messageProps}\n />\n );\n }\n }\n case 'file':\n case 'file.audio': {\n return <GroupChannelMessage.File message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.image': {\n return <GroupChannelMessage.ImageFile message={message as SendbirdFileMessage} {...messageProps} />;\n }\n case 'file.video': {\n return (\n <GroupChannelMessage.VideoFile\n message={message as SendbirdFileMessage}\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'file.voice': {\n return (\n <GroupChannelMessage.VoiceFile\n message={message as SendbirdFileMessage}\n durationMetaArrayKey={VOICE_MESSAGE_META_ARRAY_DURATION_KEY}\n initialCurrentTime={voiceMessageStatusManager.getCurrentTime(message.channelUrl, message.messageId)}\n onSubscribeStatus={voiceMessageStatusManager.subscribe}\n onUnsubscribeStatus={voiceMessageStatusManager.unsubscribe}\n onUnmount={() => {\n if (isVoiceMessage(message) && playerService.uri === message.url) {\n resetPlayer().catch((_) => {});\n }\n }}\n {...messageProps}\n />\n );\n }\n case 'unknown':\n default: {\n return <GroupChannelMessage.Unknown message={message} {...messageProps} />;\n }\n }\n };\n\n const messageGap = useIIFE(() => {\n if (message.isAdminMessage()) {\n if (nextMessage?.isAdminMessage()) {\n return 8;\n } else {\n return 16;\n }\n } else if (nextMessage && shouldRenderParentMessage(nextMessage, hideParentMessage)) {\n return 16;\n } else if (groupWithNext) {\n return 2;\n } else {\n return 16;\n }\n });\n\n return (\n <Box paddingHorizontal={16} marginBottom={messageGap}>\n <GroupChannelMessageDateSeparator message={message} prevMessage={prevMessage} />\n <GroupChannelMessageFocusAnimation focused={focused}>{renderMessage()}</GroupChannelMessageFocusAnimation>\n </Box>\n );\n};\n\nexport const GroupChannelTypingIndicatorBubble = () => {\n const { sbOptions } = useSendbirdChat();\n const { publish } = useContext(GroupChannelContexts.PubSub);\n const { typingUsers } = useContext(GroupChannelContexts.TypingIndicator);\n\n const shouldRenderBubble = useIIFE(() => {\n if (typingUsers.length === 0) return false;\n if (!sbOptions.uikit.groupChannel.channel.enableTypingIndicator) return false;\n if (!sbOptions.uikit.groupChannel.channel.typingIndicatorTypes.has(TypingIndicatorType.Bubble)) return false;\n return true;\n });\n\n useEffect(() => {\n if (shouldRenderBubble) publish({ type: 'TYPING_BUBBLE_RENDERED' });\n }, [shouldRenderBubble]);\n\n if (!shouldRenderBubble) return null;\n return (\n <Box paddingHorizontal={16} marginTop={4} marginBottom={16}>\n <TypingIndicatorBubble typingUsers={typingUsers} />\n </Box>\n );\n};\n\nexport default React.memo(GroupChannelMessageRenderer);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAG5D,SACEC,GAAG,EACHC,mBAAmB,EACnBC,IAAI,EACJC,qBAAqB,EACrBC,aAAa,QACR,yCAAyC;AAChD,SAKEC,mBAAmB,EACnBC,cAAc,EACdC,WAAW,EACXC,cAAc,EACdC,yBAAyB,EACzBC,oBAAoB,EACpBC,OAAO,QACF,uBAAuB;AAE9B,SAASC,qCAAqC,QAAQ,iBAAiB;AACvE,SAASC,oBAAoB,QAAQ,gDAAgD;AAErF,SAASC,eAAe,EAAEC,kBAAkB,EAAEC,cAAc,EAAEC,eAAe,QAAQ,wBAAwB;AAC7G,SAASC,mBAAmB,QAAQ,aAAa;AACjD,SAASC,cAAc,QAAQ,mBAAmB;AAClD,OAAOC,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,iCAAiC,MAAM,qCAAqC;AACnF,OAAOC,iCAAiC,MAAM,qCAAqC;AACnF,OAAOC,gCAAgC,MAAM,oCAAoC;AACjF,OAAOC,4BAA4B,MAAM,gCAAgC;AAEzE,MAAMC,2BAA2E,GAAGC,IAAA,IAa9E;EAAA,IAb+E;IACnFC,OAAO;IACPC,OAAO;IACPC,OAAO;IACPC,WAAW;IACXC,oBAAoB;IACpBC,iBAAiB;IACjBC,sBAAsB;IACtBC,qBAAqB;IACrBC,OAAO;IACPC,WAAW;IACXC,WAAW;IACXC;EACF,CAAC,GAAAZ,IAAA;EACC,MAAMa,QAAQ,GAAGvB,cAAc,EAAE;EACjC,MAAMwB,kBAAkB,GAAGzC,MAAM,CAAiB,EAAE,CAAC;EACrD,MAAM;IAAE0C;EAAQ,CAAC,GAAG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CAACjE,GAAG;IAAC0L,iBAAiB,EAAE,EAAG;IAACa,SAAS,EAAE,CAAE;IAACZ,YAAY,EAAE;EAAG,gBACzD/L,KAAA,CAAAqE,aAAA,CAAC9D,qBAAqB;IAAC4L,WAAW,EAAEA;EAAY,EAAG,CAC/C;AAEV,CAAC;AAED,4BAAenM,KAAK,CAAC4M,IAAI,CAAC/K,2BAA2B,CAAC"}
@@ -1,4 +1,4 @@
1
- import isSameDay from 'date-fns/isSameDay';
1
+ import { isSameDay } from 'date-fns';
2
2
  import React from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
@@ -1 +1 @@
1
- {"version":3,"names":["isSameDay","React","View","Text","createStyleSheet","useUIKitTheme","useLocalization","OpenChannelMessageDateSeparator","_ref","message","prevMessage","STRINGS","colors","sameDay","createdAt","createElement","style","styles","container","view","backgroundColor","ui","dateSeparator","default","none","background","caption1","color","text","OPEN_CHANNEL","LIST_DATE_SEPARATOR","Date","alignItems","marginVertical","borderRadius","paddingVertical","paddingHorizontal"],"sources":["OpenChannelMessageDateSeparator.tsx"],"sourcesContent":["import isSameDay from 'date-fns/isSameDay';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../hooks/useContext';\n\nconst OpenChannelMessageDateSeparator = ({\n message,\n prevMessage,\n}: {\n message: SendbirdMessage;\n prevMessage?: SendbirdMessage;\n}) => {\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const sameDay = isSameDay(message.createdAt, prevMessage?.createdAt ?? 0);\n if (sameDay) return null;\n\n return (\n <View style={styles.container}>\n <View style={[styles.view, { backgroundColor: colors.ui.dateSeparator.default.none.background }]}>\n <Text caption1 color={colors.ui.dateSeparator.default.none.text}>\n {STRINGS.OPEN_CHANNEL.LIST_DATE_SEPARATOR(new Date(message.createdAt))}\n </Text>\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n marginVertical: 16,\n },\n view: {\n borderRadius: 10,\n paddingVertical: 4,\n paddingHorizontal: 10,\n },\n});\n\nexport default OpenChannelMessageDateSeparator;\n"],"mappings":"AAAA,OAAOA,SAAS,MAAM,oBAAoB;AAC1C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AAG/F,SAASC,eAAe,QAAQ,wBAAwB;AAExD,MAAMC,+BAA+B,GAAGC,IAAA,IAMlC;EAAA,IANmC;IACvCC,OAAO;IACPC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAM;IAAEG;EAAQ,CAAC,GAAGL,eAAe,EAAE;EACrC,MAAM;IAAEM;EAAO,CAAC,GAAGP,aAAa,EAAE;EAElC,MAAMQ,OAAO,GAAGb,SAAS,CAACS,OAAO,CAACK,SAAS,EAAE,CAAAJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEI,SAAS,KAAI,CAAC,CAAC;EACzE,IAAID,OAAO,EAAE,OAAO,IAAI;EAExB,oBACEZ,KAAA,CAAAc,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BjB,KAAA,CAAAc,aAAA,CAACb,IAAI;IAACc,KAAK,EAAE,CAACC,MAAM,CAACE,IAAI,EAAE;MAAEC,eAAe,EAAER,MAAM,CAACS,EAAE,CAACC,aAAa,CAACC,OAAO,CAACC,IAAI,CAACC;IAAW,CAAC;EAAE,gBAC/FxB,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACuB,QAAQ;IAACC,KAAK,EAAEf,MAAM,CAACS,EAAE,CAACC,aAAa,CAACC,OAAO,CAACC,IAAI,CAACI;EAAK,GAC7DjB,OAAO,CAACkB,YAAY,CAACC,mBAAmB,CAAC,IAAIC,IAAI,CAACtB,OAAO,CAACK,SAAS,CAAC,CAAC,CACjE,CACF,CACF;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGb,gBAAgB,CAAC;EAC9Bc,SAAS,EAAE;IACTc,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDd,IAAI,EAAE;IACJe,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAe7B,+BAA+B"}
1
+ {"version":3,"names":["isSameDay","React","View","Text","createStyleSheet","useUIKitTheme","useLocalization","OpenChannelMessageDateSeparator","_ref","message","prevMessage","STRINGS","colors","sameDay","createdAt","createElement","style","styles","container","view","backgroundColor","ui","dateSeparator","default","none","background","caption1","color","text","OPEN_CHANNEL","LIST_DATE_SEPARATOR","Date","alignItems","marginVertical","borderRadius","paddingVertical","paddingHorizontal"],"sources":["OpenChannelMessageDateSeparator.tsx"],"sourcesContent":["import { isSameDay } from 'date-fns';\nimport React from 'react';\nimport { View } from 'react-native';\n\nimport { Text, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\n\nimport { useLocalization } from '../../hooks/useContext';\n\nconst OpenChannelMessageDateSeparator = ({\n message,\n prevMessage,\n}: {\n message: SendbirdMessage;\n prevMessage?: SendbirdMessage;\n}) => {\n const { STRINGS } = useLocalization();\n const { colors } = useUIKitTheme();\n\n const sameDay = isSameDay(message.createdAt, prevMessage?.createdAt ?? 0);\n if (sameDay) return null;\n\n return (\n <View style={styles.container}>\n <View style={[styles.view, { backgroundColor: colors.ui.dateSeparator.default.none.background }]}>\n <Text caption1 color={colors.ui.dateSeparator.default.none.text}>\n {STRINGS.OPEN_CHANNEL.LIST_DATE_SEPARATOR(new Date(message.createdAt))}\n </Text>\n </View>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n alignItems: 'center',\n marginVertical: 16,\n },\n view: {\n borderRadius: 10,\n paddingVertical: 4,\n paddingHorizontal: 10,\n },\n});\n\nexport default OpenChannelMessageDateSeparator;\n"],"mappings":"AAAA,SAASA,SAAS,QAAQ,UAAU;AACpC,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,QAAQ,cAAc;AAEnC,SAASC,IAAI,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AAG/F,SAASC,eAAe,QAAQ,wBAAwB;AAExD,MAAMC,+BAA+B,GAAGC,IAAA,IAMlC;EAAA,IANmC;IACvCC,OAAO;IACPC;EAIF,CAAC,GAAAF,IAAA;EACC,MAAM;IAAEG;EAAQ,CAAC,GAAGL,eAAe,EAAE;EACrC,MAAM;IAAEM;EAAO,CAAC,GAAGP,aAAa,EAAE;EAElC,MAAMQ,OAAO,GAAGb,SAAS,CAACS,OAAO,CAACK,SAAS,EAAE,CAAAJ,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEI,SAAS,KAAI,CAAC,CAAC;EACzE,IAAID,OAAO,EAAE,OAAO,IAAI;EAExB,oBACEZ,KAAA,CAAAc,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACC;EAAU,gBAC5BjB,KAAA,CAAAc,aAAA,CAACb,IAAI;IAACc,KAAK,EAAE,CAACC,MAAM,CAACE,IAAI,EAAE;MAAEC,eAAe,EAAER,MAAM,CAACS,EAAE,CAACC,aAAa,CAACC,OAAO,CAACC,IAAI,CAACC;IAAW,CAAC;EAAE,gBAC/FxB,KAAA,CAAAc,aAAA,CAACZ,IAAI;IAACuB,QAAQ;IAACC,KAAK,EAAEf,MAAM,CAACS,EAAE,CAACC,aAAa,CAACC,OAAO,CAACC,IAAI,CAACI;EAAK,GAC7DjB,OAAO,CAACkB,YAAY,CAACC,mBAAmB,CAAC,IAAIC,IAAI,CAACtB,OAAO,CAACK,SAAS,CAAC,CAAC,CACjE,CACF,CACF;AAEX,CAAC;AAED,MAAMG,MAAM,GAAGb,gBAAgB,CAAC;EAC9Bc,SAAS,EAAE;IACTc,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDd,IAAI,EAAE;IACJe,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE,CAAC;IAClBC,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC;AAEF,eAAe7B,+BAA+B"}
@@ -3,7 +3,7 @@ import { Pressable, View } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
  import { useChannelHandler } from '@sendbird/uikit-chat-hooks';
5
5
  import { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
6
- import { useUniqHandlerId } from '@sendbird/uikit-utils';
6
+ import { Logger, useUniqHandlerId } from '@sendbird/uikit-utils';
7
7
  import { UNKNOWN_USER_ID } from '../../constants';
8
8
  import { useReaction, useSendbirdChat } from '../../hooks/useContext';
9
9
  const BottomSheetReactionAddon = _ref => {
@@ -60,9 +60,13 @@ const BottomSheetReactionAddon = _ref => {
60
60
  const reactionUserIds = (message === null || message === void 0 ? void 0 : (_message$reactions = message.reactions) === null || _message$reactions === void 0 ? void 0 : (_message$reactions$fi = _message$reactions.find(it => it.key === key)) === null || _message$reactions$fi === void 0 ? void 0 : _message$reactions$fi.userIds) ?? [];
61
61
  const currentUserIdx = reactionUserIds.indexOf((currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId) ?? UNKNOWN_USER_ID);
62
62
  const reacted = currentUserIdx > -1;
63
- const onPress = () => {
64
- if (reacted) channel.deleteReaction(message, key);else channel.addReaction(message, key);
65
- onClose();
63
+ const onPress = async () => {
64
+ const action = reacted ? channel.deleteReaction : channel.addReaction;
65
+ await action(message, key).catch(error => {
66
+ Logger.warn('Failed to reaction', error);
67
+ }).finally(() => {
68
+ onClose();
69
+ });
66
70
  };
67
71
  return /*#__PURE__*/React.createElement(Pressable, {
68
72
  key: key,
@@ -1 +1 @@
1
- {"version":3,"names":["React","Pressable","View","useSafeAreaInsets","useChannelHandler","Icon","Image","createStyleSheet","useUIKitTheme","useUniqHandlerId","UNKNOWN_USER_ID","useReaction","useSendbirdChat","BottomSheetReactionAddon","_ref","onClose","message","channel","emojiManager","currentUser","sdk","updateReactionFocusedItem","openReactionList","colors","handlerId","left","right","onReactionUpdated","eventChannel","event","url","messageId","msg","getMessage","includeReactions","channelUrl","channelType","emojiAll","allEmoji","slice","color","ui","reaction","default","createElement","style","styles","container","marginRight","marginLeft","map","_ref2","_message$reactions","_message$reactions$fi","key","reactionUserIds","reactions","find","it","userIds","currentUserIdx","indexOf","userId","reacted","onPress","deleteReaction","addReaction","_ref3","pressed","button","backgroundColor","selected","background","enabled","source","uri","emoji","_ref4","icon","onBackground03","paddingTop","paddingBottom","paddingHorizontal","flexDirection","justifyContent","width","height","padding","borderRadius"],"sources":["BottomSheetReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type { BaseMessage } from '@sendbird/chat/message';\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdBaseChannel, SendbirdBaseMessage, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\n\ntype Props = {\n onClose: () => Promise<void>;\n channel: SendbirdBaseChannel;\n message: SendbirdBaseMessage;\n};\nconst BottomSheetReactionAddon = ({ onClose, message, channel }: Props) => {\n const { emojiManager, currentUser, sdk } = useSendbirdChat();\n const { updateReactionFocusedItem, openReactionList } = useReaction();\n const { colors } = useUIKitTheme();\n const handlerId = useUniqHandlerId('BottomSheetReactionAddon');\n const { left, right } = useSafeAreaInsets();\n\n useChannelHandler(sdk, handlerId, {\n async onReactionUpdated(eventChannel, event) {\n if (channel?.url === eventChannel.url && event.messageId === message?.messageId) {\n const msg = (await sdk.message.getMessage({\n includeReactions: true,\n messageId: message.messageId,\n channelUrl: message.channelUrl,\n channelType: message.channelType,\n })) as null | BaseMessage;\n if (msg) updateReactionFocusedItem({ message: msg });\n }\n },\n });\n\n const emojiAll = emojiManager.allEmoji.slice(0, 5);\n const color = colors.ui.reaction.default;\n\n return (\n <View style={[styles.container, { marginRight: right, marginLeft: left }]}>\n {emojiAll.map(({ key, url }) => {\n const reactionUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n const currentUserIdx = reactionUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = currentUserIdx > -1;\n\n const onPress = () => {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n onClose();\n };\n\n return (\n <Pressable\n key={key}\n onPress={onPress}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n );\n })}\n\n <Pressable\n onPress={async () => {\n await onClose();\n openReactionList({ channel, message });\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} style={styles.emoji} color={colors.onBackground03} />\n </Pressable>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 12,\n paddingBottom: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default BottomSheetReactionAddon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAGlE,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC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,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDf,MAAM,EAAE;IACNgB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDZ,KAAK,EAAE;IACLS,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAezE,wBAAwB"}
1
+ {"version":3,"names":["React","Pressable","View","useSafeAreaInsets","useChannelHandler","Icon","Image","createStyleSheet","useUIKitTheme","Logger","useUniqHandlerId","UNKNOWN_USER_ID","useReaction","useSendbirdChat","BottomSheetReactionAddon","_ref","onClose","message","channel","emojiManager","currentUser","sdk","updateReactionFocusedItem","openReactionList","colors","handlerId","left","right","onReactionUpdated","eventChannel","event","url","messageId","msg","getMessage","includeReactions","channelUrl","channelType","emojiAll","allEmoji","slice","color","ui","reaction","default","createElement","style","styles","container","marginRight","marginLeft","map","_ref2","_message$reactions","_message$reactions$fi","key","reactionUserIds","reactions","find","it","userIds","currentUserIdx","indexOf","userId","reacted","onPress","action","deleteReaction","addReaction","catch","error","warn","finally","_ref3","pressed","button","backgroundColor","selected","background","enabled","source","uri","emoji","_ref4","icon","onBackground03","paddingTop","paddingBottom","paddingHorizontal","flexDirection","justifyContent","width","height","padding","borderRadius"],"sources":["BottomSheetReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type { BaseMessage } from '@sendbird/chat/message';\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { Logger, SendbirdBaseChannel, SendbirdBaseMessage, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\n\ntype Props = {\n onClose: () => Promise<void>;\n channel: SendbirdBaseChannel;\n message: SendbirdBaseMessage;\n};\nconst BottomSheetReactionAddon = ({ onClose, message, channel }: Props) => {\n const { emojiManager, currentUser, sdk } = useSendbirdChat();\n const { updateReactionFocusedItem, openReactionList } = useReaction();\n const { colors } = useUIKitTheme();\n const handlerId = useUniqHandlerId('BottomSheetReactionAddon');\n const { left, right } = useSafeAreaInsets();\n\n useChannelHandler(sdk, handlerId, {\n async onReactionUpdated(eventChannel, event) {\n if (channel?.url === eventChannel.url && event.messageId === message?.messageId) {\n const msg = (await sdk.message.getMessage({\n includeReactions: true,\n messageId: message.messageId,\n channelUrl: message.channelUrl,\n channelType: message.channelType,\n })) as null | BaseMessage;\n if (msg) updateReactionFocusedItem({ message: msg });\n }\n },\n });\n\n const emojiAll = emojiManager.allEmoji.slice(0, 5);\n const color = colors.ui.reaction.default;\n\n return (\n <View style={[styles.container, { marginRight: right, marginLeft: left }]}>\n {emojiAll.map(({ key, url }) => {\n const reactionUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n const currentUserIdx = reactionUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = currentUserIdx > -1;\n\n const onPress = async () => {\n const action = reacted ? channel.deleteReaction : channel.addReaction;\n await action(message, key)\n .catch((error) => {\n Logger.warn('Failed to reaction', error);\n })\n .finally(() => {\n onClose();\n });\n };\n\n return (\n <Pressable\n key={key}\n onPress={onPress}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n );\n })}\n\n <Pressable\n onPress={async () => {\n await onClose();\n openReactionList({ channel, message });\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} style={styles.emoji} color={colors.onBackground03} />\n </Pressable>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 12,\n paddingBottom: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default BottomSheetReactionAddon;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAGlE,SAASC,iBAAiB,QAAQ,4BAA4B;AAC9D,SAASC,IAAI,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AACtG,SAASC,MAAM,EAA4CC,gBAAgB,QAAQ,uBAAuB;AAE1G,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,WAAW,EAAEC,eAAe,QAAQ,wBAAwB;AAOrE,MAAMC,wBAAwB,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,OAAO;IAAEC,OAAO;IAAEC;EAAe,CAAC,GAAAH,IAAA;EACpE,MAAM;IAAEI,YAAY;IAAEC,WAAW;IAAEC;EAAI,CAAC,GAAGR,eAAe,EAAE;EAC5D,MAAM;IAAES,yBAAyB;IAAEC;EAAiB,CAAC,GAAGX,WAAW,EAAE;EACrE,MAAM;IAAEY;EAAO,CAAC,GAAGhB,aAAa,EAAE;EAClC,MAAMiB,SAAS,GAAGf,gBAAgB,CAAC,0BAA0B,CAAC;EAC9D,MAAM;IAAEgB,IAAI;IAAEC;EAAM,CAAC,GAAGxB,iBAAiB,EAAE;EAE3CC,iBAAiB,CAACiB,GAAG,EAAEI,SAAS,EAAE;IAChC,MAAMG,iBAAiBA,CAACC,YAAY,EAAEC,KAAK,EAAE;MAC3C,IAAI,CAAAZ,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEa,GAAG,MAAKF,YAAY,CAACE,GAAG,IAAID,KAAK,CAACE,SAAS,MAAKf,OAAO,aAAPA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AS,KAAA;MAAA,OAAK,CACtBpC,MAAM,CAAC4B,MAAM,EACb;QAAEC,eAAe,EAAEF,OAAO,GAAGjC,KAAK,CAACoC,QAAQ,CAACC,UAAU,GAAGrC,KAAK,CAACsC,OAAO,CAACD;MAAW,CAAC,CACpF;IAAA;EAAC,gBAEF9E,KAAA,CAAA6C,aAAA,CAACxC,IAAI;IAAC+E,IAAI,EAAE,YAAa;IAACtC,KAAK,EAAEC,MAAM,CAACmC,KAAM;IAACzC,KAAK,EAAEjB,MAAM,CAAC6D;EAAe,EAAG,CACrE,CACP;AAEX,CAAC;AAED,MAAMtC,MAAM,GAAGxC,gBAAgB,CAAC;EAC9ByC,SAAS,EAAE;IACTsC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDf,MAAM,EAAE;IACNgB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDZ,KAAK,EAAE;IACLS,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAe9E,wBAAwB"}
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { FlatList, Pressable, View, useWindowDimensions } from 'react-native';
3
3
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
4
4
  import { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
5
+ import { Logger } from '@sendbird/uikit-utils';
5
6
  import { UNKNOWN_USER_ID } from '../../constants';
6
7
  const NUM_COLUMN = 6;
7
8
  const ReactionListBottomSheet = _ref => {
@@ -71,11 +72,14 @@ const ReactionListBottomSheet = _ref => {
71
72
  style: styles.emojiItem
72
73
  }, /*#__PURE__*/React.createElement(Pressable, {
73
74
  key: key,
74
- onPress: () => {
75
+ onPress: async () => {
75
76
  if (message && channel) {
76
- if (reacted) channel.deleteReaction(message, key);else channel.addReaction(message, key);
77
+ const action = reacted ? channel.deleteReaction : channel.addReaction;
78
+ action(message, key).catch(error => {
79
+ Logger.warn('Failed to reaction', error);
80
+ });
77
81
  }
78
- onClose();
82
+ await onClose();
79
83
  },
80
84
  style: _ref3 => {
81
85
  let {
@@ -1 +1 @@
1
- {"version":3,"names":["React","FlatList","Pressable","View","useWindowDimensions","useSafeAreaInsets","Image","Modal","createStyleSheet","useUIKitTheme","UNKNOWN_USER_ID","NUM_COLUMN","ReactionListBottomSheet","_ref","visible","onClose","onDismiss","reactionCtx","chatCtx","width","bottom","left","right","colors","currentUser","emojiManager","channel","message","color","ui","reaction","default","createElement","type","Boolean","backgroundStyle","styles","modal","style","container","paddingBottom","backgroundColor","dialog","none","background","paddingLeft","paddingHorizontal","paddingRight","data","allEmoji","numColumns","keyExtractor","item","key","contentContainerStyle","flatlist","ItemSeparatorComponent","height","renderItem","_ref2","_message$reactions","_message$reactions$fi","url","reactedUserIds","reactions","find","it","userIds","idx","indexOf","userId","reacted","emojiItem","onPress","deleteReaction","addReaction","_ref3","pressed","button","selected","enabled","source","uri","emoji","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","flexDirection","alignItems","justifyContent","padding","borderRadius"],"sources":["ReactionListBottomSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { FlatList, Pressable, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport type { ReactionBottomSheetProps } from './index';\n\nconst NUM_COLUMN = 6;\nconst ReactionListBottomSheet = ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const { currentUser, emojiManager } = chatCtx;\n const { channel, message } = reactionCtx;\n const color = colors.ui.reaction.default;\n\n return (\n <Modal\n type={'slide'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n {\n width,\n paddingBottom: bottom,\n backgroundColor: colors.ui.dialog.default.none.background,\n paddingLeft: left + styles.container.paddingHorizontal,\n paddingRight: right + styles.container.paddingHorizontal,\n },\n ]}\n >\n <FlatList\n data={emojiManager.allEmoji}\n numColumns={NUM_COLUMN}\n keyExtractor={(item) => item.key}\n contentContainerStyle={styles.flatlist}\n ItemSeparatorComponent={() => <View style={{ height: 16 }} />}\n renderItem={({ item: { key, url } }) => {\n const reactedUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n\n const idx = reactedUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = idx > -1;\n\n return (\n <View style={styles.emojiItem}>\n <Pressable\n key={key}\n onPress={() => {\n if (message && channel) {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n }\n onClose();\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n </View>\n );\n }}\n />\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n flatlist: {\n width: '100%',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n emojiItem: {\n width: `${100 / NUM_COLUMN}%`,\n alignItems: 'center',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default ReactionListBottomSheet;\n"],"mapp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EAAG,GAAE,GAAG,GAAGR,UAAW,GAAE;IAC7B8E,UAAU,EAAE;EACd,CAAC;EACDX,MAAM,EAAE;IACN3D,KAAK,EAAE,EAAE;IACTsC,MAAM,EAAE,EAAE;IACVkC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDT,KAAK,EAAE;IACLhE,KAAK,EAAE,MAAM;IACbsC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAe7C,uBAAuB"}
1
+ {"version":3,"names":["React","FlatList","Pressable","View","useWindowDimensions","useSafeAreaInsets","Image","Modal","createStyleSheet","useUIKitTheme","Logger","UNKNOWN_USER_ID","NUM_COLUMN","ReactionListBottomSheet","_ref","visible","onClose","onDismiss","reactionCtx","chatCtx","width","bottom","left","right","colors","currentUser","emojiManager","channel","message","color","ui","reaction","default","createElement","type","Boolean","backgroundStyle","styles","modal","style","container","paddingBottom","backgroundColor","dialog","none","background","paddingLeft","paddingHorizontal","paddingRight","data","allEmoji","numColumns","keyExtractor","item","key","contentContainerStyle","flatlist","ItemSeparatorComponent","height","renderItem","_ref2","_message$reactions","_message$reactions$fi","url","reactedUserIds","reactions","find","it","userIds","idx","indexOf","userId","reacted","emojiItem","onPress","action","deleteReaction","addReaction","catch","error","warn","_ref3","pressed","button","selected","enabled","source","uri","emoji","overflow","borderTopLeftRadius","borderTopRightRadius","paddingTop","flexDirection","alignItems","justifyContent","padding","borderRadius"],"sources":["ReactionListBottomSheet.tsx"],"sourcesContent":["import React from 'react';\nimport { FlatList, Pressable, View, useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Image, Modal, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { Logger } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport type { ReactionBottomSheetProps } from './index';\n\nconst NUM_COLUMN = 6;\nconst ReactionListBottomSheet = ({ visible, onClose, onDismiss, reactionCtx, chatCtx }: ReactionBottomSheetProps) => {\n const { width } = useWindowDimensions();\n const { bottom, left, right } = useSafeAreaInsets();\n const { colors } = useUIKitTheme();\n\n const { currentUser, emojiManager } = chatCtx;\n const { channel, message } = reactionCtx;\n const color = colors.ui.reaction.default;\n\n return (\n <Modal\n type={'slide'}\n visible={Boolean(visible && channel && message)}\n onClose={onClose}\n onDismiss={onDismiss}\n backgroundStyle={styles.modal}\n >\n <View\n style={[\n styles.container,\n {\n width,\n paddingBottom: bottom,\n backgroundColor: colors.ui.dialog.default.none.background,\n paddingLeft: left + styles.container.paddingHorizontal,\n paddingRight: right + styles.container.paddingHorizontal,\n },\n ]}\n >\n <FlatList\n data={emojiManager.allEmoji}\n numColumns={NUM_COLUMN}\n keyExtractor={(item) => item.key}\n contentContainerStyle={styles.flatlist}\n ItemSeparatorComponent={() => <View style={{ height: 16 }} />}\n renderItem={({ item: { key, url } }) => {\n const reactedUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n\n const idx = reactedUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = idx > -1;\n\n return (\n <View style={styles.emojiItem}>\n <Pressable\n key={key}\n onPress={async () => {\n if (message && channel) {\n const action = reacted ? channel.deleteReaction : channel.addReaction;\n action(message, key).catch((error) => {\n Logger.warn('Failed to reaction', error);\n });\n }\n await onClose();\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n </View>\n );\n }}\n />\n </View>\n </Modal>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n overflow: 'hidden',\n borderTopLeftRadius: 8,\n borderTopRightRadius: 8,\n paddingTop: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n },\n modal: {\n alignItems: 'center',\n justifyContent: 'flex-end',\n },\n flatlist: {\n width: '100%',\n flexDirection: 'column',\n justifyContent: 'space-between',\n },\n emojiItem: {\n width: `${100 / NUM_COLUMN}%`,\n alignItems: 'center',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default ReactionListBottomSheet;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,EAAEC,SAAS,EAAEC,IAAI,EAAEC,mBAAmB,QAAQ,cAAc;AAC7E,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SAASC,KAAK,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AACvG,SAASC,MAAM,QAAQ,uBAAuB;AAE9C,SAASC,eAAe,QAAQ,iBAAiB;AAGjD,MAAMC,UAAU,GAAG,CAAC;AACpB,MAAMC,uBAAuB,GAAGC,IAAA,IAAqF;EAAA,IAApF;IAAEC,OAAO;IAAEC,OAAO;IAAEC,SAAS;IAAEC,WAAW;IAAEC;EAAkC,CAAC,GAAAL,IAAA;EAC9G,MAAM;IAAEM;EAAM,CAAC,GAAGhB,mBAAmB,EAAE;EACvC,MAAM;IAAEiB,MAAM;IAAEC,IAAI;IAAEC;EAAM,CAAC,GAAGlB,iBAAiB,EAAE;EACnD,MAAM;IAAEmB;EAAO,CAAC,GAAGf,aAAa,EAAE;EAElC,MAAM;IAAEgB,WAAW;IAAEC;EAAa,CAAC,GAAGP,OAAO;EAC7C,MAAM;IAAEQ,OAAO;IAAEC;EAAQ,CAAC,GAAGV,WAAW;EACxC,MAAMW,KAAK,GAAGL,MAAM,CAACM,EAAE,CAACC,QAAQ,CAACC,OAAO;EAExC,oBACEhC,KAAA,CAAAiC,aAAA,CAAC1B,KAAK;IACJ2B,IAAI,EAAE,OAAQ;IACdnB,OAAO,EAAEoB,OAAO,CAACpB,OAAO,IAAIY,OAAO,IAAIC,OAAO,CAAE;IAChDZ,OAAO,EAAEA,OAAQ;IACjBC,SAAS,EAAEA,SAAU;IACrBmB,eAAe,EAAEC,MA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AAC;IACvBC,UAAU,EAAE,EAAE;IACd7C,iBAAiB,EAAE,EAAE;IACrB8C,aAAa,EAAE;EACjB,CAAC;EACDvD,KAAK,EAAE;IACLwD,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDvC,QAAQ,EAAE;IACRpC,KAAK,EAAE,MAAM;IACbyE,aAAa,EAAE,QAAQ;IACvBE,cAAc,EAAE;EAClB,CAAC;EACDtB,SAAS,EAAE;IACTrD,KAAK,EAAG,GAAE,GAAG,GAAGR,UAAW,GAAE;IAC7BkF,UAAU,EAAE;EACd,CAAC;EACDX,MAAM,EAAE;IACN/D,KAAK,EAAE,EAAE;IACTsC,MAAM,EAAE,EAAE;IACVsC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDT,KAAK,EAAE;IACLpE,KAAK,EAAE,MAAM;IACbsC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAEF,eAAe7C,uBAAuB"}
@@ -181,7 +181,7 @@ const ThreadParentMessageRenderer = props => {
181
181
  durationMetaArrayKey: VOICE_MESSAGE_META_ARRAY_DURATION_KEY,
182
182
  onUnmount: () => {
183
183
  if (isVoiceMessage(parentMessage) && playerService.uri === parentMessage.url) {
184
- resetPlayer();
184
+ resetPlayer().catch(_ => {});
185
185
  }
186
186
  }
187
187
  }, messageProps));
@@ -1 +1 @@
1
- {"version":3,"names":["React","useRef","Text","useUIKitTheme","getMessageType","isMyMessage","isVoiceMessage","VOICE_MESSAGE_META_ARRAY_DURATION_KEY","usePlatformService","useSBUHandlers","useSendbirdChat","ThreadParentMessageFile","ThreadParentMessageFileImage","ThreadParentMessageFileVideo","ThreadParentMessageFileVoice","ThreadParentMessageUser","ThreadParentMessageUserOg","ThreadParentMessageRenderer","props","handlers","playerUnsubscribes","sbOptions","currentUser","mentionManager","palette","mediaService","playerService","parentMessage","resetPlayer","current","forEach","unsubscribe","length","reset","messageProps","onPressURL","url","onOpenURL","onToggleVoiceMessage","state","setState","sendingStatus","uri","pause","play","shouldSeekToTime","duration","currentTime","seekFinished","forPlayback","addPlaybackListener","_ref","stopped","prevState","forState","addStateListener","status","push","seek","userMessageProps","renderRegexTextChildren","message","shouldUseMentionedMessageTemplate","uikit","groupChannel","channel","enableMention","mentionedMessageTemplate","regexTextPatterns","regex","templateRegex","replacer","_ref2","_parentMessage$mentio","match","groups","parentProps","index","keyPrefix","user","mentionedUsers","find","it","userId","mentionColor","onBackgroundLight01","color","createElement","_extends","key","onPress","_messageProps$onPress","onPressMentionedUser","call","onLongPress","style","fontWeight","backgroundColor","highlight","asMentionedMessageText","fetchThumbnailFromVideoSource","getVideoThumbnail","timeMills","durationMetaArrayKey","onUnmount","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport { RegexTextPattern, Text, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdFileMessage,\n type SendbirdUser,\n SendbirdUserMessage,\n getMessageType,\n isMyMessage,\n isVoiceMessage,\n} from '@sendbird/uikit-utils';\n\nimport { VOICE_MESSAGE_META_ARRAY_DURATION_KEY } from '../../constants';\nimport { usePlatformService, useSBUHandlers, useSendbirdChat } from './../../hooks/useContext';\nimport ThreadParentMessageFile from './ThreadParentMessage.file';\nimport ThreadParentMessageFileImage from './ThreadParentMessage.file.image';\nimport ThreadParentMessageFileVideo from './ThreadParentMessage.file.video';\nimport ThreadParentMessageFileVoice, { VoiceFileMessageState } from './ThreadParentMessage.file.voice';\nimport ThreadParentMessageUser from './ThreadParentMessage.user';\nimport ThreadParentMessageUserOg from './ThreadParentMessage.user.og';\n\nexport type ThreadParentMessageRendererProps<AdditionalProps = unknown> = {\n parentMessage: SendbirdUserMessage | SendbirdFileMessage;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst ThreadParentMessageRenderer = (props: ThreadParentMessageRendererProps) => {\n const handlers = useSBUHandlers();\n const playerUnsubscribes = useRef<(() => void)[]>([]);\n const { sbOptions, currentUser, mentionManager } = useSendbirdChat();\n const { palette } = useUIKitTheme();\n const { mediaService, playerService } = usePlatformService();\n const parentMessage = props.parentMessage;\n\n const resetPlayer = async () => {\n playerUnsubscribes.current.forEach((unsubscribe) => {\n try {\n unsubscribe();\n } catch {}\n });\n playerUnsubscribes.current.length = 0;\n await playerService.reset();\n };\n\n const messageProps: ThreadParentMessageRendererProps = {\n onPressURL: (url) => handlers.onOpenURL(url),\n onToggleVoiceMessage: async (state, setState) => {\n if (isVoiceMessage(parentMessage) && parentMessage.sendingStatus === 'succeeded') {\n if (playerService.uri === parentMessage.url) {\n if (playerService.state === 'playing') {\n await playerService.pause();\n } else {\n await playerService.play(parentMessage.url);\n }\n } else {\n if (playerService.state !== 'idle') {\n await resetPlayer();\n }\n\n const shouldSeekToTime = state.duration > state.currentTime && state.currentTime > 0;\n let seekFinished = !shouldSeekToTime;\n\n const forPlayback = playerService.addPlaybackListener(({ stopped, currentTime, duration }) => {\n if (seekFinished) {\n setState((prevState) => ({ ...prevState, currentTime: stopped ? 0 : currentTime, duration }));\n }\n });\n const forState = playerService.addStateListener((state) => {\n switch (state) {\n case 'preparing':\n setState((prevState) => ({ ...prevState, status: 'preparing' }));\n break;\n case 'playing':\n setState((prevState) => ({ ...prevState, status: 'playing' }));\n break;\n case 'idle':\n case 'paused': {\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n case 'stopped':\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n });\n playerUnsubscribes.current.push(forPlayback, forState);\n\n await playerService.play(parentMessage.url);\n if (shouldSeekToTime) {\n await playerService.seek(state.currentTime);\n seekFinished = true;\n }\n }\n }\n },\n ...props,\n };\n\n const userMessageProps: {\n renderRegexTextChildren: (message: SendbirdUserMessage) => string;\n regexTextPatterns: RegexTextPattern[];\n } = {\n renderRegexTextChildren: (message) => {\n if (\n mentionManager.shouldUseMentionedMessageTemplate(message, sbOptions.uikit.groupChannel.channel.enableMention)\n ) {\n return message.mentionedMessageTemplate;\n } else {\n return message.message;\n }\n },\n regexTextPatterns: [\n {\n regex: mentionManager.templateRegex,\n replacer({ match, groups, parentProps, index, keyPrefix }) {\n const user = parentMessage.mentionedUsers?.find((it) => it.userId === groups[2]);\n if (user) {\n const mentionColor =\n !isMyMessage(parentMessage, currentUser?.userId) && user.userId === currentUser?.userId\n ? palette.onBackgroundLight01\n : parentProps?.color;\n\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n color={mentionColor}\n onPress={() => messageProps.onPressMentionedUser?.(user)}\n onLongPress={messageProps.onLongPress}\n style={[\n parentProps?.style,\n { fontWeight: '700' },\n user.userId === currentUser?.userId && { backgroundColor: palette.highlight },\n ]}\n >\n {`${mentionManager.asMentionedMessageText(user)}`}\n </Text>\n );\n }\n return match;\n },\n },\n ],\n };\n\n switch (getMessageType(props.parentMessage)) {\n case 'user': {\n return <ThreadParentMessageUser {...userMessageProps} {...messageProps} />;\n }\n case 'user.opengraph': {\n return <ThreadParentMessageUserOg {...userMessageProps} {...messageProps} />;\n }\n case 'file':\n case 'file.audio': {\n return <ThreadParentMessageFile {...messageProps} />;\n }\n case 'file.video': {\n return (\n <ThreadParentMessageFileVideo\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'file.image': {\n return <ThreadParentMessageFileImage {...messageProps} />;\n }\n case 'file.voice': {\n return (\n <ThreadParentMessageFileVoice\n durationMetaArrayKey={VOICE_MESSAGE_META_ARRAY_DURATION_KEY}\n onUnmount={() => {\n if (isVoiceMessage(parentMessage) && playerService.uri === parentMessage.url) {\n resetPlayer();\n }\n }}\n {...messageProps}\n />\n );\n }\n default: {\n return null;\n }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,IAAI,CAACxF,2BAA2B,CAAC"}
1
+ {"version":3,"names":["React","useRef","Text","useUIKitTheme","getMessageType","isMyMessage","isVoiceMessage","VOICE_MESSAGE_META_ARRAY_DURATION_KEY","usePlatformService","useSBUHandlers","useSendbirdChat","ThreadParentMessageFile","ThreadParentMessageFileImage","ThreadParentMessageFileVideo","ThreadParentMessageFileVoice","ThreadParentMessageUser","ThreadParentMessageUserOg","ThreadParentMessageRenderer","props","handlers","playerUnsubscribes","sbOptions","currentUser","mentionManager","palette","mediaService","playerService","parentMessage","resetPlayer","current","forEach","unsubscribe","length","reset","messageProps","onPressURL","url","onOpenURL","onToggleVoiceMessage","state","setState","sendingStatus","uri","pause","play","shouldSeekToTime","duration","currentTime","seekFinished","forPlayback","addPlaybackListener","_ref","stopped","prevState","forState","addStateListener","status","push","seek","userMessageProps","renderRegexTextChildren","message","shouldUseMentionedMessageTemplate","uikit","groupChannel","channel","enableMention","mentionedMessageTemplate","regexTextPatterns","regex","templateRegex","replacer","_ref2","_parentMessage$mentio","match","groups","parentProps","index","keyPrefix","user","mentionedUsers","find","it","userId","mentionColor","onBackgroundLight01","color","createElement","_extends","key","onPress","_messageProps$onPress","onPressMentionedUser","call","onLongPress","style","fontWeight","backgroundColor","highlight","asMentionedMessageText","fetchThumbnailFromVideoSource","getVideoThumbnail","timeMills","durationMetaArrayKey","onUnmount","catch","_","memo"],"sources":["index.tsx"],"sourcesContent":["import React, { useRef } from 'react';\n\nimport { RegexTextPattern, Text, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport {\n SendbirdFileMessage,\n type SendbirdUser,\n SendbirdUserMessage,\n getMessageType,\n isMyMessage,\n isVoiceMessage,\n} from '@sendbird/uikit-utils';\n\nimport { VOICE_MESSAGE_META_ARRAY_DURATION_KEY } from '../../constants';\nimport { usePlatformService, useSBUHandlers, useSendbirdChat } from './../../hooks/useContext';\nimport ThreadParentMessageFile from './ThreadParentMessage.file';\nimport ThreadParentMessageFileImage from './ThreadParentMessage.file.image';\nimport ThreadParentMessageFileVideo from './ThreadParentMessage.file.video';\nimport ThreadParentMessageFileVoice, { VoiceFileMessageState } from './ThreadParentMessage.file.voice';\nimport ThreadParentMessageUser from './ThreadParentMessage.user';\nimport ThreadParentMessageUserOg from './ThreadParentMessage.user.og';\n\nexport type ThreadParentMessageRendererProps<AdditionalProps = unknown> = {\n parentMessage: SendbirdUserMessage | SendbirdFileMessage;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst ThreadParentMessageRenderer = (props: ThreadParentMessageRendererProps) => {\n const handlers = useSBUHandlers();\n const playerUnsubscribes = useRef<(() => void)[]>([]);\n const { sbOptions, currentUser, mentionManager } = useSendbirdChat();\n const { palette } = useUIKitTheme();\n const { mediaService, playerService } = usePlatformService();\n const parentMessage = props.parentMessage;\n\n const resetPlayer = async () => {\n playerUnsubscribes.current.forEach((unsubscribe) => {\n try {\n unsubscribe();\n } catch {}\n });\n playerUnsubscribes.current.length = 0;\n await playerService.reset();\n };\n\n const messageProps: ThreadParentMessageRendererProps = {\n onPressURL: (url) => handlers.onOpenURL(url),\n onToggleVoiceMessage: async (state, setState) => {\n if (isVoiceMessage(parentMessage) && parentMessage.sendingStatus === 'succeeded') {\n if (playerService.uri === parentMessage.url) {\n if (playerService.state === 'playing') {\n await playerService.pause();\n } else {\n await playerService.play(parentMessage.url);\n }\n } else {\n if (playerService.state !== 'idle') {\n await resetPlayer();\n }\n\n const shouldSeekToTime = state.duration > state.currentTime && state.currentTime > 0;\n let seekFinished = !shouldSeekToTime;\n\n const forPlayback = playerService.addPlaybackListener(({ stopped, currentTime, duration }) => {\n if (seekFinished) {\n setState((prevState) => ({ ...prevState, currentTime: stopped ? 0 : currentTime, duration }));\n }\n });\n const forState = playerService.addStateListener((state) => {\n switch (state) {\n case 'preparing':\n setState((prevState) => ({ ...prevState, status: 'preparing' }));\n break;\n case 'playing':\n setState((prevState) => ({ ...prevState, status: 'playing' }));\n break;\n case 'idle':\n case 'paused': {\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n case 'stopped':\n setState((prevState) => ({ ...prevState, status: 'paused' }));\n break;\n }\n });\n playerUnsubscribes.current.push(forPlayback, forState);\n\n await playerService.play(parentMessage.url);\n if (shouldSeekToTime) {\n await playerService.seek(state.currentTime);\n seekFinished = true;\n }\n }\n }\n },\n ...props,\n };\n\n const userMessageProps: {\n renderRegexTextChildren: (message: SendbirdUserMessage) => string;\n regexTextPatterns: RegexTextPattern[];\n } = {\n renderRegexTextChildren: (message) => {\n if (\n mentionManager.shouldUseMentionedMessageTemplate(message, sbOptions.uikit.groupChannel.channel.enableMention)\n ) {\n return message.mentionedMessageTemplate;\n } else {\n return message.message;\n }\n },\n regexTextPatterns: [\n {\n regex: mentionManager.templateRegex,\n replacer({ match, groups, parentProps, index, keyPrefix }) {\n const user = parentMessage.mentionedUsers?.find((it) => it.userId === groups[2]);\n if (user) {\n const mentionColor =\n !isMyMessage(parentMessage, currentUser?.userId) && user.userId === currentUser?.userId\n ? palette.onBackgroundLight01\n : parentProps?.color;\n\n return (\n <Text\n {...parentProps}\n key={`${keyPrefix}-${index}`}\n color={mentionColor}\n onPress={() => messageProps.onPressMentionedUser?.(user)}\n onLongPress={messageProps.onLongPress}\n style={[\n parentProps?.style,\n { fontWeight: '700' },\n user.userId === currentUser?.userId && { backgroundColor: palette.highlight },\n ]}\n >\n {`${mentionManager.asMentionedMessageText(user)}`}\n </Text>\n );\n }\n return match;\n },\n },\n ],\n };\n\n switch (getMessageType(props.parentMessage)) {\n case 'user': {\n return <ThreadParentMessageUser {...userMessageProps} {...messageProps} />;\n }\n case 'user.opengraph': {\n return <ThreadParentMessageUserOg {...userMessageProps} {...messageProps} />;\n }\n case 'file':\n case 'file.audio': {\n return <ThreadParentMessageFile {...messageProps} />;\n }\n case 'file.video': {\n return (\n <ThreadParentMessageFileVideo\n fetchThumbnailFromVideoSource={(uri) => mediaService.getVideoThumbnail({ url: uri, timeMills: 1000 })}\n {...messageProps}\n />\n );\n }\n case 'file.image': {\n return <ThreadParentMessageFileImage {...messageProps} />;\n }\n case 'file.voice': {\n return (\n <ThreadParentMessageFileVoice\n durationMetaArrayKey={VOICE_MESSAGE_META_ARRAY_DURATION_KEY}\n onUnmount={() => {\n if (isVoiceMessage(parentMessage) && playerService.uri === parentMessage.url) {\n resetPlayer().catch((_) => {});\n }\n }}\n {...messageProps}\n />\n );\n }\n default: {\n return null;\n }\n }\n};\n\nexport default React.memo(ThreadParentMessageRenderer);\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,MAAM,QAAQ,OAAO;AAErC,SAA2BC,IAAI,EAAEC,aAAa,QAAQ,yCAAyC;AAC/F,SAIEC,cAAc,EACdC,WAAW,EACXC,cAAc,QACT,uBAAuB;AAE9B,SAASC,qCAAqC,QAAQ,iBAAiB;AACvE,SAASC,kBAAkB,EAAEC,cAAc,EAAEC,eAAe,QAAQ,0BAA0B;AAC9F,OAAOC,uBAAuB,MAAM,4BAA4B;AAChE,OAAOC,4BAA4B,MAAM,kCAAkC;AAC3E,OAAOC,4BAA4B,MAAM,kCAAkC;AAC3E,OAAOC,4BAA4B,MAAiC,kCAAkC;AACtG,OAAOC,uBAAuB,MAAM,4BAA4B;AAChE,OAAOC,yBAAyB,MAAM,+BAA+B;AAcrE,MAAMC,2BAA2B,GAAIC,KAAuC,IAAK;EAC/E,MAAMC,QAAQ,GAAGV,cAAc,EAAE;EACjC,MAAMW,kBAAkB,GAAGnB,MAAM,CAAiB,EAAE,CAAC;EACrD,MAAM;IAAEoB,SAAS;IAAEC,WAAW;IAAEC;EAAe,CAAC,GAAGb,eAAe,EAAE;EACpE,MAAM;IAAEc;EAAQ,CAAC,GAAGrB,aAAa,EAAE;EACnC,MAAM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3E,4BAA4B,EAAKsB,YAAY,CAAI;MAC3D;IACA,KAAK,YAAY;MAAE;QACjB,oBACElC,KAAA,CAAAuF,aAAA,CAACzE,4BAA4B,EAAA0E,QAAA;UAC3Be,oBAAoB,EAAEhG,qCAAsC;UAC5DiG,SAAS,EAAEA,CAAA,KAAM;YACf,IAAIlG,cAAc,CAACqB,aAAa,CAAC,IAAID,aAAa,CAACgB,GAAG,KAAKf,aAAa,CAACS,GAAG,EAAE;cAC5ER,WAAW,EAAE,CAAC6E,KAAK,CAAEC,CAAC,IAAK,CAAC,CAAC,CAAC;YAChC;UACF;QAAE,GACExE,YAAY,EAChB;MAEN;IACA;MAAS;QACP,OAAO,IAAI;MACb;EAAC;AAEL,CAAC;AAED,4BAAelC,KAAK,CAAC2G,IAAI,CAAC1F,2BAA2B,CAAC"}
@@ -104,7 +104,6 @@ const SendbirdUIKitContainer = props => {
104
104
  };
105
105
  const sbuHandlers = {
106
106
  onOpenURL: SBUUtils.openURL,
107
- onOpenFileURL: SBUUtils.openURL,
108
107
  ...handlers
109
108
  };
110
109
  return /*#__PURE__*/React.createElement(SBUHandlersProvider, sbuHandlers, /*#__PURE__*/React.createElement(SafeAreaProvider, null, /*#__PURE__*/React.createElement(UIKitConfigProvider, {
@@ -1 +1 @@
1
- {"version":3,"names":["React","useLayoutEffect","useMemo","useRef","useState","Platform","SafeAreaProvider","SendbirdChat","DeviceOsPlatform","SendbirdPlatform","SendbirdProduct","GroupChannelModule","OpenChannelModule","DialogProvider","Header","HeaderStyleProvider","LightUIKitTheme","ToastProvider","UIKitThemeProvider","UIKitConfigProvider","Logger","NOOP","useIsFirstMount","LocalizationContext","LocalizationProvider","PlatformServiceProvider","ReactionProvider","SBUHandlersProvider","SendbirdChatProvider","UserProfileProvider","EmojiManager","ImageCompressionConfig","InternalLocalCacheStorage","MentionConfig","MentionManager","SBUUtils","VoiceMessageConfig","VoiceMessageStatusManager","StringSetEn","SBUDynamicModule","VERSION","InternalErrorBoundaryContainer","NetInfo","get","SendbirdUIKit","Object","freeze","PLATFORM","OS","toLowerCase","DEFAULT","AUTO_PUSH_TOKEN_REGISTRATION","USE_USER_ID_FOR_NICKNAME","IMAGE_COMPRESSION","chatOmitKeys","sanitizeChatOptions","chatOptions","opts","forEach","key","SendbirdUIKitContainer","props","children","appId","uikitOptions","platformServices","localization","styles","errorBoundary","handlers","toast","userProfile","reaction","localCacheStorage","Error","warn","defaultStringSet","stringSet","isFirstMount","unsubscribes","internalStorage","sdkInstance","setSdkInstance","sendbird","initializeSendbird","current","chatSDK","imageCompressionConfig","voiceMessageConfig","mentionConfig","useConfigInstance","emojiManager","mentionManager","voiceMessageStatusManager","u","renderChildren","disabled","createElement","sbuHandlers","onOpenURL","openURL","onOpenFileURL","storage","localConfigs","common","groupChannel","channel","enableReactionsSupergroup","undefined","channelList","groupChannelList","setting","groupChannelSettings","openChannel","enableAutoPushTokenRegistration","enableUseUserIdForNickname","enableImageCompression","fileService","file","notificationService","notification","clipboardService","clipboard","mediaService","media","playerService","player","recorderService","recorder","theme","HeaderComponent","defaultTitleAlign","defaultHeaderTitleAlign","statusBarTranslucent","dismissTimeout","_extends","Consumer","value","STRINGS","defaultLabels","alert","ok","DIALOG","ALERT_DEFAULT_OK","prompt","PROMPT_DEFAULT_OK","cancel","PROMPT_DEFAULT_CANCEL","placeholder","PROMPT_DEFAULT_PLACEHOLDER","options","onInitialized","chatInitParams","isMMKVStorage","init","newInstance","modules","localCacheEnabled","useMMKVStorageStore","useAsyncStorageStore","platform","getDeviceOSPlatform","deviceOSInfo","version","String","Version","customData","platform_version","getReactNativeVersion","uikitExtension","product","UIKIT_CHAT","REACT_NATIVE","addSendbirdExtensions","addExtension","addEventListener","_chatSDK$setOnlineLis","_chatSDK","_chatSDK$setOfflineLi","_chatSDK2","listener","callback","callbackType","callCount","unsubscribe","state","online","Boolean","isConnected","isInternetReachable","push","setOnlineListener","call","onOnline","setOfflineListener","onOffline","ANDROID","IOS","WEB","WINDOWS","major","minor","patch","constants","reactNativeVersion","_ref","_voiceMessage$recorde3","_voiceMessage$recorde4","imageCompression","userMention","voiceMessage","mentionLimit","MENTION_LIMIT","suggestionLimit","SUGGESTION_LIMIT","debounceMills","DEBOUNCE_MILLS","delimiter","DELIMITER","trigger","TRIGGER","compressionRate","COMPRESSION_RATE","width","height","_voiceMessage$recorde","_voiceMessage$recorde2","minDuration","RECORDER","MIN_DURATION","maxDuration","MAX_DURATION"],"sources":["SendbirdUIKitContainer.tsx"],"sourcesContent":["import type { AsyncStorageStatic } from '@react-native-async-storage/async-storage';\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { Platform } from 'react-native';\nimport type { MMKV } from 'react-native-mmkv';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport SendbirdChat, { DeviceOsPlatform, SendbirdChatParams, SendbirdPlatform, SendbirdProduct } from '@sendbird/chat';\nimport { GroupChannelModule } from '@sendbird/chat/groupChannel';\nimport { OpenChannelModule } from '@sendbird/chat/openChannel';\nimport type { HeaderStyleContextType, UIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport {\n DialogProvider,\n Header,\n HeaderStyleProvider,\n LightUIKitTheme,\n ToastProvider,\n UIKitThemeProvider,\n} from '@sendbird/uikit-react-native-foundation';\nimport { SBUConfig, UIKitConfigProvider } from '@sendbird/uikit-tools';\nimport {\n Logger,\n NOOP,\n PartialDeep,\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdGroupChannelCreateParams,\n SendbirdMember,\n SendbirdUser,\n useIsFirstMount,\n} from '@sendbird/uikit-utils';\n\nimport { LocalizationContext, LocalizationProvider } from '../contexts/LocalizationCtx';\nimport { PlatformServiceProvider } from '../contexts/PlatformServiceCtx';\nimport { ReactionProvider } from '../contexts/ReactionCtx';\nimport { type SBUHandlers, SBUHandlersProvider } from '../contexts/SBUHandlersCtx';\nimport type { ChatRelatedFeaturesInUIKit } from '../contexts/SendbirdChatCtx';\nimport { SendbirdChatProvider } from '../contexts/SendbirdChatCtx';\nimport { UserProfileProvider } from '../contexts/UserProfileCtx';\nimport EmojiManager from '../libs/EmojiManager';\nimport type { ImageCompressionConfigInterface } from '../libs/ImageCompressionConfig';\nimport ImageCompressionConfig from '../libs/ImageCompressionConfig';\nimport InternalLocalCacheStorage from '../libs/InternalLocalCacheStorage';\nimport MentionConfig, { MentionConfigInterface } from '../libs/MentionConfig';\nimport MentionManager from '../libs/MentionManager';\nimport SBUUtils from '../libs/SBUUtils';\nimport VoiceMessageConfig, { VoiceMessageConfigInterface } from '../libs/VoiceMessageConfig';\nimport VoiceMessageStatusManager from '../libs/VoiceMessageStatusManager';\nimport StringSetEn from '../localization/StringSet.en';\nimport type { StringSet } from '../localization/StringSet.type';\nimport SBUDynamicModule from '../platform/dynamicModule';\nimport type {\n ClipboardServiceInterface,\n FileServiceInterface,\n MediaServiceInterface,\n NotificationServiceInterface,\n PlayerServiceInterface,\n RecorderServiceInterface,\n} from '../platform/types';\nimport { ErrorBoundaryProps, LocalCacheStorage } from '../types';\nimport VERSION from '../version';\nimport InternalErrorBoundaryContainer from './InternalErrorBoundaryContainer';\n\nconst NetInfo = SBUDynamicModule.get('@react-native-community/netinfo', 'warn');\nexport const SendbirdUIKit = Object.freeze({\n VERSION,\n PLATFORM: Platform.OS.toLowerCase(),\n DEFAULT: {\n AUTO_PUSH_TOKEN_REGISTRATION: true,\n USE_USER_ID_FOR_NICKNAME: false,\n IMAGE_COMPRESSION: true,\n },\n});\n\nexport type ChatOmittedInitParams = Omit<\n SendbirdChatParams<[GroupChannelModule, OpenChannelModule]>,\n (typeof chatOmitKeys)[number]\n>;\n\nconst chatOmitKeys = [\n 'appId',\n 'newInstance',\n 'modules',\n 'debugMode',\n 'appVersion',\n 'localCacheEnabled',\n 'useAsyncStorageStore',\n 'useMMKVStorageStore',\n] as const;\nfunction sanitizeChatOptions<T extends Record<string, unknown>>(chatOptions: T): T {\n const opts = { ...chatOptions };\n chatOmitKeys.forEach((key) => delete opts[key]);\n return opts;\n}\nexport type SendbirdUIKitContainerProps = React.PropsWithChildren<{\n appId: string;\n platformServices: {\n file: FileServiceInterface;\n notification: NotificationServiceInterface;\n clipboard: ClipboardServiceInterface;\n media: MediaServiceInterface;\n player: PlayerServiceInterface;\n recorder: RecorderServiceInterface;\n };\n chatOptions: Partial<ChatOmittedInitParams> &\n Partial<ChatRelatedFeaturesInUIKit> & {\n onInitialized?: (sdkInstance: SendbirdChatSDK) => SendbirdChatSDK;\n localCacheStorage: LocalCacheStorage;\n };\n uikitOptions?: PartialDeep<{\n common: SBUConfig['common'];\n groupChannel: Omit<SBUConfig['groupChannel']['channel'], 'enableReactionsSupergroup'> & {\n /**\n * @deprecated Currently, this feature is turned off by default. If you wish to use this feature, contact us: {@link https://dashboard.sendbird.com/settings/contact_us?category=feedback_and_feature_requests&product=UIKit}\n */\n enableReactionsSupergroup: never;\n };\n groupChannelList: SBUConfig['groupChannel']['channelList'];\n groupChannelSettings: SBUConfig['groupChannel']['setting'];\n openChannel: SBUConfig['openChannel']['channel'];\n }>;\n localization?: {\n stringSet?: StringSet;\n };\n styles?: {\n theme?: UIKitTheme;\n statusBarTranslucent?: boolean;\n defaultHeaderTitleAlign?: 'left' | 'center';\n defaultHeaderHeight?: number;\n HeaderComponent?: HeaderStyleContextType['HeaderComponent'];\n };\n errorBoundary?: {\n disabled?: boolean;\n onError?: (props: ErrorBoundaryProps) => void;\n ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;\n };\n handlers?: Partial<SBUHandlers>;\n toast?: {\n dismissTimeout?: number;\n };\n userProfile?: {\n onCreateChannel: (channel: SendbirdGroupChannel) => void;\n onBeforeCreateChannel?: (\n channelParams: SendbirdGroupChannelCreateParams,\n users: SendbirdUser[] | SendbirdMember[],\n ) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;\n };\n reaction?: {\n onPressUserProfile?: (user: SendbirdUser | SendbirdMember) => void;\n };\n userMention?: Pick<Partial<MentionConfigInterface>, 'mentionLimit' | 'suggestionLimit' | 'debounceMills'>;\n imageCompression?: Partial<ImageCompressionConfigInterface>;\n voiceMessage?: PartialDeep<VoiceMessageConfigInterface>;\n}>;\n\nconst SendbirdUIKitContainer = (props: SendbirdUIKitContainerProps) => {\n const {\n children,\n appId,\n chatOptions,\n uikitOptions,\n platformServices,\n localization,\n styles,\n errorBoundary,\n handlers,\n toast,\n userProfile,\n reaction,\n } = props;\n\n if (!chatOptions.localCacheStorage) {\n throw new Error('SendbirdUIKitContainer: chatOptions.localCacheStorage is required');\n } else if ('getItem' in chatOptions.localCacheStorage) {\n Logger.warn(\n 'SendbirdUIKitContainer: localCacheStorage for `AsyncStorage` is deprecated. Please use `MMKV` instead.',\n );\n }\n\n const defaultStringSet = localization?.stringSet ?? StringSetEn;\n\n const isFirstMount = useIsFirstMount();\n const unsubscribes = useRef<Array<() => void>>([]);\n\n const [internalStorage] = useState(() => new InternalLocalCacheStorage(chatOptions.localCacheStorage));\n const [sdkInstance, setSdkInstance] = useState<SendbirdChatSDK>(() => {\n const sendbird = initializeSendbird(appId, sanitizeChatOptions(chatOptions));\n unsubscribes.current = sendbird.unsubscribes;\n return sendbird.chatSDK;\n });\n\n const { imageCompressionConfig, voiceMessageConfig, mentionConfig } = useConfigInstance(props);\n const emojiManager = useMemo(() => new EmojiManager(internalStorage), [internalStorage]);\n const mentionManager = useMemo(() => new MentionManager(mentionConfig), [mentionConfig]);\n const voiceMessageStatusManager = useMemo(() => new VoiceMessageStatusManager(), []);\n\n useLayoutEffect(() => {\n if (!isFirstMount) {\n const sendbird = initializeSendbird(appId, sanitizeChatOptions(chatOptions));\n setSdkInstance(sendbird.chatSDK);\n unsubscribes.current = sendbird.unsubscribes;\n }\n\n return () => {\n unsubscribes.current.forEach((u) => {\n try {\n u();\n } catch {}\n });\n };\n }, [appId, internalStorage]);\n\n const renderChildren = () => {\n if (errorBoundary?.disabled) {\n return children;\n } else {\n return <InternalErrorBoundaryContainer {...errorBoundary}>{children}</InternalErrorBoundaryContainer>;\n }\n };\n\n const sbuHandlers: SBUHandlers = {\n onOpenURL: SBUUtils.openURL,\n onOpenFileURL: SBUUtils.openURL,\n ...handlers,\n };\n\n return (\n <SBUHandlersProvider {...sbuHandlers}>\n <SafeAreaProvider>\n <UIKitConfigProvider\n storage={internalStorage}\n localConfigs={{\n common: uikitOptions?.common,\n groupChannel: {\n channel: { ...uikitOptions?.groupChannel, enableReactionsSupergroup: undefined },\n channelList: uikitOptions?.groupChannelList,\n setting: uikitOptions?.groupChannelSettings,\n },\n openChannel: {\n channel: uikitOptions?.openChannel,\n },\n }}\n >\n <SendbirdChatProvider\n sdkInstance={sdkInstance}\n emojiManager={emojiManager}\n mentionManager={mentionManager}\n imageCompressionConfig={imageCompressionConfig}\n voiceMessageConfig={voiceMessageConfig}\n voiceMessageStatusManager={voiceMessageStatusManager}\n enableAutoPushTokenRegistration={\n chatOptions.enableAutoPushTokenRegistration ?? SendbirdUIKit.DEFAULT.AUTO_PUSH_TOKEN_REGISTRATION\n }\n enableUseUserIdForNickname={\n chatOptions.enableUseUserIdForNickname ?? SendbirdUIKit.DEFAULT.USE_USER_ID_FOR_NICKNAME\n }\n enableImageCompression={chatOptions.enableImageCompression ?? SendbirdUIKit.DEFAULT.IMAGE_COMPRESSION}\n >\n <LocalizationProvider stringSet={defaultStringSet}>\n <PlatformServiceProvider\n fileService={platformServices.file}\n notificationService={platformServices.notification}\n clipboardService={platformServices.clipboard}\n mediaService={platformServices.media}\n playerService={platformServices.player}\n recorderService={platformServices.recorder}\n voiceMessageConfig={voiceMessageConfig}\n >\n <UIKitThemeProvider theme={styles?.theme ?? LightUIKitTheme}>\n <HeaderStyleProvider\n HeaderComponent={styles?.HeaderComponent ?? Header}\n defaultTitleAlign={styles?.defaultHeaderTitleAlign ?? 'left'}\n statusBarTranslucent={styles?.statusBarTranslucent ?? true}\n >\n <ToastProvider dismissTimeout={toast?.dismissTimeout}>\n <UserProfileProvider {...userProfile} statusBarTranslucent={styles?.statusBarTranslucent ?? true}>\n <ReactionProvider {...reaction}>\n <LocalizationContext.Consumer>\n {(value) => {\n const STRINGS = value?.STRINGS || defaultStringSet;\n return (\n <DialogProvider\n defaultLabels={{\n alert: { ok: STRINGS.DIALOG.ALERT_DEFAULT_OK },\n prompt: {\n ok: STRINGS.DIALOG.PROMPT_DEFAULT_OK,\n cancel: STRINGS.DIALOG.PROMPT_DEFAULT_CANCEL,\n placeholder: STRINGS.DIALOG.PROMPT_DEFAULT_PLACEHOLDER,\n },\n }}\n >\n {renderChildren()}\n </DialogProvider>\n );\n }}\n </LocalizationContext.Consumer>\n </ReactionProvider>\n </UserProfileProvider>\n </ToastProvider>\n </HeaderStyleProvider>\n </UIKitThemeProvider>\n </PlatformServiceProvider>\n </LocalizationProvider>\n </SendbirdChatProvider>\n </UIKitConfigProvider>\n </SafeAreaProvider>\n </SBUHandlersProvider>\n );\n};\n\ninterface InitOptions extends ChatOmittedInitParams {\n localCacheStorage: LocalCacheStorage;\n onInitialized?: (sdk: SendbirdChatSDK) => SendbirdChatSDK;\n}\nconst initializeSendbird = (appId: string, options: InitOptions) => {\n let chatSDK: SendbirdChatSDK;\n const unsubscribes: Array<() => void> = [];\n const { localCacheStorage, onInitialized, ...chatInitParams } = options;\n\n const isMMKVStorage = 'getString' in localCacheStorage;\n chatSDK = SendbirdChat.init({\n ...chatInitParams,\n appId,\n newInstance: true,\n modules: [new GroupChannelModule(), new OpenChannelModule()],\n localCacheEnabled: true,\n useMMKVStorageStore: isMMKVStorage ? (localCacheStorage as MMKV) : undefined,\n useAsyncStorageStore: !isMMKVStorage ? (localCacheStorage as AsyncStorageStatic) : undefined,\n });\n\n if (onInitialized) {\n chatSDK = onInitialized(chatSDK);\n }\n\n const platform = getDeviceOSPlatform();\n if (SendbirdUIKit.VERSION && platform) {\n const deviceOSInfo = { platform, version: String(Platform.Version) };\n const customData = { platform_version: getReactNativeVersion() };\n const uikitExtension = {\n product: SendbirdProduct.UIKIT_CHAT,\n version: SendbirdUIKit.VERSION,\n platform: SendbirdPlatform.REACT_NATIVE,\n };\n\n chatSDK.addSendbirdExtensions([uikitExtension], deviceOSInfo, customData);\n chatSDK.addExtension('sb_uikit', SendbirdUIKit.VERSION);\n }\n\n if (SendbirdUIKit.PLATFORM) {\n chatSDK.addExtension('device-os-platform', SendbirdUIKit.PLATFORM);\n }\n\n if (NetInfo?.addEventListener) {\n try {\n // NOTE: For removing buggy behavior of NetInfo.addEventListener\n // When you first add an event listener, it is assumed that the initialization of the internal event detector is done simultaneously.\n // In other words, when you call the first event listener two events are triggered immediately\n // - the one that is called when adding the event listener\n // - and the internal initialization event\n NetInfo.addEventListener(NOOP)();\n } catch {}\n\n const listener = (callback: () => void, callbackType: 'online' | 'offline') => {\n let callCount = 0;\n const unsubscribe = NetInfo.addEventListener((state) => {\n const online = Boolean(state.isConnected) || Boolean(state.isInternetReachable);\n\n // NOTE: When NetInfo.addEventListener is called\n // the event is immediately triggered regardless of whether the event actually occurred.\n // This is why it filters the first event.\n if (callCount === 0) {\n callCount++;\n return;\n }\n\n if (online && callbackType === 'online') callback();\n if (!online && callbackType === 'offline') callback();\n });\n unsubscribes.push(unsubscribe);\n return unsubscribe;\n };\n chatSDK.setOnlineListener?.((onOnline) => listener(onOnline, 'online'));\n chatSDK.setOfflineListener?.((onOffline) => listener(onOffline, 'offline'));\n }\n return { chatSDK, unsubscribes };\n};\n\nfunction getDeviceOSPlatform() {\n switch (Platform.OS) {\n case 'android':\n return DeviceOsPlatform.ANDROID;\n case 'ios':\n return DeviceOsPlatform.IOS;\n case 'web':\n return DeviceOsPlatform.WEB;\n case 'windows':\n return DeviceOsPlatform.WINDOWS;\n default:\n return undefined;\n }\n}\n\nfunction getReactNativeVersion() {\n const { major, minor, patch } = Platform.constants.reactNativeVersion;\n return `${major}.${minor}.${patch}`;\n}\n\nconst useConfigInstance = ({ imageCompression, userMention, voiceMessage }: SendbirdUIKitContainerProps) => {\n const mentionConfig = useMemo(() => {\n return new MentionConfig({\n mentionLimit: userMention?.mentionLimit || MentionConfig.DEFAULT.MENTION_LIMIT,\n suggestionLimit: userMention?.suggestionLimit || MentionConfig.DEFAULT.SUGGESTION_LIMIT,\n debounceMills: userMention?.debounceMills ?? MentionConfig.DEFAULT.DEBOUNCE_MILLS,\n delimiter: MentionConfig.DEFAULT.DELIMITER,\n trigger: MentionConfig.DEFAULT.TRIGGER,\n });\n }, [userMention?.mentionLimit, userMention?.suggestionLimit, userMention?.debounceMills]);\n\n const imageCompressionConfig = useMemo(() => {\n return new ImageCompressionConfig({\n compressionRate: imageCompression?.compressionRate || ImageCompressionConfig.DEFAULT.COMPRESSION_RATE,\n width: imageCompression?.width,\n height: imageCompression?.height,\n });\n }, [imageCompression?.compressionRate, imageCompression?.width, imageCompression?.height]);\n\n const voiceMessageConfig = useMemo(() => {\n return new VoiceMessageConfig({\n recorder: {\n minDuration: voiceMessage?.recorder?.minDuration ?? VoiceMessageConfig.DEFAULT.RECORDER.MIN_DURATION,\n maxDuration: voiceMessage?.recorder?.maxDuration ?? VoiceMessageConfig.DEFAULT.RECORDER.MAX_DURATION,\n },\n });\n }, [voiceMessage?.recorder?.minDuration, voiceMessage?.recorder?.maxDuration]);\n\n return {\n mentionConfig,\n imageCompressionConfig,\n voiceMessageConfig,\n };\n};\n\nexport default SendbirdUIKitContainer;\n"],"mappings":";AACA,OAAOA,KAAK,IAAIC,eAAe,EAAEC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACzE,SAASC,QAAQ,QAAQ,cAAc;AAEvC,SAASC,gBAAgB,QAAQ,gCAAgC;AAEjE,OAAOC,YAAY,IAAIC,gBAAgB,EAAsBC,gBAAgB,EAAEC,eAAe,QAAQ,gBAAgB;AACtH,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,iBAAiB,QAAQ,4BAA4B;AAE9D,SACEC,cAAc,EACdC,MAAM,EACNC,mBAAmB,EACnBC,eAAe,EACfC,aAAa,EACbC,kBAAkB,QACb,yCAAyC;AAChD,SAA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"}
1
+ {"version":3,"names":["React","useLayoutEffect","useMemo","useRef","useState","Platform","SafeAreaProvider","SendbirdChat","DeviceOsPlatform","SendbirdPlatform","SendbirdProduct","GroupChannelModule","OpenChannelModule","DialogProvider","Header","HeaderStyleProvider","LightUIKitTheme","ToastProvider","UIKitThemeProvider","UIKitConfigProvider","Logger","NOOP","useIsFirstMount","LocalizationContext","LocalizationProvider","PlatformServiceProvider","ReactionProvider","SBUHandlersProvider","SendbirdChatProvider","UserProfileProvider","EmojiManager","ImageCompressionConfig","InternalLocalCacheStorage","MentionConfig","MentionManager","SBUUtils","VoiceMessageConfig","VoiceMessageStatusManager","StringSetEn","SBUDynamicModule","VERSION","InternalErrorBoundaryContainer","NetInfo","get","SendbirdUIKit","Object","freeze","PLATFORM","OS","toLowerCase","DEFAULT","AUTO_PUSH_TOKEN_REGISTRATION","USE_USER_ID_FOR_NICKNAME","IMAGE_COMPRESSION","chatOmitKeys","sanitizeChatOptions","chatOptions","opts","forEach","key","SendbirdUIKitContainer","props","children","appId","uikitOptions","platformServices","localization","styles","errorBoundary","handlers","toast","userProfile","reaction","localCacheStorage","Error","warn","defaultStringSet","stringSet","isFirstMount","unsubscribes","internalStorage","sdkInstance","setSdkInstance","sendbird","initializeSendbird","current","chatSDK","imageCompressionConfig","voiceMessageConfig","mentionConfig","useConfigInstance","emojiManager","mentionManager","voiceMessageStatusManager","u","renderChildren","disabled","createElement","sbuHandlers","onOpenURL","openURL","storage","localConfigs","common","groupChannel","channel","enableReactionsSupergroup","undefined","channelList","groupChannelList","setting","groupChannelSettings","openChannel","enableAutoPushTokenRegistration","enableUseUserIdForNickname","enableImageCompression","fileService","file","notificationService","notification","clipboardService","clipboard","mediaService","media","playerService","player","recorderService","recorder","theme","HeaderComponent","defaultTitleAlign","defaultHeaderTitleAlign","statusBarTranslucent","dismissTimeout","_extends","Consumer","value","STRINGS","defaultLabels","alert","ok","DIALOG","ALERT_DEFAULT_OK","prompt","PROMPT_DEFAULT_OK","cancel","PROMPT_DEFAULT_CANCEL","placeholder","PROMPT_DEFAULT_PLACEHOLDER","options","onInitialized","chatInitParams","isMMKVStorage","init","newInstance","modules","localCacheEnabled","useMMKVStorageStore","useAsyncStorageStore","platform","getDeviceOSPlatform","deviceOSInfo","version","String","Version","customData","platform_version","getReactNativeVersion","uikitExtension","product","UIKIT_CHAT","REACT_NATIVE","addSendbirdExtensions","addExtension","addEventListener","_chatSDK$setOnlineLis","_chatSDK","_chatSDK$setOfflineLi","_chatSDK2","listener","callback","callbackType","callCount","unsubscribe","state","online","Boolean","isConnected","isInternetReachable","push","setOnlineListener","call","onOnline","setOfflineListener","onOffline","ANDROID","IOS","WEB","WINDOWS","major","minor","patch","constants","reactNativeVersion","_ref","_voiceMessage$recorde3","_voiceMessage$recorde4","imageCompression","userMention","voiceMessage","mentionLimit","MENTION_LIMIT","suggestionLimit","SUGGESTION_LIMIT","debounceMills","DEBOUNCE_MILLS","delimiter","DELIMITER","trigger","TRIGGER","compressionRate","COMPRESSION_RATE","width","height","_voiceMessage$recorde","_voiceMessage$recorde2","minDuration","RECORDER","MIN_DURATION","maxDuration","MAX_DURATION"],"sources":["SendbirdUIKitContainer.tsx"],"sourcesContent":["import type { AsyncStorageStatic } from '@react-native-async-storage/async-storage';\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { Platform } from 'react-native';\nimport type { MMKV } from 'react-native-mmkv';\nimport { SafeAreaProvider } from 'react-native-safe-area-context';\n\nimport SendbirdChat, { DeviceOsPlatform, SendbirdChatParams, SendbirdPlatform, SendbirdProduct } from '@sendbird/chat';\nimport { GroupChannelModule } from '@sendbird/chat/groupChannel';\nimport { OpenChannelModule } from '@sendbird/chat/openChannel';\nimport type { HeaderStyleContextType, UIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport {\n DialogProvider,\n Header,\n HeaderStyleProvider,\n LightUIKitTheme,\n ToastProvider,\n UIKitThemeProvider,\n} from '@sendbird/uikit-react-native-foundation';\nimport { SBUConfig, UIKitConfigProvider } from '@sendbird/uikit-tools';\nimport {\n Logger,\n NOOP,\n PartialDeep,\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdGroupChannelCreateParams,\n SendbirdMember,\n SendbirdUser,\n useIsFirstMount,\n} from '@sendbird/uikit-utils';\n\nimport { LocalizationContext, LocalizationProvider } from '../contexts/LocalizationCtx';\nimport { PlatformServiceProvider } from '../contexts/PlatformServiceCtx';\nimport { ReactionProvider } from '../contexts/ReactionCtx';\nimport { type SBUHandlers, SBUHandlersProvider } from '../contexts/SBUHandlersCtx';\nimport type { ChatRelatedFeaturesInUIKit } from '../contexts/SendbirdChatCtx';\nimport { SendbirdChatProvider } from '../contexts/SendbirdChatCtx';\nimport { UserProfileProvider } from '../contexts/UserProfileCtx';\nimport EmojiManager from '../libs/EmojiManager';\nimport type { ImageCompressionConfigInterface } from '../libs/ImageCompressionConfig';\nimport ImageCompressionConfig from '../libs/ImageCompressionConfig';\nimport InternalLocalCacheStorage from '../libs/InternalLocalCacheStorage';\nimport MentionConfig, { MentionConfigInterface } from '../libs/MentionConfig';\nimport MentionManager from '../libs/MentionManager';\nimport SBUUtils from '../libs/SBUUtils';\nimport VoiceMessageConfig, { VoiceMessageConfigInterface } from '../libs/VoiceMessageConfig';\nimport VoiceMessageStatusManager from '../libs/VoiceMessageStatusManager';\nimport StringSetEn from '../localization/StringSet.en';\nimport type { StringSet } from '../localization/StringSet.type';\nimport SBUDynamicModule from '../platform/dynamicModule';\nimport type {\n ClipboardServiceInterface,\n FileServiceInterface,\n MediaServiceInterface,\n NotificationServiceInterface,\n PlayerServiceInterface,\n RecorderServiceInterface,\n} from '../platform/types';\nimport { ErrorBoundaryProps, LocalCacheStorage } from '../types';\nimport VERSION from '../version';\nimport InternalErrorBoundaryContainer from './InternalErrorBoundaryContainer';\n\nconst NetInfo = SBUDynamicModule.get('@react-native-community/netinfo', 'warn');\nexport const SendbirdUIKit = Object.freeze({\n VERSION,\n PLATFORM: Platform.OS.toLowerCase(),\n DEFAULT: {\n AUTO_PUSH_TOKEN_REGISTRATION: true,\n USE_USER_ID_FOR_NICKNAME: false,\n IMAGE_COMPRESSION: true,\n },\n});\n\nexport type ChatOmittedInitParams = Omit<\n SendbirdChatParams<[GroupChannelModule, OpenChannelModule]>,\n (typeof chatOmitKeys)[number]\n>;\n\nconst chatOmitKeys = [\n 'appId',\n 'newInstance',\n 'modules',\n 'debugMode',\n 'appVersion',\n 'localCacheEnabled',\n 'useAsyncStorageStore',\n 'useMMKVStorageStore',\n] as const;\nfunction sanitizeChatOptions<T extends Record<string, unknown>>(chatOptions: T): T {\n const opts = { ...chatOptions };\n chatOmitKeys.forEach((key) => delete opts[key]);\n return opts;\n}\nexport type SendbirdUIKitContainerProps = React.PropsWithChildren<{\n appId: string;\n platformServices: {\n file: FileServiceInterface;\n notification: NotificationServiceInterface;\n clipboard: ClipboardServiceInterface;\n media: MediaServiceInterface;\n player: PlayerServiceInterface;\n recorder: RecorderServiceInterface;\n };\n chatOptions: Partial<ChatOmittedInitParams> &\n Partial<ChatRelatedFeaturesInUIKit> & {\n onInitialized?: (sdkInstance: SendbirdChatSDK) => SendbirdChatSDK;\n localCacheStorage: LocalCacheStorage;\n };\n uikitOptions?: PartialDeep<{\n common: SBUConfig['common'];\n groupChannel: Omit<SBUConfig['groupChannel']['channel'], 'enableReactionsSupergroup'> & {\n /**\n * @deprecated Currently, this feature is turned off by default. If you wish to use this feature, contact us: {@link https://dashboard.sendbird.com/settings/contact_us?category=feedback_and_feature_requests&product=UIKit}\n */\n enableReactionsSupergroup: never;\n };\n groupChannelList: SBUConfig['groupChannel']['channelList'];\n groupChannelSettings: SBUConfig['groupChannel']['setting'];\n openChannel: SBUConfig['openChannel']['channel'];\n }>;\n localization?: {\n stringSet?: StringSet;\n };\n styles?: {\n theme?: UIKitTheme;\n statusBarTranslucent?: boolean;\n defaultHeaderTitleAlign?: 'left' | 'center';\n defaultHeaderHeight?: number;\n HeaderComponent?: HeaderStyleContextType['HeaderComponent'];\n };\n errorBoundary?: {\n disabled?: boolean;\n onError?: (props: ErrorBoundaryProps) => void;\n ErrorInfoComponent?: (props: ErrorBoundaryProps) => React.ReactNode;\n };\n handlers?: Partial<SBUHandlers>;\n toast?: {\n dismissTimeout?: number;\n };\n userProfile?: {\n onCreateChannel: (channel: SendbirdGroupChannel) => void;\n onBeforeCreateChannel?: (\n channelParams: SendbirdGroupChannelCreateParams,\n users: SendbirdUser[] | SendbirdMember[],\n ) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;\n };\n reaction?: {\n onPressUserProfile?: (user: SendbirdUser | SendbirdMember) => void;\n };\n userMention?: Pick<Partial<MentionConfigInterface>, 'mentionLimit' | 'suggestionLimit' | 'debounceMills'>;\n imageCompression?: Partial<ImageCompressionConfigInterface>;\n voiceMessage?: PartialDeep<VoiceMessageConfigInterface>;\n}>;\n\nconst SendbirdUIKitContainer = (props: SendbirdUIKitContainerProps) => {\n const {\n children,\n appId,\n chatOptions,\n uikitOptions,\n platformServices,\n localization,\n styles,\n errorBoundary,\n handlers,\n toast,\n userProfile,\n reaction,\n } = props;\n\n if (!chatOptions.localCacheStorage) {\n throw new Error('SendbirdUIKitContainer: chatOptions.localCacheStorage is required');\n } else if ('getItem' in chatOptions.localCacheStorage) {\n Logger.warn(\n 'SendbirdUIKitContainer: localCacheStorage for `AsyncStorage` is deprecated. Please use `MMKV` instead.',\n );\n }\n\n const defaultStringSet = localization?.stringSet ?? StringSetEn;\n\n const isFirstMount = useIsFirstMount();\n const unsubscribes = useRef<Array<() => void>>([]);\n\n const [internalStorage] = useState(() => new InternalLocalCacheStorage(chatOptions.localCacheStorage));\n const [sdkInstance, setSdkInstance] = useState<SendbirdChatSDK>(() => {\n const sendbird = initializeSendbird(appId, sanitizeChatOptions(chatOptions));\n unsubscribes.current = sendbird.unsubscribes;\n return sendbird.chatSDK;\n });\n\n const { imageCompressionConfig, voiceMessageConfig, mentionConfig } = useConfigInstance(props);\n const emojiManager = useMemo(() => new EmojiManager(internalStorage), [internalStorage]);\n const mentionManager = useMemo(() => new MentionManager(mentionConfig), [mentionConfig]);\n const voiceMessageStatusManager = useMemo(() => new VoiceMessageStatusManager(), []);\n\n useLayoutEffect(() => {\n if (!isFirstMount) {\n const sendbird = initializeSendbird(appId, sanitizeChatOptions(chatOptions));\n setSdkInstance(sendbird.chatSDK);\n unsubscribes.current = sendbird.unsubscribes;\n }\n\n return () => {\n unsubscribes.current.forEach((u) => {\n try {\n u();\n } catch {}\n });\n };\n }, [appId, internalStorage]);\n\n const renderChildren = () => {\n if (errorBoundary?.disabled) {\n return children;\n } else {\n return <InternalErrorBoundaryContainer {...errorBoundary}>{children}</InternalErrorBoundaryContainer>;\n }\n };\n\n const sbuHandlers: SBUHandlers = {\n onOpenURL: SBUUtils.openURL,\n ...handlers,\n };\n\n return (\n <SBUHandlersProvider {...sbuHandlers}>\n <SafeAreaProvider>\n <UIKitConfigProvider\n storage={internalStorage}\n localConfigs={{\n common: uikitOptions?.common,\n groupChannel: {\n channel: { ...uikitOptions?.groupChannel, enableReactionsSupergroup: undefined },\n channelList: uikitOptions?.groupChannelList,\n setting: uikitOptions?.groupChannelSettings,\n },\n openChannel: {\n channel: uikitOptions?.openChannel,\n },\n }}\n >\n <SendbirdChatProvider\n sdkInstance={sdkInstance}\n emojiManager={emojiManager}\n mentionManager={mentionManager}\n imageCompressionConfig={imageCompressionConfig}\n voiceMessageConfig={voiceMessageConfig}\n voiceMessageStatusManager={voiceMessageStatusManager}\n enableAutoPushTokenRegistration={\n chatOptions.enableAutoPushTokenRegistration ?? SendbirdUIKit.DEFAULT.AUTO_PUSH_TOKEN_REGISTRATION\n }\n enableUseUserIdForNickname={\n chatOptions.enableUseUserIdForNickname ?? SendbirdUIKit.DEFAULT.USE_USER_ID_FOR_NICKNAME\n }\n enableImageCompression={chatOptions.enableImageCompression ?? SendbirdUIKit.DEFAULT.IMAGE_COMPRESSION}\n >\n <LocalizationProvider stringSet={defaultStringSet}>\n <PlatformServiceProvider\n fileService={platformServices.file}\n notificationService={platformServices.notification}\n clipboardService={platformServices.clipboard}\n mediaService={platformServices.media}\n playerService={platformServices.player}\n recorderService={platformServices.recorder}\n voiceMessageConfig={voiceMessageConfig}\n >\n <UIKitThemeProvider theme={styles?.theme ?? LightUIKitTheme}>\n <HeaderStyleProvider\n HeaderComponent={styles?.HeaderComponent ?? Header}\n defaultTitleAlign={styles?.defaultHeaderTitleAlign ?? 'left'}\n statusBarTranslucent={styles?.statusBarTranslucent ?? true}\n >\n <ToastProvider dismissTimeout={toast?.dismissTimeout}>\n <UserProfileProvider {...userProfile} statusBarTranslucent={styles?.statusBarTranslucent ?? true}>\n <ReactionProvider {...reaction}>\n <LocalizationContext.Consumer>\n {(value) => {\n const STRINGS = value?.STRINGS || defaultStringSet;\n return (\n <DialogProvider\n defaultLabels={{\n alert: { ok: STRINGS.DIALOG.ALERT_DEFAULT_OK },\n prompt: {\n ok: STRINGS.DIALOG.PROMPT_DEFAULT_OK,\n cancel: STRINGS.DIALOG.PROMPT_DEFAULT_CANCEL,\n placeholder: STRINGS.DIALOG.PROMPT_DEFAULT_PLACEHOLDER,\n },\n }}\n >\n {renderChildren()}\n </DialogProvider>\n );\n }}\n </LocalizationContext.Consumer>\n </ReactionProvider>\n </UserProfileProvider>\n </ToastProvider>\n </HeaderStyleProvider>\n </UIKitThemeProvider>\n </PlatformServiceProvider>\n </LocalizationProvider>\n </SendbirdChatProvider>\n </UIKitConfigProvider>\n </SafeAreaProvider>\n </SBUHandlersProvider>\n );\n};\n\ninterface InitOptions extends ChatOmittedInitParams {\n localCacheStorage: LocalCacheStorage;\n onInitialized?: (sdk: SendbirdChatSDK) => SendbirdChatSDK;\n}\nconst initializeSendbird = (appId: string, options: InitOptions) => {\n let chatSDK: SendbirdChatSDK;\n const unsubscribes: Array<() => void> = [];\n const { localCacheStorage, onInitialized, ...chatInitParams } = options;\n\n const isMMKVStorage = 'getString' in localCacheStorage;\n chatSDK = SendbirdChat.init({\n ...chatInitParams,\n appId,\n newInstance: true,\n modules: [new GroupChannelModule(), new OpenChannelModule()],\n localCacheEnabled: true,\n useMMKVStorageStore: isMMKVStorage ? (localCacheStorage as MMKV) : undefined,\n useAsyncStorageStore: !isMMKVStorage ? (localCacheStorage as AsyncStorageStatic) : undefined,\n });\n\n if (onInitialized) {\n chatSDK = onInitialized(chatSDK);\n }\n\n const platform = getDeviceOSPlatform();\n if (SendbirdUIKit.VERSION && platform) {\n const deviceOSInfo = { platform, version: String(Platform.Version) };\n const customData = { platform_version: getReactNativeVersion() };\n const uikitExtension = {\n product: SendbirdProduct.UIKIT_CHAT,\n version: SendbirdUIKit.VERSION,\n platform: SendbirdPlatform.REACT_NATIVE,\n };\n\n chatSDK.addSendbirdExtensions([uikitExtension], deviceOSInfo, customData);\n chatSDK.addExtension('sb_uikit', SendbirdUIKit.VERSION);\n }\n\n if (SendbirdUIKit.PLATFORM) {\n chatSDK.addExtension('device-os-platform', SendbirdUIKit.PLATFORM);\n }\n\n if (NetInfo?.addEventListener) {\n try {\n // NOTE: For removing buggy behavior of NetInfo.addEventListener\n // When you first add an event listener, it is assumed that the initialization of the internal event detector is done simultaneously.\n // In other words, when you call the first event listener two events are triggered immediately\n // - the one that is called when adding the event listener\n // - and the internal initialization event\n NetInfo.addEventListener(NOOP)();\n } catch {}\n\n const listener = (callback: () => void, callbackType: 'online' | 'offline') => {\n let callCount = 0;\n const unsubscribe = NetInfo.addEventListener((state) => {\n const online = Boolean(state.isConnected) || Boolean(state.isInternetReachable);\n\n // NOTE: When NetInfo.addEventListener is called\n // the event is immediately triggered regardless of whether the event actually occurred.\n // This is why it filters the first event.\n if (callCount === 0) {\n callCount++;\n return;\n }\n\n if (online && callbackType === 'online') callback();\n if (!online && callbackType === 'offline') callback();\n });\n unsubscribes.push(unsubscribe);\n return unsubscribe;\n };\n chatSDK.setOnlineListener?.((onOnline) => listener(onOnline, 'online'));\n chatSDK.setOfflineListener?.((onOffline) => listener(onOffline, 'offline'));\n }\n return { chatSDK, unsubscribes };\n};\n\nfunction getDeviceOSPlatform() {\n switch (Platform.OS) {\n case 'android':\n return DeviceOsPlatform.ANDROID;\n case 'ios':\n return DeviceOsPlatform.IOS;\n case 'web':\n return DeviceOsPlatform.WEB;\n case 'windows':\n return DeviceOsPlatform.WINDOWS;\n default:\n return undefined;\n }\n}\n\nfunction getReactNativeVersion() {\n const { major, minor, patch } = Platform.constants.reactNativeVersion;\n return `${major}.${minor}.${patch}`;\n}\n\nconst useConfigInstance = ({ imageCompression, userMention, voiceMessage }: SendbirdUIKitContainerProps) => {\n const mentionConfig = useMemo(() => {\n return new MentionConfig({\n mentionLimit: userMention?.mentionLimit || MentionConfig.DEFAULT.MENTION_LIMIT,\n suggestionLimit: userMention?.suggestionLimit || MentionConfig.DEFAULT.SUGGESTION_LIMIT,\n debounceMills: userMention?.debounceMills ?? MentionConfig.DEFAULT.DEBOUNCE_MILLS,\n delimiter: MentionConfig.DEFAULT.DELIMITER,\n trigger: MentionConfig.DEFAULT.TRIGGER,\n });\n }, [userMention?.mentionLimit, userMention?.suggestionLimit, userMention?.debounceMills]);\n\n const imageCompressionConfig = useMemo(() => {\n return new ImageCompressionConfig({\n compressionRate: imageCompression?.compressionRate || ImageCompressionConfig.DEFAULT.COMPRESSION_RATE,\n width: imageCompression?.width,\n height: imageCompression?.height,\n });\n }, [imageCompression?.compressionRate, imageCompression?.width, imageCompression?.height]);\n\n const voiceMessageConfig = useMemo(() => {\n return new VoiceMessageConfig({\n recorder: {\n minDuration: voiceMessage?.recorder?.minDuration ?? VoiceMessageConfig.DEFAULT.RECORDER.MIN_DURATION,\n maxDuration: voiceMessage?.recorder?.maxDuration ?? VoiceMessageConfig.DEFAULT.RECORDER.MAX_DURATION,\n },\n });\n }, [voiceMessage?.recorder?.minDuration, voiceMessage?.recorder?.maxDuration]);\n\n return {\n mentionConfig,\n imageCompressionConfig,\n voiceMessageConfig,\n };\n};\n\nexport default SendbirdUIKitContainer;\n"],"mappings":";AACA,OAAOA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