@smart-link/rn-im 1.0.22 → 1.0.24
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/dist/api/addressList.js +6 -17
- package/dist/api/backup.js +8 -20
- package/dist/api/file.js +6 -35
- package/dist/api/user.js +6 -16
- package/dist/components/CachedImage.js +14 -42
- package/dist/components/Camera/Camera.js +26 -54
- package/dist/components/Camera/CameraCapture.js +99 -128
- package/dist/components/Camera/CameraResult.js +33 -61
- package/dist/components/ChatAvatar/ChatAvatar.d.ts +1 -1
- package/dist/components/ChatAvatar/ChatAvatar.js +34 -62
- package/dist/components/ChatAvatar/ChatAvatarId.d.ts +2 -2
- package/dist/components/ChatAvatar/ChatAvatarId.js +26 -51
- package/dist/components/ChatAvatar/ChatAvatarLocal.d.ts +2 -2
- package/dist/components/ChatAvatar/ChatAvatarLocal.js +23 -25
- package/dist/components/ChatAvatar/index.js +2 -23
- package/dist/components/Favicon.js +6 -34
- package/dist/components/FormatTimeText.js +5 -10
- package/dist/components/Highlighter.js +9 -34
- package/dist/components/IndicatorText.js +14 -39
- package/dist/components/LocalImage.js +7 -32
- package/dist/components/NetworkUnconnected.js +14 -42
- package/dist/components/PopoverWrapper.js +22 -47
- package/dist/components/VideoPlayer.js +111 -138
- package/dist/components/styles.js +10 -13
- package/dist/default-assets.d.ts +1 -0
- package/dist/default-assets.js +8 -10
- package/dist/hooks/useDownloadSource.js +7 -12
- package/dist/hooks/useFormatMsgTime.js +5 -13
- package/dist/hooks/useImReady.js +7 -10
- package/dist/hooks/useImSelector.js +34 -48
- package/dist/hooks/useTranslation.js +5 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -28
- package/dist/init.js +30 -40
- package/dist/interface.js +1 -2
- package/dist/locales/en/addressList.js +1 -3
- package/dist/locales/index.js +4 -27
- package/dist/locales/lao/addressList.js +1 -3
- package/dist/locales/zh/addressList.js +1 -3
- package/dist/pages/address-list/AddressList.js +33 -61
- package/dist/pages/address-list/CardInfo.js +10 -18
- package/dist/pages/address-list/ChooseContact.js +50 -78
- package/dist/pages/address-list/Icons.js +7 -14
- package/dist/pages/address-list/Organization.js +59 -89
- package/dist/pages/address-list/UserDetail.js +55 -83
- package/dist/pages/address-list/UserJobs.js +31 -33
- package/dist/pages/address-list/UserSearch.js +29 -54
- package/dist/pages/address-list/addressList.routes.js +11 -16
- package/dist/pages/collection/Collection.js +53 -81
- package/dist/pages/collection/ContentFactory.js +53 -82
- package/dist/pages/collection/collection.routes.js +3 -9
- package/dist/pages/conversation/ForwardToConversation.js +63 -91
- package/dist/pages/conversation/List.js +74 -102
- package/dist/pages/conversation/components/ConversationCard.js +52 -81
- package/dist/pages/conversation/components/ConversationOption.js +27 -55
- package/dist/pages/conversation/conversation.routes.js +17 -23
- package/dist/pages/conversation/setting/GroupTransfer.js +32 -60
- package/dist/pages/conversation/setting/OptionAvatars.js +62 -90
- package/dist/pages/conversation/setting/OptionCancelGroup.js +14 -42
- package/dist/pages/conversation/setting/OptionConversation.js +20 -48
- package/dist/pages/conversation/setting/OptionGroup.js +20 -48
- package/dist/pages/conversation/setting/OptionGroupManage.js +21 -49
- package/dist/pages/conversation/setting/OptionGroupMoreMember.js +48 -53
- package/dist/pages/conversation/setting/OptionGroupNameOrNoticeEdit.js +49 -77
- package/dist/pages/conversation/setting/Setting.js +49 -54
- package/dist/pages/conversation/setting/SettingChatBg.js +26 -54
- package/dist/pages/index.js +7 -27
- package/dist/pages/message/ChooseMember.js +56 -84
- package/dist/pages/message/MessageBackup/Bar.js +18 -43
- package/dist/pages/message/MessageBackup/MessageBackup.js +42 -72
- package/dist/pages/message/MessageBackup/RestoreBackupPage.js +48 -76
- package/dist/pages/message/MessageBackup/StartBackupPage.js +48 -76
- package/dist/pages/message/MessageBackup/index.js +3 -12
- package/dist/pages/message/MessageBackup/utils.js +14 -22
- package/dist/pages/message/MessageList.js +141 -134
- package/dist/pages/message/MessageRecord.js +49 -73
- package/dist/pages/message/components/BusiNotifyCard.js +60 -85
- package/dist/pages/message/components/ChatBg.js +11 -36
- package/dist/pages/message/components/MessageItem.js +82 -110
- package/dist/pages/message/components/MessageItemQuote.js +30 -58
- package/dist/pages/message/components/MessageItemTips.js +27 -55
- package/dist/pages/message/components/MessageOption.js +96 -120
- package/dist/pages/message/components/MessagePayload.js +36 -64
- package/dist/pages/message/components/MessagePictureAlbum.js +32 -60
- package/dist/pages/message/components/MessageReceiptStatus.js +18 -43
- package/dist/pages/message/components/MessageUndo.js +18 -48
- package/dist/pages/message/components/MultipleBar/index.js +48 -76
- package/dist/pages/message/components/Payload/PayloadContact.js +30 -58
- package/dist/pages/message/components/Payload/PayloadFile.js +41 -65
- package/dist/pages/message/components/Payload/PayloadMultiple.js +38 -66
- package/dist/pages/message/components/Payload/PayloadNotify.js +28 -56
- package/dist/pages/message/components/Payload/PayloadPicture.js +21 -49
- package/dist/pages/message/components/Payload/PayloadShare.js +39 -67
- package/dist/pages/message/components/Payload/PayloadText.js +39 -67
- package/dist/pages/message/components/Payload/PayloadVideo.js +28 -56
- package/dist/pages/message/components/Payload/PayloadVoice.js +80 -93
- package/dist/pages/message/components/Payload/PayloadWrapper.js +18 -43
- package/dist/pages/message/components/Payload/type.js +1 -2
- package/dist/pages/message/components/ReceiptBack.js +31 -61
- package/dist/pages/message/components/TextMixMessage.js +13 -38
- package/dist/pages/message/components/TextMixQuote.js +129 -158
- package/dist/pages/message/components/TextMixQuoteMessage.js +16 -44
- package/dist/pages/message/components/UploadProgress.js +12 -37
- package/dist/pages/message/components/messageBar/EmojiPanel.js +25 -50
- package/dist/pages/message/components/messageBar/Icons.js +56 -74
- package/dist/pages/message/components/messageBar/MessageBar.js +84 -115
- package/dist/pages/message/components/messageBar/MessageInput.js +30 -55
- package/dist/pages/message/components/messageBar/OptionPanel.js +54 -82
- package/dist/pages/message/components/messageBar/VoiceBar.js +122 -100
- package/dist/pages/message/components/messageBar/index.js +2 -23
- package/dist/pages/message/message.routes.js +11 -40
- package/dist/pages/search/Search.js +38 -66
- package/dist/pages/search/SearchChatRecords.js +64 -92
- package/dist/pages/search/SearchFile.js +68 -96
- package/dist/pages/search/SearchManager.js +60 -65
- package/dist/pages/search/SearchPicturePage.js +16 -44
- package/dist/pages/search/components/ChatRecords.js +46 -74
- package/dist/pages/search/components/MyGroupChat.js +41 -69
- package/dist/pages/search/components/PictureMulipleBar.js +35 -63
- package/dist/pages/search/components/SearchFileList.js +59 -64
- package/dist/pages/search/components/SearchPictures.js +68 -98
- package/dist/pages/search/components/SearchShareLinkList.js +50 -55
- package/dist/pages/search/components/SearchUser.js +25 -53
- package/dist/pages/search/components/useSearchMessage.js +12 -16
- package/dist/pages/search/search.routes.js +11 -17
- package/dist/pages/search/utils.js +4 -12
- package/dist/pages/types.js +1 -2
- package/dist/slice/contact/contact.action.js +1 -2
- package/dist/slice/contact/contact.slice.js +7 -11
- package/dist/slice/index.js +7 -13
- package/dist/slice/panel/panel.slice.d.ts +2 -1
- package/dist/slice/panel/panel.slice.js +8 -7
- package/dist/slice/video/video.action.d.ts +1 -0
- package/dist/slice/video/video.action.js +56 -38
- package/dist/slice/video/video.slice.d.ts +1 -1
- package/dist/slice/video/video.slice.js +7 -8
- package/dist/utils/audio.d.ts +3 -0
- package/dist/utils/audio.js +10 -0
- package/dist/utils/color.js +2 -9
- package/dist/utils/common-action-sheet.js +9 -14
- package/dist/utils/cookie.js +6 -14
- package/dist/utils/emoji.js +9 -12
- package/dist/utils/file-icon.js +33 -60
- package/dist/utils/file-operate.js +1 -2
- package/dist/utils/file.d.ts +1 -1
- package/dist/utils/file.js +74 -87
- package/dist/utils/golden-rectangle.js +3 -7
- package/dist/utils/phone.js +13 -22
- package/dist/utils/request.js +7 -15
- package/dist/utils/scroll.js +5 -9
- package/dist/utils/summary.js +4 -11
- package/dist/utils/take-camera.js +12 -19
- package/dist/utils/text-mix.js +4 -11
- package/dist/utils/upload.js +20 -41
- package/package.json +6 -7
@@ -1,189 +1,160 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
-
};
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
exports.QuoteMultiple = exports.QuoteVoice = exports.QuoteFile = exports.QuoteVideo = exports.QuotePicture = exports.QuoteTextMix = void 0;
|
30
|
-
const react_1 = __importStar(require("react"));
|
31
|
-
const react_native_1 = require("react-native");
|
32
|
-
const TextMixMessage_1 = __importDefault(require("./TextMixMessage"));
|
33
|
-
const styles_1 = require("../../../components/styles");
|
34
|
-
const AntDesign_1 = __importDefault(require("react-native-vector-icons/AntDesign"));
|
35
|
-
const rn_ui_1 = require("@smart-link/rn-ui");
|
36
|
-
const im_base_1 = require("@smart-link/im-base");
|
37
|
-
const golden_rectangle_1 = require("../../../utils/golden-rectangle");
|
38
|
-
const color_1 = require("../../../utils/color");
|
39
|
-
const LocalImage_1 = __importDefault(require("../../../components/LocalImage"));
|
40
|
-
const useTranslation_1 = __importDefault(require("../../../hooks/useTranslation"));
|
41
|
-
const init_1 = require("../../../init");
|
42
|
-
const PayloadFile_1 = __importDefault(require("./Payload/PayloadFile"));
|
43
|
-
const useDownloadSource_1 = __importStar(require("../../../hooks/useDownloadSource"));
|
1
|
+
import React, { memo } from 'react';
|
2
|
+
import { ActivityIndicator, Image, StyleSheet, Text, TouchableOpacity, View, Dimensions } from 'react-native';
|
3
|
+
import TextMixMessage from './TextMixMessage';
|
4
|
+
import { shadowStyle } from '../../../components/styles';
|
5
|
+
import AntDesign from 'react-native-vector-icons/AntDesign';
|
6
|
+
import { dp, useTheme } from '@smart-link/rn-ui';
|
7
|
+
import { ConversationType, numberToTime, buildSimpleText } from '@smart-link/im-base';
|
8
|
+
import { calculate } from '../../../utils/golden-rectangle';
|
9
|
+
import { dark } from '../../../utils/color';
|
10
|
+
import LocalImage from '../../../components/LocalImage';
|
11
|
+
import useTranslation from '../../../hooks/useTranslation';
|
12
|
+
import { getImManager } from '../../../init';
|
13
|
+
import PayloadFile from './Payload/PayloadFile';
|
14
|
+
import useDownloadSource, { useDownloadImgSource } from "../../../hooks/useDownloadSource";
|
44
15
|
const voiceLeft = require('../../../../assets/voice-left.png');
|
45
|
-
const { width } =
|
46
|
-
|
16
|
+
const { width } = Dimensions.get('window');
|
17
|
+
export const QuoteTextMix = memo(props => {
|
47
18
|
const { quoteTitle, quoteText, color, textStyle, quoteStyle, onPressQuote, onLongPressPhone, onLongPressURL } = props;
|
48
|
-
return (<
|
49
|
-
<
|
19
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[quoteStyle, styles.leftBorder, { backgroundColor: dark(color, 4) }]}>
|
20
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
50
21
|
{quoteTitle}
|
51
22
|
{' : '}
|
52
|
-
</
|
53
|
-
<
|
54
|
-
<
|
55
|
-
</
|
23
|
+
</Text>
|
24
|
+
<View style={styles.h5}/>
|
25
|
+
<TextMixMessage text={quoteText} textStyle={textStyle} onLongPressPhone={onLongPressPhone} onLongPressURL={onLongPressURL}/>
|
26
|
+
</TouchableOpacity>);
|
56
27
|
});
|
57
|
-
|
28
|
+
export const QuotePicture = memo(props => {
|
58
29
|
const { quoteTitle, quoteMessage, quoteStyle, color, textStyle, borderColor, backgroundColor, onPressQuote } = props;
|
59
30
|
const { height, width } = quoteMessage.payload;
|
60
|
-
const theme =
|
31
|
+
const theme = useTheme();
|
61
32
|
console.log('QuotePicture', quoteMessage);
|
62
|
-
const localImg = (
|
63
|
-
const sizeStyle =
|
64
|
-
return (<
|
65
|
-
<
|
33
|
+
const localImg = useDownloadSource(quoteMessage.payload);
|
34
|
+
const sizeStyle = calculate(height || 100, width || 61.8, 100);
|
35
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[quoteStyle, styles.leftBorder, { backgroundColor: dark(color, 6) }]}>
|
36
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
66
37
|
{quoteTitle}
|
67
38
|
{' : '}
|
68
|
-
</
|
69
|
-
<
|
70
|
-
{(!localImg) && (<
|
39
|
+
</Text>
|
40
|
+
<View style={styles.h5}/>
|
41
|
+
{(!localImg) && (<View style={[
|
71
42
|
styles.pictureEmpty,
|
72
43
|
Object.assign({ backgroundColor,
|
73
44
|
borderColor }, sizeStyle),
|
74
|
-
{ backgroundColor:
|
45
|
+
{ backgroundColor: dark(color, 6) },
|
75
46
|
]}>
|
76
|
-
<
|
77
|
-
</
|
47
|
+
<ActivityIndicator color={theme.primaryColor} animating={true}/>
|
48
|
+
</View>)}
|
78
49
|
|
79
|
-
{localImg && (<
|
80
|
-
</
|
50
|
+
{localImg && (<LocalImage style={sizeStyle} resizeMode="cover" localPath={localImg}/>)}
|
51
|
+
</TouchableOpacity>);
|
81
52
|
});
|
82
|
-
|
53
|
+
export const QuoteVideo = memo(props => {
|
83
54
|
const { quoteTitle, quoteMessage, quoteStyle, color, textStyle, borderColor, backgroundColor, onPressQuote } = props;
|
84
55
|
const { duration, height, width } = quoteMessage.payload;
|
85
|
-
const theme =
|
56
|
+
const theme = useTheme();
|
86
57
|
console.log('QuoteVideo: ', quoteMessage);
|
87
|
-
const sizeStyle =
|
88
|
-
const localImg =
|
89
|
-
return (<
|
90
|
-
<
|
58
|
+
const sizeStyle = calculate(height, width);
|
59
|
+
const localImg = useDownloadImgSource(quoteMessage.payload);
|
60
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[quoteStyle, styles.leftBorder, { backgroundColor: dark(color, 6) }]}>
|
61
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
91
62
|
{quoteTitle}
|
92
63
|
{' : '}
|
93
|
-
</
|
94
|
-
<
|
95
|
-
{(!localImg) && (<
|
64
|
+
</Text>
|
65
|
+
<View style={styles.h5}/>
|
66
|
+
{(!localImg) && (<View style={[
|
96
67
|
styles.pictureEmpty,
|
97
68
|
Object.assign({ backgroundColor,
|
98
69
|
borderColor }, sizeStyle),
|
99
|
-
{ backgroundColor:
|
70
|
+
{ backgroundColor: dark(color, 6) },
|
100
71
|
]}>
|
101
|
-
<
|
102
|
-
</
|
72
|
+
<ActivityIndicator color={theme.primaryColor} animating={true}/>
|
73
|
+
</View>)}
|
103
74
|
|
104
|
-
{localImg && (<
|
105
|
-
<
|
106
|
-
<
|
107
|
-
<
|
108
|
-
</
|
109
|
-
<
|
110
|
-
<
|
111
|
-
</
|
112
|
-
</
|
113
|
-
</
|
75
|
+
{localImg && (<View style={{ width: sizeStyle.width }}>
|
76
|
+
<LocalImage style={sizeStyle} resizeMode="cover" localPath={localImg}/>
|
77
|
+
<View style={styles.playView}>
|
78
|
+
<AntDesign size={30} name="playcircleo" color="#fff"/>
|
79
|
+
</View>
|
80
|
+
<View style={{ position: 'absolute', bottom: dp(5), right: dp(5) }}>
|
81
|
+
<Text style={{ fontSize: dp(12), color: '#fff' }}>{numberToTime(duration)}</Text>
|
82
|
+
</View>
|
83
|
+
</View>)}
|
84
|
+
</TouchableOpacity>);
|
114
85
|
});
|
115
|
-
|
86
|
+
export const QuoteFile = memo(props => {
|
116
87
|
const { quoteTitle, quoteMessage, color, textStyle, onPressQuote } = props;
|
117
|
-
return (<
|
118
|
-
<
|
88
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[styles.leftBorder, { padding: dp(5), backgroundColor: dark(color, 6) }]}>
|
89
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
119
90
|
{quoteTitle}
|
120
91
|
{' : '}
|
121
|
-
</
|
122
|
-
<
|
123
|
-
<
|
124
|
-
<
|
125
|
-
</
|
126
|
-
</
|
92
|
+
</Text>
|
93
|
+
<View style={styles.h5}/>
|
94
|
+
<View style={[styles.popoverFile, { backgroundColor: dark(color, 10) }]}>
|
95
|
+
<PayloadFile {...quoteMessage} style={{ flex: 1 }} showArrow={false}/>
|
96
|
+
</View>
|
97
|
+
</TouchableOpacity>);
|
127
98
|
});
|
128
|
-
|
99
|
+
export const QuoteVoice = memo(props => {
|
129
100
|
const { quoteTitle, quoteMessage, color, textStyle, onPressQuote } = props;
|
130
101
|
const { duration } = quoteMessage.payload;
|
131
102
|
let voiceViewLength = 40 + (80 * duration) / 60;
|
132
|
-
voiceViewLength =
|
133
|
-
return (<
|
134
|
-
<
|
103
|
+
voiceViewLength = dp(voiceViewLength > 120 ? 120 : voiceViewLength);
|
104
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[styles.leftBorder, { padding: dp(5), backgroundColor: dark(color, 6) }]}>
|
105
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
135
106
|
{quoteTitle}
|
136
107
|
{' : '}
|
137
|
-
</
|
138
|
-
<
|
108
|
+
</Text>
|
109
|
+
<View style={styles.h5}/>
|
139
110
|
|
140
|
-
<
|
141
|
-
<
|
142
|
-
<
|
143
|
-
</
|
144
|
-
<
|
145
|
-
</
|
146
|
-
</
|
111
|
+
<View style={[styles.popoverVoice, { backgroundColor: dark(color, 10), width: voiceViewLength + dp(10) }]}>
|
112
|
+
<View style={{ width: voiceViewLength, alignItems: 'flex-start' }}>
|
113
|
+
<Image style={styles.voiceImage} source={voiceLeft}></Image>
|
114
|
+
</View>
|
115
|
+
<Text style={styles.duration}>{Math.round(duration || 0)}''</Text>
|
116
|
+
</View>
|
117
|
+
</TouchableOpacity>);
|
147
118
|
});
|
148
|
-
|
119
|
+
export const QuoteMultiple = memo(props => {
|
149
120
|
const { quoteTitle, quoteMessage, color, textStyle, quoteStyle, onPressQuote } = props;
|
150
121
|
const { type, fromName, toName, selectedMessages } = quoteMessage.payload;
|
151
|
-
const { t } = (
|
122
|
+
const { t } = useTranslation();
|
152
123
|
const messages = selectedMessages.length > 4 ? [...selectedMessages.slice(0, 4), 'more'] : selectedMessages;
|
153
|
-
const title = type ===
|
124
|
+
const title = type === ConversationType.C2C
|
154
125
|
? t('multipleChatRecordTitle', { fromName, toName })
|
155
126
|
: t('multipleChatRecordTitleGroup');
|
156
|
-
const imManager =
|
157
|
-
return (<
|
158
|
-
<
|
127
|
+
const imManager = getImManager();
|
128
|
+
return (<TouchableOpacity activeOpacity={0.5} onPress={onPressQuote} style={[quoteStyle, styles.leftBorder, { padding: dp(5), backgroundColor: dark(color, 4) }]}>
|
129
|
+
<Text style={[textStyle, styles.replyUserName]}>
|
159
130
|
{quoteTitle}
|
160
131
|
{' : '}
|
161
|
-
</
|
162
|
-
<
|
163
|
-
<
|
132
|
+
</Text>
|
133
|
+
<View style={styles.h5}/>
|
134
|
+
<Text style={styles.mulTitleText} numberOfLines={2}>
|
164
135
|
{title}
|
165
|
-
</
|
166
|
-
<
|
136
|
+
</Text>
|
137
|
+
<View style={styles.mulContent}>
|
167
138
|
{messages.map((message, index) => {
|
168
139
|
if (typeof message === 'string') {
|
169
|
-
return (<
|
140
|
+
return (<Text key={index} style={styles.mulItemTextMore}>
|
170
141
|
......
|
171
|
-
</
|
142
|
+
</Text>);
|
172
143
|
}
|
173
|
-
return (<
|
144
|
+
return (<Text key={index} style={styles.mulItemText} numberOfLines={1}>
|
174
145
|
{message.messageFromName +
|
175
146
|
': ' +
|
176
|
-
|
177
|
-
</
|
147
|
+
buildSimpleText(imManager, message.payloadType, message.payload)}
|
148
|
+
</Text>);
|
178
149
|
})}
|
179
|
-
</
|
180
|
-
<
|
181
|
-
<
|
182
|
-
</
|
150
|
+
</View>
|
151
|
+
<View style={styles.mulLine}/>
|
152
|
+
<Text style={styles.mulFooterText}>{t('multipleChatRecord')}</Text>
|
153
|
+
</TouchableOpacity>);
|
183
154
|
});
|
184
|
-
const styles =
|
155
|
+
const styles = StyleSheet.create({
|
185
156
|
h5: {
|
186
|
-
height:
|
157
|
+
height: dp(5),
|
187
158
|
},
|
188
159
|
pictureEmpty: {
|
189
160
|
justifyContent: 'center',
|
@@ -200,79 +171,79 @@ const styles = react_native_1.StyleSheet.create({
|
|
200
171
|
},
|
201
172
|
fileInfo: {
|
202
173
|
flex: 1,
|
203
|
-
paddingHorizontal:
|
174
|
+
paddingHorizontal: dp(10),
|
204
175
|
justifyContent: 'center',
|
205
176
|
},
|
206
177
|
fileName: {
|
207
|
-
fontSize:
|
208
|
-
lineHeight:
|
178
|
+
fontSize: dp(15),
|
179
|
+
lineHeight: dp(20),
|
209
180
|
color: '#010101',
|
210
181
|
},
|
211
182
|
fileSize: {
|
212
|
-
fontSize:
|
213
|
-
lineHeight:
|
183
|
+
fontSize: dp(12),
|
184
|
+
lineHeight: dp(20),
|
214
185
|
color: '#a2a2a2',
|
215
186
|
},
|
216
187
|
imageIcon: {
|
217
|
-
height:
|
188
|
+
height: dp(45),
|
218
189
|
},
|
219
190
|
popoverFile: {
|
220
191
|
backgroundColor: '#fff',
|
221
192
|
flexDirection: 'row',
|
222
|
-
paddingVertical:
|
223
|
-
width: width -
|
193
|
+
paddingVertical: dp(8),
|
194
|
+
width: width - dp(145),
|
224
195
|
},
|
225
196
|
voiceImage: {
|
226
|
-
width:
|
227
|
-
height:
|
197
|
+
width: dp(24),
|
198
|
+
height: dp(18),
|
228
199
|
},
|
229
200
|
duration: {
|
230
|
-
fontSize:
|
231
|
-
lineHeight:
|
201
|
+
fontSize: dp(13),
|
202
|
+
lineHeight: dp(21),
|
232
203
|
color: '#666',
|
233
204
|
position: 'absolute',
|
234
|
-
right:
|
205
|
+
right: dp(5),
|
235
206
|
alignSelf: 'center',
|
236
207
|
},
|
237
|
-
popoverVoice: Object.assign({ flexDirection: 'row', padding:
|
208
|
+
popoverVoice: Object.assign({ flexDirection: 'row', padding: dp(9), borderRadius: dp(3), borderStyle: 'solid' }, shadowStyle),
|
238
209
|
replyUserName: {
|
239
210
|
fontWeight: '600',
|
240
211
|
},
|
241
212
|
leftBorder: {
|
242
|
-
borderLeftWidth:
|
213
|
+
borderLeftWidth: dp(4),
|
243
214
|
borderColor: '#adadad',
|
244
|
-
borderRadius:
|
215
|
+
borderRadius: dp(4),
|
245
216
|
},
|
246
217
|
mulTitleText: {
|
247
218
|
color: '#333',
|
248
|
-
fontSize:
|
249
|
-
lineHeight:
|
219
|
+
fontSize: dp(14),
|
220
|
+
lineHeight: dp(18),
|
250
221
|
},
|
251
222
|
mulContent: {
|
252
|
-
paddingVertical:
|
223
|
+
paddingVertical: dp(5),
|
253
224
|
},
|
254
225
|
mulItem: {
|
255
226
|
justifyContent: 'center',
|
256
227
|
},
|
257
228
|
mulItemText: {
|
258
229
|
color: '#999',
|
259
|
-
fontSize:
|
260
|
-
lineHeight:
|
230
|
+
fontSize: dp(13),
|
231
|
+
lineHeight: dp(19),
|
261
232
|
},
|
262
233
|
mulItemTextMore: {
|
263
234
|
color: '#999',
|
264
|
-
fontSize:
|
265
|
-
lineHeight:
|
235
|
+
fontSize: dp(13),
|
236
|
+
lineHeight: dp(13),
|
266
237
|
},
|
267
238
|
mulFooterText: {
|
268
239
|
color: '#777',
|
269
|
-
fontSize:
|
240
|
+
fontSize: dp(13),
|
270
241
|
},
|
271
242
|
mulLine: {
|
272
|
-
marginTop:
|
273
|
-
marginBottom:
|
243
|
+
marginTop: dp(5),
|
244
|
+
marginBottom: dp(5),
|
274
245
|
backgroundColor: '#ddd',
|
275
246
|
width: '100%',
|
276
|
-
height:
|
247
|
+
height: dp(1),
|
277
248
|
},
|
278
249
|
});
|
@@ -1,38 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
27
|
-
};
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
-
const react_1 = __importStar(require("react"));
|
30
|
-
const TextMixQuote_1 = require("./TextMixQuote");
|
31
|
-
const react_native_1 = require("react-native");
|
32
|
-
const TextMixMessage_1 = __importDefault(require("./TextMixMessage"));
|
33
|
-
const im_base_1 = require("@smart-link/im-base");
|
34
|
-
const { TEXT, VOICE, VIDEO, PICTURE, FILE, MULTIPLE } = im_base_1.PayloadType;
|
35
|
-
const TextMixQuoteMessage = (0, react_1.memo)(props => {
|
1
|
+
import React, { memo } from 'react';
|
2
|
+
import { QuoteFile, QuotePicture, QuoteTextMix, QuoteVideo, QuoteVoice, QuoteMultiple } from './TextMixQuote';
|
3
|
+
import { View } from 'react-native';
|
4
|
+
import TextMixMessage from './TextMixMessage';
|
5
|
+
import { PayloadType } from '@smart-link/im-base';
|
6
|
+
const { TEXT, VOICE, VIDEO, PICTURE, FILE, MULTIPLE } = PayloadType;
|
7
|
+
const TextMixQuoteMessage = memo(props => {
|
36
8
|
const { text, quote, textStyle, quoteStyle, quoteBgColor, onLongPressPhone, onLongPressURL, onPressQuote } = props;
|
37
9
|
let quotePayloadType;
|
38
10
|
let quoteMessageSeq;
|
@@ -43,32 +15,32 @@ const TextMixQuoteMessage = (0, react_1.memo)(props => {
|
|
43
15
|
}
|
44
16
|
return (<>
|
45
17
|
{haveQuote && (<>
|
46
|
-
{quotePayloadType === TEXT && (<
|
18
|
+
{quotePayloadType === TEXT && (<QuoteTextMix quoteTitle={quote.quoteTitle} quoteText={quote.quoteText} color={quoteBgColor} quoteStyle={quoteStyle} textStyle={textStyle} onLongPressPhone={onLongPressPhone} onLongPressURL={onLongPressURL} onPressQuote={() => {
|
47
19
|
onPressQuote === null || onPressQuote === void 0 ? void 0 : onPressQuote(quoteMessageSeq);
|
48
20
|
}}/>)}
|
49
21
|
|
50
|
-
{quotePayloadType === PICTURE && (<
|
22
|
+
{quotePayloadType === PICTURE && (<QuotePicture quoteTitle={quote.quoteTitle} quoteMessage={quote.quoteMessage} quoteStyle={quoteStyle} color={quoteBgColor} textStyle={textStyle} backgroundColor={quoteBgColor} borderColor={quoteBgColor} onPressQuote={() => {
|
51
23
|
onPressQuote && onPressQuote(quoteMessageSeq);
|
52
24
|
}}/>)}
|
53
25
|
|
54
|
-
{quotePayloadType === VIDEO && (<
|
26
|
+
{quotePayloadType === VIDEO && (<QuoteVideo quoteTitle={quote.quoteTitle} quoteMessage={quote.quoteMessage} quoteStyle={quoteStyle} color={quoteBgColor} textStyle={textStyle} backgroundColor={quoteBgColor} borderColor={quoteBgColor} onPressQuote={() => {
|
55
27
|
onPressQuote && onPressQuote(quoteMessageSeq);
|
56
28
|
}}/>)}
|
57
29
|
|
58
|
-
{quotePayloadType === FILE && (<
|
30
|
+
{quotePayloadType === FILE && (<QuoteFile quoteTitle={quote.quoteTitle} quoteMessage={quote.quoteMessage} color={quoteBgColor} textStyle={textStyle} onPressQuote={() => {
|
59
31
|
onPressQuote && onPressQuote(quoteMessageSeq);
|
60
32
|
}}/>)}
|
61
33
|
|
62
|
-
{quotePayloadType === VOICE && (<
|
34
|
+
{quotePayloadType === VOICE && (<QuoteVoice quoteTitle={quote.quoteTitle} quoteMessage={quote.quoteMessage} color={quoteBgColor} textStyle={textStyle} onPressQuote={() => {
|
63
35
|
onPressQuote && onPressQuote(quoteMessageSeq);
|
64
36
|
}}/>)}
|
65
|
-
{quotePayloadType === MULTIPLE && (<
|
37
|
+
{quotePayloadType === MULTIPLE && (<QuoteMultiple quoteTitle={quote.quoteTitle} quoteMessage={quote.quoteMessage} color={quoteBgColor} textStyle={textStyle} onPressQuote={() => {
|
66
38
|
onPressQuote && onPressQuote(quoteMessageSeq);
|
67
39
|
}}/>)}
|
68
|
-
<
|
40
|
+
<View style={{ height: 10 }}/>
|
69
41
|
</>)}
|
70
42
|
|
71
|
-
<
|
43
|
+
<TextMixMessage text={text} textStyle={textStyle} onLongPressPhone={onLongPressPhone} onLongPressURL={onLongPressURL}/>
|
72
44
|
</>);
|
73
45
|
});
|
74
|
-
|
46
|
+
export default TextMixQuoteMessage;
|
@@ -1,33 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
-
}
|
8
|
-
Object.defineProperty(o, k2, desc);
|
9
|
-
}) : (function(o, m, k, k2) {
|
10
|
-
if (k2 === undefined) k2 = k;
|
11
|
-
o[k2] = m[k];
|
12
|
-
}));
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
15
|
-
}) : function(o, v) {
|
16
|
-
o["default"] = v;
|
17
|
-
});
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
19
|
-
if (mod && mod.__esModule) return mod;
|
20
|
-
var result = {};
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
22
|
-
__setModuleDefault(result, mod);
|
23
|
-
return result;
|
24
|
-
};
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
26
|
-
const react_1 = __importStar(require("react"));
|
27
|
-
const rn_ui_1 = require("@smart-link/rn-ui");
|
28
|
-
const react_native_progress_1 = require("react-native-progress");
|
29
|
-
const react_native_1 = require("react-native");
|
30
|
-
const file_1 = require("../../../utils/file");
|
1
|
+
import React, { memo } from 'react';
|
2
|
+
import { dp } from '@smart-link/rn-ui';
|
3
|
+
import { Bar } from 'react-native-progress';
|
4
|
+
import { View, StyleSheet, Text } from 'react-native';
|
5
|
+
import { numberToFileSize } from '../../../utils/file';
|
31
6
|
const UploadProgress = ({ show, sendSize, totalSize, width }) => {
|
32
7
|
if (!show) {
|
33
8
|
return null;
|
@@ -36,16 +11,16 @@ const UploadProgress = ({ show, sendSize, totalSize, width }) => {
|
|
36
11
|
return null;
|
37
12
|
}
|
38
13
|
const progress = sendSize / totalSize;
|
39
|
-
return (<
|
40
|
-
<
|
41
|
-
<
|
42
|
-
</
|
14
|
+
return (<View>
|
15
|
+
<Bar progress={progress} width={width} height={dp(3)} color={'#999'} borderRadius={dp(1)}/>
|
16
|
+
<Text style={styles.rate}>{numberToFileSize(sendSize) + ' / ' + numberToFileSize(totalSize)}</Text>
|
17
|
+
</View>);
|
43
18
|
};
|
44
|
-
const styles =
|
19
|
+
const styles = StyleSheet.create({
|
45
20
|
rate: {
|
46
21
|
alignSelf: 'flex-end',
|
47
|
-
fontSize:
|
22
|
+
fontSize: dp(10),
|
48
23
|
color: '#999'
|
49
24
|
}
|
50
25
|
});
|
51
|
-
|
26
|
+
export default memo(UploadProgress);
|