@cometchat/chat-uikit-react-native 4.0.1 → 4.1.0
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/README.md +1 -1
- package/android/.gradle/7.4/checksums/checksums.lock +0 -0
- package/android/.gradle/7.4/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.4/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.4/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/.idea/gradle.xml +13 -0
- package/android/.idea/misc.xml +9 -0
- package/android/.idea/vcs.xml +6 -0
- package/android/src/main/java/com/reactnativecometchatuikit/{RNSoundModule.java → CometChatSoundModule.java} +22 -22
- package/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +1 -1
- package/ios/{RNSound.h → CometChatSoundModule.h} +1 -1
- package/ios/{RNSound.m → CometChatSoundModule.m} +2 -2
- package/lib/CometChatConversations/ConversationsConfiguration.d.ts +1 -0
- package/lib/CometChatDetails/DetailsConfiguration.d.ts +1 -0
- package/lib/CometChatGroupMembers/GroupMemberConfiguration.d.ts +1 -0
- package/lib/CometChatGroups/GroupsConfiguration.d.ts +1 -0
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +1 -7
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageHeader/MessageHeaderConfiguration.d.ts +1 -0
- package/lib/CometChatMessageList/CometChatMessageList.js +18 -49
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/MessageListConfiguration.d.ts +1 -0
- package/lib/CometChatMessages/MessagesConfiguration.d.ts +1 -0
- package/lib/CometChatTabs/TabItems.d.ts +1 -0
- package/lib/CometChatThreadedMessages/ThreadedMessagesConfiguration.d.ts +1 -0
- package/lib/calls/CometChatCallDetails/CallDetailsConfiguration.d.ts +1 -0
- package/lib/calls/CometChatCallHistory/CallHistoryConfiguration.d.ts +1 -0
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +3 -3
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
- package/lib/extensions/ImageModeration/ImageModerationDecorator.d.ts +1 -0
- package/lib/extensions/ImageModeration/ImageModerationFilter.js +4 -4
- package/lib/extensions/ImageModeration/ImageModerationFilter.js.map +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewExtentionDecorator.d.ts +1 -0
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.d.ts +1 -0
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.js +1 -1
- package/lib/extensions/SmartReplies/SmartRepliesDecorator.js.map +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.js +2 -4
- package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
- package/lib/extensions/TextModeration/TextModerationExtensionDecorator.d.ts +1 -0
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -14
- package/lib/index.js.map +1 -1
- package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +0 -2
- package/lib/shared/CometChatUiKit/CometChatUIKit.js +2 -13
- package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
- package/lib/shared/CometChatUiKit/UIKitSettings.d.ts +1 -5
- package/lib/shared/CometChatUiKit/UIKitSettings.js +1 -3
- package/lib/shared/CometChatUiKit/UIKitSettings.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +0 -2
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.d.ts +1 -3
- package/lib/shared/events/CometChatUIEventHandler/Listener.js +1 -4
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/CometChatUIEvents.d.ts +1 -2
- package/lib/shared/events/CometChatUIEvents.js +0 -1
- package/lib/shared/events/CometChatUIEvents.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +2 -1
- package/lib/shared/framework/DataSourceDecorator.d.ts +2 -1
- package/lib/shared/framework/DataSourceDecorator.js +2 -2
- package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +1 -1
- package/lib/shared/framework/MessageDataSource.js +2 -2
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/helper/types/index.d.ts +1 -0
- package/lib/shared/modals/CometChatDetailsOption.d.ts +1 -0
- package/lib/shared/modals/CometChatMessageOption.d.ts +1 -0
- package/lib/shared/modals/CometChatMessageTemplate.d.ts +1 -0
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +153 -230
- package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/de/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/en/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/es/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/fr/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/hi/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/lt/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/ms/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/pt/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/ru/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/sv/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/zh/translation.json +0 -4
- package/lib/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +0 -4
- package/package.json +3 -3
- package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +164 -0
- package/src/AI/AIAssistBot/AIAssistBotExtension.tsx +22 -0
- package/src/AI/AIAssistBot/AIAssistBotStyle.ts +43 -0
- package/src/AI/AIAssistBot/AIAssistBotView.tsx +294 -0
- package/src/AI/AIAssistBot/configuration.ts +22 -0
- package/src/AI/AIAssistBot/resources/index.ts +5 -0
- package/src/AI/{configuration.ts → AIBaseConfiguration.ts} +3 -6
- package/src/AI/AIBaseStyle.ts +58 -0
- package/src/AI/AIConversationStarter/AIConversationStarter.ts +5 -19
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +145 -132
- package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +11 -6
- package/src/AI/AIConversationStarter/configuration.ts +10 -17
- package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +175 -0
- package/src/AI/AIConversationSummary/AIConversationSummaryExtension.ts +21 -0
- package/src/AI/AIConversationSummary/AIConversationSummaryStyle.tsx +20 -0
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +190 -0
- package/src/AI/AIConversationSummary/configuration.ts +14 -0
- package/src/AI/AIConversationSummary/resources/close.png +0 -0
- package/src/AI/AIConversationSummary/resources/index.ts +5 -0
- package/src/AI/AIExtensionDataSource.ts +17 -12
- package/src/AI/AIOptionsStyle.ts +14 -0
- package/src/AI/AISmartReplies/AISmartReplies.ts +6 -15
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +302 -0
- package/src/AI/AISmartReplies/AISmartRepliesStyle.ts +1 -1
- package/src/AI/AISmartReplies/configuration.ts +4 -11
- package/src/AI/resources/index.ts +0 -2
- package/src/AI/utils.ts +3 -3
- package/src/CometChatConversations/CometChatConversations.tsx +56 -46
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +118 -5
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +3 -0
- package/src/CometChatMessageComposer/resources/index.ts +2 -0
- package/src/CometChatMessageComposer/styles.ts +1 -4
- package/src/CometChatMessageHeader/listners.ts +5 -4
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +35 -35
- package/src/CometChatMessageList/CometChatMessageList.tsx +284 -166
- package/src/CometChatMessages/CometChatMessages.tsx +8 -16
- package/src/CometChatMessages/MessagesConfiguration.ts +2 -2
- package/src/CometChatTabs/CometChatTabs.tsx +1 -1
- package/src/calls/CallUtils.ts +106 -45
- package/src/calls/CallingDetailsUtils.tsx +133 -15
- package/src/calls/CallingPackage.ts +16 -2
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +9 -10
- package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +116 -0
- package/src/calls/CometChatCallLogDetails/CallLogDetailsStyle.ts +36 -0
- package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +308 -0
- package/src/calls/CometChatCallLogDetails/index.ts +12 -0
- package/src/calls/CometChatCallLogDetails/resources/CloseIcon.png +0 -0
- package/src/calls/{CometChatCallDetails → CometChatCallLogDetails}/style.ts +1 -0
- package/src/calls/{CometChatCallHistory/CallHistoryConfiguration.ts → CometChatCallLogHistory/CallLogHistoryConfiguration.ts} +15 -27
- package/src/calls/CometChatCallLogHistory/CallLogHistoryStyle.ts +46 -0
- package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +337 -0
- package/src/calls/CometChatCallLogHistory/index.ts +12 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/incomingvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/index.ts +29 -0
- package/src/calls/CometChatCallLogHistory/resources/missedcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/missedvideo.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingcall.png +0 -0
- package/src/calls/CometChatCallLogHistory/resources/outgoingvideo.png +0 -0
- package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/style.ts +2 -1
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +61 -0
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsStyle.ts +59 -0
- package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +220 -0
- package/src/calls/CometChatCallLogParticipants/index.ts +12 -0
- package/src/calls/CometChatCallLogParticipants/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogParticipants/resources/index.ts +4 -0
- package/src/calls/CometChatCallLogParticipants/style.ts +24 -0
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +63 -0
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsStyle.ts +63 -0
- package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +253 -0
- package/src/calls/CometChatCallLogRecordings/index.ts +12 -0
- package/src/calls/CometChatCallLogRecordings/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/download.png +0 -0
- package/src/calls/CometChatCallLogRecordings/resources/index.ts +6 -0
- package/src/calls/CometChatCallLogRecordings/style.ts +24 -0
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +87 -0
- package/src/calls/CometChatCallLogs/CallLogsStyle.ts +95 -0
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +482 -0
- package/src/calls/CometChatCallLogs/index.ts +12 -0
- package/src/calls/CometChatCallLogs/resources/Back.png +0 -0
- package/src/calls/CometChatCallLogs/resources/Info.png +0 -0
- package/src/calls/CometChatCallLogs/resources/Selection.png +0 -0
- package/src/calls/CometChatCallLogs/resources/Spinner.png +0 -0
- package/src/calls/CometChatCallLogs/resources/check.png +0 -0
- package/src/calls/CometChatCallLogs/resources/incomingcall.png +0 -0
- package/src/calls/CometChatCallLogs/resources/incomingvideo.png +0 -0
- package/src/calls/CometChatCallLogs/resources/index.ts +25 -0
- package/src/calls/CometChatCallLogs/resources/missedcall.png +0 -0
- package/src/calls/CometChatCallLogs/resources/missedvideo.png +0 -0
- package/src/calls/CometChatCallLogs/resources/outgoingcall.png +0 -0
- package/src/calls/CometChatCallLogs/resources/outgoingvideo.png +0 -0
- package/src/calls/CometChatCallLogs/style.ts +24 -0
- package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +9 -0
- package/src/calls/{CometChatCallHistoryWithDetails/CometChatCallHistoryWithDetails.tsx → CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx} +17 -16
- package/src/calls/CometChatCallLogsWithDetails/index.ts +7 -0
- package/src/calls/index.ts +40 -1
- package/src/calls/resources/index.ts +3 -1
- package/src/calls/resources/nextarrow.png +0 -0
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +6 -14
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +1 -1
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +5 -3
- package/src/extensions/ThumbnailGeneration/resources/empty.png +0 -0
- package/src/extensions/ThumbnailGeneration/resources/index.ts +5 -0
- package/src/index.ts +134 -17
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +175 -63
- package/src/shared/CometChatUiKit/UIKitSettings.ts +2 -2
- package/src/shared/constants/UIKitConstants.ts +81 -47
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +47 -3
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +61 -2
- package/src/shared/events/ListenerInitializer.ts +73 -0
- package/src/shared/events/messages.ts +14 -0
- package/src/shared/framework/DataSource.ts +15 -0
- package/src/shared/framework/DataSourceDecorator.tsx +40 -0
- package/src/shared/framework/MessageDataSource.tsx +87 -4
- package/src/shared/index.ts +48 -0
- package/src/shared/modals/CometChatCallLogDetailsOptions.ts +23 -0
- package/src/shared/modals/CometChatCallLogDetailsTemplate.ts +16 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/APIAction.ts +118 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/CustomAction.ts +19 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/URLNavigationAction.ts +34 -0
- package/src/shared/modals/InteractiveData/InteractiveActions/index.ts +3 -0
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveCardData.ts +69 -0
- package/src/shared/modals/InteractiveData/InteractiveData/InteractiveFormData.ts +119 -0
- package/src/shared/modals/InteractiveData/InteractiveData/index.ts +2 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInputElement.ts +102 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/BaseInteractiveElement.ts +45 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/ButtonElement.ts +61 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/CheckboxElement.ts +75 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/DropdownElement.ts +83 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/LabelElement.ts +32 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/OptionElement.ts +39 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/RadioButtonElement.ts +76 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/SingleSelectElement.ts +76 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/TextInputElement.ts +101 -0
- package/src/shared/modals/InteractiveData/InteractiveElements/index.ts +10 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/ActionEntity.ts +41 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/ElementEntity.ts +64 -0
- package/src/shared/modals/InteractiveData/InteractiveEntities/index.ts +2 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +142 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +38 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +152 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/index.ts +3 -0
- package/src/shared/modals/InteractiveData/index.ts +28 -0
- package/src/shared/modals/index.ts +23 -0
- package/src/shared/resources/CometChatLocalize/resources/ar/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/de/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/en/translation.json +24 -7
- package/src/shared/resources/CometChatLocalize/resources/es/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/fr/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/hi/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/lt/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/ms/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/pt/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/ru/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/sv/translation.json +22 -5
- package/src/shared/resources/CometChatLocalize/resources/zh/translation.json +22 -4
- package/src/shared/resources/CometChatLocalize/resources/zh-tw/translation.json +22 -5
- package/src/shared/resources/CometChatSoundManager/CometChatSoundManager.js +2 -2
- package/src/shared/resources/CometChatSoundManager/sound.js +35 -35
- package/src/shared/resources/CometChatTheme/Palette.ts +16 -0
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +1 -1
- package/src/shared/utils/InteractiveMessageUtils.ts +20 -0
- package/src/shared/utils/NetworkUtils.tsx +20 -0
- package/src/shared/utils/conversationUtils.ts +9 -6
- package/src/shared/views/CometChatAICard/CometChatAICard.tsx +71 -0
- package/src/shared/views/CometChatAICard/resources/errormessage.png +0 -0
- package/src/shared/views/CometChatAICard/resources/index.ts +4 -0
- package/src/shared/views/CometChatAICard/resources/nomessage.png +0 -0
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +4 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +11 -7
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +56 -47
- package/src/shared/views/CometChatBottomSheet/style.ts +0 -2
- package/src/shared/views/CometChatButton/CometChatButton.tsx +32 -22
- package/src/shared/views/CometChatCardBubble/CardBubbleStyle.tsx +47 -0
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +173 -0
- package/src/shared/views/CometChatCardBubble/index.tsx +1 -0
- package/src/shared/views/CometChatCheckBox/CheckBoxStyle.tsx +43 -0
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +79 -0
- package/src/shared/views/CometChatDate/CometChatDate.tsx +9 -6
- package/src/shared/views/CometChatDate/DateConfiguration.ts +4 -0
- package/src/shared/views/CometChatDate/style.ts +1 -1
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +126 -0
- package/src/shared/views/CometChatDropDown/DropDownStyle.tsx +39 -0
- package/src/shared/views/CometChatDropDown/resources/downArrowIcon.png +0 -0
- package/src/shared/views/CometChatDropDown/resources/index.js +5 -0
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +464 -0
- package/src/shared/views/CometChatFormBubble/FormBubbleStyle.tsx +91 -0
- package/src/shared/views/CometChatFormBubble/index.tsx +1 -0
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +13 -5
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +14 -3
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +27 -0
- package/src/shared/views/CometChatLabel/LabelStyle.ts +19 -0
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +31 -19
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +5 -4
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +1 -2
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +51 -0
- package/src/shared/views/CometChatPanel/PanelStyle.tsx +43 -0
- package/src/shared/views/CometChatPanel/resources/CloseIcon.png +0 -0
- package/src/shared/views/CometChatPanel/resources/index.ts +5 -0
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +66 -0
- package/src/shared/views/CometChatQuickView/QuickViewStyle.ts +55 -0
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +67 -0
- package/src/shared/views/CometChatRadioButton/RadioButtonStyle.tsx +38 -0
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +63 -0
- package/src/shared/views/CometChatSingleSelect/SingleStyle.tsx +35 -0
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +67 -0
- package/src/shared/views/CometChatTextInput/TextInputStyle.tsx +26 -0
- package/src/shared/views/index.ts +7 -1
- package/lib/AI/AIConversationStarter/AIConversationStarter.d.ts +0 -12
- package/lib/AI/AIConversationStarter/AIConversationStarter.js +0 -31
- package/lib/AI/AIConversationStarter/AIConversationStarter.js.map +0 -1
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.d.ts +0 -25
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js +0 -175
- package/lib/AI/AIConversationStarter/AIConversationStarterDecorator.js.map +0 -1
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.d.ts +0 -4
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js +0 -8
- package/lib/AI/AIConversationStarter/AIConversationStarterStyle.js.map +0 -1
- package/lib/AI/AIConversationStarter/configuration.d.ts +0 -14
- package/lib/AI/AIConversationStarter/configuration.js +0 -16
- package/lib/AI/AIConversationStarter/configuration.js.map +0 -1
- package/lib/AI/AIConversationStarter/style.d.ts +0 -31
- package/lib/AI/AIConversationStarter/style.js +0 -62
- package/lib/AI/AIConversationStarter/style.js.map +0 -1
- package/lib/AI/AIEnabler.d.ts +0 -10
- package/lib/AI/AIEnabler.js +0 -102
- package/lib/AI/AIEnabler.js.map +0 -1
- package/lib/AI/AIEnablerDecorator.d.ts +0 -43
- package/lib/AI/AIEnablerDecorator.js +0 -251
- package/lib/AI/AIEnablerDecorator.js.map +0 -1
- package/lib/AI/AIExtensionDataSource.d.ts +0 -6
- package/lib/AI/AIExtensionDataSource.js +0 -10
- package/lib/AI/AIExtensionDataSource.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartReplies.d.ts +0 -10
- package/lib/AI/AISmartReplies/AISmartReplies.js +0 -23
- package/lib/AI/AISmartReplies/AISmartReplies.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.d.ts +0 -7
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js +0 -12
- package/lib/AI/AISmartReplies/AISmartRepliesDecorator.js.map +0 -1
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.d.ts +0 -12
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.js +0 -15
- package/lib/AI/AISmartReplies/AISmartRepliesStyle.js.map +0 -1
- package/lib/AI/AISmartReplies/configuration.d.ts +0 -14
- package/lib/AI/AISmartReplies/configuration.js +0 -16
- package/lib/AI/AISmartReplies/configuration.js.map +0 -1
- package/lib/AI/CardView.d.ts +0 -19
- package/lib/AI/CardView.js +0 -45
- package/lib/AI/CardView.js.map +0 -1
- package/lib/AI/CardViewStyle.d.ts +0 -29
- package/lib/AI/CardViewStyle.js +0 -36
- package/lib/AI/CardViewStyle.js.map +0 -1
- package/lib/AI/configuration.d.ts +0 -14
- package/lib/AI/configuration.js +0 -16
- package/lib/AI/configuration.js.map +0 -1
- package/lib/AI/resources/index.d.ts +0 -5
- package/lib/AI/resources/index.js +0 -6
- package/lib/AI/resources/index.js.map +0 -1
- package/lib/AI/style.d.ts +0 -115
- package/lib/AI/style.js +0 -139
- package/lib/AI/style.js.map +0 -1
- package/lib/AI/utils.d.ts +0 -38
- package/lib/AI/utils.js +0 -28
- package/lib/AI/utils.js.map +0 -1
- package/src/AI/AIEnabler.ts +0 -115
- package/src/AI/AIEnablerDecorator.tsx +0 -324
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.ts +0 -18
- package/src/calls/CometChatCallDetails/CallDetailsConfiguration.ts +0 -68
- package/src/calls/CometChatCallDetails/CallDetailsStyle.ts +0 -52
- package/src/calls/CometChatCallDetails/CometChatCallDetails.tsx +0 -268
- package/src/calls/CometChatCallDetails/index.ts +0 -9
- package/src/calls/CometChatCallHistory/CallHistoryStyle.ts +0 -34
- package/src/calls/CometChatCallHistory/CometChatCallHistory.tsx +0 -422
- package/src/calls/CometChatCallHistory/index.ts +0 -9
- package/src/calls/CometChatCallHistory/resources/index.ts +0 -17
- package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsConfiguration.ts +0 -7
- package/src/calls/CometChatCallHistoryWithDetails/HistoryWithDetailsStyle.ts +0 -3
- package/src/calls/CometChatCallHistoryWithDetails/index.ts +0 -8
- /package/src/{calls/CometChatCallDetails → AI/AIAssistBot}/resources/CloseIcon.png +0 -0
- /package/src/{AI → CometChatMessageComposer}/resources/ai.png +0 -0
- /package/src/calls/{CometChatCallDetails → CometChatCallLogDetails}/resources/index.ts +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Back.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Call.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Info.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Selection.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Spineer.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/Video.png +0 -0
- /package/src/calls/{CometChatCallHistory → CometChatCallLogHistory}/resources/check.png +0 -0
- /package/src/calls/{CometChatCallHistoryWithDetails → CometChatCallLogsWithDetails}/style.ts +0 -0
|
@@ -13,14 +13,10 @@
|
|
|
13
13
|
"CUSTOM_MESSAGE_POLL": "📊 استطلاع للرأي",
|
|
14
14
|
"CUSTOM_MESSAGE_STICKER": "💟 ملصق",
|
|
15
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 وثيقة",
|
|
16
|
-
"NO_REPLIES_FOUND": "لم يتم العثور على أي ردود",
|
|
17
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 السبورة",
|
|
18
17
|
"ONLINE": "عبر الإنترنت",
|
|
19
18
|
"ADMINISTRATOR": "مدير",
|
|
20
19
|
"MODERATOR": "مدير الجلسة",
|
|
21
|
-
"SUGGEST_A_REPLIES": "اقترح ردًا",
|
|
22
|
-
"GENERATIONG_ICEBREAKER": "توليد كاسحات الجليد",
|
|
23
|
-
"GENERATING_REPLIES": "توليد الردود",
|
|
24
20
|
"PARTICIPANT": "مشارك",
|
|
25
21
|
"PUBLIC": "عامة",
|
|
26
22
|
"PRIVATE": "خاص",
|
|
@@ -13,17 +13,13 @@
|
|
|
13
13
|
"CUSTOM_MESSAGE_POLL": "📊 Umfrage",
|
|
14
14
|
"CUSTOM_MESSAGE_STICKER": "💟 Aufkleber",
|
|
15
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 Dokument",
|
|
16
|
-
"NO_REPLIES_FOUND": "Keine Antworten gefunden",
|
|
17
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 Whiteboard",
|
|
18
17
|
"ONLINE": "Online",
|
|
19
18
|
"ADMINISTRATOR": "Verwalter",
|
|
20
19
|
"MODERATOR": "Moderator",
|
|
21
|
-
"GENERATING_REPLIES": "Antworten generieren",
|
|
22
20
|
"PARTICIPANT": "Teilnehmerin",
|
|
23
21
|
"PUBLIC": "Öffentlich",
|
|
24
22
|
"PRIVATE": "Privat",
|
|
25
|
-
"SUGGEST_A_REPLIES": "Schlage eine Antwort vor",
|
|
26
|
-
"GENERATIONG_ICEBREAKER": "Eisbrecher erzeugen",
|
|
27
23
|
"PASSWORD_PROTECTED": "Passwort-geschützt",
|
|
28
24
|
"PRIVACY_AND_SECURITY": "Datenschutz und Sicherheit",
|
|
29
25
|
"PREFERENCES": "Präferenzen",
|
|
@@ -18,10 +18,7 @@
|
|
|
18
18
|
"ADMINISTRATOR": "Administrator",
|
|
19
19
|
"MODERATOR": "Moderator",
|
|
20
20
|
"PARTICIPANT": "Participant",
|
|
21
|
-
"SUGGEST_A_REPLIES": "Suggest a reply",
|
|
22
|
-
"GENERATIONG_ICEBREAKER": "Generating icebreakers",
|
|
23
21
|
"PUBLIC": "Public",
|
|
24
|
-
"NO_REPLIES_FOUND": "No Replies Found",
|
|
25
22
|
"PRIVATE": "Private",
|
|
26
23
|
"PASSWORD_PROTECTED": "Password Protected",
|
|
27
24
|
"PRIVACY_AND_SECURITY": "Privacy and Security",
|
|
@@ -218,7 +215,6 @@
|
|
|
218
215
|
"NO_PHOTOS": "No Photos",
|
|
219
216
|
"NO_VIDEOS": "No Videos",
|
|
220
217
|
"NO_DOCUMENTS": "No Documents",
|
|
221
|
-
"GENERATING_REPLIES": "Generating replies",
|
|
222
218
|
"JOIN": "Join",
|
|
223
219
|
"DELETE_CONFIRM_MESSAGE": "Would you like to delete this conversation? This conversation will be deleted from all of your devices.",
|
|
224
220
|
"CHAT_ERROR_MESSAGE": "Can't load chats. Please try again",
|
|
@@ -17,11 +17,7 @@
|
|
|
17
17
|
"ONLINE": "En línea",
|
|
18
18
|
"ADMINISTRATOR": "Administrador",
|
|
19
19
|
"MODERATOR": "Moderador",
|
|
20
|
-
"NO_REPLIES_FOUND": "No se encontraron respuestas",
|
|
21
20
|
"PARTICIPANT": "Participante",
|
|
22
|
-
"GENERATING_REPLIES": "Generación de respuestas",
|
|
23
|
-
"SUGGEST_A_REPLIES": "Sugerir una respuesta",
|
|
24
|
-
"GENERATIONG_ICEBREAKER": "Generando rompehielos",
|
|
25
21
|
"PUBLIC": "Público",
|
|
26
22
|
"PRIVATE": "Privado",
|
|
27
23
|
"PASSWORD_PROTECTED": "Protegido con contraseña",
|
|
@@ -17,12 +17,8 @@
|
|
|
17
17
|
"ONLINE": "En ligne",
|
|
18
18
|
"ADMINISTRATOR": "Administrateur",
|
|
19
19
|
"MODERATOR": "Modérateur",
|
|
20
|
-
"NO_REPLIES_FOUND": "Aucune réponse trouvée",
|
|
21
20
|
"PARTICIPANT": "Participant",
|
|
22
|
-
"GENERATING_REPLIES": "Génération de réponses",
|
|
23
21
|
"PUBLIC": "Public",
|
|
24
|
-
"SUGGEST_A_REPLIES": "Suggérer une réponse",
|
|
25
|
-
"GENERATIONG_ICEBREAKER": "Génération de brise-glaces",
|
|
26
22
|
"PRIVATE": "Privé",
|
|
27
23
|
"PASSWORD_PROTECTED": "Mot de passe",
|
|
28
24
|
"PRIVACY_AND_SECURITY": "Confidentialité et sécurité",
|
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
"CUSTOM_MESSAGE_POLL": "📊 पोल",
|
|
14
14
|
"CUSTOM_MESSAGE_STICKER": "💟 स्टीकर",
|
|
15
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 दस्तावेज़",
|
|
16
|
-
"SUGGEST_A_REPLIES": "जवाब सुझाएं",
|
|
17
|
-
"GENERATIONG_ICEBREAKER": "आइसब्रेकर उत्पन्न करना",
|
|
18
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 व्हाइटबोर्ड",
|
|
19
17
|
"ONLINE": "ऑनलाइन",
|
|
20
|
-
"NO_REPLIES_FOUND": "कोई जवाब नहीं मिला",
|
|
21
18
|
"ADMINISTRATOR": "प्रशासक",
|
|
22
19
|
"MODERATOR": "मॉडरेटर",
|
|
23
20
|
"PARTICIPANT": "प्रतिभागी",
|
|
24
21
|
"PUBLIC": "पब्लिक",
|
|
25
|
-
"GENERATING_REPLIES": "जवाब जनरेट करना",
|
|
26
22
|
"PRIVATE": "निजी",
|
|
27
23
|
"PASSWORD_PROTECTED": "कूटशब्द सुरक्षित",
|
|
28
24
|
"PRIVACY_AND_SECURITY": "गोपनीयता और सुरक्षा",
|
|
@@ -17,16 +17,12 @@
|
|
|
17
17
|
"ONLINE": "Prisijungę",
|
|
18
18
|
"ADMINISTRATOR": "Administratorius",
|
|
19
19
|
"MODERATOR": "Moderatorius",
|
|
20
|
-
"NO_REPLIES_FOUND": "Nessuna risposta trovata",
|
|
21
|
-
"SUGGEST_A_REPLIES": "Suggerisci una risposta",
|
|
22
|
-
"GENERATIONG_ICEBREAKER": "Generazione di rompighiaccio",
|
|
23
20
|
"PARTICIPANT": "Dalyvis",
|
|
24
21
|
"PUBLIC": "Vieša",
|
|
25
22
|
"PRIVATE": "Privati",
|
|
26
23
|
"PASSWORD_PROTECTED": "Apsaugota slaptažodžiu",
|
|
27
24
|
"PRIVACY_AND_SECURITY": "Privatumas ir saugumas",
|
|
28
25
|
"PREFERENCES": "Pasirinkimai",
|
|
29
|
-
"GENERATING_REPLIES": "Generazione di risposte",
|
|
30
26
|
"MEMBERS": "Nariai",
|
|
31
27
|
"TODAY": "Šiandien",
|
|
32
28
|
"YESTERDAY": "Vakar",
|
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
"CUSTOM_MESSAGE_POLL": "📊 Undian",
|
|
14
14
|
"CUSTOM_MESSAGE_STICKER": "💟 Pelekat",
|
|
15
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 Dokumen",
|
|
16
|
-
"SUGGEST_A_REPLIES": "Cadangkan balasan",
|
|
17
|
-
"GENERATIONG_ICEBREAKER": "Menjana pemecah ais",
|
|
18
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 Papan Putih",
|
|
19
17
|
"ONLINE": "Dalam Talian",
|
|
20
|
-
"NO_REPLIES_FOUND": "Tiada Balasan Ditemui",
|
|
21
18
|
"ADMINISTRATOR": "Pentadbir",
|
|
22
19
|
"MODERATOR": "Moderator",
|
|
23
20
|
"PARTICIPANT": "Peserta",
|
|
24
21
|
"PUBLIC": "Awam",
|
|
25
|
-
"GENERATING_REPLIES": "Menjana balasan",
|
|
26
22
|
"PRIVATE": "Persendirian",
|
|
27
23
|
"PASSWORD_PROTECTED": "Dilindungi",
|
|
28
24
|
"PRIVACY_AND_SECURITY": "Privasi dan Keselamatan",
|
|
@@ -16,13 +16,9 @@
|
|
|
16
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 quadro branco",
|
|
17
17
|
"ONLINE": "On-line",
|
|
18
18
|
"ADMINISTRATOR": "Administrador",
|
|
19
|
-
"NO_REPLIES_FOUND": "Nenhuma resposta encontrada",
|
|
20
19
|
"MODERATOR": "Moderador",
|
|
21
20
|
"PARTICIPANT": "Participante",
|
|
22
|
-
"GENERATING_REPLIES": "Gerando respostas",
|
|
23
21
|
"PUBLIC": "Público",
|
|
24
|
-
"SUGGEST_A_REPLIES": "Sugira uma resposta",
|
|
25
|
-
"GENERATIONG_ICEBREAKER": "Gerando quebra-gelos",
|
|
26
22
|
"PRIVATE": "Privado",
|
|
27
23
|
"PASSWORD_PROTECTED": "Protegido por senha",
|
|
28
24
|
"PRIVACY_AND_SECURITY": "Privacidade e Segurança",
|
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
"MESSAGE_VIDEO": "📹 Видео",
|
|
9
9
|
"MESSAGE_AUDIO": "🎵 Аудио",
|
|
10
10
|
"CUSTOM_MESSAGE": "У вас есть сообщение",
|
|
11
|
-
"SUGGEST_A_REPLIES": "Предложите ответ",
|
|
12
|
-
"GENERATIONG_ICEBREAKER": "Генерация ледоколов",
|
|
13
11
|
"MISSED_VOICE_CALL": "Пропущенный голосовой вызов",
|
|
14
12
|
"MISSED_VIDEO_CALL": "Пропущенный видеовызов",
|
|
15
13
|
"CUSTOM_MESSAGE_POLL": "📊 Опрос",
|
|
@@ -17,9 +15,7 @@
|
|
|
17
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 Документ",
|
|
18
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 Доска",
|
|
19
17
|
"ONLINE": "В сети",
|
|
20
|
-
"GENERATING_REPLIES": "Генерация ответов",
|
|
21
18
|
"ADMINISTRATOR": "Администратор",
|
|
22
|
-
"NO_REPLIES_FOUND": "Ответов не найдено",
|
|
23
19
|
"MODERATOR": "Модератор",
|
|
24
20
|
"PARTICIPANT": "Участник",
|
|
25
21
|
"PUBLIC": "Публичный",
|
|
@@ -16,12 +16,8 @@
|
|
|
16
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 Whiteboard",
|
|
17
17
|
"ONLINE": "Online",
|
|
18
18
|
"ADMINISTRATOR": "Administrator",
|
|
19
|
-
"SUGGEST_A_REPLIES": "Föreslå ett svar",
|
|
20
|
-
"GENERATIONG_ICEBREAKER": "Generera isbrytare",
|
|
21
|
-
"NO_REPLIES_FOUND": "Inga svar hittades",
|
|
22
19
|
"MODERATOR": "Moderator",
|
|
23
20
|
"PARTICIPANT": "Deltagare",
|
|
24
|
-
"GENERATING_REPLIES": "Generera svar",
|
|
25
21
|
"PUBLIC": "Publikt",
|
|
26
22
|
"PRIVATE": "Privat",
|
|
27
23
|
"PASSWORD_PROTECTED": "Lösenordsskyddat",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"MESSAGE_VIDEO": "📹 视频",
|
|
9
9
|
"MESSAGE_AUDIO": "🎵 音频",
|
|
10
10
|
"CUSTOM_MESSAGE": "你有一个消息",
|
|
11
|
-
"NO_REPLIES_FOUND": "未找到回复",
|
|
12
11
|
"MISSED_VOICE_CALL": "未接语音通话",
|
|
13
12
|
"MISSED_VIDEO_CALL": "未接视频通话",
|
|
14
13
|
"CUSTOM_MESSAGE_POLL": "📊 民意调查",
|
|
@@ -19,7 +18,6 @@
|
|
|
19
18
|
"ADMINISTRATOR": "管理员",
|
|
20
19
|
"MODERATOR": "版主",
|
|
21
20
|
"PARTICIPANT": "参与者",
|
|
22
|
-
"GENERATING_REPLIES": "生成回复",
|
|
23
21
|
"PUBLIC": "公开",
|
|
24
22
|
"PRIVATE": "私人",
|
|
25
23
|
"PASSWORD_PROTECTED": "密码保护",
|
|
@@ -30,8 +28,6 @@
|
|
|
30
28
|
"YESTERDAY": "昨天",
|
|
31
29
|
"SUNDAY": "周日",
|
|
32
30
|
"MONDAY": "周一",
|
|
33
|
-
"SUGGEST_A_REPLIES": "建议回复",
|
|
34
|
-
"GENERATIONG_ICEBREAKER": "生成破冰船",
|
|
35
31
|
"TUESDAY": "周二",
|
|
36
32
|
"WEDNESDAY": "周三",
|
|
37
33
|
"THURSDAY": "周四",
|
|
@@ -14,9 +14,7 @@
|
|
|
14
14
|
"CUSTOM_MESSAGE_STICKER": "💟 貼紙",
|
|
15
15
|
"CUSTOM_MESSAGE_DOCUMENT": "📃 文件",
|
|
16
16
|
"CUSTOM_MESSAGE_WHITEBOARD": "📝 白板",
|
|
17
|
-
"GENERATING_REPLIES": "生成回复",
|
|
18
17
|
"ONLINE": "線上",
|
|
19
|
-
"NO_REPLIES_FOUND": "找不到回覆",
|
|
20
18
|
"ADMINISTRATOR": "管理員",
|
|
21
19
|
"MODERATOR": "版主",
|
|
22
20
|
"PARTICIPANT": "參與者",
|
|
@@ -30,8 +28,6 @@
|
|
|
30
28
|
"YESTERDAY": "昨天",
|
|
31
29
|
"TYPING": "輸入...",
|
|
32
30
|
"IS_TYPING": "正在輸入...",
|
|
33
|
-
"SUGGEST_A_REPLIES": "建議回覆",
|
|
34
|
-
"GENERATIONG_ICEBREAKER": "生成破冰船",
|
|
35
31
|
"CLOSE": "關閉",
|
|
36
32
|
"ENTER_GROUP_NAME": "輸入群組名稱",
|
|
37
33
|
"ADD_MEMBERS": "加入成員",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cometchat/chat-uikit-react-native",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "CometChat React Native UI Kit is a collection of custom UI Components designed to build text , chat and calling features in your application. The UI Kit is developed to keep developers in mind and aims to reduce development efforts significantly",
|
|
5
5
|
"main": "src/index",
|
|
6
6
|
"module": "src/index",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"@types/react": "17.0.21"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@cometchat/chat-sdk-react-native": "^4.0.2",
|
|
74
73
|
"@react-native-async-storage/async-storage": "^1.17.10",
|
|
75
74
|
"@react-native-community/clipboard": "^1.5.1"
|
|
76
75
|
},
|
|
77
76
|
"peerDependencies": {
|
|
78
77
|
"react": "*",
|
|
79
|
-
"react-native": "*"
|
|
78
|
+
"react-native": "*",
|
|
79
|
+
"@cometchat/chat-sdk-react-native": "*"
|
|
80
80
|
},
|
|
81
81
|
"jest": {
|
|
82
82
|
"preset": "react-native",
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
|
+
import { CometChatMessageComposerActionInterface, CometChatTheme, CometChatUIEventHandler, CometChatUIEvents, DataSource, DataSourceDecorator, MessageEvents, localize } from "../../shared";
|
|
4
|
+
import { AIAssistBotConfiguration } from "./configuration";
|
|
5
|
+
import { AIOptionsStyle } from "../AIOptionsStyle";
|
|
6
|
+
import AIAssistBotView from "./AIAssistBotView";
|
|
7
|
+
|
|
8
|
+
export class AIAssistBotDecorator extends DataSourceDecorator {
|
|
9
|
+
public configuration?: AIAssistBotConfiguration;
|
|
10
|
+
public user!: CometChat.User;
|
|
11
|
+
public group!: CometChat.Group;
|
|
12
|
+
public bots!: CometChat.User[];
|
|
13
|
+
public theme: CometChatTheme = new CometChatTheme({});
|
|
14
|
+
public loggedInUser!: CometChat.User | null;
|
|
15
|
+
public usersRequest: CometChat.UsersRequestBuilder;
|
|
16
|
+
|
|
17
|
+
constructor(
|
|
18
|
+
dataSource: DataSource,
|
|
19
|
+
configuration?: AIAssistBotConfiguration
|
|
20
|
+
) {
|
|
21
|
+
super(dataSource);
|
|
22
|
+
this.configuration = configuration!;
|
|
23
|
+
this.usersRequest = new CometChat.UsersRequestBuilder()
|
|
24
|
+
.setLimit(30)
|
|
25
|
+
.setTags(["aibot"])
|
|
26
|
+
.build();
|
|
27
|
+
this.fetchBots();
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
this.addMessageListener();
|
|
30
|
+
}, 1000);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
fetchBots() {
|
|
34
|
+
this.usersRequest.fetchNext().then((bots) => {
|
|
35
|
+
if (bots.length > 0) {
|
|
36
|
+
this.bots = [...(this.bots || []), ...bots];
|
|
37
|
+
if (bots.length > 0) {
|
|
38
|
+
this.fetchBots();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
})
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
override getId(): string {
|
|
46
|
+
return "bots";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
override getAIOptions(user: CometChat.User | null, group: CometChat.Group | null, theme: CometChatTheme, id?: any, AIOptionsStyle?: AIOptionsStyle): CometChatMessageComposerActionInterface[] {
|
|
50
|
+
this.user = user!;
|
|
51
|
+
this.group = group!;
|
|
52
|
+
if (!id?.parentMessageId) {
|
|
53
|
+
const numberOfBots = this.bots?.length;
|
|
54
|
+
const titleName = numberOfBots > 1 ? localize("COMETCHAT_ASK_AI_BOT") : `${localize("COMETCHAT_ASK_BOT")} ${this.bots[0]?.getName()}`;
|
|
55
|
+
const messageComposerActions: CometChatMessageComposerActionInterface[] = super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
56
|
+
let newAction = {
|
|
57
|
+
title: titleName,
|
|
58
|
+
onPress: () => {
|
|
59
|
+
this.onOptionsClick(AIOptionsStyle)
|
|
60
|
+
},
|
|
61
|
+
id: "ai-assist-bot",
|
|
62
|
+
iconURL: '',
|
|
63
|
+
iconTint: '',
|
|
64
|
+
titleColor: this.configuration?.style?.buttonTextColor || AIOptionsStyle.listItemTitleColor,
|
|
65
|
+
titleFont: this.configuration?.style?.buttonTextFont || AIOptionsStyle.listItemTitleFont,
|
|
66
|
+
background: this.configuration?.style?.backgroundColor || AIOptionsStyle.listItemBackground,
|
|
67
|
+
cornerRadius: this.configuration?.style?.buttonBorderRadius || AIOptionsStyle.listItemBorderRadius,
|
|
68
|
+
};
|
|
69
|
+
messageComposerActions.push(newAction);
|
|
70
|
+
return messageComposerActions;
|
|
71
|
+
} else {
|
|
72
|
+
return super.getAIOptions(user, group, theme, id, AIOptionsStyle);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
onOptionsClick(AIOptionsStyle) {
|
|
77
|
+
if (this.bots?.length > 1) {
|
|
78
|
+
this.openBotList(AIOptionsStyle);
|
|
79
|
+
} else {
|
|
80
|
+
this.openBotChat(this.bots[0]);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
openBotList(AIOptionsStyle) {
|
|
85
|
+
const botList = this.bots.map((bot) => {
|
|
86
|
+
return ({
|
|
87
|
+
title: bot.getName(),
|
|
88
|
+
onPress: () => { this.openBotChat(bot) },
|
|
89
|
+
id: bot?.getUid(),
|
|
90
|
+
iconURL: '',
|
|
91
|
+
iconTint: '',
|
|
92
|
+
titleColor: this.configuration?.style?.buttonTextColor || AIOptionsStyle.listItemTitleColor,
|
|
93
|
+
titleFont: this.configuration?.style?.buttonTextFont || AIOptionsStyle.listItemTitleFont,
|
|
94
|
+
background: this.configuration?.style?.backgroundColor || AIOptionsStyle.listItemBackground,
|
|
95
|
+
cornerRadius: this.configuration?.style?.buttonBorderRadius || AIOptionsStyle.listItemBorderRadius,
|
|
96
|
+
});
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.ccToggleBottomSheet, {
|
|
100
|
+
bots: botList
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
openBotChat(bot) {
|
|
105
|
+
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.ccToggleBottomSheet, {
|
|
106
|
+
botView: true,
|
|
107
|
+
child: () => <AIAssistBotView
|
|
108
|
+
bot={bot}
|
|
109
|
+
closeCallback={this.closeAIOption}
|
|
110
|
+
configuration={this.configuration}
|
|
111
|
+
title={bot.getName()}
|
|
112
|
+
onSend={this.getBotReply.bind(this)}
|
|
113
|
+
sender={this.loggedInUser}
|
|
114
|
+
/>
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
closeAIOption() {
|
|
119
|
+
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.ccToggleBottomSheet, {
|
|
120
|
+
botView: true,
|
|
121
|
+
child: () => (null)
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
async getBotReply(question: string, bot: CometChat.User): Promise<string> {
|
|
126
|
+
let configuration: any;
|
|
127
|
+
const receiverId = this.group?.getGuid() || this.user?.getUid();
|
|
128
|
+
const receiverType = this.group?.getGuid()
|
|
129
|
+
? CometChat.RECEIVER_TYPE.GROUP
|
|
130
|
+
: CometChat.RECEIVER_TYPE.USER;
|
|
131
|
+
|
|
132
|
+
try {
|
|
133
|
+
configuration = await this.configuration.apiConfiguration(bot, this.user, this.group) || {}
|
|
134
|
+
} catch (err) {
|
|
135
|
+
configuration = {}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const answer = await CometChat.askBot(
|
|
139
|
+
receiverId,
|
|
140
|
+
receiverType,
|
|
141
|
+
bot?.getUid(),
|
|
142
|
+
question,
|
|
143
|
+
configuration
|
|
144
|
+
);
|
|
145
|
+
return answer;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
private addMessageListener(): void {
|
|
149
|
+
CometChat.getLoggedinUser().then((user: CometChat.User | null) => {
|
|
150
|
+
if (user) {
|
|
151
|
+
this.loggedInUser = user;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
CometChatUIEventHandler.addMessageListener(
|
|
156
|
+
MessageEvents.ccActiveChatChanged,
|
|
157
|
+
{
|
|
158
|
+
ccActiveChatChanged: (data) => {
|
|
159
|
+
|
|
160
|
+
},
|
|
161
|
+
}
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ChatConfigurator } from "../../shared";
|
|
2
|
+
import { AIExtensionDataSource } from "../AIExtensionDataSource";
|
|
3
|
+
import { AIAssistBotDecorator } from "./AIAssistBotDecorator";
|
|
4
|
+
import { AIAssistBotConfiguration } from "./configuration";
|
|
5
|
+
export class AIAssistBotExtension extends AIExtensionDataSource {
|
|
6
|
+
private configuration?: AIAssistBotConfiguration;
|
|
7
|
+
|
|
8
|
+
constructor(configuration?: AIAssistBotConfiguration) {
|
|
9
|
+
super();
|
|
10
|
+
this.configuration = configuration;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
override addExtension(): void {
|
|
14
|
+
ChatConfigurator.enable((dataSource: any) => new AIAssistBotDecorator(dataSource, this.configuration));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
override getExtensionId(): string {
|
|
18
|
+
return "bots";
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FontStyle } from "../../shared";
|
|
2
|
+
import { AIBaseStyle } from "../AIBaseStyle";
|
|
3
|
+
|
|
4
|
+
export class AIAssistBotStyle extends AIBaseStyle {
|
|
5
|
+
titleFont?: FontStyle;
|
|
6
|
+
titleColor?: string = "";
|
|
7
|
+
subtitleFont: FontStyle;
|
|
8
|
+
subtitleColor: string;
|
|
9
|
+
closeIconTint?: string = "";
|
|
10
|
+
sendIconTint?: string = "";
|
|
11
|
+
buttonTextColor?: string = "";
|
|
12
|
+
buttonTextFont?: FontStyle;
|
|
13
|
+
buttonBackground?: string = "";
|
|
14
|
+
buttonBorderRadius?: number;
|
|
15
|
+
|
|
16
|
+
constructor(props: Partial<AIAssistBotStyle>) {
|
|
17
|
+
super({});
|
|
18
|
+
Object.assign(this, props);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
class AITextMessageBubbleStyle extends AIBaseStyle {
|
|
23
|
+
textFont?: string = "";
|
|
24
|
+
textColor?: string = "";
|
|
25
|
+
constructor(props: Partial<AITextMessageBubbleStyle>) {
|
|
26
|
+
super({});
|
|
27
|
+
Object.assign(this, props);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class AIBotMessageBubbleStyle extends AITextMessageBubbleStyle {
|
|
32
|
+
constructor(props: Partial<AIBotMessageBubbleStyle>) {
|
|
33
|
+
super({});
|
|
34
|
+
Object.assign(this, props);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class AISenderMessageBubbleStyle extends AITextMessageBubbleStyle {
|
|
39
|
+
constructor(props: Partial<AISenderMessageBubbleStyle>) {
|
|
40
|
+
super({});
|
|
41
|
+
Object.assign(this, props);
|
|
42
|
+
}
|
|
43
|
+
}
|