@sendbird/uikit-react-native 3.3.0 → 3.4.1

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 (154) hide show
  1. package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
  2. package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
  3. package/lib/commonjs/components/FileViewer/FileViewerContent.js +140 -0
  4. package/lib/commonjs/components/FileViewer/FileViewerContent.js.map +1 -0
  5. package/lib/commonjs/components/FileViewer/FileViewerFooter.js +82 -0
  6. package/lib/commonjs/components/FileViewer/FileViewerFooter.js.map +1 -0
  7. package/lib/commonjs/components/FileViewer/FileViewerHeader.js +93 -0
  8. package/lib/commonjs/components/FileViewer/FileViewerHeader.js.map +1 -0
  9. package/lib/commonjs/components/FileViewer/index.js +133 -0
  10. package/lib/commonjs/components/FileViewer/index.js.map +1 -0
  11. package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  12. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +10 -9
  13. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  14. package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
  15. package/lib/commonjs/domain/groupChannelBannedUsers/types.js.map +1 -1
  16. package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
  17. package/lib/commonjs/domain/groupChannelModeration/types.js.map +1 -1
  18. package/lib/commonjs/domain/groupChannelMutedMembers/types.js.map +1 -1
  19. package/lib/commonjs/domain/groupChannelNotifications/types.js.map +1 -1
  20. package/lib/commonjs/domain/groupChannelOperators/types.js.map +1 -1
  21. package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
  22. package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
  23. package/lib/commonjs/domain/messageSearch/component/MessageSearchHeader.js +4 -1
  24. package/lib/commonjs/domain/messageSearch/component/MessageSearchHeader.js.map +1 -1
  25. package/lib/commonjs/domain/messageSearch/types.js.map +1 -1
  26. package/lib/commonjs/domain/openChannel/types.js.map +1 -1
  27. package/lib/commonjs/domain/openChannelBannedUsers/types.js.map +1 -1
  28. package/lib/commonjs/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js +4 -2
  29. package/lib/commonjs/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js.map +1 -1
  30. package/lib/commonjs/domain/openChannelCreate/types.js.map +1 -1
  31. package/lib/commonjs/domain/openChannelList/types.js.map +1 -1
  32. package/lib/commonjs/domain/openChannelModeration/types.js.map +1 -1
  33. package/lib/commonjs/domain/openChannelMutedParticipants/types.js.map +1 -1
  34. package/lib/commonjs/domain/openChannelOperators/types.js.map +1 -1
  35. package/lib/commonjs/domain/openChannelSettings/types.js.map +1 -1
  36. package/lib/commonjs/domain/openChannelUserList/types.js.map +1 -1
  37. package/lib/commonjs/fragments/createGroupChannelFragment.js +32 -16
  38. package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
  39. package/lib/commonjs/fragments/createGroupChannelListFragment.js +25 -11
  40. package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
  41. package/lib/commonjs/types.js.map +1 -1
  42. package/lib/commonjs/version.js +1 -1
  43. package/lib/commonjs/version.js.map +1 -1
  44. package/lib/module/components/ChannelInput/index.js.map +1 -1
  45. package/lib/module/components/ChannelMessageList/index.js.map +1 -1
  46. package/lib/module/components/FileViewer/FileViewerContent.js +130 -0
  47. package/lib/module/components/FileViewer/FileViewerContent.js.map +1 -0
  48. package/lib/module/components/FileViewer/FileViewerFooter.js +74 -0
  49. package/lib/module/components/FileViewer/FileViewerFooter.js.map +1 -0
  50. package/lib/module/components/FileViewer/FileViewerHeader.js +85 -0
  51. package/lib/module/components/FileViewer/FileViewerHeader.js.map +1 -0
  52. package/lib/module/components/FileViewer/index.js +123 -0
  53. package/lib/module/components/FileViewer/index.js.map +1 -0
  54. package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
  55. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +10 -9
  56. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  57. package/lib/module/domain/groupChannel/types.js.map +1 -1
  58. package/lib/module/domain/groupChannelBannedUsers/types.js.map +1 -1
  59. package/lib/module/domain/groupChannelList/types.js.map +1 -1
  60. package/lib/module/domain/groupChannelModeration/types.js.map +1 -1
  61. package/lib/module/domain/groupChannelMutedMembers/types.js.map +1 -1
  62. package/lib/module/domain/groupChannelNotifications/types.js.map +1 -1
  63. package/lib/module/domain/groupChannelOperators/types.js.map +1 -1
  64. package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
  65. package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
  66. package/lib/module/domain/messageSearch/component/MessageSearchHeader.js +4 -1
  67. package/lib/module/domain/messageSearch/component/MessageSearchHeader.js.map +1 -1
  68. package/lib/module/domain/messageSearch/types.js.map +1 -1
  69. package/lib/module/domain/openChannel/types.js.map +1 -1
  70. package/lib/module/domain/openChannelBannedUsers/types.js.map +1 -1
  71. package/lib/module/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js +4 -2
  72. package/lib/module/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js.map +1 -1
  73. package/lib/module/domain/openChannelCreate/types.js.map +1 -1
  74. package/lib/module/domain/openChannelList/types.js.map +1 -1
  75. package/lib/module/domain/openChannelModeration/types.js.map +1 -1
  76. package/lib/module/domain/openChannelMutedParticipants/types.js.map +1 -1
  77. package/lib/module/domain/openChannelOperators/types.js.map +1 -1
  78. package/lib/module/domain/openChannelSettings/types.js.map +1 -1
  79. package/lib/module/domain/openChannelUserList/types.js.map +1 -1
  80. package/lib/module/fragments/createGroupChannelFragment.js +33 -17
  81. package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
  82. package/lib/module/fragments/createGroupChannelListFragment.js +26 -12
  83. package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
  84. package/lib/module/types.js.map +1 -1
  85. package/lib/module/version.js +1 -1
  86. package/lib/module/version.js.map +1 -1
  87. package/lib/typescript/src/components/ChannelInput/index.d.ts +2 -2
  88. package/lib/typescript/src/components/ChannelMessageList/index.d.ts +5 -6
  89. package/lib/typescript/src/components/FileViewer/FileViewerContent.d.ts +13 -0
  90. package/lib/typescript/src/components/FileViewer/FileViewerFooter.d.ts +9 -0
  91. package/lib/typescript/src/components/FileViewer/FileViewerHeader.d.ts +10 -0
  92. package/lib/typescript/src/components/{FileViewer.d.ts → FileViewer/index.d.ts} +5 -1
  93. package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +1 -1
  94. package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +2 -2
  95. package/lib/typescript/src/domain/groupChannel/types.d.ts +15 -4
  96. package/lib/typescript/src/domain/groupChannelBannedUsers/types.d.ts +1 -1
  97. package/lib/typescript/src/domain/groupChannelList/types.d.ts +13 -2
  98. package/lib/typescript/src/domain/groupChannelModeration/types.d.ts +1 -1
  99. package/lib/typescript/src/domain/groupChannelMutedMembers/types.d.ts +1 -1
  100. package/lib/typescript/src/domain/groupChannelNotifications/types.d.ts +1 -1
  101. package/lib/typescript/src/domain/groupChannelOperators/types.d.ts +1 -1
  102. package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +1 -1
  103. package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +3 -2
  104. package/lib/typescript/src/domain/messageSearch/types.d.ts +1 -1
  105. package/lib/typescript/src/domain/openChannel/types.d.ts +1 -1
  106. package/lib/typescript/src/domain/openChannelBannedUsers/types.d.ts +1 -1
  107. package/lib/typescript/src/domain/openChannelCreate/types.d.ts +1 -1
  108. package/lib/typescript/src/domain/openChannelList/types.d.ts +1 -1
  109. package/lib/typescript/src/domain/openChannelModeration/types.d.ts +1 -1
  110. package/lib/typescript/src/domain/openChannelMutedParticipants/types.d.ts +1 -1
  111. package/lib/typescript/src/domain/openChannelOperators/types.d.ts +1 -1
  112. package/lib/typescript/src/domain/openChannelSettings/types.d.ts +1 -1
  113. package/lib/typescript/src/domain/openChannelUserList/types.d.ts +3 -3
  114. package/lib/typescript/src/types.d.ts +4 -4
  115. package/lib/typescript/src/version.d.ts +1 -1
  116. package/package.json +8 -7
  117. package/src/components/ChannelInput/index.tsx +2 -2
  118. package/src/components/ChannelMessageList/index.tsx +5 -11
  119. package/src/components/FileViewer/FileViewerContent.tsx +141 -0
  120. package/src/components/FileViewer/FileViewerFooter.tsx +73 -0
  121. package/src/components/FileViewer/FileViewerHeader.tsx +86 -0
  122. package/src/components/FileViewer/index.tsx +139 -0
  123. package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +3 -2
  124. package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +7 -6
  125. package/src/domain/groupChannel/types.ts +16 -4
  126. package/src/domain/groupChannelBannedUsers/types.ts +1 -1
  127. package/src/domain/groupChannelList/types.ts +13 -2
  128. package/src/domain/groupChannelModeration/types.ts +1 -1
  129. package/src/domain/groupChannelMutedMembers/types.ts +1 -1
  130. package/src/domain/groupChannelNotifications/types.ts +1 -1
  131. package/src/domain/groupChannelOperators/types.ts +1 -1
  132. package/src/domain/groupChannelSettings/types.ts +1 -1
  133. package/src/domain/groupChannelUserList/types.ts +2 -2
  134. package/src/domain/messageSearch/component/MessageSearchHeader.tsx +4 -1
  135. package/src/domain/messageSearch/types.ts +1 -1
  136. package/src/domain/openChannel/types.ts +1 -1
  137. package/src/domain/openChannelBannedUsers/types.ts +1 -1
  138. package/src/domain/openChannelCreate/component/OpenChannelCreateProfileInput.tsx +4 -2
  139. package/src/domain/openChannelCreate/types.ts +1 -1
  140. package/src/domain/openChannelList/types.ts +1 -1
  141. package/src/domain/openChannelModeration/types.ts +1 -1
  142. package/src/domain/openChannelMutedParticipants/types.ts +1 -1
  143. package/src/domain/openChannelOperators/types.ts +1 -1
  144. package/src/domain/openChannelSettings/types.ts +1 -1
  145. package/src/domain/openChannelUserList/types.ts +4 -3
  146. package/src/fragments/createGroupChannelFragment.tsx +35 -17
  147. package/src/fragments/createGroupChannelListFragment.tsx +27 -9
  148. package/src/types.ts +2 -2
  149. package/src/version.ts +1 -1
  150. package/lib/commonjs/components/FileViewer.js +0 -300
  151. package/lib/commonjs/components/FileViewer.js.map +0 -1
  152. package/lib/module/components/FileViewer.js +0 -291
  153. package/lib/module/components/FileViewer.js.map +0 -1
  154. package/src/components/FileViewer.tsx +0 -288
@@ -1 +1 @@
1
- {"version":3,"names":["React","Avatar","Box","PressBox","TextInput","createStyleSheet","useBottomSheet","useToast","useUIKitTheme","Icon","ifThenOr","useSafeAreaPadding","useLocalization","usePlatformService","SBUError","SBUUtils","OpenChannelCreateProfileInput","_ref","channelName","channelCoverFile","onChangeChannelName","onChangeChannelCoverFile","toast","openSheet","palette","colors","typography","safeArea","STRINGS","fileService","onPressPhotoButton","sheetItems","title","OPEN_CHANNEL_CREATE","DIALOG_IMAGE_MENU_CAMERA","onPress","mediaFile","openCamera","mediaType","onOpenFailure","error","code","CODE","ERR_PERMISSIONS_DENIED","alert","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","LABELS","PERMISSION_CAMERA","PERMISSION_APP_NAME","buttons","text","ALERT_PERMISSIONS_OK","openSettings","show","TOAST","OPEN_CAMERA_ERROR","DIALOG_IMAGE_MENU_PHOTO_LIBRARY","mediaFiles","openMediaLibrary","selectionLimit","PERMISSION_DEVICE_STORAGE","OPEN_PHOTO_LIBRARY_ERROR","unshift","DIALOG_IMAGE_MENU_REMOVE","titleColor","undefined","createElement","flexDirection","paddingVertical","paddingLeft","paddingRight","style","styles","coverButton","activeOpacity","Boolean","size","uri","icon","borderBottomColor","onBackground04","inputContainer","placeholder","PLACEHOLDER","subtitle1","input","backgroundColor","transparent","value","onChangeText","length","removeButtonContainer","color","onBackground03","marginRight","flex","alignItems","borderBottomWidth","paddingHorizontal","justifyContent","marginLeft"],"sources":["OpenChannelCreateProfileInput.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n Avatar,\n BottomSheetItem,\n Box,\n PressBox,\n TextInput,\n createStyleSheet,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport Icon from '@sendbird/uikit-react-native-foundation/src/components/Icon';\nimport { ifThenOr, useSafeAreaPadding } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../hooks/useContext';\nimport SBUError from '../../../libs/SBUError';\nimport SBUUtils from '../../../libs/SBUUtils';\nimport type { OpenChannelCreateProps } from '../types';\n\nconst OpenChannelCreateProfileInput = ({\n channelName,\n channelCoverFile,\n onChangeChannelName,\n onChangeChannelCoverFile,\n}: OpenChannelCreateProps['ProfileInput']) => {\n const toast = useToast();\n const { openSheet } = useBottomSheet();\n const { palette, colors, typography } = useUIKitTheme();\n const safeArea = useSafeAreaPadding(['left', 'right']);\n\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n\n const onPressPhotoButton = () => {\n const sheetItems: BottomSheetItem['sheetItems'] = [\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_CAMERA,\n onPress: async () => {\n const mediaFile = await fileService.openCamera({\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_CAMERA,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (mediaFile) onChangeChannelCoverFile(mediaFile);\n },\n },\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_PHOTO_LIBRARY,\n onPress: async () => {\n const mediaFiles = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_DEVICE_STORAGE,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n if (mediaFiles?.[0]) onChangeChannelCoverFile(mediaFiles[0]);\n },\n },\n ];\n\n if (channelCoverFile) {\n sheetItems.unshift({\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_REMOVE,\n titleColor: colors.error,\n onPress: () => {\n onChangeChannelCoverFile(undefined);\n },\n });\n }\n\n openSheet({ sheetItems });\n };\n\n return (\n <Box\n flexDirection={'row'}\n paddingVertical={16}\n paddingLeft={16 + safeArea.paddingLeft}\n paddingRight={16 + safeArea.paddingRight}\n >\n <PressBox onPress={onPressPhotoButton} style={styles.coverButton} activeOpacity={0.8}>\n {ifThenOr(\n Boolean(channelCoverFile),\n <Avatar size={72} uri={channelCoverFile?.uri} />,\n <Avatar.Icon size={72} icon={'camera'} />,\n )}\n </PressBox>\n <Box borderBottomColor={colors.onBackground04} style={styles.inputContainer}>\n <TextInput\n placeholder={STRINGS.OPEN_CHANNEL_CREATE.PLACEHOLDER}\n style={[typography.subtitle1, styles.input, { backgroundColor: palette.transparent }]}\n value={channelName}\n onChangeText={onChangeChannelName}\n />\n\n {channelName.length > 0 && (\n <PressBox onPress={() => onChangeChannelName('')} style={styles.removeButtonContainer}>\n <Icon color={colors.onBackground03} size={22} icon={'remove'} />\n </PressBox>\n )}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n coverButton: {\n marginRight: 20,\n },\n inputContainer: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n borderBottomWidth: 1,\n },\n input: {\n flex: 1,\n paddingVertical: 0,\n paddingHorizontal: 0,\n },\n removeButtonContainer: {\n alignItems: 'flex-end',\n justifyContent: 'center',\n marginLeft: 8,\n },\n});\n\nexport default OpenChannelCreateProfileInput;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACEC,MAAM,EAENC,GAAG,EACHC,QAAQ,EACRC,SAAS,EACTC,gBAAgB,EAChBC,cAAc,EACdC,QAAQ,EACRC,aAAa,QACR,yCAAyC;AAChD,OAAOC,IAAI,MAAM,6DAA6D;AAC9E,SAASC,QAAQ,EAAEC,kBAAkB,QAAQ,uBAAuB;AAEpE,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC/E,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,QAAQ,MAAM,wBAAwB;AAG7C,MAAMC,6BAA6B,GAAGC,IAAA,IAKQ;EAAA,IALP;IACrCC,WAAW;IACXC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACsC,CAAC,GAAAJ,IAAA;EACvC,MAAMK,KAAK,GAAGf,QAAQ,EAAE;EACxB,MAAM;IAAEgB;EAAU,CAAC,GAAGjB,cAAc,EAAE;EACtC,MAAM;IAAEkB,OAAO;IAAEC,MAAM;IAAEC;EAAW,CAAC,GAAGlB,aAAa,EAAE;EACvD,MAAMmB,QAAQ,GAAGhB,kBAAkB,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtD,MAAM;IAAEiB;EAAQ,CAAC,GAAGhB,eAAe,EAAE;EACrC,MAAM;IAAEiB;EAAY,CAAC,GAAGhB,kBAAkB,EAAE;EAE5C,MAAMiB,kBAAkB,GAAGA,CAAA,KAAM;IAC/B,MAAMC,UAAyC,GAAG,CAChD;MACEC,KAAK,EAAEJ,OAAO,CAACK,mBAAmB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EAAE;EACf,CAAC;EACDb,cAAc,EAAE;IACdc,IAAI,EAAE,CAAC;IACP5B,aAAa,EAAE,KAAK;IACpB6B,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EACrB,CAAC;EACDZ,KAAK,EAAE;IACLU,IAAI,EAAE,CAAC;IACP3B,eAAe,EAAE,CAAC;IAClB8B,iBAAiB,EAAE;EACrB,CAAC;EACDP,qBAAqB,EAAE;IACrBK,UAAU,EAAE,UAAU;IACtBG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAevF,6BAA6B"}
1
+ {"version":3,"names":["React","Avatar","Box","PressBox","TextInput","createStyleSheet","useBottomSheet","useToast","useUIKitTheme","Icon","ifThenOr","useSafeAreaPadding","useLocalization","usePlatformService","SBUError","SBUUtils","OpenChannelCreateProfileInput","_ref","channelName","channelCoverFile","onChangeChannelName","onChangeChannelCoverFile","toast","openSheet","palette","colors","typography","safeArea","STRINGS","fileService","onPressPhotoButton","sheetItems","title","OPEN_CHANNEL_CREATE","DIALOG_IMAGE_MENU_CAMERA","onPress","mediaFile","openCamera","mediaType","onOpenFailure","error","code","CODE","ERR_PERMISSIONS_DENIED","alert","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","LABELS","PERMISSION_CAMERA","PERMISSION_APP_NAME","buttons","text","ALERT_PERMISSIONS_OK","openSettings","show","TOAST","OPEN_CAMERA_ERROR","DIALOG_IMAGE_MENU_PHOTO_LIBRARY","mediaFiles","openMediaLibrary","selectionLimit","PERMISSION_DEVICE_STORAGE","OPEN_PHOTO_LIBRARY_ERROR","unshift","DIALOG_IMAGE_MENU_REMOVE","titleColor","undefined","createElement","flexDirection","paddingVertical","paddingLeft","paddingRight","style","styles","coverButton","activeOpacity","Boolean","size","uri","icon","borderBottomColor","onBackground04","inputContainer","placeholder","PLACEHOLDER","subtitle1","input","backgroundColor","transparent","value","onChangeText","length","removeButtonContainer","color","onBackground03","marginRight","flex","alignItems","borderBottomWidth","paddingTop","paddingBottom","justifyContent","marginLeft"],"sources":["OpenChannelCreateProfileInput.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n Avatar,\n BottomSheetItem,\n Box,\n PressBox,\n TextInput,\n createStyleSheet,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport Icon from '@sendbird/uikit-react-native-foundation/src/components/Icon';\nimport { ifThenOr, useSafeAreaPadding } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../hooks/useContext';\nimport SBUError from '../../../libs/SBUError';\nimport SBUUtils from '../../../libs/SBUUtils';\nimport type { OpenChannelCreateProps } from '../types';\n\nconst OpenChannelCreateProfileInput = ({\n channelName,\n channelCoverFile,\n onChangeChannelName,\n onChangeChannelCoverFile,\n}: OpenChannelCreateProps['ProfileInput']) => {\n const toast = useToast();\n const { openSheet } = useBottomSheet();\n const { palette, colors, typography } = useUIKitTheme();\n const safeArea = useSafeAreaPadding(['left', 'right']);\n\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n\n const onPressPhotoButton = () => {\n const sheetItems: BottomSheetItem['sheetItems'] = [\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_CAMERA,\n onPress: async () => {\n const mediaFile = await fileService.openCamera({\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_CAMERA,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (mediaFile) onChangeChannelCoverFile(mediaFile);\n },\n },\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_PHOTO_LIBRARY,\n onPress: async () => {\n const mediaFiles = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_DEVICE_STORAGE,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n if (mediaFiles?.[0]) onChangeChannelCoverFile(mediaFiles[0]);\n },\n },\n ];\n\n if (channelCoverFile) {\n sheetItems.unshift({\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_REMOVE,\n titleColor: colors.error,\n onPress: () => {\n onChangeChannelCoverFile(undefined);\n },\n });\n }\n\n openSheet({ sheetItems });\n };\n\n return (\n <Box\n flexDirection={'row'}\n paddingVertical={16}\n paddingLeft={16 + safeArea.paddingLeft}\n paddingRight={16 + safeArea.paddingRight}\n >\n <PressBox onPress={onPressPhotoButton} style={styles.coverButton} activeOpacity={0.8}>\n {ifThenOr(\n Boolean(channelCoverFile),\n <Avatar size={72} uri={channelCoverFile?.uri} />,\n <Avatar.Icon size={72} icon={'camera'} />,\n )}\n </PressBox>\n <Box borderBottomColor={colors.onBackground04} style={styles.inputContainer}>\n <TextInput\n placeholder={STRINGS.OPEN_CHANNEL_CREATE.PLACEHOLDER}\n style={[typography.subtitle1, styles.input, { backgroundColor: palette.transparent }]}\n value={channelName}\n onChangeText={onChangeChannelName}\n />\n\n {channelName.length > 0 && (\n <PressBox onPress={() => onChangeChannelName('')} style={styles.removeButtonContainer}>\n <Icon color={colors.onBackground03} size={22} icon={'remove'} />\n </PressBox>\n )}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n coverButton: {\n marginRight: 20,\n },\n inputContainer: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n borderBottomWidth: 1,\n },\n input: {\n flex: 1,\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: 0,\n paddingBottom: 0,\n },\n removeButtonContainer: {\n alignItems: 'flex-end',\n justifyContent: 'center',\n marginLeft: 8,\n },\n});\n\nexport default OpenChannelCreateProfileInput;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SACEC,MAAM,EAENC,GAAG,EACHC,QAAQ,EACRC,SAAS,EACTC,gBAAgB,EAChBC,cAAc,EACdC,QAAQ,EACRC,aAAa,QACR,yCAAyC;AAChD,OAAOC,IAAI,MAAM,6DAA6D;AAC9E,SAASC,QAAQ,EAAEC,kBAAkB,QAAQ,uBAAuB;AAEpE,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,2BAA2B;AAC/E,OAAOC,QAAQ,MAAM,wBAAwB;AAC7C,OAAOC,QAAQ,MAAM,wBAAwB;AAG7C,MAAMC,6BAA6B,GAAGC,IAAA,IAKQ;EAAA,IALP;IACrCC,WAAW;IACXC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACsC,CAAC,GAAAJ,IAAA;EACvC,MAAMK,KAAK,GAAGf,QAAQ,EAAE;EACxB,MAAM;IAAEgB;EAAU,CAAC,GAAGjB,cAAc,EAAE;EACtC,MAAM;IAAEkB,OAAO;IAAEC,MAAM;IAAEC;EAAW,CAAC,GAAGlB,aAAa,EAAE;EACvD,MAAMmB,QAAQ,GAAGhB,kBAAkB,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtD,MAAM;IAAEiB;EAAQ,CAAC,GAAGhB,eAAe,EAAE;EACrC,MAAM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;IAACjB,IAAI,EAAE,EAAG;IAACE,IAAI,EAAE;EAAS,EAAG,CAEnE,CACG,CACF;AAEV,CAAC;AAED,MAAMN,MAAM,GAAGtE,gBAAgB,CAAC;EAC9BuE,WAAW,EAAE;IACXqB,WAAW,EAAE;EACf,CAAC;EACDb,cAAc,EAAE;IACdc,IAAI,EAAE,CAAC;IACP5B,aAAa,EAAE,KAAK;IACpB6B,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EACrB,CAAC;EACDZ,KAAK,EAAE;IACLU,IAAI,EAAE,CAAC;IACP1B,WAAW,EAAE,CAAC;IACdC,YAAY,EAAE,CAAC;IACf4B,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB,CAAC;EACDR,qBAAqB,EAAE;IACrBK,UAAU,EAAE,UAAU;IACtBI,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAexF,6BAA6B"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { OnBeforeHandler, SendbirdOpenChannel, SendbirdOpenChannelCreateParams } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelCreateProps = {\n Fragment: {\n onPressHeaderLeft: OpenChannelCreateProps['Header']['onPressHeaderLeft'];\n onCreateChannel: (channel: SendbirdOpenChannel) => void;\n onBeforeCreateChannel?: OnBeforeHandler<SendbirdOpenChannelCreateParams>;\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n shouldActivateHeaderRight: () => boolean;\n };\n ProfileInput: {\n channelName: string;\n onChangeChannelName: (val: OpenChannelCreateProps['ProfileInput']['channelName']) => void;\n channelCoverFile: FileType | undefined;\n onChangeChannelCoverFile: (val: OpenChannelCreateProps['ProfileInput']['channelCoverFile']) => void;\n };\n};\n\n/**\n * Internal context for OpenChannelCreate\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelCreateContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n headerRight: string;\n }>;\n};\nexport interface OpenChannelCreateModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelCreateProps['Header']>;\n ProfileInput: CommonComponent<OpenChannelCreateProps['ProfileInput']>;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelCreateFragment = CommonComponent<OpenChannelCreateProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { OnBeforeHandler, SendbirdOpenChannel, SendbirdOpenChannelCreateParams } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelCreateProps = {\n Fragment: {\n onPressHeaderLeft: OpenChannelCreateProps['Header']['onPressHeaderLeft'];\n onCreateChannel: (channel: SendbirdOpenChannel) => void;\n onBeforeCreateChannel?: OnBeforeHandler<SendbirdOpenChannelCreateParams>;\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n shouldActivateHeaderRight: () => boolean;\n };\n ProfileInput: {\n channelName: string;\n onChangeChannelName: (val: OpenChannelCreateProps['ProfileInput']['channelName']) => void;\n channelCoverFile: FileType | undefined;\n onChangeChannelCoverFile: (val: OpenChannelCreateProps['ProfileInput']['channelCoverFile']) => void;\n };\n};\n\n/**\n * Internal context for OpenChannelCreate\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelCreateContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n headerRight: string;\n }>;\n};\nexport interface OpenChannelCreateModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelCreateProps['Header']>;\n ProfileInput: CommonComponent<OpenChannelCreateProps['ProfileInput']>;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelCreateFragment = React.FC<OpenChannelCreateProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseOpenChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelListProps = {\n Fragment: {\n onPressChannel: OpenChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: () => void;\n renderOpenChannelPreview?: OpenChannelListProps['List']['renderOpenChannelPreview'];\n queryCreator?: UseOpenChannelListOptions['queryCreator'];\n flatListProps?: OpenChannelListProps['List']['flatListProps'];\n };\n Header: {\n onPressHeaderRight: () => void;\n };\n List: {\n onPressChannel: (channel: SendbirdOpenChannel) => void;\n openChannels: SendbirdOpenChannel[];\n renderOpenChannelPreview: (props: {\n channel: SendbirdOpenChannel;\n onPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdOpenChannel>, 'data' | 'renderItem'>;\n refreshing: boolean;\n onRefresh: () => void;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelListContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n};\nexport interface OpenChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelListProps['Header']>;\n List: CommonComponent<OpenChannelListProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelListProps['StatusError']>;\n}\n\nexport type OpenChannelListFragment = CommonComponent<OpenChannelListProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseOpenChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelListProps = {\n Fragment: {\n onPressChannel: OpenChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: () => void;\n renderOpenChannelPreview?: OpenChannelListProps['List']['renderOpenChannelPreview'];\n queryCreator?: UseOpenChannelListOptions['queryCreator'];\n flatListProps?: OpenChannelListProps['List']['flatListProps'];\n };\n Header: {\n onPressHeaderRight: () => void;\n };\n List: {\n onPressChannel: (channel: SendbirdOpenChannel) => void;\n openChannels: SendbirdOpenChannel[];\n renderOpenChannelPreview: (props: {\n channel: SendbirdOpenChannel;\n onPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdOpenChannel>, 'data' | 'renderItem'>;\n refreshing: boolean;\n onRefresh: () => void;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelListContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n};\nexport interface OpenChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelListProps['Header']>;\n List: CommonComponent<OpenChannelListProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelListProps['StatusError']>;\n}\n\nexport type OpenChannelListFragment = React.FC<OpenChannelListProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelModerationProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: OpenChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedParticipants: OpenChannelModerationProps['Menu']['onPressMenuMutedParticipants'];\n onPressMenuBannedUsers: OpenChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: OpenChannelModerationProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedParticipants: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelModerationModule {\n Provider: CommonComponent<OpenChannelModerationProps['Provider']>;\n Header: CommonComponent<OpenChannelModerationProps['Header']>;\n Menu: CommonComponent<OpenChannelModerationProps['Menu']>;\n}\n\nexport type OpenChannelModerationFragment = CommonComponent<OpenChannelModerationProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelModerationProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: OpenChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedParticipants: OpenChannelModerationProps['Menu']['onPressMenuMutedParticipants'];\n onPressMenuBannedUsers: OpenChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: OpenChannelModerationProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedParticipants: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelModerationModule {\n Provider: CommonComponent<OpenChannelModerationProps['Provider']>;\n Header: CommonComponent<OpenChannelModerationProps['Header']>;\n Menu: CommonComponent<OpenChannelModerationProps['Menu']>;\n}\n\nexport type OpenChannelModerationFragment = React.FC<OpenChannelModerationProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelMutedParticipantsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelMutedParticipantsProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelMutedParticipantsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdRestrictedUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n List: {\n renderUser: (props: { user: SendbirdRestrictedUser }) => React.ReactElement | null;\n onLoadNext: () => void;\n mutedParticipants: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelMutedParticipants\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelMutedParticipantsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelMutedParticipantsModule {\n Provider: CommonComponent<OpenChannelMutedParticipantsProps['Provider']>;\n Header: CommonComponent<OpenChannelMutedParticipantsProps['Header']>;\n List: CommonComponent<OpenChannelMutedParticipantsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelMutedParticipantsProps['StatusError']>;\n}\n\nexport type OpenChannelMutedParticipantsFragment = CommonComponent<OpenChannelMutedParticipantsProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelMutedParticipantsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelMutedParticipantsProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelMutedParticipantsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdRestrictedUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n List: {\n renderUser: (props: { user: SendbirdRestrictedUser }) => React.ReactElement | null;\n onLoadNext: () => void;\n mutedParticipants: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelMutedParticipants\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelMutedParticipantsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelMutedParticipantsModule {\n Provider: CommonComponent<OpenChannelMutedParticipantsProps['Provider']>;\n Header: CommonComponent<OpenChannelMutedParticipantsProps['Header']>;\n List: CommonComponent<OpenChannelMutedParticipantsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelMutedParticipantsProps['StatusError']>;\n}\n\nexport type OpenChannelMutedParticipantsFragment = React.FC<OpenChannelMutedParticipantsProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: OpenChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: OpenChannelOperatorsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n operators: SendbirdUser[];\n onLoadNext: () => void;\n renderUser: (props: { user: SendbirdUser }) => React.ReactElement | null;\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelOperatorsModule {\n Provider: CommonComponent<OpenChannelOperatorsProps['Provider']>;\n Header: CommonComponent<OpenChannelOperatorsProps['Header']>;\n List: CommonComponent<OpenChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelOperatorsProps['StatusError']>;\n}\n\nexport type OpenChannelOperatorsFragment = CommonComponent<OpenChannelOperatorsProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: OpenChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: OpenChannelOperatorsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n operators: SendbirdUser[];\n onLoadNext: () => void;\n renderUser: (props: { user: SendbirdUser }) => React.ReactElement | null;\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelOperatorsModule {\n Provider: CommonComponent<OpenChannelOperatorsProps['Provider']>;\n Header: CommonComponent<OpenChannelOperatorsProps['Header']>;\n List: CommonComponent<OpenChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelOperatorsProps['StatusError']>;\n}\n\nexport type OpenChannelOperatorsFragment = React.FC<OpenChannelOperatorsProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelSettingsProps = {\n Fragment: {\n channel: OpenChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: OpenChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: OpenChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuParticipants: OpenChannelSettingsProps['Menu']['onPressMenuParticipants'];\n onPressMenuDeleteChannel: OpenChannelSettingsProps['Menu']['onPressMenuDeleteChannel'];\n onNavigateToOpenChannel: OpenChannelSettingsProps['Provider']['onNavigateToOpenChannel'];\n menuItemsCreator?: OpenChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuParticipants: () => void;\n onPressMenuDeleteChannel: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n onNavigateToOpenChannel: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelSettingsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdOpenChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n};\nexport interface OpenChannelSettingsModule {\n Provider: CommonComponent<OpenChannelSettingsProps['Provider']>;\n Header: CommonComponent<OpenChannelSettingsProps['Header']>;\n Info: CommonComponent<OpenChannelSettingsProps['Info']>;\n Menu: CommonComponent<OpenChannelSettingsProps['Menu']>;\n}\n\nexport type OpenChannelSettingsFragment = CommonComponent<OpenChannelSettingsProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelSettingsProps = {\n Fragment: {\n channel: OpenChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: OpenChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: OpenChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuParticipants: OpenChannelSettingsProps['Menu']['onPressMenuParticipants'];\n onPressMenuDeleteChannel: OpenChannelSettingsProps['Menu']['onPressMenuDeleteChannel'];\n onNavigateToOpenChannel: OpenChannelSettingsProps['Provider']['onNavigateToOpenChannel'];\n menuItemsCreator?: OpenChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuParticipants: () => void;\n onPressMenuDeleteChannel: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n onNavigateToOpenChannel: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelSettingsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdOpenChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n};\nexport interface OpenChannelSettingsModule {\n Provider: CommonComponent<OpenChannelSettingsProps['Provider']>;\n Header: CommonComponent<OpenChannelSettingsProps['Header']>;\n Info: CommonComponent<OpenChannelSettingsProps['Info']>;\n Menu: CommonComponent<OpenChannelSettingsProps['Menu']>;\n}\n\nexport type OpenChannelSettingsFragment = React.FC<OpenChannelSettingsProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdParticipant, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\nimport type { UserListProps } from '../userList/types';\n\nexport interface OpenChannelParticipantsProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelParticipantsFragment = CommonComponent<OpenChannelParticipantsProps['Fragment']>;\n\nexport interface OpenChannelRegisterOperatorProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: (channel: SendbirdOpenChannel) => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelRegisterOperatorFragment = CommonComponent<OpenChannelRegisterOperatorProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdParticipant, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { UserListProps } from '../userList/types';\n\nexport interface OpenChannelParticipantsProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelParticipantsFragment = React.FC<OpenChannelParticipantsProps['Fragment']>;\n\nexport interface OpenChannelRegisterOperatorProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: (channel: SendbirdOpenChannel) => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelRegisterOperatorFragment = React.FC<OpenChannelRegisterOperatorProps['Fragment']>;\n"],"mappings":""}
@@ -1,8 +1,9 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import { MessageFilter } from '@sendbird/chat/groupChannel';
2
3
  import { ReplyType } from '@sendbird/chat/message';
3
- import { useGroupChannelMessages } from '@sendbird/uikit-chat-hooks';
4
4
  import { Box } from '@sendbird/uikit-react-native-foundation';
5
- import { NOOP, PASS, messageComparator, useFreshCallback, useIIFE, useRefTracker } from '@sendbird/uikit-utils';
5
+ import { useGroupChannelMessages } from '@sendbird/uikit-tools';
6
+ import { NOOP, PASS, confirmAndMarkAsRead, messageComparator, useFreshCallback, useIIFE, useRefTracker } from '@sendbird/uikit-utils';
6
7
  import GroupChannelMessageRenderer, { GroupChannelTypingIndicatorBubble } from '../components/GroupChannelMessageRenderer';
7
8
  import NewMessagesButton from '../components/NewMessagesButton';
8
9
  import ScrollToBottomButton from '../components/ScrollToBottomButton';
@@ -30,9 +31,10 @@ const createGroupChannelFragment = initModule => {
30
31
  onBeforeUpdateFileMessage = PASS,
31
32
  channel,
32
33
  keyboardAvoidOffset,
33
- collectionCreator,
34
34
  sortComparator = messageComparator,
35
- flatListProps
35
+ flatListProps,
36
+ messageListQueryParams,
37
+ collectionCreator
36
38
  } = _ref;
37
39
  const {
38
40
  playerService,
@@ -56,8 +58,8 @@ const createGroupChannelFragment = initModule => {
56
58
  messages,
57
59
  newMessages,
58
60
  resetNewMessages,
59
- next,
60
- prev,
61
+ loadNext,
62
+ loadPrevious,
61
63
  hasNext,
62
64
  sendFileMessage,
63
65
  sendUserMessage,
@@ -66,7 +68,7 @@ const createGroupChannelFragment = initModule => {
66
68
  resendMessage,
67
69
  deleteMessage,
68
70
  resetWithStartingPoint
69
- } = useGroupChannelMessages(sdk, channel, currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId, {
71
+ } = useGroupChannelMessages(sdk, channel, {
70
72
  shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,
71
73
  onMessagesReceived(messages) {
72
74
  groupChannelPubSub.publish({
@@ -84,12 +86,13 @@ const createGroupChannelFragment = initModule => {
84
86
  }
85
87
  });
86
88
  },
87
- collectionCreator,
88
- sortComparator,
89
89
  onChannelDeleted,
90
+ onCurrentUserBanned: onChannelDeleted,
91
+ collectionCreator: getCollectionCreator(channel, messageListQueryParams, collectionCreator),
92
+ sortComparator,
93
+ markAsRead: confirmAndMarkAsRead,
90
94
  replyType,
91
- startingPoint: internalSearchItem === null || internalSearchItem === void 0 ? void 0 : internalSearchItem.startingPoint,
92
- enableCollectionWithoutLocalCache: true
95
+ startingPoint: internalSearchItem === null || internalSearchItem === void 0 ? void 0 : internalSearchItem.startingPoint
93
96
  });
94
97
  const onBlurFragment = () => {
95
98
  return Promise.allSettled([playerService.reset(), recorderService.reset()]);
@@ -122,11 +125,11 @@ const createGroupChannelFragment = initModule => {
122
125
  },
123
126
  ...flatListProps
124
127
  }), [flatListProps]);
125
- const onResetMessageList = useCallback(callback => {
126
- resetWithStartingPoint(Number.MAX_SAFE_INTEGER, callback);
128
+ const onResetMessageList = useCallback(async () => {
129
+ return await resetWithStartingPoint(Number.MAX_SAFE_INTEGER);
127
130
  }, []);
128
- const onResetMessageListWithStartingPoint = useCallback((startingPoint, callback) => {
129
- resetWithStartingPoint(startingPoint, callback);
131
+ const onResetMessageListWithStartingPoint = useCallback(async startingPoint => {
132
+ return await resetWithStartingPoint(startingPoint);
130
133
  }, []);
131
134
 
132
135
  // Changing the search item will trigger the focus animation on messages.
@@ -198,8 +201,8 @@ const createGroupChannelFragment = initModule => {
198
201
  renderMessage: renderItem,
199
202
  messages: messages,
200
203
  newMessages: newMessages,
201
- onTopReached: prev,
202
- onBottomReached: next,
204
+ onTopReached: loadPrevious,
205
+ onBottomReached: loadNext,
203
206
  hasNext: hasNext,
204
207
  scrolledAwayFromBottom: scrolledAwayFromBottom,
205
208
  onScrolledAwayFromBottom: onScrolledAwayFromBottom,
@@ -225,5 +228,18 @@ function shouldRenderInput(channel) {
225
228
  }
226
229
  return true;
227
230
  }
231
+ function getCollectionCreator(channel, messageListQueryParams, deprecatedCreatorProp) {
232
+ if (!messageListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;
233
+ return defaultParams => {
234
+ const params = {
235
+ ...defaultParams,
236
+ ...messageListQueryParams
237
+ };
238
+ return channel.createMessageCollection({
239
+ ...params,
240
+ filter: new MessageFilter(params)
241
+ });
242
+ };
243
+ }
228
244
  export default createGroupChannelFragment;
229
245
  //# sourceMappingURL=createGroupChannelFragment.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","ReplyType","useGroupChannelMessages","Box","NOOP","PASS","messageComparator","useFreshCallback","useIIFE","useRefTracker","GroupChannelMessageRenderer","GroupChannelTypingIndicatorBubble","NewMessagesButton","ScrollToBottomButton","StatusComposition","createGroupChannelModule","usePlatformService","useSendbirdChat","pubsub","createGroupChannelFragment","initModule","GroupChannelModule","_ref","searchItem","renderNewMessagesButton","props","createElement","renderScrollToBottomButton","renderMessage","enableMessageGrouping","enableTypingIndicator","onPressHeaderLeft","onPressHeaderRight","onPressMediaMessage","onChannelDeleted","onBeforeSendUserMessage","onBeforeSendFileMessage","onBeforeUpdateUserMessage","onBeforeUpdateFileMessage","channel","keyboardAvoidOffset","collectionCreator","sortComparator","flatListProps","playerService","recorderService","sdk","currentUser","sbOptions","internalSearchItem","setInternalSearchItem","navigateFromMessageSearch","Boolean","groupChannelPubSub","scrolledAwayFromBottom","setScrolledAwayFromBottom","scrolledAwayFromBottomRef","replyType","uikit","groupChannel","NONE","ONLY_REPLY_TO_CHANNEL","loading","messages","newMessages","resetNewMessages","next","prev","hasNext","sendFileMessage","sendUserMessage","updateFileMessage","updateUserMessage","resendMessage","deleteMessage","resetWithStartingPoint","userId","shouldCountNewMessages","current","onMessagesReceived","publish","type","data","onMessagesUpdated","startingPoint","enableCollectionWithoutLocalCache","onBlurFragment","Promise","allSettled","reset","_onPressHeaderLeft","_onPressHeaderRight","_onPressMediaMessage","message","uri","renderItem","content","isFirstItem","memoizedFlatListProps","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","onResetMessageList","callback","Number","MAX_SAFE_INTEGER","onResetMessageListWithStartingPoint","onUpdateSearchItem","undefined","onPending","onSent","onPressSendUserMessage","params","processedParams","onPressSendFileMessage","onPressUpdateUserMessage","messageId","onPressUpdateFileMessage","onScrolledAwayFromBottom","value","Provider","Header","shouldHideRight","LoadingComponent","StatusLoading","MessageList","currentUserId","onTopReached","onBottomReached","onResendFailedMessage","onDeleteMessage","Input","SuggestedMentionList","shouldRenderInput","isBroadcast","myRole"],"sources":["createGroupChannelFragment.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ReplyType } from '@sendbird/chat/message';\nimport { useGroupChannelMessages } from '@sendbird/uikit-chat-hooks';\nimport { Box } from '@sendbird/uikit-react-native-foundation';\nimport {\n NOOP,\n PASS,\n SendbirdFileMessage,\n SendbirdGroupChannel,\n SendbirdUserMessage,\n messageComparator,\n useFreshCallback,\n useIIFE,\n useRefTracker,\n} from '@sendbird/uikit-utils';\n\nimport GroupChannelMessageRenderer, {\n GroupChannelTypingIndicatorBubble,\n} from '../components/GroupChannelMessageRenderer';\nimport NewMessagesButton from '../components/NewMessagesButton';\nimport ScrollToBottomButton from '../components/ScrollToBottomButton';\nimport StatusComposition from '../components/StatusComposition';\nimport createGroupChannelModule from '../domain/groupChannel/module/createGroupChannelModule';\nimport type {\n GroupChannelFragment,\n GroupChannelModule,\n GroupChannelProps,\n GroupChannelPubSubContextPayload,\n} from '../domain/groupChannel/types';\nimport { usePlatformService, useSendbirdChat } from '../hooks/useContext';\nimport pubsub from '../utils/pubsub';\n\nconst createGroupChannelFragment = (initModule?: Partial<GroupChannelModule>): GroupChannelFragment => {\n const GroupChannelModule = createGroupChannelModule(initModule);\n\n return ({\n searchItem,\n renderNewMessagesButton = (props) => <NewMessagesButton {...props} />,\n renderScrollToBottomButton = (props) => <ScrollToBottomButton {...props} />,\n renderMessage,\n enableMessageGrouping = true,\n enableTypingIndicator,\n onPressHeaderLeft = NOOP,\n onPressHeaderRight = NOOP,\n onPressMediaMessage = NOOP,\n onChannelDeleted = NOOP,\n onBeforeSendUserMessage = PASS,\n onBeforeSendFileMessage = PASS,\n onBeforeUpdateUserMessage = PASS,\n onBeforeUpdateFileMessage = PASS,\n channel,\n keyboardAvoidOffset,\n collectionCreator,\n sortComparator = messageComparator,\n flatListProps,\n }) => {\n const { playerService, recorderService } = usePlatformService();\n const { sdk, currentUser, sbOptions } = useSendbirdChat();\n\n const [internalSearchItem, setInternalSearchItem] = useState(searchItem);\n const navigateFromMessageSearch = useCallback(() => Boolean(searchItem), []);\n\n const [groupChannelPubSub] = useState(() => pubsub<GroupChannelPubSubContextPayload>());\n const [scrolledAwayFromBottom, setScrolledAwayFromBottom] = useState(false);\n const scrolledAwayFromBottomRef = useRefTracker(scrolledAwayFromBottom);\n\n const replyType = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType === 'none') return ReplyType.NONE;\n else return ReplyType.ONLY_REPLY_TO_CHANNEL;\n });\n\n const {\n loading,\n messages,\n newMessages,\n resetNewMessages,\n next,\n prev,\n hasNext,\n sendFileMessage,\n sendUserMessage,\n updateFileMessage,\n updateUserMessage,\n resendMessage,\n deleteMessage,\n resetWithStartingPoint,\n } = useGroupChannelMessages(sdk, channel, currentUser?.userId, {\n shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,\n onMessagesReceived(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_RECEIVED', data: { messages } });\n },\n onMessagesUpdated(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_UPDATED', data: { messages } });\n },\n collectionCreator,\n sortComparator,\n onChannelDeleted,\n replyType,\n startingPoint: internalSearchItem?.startingPoint,\n enableCollectionWithoutLocalCache: true,\n });\n\n const onBlurFragment = () => {\n return Promise.allSettled([playerService.reset(), recorderService.reset()]);\n };\n const _onPressHeaderLeft = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderLeft();\n });\n const _onPressHeaderRight = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderRight();\n });\n const _onPressMediaMessage: NonNullable<GroupChannelProps['MessageList']['onPressMediaMessage']> = useFreshCallback(\n async (message, deleteMessage, uri) => {\n await onBlurFragment();\n onPressMediaMessage(message, deleteMessage, uri);\n },\n );\n\n useEffect(() => {\n return () => {\n onBlurFragment();\n };\n }, []);\n\n const renderItem: GroupChannelProps['MessageList']['renderMessage'] = useFreshCallback((props) => {\n const content = renderMessage ? renderMessage(props) : <GroupChannelMessageRenderer {...props} />;\n return (\n <Box>\n {content}\n {props.isFirstItem && !hasNext() && <GroupChannelTypingIndicatorBubble />}\n </Box>\n );\n });\n\n const memoizedFlatListProps = useMemo(\n () => ({\n ListEmptyComponent: <GroupChannelModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }),\n [flatListProps],\n );\n\n const onResetMessageList = useCallback((callback?: () => void) => {\n resetWithStartingPoint(Number.MAX_SAFE_INTEGER, callback);\n }, []);\n\n const onResetMessageListWithStartingPoint = useCallback((startingPoint: number, callback?: () => void) => {\n resetWithStartingPoint(startingPoint, callback);\n }, []);\n\n // Changing the search item will trigger the focus animation on messages.\n const onUpdateSearchItem: GroupChannelProps['MessageList']['onUpdateSearchItem'] = useCallback((searchItem) => {\n // Clean up for animation trigger with useEffect\n setInternalSearchItem(undefined);\n setInternalSearchItem(searchItem);\n }, []);\n\n const onPending = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_PENDING', data: { message } });\n };\n\n const onSent = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_SUCCESS', data: { message } });\n };\n\n const onPressSendUserMessage: GroupChannelProps['Input']['onPressSendUserMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendUserMessage(params);\n const message = await sendUserMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressSendFileMessage: GroupChannelProps['Input']['onPressSendFileMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendFileMessage(params);\n const message = await sendFileMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressUpdateUserMessage: GroupChannelProps['Input']['onPressUpdateUserMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateUserMessage(params);\n await updateUserMessage(message.messageId, processedParams);\n },\n );\n const onPressUpdateFileMessage: GroupChannelProps['Input']['onPressUpdateFileMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateFileMessage(params);\n await updateFileMessage(message.messageId, processedParams);\n },\n );\n const onScrolledAwayFromBottom = useFreshCallback((value: boolean) => {\n if (!value) resetNewMessages();\n setScrolledAwayFromBottom(value);\n });\n\n return (\n <GroupChannelModule.Provider\n channel={channel}\n groupChannelPubSub={groupChannelPubSub}\n enableTypingIndicator={enableTypingIndicator ?? sbOptions.uikit.groupChannel.channel.enableTypingIndicator}\n keyboardAvoidOffset={keyboardAvoidOffset}\n messages={messages}\n onUpdateSearchItem={onUpdateSearchItem}\n >\n <GroupChannelModule.Header\n shouldHideRight={navigateFromMessageSearch}\n onPressHeaderLeft={_onPressHeaderLeft}\n onPressHeaderRight={_onPressHeaderRight}\n />\n <StatusComposition loading={loading} LoadingComponent={<GroupChannelModule.StatusLoading />}>\n <GroupChannelModule.MessageList\n channel={channel}\n searchItem={internalSearchItem}\n onResetMessageList={onResetMessageList}\n onResetMessageListWithStartingPoint={onResetMessageListWithStartingPoint}\n onUpdateSearchItem={onUpdateSearchItem}\n enableMessageGrouping={enableMessageGrouping}\n currentUserId={currentUser?.userId}\n renderMessage={renderItem}\n messages={messages}\n newMessages={newMessages}\n onTopReached={prev}\n onBottomReached={next}\n hasNext={hasNext}\n scrolledAwayFromBottom={scrolledAwayFromBottom}\n onScrolledAwayFromBottom={onScrolledAwayFromBottom}\n renderNewMessagesButton={renderNewMessagesButton}\n renderScrollToBottomButton={renderScrollToBottomButton}\n onResendFailedMessage={resendMessage}\n onDeleteMessage={deleteMessage}\n onPressMediaMessage={_onPressMediaMessage}\n flatListProps={memoizedFlatListProps}\n />\n <GroupChannelModule.Input\n SuggestedMentionList={GroupChannelModule.SuggestedMentionList}\n shouldRenderInput={shouldRenderInput(channel)}\n onPressSendUserMessage={onPressSendUserMessage}\n onPressSendFileMessage={onPressSendFileMessage}\n onPressUpdateUserMessage={onPressUpdateUserMessage}\n onPressUpdateFileMessage={onPressUpdateFileMessage}\n />\n </StatusComposition>\n </GroupChannelModule.Provider>\n );\n };\n};\n\nfunction shouldRenderInput(channel: SendbirdGroupChannel) {\n if (channel.isBroadcast) {\n return channel.myRole === 'operator';\n }\n\n return true;\n}\n\nexport default createGroupChannelFragment;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAExE,SAASC,SAAS,QAAQ,wBAAwB;AAClD,SAASC,uBAAuB,QAAQ,4BAA4B;AACpE,SAASC,GAAG,QAAQ,yCAAyC;AAC7D,SACEC,IAAI,EACJC,IAAI,EAIJC,iBAAiB,EACjBC,gBAAgB,EAChB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B,EACrC,eACFtG,KAAA,CAAA8B,aAAA,CAACL,kBAAkB,CAAC+G,KAAK;MACvBC,oBAAoB,EAAEhH,kBAAkB,CAACgH,oBAAqB;MAC9DC,iBAAiB,EAAEA,iBAAiB,CAAC/F,OAAO,CAAE;MAC9CyE,sBAAsB,EAAEA,sBAAuB;MAC/CG,sBAAsB,EAAEA,sBAAuB;MAC/CC,wBAAwB,EAAEA,wBAAyB;MACnDE,wBAAwB,EAAEA;IAAyB,EACnD,CACgB,CACQ;EAElC,CAAC;AACH,CAAC;AAED,SAASgB,iBAAiBA,CAAC/F,OAA6B,EAAE;EACxD,IAAIA,OAAO,CAACgG,WAAW,EAAE;IACvB,OAAOhG,OAAO,CAACiG,MAAM,KAAK,UAAU;EACtC;EAEA,OAAO,IAAI;AACb;AAEA,eAAerH,0BAA0B"}
1
+ {"version":3,"names":["React","useCallback","useEffect","useMemo","useState","MessageFilter","ReplyType","Box","useGroupChannelMessages","NOOP","PASS","confirmAndMarkAsRead","messageComparator","useFreshCallback","useIIFE","useRefTracker","GroupChannelMessageRenderer","GroupChannelTypingIndicatorBubble","NewMessagesButton","ScrollToBottomButton","StatusComposition","createGroupChannelModule","usePlatformService","useSendbirdChat","pubsub","createGroupChannelFragment","initModule","GroupChannelModule","_ref","searchItem","renderNewMessagesButton","props","createElement","renderScrollToBottomButton","renderMessage","enableMessageGrouping","enableTypingIndicator","onPressHeaderLeft","onPressHeaderRight","onPressMediaMessage","onChannelDeleted","onBeforeSendUserMessage","onBeforeSendFileMessage","onBeforeUpdateUserMessage","onBeforeUpdateFileMessage","channel","keyboardAvoidOffset","sortComparator","flatListProps","messageListQueryParams","collectionCreator","playerService","recorderService","sdk","currentUser","sbOptions","internalSearchItem","setInternalSearchItem","navigateFromMessageSearch","Boolean","groupChannelPubSub","scrolledAwayFromBottom","setScrolledAwayFromBottom","scrolledAwayFromBottomRef","replyType","uikit","groupChannel","NONE","ONLY_REPLY_TO_CHANNEL","loading","messages","newMessages","resetNewMessages","loadNext","loadPrevious","hasNext","sendFileMessage","sendUserMessage","updateFileMessage","updateUserMessage","resendMessage","deleteMessage","resetWithStartingPoint","shouldCountNewMessages","current","onMessagesReceived","publish","type","data","onMessagesUpdated","onCurrentUserBanned","getCollectionCreator","markAsRead","startingPoint","onBlurFragment","Promise","allSettled","reset","_onPressHeaderLeft","_onPressHeaderRight","_onPressMediaMessage","message","uri","renderItem","content","isFirstItem","memoizedFlatListProps","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","onResetMessageList","Number","MAX_SAFE_INTEGER","onResetMessageListWithStartingPoint","onUpdateSearchItem","undefined","onPending","onSent","onPressSendUserMessage","params","processedParams","onPressSendFileMessage","onPressUpdateUserMessage","messageId","onPressUpdateFileMessage","onScrolledAwayFromBottom","value","Provider","Header","shouldHideRight","LoadingComponent","StatusLoading","MessageList","currentUserId","userId","onTopReached","onBottomReached","onResendFailedMessage","onDeleteMessage","Input","SuggestedMentionList","shouldRenderInput","isBroadcast","myRole","deprecatedCreatorProp","defaultParams","createMessageCollection","filter"],"sources":["createGroupChannelFragment.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { MessageCollection, MessageFilter } from '@sendbird/chat/groupChannel';\nimport { ReplyType } from '@sendbird/chat/message';\nimport { Box } from '@sendbird/uikit-react-native-foundation';\nimport { useGroupChannelMessages } from '@sendbird/uikit-tools';\nimport type { SendbirdFileMessage, SendbirdGroupChannel, SendbirdUserMessage } from '@sendbird/uikit-utils';\nimport {\n NOOP,\n PASS,\n confirmAndMarkAsRead,\n messageComparator,\n useFreshCallback,\n useIIFE,\n useRefTracker,\n} from '@sendbird/uikit-utils';\n\nimport GroupChannelMessageRenderer, {\n GroupChannelTypingIndicatorBubble,\n} from '../components/GroupChannelMessageRenderer';\nimport NewMessagesButton from '../components/NewMessagesButton';\nimport ScrollToBottomButton from '../components/ScrollToBottomButton';\nimport StatusComposition from '../components/StatusComposition';\nimport createGroupChannelModule from '../domain/groupChannel/module/createGroupChannelModule';\nimport type {\n GroupChannelFragment,\n GroupChannelModule,\n GroupChannelProps,\n GroupChannelPubSubContextPayload,\n} from '../domain/groupChannel/types';\nimport { usePlatformService, useSendbirdChat } from '../hooks/useContext';\nimport pubsub from '../utils/pubsub';\n\nconst createGroupChannelFragment = (initModule?: Partial<GroupChannelModule>): GroupChannelFragment => {\n const GroupChannelModule = createGroupChannelModule(initModule);\n\n return ({\n searchItem,\n renderNewMessagesButton = (props) => <NewMessagesButton {...props} />,\n renderScrollToBottomButton = (props) => <ScrollToBottomButton {...props} />,\n renderMessage,\n enableMessageGrouping = true,\n enableTypingIndicator,\n onPressHeaderLeft = NOOP,\n onPressHeaderRight = NOOP,\n onPressMediaMessage = NOOP,\n onChannelDeleted = NOOP,\n onBeforeSendUserMessage = PASS,\n onBeforeSendFileMessage = PASS,\n onBeforeUpdateUserMessage = PASS,\n onBeforeUpdateFileMessage = PASS,\n channel,\n keyboardAvoidOffset,\n sortComparator = messageComparator,\n flatListProps,\n messageListQueryParams,\n collectionCreator,\n }) => {\n const { playerService, recorderService } = usePlatformService();\n const { sdk, currentUser, sbOptions } = useSendbirdChat();\n\n const [internalSearchItem, setInternalSearchItem] = useState(searchItem);\n const navigateFromMessageSearch = useCallback(() => Boolean(searchItem), []);\n\n const [groupChannelPubSub] = useState(() => pubsub<GroupChannelPubSubContextPayload>());\n const [scrolledAwayFromBottom, setScrolledAwayFromBottom] = useState(false);\n const scrolledAwayFromBottomRef = useRefTracker(scrolledAwayFromBottom);\n\n const replyType = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType === 'none') return ReplyType.NONE;\n else return ReplyType.ONLY_REPLY_TO_CHANNEL;\n });\n\n const {\n loading,\n messages,\n newMessages,\n resetNewMessages,\n loadNext,\n loadPrevious,\n hasNext,\n sendFileMessage,\n sendUserMessage,\n updateFileMessage,\n updateUserMessage,\n resendMessage,\n deleteMessage,\n resetWithStartingPoint,\n } = useGroupChannelMessages(sdk, channel, {\n shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,\n onMessagesReceived(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_RECEIVED', data: { messages } });\n },\n onMessagesUpdated(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_UPDATED', data: { messages } });\n },\n onChannelDeleted,\n onCurrentUserBanned: onChannelDeleted,\n collectionCreator: getCollectionCreator(channel, messageListQueryParams, collectionCreator),\n sortComparator,\n markAsRead: confirmAndMarkAsRead,\n replyType,\n startingPoint: internalSearchItem?.startingPoint,\n });\n\n const onBlurFragment = () => {\n return Promise.allSettled([playerService.reset(), recorderService.reset()]);\n };\n const _onPressHeaderLeft = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderLeft();\n });\n const _onPressHeaderRight = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderRight();\n });\n const _onPressMediaMessage: NonNullable<GroupChannelProps['MessageList']['onPressMediaMessage']> = useFreshCallback(\n async (message, deleteMessage, uri) => {\n await onBlurFragment();\n onPressMediaMessage(message, deleteMessage, uri);\n },\n );\n\n useEffect(() => {\n return () => {\n onBlurFragment();\n };\n }, []);\n\n const renderItem: GroupChannelProps['MessageList']['renderMessage'] = useFreshCallback((props) => {\n const content = renderMessage ? renderMessage(props) : <GroupChannelMessageRenderer {...props} />;\n return (\n <Box>\n {content}\n {props.isFirstItem && !hasNext() && <GroupChannelTypingIndicatorBubble />}\n </Box>\n );\n });\n\n const memoizedFlatListProps = useMemo(\n () => ({\n ListEmptyComponent: <GroupChannelModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }),\n [flatListProps],\n );\n\n const onResetMessageList = useCallback(async () => {\n return await resetWithStartingPoint(Number.MAX_SAFE_INTEGER);\n }, []);\n\n const onResetMessageListWithStartingPoint = useCallback(async (startingPoint: number) => {\n return await resetWithStartingPoint(startingPoint);\n }, []);\n\n // Changing the search item will trigger the focus animation on messages.\n const onUpdateSearchItem: GroupChannelProps['MessageList']['onUpdateSearchItem'] = useCallback((searchItem) => {\n // Clean up for animation trigger with useEffect\n setInternalSearchItem(undefined);\n setInternalSearchItem(searchItem);\n }, []);\n\n const onPending = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_PENDING', data: { message } });\n };\n\n const onSent = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_SUCCESS', data: { message } });\n };\n\n const onPressSendUserMessage: GroupChannelProps['Input']['onPressSendUserMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendUserMessage(params);\n const message = await sendUserMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressSendFileMessage: GroupChannelProps['Input']['onPressSendFileMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendFileMessage(params);\n const message = await sendFileMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressUpdateUserMessage: GroupChannelProps['Input']['onPressUpdateUserMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateUserMessage(params);\n await updateUserMessage(message.messageId, processedParams);\n },\n );\n const onPressUpdateFileMessage: GroupChannelProps['Input']['onPressUpdateFileMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateFileMessage(params);\n await updateFileMessage(message.messageId, processedParams);\n },\n );\n const onScrolledAwayFromBottom = useFreshCallback((value: boolean) => {\n if (!value) resetNewMessages();\n setScrolledAwayFromBottom(value);\n });\n\n return (\n <GroupChannelModule.Provider\n channel={channel}\n groupChannelPubSub={groupChannelPubSub}\n enableTypingIndicator={enableTypingIndicator ?? sbOptions.uikit.groupChannel.channel.enableTypingIndicator}\n keyboardAvoidOffset={keyboardAvoidOffset}\n messages={messages}\n onUpdateSearchItem={onUpdateSearchItem}\n >\n <GroupChannelModule.Header\n shouldHideRight={navigateFromMessageSearch}\n onPressHeaderLeft={_onPressHeaderLeft}\n onPressHeaderRight={_onPressHeaderRight}\n />\n <StatusComposition loading={loading} LoadingComponent={<GroupChannelModule.StatusLoading />}>\n <GroupChannelModule.MessageList\n channel={channel}\n searchItem={internalSearchItem}\n onResetMessageList={onResetMessageList}\n onResetMessageListWithStartingPoint={onResetMessageListWithStartingPoint}\n onUpdateSearchItem={onUpdateSearchItem}\n enableMessageGrouping={enableMessageGrouping}\n currentUserId={currentUser?.userId}\n renderMessage={renderItem}\n messages={messages}\n newMessages={newMessages}\n onTopReached={loadPrevious}\n onBottomReached={loadNext}\n hasNext={hasNext}\n scrolledAwayFromBottom={scrolledAwayFromBottom}\n onScrolledAwayFromBottom={onScrolledAwayFromBottom}\n renderNewMessagesButton={renderNewMessagesButton}\n renderScrollToBottomButton={renderScrollToBottomButton}\n onResendFailedMessage={resendMessage}\n onDeleteMessage={deleteMessage}\n onPressMediaMessage={_onPressMediaMessage}\n flatListProps={memoizedFlatListProps}\n />\n <GroupChannelModule.Input\n SuggestedMentionList={GroupChannelModule.SuggestedMentionList}\n shouldRenderInput={shouldRenderInput(channel)}\n onPressSendUserMessage={onPressSendUserMessage}\n onPressSendFileMessage={onPressSendFileMessage}\n onPressUpdateUserMessage={onPressUpdateUserMessage}\n onPressUpdateFileMessage={onPressUpdateFileMessage}\n />\n </StatusComposition>\n </GroupChannelModule.Provider>\n );\n };\n};\n\nfunction shouldRenderInput(channel: SendbirdGroupChannel) {\n if (channel.isBroadcast) {\n return channel.myRole === 'operator';\n }\n\n return true;\n}\n\nfunction getCollectionCreator(\n channel: SendbirdGroupChannel,\n messageListQueryParams?: GroupChannelProps['Fragment']['messageListQueryParams'],\n deprecatedCreatorProp?: () => MessageCollection,\n) {\n if (!messageListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;\n\n return (defaultParams: GroupChannelProps['Fragment']['messageListQueryParams']) => {\n const params = { ...defaultParams, ...messageListQueryParams };\n return channel.createMessageCollection({\n ...params,\n filter: new MessageFilter(params),\n });\n };\n}\n\nexport default createGroupChannelFragment;\n"],"mappings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eAAe/F,0BAA0B"}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { useGroupChannelList } from '@sendbird/uikit-chat-hooks';
3
- import { PASS, useAppState, useFreshCallback } from '@sendbird/uikit-utils';
2
+ import { GroupChannelFilter } from '@sendbird/chat/groupChannel';
3
+ import { useGroupChannelList } from '@sendbird/uikit-tools';
4
+ import { PASS, confirmAndMarkAsDelivered, useAppState, useFreshCallback } from '@sendbird/uikit-utils';
4
5
  import StatusComposition from '../components/StatusComposition';
5
6
  import GroupChannelPreviewContainer from '../containers/GroupChannelPreviewContainer';
6
7
  import createGroupChannelListModule from '../domain/groupChannelList/module/createGroupChannelListModule';
@@ -11,25 +12,25 @@ const createGroupChannelListFragment = initModule => {
11
12
  let {
12
13
  onPressChannel,
13
14
  onPressCreateChannel,
14
- collectionCreator,
15
15
  renderGroupChannelPreview,
16
16
  skipTypeSelection = false,
17
17
  flatListProps = {},
18
- menuItemCreator = PASS
18
+ menuItemCreator = PASS,
19
+ channelListQueryParams,
20
+ collectionCreator
19
21
  } = _ref;
20
22
  const {
21
23
  sdk,
22
- currentUser,
23
24
  sbOptions,
24
25
  markAsDeliveredWithChannel
25
26
  } = useSendbirdChat();
26
27
  const {
27
28
  groupChannels,
28
- next,
29
- loading
30
- } = useGroupChannelList(sdk, currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId, {
31
- collectionCreator,
32
- enableCollectionWithoutLocalCache: true
29
+ loadMore,
30
+ initialized
31
+ } = useGroupChannelList(sdk, {
32
+ collectionCreator: getCollectionCreator(sdk, channelListQueryParams, collectionCreator),
33
+ markAsDelivered: confirmAndMarkAsDelivered
33
34
  });
34
35
  if (sbOptions.appInfo.deliveryReceiptEnabled) {
35
36
  useAppState('change', status => {
@@ -42,14 +43,14 @@ const createGroupChannelListFragment = initModule => {
42
43
  });
43
44
  const isChannelTypeAvailable = sbOptions.appInfo.broadcastChannelEnabled || sbOptions.appInfo.superGroupChannelEnabled;
44
45
  return /*#__PURE__*/React.createElement(GroupChannelListModule.Provider, null, /*#__PURE__*/React.createElement(GroupChannelListModule.Header, null), /*#__PURE__*/React.createElement(StatusComposition, {
45
- loading: loading,
46
+ loading: !initialized,
46
47
  LoadingComponent: /*#__PURE__*/React.createElement(GroupChannelListModule.StatusLoading, null)
47
48
  }, /*#__PURE__*/React.createElement(GroupChannelListModule.List, {
48
49
  onPressChannel: onPressChannel,
49
50
  menuItemCreator: menuItemCreator,
50
51
  renderGroupChannelPreview: _renderGroupChannelPreview,
51
52
  groupChannels: groupChannels,
52
- onLoadNext: next,
53
+ onLoadNext: loadMore,
53
54
  flatListProps: {
54
55
  ListEmptyComponent: /*#__PURE__*/React.createElement(GroupChannelListModule.StatusEmpty, null),
55
56
  contentContainerStyle: {
@@ -63,5 +64,18 @@ const createGroupChannelListFragment = initModule => {
63
64
  }));
64
65
  };
65
66
  };
67
+ function getCollectionCreator(sdk, channelListQueryParams, deprecatedCreatorProp) {
68
+ if (!channelListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;
69
+ return defaultParams => {
70
+ const params = {
71
+ ...defaultParams,
72
+ ...channelListQueryParams
73
+ };
74
+ return sdk.groupChannel.createGroupChannelCollection({
75
+ ...params,
76
+ filter: new GroupChannelFilter(params)
77
+ });
78
+ };
79
+ }
66
80
  export default createGroupChannelListFragment;
67
81
  //# sourceMappingURL=createGroupChannelListFragment.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useGroupChannelList","PASS","useAppState","useFreshCallback","StatusComposition","GroupChannelPreviewContainer","createGroupChannelListModule","useSendbirdChat","createGroupChannelListFragment","initModule","GroupChannelListModule","_ref","onPressChannel","onPressCreateChannel","collectionCreator","renderGroupChannelPreview","skipTypeSelection","flatListProps","menuItemCreator","sdk","currentUser","sbOptions","markAsDeliveredWithChannel","groupChannels","next","loading","userId","enableCollectionWithoutLocalCache","appInfo","deliveryReceiptEnabled","status","forEach","_renderGroupChannelPreview","props","createElement","isChannelTypeAvailable","broadcastChannelEnabled","superGroupChannelEnabled","Provider","Header","LoadingComponent","StatusLoading","List","onLoadNext","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","TypeSelector","onSelectType"],"sources":["createGroupChannelListFragment.tsx"],"sourcesContent":["import React from 'react';\n\nimport { useGroupChannelList } from '@sendbird/uikit-chat-hooks';\nimport { PASS, useAppState, useFreshCallback } from '@sendbird/uikit-utils';\n\nimport StatusComposition from '../components/StatusComposition';\nimport GroupChannelPreviewContainer from '../containers/GroupChannelPreviewContainer';\nimport createGroupChannelListModule from '../domain/groupChannelList/module/createGroupChannelListModule';\nimport type {\n GroupChannelListFragment,\n GroupChannelListModule,\n GroupChannelListProps,\n} from '../domain/groupChannelList/types';\nimport { useSendbirdChat } from '../hooks/useContext';\n\nconst createGroupChannelListFragment = (initModule?: Partial<GroupChannelListModule>): GroupChannelListFragment => {\n const GroupChannelListModule = createGroupChannelListModule(initModule);\n return ({\n onPressChannel,\n onPressCreateChannel,\n collectionCreator,\n renderGroupChannelPreview,\n skipTypeSelection = false,\n flatListProps = {},\n menuItemCreator = PASS,\n }) => {\n const { sdk, currentUser, sbOptions, markAsDeliveredWithChannel } = useSendbirdChat();\n const { groupChannels, next, loading } = useGroupChannelList(sdk, currentUser?.userId, {\n collectionCreator,\n enableCollectionWithoutLocalCache: true,\n });\n\n if (sbOptions.appInfo.deliveryReceiptEnabled) {\n useAppState('change', (status) => {\n if (status === 'active') groupChannels.forEach(markAsDeliveredWithChannel);\n });\n }\n\n const _renderGroupChannelPreview: GroupChannelListProps['List']['renderGroupChannelPreview'] = useFreshCallback(\n (props) => {\n if (renderGroupChannelPreview) return renderGroupChannelPreview(props);\n return <GroupChannelPreviewContainer {...props} />;\n },\n );\n\n const isChannelTypeAvailable =\n sbOptions.appInfo.broadcastChannelEnabled || sbOptions.appInfo.superGroupChannelEnabled;\n\n return (\n <GroupChannelListModule.Provider>\n <GroupChannelListModule.Header />\n <StatusComposition loading={loading} LoadingComponent={<GroupChannelListModule.StatusLoading />}>\n <GroupChannelListModule.List\n onPressChannel={onPressChannel}\n menuItemCreator={menuItemCreator}\n renderGroupChannelPreview={_renderGroupChannelPreview}\n groupChannels={groupChannels}\n onLoadNext={next}\n flatListProps={{\n ListEmptyComponent: <GroupChannelListModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }}\n />\n </StatusComposition>\n <GroupChannelListModule.TypeSelector\n skipTypeSelection={isChannelTypeAvailable ? skipTypeSelection : true}\n onSelectType={onPressCreateChannel}\n />\n </GroupChannelListModule.Provider>\n );\n };\n};\n\nexport default createGroupChannelListFragment;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,mBAAmB,QAAQ,4BAA4B;AAChE,SAASC,IAAI,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,uBAAuB;AAE3E,OAAOC,iBAAiB,MAAM,iCAAiC;AAC/D,OAAOC,4BAA4B,MAAM,4CAA4C;AACrF,OAAOC,4BAA4B,MAAM,gEAAgE;AAMzG,SAASC,eAAe,QAAQ,qBAAqB;AAErD,MAAMC,8BAA8B,GAAIC,UAA4C,IAA+B;EACjH,MAAMC,sBAAsB,GAAGJ,4BAA4B,CAACG,UAAU,CAAC;EACvE,OAAOE,IAAA,IAQD;IAAA,IARE;MACNC,cAAc;MACdC,oBAAoB;MACpBC,iBAAiB;MACjBC,yBAAyB;MACzBC,iBAAiB,GAAG,KAAK;MACzBC,aAAa,GAAG,CAAC,CAAC;MAClBC,eAAe,GAAGjB;IACpB,CAAC,GAAAU,IAAA;IACC,MAAM;MAAEQ,GAAG;MAAEC,WAAW;MAAEC,SAAS;MAAEC;IAA2B,CAAC,GAAGf,eAAe,EAAE;IACrF,MAAM;MAAEgB,aAAa;MAAEC,IAAI;MAAEC;IAAQ,CAAC,GAAGzB,mBAAmB,CAACmB,GAAG,EAAEC,WAAW,aAAXA,WAAW,uBAAXA,WAAW,CAAEM,MAAM,EAAE;MACrFZ,iBAAiB;MACjBa,iCAAiC,EAA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B,KAAA,CAAAmC,aAAA,CAACxB,sBAAsB,CAACsC,YAAY;MAClChC,iBAAiB,EAAEmB,sBAAsB,GAAGnB,iBAAiB,GAAG,IAAK;MACrEiC,YAAY,EAAEpC;IAAqB,EACnC,CAC8B;EAEtC,CAAC;AACH,CAAC;AAED,eAAeL,8BAA8B"}
1
+ {"version":3,"names":["React","GroupChannelFilter","useGroupChannelList","PASS","confirmAndMarkAsDelivered","useAppState","useFreshCallback","StatusComposition","GroupChannelPreviewContainer","createGroupChannelListModule","useSendbirdChat","createGroupChannelListFragment","initModule","GroupChannelListModule","_ref","onPressChannel","onPressCreateChannel","renderGroupChannelPreview","skipTypeSelection","flatListProps","menuItemCreator","channelListQueryParams","collectionCreator","sdk","sbOptions","markAsDeliveredWithChannel","groupChannels","loadMore","initialized","getCollectionCreator","markAsDelivered","appInfo","deliveryReceiptEnabled","status","forEach","_renderGroupChannelPreview","props","createElement","isChannelTypeAvailable","broadcastChannelEnabled","superGroupChannelEnabled","Provider","Header","loading","LoadingComponent","StatusLoading","List","onLoadNext","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","TypeSelector","onSelectType","deprecatedCreatorProp","defaultParams","params","groupChannel","createGroupChannelCollection","filter"],"sources":["createGroupChannelListFragment.tsx"],"sourcesContent":["import React from 'react';\n\nimport { GroupChannelCollection, GroupChannelFilter } from '@sendbird/chat/groupChannel';\nimport { useGroupChannelList } from '@sendbird/uikit-tools';\nimport { PASS, SendbirdChatSDK, confirmAndMarkAsDelivered, useAppState, useFreshCallback } from '@sendbird/uikit-utils';\n\nimport StatusComposition from '../components/StatusComposition';\nimport GroupChannelPreviewContainer from '../containers/GroupChannelPreviewContainer';\nimport createGroupChannelListModule from '../domain/groupChannelList/module/createGroupChannelListModule';\nimport type {\n GroupChannelListFragment,\n GroupChannelListModule,\n GroupChannelListProps,\n} from '../domain/groupChannelList/types';\nimport { useSendbirdChat } from '../hooks/useContext';\n\nconst createGroupChannelListFragment = (initModule?: Partial<GroupChannelListModule>): GroupChannelListFragment => {\n const GroupChannelListModule = createGroupChannelListModule(initModule);\n return ({\n onPressChannel,\n onPressCreateChannel,\n renderGroupChannelPreview,\n skipTypeSelection = false,\n flatListProps = {},\n menuItemCreator = PASS,\n channelListQueryParams,\n collectionCreator,\n }) => {\n const { sdk, sbOptions, markAsDeliveredWithChannel } = useSendbirdChat();\n const { groupChannels, loadMore, initialized } = useGroupChannelList(sdk, {\n collectionCreator: getCollectionCreator(sdk, channelListQueryParams, collectionCreator),\n markAsDelivered: confirmAndMarkAsDelivered,\n });\n\n if (sbOptions.appInfo.deliveryReceiptEnabled) {\n useAppState('change', (status) => {\n if (status === 'active') groupChannels.forEach(markAsDeliveredWithChannel);\n });\n }\n\n const _renderGroupChannelPreview: GroupChannelListProps['List']['renderGroupChannelPreview'] = useFreshCallback(\n (props) => {\n if (renderGroupChannelPreview) return renderGroupChannelPreview(props);\n return <GroupChannelPreviewContainer {...props} />;\n },\n );\n\n const isChannelTypeAvailable =\n sbOptions.appInfo.broadcastChannelEnabled || sbOptions.appInfo.superGroupChannelEnabled;\n\n return (\n <GroupChannelListModule.Provider>\n <GroupChannelListModule.Header />\n <StatusComposition loading={!initialized} LoadingComponent={<GroupChannelListModule.StatusLoading />}>\n <GroupChannelListModule.List\n onPressChannel={onPressChannel}\n menuItemCreator={menuItemCreator}\n renderGroupChannelPreview={_renderGroupChannelPreview}\n groupChannels={groupChannels}\n onLoadNext={loadMore}\n flatListProps={{\n ListEmptyComponent: <GroupChannelListModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }}\n />\n </StatusComposition>\n <GroupChannelListModule.TypeSelector\n skipTypeSelection={isChannelTypeAvailable ? skipTypeSelection : true}\n onSelectType={onPressCreateChannel}\n />\n </GroupChannelListModule.Provider>\n );\n };\n};\n\nfunction getCollectionCreator(\n sdk: SendbirdChatSDK,\n channelListQueryParams?: GroupChannelListProps['Fragment']['channelListQueryParams'],\n deprecatedCreatorProp?: () => GroupChannelCollection,\n) {\n if (!channelListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;\n\n return (defaultParams: GroupChannelListProps['Fragment']['channelListQueryParams']) => {\n const params = { ...defaultParams, ...channelListQueryParams };\n return sdk.groupChannel.createGroupChannelCollection({\n ...params,\n filter: new GroupChannelFilter(params),\n });\n };\n}\n\nexport default createGroupChannelListFragment;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAAiCC,kBAAkB,QAAQ,6BAA6B;AACxF,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,IAAI,EAAmBC,yBAAyB,EAAEC,WAAW,EAAEC,gBAAgB,QAAQ,uBAAuB;AAEvH,OAAOC,iBAAiB,MAAM,iCAAiC;AAC/D,OAAOC,4BAA4B,MAAM,4CAA4C;AACrF,OAAOC,4BAA4B,MAAM,gEAAgE;AAMzG,SAASC,eAAe,QAAQ,qBAAqB;AAErD,MAAMC,8BAA8B,GAAIC,UAA4C,IAA+B;EACjH,MAAMC,sBAAsB,GAAGJ,4BAA4B,CAACG,UAAU,CAAC;EACvE,OAAOE,IAAA,IASD;IAAA,IATE;MACNC,cAAc;MACdC,oBAAoB;MACpBC,yBAAyB;MACzBC,iBAAiB,GAAG,KAAK;MACzBC,aAAa,GAAG,CAAC,CAAC;MAClBC,eAAe,GAAGjB,IAAI;MACtBkB,sBAAsB;MACtBC;IACF,CAAC,GAAAR,IAAA;IACC,MAAM;MAAES,GAAG;MAAEC,SAAS;MAAEC;IAA2B,CAAC,GAAGf,eAAe,EAAE;IACxE,MAAM;MAAEgB,aAAa;MAAEC,QAAQ;MAAEC;IAAY,CAAC,GAAG1B,mBAAmB,CAACqB,GAAG,EAAE;MACxED,iBAAiB,EAAEO,oBAAoB,CAACN,GAAG,EAAEF,sBAAsB,EAAEC,iBAAiB,CAAC;MACvFQ,eAAe,EAAE1B;IACnB,CAAC,CAAC;IAEF,IAAIoB,SAAS,CAACO,OAAO,CAACC,sBAAsB,EA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AAEoB,sBAAsB,GAAGpB,iBAAiB,GAAG,IAAK;MACrEmC,YAAY,EAAErC;IAAqB,EACnC,CAC8B;EAEtC,CAAC;AACH,CAAC;AAED,SAASa,oBAAoBA,CAC3BN,GAAoB,EACpBF,sBAAoF,EACpFiC,qBAAoD,EACpD;EACA,IAAI,CAACjC,sBAAsB,IAAIiC,qBAAqB,EAAE,OAAOA,qBAAqB;EAElF,OAAQC,aAA0E,IAAK;IACrF,MAAMC,MAAM,GAAG;MAAE,GAAGD,aAAa;MAAE,GAAGlC;IAAuB,CAAC;IAC9D,OAAOE,GAAG,CAACkC,YAAY,CAACC,4BAA4B,CAAC;MACnD,GAAGF,MAAM;MACTG,MAAM,EAAE,IAAI1D,kBAAkB,CAACuD,MAAM;IACvC,CAAC,CAAC;EACJ,CAAC;AACH;AAEA,eAAe7C,8BAA8B"}
@@ -1 +1 @@
1
- {"version":3,"names":["TypingIndicatorType"],"sources":["types.ts"],"sourcesContent":["import type { ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> = (props: P & { children?: ReactNode }) => null | ReactNode;\n\nexport type MentionedUser = {\n range: Range;\n user: SendbirdUser;\n};\n\nexport type Range = {\n start: number;\n end: number;\n};\n\nexport enum TypingIndicatorType {\n Text = 'text',\n Bubble = 'bubble',\n}\n"],"mappings":"AA+BA,WAAYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA"}
1
+ {"version":3,"names":["TypingIndicatorType"],"sources":["types.ts"],"sourcesContent":["import type { ComponentType, ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> = ComponentType<P & { children?: ReactNode | undefined }>;\n\nexport type MentionedUser = {\n range: Range;\n user: SendbirdUser;\n};\n\nexport type Range = {\n start: number;\n end: number;\n};\n\nexport enum TypingIndicatorType {\n Text = 'text',\n Bubble = 'bubble',\n}\n"],"mappings":"AA+BA,WAAYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA"}
@@ -1,3 +1,3 @@
1
- const VERSION = '3.3.0';
1
+ const VERSION = '3.4.1';
2
2
  export default VERSION;
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.3.0';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,OAAO;AACvB,eAAeA,OAAO"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.4.1';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,OAAO;AACvB,eAAeA,OAAO"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { StyleProp, TextStyle } from 'react-native';
3
3
  import { SendbirdBaseChannel, SendbirdFileMessage, SendbirdFileMessageCreateParams, SendbirdFileMessageUpdateParams, SendbirdMember, SendbirdUserMessage, SendbirdUserMessageCreateParams, SendbirdUserMessageUpdateParams } from '@sendbird/uikit-utils';
4
- import type { MentionedUser, Range } from '../../types';
4
+ import type { CommonComponent, MentionedUser, Range } from '../../types';
5
5
  import type { AttachmentsButtonProps } from './AttachmentsButton';
6
6
  import type { MessageToReplyPreviewProps } from './MessageToReplyPreview';
7
7
  import { VoiceMessageInputProps } from './VoiceMessageInput';
@@ -30,7 +30,7 @@ export type ChannelInputProps = {
30
30
  setMessageToEdit: (message?: undefined | SendbirdUserMessage | SendbirdFileMessage) => void;
31
31
  messageToReply?: undefined | SendbirdUserMessage | SendbirdFileMessage;
32
32
  setMessageToReply?: (message?: undefined | SendbirdUserMessage | SendbirdFileMessage) => void;
33
- SuggestedMentionList?: (props: SuggestedMentionListProps) => React.ReactNode | null;
33
+ SuggestedMentionList?: CommonComponent<SuggestedMentionListProps>;
34
34
  AttachmentsButton?: (props: AttachmentsButtonProps) => React.ReactNode | null;
35
35
  MessageToReplyPreview?: (props: MessageToReplyPreviewProps) => React.ReactNode | null;
36
36
  VoiceMessageInput?: (props: VoiceMessageInputProps) => React.ReactNode | null;
@@ -3,7 +3,6 @@ import { FlatList, FlatListProps } from 'react-native';
3
3
  import { BottomSheetItem } from '@sendbird/uikit-react-native-foundation';
4
4
  import { SendbirdFileMessage, SendbirdGroupChannel, SendbirdMessage, SendbirdOpenChannel, SendbirdUserMessage } from '@sendbird/uikit-utils';
5
5
  import type { UserProfileContextType } from '../../contexts/UserProfileCtx';
6
- import type { CommonComponent } from '../../types';
7
6
  type HandleableMessage = SendbirdUserMessage | SendbirdFileMessage;
8
7
  export type ChannelMessageListProps<T extends SendbirdGroupChannel | SendbirdOpenChannel> = {
9
8
  enableMessageGrouping: boolean;
@@ -24,7 +23,7 @@ export type ChannelMessageListProps<T extends SendbirdGroupChannel | SendbirdOpe
24
23
  onEditMessage: (message: HandleableMessage) => void;
25
24
  onReplyMessage?: (message: HandleableMessage) => void;
26
25
  onDeleteMessage: (message: HandleableMessage) => Promise<void>;
27
- onResendFailedMessage: (failedMessage: HandleableMessage) => Promise<void>;
26
+ onResendFailedMessage: (failedMessage: HandleableMessage) => Promise<HandleableMessage | void>;
28
27
  onPressParentMessage?: (parentMessage: SendbirdMessage) => void;
29
28
  onPressMediaMessage?: (message: SendbirdFileMessage, deleteMessage: () => Promise<void>, uri: string) => void;
30
29
  renderMessage: (props: {
@@ -42,15 +41,15 @@ export type ChannelMessageListProps<T extends SendbirdGroupChannel | SendbirdOpe
42
41
  bottomSheetItem?: BottomSheetItem;
43
42
  isFirstItem: boolean;
44
43
  }) => React.ReactElement | null;
45
- renderNewMessagesButton: null | CommonComponent<{
44
+ renderNewMessagesButton: null | ((props: {
46
45
  visible: boolean;
47
46
  onPress: () => void;
48
47
  newMessages: SendbirdMessage[];
49
- }>;
50
- renderScrollToBottomButton: null | CommonComponent<{
48
+ }) => React.ReactElement | null);
49
+ renderScrollToBottomButton: null | ((props: {
51
50
  visible: boolean;
52
51
  onPress: () => void;
53
- }>;
52
+ }) => React.ReactElement | null);
54
53
  flatListProps?: Omit<FlatListProps<SendbirdMessage>, 'data' | 'renderItem'>;
55
54
  } & {
56
55
  ref?: Ref<FlatList<SendbirdMessage>> | undefined;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { FileType } from '@sendbird/uikit-utils';
3
+ type Props = {
4
+ type: FileType;
5
+ src: string;
6
+ topInset?: number;
7
+ bottomInset?: number;
8
+ maxZoom?: number;
9
+ minZoom?: number;
10
+ onPress?: () => void;
11
+ };
12
+ declare const FileViewerContent: ({ type, src, topInset, bottomInset, maxZoom, minZoom, onPress }: Props) => React.JSX.Element;
13
+ export default FileViewerContent;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ bottomInset: number;
4
+ deleteShown: boolean;
5
+ onPressDelete: () => void;
6
+ onPressDownload: () => void;
7
+ };
8
+ declare const FileViewerFooter: ({ bottomInset, deleteShown, onPressDelete, onPressDownload }: Props) => React.JSX.Element;
9
+ export default FileViewerFooter;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ headerShown?: boolean;
4
+ topInset: number;
5
+ onClose: () => void;
6
+ title: string;
7
+ subtitle: string;
8
+ };
9
+ declare const FileViewerHeader: ({ headerShown, topInset, onClose, subtitle, title }: Props) => React.JSX.Element | null;
10
+ export default FileViewerHeader;