@droppii-org/chat-mobile 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/lib/module/components/ThreadCard/ThreadCard.js +2 -1
  2. package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
  3. package/lib/module/components/messages/imageMessage/index.js.map +1 -1
  4. package/lib/module/hooks/useImageAttachment.js +34 -63
  5. package/lib/module/hooks/useImageAttachment.js.map +1 -1
  6. package/lib/module/index.js +1 -1
  7. package/lib/module/index.js.map +1 -1
  8. package/lib/module/screens/MediaView/index.js +1 -1
  9. package/lib/module/screens/chat-detail/ChatComposer.js +10 -3
  10. package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
  11. package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js +66 -25
  12. package/lib/module/screens/chat-detail/hooks/useAttachmentSendHandler.js.map +1 -1
  13. package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js +6 -3
  14. package/lib/module/services/attachmentHandlers/imageAttachmentHandler.js.map +1 -1
  15. package/lib/module/services/auth.js +69 -0
  16. package/lib/module/services/auth.js.map +1 -1
  17. package/lib/module/services/imageUpload.js +84 -58
  18. package/lib/module/services/imageUpload.js.map +1 -1
  19. package/lib/module/utils/chatImageDimens.js +18 -1
  20. package/lib/module/utils/chatImageDimens.js.map +1 -1
  21. package/lib/module/utils/dateTimeUtils.js +44 -0
  22. package/lib/module/utils/dateTimeUtils.js.map +1 -0
  23. package/lib/module/utils/device.js +2 -1
  24. package/lib/module/utils/device.js.map +1 -1
  25. package/lib/module/utils/imageUtils.js +4 -2
  26. package/lib/module/utils/imageUtils.js.map +1 -1
  27. package/lib/module/{components/ThreadCard/thread-card.utils.js → utils/messageUtils.js} +18 -42
  28. package/lib/module/utils/messageUtils.js.map +1 -0
  29. package/lib/module/utils/videoThumbnail.js +11 -5
  30. package/lib/module/utils/videoThumbnail.js.map +1 -1
  31. package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
  32. package/lib/typescript/src/components/messages/imageMessage/index.d.ts.map +1 -1
  33. package/lib/typescript/src/hooks/useImageAttachment.d.ts.map +1 -1
  34. package/lib/typescript/src/index.d.ts +1 -1
  35. package/lib/typescript/src/index.d.ts.map +1 -1
  36. package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
  37. package/lib/typescript/src/screens/chat-detail/hooks/useAttachmentSendHandler.d.ts.map +1 -1
  38. package/lib/typescript/src/services/attachmentHandlers/imageAttachmentHandler.d.ts.map +1 -1
  39. package/lib/typescript/src/services/auth.d.ts +32 -0
  40. package/lib/typescript/src/services/auth.d.ts.map +1 -1
  41. package/lib/typescript/src/services/imageUpload.d.ts.map +1 -1
  42. package/lib/typescript/src/utils/chatImageDimens.d.ts +1 -0
  43. package/lib/typescript/src/utils/chatImageDimens.d.ts.map +1 -1
  44. package/lib/typescript/src/utils/dateTimeUtils.d.ts +6 -0
  45. package/lib/typescript/src/utils/dateTimeUtils.d.ts.map +1 -0
  46. package/lib/typescript/src/utils/device.d.ts.map +1 -1
  47. package/lib/typescript/src/utils/imageUtils.d.ts.map +1 -1
  48. package/lib/typescript/src/utils/messageUtils.d.ts +8 -0
  49. package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -0
  50. package/lib/typescript/src/utils/videoThumbnail.d.ts +1 -0
  51. package/lib/typescript/src/utils/videoThumbnail.d.ts.map +1 -1
  52. package/package.json +2 -2
  53. package/src/components/ThreadCard/ThreadCard.tsx +2 -1
  54. package/src/components/messages/imageMessage/index.tsx +0 -1
  55. package/src/hooks/useImageAttachment.ts +45 -70
  56. package/src/index.tsx +8 -1
  57. package/src/screens/MediaView/index.tsx +1 -1
  58. package/src/screens/chat-detail/ChatComposer.tsx +9 -3
  59. package/src/screens/chat-detail/hooks/useAttachmentSendHandler.ts +81 -25
  60. package/src/services/attachmentHandlers/imageAttachmentHandler.ts +11 -1
  61. package/src/services/auth.ts +77 -0
  62. package/src/services/imageUpload.ts +116 -73
  63. package/src/utils/chatImageDimens.ts +21 -1
  64. package/src/utils/dateTimeUtils.ts +48 -0
  65. package/src/utils/device.ts +1 -0
  66. package/src/utils/imageUtils.ts +10 -2
  67. package/src/{components/ThreadCard/thread-card.utils.ts → utils/messageUtils.ts} +18 -56
  68. package/src/utils/videoThumbnail.ts +14 -3
  69. package/lib/module/components/ThreadCard/thread-card.utils.js.map +0 -1
  70. package/lib/typescript/src/components/ThreadCard/thread-card.utils.d.ts +0 -4
  71. package/lib/typescript/src/components/ThreadCard/thread-card.utils.d.ts.map +0 -1
@@ -24,6 +24,8 @@ export const getMimeType = (fileName: string): string => {
24
24
  jpeg: 'image/jpeg',
25
25
  png: 'image/png',
26
26
  webp: 'image/webp',
27
+ heic: 'image/heic',
28
+ heif: 'image/heif',
27
29
  mp4: 'video/mp4',
28
30
  mov: 'video/quicktime',
29
31
  avi: 'video/x-msvideo',
@@ -63,9 +65,15 @@ export const validateImageFile = (file: ImageFile): string | null => {
63
65
  return `Image too large. Max ${formatFileSize(MAX_SIZE)}`;
64
66
  }
65
67
 
66
- const validMimes = ['image/jpeg', 'image/png', 'image/webp'];
68
+ const validMimes = [
69
+ 'image/jpeg',
70
+ 'image/png',
71
+ 'image/webp',
72
+ 'image/heic',
73
+ 'image/heif',
74
+ ];
67
75
  if (!validMimes.includes(file.mime)) {
68
- return 'Unsupported format. Only JPEG, PNG, WebP';
76
+ return 'Unsupported format. Only JPEG, PNG, WebP, HEIC';
69
77
  }
70
78
 
71
79
  return null;
@@ -1,8 +1,13 @@
1
+ /**
2
+ * Message formatting and preview utilities
3
+ */
4
+
1
5
  import { MessageType } from '@droppii/openim-rn-client-sdk';
2
- import type { DMessageItem } from '../../types/chat';
3
- import { DChatMessageType } from '../../types/message';
6
+ import type { DMessageItem } from '../types/chat';
7
+ import { DChatMessageType } from '../types/message';
8
+ import { formatDuration } from './dateTimeUtils';
4
9
 
5
- const extractTextContent = (message: DMessageItem): string => {
10
+ export const extractTextContent = (message: DMessageItem): string => {
6
11
  if (message.textElem?.content) return message.textElem.content;
7
12
  try {
8
13
  const parsed = JSON.parse(message.content) as { content?: string };
@@ -12,13 +17,7 @@ const extractTextContent = (message: DMessageItem): string => {
12
17
  }
13
18
  };
14
19
 
15
- const formatDuration = (seconds: number): string => {
16
- const mins = Math.floor(seconds / 60);
17
- const secs = seconds % 60;
18
- return `${mins}:${secs.toString().padStart(2, '0')}`;
19
- };
20
-
21
- const getMessagePreview = (message: DMessageItem): string => {
20
+ export const getMessagePreview = (message: DMessageItem): string => {
22
21
  // Check custom message type first
23
22
  if (message.contentType === MessageType.CustomMessage) {
24
23
  try {
@@ -49,8 +48,8 @@ const getMessagePreview = (message: DMessageItem): string => {
49
48
 
50
49
  case MessageType.VideoMessage:
51
50
  try {
52
- const videoData = JSON.parse(message.content);
53
- const duration = videoData.duration || 0;
51
+ const videoData = message?.videoElem;
52
+ const duration = videoData?.duration || 0;
54
53
  const durationStr = duration > 0 ? ` ${formatDuration(duration)}` : '';
55
54
  return `[Video]${durationStr}`;
56
55
  } catch {
@@ -75,7 +74,7 @@ const getMessagePreview = (message: DMessageItem): string => {
75
74
  (msg: any) => msg.contentType === MessageType.PictureMessage
76
75
  ).length;
77
76
  if (imageCount > 0) {
78
- return `${imageCount} [Hình ảnh]`;
77
+ return '[Hình ảnh]';
79
78
  }
80
79
  }
81
80
  } catch {
@@ -108,52 +107,15 @@ export const getLastMessageText = (
108
107
  const preview = getMessagePreview(message);
109
108
  if (!preview) return '';
110
109
 
111
- // Add sender name
110
+ // Add sender name for outgoing messages
112
111
  if (currentUserId && message.sendID === currentUserId) {
113
112
  return `Bạn: ${preview}`;
114
113
  }
115
114
 
116
- return preview;
117
- };
118
-
119
- export const formatTimestamp = (ts: number | string | null): string => {
120
- if (!ts) return '';
121
-
122
- try {
123
- const date = new Date(ts);
124
- if (isNaN(date.getTime())) return '';
125
-
126
- const now = new Date();
127
- const today = new Date(now.getFullYear(), now.getMonth(), now.getDate());
128
- const yesterday = new Date(today.getTime() - 24 * 60 * 60 * 1000);
129
- const dateOnly = new Date(
130
- date.getFullYear(),
131
- date.getMonth(),
132
- date.getDate()
133
- );
134
-
135
- if (dateOnly.getTime() === today.getTime()) {
136
- const h = date.getHours().toString().padStart(2, '0');
137
- const m = date.getMinutes().toString().padStart(2, '0');
138
- return `${h}:${m}`;
139
- }
140
-
141
- if (dateOnly.getTime() === yesterday.getTime()) {
142
- return 'Hôm qua';
143
- }
144
-
145
- const daysAgo = Math.floor(
146
- (today.getTime() - dateOnly.getTime()) / (24 * 60 * 60 * 1000)
147
- );
148
- if (daysAgo > 0 && daysAgo < 7) {
149
- const dayNames = ['CN', 'T2', 'T3', 'T4', 'T5', 'T6', 'T7'];
150
- return dayNames[date.getDay()] ?? '';
151
- }
152
-
153
- const d = date.getDate().toString().padStart(2, '0');
154
- const mo = (date.getMonth() + 1).toString().padStart(2, '0');
155
- return `${d}/${mo}`;
156
- } catch {
157
- return '';
115
+ // Add sender nickname for incoming messages
116
+ if (message.senderNickname) {
117
+ return `${message.senderNickname}: ${preview}`;
158
118
  }
119
+
120
+ return preview;
159
121
  };
@@ -4,6 +4,7 @@ import { createThumbnail } from 'react-native-create-thumbnail';
4
4
  interface ThumbnailOptions {
5
5
  time?: number; // timestamp in milliseconds (default: 0)
6
6
  quality?: number; // 0-100 (default: 100)
7
+ cacheId?: string; // unique cache identifier for this thumbnail (optional)
7
8
  }
8
9
 
9
10
  interface ThumbnailResult {
@@ -17,21 +18,31 @@ export const VideoThumbnailUtil = {
17
18
  videoPath: string,
18
19
  options: ThumbnailOptions = {}
19
20
  ): Promise<ThumbnailResult | null> => {
20
- const { time = 1000, quality = 80 } = options; // time in milliseconds
21
+ const { time = 800, quality = 80, cacheId } = options; // time in milliseconds
21
22
 
22
23
  try {
24
+ // Generate unique cache name per video to avoid conflicts with concurrent generations
25
+ // Uses provided cacheId or generates one from videoPath filename
26
+ const fileName = videoPath.split('/').pop() || String(Date.now());
27
+ const cacheName =
28
+ cacheId ||
29
+ `thumb-${fileName.replace(/[^a-zA-Z0-9-_]/g, '')}-${Math.abs(
30
+ fileName.charCodeAt(0) + fileName.charCodeAt(fileName.length - 1)
31
+ )}`;
32
+
23
33
  console.log('[VideoThumbnail] Generating thumbnail', {
24
34
  videoPath,
25
35
  timeMs: time,
26
36
  quality,
37
+ cacheName,
27
38
  });
28
39
 
29
40
  const result = await createThumbnail({
30
41
  url: videoPath,
31
42
  timeStamp: time,
32
- format: 'jpeg',
43
+ format: 'png',
33
44
  dirSize: 100,
34
- cacheName: 'video-thumbnails',
45
+ cacheName,
35
46
  });
36
47
 
37
48
  console.log('✅ [VideoThumbnail] THUMBNAIL PATH:', result.path);
@@ -1 +0,0 @@
1
- {"version":3,"names":["MessageType","DChatMessageType","extractTextContent","message","textElem","content","parsed","JSON","parse","formatDuration","seconds","mins","Math","floor","secs","toString","padStart","getMessagePreview","contentType","CustomMessage","data","dataType","type","Link","linkText","title","Order","orderCode","code","TextMessage","PictureMessage","VideoMessage","videoData","duration","durationStr","FileMessage","fileData","fileName","name","MergeMessage","mergeData","mergeElem","multiMessage","imageCount","filter","msg","length","UrlTextMessage","urlText","urlTextElem","urls","console","log","AtTextMessage","QuoteMessage","getLastMessageText","currentUserId","preview","sendID","formatTimestamp","ts","date","Date","isNaN","getTime","now","today","getFullYear","getMonth","getDate","yesterday","dateOnly","h","getHours","m","getMinutes","daysAgo","dayNames","getDay","d","mo"],"sourceRoot":"../../../../src","sources":["components/ThreadCard/thread-card.utils.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,+BAA+B;AAE3D,SAASC,gBAAgB,QAAQ,wBAAqB;AAEtD,MAAMC,kBAAkB,GAAIC,OAAqB,IAAa;EAC5D,IAAIA,OAAO,CAACC,QAAQ,EAAEC,OAAO,EAAE,OAAOF,OAAO,CAACC,QAAQ,CAACC,OAAO;EAC9D,IAAI;IACF,MAAMC,MAAM,GAAGC,IAAI,CAACC,KAAK,CAACL,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AC,CAAC,EAAE,GAAG,CAAC;IACpD,MAAMgE,EAAE,GAAG,CAACnB,IAAI,CAACO,QAAQ,CAAC,CAAC,GAAG,CAAC,EAAErD,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC;IAC5D,OAAO,GAAG+D,CAAC,IAAIC,EAAE,EAAE;EACrB,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import type { DMessageItem } from '../../types/chat';
2
- export declare const getLastMessageText: (message: DMessageItem | undefined, currentUserId?: string) => string;
3
- export declare const formatTimestamp: (ts: number | string | null) => string;
4
- //# sourceMappingURL=thread-card.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"thread-card.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/thread-card.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAoGrD,eAAO,MAAM,kBAAkB,GAC7B,SAAS,YAAY,GAAG,SAAS,EACjC,gBAAgB,MAAM,KACrB,MAYF,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,IAAI,MAAM,GAAG,MAAM,GAAG,IAAI,KAAG,MAwC5D,CAAC"}