@cometchat/chat-uikit-react-native 5.1.0 → 5.1.2
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/android/src/main/java/com/reactnativecometchatuikit/CometchatUiKitPackage.java +2 -0
- package/android/src/main/java/com/reactnativecometchatuikit/ProximityModule.java +53 -0
- package/ios/Proximity.h +5 -0
- package/ios/Proximity.m +25 -0
- package/lib/CometChatConversations/CometChatConversations.js +27 -19
- package/lib/CometChatConversations/CometChatConversations.js.map +1 -1
- package/lib/CometChatConversations/Skeleton.js +1 -1
- package/lib/CometChatConversations/Skeleton.js.map +1 -1
- package/lib/CometChatConversations/style.js.map +1 -1
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js +52 -41
- package/lib/CometChatGroupMembers/CometChatGroupMembers.js.map +1 -1
- package/lib/CometChatGroups/CometChatGroups.js +8 -6
- package/lib/CometChatGroups/CometChatGroups.js.map +1 -1
- package/lib/CometChatGroups/Skeleton.js +1 -1
- package/lib/CometChatGroups/Skeleton.js.map +1 -1
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js +178 -44
- package/lib/CometChatMessageComposer/CometChatMessageComposer.js.map +1 -1
- package/lib/CometChatMessageComposer/styles.d.ts +1 -1
- package/lib/CometChatMessageComposer/styles.js +1 -5
- package/lib/CometChatMessageComposer/styles.js.map +1 -1
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js +14 -52
- package/lib/CometChatMessageHeader/CometChatMessageHeader.js.map +1 -1
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js +7 -12
- package/lib/CometChatMessageInformation/CometChatMessageInformation.js.map +1 -1
- package/lib/CometChatMessageList/CometChatMessageList.js +35 -13
- package/lib/CometChatMessageList/CometChatMessageList.js.map +1 -1
- package/lib/CometChatMessageList/style.js +0 -16
- package/lib/CometChatMessageList/style.js.map +1 -1
- package/lib/CometChatThreadHeader/CometChatThreadHeader.js +4 -2
- package/lib/CometChatThreadHeader/CometChatThreadHeader.js.map +1 -1
- package/lib/CometChatThreadHeader/Header.d.ts +4 -4
- package/lib/CometChatUsers/CometChatUsers.js +7 -5
- package/lib/CometChatUsers/CometChatUsers.js.map +1 -1
- package/lib/CometChatUsers/Skeleton.js +1 -1
- package/lib/CometChatUsers/Skeleton.js.map +1 -1
- package/lib/calls/CallUtils.js +24 -17
- package/lib/calls/CallUtils.js.map +1 -1
- package/lib/calls/CallingExtensionDecorator.js +14 -11
- package/lib/calls/CallingExtensionDecorator.js.map +1 -1
- package/lib/calls/CallingPackage.js.map +1 -1
- package/lib/calls/CometChatCallBubble/CometChatCallBubble.js +4 -3
- package/lib/calls/CometChatCallBubble/CometChatCallBubble.js.map +1 -1
- package/lib/calls/CometChatCallButtons/CometChatCallButtons.js.map +1 -1
- package/lib/calls/CometChatCallButtons/style.d.ts +1 -1
- package/lib/calls/CometChatCallLogs/CometChatCallLogs.js +9 -7
- package/lib/calls/CometChatCallLogs/CometChatCallLogs.js.map +1 -1
- package/lib/calls/CometChatCallLogs/Skeleton.js +1 -1
- package/lib/calls/CometChatCallLogs/Skeleton.js.map +1 -1
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js +8 -6
- package/lib/calls/CometChatIncomingCall/CometChatIncomingCall.js.map +1 -1
- package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js +10 -0
- package/lib/calls/CometChatOngoingCall/CometChatOngoingCall.js.map +1 -1
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js +4 -2
- package/lib/calls/CometChatOutgoingCall/CometChatOutgoingCall.js.map +1 -1
- package/lib/extensions/CollaborativeBubble/CometChatCollaborativeBubble.js.map +1 -1
- package/lib/extensions/CollaborativeBubble/style.js +2 -2
- package/lib/extensions/CollaborativeBubble/style.js.map +1 -1
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js +5 -4
- package/lib/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.js.map +1 -1
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js +5 -4
- package/lib/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.js.map +1 -1
- package/lib/extensions/ExtensionConstants.js +1 -1
- package/lib/extensions/ExtensionConstants.js.map +1 -1
- package/lib/extensions/ExtensionModerator.js.map +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewBubble.js +3 -2
- package/lib/extensions/LinkPreview/LinkPreviewBubble.js.map +1 -1
- package/lib/extensions/LinkPreview/LinkPreviewExtensionDecorator.js.map +1 -1
- package/lib/extensions/MessageTranslation/MessageTranslationBubble.js +3 -2
- package/lib/extensions/MessageTranslation/MessageTranslationBubble.js.map +1 -1
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js +17 -17
- package/lib/extensions/MessageTranslation/MessageTranslationDecorator.js.map +1 -1
- package/lib/extensions/Polls/Polls.js +48 -19
- package/lib/extensions/Polls/Polls.js.map +1 -1
- package/lib/extensions/Polls/PollsBubble.js.map +1 -1
- package/lib/extensions/Polls/PollsDecorator.js +4 -3
- package/lib/extensions/Polls/PollsDecorator.js.map +1 -1
- package/lib/extensions/Polls/PollsExtension.js.map +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.js +4 -3
- package/lib/extensions/Stickers/CometChatStickerKeyboard/CometChatStickerKeyboard.js.map +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/Skeleton.js.map +1 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.d.ts +2 -1
- package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js +3 -2
- package/lib/extensions/Stickers/CometChatStickerKeyboard/hooks.js.map +1 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.d.ts +2 -1
- package/lib/extensions/Stickers/StickersExtensionDecorator.js +5 -3
- package/lib/extensions/Stickers/StickersExtensionDecorator.js.map +1 -1
- package/lib/extensions/Stickers/style.js +3 -3
- package/lib/extensions/Stickers/style.js.map +1 -1
- package/lib/extensions/ThumbnailGeneration/ThumbnailGenerationDecorator.js.map +1 -1
- package/lib/index.d.ts +7 -3
- package/lib/index.js +9 -4
- package/lib/index.js.map +1 -1
- package/lib/shared/CometChatUiKit/CometChatUIKit.d.ts +1 -3
- package/lib/shared/CometChatUiKit/CometChatUIKit.js +2 -5
- package/lib/shared/CometChatUiKit/CometChatUIKit.js.map +1 -1
- package/lib/shared/constants/UIKitConstants.js.map +1 -1
- package/lib/shared/events/CometChatMessageEvents/index.js +1 -2
- package/lib/shared/events/CometChatMessageEvents/index.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js +1 -2
- package/lib/shared/events/CometChatUIEventHandler/CometChatUIEventHandler.js.map +1 -1
- package/lib/shared/events/CometChatUIEventHandler/Listener.js.map +1 -1
- package/lib/shared/events/ListenerInitializer.js +1 -2
- package/lib/shared/events/ListenerInitializer.js.map +1 -1
- package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.d.ts +21 -7
- package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js +92 -31
- package/lib/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.js.map +1 -1
- package/lib/shared/formatters/CometChatTextFormatter.js.map +1 -1
- package/lib/shared/formatters/CometChatUrlsFormatter/index.js.map +1 -1
- package/lib/shared/framework/ChatConfigurator.js +1 -2
- package/lib/shared/framework/ChatConfigurator.js.map +1 -1
- package/lib/shared/framework/DataSource.d.ts +2 -2
- package/lib/shared/framework/DataSourceDecorator.d.ts +2 -2
- package/lib/shared/framework/DataSourceDecorator.js +4 -4
- package/lib/shared/framework/DataSourceDecorator.js.map +1 -1
- package/lib/shared/framework/MessageDataSource.d.ts +10 -2
- package/lib/shared/framework/MessageDataSource.js +144 -44
- package/lib/shared/framework/MessageDataSource.js.map +1 -1
- package/lib/shared/helper/LocalizedDateHelper.d.ts +70 -0
- package/lib/shared/helper/LocalizedDateHelper.js +265 -0
- package/lib/shared/helper/LocalizedDateHelper.js.map +1 -0
- package/lib/shared/helper/dateHelper.js +1 -2
- package/lib/shared/helper/dateHelper.js.map +1 -1
- package/lib/shared/helper/functions.d.ts +1 -0
- package/lib/shared/helper/functions.js +48 -0
- package/lib/shared/helper/functions.js.map +1 -1
- package/lib/shared/helper/helperFunctions.d.ts +1 -1
- package/lib/shared/helper/helperFunctions.js.map +1 -1
- package/lib/shared/helper/useKeyboard.js.map +1 -1
- package/lib/shared/helper/useLocalizedDateHook.d.ts +6 -0
- package/lib/shared/helper/useLocalizedDateHook.js +15 -0
- package/lib/shared/helper/useLocalizedDateHook.js.map +1 -0
- package/lib/shared/icons/Icon.js.map +1 -1
- package/lib/shared/icons/components/ListItemCheck.d.ts +0 -1
- package/lib/shared/icons/components/StickerBase-icon.d.ts +0 -1
- package/lib/shared/icons/components/account-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/account-circle.d.ts +0 -1
- package/lib/shared/icons/components/activity.d.ts +0 -1
- package/lib/shared/icons/components/add-a-photo-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-a-photo.d.ts +0 -1
- package/lib/shared/icons/components/add-box-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-box.d.ts +0 -1
- package/lib/shared/icons/components/add-call-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-call.d.ts +0 -1
- package/lib/shared/icons/components/add-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-circle.d.ts +0 -1
- package/lib/shared/icons/components/add-comment-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-comment.d.ts +0 -1
- package/lib/shared/icons/components/add-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-reaction-fill.d.ts +0 -1
- package/lib/shared/icons/components/add-reaction.d.ts +0 -1
- package/lib/shared/icons/components/add.d.ts +0 -1
- package/lib/shared/icons/components/ai-conversation-summary-fill.d.ts +0 -1
- package/lib/shared/icons/components/ai-conversation-summary.d.ts +0 -1
- package/lib/shared/icons/components/ai-fill.d.ts +0 -1
- package/lib/shared/icons/components/ai-suggest-reply-fill.d.ts +0 -1
- package/lib/shared/icons/components/ai-suggest-reply.d.ts +0 -1
- package/lib/shared/icons/components/ai.d.ts +0 -1
- package/lib/shared/icons/components/alternate-email-fill.d.ts +0 -1
- package/lib/shared/icons/components/alternate-email.d.ts +0 -1
- package/lib/shared/icons/components/animals-&-nature.d.ts +0 -1
- package/lib/shared/icons/components/archive-fill.d.ts +0 -1
- package/lib/shared/icons/components/archive.d.ts +0 -1
- package/lib/shared/icons/components/arrow-back-fill.d.ts +0 -1
- package/lib/shared/icons/components/arrow-back.d.ts +0 -1
- package/lib/shared/icons/components/arrow-forward-fill.d.ts +0 -1
- package/lib/shared/icons/components/arrow-forward.d.ts +0 -1
- package/lib/shared/icons/components/attach-file-fill.d.ts +0 -1
- package/lib/shared/icons/components/attach-file.d.ts +0 -1
- package/lib/shared/icons/components/audio-file-type.d.ts +0 -1
- package/lib/shared/icons/components/bar-chart-fill.d.ts +0 -1
- package/lib/shared/icons/components/bar-chart.d.ts +0 -1
- package/lib/shared/icons/components/base-icon.d.ts +0 -1
- package/lib/shared/icons/components/bedtime-fill.d.ts +0 -1
- package/lib/shared/icons/components/bedtime.d.ts +0 -1
- package/lib/shared/icons/components/block-fill.d.ts +0 -1
- package/lib/shared/icons/components/block.d.ts +0 -1
- package/lib/shared/icons/components/bookmark-add-fill.d.ts +0 -1
- package/lib/shared/icons/components/bookmark-add.d.ts +0 -1
- package/lib/shared/icons/components/bookmark-fill.d.ts +0 -1
- package/lib/shared/icons/components/bookmark.d.ts +0 -1
- package/lib/shared/icons/components/calendar-add-on-fill.d.ts +0 -1
- package/lib/shared/icons/components/calendar-add-on.d.ts +0 -1
- package/lib/shared/icons/components/calendar-today-fill.d.ts +0 -1
- package/lib/shared/icons/components/calendar-today.d.ts +0 -1
- package/lib/shared/icons/components/call-end-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-end.d.ts +0 -1
- package/lib/shared/icons/components/call-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-log-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-log.d.ts +0 -1
- package/lib/shared/icons/components/call-made-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-made.d.ts +0 -1
- package/lib/shared/icons/components/call-missed-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-missed-outgoing-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-missed-outgoing.d.ts +0 -1
- package/lib/shared/icons/components/call-missed.d.ts +0 -1
- package/lib/shared/icons/components/call-received-fill.d.ts +0 -1
- package/lib/shared/icons/components/call-received.d.ts +0 -1
- package/lib/shared/icons/components/call.d.ts +0 -1
- package/lib/shared/icons/components/cancel-fill.d.ts +0 -1
- package/lib/shared/icons/components/cancel.d.ts +0 -1
- package/lib/shared/icons/components/change-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/change-circle.d.ts +0 -1
- package/lib/shared/icons/components/chat-bot-fill.d.ts +0 -1
- package/lib/shared/icons/components/chat-bot.d.ts +0 -1
- package/lib/shared/icons/components/chat-fill.d.ts +0 -1
- package/lib/shared/icons/components/chat.d.ts +0 -1
- package/lib/shared/icons/components/check-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/check-circle.d.ts +0 -1
- package/lib/shared/icons/components/check-fill.d.ts +0 -1
- package/lib/shared/icons/components/check.d.ts +0 -1
- package/lib/shared/icons/components/chevron-left-fill.d.ts +0 -1
- package/lib/shared/icons/components/chevron-left.d.ts +0 -1
- package/lib/shared/icons/components/chevron-right-fill.d.ts +0 -1
- package/lib/shared/icons/components/chevron-right.d.ts +0 -1
- package/lib/shared/icons/components/close-fill.d.ts +0 -1
- package/lib/shared/icons/components/close.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-document-fill.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-document-icon.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-document.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-whiteboard-fill.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-whiteboard-icon.d.ts +0 -1
- package/lib/shared/icons/components/collaborative-whiteboard.d.ts +0 -1
- package/lib/shared/icons/components/content-copy-fill.d.ts +0 -1
- package/lib/shared/icons/components/content-copy.d.ts +0 -1
- package/lib/shared/icons/components/crop-fill.d.ts +0 -1
- package/lib/shared/icons/components/crop.d.ts +0 -1
- package/lib/shared/icons/components/delete-fill.d.ts +0 -1
- package/lib/shared/icons/components/delete.d.ts +0 -1
- package/lib/shared/icons/components/description-fill.d.ts +0 -1
- package/lib/shared/icons/components/description.d.ts +0 -1
- package/lib/shared/icons/components/document-file-type.d.ts +0 -1
- package/lib/shared/icons/components/done-all-fill.d.ts +0 -1
- package/lib/shared/icons/components/done-all.d.ts +0 -1
- package/lib/shared/icons/components/download-fill.d.ts +0 -1
- package/lib/shared/icons/components/download.d.ts +0 -1
- package/lib/shared/icons/components/edit-calendar-fill.d.ts +0 -1
- package/lib/shared/icons/components/edit-calendar.d.ts +0 -1
- package/lib/shared/icons/components/edit-fill.d.ts +0 -1
- package/lib/shared/icons/components/edit-square-fill.d.ts +0 -1
- package/lib/shared/icons/components/edit-square.d.ts +0 -1
- package/lib/shared/icons/components/edit.d.ts +0 -1
- package/lib/shared/icons/components/empty-state.d.ts +0 -1
- package/lib/shared/icons/components/error-fill.d.ts +0 -1
- package/lib/shared/icons/components/error-state.d.ts +0 -1
- package/lib/shared/icons/components/error.d.ts +0 -1
- package/lib/shared/icons/components/event-available-fill.d.ts +0 -1
- package/lib/shared/icons/components/event-available.d.ts +0 -1
- package/lib/shared/icons/components/event-fill.d.ts +0 -1
- package/lib/shared/icons/components/event.d.ts +0 -1
- package/lib/shared/icons/components/favorite-fill.d.ts +0 -1
- package/lib/shared/icons/components/favorite.d.ts +0 -1
- package/lib/shared/icons/components/filter-list-fill.d.ts +0 -1
- package/lib/shared/icons/components/filter-list-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/filter-list-off.d.ts +0 -1
- package/lib/shared/icons/components/filter-list.d.ts +0 -1
- package/lib/shared/icons/components/flags.d.ts +0 -1
- package/lib/shared/icons/components/flip-camera-ios-fill.d.ts +0 -1
- package/lib/shared/icons/components/flip-camera-ios.d.ts +0 -1
- package/lib/shared/icons/components/food-&-drink.d.ts +0 -1
- package/lib/shared/icons/components/forward-fill.d.ts +0 -1
- package/lib/shared/icons/components/forward.d.ts +0 -1
- package/lib/shared/icons/components/gif-fill.d.ts +0 -1
- package/lib/shared/icons/components/gif.d.ts +0 -1
- package/lib/shared/icons/components/graphic-eq-fill.d.ts +0 -1
- package/lib/shared/icons/components/graphic-eq.d.ts +0 -1
- package/lib/shared/icons/components/group-add.d.ts +0 -1
- package/lib/shared/icons/components/group-fill.d.ts +0 -1
- package/lib/shared/icons/components/group.d.ts +0 -1
- package/lib/shared/icons/components/help-fill.d.ts +0 -1
- package/lib/shared/icons/components/help.d.ts +0 -1
- package/lib/shared/icons/components/history-fill.d.ts +0 -1
- package/lib/shared/icons/components/history.d.ts +0 -1
- package/lib/shared/icons/components/image-file-type.d.ts +0 -1
- package/lib/shared/icons/components/incoming-audio-fill.d.ts +0 -1
- package/lib/shared/icons/components/incoming-audio.d.ts +0 -1
- package/lib/shared/icons/components/incoming-video-fill.d.ts +0 -1
- package/lib/shared/icons/components/incoming-video.d.ts +0 -1
- package/lib/shared/icons/components/info-fill.d.ts +0 -1
- package/lib/shared/icons/components/info.d.ts +0 -1
- package/lib/shared/icons/components/keep-fill.d.ts +0 -1
- package/lib/shared/icons/components/keep-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/keep-off.d.ts +0 -1
- package/lib/shared/icons/components/keep.d.ts +0 -1
- package/lib/shared/icons/components/keyboard-arrow-down-fill.d.ts +0 -1
- package/lib/shared/icons/components/keyboard-arrow-down.d.ts +0 -1
- package/lib/shared/icons/components/keyboard-arrow-up-fill.d.ts +0 -1
- package/lib/shared/icons/components/keyboard-arrow-up.d.ts +0 -1
- package/lib/shared/icons/components/keyboard-fill.d.ts +0 -1
- package/lib/shared/icons/components/keyboard.d.ts +0 -1
- package/lib/shared/icons/components/language-fill.d.ts +0 -1
- package/lib/shared/icons/components/language.d.ts +0 -1
- package/lib/shared/icons/components/link-fill.d.ts +0 -1
- package/lib/shared/icons/components/link.d.ts +0 -1
- package/lib/shared/icons/components/loading-fill.d.ts +0 -1
- package/lib/shared/icons/components/loading.d.ts +0 -1
- package/lib/shared/icons/components/location-on-fill.d.ts +0 -1
- package/lib/shared/icons/components/location-on.d.ts +0 -1
- package/lib/shared/icons/components/lock-fill.d.ts +0 -1
- package/lib/shared/icons/components/lock-open-fill.d.ts +0 -1
- package/lib/shared/icons/components/lock-open.d.ts +0 -1
- package/lib/shared/icons/components/lock.d.ts +0 -1
- package/lib/shared/icons/components/logout-fill.d.ts +0 -1
- package/lib/shared/icons/components/logout.d.ts +0 -1
- package/lib/shared/icons/components/mail-fill.d.ts +0 -1
- package/lib/shared/icons/components/mail.d.ts +0 -1
- package/lib/shared/icons/components/mic-fill.d.ts +0 -1
- package/lib/shared/icons/components/mic-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/mic-off.d.ts +0 -1
- package/lib/shared/icons/components/mic.d.ts +0 -1
- package/lib/shared/icons/components/missed-video-call-fill.d.ts +0 -1
- package/lib/shared/icons/components/missed-video-call.d.ts +0 -1
- package/lib/shared/icons/components/mood-fill.d.ts +0 -1
- package/lib/shared/icons/components/mood.d.ts +0 -1
- package/lib/shared/icons/components/more-vert-fill.d.ts +0 -1
- package/lib/shared/icons/components/more-vert.d.ts +0 -1
- package/lib/shared/icons/components/near-me-fill.d.ts +0 -1
- package/lib/shared/icons/components/near-me.d.ts +0 -1
- package/lib/shared/icons/components/no-photography-fill.d.ts +0 -1
- package/lib/shared/icons/components/no-photography.d.ts +0 -1
- package/lib/shared/icons/components/notifications-fill.d.ts +0 -1
- package/lib/shared/icons/components/notifications-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/notifications-off.d.ts +0 -1
- package/lib/shared/icons/components/notifications.d.ts +0 -1
- package/lib/shared/icons/components/objects.d.ts +0 -1
- package/lib/shared/icons/components/outgoing-audio-fill.d.ts +0 -1
- package/lib/shared/icons/components/outgoing-audio.d.ts +0 -1
- package/lib/shared/icons/components/outgoing-video-fill.d.ts +0 -1
- package/lib/shared/icons/components/outgoing-video.d.ts +0 -1
- package/lib/shared/icons/components/pause-fill.d.ts +0 -1
- package/lib/shared/icons/components/pause.d.ts +0 -1
- package/lib/shared/icons/components/pdf-file-type.d.ts +0 -1
- package/lib/shared/icons/components/person-add-fill.d.ts +0 -1
- package/lib/shared/icons/components/person-add.d.ts +0 -1
- package/lib/shared/icons/components/person-fill.d.ts +0 -1
- package/lib/shared/icons/components/person-off.d.ts +0 -1
- package/lib/shared/icons/components/person.d.ts +0 -1
- package/lib/shared/icons/components/phone-in-talk-fill.d.ts +0 -1
- package/lib/shared/icons/components/phone-in-talk.d.ts +0 -1
- package/lib/shared/icons/components/phone-incoming-fill.d.ts +0 -1
- package/lib/shared/icons/components/phone-incoming.d.ts +0 -1
- package/lib/shared/icons/components/phone-missed-fill.d.ts +0 -1
- package/lib/shared/icons/components/phone-missed.d.ts +0 -1
- package/lib/shared/icons/components/phone-outgoing-fill.d.ts +0 -1
- package/lib/shared/icons/components/phone-outgoing.d.ts +0 -1
- package/lib/shared/icons/components/photo-camera-fill.d.ts +0 -1
- package/lib/shared/icons/components/photo-camera.d.ts +0 -1
- package/lib/shared/icons/components/photo-fill.d.ts +0 -1
- package/lib/shared/icons/components/photo.d.ts +0 -1
- package/lib/shared/icons/components/play-arrow-fill.d.ts +0 -1
- package/lib/shared/icons/components/play-arrow.d.ts +0 -1
- package/lib/shared/icons/components/play-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/play-circle.d.ts +0 -1
- package/lib/shared/icons/components/poll-Icon.d.ts +0 -1
- package/lib/shared/icons/components/poll-fill.d.ts +0 -1
- package/lib/shared/icons/components/poll.d.ts +0 -1
- package/lib/shared/icons/components/presentation-file-type.d.ts +0 -1
- package/lib/shared/icons/components/rearrange-fill.d.ts +0 -1
- package/lib/shared/icons/components/rearrange.d.ts +0 -1
- package/lib/shared/icons/components/refresh-fill.d.ts +0 -1
- package/lib/shared/icons/components/refresh.d.ts +0 -1
- package/lib/shared/icons/components/reply-all-fill.d.ts +0 -1
- package/lib/shared/icons/components/reply-all.d.ts +0 -1
- package/lib/shared/icons/components/reply-fill.d.ts +0 -1
- package/lib/shared/icons/components/reply.d.ts +0 -1
- package/lib/shared/icons/components/retry-fill.d.ts +0 -1
- package/lib/shared/icons/components/retry.d.ts +0 -1
- package/lib/shared/icons/components/schedule-fill.d.ts +0 -1
- package/lib/shared/icons/components/schedule.d.ts +0 -1
- package/lib/shared/icons/components/screen-share-fill.d.ts +0 -1
- package/lib/shared/icons/components/screen-share.d.ts +0 -1
- package/lib/shared/icons/components/search-fill.d.ts +0 -1
- package/lib/shared/icons/components/search.d.ts +0 -1
- package/lib/shared/icons/components/send-fill.d.ts +0 -1
- package/lib/shared/icons/components/send.d.ts +0 -1
- package/lib/shared/icons/components/settings-fill.d.ts +0 -1
- package/lib/shared/icons/components/settings.d.ts +0 -1
- package/lib/shared/icons/components/share-fill.d.ts +0 -1
- package/lib/shared/icons/components/share.d.ts +0 -1
- package/lib/shared/icons/components/shield-fill.d.ts +0 -1
- package/lib/shared/icons/components/shield.d.ts +0 -1
- package/lib/shared/icons/components/smileys-&-people.d.ts +0 -1
- package/lib/shared/icons/components/spreadsheet-file-type.d.ts +0 -1
- package/lib/shared/icons/components/star-fill.d.ts +0 -1
- package/lib/shared/icons/components/star.d.ts +0 -1
- package/lib/shared/icons/components/sticker-fill.d.ts +0 -1
- package/lib/shared/icons/components/sticker.d.ts +0 -1
- package/lib/shared/icons/components/stop-circle-fill.d.ts +0 -1
- package/lib/shared/icons/components/stop-circle.d.ts +0 -1
- package/lib/shared/icons/components/stop-fill.d.ts +0 -1
- package/lib/shared/icons/components/stop-screen-share-fill.d.ts +0 -1
- package/lib/shared/icons/components/stop-screen-share.d.ts +0 -1
- package/lib/shared/icons/components/stop.d.ts +0 -1
- package/lib/shared/icons/components/subdirectory-arrow-left-fill.d.ts +0 -1
- package/lib/shared/icons/components/subdirectory-arrow-left.d.ts +0 -1
- package/lib/shared/icons/components/subdirectory-arrow-right-fill.d.ts +0 -1
- package/lib/shared/icons/components/subdirectory-arrow-right.d.ts +0 -1
- package/lib/shared/icons/components/sunny-fill.d.ts +0 -1
- package/lib/shared/icons/components/sunny.d.ts +0 -1
- package/lib/shared/icons/components/symbols.d.ts +0 -1
- package/lib/shared/icons/components/text-file-type.d.ts +0 -1
- package/lib/shared/icons/components/thumb-down-fill.d.ts +0 -1
- package/lib/shared/icons/components/thumb-down.d.ts +0 -1
- package/lib/shared/icons/components/thumb-up-fill.d.ts +0 -1
- package/lib/shared/icons/components/thumb-up.d.ts +0 -1
- package/lib/shared/icons/components/translate-fill.d.ts +0 -1
- package/lib/shared/icons/components/translate.d.ts +0 -1
- package/lib/shared/icons/components/travel-&-places.d.ts +0 -1
- package/lib/shared/icons/components/unknown-file-type.d.ts +0 -1
- package/lib/shared/icons/components/upload-fill.d.ts +0 -1
- package/lib/shared/icons/components/upload.d.ts +0 -1
- package/lib/shared/icons/components/user-empty-icon.d.ts +0 -1
- package/lib/shared/icons/components/video-call-fill.d.ts +0 -1
- package/lib/shared/icons/components/video-call.d.ts +0 -1
- package/lib/shared/icons/components/video-file-type.d.ts +0 -1
- package/lib/shared/icons/components/videocam-fill.d.ts +0 -1
- package/lib/shared/icons/components/videocam-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/videocam-off.d.ts +0 -1
- package/lib/shared/icons/components/videocam.d.ts +0 -1
- package/lib/shared/icons/components/visibility-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/visibility-off.d.ts +0 -1
- package/lib/shared/icons/components/volume-down-fill.d.ts +0 -1
- package/lib/shared/icons/components/volume-down.d.ts +0 -1
- package/lib/shared/icons/components/volume-mute-fill.d.ts +0 -1
- package/lib/shared/icons/components/volume-mute.d.ts +0 -1
- package/lib/shared/icons/components/volume-off-fill.d.ts +0 -1
- package/lib/shared/icons/components/volume-off.d.ts +0 -1
- package/lib/shared/icons/components/volume-up-fill.d.ts +0 -1
- package/lib/shared/icons/components/volume-up.d.ts +0 -1
- package/lib/shared/icons/components/warning-fill.d.ts +0 -1
- package/lib/shared/icons/components/warning.d.ts +0 -1
- package/lib/shared/icons/components/wifi-fill.d.ts +0 -1
- package/lib/shared/icons/components/wifi.d.ts +0 -1
- package/lib/shared/icons/components/zip-file-type.d.ts +0 -1
- package/lib/shared/icons/components/zoom-in-map-fill.d.ts +0 -1
- package/lib/shared/icons/components/zoom-in-map.d.ts +0 -1
- package/lib/shared/icons/components/zoom-out-map-fill.d.ts +0 -1
- package/lib/shared/icons/components/zoom-out-map.d.ts +0 -1
- package/lib/shared/icons/icon-mapping.d.ts +0 -1
- package/lib/shared/index.d.ts +20 -14
- package/lib/shared/index.js +15 -29
- package/lib/shared/index.js.map +1 -1
- package/lib/shared/libs/ImageZoom/ReactNativeZoomableView.js.map +1 -1
- package/lib/shared/libs/ImageZoom/ReactNativeZoomableViewWithGestures.js.map +1 -1
- package/lib/shared/libs/ImageZoom/helper.js.map +1 -1
- package/lib/shared/libs/VideoPlayer/DRMType.d.ts +4 -4
- package/lib/shared/libs/VideoPlayer/FilterType.d.ts +16 -16
- package/lib/shared/libs/VideoPlayer/TextTrackType.d.ts +3 -3
- package/lib/shared/libs/VideoPlayer/VideoResizeMode.d.ts +3 -3
- package/lib/shared/modals/CometChatMessageTemplate.d.ts +3 -1
- package/lib/shared/modals/CometChatMessageTemplate.js +3 -1
- package/lib/shared/modals/CometChatMessageTemplate.js.map +1 -1
- package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.d.ts +15 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.js +75 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatI18nProvider.js.map +1 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.d.ts +9601 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.js +66 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizationHelper.js.map +1 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.d.ts +3 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.js +12 -0
- package/lib/shared/resources/CometChatLocalizeNew/CometChatLocalizeContext.js.map +1 -0
- package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.d.ts +5 -0
- package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.js +47 -0
- package/lib/shared/resources/CometChatLocalizeNew/LocalizationManager.js.map +1 -0
- package/lib/shared/resources/CometChatLocalizeNew/index.d.ts +6 -0
- package/lib/shared/resources/CometChatLocalizeNew/index.js +6 -0
- package/lib/shared/resources/CometChatLocalizeNew/index.js.map +1 -0
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/de/translation.json +11 -1
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/en/translation.json +10 -1
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/es/translation.json +11 -1
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/fr/translation.json +412 -401
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/hi/translation.json +10 -1
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/hu/translation.json +412 -402
- package/lib/shared/resources/CometChatLocalizeNew/resources/it/translation.json +456 -0
- package/lib/shared/resources/CometChatLocalizeNew/resources/ja/translation.json +456 -0
- package/lib/shared/resources/CometChatLocalizeNew/resources/ko/translation.json +456 -0
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/lt/translation.json +412 -402
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/ms/translation.json +412 -402
- package/lib/shared/resources/CometChatLocalizeNew/resources/nl/translation.json +456 -0
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/pt/translation.json +412 -402
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/ru/translation.json +412 -402
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/sv/translation.json +412 -402
- package/lib/shared/resources/CometChatLocalizeNew/resources/tr/translation.json +456 -0
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/zh/translation.json +412 -402
- package/lib/shared/resources/{CometChatLocalize → CometChatLocalizeNew}/resources/zh-tw/translation.json +412 -401
- package/lib/shared/resources/CometChatLocalizeNew/type.d.ts +5 -0
- package/lib/shared/resources/CometChatLocalizeNew/type.js +2 -0
- package/lib/shared/resources/CometChatLocalizeNew/type.js.map +1 -0
- package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.d.ts +5 -0
- package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.js +19 -0
- package/lib/shared/resources/CometChatLocalizeNew/useCometChatTranslationHook.js.map +1 -0
- package/lib/shared/resources/CometChatSoundManager/CometChatSoundManager.js +1 -2
- package/lib/shared/resources/CometChatSoundManager/CometChatSoundManager.js.map +1 -1
- package/lib/shared/resources/CometChatSoundManager/sound.d.ts +17 -17
- package/lib/shared/resources/CometChatSoundManager/sound.js.map +1 -1
- package/lib/shared/resources/index.d.ts +1 -2
- package/lib/shared/resources/index.js +1 -2
- package/lib/shared/resources/index.js.map +1 -1
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.d.ts +1 -10
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js +0 -8
- package/lib/shared/utils/CometChatMessagePreview/CometChatMessagePreview.js.map +1 -1
- package/lib/shared/utils/CometChatMessagePreview/index.d.ts +1 -2
- package/lib/shared/utils/CometChatMessagePreview/index.js +1 -3
- package/lib/shared/utils/CometChatMessagePreview/index.js.map +1 -1
- package/lib/shared/utils/CometChatMessagePreview/style.d.ts +60 -450
- package/lib/shared/utils/CommonUtils.d.ts +1 -1
- package/lib/shared/utils/CommonUtils.js.map +1 -1
- package/lib/shared/utils/MessageUtils.d.ts +2 -2
- package/lib/shared/utils/MessageUtils.js +10 -11
- package/lib/shared/utils/MessageUtils.js.map +1 -1
- package/lib/shared/utils/NetworkUtils.js.map +1 -1
- package/lib/shared/utils/PermissionUtil.js +5 -4
- package/lib/shared/utils/PermissionUtil.js.map +1 -1
- package/lib/shared/utils/conversationUtils.js +11 -11
- package/lib/shared/utils/conversationUtils.js.map +1 -1
- package/lib/shared/utils/icsToJson.js.map +1 -1
- package/lib/shared/utils/index.d.ts +2 -2
- package/lib/shared/utils/index.js +2 -2
- package/lib/shared/utils/index.js.map +1 -1
- package/lib/shared/views/CometChatAudioBubble/AnimatedAudioWaves.d.ts +1 -1
- package/lib/shared/views/CometChatAudioBubble/AnimatedAudioWaves.js.map +1 -1
- package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js +5 -3
- package/lib/shared/views/CometChatAudioBubble/CometChatAudioBubble.js.map +1 -1
- package/lib/shared/views/CometChatAvatar/CometChatAvatar.js +2 -1
- package/lib/shared/views/CometChatAvatar/CometChatAvatar.js.map +1 -1
- package/lib/shared/views/CometChatBadge/CometChatBadge.js.map +1 -1
- package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js +1 -1
- package/lib/shared/views/CometChatBottomSheet/CometChatBottomSheet.js.map +1 -1
- package/lib/shared/views/CometChatDate/CometChatDate.d.ts +11 -11
- package/lib/shared/views/CometChatDate/CometChatDate.js +5 -2
- package/lib/shared/views/CometChatDate/CometChatDate.js.map +1 -1
- package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.d.ts +2 -2
- package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.js +3 -2
- package/lib/shared/views/CometChatDateSeperator/CometChatDateSeparator.js.map +1 -1
- package/lib/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.js +3 -2
- package/lib/shared/views/CometChatDeletedBubble/CometChatDeletedBubble.js.map +1 -1
- package/lib/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.js.map +1 -1
- package/lib/shared/views/CometChatEmojiKeyboard/emojis.js +10 -8
- package/lib/shared/views/CometChatEmojiKeyboard/emojis.js.map +1 -1
- package/lib/shared/views/CometChatFileBubble/CometChatFileBubble.js.map +1 -1
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js +2 -2
- package/lib/shared/views/CometChatImageBubble/CometChatImageLoader.js.map +1 -1
- package/lib/shared/views/CometChatList/CometChatList.js +44 -9
- package/lib/shared/views/CometChatList/CometChatList.js.map +1 -1
- package/lib/shared/views/CometChatList/Header.js.map +1 -1
- package/lib/shared/views/CometChatListItem/CometChatListItem.js.map +1 -1
- package/lib/shared/views/CometChatMediaRecorder/AnimatingMic.d.ts +2 -2
- package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPlayer.js.map +1 -1
- package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.js +13 -6
- package/lib/shared/views/CometChatMediaRecorder/CometChatAudioPreview/CometChatAudioPreview.js.map +1 -1
- package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js +5 -4
- package/lib/shared/views/CometChatMediaRecorder/CometChatMediaRecorder.js.map +1 -1
- package/lib/shared/views/CometChatMediaRecorder/Timer.js.map +1 -1
- package/lib/shared/views/CometChatMessageBubble/CometChatMessageBubble.js +1 -1
- package/lib/shared/views/CometChatMessageBubble/CometChatMessageBubble.js.map +1 -1
- package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js +3 -2
- package/lib/shared/views/CometChatMessageInput/CometChatMessageInput.js.map +1 -1
- package/lib/shared/views/CometChatReactionList/CometChatReactionList.d.ts +4 -0
- package/lib/shared/views/CometChatReactionList/CometChatReactionList.js +13 -7
- package/lib/shared/views/CometChatReactionList/CometChatReactionList.js.map +1 -1
- package/lib/shared/views/CometChatReactions/CometChatReactions.js.map +1 -1
- package/lib/shared/views/CometChatReceipt/CometChatReceipt.js.map +1 -1
- package/lib/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.d.ts +1 -1
- package/lib/shared/views/CometChatStatusIndicator/CometChatStatusIndicator.js.map +1 -1
- package/lib/shared/views/CometChatSuggestionList/CometChatSuggestionList.js.map +1 -1
- package/lib/shared/views/CometChatSuggestionList/Skeleton.js +18 -18
- package/lib/shared/views/CometChatSuggestionList/Skeleton.js.map +1 -1
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js +11 -9
- package/lib/shared/views/CometChatTextBubble/CometChatTextBubble.js.map +1 -1
- package/lib/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.d.ts +1 -0
- package/lib/shared/views/CometChatTooltipMenu/CometChatTooltipMenu.js.map +1 -1
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js +9 -24
- package/lib/shared/views/CometChatVideoBubble/CometChatVideoBubble.js.map +1 -1
- package/lib/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.js +61 -61
- package/lib/shared/views/CometChatVideoPlayer/CometChatVideoPlayer.js.map +1 -1
- package/lib/theme/CometChatThemeHelper.d.ts +69 -69
- package/lib/theme/CometChatThemeHelper.js.map +1 -1
- package/lib/theme/context.d.ts +3025 -2834
- package/lib/theme/context.js +1 -1
- package/lib/theme/context.js.map +1 -1
- package/lib/theme/default/default.d.ts +6 -0
- package/lib/theme/default/default.js +147 -0
- package/lib/theme/default/default.js.map +1 -0
- package/lib/theme/default/index.d.ts +0 -6
- package/lib/theme/default/index.js +0 -178
- package/lib/theme/default/index.js.map +1 -1
- package/lib/theme/provider.js +1 -1
- package/lib/theme/provider.js.map +1 -1
- package/package.json +4 -4
- package/src/CometChatMessageHeader/CometChatMessageHeader.tsx +15 -9
- package/src/CometChatMessageList/CometChatMessageList.tsx +120 -53
- package/src/calls/CallUtils.ts +1 -1
- package/src/calls/CallingExtensionDecorator.tsx +4 -2
- package/src/calls/CometChatIncomingCall/CometChatIncomingCall.tsx +13 -29
- package/src/calls/CometChatOngoingCall/CometChatOngoingCall.tsx +13 -0
- package/src/calls/CometChatOutgoingCall/CometChatOutgoingCall.tsx +8 -5
- package/src/extensions/CollaborativeDocument/CollaborativeDocumentExtensionDecorator.tsx +1 -1
- package/src/extensions/CollaborativeWhiteboard/CollaborativeWhiteboardExtensionDecorator.tsx +1 -1
- package/src/extensions/MessageTranslation/MessageTranslationBubble.tsx +1 -1
- package/src/extensions/MessageTranslation/MessageTranslationDecorator.tsx +1 -1
- package/src/extensions/Polls/Polls.tsx +50 -22
- package/src/extensions/Polls/PollsDecorator.tsx +1 -1
- package/src/extensions/Stickers/StickersExtensionDecorator.tsx +1 -1
- package/src/shared/formatters/CometChatMentionsFormatter/CometChatMentionsFormatter.tsx +1 -1
- package/src/shared/framework/MessageDataSource.tsx +1 -1
- package/src/shared/helper/LocalizedDateHelper.ts +1 -1
- package/src/shared/helper/functions.js +1 -1
- package/src/shared/modals/CometChatMessageTemplate.ts +12 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/de/translation.json +1 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/es/translation.json +1 -0
- package/src/shared/resources/CometChatLocalizeNew/resources/fr/translation.json +456 -454
- package/src/shared/resources/CometChatLocalizeNew/resources/hu/translation.json +416 -415
- package/src/shared/resources/CometChatLocalizeNew/resources/lt/translation.json +415 -414
- package/src/shared/resources/CometChatLocalizeNew/resources/ms/translation.json +414 -413
- package/src/shared/resources/CometChatLocalizeNew/resources/pt/translation.json +414 -413
- package/src/shared/resources/CometChatLocalizeNew/resources/ru/translation.json +414 -413
- package/src/shared/resources/CometChatLocalizeNew/resources/sv/translation.json +414 -414
- package/src/shared/resources/CometChatLocalizeNew/resources/zh/translation.json +415 -415
- package/src/shared/resources/CometChatLocalizeNew/resources/zh-tw/translation.json +415 -413
- package/src/shared/utils/PermissionUtil.ts +1 -1
- package/src/shared/utils/conversationUtils.ts +1 -1
- package/src/shared/views/CometChatAvatar/CometChatAvatar.tsx +4 -2
- package/src/shared/views/CometChatEmojiKeyboard/CometChatEmojiKeyboard.tsx +5 -1
- package/src/shared/views/CometChatEmojiKeyboard/emojis.ts +1 -1
- package/src/shared/views/CometChatImageBubble/CometChatImageLoader.tsx +1 -0
- package/src/shared/views/CometChatImageViewerModal/ImageViewerModal.tsx +57 -45
- package/src/shared/views/CometChatList/CometChatList.tsx +44 -7
- package/src/shared/views/CometChatTextBubble/CometChatTextBubble.tsx +121 -74
- package/android/.gradle/7.4/checksums/checksums.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/vcs-1/gc.properties +0 -0
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.d.ts +0 -79
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js +0 -152
- package/lib/shared/resources/CometChatLocalize/CometChatLocalize.js.map +0 -1
- package/lib/shared/resources/CometChatLocalize/index.d.ts +0 -2
- package/lib/shared/resources/CometChatLocalize/index.js +0 -3
- package/lib/shared/resources/CometChatLocalize/index.js.map +0 -1
- package/lib/shared/resources/CometChatLocalize/resources/ar/translation.json +0 -447
- package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.d.ts +0 -29
- package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js +0 -29
- package/lib/shared/utils/CometChatMessagePreview/MessagePreviewStyle.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Alert, Linking, NativeModules, PermissionsAndroid, Platform } from "react-native";
|
|
2
|
-
import { getCometChatTranslation } from "
|
|
2
|
+
import { getCometChatTranslation } from "../resources/CometChatLocalizeNew/LocalizationManager";
|
|
3
3
|
const t = getCometChatTranslation();
|
|
4
4
|
const { FileManager } = NativeModules;
|
|
5
5
|
|
|
@@ -6,7 +6,7 @@ import { MessageCategoryConstants } from "../constants/UIKitConstants";
|
|
|
6
6
|
import { CometChatUIKit } from "../CometChatUiKit";
|
|
7
7
|
import { CometChatTheme } from "../../theme/type";
|
|
8
8
|
import { JSX } from "react";
|
|
9
|
-
import { getCometChatTranslation } from "
|
|
9
|
+
import { getCometChatTranslation } from "../resources/CometChatLocalizeNew/LocalizationManager";
|
|
10
10
|
|
|
11
11
|
const t = getCometChatTranslation();
|
|
12
12
|
|
|
@@ -51,8 +51,10 @@ export const CometChatAvatar = (props: CometChatAvatarProps) => {
|
|
|
51
51
|
) {
|
|
52
52
|
return <Image source={imageSource} style={[avatarStyle.imageStyle]} />;
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
const initials = [...(name || "")].slice(0, 2).join("").toUpperCase();
|
|
55
|
+
|
|
56
|
+
return <Text style={[avatarStyle.textStyle]}>{initials}</Text>;
|
|
55
57
|
}, [image, name, avatarStyle.imageStyle, avatarStyle.textStyle]);
|
|
56
58
|
|
|
57
59
|
return <View style={[avatarStyle.containerStyle]}>{getImageView()}</View>;
|
|
58
|
-
};
|
|
60
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import {
|
|
3
3
|
FlatList,
|
|
4
|
-
|
|
4
|
+
Platform,
|
|
5
5
|
StyleProp,
|
|
6
6
|
Text,
|
|
7
7
|
TextStyle,
|
|
@@ -12,6 +12,7 @@ import { useTheme } from "../../../theme";
|
|
|
12
12
|
import { Icon } from "../../icons/Icon";
|
|
13
13
|
import { Emojis } from "./emojis";
|
|
14
14
|
import Styles from "./style";
|
|
15
|
+
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
15
16
|
|
|
16
17
|
/**
|
|
17
18
|
* Type definitions for the emoji items and categories.
|
|
@@ -149,6 +150,7 @@ const CometChatEmojiKeyboard: React.FC<CometChatEmojiKeyboardProps> = ({
|
|
|
149
150
|
}) => {
|
|
150
151
|
const theme = useTheme();
|
|
151
152
|
const styles = Styles(theme);
|
|
153
|
+
const insets = useSafeAreaInsets();
|
|
152
154
|
|
|
153
155
|
/**
|
|
154
156
|
* ITEM_HEIGHT is assumed to be the height of one row or the uniform height per row.
|
|
@@ -284,6 +286,7 @@ const CometChatEmojiKeyboard: React.FC<CometChatEmojiKeyboardProps> = ({
|
|
|
284
286
|
|
|
285
287
|
return (
|
|
286
288
|
<SafeAreaView
|
|
289
|
+
edges={["top"]}
|
|
287
290
|
style={[
|
|
288
291
|
styles.emojiKeyboardContainer,
|
|
289
292
|
{
|
|
@@ -315,6 +318,7 @@ const CometChatEmojiKeyboard: React.FC<CometChatEmojiKeyboardProps> = ({
|
|
|
315
318
|
styles.categoryContainer,
|
|
316
319
|
{
|
|
317
320
|
backgroundColor: categoryBackground || theme.color.background1,
|
|
321
|
+
paddingBottom: Platform.OS === "ios" ? insets.bottom : 0,
|
|
318
322
|
},
|
|
319
323
|
]}
|
|
320
324
|
>
|
|
@@ -139,6 +139,7 @@ export const CometChatImageLoader = (props: CometChatImageLoaderPropType) => {
|
|
|
139
139
|
onTouchStart={handleTouchStart}
|
|
140
140
|
onTouchEnd={handleTouchEnd}
|
|
141
141
|
onTouchMove={onTouchMove}
|
|
142
|
+
hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
|
|
142
143
|
style={{
|
|
143
144
|
position: "relative",
|
|
144
145
|
justifyContent: "center",
|
|
@@ -1,43 +1,50 @@
|
|
|
1
1
|
import React, { useLayoutEffect, useState } from "react";
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
Image,
|
|
5
|
-
Modal,
|
|
6
|
-
SafeAreaView,
|
|
7
|
-
StyleSheet,
|
|
8
|
-
TouchableOpacity,
|
|
9
|
-
View,
|
|
10
|
-
} from "react-native";
|
|
2
|
+
import { ActivityIndicator, Image, Modal, StyleSheet, TouchableOpacity, View } from "react-native";
|
|
3
|
+
import { SafeAreaView, useSafeAreaInsets } from "react-native-safe-area-context";
|
|
11
4
|
import { ReactNativeZoomableViewWithGestures } from "../../libs/ImageZoom";
|
|
12
|
-
import {
|
|
5
|
+
import { Icon } from "../../icons/Icon";
|
|
13
6
|
|
|
14
7
|
export const ImageViewerModal = ({ imageUrl, isVisible, onClose }: any) => {
|
|
15
8
|
const [downloaded, setDownloaded] = useState(false);
|
|
9
|
+
const insets = useSafeAreaInsets();
|
|
10
|
+
|
|
16
11
|
useLayoutEffect(() => {
|
|
17
|
-
|
|
12
|
+
// include imageUrl as dep so it re-runs when URL changes
|
|
13
|
+
if (!imageUrl) return;
|
|
14
|
+
Image.prefetch(typeof imageUrl === "string" ? imageUrl : imageUrl.uri).then((res) => {
|
|
18
15
|
setDownloaded(res);
|
|
19
16
|
});
|
|
20
|
-
|
|
21
|
-
Image.getSize(
|
|
22
|
-
imageUrl.uri,
|
|
23
|
-
(res) => {
|
|
24
|
-
console.log("success : ", res);
|
|
25
|
-
},
|
|
26
|
-
(res) => {
|
|
27
|
-
console.log("error : ", res);
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}, []);
|
|
17
|
+
}, [imageUrl]);
|
|
31
18
|
|
|
32
19
|
return (
|
|
33
20
|
<Modal animationType='slide' transparent={false} visible={isVisible} onRequestClose={onClose}>
|
|
34
|
-
|
|
21
|
+
{/* keep SafeAreaView so bottom inset is handled too */}
|
|
22
|
+
<SafeAreaView style={styles.centeredView} edges={["bottom"]}>
|
|
23
|
+
<View
|
|
24
|
+
style={[
|
|
25
|
+
styles.header,
|
|
26
|
+
{
|
|
27
|
+
// push header below the notch/status bar
|
|
28
|
+
paddingTop: insets.top,
|
|
29
|
+
height: 60 + insets.top,
|
|
30
|
+
},
|
|
31
|
+
]}
|
|
32
|
+
>
|
|
33
|
+
<TouchableOpacity
|
|
34
|
+
style={[
|
|
35
|
+
styles.closeButton,
|
|
36
|
+
{
|
|
37
|
+
// respect left inset (very useful on iPhone with rounded corners)
|
|
38
|
+
marginLeft: Math.max(10, insets.left + 6),
|
|
39
|
+
},
|
|
40
|
+
]}
|
|
41
|
+
onPress={onClose}
|
|
42
|
+
>
|
|
43
|
+
<Icon name='arrow-back-fill' color={"#fff"} height={22} width={22} />
|
|
44
|
+
</TouchableOpacity>
|
|
45
|
+
</View>
|
|
46
|
+
|
|
35
47
|
<View style={styles.container}>
|
|
36
|
-
<View style={styles.header}>
|
|
37
|
-
<TouchableOpacity style={styles.closeButton} onPress={onClose}>
|
|
38
|
-
<Image source={ICONS.backIcon} style={{ tintColor: "#fff", height: 20, width: 20 }} />
|
|
39
|
-
</TouchableOpacity>
|
|
40
|
-
</View>
|
|
41
48
|
{downloaded ? (
|
|
42
49
|
<View style={styles.imageContainer}>
|
|
43
50
|
<ReactNativeZoomableViewWithGestures onSwipeDown={onClose}>
|
|
@@ -45,7 +52,9 @@ export const ImageViewerModal = ({ imageUrl, isVisible, onClose }: any) => {
|
|
|
45
52
|
</ReactNativeZoomableViewWithGestures>
|
|
46
53
|
</View>
|
|
47
54
|
) : (
|
|
48
|
-
<
|
|
55
|
+
<View style={styles.loaderContainer}>
|
|
56
|
+
<ActivityIndicator color={"#fff"} size='large' />
|
|
57
|
+
</View>
|
|
49
58
|
)}
|
|
50
59
|
</View>
|
|
51
60
|
</SafeAreaView>
|
|
@@ -56,38 +65,41 @@ export const ImageViewerModal = ({ imageUrl, isVisible, onClose }: any) => {
|
|
|
56
65
|
const styles = StyleSheet.create({
|
|
57
66
|
centeredView: {
|
|
58
67
|
flex: 1,
|
|
59
|
-
|
|
60
|
-
elevation: 1,
|
|
68
|
+
backgroundColor: "#000",
|
|
61
69
|
},
|
|
62
70
|
container: {
|
|
71
|
+
flex: 1,
|
|
72
|
+
backgroundColor: "#000",
|
|
73
|
+
},
|
|
74
|
+
loaderContainer: {
|
|
63
75
|
flex: 1,
|
|
64
76
|
justifyContent: "center",
|
|
65
77
|
alignItems: "center",
|
|
66
|
-
backgroundColor: "#000",
|
|
67
78
|
},
|
|
68
79
|
header: {
|
|
69
80
|
position: "absolute",
|
|
70
81
|
top: 0,
|
|
82
|
+
left: 0,
|
|
83
|
+
right: 0,
|
|
71
84
|
backgroundColor: "transparent",
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
85
|
+
zIndex: 1000,
|
|
86
|
+
elevation: 50,
|
|
87
|
+
justifyContent: "center",
|
|
75
88
|
},
|
|
76
89
|
imageContainer: {
|
|
77
90
|
flex: 1,
|
|
78
|
-
|
|
79
|
-
width: "100%",
|
|
80
|
-
},
|
|
81
|
-
imageStyle: {
|
|
82
|
-
width: "100%",
|
|
83
|
-
height: "100%",
|
|
91
|
+
marginVertical: 60,
|
|
84
92
|
},
|
|
85
93
|
closeButton: {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
width: 60,
|
|
94
|
+
height: 44,
|
|
95
|
+
width: 44,
|
|
89
96
|
justifyContent: "center",
|
|
90
97
|
alignItems: "center",
|
|
91
|
-
|
|
98
|
+
backgroundColor: "rgba(0,0,0,0.3)",
|
|
99
|
+
borderRadius: 22,
|
|
100
|
+
},
|
|
101
|
+
imageStyle: {
|
|
102
|
+
width: "100%",
|
|
103
|
+
height: "100%",
|
|
92
104
|
},
|
|
93
105
|
});
|
|
@@ -152,7 +152,7 @@ export const CometChatList = React.forwardRef<CometChatListActionsInterface, Com
|
|
|
152
152
|
(props, ref) => {
|
|
153
153
|
const connectionListenerId = "connectionListener_" + new Date().getTime();
|
|
154
154
|
const theme = useTheme();
|
|
155
|
-
const {t}= useCometChatTranslation()
|
|
155
|
+
const { t } = useCometChatTranslation();
|
|
156
156
|
const [isLoadingMore, setIsLoadingMore] = useState(false);
|
|
157
157
|
const [hasMoreData, setHasMoreData] = useState(true);
|
|
158
158
|
|
|
@@ -250,17 +250,36 @@ export const CometChatList = React.forwardRef<CometChatListActionsInterface, Com
|
|
|
250
250
|
const searchHandler = (searchText: string) => {
|
|
251
251
|
setSearchInput(searchText);
|
|
252
252
|
setHasMoreData(true);
|
|
253
|
-
|
|
253
|
+
|
|
254
|
+
// Decide which builder to use (searchRequestBuilder preferred)
|
|
255
|
+
let builder = searchRequestBuilder || requestBuilder;
|
|
256
|
+
|
|
257
|
+
if (!builder) {
|
|
258
|
+
// no builder available, nothing to do
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// If a separate searchRequestBuilder exists and searchText present,
|
|
263
|
+
// set the search keyword on it; otherwise use the main requestBuilder.
|
|
264
|
+
let builtRequest;
|
|
254
265
|
if (searchRequestBuilder && searchText) {
|
|
255
|
-
|
|
266
|
+
builtRequest = searchRequestBuilder.setSearchKeyword(searchText).build();
|
|
256
267
|
} else if (requestBuilder) {
|
|
257
|
-
|
|
268
|
+
builtRequest = requestBuilder.setSearchKeyword(searchText).build();
|
|
269
|
+
} else {
|
|
270
|
+
// fallback: if there's no search keyword, build base builder
|
|
271
|
+
builtRequest = builder.build();
|
|
258
272
|
}
|
|
259
|
-
|
|
273
|
+
|
|
274
|
+
// important: store the built request so fetchNext uses the same instance
|
|
275
|
+
listHandlerRef.current = builtRequest;
|
|
276
|
+
|
|
277
|
+
// Then call getList with the built request
|
|
278
|
+
getSearch(builtRequest);
|
|
260
279
|
};
|
|
261
280
|
|
|
262
|
-
const getSearch = (
|
|
263
|
-
getList(
|
|
281
|
+
const getSearch = (builtReq: any) => {
|
|
282
|
+
getList(builtReq)
|
|
264
283
|
.then((newlist: any) => {
|
|
265
284
|
setDataLoadingStatus(NO_DATA_FOUND);
|
|
266
285
|
setList(newlist);
|
|
@@ -412,6 +431,24 @@ export const CometChatList = React.forwardRef<CometChatListActionsInterface, Com
|
|
|
412
431
|
if (isLoadingMore || (!throughKeyword && !hasMoreData)) return;
|
|
413
432
|
setIsLoadingMore(true);
|
|
414
433
|
|
|
434
|
+
// If we're resetting due to a new keyword, create a fresh builder instance
|
|
435
|
+
if (throughKeyword) {
|
|
436
|
+
// prefer searchRequestBuilder if provided
|
|
437
|
+
const baseBuilder = searchRequestBuilder || requestBuilder;
|
|
438
|
+
if (baseBuilder) {
|
|
439
|
+
const keyword = searchInputRef.current ?? "";
|
|
440
|
+
if (searchRequestBuilder && keyword) {
|
|
441
|
+
listHandlerRef.current = searchRequestBuilder.setSearchKeyword(keyword).build();
|
|
442
|
+
} else if (requestBuilder) {
|
|
443
|
+
listHandlerRef.current = requestBuilder.setSearchKeyword(keyword).build();
|
|
444
|
+
} else {
|
|
445
|
+
listHandlerRef.current = baseBuilder.build();
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
// reset pagination flags
|
|
449
|
+
setHasMoreData(true);
|
|
450
|
+
}
|
|
451
|
+
|
|
415
452
|
getList(listHandlerRef.current)
|
|
416
453
|
.then((newlist: any[] = []) => {
|
|
417
454
|
let finalList: any[] = [];
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import React, { useLayoutEffect, useState,
|
|
1
|
+
import React, { useLayoutEffect, useState, useRef, useCallback } from "react";
|
|
2
2
|
import {
|
|
3
|
-
Platform,
|
|
4
3
|
StyleProp,
|
|
5
4
|
Text,
|
|
6
5
|
TextStyle,
|
|
7
6
|
View,
|
|
8
7
|
ViewStyle,
|
|
9
8
|
TouchableOpacity,
|
|
9
|
+
LayoutChangeEvent,
|
|
10
|
+
TextLayoutEvent,
|
|
10
11
|
} from "react-native";
|
|
11
12
|
import {
|
|
12
13
|
CometChatMentionsFormatter,
|
|
@@ -14,24 +15,28 @@ import {
|
|
|
14
15
|
CometChatUrlsFormatter,
|
|
15
16
|
} from "../../formatters";
|
|
16
17
|
import { useCometChatTranslation } from "../../resources/CometChatLocalizeNew";
|
|
18
|
+
import { t } from "../../resources/CometChatLocalizeNew/LocalizationManager";
|
|
17
19
|
|
|
18
20
|
export interface CometChatTextBubbleInterface {
|
|
19
|
-
|
|
20
|
-
* Text to be shown
|
|
21
|
-
*/
|
|
21
|
+
/*** text to be shown */
|
|
22
22
|
text?: string;
|
|
23
23
|
textStyle?: StyleProp<TextStyle>;
|
|
24
|
-
/**
|
|
25
|
-
* Text container style
|
|
26
|
-
*/
|
|
24
|
+
/** text container style */
|
|
27
25
|
textContainerStyle?: StyleProp<ViewStyle>;
|
|
28
26
|
textFormatters?: Array<
|
|
29
27
|
CometChatMentionsFormatter | CometChatUrlsFormatter | CometChatTextFormatter
|
|
30
28
|
>;
|
|
29
|
+
/** number of lines to collapse to (default 4) */
|
|
30
|
+
collapseLines?: number;
|
|
31
|
+
/** style for the toggle container */
|
|
32
|
+
toggleContainerStyle?: StyleProp<ViewStyle>;
|
|
33
|
+
/** style for the toggle text */
|
|
34
|
+
toggleTextStyle?: StyleProp<TextStyle>;
|
|
31
35
|
}
|
|
32
36
|
|
|
33
37
|
export const CometChatTextBubble = (props: CometChatTextBubbleInterface) => {
|
|
34
38
|
const { textContainerStyle } = props;
|
|
39
|
+
|
|
35
40
|
return (
|
|
36
41
|
<View style={textContainerStyle}>
|
|
37
42
|
<CometChatTextBubbleText {...props} />
|
|
@@ -39,20 +44,39 @@ export const CometChatTextBubble = (props: CometChatTextBubbleInterface) => {
|
|
|
39
44
|
);
|
|
40
45
|
};
|
|
41
46
|
|
|
47
|
+
/**
|
|
48
|
+
* CometChatTextBubbleText
|
|
49
|
+
*
|
|
50
|
+
* - measure by actual container width (onLayout) so both iOS and Android measure correctly
|
|
51
|
+
* - robust measurement cache keyed by text+width so we don't re-measure unnecessarily
|
|
52
|
+
*/
|
|
42
53
|
export const CometChatTextBubbleText = (
|
|
43
54
|
props: Omit<CometChatTextBubbleInterface, "textContainerStyle">
|
|
44
55
|
) => {
|
|
45
|
-
const {t}= useCometChatTranslation()
|
|
46
|
-
const {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
+
const { t } = useCometChatTranslation();
|
|
57
|
+
const {
|
|
58
|
+
text = "",
|
|
59
|
+
textFormatters,
|
|
60
|
+
textStyle,
|
|
61
|
+
collapseLines = 4,
|
|
62
|
+
toggleContainerStyle,
|
|
63
|
+
toggleTextStyle,
|
|
64
|
+
} = props;
|
|
65
|
+
|
|
66
|
+
const [formattedText, setFormattedText] = useState<string>(text);
|
|
67
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
68
|
+
const [isTruncatable, setIsTruncatable] = useState(false);
|
|
69
|
+
|
|
70
|
+
// store container width for accurate measurement
|
|
71
|
+
const [containerWidth, setContainerWidth] = useState<number | null>(null);
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* measuredCache helps avoid re-measuring if the same text+width was already measured.
|
|
75
|
+
* Structure: { key: string } where key = `${text}::${width}`
|
|
76
|
+
*/
|
|
77
|
+
const measuredCacheRef = useRef<Record<string, boolean>>({});
|
|
78
|
+
|
|
79
|
+
// Only recompute formattedText when the text or textFormatters actually change.
|
|
56
80
|
useLayoutEffect(() => {
|
|
57
81
|
let finalText = text;
|
|
58
82
|
if (textFormatters && textFormatters.length) {
|
|
@@ -60,78 +84,101 @@ export const CometChatTextBubbleText = (
|
|
|
60
84
|
finalText = textFormatters[i].getFormattedText(finalText);
|
|
61
85
|
}
|
|
62
86
|
}
|
|
63
|
-
|
|
64
|
-
//
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
if (lines.length > 4) {
|
|
72
|
-
// Only set to true, never reset to false when a message is updated
|
|
73
|
-
// This preserves the truncated state when the message is updated (e.g., reactions added)
|
|
74
|
-
setIsTruncated(true);
|
|
87
|
+
|
|
88
|
+
// If text content actually changed, update formattedText and reset expansion.
|
|
89
|
+
// Do NOT reset on other prop changes (so adding reaction won't collapse/lose toggle).
|
|
90
|
+
if (finalText !== formattedText) {
|
|
91
|
+
setFormattedText(finalText as string);
|
|
92
|
+
setIsExpanded(false);
|
|
93
|
+
// measurement cache can stay, but remove entries for previous text (optional)
|
|
94
|
+
// measuredCacheRef.current = {}; // not required, we'll rely on keying by text+width
|
|
75
95
|
}
|
|
76
|
-
//
|
|
77
|
-
}
|
|
96
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
97
|
+
}, [
|
|
98
|
+
text /* only textFormatters intentionally omitted from deps if stable; if not stable include it */,
|
|
99
|
+
]);
|
|
78
100
|
|
|
79
|
-
//
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
101
|
+
// handler to capture container width whenever layout changes
|
|
102
|
+
const onContainerLayout = useCallback(
|
|
103
|
+
(e: LayoutChangeEvent) => {
|
|
104
|
+
const w = Math.round(e.nativeEvent.layout.width);
|
|
105
|
+
if (w && w !== containerWidth) {
|
|
106
|
+
setContainerWidth(w);
|
|
107
|
+
// Do NOT clear isExpanded here — measurement may change truncation but we want to
|
|
108
|
+
// preserve user's expanded/collapsed state unless the text itself changed.
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
[containerWidth]
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
// Called when hidden text is laid out; use it to determine lines count
|
|
115
|
+
const onMeasuredTextLayout = (e: TextLayoutEvent) => {
|
|
116
|
+
// We rely on containerWidth + formattedText as the measurement key
|
|
117
|
+
const key = `${formattedText}::${containerWidth ?? 0}`;
|
|
83
118
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
119
|
+
// If we've already measured this text at this width, skip
|
|
120
|
+
if (measuredCacheRef.current[key]) return;
|
|
121
|
+
|
|
122
|
+
const lines = e.nativeEvent.lines;
|
|
123
|
+
const isNowTruncatable = !!(lines && lines.length > collapseLines);
|
|
124
|
+
|
|
125
|
+
setIsTruncatable(isNowTruncatable);
|
|
126
|
+
measuredCacheRef.current[key] = isNowTruncatable;
|
|
87
127
|
};
|
|
88
128
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
129
|
+
const toggle = () => setIsExpanded((v) => !v);
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Hidden measurement `Text`:
|
|
133
|
+
* - we render it only when we have containerWidth (so it can measure correctly)
|
|
134
|
+
* - style uses same font metrics as visible text because it inherits textStyle
|
|
135
|
+
* - opacity: 0 and position absolute so it does not affect layout
|
|
136
|
+
*
|
|
137
|
+
* Important: We key the hidden Text by formattedText + containerWidth so React remounts
|
|
138
|
+
* it and triggers onTextLayout when either changes.
|
|
139
|
+
*/
|
|
140
|
+
const hiddenTextKey = `${formattedText}::${containerWidth ?? 0}`;
|
|
96
141
|
|
|
97
142
|
return (
|
|
98
|
-
<View>
|
|
143
|
+
<View onLayout={onContainerLayout}>
|
|
144
|
+
{/* Hidden measurement text: only meaningful after we know container width */}
|
|
145
|
+
{containerWidth ? (
|
|
146
|
+
<Text
|
|
147
|
+
key={hiddenTextKey}
|
|
148
|
+
// make sure the hidden text has same width as container
|
|
149
|
+
style={[
|
|
150
|
+
// width must be exact to get consistent wrapping on both platforms
|
|
151
|
+
{ position: "absolute", left: 0, top: -10000, width: containerWidth, opacity: 0 },
|
|
152
|
+
textStyle as any,
|
|
153
|
+
]}
|
|
154
|
+
onTextLayout={onMeasuredTextLayout}
|
|
155
|
+
accessible={false}
|
|
156
|
+
importantForAccessibility='no-hide-descendants'
|
|
157
|
+
>
|
|
158
|
+
{formattedText}
|
|
159
|
+
</Text>
|
|
160
|
+
) : null}
|
|
161
|
+
|
|
162
|
+
{/* Visible text */}
|
|
99
163
|
<Text
|
|
100
|
-
// Use text content in the key to ensure it only re-renders when text changes
|
|
101
|
-
key={`${expanded ? "expanded" : "collapsed"}-${text}`}
|
|
102
164
|
style={textStyle}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
// iOS: only measure collapsed height when not expanded.
|
|
106
|
-
onLayout={Platform.OS === "ios" && !expanded ? handleCollapsedLayout : undefined}
|
|
107
|
-
numberOfLines={expanded ? undefined : 4}
|
|
108
|
-
ellipsizeMode="tail"
|
|
165
|
+
numberOfLines={isExpanded ? undefined : collapseLines}
|
|
166
|
+
ellipsizeMode='tail'
|
|
109
167
|
>
|
|
110
168
|
{formattedText}
|
|
111
169
|
</Text>
|
|
112
170
|
|
|
113
|
-
{/*
|
|
114
|
-
{
|
|
115
|
-
<
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
{formattedText}
|
|
120
|
-
</Text>
|
|
121
|
-
)}
|
|
122
|
-
|
|
123
|
-
{/* Only show the toggle if the text was truncated in collapsed mode */}
|
|
124
|
-
{isTruncated && (
|
|
125
|
-
<View style={{ alignItems: "flex-end", marginTop: 8 }}>
|
|
126
|
-
<TouchableOpacity onPress={() => setExpanded(!expanded)}>
|
|
127
|
-
<Text style={textStyle}>
|
|
128
|
-
{expanded ? t("SHOW_LESS") : t("READ_MORE")}
|
|
171
|
+
{/* Toggle (only when truncation is needed) */}
|
|
172
|
+
{isTruncatable ? (
|
|
173
|
+
<View style={[{ alignItems: "flex-end", marginTop: 6 }, toggleContainerStyle]}>
|
|
174
|
+
<TouchableOpacity onPress={toggle} accessibilityRole='button'>
|
|
175
|
+
<Text style={[{ alignSelf: "flex-end" }, textStyle, toggleTextStyle]}>
|
|
176
|
+
{isExpanded ? t("SHOW_LESS") : t("READ_MORE")}
|
|
129
177
|
</Text>
|
|
130
178
|
</TouchableOpacity>
|
|
131
179
|
</View>
|
|
132
|
-
)}
|
|
180
|
+
) : null}
|
|
133
181
|
</View>
|
|
134
182
|
);
|
|
135
183
|
};
|
|
136
|
-
|
|
137
184
|
export default CometChatTextBubble;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type for Translation objects, each language contains key-value pairs
|
|
3
|
-
*/
|
|
4
|
-
type Translation = {
|
|
5
|
-
[key: string]: string;
|
|
6
|
-
};
|
|
7
|
-
/**
|
|
8
|
-
* Type for translations mapping language code to Translation
|
|
9
|
-
*/
|
|
10
|
-
type Translations = {
|
|
11
|
-
[languageCode: string]: Translation;
|
|
12
|
-
};
|
|
13
|
-
declare class CometChatLocalize {
|
|
14
|
-
/**Properties and constants */
|
|
15
|
-
static fallbackLanguage: string;
|
|
16
|
-
static locale: string;
|
|
17
|
-
static rtlLanguages: string[];
|
|
18
|
-
static direction: Readonly<{
|
|
19
|
-
ltr: "ltr";
|
|
20
|
-
rtl: "rtl";
|
|
21
|
-
}>;
|
|
22
|
-
/** The translations object now has a more explicit type */
|
|
23
|
-
static translations: Translations;
|
|
24
|
-
/**
|
|
25
|
-
* Needs to be called at the start of the application in order to set the language
|
|
26
|
-
* @param {Object} - language & resources
|
|
27
|
-
*/
|
|
28
|
-
static init: ({ language, resources, }: {
|
|
29
|
-
language?: string | undefined;
|
|
30
|
-
resources?: Translations | undefined;
|
|
31
|
-
}) => void;
|
|
32
|
-
/**
|
|
33
|
-
* Returns the native language
|
|
34
|
-
* @returns {String} native language i.e. en-US
|
|
35
|
-
*/
|
|
36
|
-
static getNativeLanguage: () => string;
|
|
37
|
-
/**
|
|
38
|
-
* Returns the language code
|
|
39
|
-
* @returns {String} language code i.e. en
|
|
40
|
-
*/
|
|
41
|
-
static getLanguageCode: () => string;
|
|
42
|
-
/**
|
|
43
|
-
* Returns the active language. Return fallback language if translation is not available for the active language
|
|
44
|
-
* @returns {String} active language
|
|
45
|
-
*/
|
|
46
|
-
static getLocale: () => string;
|
|
47
|
-
/**
|
|
48
|
-
* Set the active language
|
|
49
|
-
* @param {String} language
|
|
50
|
-
*/
|
|
51
|
-
static setLocale: (language: string) => void;
|
|
52
|
-
/**
|
|
53
|
-
* Accepts the string to localize and return the localized string
|
|
54
|
-
* @param {String} str
|
|
55
|
-
* @returns {String} localized str
|
|
56
|
-
*/
|
|
57
|
-
static localize: (str: string) => string;
|
|
58
|
-
/**
|
|
59
|
-
* Sets the default language if no language is passed in init method
|
|
60
|
-
*/
|
|
61
|
-
static setDefaultLanguage: () => void;
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if the active language is rtl otherwise return false
|
|
64
|
-
* @returns {Boolean} whether the language is rtl or not
|
|
65
|
-
*/
|
|
66
|
-
static isRTL: () => boolean;
|
|
67
|
-
/**
|
|
68
|
-
* Returns rtl or ltr based on the active language
|
|
69
|
-
* @returns {String} the direction of the active language
|
|
70
|
-
*/
|
|
71
|
-
static getDir: () => string;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Returns localized string based on active language
|
|
75
|
-
* @param {String} str
|
|
76
|
-
* @returns {String} localized str
|
|
77
|
-
*/
|
|
78
|
-
declare const localize: (str: string) => string;
|
|
79
|
-
export { CometChatLocalize, localize };
|