@sendbird/uikit-react-native 3.3.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/ChannelInput/index.js.map +1 -1
- package/lib/commonjs/components/ChannelMessageList/index.js.map +1 -1
- package/lib/commonjs/components/FileViewer/FileViewerContent.js +140 -0
- package/lib/commonjs/components/FileViewer/FileViewerContent.js.map +1 -0
- package/lib/commonjs/components/FileViewer/FileViewerFooter.js +82 -0
- package/lib/commonjs/components/FileViewer/FileViewerFooter.js.map +1 -0
- package/lib/commonjs/components/FileViewer/FileViewerHeader.js +93 -0
- package/lib/commonjs/components/FileViewer/FileViewerHeader.js.map +1 -0
- package/lib/commonjs/components/FileViewer/index.js +133 -0
- package/lib/commonjs/components/FileViewer/index.js.map +1 -0
- package/lib/commonjs/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
- package/lib/commonjs/domain/groupChannel/component/GroupChannelMessageList.js +10 -9
- 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/groupChannelBannedUsers/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelModeration/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelMutedMembers/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelNotifications/types.js.map +1 -1
- package/lib/commonjs/domain/groupChannelOperators/types.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/messageSearch/component/MessageSearchHeader.js +4 -1
- package/lib/commonjs/domain/messageSearch/component/MessageSearchHeader.js.map +1 -1
- package/lib/commonjs/domain/messageSearch/types.js.map +1 -1
- package/lib/commonjs/domain/openChannel/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelBannedUsers/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js +4 -2
- package/lib/commonjs/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js.map +1 -1
- package/lib/commonjs/domain/openChannelCreate/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelList/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelModeration/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelMutedParticipants/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelOperators/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelSettings/types.js.map +1 -1
- package/lib/commonjs/domain/openChannelUserList/types.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelFragment.js +32 -16
- package/lib/commonjs/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/commonjs/fragments/createGroupChannelListFragment.js +25 -11
- package/lib/commonjs/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/version.js +1 -1
- package/lib/commonjs/version.js.map +1 -1
- package/lib/module/components/ChannelInput/index.js.map +1 -1
- package/lib/module/components/ChannelMessageList/index.js.map +1 -1
- package/lib/module/components/FileViewer/FileViewerContent.js +130 -0
- package/lib/module/components/FileViewer/FileViewerContent.js.map +1 -0
- package/lib/module/components/FileViewer/FileViewerFooter.js +74 -0
- package/lib/module/components/FileViewer/FileViewerFooter.js.map +1 -0
- package/lib/module/components/FileViewer/FileViewerHeader.js +85 -0
- package/lib/module/components/FileViewer/FileViewerHeader.js.map +1 -0
- package/lib/module/components/FileViewer/index.js +123 -0
- package/lib/module/components/FileViewer/index.js.map +1 -0
- package/lib/module/components/ReactionAddons/BottomSheetReactionAddon.js.map +1 -1
- package/lib/module/domain/groupChannel/component/GroupChannelMessageList.js +10 -9
- 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/groupChannelBannedUsers/types.js.map +1 -1
- package/lib/module/domain/groupChannelList/types.js.map +1 -1
- package/lib/module/domain/groupChannelModeration/types.js.map +1 -1
- package/lib/module/domain/groupChannelMutedMembers/types.js.map +1 -1
- package/lib/module/domain/groupChannelNotifications/types.js.map +1 -1
- package/lib/module/domain/groupChannelOperators/types.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/messageSearch/component/MessageSearchHeader.js +4 -1
- package/lib/module/domain/messageSearch/component/MessageSearchHeader.js.map +1 -1
- package/lib/module/domain/messageSearch/types.js.map +1 -1
- package/lib/module/domain/openChannel/types.js.map +1 -1
- package/lib/module/domain/openChannelBannedUsers/types.js.map +1 -1
- package/lib/module/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js +4 -2
- package/lib/module/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js.map +1 -1
- package/lib/module/domain/openChannelCreate/types.js.map +1 -1
- package/lib/module/domain/openChannelList/types.js.map +1 -1
- package/lib/module/domain/openChannelModeration/types.js.map +1 -1
- package/lib/module/domain/openChannelMutedParticipants/types.js.map +1 -1
- package/lib/module/domain/openChannelOperators/types.js.map +1 -1
- package/lib/module/domain/openChannelSettings/types.js.map +1 -1
- package/lib/module/domain/openChannelUserList/types.js.map +1 -1
- package/lib/module/fragments/createGroupChannelFragment.js +33 -17
- package/lib/module/fragments/createGroupChannelFragment.js.map +1 -1
- package/lib/module/fragments/createGroupChannelListFragment.js +26 -12
- package/lib/module/fragments/createGroupChannelListFragment.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/version.js +1 -1
- package/lib/module/version.js.map +1 -1
- package/lib/typescript/src/components/ChannelInput/index.d.ts +2 -2
- package/lib/typescript/src/components/ChannelMessageList/index.d.ts +5 -6
- package/lib/typescript/src/components/FileViewer/FileViewerContent.d.ts +13 -0
- package/lib/typescript/src/components/FileViewer/FileViewerFooter.d.ts +9 -0
- package/lib/typescript/src/components/FileViewer/FileViewerHeader.d.ts +10 -0
- package/lib/typescript/src/components/{FileViewer.d.ts → FileViewer/index.d.ts} +5 -1
- package/lib/typescript/src/containers/SendbirdUIKitContainer.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannel/component/GroupChannelMessageList.d.ts +2 -2
- package/lib/typescript/src/domain/groupChannel/types.d.ts +15 -4
- package/lib/typescript/src/domain/groupChannelBannedUsers/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelList/types.d.ts +13 -2
- package/lib/typescript/src/domain/groupChannelModeration/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelMutedMembers/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelNotifications/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelOperators/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelSettings/types.d.ts +1 -1
- package/lib/typescript/src/domain/groupChannelUserList/types.d.ts +3 -2
- package/lib/typescript/src/domain/messageSearch/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannel/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelBannedUsers/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelCreate/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelList/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelModeration/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelMutedParticipants/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelOperators/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelSettings/types.d.ts +1 -1
- package/lib/typescript/src/domain/openChannelUserList/types.d.ts +3 -3
- package/lib/typescript/src/types.d.ts +4 -4
- package/lib/typescript/src/version.d.ts +1 -1
- package/package.json +8 -7
- package/src/components/ChannelInput/index.tsx +2 -2
- package/src/components/ChannelMessageList/index.tsx +5 -11
- package/src/components/FileViewer/FileViewerContent.tsx +141 -0
- package/src/components/FileViewer/FileViewerFooter.tsx +73 -0
- package/src/components/FileViewer/FileViewerHeader.tsx +86 -0
- package/src/components/FileViewer/index.tsx +139 -0
- package/src/components/ReactionAddons/BottomSheetReactionAddon.tsx +3 -2
- package/src/domain/groupChannel/component/GroupChannelMessageList.tsx +7 -6
- package/src/domain/groupChannel/types.ts +16 -4
- package/src/domain/groupChannelBannedUsers/types.ts +1 -1
- package/src/domain/groupChannelList/types.ts +13 -2
- package/src/domain/groupChannelModeration/types.ts +1 -1
- package/src/domain/groupChannelMutedMembers/types.ts +1 -1
- package/src/domain/groupChannelNotifications/types.ts +1 -1
- package/src/domain/groupChannelOperators/types.ts +1 -1
- package/src/domain/groupChannelSettings/types.ts +1 -1
- package/src/domain/groupChannelUserList/types.ts +2 -2
- package/src/domain/messageSearch/component/MessageSearchHeader.tsx +4 -1
- package/src/domain/messageSearch/types.ts +1 -1
- package/src/domain/openChannel/types.ts +1 -1
- package/src/domain/openChannelBannedUsers/types.ts +1 -1
- package/src/domain/openChannelCreate/component/OpenChannelCreateProfileInput.tsx +4 -2
- package/src/domain/openChannelCreate/types.ts +1 -1
- package/src/domain/openChannelList/types.ts +1 -1
- package/src/domain/openChannelModeration/types.ts +1 -1
- package/src/domain/openChannelMutedParticipants/types.ts +1 -1
- package/src/domain/openChannelOperators/types.ts +1 -1
- package/src/domain/openChannelSettings/types.ts +1 -1
- package/src/domain/openChannelUserList/types.ts +4 -3
- package/src/fragments/createGroupChannelFragment.tsx +35 -17
- package/src/fragments/createGroupChannelListFragment.tsx +27 -9
- package/src/types.ts +2 -2
- package/src/version.ts +1 -1
- package/lib/commonjs/components/FileViewer.js +0 -300
- package/lib/commonjs/components/FileViewer.js.map +0 -1
- package/lib/module/components/FileViewer.js +0 -291
- package/lib/module/components/FileViewer.js.map +0 -1
- package/src/components/FileViewer.tsx +0 -288
|
@@ -141,8 +141,10 @@ const styles = (0, _uikitReactNativeFoundation.createStyleSheet)({
|
|
|
141
141
|
},
|
|
142
142
|
input: {
|
|
143
143
|
flex: 1,
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
paddingLeft: 0,
|
|
145
|
+
paddingRight: 0,
|
|
146
|
+
paddingTop: 0,
|
|
147
|
+
paddingBottom: 0
|
|
146
148
|
},
|
|
147
149
|
removeButtonContainer: {
|
|
148
150
|
alignItems: 'flex-end',
|
package/lib/commonjs/domain/openChannelCreate/component/OpenChannelCreateProfileInput.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_uikitReactNativeFoundation","_Icon","_uikitUtils","_useContext","_SBUError","_SBUUtils","obj","__esModule","default","OpenChannelCreateProfileInput","_ref","channelName","channelCoverFile","onChangeChannelName","onChangeChannelCoverFile","toast","useToast","openSheet","useBottomSheet","palette","colors","typography","useUIKitTheme","safeArea","useSafeAreaPadding","STRINGS","useLocalization","fileService","usePlatformService","onPressPhotoButton","sheetItems","title","OPEN_CHANNEL_CREATE","DIALOG_IMAGE_MENU_CAMERA","onPress","mediaFile","openCamera","mediaType","onOpenFailure","error","code","SBUError","CODE","ERR_PERMISSIONS_DENIED","alert","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","LABELS","PERMISSION_CAMERA","PERMISSION_APP_NAME","buttons","text","ALERT_PERMISSIONS_OK","SBUUtils","openSettings","show","TOAST","OPEN_CAMERA_ERROR","DIALOG_IMAGE_MENU_PHOTO_LIBRARY","mediaFiles","openMediaLibrary","selectionLimit","PERMISSION_DEVICE_STORAGE","OPEN_PHOTO_LIBRARY_ERROR","unshift","DIALOG_IMAGE_MENU_REMOVE","titleColor","undefined","createElement","Box","flexDirection","paddingVertical","paddingLeft","paddingRight","PressBox","style","styles","coverButton","activeOpacity","ifThenOr","Boolean","Avatar","size","uri","Icon","icon","borderBottomColor","onBackground04","inputContainer","TextInput","placeholder","PLACEHOLDER","subtitle1","input","backgroundColor","transparent","value","onChangeText","length","removeButtonContainer","color","onBackground03","createStyleSheet","marginRight","flex","alignItems","borderBottomWidth","paddingHorizontal","justifyContent","marginLeft","_default","exports"],"sources":["OpenChannelCreateProfileInput.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n Avatar,\n BottomSheetItem,\n Box,\n PressBox,\n TextInput,\n createStyleSheet,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport Icon from '@sendbird/uikit-react-native-foundation/src/components/Icon';\nimport { ifThenOr, useSafeAreaPadding } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../hooks/useContext';\nimport SBUError from '../../../libs/SBUError';\nimport SBUUtils from '../../../libs/SBUUtils';\nimport type { OpenChannelCreateProps } from '../types';\n\nconst OpenChannelCreateProfileInput = ({\n channelName,\n channelCoverFile,\n onChangeChannelName,\n onChangeChannelCoverFile,\n}: OpenChannelCreateProps['ProfileInput']) => {\n const toast = useToast();\n const { openSheet } = useBottomSheet();\n const { palette, colors, typography } = useUIKitTheme();\n const safeArea = useSafeAreaPadding(['left', 'right']);\n\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n\n const onPressPhotoButton = () => {\n const sheetItems: BottomSheetItem['sheetItems'] = [\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_CAMERA,\n onPress: async () => {\n const mediaFile = await fileService.openCamera({\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_CAMERA,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (mediaFile) onChangeChannelCoverFile(mediaFile);\n },\n },\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_PHOTO_LIBRARY,\n onPress: async () => {\n const mediaFiles = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_DEVICE_STORAGE,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n if (mediaFiles?.[0]) onChangeChannelCoverFile(mediaFiles[0]);\n },\n },\n ];\n\n if (channelCoverFile) {\n sheetItems.unshift({\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_REMOVE,\n titleColor: colors.error,\n onPress: () => {\n onChangeChannelCoverFile(undefined);\n },\n });\n }\n\n openSheet({ sheetItems });\n };\n\n return (\n <Box\n flexDirection={'row'}\n paddingVertical={16}\n paddingLeft={16 + safeArea.paddingLeft}\n paddingRight={16 + safeArea.paddingRight}\n >\n <PressBox onPress={onPressPhotoButton} style={styles.coverButton} activeOpacity={0.8}>\n {ifThenOr(\n Boolean(channelCoverFile),\n <Avatar size={72} uri={channelCoverFile?.uri} />,\n <Avatar.Icon size={72} icon={'camera'} />,\n )}\n </PressBox>\n <Box borderBottomColor={colors.onBackground04} style={styles.inputContainer}>\n <TextInput\n placeholder={STRINGS.OPEN_CHANNEL_CREATE.PLACEHOLDER}\n style={[typography.subtitle1, styles.input, { backgroundColor: palette.transparent }]}\n value={channelName}\n onChangeText={onChangeChannelName}\n />\n\n {channelName.length > 0 && (\n <PressBox onPress={() => onChangeChannelName('')} style={styles.removeButtonContainer}>\n <Icon color={colors.onBackground03} size={22} icon={'remove'} />\n </PressBox>\n )}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n coverButton: {\n marginRight: 20,\n },\n inputContainer: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n borderBottomWidth: 1,\n },\n input: {\n flex: 1,\n paddingVertical: 0,\n paddingHorizontal: 0,\n },\n removeButtonContainer: {\n alignItems: 'flex-end',\n justifyContent: 'center',\n marginLeft: 8,\n },\n});\n\nexport default OpenChannelCreateProfileInput;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,2BAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAG9C,MAAMG,6BAA6B,GAAGC,IAAA,IAKQ;EAAA,IALP;IACrCC,WAAW;IACXC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACsC,CAAC,GAAAJ,IAAA;EACvC,MAAMK,KAAK,GAAG,IAAAC,oCAAQ,GAAE;EACxB,MAAM;IAAEC;EAAU,CAAC,GAAG,IAAAC,0CAAc,GAAE;EACtC,MAAM;IAAEC,OAAO;IAAEC,MAAM;IAAEC;EAAW,CAAC,GAAG,IAAAC,yCAAa,GAAE;EACvD,MAAMC,QAAQ,GAAG,IAAAC,8BAAkB,EAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;EAEtD,MAAM;IAAEC;EAAQ,CAAC,GAAG,IAAAC,2BAAe,GAAE;EACrC,MAAM;IAAEC;EAAY,CA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EAAEA,CAAA,KAAMrB,mBAAmB,CAAC,EAAE,CAAE;IAACgE,KAAK,EAAEC,MAAM,CAACuB;EAAsB,gBACpFxG,MAAA,CAAAW,OAAA,CAAA8D,aAAA,CAACrE,KAAA,CAAAO,OAAI;IAAC8F,KAAK,EAAElF,MAAM,CAACmF,cAAe;IAACnB,IAAI,EAAE,EAAG;IAACG,IAAI,EAAE;EAAS,EAAG,CAEnE,CACG,CACF;AAEV,CAAC;AAED,MAAMT,MAAM,GAAG,IAAA0B,4CAAgB,EAAC;EAC9BzB,WAAW,EAAE;IACX0B,WAAW,EAAE;EACf,CAAC;EACDf,cAAc,EAAE;IACdgB,IAAI,EAAE,CAAC;IACPlC,aAAa,EAAE,KAAK;IACpBmC,UAAU,EAAE,QAAQ;IACpBC,iBAAiB,EAAE;EACrB,CAAC;EACDb,KAAK,EAAE;IACLW,IAAI,EAAE,CAAC;IACPjC,eAAe,EAAE,CAAC;IAClBoC,iBAAiB,EAAE;EACrB,CAAC;EACDR,qBAAqB,EAAE;IACrBM,UAAU,EAAE,UAAU;IACtBG,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYvG,6BAA6B;AAAAwG,OAAA,CAAAzG,OAAA,GAAAwG,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_uikitReactNativeFoundation","_Icon","_uikitUtils","_useContext","_SBUError","_SBUUtils","obj","__esModule","default","OpenChannelCreateProfileInput","_ref","channelName","channelCoverFile","onChangeChannelName","onChangeChannelCoverFile","toast","useToast","openSheet","useBottomSheet","palette","colors","typography","useUIKitTheme","safeArea","useSafeAreaPadding","STRINGS","useLocalization","fileService","usePlatformService","onPressPhotoButton","sheetItems","title","OPEN_CHANNEL_CREATE","DIALOG_IMAGE_MENU_CAMERA","onPress","mediaFile","openCamera","mediaType","onOpenFailure","error","code","SBUError","CODE","ERR_PERMISSIONS_DENIED","alert","DIALOG","ALERT_PERMISSIONS_TITLE","message","ALERT_PERMISSIONS_MESSAGE","LABELS","PERMISSION_CAMERA","PERMISSION_APP_NAME","buttons","text","ALERT_PERMISSIONS_OK","SBUUtils","openSettings","show","TOAST","OPEN_CAMERA_ERROR","DIALOG_IMAGE_MENU_PHOTO_LIBRARY","mediaFiles","openMediaLibrary","selectionLimit","PERMISSION_DEVICE_STORAGE","OPEN_PHOTO_LIBRARY_ERROR","unshift","DIALOG_IMAGE_MENU_REMOVE","titleColor","undefined","createElement","Box","flexDirection","paddingVertical","paddingLeft","paddingRight","PressBox","style","styles","coverButton","activeOpacity","ifThenOr","Boolean","Avatar","size","uri","Icon","icon","borderBottomColor","onBackground04","inputContainer","TextInput","placeholder","PLACEHOLDER","subtitle1","input","backgroundColor","transparent","value","onChangeText","length","removeButtonContainer","color","onBackground03","createStyleSheet","marginRight","flex","alignItems","borderBottomWidth","paddingTop","paddingBottom","justifyContent","marginLeft","_default","exports"],"sources":["OpenChannelCreateProfileInput.tsx"],"sourcesContent":["import React from 'react';\n\nimport {\n Avatar,\n BottomSheetItem,\n Box,\n PressBox,\n TextInput,\n createStyleSheet,\n useBottomSheet,\n useToast,\n useUIKitTheme,\n} from '@sendbird/uikit-react-native-foundation';\nimport Icon from '@sendbird/uikit-react-native-foundation/src/components/Icon';\nimport { ifThenOr, useSafeAreaPadding } from '@sendbird/uikit-utils';\n\nimport { useLocalization, usePlatformService } from '../../../hooks/useContext';\nimport SBUError from '../../../libs/SBUError';\nimport SBUUtils from '../../../libs/SBUUtils';\nimport type { OpenChannelCreateProps } from '../types';\n\nconst OpenChannelCreateProfileInput = ({\n channelName,\n channelCoverFile,\n onChangeChannelName,\n onChangeChannelCoverFile,\n}: OpenChannelCreateProps['ProfileInput']) => {\n const toast = useToast();\n const { openSheet } = useBottomSheet();\n const { palette, colors, typography } = useUIKitTheme();\n const safeArea = useSafeAreaPadding(['left', 'right']);\n\n const { STRINGS } = useLocalization();\n const { fileService } = usePlatformService();\n\n const onPressPhotoButton = () => {\n const sheetItems: BottomSheetItem['sheetItems'] = [\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_CAMERA,\n onPress: async () => {\n const mediaFile = await fileService.openCamera({\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_CAMERA,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_CAMERA_ERROR, 'error');\n }\n },\n });\n\n if (mediaFile) onChangeChannelCoverFile(mediaFile);\n },\n },\n {\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_PHOTO_LIBRARY,\n onPress: async () => {\n const mediaFiles = await fileService.openMediaLibrary({\n selectionLimit: 1,\n mediaType: 'photo',\n onOpenFailure: (error) => {\n if (error.code === SBUError.CODE.ERR_PERMISSIONS_DENIED) {\n alert({\n title: STRINGS.DIALOG.ALERT_PERMISSIONS_TITLE,\n message: STRINGS.DIALOG.ALERT_PERMISSIONS_MESSAGE(\n STRINGS.LABELS.PERMISSION_DEVICE_STORAGE,\n STRINGS.LABELS.PERMISSION_APP_NAME,\n ),\n buttons: [{ text: STRINGS.DIALOG.ALERT_PERMISSIONS_OK, onPress: () => SBUUtils.openSettings() }],\n });\n } else {\n toast.show(STRINGS.TOAST.OPEN_PHOTO_LIBRARY_ERROR, 'error');\n }\n },\n });\n if (mediaFiles?.[0]) onChangeChannelCoverFile(mediaFiles[0]);\n },\n },\n ];\n\n if (channelCoverFile) {\n sheetItems.unshift({\n title: STRINGS.OPEN_CHANNEL_CREATE.DIALOG_IMAGE_MENU_REMOVE,\n titleColor: colors.error,\n onPress: () => {\n onChangeChannelCoverFile(undefined);\n },\n });\n }\n\n openSheet({ sheetItems });\n };\n\n return (\n <Box\n flexDirection={'row'}\n paddingVertical={16}\n paddingLeft={16 + safeArea.paddingLeft}\n paddingRight={16 + safeArea.paddingRight}\n >\n <PressBox onPress={onPressPhotoButton} style={styles.coverButton} activeOpacity={0.8}>\n {ifThenOr(\n Boolean(channelCoverFile),\n <Avatar size={72} uri={channelCoverFile?.uri} />,\n <Avatar.Icon size={72} icon={'camera'} />,\n )}\n </PressBox>\n <Box borderBottomColor={colors.onBackground04} style={styles.inputContainer}>\n <TextInput\n placeholder={STRINGS.OPEN_CHANNEL_CREATE.PLACEHOLDER}\n style={[typography.subtitle1, styles.input, { backgroundColor: palette.transparent }]}\n value={channelName}\n onChangeText={onChangeChannelName}\n />\n\n {channelName.length > 0 && (\n <PressBox onPress={() => onChangeChannelName('')} style={styles.removeButtonContainer}>\n <Icon color={colors.onBackground03} size={22} icon={'remove'} />\n </PressBox>\n )}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n coverButton: {\n marginRight: 20,\n },\n inputContainer: {\n flex: 1,\n flexDirection: 'row',\n alignItems: 'center',\n borderBottomWidth: 1,\n },\n input: {\n flex: 1,\n paddingLeft: 0,\n paddingRight: 0,\n paddingTop: 0,\n paddingBottom: 0,\n },\n removeButtonContainer: {\n alignItems: 'flex-end',\n justifyContent: 'center',\n marginLeft: 8,\n },\n});\n\nexport default OpenChannelCreateProfileInput;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,2BAAA,GAAAD,OAAA;AAWA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;A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bC,aAAa,EAAE;EACjB,CAAC;EACDT,qBAAqB,EAAE;IACrBM,UAAU,EAAE,UAAU;IACtBI,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAEYxG,6BAA6B;AAAAyG,OAAA,CAAA1G,OAAA,GAAAyG,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { OnBeforeHandler, SendbirdOpenChannel, SendbirdOpenChannelCreateParams } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelCreateProps = {\n Fragment: {\n onPressHeaderLeft: OpenChannelCreateProps['Header']['onPressHeaderLeft'];\n onCreateChannel: (channel: SendbirdOpenChannel) => void;\n onBeforeCreateChannel?: OnBeforeHandler<SendbirdOpenChannelCreateParams>;\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n shouldActivateHeaderRight: () => boolean;\n };\n ProfileInput: {\n channelName: string;\n onChangeChannelName: (val: OpenChannelCreateProps['ProfileInput']['channelName']) => void;\n channelCoverFile: FileType | undefined;\n onChangeChannelCoverFile: (val: OpenChannelCreateProps['ProfileInput']['channelCoverFile']) => void;\n };\n};\n\n/**\n * Internal context for OpenChannelCreate\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelCreateContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n headerRight: string;\n }>;\n};\nexport interface OpenChannelCreateModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelCreateProps['Header']>;\n ProfileInput: CommonComponent<OpenChannelCreateProps['ProfileInput']>;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelCreateFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { OnBeforeHandler, SendbirdOpenChannel, SendbirdOpenChannelCreateParams } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../../platform/types';\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelCreateProps = {\n Fragment: {\n onPressHeaderLeft: OpenChannelCreateProps['Header']['onPressHeaderLeft'];\n onCreateChannel: (channel: SendbirdOpenChannel) => void;\n onBeforeCreateChannel?: OnBeforeHandler<SendbirdOpenChannelCreateParams>;\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n shouldActivateHeaderRight: () => boolean;\n };\n ProfileInput: {\n channelName: string;\n onChangeChannelName: (val: OpenChannelCreateProps['ProfileInput']['channelName']) => void;\n channelCoverFile: FileType | undefined;\n onChangeChannelCoverFile: (val: OpenChannelCreateProps['ProfileInput']['channelCoverFile']) => void;\n };\n};\n\n/**\n * Internal context for OpenChannelCreate\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelCreateContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n headerRight: string;\n }>;\n};\nexport interface OpenChannelCreateModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelCreateProps['Header']>;\n ProfileInput: CommonComponent<OpenChannelCreateProps['ProfileInput']>;\n StatusLoading: CommonComponent;\n}\n\nexport type OpenChannelCreateFragment = React.FC<OpenChannelCreateProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseOpenChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelListProps = {\n Fragment: {\n onPressChannel: OpenChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: () => void;\n renderOpenChannelPreview?: OpenChannelListProps['List']['renderOpenChannelPreview'];\n queryCreator?: UseOpenChannelListOptions['queryCreator'];\n flatListProps?: OpenChannelListProps['List']['flatListProps'];\n };\n Header: {\n onPressHeaderRight: () => void;\n };\n List: {\n onPressChannel: (channel: SendbirdOpenChannel) => void;\n openChannels: SendbirdOpenChannel[];\n renderOpenChannelPreview: (props: {\n channel: SendbirdOpenChannel;\n onPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdOpenChannel>, 'data' | 'renderItem'>;\n refreshing: boolean;\n onRefresh: () => void;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelListContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n};\nexport interface OpenChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelListProps['Header']>;\n List: CommonComponent<OpenChannelListProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelListProps['StatusError']>;\n}\n\nexport type OpenChannelListFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\nimport type { FlatListProps } from 'react-native';\n\nimport type { UseOpenChannelListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelListProps = {\n Fragment: {\n onPressChannel: OpenChannelListProps['List']['onPressChannel'];\n onPressCreateChannel: () => void;\n renderOpenChannelPreview?: OpenChannelListProps['List']['renderOpenChannelPreview'];\n queryCreator?: UseOpenChannelListOptions['queryCreator'];\n flatListProps?: OpenChannelListProps['List']['flatListProps'];\n };\n Header: {\n onPressHeaderRight: () => void;\n };\n List: {\n onPressChannel: (channel: SendbirdOpenChannel) => void;\n openChannels: SendbirdOpenChannel[];\n renderOpenChannelPreview: (props: {\n channel: SendbirdOpenChannel;\n onPress: () => void;\n }) => React.ReactElement | null;\n onLoadNext: () => Promise<void>;\n flatListProps?: Omit<FlatListProps<SendbirdOpenChannel>, 'data' | 'renderItem'>;\n refreshing: boolean;\n onRefresh: () => void;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelList\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelListContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n }>;\n};\nexport interface OpenChannelListModule {\n Provider: CommonComponent;\n Header: CommonComponent<OpenChannelListProps['Header']>;\n List: CommonComponent<OpenChannelListProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelListProps['StatusError']>;\n}\n\nexport type OpenChannelListFragment = React.FC<OpenChannelListProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelModerationProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: OpenChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedParticipants: OpenChannelModerationProps['Menu']['onPressMenuMutedParticipants'];\n onPressMenuBannedUsers: OpenChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: OpenChannelModerationProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedParticipants: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelModerationModule {\n Provider: CommonComponent<OpenChannelModerationProps['Provider']>;\n Header: CommonComponent<OpenChannelModerationProps['Header']>;\n Menu: CommonComponent<OpenChannelModerationProps['Menu']>;\n}\n\nexport type OpenChannelModerationFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelModerationProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelModerationProps['Header']['onPressHeaderLeft'];\n onPressMenuOperators: OpenChannelModerationProps['Menu']['onPressMenuOperators'];\n onPressMenuMutedParticipants: OpenChannelModerationProps['Menu']['onPressMenuMutedParticipants'];\n onPressMenuBannedUsers: OpenChannelModerationProps['Menu']['onPressMenuBannedUsers'];\n menuItemsCreator?: OpenChannelModerationProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Menu: {\n onPressMenuOperators: () => void;\n onPressMenuMutedParticipants: () => void;\n onPressMenuBannedUsers: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelModeration\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelModerationContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelModerationModule {\n Provider: CommonComponent<OpenChannelModerationProps['Provider']>;\n Header: CommonComponent<OpenChannelModerationProps['Header']>;\n Menu: CommonComponent<OpenChannelModerationProps['Menu']>;\n}\n\nexport type OpenChannelModerationFragment = React.FC<OpenChannelModerationProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelMutedParticipantsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelMutedParticipantsProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelMutedParticipantsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdRestrictedUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n List: {\n renderUser: (props: { user: SendbirdRestrictedUser }) => React.ReactElement | null;\n onLoadNext: () => void;\n mutedParticipants: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelMutedParticipants\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelMutedParticipantsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelMutedParticipantsModule {\n Provider: CommonComponent<OpenChannelMutedParticipantsProps['Provider']>;\n Header: CommonComponent<OpenChannelMutedParticipantsProps['Header']>;\n List: CommonComponent<OpenChannelMutedParticipantsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelMutedParticipantsProps['StatusError']>;\n}\n\nexport type OpenChannelMutedParticipantsFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdRestrictedUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelMutedParticipantsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelMutedParticipantsProps['Header']['onPressHeaderLeft'];\n renderUser?: OpenChannelMutedParticipantsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdRestrictedUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n List: {\n renderUser: (props: { user: SendbirdRestrictedUser }) => React.ReactElement | null;\n onLoadNext: () => void;\n mutedParticipants: SendbirdRestrictedUser[];\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelMutedParticipants\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelMutedParticipantsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelMutedParticipantsModule {\n Provider: CommonComponent<OpenChannelMutedParticipantsProps['Provider']>;\n Header: CommonComponent<OpenChannelMutedParticipantsProps['Header']>;\n List: CommonComponent<OpenChannelMutedParticipantsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelMutedParticipantsProps['StatusError']>;\n}\n\nexport type OpenChannelMutedParticipantsFragment = React.FC<OpenChannelMutedParticipantsProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: OpenChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: OpenChannelOperatorsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n operators: SendbirdUser[];\n onLoadNext: () => void;\n renderUser: (props: { user: SendbirdUser }) => React.ReactElement | null;\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelOperatorsModule {\n Provider: CommonComponent<OpenChannelOperatorsProps['Provider']>;\n Header: CommonComponent<OpenChannelOperatorsProps['Header']>;\n List: CommonComponent<OpenChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelOperatorsProps['StatusError']>;\n}\n\nexport type OpenChannelOperatorsFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelOperatorsProps = {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: OpenChannelOperatorsProps['Header']['onPressHeaderLeft'];\n onPressHeaderRight: OpenChannelOperatorsProps['Header']['onPressHeaderRight'];\n renderUser?: OpenChannelOperatorsProps['List']['renderUser'];\n queryCreator?: UseUserListOptions<SendbirdUser>['queryCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n onPressHeaderRight: () => void;\n };\n List: {\n operators: SendbirdUser[];\n onLoadNext: () => void;\n renderUser: (props: { user: SendbirdUser }) => React.ReactElement | null;\n ListEmptyComponent?: React.ReactElement;\n };\n StatusError: {\n onPressRetry: () => void;\n };\n Provider: {\n channel: SendbirdOpenChannel;\n };\n};\n\n/**\n * Internal context for OpenChannelOperators\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelOperatorsContextsType = {\n Fragment: React.Context<{\n headerTitle: string;\n channel: SendbirdOpenChannel;\n }>;\n};\nexport interface OpenChannelOperatorsModule {\n Provider: CommonComponent<OpenChannelOperatorsProps['Provider']>;\n Header: CommonComponent<OpenChannelOperatorsProps['Header']>;\n List: CommonComponent<OpenChannelOperatorsProps['List']>;\n StatusEmpty: CommonComponent;\n StatusLoading: CommonComponent;\n StatusError: CommonComponent<OpenChannelOperatorsProps['StatusError']>;\n}\n\nexport type OpenChannelOperatorsFragment = React.FC<OpenChannelOperatorsProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelSettingsProps = {\n Fragment: {\n channel: OpenChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: OpenChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: OpenChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuParticipants: OpenChannelSettingsProps['Menu']['onPressMenuParticipants'];\n onPressMenuDeleteChannel: OpenChannelSettingsProps['Menu']['onPressMenuDeleteChannel'];\n onNavigateToOpenChannel: OpenChannelSettingsProps['Provider']['onNavigateToOpenChannel'];\n menuItemsCreator?: OpenChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuParticipants: () => void;\n onPressMenuDeleteChannel: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n onNavigateToOpenChannel: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelSettingsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdOpenChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n};\nexport interface OpenChannelSettingsModule {\n Provider: CommonComponent<OpenChannelSettingsProps['Provider']>;\n Header: CommonComponent<OpenChannelSettingsProps['Header']>;\n Info: CommonComponent<OpenChannelSettingsProps['Info']>;\n Menu: CommonComponent<OpenChannelSettingsProps['Menu']>;\n}\n\nexport type OpenChannelSettingsFragment =
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { MenuBarProps } from '@sendbird/uikit-react-native-foundation';\nimport type { SendbirdOpenChannel } from '@sendbird/uikit-utils';\n\nimport type { CommonComponent } from '../../types';\n\nexport type OpenChannelSettingsProps = {\n Fragment: {\n channel: OpenChannelSettingsProps['Provider']['channel'];\n onPressHeaderLeft: OpenChannelSettingsProps['Header']['onPressHeaderLeft'];\n onPressMenuModeration: OpenChannelSettingsProps['Menu']['onPressMenuModeration'];\n onPressMenuParticipants: OpenChannelSettingsProps['Menu']['onPressMenuParticipants'];\n onPressMenuDeleteChannel: OpenChannelSettingsProps['Menu']['onPressMenuDeleteChannel'];\n onNavigateToOpenChannel: OpenChannelSettingsProps['Provider']['onNavigateToOpenChannel'];\n menuItemsCreator?: OpenChannelSettingsProps['Menu']['menuItemsCreator'];\n };\n Header: {\n onPressHeaderLeft: () => void;\n };\n Info: {};\n Menu: {\n onPressMenuModeration: () => void;\n onPressMenuParticipants: () => void;\n onPressMenuDeleteChannel: () => void;\n menuItemsCreator?: (defaultMenuItems: MenuBarProps[]) => MenuBarProps[];\n };\n Provider: {\n channel: SendbirdOpenChannel;\n onNavigateToOpenChannel: () => void;\n };\n};\n\n/**\n * Internal context for OpenChannelSettings\n * For example, the developer can create a custom header\n * with getting data from the domain context\n * */\nexport type OpenChannelSettingsContextsType = {\n Fragment: React.Context<{\n channel: SendbirdOpenChannel;\n headerTitle: string;\n headerRight: string;\n onPressHeaderRight: () => void;\n }>;\n};\nexport interface OpenChannelSettingsModule {\n Provider: CommonComponent<OpenChannelSettingsProps['Provider']>;\n Header: CommonComponent<OpenChannelSettingsProps['Header']>;\n Info: CommonComponent<OpenChannelSettingsProps['Info']>;\n Menu: CommonComponent<OpenChannelSettingsProps['Menu']>;\n}\n\nexport type OpenChannelSettingsFragment = React.FC<OpenChannelSettingsProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdParticipant, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type {
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';\nimport type { SendbirdOpenChannel, SendbirdParticipant, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport type { UserListProps } from '../userList/types';\n\nexport interface OpenChannelParticipantsProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelParticipantsFragment = React.FC<OpenChannelParticipantsProps['Fragment']>;\n\nexport interface OpenChannelRegisterOperatorProps {\n Fragment: {\n channel: SendbirdOpenChannel;\n onPressHeaderLeft: () => void;\n onPressHeaderRight: (channel: SendbirdOpenChannel) => void;\n renderUser?: UserListProps<SendbirdParticipant>['List']['renderUser'];\n // NOTE: SDK does not migrate the response type of query to Participant from User yet due to backward compat.\n queryCreator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['queryCreator'];\n sortComparator?: UseUserListOptions<SendbirdUser | SendbirdParticipant>['sortComparator'];\n };\n}\nexport type OpenChannelRegisterOperatorFragment = React.FC<OpenChannelRegisterOperatorProps['Fragment']>;\n"],"mappings":""}
|
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _groupChannel = require("@sendbird/chat/groupChannel");
|
|
8
9
|
var _message = require("@sendbird/chat/message");
|
|
9
|
-
var _uikitChatHooks = require("@sendbird/uikit-chat-hooks");
|
|
10
10
|
var _uikitReactNativeFoundation = require("@sendbird/uikit-react-native-foundation");
|
|
11
|
+
var _uikitTools = require("@sendbird/uikit-tools");
|
|
11
12
|
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
12
13
|
var _GroupChannelMessageRenderer = _interopRequireWildcard(require("../components/GroupChannelMessageRenderer"));
|
|
13
14
|
var _NewMessagesButton = _interopRequireDefault(require("../components/NewMessagesButton"));
|
|
@@ -39,9 +40,10 @@ const createGroupChannelFragment = initModule => {
|
|
|
39
40
|
onBeforeUpdateFileMessage = _uikitUtils.PASS,
|
|
40
41
|
channel,
|
|
41
42
|
keyboardAvoidOffset,
|
|
42
|
-
collectionCreator,
|
|
43
43
|
sortComparator = _uikitUtils.messageComparator,
|
|
44
|
-
flatListProps
|
|
44
|
+
flatListProps,
|
|
45
|
+
messageListQueryParams,
|
|
46
|
+
collectionCreator
|
|
45
47
|
} = _ref;
|
|
46
48
|
const {
|
|
47
49
|
playerService,
|
|
@@ -65,8 +67,8 @@ const createGroupChannelFragment = initModule => {
|
|
|
65
67
|
messages,
|
|
66
68
|
newMessages,
|
|
67
69
|
resetNewMessages,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
+
loadNext,
|
|
71
|
+
loadPrevious,
|
|
70
72
|
hasNext,
|
|
71
73
|
sendFileMessage,
|
|
72
74
|
sendUserMessage,
|
|
@@ -75,7 +77,7 @@ const createGroupChannelFragment = initModule => {
|
|
|
75
77
|
resendMessage,
|
|
76
78
|
deleteMessage,
|
|
77
79
|
resetWithStartingPoint
|
|
78
|
-
} = (0,
|
|
80
|
+
} = (0, _uikitTools.useGroupChannelMessages)(sdk, channel, {
|
|
79
81
|
shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,
|
|
80
82
|
onMessagesReceived(messages) {
|
|
81
83
|
groupChannelPubSub.publish({
|
|
@@ -93,12 +95,13 @@ const createGroupChannelFragment = initModule => {
|
|
|
93
95
|
}
|
|
94
96
|
});
|
|
95
97
|
},
|
|
96
|
-
collectionCreator,
|
|
97
|
-
sortComparator,
|
|
98
98
|
onChannelDeleted,
|
|
99
|
+
onCurrentUserBanned: onChannelDeleted,
|
|
100
|
+
collectionCreator: getCollectionCreator(channel, messageListQueryParams, collectionCreator),
|
|
101
|
+
sortComparator,
|
|
102
|
+
markAsRead: _uikitUtils.confirmAndMarkAsRead,
|
|
99
103
|
replyType,
|
|
100
|
-
startingPoint: internalSearchItem === null || internalSearchItem === void 0 ? void 0 : internalSearchItem.startingPoint
|
|
101
|
-
enableCollectionWithoutLocalCache: true
|
|
104
|
+
startingPoint: internalSearchItem === null || internalSearchItem === void 0 ? void 0 : internalSearchItem.startingPoint
|
|
102
105
|
});
|
|
103
106
|
const onBlurFragment = () => {
|
|
104
107
|
return Promise.allSettled([playerService.reset(), recorderService.reset()]);
|
|
@@ -131,11 +134,11 @@ const createGroupChannelFragment = initModule => {
|
|
|
131
134
|
},
|
|
132
135
|
...flatListProps
|
|
133
136
|
}), [flatListProps]);
|
|
134
|
-
const onResetMessageList = (0, _react.useCallback)(
|
|
135
|
-
resetWithStartingPoint(Number.MAX_SAFE_INTEGER
|
|
137
|
+
const onResetMessageList = (0, _react.useCallback)(async () => {
|
|
138
|
+
return await resetWithStartingPoint(Number.MAX_SAFE_INTEGER);
|
|
136
139
|
}, []);
|
|
137
|
-
const onResetMessageListWithStartingPoint = (0, _react.useCallback)(
|
|
138
|
-
resetWithStartingPoint(startingPoint
|
|
140
|
+
const onResetMessageListWithStartingPoint = (0, _react.useCallback)(async startingPoint => {
|
|
141
|
+
return await resetWithStartingPoint(startingPoint);
|
|
139
142
|
}, []);
|
|
140
143
|
|
|
141
144
|
// Changing the search item will trigger the focus animation on messages.
|
|
@@ -207,8 +210,8 @@ const createGroupChannelFragment = initModule => {
|
|
|
207
210
|
renderMessage: renderItem,
|
|
208
211
|
messages: messages,
|
|
209
212
|
newMessages: newMessages,
|
|
210
|
-
onTopReached:
|
|
211
|
-
onBottomReached:
|
|
213
|
+
onTopReached: loadPrevious,
|
|
214
|
+
onBottomReached: loadNext,
|
|
212
215
|
hasNext: hasNext,
|
|
213
216
|
scrolledAwayFromBottom: scrolledAwayFromBottom,
|
|
214
217
|
onScrolledAwayFromBottom: onScrolledAwayFromBottom,
|
|
@@ -234,6 +237,19 @@ function shouldRenderInput(channel) {
|
|
|
234
237
|
}
|
|
235
238
|
return true;
|
|
236
239
|
}
|
|
240
|
+
function getCollectionCreator(channel, messageListQueryParams, deprecatedCreatorProp) {
|
|
241
|
+
if (!messageListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;
|
|
242
|
+
return defaultParams => {
|
|
243
|
+
const params = {
|
|
244
|
+
...defaultParams,
|
|
245
|
+
...messageListQueryParams
|
|
246
|
+
};
|
|
247
|
+
return channel.createMessageCollection({
|
|
248
|
+
...params,
|
|
249
|
+
filter: new _groupChannel.MessageFilter(params)
|
|
250
|
+
});
|
|
251
|
+
};
|
|
252
|
+
}
|
|
237
253
|
var _default = createGroupChannelFragment;
|
|
238
254
|
exports.default = _default;
|
|
239
255
|
//# sourceMappingURL=createGroupChannelFragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_message","_uikitChatHooks","_uikitReactNativeFoundation","_uikitUtils","_GroupChannelMessageRenderer","_NewMessagesButton","_interopRequireDefault","_ScrollToBottomButton","_StatusComposition","_createGroupChannelModule","_useContext","_pubsub","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","createGroupChannelFragment","initModule","GroupChannelModule","createGroupChannelModule","_ref","searchItem","renderNewMessagesButton","props","createElement","renderScrollToBottomButton","renderMessage","enableMessageGrouping","enableTypingIndicator","onPressHeaderLeft","NOOP","onPressHeaderRight","onPressMediaMessage","onChannelDeleted","onBeforeSendUserMessage","PASS","onBeforeSendFileMessage","onBeforeUpdateUserMessage","onBeforeUpdateFileMessage","channel","keyboardAvoidOffset","collectionCreator","sortComparator","messageComparator","flatListProps","playerService","recorderService","usePlatformService","sdk","currentUser","sbOptions","useSendbirdChat","internalSearchItem","setInternalSearchItem","useState","navigateFromMessageSearch","useCallback","Boolean","groupChannelPubSub","pubsub","scrolledAwayFromBottom","setScrolledAwayFromBottom","scrolledAwayFromBottomRef","useRefTracker","replyType","useIIFE","uikit","groupChannel","ReplyType","NONE","ONLY_REPLY_TO_CHANNEL","loading","messages","newMessages","resetNewMessages","next","prev","hasNext","sendFileMessage","sendUserMessage","updateFileMessage","updateUserMessage","resendMessage","deleteMessage","resetWithStartingPoint","useGroupChannelMessages","userId","shouldCountNewMessages","current","onMessagesReceived","publish","type","data","onMessagesUpdated","startingPoint","enableCollectionWithoutLocalCache","onBlurFragment","Promise","allSettled","reset","_onPressHeaderLeft","useFreshCallback","_onPressHeaderRight","_onPressMediaMessage","message","uri","useEffect","renderItem","content","Box","isFirstItem","GroupChannelTypingIndicatorBubble","memoizedFlatListProps","useMemo","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","onResetMessageList","callback","Number","MAX_SAFE_INTEGER","onResetMessageListWithStartingPoint","onUpdateSearchItem","undefined","onPending","onSent","onPressSendUserMessage","params","processedParams","onPressSendFileMessage","onPressUpdateUserMessage","messageId","onPressUpdateFileMessage","onScrolledAwayFromBottom","value","Provider","Header","shouldHideRight","LoadingComponent","StatusLoading","MessageList","currentUserId","onTopReached","onBottomReached","onResendFailedMessage","onDeleteMessage","Input","SuggestedMentionList","shouldRenderInput","isBroadcast","myRole","_default","exports"],"sources":["createGroupChannelFragment.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { ReplyType } from '@sendbird/chat/message';\nimport { useGroupChannelMessages } from '@sendbird/uikit-chat-hooks';\nimport { Box } from '@sendbird/uikit-react-native-foundation';\nimport {\n NOOP,\n PASS,\n SendbirdFileMessage,\n SendbirdGroupChannel,\n SendbirdUserMessage,\n messageComparator,\n useFreshCallback,\n useIIFE,\n useRefTracker,\n} from '@sendbird/uikit-utils';\n\nimport GroupChannelMessageRenderer, {\n GroupChannelTypingIndicatorBubble,\n} from '../components/GroupChannelMessageRenderer';\nimport NewMessagesButton from '../components/NewMessagesButton';\nimport ScrollToBottomButton from '../components/ScrollToBottomButton';\nimport StatusComposition from '../components/StatusComposition';\nimport createGroupChannelModule from '../domain/groupChannel/module/createGroupChannelModule';\nimport type {\n GroupChannelFragment,\n GroupChannelModule,\n GroupChannelProps,\n GroupChannelPubSubContextPayload,\n} from '../domain/groupChannel/types';\nimport { usePlatformService, useSendbirdChat } from '../hooks/useContext';\nimport pubsub from '../utils/pubsub';\n\nconst createGroupChannelFragment = (initModule?: Partial<GroupChannelModule>): GroupChannelFragment => {\n const GroupChannelModule = createGroupChannelModule(initModule);\n\n return ({\n searchItem,\n renderNewMessagesButton = (props) => <NewMessagesButton {...props} />,\n renderScrollToBottomButton = (props) => <ScrollToBottomButton {...props} />,\n renderMessage,\n enableMessageGrouping = true,\n enableTypingIndicator,\n onPressHeaderLeft = NOOP,\n onPressHeaderRight = NOOP,\n onPressMediaMessage = NOOP,\n onChannelDeleted = NOOP,\n onBeforeSendUserMessage = PASS,\n onBeforeSendFileMessage = PASS,\n onBeforeUpdateUserMessage = PASS,\n onBeforeUpdateFileMessage = PASS,\n channel,\n keyboardAvoidOffset,\n collectionCreator,\n sortComparator = messageComparator,\n flatListProps,\n }) => {\n const { playerService, recorderService } = usePlatformService();\n const { sdk, currentUser, sbOptions } = useSendbirdChat();\n\n const [internalSearchItem, setInternalSearchItem] = useState(searchItem);\n const navigateFromMessageSearch = useCallback(() => Boolean(searchItem), []);\n\n const [groupChannelPubSub] = useState(() => pubsub<GroupChannelPubSubContextPayload>());\n const [scrolledAwayFromBottom, setScrolledAwayFromBottom] = useState(false);\n const scrolledAwayFromBottomRef = useRefTracker(scrolledAwayFromBottom);\n\n const replyType = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType === 'none') return ReplyType.NONE;\n else return ReplyType.ONLY_REPLY_TO_CHANNEL;\n });\n\n const {\n loading,\n messages,\n newMessages,\n resetNewMessages,\n next,\n prev,\n hasNext,\n sendFileMessage,\n sendUserMessage,\n updateFileMessage,\n updateUserMessage,\n resendMessage,\n deleteMessage,\n resetWithStartingPoint,\n } = useGroupChannelMessages(sdk, channel, currentUser?.userId, {\n shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,\n onMessagesReceived(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_RECEIVED', data: { messages } });\n },\n onMessagesUpdated(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_UPDATED', data: { messages } });\n },\n collectionCreator,\n sortComparator,\n onChannelDeleted,\n replyType,\n startingPoint: internalSearchItem?.startingPoint,\n enableCollectionWithoutLocalCache: true,\n });\n\n const onBlurFragment = () => {\n return Promise.allSettled([playerService.reset(), recorderService.reset()]);\n };\n const _onPressHeaderLeft = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderLeft();\n });\n const _onPressHeaderRight = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderRight();\n });\n const _onPressMediaMessage: NonNullable<GroupChannelProps['MessageList']['onPressMediaMessage']> = useFreshCallback(\n async (message, deleteMessage, uri) => {\n await onBlurFragment();\n onPressMediaMessage(message, deleteMessage, uri);\n },\n );\n\n useEffect(() => {\n return () => {\n onBlurFragment();\n };\n }, []);\n\n const renderItem: GroupChannelProps['MessageList']['renderMessage'] = useFreshCallback((props) => {\n const content = renderMessage ? renderMessage(props) : <GroupChannelMessageRenderer {...props} />;\n return (\n <Box>\n {content}\n {props.isFirstItem && !hasNext() && <GroupChannelTypingIndicatorBubble />}\n </Box>\n );\n });\n\n const memoizedFlatListProps = useMemo(\n () => ({\n ListEmptyComponent: <GroupChannelModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }),\n [flatListProps],\n );\n\n const onResetMessageList = useCallback((callback?: () => void) => {\n resetWithStartingPoint(Number.MAX_SAFE_INTEGER, callback);\n }, []);\n\n const onResetMessageListWithStartingPoint = useCallback((startingPoint: number, callback?: () => void) => {\n resetWithStartingPoint(startingPoint, callback);\n }, []);\n\n // Changing the search item will trigger the focus animation on messages.\n const onUpdateSearchItem: GroupChannelProps['MessageList']['onUpdateSearchItem'] = useCallback((searchItem) => {\n // Clean up for animation trigger with useEffect\n setInternalSearchItem(undefined);\n setInternalSearchItem(searchItem);\n }, []);\n\n const onPending = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_PENDING', data: { message } });\n };\n\n const onSent = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_SUCCESS', data: { message } });\n };\n\n const onPressSendUserMessage: GroupChannelProps['Input']['onPressSendUserMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendUserMessage(params);\n const message = await sendUserMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressSendFileMessage: GroupChannelProps['Input']['onPressSendFileMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendFileMessage(params);\n const message = await sendFileMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressUpdateUserMessage: GroupChannelProps['Input']['onPressUpdateUserMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateUserMessage(params);\n await updateUserMessage(message.messageId, processedParams);\n },\n );\n const onPressUpdateFileMessage: GroupChannelProps['Input']['onPressUpdateFileMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateFileMessage(params);\n await updateFileMessage(message.messageId, processedParams);\n },\n );\n const onScrolledAwayFromBottom = useFreshCallback((value: boolean) => {\n if (!value) resetNewMessages();\n setScrolledAwayFromBottom(value);\n });\n\n return (\n <GroupChannelModule.Provider\n channel={channel}\n groupChannelPubSub={groupChannelPubSub}\n enableTypingIndicator={enableTypingIndicator ?? sbOptions.uikit.groupChannel.channel.enableTypingIndicator}\n keyboardAvoidOffset={keyboardAvoidOffset}\n messages={messages}\n onUpdateSearchItem={onUpdateSearchItem}\n >\n <GroupChannelModule.Header\n shouldHideRight={navigateFromMessageSearch}\n onPressHeaderLeft={_onPressHeaderLeft}\n onPressHeaderRight={_onPressHeaderRight}\n />\n <StatusComposition loading={loading} LoadingComponent={<GroupChannelModule.StatusLoading />}>\n <GroupChannelModule.MessageList\n channel={channel}\n searchItem={internalSearchItem}\n onResetMessageList={onResetMessageList}\n onResetMessageListWithStartingPoint={onResetMessageListWithStartingPoint}\n onUpdateSearchItem={onUpdateSearchItem}\n enableMessageGrouping={enableMessageGrouping}\n currentUserId={currentUser?.userId}\n renderMessage={renderItem}\n messages={messages}\n newMessages={newMessages}\n onTopReached={prev}\n onBottomReached={next}\n hasNext={hasNext}\n scrolledAwayFromBottom={scrolledAwayFromBottom}\n onScrolledAwayFromBottom={onScrolledAwayFromBottom}\n renderNewMessagesButton={renderNewMessagesButton}\n renderScrollToBottomButton={renderScrollToBottomButton}\n onResendFailedMessage={resendMessage}\n onDeleteMessage={deleteMessage}\n onPressMediaMessage={_onPressMediaMessage}\n flatListProps={memoizedFlatListProps}\n />\n <GroupChannelModule.Input\n SuggestedMentionList={GroupChannelModule.SuggestedMentionList}\n shouldRenderInput={shouldRenderInput(channel)}\n onPressSendUserMessage={onPressSendUserMessage}\n onPressSendFileMessage={onPressSendFileMessage}\n onPressUpdateUserMessage={onPressUpdateUserMessage}\n onPressUpdateFileMessage={onPressUpdateFileMessage}\n />\n </StatusComposition>\n </GroupChannelModule.Provider>\n );\n };\n};\n\nfunction shouldRenderInput(channel: SendbirdGroupChannel) {\n if (channel.isBroadcast) {\n return channel.myRole === 'operator';\n }\n\n return true;\n}\n\nexport default createGroupChannelFragment;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAYA,IAAAK,4BAAA,GAAAN,uBAAA,CAAAC,OAAA;AAGA,IAAAM,kBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAD,sBAAA,CAAAP,OAAA;AACA,IAAAS,kBAAA,GAAAF,sBAAA,CAAAP,OAAA;AACA,IAAAU,yBAAA,GAAAH,sBAAA,CAAAP,OAAA;AAOA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,OAAA,GAAAL,sBAAA,CAAAP,OAAA;AAAqC,SAAAO,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAA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AAElI,kBAAkB,CAACkI,oBAAqB;MAC9DC,iBAAiB,EAAEA,iBAAiB,CAAC9G,OAAO,CAAE;MAC9CwF,sBAAsB,EAAEA,sBAAuB;MAC/CG,sBAAsB,EAAEA,sBAAuB;MAC/CC,wBAAwB,EAAEA,wBAAyB;MACnDE,wBAAwB,EAAEA;IAAyB,EACnD,CACgB,CACQ;EAElC,CAAC;AACH,CAAC;AAED,SAASgB,iBAAiBA,CAAC9G,OAA6B,EAAE;EACxD,IAAIA,OAAO,CAAC+G,WAAW,EAAE;IACvB,OAAO/G,OAAO,CAACgH,MAAM,KAAK,UAAU;EACtC;EAEA,OAAO,IAAI;AACb;AAAC,IAAAC,QAAA,GAEcxI,0BAA0B;AAAAyI,OAAA,CAAA7J,OAAA,GAAA4J,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_groupChannel","_message","_uikitReactNativeFoundation","_uikitTools","_uikitUtils","_GroupChannelMessageRenderer","_NewMessagesButton","_interopRequireDefault","_ScrollToBottomButton","_StatusComposition","_createGroupChannelModule","_useContext","_pubsub","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","createGroupChannelFragment","initModule","GroupChannelModule","createGroupChannelModule","_ref","searchItem","renderNewMessagesButton","props","createElement","renderScrollToBottomButton","renderMessage","enableMessageGrouping","enableTypingIndicator","onPressHeaderLeft","NOOP","onPressHeaderRight","onPressMediaMessage","onChannelDeleted","onBeforeSendUserMessage","PASS","onBeforeSendFileMessage","onBeforeUpdateUserMessage","onBeforeUpdateFileMessage","channel","keyboardAvoidOffset","sortComparator","messageComparator","flatListProps","messageListQueryParams","collectionCreator","playerService","recorderService","usePlatformService","sdk","currentUser","sbOptions","useSendbirdChat","internalSearchItem","setInternalSearchItem","useState","navigateFromMessageSearch","useCallback","Boolean","groupChannelPubSub","pubsub","scrolledAwayFromBottom","setScrolledAwayFromBottom","scrolledAwayFromBottomRef","useRefTracker","replyType","useIIFE","uikit","groupChannel","ReplyType","NONE","ONLY_REPLY_TO_CHANNEL","loading","messages","newMessages","resetNewMessages","loadNext","loadPrevious","hasNext","sendFileMessage","sendUserMessage","updateFileMessage","updateUserMessage","resendMessage","deleteMessage","resetWithStartingPoint","useGroupChannelMessages","shouldCountNewMessages","current","onMessagesReceived","publish","type","data","onMessagesUpdated","onCurrentUserBanned","getCollectionCreator","markAsRead","confirmAndMarkAsRead","startingPoint","onBlurFragment","Promise","allSettled","reset","_onPressHeaderLeft","useFreshCallback","_onPressHeaderRight","_onPressMediaMessage","message","uri","useEffect","renderItem","content","Box","isFirstItem","GroupChannelTypingIndicatorBubble","memoizedFlatListProps","useMemo","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","onResetMessageList","Number","MAX_SAFE_INTEGER","onResetMessageListWithStartingPoint","onUpdateSearchItem","undefined","onPending","onSent","onPressSendUserMessage","params","processedParams","onPressSendFileMessage","onPressUpdateUserMessage","messageId","onPressUpdateFileMessage","onScrolledAwayFromBottom","value","Provider","Header","shouldHideRight","LoadingComponent","StatusLoading","MessageList","currentUserId","userId","onTopReached","onBottomReached","onResendFailedMessage","onDeleteMessage","Input","SuggestedMentionList","shouldRenderInput","isBroadcast","myRole","deprecatedCreatorProp","defaultParams","createMessageCollection","filter","MessageFilter","_default","exports"],"sources":["createGroupChannelFragment.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { MessageCollection, MessageFilter } from '@sendbird/chat/groupChannel';\nimport { ReplyType } from '@sendbird/chat/message';\nimport { Box } from '@sendbird/uikit-react-native-foundation';\nimport { useGroupChannelMessages } from '@sendbird/uikit-tools';\nimport type { SendbirdFileMessage, SendbirdGroupChannel, SendbirdUserMessage } from '@sendbird/uikit-utils';\nimport {\n NOOP,\n PASS,\n confirmAndMarkAsRead,\n messageComparator,\n useFreshCallback,\n useIIFE,\n useRefTracker,\n} from '@sendbird/uikit-utils';\n\nimport GroupChannelMessageRenderer, {\n GroupChannelTypingIndicatorBubble,\n} from '../components/GroupChannelMessageRenderer';\nimport NewMessagesButton from '../components/NewMessagesButton';\nimport ScrollToBottomButton from '../components/ScrollToBottomButton';\nimport StatusComposition from '../components/StatusComposition';\nimport createGroupChannelModule from '../domain/groupChannel/module/createGroupChannelModule';\nimport type {\n GroupChannelFragment,\n GroupChannelModule,\n GroupChannelProps,\n GroupChannelPubSubContextPayload,\n} from '../domain/groupChannel/types';\nimport { usePlatformService, useSendbirdChat } from '../hooks/useContext';\nimport pubsub from '../utils/pubsub';\n\nconst createGroupChannelFragment = (initModule?: Partial<GroupChannelModule>): GroupChannelFragment => {\n const GroupChannelModule = createGroupChannelModule(initModule);\n\n return ({\n searchItem,\n renderNewMessagesButton = (props) => <NewMessagesButton {...props} />,\n renderScrollToBottomButton = (props) => <ScrollToBottomButton {...props} />,\n renderMessage,\n enableMessageGrouping = true,\n enableTypingIndicator,\n onPressHeaderLeft = NOOP,\n onPressHeaderRight = NOOP,\n onPressMediaMessage = NOOP,\n onChannelDeleted = NOOP,\n onBeforeSendUserMessage = PASS,\n onBeforeSendFileMessage = PASS,\n onBeforeUpdateUserMessage = PASS,\n onBeforeUpdateFileMessage = PASS,\n channel,\n keyboardAvoidOffset,\n sortComparator = messageComparator,\n flatListProps,\n messageListQueryParams,\n collectionCreator,\n }) => {\n const { playerService, recorderService } = usePlatformService();\n const { sdk, currentUser, sbOptions } = useSendbirdChat();\n\n const [internalSearchItem, setInternalSearchItem] = useState(searchItem);\n const navigateFromMessageSearch = useCallback(() => Boolean(searchItem), []);\n\n const [groupChannelPubSub] = useState(() => pubsub<GroupChannelPubSubContextPayload>());\n const [scrolledAwayFromBottom, setScrolledAwayFromBottom] = useState(false);\n const scrolledAwayFromBottomRef = useRefTracker(scrolledAwayFromBottom);\n\n const replyType = useIIFE(() => {\n if (sbOptions.uikit.groupChannel.channel.replyType === 'none') return ReplyType.NONE;\n else return ReplyType.ONLY_REPLY_TO_CHANNEL;\n });\n\n const {\n loading,\n messages,\n newMessages,\n resetNewMessages,\n loadNext,\n loadPrevious,\n hasNext,\n sendFileMessage,\n sendUserMessage,\n updateFileMessage,\n updateUserMessage,\n resendMessage,\n deleteMessage,\n resetWithStartingPoint,\n } = useGroupChannelMessages(sdk, channel, {\n shouldCountNewMessages: () => scrolledAwayFromBottomRef.current,\n onMessagesReceived(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_RECEIVED', data: { messages } });\n },\n onMessagesUpdated(messages) {\n groupChannelPubSub.publish({ type: 'MESSAGES_UPDATED', data: { messages } });\n },\n onChannelDeleted,\n onCurrentUserBanned: onChannelDeleted,\n collectionCreator: getCollectionCreator(channel, messageListQueryParams, collectionCreator),\n sortComparator,\n markAsRead: confirmAndMarkAsRead,\n replyType,\n startingPoint: internalSearchItem?.startingPoint,\n });\n\n const onBlurFragment = () => {\n return Promise.allSettled([playerService.reset(), recorderService.reset()]);\n };\n const _onPressHeaderLeft = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderLeft();\n });\n const _onPressHeaderRight = useFreshCallback(async () => {\n await onBlurFragment();\n onPressHeaderRight();\n });\n const _onPressMediaMessage: NonNullable<GroupChannelProps['MessageList']['onPressMediaMessage']> = useFreshCallback(\n async (message, deleteMessage, uri) => {\n await onBlurFragment();\n onPressMediaMessage(message, deleteMessage, uri);\n },\n );\n\n useEffect(() => {\n return () => {\n onBlurFragment();\n };\n }, []);\n\n const renderItem: GroupChannelProps['MessageList']['renderMessage'] = useFreshCallback((props) => {\n const content = renderMessage ? renderMessage(props) : <GroupChannelMessageRenderer {...props} />;\n return (\n <Box>\n {content}\n {props.isFirstItem && !hasNext() && <GroupChannelTypingIndicatorBubble />}\n </Box>\n );\n });\n\n const memoizedFlatListProps = useMemo(\n () => ({\n ListEmptyComponent: <GroupChannelModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }),\n [flatListProps],\n );\n\n const onResetMessageList = useCallback(async () => {\n return await resetWithStartingPoint(Number.MAX_SAFE_INTEGER);\n }, []);\n\n const onResetMessageListWithStartingPoint = useCallback(async (startingPoint: number) => {\n return await resetWithStartingPoint(startingPoint);\n }, []);\n\n // Changing the search item will trigger the focus animation on messages.\n const onUpdateSearchItem: GroupChannelProps['MessageList']['onUpdateSearchItem'] = useCallback((searchItem) => {\n // Clean up for animation trigger with useEffect\n setInternalSearchItem(undefined);\n setInternalSearchItem(searchItem);\n }, []);\n\n const onPending = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_PENDING', data: { message } });\n };\n\n const onSent = (message: SendbirdFileMessage | SendbirdUserMessage) => {\n groupChannelPubSub.publish({ type: 'MESSAGE_SENT_SUCCESS', data: { message } });\n };\n\n const onPressSendUserMessage: GroupChannelProps['Input']['onPressSendUserMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendUserMessage(params);\n const message = await sendUserMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressSendFileMessage: GroupChannelProps['Input']['onPressSendFileMessage'] = useFreshCallback(\n async (params) => {\n const processedParams = await onBeforeSendFileMessage(params);\n const message = await sendFileMessage(processedParams, onPending);\n onSent(message);\n },\n );\n const onPressUpdateUserMessage: GroupChannelProps['Input']['onPressUpdateUserMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateUserMessage(params);\n await updateUserMessage(message.messageId, processedParams);\n },\n );\n const onPressUpdateFileMessage: GroupChannelProps['Input']['onPressUpdateFileMessage'] = useFreshCallback(\n async (message, params) => {\n const processedParams = await onBeforeUpdateFileMessage(params);\n await updateFileMessage(message.messageId, processedParams);\n },\n );\n const onScrolledAwayFromBottom = useFreshCallback((value: boolean) => {\n if (!value) resetNewMessages();\n setScrolledAwayFromBottom(value);\n });\n\n return (\n <GroupChannelModule.Provider\n channel={channel}\n groupChannelPubSub={groupChannelPubSub}\n enableTypingIndicator={enableTypingIndicator ?? sbOptions.uikit.groupChannel.channel.enableTypingIndicator}\n keyboardAvoidOffset={keyboardAvoidOffset}\n messages={messages}\n onUpdateSearchItem={onUpdateSearchItem}\n >\n <GroupChannelModule.Header\n shouldHideRight={navigateFromMessageSearch}\n onPressHeaderLeft={_onPressHeaderLeft}\n onPressHeaderRight={_onPressHeaderRight}\n />\n <StatusComposition loading={loading} LoadingComponent={<GroupChannelModule.StatusLoading />}>\n <GroupChannelModule.MessageList\n channel={channel}\n searchItem={internalSearchItem}\n onResetMessageList={onResetMessageList}\n onResetMessageListWithStartingPoint={onResetMessageListWithStartingPoint}\n onUpdateSearchItem={onUpdateSearchItem}\n enableMessageGrouping={enableMessageGrouping}\n currentUserId={currentUser?.userId}\n renderMessage={renderItem}\n messages={messages}\n newMessages={newMessages}\n onTopReached={loadPrevious}\n onBottomReached={loadNext}\n hasNext={hasNext}\n scrolledAwayFromBottom={scrolledAwayFromBottom}\n onScrolledAwayFromBottom={onScrolledAwayFromBottom}\n renderNewMessagesButton={renderNewMessagesButton}\n renderScrollToBottomButton={renderScrollToBottomButton}\n onResendFailedMessage={resendMessage}\n onDeleteMessage={deleteMessage}\n onPressMediaMessage={_onPressMediaMessage}\n flatListProps={memoizedFlatListProps}\n />\n <GroupChannelModule.Input\n SuggestedMentionList={GroupChannelModule.SuggestedMentionList}\n shouldRenderInput={shouldRenderInput(channel)}\n onPressSendUserMessage={onPressSendUserMessage}\n onPressSendFileMessage={onPressSendFileMessage}\n onPressUpdateUserMessage={onPressUpdateUserMessage}\n onPressUpdateFileMessage={onPressUpdateFileMessage}\n />\n </StatusComposition>\n </GroupChannelModule.Provider>\n );\n };\n};\n\nfunction shouldRenderInput(channel: SendbirdGroupChannel) {\n if (channel.isBroadcast) {\n return channel.myRole === 'operator';\n }\n\n return true;\n}\n\nfunction getCollectionCreator(\n channel: SendbirdGroupChannel,\n messageListQueryParams?: GroupChannelProps['Fragment']['messageListQueryParams'],\n deprecatedCreatorProp?: () => MessageCollection,\n) {\n if (!messageListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;\n\n return (defaultParams: GroupChannelProps['Fragment']['messageListQueryParams']) => {\n const params = { ...defaultParams, ...messageListQueryParams };\n return channel.createMessageCollection({\n ...params,\n filter: new MessageFilter(params),\n });\n };\n}\n\nexport default createGroupChannelFragment;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,2BAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AAUA,IAAAM,4BAAA,GAAAP,uBAAA,CAAAC,OAAA;AAGA,IAAAO,kBAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,qBAAA,GAAAD,sBAAA,CAAAR,OAAA;AACA,IAAAU,kBAAA,GAAAF,sBAAA,CAAAR,OAAA;AACA,IAAAW,yBAAA,GAAAH,sBAAA,CAAAR,OAAA;AAOA,IAAAY,WAAA,GAAAZ,OAAA;AACA,IAAAa,OAAA,GAAAL,sBAAA,CAAAR,OAAA;AAAqC,SAAAQ,uBAAAM,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAnB,wBAAAe,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAA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OAAO,CAACkH,WAAW,EAAE;IACvB,OAAOlH,OAAO,CAACmH,MAAM,KAAK,UAAU;EACtC;EAEA,OAAO,IAAI;AACb;AAEA,SAAS3D,oBAAoBA,CAC3BxD,OAA6B,EAC7BK,sBAAgF,EAChF+G,qBAA+C,EAC/C;EACA,IAAI,CAAC/G,sBAAsB,IAAI+G,qBAAqB,EAAE,OAAOA,qBAAqB;EAElF,OAAQC,aAAsE,IAAK;IACjF,MAAM1B,MAAM,GAAG;MAAE,GAAG0B,aAAa;MAAE,GAAGhH;IAAuB,CAAC;IAC9D,OAAOL,OAAO,CAACsH,uBAAuB,CAAC;MACrC,GAAG3B,MAAM;MACT4B,MAAM,EAAE,IAAIC,2BAAa,CAAC7B,MAAM;IAClC,CAAC,CAAC;EACJ,CAAC;AACH;AAAC,IAAA8B,QAAA,GAEchJ,0BAA0B;AAAAiJ,OAAA,CAAArK,OAAA,GAAAoK,QAAA"}
|
|
@@ -5,7 +5,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _groupChannel = require("@sendbird/chat/groupChannel");
|
|
9
|
+
var _uikitTools = require("@sendbird/uikit-tools");
|
|
9
10
|
var _uikitUtils = require("@sendbird/uikit-utils");
|
|
10
11
|
var _StatusComposition = _interopRequireDefault(require("../components/StatusComposition"));
|
|
11
12
|
var _GroupChannelPreviewContainer = _interopRequireDefault(require("../containers/GroupChannelPreviewContainer"));
|
|
@@ -18,25 +19,25 @@ const createGroupChannelListFragment = initModule => {
|
|
|
18
19
|
let {
|
|
19
20
|
onPressChannel,
|
|
20
21
|
onPressCreateChannel,
|
|
21
|
-
collectionCreator,
|
|
22
22
|
renderGroupChannelPreview,
|
|
23
23
|
skipTypeSelection = false,
|
|
24
24
|
flatListProps = {},
|
|
25
|
-
menuItemCreator = _uikitUtils.PASS
|
|
25
|
+
menuItemCreator = _uikitUtils.PASS,
|
|
26
|
+
channelListQueryParams,
|
|
27
|
+
collectionCreator
|
|
26
28
|
} = _ref;
|
|
27
29
|
const {
|
|
28
30
|
sdk,
|
|
29
|
-
currentUser,
|
|
30
31
|
sbOptions,
|
|
31
32
|
markAsDeliveredWithChannel
|
|
32
33
|
} = (0, _useContext.useSendbirdChat)();
|
|
33
34
|
const {
|
|
34
35
|
groupChannels,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
} = (0,
|
|
38
|
-
collectionCreator,
|
|
39
|
-
|
|
36
|
+
loadMore,
|
|
37
|
+
initialized
|
|
38
|
+
} = (0, _uikitTools.useGroupChannelList)(sdk, {
|
|
39
|
+
collectionCreator: getCollectionCreator(sdk, channelListQueryParams, collectionCreator),
|
|
40
|
+
markAsDelivered: _uikitUtils.confirmAndMarkAsDelivered
|
|
40
41
|
});
|
|
41
42
|
if (sbOptions.appInfo.deliveryReceiptEnabled) {
|
|
42
43
|
(0, _uikitUtils.useAppState)('change', status => {
|
|
@@ -49,14 +50,14 @@ const createGroupChannelListFragment = initModule => {
|
|
|
49
50
|
});
|
|
50
51
|
const isChannelTypeAvailable = sbOptions.appInfo.broadcastChannelEnabled || sbOptions.appInfo.superGroupChannelEnabled;
|
|
51
52
|
return /*#__PURE__*/_react.default.createElement(GroupChannelListModule.Provider, null, /*#__PURE__*/_react.default.createElement(GroupChannelListModule.Header, null), /*#__PURE__*/_react.default.createElement(_StatusComposition.default, {
|
|
52
|
-
loading:
|
|
53
|
+
loading: !initialized,
|
|
53
54
|
LoadingComponent: /*#__PURE__*/_react.default.createElement(GroupChannelListModule.StatusLoading, null)
|
|
54
55
|
}, /*#__PURE__*/_react.default.createElement(GroupChannelListModule.List, {
|
|
55
56
|
onPressChannel: onPressChannel,
|
|
56
57
|
menuItemCreator: menuItemCreator,
|
|
57
58
|
renderGroupChannelPreview: _renderGroupChannelPreview,
|
|
58
59
|
groupChannels: groupChannels,
|
|
59
|
-
onLoadNext:
|
|
60
|
+
onLoadNext: loadMore,
|
|
60
61
|
flatListProps: {
|
|
61
62
|
ListEmptyComponent: /*#__PURE__*/_react.default.createElement(GroupChannelListModule.StatusEmpty, null),
|
|
62
63
|
contentContainerStyle: {
|
|
@@ -70,6 +71,19 @@ const createGroupChannelListFragment = initModule => {
|
|
|
70
71
|
}));
|
|
71
72
|
};
|
|
72
73
|
};
|
|
74
|
+
function getCollectionCreator(sdk, channelListQueryParams, deprecatedCreatorProp) {
|
|
75
|
+
if (!channelListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;
|
|
76
|
+
return defaultParams => {
|
|
77
|
+
const params = {
|
|
78
|
+
...defaultParams,
|
|
79
|
+
...channelListQueryParams
|
|
80
|
+
};
|
|
81
|
+
return sdk.groupChannel.createGroupChannelCollection({
|
|
82
|
+
...params,
|
|
83
|
+
filter: new _groupChannel.GroupChannelFilter(params)
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
}
|
|
73
87
|
var _default = createGroupChannelListFragment;
|
|
74
88
|
exports.default = _default;
|
|
75
89
|
//# sourceMappingURL=createGroupChannelListFragment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_groupChannel","_uikitTools","_uikitUtils","_StatusComposition","_GroupChannelPreviewContainer","_createGroupChannelListModule","_useContext","obj","__esModule","default","createGroupChannelListFragment","initModule","GroupChannelListModule","createGroupChannelListModule","_ref","onPressChannel","onPressCreateChannel","renderGroupChannelPreview","skipTypeSelection","flatListProps","menuItemCreator","PASS","channelListQueryParams","collectionCreator","sdk","sbOptions","markAsDeliveredWithChannel","useSendbirdChat","groupChannels","loadMore","initialized","useGroupChannelList","getCollectionCreator","markAsDelivered","confirmAndMarkAsDelivered","appInfo","deliveryReceiptEnabled","useAppState","status","forEach","_renderGroupChannelPreview","useFreshCallback","props","createElement","isChannelTypeAvailable","broadcastChannelEnabled","superGroupChannelEnabled","Provider","Header","loading","LoadingComponent","StatusLoading","List","onLoadNext","ListEmptyComponent","StatusEmpty","contentContainerStyle","flexGrow","TypeSelector","onSelectType","deprecatedCreatorProp","defaultParams","params","groupChannel","createGroupChannelCollection","filter","GroupChannelFilter","_default","exports"],"sources":["createGroupChannelListFragment.tsx"],"sourcesContent":["import React from 'react';\n\nimport { GroupChannelCollection, GroupChannelFilter } from '@sendbird/chat/groupChannel';\nimport { useGroupChannelList } from '@sendbird/uikit-tools';\nimport { PASS, SendbirdChatSDK, confirmAndMarkAsDelivered, useAppState, useFreshCallback } from '@sendbird/uikit-utils';\n\nimport StatusComposition from '../components/StatusComposition';\nimport GroupChannelPreviewContainer from '../containers/GroupChannelPreviewContainer';\nimport createGroupChannelListModule from '../domain/groupChannelList/module/createGroupChannelListModule';\nimport type {\n GroupChannelListFragment,\n GroupChannelListModule,\n GroupChannelListProps,\n} from '../domain/groupChannelList/types';\nimport { useSendbirdChat } from '../hooks/useContext';\n\nconst createGroupChannelListFragment = (initModule?: Partial<GroupChannelListModule>): GroupChannelListFragment => {\n const GroupChannelListModule = createGroupChannelListModule(initModule);\n return ({\n onPressChannel,\n onPressCreateChannel,\n renderGroupChannelPreview,\n skipTypeSelection = false,\n flatListProps = {},\n menuItemCreator = PASS,\n channelListQueryParams,\n collectionCreator,\n }) => {\n const { sdk, sbOptions, markAsDeliveredWithChannel } = useSendbirdChat();\n const { groupChannels, loadMore, initialized } = useGroupChannelList(sdk, {\n collectionCreator: getCollectionCreator(sdk, channelListQueryParams, collectionCreator),\n markAsDelivered: confirmAndMarkAsDelivered,\n });\n\n if (sbOptions.appInfo.deliveryReceiptEnabled) {\n useAppState('change', (status) => {\n if (status === 'active') groupChannels.forEach(markAsDeliveredWithChannel);\n });\n }\n\n const _renderGroupChannelPreview: GroupChannelListProps['List']['renderGroupChannelPreview'] = useFreshCallback(\n (props) => {\n if (renderGroupChannelPreview) return renderGroupChannelPreview(props);\n return <GroupChannelPreviewContainer {...props} />;\n },\n );\n\n const isChannelTypeAvailable =\n sbOptions.appInfo.broadcastChannelEnabled || sbOptions.appInfo.superGroupChannelEnabled;\n\n return (\n <GroupChannelListModule.Provider>\n <GroupChannelListModule.Header />\n <StatusComposition loading={!initialized} LoadingComponent={<GroupChannelListModule.StatusLoading />}>\n <GroupChannelListModule.List\n onPressChannel={onPressChannel}\n menuItemCreator={menuItemCreator}\n renderGroupChannelPreview={_renderGroupChannelPreview}\n groupChannels={groupChannels}\n onLoadNext={loadMore}\n flatListProps={{\n ListEmptyComponent: <GroupChannelListModule.StatusEmpty />,\n contentContainerStyle: { flexGrow: 1 },\n ...flatListProps,\n }}\n />\n </StatusComposition>\n <GroupChannelListModule.TypeSelector\n skipTypeSelection={isChannelTypeAvailable ? skipTypeSelection : true}\n onSelectType={onPressCreateChannel}\n />\n </GroupChannelListModule.Provider>\n );\n };\n};\n\nfunction getCollectionCreator(\n sdk: SendbirdChatSDK,\n channelListQueryParams?: GroupChannelListProps['Fragment']['channelListQueryParams'],\n deprecatedCreatorProp?: () => GroupChannelCollection,\n) {\n if (!channelListQueryParams && deprecatedCreatorProp) return deprecatedCreatorProp;\n\n return (defaultParams: GroupChannelListProps['Fragment']['channelListQueryParams']) => {\n const params = { ...defaultParams, ...channelListQueryParams };\n return sdk.groupChannel.createGroupChannelCollection({\n ...params,\n filter: new GroupChannelFilter(params),\n });\n };\n}\n\nexport default createGroupChannelListFragment;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAEA,IAAAI,kBAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,6BAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,6BAAA,GAAAP,sBAAA,CAAAC,OAAA;AAMA,IAAAO,WAAA,GAAAP,OAAA;AAAsD,SAAAD,uBAAAS,GA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;IAAuB,CAAC;IAC9D,OAAOE,GAAG,CAACuC,YAAY,CAACC,4BAA4B,CAAC;MACnD,GAAGF,MAAM;MACTG,MAAM,EAAE,IAAIC,gCAAkB,CAACJ,MAAM;IACvC,CAAC,CAAC;EACJ,CAAC;AACH;AAAC,IAAAK,QAAA,GAEczD,8BAA8B;AAAA0D,OAAA,CAAA3D,OAAA,GAAA0D,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TypingIndicatorType","exports"],"sources":["types.ts"],"sourcesContent":["import type { ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> =
|
|
1
|
+
{"version":3,"names":["TypingIndicatorType","exports"],"sources":["types.ts"],"sourcesContent":["import type { ComponentType, ErrorInfo, ReactNode } from 'react';\n\nimport type { SendbirdUser } from '@sendbird/uikit-utils';\n\nexport type KeyValuePairGet = [string, string | null];\nexport type KeyValuePairSet = [string, string];\nexport interface LocalCacheStorage {\n getAllKeys(): Promise<readonly string[] | string[]>;\n getItem(key: string): Promise<string | null>;\n setItem(key: string, value: string): Promise<void>;\n removeItem(key: string): Promise<void>;\n\n multiSet?(keyValuePairs: Array<KeyValuePairSet>): Promise<void>;\n multiGet?(keys: string[]): Promise<readonly KeyValuePairGet[] | KeyValuePairGet[]>;\n multiRemove?(keys: string[]): Promise<void>;\n}\n\nexport type ErrorBoundaryProps = { error: Error; errorInfo: ErrorInfo; reset: () => void };\n\nexport type CommonComponent<P = {}> = ComponentType<P & { children?: ReactNode | undefined }>;\n\nexport type MentionedUser = {\n range: Range;\n user: SendbirdUser;\n};\n\nexport type Range = {\n start: number;\n end: number;\n};\n\nexport enum TypingIndicatorType {\n Text = 'text',\n Bubble = 'bubble',\n}\n"],"mappings":";;;;;;IA+BYA,mBAAmB,0BAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAnBA,mBAAmB;EAAA,OAAnBA,mBAAmB;AAAA;AAAAC,OAAA,CAAAD,mBAAA,GAAAA,mBAAA"}
|
package/lib/commonjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["VERSION","_default","exports","default"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.
|
|
1
|
+
{"version":3,"names":["VERSION","_default","exports","default"],"sources":["version.ts"],"sourcesContent":["const VERSION = '3.4.1';\nexport default VERSION;\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAG,OAAO;AAAC,IAAAC,QAAA,GACTD,OAAO;AAAAE,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|