@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
@@ -0,0 +1,133 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeSafeAreaContext = require("react-native-safe-area-context");
10
+ var _uikitReactNativeFoundation = require("@sendbird/uikit-react-native-foundation");
11
+ var _uikitUtils = require("@sendbird/uikit-utils");
12
+ var _useContext = require("../../hooks/useContext");
13
+ var _FileViewerContent = _interopRequireDefault(require("./FileViewerContent"));
14
+ var _FileViewerFooter = _interopRequireDefault(require("./FileViewerFooter"));
15
+ var _FileViewerHeader = _interopRequireDefault(require("./FileViewerHeader"));
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
18
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
19
+ const FileViewer = _ref => {
20
+ let {
21
+ headerShown = true,
22
+ maxZoom = 3,
23
+ minZoom = 1,
24
+ headerTopInset,
25
+ fileMessage,
26
+ onClose,
27
+ onPressDownload,
28
+ onPressDelete,
29
+ deleteMessage
30
+ } = _ref;
31
+ const {
32
+ topInset,
33
+ statusBarTranslucent
34
+ } = (0, _uikitReactNativeFoundation.useHeaderStyle)();
35
+ const {
36
+ bottom
37
+ } = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
38
+ const {
39
+ palette
40
+ } = (0, _uikitReactNativeFoundation.useUIKitTheme)();
41
+ const {
42
+ alert
43
+ } = (0, _uikitReactNativeFoundation.useAlert)();
44
+ const {
45
+ show
46
+ } = (0, _uikitReactNativeFoundation.useToast)();
47
+ const {
48
+ fileService
49
+ } = (0, _useContext.usePlatformService)();
50
+ const {
51
+ currentUser
52
+ } = (0, _useContext.useSendbirdChat)();
53
+ const {
54
+ STRINGS
55
+ } = (0, _useContext.useLocalization)();
56
+ const fileType = (0, _uikitUtils.getFileType)(fileMessage.type || (0, _uikitUtils.getFileExtension)(fileMessage.url));
57
+ const canDelete = (0, _uikitUtils.isMyMessage)(fileMessage, currentUser === null || currentUser === void 0 ? void 0 : currentUser.userId);
58
+ const basicTopInset = statusBarTranslucent ? topInset : 0;
59
+ const onPressDeleteButton = () => {
60
+ if (!canDelete) return;
61
+ if (onPressDelete) {
62
+ onPressDelete(fileMessage);
63
+ } else {
64
+ alert({
65
+ title: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_TITLE,
66
+ buttons: [{
67
+ text: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_CANCEL
68
+ }, {
69
+ text: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_OK,
70
+ style: 'destructive',
71
+ onPress: () => {
72
+ deleteMessage().then(() => {
73
+ onClose();
74
+ }).catch(() => {
75
+ show(STRINGS.TOAST.DELETE_MSG_ERROR, 'error');
76
+ });
77
+ }
78
+ }]
79
+ });
80
+ }
81
+ };
82
+ const onPressDownloadButton = () => {
83
+ if (onPressDownload) {
84
+ onPressDownload(fileMessage);
85
+ } else {
86
+ if ((0, _uikitUtils.toMegabyte)(fileMessage.size) > 4) {
87
+ show(STRINGS.TOAST.DOWNLOAD_START, 'success');
88
+ }
89
+ fileService.save({
90
+ fileUrl: fileMessage.url,
91
+ fileName: fileMessage.name,
92
+ fileType: fileMessage.type
93
+ }).then(response => {
94
+ show(STRINGS.TOAST.DOWNLOAD_OK, 'success');
95
+ _uikitUtils.Logger.log('File saved to', response);
96
+ }).catch(err => {
97
+ show(STRINGS.TOAST.DOWNLOAD_ERROR, 'error');
98
+ _uikitUtils.Logger.log('File save failure', err);
99
+ });
100
+ }
101
+ };
102
+ (0, _react.useEffect)(() => {
103
+ if (fileType === 'file') onClose();
104
+ }, []);
105
+ return /*#__PURE__*/_react.default.createElement(_uikitReactNativeFoundation.Box, {
106
+ flex: 1,
107
+ backgroundColor: palette.background700
108
+ }, /*#__PURE__*/_react.default.createElement(_reactNative.StatusBar, {
109
+ barStyle: 'light-content',
110
+ animated: true
111
+ }), /*#__PURE__*/_react.default.createElement(_FileViewerHeader.default, {
112
+ topInset: headerTopInset ?? basicTopInset,
113
+ headerShown: headerShown,
114
+ title: STRINGS.FILE_VIEWER.TITLE(fileMessage),
115
+ subtitle: STRINGS.FILE_VIEWER.SUBTITLE(fileMessage),
116
+ onClose: onClose
117
+ }), /*#__PURE__*/_react.default.createElement(_FileViewerContent.default, {
118
+ topInset: headerTopInset ?? basicTopInset,
119
+ bottomInset: bottom,
120
+ type: fileType,
121
+ src: fileMessage.url,
122
+ maxZoom: maxZoom,
123
+ minZoom: minZoom
124
+ }), /*#__PURE__*/_react.default.createElement(_FileViewerFooter.default, {
125
+ bottomInset: bottom,
126
+ deleteShown: canDelete,
127
+ onPressDelete: onPressDeleteButton,
128
+ onPressDownload: onPressDownloadButton
129
+ }));
130
+ };
131
+ var _default = FileViewer;
132
+ exports.default = _default;
133
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeSafeAreaContext","_uikitReactNativeFoundation","_uikitUtils","_useContext","_FileViewerContent","_interopRequireDefault","_FileViewerFooter","_FileViewerHeader","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","FileViewer","_ref","headerShown","maxZoom","minZoom","headerTopInset","fileMessage","onClose","onPressDownload","onPressDelete","deleteMessage","topInset","statusBarTranslucent","useHeaderStyle","bottom","useSafeAreaInsets","palette","useUIKitTheme","alert","useAlert","show","useToast","fileService","usePlatformService","currentUser","useSendbirdChat","STRINGS","useLocalization","fileType","getFileType","type","getFileExtension","url","canDelete","isMyMessage","userId","basicTopInset","onPressDeleteButton","title","LABELS","CHANNEL_MESSAGE_DELETE_CONFIRM_TITLE","buttons","text","CHANNEL_MESSAGE_DELETE_CONFIRM_CANCEL","CHANNEL_MESSAGE_DELETE_CONFIRM_OK","style","onPress","then","catch","TOAST","DELETE_MSG_ERROR","onPressDownloadButton","toMegabyte","size","DOWNLOAD_START","save","fileUrl","fileName","name","response","DOWNLOAD_OK","Logger","log","err","DOWNLOAD_ERROR","useEffect","createElement","Box","flex","backgroundColor","background700","StatusBar","barStyle","animated","FILE_VIEWER","TITLE","subtitle","SUBTITLE","bottomInset","src","deleteShown","_default","exports"],"sources":["index.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport { StatusBar } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { Box, useAlert, useHeaderStyle, useToast, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdFileMessage } from '@sendbird/uikit-utils';\nimport { Logger, getFileExtension, getFileType, isMyMessage, toMegabyte } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService, useSendbirdChat } from '../../hooks/useContext';\nimport FileViewerContent from './FileViewerContent';\nimport FileViewerFooter from './FileViewerFooter';\nimport FileViewerHeader from './FileViewerHeader';\n\ntype Props = {\n fileMessage: SendbirdFileMessage;\n deleteMessage: () => Promise<void>;\n\n onClose: () => void;\n onPressDownload?: (message: SendbirdFileMessage) => void;\n onPressDelete?: (message: SendbirdFileMessage) => void;\n\n headerShown?: boolean;\n headerTopInset?: number;\n\n /** This prop is only available on the Image viewer */\n minZoom?: number;\n /** This prop is only available on the Image viewer */\n maxZoom?: number;\n};\n\nconst FileViewer = ({\n headerShown = true,\n maxZoom = 3,\n minZoom = 1,\n headerTopInset,\n fileMessage,\n onClose,\n onPressDownload,\n onPressDelete,\n deleteMessage,\n}: Props) => {\n const { topInset, statusBarTranslucent } = useHeaderStyle();\n const { bottom } = useSafeAreaInsets();\n const { palette } = useUIKitTheme();\n const { alert } = useAlert();\n const { show } = useToast();\n\n const { fileService } = usePlatformService();\n const { currentUser } = useSendbirdChat();\n const { STRINGS } = useLocalization();\n\n const fileType = getFileType(fileMessage.type || getFileExtension(fileMessage.url));\n const canDelete = isMyMessage(fileMessage, currentUser?.userId);\n const basicTopInset = statusBarTranslucent ? topInset : 0;\n\n const onPressDeleteButton = () => {\n if (!canDelete) return;\n\n if (onPressDelete) {\n onPressDelete(fileMessage);\n } else {\n alert({\n title: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_TITLE,\n buttons: [\n {\n text: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_CANCEL,\n },\n {\n text: STRINGS.LABELS.CHANNEL_MESSAGE_DELETE_CONFIRM_OK,\n style: 'destructive',\n onPress: () => {\n deleteMessage()\n .then(() => {\n onClose();\n })\n .catch(() => {\n show(STRINGS.TOAST.DELETE_MSG_ERROR, 'error');\n });\n },\n },\n ],\n });\n }\n };\n\n const onPressDownloadButton = () => {\n if (onPressDownload) {\n onPressDownload(fileMessage);\n } else {\n if (toMegabyte(fileMessage.size) > 4) {\n show(STRINGS.TOAST.DOWNLOAD_START, 'success');\n }\n\n fileService\n .save({ fileUrl: fileMessage.url, fileName: fileMessage.name, fileType: fileMessage.type })\n .then((response) => {\n show(STRINGS.TOAST.DOWNLOAD_OK, 'success');\n Logger.log('File saved to', response);\n })\n .catch((err) => {\n show(STRINGS.TOAST.DOWNLOAD_ERROR, 'error');\n Logger.log('File save failure', err);\n });\n }\n };\n\n useEffect(() => {\n if (fileType === 'file') onClose();\n }, []);\n\n return (\n <Box flex={1} backgroundColor={palette.background700}>\n <StatusBar barStyle={'light-content'} animated />\n <FileViewerHeader\n topInset={headerTopInset ?? basicTopInset}\n headerShown={headerShown}\n title={STRINGS.FILE_VIEWER.TITLE(fileMessage)}\n subtitle={STRINGS.FILE_VIEWER.SUBTITLE(fileMessage)}\n onClose={onClose}\n />\n <FileViewerContent\n topInset={headerTopInset ?? basicTopInset}\n bottomInset={bottom}\n type={fileType}\n src={fileMessage.url}\n maxZoom={maxZoom}\n minZoom={minZoom}\n />\n <FileViewerFooter\n bottomInset={bottom}\n deleteShown={canDelete}\n onPressDelete={onPressDeleteButton}\n onPressDownload={onPressDownloadButton}\n />\n </Box>\n );\n};\n\nexport default FileViewer;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,2BAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,iBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,iB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EV,CAAC;AAAC,IAAA8B,QAAA,GAEajF,UAAU;AAAAkF,OAAA,CAAAtG,OAAA,GAAAqG,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeSafeAreaContext","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_constants","_useContext","obj","__esModule","default","BottomSheetReactionAddon","_ref","onClose","message","channel","emojiManager","currentUser","sdk","useSendbirdChat","updateReactionFocusedItem","openReactionList","useReaction","colors","useUIKitTheme","handlerId","useUniqHandlerId","left","right","useSafeAreaInsets","useChannelHandler","onReactionUpdated","eventChannel","event","url","messageId","msg","getMessage","includeReactions","channelUrl","channelType","emojiAll","allEmoji","slice","color","ui","reaction","createElement","View","style","styles","container","marginRight","marginLeft","map","_ref2","_message$reactions","_message$reactions$fi","key","reactionUserIds","reactions","find","it","userIds","currentUserIdx","indexOf","userId","UNKNOWN_USER_ID","reacted","onPress","deleteReaction","addReaction","Pressable","_ref3","pressed","button","backgroundColor","selected","background","enabled","Image","source","uri","emoji","_ref4","Icon","icon","onBackground03","createStyleSheet","paddingTop","paddingBottom","paddingHorizontal","flexDirection","justifyContent","width","height","padding","borderRadius","_default","exports"],"sources":["BottomSheetReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdBaseChannel, SendbirdBaseMessage, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\n\ntype Props = {\n onClose: () => Promise<void>;\n channel: SendbirdBaseChannel;\n message: SendbirdBaseMessage;\n};\nconst BottomSheetReactionAddon = ({ onClose, message, channel }: Props) => {\n const { emojiManager, currentUser, sdk } = useSendbirdChat();\n const { updateReactionFocusedItem, openReactionList } = useReaction();\n const { colors } = useUIKitTheme();\n const handlerId = useUniqHandlerId('BottomSheetReactionAddon');\n const { left, right } = useSafeAreaInsets();\n\n useChannelHandler(sdk, handlerId, {\n async onReactionUpdated(eventChannel, event) {\n if (channel?.url === eventChannel.url && event.messageId === message?.messageId) {\n const msg = await sdk.message.getMessage({\n includeReactions: true,\n messageId: message.messageId,\n channelUrl: message.channelUrl,\n channelType: message.channelType,\n });\n if (msg) updateReactionFocusedItem({ message: msg });\n }\n },\n });\n\n const emojiAll = emojiManager.allEmoji.slice(0, 5);\n const color = colors.ui.reaction.default;\n\n return (\n <View style={[styles.container, { marginRight: right, marginLeft: left }]}>\n {emojiAll.map(({ key, url }) => {\n const reactionUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n const currentUserIdx = reactionUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = currentUserIdx > -1;\n\n const onPress = () => {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n onClose();\n };\n\n return (\n <Pressable\n key={key}\n onPress={onPress}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n );\n })}\n\n <Pressable\n onPress={async () => {\n await onClose();\n openReactionList({ channel, message });\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} style={styles.emoji} color={colors.onBackground03} />\n </Pressable>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 12,\n paddingBottom: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default BottomSheetReactionAddon;\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AAC,CACpF;IAAA;EAAC,gBAEFhF,MAAA,CAAAY,OAAA,CAAAqC,aAAA,CAAC3C,2BAAA,CAAAiF,IAAI;IAACC,IAAI,EAAE,YAAa;IAACrC,KAAK,EAAEC,MAAM,CAACiC,KAAM;IAACvC,KAAK,EAAErB,MAAM,CAACgE;EAAe,EAAG,CACrE,CACP;AAEX,CAAC;AAED,MAAMrC,MAAM,GAAG,IAAAsC,4CAAgB,EAAC;EAC9BrC,SAAS,EAAE;IACTsC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE,EAAE;IACjBC,iBAAiB,EAAE,EAAE;IACrBC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDlB,MAAM,EAAE;IACNmB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,OAAO,EAAE,CAAC;IACVC,YAAY,EAAE;EAChB,CAAC;EACDd,KAAK,EAAE;IACLW,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAAC,IAAAG,QAAA,GAEYvF,wBAAwB;AAAAwF,OAAA,CAAAzF,OAAA,GAAAwF,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeSafeAreaContext","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_constants","_useContext","obj","__esModule","default","BottomSheetReactionAddon","_ref","onClose","message","channel","emojiManager","currentUser","sdk","useSendbirdChat","updateReactionFocusedItem","openReactionList","useReaction","colors","useUIKitTheme","handlerId","useUniqHandlerId","left","right","useSafeAreaInsets","useChannelHandler","onReactionUpdated","eventChannel","event","url","messageId","msg","getMessage","includeReactions","channelUrl","channelType","emojiAll","allEmoji","slice","color","ui","reaction","createElement","View","style","styles","container","marginRight","marginLeft","map","_ref2","_message$reactions","_message$reactions$fi","key","reactionUserIds","reactions","find","it","userIds","currentUserIdx","indexOf","userId","UNKNOWN_USER_ID","reacted","onPress","deleteReaction","addReaction","Pressable","_ref3","pressed","button","backgroundColor","selected","background","enabled","Image","source","uri","emoji","_ref4","Icon","icon","onBackground03","createStyleSheet","paddingTop","paddingBottom","paddingHorizontal","flexDirection","justifyContent","width","height","padding","borderRadius","_default","exports"],"sources":["BottomSheetReactionAddon.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable, View } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\n\nimport type { BaseMessage } from '@sendbird/chat/message';\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { Icon, Image, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';\nimport { SendbirdBaseChannel, SendbirdBaseMessage, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport { UNKNOWN_USER_ID } from '../../constants';\nimport { useReaction, useSendbirdChat } from '../../hooks/useContext';\n\ntype Props = {\n onClose: () => Promise<void>;\n channel: SendbirdBaseChannel;\n message: SendbirdBaseMessage;\n};\nconst BottomSheetReactionAddon = ({ onClose, message, channel }: Props) => {\n const { emojiManager, currentUser, sdk } = useSendbirdChat();\n const { updateReactionFocusedItem, openReactionList } = useReaction();\n const { colors } = useUIKitTheme();\n const handlerId = useUniqHandlerId('BottomSheetReactionAddon');\n const { left, right } = useSafeAreaInsets();\n\n useChannelHandler(sdk, handlerId, {\n async onReactionUpdated(eventChannel, event) {\n if (channel?.url === eventChannel.url && event.messageId === message?.messageId) {\n const msg = (await sdk.message.getMessage({\n includeReactions: true,\n messageId: message.messageId,\n channelUrl: message.channelUrl,\n channelType: message.channelType,\n })) as null | BaseMessage;\n if (msg) updateReactionFocusedItem({ message: msg });\n }\n },\n });\n\n const emojiAll = emojiManager.allEmoji.slice(0, 5);\n const color = colors.ui.reaction.default;\n\n return (\n <View style={[styles.container, { marginRight: right, marginLeft: left }]}>\n {emojiAll.map(({ key, url }) => {\n const reactionUserIds = message?.reactions?.find((it) => it.key === key)?.userIds ?? [];\n const currentUserIdx = reactionUserIds.indexOf(currentUser?.userId ?? UNKNOWN_USER_ID);\n const reacted = currentUserIdx > -1;\n\n const onPress = () => {\n if (reacted) channel.deleteReaction(message, key);\n else channel.addReaction(message, key);\n onClose();\n };\n\n return (\n <Pressable\n key={key}\n onPress={onPress}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: reacted || pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Image source={{ uri: url }} style={styles.emoji} />\n </Pressable>\n );\n })}\n\n <Pressable\n onPress={async () => {\n await onClose();\n openReactionList({ channel, message });\n }}\n style={({ pressed }) => [\n styles.button,\n { backgroundColor: pressed ? color.selected.background : color.enabled.background },\n ]}\n >\n <Icon icon={'emoji-more'} style={styles.emoji} color={colors.onBackground03} />\n </Pressable>\n </View>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n paddingTop: 12,\n paddingBottom: 16,\n paddingHorizontal: 18,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n button: {\n width: 44,\n height: 44,\n padding: 4,\n borderRadius: 8,\n },\n emoji: {\n width: '100%',\n height: '100%',\n },\n});\n\nexport default BottomSheetReactionAddon;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAGA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AAEA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAsE,SAAAD,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAOtE,MAAMG,wBAAwB,GAAGC,IAAA,IAA0C;EAAA,IAAzC;IAAEC,OAAO;IAAEC,OAAO;IAAEC;EAAe,CAAC,GAAAH,IAAA;EACpE,MAAM;IAAEI,YAAY;IAAEC,WAAW;IAAEC;EAAI,CAAC,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AAE;IACLW,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC;AAAC,IAAAG,QAAA,GAEYvF,wBAAwB;AAAAwF,OAAA,CAAAzF,OAAA,GAAAwF,QAAA"}
@@ -54,9 +54,11 @@ const GroupChannelMessageList = props => {
54
54
  });
55
55
  } else {
56
56
  if (props.channel.messageOffsetTimestamp <= createdAt) {
57
- if (focusAnimated) props.onUpdateSearchItem({
58
- startingPoint: createdAt
59
- });
57
+ if (focusAnimated) {
58
+ props.onUpdateSearchItem({
59
+ startingPoint: createdAt
60
+ });
61
+ }
60
62
  props.onResetMessageListWithStartingPoint(createdAt);
61
63
  } else {
62
64
  return false;
@@ -64,16 +66,15 @@ const GroupChannelMessageList = props => {
64
66
  }
65
67
  return true;
66
68
  });
67
- const scrollToBottom = (0, _uikitUtils.useFreshCallback)(function () {
69
+ const scrollToBottom = (0, _uikitUtils.useFreshCallback)(async function () {
68
70
  let animated = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
69
71
  if (props.hasNext()) {
70
72
  props.onUpdateSearchItem(undefined);
71
73
  props.onScrolledAwayFromBottom(false);
72
- props.onResetMessageList(() => {
73
- props.onScrolledAwayFromBottom(false);
74
- lazyScrollToBottom({
75
- animated
76
- });
74
+ await props.onResetMessageList();
75
+ props.onScrolledAwayFromBottom(false);
76
+ lazyScrollToBottom({
77
+ animated
77
78
  });
78
79
  } else {
79
80
  lazyScrollToBottom({
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_ChannelMessageList","_interopRequireDefault","_constants","_useContext","_moduleContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","GroupChannelMessageList","props","toast","useToast","STRINGS","useLocalization","sdk","useSendbirdChat","setMessageToEdit","setMessageToReply","useContext","GroupChannelContexts","Fragment","subscribe","PubSub","flatListRef","lazyScrollToBottom","lazyScrollToIndex","MessageList","id","useUniqHandlerId","isFirstMount","useIsFirstMount","scrollToMessageWithCreatedAt","useFreshCallback","createdAt","focusAnimated","timeout","foundMessageIndex","messages","findIndex","it","isIncludedInList","setTimeout","onUpdateSearchItem","startingPoint","MESSAGE_FOCUS_ANIMATION_DELAY","index","animated","channel","messageOffsetTimestamp","onResetMessageListWithStartingPoint","scrollToBottom","undefined","hasNext","onScrolledAwayFromBottom","onResetMessageList","useChannelHandler","onReactionUpdated","event","isDifferentChannel","recentMessage","isRecentMessage","messageId","scrollReachedBottomAndCanScroll","scrolledAwayFromBottom","useEffect","_ref","type","searchItem","MESSAGE_SEARCH_SAFE_SCROLL_DELAY","onPressParentMessage","message","canScrollToParent","show","TOAST","FIND_PARENT_MSG_ERROR","createElement","ref","onReplyMessage","onEditMessage","onPressNewMessagesButton","onPressScrollToBottomButton","_default","React","memo","exports"],"sources":["GroupChannelMessageList.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { useToast } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { isDifferentChannel, useFreshCallback, useIsFirstMount, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport ChannelMessageList from '../../../components/ChannelMessageList';\nimport { MESSAGE_FOCUS_ANIMATION_DELAY, MESSAGE_SEARCH_SAFE_SCROLL_DELAY } from '../../../constants';\nimport { useLocalization, useSendbirdChat } from '../../../hooks/useContext';\nimport { GroupChannelContexts } from '../module/moduleContext';\nimport type { GroupChannelProps } from '../types';\n\nconst GroupChannelMessageList = (props: GroupChannelProps['MessageList']) => {\n const toast = useToast();\n const { STRINGS } = useLocalization();\n const { sdk } = useSendbirdChat();\n const { setMessageToEdit, setMessageToReply } = useContext(GroupChannelContexts.Fragment);\n const { subscribe } = useContext(GroupChannelContexts.PubSub);\n const { flatListRef, lazyScrollToBottom, lazyScrollToIndex } = useContext(GroupChannelContexts.MessageList);\n\n const id = useUniqHandlerId('GroupChannelMessageList');\n const isFirstMount = useIsFirstMount();\n\n const scrollToMessageWithCreatedAt = useFreshCallback(\n (createdAt: number, focusAnimated: boolean, timeout: number): boolean => {\n const foundMessageIndex = props.messages.findIndex((it) => it.createdAt === createdAt);\n const isIncludedInList = foundMessageIndex > -1;\n\n if (isIncludedInList) {\n if (focusAnimated) {\n setTimeout(() => props.onUpdateSearchItem({ startingPoint: createdAt }), MESSAGE_FOCUS_ANIMATION_DELAY);\n }\n lazyScrollToIndex({ index: foundMessageIndex, animated: true, timeout });\n } else {\n if (props.channel.messageOffsetTimestamp <= createdAt) {\n if (focusAnimated) props.onUpdateSearchItem({ startingPoint: createdAt });\n props.onResetMessageListWithStartingPoint(createdAt);\n } else {\n return false;\n }\n }\n return true;\n },\n );\n\n const scrollToBottom = useFreshCallback((animated = false) => {\n if (props.hasNext()) {\n props.onUpdateSearchItem(undefined);\n props.onScrolledAwayFromBottom(false);\n\n props.onResetMessageList(() => {\n props.onScrolledAwayFromBottom(false);\n lazyScrollToBottom({ animated });\n });\n } else {\n lazyScrollToBottom({ animated });\n }\n });\n\n useChannelHandler(sdk, id, {\n onReactionUpdated(channel, event) {\n if (isDifferentChannel(channel, props.channel)) return;\n const recentMessage = props.messages[0];\n const isRecentMessage = recentMessage && recentMessage.messageId === event.messageId;\n const scrollReachedBottomAndCanScroll = !props.scrolledAwayFromBottom && !props.hasNext();\n if (isRecentMessage && scrollReachedBottomAndCanScroll) {\n lazyScrollToBottom({ animated: true, timeout: 250 });\n }\n },\n });\n\n useEffect(() => {\n return subscribe(({ type }) => {\n switch (type) {\n case 'TYPING_BUBBLE_RENDERED':\n case 'MESSAGES_RECEIVED': {\n if (!props.scrolledAwayFromBottom) {\n scrollToBottom(true);\n }\n break;\n }\n case 'MESSAGE_SENT_SUCCESS':\n case 'MESSAGE_SENT_PENDING': {\n scrollToBottom(false);\n break;\n }\n }\n });\n }, [props.scrolledAwayFromBottom]);\n\n useEffect(() => {\n // Only trigger once when message list mount with initial props.searchItem\n // - Search screen + searchItem > mount message list\n // - Reset message list + searchItem > re-mount message list\n if (isFirstMount && props.searchItem) {\n scrollToMessageWithCreatedAt(props.searchItem.startingPoint, false, MESSAGE_SEARCH_SAFE_SCROLL_DELAY);\n }\n }, [isFirstMount]);\n\n const onPressParentMessage = useFreshCallback((message: SendbirdMessage) => {\n const canScrollToParent = scrollToMessageWithCreatedAt(message.createdAt, true, 0);\n if (!canScrollToParent) toast.show(STRINGS.TOAST.FIND_PARENT_MSG_ERROR, 'error');\n });\n\n return (\n <ChannelMessageList\n {...props}\n ref={flatListRef}\n onReplyMessage={setMessageToReply}\n onEditMessage={setMessageToEdit}\n onPressParentMessage={onPressParentMessage}\n onPressNewMessagesButton={scrollToBottom}\n onPressScrollToBottomButton={scrollToBottom}\n />\n );\n};\n\nexport default React.memo(GroupChannelMessageList);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAA+D,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAA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AC6D,KAAK,CAACC,qBAAqB,EAAE,OAAO,CAAC;EAClF,CAAC,CAAC;EAEF,oBACE5G,MAAA,CAAAa,OAAA,CAAAgG,aAAA,CAACvG,mBAAA,CAAAO,OAAkB,EAAAoB,QAAA,KACbU,KAAK;IACTmE,GAAG,EAAErD,WAAY;IACjBsD,cAAc,EAAE5D,iBAAkB;IAClC6D,aAAa,EAAE9D,gBAAiB;IAChCqD,oBAAoB,EAAEA,oBAAqB;IAC3CU,wBAAwB,EAAE7B,cAAe;IACzC8B,2BAA2B,EAAE9B;EAAe,GAC5C;AAEN,CAAC;AAAC,IAAA+B,QAAA,gBAEaC,cAAK,CAACC,IAAI,CAAC3E,uBAAuB,CAAC;AAAA4E,OAAA,CAAAzG,OAAA,GAAAsG,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_ChannelMessageList","_interopRequireDefault","_constants","_useContext","_moduleContext","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_extends","assign","bind","target","i","arguments","length","source","apply","GroupChannelMessageList","props","toast","useToast","STRINGS","useLocalization","sdk","useSendbirdChat","setMessageToEdit","setMessageToReply","useContext","GroupChannelContexts","Fragment","subscribe","PubSub","flatListRef","lazyScrollToBottom","lazyScrollToIndex","MessageList","id","useUniqHandlerId","isFirstMount","useIsFirstMount","scrollToMessageWithCreatedAt","useFreshCallback","createdAt","focusAnimated","timeout","foundMessageIndex","messages","findIndex","it","isIncludedInList","setTimeout","onUpdateSearchItem","startingPoint","MESSAGE_FOCUS_ANIMATION_DELAY","index","animated","channel","messageOffsetTimestamp","onResetMessageListWithStartingPoint","scrollToBottom","undefined","hasNext","onScrolledAwayFromBottom","onResetMessageList","useChannelHandler","onReactionUpdated","event","isDifferentChannel","recentMessage","isRecentMessage","messageId","scrollReachedBottomAndCanScroll","scrolledAwayFromBottom","useEffect","_ref","type","searchItem","MESSAGE_SEARCH_SAFE_SCROLL_DELAY","onPressParentMessage","message","canScrollToParent","show","TOAST","FIND_PARENT_MSG_ERROR","createElement","ref","onReplyMessage","onEditMessage","onPressNewMessagesButton","onPressScrollToBottomButton","_default","React","memo","exports"],"sources":["GroupChannelMessageList.tsx"],"sourcesContent":["import React, { useContext, useEffect } from 'react';\n\nimport { useChannelHandler } from '@sendbird/uikit-chat-hooks';\nimport { useToast } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { isDifferentChannel, useFreshCallback, useIsFirstMount, useUniqHandlerId } from '@sendbird/uikit-utils';\n\nimport ChannelMessageList from '../../../components/ChannelMessageList';\nimport { MESSAGE_FOCUS_ANIMATION_DELAY, MESSAGE_SEARCH_SAFE_SCROLL_DELAY } from '../../../constants';\nimport { useLocalization, useSendbirdChat } from '../../../hooks/useContext';\nimport { GroupChannelContexts } from '../module/moduleContext';\nimport type { GroupChannelProps } from '../types';\n\nconst GroupChannelMessageList = (props: GroupChannelProps['MessageList']) => {\n const toast = useToast();\n const { STRINGS } = useLocalization();\n const { sdk } = useSendbirdChat();\n const { setMessageToEdit, setMessageToReply } = useContext(GroupChannelContexts.Fragment);\n const { subscribe } = useContext(GroupChannelContexts.PubSub);\n const { flatListRef, lazyScrollToBottom, lazyScrollToIndex } = useContext(GroupChannelContexts.MessageList);\n\n const id = useUniqHandlerId('GroupChannelMessageList');\n const isFirstMount = useIsFirstMount();\n\n const scrollToMessageWithCreatedAt = useFreshCallback(\n (createdAt: number, focusAnimated: boolean, timeout: number): boolean => {\n const foundMessageIndex = props.messages.findIndex((it) => it.createdAt === createdAt);\n const isIncludedInList = foundMessageIndex > -1;\n\n if (isIncludedInList) {\n if (focusAnimated) {\n setTimeout(() => props.onUpdateSearchItem({ startingPoint: createdAt }), MESSAGE_FOCUS_ANIMATION_DELAY);\n }\n lazyScrollToIndex({ index: foundMessageIndex, animated: true, timeout });\n } else {\n if (props.channel.messageOffsetTimestamp <= createdAt) {\n if (focusAnimated) {\n props.onUpdateSearchItem({ startingPoint: createdAt });\n }\n props.onResetMessageListWithStartingPoint(createdAt);\n } else {\n return false;\n }\n }\n return true;\n },\n );\n\n const scrollToBottom = useFreshCallback(async (animated = false) => {\n if (props.hasNext()) {\n props.onUpdateSearchItem(undefined);\n props.onScrolledAwayFromBottom(false);\n\n await props.onResetMessageList();\n props.onScrolledAwayFromBottom(false);\n lazyScrollToBottom({ animated });\n } else {\n lazyScrollToBottom({ animated });\n }\n });\n\n useChannelHandler(sdk, id, {\n onReactionUpdated(channel, event) {\n if (isDifferentChannel(channel, props.channel)) return;\n const recentMessage = props.messages[0];\n const isRecentMessage = recentMessage && recentMessage.messageId === event.messageId;\n const scrollReachedBottomAndCanScroll = !props.scrolledAwayFromBottom && !props.hasNext();\n if (isRecentMessage && scrollReachedBottomAndCanScroll) {\n lazyScrollToBottom({ animated: true, timeout: 250 });\n }\n },\n });\n\n useEffect(() => {\n return subscribe(({ type }) => {\n switch (type) {\n case 'TYPING_BUBBLE_RENDERED':\n case 'MESSAGES_RECEIVED': {\n if (!props.scrolledAwayFromBottom) {\n scrollToBottom(true);\n }\n break;\n }\n case 'MESSAGE_SENT_SUCCESS':\n case 'MESSAGE_SENT_PENDING': {\n scrollToBottom(false);\n break;\n }\n }\n });\n }, [props.scrolledAwayFromBottom]);\n\n useEffect(() => {\n // Only trigger once when message list mount with initial props.searchItem\n // - Search screen + searchItem > mount message list\n // - Reset message list + searchItem > re-mount message list\n if (isFirstMount && props.searchItem) {\n scrollToMessageWithCreatedAt(props.searchItem.startingPoint, false, MESSAGE_SEARCH_SAFE_SCROLL_DELAY);\n }\n }, [isFirstMount]);\n\n const onPressParentMessage = useFreshCallback((message: SendbirdMessage) => {\n const canScrollToParent = scrollToMessageWithCreatedAt(message.createdAt, true, 0);\n if (!canScrollToParent) toast.show(STRINGS.TOAST.FIND_PARENT_MSG_ERROR, 'error');\n });\n\n return (\n <ChannelMessageList\n {...props}\n ref={flatListRef}\n onReplyMessage={setMessageToReply}\n onEditMessage={setMessageToEdit}\n onPressParentMessage={onPressParentMessage}\n onPressNewMessagesButton={scrollToBottom}\n onPressScrollToBottomButton={scrollToBottom}\n />\n );\n};\n\nexport default React.memo(GroupChannelMessageList);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,2BAAA,GAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,mBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,cAAA,GAAAR,OAAA;AAA+D,SAAAK,uBAAAI,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAd,wBAAAU,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAQ,KAAA,GAAAL,wBAAA,CAAAC,WAAA,OAAAI,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wB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AAC;AAAA4E,OAAA,CAAAzG,OAAA,GAAAsG,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatList } from 'react-native';\n\nimport type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n OnBeforeHandler,\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdGroupChannel,\n SendbirdMessage,\n SendbirdUser,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n SendbirdUserMessageUpdateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { ChannelInputProps, SuggestedMentionListProps } from '../../components/ChannelInput';\nimport type { ChannelMessageListProps } from '../../components/ChannelMessageList';\nimport type { CommonComponent } from '../../types';\nimport type { PubSub } from '../../utils/pubsub';\n\nexport interface GroupChannelProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: GroupChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelProps['Header']['onPressHeaderRight'];\n onPressMediaMessage?: GroupChannelProps['MessageList']['onPressMediaMessage'];\n\n onBeforeSendUserMessage?: OnBeforeHandler<SendbirdUserMessageCreateParams>;\n onBeforeSendFileMessage?: OnBeforeHandler<SendbirdFileMessageCreateParams>;\n onBeforeUpdateUserMessage?: OnBeforeHandler<SendbirdUserMessageUpdateParams>;\n onBeforeUpdateFileMessage?: OnBeforeHandler<SendbirdFileMessageUpdateParams>;\n\n renderMessage?: GroupChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: GroupChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: GroupChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableTypingIndicator?: GroupChannelProps['Provider']['enableTypingIndicator'];\n enableMessageGrouping?: GroupChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: GroupChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: GroupChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseGroupChannelMessagesOptions['sortComparator'];\n collectionCreator?: UseGroupChannelMessagesOptions['collectionCreator'];\n\n searchItem?: GroupChannelProps['MessageList']['searchItem'];\n };\n Header: {\n shouldHideRight: () => boolean;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n MessageList: Pick<\n ChannelMessageListProps<SendbirdGroupChannel>,\n | 'enableMessageGrouping'\n | 'currentUserId'\n | 'channel'\n | 'messages'\n | 'newMessages'\n | 'scrolledAwayFromBottom'\n | 'onScrolledAwayFromBottom'\n | 'onTopReached'\n | 'onBottomReached'\n | 'onResendFailedMessage'\n | 'onDeleteMessage'\n | 'onPressMediaMessage'\n | 'renderMessage'\n | 'renderNewMessagesButton'\n | 'renderScrollToBottomButton'\n | 'flatListProps'\n | 'hasNext'\n | 'searchItem'\n > & {\n onResetMessageList: (callback?: () => void) => void;\n onResetMessageListWithStartingPoint: (startingPoint: number, callback?: () => void) => void;\n\n // Changing the search item will trigger the focus animation on messages.\n onUpdateSearchItem: (searchItem?: GroupChannelProps['MessageList']['searchItem']) => void;\n };\n Input: Pick<\n ChannelInputProps,\n | 'shouldRenderInput'\n | 'onPressSendUserMessage'\n | 'onPressSendFileMessage'\n | 'onPressUpdateUserMessage'\n | 'onPressUpdateFileMessage'\n | 'SuggestedMentionList'\n | 'AttachmentsButton'\n >;\n\n SuggestedMentionList: SuggestedMentionListProps;\n Provider: {\n channel: SendbirdGroupChannel;\n enableTypingIndicator: boolean;\n keyboardAvoidOffset?: number;\n groupChannelPubSub: PubSub<GroupChannelPubSubContextPayload>;\n\n messages: SendbirdMessage[];\n // Changing the search item will trigger the focus animation on messages.\n onUpdateSearchItem: (searchItem?: GroupChannelProps['MessageList']['searchItem']) => void;\n };\n}\n\n/**\n * Internal context for GroupChannel\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelContextsType {\n Fragment: React.Context<{\n headerTitle: string;\n keyboardAvoidOffset?: number;\n channel: SendbirdGroupChannel;\n messageToEdit?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToEdit: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n messageToReply?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToReply: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n }>;\n TypingIndicator: React.Context<{\n typingUsers: SendbirdUser[];\n }>;\n PubSub: React.Context<PubSub<GroupChannelPubSubContextPayload>>;\n MessageList: React.Context<{\n /**\n * ref object for FlatList of MessageList\n * */\n flatListRef: React.MutableRefObject<FlatList | null>;\n /**\n * Function that scrolls to a message within a group channel.\n * @param messageId {number} - The id of the message to scroll.\n * @param options {object} - Scroll options (optional).\n * @param options.focusAnimated {boolean} - Enable a shake animation on the message component upon completion of scrolling.\n * @param options.viewPosition {number} - Position information to adjust the visible area during scrolling. bottom(0) ~ top(1.0)\n *\n * @example\n * ```\n * const { scrollToMessage } = useContext(GroupChannelContexts.MessageList);\n * const messageIncludedInMessageList = scrollToMessage(lastMessage.messageId, { focusAnimated: true, viewPosition: 1 });\n * if (!messageIncludedInMessageList) console.warn('Message not found in the message list.');\n * ```\n * */\n scrollToMessage: (messageId: number, options?: { focusAnimated?: boolean; viewPosition?: number }) => boolean;\n /**\n * Call the FlatList function asynchronously to scroll to bottom lazily\n * to avoid scrolling before data rendering has been committed.\n * */\n lazyScrollToBottom: (params?: { animated?: boolean; timeout?: number }) => void;\n /**\n * Call the FlatList function asynchronously to scroll to index lazily.\n * to avoid scrolling before data rendering has been committed.\n * */\n lazyScrollToIndex: (params?: {\n index?: number;\n animated?: boolean;\n timeout?: number;\n viewPosition?: number;\n }) => void;\n }>;\n}\nexport interface GroupChannelModule {\n Provider: CommonComponent<GroupChannelProps['Provider']>;\n Header: CommonComponent<GroupChannelProps['Header']>;\n MessageList: CommonComponent<GroupChannelProps['MessageList']>;\n Input: CommonComponent<GroupChannelProps['Input']>;\n SuggestedMentionList: CommonComponent<GroupChannelProps['SuggestedMentionList']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type GroupChannelFragment = CommonComponent<GroupChannelProps['Fragment']>;\n\nexport type GroupChannelPubSubContextPayload =\n | {\n type: 'MESSAGE_SENT_PENDING' | 'MESSAGE_SENT_SUCCESS';\n data: {\n message: SendbirdUserMessage | SendbirdFileMessage;\n };\n }\n | {\n type: 'MESSAGES_RECEIVED' | 'MESSAGES_UPDATED';\n data: {\n messages: SendbirdMessage[];\n };\n }\n | {\n type: 'TYPING_BUBBLE_RENDERED';\n data?: undefined;\n };\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatList } from 'react-native';\n\nimport type { MessageCollectionParams, MessageFilterParams } from '@sendbird/chat/groupChannel';\nimport type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n OnBeforeHandler,\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdGroupChannel,\n SendbirdMessage,\n SendbirdUser,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n SendbirdUserMessageUpdateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { ChannelInputProps, SuggestedMentionListProps } from '../../components/ChannelInput';\nimport type { ChannelMessageListProps } from '../../components/ChannelMessageList';\nimport type { CommonComponent } from '../../types';\nimport type { PubSub } from '../../utils/pubsub';\n\nexport type MessageListQueryParamsType = Omit<MessageCollectionParams, 'filter'> & MessageFilterParams;\nexport interface GroupChannelProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: GroupChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelProps['Header']['onPressHeaderRight'];\n onPressMediaMessage?: GroupChannelProps['MessageList']['onPressMediaMessage'];\n\n onBeforeSendUserMessage?: OnBeforeHandler<SendbirdUserMessageCreateParams>;\n onBeforeSendFileMessage?: OnBeforeHandler<SendbirdFileMessageCreateParams>;\n onBeforeUpdateUserMessage?: OnBeforeHandler<SendbirdUserMessageUpdateParams>;\n onBeforeUpdateFileMessage?: OnBeforeHandler<SendbirdFileMessageUpdateParams>;\n\n renderMessage?: GroupChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: GroupChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: GroupChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableTypingIndicator?: GroupChannelProps['Provider']['enableTypingIndicator'];\n enableMessageGrouping?: GroupChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: GroupChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: GroupChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseGroupChannelMessagesOptions['sortComparator'];\n\n searchItem?: GroupChannelProps['MessageList']['searchItem'];\n\n /**\n * @description You can specify the query parameters for the message list.\n * @example\n * ```\n * <GroupChannelFragment messageListQueryParams={{ prevResultLimit: 20, customTypesFilter: ['filter'] }} />\n * ```\n * */\n messageListQueryParams?: MessageListQueryParamsType;\n /** @deprecated Please use `messageListQueryParams` instead */\n collectionCreator?: UseGroupChannelMessagesOptions['collectionCreator'];\n };\n Header: {\n shouldHideRight: () => boolean;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n MessageList: Pick<\n ChannelMessageListProps<SendbirdGroupChannel>,\n | 'enableMessageGrouping'\n | 'currentUserId'\n | 'channel'\n | 'messages'\n | 'newMessages'\n | 'scrolledAwayFromBottom'\n | 'onScrolledAwayFromBottom'\n | 'onTopReached'\n | 'onBottomReached'\n | 'onResendFailedMessage'\n | 'onDeleteMessage'\n | 'onPressMediaMessage'\n | 'renderMessage'\n | 'renderNewMessagesButton'\n | 'renderScrollToBottomButton'\n | 'flatListProps'\n | 'hasNext'\n | 'searchItem'\n > & {\n onResetMessageList: () => Promise<void>;\n onResetMessageListWithStartingPoint: (startingPoint: number) => Promise<void>;\n\n // Changing the search item will trigger the focus animation on messages.\n onUpdateSearchItem: (searchItem?: GroupChannelProps['MessageList']['searchItem']) => void;\n };\n Input: Pick<\n ChannelInputProps,\n | 'shouldRenderInput'\n | 'onPressSendUserMessage'\n | 'onPressSendFileMessage'\n | 'onPressUpdateUserMessage'\n | 'onPressUpdateFileMessage'\n | 'SuggestedMentionList'\n | 'AttachmentsButton'\n >;\n\n SuggestedMentionList: SuggestedMentionListProps;\n Provider: {\n channel: SendbirdGroupChannel;\n enableTypingIndicator: boolean;\n keyboardAvoidOffset?: number;\n groupChannelPubSub: PubSub<GroupChannelPubSubContextPayload>;\n\n messages: SendbirdMessage[];\n // Changing the search item will trigger the focus animation on messages.\n onUpdateSearchItem: (searchItem?: GroupChannelProps['MessageList']['searchItem']) => void;\n };\n}\n\n/**\n * Internal context for GroupChannel\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelContextsType {\n Fragment: React.Context<{\n headerTitle: string;\n keyboardAvoidOffset?: number;\n channel: SendbirdGroupChannel;\n messageToEdit?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToEdit: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n messageToReply?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToReply: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n }>;\n TypingIndicator: React.Context<{\n typingUsers: SendbirdUser[];\n }>;\n PubSub: React.Context<PubSub<GroupChannelPubSubContextPayload>>;\n MessageList: React.Context<{\n /**\n * ref object for FlatList of MessageList\n * */\n flatListRef: React.MutableRefObject<FlatList | null>;\n /**\n * Function that scrolls to a message within a group channel.\n * @param messageId {number} - The id of the message to scroll.\n * @param options {object} - Scroll options (optional).\n * @param options.focusAnimated {boolean} - Enable a shake animation on the message component upon completion of scrolling.\n * @param options.viewPosition {number} - Position information to adjust the visible area during scrolling. bottom(0) ~ top(1.0)\n *\n * @example\n * ```\n * const { scrollToMessage } = useContext(GroupChannelContexts.MessageList);\n * const messageIncludedInMessageList = scrollToMessage(lastMessage.messageId, { focusAnimated: true, viewPosition: 1 });\n * if (!messageIncludedInMessageList) console.warn('Message not found in the message list.');\n * ```\n * */\n scrollToMessage: (messageId: number, options?: { focusAnimated?: boolean; viewPosition?: number }) => boolean;\n /**\n * Call the FlatList function asynchronously to scroll to bottom lazily\n * to avoid scrolling before data rendering has been committed.\n * */\n lazyScrollToBottom: (params?: { animated?: boolean; timeout?: number }) => void;\n /**\n * Call the FlatList function asynchronously to scroll to index lazily.\n * to avoid scrolling before data rendering has been committed.\n * */\n lazyScrollToIndex: (params?: {\n index?: number;\n animated?: boolean;\n timeout?: number;\n viewPosition?: number;\n }) => void;\n }>;\n}\nexport interface GroupChannelModule {\n Provider: CommonComponent<GroupChannelProps['Provider']>;\n Header: CommonComponent<GroupChannelProps['Header']>;\n MessageList: CommonComponent<GroupChannelProps['MessageList']>;\n Input: CommonComponent<GroupChannelProps['Input']>;\n SuggestedMentionList: CommonComponent<GroupChannelProps['SuggestedMentionList']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type GroupChannelFragment = React.FC<GroupChannelProps['Fragment']>;\n\nexport type GroupChannelPubSubContextPayload =\n | {\n type: 'MESSAGE_SENT_PENDING' | 'MESSAGE_SENT_SUCCESS';\n data: {\n message: SendbirdUserMessage | SendbirdFileMessage;\n };\n }\n | {\n type: 'MESSAGES_RECEIVED' | 'MESSAGES_UPDATED';\n data: {\n messages: SendbirdMessage[];\n };\n }\n | {\n type: 'TYPING_BUBBLE_RENDERED';\n data?: undefined;\n };\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 { SendbirdGroupChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelBannedUsersProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelBannedUsersProps['Header']['onPressHeaderLeft'];\n renderUser?: GroupChannelBannedUsersProps['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 bannedUsers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n onLoadNext: () => Promise<void>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelBannedUsers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelBannedUsersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelBannedUsersModule {\n Provider: CommonComponent<GroupChannelBannedUsersProps['Provider']>;\n Header: CommonComponent<GroupChannelBannedUsersProps['Header']>;\n List: CommonComponent<GroupChannelBannedUsersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelBannedUsersProps['StatusError']>;\n}\n\nexport type GroupChannelBannedUsersFragment = CommonComponent<GroupChannelBannedUsersProps['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 { SendbirdGroupChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelBannedUsersProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelBannedUsersProps['Header']['onPressHeaderLeft'];\n renderUser?: GroupChannelBannedUsersProps['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 bannedUsers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n onLoadNext: () => Promise<void>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelBannedUsers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelBannedUsersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelBannedUsersModule {\n Provider: CommonComponent<GroupChannelBannedUsersProps['Provider']>;\n Header: CommonComponent<GroupChannelBannedUsersProps['Header']>;\n List: CommonComponent<GroupChannelBannedUsersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelBannedUsersProps['StatusError']>;\n}\n\nexport type GroupChannelBannedUsersFragment = React.FC<GroupChannelBannedUsersProps['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 { UseGroupChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { ActionMenuItem } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport interface GroupChannelListProps {\n Fragment: {\n onPressChannel: GroupChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: (channelType: GroupChannelType) => void;\n renderGroupChannelPreview?: GroupChannelListProps['List']['renderGroupChannelPreview'];\n skipTypeSelection?: boolean;\n collectionCreator?: UseGroupChannelListOptions['collectionCreator'];\n flatListProps?: GroupChannelListProps['List']['flatListProps'];\n menuItemCreator?: GroupChannelListProps['List']['menuItemCreator'];\n };\n Header: {};\n List: {\n onPressChannel: (channel: SendbirdGroupChannel) => void;\n groupChannels: SendbirdGroupChannel[];\n renderGroupChannelPreview: (props: {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdGroupChannel>, 'data' | 'renderItem'>;\n menuItemCreator?: (defaultMenuItem: ActionMenuItem) => ActionMenuItem;\n };\n TypeSelector: {\n skipTypeSelection: boolean;\n onSelectType: (type: GroupChannelType) => void;\n };\n}\n\n/**\n * Internal context for GroupChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelListContextsType {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n TypeSelector: React.Context<{\n visible: boolean;\n show: () => void;\n hide: () => void;\n headerTitle: string;\n }>;\n}\nexport interface GroupChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<GroupChannelListProps['Header']>;\n List: CommonComponent<GroupChannelListProps['List']>;\n TypeSelector: CommonComponent<GroupChannelListProps['TypeSelector']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type GroupChannelListFragment = CommonComponent<GroupChannelListProps['Fragment']>;\nexport type GroupChannelType = 'GROUP' | 'SUPER_GROUP' | 'BROADCAST';\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { GroupChannelCollectionParams, GroupChannelFilterParams } from '@sendbird/chat/groupChannel';\nimport type { UseGroupChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { ActionMenuItem } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type ChannelListQueryParamsType = Omit<GroupChannelCollectionParams, 'filter'> & GroupChannelFilterParams;\nexport interface GroupChannelListProps {\n Fragment: {\n onPressChannel: GroupChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: (channelType: GroupChannelType) => void;\n renderGroupChannelPreview?: GroupChannelListProps['List']['renderGroupChannelPreview'];\n skipTypeSelection?: boolean;\n flatListProps?: GroupChannelListProps['List']['flatListProps'];\n menuItemCreator?: GroupChannelListProps['List']['menuItemCreator'];\n /**\n * @description You can specify the query parameters for the channel list.\n * @example\n * ```\n * <GroupChannelListFragment channelListQueryParams={{ limit: 20, includeEmpty: false }} />\n * ```\n * */\n channelListQueryParams?: ChannelListQueryParamsType;\n /** @deprecated Please use `channelListQueryParams` instead */\n collectionCreator?: UseGroupChannelListOptions['collectionCreator'];\n };\n Header: {};\n List: {\n onPressChannel: (channel: SendbirdGroupChannel) => void;\n groupChannels: SendbirdGroupChannel[];\n renderGroupChannelPreview: (props: {\n channel: SendbirdGroupChannel;\n onPress: () => void;\n onLongPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdGroupChannel>, 'data' | 'renderItem'>;\n menuItemCreator?: (defaultMenuItem: ActionMenuItem) => ActionMenuItem;\n };\n TypeSelector: {\n skipTypeSelection: boolean;\n onSelectType: (type: GroupChannelType) => void;\n };\n}\n\n/**\n * Internal context for GroupChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelListContextsType {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n TypeSelector: React.Context<{\n visible: boolean;\n show: () => void;\n hide: () => void;\n headerTitle: string;\n }>;\n}\nexport interface GroupChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<GroupChannelListProps['Header']>;\n List: CommonComponent<GroupChannelListProps['List']>;\n TypeSelector: CommonComponent<GroupChannelListProps['TypeSelector']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type GroupChannelListFragment = React.FC<GroupChannelListProps['Fragment']>;\nexport type GroupChannelType = 'GROUP' | 'SUPER_GROUP' | 'BROADCAST';\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 { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelModerationProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: GroupChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedMembers: GroupChannelModerationProps['Menu']['onPressMenuMutedMembers'];\n onPressMenuBannedUsers: GroupChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedMembers: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelModerationModule {\n Provider: CommonComponent<GroupChannelModerationProps['Provider']>;\n Header: CommonComponent<GroupChannelModerationProps['Header']>;\n Menu: CommonComponent<GroupChannelModerationProps['Menu']>;\n}\n\nexport type GroupChannelModerationFragment = CommonComponent<GroupChannelModerationProps['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 { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelModerationProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: GroupChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedMembers: GroupChannelModerationProps['Menu']['onPressMenuMutedMembers'];\n onPressMenuBannedUsers: GroupChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedMembers: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelModerationModule {\n Provider: CommonComponent<GroupChannelModerationProps['Provider']>;\n Header: CommonComponent<GroupChannelModerationProps['Header']>;\n Menu: CommonComponent<GroupChannelModerationProps['Menu']>;\n}\n\nexport type GroupChannelModerationFragment = React.FC<GroupChannelModerationProps['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 { SendbirdGroupChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelMutedMembersProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelMutedMembersProps['Header']['onPressHeaderLeft'];\n renderUser?: GroupChannelMutedMembersProps['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 mutedMembers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelMutedMembers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelMutedMembersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelMutedMembersModule {\n Provider: CommonComponent<GroupChannelMutedMembersProps['Provider']>;\n Header: CommonComponent<GroupChannelMutedMembersProps['Header']>;\n List: CommonComponent<GroupChannelMutedMembersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelMutedMembersProps['StatusError']>;\n}\n\nexport type GroupChannelMutedMembersFragment = CommonComponent<GroupChannelMutedMembersProps['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 { SendbirdGroupChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelMutedMembersProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelMutedMembersProps['Header']['onPressHeaderLeft'];\n renderUser?: GroupChannelMutedMembersProps['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 mutedMembers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelMutedMembers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelMutedMembersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelMutedMembersModule {\n Provider: CommonComponent<GroupChannelMutedMembersProps['Provider']>;\n Header: CommonComponent<GroupChannelMutedMembersProps['Header']>;\n List: CommonComponent<GroupChannelMutedMembersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelMutedMembersProps['StatusError']>;\n}\n\nexport type GroupChannelMutedMembersFragment = React.FC<GroupChannelMutedMembersProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelNotificationsProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelNotificationsProps['Header']['onPressHeaderLeft'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n View: {};\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelNotifications\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelNotificationsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdGroupChannel;\n headerTitle: string;\n }>;\n};\nexport interface GroupChannelNotificationsModule {\n Provider: CommonComponent<GroupChannelNotificationsProps['Provider']>;\n Header: CommonComponent<GroupChannelNotificationsProps['Header']>;\n View: CommonComponent<GroupChannelNotificationsProps['View']>;\n}\n\nexport type GroupChannelNotificationsFragment = CommonComponent<GroupChannelNotificationsProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelNotificationsProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelNotificationsProps['Header']['onPressHeaderLeft'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n View: {};\n Provider: {\n channel: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelNotifications\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelNotificationsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdGroupChannel;\n headerTitle: string;\n }>;\n};\nexport interface GroupChannelNotificationsModule {\n Provider: CommonComponent<GroupChannelNotificationsProps['Provider']>;\n Header: CommonComponent<GroupChannelNotificationsProps['Header']>;\n View: CommonComponent<GroupChannelNotificationsProps['View']>;\n}\n\nexport type GroupChannelNotificationsFragment = React.FC<GroupChannelNotificationsProps['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 { SendbirdGroupChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: GroupChannelOperatorsProps['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: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelOperatorsModule {\n Provider: CommonComponent<GroupChannelOperatorsProps['Provider']>;\n Header: CommonComponent<GroupChannelOperatorsProps['Header']>;\n List: CommonComponent<GroupChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelOperatorsProps['StatusError']>;\n}\n\nexport type GroupChannelOperatorsFragment = CommonComponent<GroupChannelOperatorsProps['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 { SendbirdGroupChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type GroupChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: GroupChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: GroupChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: GroupChannelOperatorsProps['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: SendbirdGroupChannel;\n };\n};\n\n/**\n * Internal context for GroupChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type GroupChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdGroupChannel;\n }>;\n};\nexport interface GroupChannelOperatorsModule {\n Provider: CommonComponent<GroupChannelOperatorsProps['Provider']>;\n Header: CommonComponent<GroupChannelOperatorsProps['Header']>;\n List: CommonComponent<GroupChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<GroupChannelOperatorsProps['StatusError']>;\n}\n\nexport type GroupChannelOperatorsFragment = React.FC<GroupChannelOperatorsProps['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 { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport interface GroupChannelSettingsProps {\n Fragment: {\n channel: GroupChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: GroupChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: GroupChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuMembers: GroupChannelSettingsProps['Menu']['onPressMenuMembers'];\n onPressMenuSearchInChannel?: GroupChannelSettingsProps['Menu']['onPressMenuSearchInChannel'];\n onPressMenuLeaveChannel: GroupChannelSettingsProps['Menu']['onPressMenuLeaveChannel'];\n onPressMenuNotification?: GroupChannelSettingsProps['Menu']['onPressMenuNotification'];\n menuItemsCreator?: GroupChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuMembers: () => void;\n onPressMenuSearchInChannel?: () => void;\n onPressMenuLeaveChannel: () => void;\n onPressMenuNotification?: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n}\n\n/**\n * Internal context for GroupChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelSettingsContextsType {\n Fragment: React.Context<{\n channel: SendbirdGroupChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n}\nexport interface GroupChannelSettingsModule {\n Provider: CommonComponent<GroupChannelSettingsProps['Provider']>;\n Header: CommonComponent<GroupChannelSettingsProps['Header']>;\n Info: CommonComponent<GroupChannelSettingsProps['Info']>;\n Menu: CommonComponent<GroupChannelSettingsProps['Menu']>;\n}\n\nexport type GroupChannelSettingsFragment = CommonComponent<GroupChannelSettingsProps['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 { SendbirdGroupChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport interface GroupChannelSettingsProps {\n Fragment: {\n channel: GroupChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: GroupChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: GroupChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuMembers: GroupChannelSettingsProps['Menu']['onPressMenuMembers'];\n onPressMenuSearchInChannel?: GroupChannelSettingsProps['Menu']['onPressMenuSearchInChannel'];\n onPressMenuLeaveChannel: GroupChannelSettingsProps['Menu']['onPressMenuLeaveChannel'];\n onPressMenuNotification?: GroupChannelSettingsProps['Menu']['onPressMenuNotification'];\n menuItemsCreator?: GroupChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuMembers: () => void;\n onPressMenuSearchInChannel?: () => void;\n onPressMenuLeaveChannel: () => void;\n onPressMenuNotification?: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdGroupChannel;\n };\n}\n\n/**\n * Internal context for GroupChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport interface GroupChannelSettingsContextsType {\n Fragment: React.Context<{\n channel: SendbirdGroupChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n}\nexport interface GroupChannelSettingsModule {\n Provider: CommonComponent<GroupChannelSettingsProps['Provider']>;\n Header: CommonComponent<GroupChannelSettingsProps['Header']>;\n Info: CommonComponent<GroupChannelSettingsProps['Info']>;\n Menu: CommonComponent<GroupChannelSettingsProps['Menu']>;\n}\n\nexport type GroupChannelSettingsFragment = React.FC<GroupChannelSettingsProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdGroupChannel,\n SendbirdGroupChannelCreateParams,\n SendbirdMember,\n UserStruct,\n} from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\nimport type { GroupChannelType } from '../groupChannelList/types';\nimport type { UserListProps } from '../userList/types';\n\nexport interface GroupChannelCreateProps<User extends UserStruct> {\n Fragment: {\n onPressHeaderLeft: () => void;\n onCreateChannel: (channel: SendbirdGroupChannel) => void;\n channelType?: GroupChannelType;\n onBeforeCreateChannel?: (\n params: SendbirdGroupChannelCreateParams,\n users: User[],\n ) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;\n sortComparator?: UseUserListOptions<User>['sortComparator'];\n queryCreator?: UseUserListOptions<User>['queryCreator'];\n renderUser?: UserListProps<User>['List']['renderUser'];\n };\n}\nexport type GroupChannelCreateFragment<User extends UserStruct> = CommonComponent<\n GroupChannelCreateProps<User>['Fragment']\n>;\n\nexport interface GroupChannelInviteProps<User extends UserStruct> {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onInviteMembers: (channel: SendbirdGroupChannel) => void;\n queryCreator?: UseUserListOptions<User>['queryCreator'];\n renderUser?: UserListProps<User>['List']['renderUser'];\n sortComparator?: UseUserListOptions<User>['sortComparator'];\n };\n}\nexport type GroupChannelInviteFragment<User extends UserStruct> = CommonComponent<\n GroupChannelInviteProps<User>['Fragment']\n>;\n\nexport interface GroupChannelMembersProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n sortComparator?: UseUserListOptions<SendbirdMember>['sortComparator'];\n renderUser?: UserListProps<SendbirdMember>['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdMember>['queryCreator'];\n };\n}\nexport type GroupChannelMembersFragment = CommonComponent<GroupChannelMembersProps['Fragment']>;\n\nexport interface GroupChannelRegisterOperatorProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: (channel: SendbirdGroupChannel) => void;\n sortComparator?: UseUserListOptions<SendbirdMember>['sortComparator'];\n renderUser?: UserListProps<SendbirdMember>['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdMember>['queryCreator'];\n };\n}\nexport type GroupChannelRegisterOperatorFragment = CommonComponent<GroupChannelRegisterOperatorProps['Fragment']>;\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdGroupChannel,\n SendbirdGroupChannelCreateParams,\n SendbirdMember,\n UserStruct,\n} from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\nimport type { GroupChannelType } from '../groupChannelList/types';\nimport type { UserListProps } from '../userList/types';\n\nexport interface GroupChannelCreateProps<User extends UserStruct> {\n Fragment: {\n onPressHeaderLeft: () => void;\n onCreateChannel: (channel: SendbirdGroupChannel) => void;\n channelType?: GroupChannelType;\n onBeforeCreateChannel?: (\n params: SendbirdGroupChannelCreateParams,\n users: User[],\n ) => SendbirdGroupChannelCreateParams | Promise<SendbirdGroupChannelCreateParams>;\n sortComparator?: UseUserListOptions<User>['sortComparator'];\n queryCreator?: UseUserListOptions<User>['queryCreator'];\n renderUser?: UserListProps<User>['List']['renderUser'];\n };\n}\nexport type GroupChannelCreateFragment<User extends UserStruct> = CommonComponent<\n GroupChannelCreateProps<User>['Fragment']\n>;\n\nexport interface GroupChannelInviteProps<User extends UserStruct> {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onInviteMembers: (channel: SendbirdGroupChannel) => void;\n queryCreator?: UseUserListOptions<User>['queryCreator'];\n renderUser?: UserListProps<User>['List']['renderUser'];\n sortComparator?: UseUserListOptions<User>['sortComparator'];\n };\n}\nexport type GroupChannelInviteFragment<User extends UserStruct> = CommonComponent<\n GroupChannelInviteProps<User>['Fragment']\n>;\n\nexport interface GroupChannelMembersProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n sortComparator?: UseUserListOptions<SendbirdMember>['sortComparator'];\n renderUser?: UserListProps<SendbirdMember>['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdMember>['queryCreator'];\n };\n}\nexport type GroupChannelMembersFragment = React.FC<GroupChannelMembersProps['Fragment']>;\n\nexport interface GroupChannelRegisterOperatorProps {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: (channel: SendbirdGroupChannel) => void;\n sortComparator?: UseUserListOptions<SendbirdMember>['sortComparator'];\n renderUser?: UserListProps<SendbirdMember>['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdMember>['queryCreator'];\n };\n}\nexport type GroupChannelRegisterOperatorFragment = React.FC<GroupChannelRegisterOperatorProps['Fragment']>;\n"],"mappings":""}
@@ -97,7 +97,10 @@ const styles = (0, _uikitReactNativeFoundation.createStyleSheet)({
97
97
  flex: 1,
98
98
  height: '100%',
99
99
  fontSize: 14,
100
- padding: 0
100
+ paddingLeft: 0,
101
+ paddingTop: 0,
102
+ paddingBottom: 0,
103
+ paddingRight: 0
101
104
  }
102
105
  });
103
106
  var _default = MessageSearchHeader;
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_uikitReactNativeFoundation","_useContext","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageSearchHeader","_ref","keyword","onChangeKeyword","onPressHeaderLeft","onPressHeaderRight","HeaderComponent","useHeaderStyle","colors","useUIKitTheme","STRINGS","useLocalization","inputRef","useRef","inputColor","ui","input","active","searchEnabled","length","useEffect","setTimeout","_inputRef$current","current","focus","Platform","select","ios","createElement","clearTitleMargin","title","Box","flex","height","alignItems","backgroundColor","background","borderRadius","paddingHorizontal","flexDirection","Icon","size","icon","color","onBackground03","containerStyle","styles","searchIcon","TextInput","disableFullscreenUI","enablesReturnKeyAutomatically","ref","returnKeyType","onSubmitEditing","selectionColor","primary","placeholder","MESSAGE_SEARCH","HEADER_INPUT_PLACEHOLDER","placeholderTextColor","style","text","value","onChangeText","PressBox","onPress","clearIcon","left","onPressLeft","right","Text","button","onBackground04","HEADER_RIGHT","onPressRight","undefined","createStyleSheet","marginRight","marginLeft","fontSize","padding","_default","exports"],"sources":["MessageSearchHeader.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n Box,\n Icon,\n PressBox,\n Text,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { MessageSearchProps } from '../types';\n\nconst MessageSearchHeader = ({\n keyword,\n onChangeKeyword,\n onPressHeaderLeft,\n onPressHeaderRight,\n}: MessageSearchProps['Header']) => {\n const { HeaderComponent } = useHeaderStyle();\n const { colors } = useUIKitTheme();\n const { STRINGS } = useLocalization();\n\n const inputRef = useRef<TextInput>(null);\n const inputColor = colors.ui.input.default.active;\n const searchEnabled = keyword.length > 0;\n\n useEffect(() => {\n setTimeout(() => {\n inputRef.current?.focus();\n }, Platform.select({ ios: 500, default: 0 }));\n }, []);\n\n return (\n <HeaderComponent\n clearTitleMargin\n title={\n <Box\n flex={1}\n height={36}\n alignItems={'center'}\n backgroundColor={inputColor.background}\n borderRadius={24}\n paddingHorizontal={10}\n flexDirection={'row'}\n >\n <Icon size={24} icon={'search'} color={colors.onBackground03} containerStyle={styles.searchIcon} />\n <TextInput\n disableFullscreenUI\n enablesReturnKeyAutomatically\n ref={inputRef}\n returnKeyType={'search'}\n onSubmitEditing={() => onPressHeaderRight()}\n selectionColor={colors.primary}\n placeholder={STRINGS.MESSAGE_SEARCH.HEADER_INPUT_PLACEHOLDER}\n placeholderTextColor={inputColor.placeholder}\n style={[styles.input, { color: inputColor.text }]}\n value={keyword}\n onChangeText={onChangeKeyword}\n />\n {searchEnabled && (\n <PressBox onPress={() => onChangeKeyword('')}>\n <Icon size={18} icon={'remove'} color={colors.onBackground03} containerStyle={styles.clearIcon} />\n </PressBox>\n )}\n </Box>\n }\n left={<Icon icon={'arrow-left'} />}\n onPressLeft={onPressHeaderLeft}\n right={\n <Text button color={searchEnabled ? colors.primary : colors.onBackground04}>\n {STRINGS.MESSAGE_SEARCH.HEADER_RIGHT}\n </Text>\n }\n onPressRight={searchEnabled ? onPressHeaderRight : undefined}\n />\n );\n};\n\nconst styles = createStyleSheet({\n searchIcon: {\n marginRight: 8,\n },\n clearIcon: {\n marginLeft: 8,\n },\n input: {\n flex: 1,\n height: '100%',\n fontSize: 14,\n padding: 0,\n },\n});\n\nexport default MessageSearchHeader;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,2BAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AAA4D,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAA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YAAY,EAAExD,aAAa,GAAGb,kBAAkB,GAAGsE;EAAU,EAC7D;AAEN,CAAC;AAED,MAAM7B,MAAM,GAAG,IAAA8B,4CAAgB,EAAC;EAC9B7B,UAAU,EAAE;IACV8B,WAAW,EAAE;EACf,CAAC;EACDX,SAAS,EAAE;IACTY,UAAU,EAAE;EACd,CAAC;EACD9D,KAAK,EAAE;IACLgB,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACd8C,QAAQ,EAAE,EAAE;IACZC,OAAO,EAAE;EACX;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYjF,mBAAmB;AAAAkF,OAAA,CAAAjG,OAAA,GAAAgG,QAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_uikitReactNativeFoundation","_useContext","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageSearchHeader","_ref","keyword","onChangeKeyword","onPressHeaderLeft","onPressHeaderRight","HeaderComponent","useHeaderStyle","colors","useUIKitTheme","STRINGS","useLocalization","inputRef","useRef","inputColor","ui","input","active","searchEnabled","length","useEffect","setTimeout","_inputRef$current","current","focus","Platform","select","ios","createElement","clearTitleMargin","title","Box","flex","height","alignItems","backgroundColor","background","borderRadius","paddingHorizontal","flexDirection","Icon","size","icon","color","onBackground03","containerStyle","styles","searchIcon","TextInput","disableFullscreenUI","enablesReturnKeyAutomatically","ref","returnKeyType","onSubmitEditing","selectionColor","primary","placeholder","MESSAGE_SEARCH","HEADER_INPUT_PLACEHOLDER","placeholderTextColor","style","text","value","onChangeText","PressBox","onPress","clearIcon","left","onPressLeft","right","Text","button","onBackground04","HEADER_RIGHT","onPressRight","undefined","createStyleSheet","marginRight","marginLeft","fontSize","paddingLeft","paddingTop","paddingBottom","paddingRight","_default","exports"],"sources":["MessageSearchHeader.tsx"],"sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Platform, TextInput } from 'react-native';\n\nimport {\n Box,\n Icon,\n PressBox,\n Text,\n createStyleSheet,\n useHeaderStyle,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\n\nimport { useLocalization } from '../../../hooks/useContext';\nimport type { MessageSearchProps } from '../types';\n\nconst MessageSearchHeader = ({\n keyword,\n onChangeKeyword,\n onPressHeaderLeft,\n onPressHeaderRight,\n}: MessageSearchProps['Header']) => {\n const { HeaderComponent } = useHeaderStyle();\n const { colors } = useUIKitTheme();\n const { STRINGS } = useLocalization();\n\n const inputRef = useRef<TextInput>(null);\n const inputColor = colors.ui.input.default.active;\n const searchEnabled = keyword.length > 0;\n\n useEffect(() => {\n setTimeout(() => {\n inputRef.current?.focus();\n }, Platform.select({ ios: 500, default: 0 }));\n }, []);\n\n return (\n <HeaderComponent\n clearTitleMargin\n title={\n <Box\n flex={1}\n height={36}\n alignItems={'center'}\n backgroundColor={inputColor.background}\n borderRadius={24}\n paddingHorizontal={10}\n flexDirection={'row'}\n >\n <Icon size={24} icon={'search'} color={colors.onBackground03} containerStyle={styles.searchIcon} />\n <TextInput\n disableFullscreenUI\n enablesReturnKeyAutomatically\n ref={inputRef}\n returnKeyType={'search'}\n onSubmitEditing={() => onPressHeaderRight()}\n selectionColor={colors.primary}\n placeholder={STRINGS.MESSAGE_SEARCH.HEADER_INPUT_PLACEHOLDER}\n placeholderTextColor={inputColor.placeholder}\n style={[styles.input, { color: inputColor.text }]}\n value={keyword}\n onChangeText={onChangeKeyword}\n />\n {searchEnabled && (\n <PressBox onPress={() => onChangeKeyword('')}>\n <Icon size={18} icon={'remove'} color={colors.onBackground03} containerStyle={styles.clearIcon} />\n </PressBox>\n )}\n </Box>\n }\n left={<Icon icon={'arrow-left'} />}\n onPressLeft={onPressHeaderLeft}\n right={\n <Text button color={searchEnabled ? colors.primary : colors.onBackground04}>\n {STRINGS.MESSAGE_SEARCH.HEADER_RIGHT}\n </Text>\n }\n onPressRight={searchEnabled ? onPressHeaderRight : undefined}\n />\n );\n};\n\nconst styles = createStyleSheet({\n searchIcon: {\n marginRight: 8,\n },\n clearIcon: {\n marginLeft: 8,\n },\n input: {\n flex: 1,\n height: '100%',\n fontSize: 14,\n paddingLeft: 0,\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: 0,\n },\n});\n\nexport default MessageSearchHeader;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,2BAAA,GAAAF,OAAA;AAUA,IAAAG,WAAA,GAAAH,OAAA;AAA4D,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAN,wBAAAU,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA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K,EAAEnC,MAAM,CAACoC,cAAe;MAACC,cAAc,EAAEC,MAAM,CAACoB;IAAU,EAAG,CAErG,CAEJ;IACDC,IAAI,eAAE/F,MAAA,CAAAa,OAAA,CAAA2C,aAAA,CAACpD,2BAAA,CAAAgE,IAAI;MAACE,IAAI,EAAE;IAAa,EAAI;IACnC0B,WAAW,EAAEhE,iBAAkB;IAC/BiE,KAAK,eACHjG,MAAA,CAAAa,OAAA,CAAA2C,aAAA,CAACpD,2BAAA,CAAA8F,IAAI;MAACC,MAAM;MAAC5B,KAAK,EAAEzB,aAAa,GAAGV,MAAM,CAAC+C,OAAO,GAAG/C,MAAM,CAACgE;IAAe,GACxE9D,OAAO,CAAC+C,cAAc,CAACgB,YAAY,CAEvC;IACDC,YAAY,EAAExD,aAAa,GAAGb,kBAAkB,GAAGsE;EAAU,EAC7D;AAEN,CAAC;AAED,MAAM7B,MAAM,GAAG,IAAA8B,4CAAgB,EAAC;EAC9B7B,UAAU,EAAE;IACV8B,WAAW,EAAE;EACf,CAAC;EACDX,SAAS,EAAE;IACTY,UAAU,EAAE;EACd,CAAC;EACD9D,KAAK,EAAE;IACLgB,IAAI,EAAE,CAAC;IACPC,MAAM,EAAE,MAAM;IACd8C,QAAQ,EAAE,EAAE;IACZC,WAAW,EAAE,CAAC;IACdC,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE,CAAC;IAChBC,YAAY,EAAE;EAChB;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYpF,mBAAmB;AAAAqF,OAAA,CAAApG,OAAA,GAAAmG,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { SendbirdBaseMessage, SendbirdGroupChannel, SendbirdMessageSearchQuery } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type MessageSearchProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: MessageSearchProps['Header']['onPressHeaderLeft'];\n onPressSearchResultItem: MessageSearchProps['List']['onPressSearchResultItem'];\n renderSearchResultItem?: MessageSearchProps['List']['renderSearchResultItem'];\n queryCreator?: () => SendbirdMessageSearchQuery;\n };\n Header: {\n keyword: string;\n onChangeKeyword: (value: string) => void;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n channel: SendbirdGroupChannel;\n messages: SendbirdBaseMessage[];\n onPressSearchResultItem: (params: { channel: SendbirdGroupChannel; message: SendbirdBaseMessage }) => void;\n renderSearchResultItem: (props: {\n channel: SendbirdGroupChannel;\n message: SendbirdBaseMessage;\n onPress: () => void;\n }) => React.ReactElement | null;\n flatListProps?: Partial<FlatListProps<SendbirdBaseMessage>>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for MessageSearch\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type MessageSearchContextsType = {\n Fragment: React.Context<null>;\n};\nexport interface MessageSearchModule {\n Provider: CommonComponent;\n Header: CommonComponent<MessageSearchProps['Header']>;\n List: CommonComponent<MessageSearchProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<MessageSearchProps['StatusError']>;\n}\n\nexport type MessageSearchFragment = CommonComponent<MessageSearchProps['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 { SendbirdBaseMessage, SendbirdGroupChannel, SendbirdMessageSearchQuery } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type MessageSearchProps = {\n Fragment: {\n channel: SendbirdGroupChannel;\n onPressHeaderLeft: MessageSearchProps['Header']['onPressHeaderLeft'];\n onPressSearchResultItem: MessageSearchProps['List']['onPressSearchResultItem'];\n renderSearchResultItem?: MessageSearchProps['List']['renderSearchResultItem'];\n queryCreator?: () => SendbirdMessageSearchQuery;\n };\n Header: {\n keyword: string;\n onChangeKeyword: (value: string) => void;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n channel: SendbirdGroupChannel;\n messages: SendbirdBaseMessage[];\n onPressSearchResultItem: (params: { channel: SendbirdGroupChannel; message: SendbirdBaseMessage }) => void;\n renderSearchResultItem: (props: {\n channel: SendbirdGroupChannel;\n message: SendbirdBaseMessage;\n onPress: () => void;\n }) => React.ReactElement | null;\n flatListProps?: Partial<FlatListProps<SendbirdBaseMessage>>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for MessageSearch\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type MessageSearchContextsType = {\n Fragment: React.Context<null>;\n};\nexport interface MessageSearchModule {\n Provider: CommonComponent;\n Header: CommonComponent<MessageSearchProps['Header']>;\n List: CommonComponent<MessageSearchProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<MessageSearchProps['StatusError']>;\n}\n\nexport type MessageSearchFragment = React.FC<MessageSearchProps['Fragment']>;\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseOpenChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type { Icon } from '@sendbird/uikit-react-native-foundation';\nimport type {\n OnBeforeHandler,\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdMessage,\n SendbirdOpenChannel,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n SendbirdUserMessageUpdateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { ChannelInputProps } from '../../components/ChannelInput';\nimport type { ChannelMessageListProps } from '../../components/ChannelMessageList';\nimport type { CommonComponent } from '../../types';\nimport type { PubSub } from '../../utils/pubsub';\n\nexport type OpenChannelProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: OpenChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRightWithSettings: OpenChannelProps['Header']['onPressHeaderRight'];\n onPressHeaderRightWithParticipants: OpenChannelProps['Header']['onPressHeaderRight'];\n onPressMediaMessage?: OpenChannelProps['MessageList']['onPressMediaMessage'];\n\n onBeforeSendUserMessage?: OnBeforeHandler<SendbirdUserMessageCreateParams>;\n onBeforeSendFileMessage?: OnBeforeHandler<SendbirdFileMessageCreateParams>;\n onBeforeUpdateUserMessage?: OnBeforeHandler<SendbirdUserMessageUpdateParams>;\n onBeforeUpdateFileMessage?: OnBeforeHandler<SendbirdFileMessageUpdateParams>;\n\n renderMessage?: OpenChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: OpenChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: OpenChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableMessageGrouping?: OpenChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: OpenChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: OpenChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseOpenChannelMessagesOptions['sortComparator'];\n queryCreator?: UseOpenChannelMessagesOptions['queryCreator'];\n };\n Header: {\n rightIconName: keyof typeof Icon.Assets;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n\n MessageList: Pick<\n ChannelMessageListProps<SendbirdOpenChannel>,\n | 'enableMessageGrouping'\n | 'currentUserId'\n | 'channel'\n | 'messages'\n | 'newMessages'\n | 'scrolledAwayFromBottom'\n | 'onScrolledAwayFromBottom'\n | 'onTopReached'\n | 'onBottomReached'\n | 'onResendFailedMessage'\n | 'onDeleteMessage'\n | 'onPressMediaMessage'\n | 'renderMessage'\n | 'renderNewMessagesButton'\n | 'renderScrollToBottomButton'\n | 'flatListProps'\n | 'hasNext'\n >;\n Input: Pick<\n ChannelInputProps,\n | 'shouldRenderInput'\n | 'onPressSendUserMessage'\n | 'onPressSendFileMessage'\n | 'onPressUpdateUserMessage'\n | 'onPressUpdateFileMessage'\n | 'AttachmentsButton'\n >;\n\n Provider: {\n channel: SendbirdOpenChannel;\n keyboardAvoidOffset?: number;\n openChannelPubSub: PubSub<OpenChannelPubSubContextPayload>;\n };\n};\n\n/**\n * Internal context for OpenChannel\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n messageToEdit?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToEdit: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n keyboardAvoidOffset?: number;\n }>;\n PubSub: React.Context<PubSub<OpenChannelPubSubContextPayload>>;\n};\nexport interface OpenChannelModule {\n Provider: CommonComponent<OpenChannelProps['Provider']>;\n Header: CommonComponent<OpenChannelProps['Header']>;\n MessageList: CommonComponent<OpenChannelProps['MessageList']>;\n Input: CommonComponent<OpenChannelProps['Input']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelFragment = CommonComponent<OpenChannelProps['Fragment']>;\n\nexport type OpenChannelPubSubContextPayload =\n | {\n type: 'MESSAGE_SENT_PENDING' | 'MESSAGE_SENT_SUCCESS';\n data: {\n message: SendbirdUserMessage | SendbirdFileMessage;\n };\n }\n | {\n type: 'MESSAGES_RECEIVED';\n data: {\n messages: SendbirdMessage[];\n };\n };\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseOpenChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';\nimport type { Icon } from '@sendbird/uikit-react-native-foundation';\nimport type {\n OnBeforeHandler,\n SendbirdFileMessage,\n SendbirdFileMessageCreateParams,\n SendbirdFileMessageUpdateParams,\n SendbirdMessage,\n SendbirdOpenChannel,\n SendbirdUserMessage,\n SendbirdUserMessageCreateParams,\n SendbirdUserMessageUpdateParams,\n} from '@sendbird/uikit-utils';\n\nimport type { ChannelInputProps } from '../../components/ChannelInput';\nimport type { ChannelMessageListProps } from '../../components/ChannelMessageList';\nimport type { CommonComponent } from '../../types';\nimport type { PubSub } from '../../utils/pubsub';\n\nexport type OpenChannelProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onChannelDeleted: () => void;\n onPressHeaderLeft: OpenChannelProps['Header']['onPressHeaderLeft'];\n onPressHeaderRightWithSettings: OpenChannelProps['Header']['onPressHeaderRight'];\n onPressHeaderRightWithParticipants: OpenChannelProps['Header']['onPressHeaderRight'];\n onPressMediaMessage?: OpenChannelProps['MessageList']['onPressMediaMessage'];\n\n onBeforeSendUserMessage?: OnBeforeHandler<SendbirdUserMessageCreateParams>;\n onBeforeSendFileMessage?: OnBeforeHandler<SendbirdFileMessageCreateParams>;\n onBeforeUpdateUserMessage?: OnBeforeHandler<SendbirdUserMessageUpdateParams>;\n onBeforeUpdateFileMessage?: OnBeforeHandler<SendbirdFileMessageUpdateParams>;\n\n renderMessage?: OpenChannelProps['MessageList']['renderMessage'];\n renderNewMessagesButton?: OpenChannelProps['MessageList']['renderNewMessagesButton'];\n renderScrollToBottomButton?: OpenChannelProps['MessageList']['renderScrollToBottomButton'];\n\n enableMessageGrouping?: OpenChannelProps['MessageList']['enableMessageGrouping'];\n\n keyboardAvoidOffset?: OpenChannelProps['Provider']['keyboardAvoidOffset'];\n flatListProps?: OpenChannelProps['MessageList']['flatListProps'];\n sortComparator?: UseOpenChannelMessagesOptions['sortComparator'];\n queryCreator?: UseOpenChannelMessagesOptions['queryCreator'];\n };\n Header: {\n rightIconName: keyof typeof Icon.Assets;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n\n MessageList: Pick<\n ChannelMessageListProps<SendbirdOpenChannel>,\n | 'enableMessageGrouping'\n | 'currentUserId'\n | 'channel'\n | 'messages'\n | 'newMessages'\n | 'scrolledAwayFromBottom'\n | 'onScrolledAwayFromBottom'\n | 'onTopReached'\n | 'onBottomReached'\n | 'onResendFailedMessage'\n | 'onDeleteMessage'\n | 'onPressMediaMessage'\n | 'renderMessage'\n | 'renderNewMessagesButton'\n | 'renderScrollToBottomButton'\n | 'flatListProps'\n | 'hasNext'\n >;\n Input: Pick<\n ChannelInputProps,\n | 'shouldRenderInput'\n | 'onPressSendUserMessage'\n | 'onPressSendFileMessage'\n | 'onPressUpdateUserMessage'\n | 'onPressUpdateFileMessage'\n | 'AttachmentsButton'\n >;\n\n Provider: {\n channel: SendbirdOpenChannel;\n keyboardAvoidOffset?: number;\n openChannelPubSub: PubSub<OpenChannelPubSubContextPayload>;\n };\n};\n\n/**\n * Internal context for OpenChannel\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n messageToEdit?: SendbirdUserMessage | SendbirdFileMessage;\n setMessageToEdit: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;\n keyboardAvoidOffset?: number;\n }>;\n PubSub: React.Context<PubSub<OpenChannelPubSubContextPayload>>;\n};\nexport interface OpenChannelModule {\n Provider: CommonComponent<OpenChannelProps['Provider']>;\n Header: CommonComponent<OpenChannelProps['Header']>;\n MessageList: CommonComponent<OpenChannelProps['MessageList']>;\n Input: CommonComponent<OpenChannelProps['Input']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelFragment = React.FC<OpenChannelProps['Fragment']>;\n\nexport type OpenChannelPubSubContextPayload =\n | {\n type: 'MESSAGE_SENT_PENDING' | 'MESSAGE_SENT_SUCCESS';\n data: {\n message: SendbirdUserMessage | SendbirdFileMessage;\n };\n }\n | {\n type: 'MESSAGES_RECEIVED';\n data: {\n messages: SendbirdMessage[];\n };\n };\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 OpenChannelBannedUsersProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelBannedUsersProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelBannedUsersProps['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 bannedUsers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n onLoadNext: () => Promise<void>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelBannedUsers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelBannedUsersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelBannedUsersModule {\n Provider: CommonComponent<OpenChannelBannedUsersProps['Provider']>;\n Header: CommonComponent<OpenChannelBannedUsersProps['Header']>;\n List: CommonComponent<OpenChannelBannedUsersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelBannedUsersProps['StatusError']>;\n}\n\nexport type OpenChannelBannedUsersFragment = CommonComponent<OpenChannelBannedUsersProps['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 OpenChannelBannedUsersProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelBannedUsersProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelBannedUsersProps['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 bannedUsers: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n onLoadNext: () => Promise<void>;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelBannedUsers\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelBannedUsersContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelBannedUsersModule {\n Provider: CommonComponent<OpenChannelBannedUsersProps['Provider']>;\n Header: CommonComponent<OpenChannelBannedUsersProps['Header']>;\n List: CommonComponent<OpenChannelBannedUsersProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelBannedUsersProps['StatusError']>;\n}\n\nexport type OpenChannelBannedUsersFragment = React.FC<OpenChannelBannedUsersProps['Fragment']>;\n"],"mappings":""}