@cometchat/chat-uikit-react-native 5.1.2 → 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.
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.d.ts +40 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js +467 -0
- package/lib/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.d.ts +24 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.js +130 -0
- package/lib/CometChatAIAssistantChatHistory/Skeleton.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/index.d.ts +1 -0
- package/lib/CometChatAIAssistantChatHistory/index.js +2 -0
- package/lib/CometChatAIAssistantChatHistory/index.js.map +1 -0
- package/lib/CometChatAIAssistantChatHistory/style.d.ts +30 -0
- package/lib/CometChatAIAssistantChatHistory/style.js +122 -0
- package/lib/CometChatAIAssistantChatHistory/style.js.map +1 -0
- package/lib/CometChatConversations/CometChatConversations.js +26 -5
- package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.d.ts +7 -0
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +101 -13
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.d.ts +16 -0
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js +63 -13
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
- package/lib/CometChatMessageList/CometChatMessageList.d.ts +33 -0
- package/lib/CometChatMessageList/CometChatMessageList.js +535 -76
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/style.js +74 -2
- package/lib/CometChatMessageList/style.js.map +1 -1
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +6 -12
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +4 -3
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
- package/lib/extensions/Polls/Polls.js +38 -17
- package/lib/extensions/Polls/Polls.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +6 -2
- package/lib/index.js.map +1 -1
- package/lib/shared/constants/UIKitConstants.d.ts +16 -0
- package/lib/shared/constants/UIKitConstants.js +16 -0
- package/lib/shared/constants/UIKitConstants.js.map +1 -1
- package/lib/shared/events/CometChatMessageEvents/index.d.ts +3 -0
- package/lib/shared/events/CometChatMessageEvents/index.js +3 -0
- package/lib/shared/events/CometChatMessageEvents/index.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +3 -0
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +3 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.js +4 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/ListenerInitializer.d.ts +3 -1
- package/lib/shared/events/ListenerInitializer.js +5 -1
- package/lib/shared/events/ListenerInitializer.js.map +1 -1
- package/lib/shared/events/messages.d.ts +2 -1
- package/lib/shared/events/messages.js +1 -0
- package/lib/shared/events/messages.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +3 -1
- package/lib/shared/framework/DataSourceDecorator.d.ts +3 -1
- package/lib/shared/framework/DataSourceDecorator.js +8 -2
- package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +6 -0
- package/lib/shared/framework/MessageDataSource.js +64 -1
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/icons/components/ai-chat-history.d.ts +8 -0
- package/lib/shared/icons/components/ai-chat-history.js +9 -0
- package/lib/shared/icons/components/ai-chat-history.js.map +1 -0
- package/lib/shared/icons/components/ai-copy-option.d.ts +8 -0
- package/lib/shared/icons/components/ai-copy-option.js +9 -0
- package/lib/shared/icons/components/ai-copy-option.js.map +1 -0
- package/lib/shared/icons/components/ai-new-chat.d.ts +8 -0
- package/lib/shared/icons/components/ai-new-chat.js +9 -0
- package/lib/shared/icons/components/ai-new-chat.js.map +1 -0
- package/lib/shared/icons/components/ai-send-button.d.ts +8 -0
- package/lib/shared/icons/components/ai-send-button.js +9 -0
- package/lib/shared/icons/components/ai-send-button.js.map +1 -0
- package/lib/shared/icons/components/right-arrow.d.ts +3 -0
- package/lib/shared/icons/components/right-arrow.js +6 -0
- package/lib/shared/icons/components/right-arrow.js.map +1 -0
- package/lib/shared/icons/components/stop-fill.js +8 -7
- package/lib/shared/icons/components/stop-fill.js.map +1 -1
- package/lib/shared/icons/icon-mapping.d.ts +11 -0
- package/lib/shared/icons/icon-mapping.js +11 -0
- package/lib/shared/icons/icon-mapping.js.map +1 -1
- package/lib/shared/modals/CometChatAIAssistantTools.d.ts +47 -0
- package/lib/shared/modals/CometChatAIAssistantTools.js +44 -0
- package/lib/shared/modals/CometChatAIAssistantTools.js.map +1 -0
- package/lib/shared/modals/StreamMessage.d.ts +4 -0
- package/lib/shared/modals/StreamMessage.js +11 -0
- package/lib/shared/modals/StreamMessage.js.map +1 -0
- package/lib/shared/modals/index.d.ts +3 -1
- package/lib/shared/modals/index.js +3 -1
- package/lib/shared/modals/index.js.map +1 -1
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.d.ts +126 -0
- package/lib/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
- package/lib/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
- package/lib/shared/services/stream-message.service.d.ts +84 -0
- package/lib/shared/services/stream-message.service.js +406 -0
- package/lib/shared/services/stream-message.service.js.map +1 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.d.ts +9 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js +248 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.js.map +1 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.d.ts +3 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js +4 -0
- package/lib/shared/views/CometChatAIAssistantMessageBubble/index.js.map +1 -0
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js +5 -2
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js.map +1 -1
- package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js +52 -32
- package/lib/shared/views/CometChatImageViewerModal/ImageViewerModal.js.map +1 -1
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.d.ts +10 -0
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js +54 -0
- package/lib/shared/views/CometChatSendButtonView/CometChatSendButtonView.js.map +1 -0
- package/lib/shared/views/CometChatSendButtonView/index.d.ts +1 -0
- package/lib/shared/views/CometChatSendButtonView/index.js +2 -0
- package/lib/shared/views/CometChatSendButtonView/index.js.map +1 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.d.ts +8 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js +436 -0
- package/lib/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.js.map +1 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.d.ts +3 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.js +3 -0
- package/lib/shared/views/CometChatStreamMessageBubble/index.js.map +1 -0
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.d.ts +14 -6
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js +82 -57
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js.map +1 -1
- package/lib/theme/context.d.ts +96 -15
- package/lib/theme/type.d.ts +14 -1
- package/package.json +5 -2
- package/src/CometChatAIAssistantChatHistory/CometChatAIAssistantChatHistory.tsx +627 -0
- package/src/CometChatAIAssistantChatHistory/Skeleton.tsx +228 -0
- package/src/CometChatAIAssistantChatHistory/index.ts +2 -0
- package/src/CometChatAIAssistantChatHistory/style.ts +160 -0
- package/src/CometChatConversations/CometChatConversations.tsx +36 -10
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +137 -19
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +106 -18
- package/src/CometChatMessageList/CometChatMessageList.tsx +619 -72
- package/src/CometChatMessageList/style.ts +74 -2
- package/src/index.ts +31 -1
- package/src/shared/constants/UIKitConstants.ts +17 -0
- package/src/shared/events/CometChatMessageEvents/index.ts +3 -1
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +3 -0
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -0
- package/src/shared/events/ListenerInitializer.ts +6 -1
- package/src/shared/events/messages.ts +1 -0
- package/src/shared/framework/DataSource.ts +4 -2
- package/src/shared/framework/DataSourceDecorator.tsx +10 -2
- package/src/shared/framework/MessageDataSource.tsx +75 -2
- package/src/shared/icons/Icon.tsx +1 -1
- package/src/shared/icons/components/ai-chat-history.tsx +21 -0
- package/src/shared/icons/components/ai-copy-option.tsx +21 -0
- package/src/shared/icons/components/ai-new-chat.tsx +21 -0
- package/src/shared/icons/components/ai-send-button.tsx +24 -0
- package/src/shared/icons/components/right-arrow.tsx +13 -0
- package/src/shared/icons/components/stop-fill.tsx +14 -12
- package/src/shared/icons/icon-mapping.tsx +14 -0
- package/src/shared/modals/CometChatAIAssistantTools.ts +65 -0
- package/src/shared/modals/StreamMessage.ts +12 -0
- package/src/shared/modals/index.ts +5 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +7 -2
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +7 -1
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +7 -1
- package/src/shared/services/stream-message.service.ts +470 -0
- package/src/shared/views/CometChatAIAssistantMessageBubble/CometChatAIAssistantMessageBubble.tsx +262 -0
- package/src/shared/views/CometChatAIAssistantMessageBubble/index.ts +4 -0
- package/src/shared/views/CometChatSendButtonView/CometChatSendButtonView.tsx +86 -0
- package/src/shared/views/CometChatSendButtonView/index.ts +1 -0
- package/src/shared/views/CometChatStreamMessageBubble/CometChatStreamMessageBubble.tsx +493 -0
- package/src/shared/views/CometChatStreamMessageBubble/index.ts +9 -0
- package/src/theme/type.ts +14 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React, { useLayoutEffect, useState,
|
|
2
|
-
import {
|
|
1
|
+
import React, { useLayoutEffect, useState, useRef, useCallback } from "react";
|
|
2
|
+
import { Text, View, TouchableOpacity, } from "react-native";
|
|
3
3
|
import { useCometChatTranslation } from "../../resources/CometChatLocalizeNew";
|
|
4
4
|
export const CometChatTextBubble = (props) => {
|
|
5
5
|
const { textContainerStyle } = props;
|
|
@@ -7,17 +7,26 @@ export const CometChatTextBubble = (props) => {
|
|
|
7
7
|
<CometChatTextBubbleText {...props}/>
|
|
8
8
|
</View>);
|
|
9
9
|
};
|
|
10
|
+
/**
|
|
11
|
+
* CometChatTextBubbleText
|
|
12
|
+
*
|
|
13
|
+
* - measure by actual container width (onLayout) so both iOS and Android measure correctly
|
|
14
|
+
* - robust measurement cache keyed by text+width so we don't re-measure unnecessarily
|
|
15
|
+
*/
|
|
10
16
|
export const CometChatTextBubbleText = (props) => {
|
|
11
17
|
const { t } = useCometChatTranslation();
|
|
12
|
-
const { text = "", textFormatters, textStyle } = props;
|
|
13
|
-
const [formattedText, setFormattedText] = useState(
|
|
14
|
-
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
const { text = "", textFormatters, textStyle, collapseLines = 4, toggleContainerStyle, toggleTextStyle, } = props;
|
|
19
|
+
const [formattedText, setFormattedText] = useState(text);
|
|
20
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
21
|
+
const [isTruncatable, setIsTruncatable] = useState(false);
|
|
22
|
+
// store container width for accurate measurement
|
|
23
|
+
const [containerWidth, setContainerWidth] = useState(null);
|
|
24
|
+
/**
|
|
25
|
+
* measuredCache helps avoid re-measuring if the same text+width was already measured.
|
|
26
|
+
* Structure: { key: string } where key = `${text}::${width}`
|
|
27
|
+
*/
|
|
28
|
+
const measuredCacheRef = useRef({});
|
|
29
|
+
// Only recompute formattedText when the text or textFormatters actually change.
|
|
21
30
|
useLayoutEffect(() => {
|
|
22
31
|
let finalText = text;
|
|
23
32
|
if (textFormatters && textFormatters.length) {
|
|
@@ -25,59 +34,75 @@ export const CometChatTextBubbleText = (props) => {
|
|
|
25
34
|
finalText = textFormatters[i].getFormattedText(finalText);
|
|
26
35
|
}
|
|
27
36
|
}
|
|
28
|
-
|
|
29
|
-
//
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
if (lines.length > 4) {
|
|
36
|
-
// Only set to true, never reset to false when a message is updated
|
|
37
|
-
// This preserves the truncated state when the message is updated (e.g., reactions added)
|
|
38
|
-
setIsTruncated(true);
|
|
37
|
+
// If text content actually changed, update formattedText and reset expansion.
|
|
38
|
+
// Do NOT reset on other prop changes (so adding reaction won't collapse/lose toggle).
|
|
39
|
+
if (finalText !== formattedText) {
|
|
40
|
+
setFormattedText(finalText);
|
|
41
|
+
setIsExpanded(false);
|
|
42
|
+
// measurement cache can stay, but remove entries for previous text (optional)
|
|
43
|
+
// measuredCacheRef.current = {}; // not required, we'll rely on keying by text+width
|
|
39
44
|
}
|
|
40
|
-
//
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
useEffect(() => {
|
|
52
|
-
if (Platform.OS === "ios" && !expanded && fullHeight && collapsedHeight) {
|
|
53
|
-
setIsTruncated(fullHeight > collapsedHeight);
|
|
45
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
46
|
+
}, [
|
|
47
|
+
text /* only textFormatters intentionally omitted from deps if stable; if not stable include it */,
|
|
48
|
+
]);
|
|
49
|
+
// handler to capture container width whenever layout changes
|
|
50
|
+
const onContainerLayout = useCallback((e) => {
|
|
51
|
+
const w = Math.round(e.nativeEvent.layout.width);
|
|
52
|
+
if (w && w !== containerWidth) {
|
|
53
|
+
setContainerWidth(w);
|
|
54
|
+
// Do NOT clear isExpanded here — measurement may change truncation but we want to
|
|
55
|
+
// preserve user's expanded/collapsed state unless the text itself changed.
|
|
54
56
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
}, [containerWidth]);
|
|
58
|
+
// Called when hidden text is laid out; use it to determine lines count
|
|
59
|
+
const onMeasuredTextLayout = (e) => {
|
|
60
|
+
// We rely on containerWidth + formattedText as the measurement key
|
|
61
|
+
const key = `${formattedText}::${containerWidth ?? 0}`;
|
|
62
|
+
// If we've already measured this text at this width, skip
|
|
63
|
+
if (measuredCacheRef.current[key])
|
|
64
|
+
return;
|
|
65
|
+
const lines = e.nativeEvent.lines;
|
|
66
|
+
const isNowTruncatable = !!(lines && lines.length > collapseLines);
|
|
67
|
+
setIsTruncatable(isNowTruncatable);
|
|
68
|
+
measuredCacheRef.current[key] = isNowTruncatable;
|
|
69
|
+
};
|
|
70
|
+
const toggle = () => setIsExpanded((v) => !v);
|
|
71
|
+
/**
|
|
72
|
+
* Hidden measurement `Text`:
|
|
73
|
+
* - we render it only when we have containerWidth (so it can measure correctly)
|
|
74
|
+
* - style uses same font metrics as visible text because it inherits textStyle
|
|
75
|
+
* - opacity: 0 and position absolute so it does not affect layout
|
|
76
|
+
*
|
|
77
|
+
* Important: We key the hidden Text by formattedText + containerWidth so React remounts
|
|
78
|
+
* it and triggers onTextLayout when either changes.
|
|
79
|
+
*/
|
|
80
|
+
const hiddenTextKey = `${formattedText}::${containerWidth ?? 0}`;
|
|
81
|
+
return (<View onLayout={onContainerLayout}>
|
|
82
|
+
{/* Hidden measurement text: only meaningful after we know container width */}
|
|
83
|
+
{containerWidth ? (<Text key={hiddenTextKey}
|
|
84
|
+
// make sure the hidden text has same width as container
|
|
85
|
+
style={[
|
|
86
|
+
// width must be exact to get consistent wrapping on both platforms
|
|
87
|
+
{ position: "absolute", left: 0, top: -10000, width: containerWidth, opacity: 0 },
|
|
88
|
+
textStyle,
|
|
89
|
+
]} onTextLayout={onMeasuredTextLayout} accessible={false} importantForAccessibility='no-hide-descendants'>
|
|
90
|
+
{formattedText}
|
|
91
|
+
</Text>) : null}
|
|
92
|
+
|
|
93
|
+
{/* Visible text */}
|
|
94
|
+
<Text style={textStyle} numberOfLines={isExpanded ? undefined : collapseLines} ellipsizeMode='tail'>
|
|
65
95
|
{formattedText}
|
|
66
96
|
</Text>
|
|
67
97
|
|
|
68
|
-
{/*
|
|
69
|
-
{
|
|
70
|
-
{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
{/* Only show the toggle if the text was truncated in collapsed mode */}
|
|
74
|
-
{isTruncated && (<View style={{ alignItems: "flex-end", marginTop: 8 }}>
|
|
75
|
-
<TouchableOpacity onPress={() => setExpanded(!expanded)}>
|
|
76
|
-
<Text style={textStyle}>
|
|
77
|
-
{expanded ? t("SHOW_LESS") : t("READ_MORE")}
|
|
98
|
+
{/* Toggle (only when truncation is needed) */}
|
|
99
|
+
{isTruncatable ? (<View style={[{ alignItems: "flex-end", marginTop: 6 }, toggleContainerStyle]}>
|
|
100
|
+
<TouchableOpacity onPress={toggle} accessibilityRole='button'>
|
|
101
|
+
<Text style={[{ alignSelf: "flex-end" }, textStyle, toggleTextStyle]}>
|
|
102
|
+
{isExpanded ? t("SHOW_LESS") : t("READ_MORE")}
|
|
78
103
|
</Text>
|
|
79
104
|
</TouchableOpacity>
|
|
80
|
-
</View>)}
|
|
105
|
+
</View>) : null}
|
|
81
106
|
</View>);
|
|
82
107
|
};
|
|
83
108
|
export default CometChatTextBubble;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CometChatTextBubble.js","sourceRoot":"","sources":["../../../../src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"CometChatTextBubble.js","sourceRoot":"","sources":["../../../../src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC9E,OAAO,EAEL,IAAI,EAEJ,IAAI,EAEJ,gBAAgB,GAGjB,MAAM,cAAc,CAAC;AAMtB,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAoB/E,MAAM,CAAC,MAAM,mBAAmB,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AgB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,QAAQ,CAC3D;YAAA,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CACnE;cAAA,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAC/C;YAAA,EAAE,IAAI,CACR;UAAA,EAAE,gBAAgB,CACpB;QAAA,EAAE,IAAI,CAAC,CACR,CAAC,CAAC,CAAC,IAAI,CACV;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,mBAAmB,CAAC"}
|
package/lib/theme/context.d.ts
CHANGED
|
@@ -919,6 +919,31 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
919
919
|
containerBackgroundColor?: import("react-native").ColorValue;
|
|
920
920
|
} | undefined;
|
|
921
921
|
} | undefined;
|
|
922
|
+
chatHistoryStyles?: {
|
|
923
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
924
|
+
headerStyle?: import("react-native").ViewStyle | undefined;
|
|
925
|
+
headerContentStyle?: import("react-native").ViewStyle | undefined;
|
|
926
|
+
headerTitleStyle?: import("react-native").TextStyle | undefined;
|
|
927
|
+
closeButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
928
|
+
closeButtonTextStyle?: import("react-native").TextStyle | undefined;
|
|
929
|
+
newChatButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
930
|
+
newChatTextStyle?: import("react-native").TextStyle | undefined;
|
|
931
|
+
listContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
932
|
+
sectionHeaderStyle?: import("react-native").ViewStyle | undefined;
|
|
933
|
+
sectionHeaderTextStyle?: import("react-native").TextStyle | undefined;
|
|
934
|
+
messageItemStyle?: import("react-native").ViewStyle | undefined;
|
|
935
|
+
messageTextStyle?: import("react-native").TextStyle | undefined;
|
|
936
|
+
centerContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
937
|
+
stateTitleStyle?: import("react-native").TextStyle | undefined;
|
|
938
|
+
stateTextStyle?: import("react-native").TextStyle | undefined;
|
|
939
|
+
footerLoaderStyle?: import("react-native").ViewStyle | undefined;
|
|
940
|
+
skeletonStyle?: {
|
|
941
|
+
linearGradientColors?: [(string | undefined)?, (string | undefined)?] | undefined;
|
|
942
|
+
shimmerBackgroundColor?: import("react-native").ColorValue | undefined;
|
|
943
|
+
shimmerOpacity?: number | undefined;
|
|
944
|
+
speed?: number | undefined;
|
|
945
|
+
} | undefined;
|
|
946
|
+
} | undefined;
|
|
922
947
|
groupStyles?: {
|
|
923
948
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
924
949
|
onlineStatusColor?: import("react-native").ColorValue | undefined;
|
|
@@ -2594,6 +2619,20 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
2594
2619
|
translatedTextContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
2595
2620
|
translatedTextDividerStyle?: import("react-native").ViewStyle | undefined;
|
|
2596
2621
|
} | undefined;
|
|
2622
|
+
assistantBubbleStyles?: {
|
|
2623
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
2624
|
+
avatarStyle?: {
|
|
2625
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
2626
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
2627
|
+
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
2628
|
+
} | undefined;
|
|
2629
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
2630
|
+
textContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
2631
|
+
placeholderTextStyle?: import("react-native").TextStyle | undefined;
|
|
2632
|
+
copyButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
2633
|
+
errorContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
2634
|
+
errorTextStyle?: import("react-native").TextStyle | undefined;
|
|
2635
|
+
} | undefined;
|
|
2597
2636
|
imageBubbleStyles?: {
|
|
2598
2637
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
2599
2638
|
threadedMessageStyle?: {
|
|
@@ -3224,6 +3263,20 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
3224
3263
|
translatedTextContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
3225
3264
|
translatedTextDividerStyle?: import("react-native").ViewStyle | undefined;
|
|
3226
3265
|
} | undefined;
|
|
3266
|
+
assistantBubbleStyles?: {
|
|
3267
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
3268
|
+
avatarStyle?: {
|
|
3269
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
3270
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
3271
|
+
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
3272
|
+
} | undefined;
|
|
3273
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
3274
|
+
textContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
3275
|
+
placeholderTextStyle?: import("react-native").TextStyle | undefined;
|
|
3276
|
+
copyButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
3277
|
+
errorContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
3278
|
+
errorTextStyle?: import("react-native").TextStyle | undefined;
|
|
3279
|
+
} | undefined;
|
|
3227
3280
|
imageBubbleStyles?: {
|
|
3228
3281
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
3229
3282
|
threadedMessageStyle?: {
|
|
@@ -4059,6 +4112,20 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
4059
4112
|
translatedTextContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4060
4113
|
translatedTextDividerStyle?: import("react-native").ViewStyle | undefined;
|
|
4061
4114
|
} | undefined;
|
|
4115
|
+
assistantBubbleStyles?: {
|
|
4116
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4117
|
+
avatarStyle?: {
|
|
4118
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4119
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
4120
|
+
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
4121
|
+
} | undefined;
|
|
4122
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
4123
|
+
textContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4124
|
+
placeholderTextStyle?: import("react-native").TextStyle | undefined;
|
|
4125
|
+
copyButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
4126
|
+
errorContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4127
|
+
errorTextStyle?: import("react-native").TextStyle | undefined;
|
|
4128
|
+
} | undefined;
|
|
4062
4129
|
stickerBubbleStyles?: {
|
|
4063
4130
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4064
4131
|
threadedMessageStyle?: {
|
|
@@ -4399,6 +4466,20 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
4399
4466
|
translatedTextContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4400
4467
|
translatedTextDividerStyle?: import("react-native").ViewStyle | undefined;
|
|
4401
4468
|
} | undefined;
|
|
4469
|
+
assistantBubbleStyles?: {
|
|
4470
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4471
|
+
avatarStyle?: {
|
|
4472
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4473
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
4474
|
+
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
4475
|
+
} | undefined;
|
|
4476
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
4477
|
+
textContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4478
|
+
placeholderTextStyle?: import("react-native").TextStyle | undefined;
|
|
4479
|
+
copyButtonStyle?: import("react-native").ViewStyle | undefined;
|
|
4480
|
+
errorContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
4481
|
+
errorTextStyle?: import("react-native").TextStyle | undefined;
|
|
4482
|
+
} | undefined;
|
|
4402
4483
|
imageBubbleStyles?: {
|
|
4403
4484
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4404
4485
|
threadedMessageStyle?: {
|
|
@@ -4912,7 +4993,22 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
4912
4993
|
} | undefined;
|
|
4913
4994
|
} | undefined;
|
|
4914
4995
|
outgoingMessageBubbleStyles?: {
|
|
4996
|
+
avatarStyle?: {
|
|
4997
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4998
|
+
textStyle?: import("react-native").TextStyle | undefined;
|
|
4999
|
+
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
5000
|
+
} | undefined;
|
|
4915
5001
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
5002
|
+
meetCallBubbleStyles?: {
|
|
5003
|
+
titleStyle?: import("react-native").TextStyle | undefined;
|
|
5004
|
+
subtitleStyle?: import("react-native").TextStyle | undefined;
|
|
5005
|
+
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
5006
|
+
iconStyle?: import("react-native").ImageStyle | undefined;
|
|
5007
|
+
iconContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
5008
|
+
buttonStyle?: import("react-native").ViewStyle | undefined;
|
|
5009
|
+
buttonTextStyle?: import("react-native").TextStyle | undefined;
|
|
5010
|
+
dividerStyle?: import("react-native").ViewStyle | undefined;
|
|
5011
|
+
} | undefined;
|
|
4916
5012
|
threadedMessageStyles?: {
|
|
4917
5013
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4918
5014
|
indicatorTextStyle?: import("react-native").TextStyle | undefined;
|
|
@@ -4923,11 +5019,6 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
4923
5019
|
textStyle?: import("react-native").TextStyle | undefined;
|
|
4924
5020
|
} | undefined;
|
|
4925
5021
|
} | undefined;
|
|
4926
|
-
avatarStyle?: {
|
|
4927
|
-
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
4928
|
-
textStyle?: import("react-native").TextStyle | undefined;
|
|
4929
|
-
imageStyle?: import("react-native").ImageStyle | undefined;
|
|
4930
|
-
} | undefined;
|
|
4931
5022
|
receiptStyles?: {
|
|
4932
5023
|
waitIcon?: (import("react-native").ImageSourcePropType | import("react").JSX.Element) | undefined;
|
|
4933
5024
|
sentIcon?: (import("react-native").ImageSourcePropType | import("react").JSX.Element) | undefined;
|
|
@@ -5341,16 +5432,6 @@ export declare const CompThemeContext: import("react").Context<{
|
|
|
5341
5432
|
iconContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
5342
5433
|
dividerStyle?: import("react-native").ViewStyle | undefined;
|
|
5343
5434
|
} | undefined;
|
|
5344
|
-
meetCallBubbleStyles?: {
|
|
5345
|
-
titleStyle?: import("react-native").TextStyle | undefined;
|
|
5346
|
-
subtitleStyle?: import("react-native").TextStyle | undefined;
|
|
5347
|
-
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
5348
|
-
iconStyle?: import("react-native").ImageStyle | undefined;
|
|
5349
|
-
iconContainerStyle?: import("react-native").ViewStyle | undefined;
|
|
5350
|
-
buttonStyle?: import("react-native").ViewStyle | undefined;
|
|
5351
|
-
buttonTextStyle?: import("react-native").TextStyle | undefined;
|
|
5352
|
-
dividerStyle?: import("react-native").ViewStyle | undefined;
|
|
5353
|
-
} | undefined;
|
|
5354
5435
|
stickerBubbleStyles?: {
|
|
5355
5436
|
containerStyle?: import("react-native").ViewStyle | undefined;
|
|
5356
5437
|
threadedMessageStyle?: {
|
package/lib/theme/type.d.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
|
export type BubbleStyles = {
|
|
26
27
|
containerStyle: ViewStyle;
|
|
27
28
|
threadedMessageStyles: DeepPartial<CometChatTheme["threadedMessageStyles"]>;
|
|
@@ -32,6 +33,7 @@ export type BubbleStyles = {
|
|
|
32
33
|
dateReceiptContainerStyle: ViewStyle;
|
|
33
34
|
senderNameTextStyles: TextStyle;
|
|
34
35
|
textBubbleStyles?: DeepPartial<CometChatTheme["textBubbleStyles"]>;
|
|
36
|
+
assistantBubbleStyles?: DeepPartial<CometChatTheme["assistantBubbleStyles"]>;
|
|
35
37
|
imageBubbleStyles?: DeepPartial<CometChatTheme["imageBubbleStyles"]>;
|
|
36
38
|
videoBubbleStyles?: DeepPartial<CometChatTheme["videoBubbleStyles"]>;
|
|
37
39
|
audioBubbleStyles?: DeepPartial<CometChatTheme["audioBubbleStyles"]>;
|
|
@@ -75,6 +77,7 @@ export interface CometChatTheme {
|
|
|
75
77
|
deletedBubbleStyles?: DeletedBubbleStyle;
|
|
76
78
|
messageComposerStyles: DeepPartial<MessageComposerStyle>;
|
|
77
79
|
userStyles: UserStyle;
|
|
80
|
+
chatHistoryStyles: ChatHistoryStyle;
|
|
78
81
|
groupStyles: GroupStyle;
|
|
79
82
|
groupMemberStyle: GroupMemberStyle;
|
|
80
83
|
actionSheetStyle: ActionSheetStyle;
|
|
@@ -326,6 +329,16 @@ export interface CometChatTheme {
|
|
|
326
329
|
translatedTextContainerStyle: ViewStyle;
|
|
327
330
|
translatedTextDividerStyle: ViewStyle;
|
|
328
331
|
};
|
|
332
|
+
assistantBubbleStyles?: {
|
|
333
|
+
containerStyle: ViewStyle;
|
|
334
|
+
avatarStyle: CometChatTheme["avatarStyle"];
|
|
335
|
+
textStyle: TextStyle;
|
|
336
|
+
textContainerStyle?: ViewStyle;
|
|
337
|
+
placeholderTextStyle: TextStyle;
|
|
338
|
+
copyButtonStyle: ViewStyle;
|
|
339
|
+
errorContainerStyle: ViewStyle;
|
|
340
|
+
errorTextStyle: TextStyle;
|
|
341
|
+
};
|
|
329
342
|
stickerBubbleStyles?: {
|
|
330
343
|
containerStyle?: ViewStyle;
|
|
331
344
|
threadedMessageStyle?: CometChatTheme["threadedMessageStyles"];
|
|
@@ -404,7 +417,7 @@ export interface CometChatTheme {
|
|
|
404
417
|
};
|
|
405
418
|
dateSeparatorStyle?: DateSeparatorStyle;
|
|
406
419
|
incomingMessageBubbleStyles: DeepPartial<BubbleStyles>;
|
|
407
|
-
outgoingMessageBubbleStyles: DeepPartial<BubbleStyles
|
|
420
|
+
outgoingMessageBubbleStyles: DeepPartial<Omit<BubbleStyles, 'assistantBubbleStyles'>>;
|
|
408
421
|
groupActionBubbleStyles: DeepPartial<CometChatTheme["groupActionBubbleStyles"]>;
|
|
409
422
|
callActionBubbleStyles: DeepPartial<CallActionBubbleStyles>;
|
|
410
423
|
messageInformationStyles: DeepPartial<CometChatTheme["messageInformationStyles"]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react-native",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "Ready-to-use Chat UI Components for React Native",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"module": "src/index",
|
|
@@ -66,8 +66,11 @@
|
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"@types/prop-types": "^15.7.14",
|
|
69
|
+
"prop-types": "^15.8.1",
|
|
70
|
+
"react-native-markdown-display": "^7.0.2",
|
|
71
|
+
"rxjs": "^7.8.2",
|
|
69
72
|
"dayjs": "^1.11.18",
|
|
70
|
-
"
|
|
73
|
+
"react-native-localize": "^3.5.2"
|
|
71
74
|
},
|
|
72
75
|
"peerDependencies": {
|
|
73
76
|
"@cometchat/chat-sdk-react-native": "*",
|