@cometchat/chat-uikit-react-native 4.3.16 → 4.3.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/AI/AIAssistBot/AIAssistBotDecorator.tsx +20 -15
- package/src/AI/AIAssistBot/AIAssistBotStyle.ts +2 -2
- package/src/AI/AIAssistBot/AIAssistBotView.tsx +16 -14
- package/src/AI/AIAssistBot/configuration.ts +8 -7
- package/src/AI/AIAssistBot/resources/index.ts +1 -0
- package/src/AI/AIBaseConfiguration.ts +1 -0
- package/src/AI/AIConversationStarter/AIConversationStarterDecorator.tsx +27 -26
- package/src/AI/AIConversationStarter/AIConversationStarterStyle.ts +1 -0
- package/src/AI/AIConversationStarter/style.ts +29 -31
- package/src/AI/AIConversationSummary/AIConversationSummaryDecorator.tsx +14 -13
- package/src/AI/AIConversationSummary/AIConversationSummaryView.tsx +5 -4
- package/src/AI/AIConversationSummary/resources/index.ts +1 -0
- package/src/AI/AIExtensionDataSource.ts +1 -0
- package/src/AI/AISmartReplies/AISmartRepliesDecorator.tsx +28 -27
- package/src/AI/AISmartReplies/configuration.ts +2 -0
- package/src/AI/CardView.tsx +5 -5
- package/src/AI/resources/index.ts +3 -0
- package/src/AI/style.ts +68 -80
- package/src/CometChatAddMembers/AddMembersConfiguration.tsx +1 -0
- package/src/CometChatAddMembers/CometChatAddMembers.tsx +12 -12
- package/src/CometChatAddMembers/index.ts +10 -8
- package/src/CometChatBannedMembers/BannedMembersConfiguration.tsx +1 -0
- package/src/CometChatBannedMembers/CometChatBannedMembers.tsx +8 -8
- package/src/CometChatBannedMembers/index.ts +12 -7
- package/src/CometChatBannedMembers/resources/index.ts +1 -0
- package/src/CometChatContacts/CometChatContacts.tsx +9 -9
- package/src/CometChatContacts/ContactsConfiguration.tsx +1 -0
- package/src/CometChatContacts/Header.tsx +4 -4
- package/src/CometChatContacts/index.ts +5 -3
- package/src/CometChatConversations/CometChatConversations.tsx +204 -172
- package/src/CometChatConversations/index.ts +21 -10
- package/src/CometChatConversations/resources/index.ts +14 -0
- package/src/CometChatConversationsWithMessages/CometChatConversationsWithMessages.tsx +6 -5
- package/src/CometChatConversationsWithMessages/index.ts +6 -5
- package/src/CometChatConversationsWithMessages/resources/index.ts +1 -0
- package/src/CometChatCreateGroup/CometChatCreateGroup.tsx +30 -30
- package/src/CometChatCreateGroup/CreateGroupConfiguration.ts +1 -0
- package/src/CometChatCreateGroup/Header.tsx +1 -1
- package/src/CometChatCreateGroup/index.ts +5 -6
- package/src/CometChatCreateGroup/resources/index.ts +3 -0
- package/src/CometChatDetails/CometChatDetails.tsx +29 -28
- package/src/CometChatDetails/DetailsConfiguration.tsx +1 -0
- package/src/CometChatDetails/Header.tsx +1 -1
- package/src/CometChatDetails/index.ts +17 -15
- package/src/CometChatDetails/listners.ts +16 -16
- package/src/CometChatDetails/resources/index.ts +5 -0
- package/src/CometChatGroupMembers/CometChatGroupMembers.tsx +52 -52
- package/src/CometChatGroupMembers/GroupMemberConfiguration.ts +1 -1
- package/src/CometChatGroupMembers/GroupMemberStyle.ts +3 -3
- package/src/CometChatGroupMembers/index.ts +8 -16
- package/src/CometChatGroupMembers/resources/index.ts +5 -0
- package/src/CometChatGroups/CometChatGroups.tsx +46 -46
- package/src/CometChatGroups/GroupsConfiguration.ts +10 -9
- package/src/CometChatGroups/GroupsStyle.ts +1 -1
- package/src/CometChatGroups/index.ts +11 -10
- package/src/CometChatGroups/resources/index.ts +10 -0
- package/src/CometChatGroupsWithMessages/CometChatGroupsWithMessages.tsx +9 -8
- package/src/CometChatGroupsWithMessages/index.ts +6 -5
- package/src/CometChatGroupsWithMessages/resources/index.ts +1 -0
- package/src/CometChatJoinProtectedGroup/CometChatJoinProtectedGroup.tsx +22 -21
- package/src/CometChatJoinProtectedGroup/Header.tsx +1 -1
- package/src/CometChatJoinProtectedGroup/JoinProtectedGroupConfiguration.ts +1 -0
- package/src/CometChatJoinProtectedGroup/index.ts +5 -6
- package/src/CometChatJoinProtectedGroup/resources/index.ts +2 -0
- package/src/CometChatMessageComposer/CometChatMessageComposer.tsx +62 -59
- package/src/CometChatMessageComposer/MessageComposerConfiguration.tsx +1 -0
- package/src/CometChatMessageComposer/index.ts +6 -7
- package/src/CometChatMessageComposer/resources/index.ts +10 -0
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +33 -31
- package/src/CometChatMessageHeader/MessageHeaderConfiguration.tsx +1 -0
- package/src/CometChatMessageHeader/index.ts +12 -13
- package/src/CometChatMessageHeader/listners.ts +18 -18
- package/src/CometChatMessageHeader/resources/index.ts +3 -0
- package/src/CometChatMessageInformation/CometChatMessageInformation.tsx +28 -24
- package/src/CometChatMessageInformation/index.ts +8 -8
- package/src/CometChatMessageInformation/resources/index.ts +1 -0
- package/src/CometChatMessageList/CometChatMessageList.tsx +214 -195
- package/src/CometChatMessageList/MessageListConfiguration.ts +26 -25
- package/src/CometChatMessageList/index.ts +16 -18
- package/src/CometChatMessageList/resources/index.ts +7 -0
- package/src/CometChatMessages/CometChatMessages.tsx +29 -26
- package/src/CometChatMessages/MessagesConfiguration.ts +2 -0
- package/src/CometChatMessages/index.ts +8 -7
- package/src/CometChatMessages/resources/index.ts +1 -0
- package/src/CometChatTabs/CometChatTabs.tsx +13 -23
- package/src/CometChatTabs/CometChatTabsStyle.ts +2 -0
- package/src/CometChatTabs/index.ts +3 -8
- package/src/CometChatThreadedMessages/CometChatThreadedMessages.tsx +37 -37
- package/src/CometChatThreadedMessages/Header.tsx +2 -2
- package/src/CometChatThreadedMessages/ThreadedMessagesConfiguration.ts +1 -0
- package/src/CometChatThreadedMessages/index.ts +11 -12
- package/src/CometChatThreadedMessages/resources/index.ts +6 -0
- package/src/CometChatTransferOwnership/CometChatTransferOwnership.tsx +5 -5
- package/src/CometChatTransferOwnership/TransferOwnershipConfiguration.ts +1 -0
- package/src/CometChatTransferOwnership/index.ts +10 -11
- package/src/CometChatUsers/CometChatUsers.tsx +11 -11
- package/src/CometChatUsers/UsersConfiguration.tsx +1 -0
- package/src/CometChatUsers/index.ts +8 -6
- package/src/CometChatUsersWithMessages/CometChatUsersWithMessages.tsx +6 -5
- package/src/CometChatUsersWithMessages/index.ts +6 -5
- package/src/calls/CallUtils.ts +4 -3
- package/src/calls/CallingDetailsUtils.tsx +9 -8
- package/src/calls/CallingExtension.tsx +2 -2
- package/src/calls/CallingExtentionDecorator.tsx +17 -17
- package/src/calls/CometChatCallBubble/CometChatCallBubble.tsx +3 -2
- package/src/calls/CometChatCallBubble/index.ts +14 -10
- package/src/calls/CometChatCallBubble/resources/index.ts +3 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtonConfiguration.ts +1 -0
- package/src/calls/CometChatCallButtons/CometChatCallButtons.tsx +19 -18
- package/src/calls/CometChatCallButtons/index.ts +10 -8
- package/src/calls/CometChatCallButtons/resources/index.ts +2 -0
- package/src/calls/CometChatCallLogDetails/CallLogDetailsConfiguration.ts +2 -0
- package/src/calls/CometChatCallLogDetails/CometChatCallLogDetails.tsx +14 -13
- package/src/calls/CometChatCallLogDetails/index.ts +21 -10
- package/src/calls/CometChatCallLogDetails/resources/index.ts +1 -0
- package/src/calls/CometChatCallLogHistory/CallLogHistoryConfiguration.ts +3 -1
- package/src/calls/CometChatCallLogHistory/CometChatCallLogHistory.tsx +25 -24
- package/src/calls/CometChatCallLogHistory/index.ts +21 -10
- package/src/calls/CometChatCallLogHistory/resources/index.ts +13 -0
- package/src/calls/CometChatCallLogParticipants/CallLogParticipantsConfiguration.ts +4 -2
- package/src/calls/CometChatCallLogParticipants/CometChatCallLogParticipants.tsx +13 -12
- package/src/calls/CometChatCallLogParticipants/index.ts +21 -10
- package/src/calls/CometChatCallLogParticipants/resources/index.ts +1 -0
- package/src/calls/CometChatCallLogRecordings/CallLogRecordingsConfiguration.ts +5 -3
- package/src/calls/CometChatCallLogRecordings/CometChatCallLogRecordings.tsx +14 -13
- package/src/calls/CometChatCallLogRecordings/index.ts +21 -10
- package/src/calls/CometChatCallLogRecordings/resources/index.ts +2 -0
- package/src/calls/CometChatCallLogs/CallLogsConfiguration.ts +5 -3
- package/src/calls/CometChatCallLogs/CometChatCallLogs.tsx +37 -36
- package/src/calls/CometChatCallLogs/index.ts +14 -10
- package/src/calls/CometChatCallLogs/resources/index.ts +11 -0
- package/src/calls/CometChatCallLogsWithDetails/CallLogsWithDetailsConfiguration.ts +1 -0
- package/src/calls/CometChatCallLogsWithDetails/CometChatCallLogsWithDetails.tsx +3 -2
- package/src/calls/CometChatCallLogsWithDetails/index.ts +2 -4
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +19 -15
- package/src/calls/CometChatIncomingCall/index.ts +10 -8
- package/src/calls/CometChatIncomingCall/resources/index.ts +4 -0
- package/src/calls/CometChatIncomingCall/styles.ts +0 -1
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +5 -4
- package/src/calls/CometChatOngoingCall/index.ts +6 -6
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +15 -13
- package/src/calls/CometChatOutgoingCall/index.ts +8 -6
- package/src/calls/CometChatOutgoingCall/resources/index.ts +1 -0
- package/src/calls/index.ts +99 -60
- package/src/calls/resources/index.ts +3 -0
- package/src/extensions/CollaborativeBubble/CometChatCollaborativeBubble.tsx +1 -0
- package/src/extensions/CollaborativeBubble/resources/index.ts +1 -0
- package/src/extensions/CollaborativeBubble/styles.ts +1 -1
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentConfiguration.tsx +1 -1
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +10 -9
- package/src/extensions/CollaborativeDocument/index.ts +12 -9
- package/src/extensions/CollaborativeDocument/resources/index.ts +2 -0
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardConfiguration.tsx +1 -1
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +15 -14
- package/src/extensions/CollaborativeWhiteboard/index.ts +12 -9
- package/src/extensions/CollaborativeWhiteboard/resources/index.ts +2 -0
- package/src/extensions/ExtensionModerator.tsx +4 -4
- package/src/extensions/ImageModeration/ImageModerationDecorator.tsx +1 -1
- package/src/extensions/ImageModeration/ImageModerationFilter.tsx +2 -1
- package/src/extensions/ImageModeration/index.ts +15 -7
- package/src/extensions/ImageModeration/resources/index.ts +1 -0
- package/src/extensions/LinkPreview/LinkPreviewBubble.tsx +8 -8
- package/src/extensions/LinkPreview/LinkPreviewExtention.tsx +1 -1
- package/src/extensions/LinkPreview/LinkPreviewExtentionDecorator.tsx +2 -1
- package/src/extensions/LinkPreview/index.ts +18 -10
- package/src/extensions/LinkPreview/resources/index.ts +1 -0
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +7 -7
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +19 -17
- package/src/extensions/MessageTranslation/index.ts +7 -7
- package/src/extensions/MessageTranslation/resources/index.ts +1 -0
- package/src/extensions/Polls/Header.tsx +8 -8
- package/src/extensions/Polls/Polls.tsx +38 -33
- package/src/extensions/Polls/PollsBubble.tsx +35 -33
- package/src/extensions/Polls/PollsDecorator.tsx +7 -7
- package/src/extensions/Polls/index.ts +4 -5
- package/src/extensions/Polls/resources/index.ts +5 -0
- package/src/extensions/SmartReplies/SmartRepliesDecorator.tsx +11 -11
- package/src/extensions/SmartReplies/SmartRepliesView.tsx +4 -3
- package/src/extensions/SmartReplies/index.ts +6 -2
- package/src/extensions/SmartReplies/resources/index.ts +1 -0
- package/src/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.tsx +12 -10
- package/src/extensions/Stickers/CometChatStickerKeyboard/StickerKeyboardConfiguration.ts +2 -1
- package/src/extensions/Stickers/CometChatStickerKeyboard/hooks.ts +19 -17
- package/src/extensions/Stickers/StickersBubble.tsx +4 -4
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +11 -10
- package/src/extensions/Stickers/index.ts +13 -8
- package/src/extensions/Stickers/resources/index.ts +1 -0
- package/src/extensions/TextModeration/TextModerationConfiguration.tsx +1 -1
- package/src/extensions/TextModeration/TextModerationExtension.tsx +1 -0
- package/src/extensions/TextModeration/TextModerationExtensionDecorator.tsx +1 -0
- package/src/extensions/TextModeration/index.ts +5 -4
- package/src/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.tsx +5 -5
- package/src/extensions/ThumbnailGeneration/index.ts +6 -2
- package/src/extensions/ThumbnailGeneration/resources/index.ts +1 -0
- package/src/extensions/index.ts +92 -47
- package/src/index.ts +225 -232
- package/src/shared/CometChatContext.tsx +1 -1
- package/src/shared/CometChatUiKit/CometChatUIKit.ts +40 -36
- package/src/shared/CometChatUiKit/CometChatUIKitHelper.ts +1 -0
- package/src/shared/assets/images/index.ts +16 -0
- package/src/shared/assets/images/search.png +0 -0
- package/src/shared/base/FontStyle.ts +2 -2
- package/src/shared/base/index.ts +8 -11
- package/src/shared/base/vars.ts +2 -2
- package/src/shared/constants/UIKitConstants.ts +16 -1
- package/src/shared/events/CometChatMessageEvents/index.ts +6 -4
- package/src/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.ts +221 -219
- package/src/shared/events/CometChatUIEventHandler/Listener.ts +39 -37
- package/src/shared/events/ListenerInitializer.ts +8 -1
- package/src/shared/events/messages.ts +2 -0
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +11 -15
- package/src/shared/formatters/CometChatTextFormatter.ts +6 -5
- package/src/shared/formatters/CometChatUrlsFormatter/index.tsx +8 -10
- package/src/shared/framework/DataSource.ts +17 -17
- package/src/shared/framework/DataSourceDecorator.tsx +3 -2
- package/src/shared/framework/ExtensionsDataSource.tsx +1 -0
- package/src/shared/framework/MessageDataSource.tsx +125 -117
- package/src/shared/framework/index.ts +12 -6
- package/src/shared/framework/resources/index.ts +20 -0
- package/src/shared/helper/helperFunctions.ts +7 -5
- package/src/shared/index.ts +109 -100
- package/src/shared/libs/CometChatCalendar/Calendars/BaseCalendar.tsx +6 -3
- package/src/shared/libs/CometChatCalendar/Calendars/DateSelectionCalendar.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Calendars/MultiDateSelectionCalendar.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Components/Day.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Components/Days.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Month.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Months.tsx +1 -0
- package/src/shared/libs/CometChatCalendar/Components/Title.tsx +2 -0
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.ts +3 -0
- package/src/shared/libs/CometChatCalendar/Locales/index.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.ts +1 -0
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.ts +1 -0
- package/src/shared/libs/ImageZoom/ReactNativeZoomableView.tsx +45 -42
- package/src/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.tsx +13 -11
- package/src/shared/libs/ImageZoom/types/index.ts +12 -12
- package/src/shared/libs/VideoPlayerControls/OSSupport/TVOSSupport.tsx +1 -0
- package/src/shared/libs/VideoPlayerControls/VideoPlayer.tsx +1 -0
- package/src/shared/libs/datePickerModal/Modal.js +1 -1
- package/src/shared/modals/CometChatDetailsOption.ts +2 -2
- package/src/shared/modals/CometChatMessageTemplate.ts +13 -12
- package/src/shared/modals/InteractiveData/InteractiveElements/DateTimeElement.ts +7 -7
- package/src/shared/modals/InteractiveData/InteractiveMessage/CardMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/CustomInteractiveMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/FormMessage.ts +1 -0
- package/src/shared/modals/InteractiveData/InteractiveMessage/SchedulerMessage.ts +6 -7
- package/src/shared/modals/index.ts +37 -14
- package/src/shared/resources/CometChatLocalize/CometChatLocalize.ts +5 -5
- package/src/shared/resources/CometChatSoundManager/index.ts +1 -0
- package/src/shared/resources/CometChatTheme/Palette.ts +57 -55
- package/src/shared/resources/CometChatTheme/Typography.ts +30 -30
- package/src/shared/utils/CometChatLiveReactions/CometChatLiveReaction.tsx +17 -13
- package/src/shared/utils/CometChatLiveReactions/resources/index.ts +1 -0
- package/src/shared/utils/CometChatMessageHelper/index.ts +2 -2
- package/src/shared/utils/CometChatMessagePreview/{index.js → index.ts} +3 -0
- package/src/shared/utils/CometChatMessagePreview/resources/index.ts +1 -0
- package/src/shared/utils/CommonUtils.ts +76 -0
- package/src/shared/utils/DetailsUtils/DetailsUtils.tsx +3 -2
- package/src/shared/utils/DetailsUtils/resources/index.ts +7 -0
- package/src/shared/utils/InteractiveMessageUtils.ts +6 -5
- package/src/shared/utils/MessageUtils.tsx +103 -15
- package/src/shared/utils/NetworkUtils.tsx +1 -1
- package/src/shared/utils/PermissionUtil.ts +7 -6
- package/src/shared/utils/SchedulerUtils.ts +8 -6
- package/src/shared/utils/TypeUtils.ts +3 -0
- package/src/shared/utils/conversationUtils.ts +7 -5
- package/src/shared/utils/index.ts +2 -0
- package/src/shared/views/CometChatAICard/CometChatAICard.tsx +7 -6
- package/src/shared/views/CometChatAICard/resources/index.ts +2 -0
- package/src/shared/views/CometChatActionSheet/ActionSheetStyle.ts +3 -0
- package/src/shared/views/CometChatActionSheet/CometChatActionSheet.tsx +5 -5
- package/src/shared/views/CometChatActionSheet/hooks.ts +2 -2
- package/src/shared/views/CometChatActionSheet/index.ts +5 -3
- package/src/shared/views/CometChatActionSheet/resources/index.ts +2 -0
- package/src/shared/views/CometChatAudioBubble/CometChatAudioBubble.tsx +6 -6
- package/src/shared/views/CometChatAudioBubble/index.ts +8 -12
- package/src/shared/views/CometChatAudioBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +6 -5
- package/src/shared/views/CometChatAvatar/index.ts +7 -9
- package/src/shared/views/CometChatBadge/CometChatBadge.tsx +3 -3
- package/src/shared/views/CometChatBadge/index.ts +7 -9
- package/src/shared/views/CometChatBottomSheet/CometChatBottomSheet.tsx +51 -48
- package/src/shared/views/CometChatBottomSheet/index.ts +6 -2
- package/src/shared/views/CometChatButton/CometChatButton.tsx +5 -5
- package/src/shared/views/CometChatButton/index.ts +4 -14
- package/src/shared/views/CometChatCard/CometChatCard.tsx +3 -3
- package/src/shared/views/CometChatCard/index.ts +6 -7
- package/src/shared/views/CometChatCardBubble/CometChatCardBubble.tsx +11 -10
- package/src/shared/views/CometChatCardBubble/index.tsx +2 -1
- package/src/shared/views/CometChatCheckBox/CometChatCheckBox.tsx +6 -6
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialog.tsx +9 -9
- package/src/shared/views/CometChatConfirmDialog/CometChatConfirmDialogStyle.ts +1 -0
- package/src/shared/views/CometChatConfirmDialog/index.ts +9 -6
- package/src/shared/views/CometChatDate/CometChatDate.tsx +2 -2
- package/src/shared/views/CometChatDate/index.ts +12 -11
- package/src/shared/views/CometChatDateTimePicker/CometChatDateTimePicker.tsx +20 -17
- package/src/shared/views/CometChatDateTimePicker/index.ts +3 -5
- package/src/shared/views/CometChatDropDown/CometChatDropDown.tsx +8 -7
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +24 -33
- package/src/shared/views/CometChatEmojiKeyboard/Emoji.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiCategory.ts +1 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardConfiguration.ts +2 -1
- package/src/shared/views/CometChatEmojiKeyboard/EmojiKeyboardStyle.ts +2 -1
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +8 -0
- package/src/shared/views/CometChatEmojiKeyboard/resources/index.ts +8 -0
- package/src/shared/views/CometChatEmojiKeyboard/style.ts +2 -2
- package/src/shared/views/CometChatFileBubble/CometChatFileBubble.tsx +3 -3
- package/src/shared/views/CometChatFileBubble/FileBubbleStyle.ts +1 -1
- package/src/shared/views/CometChatFileBubble/index.ts +7 -8
- package/src/shared/views/CometChatFileBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatFormBubble/CometChatFormBubble.tsx +33 -29
- package/src/shared/views/CometChatFormBubble/index.tsx +2 -1
- package/src/shared/views/CometChatImageBubble/CometChatImageBubble.tsx +63 -17
- package/src/shared/views/CometChatImageBubble/ImageBubbleStyle.ts +1 -1
- package/src/shared/views/CometChatImageBubble/assets/default_image.png +0 -0
- package/src/shared/views/CometChatImageBubble/assets/index.ts +3 -0
- package/src/shared/views/CometChatImageBubble/index.ts +10 -8
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +1 -1
- package/src/shared/views/CometChatImageViewerModal/resources/index.ts +1 -0
- package/src/shared/views/CometChatLabel/CometChatLabel.tsx +2 -2
- package/src/shared/views/CometChatList/CometChatList.tsx +46 -42
- package/src/shared/views/CometChatList/index.ts +3 -3
- package/src/shared/views/CometChatList/resources/index.ts +5 -0
- package/src/shared/views/CometChatListItem/CometChatListItem.tsx +18 -13
- package/src/shared/views/CometChatListItem/ListItemConfiguration.tsx +1 -0
- package/src/shared/views/CometChatListItem/index.ts +8 -7
- package/src/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.tsx +34 -31
- package/src/shared/views/CometChatMediaRecorder/index.ts +8 -9
- package/src/shared/views/CometChatMessageBubble/CometChatMessageBubble.tsx +19 -12
- package/src/shared/views/CometChatMessageBubble/index.ts +6 -5
- package/src/shared/views/CometChatMessageInput/CometChatMessageInput.tsx +10 -9
- package/src/shared/views/CometChatMessageInput/index.ts +2 -1
- package/src/shared/views/CometChatPanel/CometChatPanel.tsx +3 -3
- package/src/shared/views/CometChatPanel/resources/index.ts +1 -0
- package/src/shared/views/CometChatQuickReactions/CometChatQuickReactions.tsx +4 -4
- package/src/shared/views/CometChatQuickReactions/QuickReactionsConfiguration.tsx +1 -0
- package/src/shared/views/CometChatQuickReactions/index.ts +3 -7
- package/src/shared/views/CometChatQuickReactions/resources/index.ts +1 -0
- package/src/shared/views/CometChatQuickView/CometChatQuickView.tsx +6 -6
- package/src/shared/views/CometChatRadioButton/CometChatRadioButton.tsx +4 -4
- package/src/shared/views/CometChatReactionList/CometChatReactionList.tsx +29 -28
- package/src/shared/views/CometChatReactionList/ReactionListConfiguration.tsx +1 -0
- package/src/shared/views/CometChatReactionList/index.ts +3 -7
- package/src/shared/views/CometChatReactionList/resources/index.ts +1 -0
- package/src/shared/views/CometChatReactions/CometChatReactions.tsx +14 -14
- package/src/shared/views/CometChatReactions/ReactionsConfiguration.tsx +1 -0
- package/src/shared/views/CometChatReactions/index.ts +15 -11
- package/src/shared/views/CometChatReceipt/CometChatReceipt.tsx +5 -5
- package/src/shared/views/CometChatReceipt/index.ts +10 -8
- package/src/shared/views/CometChatSchedulerBubble/CometChatSchedulerBubble.tsx +59 -53
- package/src/shared/views/CometChatSchedulerBubble/index.ts +3 -5
- package/src/shared/views/CometChatSchedulerBubble/styles.ts +1 -1
- package/src/shared/views/CometChatSingleSelect/CometChatSingleSelect.tsx +4 -4
- package/src/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.tsx +4 -4
- package/src/shared/views/CometChatStatusIndicator/StatusIndicatorConfiguration.ts +2 -2
- package/src/shared/views/CometChatStatusIndicator/index.ts +21 -10
- package/src/shared/views/CometChatSuggestionList/CometChatSuggestionList.tsx +1 -1
- package/src/shared/views/CometChatSuggestionList/SuggestionItem.ts +5 -5
- package/src/shared/views/CometChatSuggestionList/SuggestionListConfiguration.ts +3 -3
- package/src/shared/views/CometChatSuggestionList/index.ts +14 -10
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +6 -5
- package/src/shared/views/CometChatTextBubble/index.ts +6 -7
- package/src/shared/views/CometChatTextInput/CometChatTextInput.tsx +2 -2
- package/src/shared/views/CometChatTimeSlotSelector/CometChatTimeSlotSelector.tsx +5 -5
- package/src/shared/views/CometChatTimeSlotSelector/index.ts +3 -5
- package/src/shared/views/CometChatVideoBubble/CometChatVideoBubble.tsx +9 -8
- package/src/shared/views/CometChatVideoBubble/index.ts +10 -8
- package/src/shared/views/CometChatVideoBubble/resources/index.ts +2 -0
- package/src/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.tsx +1 -1
- package/src/shared/views/SwipeRow/SwipeRow.tsx +4 -3
- package/src/shared/views/index.ts +151 -86
- package/ios/CometchatUiKit.xcodeproj/project.xcworkspace/xcuserdata/admin.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- package/ios/CometchatUiKit.xcodeproj/xcuserdata/admin.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
- package/src/shared/libs/CometChatCalendar/Components/Arrow.test.tsx +0 -112
- package/src/shared/libs/CometChatCalendar/Components/Day.test.tsx +0 -396
- package/src/shared/libs/CometChatCalendar/Components/Days.test.tsx +0 -216
- package/src/shared/libs/CometChatCalendar/Components/Month.test.tsx +0 -160
- package/src/shared/libs/CometChatCalendar/Components/Months.test.tsx +0 -262
- package/src/shared/libs/CometChatCalendar/Components/Title.test.tsx +0 -111
- package/src/shared/libs/CometChatCalendar/Components/Weekdays.test.tsx +0 -69
- package/src/shared/libs/CometChatCalendar/Hooks/useSurroundingTimeUnits.test.ts +0 -44
- package/src/shared/libs/CometChatCalendar/Utils/addOpacity.test.ts +0 -49
- package/src/shared/libs/CometChatCalendar/Utils/clamp.test.ts +0 -39
- package/src/shared/libs/CometChatCalendar/Utils/dateRange.test.ts +0 -20
- package/src/shared/libs/CometChatCalendar/Utils/getExtraDays.test.ts +0 -48
- package/src/shared/libs/CometChatCalendar/Utils/getSurroundingTimeUnits.test.ts +0 -60
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ReactNativeZoomableViewState,
|
|
3
3
|
ReactNativeZoomableViewWithGesturesProps,
|
|
4
|
+
ZoomableViewEvent,
|
|
4
5
|
} from './types';
|
|
5
6
|
import React from 'react';
|
|
6
7
|
import ReactNativeZoomableView from './ReactNativeZoomableView';
|
|
8
|
+
import { GestureResponderEvent, PanResponderGestureState } from 'react-native';
|
|
7
9
|
|
|
8
10
|
export const swipeDirections = {
|
|
9
11
|
SWIPE_UP: 'SWIPE_UP',
|
|
@@ -23,7 +25,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
23
25
|
this.zoomableViewRef = React.createRef<ReactNativeZoomableView>();
|
|
24
26
|
}
|
|
25
27
|
|
|
26
|
-
_onShiftingEnd = (e, gestureState, zoomableViewState) => {
|
|
28
|
+
_onShiftingEnd = (e: GestureResponderEvent, gestureState: PanResponderGestureState, zoomableViewState: ZoomableViewEvent) => {
|
|
27
29
|
if (this.props.onShiftingEnd) {
|
|
28
30
|
this.props.onShiftingEnd(e, gestureState, zoomableViewState);
|
|
29
31
|
}
|
|
@@ -42,7 +44,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
42
44
|
* @returns {*}
|
|
43
45
|
* @private
|
|
44
46
|
*/
|
|
45
|
-
_couldCallSwipeEvent(zoomableViewState) {
|
|
47
|
+
_couldCallSwipeEvent(zoomableViewState: { zoomLevel: number; }) {
|
|
46
48
|
const {
|
|
47
49
|
onSwipe,
|
|
48
50
|
onSwipeUp,
|
|
@@ -72,7 +74,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
72
74
|
*
|
|
73
75
|
* @private
|
|
74
76
|
*/
|
|
75
|
-
_validateSwipe(gestureState) {
|
|
77
|
+
_validateSwipe(gestureState: any) {
|
|
76
78
|
const { onSwipeUp, onSwipeDown, onSwipeLeft, onSwipeRight } = this.props;
|
|
77
79
|
const swipeDirection = this._getSwipeDirection(gestureState);
|
|
78
80
|
const { SWIPE_LEFT, SWIPE_RIGHT, SWIPE_UP, SWIPE_DOWN } = swipeDirections;
|
|
@@ -92,7 +94,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
92
94
|
* @param gestureState
|
|
93
95
|
* @private
|
|
94
96
|
*/
|
|
95
|
-
_triggerSwipeHandlers(swipeDirection, gestureState) {
|
|
97
|
+
_triggerSwipeHandlers(swipeDirection: any, gestureState: PanResponderGestureState) {
|
|
96
98
|
const { onSwipe, onSwipeUp, onSwipeDown, onSwipeLeft, onSwipeRight } =
|
|
97
99
|
this.props;
|
|
98
100
|
const { SWIPE_LEFT, SWIPE_RIGHT, SWIPE_UP, SWIPE_DOWN } = swipeDirections;
|
|
@@ -126,7 +128,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
126
128
|
* @returns {*}
|
|
127
129
|
* @private
|
|
128
130
|
*/
|
|
129
|
-
_getSwipeDirection(gestureState) {
|
|
131
|
+
_getSwipeDirection(gestureState: any) {
|
|
130
132
|
const { swipeLengthThreshold } = this.props;
|
|
131
133
|
const { SWIPE_LEFT, SWIPE_RIGHT, SWIPE_UP, SWIPE_DOWN } = swipeDirections;
|
|
132
134
|
const { dx, dy } = gestureState;
|
|
@@ -156,7 +158,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
156
158
|
*
|
|
157
159
|
* @private
|
|
158
160
|
*/
|
|
159
|
-
_isValidHorizontalSwipe(gestureState) {
|
|
161
|
+
_isValidHorizontalSwipe(gestureState: { vx: any; dy: any; }) {
|
|
160
162
|
const { vx, dy } = gestureState;
|
|
161
163
|
const { swipeVelocityThreshold, swipeDirectionalThreshold } = this.props;
|
|
162
164
|
return this._isValidSwipe(
|
|
@@ -175,7 +177,7 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
175
177
|
*
|
|
176
178
|
* @private
|
|
177
179
|
*/
|
|
178
|
-
_isValidVerticalSwipe(gestureState) {
|
|
180
|
+
_isValidVerticalSwipe(gestureState: { vy: any; dx: any; }) {
|
|
179
181
|
const { vy, dx } = gestureState;
|
|
180
182
|
const { swipeVelocityThreshold, swipeDirectionalThreshold } = this.props;
|
|
181
183
|
return this._isValidSwipe(
|
|
@@ -199,10 +201,10 @@ class ReactNativeZoomableViewWithGestures extends React.Component<
|
|
|
199
201
|
* @private
|
|
200
202
|
*/
|
|
201
203
|
_isValidSwipe(
|
|
202
|
-
velocity,
|
|
203
|
-
swipeVelocityThreshold,
|
|
204
|
-
directionalOffset,
|
|
205
|
-
swipeDirectionalThreshold
|
|
204
|
+
velocity: number,
|
|
205
|
+
swipeVelocityThreshold: any,
|
|
206
|
+
directionalOffset: number,
|
|
207
|
+
swipeDirectionalThreshold: any
|
|
206
208
|
) {
|
|
207
209
|
return (
|
|
208
210
|
Math.abs(velocity) > swipeVelocityThreshold &&
|
|
@@ -31,10 +31,10 @@ export interface ReactNativeZoomableViewProps extends ViewProps {
|
|
|
31
31
|
initialOffsetY?: number;
|
|
32
32
|
contentWidth?: number;
|
|
33
33
|
contentHeight?: number;
|
|
34
|
-
panBoundaryPadding?: number;
|
|
35
|
-
maxZoom?: number;
|
|
36
|
-
minZoom?: number;
|
|
37
|
-
doubleTapDelay?: number;
|
|
34
|
+
panBoundaryPadding?: number | any;
|
|
35
|
+
maxZoom?: number | any;
|
|
36
|
+
minZoom?: number | any;
|
|
37
|
+
doubleTapDelay?: number | any;
|
|
38
38
|
doubleTapZoomToCenter?: boolean;
|
|
39
39
|
bindToBorders?: boolean;
|
|
40
40
|
zoomStep?: number;
|
|
@@ -83,14 +83,14 @@ export interface ReactNativeZoomableViewProps extends ViewProps {
|
|
|
83
83
|
zoomableViewEventObject: ZoomableViewEvent
|
|
84
84
|
) => void;
|
|
85
85
|
onZoomBefore?: (
|
|
86
|
-
event: GestureResponderEvent,
|
|
87
|
-
gestureState: PanResponderGestureState,
|
|
88
|
-
zoomableViewEventObject: ZoomableViewEvent
|
|
86
|
+
event: GestureResponderEvent | any,
|
|
87
|
+
gestureState: PanResponderGestureState | any,
|
|
88
|
+
zoomableViewEventObject: ZoomableViewEvent | any
|
|
89
89
|
) => boolean | void;
|
|
90
90
|
onZoomAfter?: (
|
|
91
|
-
event: GestureResponderEvent,
|
|
92
|
-
gestureState: PanResponderGestureState,
|
|
93
|
-
zoomableViewEventObject: ZoomableViewEvent
|
|
91
|
+
event: GestureResponderEvent | any,
|
|
92
|
+
gestureState: PanResponderGestureState | any,
|
|
93
|
+
zoomableViewEventObject: ZoomableViewEvent | any
|
|
94
94
|
) => void;
|
|
95
95
|
onZoomEnd?: (
|
|
96
96
|
event: GestureResponderEvent,
|
|
@@ -141,11 +141,11 @@ export interface ReactNativeZoomableViewProps extends ViewProps {
|
|
|
141
141
|
onStartShouldSetPanResponderCapture?: (
|
|
142
142
|
event: GestureResponderEvent,
|
|
143
143
|
gestureState: PanResponderGestureState
|
|
144
|
-
) => boolean;
|
|
144
|
+
) => boolean | any;
|
|
145
145
|
onMoveShouldSetPanResponderCapture?: (
|
|
146
146
|
event: GestureResponderEvent,
|
|
147
147
|
gestureState: PanResponderGestureState
|
|
148
|
-
) => boolean;
|
|
148
|
+
) => boolean | any;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
export interface Vec2D {
|
|
@@ -54,7 +54,7 @@ export class Modal extends Component {
|
|
|
54
54
|
this._isMounted = false;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
componentDidUpdate(prevProps
|
|
57
|
+
componentDidUpdate(prevProps) {
|
|
58
58
|
if (this.props.isVisible && !prevProps.isVisible) {
|
|
59
59
|
this.show();
|
|
60
60
|
} else if (!this.props.isVisible && prevProps.isVisible) {
|
|
@@ -13,9 +13,9 @@ export interface CometChatDetailsOption {
|
|
|
13
13
|
backgroundColor?: string;
|
|
14
14
|
iconTint?: string;
|
|
15
15
|
///to pass custom view to options
|
|
16
|
-
CustomView?: () => JSX.Element;
|
|
16
|
+
CustomView?: () => JSX.Element | null;
|
|
17
17
|
/// to pass tail component for detail option
|
|
18
|
-
Tail?:() => JSX.Element;
|
|
18
|
+
Tail?:() => JSX.Element | null;
|
|
19
19
|
///to pass height for details
|
|
20
20
|
height?: number;
|
|
21
21
|
///[onClick] call function which takes 3 parameter , and one of user or group is populated at a time
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
//@ts-ignore
|
|
1
2
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
2
3
|
import { CometChatMessageOption } from "./CometChatMessageOption";
|
|
3
4
|
import { MessageBubbleAlignmentType } from "../base/Types";
|
|
@@ -22,21 +23,21 @@ interface MessageTemplateInterface {
|
|
|
22
23
|
* @param alignment - The alignment of the message bubble.
|
|
23
24
|
* @returns The JSX element representing the content view.
|
|
24
25
|
*/
|
|
25
|
-
ContentView?: (messageObject: CometChat.BaseMessage, alignment
|
|
26
|
+
ContentView?: (messageObject: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => JSX.Element | null,
|
|
26
27
|
|
|
27
28
|
/**
|
|
28
29
|
* The bubble view of the message template.
|
|
29
30
|
* @param messageObject - The message object.
|
|
30
31
|
* @returns The JSX element representing the bubble view.
|
|
31
32
|
*/
|
|
32
|
-
BubbleView?: (messageObject: CometChat.BaseMessage) => JSX.Element,
|
|
33
|
+
BubbleView?: (messageObject: CometChat.BaseMessage) => JSX.Element | null,
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* The bottom view of the message template.
|
|
36
37
|
* @param messageObject - The message object.
|
|
37
38
|
* @returns The JSX element representing the bottom view.
|
|
38
39
|
*/
|
|
39
|
-
BottomView?: (messageObject: CometChat.BaseMessage, alignment
|
|
40
|
+
BottomView?: (messageObject: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => JSX.Element | null,
|
|
40
41
|
|
|
41
42
|
/**
|
|
42
43
|
* The header view of the message template.
|
|
@@ -44,7 +45,7 @@ interface MessageTemplateInterface {
|
|
|
44
45
|
* @param alignment - The alignment of the message bubble.
|
|
45
46
|
* @returns The JSX element representing the header view.
|
|
46
47
|
*/
|
|
47
|
-
HeaderView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element,
|
|
48
|
+
HeaderView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null,
|
|
48
49
|
|
|
49
50
|
/**
|
|
50
51
|
* The status info view of the message template for DateTime and Receipt.
|
|
@@ -52,7 +53,7 @@ interface MessageTemplateInterface {
|
|
|
52
53
|
* @param alignment - The alignment of the message bubble.
|
|
53
54
|
* @returns The JSX element representing the status info view.
|
|
54
55
|
*/
|
|
55
|
-
StatusInfoView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element,
|
|
56
|
+
StatusInfoView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null,
|
|
56
57
|
|
|
57
58
|
/**
|
|
58
59
|
* The footer view of the message template.
|
|
@@ -60,7 +61,7 @@ interface MessageTemplateInterface {
|
|
|
60
61
|
* @param alignment - The alignment of the message bubble.
|
|
61
62
|
* @returns The JSX element representing the footer view.
|
|
62
63
|
*/
|
|
63
|
-
FooterView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element,
|
|
64
|
+
FooterView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null,
|
|
64
65
|
|
|
65
66
|
/**
|
|
66
67
|
* The options of the message template.
|
|
@@ -90,40 +91,40 @@ export class CometChatMessageTemplate implements MessageTemplateInterface {
|
|
|
90
91
|
* @param alignment - The alignment of the message bubble.
|
|
91
92
|
* @returns The JSX element representing the content view.
|
|
92
93
|
*/
|
|
93
|
-
ContentView?: (messageObject: CometChat.BaseMessage, alignment
|
|
94
|
+
ContentView?: (messageObject: CometChat.BaseMessage | CometChat.CustomMessage, alignment?: MessageBubbleAlignmentType) => JSX.Element | null;
|
|
94
95
|
/**
|
|
95
96
|
* The bubble view of the message template.
|
|
96
97
|
* @param messageObject - The message object.
|
|
97
98
|
* @returns The JSX element representing the bubble view.
|
|
98
99
|
*/
|
|
99
|
-
BubbleView?: (messageObject: CometChat.BaseMessage) => JSX.Element;
|
|
100
|
+
BubbleView?: (messageObject: CometChat.BaseMessage) => JSX.Element | null;
|
|
100
101
|
/**
|
|
101
102
|
* The bottom view of the message template.
|
|
102
103
|
* @param messageObject - The message object.
|
|
103
104
|
* @returns The JSX element representing the bottom view.
|
|
104
105
|
*/
|
|
105
|
-
BottomView?: (messageObject: CometChat.BaseMessage, alignment
|
|
106
|
+
BottomView?: (messageObject: CometChat.BaseMessage, alignment?: MessageBubbleAlignmentType) => JSX.Element | null;
|
|
106
107
|
/**
|
|
107
108
|
* The header view of the message template.
|
|
108
109
|
* @param messageObject - The message object.
|
|
109
110
|
* @param alignment - The alignment of the message bubble.
|
|
110
111
|
* @returns The JSX element representing the header view.
|
|
111
112
|
*/
|
|
112
|
-
HeaderView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element;
|
|
113
|
+
HeaderView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null;
|
|
113
114
|
/**
|
|
114
115
|
* The status info view of the message template for DateTime and Receipt.
|
|
115
116
|
* @param messageObject - The message object.
|
|
116
117
|
* @param alignment - The alignment of the message bubble.
|
|
117
118
|
* @returns The JSX element representing the status info view.
|
|
118
119
|
*/
|
|
119
|
-
StatusInfoView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element;
|
|
120
|
+
StatusInfoView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null;
|
|
120
121
|
/**
|
|
121
122
|
* The footer view of the message template.
|
|
122
123
|
* @param messageObject - The message object.
|
|
123
124
|
* @param alignment - The alignment of the message bubble.
|
|
124
125
|
* @returns The JSX element representing the footer view.
|
|
125
126
|
*/
|
|
126
|
-
FooterView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element;
|
|
127
|
+
FooterView?: (messageObject: CometChat.BaseMessage, alignment: MessageBubbleAlignmentType) => JSX.Element | null;
|
|
127
128
|
/**
|
|
128
129
|
* The options of the message template.
|
|
129
130
|
* @param loggedInUser - The logged in user.
|
|
@@ -9,12 +9,12 @@ export class DateTimeElement extends BaseInputElement<string> {
|
|
|
9
9
|
/**
|
|
10
10
|
* The label of the input element.
|
|
11
11
|
*/
|
|
12
|
-
private label
|
|
13
|
-
private mode
|
|
14
|
-
private timezoneCode
|
|
15
|
-
private to
|
|
16
|
-
private from
|
|
17
|
-
private dateTimeFormat
|
|
12
|
+
private label!: string;
|
|
13
|
+
private mode!: string;
|
|
14
|
+
private timezoneCode!: string;
|
|
15
|
+
private to!: string;
|
|
16
|
+
private from!: string;
|
|
17
|
+
private dateTimeFormat!: string;
|
|
18
18
|
/**
|
|
19
19
|
* The default value to be selected in the DateTime.
|
|
20
20
|
*/
|
|
@@ -26,7 +26,7 @@ export class DateTimeElement extends BaseInputElement<string> {
|
|
|
26
26
|
* @param label - The label of the input element.
|
|
27
27
|
* @param options - The options available for the DateTime input element.
|
|
28
28
|
*/
|
|
29
|
-
constructor(elementId: string, json) {
|
|
29
|
+
constructor(elementId: string, json: any) {
|
|
30
30
|
super(elementId, ElementType.dateTime);
|
|
31
31
|
Object.assign(this, json);
|
|
32
32
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonElement } from "../InteractiveElements/index";
|
|
2
|
+
//@ts-ignore
|
|
2
3
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
4
|
import { ElementEntity } from "../InteractiveEntities/ElementEntity";
|
|
4
5
|
import { MessageTypeConstants } from "../../../constants/UIKitConstants";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ButtonElement } from "../InteractiveElements/index";
|
|
2
|
+
//@ts-ignore
|
|
2
3
|
import { CometChat } from "@cometchat/chat-sdk-react-native";
|
|
3
4
|
import { MessageTypeConstants } from "../../../constants/UIKitConstants";
|
|
4
5
|
|
|
@@ -26,18 +27,17 @@ interface InteractiveData {
|
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export class SchedulerMessage extends CometChat.InteractiveMessage {
|
|
29
|
-
private interactiveData: InteractiveData;
|
|
30
30
|
private title?: string;
|
|
31
31
|
private avatarUrl?: string;
|
|
32
32
|
private goalCompletionText?: string;
|
|
33
|
-
private timezoneCode
|
|
33
|
+
private timezoneCode!: string;
|
|
34
34
|
private bufferTime?: number;
|
|
35
35
|
private duration?: number;
|
|
36
|
-
private availability
|
|
36
|
+
private availability!: Availability;
|
|
37
37
|
private dateRangeStart?: number;
|
|
38
38
|
private dateRangeEnd?: number;
|
|
39
39
|
private icsFileUrl?: string;
|
|
40
|
-
private scheduleElement
|
|
40
|
+
private scheduleElement!: ButtonElement;
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
constructor(
|
|
@@ -52,13 +52,12 @@ export class SchedulerMessage extends CometChat.InteractiveMessage {
|
|
|
52
52
|
MessageTypeConstants.scheduler,
|
|
53
53
|
interactiveData
|
|
54
54
|
);
|
|
55
|
-
this.interactiveData = interactiveData;
|
|
56
55
|
Object.assign(this, interactiveData);
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
// Setters
|
|
60
59
|
setInteractiveData(interactiveData: InteractiveData) {
|
|
61
|
-
|
|
60
|
+
super.setInteractiveData(interactiveData);
|
|
62
61
|
}
|
|
63
62
|
setTitle(title: string) {
|
|
64
63
|
this.title = title;
|
|
@@ -98,7 +97,7 @@ export class SchedulerMessage extends CometChat.InteractiveMessage {
|
|
|
98
97
|
|
|
99
98
|
// Getters
|
|
100
99
|
getInteractiveData() {
|
|
101
|
-
return
|
|
100
|
+
return super.getInteractiveData();
|
|
102
101
|
}
|
|
103
102
|
getTitle() {
|
|
104
103
|
return this.title;
|
|
@@ -1,18 +1,35 @@
|
|
|
1
|
-
import { CometChatMessageOption } from
|
|
2
|
-
import { CometChatOptions } from
|
|
3
|
-
import { CometChatMessageTemplate } from
|
|
4
|
-
import { CometChatDetailsTemplate } from
|
|
5
|
-
import { CometChatDetailsOption } from
|
|
6
|
-
import { CometChatCallLogDetailsTemplate } from
|
|
7
|
-
import { CometChatCallLogDetailsOption } from
|
|
8
|
-
import {
|
|
1
|
+
import { CometChatMessageOption } from "./CometChatMessageOption";
|
|
2
|
+
import { CometChatOptions } from "./CometChatOptions";
|
|
3
|
+
import { CometChatMessageTemplate } from "./CometChatMessageTemplate";
|
|
4
|
+
import { CometChatDetailsTemplate } from "./CometChatDetailsTemplate";
|
|
5
|
+
import { CometChatDetailsOption } from "./CometChatDetailsOption";
|
|
6
|
+
import { CometChatCallLogDetailsTemplate } from "./CometChatCallLogDetailsTemplate";
|
|
7
|
+
import { CometChatCallLogDetailsOption } from "./CometChatCallLogDetailsOptions";
|
|
8
|
+
import {
|
|
9
|
+
APIAction,
|
|
10
|
+
ActionEntity,
|
|
11
|
+
BaseInputElement,
|
|
12
|
+
BaseInteractiveElement,
|
|
13
|
+
ButtonElement,
|
|
14
|
+
CardMessage,
|
|
15
|
+
CheckboxElement,
|
|
16
|
+
CustomAction,
|
|
17
|
+
CustomInteractiveMessage,
|
|
18
|
+
DropdownElement,
|
|
19
|
+
ElementEntity,
|
|
20
|
+
FormMessage,
|
|
21
|
+
LabelElement,
|
|
22
|
+
OptionElement,
|
|
23
|
+
RadioButtonElement,
|
|
24
|
+
SingleSelectElement,
|
|
25
|
+
TextInputElement,
|
|
26
|
+
URLNavigationAction,
|
|
27
|
+
SchedulerMessage,
|
|
28
|
+
DateTimeElement,
|
|
29
|
+
} from "./InteractiveData";
|
|
9
30
|
|
|
10
31
|
export {
|
|
11
|
-
CometChatOptions,
|
|
12
|
-
CometChatMessageOption,
|
|
13
32
|
CometChatMessageTemplate,
|
|
14
|
-
CometChatDetailsTemplate,
|
|
15
|
-
CometChatDetailsOption,
|
|
16
33
|
APIAction,
|
|
17
34
|
ActionEntity,
|
|
18
35
|
BaseInputElement,
|
|
@@ -31,8 +48,14 @@ export {
|
|
|
31
48
|
SingleSelectElement,
|
|
32
49
|
TextInputElement,
|
|
33
50
|
URLNavigationAction,
|
|
51
|
+
SchedulerMessage,
|
|
52
|
+
DateTimeElement,
|
|
53
|
+
};
|
|
54
|
+
export type {
|
|
55
|
+
CometChatOptions,
|
|
56
|
+
CometChatMessageOption,
|
|
57
|
+
CometChatDetailsTemplate,
|
|
58
|
+
CometChatDetailsOption,
|
|
34
59
|
CometChatCallLogDetailsTemplate,
|
|
35
60
|
CometChatCallLogDetailsOption,
|
|
36
|
-
SchedulerMessage,
|
|
37
|
-
DateTimeElement
|
|
38
61
|
};
|
|
@@ -26,13 +26,13 @@ import { Platform, NativeModules } from 'react-native';
|
|
|
26
26
|
class CometChatLocalize {
|
|
27
27
|
/**Properties and constants */
|
|
28
28
|
static fallbackLanguage = "en";
|
|
29
|
-
static locale;
|
|
29
|
+
static locale: string;
|
|
30
30
|
static rtlLanguages = ["ar"];
|
|
31
31
|
static direction = Object.freeze({
|
|
32
32
|
ltr: "ltr",
|
|
33
33
|
rtl: "rtl",
|
|
34
34
|
});
|
|
35
|
-
static translations = {
|
|
35
|
+
static translations: any = {
|
|
36
36
|
ar: translationAR,
|
|
37
37
|
de: translationDE,
|
|
38
38
|
en: translationEN,
|
|
@@ -118,7 +118,7 @@ class CometChatLocalize {
|
|
|
118
118
|
* Set the active language
|
|
119
119
|
* @param {String} language
|
|
120
120
|
*/
|
|
121
|
-
static setLocale = (language) => {
|
|
121
|
+
static setLocale = (language: any) => {
|
|
122
122
|
this.locale = language;
|
|
123
123
|
};
|
|
124
124
|
|
|
@@ -127,7 +127,7 @@ class CometChatLocalize {
|
|
|
127
127
|
* @param {String} str
|
|
128
128
|
* @returns {String} localized str
|
|
129
129
|
*/
|
|
130
|
-
static localize(str) {
|
|
130
|
+
static localize(str: any) {
|
|
131
131
|
let language = this.getLocale();
|
|
132
132
|
return this.translations[language][str];
|
|
133
133
|
}
|
|
@@ -177,6 +177,6 @@ class CometChatLocalize {
|
|
|
177
177
|
* @param {String} str
|
|
178
178
|
* @returns {String} localized str
|
|
179
179
|
*/
|
|
180
|
-
const localize = (str) => CometChatLocalize.localize(str);
|
|
180
|
+
const localize = (str: any) => CometChatLocalize.localize(str);
|
|
181
181
|
|
|
182
182
|
export { CometChatLocalize, localize };
|