@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.
- package/lib/commonjs/InternalErrorBoundary.js.map +1 -1
- package/lib/commonjs/SendbirdUIKitContainer.js +1 -1
- package/lib/commonjs/SendbirdUIKitContainer.js.map +1 -1
- package/lib/commonjs/components/ChannelCover.js.map +1 -1
- package/lib/commonjs/components/ChatFlatList.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/AdminMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageContainer.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/MessageTime.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/commonjs/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/commonjs/components/NewMessagesButton.js.map +1 -1
- package/lib/commonjs/components/ProviderLayout.js.map +1 -1
- package/lib/commonjs/components/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/TypedPlaceholder.js.map +1 -1
- package/lib/commonjs/components/UserActionBar.js.map +1 -1
- package/lib/commonjs/components/UserSelectableBar.js.map +1 -1
- package/lib/commonjs/contexts/Localization.js.map +1 -1
- package/lib/commonjs/contexts/PlatformService.js.map +1 -1
- package/lib/commonjs/contexts/SendbirdChat.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/commonjs/domain/userList/module/moduleContext.js +2 -2
- package/lib/commonjs/domain/userList/module/moduleContext.js.map +1 -1
- package/lib/commonjs/domain/userList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js +2 -3
- package/lib/commonjs/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/commonjs/platform/createFileService.expo.js +20 -21
- package/lib/commonjs/platform/createFileService.expo.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/InternalErrorBoundary.js.map +1 -1
- package/lib/module/SendbirdUIKitContainer.js +1 -1
- package/lib/module/SendbirdUIKitContainer.js.map +1 -1
- package/lib/module/components/ChannelCover.js.map +1 -1
- package/lib/module/components/ChatFlatList.js.map +1 -1
- package/lib/module/components/MessageRenderer/AdminMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/BaseFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/ImageFileMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/FileMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageContainer.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageDateSeparator.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageIncomingAvatar.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageIncomingSenderName.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageOutgoingStatus.js.map +1 -1
- package/lib/module/components/MessageRenderer/MessageTime.js.map +1 -1
- package/lib/module/components/MessageRenderer/UnknownMessage/index.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/BaseUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/OpenGraphUserMessage.js.map +1 -1
- package/lib/module/components/MessageRenderer/UserMessage/index.js.map +1 -1
- package/lib/module/components/NewMessagesButton.js.map +1 -1
- package/lib/module/components/ProviderLayout.js.map +1 -1
- package/lib/module/components/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/TypedPlaceholder.js.map +1 -1
- package/lib/module/components/UserActionBar.js.map +1 -1
- package/lib/module/components/UserSelectableBar.js.map +1 -1
- package/lib/module/contexts/Localization.js.map +1 -1
- package/lib/module/contexts/PlatformService.js.map +1 -1
- package/lib/module/contexts/SendbirdChat.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelHeader.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/EditInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/SendInput.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelInput/index.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js.map +1 -1
- package/lib/module/domain/groupChannel/types.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js +2 -5
- package/lib/module/domain/groupChannelList/component/GroupChannelListHeader.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListList.js.map +1 -1
- package/lib/module/domain/groupChannelList/component/GroupChannelListTypeSelector.js.map +1 -1
- package/lib/module/domain/groupChannelList/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannelList/types.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsHeader.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsInfo.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/component/GroupChannelSettingsMenu.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/module/moduleContext.js.map +1 -1
- package/lib/module/domain/groupChannelSettings/types.js.map +1 -1
- package/lib/module/domain/groupChannelUserList/types.js.map +1 -1
- package/lib/module/domain/userList/module/moduleContext.js +2 -2
- package/lib/module/domain/userList/module/moduleContext.js.map +1 -1
- package/lib/module/domain/userList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelSettingsFragment.js +2 -3
- package/lib/module/fragments/createGroupChannelSettingsFragment.js.map +1 -1
- package/lib/module/platform/createFileService.expo.js +20 -21
- package/lib/module/platform/createFileService.expo.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/__template__/component/__domain__Header.d.ts +1 -2
- package/lib/typescript/__template__/component/__domain__StatusEmpty.d.ts +0 -1
- package/lib/typescript/__template__/component/__domain__StatusLoading.d.ts +0 -1
- package/lib/typescript/__template__/component/__domain__View.d.ts +1 -2
- package/lib/typescript/__template__/module/moduleContext.d.ts +2 -3
- package/lib/typescript/__template__/types.d.ts +2 -2
- package/lib/typescript/src/InternalErrorBoundary.d.ts +1 -0
- package/lib/typescript/src/SendbirdUIKitContainer.d.ts +3 -4
- package/lib/typescript/src/components/ChannelCover.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/AdminMessage/index.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/FileMessage/BaseFileMessage.d.ts +3 -3
- package/lib/typescript/src/components/MessageRenderer/FileMessage/ImageFileMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/FileMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageContainer.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageDateSeparator.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingAvatar.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageIncomingSenderName.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/MessageOutgoingStatus.d.ts +1 -1
- package/lib/typescript/src/components/MessageRenderer/MessageTime.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UnknownMessage/index.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/BaseUserMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.d.ts +1 -2
- package/lib/typescript/src/components/MessageRenderer/UserMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/NewMessagesButton.d.ts +1 -1
- package/lib/typescript/src/components/ProviderLayout.d.ts +1 -1
- package/lib/typescript/src/components/ScrollToBottomButton.d.ts +1 -1
- package/lib/typescript/src/components/TypedPlaceholder.d.ts +1 -2
- package/lib/typescript/src/components/UserActionBar.d.ts +1 -1
- package/lib/typescript/src/components/UserSelectableBar.d.ts +1 -1
- package/lib/typescript/src/contexts/Localization.d.ts +2 -3
- package/lib/typescript/src/contexts/PlatformService.d.ts +3 -3
- package/lib/typescript/src/contexts/SendbirdChat.d.ts +3 -3
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/EditInput.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/SendInput.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelInput/index.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannel/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListList.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelList/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.d.ts +1 -2
- package/lib/typescript/src/domain/groupChannelSettings/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +4 -4
- package/lib/typescript/src/domain/userList/component/UserListStatusEmpty.d.ts +0 -1
- package/lib/typescript/src/domain/userList/component/UserListStatusLoading.d.ts +0 -1
- package/lib/typescript/src/domain/userList/module/moduleContext.d.ts +2 -3
- package/lib/typescript/src/domain/userList/types.d.ts +1 -1
- package/lib/typescript/src/hooks/useContext.d.ts +2 -0
- package/lib/typescript/src/platform/createFileService.expo.d.ts +4 -4
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +7 -7
- package/src/InternalErrorBoundary.tsx +1 -0
- package/src/SendbirdUIKitContainer.tsx +4 -5
- package/src/components/ChannelCover.tsx +1 -1
- package/src/components/ChatFlatList.tsx +1 -1
- package/src/components/MessageRenderer/AdminMessage/index.tsx +1 -1
- package/src/components/MessageRenderer/FileMessage/BaseFileMessage.tsx +4 -6
- package/src/components/MessageRenderer/FileMessage/ImageFileMessage.tsx +1 -1
- package/src/components/MessageRenderer/FileMessage/index.tsx +1 -1
- package/src/components/MessageRenderer/MessageContainer.tsx +1 -1
- package/src/components/MessageRenderer/MessageDateSeparator.tsx +1 -1
- package/src/components/MessageRenderer/MessageIncomingAvatar.tsx +5 -2
- package/src/components/MessageRenderer/MessageIncomingSenderName.tsx +5 -2
- package/src/components/MessageRenderer/MessageOutgoingStatus.tsx +1 -1
- package/src/components/MessageRenderer/MessageTime.tsx +6 -2
- package/src/components/MessageRenderer/UnknownMessage/index.tsx +1 -1
- package/src/components/MessageRenderer/UserMessage/BaseUserMessage.tsx +1 -1
- package/src/components/MessageRenderer/UserMessage/OpenGraphUserMessage.tsx +4 -2
- package/src/components/MessageRenderer/UserMessage/index.tsx +1 -1
- package/src/components/NewMessagesButton.tsx +1 -1
- package/src/components/ProviderLayout.tsx +1 -1
- package/src/components/ScrollToBottomButton.tsx +1 -1
- package/src/components/TypedPlaceholder.tsx +1 -1
- package/src/components/UserActionBar.tsx +1 -1
- package/src/components/UserSelectableBar.tsx +1 -1
- package/src/contexts/Localization.tsx +2 -3
- package/src/contexts/PlatformService.tsx +3 -8
- package/src/contexts/SendbirdChat.tsx +3 -3
- package/src/domain/groupChannel/component/GroupChannelHeader.tsx +1 -1
- package/src/domain/groupChannel/component/GroupChannelInput/EditInput.tsx +1 -1
- package/src/domain/groupChannel/component/GroupChannelInput/SendInput.tsx +1 -1
- package/src/domain/groupChannel/component/GroupChannelInput/index.tsx +2 -2
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +2 -2
- package/src/domain/groupChannel/types.ts +2 -2
- package/src/domain/groupChannelList/component/GroupChannelListHeader.tsx +2 -4
- package/src/domain/groupChannelList/component/GroupChannelListList.tsx +2 -2
- package/src/domain/groupChannelList/component/GroupChannelListTypeSelector.tsx +4 -4
- package/src/domain/groupChannelList/module/moduleContext.tsx +2 -2
- package/src/domain/groupChannelList/types.ts +2 -2
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.tsx +1 -1
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.tsx +1 -1
- package/src/domain/groupChannelSettings/component/GroupChannelSettingsMenu.tsx +2 -2
- package/src/domain/groupChannelSettings/module/moduleContext.tsx +2 -5
- package/src/domain/groupChannelSettings/types.ts +2 -2
- package/src/domain/groupChannelUserList/types.ts +4 -5
- package/src/domain/userList/module/moduleContext.tsx +3 -7
- package/src/domain/userList/types.ts +1 -1
- package/src/fragments/createGroupChannelSettingsFragment.tsx +1 -9
- package/src/platform/createFileService.expo.ts +13 -15
- 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
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
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
|
-
|
|
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;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,yBAAy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AA8BjD,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;A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AAI,CAACQ,aAAL,EAAoB;QAClB,MAAMC,OAAO,GAAG,MAAM,KAAKL,6BAAL,CAAmC,OAAnC,CAAtB;QACA,IAAI,CAACK,OAAL,EAAc,MAAM,IAAIyB,KAAJ,CAAU,wBAAV,CAAN;MACf;;MAED,MAAMC,QAAQ,GAAG1C,QAAQ,CAAC2C,iBAAT,IAA8B3C,QAAQ,CAAC4C,cAAxD;MACA,IAAI,CAACF,QAAL,EAAe,MAAM,IAAID,KAAJ,CAAU,4BAAV,CAAN;MAEf,MAAMI,YAAY,GAAI,GAAEH,QAAS,IAAG5B,OAAO,CAACgC,QAAS,EAArD;MAEA,MAAM5B,QAAQ,GAAG,MAAMlB,QAAQ,CAAC+C,aAAT,CAAuBjC,OAAO,CAACkC,OAA/B,EAAwCH,YAAxC,CAAvB;;MACA,IAAIpD,WAAW,CAACqB,OAAO,CAACmC,QAAR,IAAoB,EAArB,CAAX,CAAoCC,KAApC,CAA0C,aAA1C,CAAJ,EAA8D;QAC5D,MAAMnD,kBAAkB,CAACoD,kBAAnB,CAAsCjC,QAAQ,CAACS,GAA/C,CAAN;MACD;;MACD,OAAOT,QAAQ,CAACS,GAAhB;IACD;;EAvG4D;;EA0G/D,OAAO,IAAI1B,wBAAJ,EAAP;AACD,CAtHD;;AAwHA,eAAeL,qBAAf"}
|
package/lib/module/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '1.0.
|
|
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
|
|
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:
|
|
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:
|
|
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 =
|
|
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.
|
|
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:
|
|
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:
|
|
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
|
|
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;
|
|
@@ -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.
|
|
5
|
+
declare const _default: React.MemoExoticComponent<(props: FileMessageProps) => JSX.Element>;
|
|
6
6
|
export default _default;
|
|
@@ -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:
|
|
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:
|
|
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:
|
|
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.
|
|
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:
|
|
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:
|
|
3
|
+
declare const UnknownMessage: ({ message, variant, pressed }: UnknownMessageProps) => JSX.Element;
|
|
5
4
|
export default UnknownMessage;
|
|
@@ -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:
|
|
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.
|
|
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.
|
|
8
|
+
declare const _default: React.MemoExoticComponent<({ newMessages, visible, onPress }: Props) => JSX.Element | null>;
|
|
9
9
|
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:
|
|
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.
|
|
10
|
+
declare const _default: React.MemoExoticComponent<({ muted, uri, name, disabled, onPressActionMenu, label }: Props) => JSX.Element>;
|
|
11
11
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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.
|
|
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.
|
|
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;
|
|
@@ -92,11 +92,11 @@ export interface GroupChannelContextsType {
|
|
|
92
92
|
}>;
|
|
93
93
|
}
|
|
94
94
|
export interface GroupChannelModule {
|
|
95
|
-
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 =
|
|
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:
|
|
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:
|
|
2
|
+
declare const GroupChannelListList: ({ renderGroupChannelPreview, groupChannels, onLoadNext, flatListProps, menuItemCreator, }: GroupChannelListProps['List']) => JSX.Element;
|
|
4
3
|
export default GroupChannelListList;
|
package/lib/typescript/src/domain/groupChannelList/component/GroupChannelListTypeSelector.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { GroupChannelListProps } from '../types';
|
|
3
|
-
declare const GroupChannelListTypeSelector:
|
|
2
|
+
declare const GroupChannelListTypeSelector: ({ Header, skipTypeSelection, onSelectType, }: GroupChannelListProps['TypeSelector']) => JSX.Element | null;
|
|
4
3
|
export default GroupChannelListTypeSelector;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import
|
|
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:
|
|
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:
|
|
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 =
|
|
80
|
+
export declare type GroupChannelListFragment = CommonComponent<GroupChannelListProps['Fragment']>;
|
|
81
81
|
export declare type GroupChannelType = 'GROUP' | 'SUPER_GROUP' | 'BROADCAST';
|
package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsHeader.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { GroupChannelSettingsProps } from '../types';
|
|
3
|
-
declare const GroupChannelSettingsHeader:
|
|
2
|
+
declare const GroupChannelSettingsHeader: ({ onPressHeaderLeft }: GroupChannelSettingsProps['Header']) => JSX.Element;
|
|
4
3
|
export default GroupChannelSettingsHeader;
|
package/lib/typescript/src/domain/groupChannelSettings/component/GroupChannelSettingsInfo.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { GroupChannelSettingsProps } from '../types';
|
|
3
|
-
declare const GroupChannelSettingsInfo:
|
|
2
|
+
declare const GroupChannelSettingsInfo: (_: GroupChannelSettingsProps['Info']) => JSX.Element | null;
|
|
4
3
|
export default GroupChannelSettingsInfo;
|