@cometchat/chat-uikit-react-native 4.3.12 → 4.3.14
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/AI/AIConversationStarter/style.d.ts +8 -8
- package/lib/AI/style.d.ts +15 -15
- package/lib/CometChatAddMembers/CometChatAddMembers.js +1 -0
- package/lib/CometChatAddMembers/CometChatAddMembers.js.map +1 -1
- package/lib/CometChatDetails/CometChatDetails.js +4 -2
- package/lib/CometChatDetails/CometChatDetails.js.map +1 -1
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js +15 -4
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js.map +1 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +11 -3
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js +3 -1
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js.map +1 -1
- package/lib/CometChatMessageList/CometChatMessageList.js +3 -1
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/MessageListConfiguration.js +1 -0
- package/lib/CometChatMessageList/MessageListConfiguration.js.map +1 -1
- package/lib/calls/CallingPackage.d.ts +1 -1
- package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.d.ts +2 -2
- package/lib/extensions/ExtensionModerator.d.ts +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesView.d.ts +2 -2
- package/lib/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.d.ts +2 -2
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.js +5 -5
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.js.map +1 -1
- package/lib/extensions/ThumbnailGeneration/resources/index.d.ts +2 -2
- package/lib/extensions/ThumbnailGeneration/resources/index.js +2 -2
- package/lib/extensions/ThumbnailGeneration/resources/index.js.map +1 -1
- package/lib/shared/constants/UIKitConstants.d.ts +9 -0
- package/lib/shared/constants/UIKitConstants.js +12 -1
- package/lib/shared/constants/UIKitConstants.js.map +1 -1
- package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js +40 -1
- package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js.map +1 -1
- package/lib/shared/helper/SwipeRow.d.ts +5 -5
- package/lib/shared/helper/functions.d.ts +1 -1
- package/lib/shared/libs/ImageZoom/ReactNativeZoomableView.d.ts +8 -5
- package/lib/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.d.ts +2 -2
- package/lib/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.d.ts +1 -1
- package/lib/shared/libs/datePickerModal/DateTimePickerModal.d.ts +1 -1
- package/lib/shared/libs/datePickerModal/DateTimePickerModal.ios.d.ts +2 -2
- package/lib/shared/libs/datePickerModal/Modal.d.ts +3 -3
- package/lib/shared/libs/luxon/src/datetime.d.ts +81 -81
- package/lib/shared/libs/luxon/src/duration.d.ts +24 -24
- package/lib/shared/libs/luxon/src/impl/english.d.ts +3 -3
- package/lib/shared/libs/luxon/src/impl/locale.d.ts +1 -1
- package/lib/shared/libs/luxon/src/impl/util.d.ts +7 -7
- package/lib/shared/libs/luxon/src/info.d.ts +28 -28
- package/lib/shared/libs/luxon/src/interval.d.ts +14 -14
- package/lib/shared/libs/luxon/src/settings.d.ts +2 -2
- package/lib/shared/libs/luxon/src/zones/IANAZone.d.ts +1 -1
- package/lib/shared/libs/luxon/src/zones/invalidZone.d.ts +1 -1
- package/lib/shared/libs/luxon/src/zones/systemZone.d.ts +1 -1
- package/lib/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.d.ts +8 -8
- package/lib/shared/resources/CometChatSoundManager/CometChatSoundManager.d.ts +2 -2
- package/lib/shared/resources/CometChatTheme/CometChatTheme.d.ts +2 -2
- package/lib/shared/resources/CometChatTheme/Palette.d.ts +24 -24
- package/lib/shared/resources/CometChatTheme/Typography.d.ts +23 -23
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.d.ts +1 -1
- package/lib/shared/utils/CometChatMessagePreview/MessagePreviewConfiguration.d.ts +3 -3
- package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.d.ts +10 -10
- package/lib/shared/utils/DetailsUtils/DetailsUtils.d.ts +1 -1
- package/lib/shared/utils/SchedulerUtils.d.ts +4 -4
- package/lib/shared/views/CometChatActionSheet/ActionItem.d.ts +9 -9
- package/lib/shared/views/CometChatActionSheet/CometChatActionSheet.d.ts +3 -3
- package/lib/shared/views/CometChatDate/CometChatDate.d.ts +1 -1
- package/lib/shared/views/CometChatEmojiKeyboard/Emoji.d.ts +1 -1
- package/lib/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.d.ts +3 -3
- package/lib/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.d.ts +3 -3
- package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js +8 -2
- package/lib/shared/views/CometChatImageBubble/CometChatImageBubble.js.map +1 -1
- package/lib/shared/views/CometChatList/CometChatList.js +0 -1
- package/lib/shared/views/CometChatList/CometChatList.js.map +1 -1
- package/lib/shared/views/CometChatMessageBubble/style.js +1 -0
- package/lib/shared/views/CometChatReactions/CometChatReactions.d.ts +1 -1
- package/lib/shared/views/CometChatReceipt/CometChatReceipt.d.ts +1 -1
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js +7 -1
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js.map +1 -1
- package/lib/shared/views/CometChatVideoBubble/VideoBubbleStyle.js +1 -1
- package/lib/shared/views/CometChatVideoBubble/VideoBubbleStyle.js.map +1 -1
- package/package.json +1 -1
- package/src/AI/AIConversationSummary/resources/close.png +0 -0
- package/src/CometChatConversations/CometChatConversations.tsx +85 -72
- package/src/CometChatConversations/resources/close.png +0 -0
- package/src/CometChatConversations/resources/rightTick.png +0 -0
- package/src/CometChatCreateGroup/resources/close.png +0 -0
- package/src/CometChatCreateGroup/resources/rightTick.png +0 -0
- package/src/CometChatDetails/CometChatDetails.tsx +4 -2
- package/src/CometChatDetails/resources/close.png +0 -0
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +26 -11
- package/src/CometChatGroupMembers/resources/rightTick.png +0 -0
- package/src/CometChatGroups/resources/close.png +0 -0
- package/src/CometChatGroups/resources/rightTick.png +0 -0
- package/src/CometChatJoinProtectedGroup/resources/close.png +0 -0
- package/src/CometChatJoinProtectedGroup/resources/rightTick.png +0 -0
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +43 -48
- package/src/CometChatMessageComposer/resources/Info.png +0 -0
- package/src/CometChatMessageComposer/resources/circle_add.png +0 -0
- package/src/CometChatMessageComposer/resources/close.png +0 -0
- package/src/CometChatMessageComposer/resources/image.png +0 -0
- package/src/CometChatMessageComposer/resources/send_message.png +0 -0
- package/src/CometChatMessageComposer/resources/stickers.png +0 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +1 -1
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +9 -6
- package/src/CometChatMessageList/CometChatMessageList.tsx +53 -64
- package/src/CometChatMessageList/MessageListConfiguration.ts +2 -0
- package/src/CometChatMessageList/resources/close.png +0 -0
- package/src/CometChatMessageList/resources/leftarrowcurve.png +0 -0
- package/src/CometChatMessages/CometChatMessages.tsx +1 -2
- package/src/CometChatMessages/resources/info.png +0 -0
- package/src/CometChatMessages/style.ts +0 -1
- package/src/CometChatThreadedMessages/resources/close.png +0 -0
- package/src/calls/CometChatCallButtons/resources/Call.png +0 -0
- package/src/calls/CometChatCallButtons/resources/Video.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/Info.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +4 -4
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +2 -2
- package/src/calls/CometChatCallLogs/resources/Info.png +0 -0
- package/src/calls/CometChatOutgoingCall/resources/Close.png +0 -0
- package/src/calls/resources/Call.png +0 -0
- package/src/calls/resources/Video.png +0 -0
- package/src/extensions/CollaborativeDocument/resources/collaborative_document.png +0 -0
- package/src/extensions/CollaborativeWhiteboard/resources/collaborative_whiteboard.png +0 -0
- package/src/extensions/MessageTranslation/resources/translate.png +0 -0
- package/src/extensions/Polls/resources/close.png +0 -0
- package/src/extensions/Polls/resources/document.png +0 -0
- package/src/extensions/Polls/resources/kickIcon.png +0 -0
- package/src/extensions/Polls/resources/rightTick.png +0 -0
- package/src/extensions/SmartReplies/resources/close.png +0 -0
- package/src/extensions/Stickers/resources/Stickers.png +0 -0
- package/src/shared/assets/images/checkmark.png +0 -0
- package/src/shared/assets/images/grey-double-tick-icon.png +0 -0
- package/src/shared/assets/images/grey-tick-icon.png +0 -0
- package/src/shared/constants/UIKitConstants.ts +12 -1
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +46 -1
- package/src/shared/framework/resources/audio-file.png +0 -0
- package/src/shared/framework/resources/circle_add.png +0 -0
- package/src/shared/framework/resources/copy.png +0 -0
- package/src/shared/framework/resources/delete.png +0 -0
- package/src/shared/framework/resources/edit.png +0 -0
- package/src/shared/framework/resources/file_upload.png +0 -0
- package/src/shared/framework/resources/image.png +0 -0
- package/src/shared/framework/resources/info.png +0 -0
- package/src/shared/framework/resources/messageInPrivate.png +0 -0
- package/src/shared/framework/resources/pause.png +0 -0
- package/src/shared/framework/resources/play.png +0 -0
- package/src/shared/framework/resources/send_message.png +0 -0
- package/src/shared/framework/resources/share.png +0 -0
- package/src/shared/framework/resources/thread.png +0 -0
- package/src/shared/framework/resources/video_upload.png +0 -0
- package/src/shared/utils/CometChatMessagePreview/resources/close.png +0 -0
- package/src/shared/utils/CommonUtils.ts +43 -9
- package/src/shared/utils/DetailsUtils/resources/close.png +0 -0
- package/src/shared/views/CometChatActionSheet/resources/grid.png +0 -0
- package/src/shared/views/CometChatActionSheet/resources/list.png +0 -0
- package/src/shared/views/CometChatAudioBubble/resources/pause.png +0 -0
- package/src/shared/views/CometChatAudioBubble/resources/play.png +0 -0
- package/src/shared/views/CometChatFileBubble/resources/download.png +0 -0
- package/src/shared/views/CometChatFileBubble/resources/file_upload.png +0 -0
- package/src/shared/views/CometChatFileBubble/style.ts +2 -0
- package/src/shared/views/CometChatList/CometChatList.tsx +13 -5
- package/src/shared/views/CometChatList/resources/checkmark.png +0 -0
- package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +7 -4
- package/src/shared/views/CometChatVideoBubble/resources/play.png +0 -0
|
@@ -45,25 +45,59 @@ export class CommonUtils {
|
|
|
45
45
|
return res as T;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
static mergeObjects(obj1: object, obj2: object) {
|
|
49
|
+
// Create a new instance of the same class as obj1
|
|
50
|
+
let merged = Object.create(Object.getPrototypeOf(obj1));
|
|
48
51
|
|
|
49
|
-
|
|
52
|
+
// Copy properties from obj1 to the new instance
|
|
53
|
+
Object.assign(merged, obj1);
|
|
54
|
+
|
|
55
|
+
// Copy properties from obj2 to the new instance
|
|
56
|
+
Object.assign(merged, obj2);
|
|
57
|
+
|
|
58
|
+
return merged;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Merge two arrays of objects based on a key
|
|
63
|
+
*/
|
|
64
|
+
static mergeArrays(arr1: Array<object>, arr2: Array<object>, key: string) {
|
|
65
|
+
let map = new Map();
|
|
66
|
+
|
|
67
|
+
arr1.forEach(obj => {
|
|
68
|
+
map.set(obj[key], obj);
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
arr2.forEach(obj => {
|
|
72
|
+
if (map.has(obj[key])) {
|
|
73
|
+
let mergedObj = this.mergeObjects(map.get(obj[key]), obj);
|
|
74
|
+
map.set(obj[key], mergedObj);
|
|
75
|
+
} else {
|
|
76
|
+
map.set(obj[key], obj);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
return Array.from(map.values());
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
static getComponentIdFromMessage(message: CometChat.BaseMessage): Object {
|
|
50
84
|
let id = {};
|
|
51
85
|
if (message.receiver instanceof CometChat.User) {
|
|
52
|
-
|
|
86
|
+
id['uid'] = (message.sender as CometChat.User).uid;
|
|
53
87
|
} else if (message.receiver instanceof CometChat.Group) {
|
|
54
|
-
|
|
88
|
+
id['guid'] = (message.receiver as CometChat.Group).guid;
|
|
55
89
|
}
|
|
56
90
|
if (message.parentMessageId && message.parentMessageId !== 0) {
|
|
57
|
-
|
|
91
|
+
id['parentMessageId'] = message.parentMessageId;
|
|
58
92
|
}
|
|
59
93
|
return id;
|
|
60
94
|
}
|
|
61
95
|
|
|
62
|
-
static checkIdBelongsToThisComponent(id, user
|
|
63
|
-
if(id){
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
96
|
+
static checkIdBelongsToThisComponent(id, user: CometChat.User, group: CometChat.Group, parentMessageId: string | number): boolean {
|
|
97
|
+
if (id) {
|
|
98
|
+
if (id['parentMessageId'] && (id['parentMessageId'] != parentMessageId)) return false
|
|
99
|
+
if ((id['uid'] || user) && id['uid'] != user?.uid) return false;
|
|
100
|
+
if ((id['guid'] || group) && id['guid'] != group?.guid) return false;
|
|
67
101
|
}
|
|
68
102
|
return true;
|
|
69
103
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -279,8 +279,6 @@ export const CometChatList = React.forwardRef<
|
|
|
279
279
|
}
|
|
280
280
|
getList(listHandlerRef.current)
|
|
281
281
|
.then((newlist: any) => {
|
|
282
|
-
console.log('new list -->> ',newlist);
|
|
283
|
-
|
|
284
282
|
setDecoratorMessage(NO_DATA_FOUND);
|
|
285
283
|
setList(newlist);
|
|
286
284
|
})
|
|
@@ -439,9 +437,19 @@ export const CometChatList = React.forwardRef<
|
|
|
439
437
|
const handleSelection = (listItem: any) => {
|
|
440
438
|
if (!shouldSelect || selectionMode === 'none') return;
|
|
441
439
|
setShouldSelect(true);
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
if (selectionMode === 'multiple')
|
|
441
|
+
setSelectedItems((prev: any) => {
|
|
442
|
+
let newState = { ...prev };
|
|
443
|
+
if (Object.keys(prev).includes(listItem.value[listItemKey])) {
|
|
444
|
+
delete newState[listItem.value[listItemKey]]
|
|
445
|
+
return newState;
|
|
446
|
+
} else {
|
|
447
|
+
newState[listItem.value[listItemKey]] = listItem.value;
|
|
448
|
+
return newState;
|
|
449
|
+
}
|
|
450
|
+
});
|
|
451
|
+
else if (selectionMode === 'single')
|
|
452
|
+
setSelectedItems({ [listItem.value[listItemKey]]: listItem.value });
|
|
445
453
|
};
|
|
446
454
|
|
|
447
455
|
const onSelectionHandler = () => {
|
|
Binary file
|
|
@@ -286,8 +286,11 @@ export const CometChatSchedulerBubble = memo(
|
|
|
286
286
|
timeZoneCode,
|
|
287
287
|
};
|
|
288
288
|
setAvailableRange({ initialDate, finalDate });
|
|
289
|
-
|
|
290
|
-
|
|
289
|
+
if(endDate >= new Date()){
|
|
290
|
+
getQuickSelectSlots(new Date());
|
|
291
|
+
} else {
|
|
292
|
+
getQuickSelectSlots(new Date(endDate), false);
|
|
293
|
+
}
|
|
291
294
|
};
|
|
292
295
|
|
|
293
296
|
const combineAvailability = (availability) => {
|
|
@@ -418,7 +421,7 @@ export const CometChatSchedulerBubble = memo(
|
|
|
418
421
|
}
|
|
419
422
|
};
|
|
420
423
|
|
|
421
|
-
const getQuickSelectSlots = async (date) => {
|
|
424
|
+
const getQuickSelectSlots = async (date, shouldViewNext = true) => {
|
|
422
425
|
let day = DateTime.fromJSDate(date).toFormat("EEEE");
|
|
423
426
|
date = DateTime.fromJSDate(date).toFormat(dateFormats.date);
|
|
424
427
|
|
|
@@ -445,7 +448,7 @@ export const CometChatSchedulerBubble = memo(
|
|
|
445
448
|
range = [];
|
|
446
449
|
}
|
|
447
450
|
|
|
448
|
-
if (range.length < 2) await getNextQuickSlots(date, newQuickObj);
|
|
451
|
+
if (range.length < 2 && shouldViewNext) await getNextQuickSlots(date, newQuickObj);
|
|
449
452
|
|
|
450
453
|
let quickSlotsArray = [];
|
|
451
454
|
|
|
Binary file
|