@droppii-org/chat-mobile 0.2.3 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/components/ThreadCard/NamePrefixIcon.js +2 -3
- package/lib/module/components/ThreadCard/NamePrefixIcon.js.map +1 -1
- package/lib/module/config/feature-flags.js +38 -0
- package/lib/module/config/feature-flags.js.map +1 -0
- package/lib/module/hooks/query-keys.js +4 -0
- package/lib/module/hooks/query-keys.js.map +1 -1
- package/lib/module/hooks/useChatMessages.js +45 -0
- package/lib/module/hooks/useChatMessages.js.map +1 -1
- package/lib/module/hooks/useLinkPreview/useFetchUrlMetadata.js +17 -0
- package/lib/module/hooks/useLinkPreview/useFetchUrlMetadata.js.map +1 -0
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js +34 -0
- package/lib/module/hooks/useLinkPreview/useLinkPreview.js.map +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatComposer.js +24 -7
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +119 -19
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetailHeader.js +43 -20
- package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatLinkPreview.js +79 -0
- package/lib/module/screens/chat-detail/ChatLinkPreview.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatList.js +2 -0
- package/lib/module/screens/chat-detail/ChatList.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +352 -0
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatQuickActions.js +12 -2
- package/lib/module/screens/chat-detail/ChatQuickActions.js.map +1 -1
- package/lib/module/screens/chat-detail/conversationHeader.utils.js +31 -0
- package/lib/module/screens/chat-detail/conversationHeader.utils.js.map +1 -0
- package/lib/module/screens/chat-detail/index.js +1 -0
- package/lib/module/screens/chat-detail/index.js.map +1 -1
- package/lib/module/screens/chat-detail/legend/LegendChatDay.js +57 -0
- package/lib/module/screens/chat-detail/legend/LegendChatDay.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatLoadEarlier.js +21 -0
- package/lib/module/screens/chat-detail/legend/LegendChatLoadEarlier.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +47 -0
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatScrollToBottom.js +58 -0
- package/lib/module/screens/chat-detail/legend/LegendChatScrollToBottom.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/message-types.js +122 -0
- package/lib/module/screens/chat-detail/legend/message-types.js.map +1 -0
- package/lib/module/screens/chat-detail/messages/ChatMessageBubble.js.map +1 -1
- package/lib/module/services/apis.js +1 -1
- package/lib/module/services/apis.js.map +1 -1
- package/lib/module/services/endpoints.js +8 -0
- package/lib/module/services/endpoints.js.map +1 -0
- package/lib/module/types/common.js +2 -0
- package/lib/module/types/common.js.map +1 -0
- package/lib/module/utils/legendListMessage.js +80 -0
- package/lib/module/utils/legendListMessage.js.map +1 -0
- package/lib/module/utils/url.js +7 -0
- package/lib/module/utils/url.js.map +1 -0
- package/lib/typescript/src/components/Avatar/Avatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/AvatarBadge.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/AvatarBadge.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/DoubleAvatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/DoubleAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/Avatar/SingleAvatar.d.ts +1 -1
- package/lib/typescript/src/components/Avatar/SingleAvatar.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/AvatarSection.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/NamePrefixIcon.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/NamePrefixIcon.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/components/ThreadCard/UnreadBadge.d.ts +1 -1
- package/lib/typescript/src/components/ThreadCard/UnreadBadge.d.ts.map +1 -1
- package/lib/typescript/src/config/feature-flags.d.ts +12 -0
- package/lib/typescript/src/config/feature-flags.d.ts.map +1 -0
- package/lib/typescript/src/context/ChatContext.d.ts +1 -1
- package/lib/typescript/src/context/ChatContext.d.ts.map +1 -1
- package/lib/typescript/src/hooks/query-keys.d.ts +4 -0
- package/lib/typescript/src/hooks/query-keys.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useChatMessages.d.ts +3 -0
- package/lib/typescript/src/hooks/useChatMessages.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useLinkPreview/useFetchUrlMetadata.d.ts +3 -0
- package/lib/typescript/src/hooks/useLinkPreview/useFetchUrlMetadata.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts +7 -0
- package/lib/typescript/src/hooks/useLinkPreview/useLinkPreview.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatAttachmentPanel.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDay.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDay.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatLinkPreview.d.ts +9 -0
- package/lib/typescript/src/screens/chat-detail/ChatLinkPreview.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatList.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +3 -0
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatLoadEarlier.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatLoadEarlier.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatQuickActions.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatQuickActions.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatScrollToBottom.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatScrollToBottom.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatTextBubble.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/conversationHeader.utils.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/index.d.ts +2 -1
- package/lib/typescript/src/screens/chat-detail/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatLoadEarlier.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatLoadEarlier.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +15 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatScrollToBottom.d.ts +6 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatScrollToBottom.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts +12 -0
- package/lib/typescript/src/screens/chat-detail/legend/message-types.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts +1 -1
- package/lib/typescript/src/screens/chat-detail/messages/ChatMessageBubble.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/types.d.ts +34 -5
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts +1 -1
- package/lib/typescript/src/screens/inbox/Inbox.d.ts.map +1 -1
- package/lib/typescript/src/screens/inbox/MessagesTab.d.ts +1 -1
- package/lib/typescript/src/screens/inbox/MessagesTab.d.ts.map +1 -1
- package/lib/typescript/src/services/apis.d.ts +1 -0
- package/lib/typescript/src/services/apis.d.ts.map +1 -1
- package/lib/typescript/src/services/endpoints.d.ts +6 -0
- package/lib/typescript/src/services/endpoints.d.ts.map +1 -0
- package/lib/typescript/src/types/common.d.ts +6 -0
- package/lib/typescript/src/types/common.d.ts.map +1 -0
- package/lib/typescript/src/utils/legendListMessage.d.ts +25 -0
- package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -0
- package/lib/typescript/src/utils/url.d.ts +2 -0
- package/lib/typescript/src/utils/url.d.ts.map +1 -0
- package/package.json +4 -2
- package/src/components/ThreadCard/NamePrefixIcon.tsx +2 -3
- package/src/config/feature-flags.ts +49 -0
- package/src/hooks/query-keys.ts +5 -0
- package/src/hooks/useChatMessages.ts +60 -0
- package/src/hooks/useLinkPreview/useFetchUrlMetadata.ts +18 -0
- package/src/hooks/useLinkPreview/useLinkPreview.ts +30 -0
- package/src/index.tsx +1 -0
- package/src/screens/chat-detail/ChatComposer.tsx +30 -9
- package/src/screens/chat-detail/ChatDetail.tsx +163 -27
- package/src/screens/chat-detail/ChatDetailHeader.tsx +58 -26
- package/src/screens/chat-detail/ChatLinkPreview.tsx +86 -0
- package/src/screens/chat-detail/ChatList.tsx +3 -0
- package/src/screens/chat-detail/ChatListLegend.tsx +404 -0
- package/src/screens/chat-detail/ChatQuickActions.tsx +19 -2
- package/src/screens/chat-detail/conversationHeader.utils.ts +52 -0
- package/src/screens/chat-detail/index.ts +7 -0
- package/src/screens/chat-detail/legend/LegendChatDay.tsx +70 -0
- package/src/screens/chat-detail/legend/LegendChatLoadEarlier.tsx +21 -0
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +66 -0
- package/src/screens/chat-detail/legend/LegendChatScrollToBottom.tsx +56 -0
- package/src/screens/chat-detail/legend/message-types.tsx +149 -0
- package/src/screens/chat-detail/messages/ChatMessageBubble.tsx +0 -1
- package/src/screens/chat-detail/types.ts +47 -5
- package/src/services/apis.ts +1 -1
- package/src/services/endpoints.ts +5 -0
- package/src/types/common.ts +5 -0
- package/src/utils/legendListMessage.ts +102 -0
- package/src/utils/url.ts +5 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useCallback } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { KContainer, KColors, KLabel } from '@droppii/libs';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const LegendChatScrollToBottom = /*#__PURE__*/memo(({
|
|
8
|
+
listRef
|
|
9
|
+
}) => {
|
|
10
|
+
const handlePress = useCallback(() => {
|
|
11
|
+
listRef.current?.scrollToEnd({
|
|
12
|
+
animated: true
|
|
13
|
+
});
|
|
14
|
+
}, [listRef]);
|
|
15
|
+
return /*#__PURE__*/_jsx(KContainer.Touchable, {
|
|
16
|
+
onPress: handlePress,
|
|
17
|
+
style: styles.scrollToBottom,
|
|
18
|
+
activeOpacity: 0.7,
|
|
19
|
+
children: /*#__PURE__*/_jsx(KContainer.View, {
|
|
20
|
+
style: styles.scrollToBottomContent,
|
|
21
|
+
children: /*#__PURE__*/_jsx(KLabel.Text, {
|
|
22
|
+
style: styles.arrowDown,
|
|
23
|
+
children: "\u2193"
|
|
24
|
+
})
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
LegendChatScrollToBottom.displayName = 'LegendChatScrollToBottom';
|
|
29
|
+
const styles = StyleSheet.create({
|
|
30
|
+
scrollToBottom: {
|
|
31
|
+
position: 'absolute',
|
|
32
|
+
bottom: 20,
|
|
33
|
+
right: 16,
|
|
34
|
+
zIndex: 999
|
|
35
|
+
},
|
|
36
|
+
scrollToBottomContent: {
|
|
37
|
+
backgroundColor: KColors.white,
|
|
38
|
+
width: 32,
|
|
39
|
+
height: 32,
|
|
40
|
+
borderRadius: 16,
|
|
41
|
+
shadowColor: KColors.black,
|
|
42
|
+
shadowOffset: {
|
|
43
|
+
width: 0,
|
|
44
|
+
height: 1
|
|
45
|
+
},
|
|
46
|
+
shadowOpacity: 0.16,
|
|
47
|
+
shadowRadius: 8,
|
|
48
|
+
elevation: 8,
|
|
49
|
+
justifyContent: 'center',
|
|
50
|
+
alignItems: 'center'
|
|
51
|
+
},
|
|
52
|
+
arrowDown: {
|
|
53
|
+
fontSize: 16,
|
|
54
|
+
fontWeight: 'bold',
|
|
55
|
+
color: KColors.palette.primary.w400
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=LegendChatScrollToBottom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useCallback","StyleSheet","KContainer","KColors","KLabel","jsx","_jsx","LegendChatScrollToBottom","listRef","handlePress","current","scrollToEnd","animated","Touchable","onPress","style","styles","scrollToBottom","activeOpacity","children","View","scrollToBottomContent","Text","arrowDown","displayName","create","position","bottom","right","zIndex","backgroundColor","white","width","height","borderRadius","shadowColor","black","shadowOffset","shadowOpacity","shadowRadius","elevation","justifyContent","alignItems","fontSize","fontWeight","color","palette","primary","w400"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatScrollToBottom.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,WAAW,QAAQ,OAAO;AACzC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,OAAO,EAAEC,MAAM,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAM5D,OAAO,MAAMC,wBAAwB,gBAAGR,IAAI,CAC1C,CAAC;EAAES;AAAuC,CAAC,KAAK;EAC9C,MAAMC,WAAW,GAAGT,WAAW,CAAC,MAAM;IACpCQ,OAAO,CAACE,OAAO,EAAEC,WAAW,CAAC;MAAEC,QAAQ,EAAE;IAAK,CAAC,CAAC;EAClD,CAAC,EAAE,CAACJ,OAAO,CAAC,CAAC;EAEb,oBACEF,IAAA,CAACJ,UAAU,CAACW,SAAS;IACnBC,OAAO,EAAEL,WAAY;IACrBM,KAAK,EAAEC,MAAM,CAACC,cAAe;IAC7BC,aAAa,EAAE,GAAI;IAAAC,QAAA,eAEnBb,IAAA,CAACJ,UAAU,CAACkB,IAAI;MAACL,KAAK,EAAEC,MAAM,CAACK,qBAAsB;MAAAF,QAAA,eACnDb,IAAA,CAACF,MAAM,CAACkB,IAAI;QAACP,KAAK,EAAEC,MAAM,CAACO,SAAU;QAAAJ,QAAA,EAAC;MAAC,CAAa;IAAC,CACtC;EAAC,CACE,CAAC;AAE3B,CACF,CAAC;AAEDZ,wBAAwB,CAACiB,WAAW,GAAG,0BAA0B;AAEjE,MAAMR,MAAM,GAAGf,UAAU,CAACwB,MAAM,CAAC;EAC/BR,cAAc,EAAE;IACdS,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE;EACV,CAAC;EACDR,qBAAqB,EAAE;IACrBS,eAAe,EAAE3B,OAAO,CAAC4B,KAAK;IAC9BC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEhC,OAAO,CAACiC,KAAK;IAC1BC,YAAY,EAAE;MAAEL,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCK,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDnB,SAAS,EAAE;IACToB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,MAAM;IAClBC,KAAK,EAAE1C,OAAO,CAAC2C,OAAO,CAACC,OAAO,CAACC;EACjC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import { KContainer, KLabel, KSpacingValue } from '@droppii/libs';
|
|
6
|
+
import { getMessageText } from "../../../utils/legendListMessage.js";
|
|
7
|
+
import { CHAT_BUBBLE_COLORS } from "../constants.js";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
const formatMessageTime = createdAt => {
|
|
10
|
+
const date = new Date(createdAt);
|
|
11
|
+
if (Number.isNaN(date.getTime())) {
|
|
12
|
+
return '';
|
|
13
|
+
}
|
|
14
|
+
return date.toLocaleTimeString('vi-VN', {
|
|
15
|
+
hour: '2-digit',
|
|
16
|
+
minute: '2-digit',
|
|
17
|
+
hour12: false
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Text Message Component
|
|
22
|
+
export const LegendTextMessage = /*#__PURE__*/memo(({
|
|
23
|
+
message,
|
|
24
|
+
isOutgoing,
|
|
25
|
+
createdAtTime
|
|
26
|
+
}) => {
|
|
27
|
+
const messageText = getMessageText(message);
|
|
28
|
+
const timeLabel = formatMessageTime(createdAtTime);
|
|
29
|
+
if (!messageText?.trim()) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/_jsxs(KContainer.View, {
|
|
33
|
+
style: styles.wrapper,
|
|
34
|
+
children: [/*#__PURE__*/_jsx(KContainer.View, {
|
|
35
|
+
style: [styles.bubble, isOutgoing ? styles.bubbleSent : styles.bubbleReceived],
|
|
36
|
+
children: /*#__PURE__*/_jsx(KLabel.Text, {
|
|
37
|
+
typo: "TextMdNormal",
|
|
38
|
+
color: CHAT_BUBBLE_COLORS.text,
|
|
39
|
+
children: messageText
|
|
40
|
+
})
|
|
41
|
+
}), !isOutgoing && timeLabel ? /*#__PURE__*/_jsx(KLabel.Text, {
|
|
42
|
+
typo: "TextXsNormal",
|
|
43
|
+
color: CHAT_BUBBLE_COLORS.timestamp,
|
|
44
|
+
marginL: '0.25rem',
|
|
45
|
+
children: timeLabel
|
|
46
|
+
}) : null]
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
LegendTextMessage.displayName = 'LegendTextMessage';
|
|
50
|
+
|
|
51
|
+
// Image Message Component (placeholder)
|
|
52
|
+
export const LegendImageMessage = /*#__PURE__*/memo(({
|
|
53
|
+
isOutgoing
|
|
54
|
+
}) => {
|
|
55
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
56
|
+
style: styles.wrapper,
|
|
57
|
+
children: /*#__PURE__*/_jsx(KContainer.View, {
|
|
58
|
+
style: [styles.bubble, isOutgoing ? styles.bubbleSent : styles.bubbleReceived],
|
|
59
|
+
children: /*#__PURE__*/_jsx(KLabel.Text, {
|
|
60
|
+
typo: "TextSmNormal",
|
|
61
|
+
color: CHAT_BUBBLE_COLORS.text,
|
|
62
|
+
children: "[Image]"
|
|
63
|
+
})
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
LegendImageMessage.displayName = 'LegendImageMessage';
|
|
68
|
+
|
|
69
|
+
// Video Message Component (placeholder)
|
|
70
|
+
export const LegendVideoMessage = /*#__PURE__*/memo(({
|
|
71
|
+
isOutgoing
|
|
72
|
+
}) => {
|
|
73
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
74
|
+
style: styles.wrapper,
|
|
75
|
+
children: /*#__PURE__*/_jsx(KContainer.View, {
|
|
76
|
+
style: [styles.bubble, isOutgoing ? styles.bubbleSent : styles.bubbleReceived],
|
|
77
|
+
children: /*#__PURE__*/_jsx(KLabel.Text, {
|
|
78
|
+
typo: "TextSmNormal",
|
|
79
|
+
color: CHAT_BUBBLE_COLORS.text,
|
|
80
|
+
children: "[Video]"
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
LegendVideoMessage.displayName = 'LegendVideoMessage';
|
|
86
|
+
|
|
87
|
+
// File Message Component
|
|
88
|
+
export const LegendFileMessage = /*#__PURE__*/memo(({
|
|
89
|
+
message,
|
|
90
|
+
isOutgoing
|
|
91
|
+
}) => {
|
|
92
|
+
const fileName = message.fileElem?.fileName || message.content || '[File]';
|
|
93
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
94
|
+
style: styles.wrapper,
|
|
95
|
+
children: /*#__PURE__*/_jsx(KContainer.View, {
|
|
96
|
+
style: [styles.bubble, isOutgoing ? styles.bubbleSent : styles.bubbleReceived],
|
|
97
|
+
children: /*#__PURE__*/_jsxs(KLabel.Text, {
|
|
98
|
+
typo: "TextSmNormal",
|
|
99
|
+
color: CHAT_BUBBLE_COLORS.text,
|
|
100
|
+
children: ["\uD83D\uDCCE ", fileName]
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
});
|
|
105
|
+
LegendFileMessage.displayName = 'LegendFileMessage';
|
|
106
|
+
const styles = StyleSheet.create({
|
|
107
|
+
wrapper: {
|
|
108
|
+
maxWidth: '80%'
|
|
109
|
+
},
|
|
110
|
+
bubble: {
|
|
111
|
+
paddingHorizontal: KSpacingValue['0.75rem'],
|
|
112
|
+
paddingVertical: KSpacingValue['0.5rem'],
|
|
113
|
+
borderRadius: KSpacingValue['1.25rem']
|
|
114
|
+
},
|
|
115
|
+
bubbleReceived: {
|
|
116
|
+
backgroundColor: CHAT_BUBBLE_COLORS.received
|
|
117
|
+
},
|
|
118
|
+
bubbleSent: {
|
|
119
|
+
backgroundColor: CHAT_BUBBLE_COLORS.sent
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
//# sourceMappingURL=message-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","KContainer","KLabel","KSpacingValue","getMessageText","CHAT_BUBBLE_COLORS","jsx","_jsx","jsxs","_jsxs","formatMessageTime","createdAt","date","Date","Number","isNaN","getTime","toLocaleTimeString","hour","minute","hour12","LegendTextMessage","message","isOutgoing","createdAtTime","messageText","timeLabel","trim","View","style","styles","wrapper","children","bubble","bubbleSent","bubbleReceived","Text","typo","color","text","timestamp","marginL","displayName","LegendImageMessage","LegendVideoMessage","LegendFileMessage","fileName","fileElem","content","create","maxWidth","paddingHorizontal","paddingVertical","borderRadius","backgroundColor","received","sent"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/message-types.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,UAAU,EAAEC,MAAM,EAAEC,aAAa,QAAQ,eAAe;AAEjE,SAASC,cAAc,QAAQ,qCAAkC;AACjE,SAASC,kBAAkB,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQlD,MAAMC,iBAAiB,GAAIC,SAAiB,IAAK;EAC/C,MAAMC,IAAI,GAAG,IAAIC,IAA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","Text","ChatMessageBubble","message","position","Renderer","messageType","displayName"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/messages/ChatMessageBubble.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,gBAAgB,QAAQ,2BAAwB;AACzD,SAASC,cAAc,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGnD,MAAMC,mBAAmB,GAAGA,CAAA,MAEtB;EACJ,CAACJ,gBAAgB,CAACK,IAAI,GAAGJ;AAC3B,CAAC,CAAC;AAEF,OAAO,MAAMK,iBAAiB,gBAAGP,IAAI,CACnC,CAAC;EAAEQ,OAAO;EAAEC;AAAiC,CAAC,KAAK;EACjD,MAAMC,QAAQ,GAAGL,mBAAmB,CAAC,CAAC,CAACG,OAAO,CAACG,WAAW,CAAC;
|
|
1
|
+
{"version":3,"names":["memo","DChatMessageType","ChatTextBubble","jsx","_jsx","getMessageRenderers","Text","ChatMessageBubble","message","position","Renderer","messageType","displayName"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/messages/ChatMessageBubble.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,gBAAgB,QAAQ,2BAAwB;AACzD,SAASC,cAAc,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGnD,MAAMC,mBAAmB,GAAGA,CAAA,MAEtB;EACJ,CAACJ,gBAAgB,CAACK,IAAI,GAAGJ;AAC3B,CAAC,CAAC;AAEF,OAAO,MAAMK,iBAAiB,gBAAGP,IAAI,CACnC,CAAC;EAAEQ,OAAO;EAAEC;AAAiC,CAAC,KAAK;EACjD,MAAMC,QAAQ,GAAGL,mBAAmB,CAAC,CAAC,CAACG,OAAO,CAACG,WAAW,CAAC;EAC3D,IAAI,CAACD,QAAQ,EAAE;IACb,OAAO,IAAI;EACb;EAEA,oBAAON,IAAA,CAACM,QAAQ;IAACF,OAAO,EAAEA,OAAQ;IAACC,QAAQ,EAAEA;EAAS,CAAE,CAAC;AAC3D,CACF,CAAC;AAEDF,iBAAiB,CAACK,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import OpenIMSDK, { LoginStatus } from '@droppii/openim-rn-client-sdk';
|
|
4
4
|
import { Platform } from 'react-native';
|
|
5
5
|
import { useConversationStore } from "../store/index.js";
|
|
6
|
-
let apiInstance = null;
|
|
6
|
+
export let apiInstance = null;
|
|
7
7
|
export let ChatAPI;
|
|
8
8
|
(function (_ChatAPI) {
|
|
9
9
|
function initApiInstance(api) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["OpenIMSDK","LoginStatus","Platform","useConversationStore","apiInstance","ChatAPI","_ChatAPI","initApiInstance","api","getLoginStatus","operationID","Logged","login","instance","isLoggedIn","response","post","OS","toUpperCase","token","data","userID","id","logout","getState","reset","getUser","getSelfUserInfo","queryConversations","params","Error"],"sourceRoot":"../../../src","sources":["services/apis.ts"],"mappings":";;AAKA,OAAOA,SAAS,IAAIC,WAAW,QAAQ,+BAA+B;AAEtE,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,oBAAoB,QAAQ,mBAAU;AAE/C,IAAIC,WAAiC,GAAG,IAAI;AAAC,
|
|
1
|
+
{"version":3,"names":["OpenIMSDK","LoginStatus","Platform","useConversationStore","apiInstance","ChatAPI","_ChatAPI","initApiInstance","api","getLoginStatus","operationID","Logged","login","instance","isLoggedIn","response","post","OS","toUpperCase","token","data","userID","id","logout","getState","reset","getUser","getSelfUserInfo","queryConversations","params","Error"],"sourceRoot":"../../../src","sources":["services/apis.ts"],"mappings":";;AAKA,OAAOA,SAAS,IAAIC,WAAW,QAAQ,+BAA+B;AAEtE,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,oBAAoB,QAAQ,mBAAU;AAE/C,OAAO,IAAIC,WAAiC,GAAG,IAAI;AAAC,WAEnCC,OAAO;AAAA,WAAAC,QAAA;EACf,SAASC,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AAI0B,KAAK,CACb,+DACF,CAAC;IACH;IACA,MAAMf,QAAQ,GAAG,MAAMX,WAAW,CAACY,IAAI,CACrC,0CAA0C,EAC1Ca,MACF,CAAC;IACD,OAAOd,QAAQ,CAACK,IAAI;EACtB;EAACd,QAAA,CAAAsB,kBAAA,GAAAA,kBAAA;AAAA,GAhDcvB,OAAO,KAAPA,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ENDPOINTS","chatService","urlMetadata"],"sourceRoot":"../../../src","sources":["services/endpoints.ts"],"mappings":";;AAAA,OAAO,MAAMA,SAAS,GAAG;EACvBC,WAAW,EAAE;IACXC,WAAW,EAAE;EACf;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/common.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { MessageType } from '@droppii/openim-rn-client-sdk';
|
|
4
|
+
import { resolveChatMessageType } from "./resolveMessageType.js";
|
|
5
|
+
/**
|
|
6
|
+
* Extract message text based on content type
|
|
7
|
+
*/
|
|
8
|
+
export const getMessageText = message => {
|
|
9
|
+
switch (message.contentType) {
|
|
10
|
+
case MessageType.TextMessage:
|
|
11
|
+
return message.textElem?.content ?? message.content;
|
|
12
|
+
case MessageType.AtTextMessage:
|
|
13
|
+
return message.atTextElem?.text ?? message.content;
|
|
14
|
+
case MessageType.QuoteMessage:
|
|
15
|
+
return message.quoteElem?.text ?? message.content;
|
|
16
|
+
case MessageType.PictureMessage:
|
|
17
|
+
return '';
|
|
18
|
+
case MessageType.VoiceMessage:
|
|
19
|
+
return message.soundElem?.sourceUrl ? '' : '[Tin nhắn thoại]';
|
|
20
|
+
case MessageType.VideoMessage:
|
|
21
|
+
return message.videoElem?.videoUrl ? '' : '[Video]';
|
|
22
|
+
case MessageType.FileMessage:
|
|
23
|
+
return message.fileElem?.fileName ?? message.content;
|
|
24
|
+
case MessageType.CardMessage:
|
|
25
|
+
return message.cardElem?.nickname ?? message.content;
|
|
26
|
+
case MessageType.LocationMessage:
|
|
27
|
+
return message.locationElem?.description ?? message.content;
|
|
28
|
+
case MessageType.CustomMessage:
|
|
29
|
+
return message.customElem?.description ?? message.content;
|
|
30
|
+
case MessageType.FaceMessage:
|
|
31
|
+
return '[Sticker]';
|
|
32
|
+
default:
|
|
33
|
+
if (message.notificationElem?.detail) {
|
|
34
|
+
return message.notificationElem.detail;
|
|
35
|
+
}
|
|
36
|
+
return message.content || '';
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Precompute all message rendering data in single pass O(n)
|
|
41
|
+
* Eliminates redundant Date creation and type resolution during render
|
|
42
|
+
*
|
|
43
|
+
* Returns: Map of messageId -> {dayStart, messageType, createdAt}
|
|
44
|
+
*/
|
|
45
|
+
export const precomputeLegendListData = messages => {
|
|
46
|
+
const dataMap = new Map();
|
|
47
|
+
let lastDay = null;
|
|
48
|
+
messages.forEach((message, index) => {
|
|
49
|
+
// Get message ID - use timestamp as fallback for newly sent messages
|
|
50
|
+
const messageId = message.clientMsgID || message.serverMsgID || `temp-${message.sendTime || message.createTime}-${index}`;
|
|
51
|
+
const createdAt = message.sendTime || message.createTime;
|
|
52
|
+
const day = new Date(createdAt).getDate();
|
|
53
|
+
const messageType = resolveChatMessageType(message);
|
|
54
|
+
dataMap.set(messageId, {
|
|
55
|
+
messageId,
|
|
56
|
+
dayStart: lastDay !== day,
|
|
57
|
+
messageType,
|
|
58
|
+
createdAt
|
|
59
|
+
});
|
|
60
|
+
lastDay = day;
|
|
61
|
+
});
|
|
62
|
+
return dataMap;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Legacy: Use precomputeLegendListData instead
|
|
67
|
+
* Kept for backward compatibility
|
|
68
|
+
*/
|
|
69
|
+
export const computeDayStarts = messages => {
|
|
70
|
+
const dayStartMap = new Map();
|
|
71
|
+
let lastDay = null;
|
|
72
|
+
messages.forEach(message => {
|
|
73
|
+
const day = new Date(message.sendTime || message.createTime).getDate();
|
|
74
|
+
const messageId = message.clientMsgID || message.serverMsgID || '';
|
|
75
|
+
dayStartMap.set(messageId, lastDay !== day);
|
|
76
|
+
lastDay = day;
|
|
77
|
+
});
|
|
78
|
+
return dayStartMap;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=legendListMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["MessageType","resolveChatMessageType","getMessageText","message","contentType","TextMessage","textElem","content","AtTextMessage","atTextElem","text","QuoteMessage","quoteElem","PictureMessage","VoiceMessage","soundElem","sourceUrl","VideoMessage","videoElem","videoUrl","FileMessage","fileElem","fileName","CardMessage","cardElem","nickname","LocationMessage","locationElem","description","CustomMessage","customElem","FaceMessage","notificationElem","detail","precomputeLegendListData","messages","dataMap","Map","lastDay","forEach","index","messageId","clientMsgID","serverMsgID","sendTime","createTime","createdAt","day","Date","getDate","messageType","set","dayStart","computeDayStarts","dayStartMap"],"sourceRoot":"../../../src","sources":["utils/legendListMessage.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,+BAA+B;AAE3D,SAASC,sBAAsB,QAAQ,yBAAsB;AAG7D;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,OAAqB,IAAa;EAC/D,QAAQA,OAAO,CAACC,WAAW;IACzB,KAAKJ,WAAW,CAACK,WAAW;MAC1B,OAAOF,OAAO,CAACG,QAAQ,EAAEC,OAAO,IAAIJ,OAAO,CAACI,OAAO;IACrD,KAAKP,WAAW,CAACQ,aAAa;MAC5B,OAAOL,OAAO,CAACM,UAAU,EAAEC,IAAI,IAAIP,OAAO,CAACI,OAAO;IACpD,KAAKP,WAAW,CAACW,YAAY;MAC3B,OAAOR,OAAO,CAACS,SAAS,EAAEF,IAAI,IAAIP,OAAO,CAACI,OAAO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W,IACnB,QAAQxC,OAAO,CAACyC,QAAQ,IAAIzC,OAAO,CAAC0C,UAAU,IAAIL,KAAK,EAAE;IAE3D,MAAMM,SAAS,GAAG3C,OAAO,CAACyC,QAAQ,IAAIzC,OAAO,CAAC0C,UAAU;IACxD,MAAME,GAAG,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC,CAACG,OAAO,CAAC,CAAC;IACzC,MAAMC,WAAW,GAAGjD,sBAAsB,CAACE,OAAO,CAAC;IAEnDiC,OAAO,CAACe,GAAG,CAACV,SAAS,EAAE;MACrBA,SAAS;MACTW,QAAQ,EAAEd,OAAO,KAAKS,GAAG;MACzBG,WAAW;MACXJ;IACF,CAAC,CAAC;IAEFR,OAAO,GAAGS,GAAG;EACf,CAAC,CAAC;EAEF,OAAOX,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMiB,gBAAgB,GAC3BlB,QAAwB,IACC;EACzB,MAAMmB,WAAW,GAAG,IAAIjB,GAAG,CAAkB,CAAC;EAC9C,IAAIC,OAAsB,GAAG,IAAI;EAEjCH,QAAQ,CAACI,OAAO,CAAEpC,OAAO,IAAK;IAC5B,MAAM4C,GAAG,GAAG,IAAIC,IAAI,CAAC7C,OAAO,CAACyC,QAAQ,IAAIzC,OAAO,CAAC0C,UAAU,CAAC,CAACI,OAAO,CAAC,CAAC;IACtE,MAAMR,SAAS,GAAGtC,OAAO,CAACuC,WAAW,IAAIvC,OAAO,CAACwC,WAAW,IAAI,EAAE;IAClEW,WAAW,CAACH,GAAG,CAACV,SAAS,EAAEH,OAAO,KAAKS,GAAG,CAAC;IAC3CT,OAAO,GAAGS,GAAG;EACf,CAAC,CAAC;EAEF,OAAOO,WAAW;AACpB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["URL_REGEX","extractFirstUrl","text","match"],"sourceRoot":"../../../src","sources":["utils/url.ts"],"mappings":";;AAAA,MAAMA,SAAS,GAAG,oBAAoB;AAEtC,OAAO,SAASC,eAAeA,CAACC,IAAY,EAAsB;EAChE,OAAOA,IAAI,CAACC,KAAK,CAACH,SAAS,CAAC,GAAG,CAAC,CAAC;AACnC","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { AvatarProps } from './Avatar.types';
|
|
2
|
-
declare const Avatar: import("react").MemoExoticComponent<({ source, size, type, secondarySource, badge, fullName, borderColor, borderWidth, placeholderColor, onPress, }: AvatarProps) => import("react
|
|
2
|
+
declare const Avatar: import("react").MemoExoticComponent<({ source, size, type, secondarySource, badge, fullName, borderColor, borderWidth, placeholderColor, onPress, }: AvatarProps) => import("react").JSX.Element>;
|
|
3
3
|
export default Avatar;
|
|
4
4
|
//# sourceMappingURL=Avatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,QAAA,MAAM,MAAM,uJAYP,WAAW,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,QAAA,MAAM,MAAM,uJAYP,WAAW,iCAmEf,CAAC;AAIF,eAAe,MAAM,CAAC"}
|
|
@@ -2,6 +2,6 @@ interface AvatarBadgeProps {
|
|
|
2
2
|
variant?: 'bot' | 'support' | 'mall' | 'custom';
|
|
3
3
|
size: number;
|
|
4
4
|
}
|
|
5
|
-
export declare const AvatarBadge: import("react").MemoExoticComponent<({ variant, size: _size }: AvatarBadgeProps) => import("react
|
|
5
|
+
export declare const AvatarBadge: import("react").MemoExoticComponent<({ variant, size: _size }: AvatarBadgeProps) => import("react").JSX.Element>;
|
|
6
6
|
export {};
|
|
7
7
|
//# sourceMappingURL=AvatarBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarBadge.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/AvatarBadge.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,WAAW,iEACK,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AvatarBadge.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/AvatarBadge.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,OAAO,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,GAAG,QAAQ,CAAC;IAChD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,WAAW,iEACK,gBAAgB,iCAK5C,CAAC"}
|
|
@@ -8,6 +8,6 @@ interface DoubleAvatarProps {
|
|
|
8
8
|
primaryFullName?: string;
|
|
9
9
|
secondaryFullName?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const DoubleAvatar: import("react").MemoExoticComponent<({ primarySource, secondarySource, size, borderColor, borderWidth, placeholderColor, primaryFullName, secondaryFullName, }: DoubleAvatarProps) => import("react
|
|
11
|
+
export declare const DoubleAvatar: import("react").MemoExoticComponent<({ primarySource, secondarySource, size, borderColor, borderWidth, placeholderColor, primaryFullName, secondaryFullName, }: DoubleAvatarProps) => import("react").JSX.Element>;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=DoubleAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DoubleAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/DoubleAvatar.tsx"],"names":[],"mappings":"AAKA,UAAU,iBAAiB;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,kKAUpB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"DoubleAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/DoubleAvatar.tsx"],"names":[],"mappings":"AAKA,UAAU,iBAAiB;IACzB,aAAa,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACzC,eAAe,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,eAAO,MAAM,YAAY,kKAUpB,iBAAiB,iCA6CrB,CAAC"}
|
|
@@ -8,6 +8,6 @@ interface SingleAvatarProps extends Omit<KAvatarProps, 'size' | 'uri'> {
|
|
|
8
8
|
backgroundColor?: string;
|
|
9
9
|
fullName?: string;
|
|
10
10
|
}
|
|
11
|
-
export declare const SingleAvatar: import("react").MemoExoticComponent<({ source, size, borderColor, borderWidth, placeholderColor, backgroundColor, fullName, }: SingleAvatarProps) => import("react
|
|
11
|
+
export declare const SingleAvatar: import("react").MemoExoticComponent<({ source, size, borderColor, borderWidth, placeholderColor, backgroundColor, fullName, }: SingleAvatarProps) => import("react").JSX.Element>;
|
|
12
12
|
export {};
|
|
13
13
|
//# sourceMappingURL=SingleAvatar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SingleAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/SingleAvatar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,UAAU,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;IACpE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,eAAO,MAAM,YAAY,iIASpB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"SingleAvatar.d.ts","sourceRoot":"","sources":["../../../../../src/components/Avatar/SingleAvatar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,UAAU,iBAAkB,SAAQ,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;IACpE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiBD,eAAO,MAAM,YAAY,iIASpB,iBAAiB,iCA4CrB,CAAC"}
|
|
@@ -3,6 +3,6 @@ interface AvatarSectionProps extends Partial<Pick<DConversationItem, 'chatCatego
|
|
|
3
3
|
avatar: string | null;
|
|
4
4
|
fullName: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const AvatarSection: import("react").MemoExoticComponent<({ avatar, fullName, chatCategory, applicationType }: AvatarSectionProps) => import("react
|
|
6
|
+
export declare const AvatarSection: import("react").MemoExoticComponent<({ avatar, fullName, chatCategory, applicationType }: AvatarSectionProps) => import("react").JSX.Element>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=AvatarSection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/AvatarSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,UAAU,kBAAmB,SAAQ,OAAO,CAC1C,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,iBAAiB,GAAG,UAAU,CAAC,CACzE;IACC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,4FAC8B,kBAAkB,
|
|
1
|
+
{"version":3,"file":"AvatarSection.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/AvatarSection.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,UAAU,kBAAmB,SAAQ,OAAO,CAC1C,IAAI,CAAC,iBAAiB,EAAE,cAAc,GAAG,iBAAiB,GAAG,UAAU,CAAC,CACzE;IACC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,aAAa,4FAC8B,kBAAkB,iCA0BzE,CAAC"}
|
|
@@ -3,6 +3,6 @@ interface NamePrefixIconProps {
|
|
|
3
3
|
chatCategory?: DChatCategory;
|
|
4
4
|
chatType?: DChatType;
|
|
5
5
|
}
|
|
6
|
-
export declare const NamePrefixIcon: import("react").MemoExoticComponent<({ chatCategory, chatType }: NamePrefixIconProps) => import("react
|
|
6
|
+
export declare const NamePrefixIcon: import("react").MemoExoticComponent<({ chatCategory, chatType }: NamePrefixIconProps) => import("react").JSX.Element>;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=NamePrefixIcon.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NamePrefixIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/NamePrefixIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAU5D,UAAU,mBAAmB;IAC3B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,mEACI,mBAAmB,
|
|
1
|
+
{"version":3,"file":"NamePrefixIcon.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/NamePrefixIcon.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAU5D,UAAU,mBAAmB;IAC3B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,mEACI,mBAAmB,iCAmCjD,CAAC"}
|
|
@@ -6,6 +6,6 @@ interface ThreadCardProps {
|
|
|
6
6
|
event: GestureResponderEvent;
|
|
7
7
|
}) => void;
|
|
8
8
|
}
|
|
9
|
-
declare const ThreadCard: import("react").MemoExoticComponent<({ item, onPress }: ThreadCardProps) => import("react
|
|
9
|
+
declare const ThreadCard: import("react").MemoExoticComponent<({ item, onPress }: ThreadCardProps) => import("react").JSX.Element>;
|
|
10
10
|
export default ThreadCard;
|
|
11
11
|
//# sourceMappingURL=ThreadCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAUtE,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5E;AAED,QAAA,MAAM,UAAU,0DAA4B,eAAe,
|
|
1
|
+
{"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAUtE,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,qBAAqB,CAAA;KAAE,KAAK,IAAI,CAAC;CAC5E;AAED,QAAA,MAAM,UAAU,0DAA4B,eAAe,iCAoHzD,CAAC;AAIH,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
interface UnreadBadgeProps {
|
|
2
2
|
count: number;
|
|
3
3
|
}
|
|
4
|
-
export declare const UnreadBadge: import("react").MemoExoticComponent<({ count }: UnreadBadgeProps) => import("react
|
|
4
|
+
export declare const UnreadBadge: import("react").MemoExoticComponent<({ count }: UnreadBadgeProps) => import("react").JSX.Element>;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=UnreadBadge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UnreadBadge.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/UnreadBadge.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,kDAAoB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"UnreadBadge.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/UnreadBadge.tsx"],"names":[],"mappings":"AAIA,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,WAAW,kDAAoB,gBAAgB,iCAY1D,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface FeatureFlags {
|
|
2
|
+
USE_LEGEND_LIST_CHAT: boolean;
|
|
3
|
+
CHAT_LIST_VARIANT: 'gifted' | 'legend';
|
|
4
|
+
ENABLE_PERFORMANCE_METRICS: boolean;
|
|
5
|
+
METRICS_SAMPLE_RATE: number;
|
|
6
|
+
}
|
|
7
|
+
export declare const getFeatureFlag: <K extends keyof FeatureFlags>(flag: K) => FeatureFlags[K];
|
|
8
|
+
export declare const setFeatureFlag: <K extends keyof FeatureFlags>(flag: K, value: FeatureFlags[K]) => void;
|
|
9
|
+
export declare const resetFlags: () => void;
|
|
10
|
+
export declare const onFlagsChange: (callback: () => void) => () => void;
|
|
11
|
+
export declare const getAllFlags: () => FeatureFlags;
|
|
12
|
+
//# sourceMappingURL=feature-flags.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-flags.d.ts","sourceRoot":"","sources":["../../../../src/config/feature-flags.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACvC,0BAA0B,EAAE,OAAO,CAAC;IACpC,mBAAmB,EAAE,MAAM,CAAC;CAC7B;AAWD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,YAAY,EACzD,MAAM,CAAC,KACN,YAAY,CAAC,CAAC,CAEhB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,YAAY,EACzD,MAAM,CAAC,EACP,OAAO,YAAY,CAAC,CAAC,CAAC,SAIvB,CAAC;AAEF,eAAO,MAAM,UAAU,YAGtB,CAAC;AAIF,eAAO,MAAM,aAAa,GAAI,UAAU,MAAM,IAAI,eAKjD,CAAC;AAMF,eAAO,MAAM,WAAW,QAAO,YAA8B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ChatContextType, ChatProviderProps } from '../types/chat';
|
|
2
2
|
export declare const ChatContext: import("react").Context<ChatContextType>;
|
|
3
3
|
export declare const useChatContext: () => ChatContextType;
|
|
4
|
-
export declare const ChatProvider: ({ enabled, ...props }: ChatProviderProps) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode>> | import("react
|
|
4
|
+
export declare const ChatProvider: ({ enabled, ...props }: ChatProviderProps) => string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode>> | import("react").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=ChatContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,eAMjC,CAAC;AAQF,eAAO,MAAM,YAAY,GAAI,uBAAuB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ChatContext.d.ts","sourceRoot":"","sources":["../../../../src/context/ChatContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAExE,eAAO,MAAM,WAAW,0CAEvB,CAAC;AAEF,eAAO,MAAM,cAAc,QAAO,eAMjC,CAAC;AAQF,eAAO,MAAM,YAAY,GAAI,uBAAuB,iBAAiB,0TACR,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB;;;4BAGR,MAAM;;6BAGL,MAAM;CAEhC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"query-keys.d.ts","sourceRoot":"","sources":["../../../../src/hooks/query-keys.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;uBAEP,MAAM;CAC1B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;4BAGR,MAAM;;6BAGL,MAAM;CAEhC,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC"}
|
|
@@ -10,8 +10,11 @@ export declare function useChatMessages({ conversationId, enabled, pageSize, }:
|
|
|
10
10
|
isLoading: boolean;
|
|
11
11
|
isLoadingEarlier: boolean;
|
|
12
12
|
hasMoreEarlier: boolean;
|
|
13
|
+
isLoadingNewer: boolean;
|
|
14
|
+
hasMoreNewer: boolean;
|
|
13
15
|
error: Error;
|
|
14
16
|
onLoadEarlier: () => Promise<void>;
|
|
17
|
+
onLoadNewer: () => Promise<void>;
|
|
15
18
|
sendTextMessage: (text: string) => Promise<void>;
|
|
16
19
|
refresh: () => Promise<void>;
|
|
17
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,OAAc,EACd,QAAa,GACd,EAAE,sBAAsB
|
|
1
|
+
{"version":3,"file":"useChatMessages.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useChatMessages.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AASlD,KAAK,sBAAsB,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC9B,cAAc,EACd,OAAc,EACd,QAAa,GACd,EAAE,sBAAsB;;;;;;;;;;;4BA4L0B,MAAM;;EA6ExD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFetchUrlMetadata.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useLinkPreview/useFetchUrlMetadata.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGvD,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,iFAU5C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLinkPreview.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/useLinkPreview/useLinkPreview.ts"],"names":[],"mappings":"AAIA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS;;;;;EAyBvD"}
|
|
@@ -9,7 +9,7 @@ export { Avatar } from './components/Avatar';
|
|
|
9
9
|
export { ThreadCard } from './components/ThreadCard';
|
|
10
10
|
export { Inbox } from './screens/inbox';
|
|
11
11
|
export { ChatDetail, ChatDetailHeader, ChatList, ChatComposer, ChatQuickActions, ChatAttachmentPanel, DEFAULT_Chat_QUICK_ACTIONS, DEFAULT_ATTACHMENT_ACTIONS, } from './screens/chat-detail';
|
|
12
|
-
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatAttachmentAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatAttachmentPanelProps, } from './screens/chat-detail';
|
|
12
|
+
export type { DChatActionItem, DChatActionIconProvider, DChatQuickAction, DChatAttachmentAction, ChatDetailProps, ChatDetailHeaderProps, ChatListProps, ChatComposerProps, ChatQuickActionsProps, ChatQuickActionsRenderParams, ChatAttachmentPanelProps, } from './screens/chat-detail';
|
|
13
13
|
export type { DGiftedChatMessage } from './utils/giftedChatMessage';
|
|
14
14
|
export { mapOpenIMMessageToGiftedChat, mapOpenIMMessagesToGiftedChat, } from './utils/giftedChatMessage';
|
|
15
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,mBAAmB,EACnB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,eAAe,EACf,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,iBAAiB,EACjB,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EACL,4BAA4B,EAC5B,6BAA6B,GAC9B,MAAM,2BAA2B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChatAttachmentPanelProps } from './types';
|
|
2
|
-
export declare const ChatAttachmentPanel: import("react").MemoExoticComponent<({ actions, columns, onActionPress, renderAction, }: ChatAttachmentPanelProps) => import("react
|
|
2
|
+
export declare const ChatAttachmentPanel: import("react").MemoExoticComponent<({ actions, columns, onActionPress, renderAction, }: ChatAttachmentPanelProps) => import("react").JSX.Element>;
|
|
3
3
|
//# sourceMappingURL=ChatAttachmentPanel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatAttachmentPanel.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatAttachmentPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAyB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmD/E,eAAO,MAAM,mBAAmB,2FAM3B,wBAAwB,
|
|
1
|
+
{"version":3,"file":"ChatAttachmentPanel.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatAttachmentPanel.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAyB,wBAAwB,EAAE,MAAM,SAAS,CAAC;AAmD/E,eAAO,MAAM,mBAAmB,2FAM3B,wBAAwB,iCAkD5B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { ChatComposerProps } from './types';
|
|
2
|
-
export declare const ChatComposer: import("react").MemoExoticComponent<({ value, placeholder, onChangeText, onSend, onPressAttach, onPressEmoji, quickActions, attachmentActions, onQuickActionPress, onAttachmentAction, renderQuickAction, renderAttachmentAction, attachmentColumns, }: ChatComposerProps) => import("react
|
|
2
|
+
export declare const ChatComposer: import("react").MemoExoticComponent<({ value, placeholder, onChangeText, onSend, onPressAttach, onPressEmoji, showQuickActions, quickActions, attachmentActions, onQuickActionPress, onAttachmentAction, renderQuickAction, renderQuickActions, renderAttachmentAction, attachmentColumns, }: ChatComposerProps) => import("react").JSX.Element>;
|
|
3
3
|
//# sourceMappingURL=ChatComposer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAcjD,eAAO,MAAM,YAAY,gSAiBpB,iBAAiB,iCA4VrB,CAAC"}
|