@cometchat/chat-uikit-react-native 5.2.3 → 5.2.4

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 (75) hide show
  1. package/package.json +1 -1
  2. package/src/CometChatConversations/CometChatConversations.tsx +167 -86
  3. package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +312 -116
  4. package/src/CometChatMessageComposer/styles.tsx +2 -1
  5. package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +83 -17
  6. package/src/CometChatMessageList/CometChatMessageList.tsx +549 -70
  7. package/src/CometChatMessageList/style.ts +4 -2
  8. package/src/CometChatSearch/CometChatSearch.tsx +1718 -0
  9. package/src/CometChatSearch/SearchConstants.ts +46 -0
  10. package/src/CometChatSearch/Skeleton.tsx +192 -0
  11. package/src/CometChatSearch/index.ts +1 -0
  12. package/src/CometChatSearch/style.ts +414 -0
  13. package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +43 -7
  14. package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +45 -7
  15. package/src/extensions/Polls/Polls.tsx +36 -2
  16. package/src/extensions/Polls/PollsBubble.tsx +13 -9
  17. package/src/extensions/Polls/PollsDecorator.tsx +13 -1
  18. package/src/extensions/Stickers/StickersExtensionDecorator.tsx +50 -11
  19. package/src/extensions/Stickers/style.ts +0 -1
  20. package/src/index.ts +5 -0
  21. package/src/shared/base/Types.ts +8 -0
  22. package/src/shared/constants/UIKitConstants.ts +2 -0
  23. package/src/shared/events/CometChatMessageEvents/index.ts +8 -7
  24. package/src/shared/events/CometChatUIEventHandler/Listener.ts +4 -0
  25. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +158 -27
  26. package/src/shared/framework/DataSource.ts +7 -0
  27. package/src/shared/framework/DataSourceDecorator.tsx +12 -0
  28. package/src/shared/framework/MessageDataSource.tsx +182 -1
  29. package/src/shared/helper/functions.js +0 -67
  30. package/src/shared/helper/helperFunctions.ts +73 -0
  31. package/src/shared/icons/components/documents.tsx +23 -0
  32. package/src/shared/icons/components/empty-search.tsx +52 -0
  33. package/src/shared/icons/components/message-blocked.tsx +1 -1
  34. package/src/shared/icons/components/unread.tsx +29 -0
  35. package/src/shared/icons/icon-mapping.tsx +7 -0
  36. package/src/shared/index.ts +2 -1
  37. package/src/shared/modals/CometChatMessageTemplate.ts +23 -0
  38. package/src/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.ts +4 -4
  39. package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +17 -1
  40. package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +70 -34
  41. package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +60 -24
  42. package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +37 -1
  43. package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +60 -24
  44. package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +37 -1
  45. package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +37 -1
  46. package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +37 -1
  47. package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +37 -1
  48. package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +40 -4
  49. package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +37 -1
  50. package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +37 -1
  51. package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +37 -1
  52. package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +37 -1
  53. package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +38 -2
  54. package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +37 -1
  55. package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +37 -1
  56. package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +40 -4
  57. package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +274 -23
  58. package/src/shared/utils/MessageUtils.tsx +0 -1
  59. package/src/shared/views/CometChatAudioBubble/style.ts +0 -2
  60. package/src/shared/views/CometChatFileBubble/style.ts +0 -4
  61. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +1 -0
  62. package/src/shared/views/CometChatList/CometChatList.tsx +12 -0
  63. package/src/shared/views/CometChatList/Header.tsx +79 -49
  64. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
  65. package/src/shared/views/CometChatReportDialog/CometChatReportDialog.tsx +390 -0
  66. package/src/shared/views/CometChatReportDialog/index.ts +3 -0
  67. package/src/shared/views/CometChatReportDialog/style.ts +164 -0
  68. package/src/shared/views/CometChatStatusIndicator/private.png +0 -0
  69. package/src/shared/views/CometChatStatusIndicator/protected.png +0 -0
  70. package/src/shared/views/CometChatStatusIndicator/styles.ts +2 -2
  71. package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +18 -2
  72. package/src/shared/views/index.ts +6 -0
  73. package/src/theme/default/default.ts +3 -0
  74. package/src/theme/provider.tsx +7 -5
  75. package/src/theme/type.ts +2 -0
@@ -1,5 +1,8 @@
1
1
  import React from "react";
2
2
  import { DeepPartial } from "./types";
3
+ import { useCometChatTranslation } from "../resources/CometChatLocalizeNew";
4
+ import { localizedDateHelperInstance } from "./LocalizedDateHelper";
5
+ import dayjs from "dayjs";
3
6
 
4
7
  export function deepMerge<
5
8
  T extends Record<string, any>,
@@ -70,3 +73,73 @@ export function deepClone<T>(obj: T, seen = new WeakMap()): T {
70
73
 
71
74
  return clone as T;
72
75
  }
76
+
77
+ export function getLastSeenTime(timestamp: number | null | undefined): string {
78
+ try {
79
+ if (timestamp === null || timestamp === undefined) {
80
+ // Move the hook call inside the function, just like in functions.js
81
+ const { t } = useCometChatTranslation();
82
+ return t("LAST_SEEN_UNKNOWN");
83
+ }
84
+
85
+ // Convert to milliseconds if in seconds
86
+ if (String(timestamp).length === 10) {
87
+ timestamp *= 1000;
88
+ }
89
+
90
+ // Get user's current language from the translation hook (exactly like functions.js)
91
+ const { language, t } = useCometChatTranslation();
92
+
93
+ // Set the appropriate Day.js locale
94
+ dayjs.locale(language);
95
+
96
+ const now = dayjs();
97
+ const lastSeenTime = dayjs(timestamp);
98
+ const diffInMinutes = now.diff(lastSeenTime, "minute");
99
+ const diffInHours = now.diff(lastSeenTime, "hour");
100
+ const diffInDays = now.diff(lastSeenTime, "day");
101
+
102
+ // For very recent times (< 1 min) → "a few seconds ago"
103
+ if (diffInMinutes < 1) {
104
+ const relativeTimeString = lastSeenTime.fromNow();
105
+ // Day.js will give "a few seconds ago" localized
106
+ return `${t("LAST_SEEN")} ${relativeTimeString}`;
107
+ }
108
+
109
+ // For times less than 24 hours → relative ("X minutes ago", "X hours ago")
110
+ if (diffInHours < 24) {
111
+ const relativeTimeString = lastSeenTime.fromNow();
112
+ return `${t("LAST_SEEN")} ${relativeTimeString}`;
113
+ }
114
+
115
+ // For yesterday with time
116
+ if (diffInDays === 1) {
117
+ const timeFormat = localizedDateHelperInstance.getFormattedDate(
118
+ timestamp,
119
+ "timeFormat",
120
+ language
121
+ );
122
+ return `${t("LAST_SEEN")} ${t("YESTERDAY")} ${timeFormat}`;
123
+ }
124
+
125
+ // For dates within the past week → weekday + time
126
+ if (diffInDays < 7) {
127
+ const formattedDate = localizedDateHelperInstance.getFormattedDate(
128
+ timestamp,
129
+ "dayWeekDayDateTimeFormat",
130
+ language
131
+ );
132
+ return `${t("LAST_SEEN")} ${formattedDate}`;
133
+ }
134
+
135
+ // Older dates → full date + time
136
+ return `${t("LAST_SEEN")} ${localizedDateHelperInstance.getFormattedDate(
137
+ timestamp,
138
+ "dayDateTimeFormat",
139
+ language
140
+ )}`;
141
+ } catch (e) {
142
+ console.log(e);
143
+ return "";
144
+ }
145
+ }
@@ -0,0 +1,23 @@
1
+ import * as React from "react";
2
+ import Svg, { Path } from "react-native-svg";
3
+
4
+ const DocumentIcon = (props: any) => (
5
+ <Svg
6
+ width={16}
7
+ height={16}
8
+ viewBox="0 0 16 16"
9
+ fill="none"
10
+ {...props}
11
+ >
12
+ <Path
13
+ d="M12.6667 3.33333V12.6667H3.33333V3.33333H12.6667ZM12.6667 2H3.33333C2.6 2 2 2.6 2 3.33333V12.6667C2 13.4 2.6 14 3.33333 14H12.6667C13.4 14 14 13.4 14 12.6667V3.33333C14 2.6 13.4 2 12.6667 2Z"
14
+ fill="#A1A1A1"
15
+ />
16
+ <Path
17
+ d="M9.33333 11.3333H4.66667V10H9.33333V11.3333ZM11.3333 8.66667H4.66667V7.33333H11.3333V8.66667ZM11.3333 6H4.66667V4.66667H11.3333V6Z"
18
+ fill="#A1A1A1"
19
+ />
20
+ </Svg>
21
+ );
22
+
23
+ export default DocumentIcon;
@@ -0,0 +1,52 @@
1
+ import React from "react";
2
+ import Svg, { G, Path, Defs, ClipPath, Rect } from "react-native-svg";
3
+ import type { SvgProps } from "react-native-svg";
4
+
5
+ const SvgComponent = ({ width = 120, height = 120, ...props }: SvgProps) => (
6
+ <Svg
7
+ width={width}
8
+ height={height}
9
+ viewBox="0 0 120 120"
10
+ fill="none"
11
+ {...props}
12
+ >
13
+ <G clipPath="url(#clip0_15027_349483)">
14
+ <Path
15
+ opacity={0.2}
16
+ d="M105 45.2598H97.5V64.0098C97.5 74.3635 89.1037 82.7598 78.75 82.7598H45V90.2598C45 98.5435 51.7162 105.26 60 105.26H82.5L98.85 118.872C100.44 120.196 102.806 119.982 104.13 118.392C104.692 117.717 105 116.866 105 115.985V105.26C113.284 105.26 120 98.5435 120 90.2598V60.2598C120 51.976 113.284 45.2598 105 45.2598Z"
17
+ fill="#DCDCDC"
18
+ />
19
+ <Path
20
+ opacity={0.2}
21
+ d="M75 0.259766H15C6.71625 0.259766 0 6.97602 0 15.2598V60.2598C0 68.5435 6.71625 75.2598 15 75.2598V89.6223C15 91.6923 16.68 93.3723 18.75 93.3723C19.6425 93.3723 20.5088 93.0535 21.1875 92.4723L41.25 75.2598H75C83.2838 75.2598 90 68.5435 90 60.2598V15.2598C90 6.97602 83.2838 0.259766 75 0.259766ZM27.7875 43.0473C27.4575 43.411 27.0788 43.726 26.6625 43.9848C26.2575 44.2585 25.8337 44.4985 25.3875 44.6973C24.9225 44.8698 24.4462 45.0085 23.9625 45.1098C23.4825 45.2148 22.9912 45.2635 22.5 45.2598C18.3563 45.2598 15 41.9035 15 37.7598C14.9213 33.6198 18.2138 30.196 22.3538 30.1173C22.8937 30.106 23.4338 30.1548 23.9625 30.2598C24.4462 30.361 24.9225 30.4998 25.3875 30.6723C25.8412 30.8598 26.2688 31.096 26.6625 31.3848C27.0713 31.6435 27.4462 31.9435 27.7875 32.2848C29.2425 33.7323 30.0413 35.7085 30 37.7598C29.9925 39.7473 29.1975 41.6485 27.7875 43.0473ZM50.2875 43.0473C48.8887 44.4573 46.9875 45.2523 45 45.2598C44.5125 45.316 44.025 45.316 43.5375 45.2598C43.0537 45.1585 42.5775 45.0198 42.1125 44.8473C41.6662 44.6485 41.2425 44.4085 40.8375 44.1348C40.4175 43.8648 40.0275 43.5535 39.675 43.1973C38.2425 41.7535 37.4588 39.7923 37.5 37.7598C37.4437 37.2723 37.4437 36.7848 37.5 36.2973C37.6012 35.8135 37.74 35.3373 37.9125 34.8723C38.1 34.4185 38.3363 33.991 38.625 33.5973C38.8913 33.1848 39.195 32.7948 39.525 32.4348C39.885 32.1048 40.275 31.801 40.6875 31.5348C41.0813 31.246 41.5087 31.0098 41.9625 30.8223C42.4725 30.5898 42.9975 30.4023 43.5375 30.2598C47.5987 29.4498 51.5475 32.0898 52.3575 36.151C52.4625 36.6798 52.5112 37.2198 52.5 37.7598C52.5 39.7398 51.72 41.641 50.325 43.0473H50.2875ZM72.7875 43.0473C72.4575 43.411 72.0788 43.726 71.6625 43.9848C71.2575 44.2585 70.8338 44.4985 70.3875 44.6973C69.9225 44.8698 69.4463 45.0085 68.9625 45.1098C68.4825 45.2148 67.9912 45.2635 67.5 45.2598C63.3563 45.2598 60 41.9035 60 37.7598C59.9212 33.6198 63.2138 30.196 67.3538 30.1173C67.8938 30.106 68.4337 30.1548 68.9625 30.2598C69.4463 30.361 69.9225 30.4998 70.3875 30.6723C70.8413 30.8598 71.2688 31.096 71.6625 31.3848C72.0713 31.6435 72.4463 31.9435 72.7875 32.2848C74.2425 33.7323 75.0413 35.7085 75 37.7598C74.9925 39.7473 74.1975 41.6485 72.7875 43.0473Z"
22
+ fill="#DCDCDC"
23
+ />
24
+ <Path
25
+ d="M47.7349 18.3633C41.9551 18.3602 36.3043 20.0713 31.497 23.2801C26.6898 26.4889 22.9422 31.0513 20.7283 36.3902C18.5143 41.7291 17.9334 47.6047 19.0591 53.2738C20.1847 58.9429 22.9664 64.1508 27.0522 68.2389C31.138 72.3269 36.3445 75.1114 42.013 76.2401C47.6815 77.3688 53.5574 76.7911 58.8975 74.58C64.2376 72.3688 68.802 68.6237 72.0134 63.8182C75.2248 59.0127 76.9389 53.3628 76.9389 47.583C76.9389 39.8362 73.8626 32.4064 68.3862 26.9271C62.9099 21.4478 55.4817 18.3674 47.7349 18.3633Z"
26
+ fill="white"
27
+ stroke="#A1A1A1"
28
+ strokeWidth={1.57011}
29
+ strokeLinecap="round"
30
+ strokeLinejoin="round"
31
+ />
32
+ <Path
33
+ d="M68.5233 68.7793L76.311 76.567"
34
+ stroke="#A1A1A1"
35
+ strokeWidth={1.57011}
36
+ strokeLinecap="round"
37
+ strokeLinejoin="round"
38
+ />
39
+ <Path
40
+ d="M75.4307 72.784L73.0113 75.3149C71.9267 76.4494 71.9672 78.2483 73.1017 79.3329L94.0982 99.4046C95.2328 100.489 97.0317 100.449 98.1163 99.3142L100.536 96.7832C101.62 95.6487 101.58 93.8498 100.445 92.7652L79.4487 72.6935C78.3142 71.6089 76.5153 71.6494 75.4307 72.784Z"
41
+ fill="#A1A1A1"
42
+ />
43
+ </G>
44
+ <Defs>
45
+ <ClipPath id="clip0_15027_349483">
46
+ <Rect width={120} height={120} fill="white" />
47
+ </ClipPath>
48
+ </Defs>
49
+ </Svg>
50
+ );
51
+
52
+ export default SvgComponent;
@@ -23,7 +23,7 @@ const SvgComponent = ({ height, width, color }: SvgProps) => (
23
23
  </Mask>
24
24
  <G mask="url(#prefix__a)">
25
25
  <Path
26
- fill="#F44649"
26
+ fill={color}
27
27
  d="M2.283 13.667a.583.583 0 0 1-.514-.301.64.64 0 0 1-.086-.292.54.54 0 0 1 .085-.311l5.707-9.859a.6.6 0 0 1 .524-.301q.154 0 .293.073.14.074.232.228l5.707 9.859q.093.153.085.31a.64.64 0 0 1-.296.51.57.57 0 0 1-.304.084zm5.716-1.795q.229 0 .384-.155a.52.52 0 0 0 .155-.384.52.52 0 0 0-.155-.383.52.52 0 0 0-.384-.155.52.52 0 0 0-.383.155.52.52 0 0 0-.155.383q0 .229.155.384a.52.52 0 0 0 .383.155m0-1.744q.213 0 .357-.144a.48.48 0 0 0 .143-.356V7.295a.48.48 0 0 0-.143-.356.48.48 0 0 0-.357-.144.48.48 0 0 0-.356.144.48.48 0 0 0-.144.356v2.333q0 .213.144.356a.48.48 0 0 0 .357.144"
28
28
  />
29
29
  </G>
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import Svg, { Path } from "react-native-svg";
3
+
4
+ const CommentIcon = (props: any) => (
5
+ <Svg
6
+ width={16}
7
+ height={16}
8
+ viewBox="0 0 16 16"
9
+ fill="none"
10
+ {...props}
11
+ >
12
+ <Path
13
+ d="M13.3334 11.3337H2.66671V3.33366H9.40004C9.34671 3.07366 9.28004 2.59366 9.40004 2.00033H2.66671C1.93337 2.00033 1.33337 2.60033 1.33337 3.33366V15.3337L4.00004 12.667H13.3334C14.0667 12.667 14.6667 12.067 14.6667 11.3337V5.32033C14.28 5.61366 13.8267 5.83366 13.3334 5.93366V11.3337Z"
14
+ fill="#A1A1A1"
15
+ />
16
+ <Path
17
+ d="M12.6667 4.66699C13.7713 4.66699 14.6667 3.77156 14.6667 2.66699C14.6667 1.56242 13.7713 0.666992 12.6667 0.666992C11.5621 0.666992 10.6667 1.56242 10.6667 2.66699C10.6667 3.77156 11.5621 4.66699 12.6667 4.66699Z"
18
+ fill="#A1A1A1"
19
+ />
20
+ <Path d="M9.33337 8.66699H4.00004V10.0003H9.33337V8.66699Z" fill="#A1A1A1" />
21
+ <Path d="M12 6.66699H4.00004V8.00033H12V6.66699Z" fill="#A1A1A1" />
22
+ <Path
23
+ d="M4.00004 6.00033H12V5.93366C11.1934 5.76699 10.5 5.30033 10.02 4.66699H4.00004V6.00033Z"
24
+ fill="#A1A1A1"
25
+ />
26
+ </Svg>
27
+ );
28
+
29
+ export default CommentIcon;
@@ -310,6 +310,10 @@ import AISendButton from "./components/ai-send-button";
310
310
  import AINewChatButton from "./components/ai-new-chat";
311
311
  import AIChatHistory from "./components/ai-chat-history";
312
312
  import AICopyOption from "./components/ai-copy-option";
313
+ import EmptySearch from "./components/empty-search";
314
+ import Unread from "./components/unread";
315
+ import DocumentIcon from "./components/documents";
316
+
313
317
  import MessageBlocked from "./components/message-blocked";
314
318
 
315
319
  /**************************************** */
@@ -631,6 +635,9 @@ export const ICONS = {
631
635
  "ai-chat-history": AIChatHistory,
632
636
  "ai-copy-option": AICopyOption,
633
637
 
638
+ "empty-search": EmptySearch,
639
+ "unread":Unread,
640
+ "documents":DocumentIcon,
634
641
  "message-blocked": MessageBlocked,
635
642
 
636
643
  } as const;
@@ -50,6 +50,7 @@ export {
50
50
  CometChatBadge,
51
51
  CometChatBottomSheet,
52
52
  CometChatConfirmDialog,
53
+ CometChatReportDialog,
53
54
  CometChatDate,
54
55
  CometChatEmojiKeyboard,
55
56
  CometChatFileBubble,
@@ -111,4 +112,4 @@ export { getCometChatTranslation, getCurrentLanguage} from "./resources/CometCha
111
112
  export { useLocalizedDate } from "./helper/useLocalizedDateHook";
112
113
  export { LocalizedDateHelper } from "./helper/LocalizedDateHelper";
113
114
  export { useCometChatTranslation } from "./resources/CometChatLocalizeNew/useCometChatTranslationHook";
114
- export {getLastSeenTime} from "./helper/functions";
115
+ export {getLastSeenTime} from "./helper/helperFunctions";
@@ -84,6 +84,17 @@ interface MessageTemplateInterface {
84
84
  alignment: MessageBubbleAlignmentType
85
85
  ) => JSX.Element | null;
86
86
 
87
+ /**
88
+ * The reply view of the message template for displaying quoted messages.
89
+ * @param messageObject - The message object.
90
+ * @param alignment - The alignment of the message bubble.
91
+ * @returns The JSX element representing the reply view.
92
+ */
93
+ ReplyView?: (
94
+ messageObject: CometChat.BaseMessage,
95
+ alignment: MessageBubbleAlignmentType
96
+ ) => JSX.Element | null;
97
+
87
98
  /**
88
99
  * The options of the message template.
89
100
  * @param loggedInUser - The logged in user.
@@ -171,6 +182,16 @@ export class CometChatMessageTemplate implements MessageTemplateInterface {
171
182
  messageObject: CometChat.BaseMessage,
172
183
  alignment: MessageBubbleAlignmentType
173
184
  ) => JSX.Element | null;
185
+ /**
186
+ * The reply view of the message template for displaying quoted messages.
187
+ * @param messageObject - The message object.
188
+ * @param alignment - The alignment of the message bubble.
189
+ * @returns The JSX element representing the reply view.
190
+ */
191
+ ReplyView?: (
192
+ messageObject: CometChat.BaseMessage,
193
+ alignment: MessageBubbleAlignmentType
194
+ ) => JSX.Element | null;
174
195
  /**
175
196
  * The options of the message template.
176
197
  * @param loggedInUser - The logged in user.
@@ -199,6 +220,7 @@ export class CometChatMessageTemplate implements MessageTemplateInterface {
199
220
  LeadingView,
200
221
  StatusInfoView,
201
222
  FooterView,
223
+ ReplyView,
202
224
  options,
203
225
  }: MessageTemplateInterface) {
204
226
  this.category = category;
@@ -210,6 +232,7 @@ export class CometChatMessageTemplate implements MessageTemplateInterface {
210
232
  this.LeadingView = LeadingView;
211
233
  this.StatusInfoView = StatusInfoView;
212
234
  this.FooterView = FooterView;
235
+ this.ReplyView = ReplyView;
213
236
  this.options = options;
214
237
  }
215
238
  }
@@ -68,9 +68,9 @@ export const translate = (
68
68
  }
69
69
 
70
70
 
71
- const defaultTranslation = defaultTranslations[language as SupportedLanguage];
71
+ const defaultTranslation: { [key: string]: string } = defaultTranslations[language as SupportedLanguage] as { [key: string]: string };
72
72
  if (defaultTranslation && key in defaultTranslation) {
73
- return defaultTranslation[key as TranslationKey];
73
+ return defaultTranslation[key];
74
74
  }
75
75
 
76
76
 
@@ -80,9 +80,9 @@ export const translate = (
80
80
 
81
81
 
82
82
  if (language !== fallbackLanguage) {
83
- const fallbackTranslation = defaultTranslations[fallbackLanguage as SupportedLanguage];
83
+ const fallbackTranslation: { [key: string]: string } = defaultTranslations[fallbackLanguage as SupportedLanguage] as { [key: string]: string };
84
84
  if (fallbackTranslation && key in fallbackTranslation) {
85
- return fallbackTranslation[key as TranslationKey];
85
+ return fallbackTranslation[key];
86
86
  }
87
87
  }
88
88
 
@@ -12,6 +12,8 @@
12
12
  "MESSAGE_PRIVATELY": "Private Nachricht",
13
13
  "TRANSLATE": "Übersetzen",
14
14
  "USERS": "Nutzer",
15
+ "MESSAGE_COMPOSER_MENTION_ALL": "Alle",
16
+ "MESSAGE_COMPOSER_MENTION_NOTIFY_EVERYONE_LABEL": "Alle in dieser Gruppe benachrichtigen",
15
17
  "CONVERSATION_DELETED":"Konversation gelöscht",
16
18
  "MESSAGE_COPIED": "Nachricht wurde in die Zwischenablage kopiert.",
17
19
  "MESSAGE_EDITED": "Nachricht wurde erfolgreich aktualisiert.",
@@ -454,6 +456,19 @@
454
456
  "MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} hat ${onName} zum ${role} ernannt",
455
457
  "YOU_DONT_HAVE_STICKERS_YET": "Du hast noch keine Sticker.",
456
458
  "meeting": "Besprechung",
459
+ "Flag_Message_Title": "Nachricht melden",
460
+ "Flag_Message_Subtitle": "Melden Sie diesen Chat, wenn er gegen unsere Gemeinschaftsstandards verstößt. Wir informieren den Account nicht, den Sie gemeldet haben.",
461
+ "Flag_Message_Remark_Label": "Grund",
462
+ "Flag_Message_Remark_Optional": "Optional",
463
+ "Flag_Message_Remark_Placeholder": "Geben Sie zusätzlichen Kontext für Ihre Meldung an…",
464
+ "Flag_Message_Confirm_Yes": "Melden",
465
+ "Flag_Message_Confirm_No": "Abbrechen",
466
+ "Flag_Message_Reason_Id_Spam": "Spam / Unerwünschte Inhalte",
467
+ "Flag_Message_Reason_Id_Sexual": "Explizite oder unangemessene Inhalte",
468
+ "Flag_Message_Reason_Id_Harassment": "Beleidigendes oder bedrohliches Verhalten",
469
+ "Message_List_Option_Flag_Message": "Melden",
470
+ "Flag_Error_Text":"Etwas ist schiefgelaufen. Bitte überprüfen Sie es und versuchen Sie es erneut.",
471
+ "Flag_Empty_Submit_Text":"Senden nicht möglich. Bitte wählen Sie einen Grund aus, bevor Sie diese Nachricht melden.",
457
472
  "START_REPORTING": "Bericht starten",
458
473
  "LOGOUT": "Abmelden",
459
474
  "AI_ASSISTANTS": "KI-Assistenten",
@@ -465,5 +480,6 @@
465
480
  "START_A_CHAT": "Beginnen Sie einen Chat, indem Sie auf die Schaltfläche 'Neuer Chat' tippen",
466
481
  "CHAT_HISTORY": "Chat-Verlauf",
467
482
  "ASK_ANYTHING": "Frag etwas...",
468
- "AI_ASSISTANT": "AI-Assistent"
483
+ "AI_ASSISTANT": "AI-Assistent",
484
+ "MESSAGE_REPORTED": "Nachricht gemeldet"
469
485
  }
@@ -12,6 +12,8 @@
12
12
  "SHARED": "Shared",
13
13
  "SOUND_MANAGER": "Sound Manager",
14
14
  "THEME": "Theme",
15
+ "MESSAGE_COMPOSER_MENTION_ALL": "all",
16
+ "MESSAGE_COMPOSER_MENTION_NOTIFY_EVERYONE_LABEL": "Notify everyone in this group",
15
17
  "DELETE_MSG_TEXT": "This message was deleted",
16
18
  "LOCALIZE": "Localize",
17
19
  "CONVERSATION_LIST_ITEM": "Conversation List Item",
@@ -27,7 +29,7 @@
27
29
  "CONVERSATIONS": "Conversations",
28
30
  "CONVERSATION_LIST": "Conversation List",
29
31
  "MESSAGES": "Messages",
30
- "WRONG_FILE_TYPE" :"You selected a different type of file. Please choose the appropriate file.",
32
+ "WRONG_FILE_TYPE": "You selected a different type of file. Please choose the appropriate file.",
31
33
  "MESSAGE_HEADER": "Message Header",
32
34
  "MESSAGE_LIST": "Message List",
33
35
  "MESSAGE_COMPOSER": "Message Composer",
@@ -72,7 +74,7 @@
72
74
  "MORE_TIMES": "More times",
73
75
  "MISSED_VOICE_CALL": "Missed voice call",
74
76
  "MEET_WITH": "Meet With",
75
- "CONVERSATION_DELETED" : "Conversation Deleted",
77
+ "CONVERSATION_DELETED": "Conversation Deleted",
76
78
  "MEETING_SCHEDULER": "Meeting Scheduler",
77
79
  "MISSED_VIDEO_CALL": "Missed video call",
78
80
  "CUSTOM_MESSAGE_POLL": "Poll",
@@ -134,9 +136,9 @@
134
136
  "THIS_MESSAGE_DELETED": "⚠️ This message was deleted",
135
137
  "MESSAGE_IS_DELETED": "Message is deleted",
136
138
  "MESSAGE_COPIED": "Message copied to clipboard.",
137
- "MESSAGE_EDITED" : "Message updated successfully.",
138
- "MESSAGE_DELETED_TEXT" : "Message deleted successfully.",
139
- "MESSAGE_TRANSLATED" : "Message translated successfully.",
139
+ "MESSAGE_EDITED": "Message updated successfully.",
140
+ "MESSAGE_DELETED_TEXT": "Message deleted successfully.",
141
+ "MESSAGE_TRANSLATED": "Message translated successfully.",
140
142
  "VIEW_ON_YOUTUBE": "View on Youtube",
141
143
  "SEARCH": "Search",
142
144
  "ERROR": "Error",
@@ -225,8 +227,8 @@
225
227
  "CHANGE_SCOPE": "Change Scope",
226
228
  "STICKER": "Sticker",
227
229
  "LAST_ACTIVE_AT": "Last Active At",
228
- "LAST_SEEN" : "Last seen",
229
- "AT" : "at",
230
+ "LAST_SEEN": "Last seen",
231
+ "AT": "at",
230
232
  "VOICE_CALL": "Voice call",
231
233
  "VIEW_DETAIL": "View Detail",
232
234
  "VOTES": "votes",
@@ -373,26 +375,26 @@
373
375
  "QUESTIONS": "Questions",
374
376
  "NO_STICKERS_AVAILABLE": "No Stickers Available",
375
377
  "NO_SUGGESTIONS_AVAILABLE": "No Suggestions Available",
376
- "GROUPS_EMPTY_STATE_MESSAGE" : "Create or join groups to see them listed here and start collaborating",
377
- "NO_USERS_AVAILABLE" : "No Users Available",
378
- "NO_GROUPS_AVAILABLE" : "No Groups Available",
379
- "NO_CALL_LOGS" : "No Call Logs Yet",
380
- "CALL_LOGS_EMPTY_MESSAGE" : "Make or receive calls to see your call history listed here",
381
- "NO_CONVERSATIONS" : "No Conversations Yet",
382
- "CONVERSATIONS_EMPTY_MESSAGE" : "Start a new chat or invite others to join the conversation.",
383
- "NO_GROUP_MEMBER_AVAILABLE" : "No Group Member Available",
384
- "OOPS!" : "OOPS!",
378
+ "GROUPS_EMPTY_STATE_MESSAGE": "Create or join groups to see them listed here and start collaborating",
379
+ "NO_USERS_AVAILABLE": "No Users Available",
380
+ "NO_GROUPS_AVAILABLE": "No Groups Available",
381
+ "NO_CALL_LOGS": "No Call Logs Yet",
382
+ "CALL_LOGS_EMPTY_MESSAGE": "Make or receive calls to see your call history listed here",
383
+ "NO_CONVERSATIONS": "No Conversations Yet",
384
+ "CONVERSATIONS_EMPTY_MESSAGE": "Start a new chat or invite others to join the conversation.",
385
+ "NO_GROUP_MEMBER_AVAILABLE": "No Group Member Available",
386
+ "OOPS!": "OOPS!",
385
387
  "GROUP_MSG_INFO_EMPTY_STATE_MESSAGE": "Waiting for recipients to receive and view the message",
386
- "GROUP_MEMBER_EMPTY_STATE_MESSAGE" : "Add contacts to see them listed here.",
387
- "REACHED_MAX_LIMIT":"You’ve reached the limit. You can add up to 12 options.",
388
- "REQUIRED_FIELDS_WARNING":"Please fill in all required fields before creating a poll.",
389
- "NOT_SUPPORTED" : "This message type is not supported",
388
+ "GROUP_MEMBER_EMPTY_STATE_MESSAGE": "Add contacts to see them listed here.",
389
+ "REACHED_MAX_LIMIT": "You’ve reached the limit. You can add up to 12 options.",
390
+ "REQUIRED_FIELDS_WARNING": "Please fill in all required fields before creating a poll.",
391
+ "NOT_SUPPORTED": "This message type is not supported",
390
392
  "NO_USERS_FOUND": "No Users Found",
391
- "USERS_EMPTY_STATE_MESSAGE": "We couldn’t find any users matching your search. Try adjusting your search.",
392
- "SAVE" : "Save",
393
+ "USERS_EMPTY_STATE_MESSAGE": "We couldn’t find any users matching your search. Try adjusting your search.",
394
+ "SAVE": "Save",
393
395
  "RETRY": "Retry",
394
- "TAP_TO_START_CONVERSATION" : "Tap to start conversation",
395
- "TEXT_TRANSLATED":"Text Translated",
396
+ "TAP_TO_START_CONVERSATION": "Tap to start conversation",
397
+ "TEXT_TRANSLATED": "Text Translated",
396
398
  "CAMERA": "Camera",
397
399
  "SHARE": "Share",
398
400
  "ATTACH_DOCUMENT": "Attach Document",
@@ -435,11 +437,11 @@
435
437
  "LEAVE_GROUP_TEXT": "Leave this group",
436
438
  "LEAVE_SURE": "Are you sure you want to leave the group? You won't receive any more messages from this chat.",
437
439
  "UNBAN_SURE": "Are you sure you want to unban this user?",
438
- "DELETE_THIS_CONVERSATION":"Delete this conversation?",
439
- "LINK" : "Link",
440
- "DELETE_THIS_MESSAGE":"Delete this Message?",
441
- "DELETE_MESSAGE_CONFIRM":"Are you sure you want to delete this message? This action cannot be undone.",
442
- "APP_CREDENTIALS" : "App Credentials",
440
+ "DELETE_THIS_CONVERSATION": "Delete this conversation?",
441
+ "LINK": "Link",
442
+ "DELETE_THIS_MESSAGE": "Delete this Message?",
443
+ "DELETE_MESSAGE_CONFIRM": "Are you sure you want to delete this message? This action cannot be undone.",
444
+ "APP_CREDENTIALS": "App Credentials",
443
445
  "REGION": "Region",
444
446
  "CHAT_PRIVATELY": "Chat Privately",
445
447
  "WRONG_TEXT":"Looks like something went wrong.",
@@ -454,6 +456,19 @@
454
456
  "MESSAGE_LIST_ACTION_SCOPE_CHANGED": "${byName} made ${onName} a ${role}",
455
457
  "YOU_DONT_HAVE_STICKERS_YET": "You don’t have any stickers yet.",
456
458
  "meeting": "Meeting",
459
+ "Flag_Message_Title": "Report a Message",
460
+ "Flag_Message_Subtitle": "Report this chat if it goes against our Community Standards. We won't tell the account you reported them.",
461
+ "Flag_Message_Remark_Label": "Reason",
462
+ "Flag_Message_Remark_Optional": "Optional",
463
+ "Flag_Message_Remark_Placeholder": "Provide additional context for your report...",
464
+ "Flag_Message_Confirm_Yes": "Report",
465
+ "Flag_Message_Confirm_No": "Cancel",
466
+ "Flag_Message_Reason_Id_Spam": "Spam / Unwanted Content",
467
+ "Flag_Message_Reason_Id_Sexual": "Explicit or inappropriate content",
468
+ "Flag_Message_Reason_Id_Harassment": "Insulting or threatening behavior",
469
+ "Message_List_Option_Flag_Message": "Report",
470
+ "Flag_Error_Text":"Something went wrong. Please check and try again.",
471
+ "Flag_Empty_Submit_Text":"Unable to submit. Please select a reason before reporting this message",
457
472
  "START_REPORTING": "Start Reporting",
458
473
  "LOGOUT": "Logout",
459
474
  "AI_ASSISTANTS": "AI Assistants",
@@ -461,9 +476,30 @@
461
476
  "EDIT_MODERATION": "Edit failed. Your message was blocked due to moderation policies.",
462
477
  "BLOCKED_MODERATION":"Your message was blocked due to moderation policies.",
463
478
  "NO_CONVERSATION_HISTORY_FOUND": "No conversation history found",
464
- "SOMETHING_WENT_WRONG_ON_OUR_END": "Something went wrong on our end. Please try again.",
465
- "START_A_CHAT": "Click the 'New Chat' button to start a chat.",
466
- "CHAT_HISTORY": "Chat History",
467
- "ASK_ANYTHING": "Ask anything...",
468
- "AI_ASSISTANT": "AI Assistant"
479
+ "SOMETHING_WENT_WRONG_ON_OUR_END": "Something went wrong on our end. Please try again.",
480
+ "START_A_CHAT": "Click the 'New Chat' button to start a chat.",
481
+ "CHAT_HISTORY": "Chat History",
482
+ "ASK_ANYTHING": "Ask anything...",
483
+ "AI_ASSISTANT": "AI Assistant",
484
+ "SEARCH_PLACEHOLDER": "Search...",
485
+ "SEARCH_NO_RESULTS_TITLE": "No Results",
486
+ "SEARCH_NO_RESULTS_SUBTITLE": "Start typing to search for messages and conversations",
487
+ "SEARCH_NO_RESULTS_FOUND_TITLE": "No Results Found",
488
+ "SEARCH_NO_RESULTS_FOUND_SUBTITLE": "We couldn't find any matches. Please try a different search keyword.",
489
+ "SEARCH_ERROR_LOADING_CONVERSATIONS": "Error Loading Conversations",
490
+ "SEARCH_ERROR_LOADING_MESSAGES": "Error Loading Messages",
491
+ "SEARCH_TRY_AGAIN": "Please try again later",
492
+ "SEARCH_SEE_MORE": "See More",
493
+ "SEARCH_LOADING": "Loading...",
494
+ "SEARCH_FILTER_UNREAD": "Unread",
495
+ "SEARCH_FILTER_GROUPS": "Groups",
496
+ "SEARCH_FILTER_PHOTOS": "Photos",
497
+ "SEARCH_FILTER_VIDEOS": "Videos",
498
+ "SEARCH_FILTER_LINKS": "Links",
499
+ "SEARCH_FILTER_DOCUMENTS": "Documents",
500
+ "SEARCH_FILTER_AUDIO": "Audio",
501
+ "SEARCH_FILTER_CONVERSATIONS": "Conversations",
502
+ "SEARCH_FILTER_MESSAGES": "Messages",
503
+ "SEARCH_NO_MESSAGES": "No messages",
504
+ "MESSAGE_REPORTED": "Message reported"
469
505
  }