@cometchat/chat-uikit-react-native 5.2.2 → 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 (79) hide show
  1. package/package.json +1 -1
  2. package/src/CometChatConversations/CometChatConversations.tsx +170 -91
  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 +603 -65
  7. package/src/CometChatMessageList/style.ts +47 -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/CometChatUIEventHandler.ts +3 -0
  25. package/src/shared/events/CometChatUIEventHandler/Listener.ts +8 -0
  26. package/src/shared/events/ListenerInitializer.ts +3 -0
  27. package/src/shared/events/messages.ts +1 -0
  28. package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +158 -27
  29. package/src/shared/framework/DataSource.ts +7 -0
  30. package/src/shared/framework/DataSourceDecorator.tsx +12 -0
  31. package/src/shared/framework/MessageDataSource.tsx +182 -1
  32. package/src/shared/helper/functions.js +0 -67
  33. package/src/shared/helper/helperFunctions.ts +73 -0
  34. package/src/shared/icons/components/documents.tsx +23 -0
  35. package/src/shared/icons/components/empty-search.tsx +52 -0
  36. package/src/shared/icons/components/message-blocked.tsx +32 -0
  37. package/src/shared/icons/components/unread.tsx +29 -0
  38. package/src/shared/icons/icon-mapping.tsx +9 -0
  39. package/src/shared/index.ts +2 -1
  40. package/src/shared/modals/CometChatMessageTemplate.ts +23 -0
  41. package/src/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.ts +4 -4
  42. package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +22 -4
  43. package/src/shared/resources/CometChatLocalizeNew/resources/en/translation.json +75 -36
  44. package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +65 -27
  45. package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +42 -4
  46. package/src/shared/resources/CometChatLocalizeNew/resources/hi/translation.json +66 -27
  47. package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +42 -4
  48. package/src/shared/resources/CometChatLocalizeNew/resources/it/translation.json +43 -4
  49. package/src/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +43 -4
  50. package/src/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +43 -4
  51. package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +45 -7
  52. package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +42 -4
  53. package/src/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +43 -4
  54. package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +42 -4
  55. package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +42 -4
  56. package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +43 -5
  57. package/src/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +43 -4
  58. package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +42 -4
  59. package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +45 -7
  60. package/src/shared/utils/CometChatMessagePreview/CometChatMessagePreview.tsx +274 -23
  61. package/src/shared/utils/MessageReceiptUtils.ts +32 -0
  62. package/src/shared/utils/MessageUtils.tsx +106 -4
  63. package/src/shared/views/CometChatAudioBubble/style.ts +0 -2
  64. package/src/shared/views/CometChatFileBubble/style.ts +0 -4
  65. package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +1 -0
  66. package/src/shared/views/CometChatList/CometChatList.tsx +12 -0
  67. package/src/shared/views/CometChatList/Header.tsx +79 -49
  68. package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +14 -4
  69. package/src/shared/views/CometChatReportDialog/CometChatReportDialog.tsx +390 -0
  70. package/src/shared/views/CometChatReportDialog/index.ts +3 -0
  71. package/src/shared/views/CometChatReportDialog/style.ts +164 -0
  72. package/src/shared/views/CometChatStatusIndicator/private.png +0 -0
  73. package/src/shared/views/CometChatStatusIndicator/protected.png +0 -0
  74. package/src/shared/views/CometChatStatusIndicator/styles.ts +2 -2
  75. package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +18 -2
  76. package/src/shared/views/index.ts +6 -0
  77. package/src/theme/default/default.ts +3 -0
  78. package/src/theme/provider.tsx +7 -5
  79. package/src/theme/type.ts +21 -1
@@ -392,6 +392,26 @@ export const getMessageListStylesLight = (
392
392
  borderRadius: spacing.radius.r3,
393
393
  minWidth: 90,
394
394
  },
395
+ moderationStyle: {
396
+ containerStyle: {
397
+ backgroundColor: "#F9EAEF",
398
+ paddingVertical: 6,
399
+ borderBottomLeftRadius: 8,
400
+ borderBottomRightRadius: 8,
401
+ borderTopLeftRadius: 0,
402
+ borderTopRightRadius: 0,
403
+ flexDirection: "row",
404
+ alignItems: "center",
405
+ },
406
+ textStyle: {
407
+ color: color?.error,
408
+ ...typography?.body?.regular,
409
+ flexShrink: 1,
410
+ paddingHorizontal: 2,
411
+ alignSelf: "center",
412
+ },
413
+ iconTintColor: color?.error,
414
+ },
395
415
  dateStyles: {
396
416
  containerStyle: {
397
417
  paddingTop: spacing.padding.p2,
@@ -469,12 +489,14 @@ export const getMessageListStylesLight = (
469
489
  padding: spacing.padding.p1,
470
490
  paddingBottom: spacing.padding.p0,
471
491
  borderRadius: spacing.radius.r3,
492
+ overflow: "hidden",
472
493
  },
473
494
  imageStyle: {
474
495
  borderRadius: spacing.radius.r2,
475
496
  backgroundColor: color.background3,
476
497
  height: 232,
477
- width: 232,
498
+ width: '100%',
499
+ minWidth: 232,
478
500
  },
479
501
  dateReceiptContainerStyle: {
480
502
  paddingRight: spacing.padding.p1,
@@ -874,6 +896,27 @@ export const getMessageListStylesDark = (
874
896
  borderRadius: spacing.radius.r3,
875
897
  minWidth: 90,
876
898
  },
899
+ moderationStyle: {
900
+ containerStyle: {
901
+ backgroundColor: "#3A0C05",
902
+ paddingVertical: 6,
903
+ borderBottomLeftRadius: 8,
904
+ borderBottomRightRadius: 8,
905
+ borderTopLeftRadius: 0,
906
+ borderTopRightRadius: 0,
907
+ flexDirection: "row",
908
+ alignItems: "center",
909
+ overflow: 'hidden',
910
+ },
911
+ textStyle: {
912
+ color: color?.error,
913
+ ...typography?.body?.regular,
914
+ flexShrink: 1,
915
+ paddingHorizontal: 2,
916
+ alignSelf: "center",
917
+ },
918
+ iconTintColor: color?.error,
919
+ },
877
920
  dateStyles: {
878
921
  containerStyle: {
879
922
  paddingTop: spacing.padding.p2,
@@ -951,12 +994,14 @@ export const getMessageListStylesDark = (
951
994
  padding: spacing.padding.p1,
952
995
  paddingBottom: spacing.padding.p0,
953
996
  borderRadius: spacing.radius.r3,
997
+ overflow: "hidden",
954
998
  },
955
999
  imageStyle: {
956
1000
  borderRadius: spacing.radius.r2,
957
1001
  backgroundColor: color.background3,
958
1002
  height: 232,
959
- width: 232,
1003
+ width: '100%',
1004
+ minWidth: 232,
960
1005
  },
961
1006
  dateReceiptContainerStyle: {
962
1007
  paddingRight: spacing.padding.p1,