@sendbird/uikit-react-native 1.0.0-rc.4 → 1.0.2

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 (222) hide show
  1. package/lib/commonjs/InternalErrorBoundary.js.map +1 -1
  2. package/lib/commonjs/SendbirdUIKitContainer.js +1 -1
  3. package/lib/commonjs/SendbirdUIKitContainer.js.map +1 -1
  4. package/lib/commonjs/components/ChannelCover.js.map +1 -1
  5. package/lib/commonjs/components/ChatFlatList.js.map +1 -1
  6. package/lib/commonjs/components/MessageRenderer/AdminMessage/index.js.map +1 -1
  7. package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
  8. package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
  9. package/lib/commonjs/components/MessageRenderer/FileMessage/index.js.map +1 -1
  10. package/lib/commonjs/components/MessageRenderer/MessageContainer.js.map +1 -1
  11. package/lib/commonjs/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
  12. package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
  13. package/lib/commonjs/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
  14. package/lib/commonjs/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
  15. package/lib/commonjs/components/MessageRenderer/MessageTime.js.map +1 -1
  16. package/lib/commonjs/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
  17. package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
  18. package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
  19. package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +1 -1
  20. package/lib/commonjs/components/NewMessagesButton.js.map +1 -1
  21. package/lib/commonjs/components/ProviderLayout.js.map +1 -1
  22. package/lib/commonjs/components/ScrollToBottomButton.js.map +1 -1
  23. package/lib/commonjs/components/TypedPlaceholder.js.map +1 -1
  24. package/lib/commonjs/components/UserActionBar.js.map +1 -1
  25. package/lib/commonjs/components/UserSelectableBar.js.map +1 -1
  26. package/lib/commonjs/contexts/Localization.js.map +1 -1
  27. package/lib/commonjs/contexts/PlatformService.js.map +1 -1
  28. package/lib/commonjs/contexts/SendbirdChat.js.map +1 -1
  29. package/lib/commonjs/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
  30. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
  31. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
  32. package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
  33. package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  34. package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
  35. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
  36. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
  37. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
  38. package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
  39. package/lib/commonjs/domain/groupChannelList/module/moduleContext.js.map +1 -1
  40. package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
  41. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
  42. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
  43. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
  44. package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  45. package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
  46. package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
  47. package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
  48. package/lib/commonjs/domain/userList/module/moduleContext.js +2 -2
  49. package/lib/commonjs/domain/userList/module/moduleContext.js.map +1 -1
  50. package/lib/commonjs/domain/userList/types.js.map +1 -1
  51. package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +2 -3
  52. package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
  53. package/lib/commonjs/platform/createFileService.expo.js +20 -21
  54. package/lib/commonjs/platform/createFileService.expo.js.map +1 -1
  55. package/lib/commonjs/version.js +1 -1
  56. package/lib/commonjs/version.js.map +1 -1
  57. package/lib/module/InternalErrorBoundary.js.map +1 -1
  58. package/lib/module/SendbirdUIKitContainer.js +1 -1
  59. package/lib/module/SendbirdUIKitContainer.js.map +1 -1
  60. package/lib/module/components/ChannelCover.js.map +1 -1
  61. package/lib/module/components/ChatFlatList.js.map +1 -1
  62. package/lib/module/components/MessageRenderer/AdminMessage/index.js.map +1 -1
  63. package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
  64. package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
  65. package/lib/module/components/MessageRenderer/FileMessage/index.js.map +1 -1
  66. package/lib/module/components/MessageRenderer/MessageContainer.js.map +1 -1
  67. package/lib/module/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
  68. package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
  69. package/lib/module/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
  70. package/lib/module/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
  71. package/lib/module/components/MessageRenderer/MessageTime.js.map +1 -1
  72. package/lib/module/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
  73. package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
  74. package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
  75. package/lib/module/components/MessageRenderer/UserMessage/index.js.map +1 -1
  76. package/lib/module/components/NewMessagesButton.js.map +1 -1
  77. package/lib/module/components/ProviderLayout.js.map +1 -1
  78. package/lib/module/components/ScrollToBottomButton.js.map +1 -1
  79. package/lib/module/components/TypedPlaceholder.js.map +1 -1
  80. package/lib/module/components/UserActionBar.js.map +1 -1
  81. package/lib/module/components/UserSelectableBar.js.map +1 -1
  82. package/lib/module/contexts/Localization.js.map +1 -1
  83. package/lib/module/contexts/PlatformService.js.map +1 -1
  84. package/lib/module/contexts/SendbirdChat.js.map +1 -1
  85. package/lib/module/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
  86. package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
  87. package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
  88. package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
  89. package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
  90. package/lib/module/domain/groupChannel/types.js.map +1 -1
  91. package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
  92. package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
  93. package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
  94. package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
  95. package/lib/module/domain/groupChannelList/module/moduleContext.js.map +1 -1
  96. package/lib/module/domain/groupChannelList/types.js.map +1 -1
  97. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
  98. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
  99. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
  100. package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
  101. package/lib/module/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
  102. package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
  103. package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
  104. package/lib/module/domain/userList/module/moduleContext.js +2 -2
  105. package/lib/module/domain/userList/module/moduleContext.js.map +1 -1
  106. package/lib/module/domain/userList/types.js.map +1 -1
  107. package/lib/module/fragments/createGroupChannelSettingsFragment.js +2 -3
  108. package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
  109. package/lib/module/platform/createFileService.expo.js +20 -21
  110. package/lib/module/platform/createFileService.expo.js.map +1 -1
  111. package/lib/module/version.js +1 -1
  112. package/lib/module/version.js.map +1 -1
  113. package/lib/typescript/__template__/component/__domain__Header.d.ts +1 -2
  114. package/lib/typescript/__template__/component/__domain__StatusEmpty.d.ts +0 -1
  115. package/lib/typescript/__template__/component/__domain__StatusLoading.d.ts +0 -1
  116. package/lib/typescript/__template__/component/__domain__View.d.ts +1 -2
  117. package/lib/typescript/__template__/module/moduleContext.d.ts +2 -3
  118. package/lib/typescript/__template__/types.d.ts +2 -2
  119. package/lib/typescript/src/InternalErrorBoundary.d.ts +1 -0
  120. package/lib/typescript/src/SendbirdUIKitContainer.d.ts +3 -4
  121. package/lib/typescript/src/components/ChannelCover.d.ts +1 -2
  122. package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +1 -2
  123. package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +3 -3
  124. package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +1 -2
  125. package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +1 -1
  126. package/lib/typescript/src/components/MessageRenderer/MessageContainer.d.ts +1 -1
  127. package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +1 -2
  128. package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +1 -2
  129. package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +1 -2
  130. package/lib/typescript/src/components/MessageRenderer/MessageOutgoingStatus.d.ts +1 -1
  131. package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +1 -2
  132. package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +1 -2
  133. package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +1 -2
  134. package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +1 -2
  135. package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +1 -1
  136. package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
  137. package/lib/typescript/src/components/ProviderLayout.d.ts +1 -1
  138. package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
  139. package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -2
  140. package/lib/typescript/src/components/UserActionBar.d.ts +1 -1
  141. package/lib/typescript/src/components/UserSelectableBar.d.ts +1 -1
  142. package/lib/typescript/src/contexts/Localization.d.ts +2 -3
  143. package/lib/typescript/src/contexts/PlatformService.d.ts +3 -3
  144. package/lib/typescript/src/contexts/SendbirdChat.d.ts +3 -3
  145. package/lib/typescript/src/domain/groupChannel/component/GroupChannelHeader.d.ts +1 -2
  146. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +1 -2
  147. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +1 -2
  148. package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +2 -2
  149. package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +2 -2
  150. package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusEmpty.d.ts +0 -1
  151. package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusLoading.d.ts +0 -1
  152. package/lib/typescript/src/domain/groupChannel/types.d.ts +2 -2
  153. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListHeader.d.ts +1 -2
  154. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +1 -2
  155. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusEmpty.d.ts +0 -1
  156. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusLoading.d.ts +0 -1
  157. package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +1 -2
  158. package/lib/typescript/src/domain/groupChannelList/module/moduleContext.d.ts +2 -3
  159. package/lib/typescript/src/domain/groupChannelList/types.d.ts +2 -2
  160. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts +1 -2
  161. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +1 -2
  162. package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -2
  163. package/lib/typescript/src/domain/groupChannelSettings/module/moduleContext.d.ts +2 -3
  164. package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +2 -2
  165. package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +4 -4
  166. package/lib/typescript/src/domain/userList/component/UserListStatusEmpty.d.ts +0 -1
  167. package/lib/typescript/src/domain/userList/component/UserListStatusLoading.d.ts +0 -1
  168. package/lib/typescript/src/domain/userList/module/moduleContext.d.ts +2 -3
  169. package/lib/typescript/src/domain/userList/types.d.ts +1 -1
  170. package/lib/typescript/src/hooks/useContext.d.ts +2 -0
  171. package/lib/typescript/src/platform/createFileService.expo.d.ts +4 -4
  172. package/lib/typescript/src/version.d.ts +1 -1
  173. package/package.json +7 -7
  174. package/src/InternalErrorBoundary.tsx +1 -0
  175. package/src/SendbirdUIKitContainer.tsx +4 -5
  176. package/src/components/ChannelCover.tsx +1 -1
  177. package/src/components/ChatFlatList.tsx +1 -1
  178. package/src/components/MessageRenderer/AdminMessage/index.tsx +1 -1
  179. package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +4 -6
  180. package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +1 -1
  181. package/src/components/MessageRenderer/FileMessage/index.tsx +1 -1
  182. package/src/components/MessageRenderer/MessageContainer.tsx +1 -1
  183. package/src/components/MessageRenderer/MessageDateSeparator.tsx +1 -1
  184. package/src/components/MessageRenderer/MessageIncomingAvatar.tsx +5 -2
  185. package/src/components/MessageRenderer/MessageIncomingSenderName.tsx +5 -2
  186. package/src/components/MessageRenderer/MessageOutgoingStatus.tsx +1 -1
  187. package/src/components/MessageRenderer/MessageTime.tsx +6 -2
  188. package/src/components/MessageRenderer/UnknownMessage/index.tsx +1 -1
  189. package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +1 -1
  190. package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +4 -2
  191. package/src/components/MessageRenderer/UserMessage/index.tsx +1 -1
  192. package/src/components/NewMessagesButton.tsx +1 -1
  193. package/src/components/ProviderLayout.tsx +1 -1
  194. package/src/components/ScrollToBottomButton.tsx +1 -1
  195. package/src/components/TypedPlaceholder.tsx +1 -1
  196. package/src/components/UserActionBar.tsx +1 -1
  197. package/src/components/UserSelectableBar.tsx +1 -1
  198. package/src/contexts/Localization.tsx +2 -3
  199. package/src/contexts/PlatformService.tsx +3 -8
  200. package/src/contexts/SendbirdChat.tsx +3 -3
  201. package/src/domain/groupChannel/component/GroupChannelHeader.tsx +1 -1
  202. package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +1 -1
  203. package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +1 -1
  204. package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +2 -2
  205. package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +2 -2
  206. package/src/domain/groupChannel/types.ts +2 -2
  207. package/src/domain/groupChannelList/component/GroupChannelListHeader.tsx +2 -4
  208. package/src/domain/groupChannelList/component/GroupChannelListList.tsx +2 -2
  209. package/src/domain/groupChannelList/component/GroupChannelListTypeSelector.tsx +4 -4
  210. package/src/domain/groupChannelList/module/moduleContext.tsx +2 -2
  211. package/src/domain/groupChannelList/types.ts +2 -2
  212. package/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.tsx +1 -1
  213. package/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.tsx +1 -1
  214. package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +2 -2
  215. package/src/domain/groupChannelSettings/module/moduleContext.tsx +2 -5
  216. package/src/domain/groupChannelSettings/types.ts +2 -2
  217. package/src/domain/groupChannelUserList/types.ts +4 -5
  218. package/src/domain/userList/module/moduleContext.tsx +3 -7
  219. package/src/domain/userList/types.ts +1 -1
  220. package/src/fragments/createGroupChannelSettingsFragment.tsx +1 -9
  221. package/src/platform/createFileService.expo.ts +13 -15
  222. package/src/version.ts +1 -1
@@ -77,7 +77,6 @@ const createExpoFileService = _ref => {
77
77
  }
78
78
 
79
79
  async openMediaLibrary(options) {
80
- const selectionLimit = (options === null || options === void 0 ? void 0 : options.selectionLimit) || 1;
81
80
  const hasPermission = await this.hasMediaLibraryPermission('read');
82
81
 
83
82
  if (!hasPermission) {
@@ -91,26 +90,22 @@ const createExpoFileService = _ref => {
91
90
  }
92
91
  }
93
92
 
94
- const response = await imagePickerModule.launchImageLibraryAsync({
95
- allowsMultipleSelection: true
96
- });
93
+ const response = await imagePickerModule.launchImageLibraryAsync();
97
94
  if (response.cancelled) return null;
98
- return Promise.all(response.selected.slice(0, selectionLimit).map(async _ref2 => {
99
- let {
100
- uri
101
- } = _ref2;
102
- const {
103
- size
104
- } = await fsModule.getInfoAsync(uri);
105
- const ext = getFileExtension(uri);
106
- const type = getFileType(ext);
107
- return fileTypeGuard({
108
- uri,
109
- size,
110
- type: `${type}/${ext.slice(1)}`,
111
- name: Date.now() + ext
112
- });
113
- }));
95
+ const {
96
+ uri
97
+ } = response;
98
+ const {
99
+ size
100
+ } = await fsModule.getInfoAsync(uri);
101
+ const ext = getFileExtension(uri);
102
+ const type = getFileType(ext);
103
+ return [fileTypeGuard({
104
+ uri,
105
+ size,
106
+ type: `${type}/${ext.slice(1)}`,
107
+ name: Date.now() + ext
108
+ })];
114
109
  }
115
110
 
116
111
  async openDocument(options) {
@@ -151,7 +146,11 @@ const createExpoFileService = _ref => {
151
146
  if (!basePath) throw new Error('Cannot determine directory');
152
147
  const downloadPath = `${basePath}/${options.fileName}`;
153
148
  const response = await fsModule.downloadAsync(options.fileUrl, downloadPath);
154
- await mediaLibraryModule.saveToLibraryAsync(response.uri);
149
+
150
+ if (getFileType(options.fileType || '').match(/video|image/)) {
151
+ await mediaLibraryModule.saveToLibraryAsync(response.uri);
152
+ }
153
+
155
154
  return response.uri;
156
155
  }
157
156
 
@@ -1 +1 @@
1
- {"version":3,"names":["getFileExtension","getFileType","expoPermissionGranted","fileTypeGuard","createExpoFileService","imagePickerModule","documentPickerModule","mediaLibraryModule","fsModule","ExpoFileServiceInterface","hasCameraPermission","res","getCameraPermissionsAsync","requestCameraPermission","requestCameraPermissionsAsync","hasMediaLibraryPermission","type","perms","getPermissionsAsync","requestMediaLibraryPermission","requestPermissionsAsync","openCamera","options","hasPermission","granted","onOpenFailureWithToastMessage","response","launchCameraAsync","mediaTypes","mediaType","MediaTypeOptions","Images","Videos","All","cancelled","uri","size","getInfoAsync","ext","slice","name","Date","now","openMediaLibrary","selectionLimit","launchImageLibraryAsync","allowsMultipleSelection","Promise","all","selected","map","openDocument","getDocumentAsync","mimeType","save","Error","basePath","documentDirectory","cacheDirectory","downloadPath","fileName","downloadAsync","fileUrl","saveToLibraryAsync"],"sources":["createFileService.expo.ts"],"sourcesContent":["import type ExpoDocumentPicker from 'expo-document-picker';\nimport type ExpoFs from 'expo-file-system';\nimport type ExpoImagePicker from 'expo-image-picker';\nimport type ExpoMediaLibrary from 'expo-media-library';\n\nimport { getFileExtension, getFileType } from '@sendbird/uikit-utils';\n\nimport type { ExpoMediaLibraryPermissionResponse, ExpoPermissionResponse } from '../utils/expoPermissionGranted';\nimport expoPermissionGranted from '../utils/expoPermissionGranted';\nimport fileTypeGuard from '../utils/fileTypeGuard';\nimport type {\n FilePickerResponse,\n FileServiceInterface,\n OpenCameraOptions,\n OpenDocumentOptions,\n OpenMediaLibraryOptions,\n SaveOptions,\n} from './types';\n\nconst createExpoFileService = ({\n imagePickerModule,\n documentPickerModule,\n mediaLibraryModule,\n fsModule,\n}: {\n imagePickerModule: typeof ExpoImagePicker;\n documentPickerModule: typeof ExpoDocumentPicker;\n mediaLibraryModule: typeof ExpoMediaLibrary;\n fsModule: typeof ExpoFs;\n}): FileServiceInterface => {\n class ExpoFileServiceInterface implements FileServiceInterface {\n async hasCameraPermission(): Promise<boolean> {\n const res = (await imagePickerModule.getCameraPermissionsAsync()) as ExpoPermissionResponse;\n return expoPermissionGranted([res]);\n }\n async requestCameraPermission(): Promise<boolean> {\n const res = (await imagePickerModule.requestCameraPermissionsAsync()) as ExpoPermissionResponse;\n return expoPermissionGranted([res]);\n }\n async hasMediaLibraryPermission(type: 'write' | 'read'): Promise<boolean> {\n const perms = (await mediaLibraryModule.getPermissionsAsync(\n type === 'write',\n )) as ExpoMediaLibraryPermissionResponse;\n return expoPermissionGranted([perms]);\n }\n async requestMediaLibraryPermission(type: 'write' | 'read'): Promise<boolean> {\n const perms = (await mediaLibraryModule.requestPermissionsAsync(\n type === 'write',\n )) as ExpoMediaLibraryPermissionResponse;\n return expoPermissionGranted([perms]);\n }\n\n async openCamera(options?: OpenCameraOptions): Promise<FilePickerResponse> {\n const hasPermission = await this.hasCameraPermission();\n if (!hasPermission) {\n const granted = await this.requestCameraPermission();\n if (!granted) {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n const response = await imagePickerModule.launchCameraAsync({\n mediaTypes: (() => {\n switch (options?.mediaType) {\n case 'photo':\n return imagePickerModule.MediaTypeOptions.Images;\n case 'video':\n return imagePickerModule.MediaTypeOptions.Videos;\n default:\n return imagePickerModule.MediaTypeOptions.All;\n }\n })(),\n });\n\n if (response.cancelled) return null;\n\n const { uri } = response;\n const { size } = await fsModule.getInfoAsync(response.uri);\n const ext = getFileExtension(uri);\n const type = getFileType(ext);\n\n return fileTypeGuard({ uri, size, type: `${type}/${ext.slice(1)}`, name: Date.now() + ext });\n }\n async openMediaLibrary(options: OpenMediaLibraryOptions) {\n const selectionLimit = options?.selectionLimit || 1;\n const hasPermission = await this.hasMediaLibraryPermission('read');\n if (!hasPermission) {\n const granted = await this.requestMediaLibraryPermission('read');\n if (!granted) {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n const response = await imagePickerModule.launchImageLibraryAsync({ allowsMultipleSelection: true });\n if (response.cancelled) return null;\n\n return Promise.all(\n response.selected.slice(0, selectionLimit).map(async ({ uri }) => {\n const { size } = await fsModule.getInfoAsync(uri);\n const ext = getFileExtension(uri);\n const type = getFileType(ext);\n return fileTypeGuard({ uri, size, type: `${type}/${ext.slice(1)}`, name: Date.now() + ext });\n }),\n );\n }\n\n async openDocument(options?: OpenDocumentOptions): Promise<FilePickerResponse> {\n try {\n const response = await documentPickerModule.getDocumentAsync({ type: '*/*' });\n if (response.type === 'cancel') return null;\n const { mimeType, uri, size, name } = response;\n return fileTypeGuard({ uri, size, name, type: mimeType });\n } catch {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n async save(options: SaveOptions): Promise<string> {\n const hasPermission = await this.hasMediaLibraryPermission('write');\n if (!hasPermission) {\n const granted = await this.requestMediaLibraryPermission('write');\n if (!granted) throw new Error('Permission not granted');\n }\n\n const basePath = fsModule.documentDirectory || fsModule.cacheDirectory;\n if (!basePath) throw new Error('Cannot determine directory');\n\n const downloadPath = `${basePath}/${options.fileName}`;\n\n const response = await fsModule.downloadAsync(options.fileUrl, downloadPath);\n await mediaLibraryModule.saveToLibraryAsync(response.uri);\n return response.uri;\n }\n }\n\n return new ExpoFileServiceInterface();\n};\n\nexport default createExpoFileService;\n"],"mappings":"AAKA,SAASA,gBAAT,EAA2BC,WAA3B,QAA8C,uBAA9C;AAGA,OAAOC,qBAAP,MAAkC,gCAAlC;AACA,OAAOC,aAAP,MAA0B,wBAA1B;;AAUA,MAAMC,qBAAqB,GAAG,QAUF;EAAA,IAVG;IAC7BC,iBAD6B;IAE7BC,oBAF6B;IAG7BC,kBAH6B;IAI7BC;EAJ6B,CAUH;;EAC1B,MAAMC,wBAAN,CAA+D;IACpC,MAAnBC,mBAAmB,GAAqB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wC;MAChD,MAAMC,aAAa,GAAG,MAAM,KAAKR,yBAAL,CAA+B,OAA/B,CAA5B;;MACA,IAAI,CAACQ,aAAL,EAAoB;QAClB,MAAMC,OAAO,GAAG,MAAM,KAAKL,6BAAL,CAAmC,OAAnC,CAAtB;QACA,IAAI,CAACK,OAAL,EAAc,MAAM,IAAI+B,KAAJ,CAAU,wBAAV,CAAN;MACf;;MAED,MAAMC,QAAQ,GAAGhD,QAAQ,CAACiD,iBAAT,IAA8BjD,QAAQ,CAACkD,cAAxD;MACA,IAAI,CAACF,QAAL,EAAe,MAAM,IAAID,KAAJ,CAAU,4BAAV,CAAN;MAEf,MAAMI,YAAY,GAAI,GAAEH,QAAS,IAAGlC,OAAO,CAACsC,QAAS,EAArD;MAEA,MAAMlC,QAAQ,GAAG,MAAMlB,QAAQ,CAACqD,aAAT,CAAuBvC,OAAO,CAACwC,OAA/B,EAAwCH,YAAxC,CAAvB;MACA,MAAMpD,kBAAkB,CAACwD,kBAAnB,CAAsCrC,QAAQ,CAACS,GAA/C,CAAN;MACA,OAAOT,QAAQ,CAACS,GAAhB;IACD;;EAzG4D;;EA4G/D,OAAO,IAAI1B,wBAAJ,EAAP;AACD,CAxHD;;AA0HA,eAAeL,qBAAf"}
1
+ {"version":3,"names":["getFileExtension","getFileType","expoPermissionGranted","fileTypeGuard","createExpoFileService","imagePickerModule","documentPickerModule","mediaLibraryModule","fsModule","ExpoFileServiceInterface","hasCameraPermission","res","getCameraPermissionsAsync","requestCameraPermission","requestCameraPermissionsAsync","hasMediaLibraryPermission","type","perms","getPermissionsAsync","requestMediaLibraryPermission","requestPermissionsAsync","openCamera","options","hasPermission","granted","onOpenFailureWithToastMessage","response","launchCameraAsync","mediaTypes","mediaType","MediaTypeOptions","Images","Videos","All","cancelled","uri","size","getInfoAsync","ext","slice","name","Date","now","openMediaLibrary","launchImageLibraryAsync","openDocument","getDocumentAsync","mimeType","save","Error","basePath","documentDirectory","cacheDirectory","downloadPath","fileName","downloadAsync","fileUrl","fileType","match","saveToLibraryAsync"],"sources":["createFileService.expo.ts"],"sourcesContent":["import type * as ExpoDocumentPicker from 'expo-document-picker';\nimport type * as ExpoFs from 'expo-file-system';\nimport type * as ExpoImagePicker from 'expo-image-picker';\nimport type * as ExpoMediaLibrary from 'expo-media-library';\n\nimport { getFileExtension, getFileType } from '@sendbird/uikit-utils';\n\nimport type { ExpoMediaLibraryPermissionResponse, ExpoPermissionResponse } from '../utils/expoPermissionGranted';\nimport expoPermissionGranted from '../utils/expoPermissionGranted';\nimport fileTypeGuard from '../utils/fileTypeGuard';\nimport type {\n FilePickerResponse,\n FileServiceInterface,\n OpenCameraOptions,\n OpenDocumentOptions,\n OpenMediaLibraryOptions,\n SaveOptions,\n} from './types';\n\nconst createExpoFileService = ({\n imagePickerModule,\n documentPickerModule,\n mediaLibraryModule,\n fsModule,\n}: {\n imagePickerModule: typeof ExpoImagePicker;\n documentPickerModule: typeof ExpoDocumentPicker;\n mediaLibraryModule: typeof ExpoMediaLibrary;\n fsModule: typeof ExpoFs;\n}): FileServiceInterface => {\n class ExpoFileServiceInterface implements FileServiceInterface {\n async hasCameraPermission(): Promise<boolean> {\n const res = (await imagePickerModule.getCameraPermissionsAsync()) as ExpoPermissionResponse;\n return expoPermissionGranted([res]);\n }\n async requestCameraPermission(): Promise<boolean> {\n const res = (await imagePickerModule.requestCameraPermissionsAsync()) as ExpoPermissionResponse;\n return expoPermissionGranted([res]);\n }\n async hasMediaLibraryPermission(type: 'write' | 'read'): Promise<boolean> {\n const perms = (await mediaLibraryModule.getPermissionsAsync(\n type === 'write',\n )) as ExpoMediaLibraryPermissionResponse;\n return expoPermissionGranted([perms]);\n }\n async requestMediaLibraryPermission(type: 'write' | 'read'): Promise<boolean> {\n const perms = (await mediaLibraryModule.requestPermissionsAsync(\n type === 'write',\n )) as ExpoMediaLibraryPermissionResponse;\n return expoPermissionGranted([perms]);\n }\n\n async openCamera(options?: OpenCameraOptions): Promise<FilePickerResponse> {\n const hasPermission = await this.hasCameraPermission();\n if (!hasPermission) {\n const granted = await this.requestCameraPermission();\n if (!granted) {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n const response = await imagePickerModule.launchCameraAsync({\n mediaTypes: (() => {\n switch (options?.mediaType) {\n case 'photo':\n return imagePickerModule.MediaTypeOptions.Images;\n case 'video':\n return imagePickerModule.MediaTypeOptions.Videos;\n default:\n return imagePickerModule.MediaTypeOptions.All;\n }\n })(),\n });\n\n if (response.cancelled) return null;\n\n const { uri } = response;\n const { size } = await fsModule.getInfoAsync(response.uri);\n const ext = getFileExtension(uri);\n const type = getFileType(ext);\n\n return fileTypeGuard({ uri, size, type: `${type}/${ext.slice(1)}`, name: Date.now() + ext });\n }\n async openMediaLibrary(options: OpenMediaLibraryOptions) {\n const hasPermission = await this.hasMediaLibraryPermission('read');\n if (!hasPermission) {\n const granted = await this.requestMediaLibraryPermission('read');\n if (!granted) {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n const response = await imagePickerModule.launchImageLibraryAsync();\n if (response.cancelled) return null;\n const { uri } = response;\n\n const { size } = await fsModule.getInfoAsync(uri);\n const ext = getFileExtension(uri);\n const type = getFileType(ext);\n return [fileTypeGuard({ uri, size, type: `${type}/${ext.slice(1)}`, name: Date.now() + ext })];\n }\n\n async openDocument(options?: OpenDocumentOptions): Promise<FilePickerResponse> {\n try {\n const response = await documentPickerModule.getDocumentAsync({ type: '*/*' });\n if (response.type === 'cancel') return null;\n const { mimeType, uri, size, name } = response;\n return fileTypeGuard({ uri, size, name, type: mimeType });\n } catch {\n options?.onOpenFailureWithToastMessage?.();\n return null;\n }\n }\n\n async save(options: SaveOptions): Promise<string> {\n const hasPermission = await this.hasMediaLibraryPermission('write');\n if (!hasPermission) {\n const granted = await this.requestMediaLibraryPermission('write');\n if (!granted) throw new Error('Permission not granted');\n }\n\n const basePath = fsModule.documentDirectory || fsModule.cacheDirectory;\n if (!basePath) throw new Error('Cannot determine directory');\n\n const downloadPath = `${basePath}/${options.fileName}`;\n\n const response = await fsModule.downloadAsync(options.fileUrl, downloadPath);\n if (getFileType(options.fileType || '').match(/video|image/)) {\n await mediaLibraryModule.saveToLibraryAsync(response.uri);\n }\n return response.uri;\n }\n }\n\n return new ExpoFileServiceInterface();\n};\n\nexport default createExpoFileService;\n"],"mappings":"AAKA,SAASA,gBAAT,EAA2BC,WAA3B,QAA8C,uBAA9C;AAGA,OAAOC,qBAAP,MAAkC,gCAAlC;AACA,OAAOC,aAAP,MAA0B,wBAA1B;;AAUA,MAAMC,qBAAqB,GAAG,QAUF;EAAA,IAVG;IAC7BC,iBAD6B;IAE7BC,oBAF6B;IAG7BC,kBAH6B;IAI7BC;EAJ6B,CAUH;;EAC1B,MAAMC,wBAAN,CAA+D;IACpC,MAAnBC,mBAAmB,GAAqB;MAC5C,MAAMC,GAAG,GAAI,MAAMN,iBAAiB,CAACO,yBAAlB,EAAnB;MACA,OAAOV,qBAAqB,CAAC,CAACS,GAAD,CAAD,CAA5B;IACD;;IAC4B,MAAvBE,uBAAuB,GAAqB;MAChD,MAAMF,GAAG,GAAI,MAAMN,iBAAiB,CAACS,6BAAlB,EAAnB;MACA,OAAOZ,qBAAqB,CAAC,CAACS,GAAD,CAAD,CAA5B;IACD;;IAC8B,MAAzBI,yBAAyB,CAACC,IAAD,EAA2C;MACxE,MAAMC,KAAK,GAAI,MAAMV,kBAAkB,CAACW,mBAAnB,CACnBF,IAAI,KAAK,OADU,CAArB;MAGA,OAAOd,qBAAqB,CAAC,CAACe,KAAD,CAAD,CAA5B;IACD;;IACkC,MAA7BE,6BAA6B,CAACH,IAAD,EAA2C;MAC5E,MAAMC,KAAK,GAAI,MAAMV,kBAAkB,CAACa,uBAAnB,CACnBJ,IAAI,KAAK,OADU,CAArB;MAGA,OAAOd,qBAAqB,CAAC,CAACe,KAAD,CAAD,CAA5B;IACD;;IAEe,MAAVI,UAAU,CAACC,OAAD,EAA2D;MACzE,MAAMC,aAAa,GAAG,MAAM,KAAKb,m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- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '1.0.0-rc.4';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,YAAhB;AACA,eAAeA,OAAf"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '1.0.2';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,OAAhB;AACA,eAAeA,OAAf"}
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { __domain__Props } from '../types';
3
- declare const __domain__Header: React.FC<__domain__Props['Header']>;
2
+ declare const __domain__Header: (_: __domain__Props['Header']) => JSX.Element;
4
3
  export default __domain__Header;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const __domain__StatusEmpty: () => JSX.Element;
3
2
  export default __domain__StatusEmpty;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const __domain__StatusLoading: () => JSX.Element;
3
2
  export default __domain__StatusLoading;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { __domain__Props } from '../types';
3
- declare const __domain__View: React.FC<__domain__Props['View']>;
2
+ declare const __domain__View: (_: __domain__Props['View']) => JSX.Element;
4
3
  export default __domain__View;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
- import type { __domain__ContextsType } from '../types';
1
+ import type { __domain__ContextsType, __domain__Module } from '../types';
3
2
  export declare const __domain__Contexts: __domain__ContextsType;
4
- export declare const __domain__ContextsProvider: React.FC;
3
+ export declare const __domain__ContextsProvider: __domain__Module['Provider'];
@@ -22,10 +22,10 @@ export declare type __domain__ContextsType = {
22
22
  }>;
23
23
  };
24
24
  export interface __domain__Module {
25
- Provider: React.FC;
25
+ Provider: CommonComponent;
26
26
  Header: CommonComponent<__domain__Props['Header']>;
27
27
  View: CommonComponent<__domain__Props['View']>;
28
28
  StatusEmpty: CommonComponent;
29
29
  StatusLoading: CommonComponent;
30
30
  }
31
- export declare type __domain__Fragment = React.FC<__domain__Props['Fragment']>;
31
+ export declare type __domain__Fragment = CommonComponent<__domain__Props['Fragment']>;
@@ -3,6 +3,7 @@ import type { ErrorBoundaryProps } from './types';
3
3
  declare class InternalErrorBoundary extends React.PureComponent<{
4
4
  onError?: (props: ErrorBoundaryProps) => void;
5
5
  ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
6
+ children?: React.ReactNode;
6
7
  }> {
7
8
  static defaultProps: {
8
9
  ErrorInfoComponent: (props: ErrorBoundaryProps) => JSX.Element;
@@ -5,11 +5,10 @@ import type { StringSet } from './localization/StringSet.type';
5
5
  import type { ClipboardServiceInterface, FileServiceInterface, NotificationServiceInterface } from './platform/types';
6
6
  import type { ErrorBoundaryProps, LocalCacheStorage } from './types';
7
7
  export declare const SendbirdUIKit: Readonly<{
8
- VERSION: "1.0.0-rc.4";
8
+ VERSION: "1.0.2";
9
9
  PLATFORM: string;
10
10
  }>;
11
- export declare type SendbirdUIKitContainerProps = {
12
- children?: React.ReactNode;
11
+ export declare type SendbirdUIKitContainerProps = React.PropsWithChildren<{
13
12
  appId: string;
14
13
  platformServices: {
15
14
  file: FileServiceInterface;
@@ -37,6 +36,6 @@ export declare type SendbirdUIKitContainerProps = {
37
36
  onError?: (props: ErrorBoundaryProps) => void;
38
37
  ErrorInfoComponent?: (props: ErrorBoundaryProps) => JSX.Element;
39
38
  };
40
- };
39
+ }>;
41
40
  declare const SendbirdUIKitContainer: ({ children, appId, chatOptions, platformServices, localization, styles, toast, errorBoundary, }: SendbirdUIKitContainerProps) => JSX.Element;
42
41
  export default SendbirdUIKitContainer;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { StyleProp, ViewStyle } from 'react-native';
3
2
  import { SendbirdGroupChannel } from '@sendbird/uikit-utils';
4
3
  declare type Props = {
@@ -6,5 +5,5 @@ declare type Props = {
6
5
  size?: number;
7
6
  containerStyle?: StyleProp<ViewStyle>;
8
7
  };
9
- declare const ChannelCover: React.FC<Props>;
8
+ declare const ChannelCover: ({ channel, ...avatarProps }: Props) => JSX.Element;
10
9
  export default ChannelCover;
@@ -1,6 +1,5 @@
1
- import React from 'react';
2
1
  import type { SendbirdAdminMessage } from '@sendbird/uikit-utils';
3
2
  import type { MessageRendererInterface } from '../index';
4
3
  export declare type AdminMessageProps = MessageRendererInterface<SendbirdAdminMessage>;
5
- declare const AdminMessage: React.FC<AdminMessageProps>;
4
+ declare const AdminMessage: ({ message, nextMessage }: AdminMessageProps) => JSX.Element;
6
5
  export default AdminMessage;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
1
  import type { FileMessageProps } from './index';
3
- declare const BaseFileMessage: React.FC<FileMessageProps & {
2
+ declare type Props = FileMessageProps & {
4
3
  type: 'image' | 'audio' | 'video' | 'file';
5
- }>;
4
+ };
5
+ declare const BaseFileMessage: ({ message, variant, pressed, type }: Props) => JSX.Element;
6
6
  export default BaseFileMessage;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { FileMessageProps } from './index';
3
- declare const ImageFileMessage: React.FC<FileMessageProps>;
2
+ declare const ImageFileMessage: ({ message }: FileMessageProps) => JSX.Element;
4
3
  export default ImageFileMessage;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { SendbirdFileMessage } from '@sendbird/uikit-utils';
3
3
  import type { MessageRendererInterface } from '../index';
4
4
  export declare type FileMessageProps = MessageRendererInterface<SendbirdFileMessage>;
5
- declare const _default: React.NamedExoticComponent<FileMessageProps>;
5
+ declare const _default: React.MemoExoticComponent<(props: FileMessageProps) => JSX.Element>;
6
6
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const MessageContainer: React.FC;
2
+ declare const MessageContainer: ({ children }: React.PropsWithChildren) => JSX.Element;
3
3
  export default MessageContainer;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { SendbirdMessage } from '@sendbird/uikit-utils';
3
2
  declare type Props = {
4
3
  message: SendbirdMessage;
5
4
  prevMessage?: SendbirdMessage;
6
5
  };
7
- declare const MessageDateSeparator: React.FC<Props>;
6
+ declare const MessageDateSeparator: ({ message, prevMessage }: Props) => JSX.Element | null;
8
7
  export default MessageDateSeparator;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { SendbirdMessage } from '@sendbird/uikit-utils';
3
2
  declare type Props = {
4
3
  message: SendbirdMessage;
5
4
  grouping: boolean;
6
5
  };
7
- declare const MessageIncomingAvatar: React.FC<Props>;
6
+ declare const MessageIncomingAvatar: ({ message, grouping }: Props) => JSX.Element;
8
7
  export default MessageIncomingAvatar;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type { SendbirdMessage } from '@sendbird/uikit-utils';
3
2
  declare type Props = {
4
3
  message: SendbirdMessage;
5
4
  grouping: boolean;
6
5
  };
7
- declare const MessageIncomingSenderName: React.FC<Props>;
6
+ declare const MessageIncomingSenderName: ({ message, grouping }: Props) => JSX.Element | null;
8
7
  export default MessageIncomingSenderName;
@@ -4,5 +4,5 @@ declare type Props = {
4
4
  channel: SendbirdGroupChannel;
5
5
  message: SendbirdMessage;
6
6
  };
7
- declare const _default: React.NamedExoticComponent<Props>;
7
+ declare const _default: React.MemoExoticComponent<({ channel, message }: Props) => JSX.Element | null>;
8
8
  export default _default;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { StyleProp, ViewStyle } from 'react-native';
3
2
  import type { SendbirdMessage } from '@sendbird/uikit-utils';
4
3
  declare type Props = {
@@ -6,5 +5,5 @@ declare type Props = {
6
5
  grouping: boolean;
7
6
  style?: StyleProp<ViewStyle>;
8
7
  };
9
- declare const MessageTime: React.FC<Props>;
8
+ declare const MessageTime: ({ message, grouping, style }: Props) => JSX.Element | null;
10
9
  export default MessageTime;
@@ -1,5 +1,4 @@
1
- import React from 'react';
2
1
  import type { MessageRendererInterface } from '../index';
3
2
  export declare type UnknownMessageProps = MessageRendererInterface;
4
- declare const UnknownMessage: React.FC<UnknownMessageProps>;
3
+ declare const UnknownMessage: ({ message, variant, pressed }: UnknownMessageProps) => JSX.Element;
5
4
  export default UnknownMessage;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { UserMessageProps } from './index';
3
- declare const BaseUserMessage: React.FC<UserMessageProps>;
2
+ declare const BaseUserMessage: ({ message, variant, pressed }: UserMessageProps) => JSX.Element;
4
3
  export default BaseUserMessage;
@@ -1,8 +1,7 @@
1
- import React from 'react';
2
1
  import type Sendbird from 'sendbird';
3
2
  import type { UserMessageProps } from './index';
4
3
  declare type Props = UserMessageProps & {
5
4
  ogMetaData: Sendbird.OGMetaData;
6
5
  };
7
- declare const OpenGraphUserMessage: React.FC<Props>;
6
+ declare const OpenGraphUserMessage: ({ message, variant, pressed, ogMetaData }: Props) => JSX.Element;
8
7
  export default OpenGraphUserMessage;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import type { SendbirdUserMessage } from '@sendbird/uikit-utils';
3
3
  import type { MessageRendererInterface } from '../index';
4
4
  export declare type UserMessageProps = MessageRendererInterface<SendbirdUserMessage>;
5
- declare const _default: React.NamedExoticComponent<UserMessageProps>;
5
+ declare const _default: React.MemoExoticComponent<(props: UserMessageProps) => JSX.Element>;
6
6
  export default _default;
@@ -5,5 +5,5 @@ declare type Props = {
5
5
  visible: boolean;
6
6
  onPress: () => void;
7
7
  };
8
- declare const _default: React.NamedExoticComponent<Props>;
8
+ declare const _default: React.MemoExoticComponent<({ newMessages, visible, onPress }: Props) => JSX.Element | null>;
9
9
  export default _default;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const ProviderLayout: React.FC;
2
+ declare const ProviderLayout: ({ children }: React.PropsWithChildren) => JSX.Element;
3
3
  export default ProviderLayout;
@@ -3,5 +3,5 @@ declare type Props = {
3
3
  visible: boolean;
4
4
  onPress: () => void;
5
5
  };
6
- declare const _default: React.NamedExoticComponent<Props>;
6
+ declare const _default: React.MemoExoticComponent<({ visible, onPress }: Props) => JSX.Element>;
7
7
  export default _default;
@@ -1,7 +1,6 @@
1
- import React from 'react';
2
1
  declare type Props = {
3
2
  type: 'no-banned-members' | 'no-channels' | 'no-messages' | 'no-users' | 'no-muted-members' | 'no-results-found' | 'error-wrong' | 'loading';
4
3
  onPressRetry?: () => void;
5
4
  };
6
- declare const TypedPlaceholder: React.FC<Props>;
5
+ declare const TypedPlaceholder: ({ type, onPressRetry }: Props) => JSX.Element;
7
6
  export default TypedPlaceholder;
@@ -7,5 +7,5 @@ declare type Props = {
7
7
  disabled: boolean;
8
8
  onPressActionMenu?: () => void;
9
9
  };
10
- declare const _default: React.NamedExoticComponent<Props>;
10
+ declare const _default: React.MemoExoticComponent<({ muted, uri, name, disabled, onPressActionMenu, label }: Props) => JSX.Element>;
11
11
  export default _default;
@@ -5,5 +5,5 @@ declare type Props = {
5
5
  selected: boolean;
6
6
  disabled: boolean;
7
7
  };
8
- declare const _default: React.NamedExoticComponent<Props>;
8
+ declare const _default: React.MemoExoticComponent<({ uri, name, selected, disabled }: Props) => JSX.Element>;
9
9
  export default _default;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { StringSet } from '../localization/StringSet.type';
3
- declare type Props = {
3
+ declare type Props = React.PropsWithChildren<{
4
4
  stringSet: StringSet;
5
- children?: React.ReactNode;
6
- };
5
+ }>;
7
6
  export declare type LocalizationContextType = {
8
7
  STRINGS: StringSet;
9
8
  };
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { ClipboardServiceInterface, FileServiceInterface, NotificationServiceInterface } from '../platform/types';
3
- declare type Props = {
3
+ declare type Props = React.PropsWithChildren<{
4
4
  fileService: FileServiceInterface;
5
5
  clipboardService: ClipboardServiceInterface;
6
6
  notificationService: NotificationServiceInterface;
7
- };
7
+ }>;
8
8
  export declare const PlatformServiceContext: React.Context<Props | null>;
9
- export declare const PlatformServiceProvider: React.FC<Props>;
9
+ export declare const PlatformServiceProvider: ({ children, fileService, clipboardService, notificationService }: Props) => JSX.Element;
10
10
  export {};
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
2
  import type { SendbirdChatSDK, SendbirdGroupChannel, SendbirdUser } from '@sendbird/uikit-utils';
3
3
  import type { FileType } from '../platform/types';
4
- declare type Props = {
4
+ declare type Props = React.PropsWithChildren<{
5
5
  sdkInstance: SendbirdChatSDK;
6
6
  enableAutoPushTokenRegistration: boolean;
7
- };
7
+ }>;
8
8
  declare type Context = {
9
9
  sdk: SendbirdChatSDK;
10
10
  currentUser?: SendbirdUser;
@@ -20,5 +20,5 @@ declare type Context = {
20
20
  };
21
21
  };
22
22
  export declare const SendbirdChatContext: React.Context<Context | null>;
23
- export declare const SendbirdChatProvider: React.FC<Props>;
23
+ export declare const SendbirdChatProvider: ({ children, sdkInstance, enableAutoPushTokenRegistration }: Props) => JSX.Element;
24
24
  export {};
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelProps } from '../types';
3
- declare const GroupChannelHeader: React.FC<GroupChannelProps['Header']>;
2
+ declare const GroupChannelHeader: ({ onPressHeaderLeft, onPressHeaderRight }: GroupChannelProps['Header']) => JSX.Element;
4
3
  export default GroupChannelHeader;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { SendbirdFileMessage, SendbirdUserMessage } from '@sendbird/uikit-utils';
3
2
  import type { GroupChannelProps } from '../../types';
4
3
  declare type EditInputProps = GroupChannelProps['Input'] & {
@@ -7,5 +6,5 @@ declare type EditInputProps = GroupChannelProps['Input'] & {
7
6
  editMessage: SendbirdUserMessage | SendbirdFileMessage;
8
7
  setEditMessage: (msg?: SendbirdUserMessage | SendbirdFileMessage) => void;
9
8
  };
10
- declare const EditInput: React.FC<EditInputProps>;
9
+ declare const EditInput: ({ text, setText, editMessage, setEditMessage, onUpdateUserMessage }: EditInputProps) => JSX.Element;
11
10
  export default EditInput;
@@ -1,9 +1,8 @@
1
- import React from 'react';
2
1
  import type { GroupChannelProps } from '../../types';
3
2
  declare type SendInputProps = GroupChannelProps['Input'] & {
4
3
  text: string;
5
4
  setText: (val: string) => void;
6
5
  disabled: boolean;
7
6
  };
8
- declare const SendInput: React.FC<SendInputProps>;
7
+ declare const SendInput: ({ onSendUserMessage, onSendFileMessage, text, setText, disabled }: SendInputProps) => JSX.Element;
9
8
  export default SendInput;
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- declare const _default: React.NamedExoticComponent<{
2
+ declare const _default: React.MemoExoticComponent<(props: {
3
3
  channel: import("sendbird").GroupChannel;
4
4
  onSendFileMessage: (file: import("../../../..").FileType) => Promise<void>;
5
5
  onSendUserMessage: (text: string) => Promise<void>;
6
6
  onUpdateFileMessage: (editedFile: import("../../../..").FileType, message: import("sendbird").FileMessage) => Promise<void>;
7
7
  onUpdateUserMessage: (editedText: string, message: import("sendbird").UserMessage) => Promise<void>;
8
- }>;
8
+ }) => JSX.Element>;
9
9
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { SendbirdMessage } from '@sendbird/uikit-utils';
3
- declare const _default: React.NamedExoticComponent<{
3
+ declare const _default: React.MemoExoticComponent<({ currentUserId, channel, messages, renderMessage, nextMessages, newMessagesFromMembers, onBottomReached, onTopReached, renderNewMessagesButton, renderScrollToBottomButton, onResendFailedMessage, onDeleteMessage, onPressImageMessage, flatListProps, enableMessageGrouping, }: {
4
4
  enableMessageGrouping: boolean;
5
5
  currentUserId?: string | undefined;
6
6
  channel: import("sendbird").GroupChannel;
@@ -32,5 +32,5 @@ declare const _default: React.NamedExoticComponent<{
32
32
  onPress: () => void;
33
33
  }> | null;
34
34
  flatListProps?: Omit<import("react-native").FlatListProps<SendbirdMessage>, "data" | "renderItem"> | undefined;
35
- }>;
35
+ }) => JSX.Element>;
36
36
  export default _default;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GroupChannelStatusEmpty: () => JSX.Element;
3
2
  export default GroupChannelStatusEmpty;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GroupChannelStatusLoading: () => JSX.Element;
3
2
  export default GroupChannelStatusLoading;
@@ -92,11 +92,11 @@ export interface GroupChannelContextsType {
92
92
  }>;
93
93
  }
94
94
  export interface GroupChannelModule {
95
- Provider: React.FC<GroupChannelProps['Provider']>;
95
+ Provider: CommonComponent<GroupChannelProps['Provider']>;
96
96
  Header: CommonComponent<GroupChannelProps['Header']>;
97
97
  MessageList: CommonComponent<GroupChannelProps['MessageList']>;
98
98
  Input: CommonComponent<GroupChannelProps['Input']>;
99
99
  StatusEmpty: CommonComponent;
100
100
  StatusLoading: CommonComponent;
101
101
  }
102
- export declare type GroupChannelFragment = React.FC<GroupChannelProps['Fragment']>;
102
+ export declare type GroupChannelFragment = CommonComponent<GroupChannelProps['Fragment']>;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelListProps } from '../types';
3
- declare const GroupChannelListHeader: React.FC<GroupChannelListProps['Header']>;
2
+ declare const GroupChannelListHeader: (_: GroupChannelListProps['Header']) => JSX.Element;
4
3
  export default GroupChannelListHeader;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelListProps } from '../types';
3
- declare const GroupChannelListList: React.FC<GroupChannelListProps['List']>;
2
+ declare const GroupChannelListList: ({ renderGroupChannelPreview, groupChannels, onLoadNext, flatListProps, menuItemCreator, }: GroupChannelListProps['List']) => JSX.Element;
4
3
  export default GroupChannelListList;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GroupChannelListStatusEmpty: () => JSX.Element;
3
2
  export default GroupChannelListStatusEmpty;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const GroupChannelListStatusLoading: () => JSX.Element;
3
2
  export default GroupChannelListStatusLoading;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelListProps } from '../types';
3
- declare const GroupChannelListTypeSelector: React.FC<GroupChannelListProps['TypeSelector']>;
2
+ declare const GroupChannelListTypeSelector: ({ Header, skipTypeSelection, onSelectType, }: GroupChannelListProps['TypeSelector']) => JSX.Element | null;
4
3
  export default GroupChannelListTypeSelector;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
- import type { GroupChannelListContextsType } from '../types';
1
+ import type { GroupChannelListContextsType, GroupChannelListModule } from '../types';
3
2
  export declare const GroupChannelListContexts: GroupChannelListContextsType;
4
- export declare const GroupChannelListContextsProvider: React.FC;
3
+ export declare const GroupChannelListContextsProvider: GroupChannelListModule['Provider'];
@@ -70,12 +70,12 @@ export interface GroupChannelListContextsType {
70
70
  }>;
71
71
  }
72
72
  export interface GroupChannelListModule {
73
- Provider: React.FC;
73
+ Provider: CommonComponent;
74
74
  Header: CommonComponent<GroupChannelListProps['Header']>;
75
75
  List: CommonComponent<GroupChannelListProps['List']>;
76
76
  TypeSelector: CommonComponent<GroupChannelListProps['TypeSelector']>;
77
77
  StatusEmpty: CommonComponent;
78
78
  StatusLoading: CommonComponent;
79
79
  }
80
- export declare type GroupChannelListFragment = React.FC<GroupChannelListProps['Fragment']>;
80
+ export declare type GroupChannelListFragment = CommonComponent<GroupChannelListProps['Fragment']>;
81
81
  export declare type GroupChannelType = 'GROUP' | 'SUPER_GROUP' | 'BROADCAST';
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelSettingsProps } from '../types';
3
- declare const GroupChannelSettingsHeader: React.FC<GroupChannelSettingsProps['Header']>;
2
+ declare const GroupChannelSettingsHeader: ({ onPressHeaderLeft }: GroupChannelSettingsProps['Header']) => JSX.Element;
4
3
  export default GroupChannelSettingsHeader;
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import type { GroupChannelSettingsProps } from '../types';
3
- declare const GroupChannelSettingsInfo: React.FC<GroupChannelSettingsProps['Info']>;
2
+ declare const GroupChannelSettingsInfo: (_: GroupChannelSettingsProps['Info']) => JSX.Element | null;
4
3
  export default GroupChannelSettingsInfo;