@cometchat/chat-uikit-react-native 5.1.1 → 5.2.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.
Files changed (227) hide show
  1. package/android/.gradle/7.4/checksums/checksums.lock +0 -0
  2. package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  3. package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts +40 -0
  4. package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js +467 -0
  5. package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js.map +1 -0
  6. package/lib/CometChatAIAssistantChatHistory/Skeleton.d.ts +24 -0
  7. package/lib/CometChatAIAssistantChatHistory/Skeleton.js +130 -0
  8. package/lib/CometChatAIAssistantChatHistory/Skeleton.js.map +1 -0
  9. package/lib/CometChatAIAssistantChatHistory/index.d.ts +1 -0
  10. package/lib/CometChatAIAssistantChatHistory/index.js +2 -0
  11. package/lib/CometChatAIAssistantChatHistory/index.js.map +1 -0
  12. package/lib/CometChatAIAssistantChatHistory/style.d.ts +30 -0
  13. package/lib/CometChatAIAssistantChatHistory/style.js +122 -0
  14. package/lib/CometChatAIAssistantChatHistory/style.js.map +1 -0
  15. package/lib/CometChatConversations/CometChatConversations.js +26 -5
  16. package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
  17. package/lib/CometChatMessageComposer/CometChatMessageComposer.d.ts +7 -0
  18. package/lib/CometChatMessageComposer/CometChatMessageComposer.js +101 -13
  19. package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
  20. package/lib/CometChatMessageHeader/CometChatMessageHeader.d.ts +16 -0
  21. package/lib/CometChatMessageHeader/CometChatMessageHeader.js +63 -13
  22. package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
  23. package/lib/CometChatMessageList/CometChatMessageList.d.ts +33 -0
  24. package/lib/CometChatMessageList/CometChatMessageList.js +535 -76
  25. package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
  26. package/lib/CometChatMessageList/style.js +74 -2
  27. package/lib/CometChatMessageList/style.js.map +1 -1
  28. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +6 -12
  29. package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
  30. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +4 -3
  31. package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
  32. package/lib/extensions/Polls/Polls.js +38 -17
  33. package/lib/extensions/Polls/Polls.js.map +1 -1
  34. package/lib/index.d.ts +5 -1
  35. package/lib/index.js +6 -2
  36. package/lib/index.js.map +1 -1
  37. package/lib/shared/constants/UIKitConstants.d.ts +16 -0
  38. package/lib/shared/constants/UIKitConstants.js +16 -0
  39. package/lib/shared/constants/UIKitConstants.js.map +1 -1
  40. package/lib/shared/events/CometChatMessageEvents/index.d.ts +3 -0
  41. package/lib/shared/events/CometChatMessageEvents/index.js +3 -0
  42. package/lib/shared/events/CometChatMessageEvents/index.js.map +1 -1
  43. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +3 -0
  44. package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
  45. package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +3 -1
  46. package/lib/shared/events/CometChatUIEventHandler/Listener.js +4 -1
  47. package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
  48. package/lib/shared/events/ListenerInitializer.d.ts +3 -1
  49. package/lib/shared/events/ListenerInitializer.js +5 -1
  50. package/lib/shared/events/ListenerInitializer.js.map +1 -1
  51. package/lib/shared/events/messages.d.ts +2 -1
  52. package/lib/shared/events/messages.js +1 -0
  53. package/lib/shared/events/messages.js.map +1 -1
  54. package/lib/shared/framework/DataSource.d.ts +3 -1
  55. package/lib/shared/framework/DataSourceDecorator.d.ts +3 -1
  56. package/lib/shared/framework/DataSourceDecorator.js +8 -2
  57. package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
  58. package/lib/shared/framework/MessageDataSource.d.ts +6 -0
  59. package/lib/shared/framework/MessageDataSource.js +64 -1
  60. package/lib/shared/framework/MessageDataSource.js.map +1 -1
  61. package/lib/shared/icons/components/ai-chat-history.d.ts +8 -0
  62. package/lib/shared/icons/components/ai-chat-history.js +9 -0
  63. package/lib/shared/icons/components/ai-chat-history.js.map +1 -0
  64. package/lib/shared/icons/components/ai-copy-option.d.ts +8 -0
  65. package/lib/shared/icons/components/ai-copy-option.js +9 -0
  66. package/lib/shared/icons/components/ai-copy-option.js.map +1 -0
  67. package/lib/shared/icons/components/ai-new-chat.d.ts +8 -0
  68. package/lib/shared/icons/components/ai-new-chat.js +9 -0
  69. package/lib/shared/icons/components/ai-new-chat.js.map +1 -0
  70. package/lib/shared/icons/components/ai-send-button.d.ts +8 -0
  71. package/lib/shared/icons/components/ai-send-button.js +9 -0
  72. package/lib/shared/icons/components/ai-send-button.js.map +1 -0
  73. package/lib/shared/icons/components/right-arrow.d.ts +3 -0
  74. package/lib/shared/icons/components/right-arrow.js +6 -0
  75. package/lib/shared/icons/components/right-arrow.js.map +1 -0
  76. package/lib/shared/icons/components/stop-fill.js +8 -7
  77. package/lib/shared/icons/components/stop-fill.js.map +1 -1
  78. package/lib/shared/icons/icon-mapping.d.ts +11 -0
  79. package/lib/shared/icons/icon-mapping.js +11 -0
  80. package/lib/shared/icons/icon-mapping.js.map +1 -1
  81. package/lib/shared/modals/CometChatAIAssistantTools.d.ts +47 -0
  82. package/lib/shared/modals/CometChatAIAssistantTools.js +44 -0
  83. package/lib/shared/modals/CometChatAIAssistantTools.js.map +1 -0
  84. package/lib/shared/modals/StreamMessage.d.ts +4 -0
  85. package/lib/shared/modals/StreamMessage.js +11 -0
  86. package/lib/shared/modals/StreamMessage.js.map +1 -0
  87. package/lib/shared/modals/index.d.ts +3 -1
  88. package/lib/shared/modals/index.js +3 -1
  89. package/lib/shared/modals/index.js.map +1 -1
  90. package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.d.ts +126 -0
  91. package/lib/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
  92. package/lib/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
  93. package/lib/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
  94. package/lib/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
  95. package/lib/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -1
  96. package/lib/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
  97. package/lib/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
  98. package/lib/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
  99. package/lib/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
  100. package/lib/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
  101. package/lib/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
  102. package/lib/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
  103. package/lib/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
  104. package/lib/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
  105. package/lib/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
  106. package/lib/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
  107. package/lib/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
  108. package/lib/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
  109. package/lib/shared/services/stream-message.service.d.ts +84 -0
  110. package/lib/shared/services/stream-message.service.js +406 -0
  111. package/lib/shared/services/stream-message.service.js.map +1 -0
  112. package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.d.ts +9 -0
  113. package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js +248 -0
  114. package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js.map +1 -0
  115. package/lib/shared/views/CometChatAIAssistantMessageBubble/index.d.ts +3 -0
  116. package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js +4 -0
  117. package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js.map +1 -0
  118. package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js +5 -2
  119. package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
  120. package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js +1 -1
  121. package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js.map +1 -1
  122. package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js +52 -32
  123. package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js.map +1 -1
  124. package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.d.ts +10 -0
  125. package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js +54 -0
  126. package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js.map +1 -0
  127. package/lib/shared/views/CometChatSendButtonView/index.d.ts +1 -0
  128. package/lib/shared/views/CometChatSendButtonView/index.js +2 -0
  129. package/lib/shared/views/CometChatSendButtonView/index.js.map +1 -0
  130. package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.d.ts +8 -0
  131. package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js +436 -0
  132. package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js.map +1 -0
  133. package/lib/shared/views/CometChatStreamMessageBubble/index.d.ts +3 -0
  134. package/lib/shared/views/CometChatStreamMessageBubble/index.js +3 -0
  135. package/lib/shared/views/CometChatStreamMessageBubble/index.js.map +1 -0
  136. package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.d.ts +14 -6
  137. package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js +82 -57
  138. package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js.map +1 -1
  139. package/lib/theme/context.d.ts +96 -15
  140. package/lib/theme/type.d.ts +14 -1
  141. package/package.json +6 -3
  142. package/src/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.tsx +627 -0
  143. package/src/CometChatAIAssistantChatHistory/Skeleton.tsx +228 -0
  144. package/src/CometChatAIAssistantChatHistory/index.ts +2 -0
  145. package/src/CometChatAIAssistantChatHistory/style.ts +160 -0
  146. package/src/CometChatConversations/CometChatConversations.tsx +36 -10
  147. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +137 -19
  148. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +106 -18
  149. package/src/CometChatMessageList/CometChatMessageList.tsx +721 -116
  150. package/src/CometChatMessageList/style.ts +74 -2
  151. package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +13 -29
  152. package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +8 -5
  153. package/src/extensions/Polls/Polls.tsx +50 -22
  154. package/src/index.ts +31 -1
  155. package/src/shared/constants/UIKitConstants.ts +17 -0
  156. package/src/shared/events/CometChatMessageEvents/index.ts +3 -1
  157. package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +3 -0
  158. package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -0
  159. package/src/shared/events/ListenerInitializer.ts +6 -1
  160. package/src/shared/events/messages.ts +1 -0
  161. package/src/shared/framework/DataSource.ts +4 -2
  162. package/src/shared/framework/DataSourceDecorator.tsx +10 -2
  163. package/src/shared/framework/MessageDataSource.tsx +75 -2
  164. package/src/shared/icons/Icon.tsx +1 -1
  165. package/src/shared/icons/components/ai-chat-history.tsx +21 -0
  166. package/src/shared/icons/components/ai-copy-option.tsx +21 -0
  167. package/src/shared/icons/components/ai-new-chat.tsx +21 -0
  168. package/src/shared/icons/components/ai-send-button.tsx +24 -0
  169. package/src/shared/icons/components/right-arrow.tsx +13 -0
  170. package/src/shared/icons/components/stop-fill.tsx +14 -12
  171. package/src/shared/icons/icon-mapping.tsx +14 -0
  172. package/src/shared/modals/CometChatAIAssistantTools.ts +65 -0
  173. package/src/shared/modals/StreamMessage.ts +12 -0
  174. package/src/shared/modals/index.ts +5 -1
  175. package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
  176. package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
  177. package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
  178. package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
  179. package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -2
  180. package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
  181. package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
  182. package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
  183. package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
  184. package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
  185. package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
  186. package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
  187. package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
  188. package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
  189. package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
  190. package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
  191. package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
  192. package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
  193. package/src/shared/services/stream-message.service.ts +470 -0
  194. package/src/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.tsx +262 -0
  195. package/src/shared/views/CometChatAIAssistantMessageBubble/index.ts +4 -0
  196. package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +5 -1
  197. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +1 -0
  198. package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +57 -45
  199. package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +86 -0
  200. package/src/shared/views/CometChatSendButtonView/index.ts +1 -0
  201. package/src/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.tsx +493 -0
  202. package/src/shared/views/CometChatStreamMessageBubble/index.ts +9 -0
  203. package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +121 -74
  204. package/src/theme/type.ts +14 -1
  205. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +0 -79
  206. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js +0 -152
  207. package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js.map +0 -1
  208. package/lib/shared/resources/CometChatLocalize/index.d.ts +0 -2
  209. package/lib/shared/resources/CometChatLocalize/index.js +0 -3
  210. package/lib/shared/resources/CometChatLocalize/index.js.map +0 -1
  211. package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -447
  212. package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +0 -447
  213. package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +0 -447
  214. package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +0 -447
  215. package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +0 -446
  216. package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +0 -447
  217. package/lib/shared/resources/CometChatLocalize/resources/hu/translation.json +0 -447
  218. package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +0 -447
  219. package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +0 -447
  220. package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +0 -447
  221. package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +0 -447
  222. package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +0 -447
  223. package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +0 -447
  224. package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +0 -446
  225. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.d.ts +0 -29
  226. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +0 -29
  227. package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js.map +0 -1
@@ -1,12 +1,13 @@
1
- import React, { useLayoutEffect, useState, useEffect } from "react";
1
+ import React, { useLayoutEffect, useState, useRef, useCallback } from "react";
2
2
  import {
3
- Platform,
4
3
  StyleProp,
5
4
  Text,
6
5
  TextStyle,
7
6
  View,
8
7
  ViewStyle,
9
8
  TouchableOpacity,
9
+ LayoutChangeEvent,
10
+ TextLayoutEvent,
10
11
  } from "react-native";
11
12
  import {
12
13
  CometChatMentionsFormatter,
@@ -14,24 +15,28 @@ import {
14
15
  CometChatUrlsFormatter,
15
16
  } from "../../formatters";
16
17
  import { useCometChatTranslation } from "../../resources/CometChatLocalizeNew";
18
+ import { t } from "../../resources/CometChatLocalizeNew/LocalizationManager";
17
19
 
18
20
  export interface CometChatTextBubbleInterface {
19
- /**
20
- * Text to be shown
21
- */
21
+ /*** text to be shown */
22
22
  text?: string;
23
23
  textStyle?: StyleProp<TextStyle>;
24
- /**
25
- * Text container style
26
- */
24
+ /** text container style */
27
25
  textContainerStyle?: StyleProp<ViewStyle>;
28
26
  textFormatters?: Array<
29
27
  CometChatMentionsFormatter | CometChatUrlsFormatter | CometChatTextFormatter
30
28
  >;
29
+ /** number of lines to collapse to (default 4) */
30
+ collapseLines?: number;
31
+ /** style for the toggle container */
32
+ toggleContainerStyle?: StyleProp<ViewStyle>;
33
+ /** style for the toggle text */
34
+ toggleTextStyle?: StyleProp<TextStyle>;
31
35
  }
32
36
 
33
37
  export const CometChatTextBubble = (props: CometChatTextBubbleInterface) => {
34
38
  const { textContainerStyle } = props;
39
+
35
40
  return (
36
41
  <View style={textContainerStyle}>
37
42
  <CometChatTextBubbleText {...props} />
@@ -39,20 +44,39 @@ export const CometChatTextBubble = (props: CometChatTextBubbleInterface) => {
39
44
  );
40
45
  };
41
46
 
47
+ /**
48
+ * CometChatTextBubbleText
49
+ *
50
+ * - measure by actual container width (onLayout) so both iOS and Android measure correctly
51
+ * - robust measurement cache keyed by text+width so we don't re-measure unnecessarily
52
+ */
42
53
  export const CometChatTextBubbleText = (
43
54
  props: Omit<CometChatTextBubbleInterface, "textContainerStyle">
44
55
  ) => {
45
- const {t}= useCometChatTranslation()
46
- const { text = "", textFormatters, textStyle } = props;
47
- const [formattedText, setFormattedText] = useState<string>("");
48
- // This flag will be set if the text exceeds 4 lines in collapsed mode.
49
- const [isTruncated, setIsTruncated] = useState<boolean>(false);
50
- const [expanded, setExpanded] = useState<boolean>(false);
51
- // States to store measured heights for iOS fallback.
52
- const [fullHeight, setFullHeight] = useState<number>(0);
53
- const [collapsedHeight, setCollapsedHeight] = useState<number>(0);
54
-
55
- // Format text if any formatters are provided.
56
+ const { t } = useCometChatTranslation();
57
+ const {
58
+ text = "",
59
+ textFormatters,
60
+ textStyle,
61
+ collapseLines = 4,
62
+ toggleContainerStyle,
63
+ toggleTextStyle,
64
+ } = props;
65
+
66
+ const [formattedText, setFormattedText] = useState<string>(text);
67
+ const [isExpanded, setIsExpanded] = useState(false);
68
+ const [isTruncatable, setIsTruncatable] = useState(false);
69
+
70
+ // store container width for accurate measurement
71
+ const [containerWidth, setContainerWidth] = useState<number | null>(null);
72
+
73
+ /**
74
+ * measuredCache helps avoid re-measuring if the same text+width was already measured.
75
+ * Structure: { key: string } where key = `${text}::${width}`
76
+ */
77
+ const measuredCacheRef = useRef<Record<string, boolean>>({});
78
+
79
+ // Only recompute formattedText when the text or textFormatters actually change.
56
80
  useLayoutEffect(() => {
57
81
  let finalText = text;
58
82
  if (textFormatters && textFormatters.length) {
@@ -60,78 +84,101 @@ export const CometChatTextBubbleText = (
60
84
  finalText = textFormatters[i].getFormattedText(finalText);
61
85
  }
62
86
  }
63
- setFormattedText(finalText);
64
- // Don't reset the truncated flag when text is the same, only when text actually changes
65
- // This preserves the expanded state when messages are updated for reactions, etc.
66
- }, [text, textFormatters]);
67
-
68
- // For Android, onTextLayout reliably provides the number of lines.
69
- const handleTextLayout = (event: any) => {
70
- const { lines } = event.nativeEvent;
71
- if (lines.length > 4) {
72
- // Only set to true, never reset to false when a message is updated
73
- // This preserves the truncated state when the message is updated (e.g., reactions added)
74
- setIsTruncated(true);
87
+
88
+ // If text content actually changed, update formattedText and reset expansion.
89
+ // Do NOT reset on other prop changes (so adding reaction won't collapse/lose toggle).
90
+ if (finalText !== formattedText) {
91
+ setFormattedText(finalText as string);
92
+ setIsExpanded(false);
93
+ // measurement cache can stay, but remove entries for previous text (optional)
94
+ // measuredCacheRef.current = {}; // not required, we'll rely on keying by text+width
75
95
  }
76
- // We no longer set isTruncated to false here to preserve state during updates
77
- };
96
+ // eslint-disable-next-line react-hooks/exhaustive-deps
97
+ }, [
98
+ text /* only textFormatters intentionally omitted from deps if stable; if not stable include it */,
99
+ ]);
78
100
 
79
- // onLayout callback for the collapsed text (iOS)
80
- const handleCollapsedLayout = (event: any) => {
81
- setCollapsedHeight(event.nativeEvent.layout.height);
82
- };
101
+ // handler to capture container width whenever layout changes
102
+ const onContainerLayout = useCallback(
103
+ (e: LayoutChangeEvent) => {
104
+ const w = Math.round(e.nativeEvent.layout.width);
105
+ if (w && w !== containerWidth) {
106
+ setContainerWidth(w);
107
+ // Do NOT clear isExpanded here — measurement may change truncation but we want to
108
+ // preserve user's expanded/collapsed state unless the text itself changed.
109
+ }
110
+ },
111
+ [containerWidth]
112
+ );
113
+
114
+ // Called when hidden text is laid out; use it to determine lines count
115
+ const onMeasuredTextLayout = (e: TextLayoutEvent) => {
116
+ // We rely on containerWidth + formattedText as the measurement key
117
+ const key = `${formattedText}::${containerWidth ?? 0}`;
83
118
 
84
- // onLayout callback for the hidden full text (iOS)
85
- const handleFullTextLayout = (event: any) => {
86
- setFullHeight(event.nativeEvent.layout.height);
119
+ // If we've already measured this text at this width, skip
120
+ if (measuredCacheRef.current[key]) return;
121
+
122
+ const lines = e.nativeEvent.lines;
123
+ const isNowTruncatable = !!(lines && lines.length > collapseLines);
124
+
125
+ setIsTruncatable(isNowTruncatable);
126
+ measuredCacheRef.current[key] = isNowTruncatable;
87
127
  };
88
128
 
89
- // For iOS, when not expanded, compare the hidden full height with the collapsed text height.
90
- useEffect(() => {
91
- if (Platform.OS === "ios" && !expanded && fullHeight && collapsedHeight) {
92
- setIsTruncated(fullHeight > collapsedHeight);
93
- }
94
- // Do not update isTruncated when expanded is true so that the toggle remains.
95
- }, [fullHeight, collapsedHeight, expanded]);
129
+ const toggle = () => setIsExpanded((v) => !v);
130
+
131
+ /**
132
+ * Hidden measurement `Text`:
133
+ * - we render it only when we have containerWidth (so it can measure correctly)
134
+ * - style uses same font metrics as visible text because it inherits textStyle
135
+ * - opacity: 0 and position absolute so it does not affect layout
136
+ *
137
+ * Important: We key the hidden Text by formattedText + containerWidth so React remounts
138
+ * it and triggers onTextLayout when either changes.
139
+ */
140
+ const hiddenTextKey = `${formattedText}::${containerWidth ?? 0}`;
96
141
 
97
142
  return (
98
- <View>
143
+ <View onLayout={onContainerLayout}>
144
+ {/* Hidden measurement text: only meaningful after we know container width */}
145
+ {containerWidth ? (
146
+ <Text
147
+ key={hiddenTextKey}
148
+ // make sure the hidden text has same width as container
149
+ style={[
150
+ // width must be exact to get consistent wrapping on both platforms
151
+ { position: "absolute", left: 0, top: -10000, width: containerWidth, opacity: 0 },
152
+ textStyle as any,
153
+ ]}
154
+ onTextLayout={onMeasuredTextLayout}
155
+ accessible={false}
156
+ importantForAccessibility='no-hide-descendants'
157
+ >
158
+ {formattedText}
159
+ </Text>
160
+ ) : null}
161
+
162
+ {/* Visible text */}
99
163
  <Text
100
- // Use text content in the key to ensure it only re-renders when text changes
101
- key={`${expanded ? "expanded" : "collapsed"}-${text}`}
102
164
  style={textStyle}
103
- // Android uses onTextLayout for measuring lines.
104
- onTextLayout={Platform.OS !== "ios" ? handleTextLayout : undefined}
105
- // iOS: only measure collapsed height when not expanded.
106
- onLayout={Platform.OS === "ios" && !expanded ? handleCollapsedLayout : undefined}
107
- numberOfLines={expanded ? undefined : 4}
108
- ellipsizeMode="tail"
165
+ numberOfLines={isExpanded ? undefined : collapseLines}
166
+ ellipsizeMode='tail'
109
167
  >
110
168
  {formattedText}
111
169
  </Text>
112
170
 
113
- {/* Hidden full text for iOS measurement */}
114
- {Platform.OS === "ios" && (
115
- <Text
116
- style={[textStyle, { position: "absolute", opacity: 0, zIndex: -1 }]}
117
- onLayout={handleFullTextLayout}
118
- >
119
- {formattedText}
120
- </Text>
121
- )}
122
-
123
- {/* Only show the toggle if the text was truncated in collapsed mode */}
124
- {isTruncated && (
125
- <View style={{ alignItems: "flex-end", marginTop: 8 }}>
126
- <TouchableOpacity onPress={() => setExpanded(!expanded)}>
127
- <Text style={textStyle}>
128
- {expanded ? t("SHOW_LESS") : t("READ_MORE")}
171
+ {/* Toggle (only when truncation is needed) */}
172
+ {isTruncatable ? (
173
+ <View style={[{ alignItems: "flex-end", marginTop: 6 }, toggleContainerStyle]}>
174
+ <TouchableOpacity onPress={toggle} accessibilityRole='button'>
175
+ <Text style={[{ alignSelf: "flex-end" }, textStyle, toggleTextStyle]}>
176
+ {isExpanded ? t("SHOW_LESS") : t("READ_MORE")}
129
177
  </Text>
130
178
  </TouchableOpacity>
131
179
  </View>
132
- )}
180
+ ) : null}
133
181
  </View>
134
182
  );
135
183
  };
136
-
137
184
  export default CometChatTextBubble;
package/src/theme/type.ts CHANGED
@@ -22,6 +22,7 @@ import { CallLogsItemStyle, CallLogsStyle } from "../calls/CometChatCallLogs/sty
22
22
  import { DeepPartial } from "../shared/helper/types";
23
23
  import { DateSeparatorStyle } from "../shared/views/CometChatDateSeperator/styles";
24
24
  import { JSX } from "react";
25
+ import { ChatHistoryStyle } from "../CometChatAIAssistantChatHistory/style";
25
26
 
26
27
  export type BubbleStyles = {
27
28
  containerStyle: ViewStyle;
@@ -33,6 +34,7 @@ export type BubbleStyles = {
33
34
  dateReceiptContainerStyle: ViewStyle;
34
35
  senderNameTextStyles: TextStyle;
35
36
  textBubbleStyles?: DeepPartial<CometChatTheme["textBubbleStyles"]>;
37
+ assistantBubbleStyles?: DeepPartial<CometChatTheme["assistantBubbleStyles"]>;
36
38
  imageBubbleStyles?: DeepPartial<CometChatTheme["imageBubbleStyles"]>;
37
39
  videoBubbleStyles?: DeepPartial<CometChatTheme["videoBubbleStyles"]>;
38
40
  audioBubbleStyles?: DeepPartial<CometChatTheme["audioBubbleStyles"]>;
@@ -93,6 +95,7 @@ export interface CometChatTheme {
93
95
  deletedBubbleStyles?: DeletedBubbleStyle;
94
96
  messageComposerStyles: DeepPartial<MessageComposerStyle>;
95
97
  userStyles: UserStyle;
98
+ chatHistoryStyles: ChatHistoryStyle;
96
99
  groupStyles: GroupStyle;
97
100
  groupMemberStyle: GroupMemberStyle;
98
101
  //messageOptionsStyles: ActionSheetStyle;
@@ -347,6 +350,16 @@ export interface CometChatTheme {
347
350
  translatedTextContainerStyle: ViewStyle;
348
351
  translatedTextDividerStyle: ViewStyle;
349
352
  };
353
+ assistantBubbleStyles?: {
354
+ containerStyle: ViewStyle;
355
+ avatarStyle: CometChatTheme["avatarStyle"];
356
+ textStyle: TextStyle;
357
+ textContainerStyle?: ViewStyle;
358
+ placeholderTextStyle: TextStyle;
359
+ copyButtonStyle: ViewStyle;
360
+ errorContainerStyle: ViewStyle;
361
+ errorTextStyle: TextStyle;
362
+ };
350
363
  stickerBubbleStyles?: {
351
364
  containerStyle?: ViewStyle;
352
365
  threadedMessageStyle?: CometChatTheme["threadedMessageStyles"];
@@ -425,7 +438,7 @@ export interface CometChatTheme {
425
438
  };
426
439
  dateSeparatorStyle?: DateSeparatorStyle;
427
440
  incomingMessageBubbleStyles: DeepPartial<BubbleStyles>;
428
- outgoingMessageBubbleStyles: DeepPartial<BubbleStyles>;
441
+ outgoingMessageBubbleStyles: DeepPartial<Omit<BubbleStyles, 'assistantBubbleStyles'>>;
429
442
  groupActionBubbleStyles: DeepPartial<CometChatTheme["groupActionBubbleStyles"]>;
430
443
  callActionBubbleStyles: DeepPartial<CallActionBubbleStyles>;
431
444
  messageInformationStyles: DeepPartial<CometChatTheme["messageInformationStyles"]>;
@@ -1,79 +0,0 @@
1
- /**
2
- * Type for Translation objects, each language contains key-value pairs
3
- */
4
- type Translation = {
5
- [key: string]: string;
6
- };
7
- /**
8
- * Type for translations mapping language code to Translation
9
- */
10
- type Translations = {
11
- [languageCode: string]: Translation;
12
- };
13
- declare class CometChatLocalize {
14
- /**Properties and constants */
15
- static fallbackLanguage: string;
16
- static locale: string;
17
- static rtlLanguages: string[];
18
- static direction: Readonly<{
19
- ltr: "ltr";
20
- rtl: "rtl";
21
- }>;
22
- /** The translations object now has a more explicit type */
23
- static translations: Translations;
24
- /**
25
- * Needs to be called at the start of the application in order to set the language
26
- * @param {Object} - language & resources
27
- */
28
- static init: ({ language, resources, }: {
29
- language?: string | undefined;
30
- resources?: Translations | undefined;
31
- }) => void;
32
- /**
33
- * Returns the native language
34
- * @returns {String} native language i.e. en-US
35
- */
36
- static getNativeLanguage: () => string;
37
- /**
38
- * Returns the language code
39
- * @returns {String} language code i.e. en
40
- */
41
- static getLanguageCode: () => string;
42
- /**
43
- * Returns the active language. Return fallback language if translation is not available for the active language
44
- * @returns {String} active language
45
- */
46
- static getLocale: () => string;
47
- /**
48
- * Set the active language
49
- * @param {String} language
50
- */
51
- static setLocale: (language: string) => void;
52
- /**
53
- * Accepts the string to localize and return the localized string
54
- * @param {String} str
55
- * @returns {String} localized str
56
- */
57
- static localize: (str: string) => string;
58
- /**
59
- * Sets the default language if no language is passed in init method
60
- */
61
- static setDefaultLanguage: () => void;
62
- /**
63
- * Returns true if the active language is rtl otherwise return false
64
- * @returns {Boolean} whether the language is rtl or not
65
- */
66
- static isRTL: () => boolean;
67
- /**
68
- * Returns rtl or ltr based on the active language
69
- * @returns {String} the direction of the active language
70
- */
71
- static getDir: () => string;
72
- }
73
- /**
74
- * Returns localized string based on active language
75
- * @param {String} str
76
- * @returns {String} localized str
77
- */
78
- declare const localize: (str: string) => string;
79
- export { CometChatLocalize, localize };
@@ -1,152 +0,0 @@
1
- import { NativeModules, Platform } from "react-native";
2
- import translationAR from "./resources/ar/translation.json";
3
- import translationDE from "./resources/de/translation.json";
4
- import translationEN from "./resources/en/translation.json";
5
- import translationES from "./resources/es/translation.json";
6
- import translationFR from "./resources/fr/translation.json";
7
- import translationHI from "./resources/hi/translation.json";
8
- import translationHU from "./resources/hu/translation.json";
9
- import translationLT from "./resources/lt/translation.json";
10
- import translationMS from "./resources/ms/translation.json";
11
- import translationPT from "./resources/pt/translation.json";
12
- import translationRU from "./resources/ru/translation.json";
13
- import translationSV from "./resources/sv/translation.json";
14
- import translationZHTW from "./resources/zh-tw/translation.json";
15
- import translationZH from "./resources/zh/translation.json";
16
- class CometChatLocalize {
17
- /**Properties and constants */
18
- static fallbackLanguage = "en";
19
- static locale;
20
- static rtlLanguages = ["ar"];
21
- static direction = Object.freeze({
22
- ltr: "ltr",
23
- rtl: "rtl",
24
- });
25
- /** The translations object now has a more explicit type */
26
- static translations = {
27
- ar: translationAR,
28
- de: translationDE,
29
- en: translationEN,
30
- es: translationES,
31
- fr: translationFR,
32
- hi: translationHI,
33
- ms: translationMS,
34
- pt: translationPT,
35
- ru: translationRU,
36
- zh: translationZH,
37
- "zh-tw": translationZHTW,
38
- sv: translationSV,
39
- lt: translationLT,
40
- hu: translationHU,
41
- };
42
- /**
43
- * Needs to be called at the start of the application in order to set the language
44
- * @param {Object} - language & resources
45
- */
46
- static init = ({ language, resources, }) => {
47
- if (language) {
48
- this.locale = language;
49
- }
50
- else {
51
- this.setDefaultLanguage();
52
- }
53
- /**Override resources */
54
- if (resources) {
55
- for (const resource in resources) {
56
- /**Add to the original array of translations if language code is not found */
57
- if (!this.translations[resource]) {
58
- this.translations[resource] = resources[resource];
59
- }
60
- else {
61
- for (const key in resources[resource]) {
62
- this.translations[resource][key] = resources[resource][key];
63
- }
64
- }
65
- }
66
- }
67
- };
68
- /**
69
- * Returns the native language
70
- * @returns {String} native language i.e. en-US
71
- */
72
- static getNativeLanguage = () => {
73
- return Platform.OS === "ios"
74
- ? NativeModules.SettingsManager.settings.AppleLocale ||
75
- NativeModules.SettingsManager.settings.AppleLanguages[0] //iOS 13
76
- : NativeModules.I18nManager.localeIdentifier.replace("_", "-");
77
- };
78
- /**
79
- * Returns the language code
80
- * @returns {String} language code i.e. en
81
- */
82
- static getLanguageCode = () => {
83
- const languageCode = this.getNativeLanguage().toLowerCase();
84
- // check if the language set in the native has hyphen(-), if yes split and take the first element of the array
85
- if (languageCode.indexOf("-") !== -1 && languageCode !== "zh-tw") {
86
- return languageCode.split("-")[0];
87
- }
88
- return languageCode;
89
- };
90
- /**
91
- * Returns the active language. Return fallback language if translation is not available for the active language
92
- * @returns {String} active language
93
- */
94
- static getLocale = () => {
95
- let language = this.locale;
96
- if (!Object.prototype.hasOwnProperty.call(this.translations, language)) {
97
- language = this.fallbackLanguage;
98
- }
99
- return language;
100
- };
101
- /**
102
- * Set the active language
103
- * @param {String} language
104
- */
105
- static setLocale = (language) => {
106
- this.locale = language;
107
- };
108
- /**
109
- * Accepts the string to localize and return the localized string
110
- * @param {String} str
111
- * @returns {String} localized str
112
- */
113
- static localize = (str) => {
114
- const language = this.getLocale();
115
- return this.translations[language]?.[str] ?? str; // Fallback to the key if translation is not found
116
- };
117
- /**
118
- * Sets the default language if no language is passed in init method
119
- */
120
- static setDefaultLanguage = () => {
121
- // get the active language
122
- const activeLanguage = this.getLocale();
123
- // get the native language code
124
- const nativeLanguageCode = this.getLanguageCode();
125
- // if there is no active language or active language is different from native language, update active language with native language
126
- if (!activeLanguage || activeLanguage !== nativeLanguageCode) {
127
- this.setLocale(nativeLanguageCode);
128
- }
129
- };
130
- /**
131
- * Returns true if the active language is rtl otherwise return false
132
- * @returns {Boolean} whether the language is rtl or not
133
- */
134
- static isRTL = () => {
135
- return this.rtlLanguages.includes(this.getLocale());
136
- };
137
- /**
138
- * Returns rtl or ltr based on the active language
139
- * @returns {String} the direction of the active language
140
- */
141
- static getDir = () => {
142
- return this.isRTL() ? this.direction.rtl : this.direction.ltr;
143
- };
144
- }
145
- /**
146
- * Returns localized string based on active language
147
- * @param {String} str
148
- * @returns {String} localized str
149
- */
150
- const localize = (str) => CometChatLocalize.localize(str);
151
- export { CometChatLocalize, localize };
152
- //# sourceMappingURL=CometChatLocalize.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CometChatLocalize.js","sourceRoot":"","sources":["../../../../src/shared/resources/CometChatLocalize/CometChatLocalize.ts"],"names":[],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import { CometChatLocalize, localize } from "./CometChatLocalize";
2
- export { CometChatLocalize, localize };
@@ -1,3 +0,0 @@
1
- import { CometChatLocalize, localize } from "./CometChatLocalize";
2
- export { CometChatLocalize, localize };
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared/resources/CometChatLocalize/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,CAAC"}