@sendbird/uikit-react-native-foundation 3.5.4 → 3.6.0
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/assets/icon/icon-thread.png +0 -0
- package/lib/commonjs/assets/icon/icon-thread@2x.png +0 -0
- package/lib/commonjs/assets/icon/icon-thread@3x.png +0 -0
- package/lib/commonjs/assets/icon/index.js +1 -0
- package/lib/commonjs/assets/icon/index.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js +17 -2
- package/lib/commonjs/ui/GroupChannelMessage/Message.file.voice.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/MessageContainer.js +20 -3
- package/lib/commonjs/ui/GroupChannelMessage/MessageContainer.js.map +1 -1
- package/lib/commonjs/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/module/assets/icon/icon-thread.png +0 -0
- package/lib/module/assets/icon/icon-thread@2x.png +0 -0
- package/lib/module/assets/icon/icon-thread@3x.png +0 -0
- package/lib/module/assets/icon/index.js +1 -0
- package/lib/module/assets/icon/index.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js +17 -2
- package/lib/module/ui/GroupChannelMessage/Message.file.voice.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/MessageContainer.js +20 -3
- package/lib/module/ui/GroupChannelMessage/MessageContainer.js.map +1 -1
- package/lib/module/ui/GroupChannelMessage/index.js.map +1 -1
- package/lib/typescript/src/assets/icon/index.d.ts +1 -0
- package/lib/typescript/src/components/Icon/index.d.ts +1 -0
- package/lib/typescript/src/ui/Avatar/index.d.ts +1 -1
- package/lib/typescript/src/ui/GroupChannelMessage/Message.file.voice.d.ts +3 -0
- package/lib/typescript/src/ui/GroupChannelMessage/MessageContainer.d.ts +2 -2
- package/lib/typescript/src/ui/GroupChannelMessage/index.d.ts +12 -0
- package/package.json +3 -3
- package/src/assets/icon/icon-thread.png +0 -0
- package/src/assets/icon/icon-thread@2x.png +0 -0
- package/src/assets/icon/icon-thread@3x.png +0 -0
- package/src/assets/icon/index.ts +1 -0
- package/src/ui/GroupChannelMessage/Message.file.voice.tsx +17 -1
- package/src/ui/GroupChannelMessage/MessageContainer.tsx +37 -27
- package/src/ui/GroupChannelMessage/index.ts +1 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -70,6 +70,7 @@ const IconAssets = {
|
|
|
70
70
|
'streaming': require('./icon-streaming.png'),
|
|
71
71
|
'supergroup': require('./icon-supergroup.png'),
|
|
72
72
|
'theme': require('./icon-theme.png'),
|
|
73
|
+
'thread': require('./icon-thread.png'),
|
|
73
74
|
'thumbnail-none': require('./icon-thumbnail-none.png'),
|
|
74
75
|
'unarchive': require('./icon-unarchive.png'),
|
|
75
76
|
'user': require('./icon-user.png')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconAssets","require","_default","exports","default"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'audio-off-filled': require('./icon-audio-off-filled.png'),\n 'audio-off': require('./icon-audio-off.png'),\n 'audio-on-filled': require('./icon-audio-on-filled.png'),\n 'audio-on': require('./icon-audio-on.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'pause': require('./icon-pause.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'recording': require('./icon-recording.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'stop': require('./icon-stop.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarchive': require('./icon-unarchive.png'),\n 'user': require('./icon-user.png'),\n};\nexport default IconAssets;\n"],"mappings":";;;;;;AAAA,MAAMA,UAAU,GAAG;EACjB,WAAW,EAAEC,OAAO,CAAC,oBAAoB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,oBAAoB,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AC;EACtC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AAAC,IAAAC,QAAA,GACaF,UAAU;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
1
|
+
{"version":3,"names":["IconAssets","require","_default","exports","default"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'audio-off-filled': require('./icon-audio-off-filled.png'),\n 'audio-off': require('./icon-audio-off.png'),\n 'audio-on-filled': require('./icon-audio-on-filled.png'),\n 'audio-on': require('./icon-audio-on.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'pause': require('./icon-pause.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'recording': require('./icon-recording.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'stop': require('./icon-stop.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thread': require('./icon-thread.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarch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C;EAC5C,UAAU,EAAEA,OAAO,CAAC,qBAAqB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,cAAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AAAC,IAAAC,QAAA,GACaF,UAAU;AAAAG,OAAA,CAAAC,OAAA,GAAAF,QAAA"}
|
|
@@ -25,7 +25,10 @@ const VoiceFileMessage = props => {
|
|
|
25
25
|
onToggleVoiceMessage,
|
|
26
26
|
message,
|
|
27
27
|
durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',
|
|
28
|
-
onUnmount
|
|
28
|
+
onUnmount,
|
|
29
|
+
initialCurrentTime,
|
|
30
|
+
onSubscribeStatus,
|
|
31
|
+
onUnsubscribeStatus
|
|
29
32
|
} = props;
|
|
30
33
|
const {
|
|
31
34
|
colors
|
|
@@ -37,7 +40,7 @@ const VoiceFileMessage = props => {
|
|
|
37
40
|
const initialDuration = value ? parseInt(value, 10) : 0;
|
|
38
41
|
return {
|
|
39
42
|
status: 'paused',
|
|
40
|
-
currentTime: 0,
|
|
43
|
+
currentTime: initialCurrentTime || 0,
|
|
41
44
|
duration: initialDuration
|
|
42
45
|
};
|
|
43
46
|
});
|
|
@@ -46,6 +49,18 @@ const VoiceFileMessage = props => {
|
|
|
46
49
|
onUnmount();
|
|
47
50
|
};
|
|
48
51
|
}, []);
|
|
52
|
+
(0, _react.useEffect)(() => {
|
|
53
|
+
const updateCurrentTime = currentTime => {
|
|
54
|
+
setState(prev => ({
|
|
55
|
+
...prev,
|
|
56
|
+
currentTime
|
|
57
|
+
}));
|
|
58
|
+
};
|
|
59
|
+
onSubscribeStatus === null || onSubscribeStatus === void 0 ? void 0 : onSubscribeStatus(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
60
|
+
return () => {
|
|
61
|
+
onUnsubscribeStatus === null || onUnsubscribeStatus === void 0 ? void 0 : onUnsubscribeStatus(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
62
|
+
};
|
|
63
|
+
}, []);
|
|
49
64
|
const uiColors = colors.ui.groupChannelMessage[variant];
|
|
50
65
|
const remainingTime = state.duration - state.currentTime;
|
|
51
66
|
return /*#__PURE__*/_react.default.createElement(_MessageContainer.default, props, /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_uikitUtils","_Box","_interopRequireDefault","_Icon","_PressBox","_ProgressBar","_Text","_createStyleSheet","_useUIKitTheme","_LoadingSpinner","_MessageContainer","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","VoiceFileMessage","props","onLongPress","variant","onToggleVoiceMessage","message","durationMetaArrayKey","onUnmount","colors","useUIKitTheme","state","setState","useState","_meta$value","meta","metaArrays","find","it","value","initialDuration","parseInt","status","currentTime","duration","useEffect","uiColors","ui","groupChannelMessage","remainingTime","createElement","style","styles","container","backgroundColor","enabled","background","onPress","current","total","minWidth","height","trackColor","voiceProgressTrack","overlay","flex","flexDirection","alignItems","justifyContent","paddingHorizontal","size","color","voiceSpinner","containerStyle","voiceActionIconBackground","padding","borderRadius","icon","body3","lineHeight","undefined","marginLeft","opacity","textVoicePlaytime","millsToMSS","children","createStyleSheet","overflow","image","maxWidth","width","_default","exports"],"sources":["Message.file.voice.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { SendbirdFileMessage } from '@sendbird/uikit-utils';\nimport { millsToMSS } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Icon from '../../components/Icon';\nimport PressBox from '../../components/PressBox';\nimport ProgressBar from '../../components/ProgressBar';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport LoadingSpinner from '../LoadingSpinner';\nimport MessageContainer from './MessageContainer';\nimport type { GroupChannelMessageProps } from './index';\n\nexport type VoiceFileMessageState = {\n status: 'preparing' | 'playing' | 'paused';\n currentTime: number;\n duration: number;\n};\n\ntype Props = GroupChannelMessageProps<\n SendbirdFileMessage,\n {\n durationMetaArrayKey?: string;\n onUnmount: () => void;\n }\n>;\nconst VoiceFileMessage = (props: Props) => {\n const {\n onLongPress,\n variant = 'incoming',\n onToggleVoiceMessage,\n message,\n durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',\n onUnmount,\n } = props;\n\n const { colors } = useUIKitTheme();\n\n const [state, setState] = useState<VoiceFileMessageState>(() => {\n const meta = message.metaArrays.find((it) => it.key === durationMetaArrayKey);\n const value = meta?.value?.[0];\n const initialDuration = value ? parseInt(value, 10) : 0;\n return {\n status: 'paused',\n currentTime: 0,\n duration: initialDuration,\n };\n });\n\n useEffect(() => {\n return () => {\n onUnmount();\n };\n }, []);\n\n const uiColors = colors.ui.groupChannelMessage[variant];\n const remainingTime = state.duration - state.currentTime;\n\n return (\n <MessageContainer {...props}>\n <Box style={styles.container} backgroundColor={uiColors.enabled.background}>\n <PressBox onPress={() => onToggleVoiceMessage?.(state, setState)} onLongPress={onLongPress}>\n <ProgressBar\n current={state.currentTime}\n total={state.duration}\n style={{ minWidth: 136, height: 44 }}\n trackColor={uiColors.enabled.voiceProgressTrack}\n overlay={\n <Box\n flex={1}\n flexDirection={'row'}\n alignItems={'center'}\n justifyContent={'space-between'}\n paddingHorizontal={12}\n >\n {state.status === 'preparing' ? (\n <LoadingSpinner size={24} color={uiColors.enabled.voiceSpinner} />\n ) : (\n <Icon\n size={16}\n containerStyle={{\n backgroundColor: uiColors.enabled.voiceActionIconBackground,\n padding: 6,\n borderRadius: 16,\n }}\n icon={state.status === 'paused' ? 'play' : 'pause'}\n />\n )}\n <Text\n body3\n style={{ lineHeight: undefined, marginLeft: 6, opacity: 0.88 }}\n color={uiColors.enabled.textVoicePlaytime}\n >\n {millsToMSS(state.currentTime === 0 ? state.duration : remainingTime)}\n </Text>\n </Box>\n }\n />\n </PressBox>\n {props.children}\n </Box>\n </MessageContainer>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n image: {\n maxWidth: 240,\n width: 240,\n height: 160,\n borderRadius: 16,\n overflow: 'hidden',\n },\n});\n\nexport default VoiceFileMessage;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,SAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,YAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA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C3D,KAAA,CAAAU,OAAI;MACHqE,IAAI,EAAE,EAAG;MACTG,cAAc,EAAE;QACdnB,eAAe,EAAER,QAAQ,CAACS,OAAO,CAACmB,yBAAyB;QAC3DC,OAAO,EAAE,CAAC;QACVC,YAAY,EAAE;MAChB,CAAE;MACFC,IAAI,EAAE9C,KAAK,CAACW,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG;IAAQ,EAEtD,eACDzD,MAAA,CAAAgB,OAAA,CAAAiD,aAAA,CAACxD,KAAA,CAAAO,OAAI;MACH6E,KAAK;MACL3B,KAAK,EAAE;QAAE4B,UAAU,EAAEC,SAAS;QAAEC,UAAU,EAAE,CAAC;QAAEC,OAAO,EAAE;MAAK,CAAE;MAC/DX,KAAK,EAAEzB,QAAQ,CAACS,OAAO,CAAC4B;IAAkB,GAEzC,IAAAC,sBAAU,EAACrD,KAAK,CAACY,WAAW,KAAK,CAAC,GAAGZ,KAAK,CAACa,QAAQ,GAAGK,aAAa,CAAC,CAChE;EAEV,EACD,CACO,EACV3B,KAAK,CAAC+D,QAAQ,CACX,CACW;AAEvB,CAAC;AAED,MAAMjC,MAAM,GAAG,IAAAkC,yBAAgB,EAAC;EAC9BjC,SAAS,EAAE;IACTuB,YAAY,EAAE,EAAE;IAChBW,QAAQ,EAAE;EACZ,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE,GAAG;IACbC,KAAK,EAAE,GAAG;IACV7B,MAAM,EAAE,GAAG;IACXe,YAAY,EAAE,EAAE;IAChBW,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,IAAAI,QAAA,GAEYtE,gBAAgB;AAAAuE,OAAA,CAAA3F,OAAA,GAAA0F,QAAA"}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_uikitUtils","_Box","_interopRequireDefault","_Icon","_PressBox","_ProgressBar","_Text","_createStyleSheet","_useUIKitTheme","_LoadingSpinner","_MessageContainer","obj","__esModule","default","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","VoiceFileMessage","props","onLongPress","variant","onToggleVoiceMessage","message","durationMetaArrayKey","onUnmount","initialCurrentTime","onSubscribeStatus","onUnsubscribeStatus","colors","useUIKitTheme","state","setState","useState","_meta$value","meta","metaArrays","find","it","value","initialDuration","parseInt","status","currentTime","duration","useEffect","updateCurrentTime","prev","channel","url","messageId","uiColors","ui","groupChannelMessage","remainingTime","createElement","style","styles","container","backgroundColor","enabled","background","onPress","current","total","minWidth","height","trackColor","voiceProgressTrack","overlay","flex","flexDirection","alignItems","justifyContent","paddingHorizontal","size","color","voiceSpinner","containerStyle","voiceActionIconBackground","padding","borderRadius","icon","body3","lineHeight","undefined","marginLeft","opacity","textVoicePlaytime","millsToMSS","children","createStyleSheet","overflow","image","maxWidth","width","_default","exports"],"sources":["Message.file.voice.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { SendbirdFileMessage } from '@sendbird/uikit-utils';\nimport { millsToMSS } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Icon from '../../components/Icon';\nimport PressBox from '../../components/PressBox';\nimport ProgressBar from '../../components/ProgressBar';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport LoadingSpinner from '../LoadingSpinner';\nimport MessageContainer from './MessageContainer';\nimport type { GroupChannelMessageProps } from './index';\n\nexport type VoiceFileMessageState = {\n status: 'preparing' | 'playing' | 'paused';\n currentTime: number;\n duration: number;\n};\n\ntype Props = GroupChannelMessageProps<\n SendbirdFileMessage,\n {\n durationMetaArrayKey?: string;\n onUnmount: () => void;\n initialCurrentTime?: number;\n onSubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;\n onUnsubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;\n }\n>;\nconst VoiceFileMessage = (props: Props) => {\n const {\n onLongPress,\n variant = 'incoming',\n onToggleVoiceMessage,\n message,\n durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',\n onUnmount,\n initialCurrentTime,\n onSubscribeStatus,\n onUnsubscribeStatus,\n } = props;\n\n const { colors } = useUIKitTheme();\n\n const [state, setState] = useState<VoiceFileMessageState>(() => {\n const meta = message.metaArrays.find((it) => it.key === durationMetaArrayKey);\n const value = meta?.value?.[0];\n const initialDuration = value ? parseInt(value, 10) : 0;\n return {\n status: 'paused',\n currentTime: initialCurrentTime || 0,\n duration: initialDuration,\n };\n });\n\n useEffect(() => {\n return () => {\n onUnmount();\n };\n }, []);\n\n useEffect(() => {\n const updateCurrentTime = (currentTime: number) => {\n setState((prev) => ({ ...prev, currentTime }));\n };\n onSubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);\n return () => {\n onUnsubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);\n };\n }, []);\n\n const uiColors = colors.ui.groupChannelMessage[variant];\n const remainingTime = state.duration - state.currentTime;\n\n return (\n <MessageContainer {...props}>\n <Box style={styles.container} backgroundColor={uiColors.enabled.background}>\n <PressBox onPress={() => onToggleVoiceMessage?.(state, setState)} onLongPress={onLongPress}>\n <ProgressBar\n current={state.currentTime}\n total={state.duration}\n style={{ minWidth: 136, height: 44 }}\n trackColor={uiColors.enabled.voiceProgressTrack}\n overlay={\n <Box\n flex={1}\n flexDirection={'row'}\n alignItems={'center'}\n justifyContent={'space-between'}\n paddingHorizontal={12}\n >\n {state.status === 'preparing' ? (\n <LoadingSpinner size={24} color={uiColors.enabled.voiceSpinner} />\n ) : (\n <Icon\n size={16}\n containerStyle={{\n backgroundColor: uiColors.enabled.voiceActionIconBackground,\n padding: 6,\n borderRadius: 16,\n }}\n icon={state.status === 'paused' ? 'play' : 'pause'}\n />\n )}\n <Text\n body3\n style={{ lineHeight: undefined, marginLeft: 6, opacity: 0.88 }}\n color={uiColors.enabled.textVoicePlaytime}\n >\n {millsToMSS(state.currentTime === 0 ? state.duration : remainingTime)}\n </Text>\n </Box>\n }\n />\n </PressBox>\n {props.children}\n </Box>\n </MessageContainer>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n image: {\n maxWidth: 240,\n width: 240,\n height: 160,\n borderRadius: 16,\n overflow: 'hidden',\n },\n});\n\nexport default VoiceFileMessage;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAEA,IAAAE,IAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAD,sBAAA,CAAAH,OAAA;AACA,IAAAK,SAAA,GAAAF,sBAAA,CAAAH,OAAA;AACA,IAAAM,YAAA,GAAAH,sBAAA,CAAAH,OAAA;AACA,IAAAO,KAAA,GAAAJ,sBAAA,CAAAH,OAAA;AACA,IAAAQ,iBAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,cAAA,GAAAN,sBAAA,CAAAH,OAAA;AACA,IAAAU,eAAA,GAAAP,sBAAA,CAAAH,OAAA;AACA,IAAAW,iBAAA,GAAAR,sBAAA,CAAAH,OAAA;AAAkD,SAAAG,uBAAAS,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,SAAAjB,wBAAAa,GAAA,EAAAI,WAAA,SAAAA,WAAA,IAAAJ,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,o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G;MACTG,cAAc,EAAE;QACdnB,eAAe,EAAER,QAAQ,CAACS,OAAO,CAACmB,yBAAyB;QAC3DC,OAAO,EAAE,CAAC;QACVC,YAAY,EAAE;MAChB,CAAE;MACFC,IAAI,EAAEnD,KAAK,CAACW,MAAM,KAAK,QAAQ,GAAG,MAAM,GAAG;IAAQ,EAEtD,eACD5D,MAAA,CAAAgB,OAAA,CAAAyD,aAAA,CAAChE,KAAA,CAAAO,OAAI;MACHqF,KAAK;MACL3B,KAAK,EAAE;QAAE4B,UAAU,EAAEC,SAAS;QAAEC,UAAU,EAAE,CAAC;QAAEC,OAAO,EAAE;MAAK,CAAE;MAC/DX,KAAK,EAAEzB,QAAQ,CAACS,OAAO,CAAC4B;IAAkB,GAEzC,IAAAC,sBAAU,EAAC1D,KAAK,CAACY,WAAW,KAAK,CAAC,GAAGZ,KAAK,CAACa,QAAQ,GAAGU,aAAa,CAAC,CAChE;EAEV,EACD,CACO,EACVnC,KAAK,CAACuE,QAAQ,CACX,CACW;AAEvB,CAAC;AAED,MAAMjC,MAAM,GAAG,IAAAkC,yBAAgB,EAAC;EAC9BjC,SAAS,EAAE;IACTuB,YAAY,EAAE,EAAE;IAChBW,QAAQ,EAAE;EACZ,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE,GAAG;IACbC,KAAK,EAAE,GAAG;IACV7B,MAAM,EAAE,GAAG;IACXe,YAAY,EAAE,EAAE;IAChBW,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,IAAAI,QAAA,GAEY9E,gBAAgB;AAAA+E,OAAA,CAAAnG,OAAA,GAAAkG,QAAA"}
|
|
@@ -24,6 +24,7 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
24
24
|
var _message$sender;
|
|
25
25
|
let {
|
|
26
26
|
children,
|
|
27
|
+
replyInfo,
|
|
27
28
|
groupedWithNext,
|
|
28
29
|
groupedWithPrev,
|
|
29
30
|
message,
|
|
@@ -36,6 +37,10 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
36
37
|
} = (0, _useUIKitTheme.default)();
|
|
37
38
|
const color = colors.ui.groupChannelMessage.incoming;
|
|
38
39
|
return /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
40
|
+
flexDirection: 'column',
|
|
41
|
+
justifyContent: 'flex-start',
|
|
42
|
+
alignItems: 'flex-start'
|
|
43
|
+
}, /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
39
44
|
flexDirection: 'row',
|
|
40
45
|
justifyContent: 'flex-start',
|
|
41
46
|
alignItems: 'flex-end'
|
|
@@ -49,7 +54,7 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
49
54
|
uri: (_message$sender = message.sender) === null || _message$sender === void 0 ? void 0 : _message$sender.profileUrl
|
|
50
55
|
}))), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
51
56
|
flexShrink: 1
|
|
52
|
-
}, parentMessage, !groupedWithPrev && !
|
|
57
|
+
}, parentMessage, !groupedWithPrev && !parentMessage && /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
53
58
|
marginLeft: 12,
|
|
54
59
|
marginBottom: 4
|
|
55
60
|
}, (message.isFileMessage() || message.isUserMessage()) && /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
@@ -66,11 +71,19 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
66
71
|
}, /*#__PURE__*/_react.default.createElement(_Text.default, {
|
|
67
72
|
caption4: true,
|
|
68
73
|
color: color.enabled.textTime
|
|
69
|
-
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? (0, _uikitUtils.getMessageTimeFormat)(new Date(message.createdAt)))))))
|
|
74
|
+
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? (0, _uikitUtils.getMessageTimeFormat)(new Date(message.createdAt))))))), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
75
|
+
flexDirection: 'row',
|
|
76
|
+
marginTop: 4
|
|
77
|
+
}, /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
78
|
+
width: 26,
|
|
79
|
+
marginRight: 12,
|
|
80
|
+
justifyContent: 'flex-start'
|
|
81
|
+
}), replyInfo));
|
|
70
82
|
};
|
|
71
83
|
MessageContainer.Outgoing = function MessageContainerOutgoing(_ref2) {
|
|
72
84
|
let {
|
|
73
85
|
children,
|
|
86
|
+
replyInfo,
|
|
74
87
|
message,
|
|
75
88
|
groupedWithNext,
|
|
76
89
|
strings,
|
|
@@ -98,7 +111,11 @@ MessageContainer.Outgoing = function MessageContainerOutgoing(_ref2) {
|
|
|
98
111
|
color: color.enabled.textTime
|
|
99
112
|
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? (0, _uikitUtils.getMessageTimeFormat)(new Date(message.createdAt))))), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
100
113
|
style: styles.bubble
|
|
101
|
-
}, children))
|
|
114
|
+
}, children)), /*#__PURE__*/_react.default.createElement(_Box.default, {
|
|
115
|
+
flexDirection: 'row',
|
|
116
|
+
justifyContent: 'flex-end',
|
|
117
|
+
marginTop: 4
|
|
118
|
+
}, replyInfo));
|
|
102
119
|
};
|
|
103
120
|
const styles = (0, _createStyleSheet.default)({
|
|
104
121
|
bubble: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_uikitUtils","_Box","_Text","_createStyleSheet","_useUIKitTheme","_Avatar","obj","__esModule","default","MessageContainer","props","variant","createElement","Incoming","Outgoing","MessageContainerIncoming","_ref","_message$sender","children","groupedWithNext","groupedWithPrev","message","onPressAvatar","strings","parentMessage","colors","useUIKitTheme","color","ui","groupChannelMessage","incoming","flexDirection","justifyContent","alignItems","width","marginRight","isFileMessage","isUserMessage","Pressable","onPress","size","uri","sender","profileUrl","flexShrink","marginLeft","marginBottom","caption1","enabled","textSenderName","numberOfLines","senderName","nickname","style","styles","bubble","caption4","textTime","sentDate","getMessageTimeFormat","Date","createdAt","MessageContainerOutgoing","_ref2","sendingStatus","outgoing","createStyleSheet","maxWidth","overflow","_default","exports"],"sources":["MessageContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\n\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { getMessageTimeFormat } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Avatar from '../Avatar';\nimport type { GroupChannelMessageProps } from './index';\n\ntype Props = GroupChannelMessageProps<SendbirdMessage>;\n\nconst MessageContainer = (props: Props) => {\n if (props.variant === 'incoming') {\n return <MessageContainer.Incoming {...props} />;\n } else {\n return <MessageContainer.Outgoing {...props} />;\n }\n};\n\nMessageContainer.Incoming = function MessageContainerIncoming({\n children,\n groupedWithNext,\n groupedWithPrev,\n message,\n onPressAvatar,\n strings,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.incoming;\n\n return (\n <Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>\n
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_uikitUtils","_Box","_Text","_createStyleSheet","_useUIKitTheme","_Avatar","obj","__esModule","default","MessageContainer","props","variant","createElement","Incoming","Outgoing","MessageContainerIncoming","_ref","_message$sender","children","replyInfo","groupedWithNext","groupedWithPrev","message","onPressAvatar","strings","parentMessage","colors","useUIKitTheme","color","ui","groupChannelMessage","incoming","flexDirection","justifyContent","alignItems","width","marginRight","isFileMessage","isUserMessage","Pressable","onPress","size","uri","sender","profileUrl","flexShrink","marginLeft","marginBottom","caption1","enabled","textSenderName","numberOfLines","senderName","nickname","style","styles","bubble","caption4","textTime","sentDate","getMessageTimeFormat","Date","createdAt","marginTop","MessageContainerOutgoing","_ref2","sendingStatus","outgoing","createStyleSheet","maxWidth","overflow","_default","exports"],"sources":["MessageContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\n\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { getMessageTimeFormat } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Avatar from '../Avatar';\nimport type { GroupChannelMessageProps } from './index';\n\ntype Props = GroupChannelMessageProps<SendbirdMessage>;\n\nconst MessageContainer = (props: Props) => {\n if (props.variant === 'incoming') {\n return <MessageContainer.Incoming {...props} />;\n } else {\n return <MessageContainer.Outgoing {...props} />;\n }\n};\n\nMessageContainer.Incoming = function MessageContainerIncoming({\n children,\n replyInfo,\n groupedWithNext,\n groupedWithPrev,\n message,\n onPressAvatar,\n strings,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.incoming;\n\n return (\n <Box flexDirection={'column'} justifyContent={'flex-start'} alignItems={'flex-start'}>\n <Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>\n <Box width={26} marginRight={12}>\n {(message.isFileMessage() || message.isUserMessage()) && !groupedWithNext && (\n <Pressable onPress={onPressAvatar}>\n <Avatar size={26} uri={message.sender?.profileUrl} />\n </Pressable>\n )}\n </Box>\n <Box flexShrink={1}>\n {parentMessage}\n {!groupedWithPrev && !parentMessage && (\n <Box marginLeft={12} marginBottom={4}>\n {(message.isFileMessage() || message.isUserMessage()) && (\n <Text caption1 color={color.enabled.textSenderName} numberOfLines={1}>\n {strings?.senderName ?? message.sender.nickname}\n </Text>\n )}\n </Box>\n )}\n <Box flexDirection={'row'} alignItems={'flex-end'}>\n <Box style={styles.bubble}>{children}</Box>\n {!groupedWithNext && (\n <Box marginLeft={4}>\n <Text caption4 color={color.enabled.textTime}>\n {strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}\n </Text>\n </Box>\n )}\n </Box>\n </Box>\n </Box>\n <Box flexDirection={'row'} marginTop={4}>\n <Box width={26} marginRight={12} justifyContent={'flex-start'} />\n {replyInfo}\n </Box>\n </Box>\n );\n};\n\nMessageContainer.Outgoing = function MessageContainerOutgoing({\n children,\n replyInfo,\n message,\n groupedWithNext,\n strings,\n sendingStatus,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.outgoing;\n\n return (\n <Box>\n {parentMessage}\n <Box flexDirection={'row'} justifyContent={'flex-end'} alignItems={'flex-end'}>\n <Box flexDirection={'row'} alignItems={'flex-end'} justifyContent={'center'}>\n {sendingStatus && <Box marginRight={4}>{sendingStatus}</Box>}\n {!groupedWithNext && (\n <Box marginRight={4}>\n <Text caption4 color={color.enabled.textTime}>\n {strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}\n </Text>\n </Box>\n )}\n </Box>\n <Box style={styles.bubble}>{children}</Box>\n </Box>\n <Box flexDirection={'row'} justifyContent={'flex-end'} marginTop={4}>\n {replyInfo}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n bubble: {\n maxWidth: 240,\n overflow: 'hidden',\n flexShrink: 1,\n },\n});\n\nexport default MessageContainer;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAGA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,KAAA,GAAAL,sBAAA,CAAAC,OAAA;AACA,IAAAK,iBAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,cAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,OAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA+B,SAAAD,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAK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EAAE;EAAS,GACzEiC,aAAa,iBAAItE,MAAA,CAAAY,OAAA,CAAAI,aAAA,CAACX,IAAA,CAAAO,OAAG;IAAC4B,WAAW,EAAE;EAAE,GAAE8B,aAAa,CAAO,EAC3D,CAAC9C,eAAe,iBACfxB,MAAA,CAAAY,OAAA,CAAAI,aAAA,CAACX,IAAA,CAAAO,OAAG;IAAC4B,WAAW,EAAE;EAAE,gBAClBxC,MAAA,CAAAY,OAAA,CAAAI,aAAA,CAACV,KAAA,CAAAM,OAAI;IAACiD,QAAQ;IAAC7B,KAAK,EAAEA,KAAK,CAACqB,OAAO,CAACS;EAAS,GAC1C,CAAAlC,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEmC,QAAQ,KAAI,IAAAC,gCAAoB,EAAC,IAAIC,IAAI,CAACvC,OAAO,CAACwC,SAAS,CAAC,CAAC,CAClE,CAEV,CACG,eACNlE,MAAA,CAAAY,OAAA,CAAAI,aAAA,CAACX,IAAA,CAAAO,OAAG;IAAC8C,KAAK,EAAEC,MAAM,CAACC;EAAO,GAAEtC,QAAQ,CAAO,CACvC,eACNtB,MAAA,CAAAY,OAAA,CAAAI,aAAA,CAACX,IAAA,CAAAO,OAAG;IAACwB,aAAa,EAAE,KAAM;IAACC,cAAc,EAAE,UAAW;IAAC8B,SAAS,EAAE;EAAE,GACjE5C,SAAS,CACN,CACF;AAEV,CAAC;AAED,MAAMoC,MAAM,GAAG,IAAAa,yBAAgB,EAAC;EAC9BZ,MAAM,EAAE;IACNa,QAAQ,EAAE,GAAG;IACbC,QAAQ,EAAE,QAAQ;IAClBzB,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAAC,IAAA0B,QAAA,GAEY9D,gBAAgB;AAAA+D,OAAA,CAAAhE,OAAA,GAAA+D,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_Message","_interopRequireDefault","require","_Message2","_MessageFile","_MessageFile2","_MessageFile3","_Message3","_Message4","_MessageUser","obj","__esModule","default","GroupChannelMessage","User","UserMessage","OpenGraphUser","File","FileMessage","ImageFile","ImageFileMessage","VideoFile","VideoFileMessage","VoiceFile","VoiceFileMessage","Admin","AdminMessage","Unknown","UnknownMessage","_default","exports"],"sources":["index.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel, SendbirdMessage, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport AdminMessage from './Message.admin';\nimport FileMessage from './Message.file';\nimport ImageFileMessage from './Message.file.image';\nimport VideoFileMessage from './Message.file.video';\nimport VoiceFileMessage from './Message.file.voice';\nimport type { VoiceFileMessageState } from './Message.file.voice';\nimport UnknownMessage from './Message.unknown';\nimport UserMessage from './Message.user';\nimport OpenGraphUser from './Message.user.og';\n\nexport type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps = unknown> = {\n channel: SendbirdGroupChannel;\n message: T;\n variant?: 'outgoing' | 'incoming';\n strings?: {\n senderName?: string;\n sentDate?: string;\n edited?: string;\n fileName?: string;\n unknownTitle?: string;\n unknownDescription?: string;\n };\n\n children?: React.ReactNode;\n sendingStatus?: React.ReactNode;\n parentMessage?: React.ReactNode;\n\n groupedWithPrev: boolean;\n groupedWithNext: boolean;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressAvatar?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst GroupChannelMessage = {\n User: UserMessage,\n OpenGraphUser: OpenGraphUser,\n File: FileMessage,\n ImageFile: ImageFileMessage,\n VideoFile: VideoFileMessage,\n VoiceFile: VoiceFileMessage,\n Admin: AdminMessage,\n Unknown: UnknownMessage,\n};\n\nexport default GroupChannelMessage;\n"],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;
|
|
1
|
+
{"version":3,"names":["_Message","_interopRequireDefault","require","_Message2","_MessageFile","_MessageFile2","_MessageFile3","_Message3","_Message4","_MessageUser","obj","__esModule","default","GroupChannelMessage","User","UserMessage","OpenGraphUser","File","FileMessage","ImageFile","ImageFileMessage","VideoFile","VideoFileMessage","VoiceFile","VoiceFileMessage","Admin","AdminMessage","Unknown","UnknownMessage","_default","exports"],"sources":["index.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel, SendbirdMessage, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport AdminMessage from './Message.admin';\nimport FileMessage from './Message.file';\nimport ImageFileMessage from './Message.file.image';\nimport VideoFileMessage from './Message.file.video';\nimport VoiceFileMessage from './Message.file.voice';\nimport type { VoiceFileMessageState } from './Message.file.voice';\nimport UnknownMessage from './Message.unknown';\nimport UserMessage from './Message.user';\nimport OpenGraphUser from './Message.user.og';\n\nexport type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps = unknown> = {\n channel: SendbirdGroupChannel;\n message: T;\n variant?: 'outgoing' | 'incoming';\n strings?: {\n senderName?: string;\n sentDate?: string;\n edited?: string;\n fileName?: string;\n unknownTitle?: string;\n unknownDescription?: string;\n };\n\n children?: React.ReactNode;\n sendingStatus?: React.ReactNode;\n parentMessage?: React.ReactNode;\n replyInfo?: React.ReactNode;\n\n groupedWithPrev: boolean;\n groupedWithNext: boolean;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressAvatar?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst GroupChannelMessage = {\n User: UserMessage,\n OpenGraphUser: OpenGraphUser,\n File: FileMessage,\n ImageFile: ImageFileMessage,\n VideoFile: VideoFileMessage,\n VoiceFile: VoiceFileMessage,\n Admin: AdminMessage,\n Unknown: UnknownMessage,\n};\n\nexport default GroupChannelMessage;\n"],"mappings":";;;;;;AAIA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,aAAA,GAAAJ,sBAAA,CAAAC,OAAA;AACA,IAAAI,aAAA,GAAAL,sBAAA,CAAAC,OAAA;AAEA,IAAAK,SAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,SAAA,GAAAP,sBAAA,CAAAC,OAAA;AACA,IAAAO,YAAA,GAAAR,sBAAA,CAAAC,OAAA;AAA8C,SAAAD,uBAAAS,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAiC9C,MAAMG,mBAAmB,GAAG;EAC1BC,IAAI,EAAEC,iBAAW;EACjBC,aAAa,EAAEA,oBAAa;EAC5BC,IAAI,EAAEC,iBAAW;EACjBC,SAAS,EAAEC,oBAAgB;EAC3BC,SAAS,EAAEC,qBAAgB;EAC3BC,SAAS,EAAEC,qBAAgB;EAC3BC,KAAK,EAAEC,gBAAY;EACnBC,OAAO,EAAEC;AACX,CAAC;AAAC,IAAAC,QAAA,GAEahB,mBAAmB;AAAAiB,OAAA,CAAAlB,OAAA,GAAAiB,QAAA"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -64,6 +64,7 @@ const IconAssets = {
|
|
|
64
64
|
'streaming': require('./icon-streaming.png'),
|
|
65
65
|
'supergroup': require('./icon-supergroup.png'),
|
|
66
66
|
'theme': require('./icon-theme.png'),
|
|
67
|
+
'thread': require('./icon-thread.png'),
|
|
67
68
|
'thumbnail-none': require('./icon-thumbnail-none.png'),
|
|
68
69
|
'unarchive': require('./icon-unarchive.png'),
|
|
69
70
|
'user': require('./icon-user.png')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IconAssets","require"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'audio-off-filled': require('./icon-audio-off-filled.png'),\n 'audio-off': require('./icon-audio-off.png'),\n 'audio-on-filled': require('./icon-audio-on-filled.png'),\n 'audio-on': require('./icon-audio-on.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'pause': require('./icon-pause.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'recording': require('./icon-recording.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'stop': require('./icon-stop.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarchive': require('./icon-unarchive.png'),\n 'user': require('./icon-user.png'),\n};\nexport default IconAssets;\n"],"mappings":"AAAA,MAAMA,UAAU,GAAG;EACjB,WAAW,EAAEC,OAAO,CAAC,oBAAoB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EAC1C,KAAK,EAAEA,OAAO,CAAC,gBAAgB,CAAC;EAChC,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,YAAY,EAAEA,OAAO,CAAC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BAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AACD,eAAeD,UAAU"}
|
|
1
|
+
{"version":3,"names":["IconAssets","require"],"sources":["index.ts"],"sourcesContent":["const IconAssets = {\n 'chat-hide': require('./ic-chat-hide.png'),\n 'chat-show': require('./ic-chat-show.png'),\n 'add': require('./icon-add.png'),\n 'archive': require('./icon-archive.png'),\n 'arrow-left': require('./icon-arrow-left.png'),\n 'audio-off-filled': require('./icon-audio-off-filled.png'),\n 'audio-off': require('./icon-audio-off.png'),\n 'audio-on-filled': require('./icon-audio-on-filled.png'),\n 'audio-on': require('./icon-audio-on.png'),\n 'ban': require('./icon-ban.png'),\n 'broadcast': require('./icon-broadcast.png'),\n 'camera': require('./icon-camera.png'),\n 'channels': require('./icon-channels.png'),\n 'chat-filled': require('./icon-chat-filled.png'),\n 'chat': require('./icon-chat.png'),\n 'checkbox-off': require('./icon-checkbox-off.png'),\n 'checkbox-on': require('./icon-checkbox-on.png'),\n 'chevron-down': require('./icon-chevron-down.png'),\n 'chevron-right': require('./icon-chevron-right.png'),\n 'close': require('./icon-close.png'),\n 'copy': require('./icon-copy.png'),\n 'create': require('./icon-create.png'),\n 'delete': require('./icon-delete.png'),\n 'document': require('./icon-document.png'),\n 'done-all': require('./icon-done-all.png'),\n 'done': require('./icon-done.png'),\n 'download': require('./icon-download.png'),\n 'edit': require('./icon-edit.png'),\n 'emoji-more': require('./icon-emoji-more.png'),\n 'error': require('./icon-error.png'),\n 'file-audio': require('./icon-file-audio.png'),\n 'file-document': require('./icon-file-document.png'),\n 'freeze': require('./icon-freeze.png'),\n 'gif': require('./icon-gif.png'),\n 'info': require('./icon-info.png'),\n 'leave': require('./icon-leave.png'),\n 'members': require('./icon-members.png'),\n 'message': require('./icon-message.png'),\n 'moderation': require('./icon-moderation.png'),\n 'more': require('./icon-more.png'),\n 'mute': require('./icon-mute.png'),\n 'notifications-filled': require('./icon-notifications-filled.png'),\n 'notifications-off-filled': require('./icon-notifications-off-filled.png'),\n 'notifications': require('./icon-notifications.png'),\n 'operator': require('./icon-operator.png'),\n 'pause': require('./icon-pause.png'),\n 'photo': require('./icon-photo.png'),\n 'play': require('./icon-play.png'),\n 'plus': require('./icon-plus.png'),\n 'question': require('./icon-question.png'),\n 'radio-off': require('./icon-radio-off.png'),\n 'radio-on': require('./icon-radio-on.png'),\n 'recording': require('./icon-recording.png'),\n 'refresh': require('./icon-refresh.png'),\n 'remove': require('./icon-remove.png'),\n 'reply-filled': require('./icon-reply-filled.png'),\n 'reply': require('./icon-reply.png'),\n 'search': require('./icon-search.png'),\n 'send': require('./icon-send.png'),\n 'settings-filled': require('./icon-settings-filled.png'),\n 'spinner': require('./icon-spinner.png'),\n 'stop': require('./icon-stop.png'),\n 'streaming': require('./icon-streaming.png'),\n 'supergroup': require('./icon-supergroup.png'),\n 'theme': require('./icon-theme.png'),\n 'thread': require('./icon-thread.png'),\n 'thumbnail-none': require('./icon-thumbnail-none.png'),\n 'unarchive': require('./icon-unarchive.png'),\n 'user': require('./icon-user.png'),\n};\nexport default IconAssets;\n"],"mappings":"AAAA,MAAMA,UAAU,GAAG;EACjB,WAAW,EAAEC,OAAO,CAAC,oBAAoB,CAAC;EAC1C,WAAW,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EAC1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AAc,EAAEA,OAAO,CAAC,yBAAyB,CAAC;EAClD,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,iBAAiB,EAAEA,OAAO,CAAC,4BAA4B,CAAC;EACxD,SAAS,EAAEA,OAAO,CAAC,oBAAoB,CAAC;EACxC,MAAM,EAAEA,OAAO,CAAC,iBAAiB,CAAC;EAClC,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,YAAY,EAAEA,OAAO,CAAC,uBAAuB,CAAC;EAC9C,OAAO,EAAEA,OAAO,CAAC,kBAAkB,CAAC;EACpC,QAAQ,EAAEA,OAAO,CAAC,mBAAmB,CAAC;EACtC,gBAAgB,EAAEA,OAAO,CAAC,2BAA2B,CAAC;EACtD,WAAW,EAAEA,OAAO,CAAC,sBAAsB,CAAC;EAC5C,MAAM,EAAEA,OAAO,CAAC,iBAAiB;AACnC,CAAC;AACD,eAAeD,UAAU"}
|
|
@@ -16,7 +16,10 @@ const VoiceFileMessage = props => {
|
|
|
16
16
|
onToggleVoiceMessage,
|
|
17
17
|
message,
|
|
18
18
|
durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',
|
|
19
|
-
onUnmount
|
|
19
|
+
onUnmount,
|
|
20
|
+
initialCurrentTime,
|
|
21
|
+
onSubscribeStatus,
|
|
22
|
+
onUnsubscribeStatus
|
|
20
23
|
} = props;
|
|
21
24
|
const {
|
|
22
25
|
colors
|
|
@@ -28,7 +31,7 @@ const VoiceFileMessage = props => {
|
|
|
28
31
|
const initialDuration = value ? parseInt(value, 10) : 0;
|
|
29
32
|
return {
|
|
30
33
|
status: 'paused',
|
|
31
|
-
currentTime: 0,
|
|
34
|
+
currentTime: initialCurrentTime || 0,
|
|
32
35
|
duration: initialDuration
|
|
33
36
|
};
|
|
34
37
|
});
|
|
@@ -37,6 +40,18 @@ const VoiceFileMessage = props => {
|
|
|
37
40
|
onUnmount();
|
|
38
41
|
};
|
|
39
42
|
}, []);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
const updateCurrentTime = currentTime => {
|
|
45
|
+
setState(prev => ({
|
|
46
|
+
...prev,
|
|
47
|
+
currentTime
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
onSubscribeStatus === null || onSubscribeStatus === void 0 ? void 0 : onSubscribeStatus(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
51
|
+
return () => {
|
|
52
|
+
onUnsubscribeStatus === null || onUnsubscribeStatus === void 0 ? void 0 : onUnsubscribeStatus(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
40
55
|
const uiColors = colors.ui.groupChannelMessage[variant];
|
|
41
56
|
const remainingTime = state.duration - state.currentTime;
|
|
42
57
|
return /*#__PURE__*/React.createElement(MessageContainer, props, /*#__PURE__*/React.createElement(Box, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useEffect","useState","millsToMSS","Box","Icon","PressBox","ProgressBar","Text","createStyleSheet","useUIKitTheme","LoadingSpinner","MessageContainer","VoiceFileMessage","props","onLongPress","variant","onToggleVoiceMessage","message","durationMetaArrayKey","onUnmount","colors","state","setState","_meta$value","meta","metaArrays","find","it","key","value","initialDuration","parseInt","status","currentTime","duration","uiColors","ui","groupChannelMessage","remainingTime","createElement","style","styles","container","backgroundColor","enabled","background","onPress","current","total","minWidth","height","trackColor","voiceProgressTrack","overlay","flex","flexDirection","alignItems","justifyContent","paddingHorizontal","size","color","voiceSpinner","containerStyle","voiceActionIconBackground","padding","borderRadius","icon","body3","lineHeight","undefined","marginLeft","opacity","textVoicePlaytime","children","overflow","image","maxWidth","width"],"sources":["Message.file.voice.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { SendbirdFileMessage } from '@sendbird/uikit-utils';\nimport { millsToMSS } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Icon from '../../components/Icon';\nimport PressBox from '../../components/PressBox';\nimport ProgressBar from '../../components/ProgressBar';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport LoadingSpinner from '../LoadingSpinner';\nimport MessageContainer from './MessageContainer';\nimport type { GroupChannelMessageProps } from './index';\n\nexport type VoiceFileMessageState = {\n status: 'preparing' | 'playing' | 'paused';\n currentTime: number;\n duration: number;\n};\n\ntype Props = GroupChannelMessageProps<\n SendbirdFileMessage,\n {\n durationMetaArrayKey?: string;\n onUnmount: () => void;\n }\n>;\nconst VoiceFileMessage = (props: Props) => {\n const {\n onLongPress,\n variant = 'incoming',\n onToggleVoiceMessage,\n message,\n durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',\n onUnmount,\n } = props;\n\n const { colors } = useUIKitTheme();\n\n const [state, setState] = useState<VoiceFileMessageState>(() => {\n const meta = message.metaArrays.find((it) => it.key === durationMetaArrayKey);\n const value = meta?.value?.[0];\n const initialDuration = value ? parseInt(value, 10) : 0;\n return {\n status: 'paused',\n currentTime: 0,\n duration: initialDuration,\n };\n });\n\n useEffect(() => {\n return () => {\n onUnmount();\n };\n }, []);\n\n const uiColors = colors.ui.groupChannelMessage[variant];\n const remainingTime = state.duration - state.currentTime;\n\n return (\n <MessageContainer {...props}>\n <Box style={styles.container} backgroundColor={uiColors.enabled.background}>\n <PressBox onPress={() => onToggleVoiceMessage?.(state, setState)} onLongPress={onLongPress}>\n <ProgressBar\n current={state.currentTime}\n total={state.duration}\n style={{ minWidth: 136, height: 44 }}\n trackColor={uiColors.enabled.voiceProgressTrack}\n overlay={\n <Box\n flex={1}\n flexDirection={'row'}\n alignItems={'center'}\n justifyContent={'space-between'}\n paddingHorizontal={12}\n >\n {state.status === 'preparing' ? (\n <LoadingSpinner size={24} color={uiColors.enabled.voiceSpinner} />\n ) : (\n <Icon\n size={16}\n containerStyle={{\n backgroundColor: uiColors.enabled.voiceActionIconBackground,\n padding: 6,\n borderRadius: 16,\n }}\n icon={state.status === 'paused' ? 'play' : 'pause'}\n />\n )}\n <Text\n body3\n style={{ lineHeight: undefined, marginLeft: 6, opacity: 0.88 }}\n color={uiColors.enabled.textVoicePlaytime}\n >\n {millsToMSS(state.currentTime === 0 ? state.duration : remainingTime)}\n </Text>\n </Box>\n }\n />\n </PressBox>\n {props.children}\n </Box>\n </MessageContainer>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n image: {\n maxWidth: 240,\n width: 240,\n height: 160,\n borderRadius: 16,\n overflow: 'hidden',\n },\n});\n\nexport default VoiceFileMessage;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAGlD,SAASC,UAAU,QAAQ,uBAAuB;AAElD,OAAOC,GAAG,MAAM,sBAAsB;AACtC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,QAAQ,MAAM,2BAA2B;AAChD,OAAOC,WAAW,MAAM,8BAA8B;AACtD,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,gBAAgB,MAAM,oBAAoB;
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","millsToMSS","Box","Icon","PressBox","ProgressBar","Text","createStyleSheet","useUIKitTheme","LoadingSpinner","MessageContainer","VoiceFileMessage","props","onLongPress","variant","onToggleVoiceMessage","message","durationMetaArrayKey","onUnmount","initialCurrentTime","onSubscribeStatus","onUnsubscribeStatus","colors","state","setState","_meta$value","meta","metaArrays","find","it","key","value","initialDuration","parseInt","status","currentTime","duration","updateCurrentTime","prev","channel","url","messageId","uiColors","ui","groupChannelMessage","remainingTime","createElement","style","styles","container","backgroundColor","enabled","background","onPress","current","total","minWidth","height","trackColor","voiceProgressTrack","overlay","flex","flexDirection","alignItems","justifyContent","paddingHorizontal","size","color","voiceSpinner","containerStyle","voiceActionIconBackground","padding","borderRadius","icon","body3","lineHeight","undefined","marginLeft","opacity","textVoicePlaytime","children","overflow","image","maxWidth","width"],"sources":["Message.file.voice.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\n\nimport type { SendbirdFileMessage } from '@sendbird/uikit-utils';\nimport { millsToMSS } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Icon from '../../components/Icon';\nimport PressBox from '../../components/PressBox';\nimport ProgressBar from '../../components/ProgressBar';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport LoadingSpinner from '../LoadingSpinner';\nimport MessageContainer from './MessageContainer';\nimport type { GroupChannelMessageProps } from './index';\n\nexport type VoiceFileMessageState = {\n status: 'preparing' | 'playing' | 'paused';\n currentTime: number;\n duration: number;\n};\n\ntype Props = GroupChannelMessageProps<\n SendbirdFileMessage,\n {\n durationMetaArrayKey?: string;\n onUnmount: () => void;\n initialCurrentTime?: number;\n onSubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;\n onUnsubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;\n }\n>;\nconst VoiceFileMessage = (props: Props) => {\n const {\n onLongPress,\n variant = 'incoming',\n onToggleVoiceMessage,\n message,\n durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',\n onUnmount,\n initialCurrentTime,\n onSubscribeStatus,\n onUnsubscribeStatus,\n } = props;\n\n const { colors } = useUIKitTheme();\n\n const [state, setState] = useState<VoiceFileMessageState>(() => {\n const meta = message.metaArrays.find((it) => it.key === durationMetaArrayKey);\n const value = meta?.value?.[0];\n const initialDuration = value ? parseInt(value, 10) : 0;\n return {\n status: 'paused',\n currentTime: initialCurrentTime || 0,\n duration: initialDuration,\n };\n });\n\n useEffect(() => {\n return () => {\n onUnmount();\n };\n }, []);\n\n useEffect(() => {\n const updateCurrentTime = (currentTime: number) => {\n setState((prev) => ({ ...prev, currentTime }));\n };\n onSubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);\n return () => {\n onUnsubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);\n };\n }, []);\n\n const uiColors = colors.ui.groupChannelMessage[variant];\n const remainingTime = state.duration - state.currentTime;\n\n return (\n <MessageContainer {...props}>\n <Box style={styles.container} backgroundColor={uiColors.enabled.background}>\n <PressBox onPress={() => onToggleVoiceMessage?.(state, setState)} onLongPress={onLongPress}>\n <ProgressBar\n current={state.currentTime}\n total={state.duration}\n style={{ minWidth: 136, height: 44 }}\n trackColor={uiColors.enabled.voiceProgressTrack}\n overlay={\n <Box\n flex={1}\n flexDirection={'row'}\n alignItems={'center'}\n justifyContent={'space-between'}\n paddingHorizontal={12}\n >\n {state.status === 'preparing' ? (\n <LoadingSpinner size={24} color={uiColors.enabled.voiceSpinner} />\n ) : (\n <Icon\n size={16}\n containerStyle={{\n backgroundColor: uiColors.enabled.voiceActionIconBackground,\n padding: 6,\n borderRadius: 16,\n }}\n icon={state.status === 'paused' ? 'play' : 'pause'}\n />\n )}\n <Text\n body3\n style={{ lineHeight: undefined, marginLeft: 6, opacity: 0.88 }}\n color={uiColors.enabled.textVoicePlaytime}\n >\n {millsToMSS(state.currentTime === 0 ? state.duration : remainingTime)}\n </Text>\n </Box>\n }\n />\n </PressBox>\n {props.children}\n </Box>\n </MessageContainer>\n );\n};\n\nconst styles = createStyleSheet({\n container: {\n borderRadius: 16,\n overflow: 'hidden',\n },\n image: {\n maxWidth: 240,\n width: 240,\n height: 160,\n borderRadius: 16,\n overflow: 'hidden',\n },\n});\n\nexport default VoiceFileMessage;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAGlD,SAASC,UAAU,QAAQ,uBAAuB;A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;EACZ,CAAC;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAE,GAAG;IACbC,KAAK,EAAE,GAAG;IACV3B,MAAM,EAAE,GAAG;IACXe,YAAY,EAAE,EAAE;IAChBS,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAetE,gBAAgB"}
|
|
@@ -17,6 +17,7 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
17
17
|
var _message$sender;
|
|
18
18
|
let {
|
|
19
19
|
children,
|
|
20
|
+
replyInfo,
|
|
20
21
|
groupedWithNext,
|
|
21
22
|
groupedWithPrev,
|
|
22
23
|
message,
|
|
@@ -29,6 +30,10 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
29
30
|
} = useUIKitTheme();
|
|
30
31
|
const color = colors.ui.groupChannelMessage.incoming;
|
|
31
32
|
return /*#__PURE__*/React.createElement(Box, {
|
|
33
|
+
flexDirection: 'column',
|
|
34
|
+
justifyContent: 'flex-start',
|
|
35
|
+
alignItems: 'flex-start'
|
|
36
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
32
37
|
flexDirection: 'row',
|
|
33
38
|
justifyContent: 'flex-start',
|
|
34
39
|
alignItems: 'flex-end'
|
|
@@ -42,7 +47,7 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
42
47
|
uri: (_message$sender = message.sender) === null || _message$sender === void 0 ? void 0 : _message$sender.profileUrl
|
|
43
48
|
}))), /*#__PURE__*/React.createElement(Box, {
|
|
44
49
|
flexShrink: 1
|
|
45
|
-
}, parentMessage, !groupedWithPrev && !
|
|
50
|
+
}, parentMessage, !groupedWithPrev && !parentMessage && /*#__PURE__*/React.createElement(Box, {
|
|
46
51
|
marginLeft: 12,
|
|
47
52
|
marginBottom: 4
|
|
48
53
|
}, (message.isFileMessage() || message.isUserMessage()) && /*#__PURE__*/React.createElement(Text, {
|
|
@@ -59,11 +64,19 @@ MessageContainer.Incoming = function MessageContainerIncoming(_ref) {
|
|
|
59
64
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
60
65
|
caption4: true,
|
|
61
66
|
color: color.enabled.textTime
|
|
62
|
-
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? getMessageTimeFormat(new Date(message.createdAt)))))))
|
|
67
|
+
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? getMessageTimeFormat(new Date(message.createdAt))))))), /*#__PURE__*/React.createElement(Box, {
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
marginTop: 4
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
71
|
+
width: 26,
|
|
72
|
+
marginRight: 12,
|
|
73
|
+
justifyContent: 'flex-start'
|
|
74
|
+
}), replyInfo));
|
|
63
75
|
};
|
|
64
76
|
MessageContainer.Outgoing = function MessageContainerOutgoing(_ref2) {
|
|
65
77
|
let {
|
|
66
78
|
children,
|
|
79
|
+
replyInfo,
|
|
67
80
|
message,
|
|
68
81
|
groupedWithNext,
|
|
69
82
|
strings,
|
|
@@ -91,7 +104,11 @@ MessageContainer.Outgoing = function MessageContainerOutgoing(_ref2) {
|
|
|
91
104
|
color: color.enabled.textTime
|
|
92
105
|
}, (strings === null || strings === void 0 ? void 0 : strings.sentDate) ?? getMessageTimeFormat(new Date(message.createdAt))))), /*#__PURE__*/React.createElement(Box, {
|
|
93
106
|
style: styles.bubble
|
|
94
|
-
}, children))
|
|
107
|
+
}, children)), /*#__PURE__*/React.createElement(Box, {
|
|
108
|
+
flexDirection: 'row',
|
|
109
|
+
justifyContent: 'flex-end',
|
|
110
|
+
marginTop: 4
|
|
111
|
+
}, replyInfo));
|
|
95
112
|
};
|
|
96
113
|
const styles = createStyleSheet({
|
|
97
114
|
bubble: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Pressable","getMessageTimeFormat","Box","Text","createStyleSheet","useUIKitTheme","Avatar","MessageContainer","props","variant","createElement","Incoming","Outgoing","MessageContainerIncoming","_ref","_message$sender","children","groupedWithNext","groupedWithPrev","message","onPressAvatar","strings","parentMessage","colors","color","ui","groupChannelMessage","incoming","flexDirection","justifyContent","alignItems","width","marginRight","isFileMessage","isUserMessage","onPress","size","uri","sender","profileUrl","flexShrink","marginLeft","marginBottom","caption1","enabled","textSenderName","numberOfLines","senderName","nickname","style","styles","bubble","caption4","textTime","sentDate","Date","createdAt","MessageContainerOutgoing","_ref2","sendingStatus","outgoing","maxWidth","overflow"],"sources":["MessageContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\n\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { getMessageTimeFormat } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Avatar from '../Avatar';\nimport type { GroupChannelMessageProps } from './index';\n\ntype Props = GroupChannelMessageProps<SendbirdMessage>;\n\nconst MessageContainer = (props: Props) => {\n if (props.variant === 'incoming') {\n return <MessageContainer.Incoming {...props} />;\n } else {\n return <MessageContainer.Outgoing {...props} />;\n }\n};\n\nMessageContainer.Incoming = function MessageContainerIncoming({\n children,\n groupedWithNext,\n groupedWithPrev,\n message,\n onPressAvatar,\n strings,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.incoming;\n\n return (\n <Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>\n
|
|
1
|
+
{"version":3,"names":["React","Pressable","getMessageTimeFormat","Box","Text","createStyleSheet","useUIKitTheme","Avatar","MessageContainer","props","variant","createElement","Incoming","Outgoing","MessageContainerIncoming","_ref","_message$sender","children","replyInfo","groupedWithNext","groupedWithPrev","message","onPressAvatar","strings","parentMessage","colors","color","ui","groupChannelMessage","incoming","flexDirection","justifyContent","alignItems","width","marginRight","isFileMessage","isUserMessage","onPress","size","uri","sender","profileUrl","flexShrink","marginLeft","marginBottom","caption1","enabled","textSenderName","numberOfLines","senderName","nickname","style","styles","bubble","caption4","textTime","sentDate","Date","createdAt","marginTop","MessageContainerOutgoing","_ref2","sendingStatus","outgoing","maxWidth","overflow"],"sources":["MessageContainer.tsx"],"sourcesContent":["import React from 'react';\nimport { Pressable } from 'react-native';\n\nimport type { SendbirdMessage } from '@sendbird/uikit-utils';\nimport { getMessageTimeFormat } from '@sendbird/uikit-utils';\n\nimport Box from '../../components/Box';\nimport Text from '../../components/Text';\nimport createStyleSheet from '../../styles/createStyleSheet';\nimport useUIKitTheme from '../../theme/useUIKitTheme';\nimport Avatar from '../Avatar';\nimport type { GroupChannelMessageProps } from './index';\n\ntype Props = GroupChannelMessageProps<SendbirdMessage>;\n\nconst MessageContainer = (props: Props) => {\n if (props.variant === 'incoming') {\n return <MessageContainer.Incoming {...props} />;\n } else {\n return <MessageContainer.Outgoing {...props} />;\n }\n};\n\nMessageContainer.Incoming = function MessageContainerIncoming({\n children,\n replyInfo,\n groupedWithNext,\n groupedWithPrev,\n message,\n onPressAvatar,\n strings,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.incoming;\n\n return (\n <Box flexDirection={'column'} justifyContent={'flex-start'} alignItems={'flex-start'}>\n <Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>\n <Box width={26} marginRight={12}>\n {(message.isFileMessage() || message.isUserMessage()) && !groupedWithNext && (\n <Pressable onPress={onPressAvatar}>\n <Avatar size={26} uri={message.sender?.profileUrl} />\n </Pressable>\n )}\n </Box>\n <Box flexShrink={1}>\n {parentMessage}\n {!groupedWithPrev && !parentMessage && (\n <Box marginLeft={12} marginBottom={4}>\n {(message.isFileMessage() || message.isUserMessage()) && (\n <Text caption1 color={color.enabled.textSenderName} numberOfLines={1}>\n {strings?.senderName ?? message.sender.nickname}\n </Text>\n )}\n </Box>\n )}\n <Box flexDirection={'row'} alignItems={'flex-end'}>\n <Box style={styles.bubble}>{children}</Box>\n {!groupedWithNext && (\n <Box marginLeft={4}>\n <Text caption4 color={color.enabled.textTime}>\n {strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}\n </Text>\n </Box>\n )}\n </Box>\n </Box>\n </Box>\n <Box flexDirection={'row'} marginTop={4}>\n <Box width={26} marginRight={12} justifyContent={'flex-start'} />\n {replyInfo}\n </Box>\n </Box>\n );\n};\n\nMessageContainer.Outgoing = function MessageContainerOutgoing({\n children,\n replyInfo,\n message,\n groupedWithNext,\n strings,\n sendingStatus,\n parentMessage,\n}: Props) {\n const { colors } = useUIKitTheme();\n const color = colors.ui.groupChannelMessage.outgoing;\n\n return (\n <Box>\n {parentMessage}\n <Box flexDirection={'row'} justifyContent={'flex-end'} alignItems={'flex-end'}>\n <Box flexDirection={'row'} alignItems={'flex-end'} justifyContent={'center'}>\n {sendingStatus && <Box marginRight={4}>{sendingStatus}</Box>}\n {!groupedWithNext && (\n <Box marginRight={4}>\n <Text caption4 color={color.enabled.textTime}>\n {strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}\n </Text>\n </Box>\n )}\n </Box>\n <Box style={styles.bubble}>{children}</Box>\n </Box>\n <Box flexDirection={'row'} justifyContent={'flex-end'} marginTop={4}>\n {replyInfo}\n </Box>\n </Box>\n );\n};\n\nconst styles = createStyleSheet({\n bubble: {\n maxWidth: 240,\n overflow: 'hidden',\n flexShrink: 1,\n },\n});\n\nexport default MessageContainer;\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,cAAc;AAGxC,SAASC,oBAAoB,QAAQ,uBAAuB;AAE5D,OAAOC,GAAG,MAAM,sBAAsB;AACtC,OAAOC,IAAI,MAAM,uBAAuB;AACxC,OAAOC,gBAAgB,MAAM,+BAA+B;AAC5D,OAAOC,aAAa,MAAM,2BAA2B;AACrD,OAAOC,MAAM,MAAM,WAAW;AAK9B,MAAMC,gBAAgB,GAAIC,KAAY,IAAK;EACzC,IAAIA,K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AO,GAAEpC,QAAQ,CAAO,CACvC,eACNjB,KAAA,CAAAW,aAAA,CAACR,GAAG;IAAC2B,aAAa,EAAE,KAAM;IAACC,cAAc,EAAE,UAAW;IAAC4B,SAAS,EAAE;EAAE,GACjEzC,SAAS,CACN,CACF;AAEV,CAAC;AAED,MAAMkC,MAAM,GAAG/C,gBAAgB,CAAC;EAC9BgD,MAAM,EAAE;IACNW,QAAQ,EAAE,GAAG;IACbC,QAAQ,EAAE,QAAQ;IAClBvB,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAelC,gBAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AdminMessage","FileMessage","ImageFileMessage","VideoFileMessage","VoiceFileMessage","UnknownMessage","UserMessage","OpenGraphUser","GroupChannelMessage","User","File","ImageFile","VideoFile","VoiceFile","Admin","Unknown"],"sources":["index.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel, SendbirdMessage, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport AdminMessage from './Message.admin';\nimport FileMessage from './Message.file';\nimport ImageFileMessage from './Message.file.image';\nimport VideoFileMessage from './Message.file.video';\nimport VoiceFileMessage from './Message.file.voice';\nimport type { VoiceFileMessageState } from './Message.file.voice';\nimport UnknownMessage from './Message.unknown';\nimport UserMessage from './Message.user';\nimport OpenGraphUser from './Message.user.og';\n\nexport type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps = unknown> = {\n channel: SendbirdGroupChannel;\n message: T;\n variant?: 'outgoing' | 'incoming';\n strings?: {\n senderName?: string;\n sentDate?: string;\n edited?: string;\n fileName?: string;\n unknownTitle?: string;\n unknownDescription?: string;\n };\n\n children?: React.ReactNode;\n sendingStatus?: React.ReactNode;\n parentMessage?: React.ReactNode;\n\n groupedWithPrev: boolean;\n groupedWithNext: boolean;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressAvatar?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst GroupChannelMessage = {\n User: UserMessage,\n OpenGraphUser: OpenGraphUser,\n File: FileMessage,\n ImageFile: ImageFileMessage,\n VideoFile: VideoFileMessage,\n VoiceFile: VoiceFileMessage,\n Admin: AdminMessage,\n Unknown: UnknownMessage,\n};\n\nexport default GroupChannelMessage;\n"],"mappings":"AAIA,OAAOA,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,aAAa,MAAM,mBAAmB;
|
|
1
|
+
{"version":3,"names":["AdminMessage","FileMessage","ImageFileMessage","VideoFileMessage","VoiceFileMessage","UnknownMessage","UserMessage","OpenGraphUser","GroupChannelMessage","User","File","ImageFile","VideoFile","VoiceFile","Admin","Unknown"],"sources":["index.ts"],"sourcesContent":["import type React from 'react';\n\nimport type { SendbirdGroupChannel, SendbirdMessage, SendbirdUser } from '@sendbird/uikit-utils';\n\nimport AdminMessage from './Message.admin';\nimport FileMessage from './Message.file';\nimport ImageFileMessage from './Message.file.image';\nimport VideoFileMessage from './Message.file.video';\nimport VoiceFileMessage from './Message.file.voice';\nimport type { VoiceFileMessageState } from './Message.file.voice';\nimport UnknownMessage from './Message.unknown';\nimport UserMessage from './Message.user';\nimport OpenGraphUser from './Message.user.og';\n\nexport type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps = unknown> = {\n channel: SendbirdGroupChannel;\n message: T;\n variant?: 'outgoing' | 'incoming';\n strings?: {\n senderName?: string;\n sentDate?: string;\n edited?: string;\n fileName?: string;\n unknownTitle?: string;\n unknownDescription?: string;\n };\n\n children?: React.ReactNode;\n sendingStatus?: React.ReactNode;\n parentMessage?: React.ReactNode;\n replyInfo?: React.ReactNode;\n\n groupedWithPrev: boolean;\n groupedWithNext: boolean;\n onPress?: () => void;\n onLongPress?: () => void;\n onPressAvatar?: () => void;\n onPressURL?: (url: string) => void;\n onPressMentionedUser?: (mentionedUser?: SendbirdUser) => void;\n onToggleVoiceMessage?: (\n state: VoiceFileMessageState,\n setState: React.Dispatch<React.SetStateAction<VoiceFileMessageState>>,\n ) => Promise<void>;\n} & AdditionalProps;\n\nconst GroupChannelMessage = {\n User: UserMessage,\n OpenGraphUser: OpenGraphUser,\n File: FileMessage,\n ImageFile: ImageFileMessage,\n VideoFile: VideoFileMessage,\n VoiceFile: VoiceFileMessage,\n Admin: AdminMessage,\n Unknown: UnknownMessage,\n};\n\nexport default GroupChannelMessage;\n"],"mappings":"AAIA,OAAOA,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,OAAOC,gBAAgB,MAAM,sBAAsB;AACnD,OAAOC,gBAAgB,MAAM,sBAAsB;AAEnD,OAAOC,cAAc,MAAM,mBAAmB;AAC9C,OAAOC,WAAW,MAAM,gBAAgB;AACxC,OAAOC,aAAa,MAAM,mBAAmB;AAiC7C,MAAMC,mBAAmB,GAAG;EAC1BC,IAAI,EAAEH,WAAW;EACjBC,aAAa,EAAEA,aAAa;EAC5BG,IAAI,EAAET,WAAW;EACjBU,SAAS,EAAET,gBAAgB;EAC3BU,SAAS,EAAET,gBAAgB;EAC3BU,SAAS,EAAET,gBAAgB;EAC3BU,KAAK,EAAEd,YAAY;EACnBe,OAAO,EAAEV;AACX,CAAC;AAED,eAAeG,mBAAmB"}
|
|
@@ -15,7 +15,7 @@ declare const _default: (({ uri, square, muted, size, containerStyle }: Props) =
|
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
}) => React.JSX.Element;
|
|
17
17
|
Icon: ({ size, icon, containerStyle, backgroundColor }: {
|
|
18
|
-
icon: "message" | "recording" | "done" | "search" | "chat-hide" | "chat-show" | "add" | "archive" | "arrow-left" | "audio-off-filled" | "audio-off" | "audio-on-filled" | "audio-on" | "ban" | "broadcast" | "camera" | "channels" | "chat-filled" | "chat" | "checkbox-off" | "checkbox-on" | "chevron-down" | "chevron-right" | "close" | "copy" | "create" | "delete" | "document" | "done-all" | "download" | "edit" | "emoji-more" | "error" | "file-audio" | "file-document" | "freeze" | "gif" | "info" | "leave" | "members" | "moderation" | "more" | "mute" | "notifications-filled" | "notifications-off-filled" | "notifications" | "operator" | "pause" | "photo" | "play" | "plus" | "question" | "radio-off" | "radio-on" | "refresh" | "remove" | "reply-filled" | "reply" | "send" | "settings-filled" | "spinner" | "stop" | "streaming" | "supergroup" | "theme" | "thumbnail-none" | "unarchive" | "user";
|
|
18
|
+
icon: "message" | "recording" | "done" | "search" | "chat-hide" | "chat-show" | "add" | "archive" | "arrow-left" | "audio-off-filled" | "audio-off" | "audio-on-filled" | "audio-on" | "ban" | "broadcast" | "camera" | "channels" | "chat-filled" | "chat" | "checkbox-off" | "checkbox-on" | "chevron-down" | "chevron-right" | "close" | "copy" | "create" | "delete" | "document" | "done-all" | "download" | "edit" | "emoji-more" | "error" | "file-audio" | "file-document" | "freeze" | "gif" | "info" | "leave" | "members" | "moderation" | "more" | "mute" | "notifications-filled" | "notifications-off-filled" | "notifications" | "operator" | "pause" | "photo" | "play" | "plus" | "question" | "radio-off" | "radio-on" | "refresh" | "remove" | "reply-filled" | "reply" | "send" | "settings-filled" | "spinner" | "stop" | "streaming" | "supergroup" | "theme" | "thread" | "thumbnail-none" | "unarchive" | "user";
|
|
19
19
|
size?: number | undefined;
|
|
20
20
|
backgroundColor?: string | undefined;
|
|
21
21
|
containerStyle?: StyleProp<ViewStyle>;
|
|
@@ -9,6 +9,9 @@ export type VoiceFileMessageState = {
|
|
|
9
9
|
type Props = GroupChannelMessageProps<SendbirdFileMessage, {
|
|
10
10
|
durationMetaArrayKey?: string;
|
|
11
11
|
onUnmount: () => void;
|
|
12
|
+
initialCurrentTime?: number;
|
|
13
|
+
onSubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;
|
|
14
|
+
onUnsubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;
|
|
12
15
|
}>;
|
|
13
16
|
declare const VoiceFileMessage: (props: Props) => React.JSX.Element;
|
|
14
17
|
export default VoiceFileMessage;
|
|
@@ -4,7 +4,7 @@ import type { GroupChannelMessageProps } from './index';
|
|
|
4
4
|
type Props = GroupChannelMessageProps<SendbirdMessage>;
|
|
5
5
|
declare const MessageContainer: {
|
|
6
6
|
(props: Props): React.JSX.Element;
|
|
7
|
-
Incoming({ children, groupedWithNext, groupedWithPrev, message, onPressAvatar, strings, parentMessage, }: Props): React.JSX.Element;
|
|
8
|
-
Outgoing({ children, message, groupedWithNext, strings, sendingStatus, parentMessage, }: Props): React.JSX.Element;
|
|
7
|
+
Incoming({ children, replyInfo, groupedWithNext, groupedWithPrev, message, onPressAvatar, strings, parentMessage, }: Props): React.JSX.Element;
|
|
8
|
+
Outgoing({ children, replyInfo, message, groupedWithNext, strings, sendingStatus, parentMessage, }: Props): React.JSX.Element;
|
|
9
9
|
};
|
|
10
10
|
export default MessageContainer;
|
|
@@ -16,6 +16,7 @@ export type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps
|
|
|
16
16
|
children?: React.ReactNode;
|
|
17
17
|
sendingStatus?: React.ReactNode;
|
|
18
18
|
parentMessage?: React.ReactNode;
|
|
19
|
+
replyInfo?: React.ReactNode;
|
|
19
20
|
groupedWithPrev: boolean;
|
|
20
21
|
groupedWithNext: boolean;
|
|
21
22
|
onPress?: () => void;
|
|
@@ -41,6 +42,7 @@ declare const GroupChannelMessage: {
|
|
|
41
42
|
children?: React.ReactNode;
|
|
42
43
|
sendingStatus?: React.ReactNode;
|
|
43
44
|
parentMessage?: React.ReactNode;
|
|
45
|
+
replyInfo?: React.ReactNode;
|
|
44
46
|
groupedWithPrev: boolean;
|
|
45
47
|
groupedWithNext: boolean;
|
|
46
48
|
onPress?: (() => void) | undefined;
|
|
@@ -68,6 +70,7 @@ declare const GroupChannelMessage: {
|
|
|
68
70
|
children?: React.ReactNode;
|
|
69
71
|
sendingStatus?: React.ReactNode;
|
|
70
72
|
parentMessage?: React.ReactNode;
|
|
73
|
+
replyInfo?: React.ReactNode;
|
|
71
74
|
groupedWithPrev: boolean;
|
|
72
75
|
groupedWithNext: boolean;
|
|
73
76
|
onPress?: (() => void) | undefined;
|
|
@@ -95,6 +98,7 @@ declare const GroupChannelMessage: {
|
|
|
95
98
|
children?: React.ReactNode;
|
|
96
99
|
sendingStatus?: React.ReactNode;
|
|
97
100
|
parentMessage?: React.ReactNode;
|
|
101
|
+
replyInfo?: React.ReactNode;
|
|
98
102
|
groupedWithPrev: boolean;
|
|
99
103
|
groupedWithNext: boolean;
|
|
100
104
|
onPress?: (() => void) | undefined;
|
|
@@ -119,6 +123,7 @@ declare const GroupChannelMessage: {
|
|
|
119
123
|
children?: React.ReactNode;
|
|
120
124
|
sendingStatus?: React.ReactNode;
|
|
121
125
|
parentMessage?: React.ReactNode;
|
|
126
|
+
replyInfo?: React.ReactNode;
|
|
122
127
|
groupedWithPrev: boolean;
|
|
123
128
|
groupedWithNext: boolean;
|
|
124
129
|
onPress?: (() => void) | undefined;
|
|
@@ -143,6 +148,7 @@ declare const GroupChannelMessage: {
|
|
|
143
148
|
children?: React.ReactNode;
|
|
144
149
|
sendingStatus?: React.ReactNode;
|
|
145
150
|
parentMessage?: React.ReactNode;
|
|
151
|
+
replyInfo?: React.ReactNode;
|
|
146
152
|
groupedWithPrev: boolean;
|
|
147
153
|
groupedWithNext: boolean;
|
|
148
154
|
onPress?: (() => void) | undefined;
|
|
@@ -171,6 +177,7 @@ declare const GroupChannelMessage: {
|
|
|
171
177
|
children?: React.ReactNode;
|
|
172
178
|
sendingStatus?: React.ReactNode;
|
|
173
179
|
parentMessage?: React.ReactNode;
|
|
180
|
+
replyInfo?: React.ReactNode;
|
|
174
181
|
groupedWithPrev: boolean;
|
|
175
182
|
groupedWithNext: boolean;
|
|
176
183
|
onPress?: (() => void) | undefined;
|
|
@@ -182,6 +189,9 @@ declare const GroupChannelMessage: {
|
|
|
182
189
|
} & {
|
|
183
190
|
durationMetaArrayKey?: string | undefined;
|
|
184
191
|
onUnmount: () => void;
|
|
192
|
+
initialCurrentTime?: number | undefined;
|
|
193
|
+
onSubscribeStatus?: ((channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void) | undefined;
|
|
194
|
+
onUnsubscribeStatus?: ((channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void) | undefined;
|
|
185
195
|
}) => React.JSX.Element;
|
|
186
196
|
Admin: (props: {
|
|
187
197
|
channel: SendbirdGroupChannel;
|
|
@@ -198,6 +208,7 @@ declare const GroupChannelMessage: {
|
|
|
198
208
|
children?: React.ReactNode;
|
|
199
209
|
sendingStatus?: React.ReactNode;
|
|
200
210
|
parentMessage?: React.ReactNode;
|
|
211
|
+
replyInfo?: React.ReactNode;
|
|
201
212
|
groupedWithPrev: boolean;
|
|
202
213
|
groupedWithNext: boolean;
|
|
203
214
|
onPress?: (() => void) | undefined;
|
|
@@ -222,6 +233,7 @@ declare const GroupChannelMessage: {
|
|
|
222
233
|
children?: React.ReactNode;
|
|
223
234
|
sendingStatus?: React.ReactNode;
|
|
224
235
|
parentMessage?: React.ReactNode;
|
|
236
|
+
replyInfo?: React.ReactNode;
|
|
225
237
|
groupedWithPrev: boolean;
|
|
226
238
|
groupedWithNext: boolean;
|
|
227
239
|
onPress?: (() => void) | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sendbird/uikit-react-native-foundation",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "A foundational UI kit for building chat-enabled React Native apps.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sendbird",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@sendbird/uikit-utils": "3.
|
|
51
|
+
"@sendbird/uikit-utils": "3.6.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"@types/react": "*",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
]
|
|
86
86
|
]
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "74380f45cc34ef2d9f8a6b7f5cb9144329457c5b"
|
|
89
89
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/assets/icon/index.ts
CHANGED
|
@@ -64,6 +64,7 @@ const IconAssets = {
|
|
|
64
64
|
'streaming': require('./icon-streaming.png'),
|
|
65
65
|
'supergroup': require('./icon-supergroup.png'),
|
|
66
66
|
'theme': require('./icon-theme.png'),
|
|
67
|
+
'thread': require('./icon-thread.png'),
|
|
67
68
|
'thumbnail-none': require('./icon-thumbnail-none.png'),
|
|
68
69
|
'unarchive': require('./icon-unarchive.png'),
|
|
69
70
|
'user': require('./icon-user.png'),
|
|
@@ -25,6 +25,9 @@ type Props = GroupChannelMessageProps<
|
|
|
25
25
|
{
|
|
26
26
|
durationMetaArrayKey?: string;
|
|
27
27
|
onUnmount: () => void;
|
|
28
|
+
initialCurrentTime?: number;
|
|
29
|
+
onSubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;
|
|
30
|
+
onUnsubscribeStatus?: (channelUrl: string, messageId: number, subscriber: (currentTime: number) => void) => void;
|
|
28
31
|
}
|
|
29
32
|
>;
|
|
30
33
|
const VoiceFileMessage = (props: Props) => {
|
|
@@ -35,6 +38,9 @@ const VoiceFileMessage = (props: Props) => {
|
|
|
35
38
|
message,
|
|
36
39
|
durationMetaArrayKey = 'KEY_VOICE_MESSAGE_DURATION',
|
|
37
40
|
onUnmount,
|
|
41
|
+
initialCurrentTime,
|
|
42
|
+
onSubscribeStatus,
|
|
43
|
+
onUnsubscribeStatus,
|
|
38
44
|
} = props;
|
|
39
45
|
|
|
40
46
|
const { colors } = useUIKitTheme();
|
|
@@ -45,7 +51,7 @@ const VoiceFileMessage = (props: Props) => {
|
|
|
45
51
|
const initialDuration = value ? parseInt(value, 10) : 0;
|
|
46
52
|
return {
|
|
47
53
|
status: 'paused',
|
|
48
|
-
currentTime: 0,
|
|
54
|
+
currentTime: initialCurrentTime || 0,
|
|
49
55
|
duration: initialDuration,
|
|
50
56
|
};
|
|
51
57
|
});
|
|
@@ -56,6 +62,16 @@ const VoiceFileMessage = (props: Props) => {
|
|
|
56
62
|
};
|
|
57
63
|
}, []);
|
|
58
64
|
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
const updateCurrentTime = (currentTime: number) => {
|
|
67
|
+
setState((prev) => ({ ...prev, currentTime }));
|
|
68
|
+
};
|
|
69
|
+
onSubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
70
|
+
return () => {
|
|
71
|
+
onUnsubscribeStatus?.(props.channel.url, props.message.messageId, updateCurrentTime);
|
|
72
|
+
};
|
|
73
|
+
}, []);
|
|
74
|
+
|
|
59
75
|
const uiColors = colors.ui.groupChannelMessage[variant];
|
|
60
76
|
const remainingTime = state.duration - state.currentTime;
|
|
61
77
|
|
|
@@ -23,6 +23,7 @@ const MessageContainer = (props: Props) => {
|
|
|
23
23
|
|
|
24
24
|
MessageContainer.Incoming = function MessageContainerIncoming({
|
|
25
25
|
children,
|
|
26
|
+
replyInfo,
|
|
26
27
|
groupedWithNext,
|
|
27
28
|
groupedWithPrev,
|
|
28
29
|
message,
|
|
@@ -34,43 +35,49 @@ MessageContainer.Incoming = function MessageContainerIncoming({
|
|
|
34
35
|
const color = colors.ui.groupChannelMessage.incoming;
|
|
35
36
|
|
|
36
37
|
return (
|
|
37
|
-
<Box flexDirection={'
|
|
38
|
-
<Box
|
|
39
|
-
{
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
)}
|
|
56
|
-
|
|
57
|
-
<Box flexDirection={'row'} alignItems={'flex-end'}>
|
|
58
|
-
<Box style={styles.bubble}>{children}</Box>
|
|
59
|
-
{!groupedWithNext && (
|
|
60
|
-
<Box marginLeft={4}>
|
|
61
|
-
<Text caption4 color={color.enabled.textTime}>
|
|
62
|
-
{strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}
|
|
63
|
-
</Text>
|
|
38
|
+
<Box flexDirection={'column'} justifyContent={'flex-start'} alignItems={'flex-start'}>
|
|
39
|
+
<Box flexDirection={'row'} justifyContent={'flex-start'} alignItems={'flex-end'}>
|
|
40
|
+
<Box width={26} marginRight={12}>
|
|
41
|
+
{(message.isFileMessage() || message.isUserMessage()) && !groupedWithNext && (
|
|
42
|
+
<Pressable onPress={onPressAvatar}>
|
|
43
|
+
<Avatar size={26} uri={message.sender?.profileUrl} />
|
|
44
|
+
</Pressable>
|
|
45
|
+
)}
|
|
46
|
+
</Box>
|
|
47
|
+
<Box flexShrink={1}>
|
|
48
|
+
{parentMessage}
|
|
49
|
+
{!groupedWithPrev && !parentMessage && (
|
|
50
|
+
<Box marginLeft={12} marginBottom={4}>
|
|
51
|
+
{(message.isFileMessage() || message.isUserMessage()) && (
|
|
52
|
+
<Text caption1 color={color.enabled.textSenderName} numberOfLines={1}>
|
|
53
|
+
{strings?.senderName ?? message.sender.nickname}
|
|
54
|
+
</Text>
|
|
55
|
+
)}
|
|
64
56
|
</Box>
|
|
65
57
|
)}
|
|
58
|
+
<Box flexDirection={'row'} alignItems={'flex-end'}>
|
|
59
|
+
<Box style={styles.bubble}>{children}</Box>
|
|
60
|
+
{!groupedWithNext && (
|
|
61
|
+
<Box marginLeft={4}>
|
|
62
|
+
<Text caption4 color={color.enabled.textTime}>
|
|
63
|
+
{strings?.sentDate ?? getMessageTimeFormat(new Date(message.createdAt))}
|
|
64
|
+
</Text>
|
|
65
|
+
</Box>
|
|
66
|
+
)}
|
|
67
|
+
</Box>
|
|
66
68
|
</Box>
|
|
67
69
|
</Box>
|
|
70
|
+
<Box flexDirection={'row'} marginTop={4}>
|
|
71
|
+
<Box width={26} marginRight={12} justifyContent={'flex-start'} />
|
|
72
|
+
{replyInfo}
|
|
73
|
+
</Box>
|
|
68
74
|
</Box>
|
|
69
75
|
);
|
|
70
76
|
};
|
|
71
77
|
|
|
72
78
|
MessageContainer.Outgoing = function MessageContainerOutgoing({
|
|
73
79
|
children,
|
|
80
|
+
replyInfo,
|
|
74
81
|
message,
|
|
75
82
|
groupedWithNext,
|
|
76
83
|
strings,
|
|
@@ -96,6 +103,9 @@ MessageContainer.Outgoing = function MessageContainerOutgoing({
|
|
|
96
103
|
</Box>
|
|
97
104
|
<Box style={styles.bubble}>{children}</Box>
|
|
98
105
|
</Box>
|
|
106
|
+
<Box flexDirection={'row'} justifyContent={'flex-end'} marginTop={4}>
|
|
107
|
+
{replyInfo}
|
|
108
|
+
</Box>
|
|
99
109
|
</Box>
|
|
100
110
|
);
|
|
101
111
|
};
|
|
@@ -28,6 +28,7 @@ export type GroupChannelMessageProps<T extends SendbirdMessage, AdditionalProps
|
|
|
28
28
|
children?: React.ReactNode;
|
|
29
29
|
sendingStatus?: React.ReactNode;
|
|
30
30
|
parentMessage?: React.ReactNode;
|
|
31
|
+
replyInfo?: React.ReactNode;
|
|
31
32
|
|
|
32
33
|
groupedWithPrev: boolean;
|
|
33
34
|
groupedWithNext: boolean;
|