@sendbird/uikit-react-native 3.7.3 → 3.7.5

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/README.md +5 -4
  2. package/lib/commonjs/components/ChannelInput/SendInput.js +2 -1
  3. package/lib/commonjs/components/ChannelInput/SendInput.js.map +1 -1
  4. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js +33 -23
  5. package/lib/commonjs/components/ChannelInput/VoiceMessageInput.js.map +1 -1
  6. package/lib/commonjs/components/ChannelInput/index.js +11 -5
  7. package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
  8. package/lib/commonjs/components/ChannelMessageList/index.js +6 -1
  9. package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
  10. package/lib/commonjs/components/ChannelThreadMessageList/index.js +6 -1
  11. package/lib/commonjs/components/ChannelThreadMessageList/index.js.map +1 -1
  12. package/lib/commonjs/components/FileViewer/FileViewerContent.js +1 -1
  13. package/lib/commonjs/components/FileViewer/FileViewerContent.js.map +1 -1
  14. package/lib/commonjs/components/FileViewer/FileViewerFooter.js +1 -0
  15. package/lib/commonjs/components/FileViewer/FileViewerFooter.js.map +1 -1
  16. package/lib/commonjs/components/FileViewer/FileViewerHeader.js +1 -0
  17. package/lib/commonjs/components/FileViewer/FileViewerHeader.js.map +1 -1
  18. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js +1 -1
  19. package/lib/commonjs/components/GroupChannelMessageRenderer/index.js.map +1 -1
  20. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js +9 -3
  21. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  22. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js +9 -3
  23. package/lib/commonjs/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -1
  24. package/lib/commonjs/components/ThreadParentMessageRenderer/index.js +1 -1
  25. package/lib/commonjs/components/ThreadParentMessageRenderer/index.js.map +1 -1
  26. package/lib/commonjs/containers/SendbirdUIKitContainer.js +0 -1
  27. package/lib/commonjs/containers/SendbirdUIKitContainer.js.map +1 -1
  28. package/lib/commonjs/contexts/PlatformServiceCtx.js +2 -1
  29. package/lib/commonjs/contexts/PlatformServiceCtx.js.map +1 -1
  30. package/lib/commonjs/contexts/SBUHandlersCtx.js.map +1 -1
  31. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +17 -3
  32. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  33. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +8 -4
  34. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  35. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadMessageList.js +16 -2
  36. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadMessageList.js.map +1 -1
  37. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js +8 -3
  38. package/lib/commonjs/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js.map +1 -1
  39. package/lib/commonjs/fragments/createGroupChannelFragment.js +3 -2
  40. package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
  41. package/lib/commonjs/fragments/createGroupChannelThreadFragment.js +3 -2
  42. package/lib/commonjs/fragments/createGroupChannelThreadFragment.js.map +1 -1
  43. package/lib/commonjs/hooks/useConnection.js +2 -2
  44. package/lib/commonjs/hooks/useConnection.js.map +1 -1
  45. package/lib/commonjs/hooks/usePushTokenRegistration.js +24 -6
  46. package/lib/commonjs/hooks/usePushTokenRegistration.js.map +1 -1
  47. package/lib/commonjs/platform/createFileService.native.js +2 -2
  48. package/lib/commonjs/platform/createFileService.native.js.map +1 -1
  49. package/lib/commonjs/platform/createPlayerService.expo.js +8 -2
  50. package/lib/commonjs/platform/createPlayerService.expo.js.map +1 -1
  51. package/lib/commonjs/platform/createPlayerService.native.js +12 -7
  52. package/lib/commonjs/platform/createPlayerService.native.js.map +1 -1
  53. package/lib/commonjs/platform/createRecorderService.native.js +8 -2
  54. package/lib/commonjs/platform/createRecorderService.native.js.map +1 -1
  55. package/lib/commonjs/version.js +1 -1
  56. package/lib/commonjs/version.js.map +1 -1
  57. package/lib/module/components/ChannelInput/SendInput.js +2 -1
  58. package/lib/module/components/ChannelInput/SendInput.js.map +1 -1
  59. package/lib/module/components/ChannelInput/VoiceMessageInput.js +34 -24
  60. package/lib/module/components/ChannelInput/VoiceMessageInput.js.map +1 -1
  61. package/lib/module/components/ChannelInput/index.js +12 -6
  62. package/lib/module/components/ChannelInput/index.js.map +1 -1
  63. package/lib/module/components/ChannelMessageList/index.js +6 -1
  64. package/lib/module/components/ChannelMessageList/index.js.map +1 -1
  65. package/lib/module/components/ChannelThreadMessageList/index.js +6 -1
  66. package/lib/module/components/ChannelThreadMessageList/index.js.map +1 -1
  67. package/lib/module/components/FileViewer/FileViewerContent.js +1 -1
  68. package/lib/module/components/FileViewer/FileViewerContent.js.map +1 -1
  69. package/lib/module/components/FileViewer/FileViewerFooter.js +1 -0
  70. package/lib/module/components/FileViewer/FileViewerFooter.js.map +1 -1
  71. package/lib/module/components/FileViewer/FileViewerHeader.js +1 -0
  72. package/lib/module/components/FileViewer/FileViewerHeader.js.map +1 -1
  73. package/lib/module/components/GroupChannelMessageRenderer/index.js +1 -1
  74. package/lib/module/components/GroupChannelMessageRenderer/index.js.map +1 -1
  75. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js +10 -4
  76. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  77. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js +9 -3
  78. package/lib/module/components/ReactionBottomSheets/ReactionListBottomSheet.js.map +1 -1
  79. package/lib/module/components/ThreadParentMessageRenderer/index.js +1 -1
  80. package/lib/module/components/ThreadParentMessageRenderer/index.js.map +1 -1
  81. package/lib/module/containers/SendbirdUIKitContainer.js +0 -1
  82. package/lib/module/containers/SendbirdUIKitContainer.js.map +1 -1
  83. package/lib/module/contexts/PlatformServiceCtx.js +2 -1
  84. package/lib/module/contexts/PlatformServiceCtx.js.map +1 -1
  85. package/lib/module/contexts/SBUHandlersCtx.js.map +1 -1
  86. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +17 -3
  87. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  88. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js +8 -4
  89. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  90. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadMessageList.js +16 -2
  91. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadMessageList.js.map +1 -1
  92. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js +8 -3
  93. package/lib/module/domain/groupChannelThread/component/GroupChannelThreadParentMessageInfo.js.map +1 -1
  94. package/lib/module/fragments/createGroupChannelFragment.js +3 -2
  95. package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
  96. package/lib/module/fragments/createGroupChannelThreadFragment.js +3 -2
  97. package/lib/module/fragments/createGroupChannelThreadFragment.js.map +1 -1
  98. package/lib/module/hooks/useConnection.js +2 -2
  99. package/lib/module/hooks/useConnection.js.map +1 -1
  100. package/lib/module/hooks/usePushTokenRegistration.js +24 -6
  101. package/lib/module/hooks/usePushTokenRegistration.js.map +1 -1
  102. package/lib/module/platform/createFileService.native.js +2 -2
  103. package/lib/module/platform/createFileService.native.js.map +1 -1
  104. package/lib/module/platform/createPlayerService.expo.js +9 -3
  105. package/lib/module/platform/createPlayerService.expo.js.map +1 -1
  106. package/lib/module/platform/createPlayerService.native.js +13 -8
  107. package/lib/module/platform/createPlayerService.native.js.map +1 -1
  108. package/lib/module/platform/createRecorderService.native.js +9 -3
  109. package/lib/module/platform/createRecorderService.native.js.map +1 -1
  110. package/lib/module/version.js +1 -1
  111. package/lib/module/version.js.map +1 -1
  112. package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +1 -1
  113. package/lib/typescript/src/contexts/SBUHandlersCtx.d.ts +1 -1
  114. package/lib/typescript/src/version.d.ts +1 -1
  115. package/package.json +6 -6
  116. package/src/components/ChannelInput/SendInput.tsx +2 -1
  117. package/src/components/ChannelInput/VoiceMessageInput.tsx +40 -24
  118. package/src/components/ChannelInput/index.tsx +16 -6
  119. package/src/components/ChannelMessageList/index.tsx +5 -1
  120. package/src/components/ChannelThreadMessageList/index.tsx +5 -1
  121. package/src/components/FileViewer/FileViewerContent.tsx +1 -1
  122. package/src/components/FileViewer/FileViewerFooter.tsx +1 -0
  123. package/src/components/FileViewer/FileViewerHeader.tsx +1 -0
  124. package/src/components/GroupChannelMessageRenderer/index.tsx +1 -1
  125. package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +13 -5
  126. package/src/components/ReactionBottomSheets/ReactionListBottomSheet.tsx +11 -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 +19 -3
  132. package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +8 -4
  133. package/src/domain/groupChannelThread/component/GroupChannelThreadMessageList.tsx +17 -2
  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 +24 -6
  139. package/src/platform/createFileService.native.ts +2 -6
  140. package/src/platform/createPlayerService.expo.tsx +9 -3
  141. package/src/platform/createPlayerService.native.tsx +15 -8
  142. package/src/platform/createRecorderService.native.tsx +9 -3
  143. package/src/version.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["ReactNativeZoomableView","React","useLayoutEffect","useRef","useState","StyleSheet","useWindowDimensions","Box","Image","LoadingSpinner","createStyleSheet","useHeaderStyle","useUIKitTheme","useIIFE","usePlatformService","SBUUtils","FileViewerContent","_ref","type","src","topInset","bottomInset","maxZoom","minZoom","onPress","loading","setLoading","defaultHeight","mediaService","palette","source","uri","onLoadEnd","mediaViewer","createElement","ZoomableImageView","style","absoluteFill","resizeMode","zoomProps","onTouchEnd","VideoComponent","top","bottom","onLoad","styles","container","position","size","color","primary300","_ref2","props","width","height","imageSize","contentSizeProps","setContentSizeProps","contentWidth","contentHeight","safeRun","image","current","getImageSize","viewRatio","imageRatio","fitDirection","ratio","actualSize","_extends","visualTouchFeedbackEnabled","initialZoom","zIndex","flex","alignItems","justifyContent"],"sources":["FileViewerContent.tsx"],"sourcesContent":["import { ReactNativeZoomableView, ReactNativeZoomableViewProps } from '@openspacelabs/react-native-zoomable-view';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { ImageProps, ImageStyle, ImageURISource, StyleProp, StyleSheet, useWindowDimensions } from 'react-native';\n\nimport {\n Box,\n Image,\n LoadingSpinner,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { FileType, useIIFE } from '@sendbird/uikit-utils';\n\nimport { usePlatformService } from '../../hooks/useContext';\nimport SBUUtils from '../../libs/SBUUtils';\n\ntype Props = {\n type: FileType;\n src: string;\n topInset?: number;\n bottomInset?: number;\n maxZoom?: number;\n minZoom?: number;\n onPress?: () => void;\n};\nconst FileViewerContent = ({ type, src, topInset = 0, bottomInset = 0, maxZoom = 4, minZoom = 1, onPress }: Props) => {\n const [loading, setLoading] = useState(true);\n\n const { defaultHeight } = useHeaderStyle();\n const { mediaService } = usePlatformService();\n const { palette } = useUIKitTheme();\n\n const source = { uri: src };\n const onLoadEnd = () => setLoading(false);\n const mediaViewer = useIIFE(() => {\n switch (type) {\n case 'image': {\n return (\n <ZoomableImageView\n source={source}\n style={StyleSheet.absoluteFill}\n resizeMode={'contain'}\n onLoadEnd={onLoadEnd}\n zoomProps={{\n minZoom,\n maxZoom,\n onTouchEnd: onPress,\n }}\n />\n );\n }\n\n case 'video':\n case 'audio': {\n return (\n <mediaService.VideoComponent\n source={source}\n style={[StyleSheet.absoluteFill, { top: topInset, bottom: defaultHeight + bottomInset }]}\n resizeMode={'contain'}\n onLoad={onLoadEnd}\n />\n );\n }\n\n default: {\n return null;\n }\n }\n });\n\n return (\n <Box style={styles.container}>\n {mediaViewer}\n {loading && <LoadingSpinner style={{ position: 'absolute' }} size={40} color={palette.primary300} />}\n </Box>\n );\n};\n\nconst ZoomableImageView = ({\n zoomProps,\n ...props\n}: {\n source: ImageURISource;\n style: StyleProp<ImageStyle>;\n resizeMode: ImageProps['resizeMode'];\n onLoadEnd: () => void;\n zoomProps?: ReactNativeZoomableViewProps;\n}) => {\n const { width, height } = useWindowDimensions();\n\n const imageSize = useRef<{ width: number; height: number }>();\n const [contentSizeProps, setContentSizeProps] = useState<ReactNativeZoomableViewProps>({\n contentWidth: width,\n contentHeight: height,\n });\n\n useLayoutEffect(() => {\n SBUUtils.safeRun(async () => {\n if (props.source.uri) {\n const image = imageSize.current ?? (await SBUUtils.getImageSize(props.source.uri));\n imageSize.current = image;\n\n const viewRatio = width / height;\n const imageRatio = image.width / image.height;\n\n const fitDirection = viewRatio > imageRatio ? 'height' : 'width';\n const ratio = fitDirection === 'height' ? height / image.height : width / image.width;\n const actualSize = { width: image.width * ratio, height: image.height * ratio };\n\n setContentSizeProps({\n contentWidth: actualSize.width,\n contentHeight: actualSize.height,\n });\n }\n });\n }, [props.source.uri, width, height]);\n\n return (\n <ReactNativeZoomableView\n visualTouchFeedbackEnabled={false}\n style={{ width, height }}\n initialZoom={1}\n {...contentSizeProps}\n {...zoomProps}\n >\n <Image {...props} />\n </ReactNativeZoomableView>\n );\n};\n\nconst styles = createSt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AMP,MAAM,GAAGnC,gBAAgB,CAAC;EAC9BoC,SAAS,EAAE;IACT0B,MAAM,EAAE,CAAC,CAAC;IACVC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAe3D,iBAAiB"}
1
+ {"version":3,"names":["ReactNativeZoomableView","React","useLayoutEffect","useRef","useState","StyleSheet","useWindowDimensions","Box","Image","LoadingSpinner","createStyleSheet","useHeaderStyle","useUIKitTheme","useIIFE","usePlatformService","SBUUtils","FileViewerContent","_ref","type","src","topInset","bottomInset","maxZoom","minZoom","onPress","loading","setLoading","defaultHeight","mediaService","palette","source","uri","onLoadEnd","mediaViewer","createElement","ZoomableImageView","style","absoluteFill","resizeMode","zoomProps","onTouchEnd","VideoComponent","top","bottom","onLoad","styles","container","position","size","color","primary300","_ref2","props","width","height","imageSize","contentSizeProps","setContentSizeProps","contentWidth","contentHeight","safeRun","image","current","getImageSize","viewRatio","imageRatio","fitDirection","ratio","actualSize","_extends","visualTouchFeedbackEnabled","initialZoom","zIndex","flex","alignItems","justifyContent"],"sources":["FileViewerContent.tsx"],"sourcesContent":["import { ReactNativeZoomableView, ReactNativeZoomableViewProps } from '@openspacelabs/react-native-zoomable-view';\nimport React, { useLayoutEffect, useRef, useState } from 'react';\nimport { ImageProps, ImageStyle, ImageURISource, StyleProp, StyleSheet, useWindowDimensions } from 'react-native';\n\nimport {\n Box,\n Image,\n LoadingSpinner,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { FileType, useIIFE } from '@sendbird/uikit-utils';\n\nimport { usePlatformService } from '../../hooks/useContext';\nimport SBUUtils from '../../libs/SBUUtils';\n\ntype Props = {\n type: FileType;\n src: string;\n topInset?: number;\n bottomInset?: number;\n maxZoom?: number;\n minZoom?: number;\n onPress?: () => void;\n};\nconst FileViewerContent = ({ type, src, topInset = 0, bottomInset = 0, maxZoom = 4, minZoom = 1, onPress }: Props) => {\n const [loading, setLoading] = useState(true);\n\n const { defaultHeight } = useHeaderStyle();\n const { mediaService } = usePlatformService();\n const { palette } = useUIKitTheme();\n\n const source = { uri: src };\n const onLoadEnd = () => setLoading(false);\n const mediaViewer = useIIFE(() => {\n switch (type) {\n case 'image': {\n return (\n <ZoomableImageView\n source={source}\n style={StyleSheet.absoluteFill}\n resizeMode={'contain'}\n onLoadEnd={onLoadEnd}\n zoomProps={{\n minZoom,\n maxZoom,\n onTouchEnd: onPress,\n }}\n />\n );\n }\n\n case 'video':\n case 'audio': {\n return (\n <mediaService.VideoComponent\n source={source}\n style={[StyleSheet.absoluteFill, { top: topInset, bottom: defaultHeight + bottomInset }]}\n resizeMode={'contain'}\n onLoad={onLoadEnd}\n />\n );\n }\n\n default: {\n return null;\n }\n }\n });\n\n return (\n <Box style={styles.container}>\n {mediaViewer}\n {loading && <LoadingSpinner style={{ position: 'absolute' }} size={40} color={palette.primary300} />}\n </Box>\n );\n};\n\nconst ZoomableImageView = ({\n zoomProps,\n ...props\n}: {\n source: ImageURISource;\n style: StyleProp<ImageStyle>;\n resizeMode: ImageProps['resizeMode'];\n onLoadEnd: () => void;\n zoomProps?: ReactNativeZoomableViewProps;\n}) => {\n const { width, height } = useWindowDimensions();\n\n const imageSize = useRef<{ width: number; height: number }>();\n const [contentSizeProps, setContentSizeProps] = useState<ReactNativeZoomableViewProps>({\n contentWidth: width,\n contentHeight: height,\n });\n\n useLayoutEffect(() => {\n SBUUtils.safeRun(async () => {\n if (props.source.uri) {\n const image = imageSize.current ?? (await SBUUtils.getImageSize(props.source.uri));\n imageSize.current = image;\n\n const viewRatio = width / height;\n const imageRatio = image.width / image.height;\n\n const fitDirection = viewRatio > imageRatio ? 'height' : 'width';\n const ratio = fitDirection === 'height' ? height / image.height : width / image.width;\n const actualSize = { width: image.width * ratio, height: image.height * ratio };\n\n setContentSizeProps({\n contentWidth: actualSize.width,\n contentHeight: actualSize.height,\n });\n }\n });\n }, [props.source.uri, width, height]);\n\n return (\n <ReactNativeZoomableView\n visualTouchFeedbackEnabled={false}\n style={{ width, height }}\n initialZoom={1}\n {...contentSizeProps}\n {...zoomProps}\n >\n <Image {...props} />\n </ReactNativeZoomableView>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n zIndex: 0,\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default FileViewerContent;\n"],"mappings":";AAAA,SAASA,uBAAuB,QAAsC,2CAA2C;AACjH,OAAOC,KAAK,IAAIC,eAAe,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAChE,SAA4DC,UAAU,EAAEC,mBAAmB,QAAQ,cAAc;AAEjH,SACEC,GAAG,EACHC,KAAK,EACLC,cAAc,EACdC,gBAAgB,EAChBC,cAAc,EACdC,aAAa,QACR,yCAAyC;AAChD,SAAmBC,OAAO,QAAQ,uBAAuB;AAEzD,SAASC,kBAAkB,QAAQ,wBAAwB;AAC3D,OAAOC,QAAQ,MAAM,qBAAqB;AAW1C,MAAMC,iBAAiB,GAAGC,IAAA,IAA4F;EAAA,IAA3F;IAAEC,IAAI;IAAEC,GAAG;IAAEC,QAAQ,GAAG,CAAC;IAAEC,WAAW,GAAG,CAAC;IAAEC,OAAO,GAAG,CAAC;IAAEC,OAAO,GAAG,CAAC;IAAEC;EAAe,CAAC,GAAAP,IAAA;EAC/G,MAAM,CAACQ,OAAO,EAAEC,UAAU,CAAC,GAAGtB,QAAQ,CAAC,IAAI,CAAC;EAE5C,MAAM;IAAEuB;EAAc,CAAC,GAAGhB,cAAc,EAAE;EAC1C,MAAM;IAAEiB;EAAa,CAAC,GAAGd,kBAAkB,EAAE;EAC7C,MAAM;IAAEe;EAAQ,CAAC,GAAGjB,aAAa,EAAE;EAEnC,MAAMkB,MAAM,GAAG;IAAEC,GAAG,EAAEZ;EAAI,CAAC;EAC3B,MAAMa,SAAS,GAAGA,CAAA,KAAMN,UAAU,CAAC,KAAK,CAAC;EACzC,MAAM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AAK;MAAEC;IAAO,CAAE;IACzBiB,WAAW,EAAE;EAAE,GACXf,gBAAgB,EAChBjB,SAAS,gBAEbtC,KAAA,CAAAiC,aAAA,CAAC1B,KAAK,EAAK4C,KAAK,CAAI,CACI;AAE9B,CAAC;AAED,MAAMP,MAAM,GAAGnC,gBAAgB,CAAC;EAC9BoC,SAAS,EAAE;IACT0B,MAAM,EAAE,CAAC;IACTC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAe3D,iBAAiB"}
@@ -49,6 +49,7 @@ const FileViewerFooter = _ref => {
49
49
  };
50
50
  const styles = createStyleSheet({
51
51
  container: {
52
+ zIndex: 1,
52
53
  position: 'absolute',
53
54
  left: 0,
54
55
  right: 0,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useSafeAreaInsets","Box","Icon","PressBox","createStyleSheet","useHeaderStyle","useUIKitTheme","FileViewerFooter","_ref","bottomInset","deleteShown","onPressDelete","onPressDownload","palette","defaultHeight","left","right","createElement","style","styles","container","paddingLeft","paddingHorizontal","paddingRight","paddingBottom","height","backgroundColor","overlay01","activeOpacity","onPress","buttonContainer","icon","size","color","onBackgroundDark01","titleContainer","disabled","position","bottom","flexDirection","alignItems","justifyContent","width","flex"],"sources":["FileViewerFooter.tsx"],"sourcesContent":["import React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Box,\n Icon,\n PressBox,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\n\ntype Props = {\n bottomInset: number;\n deleteShown: boolean;\n onPressDelete: () => void;\n onPressDownload: () => void;\n};\n\nconst FileViewerFooter = ({ bottomInset, deleteShown, onPressDelete, onPressDownload }: Props) => {\n const { palette } = useUIKitTheme();\n const { defaultHeight } = useHeaderStyle();\n const { left, right } = useSafeAreaInsets();\n\n return (\n <Box\n style={[\n styles.container,\n {\n paddingLeft: styles.container.paddingHorizontal + left,\n paddingRight: styles.container.paddingHorizontal + right,\n paddingBottom: bottomInset,\n height: defaultHeight + bottomInset,\n backgroundColor: palette.overlay01,\n },\n ]}\n >\n <PressBox activeOpacity={0.75} onPress={onPressDownload} style={styles.buttonContainer}>\n <Icon icon={'download'} size={24} color={palette.onBackgroundDark01} />\n </PressBox>\n <Box style={styles.titleContainer} />\n <PressBox activeOpacity={0.75} onPress={onPressDelete} style={styles.buttonContainer} disabled={!deleteShown}>\n {deleteShown && <Icon icon={'delete'} size={24} color={palette.onBackgroundDark01} />}\n </PressBox>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n buttonContainer: {\n width: 32,\n height: 32,\n alignItems: 'center',\n justifyContent: 'center',\n },\n titleContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default FileViewerFooter;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SACEC,GAAG,EACHC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,aAAa,QACR,yCAAyC;AAShD,MAAMC,gBAAgB,GAAGC,IAAA,IAAyE;EAAA,IAAxE;IAAEC,WAAW;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAuB,CAAC,GAAAJ,IAAA;EAC3F,MAAM;IAAEK;EAAQ,CAAC,GAAGP,aAAa,EAAE;EACnC,MAAM;IAAEQ;EAAc,CAAC,GAAGT,cAAc,EAAE;EAC1C,MAAM;IAAEU,IAAI;IAAEC;EAAM,CAAC,GAAGhB,iBAAiB,EAAE;EAE3C,oBACED,KAAA,CAAAkB,aAAA,CAAChB,GAAG;IACFiB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,WAAW,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Q,eAAe,EAAE;IACfY,KAAK,EAAE,EAAE;IACTjB,MAAM,EAAE,EAAE;IACVe,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDN,cAAc,EAAE;IACdQ,IAAI,EAAE,CAAC;IACPH,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC;AAEF,eAAelC,gBAAgB"}
1
+ {"version":3,"names":["React","useSafeAreaInsets","Box","Icon","PressBox","createStyleSheet","useHeaderStyle","useUIKitTheme","FileViewerFooter","_ref","bottomInset","deleteShown","onPressDelete","onPressDownload","palette","defaultHeight","left","right","createElement","style","styles","container","paddingLeft","paddingHorizontal","paddingRight","paddingBottom","height","backgroundColor","overlay01","activeOpacity","onPress","buttonContainer","icon","size","color","onBackgroundDark01","titleContainer","disabled","zIndex","position","bottom","flexDirection","alignItems","justifyContent","width","flex"],"sources":["FileViewerFooter.tsx"],"sourcesContent":["import React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Box,\n Icon,\n PressBox,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\n\ntype Props = {\n bottomInset: number;\n deleteShown: boolean;\n onPressDelete: () => void;\n onPressDownload: () => void;\n};\n\nconst FileViewerFooter = ({ bottomInset, deleteShown, onPressDelete, onPressDownload }: Props) => {\n const { palette } = useUIKitTheme();\n const { defaultHeight } = useHeaderStyle();\n const { left, right } = useSafeAreaInsets();\n\n return (\n <Box\n style={[\n styles.container,\n {\n paddingLeft: styles.container.paddingHorizontal + left,\n paddingRight: styles.container.paddingHorizontal + right,\n paddingBottom: bottomInset,\n height: defaultHeight + bottomInset,\n backgroundColor: palette.overlay01,\n },\n ]}\n >\n <PressBox activeOpacity={0.75} onPress={onPressDownload} style={styles.buttonContainer}>\n <Icon icon={'download'} size={24} color={palette.onBackgroundDark01} />\n </PressBox>\n <Box style={styles.titleContainer} />\n <PressBox activeOpacity={0.75} onPress={onPressDelete} style={styles.buttonContainer} disabled={!deleteShown}>\n {deleteShown && <Icon icon={'delete'} size={24} color={palette.onBackgroundDark01} />}\n </PressBox>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n zIndex: 1,\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n buttonContainer: {\n width: 32,\n height: 32,\n alignItems: 'center',\n justifyContent: 'center',\n },\n titleContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n});\n\nexport default FileViewerFooter;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SACEC,GAAG,EACHC,IAAI,EACJC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,aAAa,QACR,yCAAyC;AAShD,MAAMC,gBAAgB,GAAGC,IAAA,IAAyE;EAAA,IAAxE;IAAEC,WAAW;IAAEC,WAAW;IAAEC,aAAa;IAAEC;EAAuB,CAAC,GAAAJ,IAAA;EAC3F,MAAM;IAAEK;EAAQ,CAAC,GAAGP,aAAa,EAAE;EACnC,MAAM;IAAEQ;EAAc,CAAC,GAAGT,cAAc,EAAE;EAC1C,MAAM;IAAEU,IAAI;IAAEC;EAAM,CAAC,GAAGhB,iBAAiB,EAAE;EAE3C,oBACED,KAAA,CAAAkB,aAAA,CAAChB,GAAG;IACFiB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,WAAW,EAAEF,MAAM,CAACC,SAAS,CAACE,iBAAiB,GAAGP,IAAI;MACtDQ,YAAY,EAAEJ,MAAM,CAACC,SAAS,CAACE,iBAAiB,GAAGN,KAAK;MACxDQ,aAAa,EAAEf,WAAW;MAC1BgB,MAAM,EAAEX,aAAa,GAAGL,WAAW;MACnCiB,eAAe,EAAEb,OAAO,CAACc;IAC3B,CAAC;EACD,g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CAAC,CAAC;AAEF,eAAenC,gBAAgB"}
@@ -57,6 +57,7 @@ const FileViewerHeader = _ref => {
57
57
  };
58
58
  const styles = createStyleSheet({
59
59
  container: {
60
+ zIndex: 1,
60
61
  top: 0,
61
62
  left: 0,
62
63
  right: 0,
@@ -1 +1 @@
1
- {"version":3,"names":["React","useSafeAreaInsets","Box","Icon","PressBox","Text","createStyleSheet","useHeaderStyle","useUIKitTheme","truncate","FileViewerHeader","_ref","headerShown","topInset","onClose","subtitle","title","palette","defaultHeight","left","right","createElement","style","styles","container","paddingLeft","paddingHorizontal","paddingRight","paddingTop","height","backgroundColor","overlay01","activeOpacity","onPress","buttonContainer","icon","size","color","onBackgroundDark01","titleContainer","h2","numberOfLines","mode","maxLen","caption2","top","position","flexDirection","alignItems","justifyContent","width","flex","marginBottom"],"sources":["FileViewerHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Box,\n Icon,\n PressBox,\n Text,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { truncate } from '@sendbird/uikit-utils';\n\ntype Props = {\n headerShown?: boolean;\n topInset: number;\n onClose: () => void;\n title: string;\n subtitle: string;\n};\n\nconst FileViewerHeader = ({ headerShown = true, topInset, onClose, subtitle, title }: Props) => {\n const { palette } = useUIKitTheme();\n const { defaultHeight } = useHeaderStyle();\n const { left, right } = useSafeAreaInsets();\n\n if (!headerShown) return null;\n\n return (\n <Box\n style={[\n styles.container,\n {\n paddingLeft: styles.container.paddingHorizontal + left,\n paddingRight: styles.container.paddingHorizontal + right,\n paddingTop: topInset,\n height: defaultHeight + topInset,\n backgroundColor: palette.overlay01,\n },\n ]}\n >\n <PressBox activeOpacity={0.75} onPress={onClose} style={styles.buttonContainer}>\n <Icon icon={'close'} size={24} color={palette.onBackgroundDark01} />\n </PressBox>\n <Box style={styles.titleContainer}>\n <Text h2 color={palette.onBackgroundDark01} style={styles.title} numberOfLines={1}>\n {truncate(title, { mode: 'mid', maxLen: 18 })}\n </Text>\n <Text caption2 color={palette.onBackgroundDark01} numberOfLines={1}>\n {subtitle}\n </Text>\n </Box>\n <Box style={styles.buttonContainer} />\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n top: 0,\n left: 0,\n right: 0,\n position: 'absolute',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n buttonContainer: {\n width: 32,\n height: 32,\n alignItems: 'center',\n justifyContent: 'center',\n },\n titleContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n title: {\n marginBottom: 2,\n },\n});\n\nexport default FileViewerHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SACEC,GAAG,EACHC,IAAI,EACJC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,cAAc,EACdC,aAAa,QACR,yCAAyC;AAChD,SAASC,QAAQ,QAAQ,uBAAuB;AAUhD,MAAMC,gBAAgB,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,WAAW,GAAG,IAAI;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAAL,IAAA;EACzF,MAAM;IAAEM;EAAQ,CAAC,GAAGT,aAAa,EAAE;EACnC,MAAM;IAAEU;EAAc,CAAC,GAAGX,cAAc,EAAE;EAC1C,MAAM;IAAEY,IAAI;IAAEC;EAAM,CAAC,GAAGnB,iBAAiB,EAAE;EAE3C,IAAI,CAACW,WAAW,EAAE,OAAO,IAAI;EAE7B,oBACEZ,KAAA,CAAAqB,aAAA,CAACnB,GAAG;IACFoB,KAAK,EAAE,CACLC,MAAM,CAACC,SAAS,EAChB;MACEC,WAAW,EAAEF,MAAM,CAACC,SAAS,CAACE,iBAAiB,GAAGP,IAAI;MACtDQ,YAAY,EAAEJ,MAAM,CA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AK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBvB,iBAAiB,EAAE;EACrB,CAAC;EACDQ,eAAe,EAAE;IACfgB,KAAK,EAAE,EAAE;IACTrB,MAAM,EAAE,EAAE;IACVmB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDV,cAAc,EAAE;IACdY,IAAI,EAAE,CAAC;IACPH,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDjC,KAAK,EAAE;IACLoC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAe1C,gBAAgB"}
1
+ {"version":3,"names":["React","useSafeAreaInsets","Box","Icon","PressBox","Text","createStyleSheet","useHeaderStyle","useUIKitTheme","truncate","FileViewerHeader","_ref","headerShown","topInset","onClose","subtitle","title","palette","defaultHeight","left","right","createElement","style","styles","container","paddingLeft","paddingHorizontal","paddingRight","paddingTop","height","backgroundColor","overlay01","activeOpacity","onPress","buttonContainer","icon","size","color","onBackgroundDark01","titleContainer","h2","numberOfLines","mode","maxLen","caption2","zIndex","top","position","flexDirection","alignItems","justifyContent","width","flex","marginBottom"],"sources":["FileViewerHeader.tsx"],"sourcesContent":["import React from 'react';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport {\n Box,\n Icon,\n PressBox,\n Text,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport { truncate } from '@sendbird/uikit-utils';\n\ntype Props = {\n headerShown?: boolean;\n topInset: number;\n onClose: () => void;\n title: string;\n subtitle: string;\n};\n\nconst FileViewerHeader = ({ headerShown = true, topInset, onClose, subtitle, title }: Props) => {\n const { palette } = useUIKitTheme();\n const { defaultHeight } = useHeaderStyle();\n const { left, right } = useSafeAreaInsets();\n\n if (!headerShown) return null;\n\n return (\n <Box\n style={[\n styles.container,\n {\n paddingLeft: styles.container.paddingHorizontal + left,\n paddingRight: styles.container.paddingHorizontal + right,\n paddingTop: topInset,\n height: defaultHeight + topInset,\n backgroundColor: palette.overlay01,\n },\n ]}\n >\n <PressBox activeOpacity={0.75} onPress={onClose} style={styles.buttonContainer}>\n <Icon icon={'close'} size={24} color={palette.onBackgroundDark01} />\n </PressBox>\n <Box style={styles.titleContainer}>\n <Text h2 color={palette.onBackgroundDark01} style={styles.title} numberOfLines={1}>\n {truncate(title, { mode: 'mid', maxLen: 18 })}\n </Text>\n <Text caption2 color={palette.onBackgroundDark01} numberOfLines={1}>\n {subtitle}\n </Text>\n </Box>\n <Box style={styles.buttonContainer} />\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n zIndex: 1,\n top: 0,\n left: 0,\n right: 0,\n position: 'absolute',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingHorizontal: 12,\n },\n buttonContainer: {\n width: 32,\n height: 32,\n alignItems: 'center',\n justifyContent: 'center',\n },\n titleContainer: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n title: {\n marginBottom: 2,\n },\n});\n\nexport default FileViewerHeader;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,iBAAiB,QAAQ,gCAAgC;AAElE,SACEC,GAAG,EACHC,IAAI,EACJC,QAAQ,EACRC,IAAI,EACJC,gBAAgB,EAChBC,cAAc,EACdC,aAAa,QACR,yCAAyC;AAChD,SAASC,QAAQ,QAAQ,uBAAuB;AAUhD,MAAMC,gBAAgB,GAAGC,IAAA,IAAuE;EAAA,IAAtE;IAAEC,WAAW,GAAG,IAAI;IAAEC,QAAQ;IAAEC,OAAO;IAAEC,QAAQ;IAAEC;EAAa,CAAC,GAAAL,IAAA;EACzF,MAAM;IAAEM;EAAQ,CAAC,GAAGT,aAAa,EAAE;EACnC,MAAM;IAAEU;EAAc,CAAC,GAAGX,cAAc,EAAE;EAC1C,MAAM;IAAEY,IAAI;IAAEC;EAAM,CAAC,GAAGnB,iBAAiB,EAAE;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K,EAAEC,MAAM,CAACW;EAAgB,EAAG,CAClC;AAEV,CAAC;AAED,MAAMX,MAAM,GAAGjB,gBAAgB,CAAC;EAC9BkB,SAAS,EAAE;IACTqB,MAAM,EAAE,CAAC;IACTC,GAAG,EAAE,CAAC;IACN3B,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACR2B,QAAQ,EAAE,UAAU;IACpBC,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBxB,iBAAiB,EAAE;EACrB,CAAC;EACDQ,eAAe,EAAE;IACfiB,KAAK,EAAE,EAAE;IACTtB,MAAM,EAAE,EAAE;IACVoB,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDX,cAAc,EAAE;IACda,IAAI,EAAE,CAAC;IACPH,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDlC,KAAK,EAAE;IACLqC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAEF,eAAe3C,gBAAgB"}
@@ -278,7 +278,7 @@ const GroupChannelMessageRenderer = _ref => {
278
278
  onUnsubscribeStatus: voiceMessageStatusManager.unsubscribe,
279
279
  onUnmount: () => {
280
280
  if (isVoiceMessage(message) && playerService.uri === message.url) {
281
- resetPlayer();
281
+ resetPlayer().catch(_ => {});
282
282
  }
283
283
  }
284
284
  }, messageProps));
@@ -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,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,C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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,c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vC,IAAIoL,WAAW,CAAC/H,MAAM,KAAK,CAAC,EAAE,OAAO,KAAK;IAC1C,IAAI,CAACtB,SAAS,CAACU,KAAK,CAACC,YAAY,CAAC1B,OAAO,CAACuK,qBAAqB,EAAE,OAAO,KAAK;IAC7E,IAAI,CAACxJ,SAAS,CAACU,KAAK,CAACC,YAAY,CAAC1B,OAAO,CAACwK,oBAAoB,CAACC,GAAG,CAAClL,mBAAmB,CAACmL,MAAM,CAAC,EAAE,OAAO,KAAK;IAC5G,OAAO,IAAI;EACb,CAAC,CAAC;EAEFvM,SAAS,CAAC,MAAM;IACd,IAAImM,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,oBACErM,KAAA,CAAAqE,aAAA,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"}
@@ -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,15 @@ 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 = (message, key) => {
65
+ return reacted ? channel.deleteReaction(message, key) : channel.addReaction(message, key);
66
+ };
67
+ await action(message, key).catch(error => {
68
+ Logger.warn('Failed to reaction', error);
69
+ }).finally(() => {
70
+ onClose();
71
+ });
66
72
  };
67
73
  return /*#__PURE__*/React.createElement(Pressable, {
68
74
  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,IAAI,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,aAAa,QAAQ,yCAAyC;AACtG,SAAmDC,gBAAgB,QAAQ,uBAAuB;AAElG,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,GAAGf,aAAa,EAAE;EAClC,MAAMgB,SAAS,GAAGf,gBAAgB,CAAC,0BAA0B,CAAC;EAC9D,MAAM;IAAEgB,IAAI;IAAEC;EAAM,CAAC,GAAGvB,iBAAiB,EAAE;EAE3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,CAAC;IACxC,CAAE;IACF6B,KAAK,EAAEgC,KAAA;MAAA,IAAC;QAAET;MAAQ,CAAC,GAAAS,KAAA;MAAA,OAAK,CACtB/B,MAAM,CAACuB,MAAM,EACb;QAAEC,eAAe,EAAEF,OAAO,GAAG5B,KAAK,CAAC+B,QAAQ,CAACC,UAAU,GAAGhC,KAAK,CAACiC,OAAO,CAACD;MAAW,CAAC,CACpF;IAAA;EAAC,gBAEFxE,KAAA,CAAA4C,aAAA,CAACvC,IAAI;IAACyE,IAAI,EAAE,YAAa;IAACjC,KAAK,EAAEC,MAAM,CAAC8B,KAAM;IAACpC,KAAK,EAAEjB,MAAM,CAACwD;EAAe,EAAG,CACrE,CACP;AAEX,CAAC;AAED,MAAMjC,MAAM,GAAGvC,gBAAgB,CAAC;EAC9BwC,SAAS,EAAE;IACTiC,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,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 = (message: BaseMessage, key: string) => {\n return reacted ? channel.deleteReaction(message, key) : channel.addReaction(message, key);\n };\n\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,IA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dC,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,16 @@ 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 = (message, key) => {
78
+ return reacted ? channel.deleteReaction(message, key) : channel.addReaction(message, key);
79
+ };
80
+ action(message, key).catch(error => {
81
+ Logger.warn('Failed to reaction', error);
82
+ });
77
83
  }
78
- onClose();
84
+ await onClose();
79
85
  },
80
86
  style: _ref3 => {
81
87
  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"],"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;AAEvG,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,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C0C,MAAM,EACb;YAAErC,eAAe,EAAE8B,OAAO,IAAIM,OAAO,GAAGjD,KAAK,CAACmD,QAAQ,CAACnC,UAAU,GAAGhB,KAAK,CAACoD,OAAO,CAACpC;UAAW,CAAC,CAC/F;QAAA;MAAC,gBAEF5C,KAAA,CAAAgC,aAAA,CAAC1B,KAAK;QAAC2E,MAAM,EAAE;UAAEC,GAAG,EAAEpB;QAAI,CAAE;QAACxB,KAAK,EAAEF,MAAM,CAAC+C;MAAM,EAAG,CAC1C,CACP;IAEX;EAAE,EACF,CACG,CACD;AAEZ,CAAC;AAED,MAAM/C,MAAM,GAAG5B,gBAAgB,CAAC;EAC9B+B,SAAS,EAAE;IACT6C,QAAQ,EAAE,QAAQ;IAClBC,mBAAmB,EAAE,CAAC;IACtBC,oBAAoB,EAAE,CAAC;IACvBC,UAAU,EAAE,EAAE;IACdzC,iBAAiB,EAAE,EAAE;IACrB0C,aAAa,EAAE;EACjB,CAAC;EACDnD,KAAK,EAAE;IACLoD,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDnC,QAAQ,EAAE;IACRpC,KAAK,EAAE,MAAM;IACbqE,aAAa,EAAE,QAAQ;IACvBE,cAAc,EAAE;EAClB,CAAC;EACDlB,SAAS,EAAE;IACTrD,KAAK,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 type { BaseMessage } from '@sendbird/chat/message';\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 = (message: BaseMessage, key: string) => {\n return reacted ? channel.deleteReaction(message, key) : channel.addReaction(message, key);\n };\n\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;AAGlE,SAASC,KAAK,EAAEC,KAAK,EAAEC,gBAAgB,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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 }\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,qCA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AAY,EAAI;MAC5E;IACA,KAAK,gBAAgB;MAAE;QACrB,oBAAOlC,KAAA,CAAAuF,aAAA,CAACvE,yBAAyB,EAAAwE,QAAA,KAAK7B,gBAAgB,EAAMzB,YAAY,EAAI;MAC9E;IACA,KAAK,MAAM;IACX,KAAK,YAAY;MAAE;QACjB,oBAAOlC,KAAA,CAAAuF,aAAA,CAAC5E,uBAAuB,EAAKuB,YAAY,CAAI;MACtD;IACA,KAAK,YAAY;MAAE;QACjB,oBACElC,KAAA,CAAAuF,aAAA,CAAC1E,4BAA4B,EAAA2E,QAAA;UAC3BY,6BAA6B,EAAG1D,GAAG,IAAKjB,YAAY,CAAC4E,iBAAiB,CAAC;YAAEjE,GAAG,EAAEM,GAAG;YAAE4D,SAAS,EAAE;UAAK,CAAC;QAAE,GAClGpE,YAAY,EAChB;MAEN;IACA,KAAK,YAAY;MAAE;QACjB,oBAAOlC,KAAA,CAAAuF,aAAA,CAAC3E,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;YACf;UACF;QAAE,GACEM,YAAY,EAChB;MAEN;IACA;MAAS;QACP,OAAO,IAAI;MACb;EAAC;AAEL,CAAC;AAED,4BAAelC,KAAK,CAACyG,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;IAAEsB,YAAY;IAAEC;EAAc,CAAC,GAAGlB,kBAAkB,EAAE;EAC5D,MAAMmB,aAAa,GAAGT,KAAK,CAACS,aAAa;EAEzC,MAAMC,WAAW,GAAG,MAAAA,CAAA,KAAY;IAC9BR,kBAAkB,CAACS,OAAO,CAACC,OAAO,CAAEC,WAAW,IAAK;MAClD,IAA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,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, {