@droppii-org/chat-mobile 0.2.4 → 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/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 +18 -2
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +110 -20
- package/lib/module/screens/chat-detail/ChatDetail.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 +30 -3
- 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/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 +21 -0
- package/src/screens/chat-detail/ChatDetail.tsx +154 -28
- 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 +43 -3
- 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,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo, useMemo } from 'react';
|
|
4
|
+
import { KContainer, KLabel } from '@droppii/libs';
|
|
5
|
+
import { CHAT_BUBBLE_COLORS } from "../constants.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const formatTime = date => date.toLocaleTimeString('vi-VN', {
|
|
8
|
+
hour: '2-digit',
|
|
9
|
+
minute: '2-digit',
|
|
10
|
+
hour12: false
|
|
11
|
+
});
|
|
12
|
+
const formatDayLabel = createdAt => {
|
|
13
|
+
const date = new Date(createdAt);
|
|
14
|
+
if (Number.isNaN(date.getTime())) return null;
|
|
15
|
+
const today = new Date();
|
|
16
|
+
today.setHours(0, 0, 0, 0);
|
|
17
|
+
const messageDay = new Date(date);
|
|
18
|
+
messageDay.setHours(0, 0, 0, 0);
|
|
19
|
+
if (messageDay.getTime() === today.getTime()) {
|
|
20
|
+
return `${formatTime(date)} Hôm nay`;
|
|
21
|
+
}
|
|
22
|
+
const yesterday = new Date(today);
|
|
23
|
+
yesterday.setDate(yesterday.getDate() - 1);
|
|
24
|
+
if (messageDay.getTime() === yesterday.getTime()) {
|
|
25
|
+
return `${formatTime(date)} Hôm qua`;
|
|
26
|
+
}
|
|
27
|
+
if (messageDay.getFullYear() === today.getFullYear()) {
|
|
28
|
+
return `${formatTime(date)} ${date.toLocaleDateString('vi-VN', {
|
|
29
|
+
day: 'numeric',
|
|
30
|
+
month: 'long'
|
|
31
|
+
})}`;
|
|
32
|
+
}
|
|
33
|
+
return `${formatTime(date)} ${date.toLocaleDateString('vi-VN', {
|
|
34
|
+
day: 'numeric',
|
|
35
|
+
month: 'long',
|
|
36
|
+
year: 'numeric'
|
|
37
|
+
})}`;
|
|
38
|
+
};
|
|
39
|
+
export const LegendChatDay = /*#__PURE__*/memo(({
|
|
40
|
+
createdAt
|
|
41
|
+
}) => {
|
|
42
|
+
const dateStr = useMemo(() => createdAt == null ? null : formatDayLabel(createdAt), [createdAt]);
|
|
43
|
+
if (!dateStr) return null;
|
|
44
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
45
|
+
center: true,
|
|
46
|
+
marginV: "0.5rem",
|
|
47
|
+
children: /*#__PURE__*/_jsx(KContainer.View, {
|
|
48
|
+
children: /*#__PURE__*/_jsx(KLabel.Text, {
|
|
49
|
+
typo: "TextXsNormal",
|
|
50
|
+
color: CHAT_BUBBLE_COLORS.dayLabel,
|
|
51
|
+
children: dateStr
|
|
52
|
+
})
|
|
53
|
+
})
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
LegendChatDay.displayName = 'LegendChatDay';
|
|
57
|
+
//# sourceMappingURL=LegendChatDay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","useMemo","KContainer","KLabel","CHAT_BUBBLE_COLORS","jsx","_jsx","formatTime","date","toLocaleTimeString","hour","minute","hour12","formatDayLabel","createdAt","Date","Number","isNaN","getTime","today","setHours","messageDay","yesterday","setDate","getDate","getFullYear","toLocaleDateString","day","month","year","LegendChatDay","dateStr","View","center","marginV","children","Text","typo","color","dayLabel","displayName"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatDay.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,OAAO,QAAQ,OAAO;AACrC,SAASC,UAAU,EAAEC,MAAM,QAAQ,eAAe;AAClD,SAASC,kBAAkB,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAElD,MAAMC,UAAU,GAAIC,IAAU,IAC5BA,IAAI,CAACC,kBAAkB,CAAC,OAAO,EAAE;EAC/BC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAE;AACV,CAAC,CAAC;AAEJ,MAAMC,cAAc,GAAIC,SAAiB,IAAoB;EAC3D,MAAMN,IAAI,GAAG,IAAIO,IAAI,CAACD,SAAS,CAAC;EAChC,IAAIE,MAAM,CAACC,KAAK,CAACT,IAAI,CAACU,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,IAAI;EAE7C,MAAMC,KAAK,GAAG,IAAIJ,IAAI,CAAC,CAAC;EACxBI,KAAK,CAACC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EAE1B,MAAMC,UAAU,GAAG,IAAIN,IAAI,CAACP,IAAI,CAAC;EACjCa,UAAU,CAACD,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;EAE/B,IAAIC,UAAU,CAACH,OAAO,CAAC,CAAC,KAAKC,KAAK,CAACD,OAAO,CAAC,CAAC,EAAE;IAC5C,OAAO,GAAGX,UAAU,CAACC,IAAI,CAAC,UAAU;EACtC;EAEA,MAAMc,SAAS,GAAG,IAAIP,IAAI,CAACI,KAAK,CAAC;EACjCG,SAAS,CAACC,OAAO,CAACD,SAAS,CAACE,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC;EAE1C,IAAIH,UAAU,CAACH,OAAO,CAAC,CAAC,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
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import { ActivityIndicator } from 'react-native';
|
|
5
|
+
import { KContainer, KColors } from '@droppii/libs';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
export const LegendChatLoadEarlier = /*#__PURE__*/memo(({
|
|
8
|
+
isLoading = false
|
|
9
|
+
}) => {
|
|
10
|
+
if (!isLoading) return null;
|
|
11
|
+
return /*#__PURE__*/_jsx(KContainer.View, {
|
|
12
|
+
center: true,
|
|
13
|
+
marginV: "0.75rem",
|
|
14
|
+
children: /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
15
|
+
color: KColors.palette.primary.w400,
|
|
16
|
+
size: "small"
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
LegendChatLoadEarlier.displayName = 'LegendChatLoadEarlier';
|
|
21
|
+
//# sourceMappingURL=LegendChatLoadEarlier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","ActivityIndicator","KContainer","KColors","jsx","_jsx","LegendChatLoadEarlier","isLoading","View","center","marginV","children","color","palette","primary","w400","size","displayName"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatLoadEarlier.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,iBAAiB,QAAQ,cAAc;AAChD,SAASC,UAAU,EAAEC,OAAO,QAAQ,eAAe;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMpD,OAAO,MAAMC,qBAAqB,gBAAGN,IAAI,CACvC,CAAC;EAAEO,SAAS,GAAG;AAAkC,CAAC,KAAK;EACrD,IAAI,CAACA,SAAS,EAAE,OAAO,IAAI;EAE3B,oBACEF,IAAA,CAACH,UAAU,CAACM,IAAI;IAACC,MAAM;IAACC,OAAO,EAAC,SAAS;IAAAC,QAAA,eACvCN,IAAA,CAACJ,iBAAiB;MAACW,KAAK,EAAET,OAAO,CAACU,OAAO,CAACC,OAAO,CAACC,IAAK;MAACC,IAAI,EAAC;IAAO,CAAE;EAAC,CACxD,CAAC;AAEtB,CACF,CAAC;AAEDV,qBAAqB,CAACW,WAAW,GAAG,uBAAuB","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo } from 'react';
|
|
4
|
+
import { LegendTextMessage, LegendImageMessage, LegendVideoMessage, LegendFileMessage } from "./message-types.js";
|
|
5
|
+
import { DChatMessageType as MessageTypeEnum } from "../../../types/message.js";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
// Message type to component mapping
|
|
8
|
+
const messageComponentMap = {
|
|
9
|
+
[MessageTypeEnum.Text]: LegendTextMessage,
|
|
10
|
+
[MessageTypeEnum.Image]: LegendImageMessage,
|
|
11
|
+
[MessageTypeEnum.Video]: LegendVideoMessage,
|
|
12
|
+
[MessageTypeEnum.File]: LegendFileMessage,
|
|
13
|
+
[MessageTypeEnum.Link]: LegendTextMessage,
|
|
14
|
+
// Link renders as text for now
|
|
15
|
+
[MessageTypeEnum.Order]: LegendTextMessage,
|
|
16
|
+
// Order renders as text for now
|
|
17
|
+
[MessageTypeEnum.Unsupported]: LegendTextMessage // Unsupported renders as text for now
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Dispatcher component - renders the appropriate message component
|
|
22
|
+
* based on message type. Extensible for new message types.
|
|
23
|
+
*/
|
|
24
|
+
export const LegendChatMessage = /*#__PURE__*/memo(({
|
|
25
|
+
message,
|
|
26
|
+
messageType,
|
|
27
|
+
isOutgoing,
|
|
28
|
+
createdAtTime
|
|
29
|
+
}) => {
|
|
30
|
+
const MessageComponent = messageComponentMap[messageType];
|
|
31
|
+
|
|
32
|
+
// Fallback to text message if type not found
|
|
33
|
+
if (!MessageComponent) {
|
|
34
|
+
return /*#__PURE__*/_jsx(LegendTextMessage, {
|
|
35
|
+
message: message,
|
|
36
|
+
isOutgoing: isOutgoing,
|
|
37
|
+
createdAtTime: createdAtTime
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
return /*#__PURE__*/_jsx(MessageComponent, {
|
|
41
|
+
message: message,
|
|
42
|
+
isOutgoing: isOutgoing,
|
|
43
|
+
createdAtTime: createdAtTime
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
LegendChatMessage.displayName = 'LegendChatMessage';
|
|
47
|
+
//# sourceMappingURL=LegendChatMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","LegendTextMessage","LegendImageMessage","LegendVideoMessage","LegendFileMessage","DChatMessageType","MessageTypeEnum","jsx","_jsx","messageComponentMap","Text","Image","Video","File","Link","Order","Unsupported","LegendChatMessage","message","messageType","isOutgoing","createdAtTime","MessageComponent","displayName"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatMessage.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAuB,OAAO;AAG3C,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,iBAAiB,QACZ,oBAAiB;AACxB,SAASC,gBAAgB,IAAIC,eAAe,QAAQ,2BAAwB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS7E;AACA,MAAMC,mBAEL,GAAG;EACF,CAACH,eAAe,CAACI,IAAI,GAAGT,iBAAiB;EACzC,CAACK,eAAe,CAACK,KAAK,GAAGT,kBAAkB;EAC3C,CAACI,eAAe,CAACM,KAAK,GAAGT,kBAAkB;EAC3C,CAACG,eAAe,CAACO,IAAI,GAAGT,iBAAiB;EACzC,CAACE,eAAe,CAACQ,IAAI,GAAGb,iBAAiB;EAAE;EAC3C,CAACK,eAAe,CAACS,KAAK,GAAGd,iBAAiB;EAAE;EAC5C,CAACK,eAAe,CAACU,WAAW,GAAGf,iBAAiB,CAAE;AACpD,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMgB,iBAAiB,gBAAGjB,IAAI,CACnC,CAAC;EACCkB,OAAO;EACPC,WAAW;EACXC,UAAU;EACVC;AACsB,CAAC,KAAK;EAC5B,MAAMC,gBAAgB,GAAGb,mBAAmB,CAACU,WAAW,CAAC;;EAEzD;EACA,IAAI,CAACG,gBAAgB,EAAE;IACrB,oBACEd,IAAA,CAACP,iBAAiB;MAChBiB,OAAO,EAAEA,OAAQ;MACjBE,UAAU,EAAEA,UAAW;MACvBC,aAAa,EAAEA;IAAc,CAC9B,CAAC;EAEN;EAEA,oBACEb,IAAA,CAACc,gBAAgB;IACfJ,OAAO,EAAEA,OAAQ;IACjBE,UAAU,EAAEA,UAAW;IACvBC,aAAa,EAAEA;EAAc,CAC9B,CAAC;AAEN,CACF,CAAC;AAEDJ,iBAAiB,CAACM,WAAW,GAAG,mBAAmB","ignoreList":[]}
|
|
@@ -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;AACz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AE;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,IAAI,CAACF,SAAS,CAAC;EAChC,IAAIG,MAAM,CAACC,KAAK,CAACH,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC,EAAE;IAChC,OAAO,EAAE;EACX;EAEA,OAAOJ,IAAI,CAACK,kBAAkB,CAAC,OAAO,EAAE;IACtCC,IAAI,EAAE,SAAS;IACfC,MAAM,EAAE,SAAS;IACjBC,MAAM,EAAE;EACV,CAAC,CAAC;AACJ,CAAC;;AAED;A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IAAAC,QAAA,eACrCzB,IAAA,CAACN,UAAU,CAAC2B,IAAI;MACdC,KAAK,EAAE,CACLC,MAAM,CAACG,MAAM,EACbV,UAAU,GAAGO,MAAM,CAACI,UAAU,GAAGJ,MAAM,CAACK,cAAc,CACtD;MAAAH,QAAA,eAEFvB,KAAA,CAACP,MAAM,CAACkC,IAAI;QAACC,IAAI,EAAC,cAAc;QAACC,KAAK,EAAEjC,kBAAkB,CAACkC,IAAK;QAAAP,QAAA,GAAC,eAC5D,EAACc,QAAQ;MAAA,CACD;IAAC,CACC;EAAC,CACH,CAAC;AAEtB,CACF,CAAC;AAEDD,iBAAiB,CAACH,WAAW,GAAG,mBAAmB;AAEnD,MAAMZ,MAAM,GAAG9B,UAAU,CAACiD,MAAM,CAAC;EAC/BlB,OAAO,EAAE;IACPmB,QAAQ,EAAE;EACZ,CAAC;EACDjB,MAAM,EAAE;IACNkB,iBAAiB,EAAEhD,aAAa,CAAC,SAAS,CAAC;IAC3CiD,eAAe,EAAEjD,aAAa,CAAC,QAAQ,CAAC;IACxCkD,YAAY,EAAElD,aAAa,CAAC,SAAS;EACvC,CAAC;EACDgC,cAAc,EAAE;IACdmB,eAAe,EAAEjD,kBAAkB,CAACkD;EACtC,CAAC;EACDrB,UAAU,EAAE;IACVoB,eAAe,EAAEjD,kBAAkB,CAACmD;EACtC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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,eAAeA,CAACC,GAAkB,EAAQ;IACxDJ,WAAW,GAAGI,GAAG;EACnB;EAACF,QAAA,CAAAC,eAAA,GAAAA,eAAA;EAEM,MAAME,cAAc,GAAAH,QAAA,CAAAG,cAAA,GAAG,MAAOC,WAAoB,IAAK;IAC5D,OAAO,CAAC,MAAMV,SAAS,CAACS,cAAc,CAACC,WAAW,CAAC,MAAMT,WAAW,CAACU,MAAM;EAC7E,CAAC;EAEM,MA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+
{"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;IACnD,KAAKP,WAAW,CAACa,cAAc;MAC7B,OAAO,EAAE;IACX,KAAKb,WAAW,CAACc,YAAY;MAC3B,OAAOX,OAAO,CAACY,SAAS,EAAEC,SAAS,GAAG,EAAE,GAAG,kBAAkB;IAC/D,KAAKhB,WAAW,CAACiB,YAAY;MAC3B,OAAOd,OAAO,CAACe,SAAS,EAAEC,QAAQ,GAAG,EAAE,GAAG,SAAS;IACrD,KAAKnB,WAAW,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AACE,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"}
|