@smart-link/rn-im 1.0.23 → 1.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/assets/file-dir.jpg +0 -0
  2. package/dist/api/addressList.js +6 -17
  3. package/dist/api/backup.js +8 -20
  4. package/dist/api/file.js +6 -35
  5. package/dist/api/user.js +6 -16
  6. package/dist/components/CachedImage.js +14 -42
  7. package/dist/components/Camera/Camera.js +26 -54
  8. package/dist/components/Camera/CameraCapture.js +99 -128
  9. package/dist/components/Camera/CameraResult.js +33 -61
  10. package/dist/components/ChatAvatar/ChatAvatar.d.ts +1 -1
  11. package/dist/components/ChatAvatar/ChatAvatar.js +34 -62
  12. package/dist/components/ChatAvatar/ChatAvatarId.d.ts +2 -2
  13. package/dist/components/ChatAvatar/ChatAvatarId.js +26 -51
  14. package/dist/components/ChatAvatar/ChatAvatarLocal.d.ts +2 -2
  15. package/dist/components/ChatAvatar/ChatAvatarLocal.js +22 -25
  16. package/dist/components/ChatAvatar/index.js +2 -23
  17. package/dist/components/Favicon.js +6 -34
  18. package/dist/components/FormatTimeText.js +5 -10
  19. package/dist/components/Highlighter.js +9 -34
  20. package/dist/components/IndicatorText.js +14 -39
  21. package/dist/components/LocalImage.js +7 -32
  22. package/dist/components/NetworkUnconnected.js +14 -42
  23. package/dist/components/PopoverWrapper.js +22 -47
  24. package/dist/components/VideoPlayer.js +111 -138
  25. package/dist/components/styles.js +10 -13
  26. package/dist/default-assets.d.ts +2 -0
  27. package/dist/default-assets.js +9 -10
  28. package/dist/hooks/useDownloadSource.js +7 -12
  29. package/dist/hooks/useFormatMsgTime.js +5 -13
  30. package/dist/hooks/useImReady.js +7 -10
  31. package/dist/hooks/useImSelector.js +34 -48
  32. package/dist/hooks/useTranslation.js +5 -10
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +8 -28
  35. package/dist/init.js +30 -40
  36. package/dist/interface.d.ts +9 -0
  37. package/dist/interface.js +1 -2
  38. package/dist/locales/en/addressList.js +1 -3
  39. package/dist/locales/index.js +4 -27
  40. package/dist/locales/lao/addressList.js +1 -3
  41. package/dist/locales/zh/addressList.js +1 -3
  42. package/dist/pages/address-list/AddressList.js +33 -61
  43. package/dist/pages/address-list/CardInfo.js +10 -18
  44. package/dist/pages/address-list/ChooseContact.js +50 -78
  45. package/dist/pages/address-list/Icons.js +7 -14
  46. package/dist/pages/address-list/Organization.js +59 -89
  47. package/dist/pages/address-list/UserDetail.js +55 -83
  48. package/dist/pages/address-list/UserJobs.js +31 -33
  49. package/dist/pages/address-list/UserSearch.js +29 -54
  50. package/dist/pages/address-list/addressList.routes.js +11 -16
  51. package/dist/pages/collection/Collection.js +53 -81
  52. package/dist/pages/collection/ContentFactory.js +53 -82
  53. package/dist/pages/collection/collection.routes.js +3 -9
  54. package/dist/pages/conversation/ForwardToConversation.js +63 -91
  55. package/dist/pages/conversation/List.js +74 -102
  56. package/dist/pages/conversation/components/ConversationCard.js +46 -74
  57. package/dist/pages/conversation/components/ConversationOption.js +27 -55
  58. package/dist/pages/conversation/conversation.routes.js +17 -23
  59. package/dist/pages/conversation/setting/GroupTransfer.js +32 -60
  60. package/dist/pages/conversation/setting/OptionAvatars.d.ts +1 -1
  61. package/dist/pages/conversation/setting/OptionAvatars.js +62 -90
  62. package/dist/pages/conversation/setting/OptionCancelGroup.js +14 -42
  63. package/dist/pages/conversation/setting/OptionConversation.js +20 -48
  64. package/dist/pages/conversation/setting/OptionGroup.d.ts +1 -1
  65. package/dist/pages/conversation/setting/OptionGroup.js +20 -48
  66. package/dist/pages/conversation/setting/OptionGroupManage.js +21 -49
  67. package/dist/pages/conversation/setting/OptionGroupMoreMember.js +48 -53
  68. package/dist/pages/conversation/setting/OptionGroupNameOrNoticeEdit.js +49 -77
  69. package/dist/pages/conversation/setting/Setting.js +50 -56
  70. package/dist/pages/conversation/setting/SettingChatBg.js +26 -54
  71. package/dist/pages/index.js +7 -27
  72. package/dist/pages/message/ChooseMember.js +56 -84
  73. package/dist/pages/message/FileSelector.d.ts +6 -0
  74. package/dist/pages/message/FileSelector.js +235 -0
  75. package/dist/pages/message/MessageBackup/Bar.js +18 -43
  76. package/dist/pages/message/MessageBackup/MessageBackup.js +42 -72
  77. package/dist/pages/message/MessageBackup/RestoreBackupPage.js +48 -76
  78. package/dist/pages/message/MessageBackup/StartBackupPage.js +48 -76
  79. package/dist/pages/message/MessageBackup/index.js +3 -12
  80. package/dist/pages/message/MessageBackup/utils.js +14 -22
  81. package/dist/pages/message/MessageList.js +151 -141
  82. package/dist/pages/message/MessageRecord.js +74 -87
  83. package/dist/pages/message/components/BusiNotifyCard.js +60 -85
  84. package/dist/pages/message/components/ChatBg.js +11 -36
  85. package/dist/pages/message/components/MessageItem.d.ts +2 -1
  86. package/dist/pages/message/components/MessageItem.js +85 -112
  87. package/dist/pages/message/components/MessageItemQuote.js +30 -58
  88. package/dist/pages/message/components/MessageItemTips.js +27 -55
  89. package/dist/pages/message/components/MessageOption.d.ts +7 -3
  90. package/dist/pages/message/components/MessageOption.js +107 -134
  91. package/dist/pages/message/components/MessagePayload.d.ts +2 -1
  92. package/dist/pages/message/components/MessagePayload.js +36 -64
  93. package/dist/pages/message/components/MessagePictureAlbum.js +32 -60
  94. package/dist/pages/message/components/MessageReceiptStatus.js +18 -43
  95. package/dist/pages/message/components/MessageUndo.js +18 -48
  96. package/dist/pages/message/components/MultipleBar/index.js +48 -76
  97. package/dist/pages/message/components/Payload/PayloadContact.js +30 -58
  98. package/dist/pages/message/components/Payload/PayloadFile.d.ts +1 -1
  99. package/dist/pages/message/components/Payload/PayloadFile.js +44 -68
  100. package/dist/pages/message/components/Payload/PayloadMultiple.js +46 -70
  101. package/dist/pages/message/components/Payload/PayloadNotify.js +28 -56
  102. package/dist/pages/message/components/Payload/PayloadPicture.d.ts +1 -1
  103. package/dist/pages/message/components/Payload/PayloadPicture.js +21 -50
  104. package/dist/pages/message/components/Payload/PayloadShare.js +39 -67
  105. package/dist/pages/message/components/Payload/PayloadText.js +39 -67
  106. package/dist/pages/message/components/Payload/PayloadVideo.js +30 -57
  107. package/dist/pages/message/components/Payload/PayloadVoice.js +80 -93
  108. package/dist/pages/message/components/Payload/PayloadWrapper.d.ts +2 -1
  109. package/dist/pages/message/components/Payload/PayloadWrapper.js +24 -44
  110. package/dist/pages/message/components/Payload/type.d.ts +2 -1
  111. package/dist/pages/message/components/Payload/type.js +1 -2
  112. package/dist/pages/message/components/ReceiptBack.js +30 -60
  113. package/dist/pages/message/components/TextMixMessage.js +13 -38
  114. package/dist/pages/message/components/TextMixQuote.js +128 -162
  115. package/dist/pages/message/components/TextMixQuoteMessage.js +19 -47
  116. package/dist/pages/message/components/UploadProgress.js +12 -37
  117. package/dist/pages/message/components/messageBar/EmojiPanel.js +25 -50
  118. package/dist/pages/message/components/messageBar/Icons.js +56 -74
  119. package/dist/pages/message/components/messageBar/MessageBar.js +84 -115
  120. package/dist/pages/message/components/messageBar/MessageInput.js +30 -55
  121. package/dist/pages/message/components/messageBar/OptionPanel.js +54 -107
  122. package/dist/pages/message/components/messageBar/VoiceBar.js +122 -100
  123. package/dist/pages/message/components/messageBar/index.js +2 -23
  124. package/dist/pages/message/message.routes.js +21 -40
  125. package/dist/pages/search/Search.js +38 -66
  126. package/dist/pages/search/SearchChatRecords.js +64 -92
  127. package/dist/pages/search/SearchFile.js +68 -96
  128. package/dist/pages/search/SearchManager.js +60 -65
  129. package/dist/pages/search/SearchPicturePage.js +16 -44
  130. package/dist/pages/search/components/ChatRecords.js +46 -74
  131. package/dist/pages/search/components/MyGroupChat.js +41 -69
  132. package/dist/pages/search/components/PictureMulipleBar.js +35 -63
  133. package/dist/pages/search/components/SearchFileList.js +59 -64
  134. package/dist/pages/search/components/SearchPictures.js +68 -98
  135. package/dist/pages/search/components/SearchShareLinkList.js +50 -55
  136. package/dist/pages/search/components/SearchUser.js +25 -53
  137. package/dist/pages/search/components/useSearchMessage.js +12 -16
  138. package/dist/pages/search/search.routes.js +11 -17
  139. package/dist/pages/search/utils.js +4 -12
  140. package/dist/pages/types.d.ts +4 -2
  141. package/dist/pages/types.js +1 -2
  142. package/dist/slice/contact/contact.slice.js +4 -8
  143. package/dist/slice/index.js +7 -13
  144. package/dist/slice/panel/panel.slice.d.ts +2 -1
  145. package/dist/slice/panel/panel.slice.js +8 -7
  146. package/dist/slice/video/video.action.d.ts +1 -0
  147. package/dist/slice/video/video.action.js +64 -38
  148. package/dist/slice/video/video.slice.d.ts +1 -1
  149. package/dist/slice/video/video.slice.js +7 -8
  150. package/dist/utils/audio.d.ts +3 -0
  151. package/dist/utils/audio.js +10 -0
  152. package/dist/utils/color.js +2 -9
  153. package/dist/utils/common-action-sheet.js +9 -14
  154. package/dist/utils/cookie.js +6 -14
  155. package/dist/utils/emoji.js +9 -12
  156. package/dist/utils/file-icon.js +33 -60
  157. package/dist/utils/file-operate.js +1 -2
  158. package/dist/utils/file.d.ts +10 -2
  159. package/dist/utils/file.js +188 -88
  160. package/dist/utils/golden-rectangle.js +3 -7
  161. package/dist/utils/phone.js +13 -22
  162. package/dist/utils/request.js +7 -15
  163. package/dist/utils/scroll.js +5 -9
  164. package/dist/utils/summary.js +4 -11
  165. package/dist/utils/take-camera.js +12 -19
  166. package/dist/utils/text-mix.js +4 -11
  167. package/dist/utils/upload.js +20 -41
  168. package/package.json +6 -7
  169. package/dist/slice/contact/contact.action.d.ts +0 -1
  170. package/dist/slice/contact/contact.action.js +0 -2
@@ -1,132 +1,107 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
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 rn_ui_1 = require("@smart-link/rn-ui");
27
- const react_1 = __importStar(require("react"));
28
- const react_native_1 = require("react-native");
29
- const react_native_svg_1 = require("react-native-svg");
1
+ import { dp } from '@smart-link/rn-ui';
2
+ import React, { memo } from 'react';
3
+ import { View, Text, StyleSheet, TouchableOpacity } from 'react-native';
4
+ import { Svg, Path } from 'react-native-svg';
30
5
  const notifyTypeIcon = {
31
- conference: ({ color, size }) => (<react_native_svg_1.Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
32
- <react_native_svg_1.Path d="M12.5 2.5c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10zm0 17.5c-4.5 0-8.5-3.5-8.5-8.5s3.5-8.5 8.5-8."/>
33
- </react_native_svg_1.Svg>),
34
- todo: ({ color, size }) => (<react_native_svg_1.Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
35
- <react_native_svg_1.Path d="M584.32 244.416h-154.272c-43.392 0-77.152-33.76-77.152-77.152s33.76-77.152 77.152-77.152h154.272c43.392 0 77.152 33.76 77.152 77.152s-33.76 77.152-77.152 77.152z m159.104 332.672c-96.416 0-178.4 81.952-178.4 178.4s81.952 178.4 178.4 178.4 178.4-81.952 178.4-178.4c0-101.248-81.952-178.4-178.4-178.4z m77.152 231.424h-101.248c-14.464 0-24.096-9.632-24.096-24.096V688c0-14.464 9.632-24.096 24.096-24.096s24.096 9.632 24.096 24.096v67.488h77.152c14.464 0 24.096 9.632 24.096 24.096 0 19.296-9.632 28.928-24.096 28.928zM796.48 167.264h-43.392c0 9.632 4.832 19.296 4.832 24.096 0 57.856-48.224 101.248-101.248 101.248h-308.576c-57.856 0-101.248-48.224-101.248-101.248 0-9.632 0-19.296 4.832-24.096H203.456c-57.856 0-101.248 43.392-101.248 101.248v515.904c0 57.856 43.392 101.248 101.248 101.248h347.136c-24.096-38.56-38.56-81.952-38.56-130.176 0-125.344 101.248-231.424 231.424-231.424 57.856 0 115.712 24.096 154.272 62.688V268.544c0-57.856-48.224-101.248-101.248-101.248zM449.312 678.336H280.576c-24.096 0-38.56-19.296-38.56-38.56s19.296-38.56 38.56-38.56h163.936c24.096 0 43.392 19.296 43.392 38.56s-19.296 38.56-38.56 38.56z m115.712-168.736h-284.48c-24.096 0-38.56-19.296-38.56-38.56 0-24.096 19.296-43.392 38.56-43.392h279.648c24.096 0 38.56 19.296 38.56 38.56 4.832 24.096-14.464 43.392-33.76 43.392z"/>
36
- </react_native_svg_1.Svg>),
37
- toread: ({ color, size }) => (<react_native_svg_1.Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
38
- <react_native_svg_1.Path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"/>
39
- </react_native_svg_1.Svg>),
40
- supervise: ({ color, size }) => (<react_native_svg_1.Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
41
- <react_native_svg_1.Path d="M300.8 268.8c-25.6 0-44.8-25.6-44.8-51.2V76.8c0-25.6 19.2-51.2 51.2-51.2 25.6 0 51.2 19.2 51.2 51.2v140.8c-6.4 25.6-25.6 51.2-57.6 51.2zM736 268.8c-25.6 0-51.2-19.2-51.2-51.2V76.8c0-25.6 19.2-51.2 51.2-51.2 25.6 0 51.2 19.2 51.2 51.2v140.8c0 25.6-25.6 51.2-51.2 51.2z"/>
42
- <react_native_svg_1.Path d="M883.2 102.4h-83.2v115.2c0 38.4-32 64-64 64-38.4 0-64-32-64-64V102.4H371.2v115.2c0 38.4-32 64-64 64s-64-32-64-64V102.4H160c-51.2 0-89.6 38.4-89.6 89.6v160h902.4V192c0-51.2-38.4-89.6-89.6-89.6zM70.4 403.2v396.8c0 51.2 38.4 89.6 89.6 89.6h723.2c51.2 0 89.6-38.4 89.6-89.6V403.2H70.4zM768 768H275.2c-19.2 0-32-12.8-32-32 0-12.8 12.8-32 32-32H768c19.2 0 32 12.8 32 32-6.4 19.2-19.2 32-32 32z m25.6-217.6c0 19.2-12.8 32-32 32H275.2c-19.2 0-32-12.8-32-32s12.8-32 32-32H768c12.8 6.4 25.6 19.2 25.6 32z"/>
43
- </react_native_svg_1.Svg>),
44
- calendarSchedule: ({ color, size }) => (<react_native_svg_1.Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
45
- <react_native_svg_1.Path d="M715.33 515.17L667.16 467 448.79 685.37l-94.39-94.39-48.17 48.17 142.81 142.81 266.29-266.79z m109.31-360.94h-44.02V64h-90.23v90.23H333.61V64h-90.23v90.23h-44.02c-25.19 0-46.46 8.81-64.07 26.17-17.61 17.61-26.17 38.88-26.17 64.07v625.29c0 25.19 8.8 46.46 26.17 64.07C152.9 951.44 174.17 960 199.36 960h625.29c25.19 0 46.46-8.81 64.07-26.17 17.61-17.61 26.17-38.88 26.17-64.07V244.47c0-25.19-8.8-46.46-26.17-64.07-17.62-17.37-38.89-26.17-64.08-26.17z m0 715.52H199.36V378.71h625.29v491.04z"/>
46
- </react_native_svg_1.Svg>),
6
+ conference: ({ color, size }) => (<Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
7
+ <Path d="M12.5 2.5c-5.5 0-10 4.5-10 10s4.5 10 10 10 10-4.5 10-10-4.5-10-10-10zm0 17.5c-4.5 0-8.5-3.5-8.5-8.5s3.5-8.5 8.5-8."/>
8
+ </Svg>),
9
+ todo: ({ color, size }) => (<Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
10
+ <Path d="M584.32 244.416h-154.272c-43.392 0-77.152-33.76-77.152-77.152s33.76-77.152 77.152-77.152h154.272c43.392 0 77.152 33.76 77.152 77.152s-33.76 77.152-77.152 77.152z m159.104 332.672c-96.416 0-178.4 81.952-178.4 178.4s81.952 178.4 178.4 178.4 178.4-81.952 178.4-178.4c0-101.248-81.952-178.4-178.4-178.4z m77.152 231.424h-101.248c-14.464 0-24.096-9.632-24.096-24.096V688c0-14.464 9.632-24.096 24.096-24.096s24.096 9.632 24.096 24.096v67.488h77.152c14.464 0 24.096 9.632 24.096 24.096 0 19.296-9.632 28.928-24.096 28.928zM796.48 167.264h-43.392c0 9.632 4.832 19.296 4.832 24.096 0 57.856-48.224 101.248-101.248 101.248h-308.576c-57.856 0-101.248-48.224-101.248-101.248 0-9.632 0-19.296 4.832-24.096H203.456c-57.856 0-101.248 43.392-101.248 101.248v515.904c0 57.856 43.392 101.248 101.248 101.248h347.136c-24.096-38.56-38.56-81.952-38.56-130.176 0-125.344 101.248-231.424 231.424-231.424 57.856 0 115.712 24.096 154.272 62.688V268.544c0-57.856-48.224-101.248-101.248-101.248zM449.312 678.336H280.576c-24.096 0-38.56-19.296-38.56-38.56s19.296-38.56 38.56-38.56h163.936c24.096 0 43.392 19.296 43.392 38.56s-19.296 38.56-38.56 38.56z m115.712-168.736h-284.48c-24.096 0-38.56-19.296-38.56-38.56 0-24.096 19.296-43.392 38.56-43.392h279.648c24.096 0 38.56 19.296 38.56 38.56 4.832 24.096-14.464 43.392-33.76 43.392z"/>
11
+ </Svg>),
12
+ toread: ({ color, size }) => (<Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
13
+ <Path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64z m0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"/>
14
+ </Svg>),
15
+ supervise: ({ color, size }) => (<Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
16
+ <Path d="M300.8 268.8c-25.6 0-44.8-25.6-44.8-51.2V76.8c0-25.6 19.2-51.2 51.2-51.2 25.6 0 51.2 19.2 51.2 51.2v140.8c-6.4 25.6-25.6 51.2-57.6 51.2zM736 268.8c-25.6 0-51.2-19.2-51.2-51.2V76.8c0-25.6 19.2-51.2 51.2-51.2 25.6 0 51.2 19.2 51.2 51.2v140.8c0 25.6-25.6 51.2-51.2 51.2z"/>
17
+ <Path d="M883.2 102.4h-83.2v115.2c0 38.4-32 64-64 64-38.4 0-64-32-64-64V102.4H371.2v115.2c0 38.4-32 64-64 64s-64-32-64-64V102.4H160c-51.2 0-89.6 38.4-89.6 89.6v160h902.4V192c0-51.2-38.4-89.6-89.6-89.6zM70.4 403.2v396.8c0 51.2 38.4 89.6 89.6 89.6h723.2c51.2 0 89.6-38.4 89.6-89.6V403.2H70.4zM768 768H275.2c-19.2 0-32-12.8-32-32 0-12.8 12.8-32 32-32H768c19.2 0 32 12.8 32 32-6.4 19.2-19.2 32-32 32z m25.6-217.6c0 19.2-12.8 32-32 32H275.2c-19.2 0-32-12.8-32-32s12.8-32 32-32H768c12.8 6.4 25.6 19.2 25.6 32z"/>
18
+ </Svg>),
19
+ calendarSchedule: ({ color, size }) => (<Svg viewBox={'0 0 1024 1024'} fill={color} width={size} height={size}>
20
+ <Path d="M715.33 515.17L667.16 467 448.79 685.37l-94.39-94.39-48.17 48.17 142.81 142.81 266.29-266.79z m109.31-360.94h-44.02V64h-90.23v90.23H333.61V64h-90.23v90.23h-44.02c-25.19 0-46.46 8.81-64.07 26.17-17.61 17.61-26.17 38.88-26.17 64.07v625.29c0 25.19 8.8 46.46 26.17 64.07C152.9 951.44 174.17 960 199.36 960h625.29c25.19 0 46.46-8.81 64.07-26.17 17.61-17.61 26.17-38.88 26.17-64.07V244.47c0-25.19-8.8-46.46-26.17-64.07-17.62-17.37-38.89-26.17-64.08-26.17z m0 715.52H199.36V378.71h625.29v491.04z"/>
21
+ </Svg>),
47
22
  };
48
23
  const BusiNotifyCard = ({ payload }) => {
49
24
  const Icon = notifyTypeIcon[payload.busiType] || notifyTypeIcon.todo;
50
25
  const color = payload.read ? '#ea1f2d' : '#333';
51
- return (<react_native_1.TouchableOpacity style={styles.root} activeOpacity={0.5}>
52
- <react_native_1.View style={styles.busiTypeContainer}>
53
- <Icon color={color} size={(0, rn_ui_1.dp)(24)}/>
54
- <react_native_1.Text style={[styles.busiType, { color }]}>{payload.busiTypeText}</react_native_1.Text>
55
- </react_native_1.View>
26
+ return (<TouchableOpacity style={styles.root} activeOpacity={0.5}>
27
+ <View style={styles.busiTypeContainer}>
28
+ <Icon color={color} size={dp(24)}/>
29
+ <Text style={[styles.busiType, { color }]}>{payload.busiTypeText}</Text>
30
+ </View>
56
31
 
57
- <react_native_1.Text style={styles.title}>{payload.title}</react_native_1.Text>
58
- {payload.columns.length > 0 && (<react_native_1.View style={styles.columns}>
59
- {payload.columns.map(column => (<react_native_1.View key={column.key} style={styles.column}>
60
- <react_native_1.Text style={styles.label}>{column.label}:</react_native_1.Text>
61
- {column.userId ? (<react_native_1.TouchableOpacity>
62
- <react_native_1.Text style={[styles.value, { color: '#208aff' }]}>{column.value}</react_native_1.Text>
63
- </react_native_1.TouchableOpacity>) : (<react_native_1.Text style={styles.value}>{column.value}</react_native_1.Text>)}
64
- </react_native_1.View>))}
65
- </react_native_1.View>)}
66
- {payload.content && <react_native_1.Text style={styles.content}>{payload.content}</react_native_1.Text>}
67
- {payload.busiStatusText && <react_native_1.Text style={[styles.busiStatusText, { color }]}>{payload.busiStatusText}</react_native_1.Text>}
68
- </react_native_1.TouchableOpacity>);
32
+ <Text style={styles.title}>{payload.title}</Text>
33
+ {payload.columns.length > 0 && (<View style={styles.columns}>
34
+ {payload.columns.map(column => (<View key={column.key} style={styles.column}>
35
+ <Text style={styles.label}>{column.label}:</Text>
36
+ {column.userId ? (<TouchableOpacity>
37
+ <Text style={[styles.value, { color: '#208aff' }]}>{column.value}</Text>
38
+ </TouchableOpacity>) : (<Text style={styles.value}>{column.value}</Text>)}
39
+ </View>))}
40
+ </View>)}
41
+ {payload.content && <Text style={styles.content}>{payload.content}</Text>}
42
+ {payload.busiStatusText && <Text style={[styles.busiStatusText, { color }]}>{payload.busiStatusText}</Text>}
43
+ </TouchableOpacity>);
69
44
  };
70
- const styles = react_native_1.StyleSheet.create({
45
+ const styles = StyleSheet.create({
71
46
  root: {
72
- marginTop: (0, rn_ui_1.dp)(12),
73
- marginBottom: -(0, rn_ui_1.dp)(32),
47
+ marginTop: dp(12),
48
+ marginBottom: -dp(32),
74
49
  marginHorizontal: '5%',
75
50
  width: '90%',
76
- borderRadius: (0, rn_ui_1.dp)(4),
77
- padding: (0, rn_ui_1.dp)(20),
51
+ borderRadius: dp(4),
52
+ padding: dp(20),
78
53
  shadowColor: 'rgba(0, 0, 0, 0.4)',
79
54
  backgroundColor: '#fff',
80
55
  shadowOffset: {
81
56
  width: 1,
82
- height: (0, rn_ui_1.dp)(6),
57
+ height: dp(6),
83
58
  },
84
- shadowRadius: (0, rn_ui_1.dp)(6),
59
+ shadowRadius: dp(6),
85
60
  shadowOpacity: 1,
86
61
  elevation: 2,
87
62
  },
88
63
  busiTypeContainer: {
89
64
  flexDirection: 'row',
90
65
  alignItems: 'center',
91
- marginBottom: (0, rn_ui_1.dp)(6),
66
+ marginBottom: dp(6),
92
67
  },
93
68
  busiType: {
94
- fontSize: (0, rn_ui_1.dp)(14),
69
+ fontSize: dp(14),
95
70
  color: '#333333',
96
- marginLeft: (0, rn_ui_1.dp)(6),
71
+ marginLeft: dp(6),
97
72
  },
98
73
  title: {
99
- fontSize: (0, rn_ui_1.dp)(14),
74
+ fontSize: dp(14),
100
75
  color: '#333333',
101
- marginBottom: (0, rn_ui_1.dp)(6),
76
+ marginBottom: dp(6),
102
77
  },
103
78
  content: {},
104
79
  busiStatusText: {
105
80
  alignSelf: 'flex-end',
106
- fontSize: (0, rn_ui_1.dp)(15),
107
- lineHeight: (0, rn_ui_1.dp)(22),
81
+ fontSize: dp(15),
82
+ lineHeight: dp(22),
108
83
  color: '#333333',
109
84
  },
110
85
  columns: {},
111
86
  column: {
112
87
  flexDirection: 'row',
113
- marginBottom: (0, rn_ui_1.dp)(6),
88
+ marginBottom: dp(6),
114
89
  },
115
90
  label: {
116
- width: (0, rn_ui_1.dp)(80),
91
+ width: dp(80),
117
92
  letterSpacing: 2,
118
- height: (0, rn_ui_1.dp)(24),
119
- fontSize: (0, rn_ui_1.dp)(15),
120
- lineHeight: (0, rn_ui_1.dp)(24),
93
+ height: dp(24),
94
+ fontSize: dp(15),
95
+ lineHeight: dp(24),
121
96
  color: '#666666',
122
97
  overflow: 'hidden',
123
98
  },
124
99
  value: {
125
- height: (0, rn_ui_1.dp)(24),
126
- fontSize: (0, rn_ui_1.dp)(15),
127
- lineHeight: (0, rn_ui_1.dp)(24),
100
+ height: dp(24),
101
+ fontSize: dp(15),
102
+ lineHeight: dp(24),
128
103
  color: '#333333',
129
104
  overflow: 'hidden',
130
105
  },
131
106
  });
132
- exports.default = (0, react_1.memo)(BusiNotifyCard);
107
+ export default memo(BusiNotifyCard);
@@ -1,44 +1,19 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
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 init_1 = require("../../../init");
27
- const file_1 = require("../../../utils/file");
28
- const react_1 = __importStar(require("react"));
29
- const react_native_1 = require("react-native");
1
+ import { getImManager } from '../../../init';
2
+ import { download, toAbsolutePath } from '../../../utils/file';
3
+ import React, { useEffect, useState } from 'react';
4
+ import { ImageBackground } from 'react-native';
30
5
  const ChatBg = ({ fileId, children }) => {
31
- const [localPath, setLocalPath] = (0, react_1.useState)('');
32
- (0, react_1.useEffect)(() => {
6
+ const [localPath, setLocalPath] = useState('');
7
+ useEffect(() => {
33
8
  if (fileId && fileId !== 'bg0') {
34
- const imManager = (0, init_1.getImManager)();
9
+ const imManager = getImManager();
35
10
  imManager.loadResourceFromCache(fileId).then(resp => {
36
11
  if (resp) {
37
12
  setLocalPath(resp);
38
13
  }
39
14
  else {
40
15
  // 下载资源
41
- (0, file_1.download)({
16
+ download({
42
17
  fileId,
43
18
  resourceType: 'background',
44
19
  filename: fileId + '.png',
@@ -58,8 +33,8 @@ const ChatBg = ({ fileId, children }) => {
58
33
  if (!fileId || fileId === 'bg0' || !localPath) {
59
34
  return children;
60
35
  }
61
- return (<react_native_1.ImageBackground style={{ flex: 1 }} resizeMode='cover' source={{ uri: (0, file_1.toAbsolutePath)(localPath) }}>
36
+ return (<ImageBackground style={{ flex: 1 }} resizeMode='cover' source={{ uri: toAbsolutePath(localPath) }}>
62
37
  {children}
63
- </react_native_1.ImageBackground>);
38
+ </ImageBackground>);
64
39
  };
65
- exports.default = ChatBg;
40
+ export default ChatBg;
@@ -1,6 +1,7 @@
1
1
  import { IConversation, IMessage } from '@smart-link/im-base';
2
2
  import React from 'react';
3
3
  import { NativeTouchEvent, LayoutChangeEvent } from 'react-native';
4
+ import { NativeEventLayout } from "../../types";
4
5
  type MessageItemProps = {
5
6
  isMultiple?: boolean;
6
7
  multipleSelect?: Record<string, IMessage>;
@@ -8,7 +9,7 @@ type MessageItemProps = {
8
9
  message: IMessage;
9
10
  mine: boolean;
10
11
  showTimeLine: boolean;
11
- onLongPressPopover: (message: IMessage, nativeEvent: NativeTouchEvent) => void;
12
+ onLongPressPopover: (message: IMessage, nativeEvent: NativeTouchEvent, layout: NativeEventLayout) => void;
12
13
  onPressPopover: (message: IMessage, nativeEvent: NativeTouchEvent) => void;
13
14
  onLayoutItem: (item: IMessage, e: LayoutChangeEvent) => void;
14
15
  };
@@ -1,94 +1,67 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
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
- 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 im_base_1 = require("@smart-link/im-base");
30
- const rn_ui_1 = require("@smart-link/rn-ui");
31
- const react_1 = __importStar(require("react"));
32
- const react_native_1 = require("react-native");
33
- const ChatAvatar_1 = __importDefault(require("../../../components/ChatAvatar/ChatAvatar"));
34
- const useFormatMsgTime_1 = __importDefault(require("../../../hooks/useFormatMsgTime"));
35
- const BusiNotifyCard_1 = __importDefault(require("./BusiNotifyCard"));
36
- const PayloadNotify_1 = __importDefault(require("./Payload/PayloadNotify"));
37
- const MessagePayload_1 = __importDefault(require("./MessagePayload"));
38
- const useTranslation_1 = __importDefault(require("../../../hooks/useTranslation"));
1
+ import { ConversationType, MessageStatus, PayloadType, isNotifyMessage, MessagePanelActions, } from '@smart-link/im-base';
2
+ import { Checkbox, dp, useTheme } from '@smart-link/rn-ui';
3
+ import React, { memo } from 'react';
4
+ import { View, Text, StyleSheet, TouchableOpacity, Dimensions, ActivityIndicator, TouchableWithoutFeedback, } from 'react-native';
5
+ import ChatAvatar from '../../../components/ChatAvatar/ChatAvatar';
6
+ import useFormatMsgTime from '../../../hooks/useFormatMsgTime';
7
+ import BusiNotifyCard from './BusiNotifyCard';
8
+ import PayloadNotify from './Payload/PayloadNotify';
9
+ import MessagePayload from './MessagePayload';
10
+ import useTranslation from '../../../hooks/useTranslation';
39
11
  //@ts-ignore
40
- const MaterialIcons_1 = __importDefault(require("react-native-vector-icons/MaterialIcons"));
41
- const init_1 = require("../../../init");
42
- const MessageReceiptStatus_1 = __importDefault(require("./MessageReceiptStatus"));
43
- const MessageUndo_1 = __importDefault(require("../../../pages/message/components/MessageUndo"));
44
- const { width: screenWidth } = react_native_1.Dimensions.get('window');
12
+ import Icon from 'react-native-vector-icons/MaterialIcons';
13
+ import { getImManager } from '../../../init';
14
+ import MessageReceiptStatus from './MessageReceiptStatus';
15
+ import MessageUndo from "../../../pages/message/components/MessageUndo";
16
+ const { width: screenWidth } = Dimensions.get('window');
45
17
  const MessageItem = ({ isMultiple, multipleSelect, conversation, message, mine, showTimeLine, onPressPopover, onLongPressPopover, onLayoutItem, }) => {
46
- const theme = (0, rn_ui_1.useTheme)();
47
- const { t } = (0, useTranslation_1.default)();
48
- const time = (0, useFormatMsgTime_1.default)(message.messageTime);
49
- const isNotify = (0, im_base_1.isNotifyMessage)(message.payloadType);
50
- const isB2C = (conversation === null || conversation === void 0 ? void 0 : conversation.type) === im_base_1.ConversationType.B2C;
51
- const isC2C = (conversation === null || conversation === void 0 ? void 0 : conversation.type) === im_base_1.ConversationType.C2C;
18
+ const theme = useTheme();
19
+ const { t } = useTranslation();
20
+ const time = useFormatMsgTime(message.messageTime);
21
+ const isNotify = isNotifyMessage(message.payloadType);
22
+ const isB2C = (conversation === null || conversation === void 0 ? void 0 : conversation.type) === ConversationType.B2C;
23
+ const isC2C = (conversation === null || conversation === void 0 ? void 0 : conversation.type) === ConversationType.C2C;
52
24
  const isMultipleChecked = !!(multipleSelect === null || multipleSelect === void 0 ? void 0 : multipleSelect[message.messageSeq]);
53
- const notArrow = [im_base_1.PayloadType.PICTURE, im_base_1.PayloadType.VIDEO].includes(message.payloadType);
54
- const isUndo = message.messageStatus === im_base_1.MessageStatus.UNDO || message.payloadType === im_base_1.PayloadType.CONVERSATION_MESSAGE_UNDO;
25
+ const notArrow = [PayloadType.PICTURE, PayloadType.VIDEO].includes(message.payloadType);
26
+ const isUndo = message.messageStatus === MessageStatus.UNDO || message.payloadType === PayloadType.CONVERSATION_MESSAGE_UNDO;
55
27
  const isMessagePayload = !isB2C && !isNotify && !isUndo;
56
- return (<react_native_1.View style={styles.root} onLayout={(e) => {
28
+ return (<View style={styles.root} onLayout={(e) => {
57
29
  onLayoutItem(message, e);
58
30
  }}>
59
- {showTimeLine && <react_native_1.Text style={styles.time}>{time}</react_native_1.Text>}
60
- {isB2C && <BusiNotifyCard_1.default payload={message.payload}/>}
61
- {isNotify && <PayloadNotify_1.default {...message}/>}
62
- {isUndo && <MessageUndo_1.default messageSeq={message.messageSeq} text={mine ? t('youWithdrawMsg') : `"${message.messageFromName}" ${t('withdrawMsg')}`} undoText={message.payload.text} haveBackgroundImage={false} edit={mine && message.payloadType === 'text'}/>}
31
+ {showTimeLine && <Text style={styles.time}>{time}</Text>}
32
+ {isB2C && <BusiNotifyCard payload={message.payload}/>}
33
+ {isNotify && <PayloadNotify {...message}/>}
34
+ {isUndo && <MessageUndo messageSeq={message.messageSeq} text={mine ? t('youWithdrawMsg') : `"${message.messageFromName}" ${t('withdrawMsg')}`} undoText={message.payload.text} haveBackgroundImage={false} edit={mine && message.payloadType === 'text'}/>}
63
35
  {isMessagePayload && (<>
64
- {isMultiple && (<react_native_1.TouchableWithoutFeedback onPress={() => {
65
- (0, init_1.getImManager)().store.dispatch(im_base_1.MessagePanelActions.onMultipleSelect(message.messageSeq));
36
+ {isMultiple && message.payloadType !== 'voice' && (<TouchableWithoutFeedback onPress={() => {
37
+ getImManager().store.dispatch(MessagePanelActions.onMultipleSelect(message.messageSeq));
66
38
  }}>
67
- <react_native_1.View style={styles.multipleWrap}/>
68
- </react_native_1.TouchableWithoutFeedback>)}
69
- <react_native_1.View style={[
39
+ <View style={styles.multipleWrap}/>
40
+ </TouchableWithoutFeedback>)}
41
+ <View style={[
70
42
  styles.bubble,
71
43
  {
72
44
  flexDirection: mine ? 'row-reverse' : 'row',
73
45
  justifyContent: 'flex-start',
74
46
  },
75
47
  ]}>
76
- {mine && isMultiple && (<rn_ui_1.Checkbox checked={isMultipleChecked} style={[styles.multipleCheckbox]}/>)}
77
- <ChatAvatar_1.default name={message.messageFromName} id={message.messageFrom} size={(0, rn_ui_1.dp)(40)}/>
78
- <react_native_1.View style={[
48
+ {mine && isMultiple && message.payloadType !== 'voice' && (<Checkbox checked={isMultipleChecked} style={[styles.multipleCheckbox]}/>)}
49
+ <ChatAvatar name={message.messageFromName} id={message.messageFrom} size={dp(40)}/>
50
+ <View style={[
79
51
  {
80
52
  alignContent: 'flex-end',
81
53
  alignItems: mine ? 'flex-end' : 'flex-start',
82
- paddingHorizontal: [im_base_1.PayloadType.PICTURE, im_base_1.PayloadType.VIDEO].includes(message.payloadType)
83
- ? (0, rn_ui_1.dp)(10)
54
+ paddingHorizontal: [PayloadType.PICTURE, PayloadType.VIDEO].includes(message.payloadType)
55
+ ? dp(10)
84
56
  : 0,
85
57
  },
86
58
  ]}>
87
- {!mine && message.conversationType !== im_base_1.ConversationType.C2C && (<react_native_1.Text style={[styles.name, {
88
- marginLeft: notArrow ? 0 : (0, rn_ui_1.dp)(10),
89
- }]}>{message.messageFromName}</react_native_1.Text>)}
90
- <react_native_1.View>
91
- <MessagePayload_1.default style={[
59
+ {!mine && message.conversationType !== ConversationType.C2C && (<Text style={[styles.name, {
60
+ marginLeft: notArrow ? 0 : dp(10),
61
+ marginBottom: dp(5),
62
+ }]}>{message.messageFromName}</Text>)}
63
+ <View>
64
+ <MessagePayload style={[
92
65
  styles.payload,
93
66
  {
94
67
  justifyContent: mine ? 'flex-end' : 'flex-start',
@@ -98,28 +71,28 @@ const MessageItem = ({ isMultiple, multipleSelect, conversation, message, mine,
98
71
  e.stopPropagation();
99
72
  e.preventDefault();
100
73
  onPressPopover(message, e.nativeEvent);
101
- }} onLongPress={e => {
74
+ }} onLongPress={(e, layout) => {
102
75
  e.stopPropagation();
103
76
  e.preventDefault();
104
- onLongPressPopover(message, e.nativeEvent);
77
+ onLongPressPopover(message, e.nativeEvent, layout);
105
78
  }}/>
106
- {isC2C && mine && <MessageReceiptStatus_1.default {...message}/>}
107
- </react_native_1.View>
108
- </react_native_1.View>
109
- {message.messageStatus === im_base_1.MessageStatus.EMIT_ERROR && (<react_native_1.Text style={{ alignSelf: 'center' }}>
110
- <MaterialIcons_1.default name="info" size={(0, rn_ui_1.dp)(20)} color={theme.errorColor}/>
111
- </react_native_1.Text>)}
112
- {mine && message.messageStatus === im_base_1.MessageStatus.EMITTING && (<react_native_1.ActivityIndicator size="small" color={'#666'} animating={true}/>)}
113
- {!mine && isMultiple && (<rn_ui_1.Checkbox checked={isMultipleChecked} style={[styles.multipleCheckbox, styles.multipleCheckboxRight]}/>)}
114
- </react_native_1.View>
79
+ {isC2C && mine && <MessageReceiptStatus {...message}/>}
80
+ </View>
81
+ </View>
82
+ {message.messageStatus === MessageStatus.EMIT_ERROR && (<Text style={{ alignSelf: 'center' }}>
83
+ <Icon name="info" size={dp(20)} color={theme.errorColor}/>
84
+ </Text>)}
85
+ {mine && message.messageStatus === MessageStatus.EMITTING && (<ActivityIndicator size="small" color={'#666'} animating={true}/>)}
86
+ {!mine && isMultiple && message.payloadType !== 'voice' && (<Checkbox checked={isMultipleChecked} style={[styles.multipleCheckbox, styles.multipleCheckboxRight]}/>)}
87
+ </View>
115
88
  </>)}
116
- {message.messageStatus === im_base_1.MessageStatus.EMIT_ERROR && (<>
117
- <react_native_1.View style={{ height: (0, rn_ui_1.dp)(10) }}/>
118
- <react_native_1.View style={styles.errorInfo}>
119
- <react_native_1.Text style={styles.errorInfoText}>{t('sendMsgFail')}</react_native_1.Text>
120
- <react_native_1.TouchableOpacity activeOpacity={0.5} onPress={() => {
89
+ {message.messageStatus === MessageStatus.EMIT_ERROR && (<>
90
+ <View style={{ height: dp(10) }}/>
91
+ <View style={styles.errorInfo}>
92
+ <Text style={styles.errorInfoText}>{t('sendMsgFail')}</Text>
93
+ <TouchableOpacity activeOpacity={0.5} onPress={() => {
121
94
  var _a;
122
- const imManager = (0, init_1.getImManager)();
95
+ const imManager = getImManager();
123
96
  imManager.resendMessage(conversation, message).then(() => { });
124
97
  console.log('resendMessage');
125
98
  ((_a = imManager.flatListRef) === null || _a === void 0 ? void 0 : _a.current).scrollToOffset({
@@ -127,60 +100,60 @@ const MessageItem = ({ isMultiple, multipleSelect, conversation, message, mine,
127
100
  offset: 0,
128
101
  });
129
102
  }}>
130
- <react_native_1.Text style={styles.errorInfoSend}>{t('resendMsg')}</react_native_1.Text>
131
- </react_native_1.TouchableOpacity>
132
- </react_native_1.View>
103
+ <Text style={styles.errorInfoSend}>{t('resendMsg')}</Text>
104
+ </TouchableOpacity>
105
+ </View>
133
106
  </>)}
134
- </react_native_1.View>);
107
+ </View>);
135
108
  };
136
- const styles = react_native_1.StyleSheet.create({
109
+ const styles = StyleSheet.create({
137
110
  root: {
138
- marginTop: (0, rn_ui_1.dp)(10),
139
- paddingHorizontal: (0, rn_ui_1.dp)(10),
111
+ marginTop: dp(10),
112
+ paddingHorizontal: dp(10),
140
113
  position: 'relative',
141
114
  },
142
115
  time: {
143
- fontSize: (0, rn_ui_1.dp)(12),
116
+ fontSize: dp(12),
144
117
  textAlign: 'center',
145
118
  },
146
119
  bubble: {
147
- paddingTop: (0, rn_ui_1.dp)(10),
120
+ paddingTop: dp(10),
148
121
  zIndex: 1,
149
122
  position: 'relative',
150
123
  },
151
124
  multipleCheckbox: {
152
- marginTop: (0, rn_ui_1.dp)(10),
125
+ marginTop: dp(10),
153
126
  },
154
127
  multipleCheckboxRight: {
155
- marginTop: (0, rn_ui_1.dp)(10),
128
+ marginTop: dp(10),
156
129
  position: 'absolute',
157
130
  right: 0,
158
- top: (0, rn_ui_1.dp)(20),
131
+ top: dp(20),
159
132
  },
160
133
  name: {
161
- fontSize: (0, rn_ui_1.dp)(12),
134
+ fontSize: dp(12),
162
135
  },
163
136
  notify: {},
164
137
  payload: {
165
- maxWidth: screenWidth - (0, rn_ui_1.dp)(110),
138
+ maxWidth: screenWidth - dp(110),
166
139
  minHeight: 20,
167
- marginHorizontal: (0, rn_ui_1.dp)(10),
168
- borderRadius: (0, rn_ui_1.dp)(5),
140
+ marginHorizontal: dp(10),
141
+ borderRadius: dp(5),
169
142
  shadowColor: 'rgba(0, 0, 0, 0.2)',
170
143
  shadowOffset: {
171
144
  width: 0,
172
- height: (0, rn_ui_1.dp)(2),
145
+ height: dp(2),
173
146
  },
174
- shadowRadius: (0, rn_ui_1.dp)(3),
147
+ shadowRadius: dp(3),
175
148
  shadowOpacity: 1,
176
149
  elevation: 6,
177
150
  position: 'relative',
178
151
  },
179
152
  plain: {
180
153
  color: '#000',
181
- fontSize: (0, rn_ui_1.dp)(14),
182
- paddingHorizontal: (0, rn_ui_1.dp)(12),
183
- paddingVertical: (0, rn_ui_1.dp)(10),
154
+ fontSize: dp(14),
155
+ paddingHorizontal: dp(12),
156
+ paddingVertical: dp(10),
184
157
  },
185
158
  errorInfo: {
186
159
  flexDirection: 'row',
@@ -188,13 +161,13 @@ const styles = react_native_1.StyleSheet.create({
188
161
  },
189
162
  errorInfoText: {
190
163
  color: '#808080',
191
- fontSize: (0, rn_ui_1.dp)(13),
164
+ fontSize: dp(13),
192
165
  },
193
166
  errorInfoSend: {
194
167
  paddingHorizontal: 5,
195
168
  color: '#208aff',
196
169
  textDecorationLine: 'underline',
197
- fontSize: (0, rn_ui_1.dp)(13),
170
+ fontSize: dp(13),
198
171
  },
199
172
  multipleWrap: {
200
173
  position: 'absolute',
@@ -203,4 +176,4 @@ const styles = react_native_1.StyleSheet.create({
203
176
  zIndex: 99,
204
177
  },
205
178
  });
206
- exports.default = (0, react_1.memo)(MessageItem);
179
+ export default memo(MessageItem);