@cometchat/chat-uikit-react-native 4.3.16 → 4.3.18
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/package.json +1 -1
- package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +20 -15
- package/src/AI/AIAssistBot/AIAssistBotStyle.ts +2 -2
- package/src/AI/AIAssistBot/AIAssistBotView.tsx +16 -14
- package/src/AI/AIAssistBot/configuration.ts +8 -7
- package/src/AI/AIAssistBot/resources/index.ts +1 -0
- package/src/AI/AIBaseConfiguration.ts +1 -0
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +27 -26
- package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +1 -0
- package/src/AI/AIConversationStarter/style.ts +29 -31
- package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +14 -13
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +5 -4
- package/src/AI/AIConversationSummary/resources/index.ts +1 -0
- package/src/AI/AIExtensionDataSource.ts +1 -0
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +28 -27
- package/src/AI/AISmartReplies/configuration.ts +2 -0
- package/src/AI/CardView.tsx +5 -5
- package/src/AI/resources/index.ts +3 -0
- package/src/AI/style.ts +68 -80
- package/src/CometChatAddMembers/AddMembersConfiguration.tsx +1 -0
- package/src/CometChatAddMembers/CometChatAddMembers.tsx +14 -13
- package/src/CometChatAddMembers/index.ts +10 -8
- package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +1 -0
- package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +11 -8
- package/src/CometChatBannedMembers/index.ts +12 -7
- package/src/CometChatBannedMembers/resources/index.ts +1 -0
- package/src/CometChatContacts/CometChatContacts.tsx +9 -9
- package/src/CometChatContacts/ContactsConfiguration.tsx +1 -0
- package/src/CometChatContacts/Header.tsx +4 -4
- package/src/CometChatContacts/index.ts +5 -3
- package/src/CometChatConversations/CometChatConversations.tsx +289 -221
- package/src/CometChatConversations/ConversationsConfiguration.ts +14 -0
- package/src/CometChatConversations/index.ts +21 -10
- package/src/CometChatConversations/resources/index.ts +14 -0
- package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +7 -5
- package/src/CometChatConversationsWithMessages/index.ts +6 -5
- package/src/CometChatConversationsWithMessages/resources/index.ts +1 -0
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +30 -30
- package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +1 -0
- package/src/CometChatCreateGroup/Header.tsx +1 -1
- package/src/CometChatCreateGroup/index.ts +5 -6
- package/src/CometChatCreateGroup/resources/index.ts +3 -0
- package/src/CometChatDetails/CometChatDetails.tsx +29 -28
- package/src/CometChatDetails/DetailsConfiguration.tsx +1 -0
- package/src/CometChatDetails/Header.tsx +1 -1
- package/src/CometChatDetails/index.ts +17 -15
- package/src/CometChatDetails/listners.ts +16 -16
- package/src/CometChatDetails/resources/index.ts +5 -0
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +62 -52
- package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +1 -1
- package/src/CometChatGroupMembers/GroupMemberStyle.ts +3 -3
- package/src/CometChatGroupMembers/index.ts +8 -16
- package/src/CometChatGroupMembers/resources/index.ts +5 -0
- package/src/CometChatGroups/CometChatGroups.tsx +46 -46
- package/src/CometChatGroups/GroupsConfiguration.ts +10 -9
- package/src/CometChatGroups/GroupsStyle.ts +1 -1
- package/src/CometChatGroups/index.ts +11 -10
- package/src/CometChatGroups/resources/index.ts +10 -0
- package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +9 -8
- package/src/CometChatGroupsWithMessages/index.ts +6 -5
- package/src/CometChatGroupsWithMessages/resources/index.ts +1 -0
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +22 -21
- package/src/CometChatJoinProtectedGroup/Header.tsx +1 -1
- package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +1 -0
- package/src/CometChatJoinProtectedGroup/index.ts +5 -6
- package/src/CometChatJoinProtectedGroup/resources/index.ts +2 -0
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +62 -59
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +1 -0
- package/src/CometChatMessageComposer/index.ts +6 -7
- package/src/CometChatMessageComposer/resources/index.ts +10 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +33 -31
- package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +1 -0
- package/src/CometChatMessageHeader/index.ts +12 -13
- package/src/CometChatMessageHeader/listners.ts +18 -18
- package/src/CometChatMessageHeader/resources/index.ts +3 -0
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +28 -24
- package/src/CometChatMessageInformation/index.ts +8 -8
- package/src/CometChatMessageInformation/resources/index.ts +1 -0
- package/src/CometChatMessageList/CometChatMessageList.tsx +289 -227
- package/src/CometChatMessageList/MessageListConfiguration.ts +50 -25
- package/src/CometChatMessageList/index.ts +16 -18
- package/src/CometChatMessageList/resources/index.ts +7 -0
- package/src/CometChatMessages/CometChatMessages.tsx +29 -26
- package/src/CometChatMessages/MessagesConfiguration.ts +2 -0
- package/src/CometChatMessages/index.ts +8 -7
- package/src/CometChatMessages/resources/index.ts +1 -0
- package/src/CometChatTabs/CometChatTabs.tsx +13 -23
- package/src/CometChatTabs/CometChatTabsStyle.ts +2 -0
- package/src/CometChatTabs/index.ts +3 -8
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +37 -37
- package/src/CometChatThreadedMessages/Header.tsx +2 -2
- package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +1 -0
- package/src/CometChatThreadedMessages/index.ts +11 -12
- package/src/CometChatThreadedMessages/resources/index.ts +6 -0
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +5 -5
- package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +1 -0
- package/src/CometChatTransferOwnership/index.ts +10 -11
- package/src/CometChatUsers/CometChatUsers.tsx +11 -11
- package/src/CometChatUsers/UsersConfiguration.tsx +1 -0
- package/src/CometChatUsers/index.ts +8 -6
- package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +6 -5
- package/src/CometChatUsersWithMessages/index.ts +6 -5
- package/src/calls/CallUtils.ts +4 -3
- package/src/calls/CallingDetailsUtils.tsx +9 -8
- package/src/calls/CallingExtension.tsx +2 -2
- package/src/calls/CallingExtentionDecorator.tsx +17 -17
- package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +3 -2
- package/src/calls/CometChatCallBubble/index.ts +14 -10
- package/src/calls/CometChatCallBubble/resources/index.ts +3 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +1 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +19 -18
- package/src/calls/CometChatCallButtons/index.ts +10 -8
- package/src/calls/CometChatCallButtons/resources/index.ts +2 -0
- package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +2 -0
- package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +14 -13
- package/src/calls/CometChatCallLogDetails/index.ts +21 -10
- package/src/calls/CometChatCallLogDetails/resources/index.ts +1 -0
- package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +3 -1
- package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +25 -24
- package/src/calls/CometChatCallLogHistory/index.ts +21 -10
- package/src/calls/CometChatCallLogHistory/resources/index.ts +13 -0
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +4 -2
- package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +13 -12
- package/src/calls/CometChatCallLogParticipants/index.ts +21 -10
- package/src/calls/CometChatCallLogParticipants/resources/index.ts +1 -0
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +5 -3
- package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +14 -13
- package/src/calls/CometChatCallLogRecordings/index.ts +21 -10
- package/src/calls/CometChatCallLogRecordings/resources/index.ts +2 -0
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +5 -3
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +37 -36
- package/src/calls/CometChatCallLogs/index.ts +14 -10
- package/src/calls/CometChatCallLogs/resources/index.ts +11 -0
- package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +1 -0
- package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +3 -2
- package/src/calls/CometChatCallLogsWithDetails/index.ts +2 -4
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +19 -15
- package/src/calls/CometChatIncomingCall/index.ts +10 -8
- package/src/calls/CometChatIncomingCall/resources/index.ts +4 -0
- package/src/calls/CometChatIncomingCall/styles.ts +0 -1
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +5 -4
- package/src/calls/CometChatOngoingCall/index.ts +6 -6
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +15 -13
- package/src/calls/CometChatOutgoingCall/index.ts +8 -6
- package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -0
- package/src/calls/index.ts +99 -60
- package/src/calls/resources/index.ts +3 -0
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +1 -0
- package/src/extensions/CollaborativeBubble/resources/index.ts +1 -0
- package/src/extensions/CollaborativeBubble/styles.ts +1 -1
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +1 -1
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +10 -9
- package/src/extensions/CollaborativeDocument/index.ts +12 -9
- package/src/extensions/CollaborativeDocument/resources/index.ts +2 -0
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +1 -1
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +15 -14
- package/src/extensions/CollaborativeWhiteboard/index.ts +12 -9
- package/src/extensions/CollaborativeWhiteboard/resources/index.ts +2 -0
- package/src/extensions/ExtensionModerator.tsx +4 -4
- package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +1 -1
- package/src/extensions/ImageModeration/ImageModerationFilter.tsx +2 -1
- package/src/extensions/ImageModeration/index.ts +15 -7
- package/src/extensions/ImageModeration/resources/index.ts +1 -0
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +8 -8
- package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +1 -1
- package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +2 -1
- package/src/extensions/LinkPreview/index.ts +18 -10
- package/src/extensions/LinkPreview/resources/index.ts +1 -0
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +7 -7
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +19 -17
- package/src/extensions/MessageTranslation/index.ts +7 -7
- package/src/extensions/MessageTranslation/resources/index.ts +1 -0
- package/src/extensions/Polls/Header.tsx +8 -8
- package/src/extensions/Polls/Polls.tsx +38 -33
- package/src/extensions/Polls/PollsBubble.tsx +35 -33
- package/src/extensions/Polls/PollsDecorator.tsx +7 -7
- package/src/extensions/Polls/index.ts +4 -5
- package/src/extensions/Polls/resources/index.ts +5 -0
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -11
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +4 -3
- package/src/extensions/SmartReplies/index.ts +6 -2
- package/src/extensions/SmartReplies/resources/index.ts +1 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +12 -10
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -1
- package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +19 -17
- package/src/extensions/Stickers/StickersBubble.tsx +4 -4
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +11 -10
- package/src/extensions/Stickers/index.ts +13 -8
- package/src/extensions/Stickers/resources/index.ts +1 -0
- package/src/extensions/TextModeration/TextModerationConfiguration.tsx +1 -1
- package/src/extensions/TextModeration/TextModerationExtension.tsx +1 -0
- package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +1 -0
- package/src/extensions/TextModeration/index.ts +5 -4
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +5 -5
- package/src/extensions/ThumbnailGeneration/index.ts +6 -2
- package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -0
- package/src/extensions/index.ts +92 -47
- package/src/index.ts +225 -232
- package/src/shared/CometChatContext.tsx +1 -1
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -36
- package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +1 -0
- package/src/shared/assets/images/index.ts +16 -0
- package/src/shared/assets/images/search.png +0 -0
- package/src/shared/base/FontStyle.ts +2 -2
- package/src/shared/base/index.ts +8 -11
- package/src/shared/base/vars.ts +2 -2
- package/src/shared/constants/UIKitConstants.ts +16 -1
- package/src/shared/events/CometChatMessageEvents/index.ts +6 -4
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +221 -219
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +39 -37
- package/src/shared/events/ListenerInitializer.ts +8 -1
- package/src/shared/events/messages.ts +2 -0
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +11 -15
- package/src/shared/formatters/CometChatTextFormatter.ts +6 -5
- package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +8 -10
- package/src/shared/framework/DataSource.ts +17 -17
- package/src/shared/framework/DataSourceDecorator.tsx +3 -2
- package/src/shared/framework/ExtensionsDataSource.tsx +1 -0
- package/src/shared/framework/MessageDataSource.tsx +125 -117
- package/src/shared/framework/index.ts +12 -6
- package/src/shared/framework/resources/index.ts +20 -0
- package/src/shared/helper/helperFunctions.ts +7 -5
- package/src/shared/index.ts +109 -100
- package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +6 -3
- package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Components/Day.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Components/Days.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Month.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Months.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Title.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +3 -0
- package/src/shared/libs/CometChatCalendar/Locales/index.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +1 -0
- package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +45 -42
- package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +13 -11
- package/src/shared/libs/ImageZoom/types/index.ts +12 -12
- package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +1 -0
- package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +1 -0
- package/src/shared/libs/datePickerModal/Modal.js +1 -1
- package/src/shared/modals/CometChatDetailsOption.ts +2 -2
- package/src/shared/modals/CometChatMessageTemplate.ts +13 -12
- package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +7 -7
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +6 -7
- package/src/shared/modals/index.ts +37 -14
- package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +5 -5
- package/src/shared/resources/CometChatSoundManager/index.ts +1 -0
- package/src/shared/resources/CometChatTheme/Palette.ts +57 -55
- package/src/shared/resources/CometChatTheme/Typography.ts +30 -30
- package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +17 -13
- package/src/shared/utils/CometChatLiveReactions/resources/index.ts +1 -0
- package/src/shared/utils/CometChatMessageHelper/index.ts +2 -2
- package/src/shared/utils/CometChatMessagePreview/{index.js → index.ts} +3 -0
- package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -0
- package/src/shared/utils/CommonUtils.ts +85 -1
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +3 -2
- package/src/shared/utils/DetailsUtils/resources/index.ts +7 -0
- package/src/shared/utils/InteractiveMessageUtils.ts +6 -5
- package/src/shared/utils/MessageUtils.tsx +108 -18
- package/src/shared/utils/NetworkUtils.tsx +1 -1
- package/src/shared/utils/PermissionUtil.ts +7 -6
- package/src/shared/utils/SchedulerUtils.ts +8 -6
- package/src/shared/utils/TypeUtils.ts +3 -0
- package/src/shared/utils/conversationUtils.ts +7 -5
- package/src/shared/utils/index.ts +2 -0
- package/src/shared/views/CometChatAICard/CometChatAICard.tsx +7 -6
- package/src/shared/views/CometChatAICard/resources/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +3 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +5 -5
- package/src/shared/views/CometChatActionSheet/hooks.ts +2 -2
- package/src/shared/views/CometChatActionSheet/index.ts +5 -3
- package/src/shared/views/CometChatActionSheet/resources/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +6 -6
- package/src/shared/views/CometChatAudioBubble/index.ts +8 -12
- package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +6 -5
- package/src/shared/views/CometChatAvatar/index.ts +7 -9
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +3 -3
- package/src/shared/views/CometChatBadge/index.ts +7 -9
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +51 -48
- package/src/shared/views/CometChatBottomSheet/index.ts +6 -2
- package/src/shared/views/CometChatButton/CometChatButton.tsx +5 -5
- package/src/shared/views/CometChatButton/index.ts +4 -14
- package/src/shared/views/CometChatCard/CometChatCard.tsx +3 -3
- package/src/shared/views/CometChatCard/index.ts +6 -7
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +11 -10
- package/src/shared/views/CometChatCardBubble/index.tsx +2 -1
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +6 -6
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +9 -9
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +1 -0
- package/src/shared/views/CometChatConfirmDialog/index.ts +9 -6
- package/src/shared/views/CometChatDate/CometChatDate.tsx +2 -2
- package/src/shared/views/CometChatDate/index.ts +12 -11
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +20 -17
- package/src/shared/views/CometChatDateTimePicker/index.ts +3 -5
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +8 -7
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +24 -33
- package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +2 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +2 -1
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +8 -0
- package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -0
- package/src/shared/views/CometChatEmojiKeyboard/style.ts +2 -2
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +3 -3
- package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +1 -1
- package/src/shared/views/CometChatFileBubble/index.ts +7 -8
- package/src/shared/views/CometChatFileBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +33 -29
- package/src/shared/views/CometChatFormBubble/index.tsx +2 -1
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +63 -17
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +1 -1
- package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
- package/src/shared/views/CometChatImageBubble/assets/index.ts +3 -0
- package/src/shared/views/CometChatImageBubble/index.ts +10 -8
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +1 -1
- package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -0
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +2 -2
- package/src/shared/views/CometChatList/CometChatList.tsx +46 -42
- package/src/shared/views/CometChatList/index.ts +3 -3
- package/src/shared/views/CometChatList/resources/index.ts +5 -0
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +18 -13
- package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +1 -0
- package/src/shared/views/CometChatListItem/index.ts +8 -7
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +34 -31
- package/src/shared/views/CometChatMediaRecorder/index.ts +8 -9
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +22 -15
- package/src/shared/views/CometChatMessageBubble/MessageBubbleStyle.ts +4 -0
- package/src/shared/views/CometChatMessageBubble/index.ts +6 -5
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +10 -9
- package/src/shared/views/CometChatMessageInput/index.ts +2 -1
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +3 -3
- package/src/shared/views/CometChatPanel/resources/index.ts +1 -0
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +4 -4
- package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +1 -0
- package/src/shared/views/CometChatQuickReactions/index.ts +3 -7
- package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -0
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +6 -6
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +4 -4
- package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +29 -28
- package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +1 -0
- package/src/shared/views/CometChatReactionList/index.ts +3 -7
- package/src/shared/views/CometChatReactionList/resources/index.ts +1 -0
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +14 -14
- package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +1 -0
- package/src/shared/views/CometChatReactions/index.ts +15 -11
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +5 -5
- package/src/shared/views/CometChatReceipt/index.ts +10 -8
- package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +59 -53
- package/src/shared/views/CometChatSchedulerBubble/index.ts +3 -5
- package/src/shared/views/CometChatSchedulerBubble/styles.ts +1 -1
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +4 -4
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +4 -4
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +2 -2
- package/src/shared/views/CometChatStatusIndicator/index.ts +21 -10
- package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +1 -1
- package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +5 -5
- package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +3 -3
- package/src/shared/views/CometChatSuggestionList/index.ts +14 -10
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +6 -5
- package/src/shared/views/CometChatTextBubble/index.ts +6 -7
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +2 -2
- package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +5 -5
- package/src/shared/views/CometChatTimeSlotSelector/index.ts +3 -5
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +9 -8
- package/src/shared/views/CometChatVideoBubble/index.ts +10 -8
- package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +1 -1
- package/src/shared/views/SwipeRow/SwipeRow.tsx +4 -3
- package/src/shared/views/index.ts +151 -86
- package/ios/CometchatUiKit.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/CometchatUiKit.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/src/shared/libs/CometChatCalendar/Components/Arrow.test.tsx +0 -112
- package/src/shared/libs/CometChatCalendar/Components/Day.test.tsx +0 -396
- package/src/shared/libs/CometChatCalendar/Components/Days.test.tsx +0 -216
- package/src/shared/libs/CometChatCalendar/Components/Month.test.tsx +0 -160
- package/src/shared/libs/CometChatCalendar/Components/Months.test.tsx +0 -262
- package/src/shared/libs/CometChatCalendar/Components/Title.test.tsx +0 -111
- package/src/shared/libs/CometChatCalendar/Components/Weekdays.test.tsx +0 -69
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.test.ts +0 -44
- package/src/shared/libs/CometChatCalendar/Utils/addOpacity.test.ts +0 -49
- package/src/shared/libs/CometChatCalendar/Utils/clamp.test.ts +0 -39
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.test.ts +0 -20
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.test.ts +0 -48
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.test.ts +0 -60
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
//@ts-ignore
|
|
2
3
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
4
|
import { CometChatMessageComposerActionInterface, CometChatTheme, CometChatUIEventHandler, CometChatUIEvents, DataSource, DataSourceDecorator, MessageEvents, localize } from "../../shared";
|
|
4
5
|
import { AIAssistBotConfiguration } from "./configuration";
|
|
@@ -11,8 +12,8 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
11
12
|
public group!: CometChat.Group;
|
|
12
13
|
public bots!: CometChat.User[];
|
|
13
14
|
public theme: CometChatTheme = new CometChatTheme({});
|
|
14
|
-
public loggedInUser!: CometChat.User |
|
|
15
|
-
public usersRequest: CometChat.
|
|
15
|
+
public loggedInUser!: CometChat.User | any;
|
|
16
|
+
public usersRequest: CometChat.UsersRequest;
|
|
16
17
|
|
|
17
18
|
constructor(
|
|
18
19
|
dataSource: DataSource,
|
|
@@ -31,7 +32,7 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
fetchBots() {
|
|
34
|
-
this.usersRequest.fetchNext().then((bots) => {
|
|
35
|
+
this.usersRequest.fetchNext().then((bots: string | any[]) => {
|
|
35
36
|
if (bots.length > 0) {
|
|
36
37
|
this.bots = [...(this.bots || []), ...bots];
|
|
37
38
|
}
|
|
@@ -43,13 +44,13 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
43
44
|
return "bots";
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, AIOptionsStyle?: AIOptionsStyle): CometChatMessageComposerActionInterface[] {
|
|
47
|
+
override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, AIOptionsStyle?: AIOptionsStyle): CometChatMessageComposerActionInterface[] | any[] {
|
|
47
48
|
this.user = user!;
|
|
48
49
|
this.group = group!;
|
|
49
50
|
const numberOfBots = this.bots?.length;
|
|
50
51
|
if (!id?.parentMessageId && numberOfBots > 0) {
|
|
51
52
|
const titleName = numberOfBots > 1 ? localize("COMETCHAT_ASK_AI_BOT") : `${localize("COMETCHAT_ASK_BOT")} ${this.bots[0]?.getName()}`;
|
|
52
|
-
const messageComposerActions: CometChatMessageComposerActionInterface[] = super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
53
|
+
const messageComposerActions: CometChatMessageComposerActionInterface[] | any = super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
53
54
|
let newAction = {
|
|
54
55
|
title: titleName,
|
|
55
56
|
onPress: () => {
|
|
@@ -58,10 +59,10 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
58
59
|
id: "ai-assist-bot",
|
|
59
60
|
iconURL: '',
|
|
60
61
|
iconTint: '',
|
|
61
|
-
titleColor: this.configuration?.style?.buttonTextColor || AIOptionsStyle
|
|
62
|
-
titleFont: this.configuration?.style?.buttonTextFont || AIOptionsStyle
|
|
63
|
-
background: this.configuration?.style?.backgroundColor || AIOptionsStyle
|
|
64
|
-
cornerRadius: this.configuration?.style?.buttonBorderRadius || AIOptionsStyle
|
|
62
|
+
titleColor: this.configuration?.style?.buttonTextColor || AIOptionsStyle?.listItemTitleColor,
|
|
63
|
+
titleFont: this.configuration?.style?.buttonTextFont || AIOptionsStyle?.listItemTitleFont,
|
|
64
|
+
background: this.configuration?.style?.backgroundColor || AIOptionsStyle?.listItemBackground,
|
|
65
|
+
cornerRadius: this.configuration?.style?.buttonBorderRadius || AIOptionsStyle?.listItemBorderRadius,
|
|
65
66
|
};
|
|
66
67
|
messageComposerActions.push(newAction);
|
|
67
68
|
return messageComposerActions;
|
|
@@ -70,7 +71,7 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
70
71
|
}
|
|
71
72
|
}
|
|
72
73
|
|
|
73
|
-
onOptionsClick(AIOptionsStyle) {
|
|
74
|
+
onOptionsClick(AIOptionsStyle: AIOptionsStyle | undefined) {
|
|
74
75
|
if (this.bots?.length > 1) {
|
|
75
76
|
this.openBotList(AIOptionsStyle);
|
|
76
77
|
} else {
|
|
@@ -78,7 +79,7 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
|
|
81
|
-
openBotList(AIOptionsStyle) {
|
|
82
|
+
openBotList(AIOptionsStyle: any) {
|
|
82
83
|
const botList = this.bots.map((bot) => {
|
|
83
84
|
return ({
|
|
84
85
|
title: bot.getName(),
|
|
@@ -98,16 +99,20 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
openBotChat(bot) {
|
|
102
|
+
openBotChat(bot: any) {
|
|
102
103
|
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.ccToggleBottomSheet, {
|
|
103
104
|
botView: true,
|
|
104
105
|
child: () => <AIAssistBotView
|
|
105
106
|
bot={bot}
|
|
106
107
|
closeCallback={this.closeAIOption}
|
|
107
|
-
configuration={this.configuration}
|
|
108
108
|
title={bot.getName()}
|
|
109
109
|
onSend={this.getBotReply.bind(this)}
|
|
110
110
|
sender={this.loggedInUser}
|
|
111
|
+
{...(this.configuration
|
|
112
|
+
? {
|
|
113
|
+
configuration: this.configuration,
|
|
114
|
+
}
|
|
115
|
+
: {})}
|
|
111
116
|
/>
|
|
112
117
|
});
|
|
113
118
|
}
|
|
@@ -127,7 +132,7 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
127
132
|
: CometChat.RECEIVER_TYPE.USER;
|
|
128
133
|
|
|
129
134
|
try {
|
|
130
|
-
configuration = await this.configuration
|
|
135
|
+
configuration = await this.configuration?.apiConfiguration?.(bot, this.user, this.group) || {}
|
|
131
136
|
} catch (err) {
|
|
132
137
|
configuration = {}
|
|
133
138
|
}
|
|
@@ -152,7 +157,7 @@ export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
|
152
157
|
CometChatUIEventHandler.addMessageListener(
|
|
153
158
|
MessageEvents.ccActiveChatChanged,
|
|
154
159
|
{
|
|
155
|
-
ccActiveChatChanged: (data) => {
|
|
160
|
+
ccActiveChatChanged: (data: any) => {
|
|
156
161
|
|
|
157
162
|
},
|
|
158
163
|
}
|
|
@@ -4,8 +4,8 @@ import { AIBaseStyle } from "../AIBaseStyle";
|
|
|
4
4
|
export class AIAssistBotStyle extends AIBaseStyle {
|
|
5
5
|
titleFont?: FontStyle;
|
|
6
6
|
titleColor?: string = "";
|
|
7
|
-
subtitleFont
|
|
8
|
-
subtitleColor
|
|
7
|
+
subtitleFont!: FontStyle;
|
|
8
|
+
subtitleColor!: string;
|
|
9
9
|
closeIconTint?: string = "";
|
|
10
10
|
sendIconTint?: string = "";
|
|
11
11
|
buttonTextColor?: string = "";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useContext, useState, useEffect, useCallback } from 'react'
|
|
2
|
+
//@ts-ignore
|
|
2
3
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
|
-
import { View, Text, TextInput, Dimensions, TouchableOpacity, Image, FlatList } from 'react-native'
|
|
4
|
+
import { View, Text, TextInput, Dimensions, TouchableOpacity, Image, FlatList, TextStyle } from 'react-native'
|
|
4
5
|
import { AIAssistBotConfiguration } from './configuration';
|
|
5
6
|
import { CometChatBottomSheet, CometChatContext, CometChatContextType, CometChatDate, CometChatListItem, CometChatReceipt, CometChatTextBubble, CometChatTheme, localize } from '../../shared';
|
|
6
7
|
import { CloseIcon } from './resources';
|
|
@@ -11,13 +12,14 @@ import { CometChatMessageBubble } from '../../shared/views/CometChatMessageBubbl
|
|
|
11
12
|
import { ReceiverTypeConstants } from '../../shared/constants/UIKitConstants';
|
|
12
13
|
import { AIBotMessageBubbleStyle, AISenderMessageBubbleStyle } from './AIAssistBotStyle';
|
|
13
14
|
import { MessageBubbleAlignmentType } from '../../shared/base/Types';
|
|
15
|
+
import { TextInputStyle } from '../../shared/views/CometChatTextInput/TextInputStyle';
|
|
14
16
|
|
|
15
17
|
interface AIAssistBotViewProps {
|
|
16
18
|
title: string;
|
|
17
|
-
configuration
|
|
19
|
+
configuration?: AIAssistBotConfiguration;
|
|
18
20
|
closeCallback: () => void,
|
|
19
21
|
bot: CometChat.User,
|
|
20
|
-
sender: CometChat.User,
|
|
22
|
+
sender: CometChat.User | any,
|
|
21
23
|
onSend: (question: string, bot: CometChat.User) => Promise<any>
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -27,7 +29,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
27
29
|
const { theme } = useContext<CometChatContextType>(CometChatContext);
|
|
28
30
|
|
|
29
31
|
const [question, setQuestion] = useState("");
|
|
30
|
-
const [messages, setMessages] = useState([]);
|
|
32
|
+
const [messages, setMessages] = useState<any[]>([]);
|
|
31
33
|
|
|
32
34
|
const style = {
|
|
33
35
|
titleColor: configuration?.style?.titleColor || theme.palette.getAccent(),
|
|
@@ -66,7 +68,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
66
68
|
message.setMuid(String(getUnixTimestampInMilliseconds()));
|
|
67
69
|
message.setSender(bot);
|
|
68
70
|
|
|
69
|
-
let newMessages = [...messages];
|
|
71
|
+
let newMessages: any[] = [...messages];
|
|
70
72
|
newMessages.unshift(message);
|
|
71
73
|
|
|
72
74
|
setMessages(newMessages);
|
|
@@ -103,7 +105,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
103
105
|
|
|
104
106
|
onSend(question, bot)
|
|
105
107
|
.then(botReply => {
|
|
106
|
-
const message = new CometChat.TextMessage(
|
|
108
|
+
const message: any = new CometChat.TextMessage(
|
|
107
109
|
sender?.getUid(),
|
|
108
110
|
botReply,
|
|
109
111
|
ReceiverTypeConstants.user
|
|
@@ -136,11 +138,11 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
136
138
|
setQuestion("")
|
|
137
139
|
}
|
|
138
140
|
|
|
139
|
-
const RenderMessageItem = ({ item, index }) => {
|
|
141
|
+
const RenderMessageItem = ({ item, index }: any) => {
|
|
140
142
|
const contentView = (message: any,
|
|
141
143
|
theme: CometChatTheme,
|
|
142
144
|
alignment: MessageBubbleAlignmentType,
|
|
143
|
-
configuration
|
|
145
|
+
configuration?: AIAssistBotConfiguration): JSX.Element => {
|
|
144
146
|
let style: AIBotMessageBubbleStyle | AISenderMessageBubbleStyle = {};
|
|
145
147
|
|
|
146
148
|
if (alignment === "right") {
|
|
@@ -180,7 +182,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
180
182
|
return "left";
|
|
181
183
|
}
|
|
182
184
|
}
|
|
183
|
-
function getMessageBubbleStyle(message: CometChat.TextMessage, theme: CometChatTheme, sender: CometChat.User, configuration
|
|
185
|
+
function getMessageBubbleStyle(message: CometChat.TextMessage | any, theme: CometChatTheme, sender: CometChat.User, configuration?: AIAssistBotConfiguration): any {
|
|
184
186
|
if (message.sender?.getUid() === sender?.getUid()) {
|
|
185
187
|
const style = configuration?.senderMessageBubbleStyle || {};
|
|
186
188
|
return {
|
|
@@ -201,7 +203,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
201
203
|
}
|
|
202
204
|
};
|
|
203
205
|
|
|
204
|
-
const getFooterView = (item: CometChat.BaseMessage, bubbleAlignment: MessageBubbleAlignmentType): JSX.Element => {
|
|
206
|
+
const getFooterView = (item: CometChat.BaseMessage | any, bubbleAlignment: MessageBubbleAlignmentType): JSX.Element => {
|
|
205
207
|
|
|
206
208
|
let isSender = (item.getSender()?.getUid() || item['sender']['uid']) == (sender?.getUid() || sender['uid']);
|
|
207
209
|
|
|
@@ -236,7 +238,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
236
238
|
)
|
|
237
239
|
}
|
|
238
240
|
|
|
239
|
-
const keyExtractor = useCallback((item) => `${item.getMuid()}`, [])
|
|
241
|
+
const keyExtractor = useCallback((item: any) => `${item.getMuid()}`, [])
|
|
240
242
|
|
|
241
243
|
return (
|
|
242
244
|
<CometChatBottomSheet
|
|
@@ -253,7 +255,7 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
253
255
|
avatarStyle={configuration?.avatarStyle}
|
|
254
256
|
avatarName={title || bot.getName()}
|
|
255
257
|
avatarURL={bot.getAvatar() ? { uri: bot.getAvatar() } : undefined}
|
|
256
|
-
SubtitleView={() => <Text style={[{ color: subtitleColor }, subtitleFont]}>{localize("COMETCHAT_ASK_BOT_SUBTITLE")}</Text>}
|
|
258
|
+
SubtitleView={() => <Text style={[{ color: subtitleColor }, subtitleFont] as TextStyle}>{localize("COMETCHAT_ASK_BOT_SUBTITLE")}</Text>}
|
|
257
259
|
TailView={() => <TouchableOpacity onPress={onClose}>
|
|
258
260
|
<Image style={{ width: 20, height: 20, tintColor: closeIconTint }} source={configuration?.closeIconURL || CloseIcon} />
|
|
259
261
|
</TouchableOpacity>}
|
|
@@ -280,10 +282,10 @@ const AIAssistBotView = (props: AIAssistBotViewProps) => {
|
|
|
280
282
|
style={[{
|
|
281
283
|
padding: 8, flex: 1, borderWidth: 1, borderColor: theme.palette.getAccent500(), borderRadius: 20,
|
|
282
284
|
marginLeft: 10, color: style.messageInputStyle.textColor,
|
|
283
|
-
}, style.messageInputStyle.placeholderTextFont, style.messageInputStyle.textFont]}
|
|
285
|
+
}, style.messageInputStyle.placeholderTextFont, style.messageInputStyle.textFont] as TextInputStyle}
|
|
284
286
|
onChangeText={onChangeText}
|
|
285
287
|
/>
|
|
286
|
-
<TouchableOpacity
|
|
288
|
+
<TouchableOpacity onPress={onMsgSend} {...(question? {activeOpacity: 1} : {})}>
|
|
287
289
|
<Image style={{ width: 30, height: 30, tintColor: sendIconTint, marginHorizontal: 10 }} source={configuration?.sendIconURL || ICONS.SEND} />
|
|
288
290
|
</TouchableOpacity>
|
|
289
291
|
</View>
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//@ts-ignore
|
|
1
2
|
import { CometChat } from '@cometchat/chat-sdk-react-native'
|
|
2
3
|
import { AIAssistBotStyle, AIBotMessageBubbleStyle, AISenderMessageBubbleStyle } from './AIAssistBotStyle';
|
|
3
4
|
import { ICONS } from '../../shared/assets/images';
|
|
@@ -5,15 +6,15 @@ import { AvatarStyle, CometChatMessageInputStyleInterface } from '../../shared';
|
|
|
5
6
|
|
|
6
7
|
export class AIAssistBotConfiguration {
|
|
7
8
|
apiConfiguration?: (bot: CometChat.User, user?: CometChat.User, group?: CometChat.Group) => Promise<Object>;
|
|
8
|
-
title
|
|
9
|
-
botFirstMessageText
|
|
10
|
-
closeIconURL
|
|
11
|
-
sendIconURL
|
|
12
|
-
botMessageBubbleStyle
|
|
13
|
-
senderMessageBubbleStyle
|
|
9
|
+
title!: (bot: CometChat.User) => string;
|
|
10
|
+
botFirstMessageText!: (bot: CometChat.User) => string;
|
|
11
|
+
closeIconURL!: string;
|
|
12
|
+
sendIconURL!: string;
|
|
13
|
+
botMessageBubbleStyle!: AIBotMessageBubbleStyle;
|
|
14
|
+
senderMessageBubbleStyle!: AISenderMessageBubbleStyle;
|
|
14
15
|
avatarStyle?: AvatarStyle;
|
|
15
16
|
messageInputStyle?: CometChatMessageInputStyleInterface;
|
|
16
|
-
style
|
|
17
|
+
style!: AIAssistBotStyle;
|
|
17
18
|
loadingIconURL?: string = ICONS.WAITING;
|
|
18
19
|
errorIconURL?: string = ICONS.ERROR_TICK;
|
|
19
20
|
constructor(props: Partial<AIAssistBotConfiguration>) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { TouchableOpacity, View, Text, ScrollView } from "react-native";
|
|
2
|
+
import { TouchableOpacity, View, Text, ScrollView, ViewProps } from "react-native";
|
|
3
|
+
//@ts-ignore
|
|
3
4
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
4
5
|
import { CometChatTheme, CometChatUIEventHandler, CometChatUIEvents, DataSource, DataSourceDecorator, MessageEvents, localize } from "../../shared";
|
|
5
6
|
import { MessageStatusConstants, ReceiverTypeConstants, ViewAlignment } from "../../shared/constants/UIKitConstants";
|
|
@@ -12,14 +13,14 @@ import CometChatAICard from "../../shared/views/CometChatAICard/CometChatAICard"
|
|
|
12
13
|
export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
13
14
|
public configuration?: AIConversationStarterConfiguration;
|
|
14
15
|
public currentMessage: CometChat.BaseMessage | null = null;
|
|
15
|
-
public loggedInUser!: CometChat.User |
|
|
16
|
+
public loggedInUser!: CometChat.User | any;
|
|
16
17
|
messageListenerId = 'message_' + new Date().getTime();
|
|
17
18
|
public user!: CometChat.User;
|
|
18
19
|
public group!: CometChat.Group;
|
|
19
20
|
public cardViewStyle: CardViewStyle = {};
|
|
20
21
|
public errorStateText: string = localize("SOMETHING_WRONG");
|
|
21
22
|
public emptyStateText: string = localize("NO_MESSAGES_FOUND");
|
|
22
|
-
public theme
|
|
23
|
+
public theme!: CometChatTheme;
|
|
23
24
|
constructor(dataSource: DataSource, configuration?: AIConversationStarterConfiguration) {
|
|
24
25
|
|
|
25
26
|
super(dataSource);
|
|
@@ -36,7 +37,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
36
37
|
|
|
37
38
|
private loadConversationStarter(): void {
|
|
38
39
|
this.getConversationStarter()
|
|
39
|
-
.then((replies) => {
|
|
40
|
+
.then((replies: any) => {
|
|
40
41
|
if (!replies || (replies?.length && replies.length <= 0)) {
|
|
41
42
|
this.showDefaultPanel(State.empty)
|
|
42
43
|
}
|
|
@@ -44,7 +45,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
44
45
|
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.showPanel, {
|
|
45
46
|
alignment: ViewAlignment.composerTop,
|
|
46
47
|
child: () => (
|
|
47
|
-
<View style={{
|
|
48
|
+
<View style={{ width: this.cardViewStyle?.width || "100%", height: this.cardViewStyle?.height || 130, backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border } as ViewProps}>
|
|
48
49
|
<ScrollView style={{ height: "100%", width: "100%" }}>
|
|
49
50
|
{replies}
|
|
50
51
|
</ScrollView>
|
|
@@ -62,11 +63,11 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
private getLoadingView(): JSX.Element {
|
|
65
|
-
let LoadingView
|
|
66
|
+
let LoadingView = this.configuration?.LoadingStateView
|
|
66
67
|
return (
|
|
67
68
|
<CometChatAICard
|
|
68
69
|
state={State.loading}
|
|
69
|
-
style={this.configuration?.conversationStarterStyle}
|
|
70
|
+
style={this.configuration?.conversationStarterStyle || {}}
|
|
70
71
|
loadingIconURL={this.configuration?.loadingIconURL}// || loadingIconURL}
|
|
71
72
|
loadingStateText={localize("GENERATIONG_ICEBREAKER")}
|
|
72
73
|
>
|
|
@@ -76,11 +77,11 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
private getEmptyView(): JSX.Element {
|
|
79
|
-
let EmptyView
|
|
80
|
+
let EmptyView = this.configuration?.EmptyStateView
|
|
80
81
|
return (
|
|
81
82
|
<CometChatAICard
|
|
82
83
|
state={State.empty}
|
|
83
|
-
style={this.configuration?.conversationStarterStyle}
|
|
84
|
+
style={this.configuration?.conversationStarterStyle || {}}
|
|
84
85
|
emptyIconURL={this.configuration?.emptyIconURL}// || emptyIcon}
|
|
85
86
|
emptyStateText={this.emptyStateText}
|
|
86
87
|
>
|
|
@@ -93,7 +94,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
93
94
|
return (
|
|
94
95
|
<CometChatAICard
|
|
95
96
|
state={State.error}
|
|
96
|
-
style={this.configuration?.conversationStarterStyle}
|
|
97
|
+
style={this.configuration?.conversationStarterStyle || {}}
|
|
97
98
|
errorIconURL={this.configuration?.errorIconURL}// || errorIcon}
|
|
98
99
|
errorStateText={this.errorStateText}
|
|
99
100
|
>
|
|
@@ -106,7 +107,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
106
107
|
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.showPanel, {
|
|
107
108
|
alignment: ViewAlignment.composerTop,
|
|
108
109
|
child: () => (
|
|
109
|
-
<View style={{ width: this.cardViewStyle?.width || "100%", height: 'auto', backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center" }}>
|
|
110
|
+
<View style={{ width: this.cardViewStyle?.width || "100%", height: 'auto', backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center" } as ViewProps}>
|
|
110
111
|
{state == State.loading ? this.getLoadingView()
|
|
111
112
|
: state == State.empty ? this.getEmptyView() : this.getErrorView(error)
|
|
112
113
|
}
|
|
@@ -128,7 +129,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
128
129
|
});
|
|
129
130
|
}
|
|
130
131
|
|
|
131
|
-
closeIfMessageReceived(message) {
|
|
132
|
+
closeIfMessageReceived(message: any) {
|
|
132
133
|
if (message?.receiverId == this.loggedInUser?.uid) {
|
|
133
134
|
this.closePanel()
|
|
134
135
|
}
|
|
@@ -140,7 +141,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
140
141
|
let receiverType: string = this.user ? ReceiverTypeConstants.user : ReceiverTypeConstants.group;
|
|
141
142
|
if (this.configuration?.customView) {
|
|
142
143
|
CometChat.getConversationStarter(receiverId, receiverType).then((response: any) => {
|
|
143
|
-
this.configuration
|
|
144
|
+
this.configuration?.customView?.(response).then((res: any) => {
|
|
144
145
|
return resolve((<View>{res}</View>))
|
|
145
146
|
})
|
|
146
147
|
.catch((err: CometChat.CometChatException) => {
|
|
@@ -158,7 +159,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
158
159
|
if (response[reply] && response[reply] != "") {
|
|
159
160
|
view.push(
|
|
160
161
|
(<TouchableOpacity
|
|
161
|
-
style={getRepliesWrapperStyle(this.theme, this.configuration?.conversationStarterStyle)}
|
|
162
|
+
style={getRepliesWrapperStyle(this.theme, this.configuration?.conversationStarterStyle || {}) as ViewProps}
|
|
162
163
|
key={response[reply]}
|
|
163
164
|
onPress={() => this.editReply(response[reply])}
|
|
164
165
|
>
|
|
@@ -178,29 +179,29 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
178
179
|
}
|
|
179
180
|
|
|
180
181
|
attachMessageListener() {
|
|
181
|
-
this.cardViewStyle = getCardViewStyle(this.theme, this.configuration?.conversationStarterStyle)
|
|
182
|
+
this.cardViewStyle = getCardViewStyle(this.theme, this.configuration?.conversationStarterStyle || {})
|
|
182
183
|
CometChatUIEventHandler.addMessageListener(
|
|
183
184
|
this.messageListenerId,
|
|
184
185
|
{
|
|
185
|
-
onTextMessageReceived: (textMessage) => {
|
|
186
|
+
onTextMessageReceived: (textMessage: any) => {
|
|
186
187
|
this.closeIfMessageReceived(textMessage)
|
|
187
188
|
},
|
|
188
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
189
|
+
onMediaMessageReceived: (mediaMessage: any) => {
|
|
189
190
|
this.closeIfMessageReceived(mediaMessage)
|
|
190
191
|
},
|
|
191
|
-
onCustomMessageReceived: (customMessage) => {
|
|
192
|
+
onCustomMessageReceived: (customMessage: any) => {
|
|
192
193
|
this.closeIfMessageReceived(customMessage)
|
|
193
194
|
},
|
|
194
|
-
onFormMessageReceived: (formMessage) => {
|
|
195
|
+
onFormMessageReceived: (formMessage: any) => {
|
|
195
196
|
this.closeIfMessageReceived(formMessage)
|
|
196
197
|
},
|
|
197
|
-
onCardMessageReceived: (cardMessage) => {
|
|
198
|
+
onCardMessageReceived: (cardMessage: any) => {
|
|
198
199
|
this.closeIfMessageReceived(cardMessage)
|
|
199
200
|
},
|
|
200
|
-
onSchedulerMessageReceived: (schedulerMessage) => {
|
|
201
|
+
onSchedulerMessageReceived: (schedulerMessage: any) => {
|
|
201
202
|
this.closeIfMessageReceived(schedulerMessage)
|
|
202
203
|
},
|
|
203
|
-
onCustomInteractiveMessageReceived: (customInteractiveMessage) => {
|
|
204
|
+
onCustomInteractiveMessageReceived: (customInteractiveMessage: any) => {
|
|
204
205
|
this.closeIfMessageReceived(customInteractiveMessage)
|
|
205
206
|
}
|
|
206
207
|
})
|
|
@@ -209,15 +210,15 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
209
210
|
private listeners() {
|
|
210
211
|
|
|
211
212
|
CometChat.getLoggedinUser()
|
|
212
|
-
.then((u) => {
|
|
213
|
+
.then((u: any) => {
|
|
213
214
|
this.loggedInUser = u;
|
|
214
215
|
})
|
|
215
|
-
.catch((err) => console.log(err));
|
|
216
|
+
.catch((err: any) => console.log(err));
|
|
216
217
|
|
|
217
218
|
CometChatUIEventHandler.addMessageListener(
|
|
218
219
|
MessageEvents.ccActiveChatChanged + "_STARTER",
|
|
219
220
|
{
|
|
220
|
-
ccActiveChatChanged: ({ message, user, group, theme, parentMessageId }) => {
|
|
221
|
+
ccActiveChatChanged: ({ message, user, group, theme, parentMessageId }: any) => {
|
|
221
222
|
this.user = user;
|
|
222
223
|
this.group = group;
|
|
223
224
|
if (theme) {
|
|
@@ -233,7 +234,7 @@ export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
|
233
234
|
this.loadConversationStarter();
|
|
234
235
|
}
|
|
235
236
|
},
|
|
236
|
-
ccMessageSent: ({ message, status }) => {
|
|
237
|
+
ccMessageSent: ({ message, status }: any) => {
|
|
237
238
|
if (status == MessageStatusConstants.success && message?.sender?.uid == this.loggedInUser?.uid) {
|
|
238
239
|
this.closePanel();
|
|
239
240
|
}
|
|
@@ -6,6 +6,7 @@ export class AIConversationStarterStyle extends AIBaseStyle {
|
|
|
6
6
|
repliesTextBorderRadius?: string;
|
|
7
7
|
repliesTextColor?: string;
|
|
8
8
|
repliesTextBackground?: string;
|
|
9
|
+
repliesTextBackgroundColor?: any;
|
|
9
10
|
constructor(props: Partial<AIConversationStarterStyle>) {
|
|
10
11
|
super({});
|
|
11
12
|
Object.assign(this, props);
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { BorderStyle, CometChatTheme } from "../../shared";
|
|
2
|
-
import { AIConversationStarterStyle } from "
|
|
2
|
+
import { AIConversationStarterStyle } from "./AIConversationStarterStyle";
|
|
3
3
|
import { CardViewStyle } from "../CardViewStyle";
|
|
4
4
|
import { StyleSheet } from 'react-native';
|
|
5
5
|
|
|
6
6
|
export function getCardViewStyle(theme:CometChatTheme, style:AIConversationStarterStyle) {
|
|
7
|
-
const defaultStyle:AIConversationStarterStyle =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
7
|
+
const defaultStyle:AIConversationStarterStyle = {
|
|
8
|
+
emptyStateTextColor: theme?.palette?.getAccent600(),
|
|
9
|
+
loadingStateTextColor: theme?.palette?.getAccent600(),
|
|
10
|
+
errorStateTextColor: theme?.palette?.getAccent600(),
|
|
11
|
+
emptyStateTextFont: theme?.typography?.title2,
|
|
12
|
+
errorStateTextFont: theme?.typography?.title2,
|
|
13
|
+
loadingStateTextFont: theme?.typography?.title2,
|
|
14
|
+
backgroundColor: theme?.palette?.getBackgroundColor(),
|
|
15
|
+
loadingIconTint: theme?.palette?.getAccent600(),
|
|
16
|
+
errorIconTint: theme?.palette?.getAccent600(),
|
|
17
|
+
emptyIconTint: theme?.palette?.getAccent600(),
|
|
18
|
+
border: {},
|
|
19
|
+
borderRadius: 8,
|
|
20
|
+
height: 130,
|
|
21
|
+
width: "100%",
|
|
22
|
+
};
|
|
23
23
|
|
|
24
24
|
return StyleSheet.flatten([defaultStyle, style]);
|
|
25
25
|
}
|
|
26
|
-
export function getRepliesStyle(theme, configStyles) {
|
|
26
|
+
export function getRepliesStyle(theme: any, configStyles: any) {
|
|
27
27
|
let fontFamily = configStyles?.repliesTextFont || theme?.typography?.text3;
|
|
28
28
|
return StyleSheet.create({
|
|
29
29
|
|
|
@@ -35,7 +35,7 @@ export function getCardViewStyle(theme:CometChatTheme, style:AIConversationStart
|
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
export function getloadingStateStyle(theme, configStyles:AIConversationStarterStyle){
|
|
38
|
+
export function getloadingStateStyle(theme: any, configStyles:AIConversationStarterStyle){
|
|
39
39
|
let fontFamily = configStyles?.loadingStateTextFont|| theme?.typography?.title2;
|
|
40
40
|
|
|
41
41
|
return StyleSheet.create({
|
|
@@ -61,16 +61,14 @@ export function getCardViewStyle(theme:CometChatTheme, style:AIConversationStart
|
|
|
61
61
|
|
|
62
62
|
export function getRepliesWrapperStyle(theme:CometChatTheme, configStyles:AIConversationStarterStyle) {
|
|
63
63
|
|
|
64
|
-
return
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
});
|
|
64
|
+
return {
|
|
65
|
+
flexDirection: 'row',
|
|
66
|
+
padding: 8,
|
|
67
|
+
margin: 4,
|
|
68
|
+
backgroundColor: configStyles?.repliesTextBackgroundColor || theme?.palette?.getBackgroundColor(),
|
|
69
|
+
...new BorderStyle({borderWidth: 1, borderStyle: "solid", borderColor: theme?.palette.getAccent200()}),
|
|
70
|
+
borderRadius: configStyles?.repliesTextBorderRadius || 8,
|
|
71
|
+
boxSizing: 'border-box',
|
|
72
|
+
cursor: 'pointer',
|
|
73
|
+
};
|
|
76
74
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
//@ts-ignore
|
|
2
3
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
4
|
import AIConversationSummaryView from "./AIConversationSummaryView";
|
|
4
5
|
import { CometChatMessageComposerActionInterface, CometChatTheme, CometChatUIEventHandler, CometChatUIEvents, DataSource, DataSourceDecorator, MessageEvents, localize } from "../../shared";
|
|
@@ -11,7 +12,7 @@ export class AIConversationSummaryDecorator extends DataSourceDecorator {
|
|
|
11
12
|
public newDataSource!: DataSource;
|
|
12
13
|
public currentMessage: CometChat.BaseMessage | null = null;
|
|
13
14
|
public unreadMessageCount: number = 0;
|
|
14
|
-
public loggedInUser!: CometChat.User |
|
|
15
|
+
public loggedInUser!: CometChat.User | any;
|
|
15
16
|
public user!: CometChat.User;
|
|
16
17
|
public group!: CometChat.Group;
|
|
17
18
|
public theme: CometChatTheme = new CometChatTheme({});
|
|
@@ -98,21 +99,21 @@ export class AIConversationSummaryDecorator extends DataSourceDecorator {
|
|
|
98
99
|
});
|
|
99
100
|
}
|
|
100
101
|
|
|
101
|
-
override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, AIOptionsStyle?: AIOptionsStyle): CometChatMessageComposerActionInterface[] {
|
|
102
|
+
override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, AIOptionsStyle?: AIOptionsStyle): CometChatMessageComposerActionInterface[] | any[] {
|
|
102
103
|
this.user = user!;
|
|
103
104
|
this.group = group!;
|
|
104
105
|
if (!id?.parentMessageId) {
|
|
105
|
-
const messageComposerActions: CometChatMessageComposerActionInterface[] = super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
106
|
+
const messageComposerActions: CometChatMessageComposerActionInterface[] | any[] = super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
106
107
|
let newAction = {
|
|
107
108
|
title: localize("GENERATE_SUMMARY"),
|
|
108
109
|
onPress: () => { this.loadConversationSummary() },
|
|
109
110
|
id: "ai-conversation-summary",
|
|
110
111
|
iconURL: '',
|
|
111
112
|
iconTint: '',
|
|
112
|
-
titleColor: this.configuration?.conversationSummaryStyle?.buttonTextColor || AIOptionsStyle
|
|
113
|
-
titleFont: this.configuration?.conversationSummaryStyle?.buttonTextFont || AIOptionsStyle
|
|
114
|
-
background: this.configuration?.conversationSummaryStyle?.backgroundColor || AIOptionsStyle
|
|
115
|
-
cornerRadius: this.configuration?.conversationSummaryStyle?.buttonBorderRadius || AIOptionsStyle
|
|
113
|
+
titleColor: this.configuration?.conversationSummaryStyle?.buttonTextColor || AIOptionsStyle?.listItemTitleColor,
|
|
114
|
+
titleFont: this.configuration?.conversationSummaryStyle?.buttonTextFont || AIOptionsStyle?.listItemTitleFont,
|
|
115
|
+
background: this.configuration?.conversationSummaryStyle?.backgroundColor || AIOptionsStyle?.listItemBackground,
|
|
116
|
+
cornerRadius: this.configuration?.conversationSummaryStyle?.buttonBorderRadius || AIOptionsStyle?.listItemBorderRadius,
|
|
116
117
|
};
|
|
117
118
|
messageComposerActions.push(newAction);
|
|
118
119
|
return messageComposerActions;
|
|
@@ -138,16 +139,16 @@ export class AIConversationSummaryDecorator extends DataSourceDecorator {
|
|
|
138
139
|
onMediaMessageReceived: (message: CometChat.MediaMessage) => {
|
|
139
140
|
this.closeIfMessageReceived(message);
|
|
140
141
|
},
|
|
141
|
-
onFormMessageReceived: (formMessage) => {
|
|
142
|
+
onFormMessageReceived: (formMessage: any) => {
|
|
142
143
|
this.closeIfMessageReceived(formMessage)
|
|
143
144
|
},
|
|
144
|
-
onCardMessageReceived: (cardMessage) => {
|
|
145
|
+
onCardMessageReceived: (cardMessage: any) => {
|
|
145
146
|
this.closeIfMessageReceived(cardMessage)
|
|
146
147
|
},
|
|
147
|
-
onSchedulerMessageReceived: (schedulerMessage) => {
|
|
148
|
+
onSchedulerMessageReceived: (schedulerMessage: any) => {
|
|
148
149
|
this.closeIfMessageReceived(schedulerMessage)
|
|
149
150
|
},
|
|
150
|
-
onCustomInteractiveMessageReceived: (customInteractiveMessage) => {
|
|
151
|
+
onCustomInteractiveMessageReceived: (customInteractiveMessage: any) => {
|
|
151
152
|
this.closeIfMessageReceived(customInteractiveMessage)
|
|
152
153
|
}
|
|
153
154
|
});
|
|
@@ -155,7 +156,7 @@ export class AIConversationSummaryDecorator extends DataSourceDecorator {
|
|
|
155
156
|
CometChatUIEventHandler.addMessageListener(
|
|
156
157
|
MessageEvents.ccActiveChatChanged,
|
|
157
158
|
{
|
|
158
|
-
ccActiveChatChanged: (data) => {
|
|
159
|
+
ccActiveChatChanged: (data: any) => {
|
|
159
160
|
this.currentMessage = data.message!;
|
|
160
161
|
this.user = data.user!;
|
|
161
162
|
this.group = data.group!;
|
|
@@ -164,7 +165,7 @@ export class AIConversationSummaryDecorator extends DataSourceDecorator {
|
|
|
164
165
|
this.loadConversationSummary();
|
|
165
166
|
}
|
|
166
167
|
},
|
|
167
|
-
ccMessageSent: ({ message, status }) => {
|
|
168
|
+
ccMessageSent: ({ message, status }: any) => {
|
|
168
169
|
if (status == MessageStatusConstants.success && message?.sender?.uid == this.loggedInUser?.uid) {
|
|
169
170
|
this.closePanel();
|
|
170
171
|
this.currentMessage = null;
|