@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
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BorderStyle, BorderStyleInterface, FontStyle } from "../../base";
|
|
2
|
+
|
|
3
|
+
export interface TextInputStyleInterface {
|
|
4
|
+
titleFont?: FontStyle;
|
|
5
|
+
titleColor?: string;
|
|
6
|
+
border?: BorderStyleInterface;
|
|
7
|
+
placeholderColor?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export class TextInputStyle extends BorderStyle {
|
|
11
|
+
titleFont?: FontStyle;
|
|
12
|
+
titleColor?: string;
|
|
13
|
+
placeholderColor?: string;
|
|
14
|
+
|
|
15
|
+
constructor({
|
|
16
|
+
titleFont = new FontStyle({}),
|
|
17
|
+
titleColor,
|
|
18
|
+
placeholderColor = "",
|
|
19
|
+
border = new BorderStyle({}),
|
|
20
|
+
}: TextInputStyleInterface) {
|
|
21
|
+
super(border);
|
|
22
|
+
this.titleFont = titleFont;
|
|
23
|
+
this.titleColor = titleColor;
|
|
24
|
+
this.placeholderColor = placeholderColor;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -84,6 +84,8 @@ import {
|
|
|
84
84
|
MediaRecorderStyleInterface,
|
|
85
85
|
MediaRecorderStyle
|
|
86
86
|
} from './CometChatMediaRecorder';
|
|
87
|
+
import { CometChatFormBubble, CometChatFormBubbleInterface } from './CometChatFormBubble'
|
|
88
|
+
import { CometChatCardBubble, CometChatCardBubbleInterface } from './CometChatCardBubble'
|
|
87
89
|
|
|
88
90
|
export {
|
|
89
91
|
CometChatMessageInputStyleInterface,
|
|
@@ -159,5 +161,9 @@ export {
|
|
|
159
161
|
CometChatMediaRecorder,
|
|
160
162
|
CometChatMediaRecorderInterface,
|
|
161
163
|
MediaRecorderStyleInterface,
|
|
162
|
-
MediaRecorderStyle
|
|
164
|
+
MediaRecorderStyle,
|
|
165
|
+
CometChatFormBubble,
|
|
166
|
+
CometChatFormBubbleInterface,
|
|
167
|
+
CometChatCardBubble,
|
|
168
|
+
CometChatCardBubbleInterface
|
|
163
169
|
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { AIExtensionDataSource } from "../AIExtensionDataSource";
|
|
2
|
-
import { AIConversationStarterConfiguration } from "./configuration";
|
|
3
|
-
import { AIEnablerConfiguration } from "../configuration";
|
|
4
|
-
export declare class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
5
|
-
configuration?: AIConversationStarterConfiguration;
|
|
6
|
-
constructor(configuration?: AIConversationStarterConfiguration);
|
|
7
|
-
addExtension(): void;
|
|
8
|
-
getExtensionId(): string;
|
|
9
|
-
enable(): void;
|
|
10
|
-
getConfiguration(): AIConversationStarterConfiguration;
|
|
11
|
-
setConfiguration(config?: AIEnablerConfiguration): void;
|
|
12
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AIConversationStarterDecorator } from "./AIConversationStarterDecorator";
|
|
2
|
-
import { ChatConfigurator } from "../../shared";
|
|
3
|
-
import { AIExtensionDataSource } from "../AIExtensionDataSource";
|
|
4
|
-
export class AIConversationStarterExtension extends AIExtensionDataSource {
|
|
5
|
-
configuration;
|
|
6
|
-
constructor(configuration) {
|
|
7
|
-
super();
|
|
8
|
-
this.configuration = configuration;
|
|
9
|
-
}
|
|
10
|
-
addExtension() {
|
|
11
|
-
ChatConfigurator.enable((dataSource) => new AIConversationStarterDecorator(dataSource, this.configuration));
|
|
12
|
-
}
|
|
13
|
-
getExtensionId() {
|
|
14
|
-
return "conversation-starter";
|
|
15
|
-
}
|
|
16
|
-
enable() {
|
|
17
|
-
this.addExtension();
|
|
18
|
-
}
|
|
19
|
-
getConfiguration() {
|
|
20
|
-
return this.configuration;
|
|
21
|
-
}
|
|
22
|
-
setConfiguration(config) {
|
|
23
|
-
this.configuration = { ...this.configuration, ...config };
|
|
24
|
-
this.configuration.conversationStarterStyle = {
|
|
25
|
-
...this.configuration.conversationStarterStyle,
|
|
26
|
-
...(config?.listItemStyle || config?.listStyle)
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
;
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=AIConversationStarter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIConversationStarter.js","sourceRoot":"","sources":["../../../src/AI/AIConversationStarter/AIConversationStarter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAuB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrE,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,MAAM,OAAO,8BAA+B,SAAQ,qBAAqB;IACvE,aAAa,CAAqC;IAClD,YAAY,aAAiD;QAC3D,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;IAEpC,CAAC;IACQ,YAAY;QACnB,gBAAgB,CAAC,MAAM,CAAC,CAAC,UAAe,EAAE,EAAE,CAAC,IAAI,8BAA8B,CAAC,UAAU,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC;IAClH,CAAC;IACQ,cAAc;QACrB,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACQ,MAAM;QACb,IAAI,CAAC,YAAY,EAAE,CAAA;IACrB,CAAC;IACQ,gBAAgB;QAC3B,OAAO,IAAI,CAAC,aAAa,CAAA;IACvB,CAAC;IACU,gBAAgB,CAAC,MAA8B;QACxD,IAAI,CAAC,aAAa,GAAG,EAAC,GAAG,IAAI,CAAC,aAAa,EAAC,GAAG,MAAM,EAAC,CAAA;QACtD,IAAI,CAAC,aAAa,CAAC,wBAAwB,GAAG;YAC5C,GAAG,IAAI,CAAC,aAAa,CAAC,wBAAwB;YAC9C,GAAG,CAAC,MAAM,EAAE,aAAa,IAAI,MAAM,EAAE,SAAS,CAAC;SAChD,CAAC;IACJ,CAAC;IAAA,CAAC;CAEH"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { CometChatTheme, DataSource, DataSourceDecorator } from "../../shared";
|
|
2
|
-
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
|
-
import { State } from "../utils";
|
|
4
|
-
import { AIConversationStarterConfiguration } from "./configuration";
|
|
5
|
-
import { CardViewStyle } from "../CardViewStyle";
|
|
6
|
-
export declare class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
7
|
-
configuration?: AIConversationStarterConfiguration;
|
|
8
|
-
currentMessage: CometChat.BaseMessage | null;
|
|
9
|
-
loggedInUser: CometChat.User | null;
|
|
10
|
-
messageListenerId: string;
|
|
11
|
-
user: CometChat.User;
|
|
12
|
-
group: CometChat.Group;
|
|
13
|
-
cardViewStyle: CardViewStyle;
|
|
14
|
-
errorStateText: string;
|
|
15
|
-
emptyStateText: string;
|
|
16
|
-
theme: CometChatTheme;
|
|
17
|
-
constructor(dataSource: DataSource, configuration?: AIConversationStarterConfiguration);
|
|
18
|
-
getId(): string;
|
|
19
|
-
showDefaultPanel(state?: State, error?: CometChat.CometChatException): void;
|
|
20
|
-
editReply(reply: string): void;
|
|
21
|
-
closePanel: () => void;
|
|
22
|
-
closeIfMessageReceived(message: any): void;
|
|
23
|
-
getConversationStarter(): Promise<JSX.Element>;
|
|
24
|
-
attachMessageListener(): void;
|
|
25
|
-
}
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { CometChatTheme, CometChatUIEventHandler, CometChatUIEvents, DataSourceDecorator, MessageEvents, localize } from "../../shared";
|
|
2
|
-
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
|
-
import { MessageStatusConstants, ReceiverTypeConstants, ViewAlignment } from "../../shared/constants/UIKitConstants";
|
|
4
|
-
import { Image, TouchableOpacity, View, Text, ScrollView } from "react-native";
|
|
5
|
-
import React from "react";
|
|
6
|
-
import { loadingIcon, emptyIcon, errorIcon } from "../resources";
|
|
7
|
-
import { emptyLabelStyle, errorLabelStyle } from "./style";
|
|
8
|
-
import { getCardViewStyle, getRepliesWrapperStyle, getRepliesStyle, getloadingStateStyle } from "./style";
|
|
9
|
-
import { State } from "../utils";
|
|
10
|
-
export class AIConversationStarterDecorator extends DataSourceDecorator {
|
|
11
|
-
configuration;
|
|
12
|
-
currentMessage = null;
|
|
13
|
-
loggedInUser;
|
|
14
|
-
messageListenerId = 'message_' + new Date().getTime();
|
|
15
|
-
user;
|
|
16
|
-
group;
|
|
17
|
-
cardViewStyle = {};
|
|
18
|
-
errorStateText = localize("SOMETHING_WRONG");
|
|
19
|
-
emptyStateText = localize("NO_MESSAGES_FOUND");
|
|
20
|
-
theme;
|
|
21
|
-
constructor(dataSource, configuration) {
|
|
22
|
-
super(dataSource);
|
|
23
|
-
this.configuration = configuration;
|
|
24
|
-
setTimeout(() => {
|
|
25
|
-
CometChat.getLoggedinUser()
|
|
26
|
-
.then((u) => {
|
|
27
|
-
this.loggedInUser = u;
|
|
28
|
-
})
|
|
29
|
-
.catch((err) => console.log(err));
|
|
30
|
-
CometChatUIEventHandler.addMessageListener(MessageEvents.ccActiveChatChanged, {
|
|
31
|
-
ccActiveChatChanged: ({ message, user, group, theme, parentMessageId }) => {
|
|
32
|
-
this.user = user;
|
|
33
|
-
this.group = group;
|
|
34
|
-
if (theme) {
|
|
35
|
-
this.theme = theme;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.theme = new CometChatTheme({});
|
|
39
|
-
}
|
|
40
|
-
if (!message && !parentMessageId) {
|
|
41
|
-
this.attachMessageListener();
|
|
42
|
-
this.showDefaultPanel(State.loading);
|
|
43
|
-
this.getConversationStarter().then((replies) => {
|
|
44
|
-
if (!replies || (replies?.length && replies.length <= 0)) {
|
|
45
|
-
this.showDefaultPanel(State.empty);
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.showPanel, {
|
|
49
|
-
alignment: ViewAlignment.composerTop,
|
|
50
|
-
child: () => (<View style={{ boxShadow: this.cardViewStyle?.boxShadow, width: this.cardViewStyle?.width || "100%", height: this.cardViewStyle?.height || 130, backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border }}>
|
|
51
|
-
<ScrollView style={{ height: "100%", width: "100%" }}>
|
|
52
|
-
{replies}
|
|
53
|
-
</ScrollView>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</View>),
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
.catch((err) => {
|
|
61
|
-
console.log(err);
|
|
62
|
-
this.showDefaultPanel(State.error);
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
ccMessageSent: ({ message, status }) => {
|
|
67
|
-
if (status == MessageStatusConstants.success && message?.sender?.uid == this.loggedInUser?.uid) {
|
|
68
|
-
this.closePanel();
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}, 1000);
|
|
73
|
-
}
|
|
74
|
-
getId() {
|
|
75
|
-
return "aiconversationstarter";
|
|
76
|
-
}
|
|
77
|
-
showDefaultPanel(state = State.loading, error) {
|
|
78
|
-
let LoadingView = this.configuration?.LoadingStateView;
|
|
79
|
-
let EmptyView = this.configuration?.EmptyStateView;
|
|
80
|
-
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.showPanel, {
|
|
81
|
-
alignment: ViewAlignment.composerTop,
|
|
82
|
-
child: () => (<View style={{ width: this.cardViewStyle?.width || "100%", height: 'auto', backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center" }}>
|
|
83
|
-
{state == State.loading ? LoadingView ? <LoadingView /> : <View style={{ width: this.cardViewStyle?.width || "100%", height: "auto", backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center", flexDirection: "row", paddingBottom: 8 }}>
|
|
84
|
-
<Image source={this.configuration?.loadingIconURL ?? loadingIcon} style={{ height: 32, width: 32, tintColor: this.cardViewStyle?.loadingIconTint }}/>
|
|
85
|
-
<Text style={getloadingStateStyle(this.theme, this.configuration)}> {localize("GENERATIONG_ICEBREAKER")}</Text>
|
|
86
|
-
</View>
|
|
87
|
-
:
|
|
88
|
-
state == State.empty ? EmptyView ? <EmptyView /> : <View style={{ width: this.cardViewStyle?.width || "100%", height: 'auto', backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center", flexDirection: "row", paddingBottom: 8 }}>
|
|
89
|
-
<Image source={this.configuration?.emptyIconURL ?? emptyIcon} style={{ height: 32, width: 32, tintColor: this.cardViewStyle?.emptyIconTint }}/>
|
|
90
|
-
<Text style={emptyLabelStyle(this.cardViewStyle)}>{this.emptyStateText}</Text>
|
|
91
|
-
</View>
|
|
92
|
-
: this.configuration?.ErrorStateView ? this.configuration?.ErrorStateView(error) :
|
|
93
|
-
<View style={{ width: this.cardViewStyle?.width || "100%", height: 'auto', backgroundColor: this.cardViewStyle?.backgroundColor, borderRadius: this.cardViewStyle?.borderRadius, ...this.cardViewStyle?.border, justifyContent: "center", alignItems: "center", flexDirection: "row", paddingBottom: 8 }}>
|
|
94
|
-
<Image source={this.configuration?.errorIconURL ?? errorIcon} style={{ height: 32, width: 32, tintColor: this.cardViewStyle?.errorIconTint }}/>
|
|
95
|
-
<Text style={errorLabelStyle(this.cardViewStyle)}>{this.errorStateText}</Text>
|
|
96
|
-
</View>}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</View>),
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
editReply(reply) {
|
|
103
|
-
this.closePanel();
|
|
104
|
-
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.ccComposeMessage, { text: reply });
|
|
105
|
-
}
|
|
106
|
-
closePanel = () => {
|
|
107
|
-
CometChatUIEventHandler.emitUIEvent(CometChatUIEvents.hidePanel, {
|
|
108
|
-
alignment: ViewAlignment.composerTop,
|
|
109
|
-
child: () => (null),
|
|
110
|
-
});
|
|
111
|
-
};
|
|
112
|
-
closeIfMessageReceived(message) {
|
|
113
|
-
if (message?.receiverId == this.loggedInUser?.uid) {
|
|
114
|
-
this.closePanel();
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
getConversationStarter() {
|
|
118
|
-
return new Promise((resolve, reject) => {
|
|
119
|
-
let receiverId = this.user ? this.user?.getUid() : this.group?.getGuid();
|
|
120
|
-
let receiverType = this.user ? ReceiverTypeConstants.user : ReceiverTypeConstants.group;
|
|
121
|
-
if (this.configuration?.customView) {
|
|
122
|
-
CometChat.getConversationStarter(receiverId, receiverType).then((response) => {
|
|
123
|
-
this.configuration.customView(response).then((res) => {
|
|
124
|
-
return resolve((<View>{res}</View>));
|
|
125
|
-
})
|
|
126
|
-
.catch((err) => {
|
|
127
|
-
return reject(err);
|
|
128
|
-
});
|
|
129
|
-
})
|
|
130
|
-
.catch((err) => {
|
|
131
|
-
return reject(err);
|
|
132
|
-
});
|
|
133
|
-
}
|
|
134
|
-
else if (this.configuration?.onLoad) {
|
|
135
|
-
this.configuration?.onLoad(this.user, this.group).then((response) => {
|
|
136
|
-
return resolve((<View>{response}</View>));
|
|
137
|
-
})
|
|
138
|
-
.catch((err) => {
|
|
139
|
-
return reject(err);
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
else {
|
|
143
|
-
CometChat.getConversationStarter(receiverId, receiverType).then((response) => {
|
|
144
|
-
let view = [];
|
|
145
|
-
Object.keys(response).forEach((reply) => {
|
|
146
|
-
if (response[reply] && response[reply] != "") {
|
|
147
|
-
view.push((<TouchableOpacity style={getRepliesWrapperStyle(this.theme, this.configuration?.conversationStarterStyle)} key={response[reply]} onPress={() => this.editReply(response[reply])}>
|
|
148
|
-
<Text style={getRepliesStyle(this.theme, this.configuration?.conversationStarterStyle)}>{response[reply]}</Text>
|
|
149
|
-
</TouchableOpacity>));
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
return resolve((<View>{view}</View>));
|
|
153
|
-
})
|
|
154
|
-
.catch((err) => {
|
|
155
|
-
return reject(err);
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
attachMessageListener() {
|
|
161
|
-
this.cardViewStyle = getCardViewStyle(this.theme, this.configuration?.conversationStarterStyle);
|
|
162
|
-
CometChat.addMessageListener(this.messageListenerId, new CometChat.MessageListener({
|
|
163
|
-
onTextMessageReceived: (textMessage) => {
|
|
164
|
-
this.closeIfMessageReceived(textMessage);
|
|
165
|
-
},
|
|
166
|
-
onMediaMessageReceived: (mediaMessage) => {
|
|
167
|
-
this.closeIfMessageReceived(mediaMessage);
|
|
168
|
-
},
|
|
169
|
-
onCustomMessageReceived: (customMessage) => {
|
|
170
|
-
this.closeIfMessageReceived(customMessage);
|
|
171
|
-
}
|
|
172
|
-
}));
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
//# sourceMappingURL=AIConversationStarterDecorator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIConversationStarterDecorator.js","sourceRoot":"","sources":["../../../src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx"],"names":[],"mappings":"AACA,OAAO,EAAG,cAAc,EAAE,uBAAuB,EAAE,iBAAiB,EAAa,mBAAmB,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACpJ,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AACrH,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAC,IAAI,EAAC,IAAI,EAAC,UAAU,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAC,SAAS,EAAC,SAAS,EAAE,MAAM,cAAc,CAAC;AAE/D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAG,sBAAsB,EAAE,eAAe,EAAC,oBAAoB,EAAC,MAAM,SAAS,CAAC;AACzG,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAGjC,MAAM,OAAO,8BAA+B,SAAQ,mBAAmB;IAC9D,aAAa,CAAqC;IAClD,cAAc,GAAgC,IAAI,CAAC;IACnD,YAAY,CAAwB;IAC3C,iBAAiB,GAAG,UAAU,GAAG,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,CAAC;IAC/C,IAAI,CAAkB;IACtB,KAAK,CAAmB;IAC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|
-
{"version":3,"file":"AIConversationStarterStyle.js","sourceRoot":"","sources":["../../../src/AI/AIConversationStarter/AIConversationStarterStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,OAAO,0BAA2B,SAAQ,cAAc;IAC1D,YAAY,KAA8B;QACxC,KAAK,CAAC,EAAC,GAAG,KAAK,EAAC,CAAC,CAAA;QACjB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC;CACF"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { CometChat } from '@cometchat/chat-sdk-react-native';
|
|
2
|
-
import { AIConversationStarterStyle } from './AIConversationStarterStyle';
|
|
3
|
-
export declare class AIConversationStarterConfiguration {
|
|
4
|
-
onLoad?: (user?: CometChat.User, group?: CometChat.Group) => Promise<Object>;
|
|
5
|
-
conversationStarterStyle?: AIConversationStarterStyle;
|
|
6
|
-
customView?: (response: Object) => Promise<Object>;
|
|
7
|
-
ErrorStateView?: (e?: CometChat.CometChatException) => JSX.Element;
|
|
8
|
-
EmptyStateView?: () => JSX.Element;
|
|
9
|
-
LoadingStateView?: () => JSX.Element;
|
|
10
|
-
loadingIconURL?: string;
|
|
11
|
-
errorIconURL?: string;
|
|
12
|
-
emptyIconURL?: string;
|
|
13
|
-
constructor(props: Partial<AIConversationStarterConfiguration>);
|
|
14
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { loadingIcon, errorIcon, emptyIcon } from '../resources';
|
|
2
|
-
export class AIConversationStarterConfiguration {
|
|
3
|
-
onLoad;
|
|
4
|
-
conversationStarterStyle;
|
|
5
|
-
customView;
|
|
6
|
-
ErrorStateView;
|
|
7
|
-
EmptyStateView;
|
|
8
|
-
LoadingStateView;
|
|
9
|
-
loadingIconURL = loadingIcon;
|
|
10
|
-
errorIconURL = errorIcon;
|
|
11
|
-
emptyIconURL = emptyIcon;
|
|
12
|
-
constructor(props) {
|
|
13
|
-
Object.assign(this, props);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=configuration.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../../src/AI/AIConversationStarter/configuration.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACjE,MAAM,OAAO,kCAAkC;IAC3C,MAAM,CAAiE;IACvE,wBAAwB,CAA6B;IACrD,UAAU,CAAuC;IACjD,cAAc,CAAqD;IACnE,cAAc,CAAqB;IACnC,gBAAgB,CAAqB;IACrC,cAAc,GAAW,WAAW,CAAC;IACrC,YAAY,GAAW,SAAS,CAAC;IACjC,YAAY,GAAW,SAAS,CAAC;IACjC,YAAY,KAAkD;QAC5D,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IAC7B,CAAC;CAEF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { CometChatTheme } from "../../shared";
|
|
2
|
-
import { AIConversationStarterStyle } from "../utils";
|
|
3
|
-
import { CardViewStyle } from "../CardViewStyle";
|
|
4
|
-
import { StyleSheet } from 'react-native';
|
|
5
|
-
export declare function getCardViewStyle(theme: CometChatTheme, style: AIConversationStarterStyle): any;
|
|
6
|
-
export declare function getRepliesStyle(theme: any, configStyles: any): any;
|
|
7
|
-
export declare function getloadingStateStyle(theme: any, configStyles: AIConversationStarterStyle): any;
|
|
8
|
-
export declare function errorLabelStyle(style: CardViewStyle): {
|
|
9
|
-
color: string;
|
|
10
|
-
fontFamily?: string;
|
|
11
|
-
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
12
|
-
fontSize?: number;
|
|
13
|
-
};
|
|
14
|
-
export declare function emptyLabelStyle(style: CardViewStyle): {
|
|
15
|
-
color: string;
|
|
16
|
-
fontFamily?: string;
|
|
17
|
-
fontWeight?: "normal" | "bold" | "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900";
|
|
18
|
-
fontSize?: number;
|
|
19
|
-
};
|
|
20
|
-
export declare function getRepliesWrapperStyle(theme: CometChatTheme, configStyles: AIConversationStarterStyle): StyleSheet.NamedStyles<any> | StyleSheet.NamedStyles<{
|
|
21
|
-
borderRadius: any;
|
|
22
|
-
boxSizing: string;
|
|
23
|
-
cursor: string;
|
|
24
|
-
borderWidth?: number;
|
|
25
|
-
borderStyle?: "solid" | "dotted" | "dashed";
|
|
26
|
-
borderColor?: string;
|
|
27
|
-
flexDirection: string;
|
|
28
|
-
padding: number;
|
|
29
|
-
margin: number;
|
|
30
|
-
backgroundColor: any;
|
|
31
|
-
}>;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { BorderStyle } from "../../shared";
|
|
2
|
-
import { StyleSheet } from 'react-native';
|
|
3
|
-
export function getCardViewStyle(theme, style) {
|
|
4
|
-
const defaultStyle = StyleSheet.create({
|
|
5
|
-
emptyStateTextColor: theme?.palette?.getAccent600(),
|
|
6
|
-
loadingStateTextColor: theme?.palette?.getAccent600(),
|
|
7
|
-
errorStateTextColor: theme?.palette?.getAccent600(),
|
|
8
|
-
emptyStateTextFont: theme?.typography?.title2,
|
|
9
|
-
errorStateTextFont: theme?.typography?.title2,
|
|
10
|
-
loadingStateTextFont: theme?.typography?.title2,
|
|
11
|
-
backgroundColor: theme?.palette?.getBackgroundColor(),
|
|
12
|
-
loadingIconTint: theme?.palette?.getAccent600(),
|
|
13
|
-
errorIconTint: theme?.palette?.getAccent600(),
|
|
14
|
-
emptyIconTint: theme?.palette?.getAccent600(),
|
|
15
|
-
border: {},
|
|
16
|
-
borderRadius: 8,
|
|
17
|
-
height: 130,
|
|
18
|
-
width: "100%",
|
|
19
|
-
});
|
|
20
|
-
return StyleSheet.flatten([defaultStyle, style]);
|
|
21
|
-
}
|
|
22
|
-
export function getRepliesStyle(theme, configStyles) {
|
|
23
|
-
let fontFamily = configStyles?.repliesTextFont || theme?.typography?.text3;
|
|
24
|
-
return StyleSheet.create({
|
|
25
|
-
...fontFamily,
|
|
26
|
-
color: configStyles?.repliesTextColor || theme?.palette?.getAccent700(),
|
|
27
|
-
backgroundColor: theme?.palette?.getBackgroundColor(),
|
|
28
|
-
textAlign: 'left',
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
|
-
export function getloadingStateStyle(theme, configStyles) {
|
|
32
|
-
let fontFamily = configStyles?.loadingStateTextFont || theme?.typography?.title2;
|
|
33
|
-
return StyleSheet.create({
|
|
34
|
-
...fontFamily,
|
|
35
|
-
color: configStyles?.loadingStateTextColor || theme?.palette?.getAccent700(),
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
export function errorLabelStyle(style) {
|
|
39
|
-
return {
|
|
40
|
-
...style?.errorStateTextFont,
|
|
41
|
-
color: style?.errorStateTextColor,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
export function emptyLabelStyle(style) {
|
|
45
|
-
return {
|
|
46
|
-
...style?.emptyStateTextFont,
|
|
47
|
-
color: style?.emptyStateTextColor,
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
export function getRepliesWrapperStyle(theme, configStyles) {
|
|
51
|
-
return StyleSheet.create({
|
|
52
|
-
flexDirection: 'row',
|
|
53
|
-
padding: 8,
|
|
54
|
-
margin: 4,
|
|
55
|
-
backgroundColor: configStyles?.repliesTextBackgroundColor || theme?.palette?.getBackgroundColor(),
|
|
56
|
-
...new BorderStyle({ borderWidth: 1, borderStyle: "solid", borderColor: theme?.palette.getAccent200() }),
|
|
57
|
-
borderRadius: configStyles?.repliesTextBorderRadius || 8,
|
|
58
|
-
boxSizing: 'border-box',
|
|
59
|
-
cursor: 'pointer',
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sour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AAC,CAAC;AACL,CAAC"}
|
package/lib/AI/AIEnabler.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { AIExtensionDataSource } from "./AIExtensionDataSource";
|
|
2
|
-
import { AIEnablerConfiguration } from "./configuration";
|
|
3
|
-
export declare class AIEnabler extends AIExtensionDataSource {
|
|
4
|
-
defaultAIFeatures: AIExtensionDataSource[] | undefined;
|
|
5
|
-
configuration?: AIEnablerConfiguration;
|
|
6
|
-
constructor(defaultFeatures?: AIExtensionDataSource[], configuration?: AIEnablerConfiguration);
|
|
7
|
-
addExtension(): void;
|
|
8
|
-
getExtensionId(): string;
|
|
9
|
-
enable(): void;
|
|
10
|
-
}
|
package/lib/AI/AIEnabler.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import { ChatConfigurator } from "../shared";
|
|
2
|
-
import { AIConversationStarterExtension } from "./AIConversationStarter/AIConversationStarter";
|
|
3
|
-
import { AIEnablerDecorator } from "./AIEnablerDecorator";
|
|
4
|
-
import { AIExtensionDataSource } from "./AIExtensionDataSource";
|
|
5
|
-
import { AISmartRepliesExtension } from "./AISmartReplies/AISmartReplies";
|
|
6
|
-
import { CometChat } from '@cometchat/chat-sdk-react-native';
|
|
7
|
-
export class AIEnabler extends AIExtensionDataSource {
|
|
8
|
-
defaultAIFeatures;
|
|
9
|
-
configuration = {};
|
|
10
|
-
constructor(defaultFeatures, configuration) {
|
|
11
|
-
super();
|
|
12
|
-
this.configuration = configuration;
|
|
13
|
-
this.defaultAIFeatures = defaultFeatures;
|
|
14
|
-
}
|
|
15
|
-
addExtension() {
|
|
16
|
-
}
|
|
17
|
-
getExtensionId() {
|
|
18
|
-
return "ai-enabler";
|
|
19
|
-
}
|
|
20
|
-
enable() {
|
|
21
|
-
let features = {};
|
|
22
|
-
if (this.defaultAIFeatures && this.defaultAIFeatures?.length >= 1) {
|
|
23
|
-
const promiseArray = this.defaultAIFeatures.map((feature) => {
|
|
24
|
-
return new Promise((resolve, reject) => {
|
|
25
|
-
CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
26
|
-
.then((response) => {
|
|
27
|
-
if (response) {
|
|
28
|
-
if (feature.getExtensionId() !== "conversation-starter") {
|
|
29
|
-
feature?.enable();
|
|
30
|
-
features[feature.getExtensionId()] = {
|
|
31
|
-
enabled: true,
|
|
32
|
-
configuration: feature.getConfiguration(),
|
|
33
|
-
enabler: feature,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
feature.setConfiguration(this.configuration);
|
|
38
|
-
feature.enable();
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
resolve(true);
|
|
42
|
-
})
|
|
43
|
-
.catch((err) => {
|
|
44
|
-
console.error(err);
|
|
45
|
-
reject(err);
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
Promise.all(promiseArray)
|
|
50
|
-
.then(() => {
|
|
51
|
-
if (Object.keys(features).length > 0) {
|
|
52
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features, this.configuration));
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
.catch((err) => {
|
|
56
|
-
console.error('An error occurred:', err);
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
else if (this.defaultAIFeatures?.length == 0) {
|
|
60
|
-
return;
|
|
61
|
-
}
|
|
62
|
-
else {
|
|
63
|
-
let defaultFeatures = [new AISmartRepliesExtension(), new AIConversationStarterExtension()];
|
|
64
|
-
const promiseArray = defaultFeatures.map((feature) => {
|
|
65
|
-
return new Promise((resolve, reject) => {
|
|
66
|
-
CometChat.isAIFeatureEnabled(feature.getExtensionId())
|
|
67
|
-
.then((response) => {
|
|
68
|
-
if (response) {
|
|
69
|
-
if (feature.getExtensionId() !== "conversation-starter") {
|
|
70
|
-
feature?.enable();
|
|
71
|
-
features[feature.getExtensionId()] = {
|
|
72
|
-
enabled: true,
|
|
73
|
-
configuration: feature.getConfiguration(),
|
|
74
|
-
enabler: feature,
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
feature.setConfiguration(this.configuration);
|
|
79
|
-
feature.enable();
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
resolve(true);
|
|
83
|
-
})
|
|
84
|
-
.catch((err) => {
|
|
85
|
-
console.error(err);
|
|
86
|
-
reject(err);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
});
|
|
90
|
-
Promise.all(promiseArray)
|
|
91
|
-
.then(() => {
|
|
92
|
-
if (Object.keys(features).length > 0) {
|
|
93
|
-
ChatConfigurator.enable((dataSource) => new AIEnablerDecorator(dataSource, features, this.configuration));
|
|
94
|
-
}
|
|
95
|
-
})
|
|
96
|
-
.catch((err) => {
|
|
97
|
-
console.error('An error occurred:', err);
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=AIEnabler.js.map
|
package/lib/AI/AIEnabler.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AIEnabler.js","sourceRoot":"","sources":["../../src/AI/AIEnabler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAG,gBAAgB,EAAc,MAAM,WAAW,CAAC;AAC1D,OAAO,EAAE,8BAA8B,EAAE,MAAM,+CAA+C,CAAC;AAC/F,OAAO,EAAG,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAC,SAAS,EAAC,MAAM,kCAAkC,CAAA;AAE1D,MAAM,OAAO,SAAU,SAAQ,qBAAqB;IAChD,iBAAiB,CAAqC;IACtD,aAAa,GAA2B,EAAE,CAAA;IAC1C,YAAY,eAAwC,EAAE,aAAqC;QACvF,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,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AC5C,OAAO,CAAC,MAAM,EAAE,CAAC;6BAClB;yBACF;wBACD,OAAO,CAAC,IAAI,CAAC,CAAC;oBAChB,CAAC,CAAC;yBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;wBACb,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;wBACnB,MAAM,CAAC,GAAG,CAAC,CAAC;oBACd,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;YAEH,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC;iBACtB,IAAI,CAAC,GAAG,EAAE;gBACT,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE;oBACpC,gBAAgB,CAAC,MAAM,CACrB,CAAC,UAAsB,EAAE,EAAE,CACzB,IAAI,kBAAkB,CAAC,UAAU,EAAE,QAAQ,EAAE,IAAI,CAAC,aAAa,CAAC,CACnE,CAAC;iBACH;YACH,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;gBACb,OAAO,CAAC,KAAK,CAAC,oBAAoB,EAAE,GAAG,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAC;SACN;IACA,CAAC;CAED"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
2
|
-
import { DataSourceDecorator, DataSource, CometChatTheme } from "../shared";
|
|
3
|
-
import { CardViewStyle } from "./CardViewStyle";
|
|
4
|
-
import { JSX } from "react";
|
|
5
|
-
import { AIEnablerConfiguration } from "./configuration";
|
|
6
|
-
import { AIConfigurations, ICard, State } from "./utils";
|
|
7
|
-
import { AIConversationStarterConfiguration } from "./AIConversationStarter/configuration";
|
|
8
|
-
import { AISmartRepliesConfiguration } from "./AISmartReplies/configuration";
|
|
9
|
-
export declare class AIEnablerDecorator extends DataSourceDecorator {
|
|
10
|
-
smartReplyConfiguration: AISmartRepliesConfiguration;
|
|
11
|
-
conversationStarterConfiguration: AIConversationStarterConfiguration;
|
|
12
|
-
features?: AIConfigurations;
|
|
13
|
-
configuration?: AIEnablerConfiguration;
|
|
14
|
-
newDataSource: DataSource;
|
|
15
|
-
showAiButton: boolean;
|
|
16
|
-
theme: CometChatTheme;
|
|
17
|
-
id: any;
|
|
18
|
-
user: CometChat.User;
|
|
19
|
-
group: CometChat.Group;
|
|
20
|
-
loggedInUser: CometChat.User | null;
|
|
21
|
-
cardViewStyle: CardViewStyle;
|
|
22
|
-
buttonRef: any;
|
|
23
|
-
setCallback: any;
|
|
24
|
-
isPannelVisible: boolean;
|
|
25
|
-
repliesView: JSX.Element;
|
|
26
|
-
errorStateText: string;
|
|
27
|
-
emptyStateText: string;
|
|
28
|
-
keyboardDidShowListener: any;
|
|
29
|
-
keyboardDidHideListener: any;
|
|
30
|
-
onButtonClick: (id: string) => void;
|
|
31
|
-
cardsData: ICard;
|
|
32
|
-
constructor(dataSource: DataSource, features?: AIConfigurations, configuration?: AIEnablerConfiguration);
|
|
33
|
-
getDataSource(): DataSource;
|
|
34
|
-
getId(): string;
|
|
35
|
-
hideOnKeyboardShow: () => void;
|
|
36
|
-
showOnKeyboardShow: () => void;
|
|
37
|
-
editReply(reply: string): void;
|
|
38
|
-
closeBottomsheet: () => void;
|
|
39
|
-
getSmartReplies(): Promise<JSX.Element>;
|
|
40
|
-
showDefaultPanel(state?: State, error?: CometChat.CometChatException): void;
|
|
41
|
-
getAuxiliaryOptions(user?: CometChat.User, group?: CometChat.Group, id?: Map<string, any>, theme?: CometChatTheme): globalThis.JSX.Element[];
|
|
42
|
-
getAIAuxiliaryButton(id: Map<string, any>, user?: CometChat.User, group?: CometChat.Group, theme?: CometChatTheme): JSX.Element;
|
|
43
|
-
}
|